feat: 支持访问器描述符与 get/set 语法

This commit is contained in:
爱特每羊队
2026-06-09 16:22:24 +08:00
parent 044c8a4303
commit ed0864d01f
13 changed files with 457 additions and 77 deletions
+3
View File
@@ -88,6 +88,7 @@ pub enum OpCode {
SUPER_GET_PROP = 0x45,
SUPER_STATIC_GET_PROP = 0x46,
SET_HOME_OBJECT = 0x47,
DEFINE_ACCESSOR = 0x48,
// ── Object Property (0x50-0x5F) ──
IC_GET_PROP = 0x50,
@@ -240,6 +241,7 @@ impl TryFrom<u8> for OpCode {
0x45 => Ok(OpCode::SUPER_GET_PROP),
0x46 => Ok(OpCode::SUPER_STATIC_GET_PROP),
0x47 => Ok(OpCode::SET_HOME_OBJECT),
0x48 => Ok(OpCode::DEFINE_ACCESSOR),
0x50 => Ok(OpCode::IC_GET_PROP),
0x51 => Ok(OpCode::IC_SET_PROP),
0x52 => Ok(OpCode::GET_PROP),
@@ -351,6 +353,7 @@ impl fmt::Display for OpCode {
OpCode::SUPER_GET_PROP => "SUPER_GET_PROP",
OpCode::SUPER_STATIC_GET_PROP => "SUPER_STATIC_GET_PROP",
OpCode::SET_HOME_OBJECT => "SET_HOME_OBJECT",
OpCode::DEFINE_ACCESSOR => "DEFINE_ACCESSOR",
OpCode::IC_GET_PROP => "IC_GET_PROP",
OpCode::IC_SET_PROP => "IC_SET_PROP",
OpCode::GET_PROP => "GET_PROP",