Author: Ronan Lamy <ronan.l...@gmail.com> Branch: annotator Changeset: r68755:082ef34cf051 Date: 2014-01-17 21:11 +0000 http://bitbucket.org/pypy/pypy/changeset/082ef34cf051/
Log: Inline FlowObjSpace.call() in its only caller diff --git a/rpython/flowspace/flowcontext.py b/rpython/flowspace/flowcontext.py --- a/rpython/flowspace/flowcontext.py +++ b/rpython/flowspace/flowcontext.py @@ -1018,8 +1018,12 @@ arguments = self.popvalues(n_arguments) args = CallSpec(arguments, keywords, w_star) w_function = self.popvalue() - w_result = self.space.call(w_function, args) - self.pushvalue(w_result) + if args.keywords or isinstance(args.w_stararg, Variable): + shape, args_w = args.flatten() + hlop = op.call_args(w_function, Constant(shape), *args_w) + else: + hlop = op.simple_call(w_function, *args.as_list()) + self.pushvalue(hlop.eval(self)) def CALL_FUNCTION(self, oparg): self.call_function(oparg) diff --git a/rpython/flowspace/objspace.py b/rpython/flowspace/objspace.py --- a/rpython/flowspace/objspace.py +++ b/rpython/flowspace/objspace.py @@ -34,14 +34,6 @@ def build_flow(self, func): return build_flow(func, self) - def call(self, w_callable, args): - if args.keywords or isinstance(args.w_stararg, Variable): - shape, args_w = args.flatten() - hlop = op.call_args(w_callable, Constant(shape), *args_w) - else: - hlop = op.simple_call(w_callable, *args.as_list()) - return hlop.eval(self.frame) - def build_flow(func, space=FlowObjSpace()): """ _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit