@@ -48,7 +48,6 @@ class DummySnapshot : public AppSnapshot {
48
48
49
49
private:
50
50
};
51
- #endif // !defined(DART_PRECOMPILED_RUNTIME)
52
51
53
52
class MappedAppSnapshot : public AppSnapshot {
54
53
public:
@@ -143,6 +142,7 @@ static AppSnapshot* TryReadAppSnapshotBlobs(const char* script_name,
143
142
nullptr , nullptr , isolate_data_mapping, isolate_instr_mapping);
144
143
return app_snapshot;
145
144
}
145
+ #endif // !defined(DART_PRECOMPILED_RUNTIME)
146
146
147
147
#if defined(DART_PRECOMPILED_RUNTIME)
148
148
class ElfAppSnapshot : public AppSnapshot {
@@ -594,10 +594,6 @@ AppSnapshot* Snapshot::TryReadAppSnapshot(const char* script_uri,
594
594
}
595
595
DartUtils::MagicNumber magic_number =
596
596
DartUtils::SniffForMagicNumber (header, sizeof (header));
597
- if (magic_number == DartUtils::kAppJITMagicNumber ) {
598
- // Return the JIT snapshot.
599
- return TryReadAppSnapshotBlobs (script_name, file);
600
- }
601
597
#if defined(DART_PRECOMPILED_RUNTIME)
602
598
if (!DartUtils::IsAotMagicNumber (magic_number)) {
603
599
return nullptr ;
@@ -623,6 +619,10 @@ AppSnapshot* Snapshot::TryReadAppSnapshot(const char* script_uri,
623
619
return TryReadAppSnapshotElf (script_name, /* file_offset=*/ 0 ,
624
620
force_load_elf_from_memory);
625
621
#else
622
+ if (magic_number == DartUtils::kAppJITMagicNumber ) {
623
+ // Return the JIT snapshot.
624
+ return TryReadAppSnapshotBlobs (script_name, file);
625
+ }
626
626
// We create a dummy snapshot object just to remember the type which
627
627
// has already been identified by sniffing the magic number.
628
628
return new DummySnapshot (magic_number);
0 commit comments