for m in mainmodule.in_importation.greaters do for cd in m.mclassdefs do
var mclass = cd.mclass
- # Collect methods ad attributes
+ # Collect methods and attributes
for p in cd.intro_mproperties do
if p isa MMethod then
if rta == null then
var alloc = v.nit_alloc("sizeof(struct instance) + {attrs.length}*sizeof(nitattribute_t)", mclass.full_name)
v.add("{res} = {alloc};")
end
+ if modelbuilder.toolcontext.opt_trace.value then v.add("tracepoint(Nit_Compiler, Object_Instance,\"{mtype}\", (intptr_t)self);")
v.add("{res}->type = type;")
hardening_live_type(v, "type")
v.require_declaration("class_{c_name}")