|
|
@ -1,6 +1,7 @@ |
|
|
|
use std::rc::Rc; |
|
|
|
use std::rc::Rc; |
|
|
|
|
|
|
|
|
|
|
|
use crate::{ |
|
|
|
use crate::{ |
|
|
|
|
|
|
|
builtins::{Array, IntrinsicObject}, |
|
|
|
environments::CompileTimeEnvironment, |
|
|
|
environments::CompileTimeEnvironment, |
|
|
|
object::{JsObject, PrivateName}, |
|
|
|
object::{JsObject, PrivateName}, |
|
|
|
Context, JsResult, JsString, JsSymbol, JsValue, |
|
|
|
Context, JsResult, JsString, JsSymbol, JsValue, |
|
|
@ -641,6 +642,9 @@ impl Context { |
|
|
|
match locator.environment() { |
|
|
|
match locator.environment() { |
|
|
|
BindingLocatorEnvironment::GlobalObject => { |
|
|
|
BindingLocatorEnvironment::GlobalObject => { |
|
|
|
let key = locator.name().clone(); |
|
|
|
let key = locator.name().clone(); |
|
|
|
|
|
|
|
if key.as_str() == "Array" { |
|
|
|
|
|
|
|
Array::init(self.realm()); |
|
|
|
|
|
|
|
} |
|
|
|
let obj = self.global_object(); |
|
|
|
let obj = self.global_object(); |
|
|
|
obj.try_get(key, self) |
|
|
|
obj.try_get(key, self) |
|
|
|
} |
|
|
|
} |
|
|
|