mirror of
https://github.com/Mercury-Language/mercury.git
synced 2026-04-17 18:33:58 +00:00
Estimated hours taken: 4 Branches: main Fix Mantis bug #170. The problem involved a string switch inlined into the condition of an if-then-else in the predicate execute_cmd_string. The switched-on variable, CmdWord, is not used in or after the switch in the condition or the then part, so it becomes forward dead in the switch, but it IS used in the else part. This requires it to be made a zombie when it forward dies, so it can be resurrected at the start of the else part. The initial implementation of string hash lookup switches did not do that. compiler/string_switch.m: Fix the bug by making all variables being made forward dead into zombies if they are needed by an enclosing resume point. compiler/lookup_switch.m: Fix the same bug in switches on atomic types. compiler/var_locn.m: Fix the format of some documentation. ssdb/Mercury.options: Remove the workaround for bug #170, since it won't be needed once the diff to the compiler is installed. tests/hard_coded/lookup_switch_simple_cond.{m,exp}: A version of the existing lookup_switch_simple test case that puts the switch in a condition, to test the fix to lookup_switch.m. The compilation of ssdb/ssdb.m with -O5 is the test case for the fix to string_switch.m. tests/hard_coded/Mmakefile: Enable the new test case.
18 lines
919 B
Plaintext
18 lines
919 B
Plaintext
#-----------------------------------------------------------------------------#
|
|
# Copyright (C) 2007, 2010 University of Melbourne.
|
|
# This file may only be copied under the terms of the GNU General
|
|
# Public License - see the file COPYING in the Mercury distribution.
|
|
#-----------------------------------------------------------------------------#
|
|
# Mercury.options - module-specific flags for Mmake and `mmc --make'.
|
|
#-----------------------------------------------------------------------------#
|
|
|
|
MCFLAGS-mer_ssdb = --no-warn-nothing-exported --no-warn-unused-imports
|
|
|
|
# XXX This line is needed so that `mmake --use-mmc-make libmer_ssdb'
|
|
# passes `-lmer_mdbcomp' to `mmc --make' in the MLLIBS variable.
|
|
LIBRARIES-mer_ssdb = mer_mdbcomp mer_browser
|
|
|
|
# Whereas these lines are needed for plain `mmake'.
|
|
EXTRA_LIBRARIES-libmer_ssdb.so = mer_mdbcomp mer_browser
|
|
EXTRA_LIBRARIES-libmer_ssdb.dylib = mer_mdbcomp mer_browser
|