Home | History | Annotate | Download | only in src

Lines Matching refs:context

37 Context* Context::declaration_context() {
38 Context* current = this;
47 JSBuiltinsObject* Context::builtins() {
58 Context* Context::global_context() {
59 // Fast case: the global object for this context has been set. In
61 // context.
67 // have to search the context chain to find the global context.
69 Context* current = this;
72 current = Context::cast(closure->context());
78 JSObject* Context::global_proxy() {
82 void Context::set_global_proxy(JSObject* object) {
87 Handle<Object> Context::Lookup(Handle<String> name,
93 Handle<Context> context(this, isolate);
101 PrintF("Context::Lookup(");
108 PrintF(" - looking in context %p", reinterpret_cast<void*>(*context));
109 if (context->IsGlobalContext()) PrintF(" (global context)");
114 if (context->IsGlobalContext() ||
115 context->IsWithContext() ||
116 (context->IsFunctionContext() && context->has_extension())) {
117 Handle<JSObject> object(JSObject::cast(context->extension()), isolate);
118 // Context extension objects needs to behave as if they have no
120 // to only do a local lookup for context extension objects.
129 PrintF("=> found property in context object %p\n",
136 // 2. Check the context proper if it has slots.
137 if (context->IsFunctionContext() || context->IsBlockContext()) {
139 // for the context index.
141 if (context->IsFunctionContext()) {
143 context->closure()->shared()->scope_info(), isolate);
146 ScopeInfo::cast(context->extension()), isolate);
154 PrintF("=> found local in context slot %d (mode = %d)\n",
158 // Note: Fixed context slots are statically allocated by the compiler.
193 return context;
196 // Check the slot corresponding to the intermediate context holding
198 if (follow_context_chain && context->IsFunctionContext()) {
203 PrintF("=> found intermediate function in context slot %d\n",
211 return context;
215 } else if (context->IsCatchContext()) {
217 if (name->Equals(String::cast(context->extension()))) {
219 PrintF("=> found in catch context\n");
221 *index = Context::THROWN_OBJECT_INDEX;
224 return context;
228 // 3. Prepare to continue with the previous (next outermost) context.
229 if (context->IsGlobalContext()) {
232 context = Handle<Context>(context->previous(), isolate);
243 void Context::AddOptimizedFunction(JSFunction* function) {
254 // Check that the context belongs to the weak global contexts list.
256 Object* context = GetHeap()->global_contexts_list();
257 while (!context->IsUndefined()) {
258 if (context == this) {
262 context = Context::cast(context)->get(Context::NEXT_CONTEXT_LINK);
271 void Context::RemoveOptimizedFunction(JSFunction* function) {
295 Object* Context::OptimizedFunctionsListHead() {
301 void Context::ClearOptimizedFunctions() {
307 bool Context::IsBootstrappingOrContext(Object* object) {
314 bool Context::IsBootstrappingOrGlobalObject(Object* object) {