[pypy-commit] pypy continulet-jit-3: Random changes, mostly documentation fixes
arigo
noreply at buildbot.pypy.org
Tue Oct 16 16:57:07 CEST 2012
Author: Armin Rigo <arigo at tunes.org>
Branch: continulet-jit-3
Changeset: r58140:ad4967674c4f
Date: 2012-10-16 16:56 +0200
http://bitbucket.org/pypy/pypy/changeset/ad4967674c4f/
Log: Random changes, mostly documentation fixes
diff --git a/pypy/jit/backend/llsupport/jitframe.py b/pypy/jit/backend/llsupport/jitframe.py
--- a/pypy/jit/backend/llsupport/jitframe.py
+++ b/pypy/jit/backend/llsupport/jitframe.py
@@ -2,9 +2,17 @@
_LONGLONGARRAY = lltype.GcArray(lltype.SignedLongLong)
-JITFRAME = lltype.GcStruct('JITFRAME',
- ('jf_descr', llmemory.GCREF),
- ('jf_excvalue', llmemory.GCREF),
- ('jf_nongcvalues', lltype.Ptr(_LONGLONGARRAY)),
- ('jf_gcvalues', lltype.Array(llmemory.GCREF)))
+JITFRAME = lltype.GcStruct(
+ 'JITFRAME',
+
+ # Once the execute_token() returns, the field 'jf_descr' stores the
+ # descr of the last executed operation (either a GUARD, or FINISH).
+ ('jf_descr', llmemory.GCREF),
+
+ # For the front-end: a GCREF for the savedata
+ ('jf_savedata', llmemory.GCREF),
+
+ # XXX
+ ('jf_nongcvalues', lltype.Ptr(_LONGLONGARRAY)),
+ ('jf_gcvalues', lltype.Array(llmemory.GCREF)))
JITFRAMEPTR = lltype.Ptr(JITFRAME)
diff --git a/pypy/jit/backend/model.py b/pypy/jit/backend/model.py
--- a/pypy/jit/backend/model.py
+++ b/pypy/jit/backend/model.py
@@ -1,7 +1,6 @@
from pypy.rlib.debug import debug_start, debug_print, debug_stop
from pypy.rlib.rarithmetic import intmask
from pypy.jit.metainterp import history
-from pypy.jit.codewriter.longlong import longlong2floatstorage
from pypy.rpython.lltypesystem import lltype
@@ -127,56 +126,51 @@
def get_latest_descr(self, jitframe):
"""Return the descr of the last operation executed by the
jitframe."""
- return jitframe.jf_descr
+ raise NotImplementedError
def get_latest_value_int(self, jitframe, index):
- """Returns the value for the index'th argument to the
- last executed operation (from 'fail_args' if it was a guard,
- or from 'args' if it was a FINISH). Returns an int."""
- return intmask(jitframe.jf_nongcvalues[index])
+ """Returns the value for the index'th 'fail_args' of the
+ last executed operation. Returns an int."""
+ raise NotImplementedError
def get_latest_value_float(self, jitframe, index):
- """Returns the value for the index'th argument to the
- last executed operation (from 'fail_args' if it was a guard,
- or from 'args' if it was a FINISH). Returns a FLOATSTORAGE."""
- return longlong2floatstorage(jitframe.jf_nongcvalues[index])
+ """Returns the value for the index'th 'fail_args' of the
+ last executed operation. Returns a FLOATSTORAGE."""
+ raise NotImplementedError
def get_latest_value_ref(self, jitframe, index):
- """Returns the value for the index'th argument to the
- last executed operation (from 'fail_args' if it was a guard,
- or from 'args' if it was a FINISH). Returns a GCREF."""
- return jitframe.jf_gcvalues[index]
+ """Returns the value for the index'th 'fail_args' of the
+ last executed operation. Returns a GCREF."""
+ raise NotImplementedError
def get_latest_value_count(self, jitframe):
"""Return how many values are ready to be returned by
- get_latest_value_xxx(). Only after a guard failure; not
- necessarily correct after a FINISH."""
- return len(jitframe.jf_gcvalues)
+ get_latest_value_xxx()."""
+ raise NotImplementedError
def get_finish_value_int(self, jitframe):
"""Return the result passed to FINISH, which was an int."""
- return jitframe.jf_finish_int
+ raise NotImplementedError
def get_finish_value_float(self, jitframe):
"""Return the result passed to FINISH, which was a FLOATSTORAGE."""
- return jitframe.jf_finish_float
+ raise NotImplementedError
def get_finish_value_ref(self, jitframe):
"""Return and clear the result passed to FINISH, which was a GCREF.
Also used when it exits due to a failure of a GUARD_EXCEPTION or
GUARD_NO_EXCEPTION, to return the exception."""
- xxxx
- return jitframe.jf_finish_ref
+ raise NotImplementedError
def get_savedata_ref(self, jitframe):
"""Return and clear the last value stored by the frontend with
set_savedata_ref."""
- xxxx
+ raise NotImplementedError
def set_savedata_ref(self, jitframe, value):
"""Store on the jitframe a random GCREF value that will be returned
by the following call to get_savedata_ref()."""
- xxxx
+ raise NotImplementedError
def redirect_call_assembler(self, oldlooptoken, newlooptoken):
"""Redirect oldlooptoken to newlooptoken. More precisely, it is
diff --git a/pypy/jit/backend/x86/arch.py b/pypy/jit/backend/x86/arch.py
--- a/pypy/jit/backend/x86/arch.py
+++ b/pypy/jit/backend/x86/arch.py
@@ -21,13 +21,15 @@
# +--------------------+ <== aligned to 16 bytes
if WORD == 4:
+ # enough for calls with up to 7 arguments, or 7 scratch stores
SCRATCH_SIZE = 7 # total size: 32 bytes
else:
+ # enough for calls with up to 6+3 arguments, or 3 scratch stores
SCRATCH_SIZE = 3 # total size: 32 bytes
# All the rest of the data is in a GC-managed variable-size "frame".
# This frame object's address is always stored in the register EBP/RBP.
-# A frame is a jit.backend.llsupport.llmodel.FRAME = GcArray(Signed).
+# A frame is a jit.backend.llsupport.jitframe.JITFRAME.
# The following locations are indices in this array.
# The frame's fixed size gives the standard fixed part at the
More information about the pypy-commit
mailing list