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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « runtime/vm/kernel.h ('k') | runtime/vm/kernel_to_il.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 (c) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 #if !defined(DART_PRECOMPILED_RUNTIME) 4 #if !defined(DART_PRECOMPILED_RUNTIME)
5 5
6 #include "platform/globals.h" 6 #include "platform/globals.h"
7 #include "vm/flags.h" 7 #include "vm/flags.h"
8 #include "vm/growable_array.h" 8 #include "vm/growable_array.h"
9 #include "vm/kernel.h" 9 #include "vm/kernel.h"
10 #include "vm/kernel_to_il.h" 10 #include "vm/kernel_to_il.h"
(...skipping 1543 matching lines...) Expand 10 before | Expand all | Expand 10 after
1554 } 1554 }
1555 1555
1556 1556
1557 ForInStatement* ForInStatement::ReadFrom(Reader* reader, bool is_async) { 1557 ForInStatement* ForInStatement::ReadFrom(Reader* reader, bool is_async) {
1558 TRACE_READ_OFFSET(); 1558 TRACE_READ_OFFSET();
1559 VariableScope<ReaderHelper> vars(reader->helper()); 1559 VariableScope<ReaderHelper> vars(reader->helper());
1560 PositionScope scope(reader); 1560 PositionScope scope(reader);
1561 1561
1562 ForInStatement* forinstmt = new ForInStatement(); 1562 ForInStatement* forinstmt = new ForInStatement();
1563 forinstmt->is_async_ = is_async; 1563 forinstmt->is_async_ = is_async;
1564 forinstmt->position_ = reader->ReadPosition();
1564 forinstmt->variable_ = VariableDeclaration::ReadFromImpl(reader); 1565 forinstmt->variable_ = VariableDeclaration::ReadFromImpl(reader);
1565 forinstmt->iterable_ = Expression::ReadFrom(reader); 1566 forinstmt->iterable_ = Expression::ReadFrom(reader);
1566 forinstmt->body_ = Statement::ReadFrom(reader); 1567 forinstmt->body_ = Statement::ReadFrom(reader);
1567 forinstmt->end_position_ = reader->max_position(); 1568 forinstmt->end_position_ = reader->max_position();
1568 forinstmt->position_ = reader->min_position(); 1569 if (!forinstmt->position_.IsReal()) {
1570 forinstmt->position_ = reader->min_position();
1571 }
1572 forinstmt->variable_->set_end_position(forinstmt->position_);
1569 1573
1570 return forinstmt; 1574 return forinstmt;
1571 } 1575 }
1572 1576
1573 1577
1574 SwitchStatement* SwitchStatement::ReadFrom(Reader* reader) { 1578 SwitchStatement* SwitchStatement::ReadFrom(Reader* reader) {
1575 TRACE_READ_OFFSET(); 1579 TRACE_READ_OFFSET();
1576 SwitchCaseScope<ReaderHelper> scope(reader->helper()); 1580 SwitchCaseScope<ReaderHelper> scope(reader->helper());
1577 SwitchStatement* stmt = new SwitchStatement(); 1581 SwitchStatement* stmt = new SwitchStatement();
1578 stmt->condition_ = Expression::ReadFrom(reader); 1582 stmt->condition_ = Expression::ReadFrom(reader);
(...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after
1932 1936
1933 kernel::Program* ReadPrecompiledKernelFromBuffer(const uint8_t* buffer, 1937 kernel::Program* ReadPrecompiledKernelFromBuffer(const uint8_t* buffer,
1934 intptr_t buffer_length) { 1938 intptr_t buffer_length) {
1935 kernel::Reader reader(buffer, buffer_length); 1939 kernel::Reader reader(buffer, buffer_length);
1936 return kernel::Program::ReadFrom(&reader); 1940 return kernel::Program::ReadFrom(&reader);
1937 } 1941 }
1938 1942
1939 1943
1940 } // namespace dart 1944 } // namespace dart
1941 #endif // !defined(DART_PRECOMPILED_RUNTIME) 1945 #endif // !defined(DART_PRECOMPILED_RUNTIME)
OLDNEW
« 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