sep_comp: SeparateRuntimeFunction::compile_trampolines build its own argument list
authorJean Privat <jean@pryen.org>
Wed, 17 Jun 2015 01:21:30 +0000 (21:21 -0400)
committerJean Privat <jean@pryen.org>
Wed, 17 Jun 2015 01:21:30 +0000 (21:21 -0400)
Signed-off-by: Jean Privat <jean@pryen.org>

src/compiler/separate_compiler.nit

index e07f125..ed7da90 100644 (file)
@@ -2281,8 +2281,10 @@ class SeparateRuntimeFunction
        fun compile_trampolines(compiler: SeparateCompiler)
        do
                var recv = self.mmethoddef.mclassdef.bound_mtype
-               var selfvar = arguments.first
+               var selfvar = new RuntimeVariable("self", called_recv, recv)
                var ret = called_signature.return_mtype
+               var arguments = ["self"]
+               for i in [0..called_signature.arity[ do arguments.add "p{i}"
 
                if mmethoddef.is_intro and not recv.is_c_primitive then
                        var m = mmethoddef.mproperty