Commit 463f58d8 authored by Michal Cadilhac's avatar Michal Cadilhac

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>
* tests/Makefile.am: Add monoburg$(EXEEXT) to the dependencies of
......
......@@ -37,7 +37,7 @@ void emit_emitter_func ()
if (rule->code) {
if ((rulen = GPOINTER_TO_INT (g_hash_table_lookup (cache, rule->code)))) {
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++;
continue;
}
......@@ -60,7 +60,7 @@ void emit_emitter_func ()
emit_rule_variables (rule);
output ("%s\n\t}\n", rule->code);
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++;
}
......
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