Commit 463f58d8 authored by Michaël Cadilhac's avatar Michaël Cadilhac
Browse files

2005-09-16 Michael Cadilhac <michael.cadilhac@lrde.epita.fr>

	* src/emit_functions.c (emit_emitter_func): Fix small bug on #define
	optimization.
parent 76933426
2005-09-16 Michael Cadilhac <michael.cadilhac@lrde.epita.fr>
* src/emit_functions.c (emit_emitter_func): Fix small bug on #define
optimization.
2005-09-13 Michael Cadilhac <michael.cadilhac@lrde.epita.fr> 2005-09-13 Michael Cadilhac <michael.cadilhac@lrde.epita.fr>
* tests/Makefile.am: Add monoburg$(EXEEXT) to the dependencies of * tests/Makefile.am: Add monoburg$(EXEEXT) to the dependencies of
......
...@@ -37,7 +37,7 @@ void emit_emitter_func () ...@@ -37,7 +37,7 @@ void emit_emitter_func ()
if (rule->code) { if (rule->code) {
if ((rulen = GPOINTER_TO_INT (g_hash_table_lookup (cache, rule->code)))) { if ((rulen = GPOINTER_TO_INT (g_hash_table_lookup (cache, rule->code)))) {
emit_rule_string (rule, ""); emit_rule_string (rule, "");
output ("#define mono_burg_emit_%d mono_burg_emit_%d\n\n", i, rulen); output ("#define mono_burg_emit_%d mono_burg_emit_%d\n\n", i, rulen - 1);
i++; i++;
continue; continue;
} }
...@@ -60,7 +60,7 @@ void emit_emitter_func () ...@@ -60,7 +60,7 @@ void emit_emitter_func ()
emit_rule_variables (rule); emit_rule_variables (rule);
output ("%s\n\t}\n", rule->code); output ("%s\n\t}\n", rule->code);
output ("}\n\n"); output ("}\n\n");
g_hash_table_insert (cache, rule->code, GINT_TO_POINTER (i)); g_hash_table_insert (cache, rule->code, GINT_TO_POINTER (i + 1));
} }
i++; i++;
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment