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

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

Issue 2659343002: Add IR nodes needed for deferred loading. (Closed)
Patch Set: Update binary.md Created 3 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 unified diff | Download patch
« no previous file with comments | « pkg/kernel/lib/visitor.dart ('k') | no next file » | 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 <map> 6 #include <map>
7 #include <vector> 7 #include <vector>
8 8
9 #include "platform/globals.h" 9 #include "platform/globals.h"
10 #include "vm/flags.h" 10 #include "vm/flags.h"
(...skipping 626 matching lines...) Expand 10 before | Expand all | Expand 10 after
637 637
638 Library* Library::ReadFrom(Reader* reader) { 638 Library* Library::ReadFrom(Reader* reader) {
639 TRACE_READ_OFFSET(); 639 TRACE_READ_OFFSET();
640 int flags = reader->ReadFlags(); 640 int flags = reader->ReadFlags();
641 ASSERT(flags == 0); // external libraries not supported 641 ASSERT(flags == 0); // external libraries not supported
642 name_ = Reference::ReadStringFrom(reader); 642 name_ = Reference::ReadStringFrom(reader);
643 import_uri_ = Reference::ReadStringFrom(reader); 643 import_uri_ = Reference::ReadStringFrom(reader);
644 source_uri_index_ = reader->ReadUInt(); 644 source_uri_index_ = reader->ReadUInt();
645 reader->set_current_script_id(source_uri_index_); 645 reader->set_current_script_id(source_uri_index_);
646 646
647 int num_imports = reader->ReadUInt();
648 if (num_imports != 0) {
649 FATAL("Deferred imports not implemented in VM");
650 }
647 int num_classes = reader->ReadUInt(); 651 int num_classes = reader->ReadUInt();
648 classes().EnsureInitialized(num_classes); 652 classes().EnsureInitialized(num_classes);
649 for (int i = 0; i < num_classes; i++) { 653 for (int i = 0; i < num_classes; i++) {
650 Tag tag = reader->ReadTag(); 654 Tag tag = reader->ReadTag();
651 if (tag == kNormalClass) { 655 if (tag == kNormalClass) {
652 NormalClass* klass = classes().GetOrCreate<NormalClass>(i, this); 656 NormalClass* klass = classes().GetOrCreate<NormalClass>(i, this);
653 klass->ReadFrom(reader); 657 klass->ReadFrom(reader);
654 } else { 658 } else {
655 ASSERT(tag == kMixinClass); 659 ASSERT(tag == kMixinClass);
656 MixinClass* klass = classes().GetOrCreate<MixinClass>(i, this); 660 MixinClass* klass = classes().GetOrCreate<MixinClass>(i, this);
(...skipping 1230 matching lines...) Expand 10 before | Expand all | Expand 10 after
1887 1891
1888 kernel::Program* ReadPrecompiledKernelFromBuffer(const uint8_t* buffer, 1892 kernel::Program* ReadPrecompiledKernelFromBuffer(const uint8_t* buffer,
1889 intptr_t buffer_length) { 1893 intptr_t buffer_length) {
1890 kernel::Reader reader(buffer, buffer_length); 1894 kernel::Reader reader(buffer, buffer_length);
1891 return kernel::Program::ReadFrom(&reader); 1895 return kernel::Program::ReadFrom(&reader);
1892 } 1896 }
1893 1897
1894 1898
1895 } // namespace dart 1899 } // namespace dart
1896 #endif // !defined(DART_PRECOMPILED_RUNTIME) 1900 #endif // !defined(DART_PRECOMPILED_RUNTIME)
OLDNEW
« no previous file with comments | « pkg/kernel/lib/visitor.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698