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

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

Issue 2786083002: Read platform.dill in the VM. (Closed)
Patch Set: Incorporate review comments and merge. Created 3 years, 7 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.cc ('k') | runtime/vm/kernel_reader.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 (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 1515 matching lines...) Expand 10 before | Expand all | Expand 10 after
1526 CanonicalName* canonical_name = parent->AddChild(name); 1526 CanonicalName* canonical_name = parent->AddChild(name);
1527 reader->helper()->SetCanonicalName(i, canonical_name); 1527 reader->helper()->SetCanonicalName(i, canonical_name);
1528 } 1528 }
1529 1529
1530 int libraries = reader->ReadUInt(); 1530 int libraries = reader->ReadUInt();
1531 program->libraries().EnsureInitialized(libraries); 1531 program->libraries().EnsureInitialized(libraries);
1532 for (intptr_t i = 0; i < libraries; i++) { 1532 for (intptr_t i = 0; i < libraries; i++) {
1533 program->libraries().GetOrCreate<Library>(i)->ReadFrom(reader); 1533 program->libraries().GetOrCreate<Library>(i)->ReadFrom(reader);
1534 } 1534 }
1535 1535
1536 program->main_method_reference_ = Reference::ReadMemberFrom(reader); 1536 program->main_method_reference_ =
1537 Reference::ReadMemberFrom(reader, /*allow_null=*/true);
1537 1538
1538 return program; 1539 return program;
1539 } 1540 }
1540 1541
1541 1542
1542 FunctionNode* FunctionNode::ReadFrom(Reader* reader) { 1543 FunctionNode* FunctionNode::ReadFrom(Reader* reader) {
1543 TRACE_READ_OFFSET(); 1544 TRACE_READ_OFFSET();
1544 TypeParameterScope<ReaderHelper> scope(reader->helper()); 1545 TypeParameterScope<ReaderHelper> scope(reader->helper());
1545 1546
1546 FunctionNode* function = new FunctionNode(); 1547 FunctionNode* function = new FunctionNode();
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
1579 1580
1580 kernel::Program* ReadPrecompiledKernelFromBuffer(const uint8_t* buffer, 1581 kernel::Program* ReadPrecompiledKernelFromBuffer(const uint8_t* buffer,
1581 intptr_t buffer_length) { 1582 intptr_t buffer_length) {
1582 kernel::Reader reader(buffer, buffer_length); 1583 kernel::Reader reader(buffer, buffer_length);
1583 return kernel::Program::ReadFrom(&reader); 1584 return kernel::Program::ReadFrom(&reader);
1584 } 1585 }
1585 1586
1586 1587
1587 } // namespace dart 1588 } // namespace dart
1588 #endif // !defined(DART_PRECOMPILED_RUNTIME) 1589 #endif // !defined(DART_PRECOMPILED_RUNTIME)
OLDNEW
« no previous file with comments | « runtime/vm/kernel.cc ('k') | runtime/vm/kernel_reader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698