From 68fd21bc41e71b391e4143b201b0a3bede206feb Mon Sep 17 00:00:00 2001 From: Jean Privat Date: Sun, 8 Feb 2015 09:56:11 +0700 Subject: [PATCH] sep_compiler: table_send take the original entity instead of the color Signed-off-by: Jean Privat --- src/compiler/separate_compiler.nit | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/compiler/separate_compiler.nit b/src/compiler/separate_compiler.nit index e0cfd98..b14da6a 100644 --- a/src/compiler/separate_compiler.nit +++ b/src/compiler/separate_compiler.nit @@ -1131,7 +1131,7 @@ class SeparateCompilerVisitor return res end - return table_send(mmethod, arguments, mmethod.const_color) + return table_send(mmethod, arguments, mmethod) end # Handle common special cases before doing the effective method invocation @@ -1197,7 +1197,7 @@ class SeparateCompilerVisitor return res end - private fun table_send(mmethod: MMethod, arguments: Array[RuntimeVariable], const_color: String): nullable RuntimeVariable + private fun table_send(mmethod: MMethod, arguments: Array[RuntimeVariable], mentity: MEntity): nullable RuntimeVariable do compiler.modelbuilder.nb_invok_by_tables += 1 if compiler.modelbuilder.toolcontext.opt_invocation_metrics.value then add("count_invoke_by_tables++;") @@ -1231,6 +1231,7 @@ class SeparateCompilerVisitor ss.append(", {a}") end + var const_color = mentity.const_color var call if not compiler.modelbuilder.toolcontext.opt_trampoline_call.value then self.require_declaration(const_color) @@ -1315,7 +1316,7 @@ class SeparateCompilerVisitor self.compiler.mainmodule = main return res end - return table_send(m.mproperty, arguments, m.const_color) + return table_send(m.mproperty, arguments, m) end redef fun vararg_instance(mpropdef, recv, varargs, elttype) -- 1.7.9.5