Add static_ field

This commit is contained in:
Andrew Morris
2023-06-23 09:10:35 +10:00
parent a00a161973
commit 290c9b0cf0
5 changed files with 5 additions and 0 deletions

View File

@@ -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(),
}))
}
}

View File

@@ -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(),
}))
}
}

View File

@@ -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(),
}))
}
}

View File

@@ -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(),

View File

@@ -8,6 +8,7 @@ use super::vs_value::Val;
pub struct VsClass {
pub constructor: Val,
pub prototype: Val,
pub static_: Val,
}
impl VsClass {}