Example #1
0
 def force_now(virtualizable):
     token = virtualizable.vable_token
     if token == 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 = TOKEN_NONE
     else:
         from rpython.jit.metainterp.compile import ResumeGuardForcedDescr
         ResumeGuardForcedDescr.force_now(cpu, token)
         assert virtualizable.vable_token == TOKEN_NONE
Example #2
0
 def force_now(virtualizable):
     token = virtualizable.vable_token
     if token == 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 = TOKEN_NONE
     else:
         from rpython.jit.metainterp.compile import ResumeGuardForcedDescr
         ResumeGuardForcedDescr.force_now(cpu, token)
         assert virtualizable.vable_token == TOKEN_NONE
Example #3
0
 def force_virtual(self, inst):
     vref = lltype.cast_pointer(lltype.Ptr(self.JIT_VIRTUAL_REF), inst)
     token = vref.virtual_token
     if token != TOKEN_NONE:
         if token == 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 = TOKEN_NONE
         else:
             assert not vref.forced
             from rpython.jit.metainterp.compile import ResumeGuardForcedDescr
             ResumeGuardForcedDescr.force_now(self.cpu, token)
             assert vref.virtual_token == TOKEN_NONE
             assert vref.forced
     elif not vref.forced:
         # token == TOKEN_NONE and the vref was not forced: it's invalid
         raise InvalidVirtualRef
     return vref.forced
Example #4
0
 def force_virtual(self, inst):
     vref = lltype.cast_pointer(lltype.Ptr(self.JIT_VIRTUAL_REF), inst)
     token = vref.virtual_token
     if token != TOKEN_NONE:
         if token == 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 = TOKEN_NONE
         else:
             assert not vref.forced
             from rpython.jit.metainterp.compile import ResumeGuardForcedDescr
             ResumeGuardForcedDescr.force_now(self.cpu, token)
             assert vref.virtual_token == TOKEN_NONE
             assert vref.forced
     elif not vref.forced:
         # token == TOKEN_NONE and the vref was not forced: it's invalid
         raise InvalidVirtualRef
     return vref.forced