Ejemplo n.º 1
0
 def force_now(self, virtualizable):
     token = virtualizable.vable_token
     if token == self.TOKEN_TRACING_RESCALL:
         # The values in the virtualizable are always correct during
         # tracing.  We only need to reset vable_token to TOKEN_NONE
         # as a marker for the tracing, to tell it that this
         # virtualizable escapes.
         virtualizable.vable_token = self.TOKEN_NONE
     else:
         from pypy.jit.metainterp.compile import ResumeGuardForcedDescr
         ResumeGuardForcedDescr.force_now(self.cpu, token)
         assert virtualizable.vable_token == self.TOKEN_NONE
Ejemplo n.º 2
0
 def force_now(virtualizable):
     token = virtualizable.vable_token
     if token == VirtualizableInfo.TOKEN_TRACING_RESCALL:
         # The values in the virtualizable are always correct during
         # tracing.  We only need to reset vable_token to TOKEN_NONE
         # as a marker for the tracing, to tell it that this
         # virtualizable escapes.
         virtualizable.vable_token = VirtualizableInfo.TOKEN_NONE
     else:
         from pypy.jit.metainterp.compile import ResumeGuardForcedDescr
         ResumeGuardForcedDescr.force_now(cpu, token)
         assert virtualizable.vable_token == VirtualizableInfo.TOKEN_NONE
Ejemplo n.º 3
0
 def force_virtual(self, inst):
     vref = lltype.cast_pointer(lltype.Ptr(self.JIT_VIRTUAL_REF), inst)
     token = vref.virtual_token
     if token != self.TOKEN_NONE:
         if token == self.TOKEN_TRACING_RESCALL:
             # The "virtual" is not a virtual at all during tracing.
             # We only need to reset virtual_token to TOKEN_NONE
             # as a marker for the tracing, to tell it that this
             # "virtual" escapes.
             assert vref.forced
             vref.virtual_token = self.TOKEN_NONE
         else:
             assert not vref.forced
             from pypy.jit.metainterp.compile import ResumeGuardForcedDescr
             ResumeGuardForcedDescr.force_now(self.cpu, token)
             assert vref.virtual_token == self.TOKEN_NONE
             assert vref.forced
     else:
         assert vref.forced
     return vref.forced
Ejemplo n.º 4
0
 def force_virtual(self, inst):
     vref = lltype.cast_pointer(lltype.Ptr(self.JIT_VIRTUAL_REF), inst)
     token = vref.virtual_token
     if token != self.TOKEN_NONE:
         if token == self.TOKEN_TRACING_RESCALL:
             # The "virtual" is not a virtual at all during tracing.
             # We only need to reset virtual_token to TOKEN_NONE
             # as a marker for the tracing, to tell it that this
             # "virtual" escapes.
             assert vref.forced
             vref.virtual_token = self.TOKEN_NONE
         else:
             assert not vref.forced
             from pypy.jit.metainterp.compile import ResumeGuardForcedDescr
             ResumeGuardForcedDescr.force_now(self.cpu, token)
             assert vref.virtual_token == self.TOKEN_NONE
             assert vref.forced
     else:
         assert vref.forced
     return vref.forced