From 9026b2deb336dfb888016faf79008d3cb22dc702 Mon Sep 17 00:00:00 2001 From: zhangxun <1958638841@qq.com> Date: Thu, 10 Jul 2025 16:04:35 +0800 Subject: [PATCH] =?UTF-8?q?docs:=20=E8=A1=A5=E5=85=85=20long64=20=E8=BD=AC?= =?UTF-8?q?=E6=8D=A2=E6=8C=87=E4=BB=A4=E7=9A=84=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../org/jcnc/snow/vm/engine/VMOpCode.java | 29 +++++++++++++++++-- 1 file changed, 26 insertions(+), 3 deletions(-) diff --git a/src/main/java/org/jcnc/snow/vm/engine/VMOpCode.java b/src/main/java/org/jcnc/snow/vm/engine/VMOpCode.java index 8b634ca..2bf7ec5 100644 --- a/src/main/java/org/jcnc/snow/vm/engine/VMOpCode.java +++ b/src/main/java/org/jcnc/snow/vm/engine/VMOpCode.java @@ -2145,11 +2145,34 @@ public class VMOpCode { // endregion Int32 // region Long64 (0x00CF-0xD3) - + /** + * L2B Opcode: Represents the type conversion operation from long64 to byte8 in the virtual machine. + *

This opcode is implemented by the {@link L2BCommand} class, which defines its specific execution logic.

+ * + *

Execution Steps:

+ *
    + *
  1. Pop the top long64 value from the operand stack.
  2. + *
  3. Convert the long64 value to a byte8 value (this may involve truncation).
  4. + *
  5. Push the converted byte8 value back onto the operand stack for subsequent operations.
  6. + *
+ * + *

This opcode is used to narrow a long64 value to a byte8 type, suitable when a smaller numeric type is required.

+ */ public static final int L2B = 0x00CF; - + /** + * L2S Opcode: Represents the type conversion operation from long64 to short16 in the virtual machine. + *

This opcode is implemented by the {@link L2SCommand} class, which defines its specific execution logic.

+ * + *

Execution Steps:

+ *
    + *
  1. Pop the top long64 value from the operand stack.
  2. + *
  3. Convert the long64 value to a short16 value (this may involve truncation).
  4. + *
  5. Push the converted short16 value back onto the operand stack for subsequent operations.
  6. + *
+ * + *

This opcode is used to narrow a long64 value to a short16 type, suitable when a smaller numeric type is required.

+ */ public static final int L2S = 0x00D0; - /** * L2I Opcode: Represents the type conversion operation from long64 to int32 in the virtual machine. *

This opcode is implemented by the {@link L2ICommand} class, which defines its specific execution logic.