1.1 --- a/micropython/ast.py Mon Jul 28 00:26:29 2008 +0200
1.2 +++ b/micropython/ast.py Tue Jul 29 00:20:23 2008 +0200
1.3 @@ -702,6 +702,7 @@
1.4
1.5 first = 1
1.6 frame_pos = ncontext
1.7 + max_keyword_pos = 0
1.8
1.9 for arg in args:
1.10
1.11 @@ -775,6 +776,10 @@
1.12 # checks embedded offset against (callable+0)
1.13 # moves the current value to frame+position
1.14
1.15 + # Record the highest possible frame position for this argument.
1.16 +
1.17 + max_keyword_pos = max(max_keyword_pos, max(self.paramtable.all_attribute_positions(arg.name)))
1.18 +
1.19 else:
1.20 self.dispatch(arg)
1.21 self.new_op(StoreFrame(frame_pos))
1.22 @@ -838,7 +843,7 @@
1.23 # NOTE: the context in use.
1.24
1.25 else:
1.26 - self.new_op(CheckFrame())
1.27 + self.new_op(CheckFrame(max(max(employed_positions), max_keyword_pos)))
1.28
1.29 def _generateCallFuncDefaultArgs(self, target, temp, nargs_min, nargs_max, employed_positions):
1.30