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 3171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3182 RawLibrary* FindLibrary() const; | 3182 RawLibrary* FindLibrary() const; |
3183 RawString* GetLine(intptr_t line_number) const; | 3183 RawString* GetLine(intptr_t line_number) const; |
3184 RawString* GetSnippet(intptr_t from_line, | 3184 RawString* GetSnippet(intptr_t from_line, |
3185 intptr_t from_column, | 3185 intptr_t from_column, |
3186 intptr_t to_line, | 3186 intptr_t to_line, |
3187 intptr_t to_column) const; | 3187 intptr_t to_column) const; |
3188 | 3188 |
3189 void SetLocationOffset(intptr_t line_offset, intptr_t col_offset) const; | 3189 void SetLocationOffset(intptr_t line_offset, intptr_t col_offset) const; |
3190 | 3190 |
3191 void GetTokenLocation(intptr_t token_pos, | 3191 void GetTokenLocation(intptr_t token_pos, |
3192 intptr_t* line, intptr_t* column) const; | 3192 intptr_t* line, |
| 3193 intptr_t* column, |
| 3194 intptr_t* token_len = NULL) const; |
3193 | 3195 |
3194 // Returns index of first and last token on the given line. Returns both | 3196 // Returns index of first and last token on the given line. Returns both |
3195 // indices < 0 if no token exists on or after the line. If a token exists | 3197 // indices < 0 if no token exists on or after the line. If a token exists |
3196 // after, but not on given line, returns in *first_token_index the index of | 3198 // after, but not on given line, returns in *first_token_index the index of |
3197 // the first token after the line, and a negative value in *last_token_index. | 3199 // the first token after the line, and a negative value in *last_token_index. |
3198 void TokenRangeAtLine(intptr_t line_number, | 3200 void TokenRangeAtLine(intptr_t line_number, |
3199 intptr_t* first_token_index, | 3201 intptr_t* first_token_index, |
3200 intptr_t* last_token_index) const; | 3202 intptr_t* last_token_index) const; |
3201 | 3203 |
3202 static intptr_t InstanceSize() { | 3204 static intptr_t InstanceSize() { |
(...skipping 4867 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8070 | 8072 |
8071 | 8073 |
8072 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, | 8074 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, |
8073 intptr_t index) { | 8075 intptr_t index) { |
8074 return array.At((index * kEntryLength) + kTargetFunctionIndex); | 8076 return array.At((index * kEntryLength) + kTargetFunctionIndex); |
8075 } | 8077 } |
8076 | 8078 |
8077 } // namespace dart | 8079 } // namespace dart |
8078 | 8080 |
8079 #endif // VM_OBJECT_H_ | 8081 #endif // VM_OBJECT_H_ |
OLD | NEW |