Lines Matching full:context
37 Context* Context::declaration_context() {
38 Context* current = this;
47 JSBuiltinsObject* Context::builtins() {
58 Context* Context::global_context() {
59 Context* current = this;
67 Context* Context::native_context() {
68 // Fast case: the global object for this context has been set. In
70 // context.
76 // have to search the context chain to find the native context.
78 Context* current = this;
81 current = Context::cast(closure->context());
87 JSObject* Context::global_proxy() {
92 void Context::set_global_proxy(JSObject* object) {
97 Handle<Object> Context::Lookup(Handle<String> name,
103 Handle<Context> context(this, isolate);
111 PrintF("Context::Lookup(");
118 PrintF(" - looking in context %p", reinterpret_cast<void*>(*context));
119 if (context->IsNativeContext()) PrintF(" (native context)");
124 if (context->IsNativeContext() ||
125 context->IsWithContext() ||
126 (context->IsFunctionContext() && context->has_extension())) {
128 JSReceiver::cast(context->extension()), isolate);
129 // Context extension objects needs to behave as if they have no
131 // to only do a local lookup for context extension objects.
142 PrintF("=> found property in context object %p\n",
149 // 2. Check the context proper if it has slots.
150 if (context->IsFunctionContext() || context->IsBlockContext()) {
152 // for the context index.
154 if (context->IsFunctionContext()) {
156 context->closure()->shared()->scope_info(), isolate);
159 ScopeInfo::cast(context->extension()), isolate);
167 PrintF("=> found local in context slot %d (mode = %d)\n",
171 // Note: Fixed context slots are statically allocated by the compiler.
210 return context;
213 // Check the slot corresponding to the intermediate context holding
215 if (follow_context_chain && context->IsFunctionContext()) {
220 PrintF("=> found intermediate function in context slot %d\n",
228 return context;
232 } else if (context->IsCatchContext()) {
234 if (name->Equals(String::cast(context->extension()))) {
236 PrintF("=> found in catch context\n");
238 *index = Context::THROWN_OBJECT_INDEX;
241 return context;
245 // 3. Prepare to continue with the previous (next outermost) context.
246 if (context->IsNativeContext()) {
249 context = Handle<Context>(context->previous(), isolate);
260 void Context::AddOptimizedFunction(JSFunction* function) {
271 // Check that the context belongs to the weak native contexts list.
273 Object* context = GetHeap()->native_contexts_list();
274 while (!context->IsUndefined()) {
275 if (context == this) {
279 context = Context::cast(context)->get(Context::NEXT_CONTEXT_LINK);
298 void Context::RemoveOptimizedFunction(JSFunction* function) {
322 Object* Context::OptimizedFunctionsListHead() {
328 void Context::ClearOptimizedFunctions() {
333 Handle<Object> Context::ErrorMessageForCodeGenerationFromStrings() {
338 "Code generation from strings disallowed for this context"));
343 bool Context::IsBootstrappingOrValidParentContext(
344 Object* object, Context* child) {
349 Context* context = Context::cast(object);
350 return context->IsNativeContext() || context->IsGlobalContext() ||
351 context->IsModuleContext() || !child->IsModuleContext();
355 bool Context::IsBootstrappingOrGlobalObject(Object* object) {