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

Side by Side Diff: runtime/vm/kernel.h

Issue 2776373002: Initial steps into streaming the kernel flowgraph (Closed)
Patch Set: Rebase + fix lint error Created 3 years, 8 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/bin/main.cc ('k') | runtime/vm/kernel_binary.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 4
5 #ifndef RUNTIME_VM_KERNEL_H_ 5 #ifndef RUNTIME_VM_KERNEL_H_
6 #define RUNTIME_VM_KERNEL_H_ 6 #define RUNTIME_VM_KERNEL_H_
7 7
8 #if !defined(DART_PRECOMPILED_RUNTIME) 8 #if !defined(DART_PRECOMPILED_RUNTIME)
9 #include "platform/assert.h" 9 #include "platform/assert.h"
10 #include "vm/allocation.h" 10 #include "vm/allocation.h"
(...skipping 494 matching lines...) Expand 10 before | Expand all | Expand 10 after
505 } 505 }
506 506
507 // Rasta emits dart:_patch and we should treat it as a user library. 507 // Rasta emits dart:_patch and we should treat it as a user library.
508 if (name_->size() == patch_library_length && 508 if (name_->size() == patch_library_length &&
509 strncmp(buffer, patch_library, patch_library_length) == 0) { 509 strncmp(buffer, patch_library, patch_library_length) == 0) {
510 return false; 510 return false;
511 } 511 }
512 return true; 512 return true;
513 } 513 }
514 514
515 const uint8_t* kernel_data() { return kernel_data_; }
516 intptr_t kernel_data_size() { return kernel_data_size_; }
517
515 private: 518 private:
516 Library() : name_(NULL) {} 519 Library() : name_(NULL), kernel_data_(NULL), kernel_data_size_(-1) {}
517 520
518 template <typename T> 521 template <typename T>
519 friend class List; 522 friend class List;
520 523
521 Ref<String> name_; 524 Ref<String> name_;
522 Ref<String> import_uri_; 525 Ref<String> import_uri_;
523 intptr_t source_uri_index_; 526 intptr_t source_uri_index_;
524 List<Class> classes_; 527 List<Class> classes_;
525 List<Field> fields_; 528 List<Field> fields_;
526 List<Procedure> procedures_; 529 List<Procedure> procedures_;
530 const uint8_t* kernel_data_;
531 intptr_t kernel_data_size_;
527 532
528 DISALLOW_COPY_AND_ASSIGN(Library); 533 DISALLOW_COPY_AND_ASSIGN(Library);
529 }; 534 };
530 535
531 536
532 class Class : public LinkedNode { 537 class Class : public LinkedNode {
533 public: 538 public:
534 Class* ReadFrom(Reader* reader); 539 Class* ReadFrom(Reader* reader);
535 540
536 virtual ~Class(); 541 virtual ~Class();
(...skipping 2607 matching lines...) Expand 10 before | Expand all | Expand 10 after
3144 3149
3145 kernel::Program* ReadPrecompiledKernelFromBuffer(const uint8_t* buffer, 3150 kernel::Program* ReadPrecompiledKernelFromBuffer(const uint8_t* buffer,
3146 intptr_t buffer_length); 3151 intptr_t buffer_length);
3147 3152
3148 3153
3149 3154
3150 } // namespace dart 3155 } // namespace dart
3151 3156
3152 #endif // !defined(DART_PRECOMPILED_RUNTIME) 3157 #endif // !defined(DART_PRECOMPILED_RUNTIME)
3153 #endif // RUNTIME_VM_KERNEL_H_ 3158 #endif // RUNTIME_VM_KERNEL_H_
OLDNEW
« no previous file with comments | « runtime/bin/main.cc ('k') | runtime/vm/kernel_binary.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698