| 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_CLUSTERED_SNAPSHOT_H_ | 5 #ifndef RUNTIME_VM_CLUSTERED_SNAPSHOT_H_ |
| 6 #define RUNTIME_VM_CLUSTERED_SNAPSHOT_H_ | 6 #define RUNTIME_VM_CLUSTERED_SNAPSHOT_H_ |
| 7 | 7 |
| 8 #include "platform/assert.h" | 8 #include "platform/assert.h" |
| 9 #include "vm/allocation.h" | 9 #include "vm/allocation.h" |
| 10 #include "vm/bitfield.h" | 10 #include "vm/bitfield.h" |
| (...skipping 430 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 441 intptr_t size, | 441 intptr_t size, |
| 442 const uint8_t* instructions_buffer, | 442 const uint8_t* instructions_buffer, |
| 443 const uint8_t* data_buffer, | 443 const uint8_t* data_buffer, |
| 444 Thread* thread) | 444 Thread* thread) |
| 445 : kind_(kind), | 445 : kind_(kind), |
| 446 thread_(thread), | 446 thread_(thread), |
| 447 buffer_(buffer), | 447 buffer_(buffer), |
| 448 size_(size), | 448 size_(size), |
| 449 instructions_buffer_(instructions_buffer), | 449 instructions_buffer_(instructions_buffer), |
| 450 data_buffer_(data_buffer) { | 450 data_buffer_(data_buffer) { |
| 451 thread->isolate()->set_compilation_allowed(kind != Snapshot::kAppNoJIT); | 451 thread->isolate()->set_compilation_allowed(kind != Snapshot::kAppAOT); |
| 452 } | 452 } |
| 453 | 453 |
| 454 ~VmIsolateSnapshotReader() {} | 454 ~VmIsolateSnapshotReader() {} |
| 455 | 455 |
| 456 RawApiError* ReadVmIsolateSnapshot(); | 456 RawApiError* ReadVmIsolateSnapshot(); |
| 457 | 457 |
| 458 private: | 458 private: |
| 459 Snapshot::Kind kind_; | 459 Snapshot::Kind kind_; |
| 460 Thread* thread_; | 460 Thread* thread_; |
| 461 const uint8_t* buffer_; | 461 const uint8_t* buffer_; |
| (...skipping 12 matching lines...) Expand all Loading... |
| 474 intptr_t size, | 474 intptr_t size, |
| 475 const uint8_t* instructions_buffer, | 475 const uint8_t* instructions_buffer, |
| 476 const uint8_t* data_buffer, | 476 const uint8_t* data_buffer, |
| 477 Thread* thread) | 477 Thread* thread) |
| 478 : kind_(kind), | 478 : kind_(kind), |
| 479 thread_(thread), | 479 thread_(thread), |
| 480 buffer_(buffer), | 480 buffer_(buffer), |
| 481 size_(size), | 481 size_(size), |
| 482 instructions_buffer_(instructions_buffer), | 482 instructions_buffer_(instructions_buffer), |
| 483 data_buffer_(data_buffer) { | 483 data_buffer_(data_buffer) { |
| 484 thread->isolate()->set_compilation_allowed(kind != Snapshot::kAppNoJIT); | 484 thread->isolate()->set_compilation_allowed(kind != Snapshot::kAppAOT); |
| 485 } | 485 } |
| 486 | 486 |
| 487 ~IsolateSnapshotReader() {} | 487 ~IsolateSnapshotReader() {} |
| 488 | 488 |
| 489 RawApiError* ReadFullSnapshot(); | 489 RawApiError* ReadFullSnapshot(); |
| 490 | 490 |
| 491 private: | 491 private: |
| 492 Snapshot::Kind kind_; | 492 Snapshot::Kind kind_; |
| 493 Thread* thread_; | 493 Thread* thread_; |
| 494 const uint8_t* buffer_; | 494 const uint8_t* buffer_; |
| 495 intptr_t size_; | 495 intptr_t size_; |
| 496 const uint8_t* instructions_buffer_; | 496 const uint8_t* instructions_buffer_; |
| 497 const uint8_t* data_buffer_; | 497 const uint8_t* data_buffer_; |
| 498 | 498 |
| 499 DISALLOW_COPY_AND_ASSIGN(IsolateSnapshotReader); | 499 DISALLOW_COPY_AND_ASSIGN(IsolateSnapshotReader); |
| 500 }; | 500 }; |
| 501 | 501 |
| 502 } // namespace dart | 502 } // namespace dart |
| 503 | 503 |
| 504 #endif // RUNTIME_VM_CLUSTERED_SNAPSHOT_H_ | 504 #endif // RUNTIME_VM_CLUSTERED_SNAPSHOT_H_ |
| OLD | NEW |