X-Git-Url: http://nitlanguage.org diff --git a/src/naive_interpreter.nit b/src/naive_interpreter.nit index 016cdc8..afa3fd9 100644 --- a/src/naive_interpreter.nit +++ b/src/naive_interpreter.nit @@ -623,10 +623,10 @@ redef class AConcreteMethPropdef var args = [arguments.first] for auto_super_init in auto_super_inits do args.clear - for i in [0..auto_super_init.intro.msignature.arity+1[ do + for i in [0..auto_super_init.msignature.arity+1[ do args.add(arguments[i]) end - v.send(auto_super_init, args) + v.callsite(auto_super_init, args) end end @@ -716,6 +716,10 @@ redef class AInternMethPropdef return v.char_instance(recv.succ) else if pname == "prec" then return v.char_instance(recv.prec) + else if pname == "+" then + return v.char_instance(recv + args[1].to_i) + else if pname == "-" then + return v.char_instance(recv - args[1].to_i) else if pname == "<" then return v.bool_instance(recv < args[1].val.as(Char)) else if pname == ">" then @@ -929,6 +933,14 @@ redef class AExternMethPropdef return v.float_instance(args[0].to_f.pow(args[1].to_f)) else if pname == "rand" then return v.float_instance(args[0].to_f.rand) + else if pname == "abs" then + return v.float_instance(args[0].to_f.abs) + else if pname == "hypot_with" then + return v.float_instance(args[0].to_f.hypot_with(args[1].to_f)) + else if pname == "is_nan" then + return v.bool_instance(args[0].to_f.is_nan) + else if pname == "is_inf_extern" then + return v.bool_instance(args[0].to_f.is_inf != 0) end else if pname == "native_argc" then return v.int_instance(v.arguments.length) @@ -1586,9 +1598,8 @@ redef class ASuperExpr end # stantard call-next-method - var mpropdef = v.frame.mpropdef + var mpropdef = self.mpropdef mpropdef = mpropdef.lookup_next_definition(v.mainmodule, recv.mtype) - assert mpropdef isa MMethodDef var res = v.call_without_varargs(mpropdef, args) return res end