From 1ad00b9dfcd3d6d984427794f2947963d88cb81b Mon Sep 17 00:00:00 2001 From: Jean Privat Date: Mon, 9 Feb 2015 10:59:35 +0700 Subject: [PATCH] sep_compiler: SeparateRuntimeFunction save its arguments Signed-off-by: Jean Privat --- src/compiler/separate_compiler.nit | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/compiler/separate_compiler.nit b/src/compiler/separate_compiler.nit index 66d1162..437840e 100644 --- a/src/compiler/separate_compiler.nit +++ b/src/compiler/separate_compiler.nit @@ -1884,6 +1884,9 @@ class SeparateRuntimeFunction # The C type for the function pointer. var c_funptrtype: String is lazy do return "{c_ret}(*){c_sig}" + # The arguments, as generated by `compile_to_c` + private var arguments: Array[RuntimeVariable] is noinit + redef fun compile_to_c(compiler) do var mmethoddef = self.mmethoddef @@ -1920,6 +1923,7 @@ class SeparateRuntimeFunction comment.append(": {ret}") end compiler.provide_declaration(self.c_name, "{sig};") + self.arguments = arguments.to_a v.add_decl("/* method {self} for {comment} */") v.add_decl("{sig} \{") -- 1.7.9.5