mirror of
https://github.com/voltrevo/ValueScript.git
synced 2026-01-15 00:18:06 -05:00
Add static_ field
This commit is contained in:
@@ -42,6 +42,7 @@ impl BuiltinObject for ErrorBuiltin {
|
||||
Some(Rc::new(VsClass {
|
||||
constructor: SET_MESSAGE.to_val(),
|
||||
prototype: make_error_prototype(),
|
||||
static_: VsObject::default().to_val(),
|
||||
}))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -33,6 +33,7 @@ impl BuiltinObject for RangeErrorBuiltin {
|
||||
Some(Rc::new(VsClass {
|
||||
constructor: Val::Static(&SET_MESSAGE),
|
||||
prototype: make_range_error_prototype(),
|
||||
static_: VsObject::default().to_val(),
|
||||
}))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -41,6 +41,7 @@ impl BuiltinObject for TypeErrorBuiltin {
|
||||
Some(Rc::new(VsClass {
|
||||
constructor: Val::Static(&SET_MESSAGE),
|
||||
prototype: make_type_error_prototype(),
|
||||
static_: VsObject::default().to_val(),
|
||||
}))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -147,6 +147,7 @@ impl BytecodeDecoder {
|
||||
BytecodeType::Class => VsClass {
|
||||
constructor: self.decode_val(registers),
|
||||
prototype: self.decode_val(registers),
|
||||
static_: VsObject::default().to_val(),
|
||||
}
|
||||
.to_val(),
|
||||
BytecodeType::BigInt => self.decode_bigint().to_val(),
|
||||
|
||||
@@ -8,6 +8,7 @@ use super::vs_value::Val;
|
||||
pub struct VsClass {
|
||||
pub constructor: Val,
|
||||
pub prototype: Val,
|
||||
pub static_: Val,
|
||||
}
|
||||
|
||||
impl VsClass {}
|
||||
|
||||
Reference in New Issue
Block a user