Esempio n. 1
0
 def op_over(engine):
     x2 = PushData.pop_stack_item(engine)
     x1 = PushData.peek_stack_item(engine)
     PushData.peek_stack_item(engine)
     PushData.push(engine, x2)
     PushData.push(engine, x1)
     return VMState.NONE
Esempio n. 2
0
 def op_dup(engine):
     items = PushData.peek_stack_item(engine)
     PushData.push(engine, items)
     return VMState.NONE
Esempio n. 3
0
 def op_nip(engine):
     x2 = PushData.pop_stack_item(engine)
     PushData.peek_stack_item(engine)
     PushData.push(engine, x2)
     return VMState.NONE
Esempio n. 4
0
 def op_x_tuck(engine):
     n = PushData.pop_int(engine)
     engine.evaluation_stack.insert(n, PushData.peek_stack_item(engine))
     return VMState.NONE