1.1 --- a/micropython/ast.py Tue Jul 14 00:37:04 2009 +0200
1.2 +++ b/micropython/ast.py Sun Jul 19 22:17:23 2009 +0200
1.3 @@ -603,7 +603,7 @@
1.4
1.5 # Check the number of parameters and defaults.
1.6
1.7 - self.new_op(CheckFrame((nparams, ndefaults, fn.has_star)))
1.8 + self.new_op(CheckFrame((nparams, ndefaults)))
1.9 if ndefaults > 0:
1.10 self.new_op(LoadFunction(fn))
1.11 self.new_op(FillDefaults((nparams, ndefaults)))
1.12 @@ -612,15 +612,19 @@
1.13
1.14 self.set_block(fn.body_block)
1.15
1.16 + extend = ExtendFrame()
1.17 + self.new_op(extend)
1.18 +
1.19 # For functions with star parameters, make a special list for the
1.20 # extra arguments and re-map the parameter.
1.21
1.22 if fn.has_star:
1.23 self.new_op(CopyExtra(nparams))
1.24 - self.new_op(StoreName(nparams - 1))
1.25 +
1.26 + # Ensure that the star parameter has a slot in the frame.
1.27
1.28 - extend = ExtendFrame()
1.29 - self.new_op(extend)
1.30 + self.new_op(CheckExtra(nparams))
1.31 + self.new_op(StoreTemp(nparams))
1.32
1.33 self.dispatch(node.code)
1.34