[pypy-commit] pypy kill-flowobjspace: flowspace: Use (for now trivial) specialisation CallSpec of ArgumentsForTranslation
rlamy
noreply at buildbot.pypy.org
Sun Jan 27 18:14:49 CET 2013
Author: Ronan Lamy <ronan.lamy at gmail.com>
Branch: kill-flowobjspace
Changeset: r60524:95a4332784d5
Date: 2013-01-27 16:24 +0000
http://bitbucket.org/pypy/pypy/changeset/95a4332784d5/
Log: flowspace: Use (for now trivial) specialisation CallSpec of
ArgumentsForTranslation
diff --git a/rpython/flowspace/argument.py b/rpython/flowspace/argument.py
--- a/rpython/flowspace/argument.py
+++ b/rpython/flowspace/argument.py
@@ -374,6 +374,11 @@
return args._rawshape(nextra)
+class CallSpec(ArgumentsForTranslation):
+ """Represents the arguments passed into a function call, i.e. the
+ `a, b, *c, **d` part in `return func(a, b, *c, **d)`.
+ """
+
#
# ArgErr family of exceptions raised in case of argument mismatch.
# We try to give error messages following CPython's, which are very informative.
diff --git a/rpython/flowspace/bytecode.py b/rpython/flowspace/bytecode.py
--- a/rpython/flowspace/bytecode.py
+++ b/rpython/flowspace/bytecode.py
@@ -36,7 +36,6 @@
code, consts, names, varnames, filename,
name, firstlineno, lnotab, freevars):
"""Initialize a new code object"""
- self.co_name = name
assert nlocals >= 0
self.co_argcount = argcount
self.co_nlocals = nlocals
diff --git a/rpython/flowspace/flowcontext.py b/rpython/flowspace/flowcontext.py
--- a/rpython/flowspace/flowcontext.py
+++ b/rpython/flowspace/flowcontext.py
@@ -7,7 +7,7 @@
from rpython.tool.error import source_lines
from rpython.tool.stdlib_opcode import host_bytecode_spec
-from rpython.flowspace.argument import ArgumentsForTranslation
+from rpython.flowspace.argument import CallSpec
from rpython.flowspace.model import (Constant, Variable, Block, Link,
UnwrapException, c_last_exception, SpaceOperation)
from rpython.flowspace.framestate import (FrameState, recursively_unflatten,
@@ -989,7 +989,7 @@
keywords = None
keywords_w = None
arguments = self.popvalues(n_arguments)
- args = ArgumentsForTranslation(self.space, arguments, keywords,
+ args = CallSpec(self.space, arguments, keywords,
keywords_w, w_star, w_starstar)
w_function = self.popvalue()
w_result = self.space.call_args(w_function, args)
diff --git a/rpython/flowspace/objspace.py b/rpython/flowspace/objspace.py
--- a/rpython/flowspace/objspace.py
+++ b/rpython/flowspace/objspace.py
@@ -7,7 +7,7 @@
import types
from inspect import CO_NEWLOCALS
-from rpython.flowspace.argument import ArgumentsForTranslation
+from rpython.flowspace.argument import CallSpec
from rpython.flowspace.model import (Constant, Variable, WrapException,
UnwrapException, checkgraph)
from rpython.flowspace.bytecode import HostCode
@@ -396,7 +396,7 @@
return self.call_function(w_meth, *arg_w)
def call_function(self, w_func, *args_w):
- args = ArgumentsForTranslation(self, list(args_w))
+ args = CallSpec(self, list(args_w))
return self.call_args(w_func, args)
def appcall(self, func, *args_w):
More information about the pypy-commit
mailing list