From: Jean Privat Date: Fri, 24 Jun 2016 02:05:06 +0000 (-0400) Subject: engines: remove useless native method `calloc_string` X-Git-Url: http://nitlanguage.org?ds=sidebyside engines: remove useless native method `calloc_string` Signed-off-by: Jean Privat --- diff --git a/src/compiler/abstract_compiler.nit b/src/compiler/abstract_compiler.nit index 0fa3d4b..364c6be 100644 --- a/src/compiler/abstract_compiler.nit +++ b/src/compiler/abstract_compiler.nit @@ -3004,9 +3004,6 @@ redef class AMethPropdef else if pname == "sys" then v.ret(v.new_expr("glob_sys", ret.as(not null))) return true - else if pname == "calloc_string" then - v.ret(v.new_expr("(char*)nit_alloc({arguments[1]})", ret.as(not null))) - return true else if pname == "calloc_array" then v.calloc_array(ret.as(not null), arguments) return true diff --git a/src/interpreter/naive_interpreter.nit b/src/interpreter/naive_interpreter.nit index a9426c4..6d5ad40 100644 --- a/src/interpreter/naive_interpreter.nit +++ b/src/interpreter/naive_interpreter.nit @@ -1177,8 +1177,6 @@ redef class AMethPropdef else if pname == "utf8_length" then return v.int_instance(args[0].val.as(NativeString).utf8_length(args[1].to_i, args[2].to_i)) end - else if pname == "calloc_string" then - return v.native_string_instance_len(args[1].to_i) else if cname == "NativeArray" then if pname == "new" then var val = new Array[Instance].filled_with(v.null_instance, args[1].to_i)