Author: Armin Rigo <[email protected]>
Branch: ec-threadlocal
Changeset: r72158:537fb36a7f9d
Date: 2014-06-23 12:21 +0200
http://bitbucket.org/pypy/pypy/changeset/537fb36a7f9d/
Log: Kill a random indirection: space.startup() must now be called first,
before space.call_function().
diff --git a/pypy/goal/targetpypystandalone.py
b/pypy/goal/targetpypystandalone.py
--- a/pypy/goal/targetpypystandalone.py
+++ b/pypy/goal/targetpypystandalone.py
@@ -30,8 +30,6 @@
if w_dict is not None: # for tests
w_entry_point = space.getitem(w_dict, space.wrap('entry_point'))
w_run_toplevel = space.getitem(w_dict, space.wrap('run_toplevel'))
- w_call_finish_gateway = space.wrap(gateway.interp2app(call_finish))
- w_call_startup_gateway = space.wrap(gateway.interp2app(call_startup))
withjit = space.config.objspace.usemodules.pypyjit
def entry_point(argv):
@@ -53,7 +51,7 @@
argv = argv[:1] + argv[3:]
try:
try:
- space.call_function(w_run_toplevel, w_call_startup_gateway)
+ space.startup()
w_executable = space.wrap(argv[0])
w_argv = space.newlist([space.wrap(s) for s in argv[1:]])
w_exitcode = space.call_function(w_entry_point, w_executable,
w_argv)
@@ -69,7 +67,7 @@
return 1
finally:
try:
- space.call_function(w_run_toplevel, w_call_finish_gateway)
+ space.finish()
except OperationError, e:
debug("OperationError:")
debug(" operror-type: " + e.w_type.getname(space))
@@ -184,11 +182,6 @@
'pypy_thread_attach': pypy_thread_attach,
'pypy_setup_home': pypy_setup_home}
-def call_finish(space):
- space.finish()
-
-def call_startup(space):
- space.startup()
# _____ Define and setup target ___
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit