| OLD | NEW |
| 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 489 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 500 } | 500 } |
| 501 | 501 |
| 502 // Rasta emits dart:_patch and we should treat it as a user library. | 502 // Rasta emits dart:_patch and we should treat it as a user library. |
| 503 if (name_->size() == patch_library_length && | 503 if (name_->size() == patch_library_length && |
| 504 strncmp(buffer, patch_library, patch_library_length) == 0) { | 504 strncmp(buffer, patch_library, patch_library_length) == 0) { |
| 505 return false; | 505 return false; |
| 506 } | 506 } |
| 507 return true; | 507 return true; |
| 508 } | 508 } |
| 509 | 509 |
| 510 const uint8_t* kernel_data() { return kernel_data_; } |
| 511 intptr_t kernel_data_size() { return kernel_data_size_; } |
| 512 |
| 510 private: | 513 private: |
| 511 Library() : name_(NULL) {} | 514 Library() : name_(NULL), kernel_data_(NULL), kernel_data_size_(-1) {} |
| 512 | 515 |
| 513 template <typename T> | 516 template <typename T> |
| 514 friend class List; | 517 friend class List; |
| 515 | 518 |
| 516 Ref<String> name_; | 519 Ref<String> name_; |
| 517 Ref<String> import_uri_; | 520 Ref<String> import_uri_; |
| 518 intptr_t source_uri_index_; | 521 intptr_t source_uri_index_; |
| 519 List<Class> classes_; | 522 List<Class> classes_; |
| 520 List<Field> fields_; | 523 List<Field> fields_; |
| 521 List<Procedure> procedures_; | 524 List<Procedure> procedures_; |
| 525 const uint8_t* kernel_data_; |
| 526 intptr_t kernel_data_size_; |
| 522 | 527 |
| 523 DISALLOW_COPY_AND_ASSIGN(Library); | 528 DISALLOW_COPY_AND_ASSIGN(Library); |
| 524 }; | 529 }; |
| 525 | 530 |
| 526 | 531 |
| 527 class Class : public LinkedNode { | 532 class Class : public LinkedNode { |
| 528 public: | 533 public: |
| 529 Class* ReadFrom(Reader* reader); | 534 Class* ReadFrom(Reader* reader); |
| 530 | 535 |
| 531 virtual ~Class(); | 536 virtual ~Class(); |
| (...skipping 2716 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3248 | 3253 |
| 3249 kernel::Program* ReadPrecompiledKernelFromBuffer(const uint8_t* buffer, | 3254 kernel::Program* ReadPrecompiledKernelFromBuffer(const uint8_t* buffer, |
| 3250 intptr_t buffer_length); | 3255 intptr_t buffer_length); |
| 3251 | 3256 |
| 3252 | 3257 |
| 3253 | 3258 |
| 3254 } // namespace dart | 3259 } // namespace dart |
| 3255 | 3260 |
| 3256 #endif // !defined(DART_PRECOMPILED_RUNTIME) | 3261 #endif // !defined(DART_PRECOMPILED_RUNTIME) |
| 3257 #endif // RUNTIME_VM_KERNEL_H_ | 3262 #endif // RUNTIME_VM_KERNEL_H_ |
| OLD | NEW |