本文整理汇总了Python中Target.align方法的典型用法代码示例。如果您正苦于以下问题:Python Target.align方法的具体用法?Python Target.align怎么用?Python Target.align使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Target
的用法示例。
在下文中一共展示了Target.align方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: _instr_assign_slot
# 需要导入模块: import Target [as 别名]
# 或者: from Target import align [as 别名]
def _instr_assign_slot(self, instr, cf):
o = cf.stack_pop()
v = cf.stack_get(cf.stackpe - 1)
nm_start, nm_size = Target.unpack_assign_slot(instr)
nm = Target.extract_str(cf.pc.mod.bc, nm_start + cf.bc_off, nm_size)
o.set_slot(self, nm, v)
cf.bc_off += Target.align(nm_start + nm_size)
示例2: _instr_exbi
# 需要导入模块: import Target [as 别名]
# 或者: from Target import align [as 别名]
def _instr_exbi(self, instr, cf):
class_ = Builtins.type_check_class(self, cf.stack_pop())
bind_o = cf.stack_pop()
nm_start, nm_size = Target.unpack_exbi(instr)
nm = Target.extract_str(cf.pc.mod.bc, nm_start + cf.bc_off, nm_size)
pa = Builtins.Con_Partial_Application(self, class_.get_field(self, nm), [bind_o])
cf.stack_push(pa)
cf.bc_off += Target.align(nm_start + nm_size)
示例3: _instr_module_lookup
# 需要导入模块: import Target [as 别名]
# 或者: from Target import align [as 别名]
def _instr_module_lookup(self, instr, cf):
o = cf.stack_pop()
nm_start, nm_size = Target.unpack_mod_lookup(instr)
nm = Target.extract_str(cf.pc.mod.bc, cf.bc_off + nm_start, nm_size)
if isinstance(o, Builtins.Con_Module):
v = o.get_defn(self, nm)
else:
v = self.get_slot_apply(o, "get_defn", [Builtins.Con_String(self, nm)])
cf.stack_push(v)
cf.bc_off += Target.align(nm_start + nm_size)
示例4: _instr_slot_lookup
# 需要导入模块: import Target [as 别名]
# 或者: from Target import align [as 别名]
def _instr_slot_lookup(self, instr, cf):
o = cf.stack_pop()
nm_start, nm_size = Target.unpack_slot_lookup(instr)
nm = Target.extract_str(cf.pc.mod.bc, nm_start + cf.bc_off, nm_size)
cf.stack_push(o.get_slot(self, nm))
cf.bc_off += Target.align(nm_start + nm_size)