icode: remove method info from ICodeBuilder
[nit.git] / src / icode / icode_builder.nit
index dbb26bd..2d75813 100644 (file)
@@ -94,7 +94,7 @@ class ICodeBuilder
        # Add a localized IAbort
        fun add_abort(s: String...)
        do
-               stmt(new IAbort(s, method, module))
+               stmt(new IAbort(s, module))
        end
 
        # Add an assigment to the iroutine return value
@@ -169,6 +169,7 @@ class ICodeBuilder
        fun lit_true_reg: IRegister
        do
                var e = new INative("TAG_Bool(true)", null)
+               e.is_pure = true
                return expr(e, module.type_bool)
        end
 
@@ -176,6 +177,7 @@ class ICodeBuilder
        fun lit_false_reg: IRegister
        do
                var e = new INative("TAG_Bool(false)", null)
+               e.is_pure = true
                return expr(e, module.type_bool)
        end
 
@@ -194,16 +196,12 @@ class ICodeBuilder
        # The current sequence of icodes
        readable writable var _seq: ISeq
 
-       # The method associated to the iroutine (if any)
-       readable var _method: nullable MMMethod
-
-       init(module: MMModule, r: IRoutine, m: nullable MMMethod)
+       init(module: MMModule, r: IRoutine)
        do
                _module = module
                _current_location = r.location
                _iroutine = r
                _seq = r.body
-               _method = m
        end
 
        # New ICodes are set to this location