[pypy-commit] lang-smalltalk default: changed the stack-pointer from beeing tempsize-based to being 0 based (relative to _temps_and_stack-array) to the world
lwassermann
noreply at buildbot.pypy.org
Wed May 15 20:31:21 CEST 2013
Author: Lars Wassermann <lars.wassermann at gmail.com>
Branch:
Changeset: r392:b1bce04a7d50
Date: 2013-05-15 18:28 +0000
http://bitbucket.org/pypy/lang-smalltalk/changeset/b1bce04a7d50/
Log: changed the stack-pointer from beeing tempsize-based to being 0
based (relative to _temps_and_stack-array) to the world
diff --git a/spyvm/shadow.py b/spyvm/shadow.py
--- a/spyvm/shadow.py
+++ b/spyvm/shadow.py
@@ -493,8 +493,7 @@
# the stackpointer in the W_PointersObject starts counting at the
# tempframe start
# Stackpointer from smalltalk world == stacksize in python world
- self.store_stackpointer(self.space.unwrap_int(w_sp1) -
- self.tempsize())
+ self.store_stackpointer(self.space.unwrap_int(w_sp1))
def store_stackpointer(self, size):
depth = self.stackdepth()
@@ -507,8 +506,7 @@
self.push(self.space.w_nil)
def wrap_stackpointer(self):
- return self.space.wrap_int(self.stackdepth() +
- self.tempsize())
+ return self.space.wrap_int(self.stackdepth())
def external_stackpointer(self):
return self.stackdepth() + self.stackstart()
@@ -669,7 +667,7 @@
self._temps_and_stack[self._stack_ptr] = None
def stackdepth(self):
- return rarithmetic.intmask(self._stack_ptr - self.tempsize())
+ return rarithmetic.intmask(self._stack_ptr)
@jit.unroll_safe
def pop_and_return_n(self, n):
@@ -941,8 +939,7 @@
return constants.MTHDCTX_TEMP_FRAME_START
def stackstart(self):
- return (constants.MTHDCTX_TEMP_FRAME_START +
- self.tempsize())
+ return (constants.MTHDCTX_TEMP_FRAME_START)
def myblocksize(self):
return self.size() - self.tempsize()
More information about the pypy-commit
mailing list