Alex Gaynor committed 81cea2b

try to pass stuff that's really the right type, except now it fails for another (more obscure reasons)

  • Participants
  • Parent commits 9f224d4
  • Branches inline-virtualref

Comments (0)

Files changed (3)

File rpython/jit/backend/llgraph/

-import py, weakref
+import weakref
+import py
 from rpython.jit.backend import model
 from rpython.jit.backend.llgraph import support
-from rpython.jit.metainterp.history import AbstractDescr
-from rpython.jit.metainterp.history import Const, getkind
-from rpython.jit.metainterp.history import INT, REF, FLOAT, VOID
-from rpython.jit.metainterp.resoperation import rop
 from rpython.jit.codewriter import longlong, heaptracker
 from rpython.jit.codewriter.effectinfo import EffectInfo
+from rpython.jit.metainterp.history import (AbstractDescr, Const, getkind, INT,
+from rpython.jit.metainterp.resoperation import rop
 from rpython.rtyper.llinterp import LLInterpreter, LLException
 from rpython.rtyper.lltypesystem import lltype, llmemory, rffi, rclass, rstr
+from rpython.rlib.objectmodel import compute_unique_id
 from rpython.rlib.rarithmetic import ovfcheck, r_uint, r_ulonglong
 from rpython.rlib.rtimer import read_timestamp
 class LLTrace(object):
     has_been_freed = False
     invalid = False
         self.rtyper = rtyper
         self.llinterp = LLInterpreter(rtyper)
         self.descrs = {}
+        self.token_to_frame = {}
         class MiniStats:
         self.stats = stats or MiniStats()
         return gcref
     def force(self, force_token):
-        frame = force_token
+        frame = self.token_to_frame[force_token]
         assert isinstance(frame, LLFrame)
         assert frame.forced_deadframe is None
         values = []
         return self.cpu.bh_new_with_vtable(vtable, descr)
     def execute_force_token(self, _):
-        return self
+        self.cpu.token_to_frame[compute_unique_id(self)] = self
+        return compute_unique_id(self)
     def execute_cond_call_gc_wb(self, descr, a, b):
         py.test.skip("cond_call_gc_wb not supported")

File rpython/jit/metainterp/

 from rpython.annotator import model as annmodel
 from rpython.jit.codewriter import heaptracker
 from rpython.jit.metainterp import history
-from rpython.rlib.jit import InvalidVirtualRef
+from rpython.rlib.jit import InvalidVirtualRef, look_inside_iff
 from rpython.rtyper.annlowlevel import MixLevelHelperAnnotator
 from rpython.rtyper.lltypesystem import lltype, llmemory, rclass
 from rpython.rtyper.rmodel import inputconst, log

File rpython/rtyper/lltypesystem/

+import os
+import sys
 import py
 from rpython.annotator import model as annmodel
-from rpython.rtyper.lltypesystem import lltype, rstr
-from rpython.rtyper.lltypesystem import ll2ctypes
-from rpython.rtyper.lltypesystem.llmemory import cast_ptr_to_adr
-from rpython.rtyper.lltypesystem.llmemory import itemoffsetof, raw_memcopy
 from rpython.annotator.model import lltype_to_annotation
+from rpython.rlib import rarithmetic, rgc, jit
+from rpython.rlib.objectmodel import (Symbolic, keepalive_until_here,
+    enforceargs, we_are_translated)
+from rpython.rlib.rarithmetic import maxint, LONG_BIT
+from rpython.rlib.rstring import StringBuilder, UnicodeBuilder, assert_str0
+from rpython.rlib.unroll import unrolling_iterable
+from rpython.rtyper.annlowlevel import llhelper
+from rpython.rtyper.extregistry import ExtRegistryEntry
+from rpython.rtyper.lltypesystem import lltype, ll2ctypes, llmemory
+from rpython.rtyper.lltypesystem.llmemory import (cast_ptr_to_adr, itemoffsetof,
+    raw_memcopy)
+from rpython.rtyper.tool.rfficache import platform, sizeof_c_type
 from rpython.tool.sourcetools import func_with_new_name
-from rpython.rlib.objectmodel import Symbolic
-from rpython.rlib.objectmodel import keepalive_until_here, enforceargs
-from rpython.rlib import rarithmetic, rgc
-from rpython.rtyper.extregistry import ExtRegistryEntry
-from rpython.rlib.unroll import unrolling_iterable
-from rpython.rtyper.tool.rfficache import platform, sizeof_c_type
+from rpython.translator.platform import CompilationError
 from rpython.translator.tool.cbuild import ExternalCompilationInfo
-from rpython.rtyper.annlowlevel import llhelper
-from rpython.rlib.objectmodel import we_are_translated
-from rpython.rlib.rstring import StringBuilder, UnicodeBuilder, assert_str0
-from rpython.rlib import jit
-from rpython.rtyper.lltypesystem import llmemory
-from rpython.rlib.rarithmetic import maxint, LONG_BIT
-from rpython.translator.platform import CompilationError
-import os, sys
 class CConstant(Symbolic):
     """ A C-level constant, maybe #define, rendered directly.