add the trace system with a first test which is instance tracing
[nit.git] / src / compiler / separate_compiler.nit
index 8fd3f61..a587c59 100644 (file)
@@ -982,6 +982,7 @@ class SeparateCompiler
                                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}")