From 4c966fe6969be0968e420365735f330890838cbb Mon Sep 17 00:00:00 2001 From: Jean Privat Date: Fri, 16 Jul 2010 12:55:18 -0400 Subject: [PATCH] compile: filter some loops in program icode generation Signed-off-by: Jean Privat --- src/program.nit | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/program.nit b/src/program.nit index 542e914..7284fc6 100644 --- a/src/program.nit +++ b/src/program.nit @@ -91,6 +91,7 @@ class Program var icb = new ICodeBuilder(module, iroutine) for g in c.global_properties do + if not g.intro isa MMAttribute then continue var p = c[g] var t = p.signature.return_type if p isa MMAttribute and t != null then @@ -111,6 +112,7 @@ class Program var iroutine = new IRoutine(iselfa, null) var icb = new ICodeBuilder(module, iroutine) for g in c.global_properties do + if not g.intro isa MMAttribute then continue var p = c[g] var t = p.signature.return_type if p isa MMAttribute and t != null and not t.is_nullable then @@ -122,9 +124,9 @@ class Program end for g in c.global_properties do - var p = c[g] # FIXME skip invisible constructors - if not p.global.is_init_for(c) then continue + if not g.is_init_for(c) then continue + var p = c[g] assert p isa MMMethod var iself = new IRegister(c.get_type) -- 1.7.9.5