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

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

Issue 2328283002: Revert of [modules] Basic support of exports (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/contexts.cc ('k') | src/factory.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 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-scopes.h" 5 #include "src/debug/debug-scopes.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "src/ast/scopes.h" 9 #include "src/ast/scopes.h"
10 #include "src/debug/debug.h" 10 #include "src/debug/debug.h"
(...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after
355 case ScopeIterator::ScopeTypeCatch: 355 case ScopeIterator::ScopeTypeCatch:
356 return SetCatchVariableValue(variable_name, new_value); 356 return SetCatchVariableValue(variable_name, new_value);
357 case ScopeIterator::ScopeTypeClosure: 357 case ScopeIterator::ScopeTypeClosure:
358 return SetClosureVariableValue(variable_name, new_value); 358 return SetClosureVariableValue(variable_name, new_value);
359 case ScopeIterator::ScopeTypeScript: 359 case ScopeIterator::ScopeTypeScript:
360 return SetScriptVariableValue(variable_name, new_value); 360 return SetScriptVariableValue(variable_name, new_value);
361 case ScopeIterator::ScopeTypeBlock: 361 case ScopeIterator::ScopeTypeBlock:
362 case ScopeIterator::ScopeTypeEval: 362 case ScopeIterator::ScopeTypeEval:
363 return SetInnerScopeVariableValue(variable_name, new_value); 363 return SetInnerScopeVariableValue(variable_name, new_value);
364 case ScopeIterator::ScopeTypeModule: 364 case ScopeIterator::ScopeTypeModule:
365 // TODO(neis): Implement. 365 // TODO(2399): should we implement it?
366 break; 366 break;
367 } 367 }
368 return false; 368 return false;
369 } 369 }
370 370
371 371
372 Handle<ScopeInfo> ScopeIterator::CurrentScopeInfo() { 372 Handle<ScopeInfo> ScopeIterator::CurrentScopeInfo() {
373 DCHECK(!failed_); 373 DCHECK(!failed_);
374 if (!nested_scope_chain_.is_empty()) { 374 if (!nested_scope_chain_.is_empty()) {
375 return nested_scope_chain_.last().scope_info; 375 return nested_scope_chain_.last().scope_info;
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
610 Handle<ScopeInfo> scope_info(context->scope_info()); 610 Handle<ScopeInfo> scope_info(context->scope_info());
611 611
612 // Allocate and initialize a JSObject with all the members of the debugged 612 // Allocate and initialize a JSObject with all the members of the debugged
613 // module. 613 // module.
614 Handle<JSObject> module_scope = 614 Handle<JSObject> module_scope =
615 isolate_->factory()->NewJSObjectWithNullProto(); 615 isolate_->factory()->NewJSObjectWithNullProto();
616 616
617 // Fill all context locals. 617 // Fill all context locals.
618 CopyContextLocalsToScopeObject(scope_info, context, module_scope); 618 CopyContextLocalsToScopeObject(scope_info, context, module_scope);
619 619
620 // TODO(neis): Also collect stack locals as well as imports and exports.
621
622 return module_scope; 620 return module_scope;
623 } 621 }
624 622
625 bool ScopeIterator::SetParameterValue(Handle<ScopeInfo> scope_info, 623 bool ScopeIterator::SetParameterValue(Handle<ScopeInfo> scope_info,
626 JavaScriptFrame* frame, 624 JavaScriptFrame* frame,
627 Handle<String> parameter_name, 625 Handle<String> parameter_name,
628 Handle<Object> new_value) { 626 Handle<Object> new_value) {
629 // Setting stack locals of optimized frames is not supported. 627 // Setting stack locals of optimized frames is not supported.
630 if (frame->is_optimized()) return false; 628 if (frame->is_optimized()) return false;
631 HandleScope scope(isolate_); 629 HandleScope scope(isolate_);
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
831 DCHECK((beg_pos >= 0 && end_pos >= 0) || inner_scope->is_hidden()); 829 DCHECK((beg_pos >= 0 && end_pos >= 0) || inner_scope->is_hidden());
832 if (beg_pos <= position && position < end_pos) { 830 if (beg_pos <= position && position < end_pos) {
833 GetNestedScopeChain(isolate, inner_scope, position); 831 GetNestedScopeChain(isolate, inner_scope, position);
834 return; 832 return;
835 } 833 }
836 } 834 }
837 } 835 }
838 836
839 } // namespace internal 837 } // namespace internal
840 } // namespace v8 838 } // namespace v8
OLDNEW
« no previous file with comments | « src/contexts.cc ('k') | src/factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698