if self.classids.has_key(mtype) then
return self.classids[mtype]
end
- print "No classid for {mtype}"
+ print_error "No classid for {mtype}"
abort
end
redef fun unbox_extern(value, mtype)
do
if mtype isa MClassType and mtype.mclass.kind == extern_kind and
- mtype.mclass.name != "NativeString" then
+ mtype.mclass.name != "CString" then
var res = self.new_var_extern(mtype)
self.add "{res} = ((struct {mtype.c_name}*){value})->value; /* unboxing {value.mtype} */"
return res
redef fun box_extern(value, mtype)
do
if not mtype isa MClassType or mtype.mclass.kind != extern_kind or
- mtype.mclass.name == "NativeString" then return value
+ mtype.mclass.name == "CString" then return value
var valtype = value.mtype.as(MClassType)
var res = self.new_var(mtype)
fun check_valid_reciever(recvtype: MClassType)
do
if self.compiler.runtime_type_analysis.live_types.has(recvtype) or recvtype.mclass.name == "Object" then return
- print "{recvtype} is not a live type"
+ print_error "{recvtype} is not a live type"
abort
end