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

Unified Diff: src/parsing/pattern-rewriter.cc

Issue 1744123003: [debugger] fix break locations for assignments and return. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fixes and addressed comments Created 4 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/interpreter/bytecode-generator.cc ('k') | src/parsing/rewriter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/parsing/pattern-rewriter.cc
diff --git a/src/parsing/pattern-rewriter.cc b/src/parsing/pattern-rewriter.cc
index 97517747083e9831438996d5eeaa112cb8a07551..02d6de513fe9ce5ec8cd8f0895d4358af88a45ea 100644
--- a/src/parsing/pattern-rewriter.cc
+++ b/src/parsing/pattern-rewriter.cc
@@ -266,7 +266,7 @@ void Parser::PatternRewriter::VisitVariableProxy(VariableProxy* pattern) {
if (initialize != NULL) {
block_->statements()->Add(
- factory()->NewExpressionStatement(initialize, RelocInfo::kNoPosition),
+ factory()->NewExpressionStatement(initialize, initialize->position()),
zone());
}
} else if (value != nullptr && (descriptor_->mode == CONST_LEGACY ||
@@ -282,7 +282,8 @@ void Parser::PatternRewriter::VisitVariableProxy(VariableProxy* pattern) {
DCHECK_NOT_NULL(proxy->var());
DCHECK_NOT_NULL(value);
// Add break location for destructured sub-pattern.
- int pos = IsSubPattern() ? pattern->position() : RelocInfo::kNoPosition;
+ int pos =
+ IsSubPattern() ? pattern->position() : descriptor_->initialization_pos;
Assignment* assignment =
factory()->NewAssignment(Token::INIT, proxy, value, pos);
block_->statements()->Add(
@@ -299,7 +300,8 @@ void Parser::PatternRewriter::VisitVariableProxy(VariableProxy* pattern) {
// property).
VariableProxy* proxy = initialization_scope->NewUnresolved(factory(), name);
// Add break location for destructured sub-pattern.
- int pos = IsSubPattern() ? pattern->position() : RelocInfo::kNoPosition;
+ int pos =
+ IsSubPattern() ? pattern->position() : descriptor_->initialization_pos;
Assignment* assignment =
factory()->NewAssignment(Token::INIT, proxy, value, pos);
block_->statements()->Add(
« no previous file with comments | « src/interpreter/bytecode-generator.cc ('k') | src/parsing/rewriter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698