Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3)

Side by Side Diff: src/runtime/runtime-scopes.cc

Issue 1424703005: Remove JSBuiltinsObject. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/runtime/runtime-utils.h" 5 #include "src/runtime/runtime-utils.h"
6 6
7 #include "src/accessors.h" 7 #include "src/accessors.h"
8 #include "src/arguments.h" 8 #include "src/arguments.h"
9 #include "src/frames-inl.h" 9 #include "src/frames-inl.h"
10 #include "src/isolate-inl.h" 10 #include "src/isolate-inl.h"
(...skipping 655 matching lines...) Expand 10 before | Expand all | Expand 10 after
666 Handle<ScriptContextTable> script_context_table( 666 Handle<ScriptContextTable> script_context_table(
667 native_context->script_context_table()); 667 native_context->script_context_table());
668 668
669 Object* name_clash_result = 669 Object* name_clash_result =
670 FindNameClash(scope_info, global_object, script_context_table); 670 FindNameClash(scope_info, global_object, script_context_table);
671 if (isolate->has_pending_exception()) return name_clash_result; 671 if (isolate->has_pending_exception()) return name_clash_result;
672 672
673 // Script contexts have a canonical empty function as their closure, not the 673 // Script contexts have a canonical empty function as their closure, not the
674 // anonymous closure containing the global code. See 674 // anonymous closure containing the global code. See
675 // FullCodeGenerator::PushFunctionArgumentForContextAllocation. 675 // FullCodeGenerator::PushFunctionArgumentForContextAllocation.
676 Handle<JSFunction> closure(global_object->IsJSBuiltinsObject() 676 Handle<JSFunction> closure(function->IsBuiltin() ? *function
677 ? *function 677 : native_context->closure());
678 : native_context->closure());
679 Handle<Context> result = 678 Handle<Context> result =
680 isolate->factory()->NewScriptContext(closure, scope_info); 679 isolate->factory()->NewScriptContext(closure, scope_info);
681 680
682 result->InitializeGlobalSlots(); 681 result->InitializeGlobalSlots();
683 682
684 DCHECK(function->context() == isolate->context()); 683 DCHECK(function->context() == isolate->context());
685 DCHECK(*global_object == result->global_object()); 684 DCHECK(*global_object == result->global_object());
686 685
687 Handle<ScriptContextTable> new_script_context_table = 686 Handle<ScriptContextTable> new_script_context_table =
688 ScriptContextTable::Extend(script_context_table, result); 687 ScriptContextTable::Extend(script_context_table, result);
(...skipping 478 matching lines...) Expand 10 before | Expand all | Expand 10 after
1167 1166
1168 // Lookup in the initial Object.prototype object. 1167 // Lookup in the initial Object.prototype object.
1169 Handle<Object> result; 1168 Handle<Object> result;
1170 ASSIGN_RETURN_FAILURE_ON_EXCEPTION( 1169 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(
1171 isolate, result, 1170 isolate, result,
1172 Object::GetProperty(isolate->initial_object_prototype(), key)); 1171 Object::GetProperty(isolate->initial_object_prototype(), key));
1173 return *result; 1172 return *result;
1174 } 1173 }
1175 } // namespace internal 1174 } // namespace internal
1176 } // namespace v8 1175 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698