OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 #include "vm/object.h" | 5 #include "vm/object.h" |
6 | 6 |
7 #include "include/dart_api.h" | 7 #include "include/dart_api.h" |
8 #include "platform/assert.h" | 8 #include "platform/assert.h" |
9 #include "vm/assembler.h" | 9 #include "vm/assembler.h" |
10 #include "vm/become.h" | 10 #include "vm/become.h" |
(...skipping 8838 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8849 | 8849 |
8850 | 8850 |
8851 void Script::GetTokenLocation(TokenPosition token_pos, | 8851 void Script::GetTokenLocation(TokenPosition token_pos, |
8852 intptr_t* line, | 8852 intptr_t* line, |
8853 intptr_t* column, | 8853 intptr_t* column, |
8854 intptr_t* token_len) const { | 8854 intptr_t* token_len) const { |
8855 ASSERT(line != NULL); | 8855 ASSERT(line != NULL); |
8856 Zone* zone = Thread::Current()->zone(); | 8856 Zone* zone = Thread::Current()->zone(); |
8857 const TokenStream& tkns = TokenStream::Handle(zone, tokens()); | 8857 const TokenStream& tkns = TokenStream::Handle(zone, tokens()); |
8858 if (tkns.IsNull()) { | 8858 if (tkns.IsNull()) { |
8859 ASSERT(Dart::snapshot_kind() == Snapshot::kAppNoJIT); | 8859 ASSERT((Dart::snapshot_kind() == Snapshot::kAppNoJIT) || |
| 8860 (url() == Symbols::KernelScriptUri().raw())); |
8860 *line = -1; | 8861 *line = -1; |
8861 if (column != NULL) { | 8862 if (column != NULL) { |
8862 *column = -1; | 8863 *column = -1; |
8863 } | 8864 } |
8864 if (token_len != NULL) { | 8865 if (token_len != NULL) { |
8865 *token_len = 1; | 8866 *token_len = 1; |
8866 } | 8867 } |
8867 return; | 8868 return; |
8868 } | 8869 } |
8869 if (column == NULL) { | 8870 if (column == NULL) { |
(...skipping 13848 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
22718 return UserTag::null(); | 22719 return UserTag::null(); |
22719 } | 22720 } |
22720 | 22721 |
22721 | 22722 |
22722 const char* UserTag::ToCString() const { | 22723 const char* UserTag::ToCString() const { |
22723 const String& tag_label = String::Handle(label()); | 22724 const String& tag_label = String::Handle(label()); |
22724 return tag_label.ToCString(); | 22725 return tag_label.ToCString(); |
22725 } | 22726 } |
22726 | 22727 |
22727 } // namespace dart | 22728 } // namespace dart |
OLD | NEW |