if l != null then
visitor.add_indent(w)
w.add("/* ")
- w.add(l.file)
+ w.add(l.file.filename)
w.add(":")
w.add(l.line_start.to_s)
w.add(" */\n")
v.add_decl("struct \{struct stack_frame_t me;\} fra;")
end
v.add_instr("fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;")
- v.add_instr("fra.me.file = LOCATE_{v.visitor.mmmodule.name};")
+ v.add_instr("fra.me.file = LOCATE_{v.visitor.mmmodule.cname};")
v.add_instr("fra.me.line = {ll};")
v.add_instr("fra.me.meth = LOCATE_{v.basecname};")
v.add_instr("fra.me.has_broke = 0;")
v.add_location(location)
var w = new_result(v)
w.add("NEW_")
- w.add(stype.local_class.name.to_s)
+ w.add(stype.local_class.cname)
w.add("()")
end
end
v.add_location(location)
var w = new_result(v)
w.add("CHECKNEW_")
- w.add(stype.local_class.name.to_s)
+ w.add(stype.local_class.cname)
w.add("(")
w.add(v.register(expr))
w.add(")")
v.add_location(location)
var w = v.new_instr
w.add("INIT_ATTRIBUTES__")
- w.add(stype.local_class.name.to_s)
+ w.add(stype.local_class.cname)
w.add("(")
w.add(v.register(expr))
w.add(");\n")
v.add_location(location)
if method.is_intern then
compile_intern_method_to_c(v)
- else
+ else if not method.is_init then
compile_extern_method_to_c(v)
end
end
fun compile_extern_method_to_c(v: I2CCompilerVisitor)
do
- var ename = method.extern_name.as(not null)#"{method.module.name}_{method.local_class.name}_{method.local_class.name}_{method.name}_{method.signature.arity}"
+ var ename = method.extern_name.as(not null)
+
var sig = method.signature
assert exprs.length == sig.arity + 1
w.add("\", NULL")
end
w.add(", LOCATE_")
- w.add(module_location.name.to_s)
+ w.add(module_location.cname)
var ll = location
if ll != null then
w.add(", ")