lib/standard: Introduce Byte type in kernel
[nit.git] / src / rapid_type_analysis.nit
index 73cc176..bcd9f8e 100644 (file)
@@ -213,6 +213,7 @@ class RapidTypeAnalysis
                force_alive("Float")
                force_alive("Char")
                force_alive("Pointer")
+               force_alive("Byte")
 
                while not todo.is_empty do
                        var mmethoddef = todo.shift
@@ -321,7 +322,7 @@ class RapidTypeAnalysis
        do
                var d = mtype.length
                if d > 255 then
-                       self.modelbuilder.toolcontext.fatal_error(null, "Fatal error: limitation in the rapidtype analysis engine: a type depth of {d} is too important, the problematic type is {mtype}.")
+                       self.modelbuilder.toolcontext.fatal_error(null, "Fatal Error: limitation in the rapidtype analysis engine: a type depth of {d} is too important, the problematic type is `{mtype}`.")
                end
        end
 
@@ -540,6 +541,8 @@ redef class AArrayExpr
                mtype = v.cleanup_type(mtype).as(not null)
                var prop = v.get_method(mtype, "with_native")
                v.add_monomorphic_send(mtype, prop)
+               v.add_callsite(with_capacity_callsite)
+               v.add_callsite(push_callsite)
        end
 end
 
@@ -557,7 +560,7 @@ redef class ASuperstringExpr
        redef fun accept_rapid_type_visitor(v)
        do
                var mmodule = v.analysis.mainmodule
-               var object_type = mmodule.object_type
+               var object_type = mmodule.string_type
                var arraytype = mmodule.array_type(object_type)
                v.add_type(arraytype)
                var nattype = mmodule.native_array_type(object_type)