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

Unified Diff: runtime/vm/raw_object.h

Issue 1918313003: Split Snapshot::kFull into kCore, kAppWithJIT, and kAppNoJIT. Remove snapshot_code flag. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 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 side-by-side diff with in-line comments
Download patch
Index: runtime/vm/raw_object.h
diff --git a/runtime/vm/raw_object.h b/runtime/vm/raw_object.h
index 2e67ee2d9b68434c4989cbe032c0b6eaa413bd18..28c31e281a127903cdd249117f63a2ad8f794fcb 100644
--- a/runtime/vm/raw_object.h
+++ b/runtime/vm/raw_object.h
@@ -992,15 +992,23 @@ class RawScript : public RawObject {
RawObject** from() { return reinterpret_cast<RawObject**>(&ptr()->url_); }
RawString* url_;
- RawObject** to_precompiled_snapshot() {
- return reinterpret_cast<RawObject**>(&ptr()->url_);
- }
RawTokenStream* tokens_;
- RawObject** to_snapshot() {
- return reinterpret_cast<RawObject**>(&ptr()->tokens_);
- }
RawString* source_;
RawObject** to() { return reinterpret_cast<RawObject**>(&ptr()->source_); }
+ RawObject** to_snapshot(Snapshot::Kind kind) {
+ switch (kind) {
+ case Snapshot::kAppNoJIT:
+ return reinterpret_cast<RawObject**>(&ptr()->url_);
+ case Snapshot::kCore:
+ case Snapshot::kAppWithJIT:
+ case Snapshot::kScript:
+ return reinterpret_cast<RawObject**>(&ptr()->tokens_);
+ case Snapshot::kMessage:
+ break;
+ }
+ UNREACHABLE();
+ return NULL;
+ }
int32_t line_offset_;
int32_t col_offset_;

Powered by Google App Engine
This is Rietveld 408576698