mirror of
https://github.com/voltrevo/ValueScript.git
synced 2026-01-12 23:18:03 -05:00
instance_prototype -> prototype
This commit is contained in:
@@ -41,7 +41,7 @@ impl BuiltinObject for ErrorBuiltin {
|
||||
fn bo_as_class_data() -> Option<Rc<VsClass>> {
|
||||
Some(Rc::new(VsClass {
|
||||
constructor: SET_MESSAGE.to_val(),
|
||||
instance_prototype: make_error_prototype(),
|
||||
prototype: make_error_prototype(),
|
||||
}))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@ impl BuiltinObject for RangeErrorBuiltin {
|
||||
fn bo_as_class_data() -> Option<Rc<VsClass>> {
|
||||
Some(Rc::new(VsClass {
|
||||
constructor: Val::Static(&SET_MESSAGE),
|
||||
instance_prototype: make_range_error_prototype(),
|
||||
prototype: make_range_error_prototype(),
|
||||
}))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@ impl BuiltinObject for TypeErrorBuiltin {
|
||||
fn bo_as_class_data() -> Option<Rc<VsClass>> {
|
||||
Some(Rc::new(VsClass {
|
||||
constructor: Val::Static(&SET_MESSAGE),
|
||||
instance_prototype: make_type_error_prototype(),
|
||||
prototype: make_type_error_prototype(),
|
||||
}))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -146,7 +146,7 @@ impl BytecodeDecoder {
|
||||
BytecodeType::Builtin => BUILTIN_VALS[self.decode_varsize_uint()](),
|
||||
BytecodeType::Class => VsClass {
|
||||
constructor: self.decode_val(registers),
|
||||
instance_prototype: self.decode_val(registers),
|
||||
prototype: self.decode_val(registers),
|
||||
}
|
||||
.to_val(),
|
||||
BytecodeType::BigInt => self.decode_bigint().to_val(),
|
||||
|
||||
@@ -422,7 +422,7 @@ impl StackFrameTrait for BytecodeStackFrame {
|
||||
let mut instance = VsObject {
|
||||
string_map: Default::default(),
|
||||
symbol_map: Default::default(),
|
||||
prototype: Some(class.instance_prototype.clone()),
|
||||
prototype: Some(class.prototype.clone()),
|
||||
}
|
||||
.to_val();
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ use super::vs_value::Val;
|
||||
#[derive(Debug)]
|
||||
pub struct VsClass {
|
||||
pub constructor: Val,
|
||||
pub instance_prototype: Val,
|
||||
pub prototype: Val,
|
||||
}
|
||||
|
||||
impl VsClass {}
|
||||
|
||||
Reference in New Issue
Block a user