Author: Armin Rigo <[email protected]>
Branch: guard-compatible
Changeset: r84657:c35735f0d87d
Date: 2016-05-24 15:22 +0200
http://bitbucket.org/pypy/pypy/changeset/c35735f0d87d/
Log: Clean-ups
diff --git a/rpython/jit/backend/model.py b/rpython/jit/backend/model.py
--- a/rpython/jit/backend/model.py
+++ b/rpython/jit/backend/model.py
@@ -158,15 +158,6 @@
"""
pass
- def grow_guard_compatible_switch(self, compiled_loop_token,
- guarddescr, gcref):
- """ This method is called to add another case to a guard_compatible.
- guard_compatible starts like a guard_value, but can grow to check more
- cases. The guard should only fail if the argument is unequal to all the
- cases added so far.
- """
- raise NotImplementedError
-
def sizeof(self, S):
raise NotImplementedError
diff --git a/rpython/jit/backend/x86/assembler.py
b/rpython/jit/backend/x86/assembler.py
--- a/rpython/jit/backend/x86/assembler.py
+++ b/rpython/jit/backend/x86/assembler.py
@@ -736,10 +736,6 @@
if WORD == 8 and len(self.pending_memoryerror_trampoline_from) > 0:
self.error_trampoline_64 = self.generate_propagate_error_64()
- def _get_addr_in_gc_table(self, index):
- # return the address of the slot in the gctable, number 'index'
- return self.gc_table_addr + index * WORD
-
def patch_pending_failure_recoveries(self, rawstart):
# after we wrote the assembler to raw memory, set up
# tok.faildescr.adr_jump_offset to contain the raw address of
@@ -751,7 +747,7 @@
tok.faildescr.adr_jump_offset = addr
if tok.guard_compatible():
guard_compat.patch_guard_compatible(tok, rawstart,
- self._get_addr_in_gc_table,
+ self._addr_from_gc_table,
self.gc_table_tracer)
continue
descr = tok.faildescr
@@ -1445,8 +1441,8 @@
self.mc.overwrite32(p_location-4, offset)
def _addr_from_gc_table(self, index):
- # get the address of the gc table entry 'index'. 32-bit mode only.
- assert IS_X86_32
+ # get the address of the gc table entry 'index'. (on x86-64,
+ # you can only call this after the assembler was materialized)
return self.gc_table_addr + index * WORD
def load_reg_from_gc_table(self, resvalue, index):
diff --git a/rpython/jit/backend/x86/runner.py
b/rpython/jit/backend/x86/runner.py
--- a/rpython/jit/backend/x86/runner.py
+++ b/rpython/jit/backend/x86/runner.py
@@ -6,7 +6,7 @@
from rpython.jit.backend.x86.regalloc import gpr_reg_mgr_cls, xmm_reg_mgr_cls
from rpython.jit.backend.x86.profagent import ProfileAgent
from rpython.jit.backend.llsupport.llmodel import AbstractLLCPU
-from rpython.jit.backend.x86 import regloc, guard_compat
+from rpython.jit.backend.x86 import regloc
import sys
@@ -122,10 +122,6 @@
l[i].counter = ll_s.i
return l
- def grow_guard_compatible_switch(self, compiled_loop_token,
- guarddescr, gcref):
- guard_compat.grow_switch(self, compiled_loop_token, guarddescr, gcref)
-
class CPU386(AbstractX86CPU):
backend_name = 'x86'
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit