mirror of
https://github.com/voltrevo/ValueScript.git
synced 2026-01-15 00:18:06 -05:00
Represent register taking
This commit is contained in:
@@ -39,6 +39,7 @@ pub enum BytecodeType {
|
||||
Function = 0x0b,
|
||||
Pointer = 0x0d,
|
||||
Register = 0x0e,
|
||||
TakeRegister = 0x0f,
|
||||
Builtin = 0x10,
|
||||
Class = 0x11,
|
||||
BigInt = 0x13,
|
||||
@@ -142,6 +143,10 @@ impl BytecodeDecoder {
|
||||
Val::Void => Own(Val::Undefined),
|
||||
ref val => Ref(val),
|
||||
},
|
||||
BytecodeType::TakeRegister => match registers[self.decode_register_index().unwrap()] {
|
||||
Val::Void => Own(Val::Undefined),
|
||||
ref val => Ref(val),
|
||||
},
|
||||
BytecodeType::Builtin => Own(BUILTIN_VALS[self.decode_varsize_uint()]()),
|
||||
BytecodeType::Class => Own(
|
||||
VsClass {
|
||||
|
||||
Reference in New Issue
Block a user