engines: remove useless native method `calloc_string`
authorJean Privat <jean@pryen.org>
Fri, 24 Jun 2016 02:05:06 +0000 (22:05 -0400)
committerJean Privat <jean@pryen.org>
Fri, 24 Jun 2016 02:05:06 +0000 (22:05 -0400)
Signed-off-by: Jean Privat <jean@pryen.org>

src/compiler/abstract_compiler.nit
src/interpreter/naive_interpreter.nit

index 0fa3d4b..364c6be 100644 (file)
@@ -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
index a9426c4..6d5ad40 100644 (file)
@@ -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)