From e7ef5773dfabae49400c9eb8081367d631502e62 Mon Sep 17 00:00:00 2001 From: Hecate2 <2474101468@qq.com> Date: Wed, 23 Oct 2024 16:41:27 +0800 Subject: [PATCH 1/2] stack opcode example comments --- src/Neo.VM/OpCode.cs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/Neo.VM/OpCode.cs b/src/Neo.VM/OpCode.cs index 8a2878473c..c0225b780f 100644 --- a/src/Neo.VM/OpCode.cs +++ b/src/Neo.VM/OpCode.cs @@ -725,6 +725,8 @@ public enum OpCode : byte /// /// The item n back in the stack is copied to the top. /// + /// a b c d 2 -> a b c d b + /// index => 3[2]1 0 /// /// Push: 1 item(s) /// Pop: 0 item(s) @@ -735,6 +737,8 @@ public enum OpCode : byte /// /// The item at the top of the stack is copied and inserted before the second-to-top item. /// + /// a b c -> a c b c + /// /// /// Push: 1 item(s) /// Pop: 0 item(s) @@ -769,6 +773,8 @@ public enum OpCode : byte /// /// The item n back in the stack is moved to the top. /// + /// a b c d 2 -> a c d b + /// index => 3[2]1 0 /// /// Push: 0 item(s) /// Pop: 1 item(s) @@ -793,7 +799,6 @@ public enum OpCode : byte /// /// a b c d -> d c b a /// - /// /// /// Push: 0 item(s) /// Pop: 0 item(s) @@ -804,7 +809,8 @@ public enum OpCode : byte /// /// Pop the number N on the stack, and reverse the order of the top N items on the stack. /// - /// + /// a b c d 3 -> a d c b + /// /// /// Push: 0 item(s) /// Pop: 1 item(s) From 2c74e36f29dcbdc0e8d7f54f44ffaf0f969a7dbd Mon Sep 17 00:00:00 2001 From: Hecate2 <2474101468@qq.com> Date: Wed, 23 Oct 2024 17:09:53 +0800 Subject: [PATCH 2/2] move index into example --- src/Neo.VM/OpCode.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/Neo.VM/OpCode.cs b/src/Neo.VM/OpCode.cs index c0225b780f..4a705a556c 100644 --- a/src/Neo.VM/OpCode.cs +++ b/src/Neo.VM/OpCode.cs @@ -725,8 +725,10 @@ public enum OpCode : byte /// /// The item n back in the stack is copied to the top. /// - /// a b c d 2 -> a b c d b + /// a b c d 2 -> a b c d b /// index => 3[2]1 0 + /// + /// /// /// Push: 1 item(s) /// Pop: 0 item(s) @@ -773,8 +775,10 @@ public enum OpCode : byte /// /// The item n back in the stack is moved to the top. /// - /// a b c d 2 -> a c d b + /// a b c d 2 -> a c d b /// index => 3[2]1 0 + /// + /// /// /// Push: 0 item(s) /// Pop: 1 item(s)