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 #ifndef VM_OBJECT_H_ | 5 #ifndef VM_OBJECT_H_ |
6 #define VM_OBJECT_H_ | 6 #define VM_OBJECT_H_ |
7 | 7 |
8 #include "include/dart_api.h" | 8 #include "include/dart_api.h" |
9 #include "platform/assert.h" | 9 #include "platform/assert.h" |
10 #include "platform/utils.h" | 10 #include "platform/utils.h" |
(...skipping 3164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3175 RawLibrary* FindLibrary() const; | 3175 RawLibrary* FindLibrary() const; |
3176 RawString* GetLine(intptr_t line_number) const; | 3176 RawString* GetLine(intptr_t line_number) const; |
3177 RawString* GetSnippet(intptr_t from_line, | 3177 RawString* GetSnippet(intptr_t from_line, |
3178 intptr_t from_column, | 3178 intptr_t from_column, |
3179 intptr_t to_line, | 3179 intptr_t to_line, |
3180 intptr_t to_column) const; | 3180 intptr_t to_column) const; |
3181 | 3181 |
3182 void SetLocationOffset(intptr_t line_offset, intptr_t col_offset) const; | 3182 void SetLocationOffset(intptr_t line_offset, intptr_t col_offset) const; |
3183 | 3183 |
3184 void GetTokenLocation(intptr_t token_pos, | 3184 void GetTokenLocation(intptr_t token_pos, |
3185 intptr_t* line, intptr_t* column) const; | 3185 intptr_t* line, |
| 3186 intptr_t* column, |
| 3187 intptr_t* token_len = NULL) const; |
3186 | 3188 |
3187 // Returns index of first and last token on the given line. Returns both | 3189 // Returns index of first and last token on the given line. Returns both |
3188 // indices < 0 if no token exists on or after the line. If a token exists | 3190 // indices < 0 if no token exists on or after the line. If a token exists |
3189 // after, but not on given line, returns in *first_token_index the index of | 3191 // after, but not on given line, returns in *first_token_index the index of |
3190 // the first token after the line, and a negative value in *last_token_index. | 3192 // the first token after the line, and a negative value in *last_token_index. |
3191 void TokenRangeAtLine(intptr_t line_number, | 3193 void TokenRangeAtLine(intptr_t line_number, |
3192 intptr_t* first_token_index, | 3194 intptr_t* first_token_index, |
3193 intptr_t* last_token_index) const; | 3195 intptr_t* last_token_index) const; |
3194 | 3196 |
3195 static intptr_t InstanceSize() { | 3197 static intptr_t InstanceSize() { |
(...skipping 4867 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8063 | 8065 |
8064 | 8066 |
8065 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, | 8067 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, |
8066 intptr_t index) { | 8068 intptr_t index) { |
8067 return array.At((index * kEntryLength) + kTargetFunctionIndex); | 8069 return array.At((index * kEntryLength) + kTargetFunctionIndex); |
8068 } | 8070 } |
8069 | 8071 |
8070 } // namespace dart | 8072 } // namespace dart |
8071 | 8073 |
8072 #endif // VM_OBJECT_H_ | 8074 #endif // VM_OBJECT_H_ |
OLD | NEW |