icode: remove method information in IAbort
[nit.git] / src / icode / icode_tools.nit
index efdc0b7..22be379 100644 (file)
@@ -93,7 +93,7 @@ end
 
 redef class IRoutine
        # Inline an iroutine in an icode sequence
-       fun inline_in_seq(seq: ISeq, args: IndexedCollection[IRegister]): nullable IRegister
+       fun inline_in_seq(seq: ISeq, args: Sequence[IRegister]): nullable IRegister
        do
                var d = new ICodeDupContext
                if args.length != params.length then print "{args.length} != {params.length}"
@@ -129,7 +129,7 @@ private class ICodeDupContext
 
        # Duplicate a bunch of registers
        # Subsequent invocation will return the same registers
-       fun dup_iregs(regs: IndexedCollection[IRegister]): IndexedCollection[IRegister]
+       fun dup_iregs(regs: Sequence[IRegister]): Sequence[IRegister]
        do
                var a = new Array[IRegister].with_capacity(regs.length)
                for r in regs do
@@ -216,7 +216,7 @@ end
 redef class IAbort
        redef fun inner_dup_with(d)
        do
-               return new IAbort(texts, property_location, module_location)
+               return new IAbort(texts, module_location)
        end
 end
 
@@ -258,7 +258,9 @@ end
 redef class INative
        redef fun inner_dup_with(d)
        do
-               return new INative(code, d.dup_iregs(exprs))
+               var c2 = new INative(code, d.dup_iregs(exprs))
+               c2.is_pure = is_pure
+               return c2
        end
 end