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

Side by Side Diff: src/debug/debug-evaluate.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/ast/scopes.h ('k') | src/factory.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 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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/debug/debug-evaluate.h" 5 #include "src/debug/debug-evaluate.h"
6 6
7 #include "src/accessors.h" 7 #include "src/accessors.h"
8 #include "src/compiler.h" 8 #include "src/compiler.h"
9 #include "src/contexts.h" 9 #include "src/contexts.h"
10 #include "src/debug/debug-frames.h" 10 #include "src/debug/debug-frames.h"
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 if (it.HasContext()) { 202 if (it.HasContext()) {
203 context_chain_element.wrapped_context = it.CurrentContext(); 203 context_chain_element.wrapped_context = it.CurrentContext();
204 } 204 }
205 context_chain_.Add(context_chain_element); 205 context_chain_.Add(context_chain_element);
206 } else { 206 } else {
207 break; 207 break;
208 } 208 }
209 } 209 }
210 210
211 for (int i = context_chain_.length() - 1; i >= 0; i--) { 211 for (int i = context_chain_.length() - 1; i >= 0; i--) {
212 Handle<ScopeInfo> scope_info(ScopeInfo::CreateForWithScope(
213 isolate, evaluation_context_->IsNativeContext()
214 ? Handle<ScopeInfo>::null()
215 : Handle<ScopeInfo>(evaluation_context_->scope_info())));
216 scope_info->SetIsDebugEvaluateScope();
212 evaluation_context_ = factory->NewDebugEvaluateContext( 217 evaluation_context_ = factory->NewDebugEvaluateContext(
213 evaluation_context_, 218 evaluation_context_, scope_info, context_chain_[i].materialized_object,
214 ScopeInfo::CreateForWithScope(
215 isolate,
216 evaluation_context_->IsNativeContext()
217 ? Handle<ScopeInfo>::null()
218 : Handle<ScopeInfo>(evaluation_context_->scope_info())),
219 context_chain_[i].materialized_object,
220 context_chain_[i].wrapped_context, context_chain_[i].whitelist); 219 context_chain_[i].wrapped_context, context_chain_[i].whitelist);
221 } 220 }
222 } 221 }
223 222
224 223
225 void DebugEvaluate::ContextBuilder::UpdateValues() { 224 void DebugEvaluate::ContextBuilder::UpdateValues() {
226 // TODO(yangguo): remove updating values. 225 // TODO(yangguo): remove updating values.
227 for (int i = 0; i < context_chain_.length(); i++) { 226 for (int i = 0; i < context_chain_.length(); i++) {
228 ContextChainElement element = context_chain_[i]; 227 ContextChainElement element = context_chain_[i];
229 if (!element.materialized_object.is_null()) { 228 if (!element.materialized_object.is_null()) {
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
265 return; 264 return;
266 } else if (local_function->shared()->scope_info()->HasReceiver() && 265 } else if (local_function->shared()->scope_info()->HasReceiver() &&
267 !frame_->receiver()->IsTheHole(isolate_)) { 266 !frame_->receiver()->IsTheHole(isolate_)) {
268 recv = handle(frame_->receiver(), isolate_); 267 recv = handle(frame_->receiver(), isolate_);
269 } 268 }
270 JSObject::SetOwnPropertyIgnoreAttributes(target, name, recv, NONE).Check(); 269 JSObject::SetOwnPropertyIgnoreAttributes(target, name, recv, NONE).Check();
271 } 270 }
272 271
273 } // namespace internal 272 } // namespace internal
274 } // namespace v8 273 } // namespace v8
OLDNEW
« no previous file with comments | « src/ast/scopes.h ('k') | src/factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698