示例#1
0
func (stack *StripsStack) Print() {
	for i := len(*stack) - 1; i >= 0; i-- {
		for _, item := range (*stack)[i] {
			opCode, _, _ := opcodes.GetComponents(uint16(item))
			if opCode == opcodes.OnOpCode || opCode == opcodes.StackOpCode || opCode == opcodes.UnstackOpCode {
				fmt.Printf("%s(%s, %s) ", opcodes.GetOpCode(item), argone.GetBlockLabel(item), argtwo.GetBlockLabel(item))
			} else {
				fmt.Printf("%s(%s) ", opcodes.GetOpCode(item), argone.GetBlockLabel(item))
			}
		}
		fmt.Println()
	}
}
示例#2
0
func PrintPredicate(cmd uint16) {
	fmt.Printf("%s(%s, %s)\n", GetOpCode(cmd), argone.GetBlockLabel(cmd), argtwo.GetBlockLabel(cmd))
}