metamodel: rename 'universal' to 'enum'
[nit.git] / src / analysis / remove_out_of_init_get_test.nit
index 31df643..0685777 100644 (file)
@@ -14,7 +14,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-# This package introduces an optimization that removes 'get' tests when
+# This module introduces an optimization that removes 'get' tests when
 # not reachable from an initializer
 package remove_out_of_init_get_test
 
@@ -38,7 +38,7 @@ redef class Program
 
        # This method will create a file and output informations about this optimization
        fun dump_out_of_init_information(directory_name: String) do
-               var f = new OFStream.open("{directory_name}/{module.name}.out_of_init_opt.log")
+               var f = new OFStream.open("{directory_name}/{main_module.name}.out_of_init_opt.log")
                var nb_not_optimized = 0
 
                with_each_iroutines !action(i,m) do
@@ -55,7 +55,7 @@ redef class Program
 end
 
 class IssetCounter
-special ICodeVisitor
+       super ICodeVisitor
        readable var _nb_isset: Int = 0
 
        redef fun visit_icode(ic)
@@ -69,7 +69,7 @@ special ICodeVisitor
 end
 
 class GetterTestRemover
-special ICodeVisitor
+       super ICodeVisitor
        readable var _nb_optimized_isset: Int = 0
 
        redef fun visit_icode(ic)
@@ -78,8 +78,7 @@ special ICodeVisitor
                if ic isa IAttrIsset then
                        var result = ic.result
                        assert result != null
-                       var e =  new INative("TAG_Bool(true)", null)
-                       e.is_pure = true
+                       var e =  new IBoolValue(true)
                        e.result = result
                        current_icode.insert_before(e)
                        current_icode.delete