Index: runtime/vm/object.cc |
diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc |
index 6ec65ee6f014e2aa268816f2b1c90f605e21b7d9..cfd9c7ed28d32c54073a0fe4b498cbf0d6d258b8 100644 |
--- a/runtime/vm/object.cc |
+++ b/runtime/vm/object.cc |
@@ -3427,7 +3427,7 @@ TokenPosition Class::ComputeEndTokenPos() const { |
ASSERT(!scr.IsNull()); |
const TokenStream& tkns = TokenStream::Handle(zone, scr.tokens()); |
if (tkns.IsNull()) { |
- ASSERT(Dart::IsRunningPrecompiledCode()); |
+ ASSERT(Dart::snapshot_kind() == Snapshot::kAppNoJIT); |
return TokenPosition::kNoSource; |
} |
TokenStream::Iterator tkit(zone, |
@@ -8796,7 +8796,7 @@ RawString* Script::Source() const { |
RawString* Script::GenerateSource() const { |
const TokenStream& token_stream = TokenStream::Handle(tokens()); |
if (token_stream.IsNull()) { |
- ASSERT(Dart::IsRunningPrecompiledCode()); |
+ ASSERT(Dart::snapshot_kind() == Snapshot::kAppNoJIT); |
return String::null(); |
} |
return token_stream.GenerateSource(); |
@@ -8967,7 +8967,7 @@ void Script::GetTokenLocation(TokenPosition token_pos, |
Zone* zone = Thread::Current()->zone(); |
const TokenStream& tkns = TokenStream::Handle(zone, tokens()); |
if (tkns.IsNull()) { |
- ASSERT(Dart::IsRunningPrecompiledCode()); |
+ ASSERT(Dart::snapshot_kind() == Snapshot::kAppNoJIT); |
*line = -1; |
if (column != NULL) { |
*column = -1; |
@@ -9069,7 +9069,7 @@ void Script::TokenRangeAtLine(intptr_t line_number, |
RawString* Script::GetLine(intptr_t line_number, Heap::Space space) const { |
const String& src = String::Handle(Source()); |
if (src.IsNull()) { |
- ASSERT(Dart::IsRunningPrecompiledCode()); |
+ ASSERT(Dart::snapshot_kind() == Snapshot::kAppNoJIT); |
return Symbols::OptimizedOut().raw(); |
} |
intptr_t relative_line_number = line_number - line_offset(); |
@@ -9111,7 +9111,7 @@ RawString* Script::GetSnippet(intptr_t from_line, |
intptr_t to_column) const { |
const String& src = String::Handle(Source()); |
if (src.IsNull()) { |
- ASSERT(Dart::IsRunningPrecompiledCode()); |
+ ASSERT(Dart::snapshot_kind() == Snapshot::kAppNoJIT); |
return Symbols::OptimizedOut().raw(); |
} |
intptr_t length = src.Length(); |
@@ -10960,7 +10960,7 @@ bool LibraryPrefix::LoadLibrary() const { |
} |
ASSERT(is_deferred_load()); |
ASSERT(num_imports() == 1); |
- if (Dart::IsRunningPrecompiledCode()) { |
+ if (Dart::snapshot_kind() == Snapshot::kAppNoJIT) { |
// The library list was tree-shaken away. |
this->set_is_loaded(); |
return true; |
@@ -13529,7 +13529,7 @@ RawTypedData* Code::GetDeoptInfoAtPc(uword pc, |
uword code_entry = instrs.EntryPoint(); |
const Array& table = Array::Handle(deopt_info_array()); |
if (table.IsNull()) { |
- ASSERT(Dart::IsRunningPrecompiledCode()); |
+ ASSERT(Dart::snapshot_kind() == Snapshot::kAppNoJIT); |
return TypedData::null(); |
} |
// Linear search for the PC offset matching the target PC. |