X-Git-Url: http://nitlanguage.org diff --git a/src/global_compiler.nit b/src/global_compiler.nit index ecd7265..bcb66ba 100644 --- a/src/global_compiler.nit +++ b/src/global_compiler.nit @@ -247,8 +247,6 @@ class GlobalCompiler do self.header.add_decl("struct nitni_instance \{ val *value; \};") end - - redef fun supports_ffi do return true end # A visitor on the AST of property definition that generate the C code. @@ -384,7 +382,7 @@ class GlobalCompilerVisitor self.add("{res} = 1; /* {args[1].inspect} cannot be null */") end else - self.add_abort("Reciever is null") + self.add_abort("Receiver is null") end self.add "\} else" end @@ -456,11 +454,7 @@ class GlobalCompilerVisitor # Finalizes a call to a method ´m´ on type ´recvtype´ with arguments ´args´ private fun finalize_call(m: MMethodDef, recvtype: MClassType, args: Array[RuntimeVariable]): nullable RuntimeVariable do - if args.length != m.msignature.arity + 1 then # because of self - add("printf(\"NOT YET IMPLEMENTED: Invalid arity for {m}. {args.length} arguments given.\\n\"); show_backtrace(1);") - debug("NOT YET IMPLEMENTED: Invalid arity for {m}. {args.length} arguments given.") - return null - end + assert args.length == m.msignature.arity + 1 else debug("Invalid arity for {m}. {args.length} arguments given.") var rm = new CustomizedRuntimeFunction(m, recvtype) return rm.call(self, args)