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

Unified Diff: runtime/vm/kernel_binary.cc

Issue 2747813003: [kernel] debugging for in statement (Closed)
Patch Set: Updated binary.md Created 3 years, 9 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 | « runtime/vm/kernel.h ('k') | runtime/vm/kernel_to_il.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/kernel_binary.cc
diff --git a/runtime/vm/kernel_binary.cc b/runtime/vm/kernel_binary.cc
index a7f85598be4769c585137f54119ff12d14d70789..e88f261b9061f79aa0a0dbbb30cf41fee354af94 100644
--- a/runtime/vm/kernel_binary.cc
+++ b/runtime/vm/kernel_binary.cc
@@ -1561,11 +1561,15 @@ ForInStatement* ForInStatement::ReadFrom(Reader* reader, bool is_async) {
ForInStatement* forinstmt = new ForInStatement();
forinstmt->is_async_ = is_async;
+ forinstmt->position_ = reader->ReadPosition();
forinstmt->variable_ = VariableDeclaration::ReadFromImpl(reader);
forinstmt->iterable_ = Expression::ReadFrom(reader);
forinstmt->body_ = Statement::ReadFrom(reader);
forinstmt->end_position_ = reader->max_position();
- forinstmt->position_ = reader->min_position();
+ if (!forinstmt->position_.IsReal()) {
+ forinstmt->position_ = reader->min_position();
+ }
+ forinstmt->variable_->set_end_position(forinstmt->position_);
return forinstmt;
}
« no previous file with comments | « runtime/vm/kernel.h ('k') | runtime/vm/kernel_to_il.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698