summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
e15b548)
Signed-off-by: Jean Privat <jean@pryen.org>
curr_instances[i] = currFra.map[i]
end
end
curr_instances[i] = currFra.map[i]
end
end
- if v.returnmark == f then
- v.returnmark = null
+ if v.is_escape(self.return_mark) then
return res
end
return null
return res
end
return null
return self.modelbuilder.force_get_primitive_method(current_node, name, recv.mclass, self.mainmodule)
end
return self.modelbuilder.force_get_primitive_method(current_node, name, recv.mclass, self.mainmodule)
end
- # Is a return executed?
- # Set this mark to skip the evaluation until the end of the specified method frame
- var returnmark: nullable FRAME = null
-
- # Is a break or a continue executed?
+ # Is a return, a break or a continue executed?
# Set this mark to skip the evaluation until a labeled statement catch it with `is_escape`
var escapemark: nullable EscapeMark = null
# Is a return or a break or a continue executed?
# Use this function to know if you must skip the evaluation of statements
# Set this mark to skip the evaluation until a labeled statement catch it with `is_escape`
var escapemark: nullable EscapeMark = null
# Is a return or a break or a continue executed?
# Use this function to know if you must skip the evaluation of statements
- fun is_escaping: Bool do return returnmark != null or escapemark != null
+ fun is_escaping: Bool do return escapemark != null
# The value associated with the current return/break/continue, if any.
# Set the value when you set a escapemark.
# The value associated with the current return/break/continue, if any.
# Set the value when you set a escapemark.
var f = v.new_frame(self, mpropdef, args)
var res = call_commons(v, mpropdef, args, f)
v.frames.shift
var f = v.new_frame(self, mpropdef, args)
var res = call_commons(v, mpropdef, args, f)
v.frames.shift
- if v.returnmark == f then
- v.returnmark = null
+ if v.is_escape(self.return_mark) then
return res
end
return res
return res
end
return res
val = v.expr(nexpr)
else if nblock != null then
v.stmt(nblock)
val = v.expr(nexpr)
else if nblock != null then
v.stmt(nblock)
- assert v.returnmark == f
+ assert v.escapemark == return_mark
- v.returnmark = null
- v.escapevalue = null
-redef class AReturnExpr
- redef fun stmt(v)
- do
- var ne = self.n_expr
- if ne != null then
- var i = v.expr(ne)
- if i == null then return
- v.escapevalue = i
- end
- v.returnmark = v.frame
- end
-end
-
redef class AAbortExpr
redef fun stmt(v)
do
redef class AAbortExpr
redef fun stmt(v)
do