X-Git-Url: http://nitlanguage.org diff --git a/src/rapid_type_analysis.nit b/src/rapid_type_analysis.nit index 69e9023..8e5565c 100644 --- a/src/rapid_type_analysis.nit +++ b/src/rapid_type_analysis.nit @@ -93,7 +93,7 @@ class RapidTypeAnalysis var mtype = callsite.recv var anchor = callsite.anchor if anchor != null then mtype = mtype.anchor_to(callsite.mmodule, anchor) - mtype = mtype.as_notnullable + mtype = mtype.undecorate if mtype isa MClassType then mtype = mtype.mclass.intro.bound_mtype var mproperty = callsite.mproperty var res = live_targets_cache[mtype, mproperty] @@ -321,7 +321,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 @@ -465,7 +465,7 @@ class RapidTypeVisitor do mtype = mtype.anchor_to(self.analysis.mainmodule, self.receiver) if mtype isa MNullType then return null - mtype = mtype.as_notnullable + mtype = mtype.undecorate assert mtype isa MClassType assert not mtype.need_anchor return mtype @@ -540,6 +540,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 +559,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)