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

Side by Side Diff: runtime/vm/kernel_binary.cc

Issue 2940283002: [kernel] Fix assert message. (Closed)
Patch Set: Address comments Created 3 years, 6 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/lib/errors_patch.dart ('k') | runtime/vm/kernel_binary_flowgraph.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 "vm/kernel_binary.h" 6 #include "vm/kernel_binary.h"
7 #include "platform/globals.h" 7 #include "platform/globals.h"
8 #include "vm/flags.h" 8 #include "vm/flags.h"
9 #include "vm/growable_array.h" 9 #include "vm/growable_array.h"
10 #include "vm/kernel.h" 10 #include "vm/kernel.h"
(...skipping 1302 matching lines...) Expand 10 before | Expand all | Expand 10 after
1313 stmt->kernel_offset_ = reader->offset() - 1; // -1 to include tag byte. 1313 stmt->kernel_offset_ = reader->offset() - 1; // -1 to include tag byte.
1314 return stmt; 1314 return stmt;
1315 } 1315 }
1316 1316
1317 1317
1318 AssertStatement* AssertStatement::ReadFrom(Reader* reader) { 1318 AssertStatement* AssertStatement::ReadFrom(Reader* reader) {
1319 TRACE_READ_OFFSET(); 1319 TRACE_READ_OFFSET();
1320 AssertStatement* stmt = new AssertStatement(); 1320 AssertStatement* stmt = new AssertStatement();
1321 stmt->kernel_offset_ = reader->offset() - 1; // -1 to include tag byte. 1321 stmt->kernel_offset_ = reader->offset() - 1; // -1 to include tag byte.
1322 stmt->condition_ = Expression::ReadFrom(reader); 1322 stmt->condition_ = Expression::ReadFrom(reader);
1323 reader->ReadPosition(); // condition start offset.
1324 reader->ReadPosition(); // condition end offset.
1323 stmt->message_ = reader->ReadOptional<Expression>(); 1325 stmt->message_ = reader->ReadOptional<Expression>();
1324 1326
1325 stmt->can_stream_ = stmt->condition_->can_stream() && 1327 stmt->can_stream_ = stmt->condition_->can_stream() &&
1326 (stmt->message_ == NULL || stmt->message_->can_stream()); 1328 (stmt->message_ == NULL || stmt->message_->can_stream());
1327 1329
1328 return stmt; 1330 return stmt;
1329 } 1331 }
1330 1332
1331 1333
1332 LabeledStatement* LabeledStatement::ReadFrom(Reader* reader) { 1334 LabeledStatement* LabeledStatement::ReadFrom(Reader* reader) {
(...skipping 546 matching lines...) Expand 10 before | Expand all | Expand 10 after
1879 1881
1880 kernel::Program* ReadPrecompiledKernelFromBuffer(const uint8_t* buffer, 1882 kernel::Program* ReadPrecompiledKernelFromBuffer(const uint8_t* buffer,
1881 intptr_t buffer_length) { 1883 intptr_t buffer_length) {
1882 kernel::Reader reader(buffer, buffer_length); 1884 kernel::Reader reader(buffer, buffer_length);
1883 return kernel::Program::ReadFrom(&reader); 1885 return kernel::Program::ReadFrom(&reader);
1884 } 1886 }
1885 1887
1886 1888
1887 } // namespace dart 1889 } // namespace dart
1888 #endif // !defined(DART_PRECOMPILED_RUNTIME) 1890 #endif // !defined(DART_PRECOMPILED_RUNTIME)
OLDNEW
« no previous file with comments | « runtime/lib/errors_patch.dart ('k') | runtime/vm/kernel_binary_flowgraph.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698