From a00a16197399ada6b863c2912652f46937539eb8 Mon Sep 17 00:00:00 2001 From: Andrew Morris Date: Fri, 23 Jun 2023 09:06:01 +1000 Subject: [PATCH] instance_prototype -> prototype --- valuescript_vm/src/builtins/error_builtin.rs | 2 +- valuescript_vm/src/builtins/range_error_builtin.rs | 2 +- valuescript_vm/src/builtins/type_error_builtin.rs | 2 +- valuescript_vm/src/bytecode_decoder.rs | 2 +- valuescript_vm/src/bytecode_stack_frame.rs | 2 +- valuescript_vm/src/vs_class.rs | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/valuescript_vm/src/builtins/error_builtin.rs b/valuescript_vm/src/builtins/error_builtin.rs index 2b11b88..c174978 100644 --- a/valuescript_vm/src/builtins/error_builtin.rs +++ b/valuescript_vm/src/builtins/error_builtin.rs @@ -41,7 +41,7 @@ impl BuiltinObject for ErrorBuiltin { fn bo_as_class_data() -> Option> { Some(Rc::new(VsClass { constructor: SET_MESSAGE.to_val(), - instance_prototype: make_error_prototype(), + prototype: make_error_prototype(), })) } } diff --git a/valuescript_vm/src/builtins/range_error_builtin.rs b/valuescript_vm/src/builtins/range_error_builtin.rs index 939fad9..e3b3115 100644 --- a/valuescript_vm/src/builtins/range_error_builtin.rs +++ b/valuescript_vm/src/builtins/range_error_builtin.rs @@ -32,7 +32,7 @@ impl BuiltinObject for RangeErrorBuiltin { fn bo_as_class_data() -> Option> { Some(Rc::new(VsClass { constructor: Val::Static(&SET_MESSAGE), - instance_prototype: make_range_error_prototype(), + prototype: make_range_error_prototype(), })) } } diff --git a/valuescript_vm/src/builtins/type_error_builtin.rs b/valuescript_vm/src/builtins/type_error_builtin.rs index d414ead..7fcbf50 100644 --- a/valuescript_vm/src/builtins/type_error_builtin.rs +++ b/valuescript_vm/src/builtins/type_error_builtin.rs @@ -40,7 +40,7 @@ impl BuiltinObject for TypeErrorBuiltin { fn bo_as_class_data() -> Option> { Some(Rc::new(VsClass { constructor: Val::Static(&SET_MESSAGE), - instance_prototype: make_type_error_prototype(), + prototype: make_type_error_prototype(), })) } } diff --git a/valuescript_vm/src/bytecode_decoder.rs b/valuescript_vm/src/bytecode_decoder.rs index 42fb4fb..4c3a70a 100644 --- a/valuescript_vm/src/bytecode_decoder.rs +++ b/valuescript_vm/src/bytecode_decoder.rs @@ -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(), diff --git a/valuescript_vm/src/bytecode_stack_frame.rs b/valuescript_vm/src/bytecode_stack_frame.rs index c7a63c1..39f0f8a 100644 --- a/valuescript_vm/src/bytecode_stack_frame.rs +++ b/valuescript_vm/src/bytecode_stack_frame.rs @@ -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(); diff --git a/valuescript_vm/src/vs_class.rs b/valuescript_vm/src/vs_class.rs index 9eceda6..75fb8d9 100644 --- a/valuescript_vm/src/vs_class.rs +++ b/valuescript_vm/src/vs_class.rs @@ -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 {}