| Index: runtime/vm/object.cc
|
| diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc
|
| index 6f48c9202ac687e858dd3d7702194f9cb056012a..1e78ab07d260c2aafb5049b5759bd5c6a008a8b3 100644
|
| --- a/runtime/vm/object.cc
|
| +++ b/runtime/vm/object.cc
|
| @@ -3426,7 +3426,7 @@ TokenPosition Class::ComputeEndTokenPos() const {
|
| ASSERT(!scr.IsNull());
|
| const TokenStream& tkns = TokenStream::Handle(scr.tokens());
|
| if (tkns.IsNull()) {
|
| - ASSERT(Dart::IsRunningPrecompiledCode());
|
| + ASSERT(Dart::snapshot_kind() == Snapshot::kAppNoJIT);
|
| return TokenPosition::kNoSource;
|
| }
|
| TokenStream::Iterator tkit(tkns,
|
| @@ -8822,7 +8822,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();
|
| @@ -8991,7 +8991,7 @@ void Script::GetTokenLocation(TokenPosition token_pos,
|
| ASSERT(line != NULL);
|
| const TokenStream& tkns = TokenStream::Handle(tokens());
|
| if (tkns.IsNull()) {
|
| - ASSERT(Dart::IsRunningPrecompiledCode());
|
| + ASSERT(Dart::snapshot_kind() == Snapshot::kAppNoJIT);
|
| *line = -1;
|
| if (column != NULL) {
|
| *column = -1;
|
| @@ -9090,7 +9090,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();
|
| @@ -9132,7 +9132,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();
|
| @@ -10981,7 +10981,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;
|
| @@ -13550,7 +13550,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.
|
|
|