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

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

Issue 2301913002: Rename SloppyBlockWithEvalContextExtension to ContextExtension (Closed)
Patch Set: updates Created 4 years, 3 months 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
« no previous file with comments | « src/objects-printer.cc ('k') | src/types.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <memory> 7 #include <memory>
8 8
9 #include "src/accessors.h" 9 #include "src/accessors.h"
10 #include "src/arguments.h" 10 #include "src/arguments.h"
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 287
288 object = Handle<JSObject>::cast(holder); 288 object = Handle<JSObject>::cast(holder);
289 289
290 } else if (context->has_extension()) { 290 } else if (context->has_extension()) {
291 // Sloppy varblock contexts might not have an extension object yet, 291 // Sloppy varblock contexts might not have an extension object yet,
292 // in which case their extension is a ScopeInfo. 292 // in which case their extension is a ScopeInfo.
293 if (context->extension()->IsScopeInfo()) { 293 if (context->extension()->IsScopeInfo()) {
294 DCHECK(context->IsBlockContext()); 294 DCHECK(context->IsBlockContext());
295 object = isolate->factory()->NewJSObject( 295 object = isolate->factory()->NewJSObject(
296 isolate->context_extension_function()); 296 isolate->context_extension_function());
297 Handle<HeapObject> extension = 297 Handle<HeapObject> extension = isolate->factory()->NewContextExtension(
298 isolate->factory()->NewSloppyBlockWithEvalContextExtension( 298 handle(context->scope_info()), object);
299 handle(context->scope_info()), object);
300 context->set_extension(*extension); 299 context->set_extension(*extension);
301 } else { 300 } else {
302 object = handle(context->extension_object(), isolate); 301 object = handle(context->extension_object(), isolate);
303 } 302 }
304 DCHECK(object->IsJSContextExtensionObject() || object->IsJSGlobalObject()); 303 DCHECK(object->IsJSContextExtensionObject() || object->IsJSGlobalObject());
305 } else { 304 } else {
306 DCHECK(context->IsFunctionContext()); 305 DCHECK(context->IsFunctionContext());
307 object = 306 object =
308 isolate->factory()->NewJSObject(isolate->context_extension_function()); 307 isolate->factory()->NewJSObject(isolate->context_extension_function());
309 context->set_extension(*object); 308 context->set_extension(*object);
(...skipping 621 matching lines...) Expand 10 before | Expand all | Expand 10 after
931 RUNTIME_FUNCTION(Runtime_StoreLookupSlot_Strict) { 930 RUNTIME_FUNCTION(Runtime_StoreLookupSlot_Strict) {
932 HandleScope scope(isolate); 931 HandleScope scope(isolate);
933 DCHECK_EQ(2, args.length()); 932 DCHECK_EQ(2, args.length());
934 CONVERT_ARG_HANDLE_CHECKED(String, name, 0); 933 CONVERT_ARG_HANDLE_CHECKED(String, name, 0);
935 CONVERT_ARG_HANDLE_CHECKED(Object, value, 1); 934 CONVERT_ARG_HANDLE_CHECKED(Object, value, 1);
936 RETURN_RESULT_OR_FAILURE(isolate, StoreLookupSlot(name, value, STRICT)); 935 RETURN_RESULT_OR_FAILURE(isolate, StoreLookupSlot(name, value, STRICT));
937 } 936 }
938 937
939 } // namespace internal 938 } // namespace internal
940 } // namespace v8 939 } // namespace v8
OLDNEW
« no previous file with comments | « src/objects-printer.cc ('k') | src/types.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698