else
v.add_decl("struct WBT_ **CREG = NULL;")
end
- var i = 0
+ var k = 0
for r in params do
- if r.slot_index != null then v.add_assignment(v.register(r), args[i])
- i += 1
+ if r.slot_index != null then v.add_assignment(v.register(r), args[k])
+ k += 1
end
- var iclosdecls = closure_decls
if iclosdecls != null then
for i in [0..iclosdecls.length[ do
var iclosdecl = iclosdecls[i]
if r != null and r.slot_index != null then
assert s != null
v.add_assignment(v.register(r), s)
- else if s != null and not self isa IMove then
+ else if s != null and not is_pure then
+ # ICode with side effects must be evaluated
+ # even if the result is not wanted
v.add_instr(s + ";")
end
end
v.add_instr(s.to_s)
var ll = location
- var pl = property_location
- s = new Buffer.from("fprintf(stderr, \"")
- if pl != null then s.append(" in %s")
- s.append(" (%s")
+ s = new Buffer.from("fprintf(stderr, \" (%s")
if ll != null then
s.append(":%d")
end
- s.append(")\\n\", ")
- if pl != null then s.append("LOCATE_{pl.cname}, ")
- s.append("LOCATE_{module_location.name}")
+ s.append(")\\n\", LOCATE_{module_location.name}")
if ll != null then
s.append(", {ll.line_start}")
end