本文整理匯總了Python中pypy.jit.metainterp.resoperation.ResOperation.name方法的典型用法代碼示例。如果您正苦於以下問題:Python ResOperation.name方法的具體用法?Python ResOperation.name怎麽用?Python ResOperation.name使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類pypy.jit.metainterp.resoperation.ResOperation
的用法示例。
在下文中一共展示了ResOperation.name方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: _really_force
# 需要導入模塊: from pypy.jit.metainterp.resoperation import ResOperation [as 別名]
# 或者: from pypy.jit.metainterp.resoperation.ResOperation import name [as 別名]
def _really_force(self, optforce):
if self.mode is mode_string:
s = self.get_constant_string_spec(mode_string)
if s is not None:
c_s = get_const_ptr_for_string(s)
self.make_constant(c_s)
return
else:
s = self.get_constant_string_spec(mode_unicode)
if s is not None:
c_s = get_const_ptr_for_unicode(s)
self.make_constant(c_s)
return
assert self.source_op is not None
self.box = box = self.source_op.result
lengthbox = self.getstrlen(optforce, self.mode)
op = ResOperation(self.mode.NEWSTR, [lengthbox], box)
if not we_are_translated():
op.name = 'FORCE'
optforce.emit_operation(op)
self.string_copy_parts(optforce, box, CONST_0, self.mode)