From e0f73a842261a7d8e02de4b620adfb8d5bcdbba0 Mon Sep 17 00:00:00 2001 From: Jean Privat Date: Mon, 24 Jan 2011 17:01:00 -0500 Subject: [PATCH] compile: remove hackish optimization of Array::add This optimization was useful with the parsing tables in Nit. Signed-off-by: Jean Privat --- src/compiling/compiling_icode.nit | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) 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 -- 1.7.9.5