From 9df3445030ee6c80a67b5af120f3e3c4fe4dff0d Mon Sep 17 00:00:00 2001 From: Jean Privat Date: Thu, 23 Jun 2016 22:05:06 -0400 Subject: [PATCH] engines: remove useless native method `calloc_string` Signed-off-by: Jean Privat --- src/compiler/abstract_compiler.nit | 3 --- src/interpreter/naive_interpreter.nit | 2 -- 2 files changed, 5 deletions(-) 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) -- 1.7.9.5