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 9206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9217 } | 9217 } |
9218 *line = min + 1; // Line numbers start at 1. | 9218 *line = min + 1; // Line numbers start at 1. |
9219 smi ^= line_starts_array.At(min); | 9219 smi ^= line_starts_array.At(min); |
9220 if (column != NULL) { | 9220 if (column != NULL) { |
9221 *column = offset - smi.Value() + 1; | 9221 *column = offset - smi.Value() + 1; |
9222 } | 9222 } |
9223 if (token_len != NULL) { | 9223 if (token_len != NULL) { |
9224 // We don't explicitly save this data: Load the source | 9224 // We don't explicitly save this data: Load the source |
9225 // and find it from there. | 9225 // and find it from there. |
9226 const String& source = String::Handle(zone, Source()); | 9226 const String& source = String::Handle(zone, Source()); |
9227 ASSERT(source.Length() >= offset); | |
9228 *token_len = 1; | 9227 *token_len = 1; |
9229 if (Scanner::IsIdentStartChar(source.CharAt(offset))) { | 9228 if (offset < source.Length() && |
| 9229 Scanner::IsIdentStartChar(source.CharAt(offset))) { |
9230 for (intptr_t i = offset + 1; | 9230 for (intptr_t i = offset + 1; |
9231 i < source.Length() && Scanner::IsIdentChar(source.CharAt(i)); | 9231 i < source.Length() && Scanner::IsIdentChar(source.CharAt(i)); |
9232 ++i) { | 9232 ++i) { |
9233 ++*token_len; | 9233 ++*token_len; |
9234 } | 9234 } |
9235 } | 9235 } |
9236 } | 9236 } |
9237 return; | 9237 return; |
9238 } | 9238 } |
9239 | 9239 |
(...skipping 13708 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
22948 return UserTag::null(); | 22948 return UserTag::null(); |
22949 } | 22949 } |
22950 | 22950 |
22951 | 22951 |
22952 const char* UserTag::ToCString() const { | 22952 const char* UserTag::ToCString() const { |
22953 const String& tag_label = String::Handle(label()); | 22953 const String& tag_label = String::Handle(label()); |
22954 return tag_label.ToCString(); | 22954 return tag_label.ToCString(); |
22955 } | 22955 } |
22956 | 22956 |
22957 } // namespace dart | 22957 } // namespace dart |
OLD | NEW |