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

Side by Side Diff: src/factory.cc

Issue 2331323006: Store whether a with scope is actually a debug-eval scope in the scope info (Closed)
Patch Set: 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/debug/debug-evaluate.cc ('k') | src/objects.h » ('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/factory.h" 5 #include "src/factory.h"
6 6
7 #include "src/accessors.h" 7 #include "src/accessors.h"
8 #include "src/allocation-site-scopes.h" 8 #include "src/allocation-site-scopes.h"
9 #include "src/base/bits.h" 9 #include "src/base/bits.h"
10 #include "src/bootstrapper.h" 10 #include "src/bootstrapper.h"
(...skipping 826 matching lines...) Expand 10 before | Expand all | Expand 10 after
837 context->set(Context::THROWN_OBJECT_INDEX, *thrown_object); 837 context->set(Context::THROWN_OBJECT_INDEX, *thrown_object);
838 return context; 838 return context;
839 } 839 }
840 840
841 Handle<Context> Factory::NewDebugEvaluateContext(Handle<Context> previous, 841 Handle<Context> Factory::NewDebugEvaluateContext(Handle<Context> previous,
842 Handle<ScopeInfo> scope_info, 842 Handle<ScopeInfo> scope_info,
843 Handle<JSReceiver> extension, 843 Handle<JSReceiver> extension,
844 Handle<Context> wrapped, 844 Handle<Context> wrapped,
845 Handle<StringSet> whitelist) { 845 Handle<StringSet> whitelist) {
846 STATIC_ASSERT(Context::WHITE_LIST_INDEX == Context::MIN_CONTEXT_SLOTS + 1); 846 STATIC_ASSERT(Context::WHITE_LIST_INDEX == Context::MIN_CONTEXT_SLOTS + 1);
847 DCHECK(scope_info->IsDebugEvaluateScope());
847 Handle<ContextExtension> context_extension = NewContextExtension( 848 Handle<ContextExtension> context_extension = NewContextExtension(
848 scope_info, extension.is_null() ? Handle<Object>::cast(undefined_value()) 849 scope_info, extension.is_null() ? Handle<Object>::cast(undefined_value())
849 : Handle<Object>::cast(extension)); 850 : Handle<Object>::cast(extension));
850 Handle<FixedArray> array = NewFixedArray(Context::MIN_CONTEXT_SLOTS + 2); 851 Handle<FixedArray> array = NewFixedArray(Context::MIN_CONTEXT_SLOTS + 2);
851 array->set_map_no_write_barrier(*debug_evaluate_context_map()); 852 array->set_map_no_write_barrier(*debug_evaluate_context_map());
852 Handle<Context> c = Handle<Context>::cast(array); 853 Handle<Context> c = Handle<Context>::cast(array);
853 c->set_closure(wrapped.is_null() ? previous->closure() : wrapped->closure()); 854 c->set_closure(wrapped.is_null() ? previous->closure() : wrapped->closure());
854 c->set_previous(*previous); 855 c->set_previous(*previous);
855 c->set_native_context(previous->native_context()); 856 c->set_native_context(previous->native_context());
856 c->set_extension(*context_extension); 857 c->set_extension(*context_extension);
(...skipping 1673 matching lines...) Expand 10 before | Expand all | Expand 10 after
2530 Handle<AccessorInfo> prototype = 2531 Handle<AccessorInfo> prototype =
2531 Accessors::FunctionPrototypeInfo(isolate(), attribs); 2532 Accessors::FunctionPrototypeInfo(isolate(), attribs);
2532 AccessorConstantDescriptor d(Handle<Name>(Name::cast(prototype->name())), 2533 AccessorConstantDescriptor d(Handle<Name>(Name::cast(prototype->name())),
2533 prototype, attribs); 2534 prototype, attribs);
2534 map->AppendDescriptor(&d); 2535 map->AppendDescriptor(&d);
2535 } 2536 }
2536 } 2537 }
2537 2538
2538 } // namespace internal 2539 } // namespace internal
2539 } // namespace v8 2540 } // namespace v8
OLDNEW
« no previous file with comments | « src/debug/debug-evaluate.cc ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698