nitlanguage
/
nit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge: nitce: do not forgot to autoadapt in native_array_instance
[nit.git]
/
src
/
compiler
/
separate_compiler.nit
diff --git
a/src/compiler/separate_compiler.nit
b/src/compiler/separate_compiler.nit
index
45790b3
..
15b6f05
100644
(file)
--- a/
src/compiler/separate_compiler.nit
+++ b/
src/compiler/separate_compiler.nit
@@
-344,7
+344,7
@@
class SeparateCompiler
for m in mainmodule.in_importation.greaters do for cd in m.mclassdefs do
var mclass = cd.mclass
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
for p in cd.intro_mproperties do
if p isa MMethod then
if rta == null then
@@
-982,6
+982,10
@@
class SeparateCompiler
var alloc = v.nit_alloc("sizeof(struct instance) + {attrs.length}*sizeof(nitattribute_t)", mclass.full_name)
v.add("{res} = {alloc};")
end
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}\", (uintptr_t)self);")
+ v.add("GC_register_finalizer(self, object_destroy_callback, NULL, NULL, NULL);")
+ end
v.add("{res}->type = type;")
hardening_live_type(v, "type")
v.require_declaration("class_{c_name}")
v.add("{res}->type = type;")
hardening_live_type(v, "type")
v.require_declaration("class_{c_name}")