From: Jean Privat Date: Mon, 24 Jan 2011 22:01:00 +0000 (-0500) Subject: compile: remove hackish optimization of Array::add X-Git-Tag: v0.4~19^2 X-Git-Url: http://nitlanguage.org?ds=sidebyside compile: remove hackish optimization of Array::add This optimization was useful with the parsing tables in Nit. Signed-off-by: Jean Privat --- diff --git a/src/compiling/compiling_icode.nit b/src/compiling/compiling_icode.nit index 4623ed3..52caff6 100644 --- a/src/compiling/compiling_icode.nit +++ b/src/compiling/compiling_icode.nit @@ -577,16 +577,10 @@ redef class ICall var w = new Writer var prop = property if prop.global.is_init then args.add("init_table") - if prop.name == (once ("add".to_symbol)) and prop.local_class.name == (once ("Array".to_symbol)) then - w.add(prop.cname) - w.add("(") - else - w.add(prop.global.meth_call) - w.add("(") - w.add(args.first) - w.add(")(") - end - var first = true + w.add(prop.global.meth_call) + w.add("(") + w.add(args.first) + w.add(")(") w.add_all(args, ", ") w.add(")") return w