Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(442)

Side by Side Diff: runtime/vm/object.h

Issue 24359005: Make Script::GetTokenLocation() and Script::TokenRangeAtLine() use token streams where possible. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | runtime/vm/object.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 2243 matching lines...) Expand 10 before | Expand all | Expand 10 after
2254 RawString* GetSnippet(intptr_t from_line, 2254 RawString* GetSnippet(intptr_t from_line,
2255 intptr_t from_column, 2255 intptr_t from_column,
2256 intptr_t to_line, 2256 intptr_t to_line,
2257 intptr_t to_column) const; 2257 intptr_t to_column) const;
2258 2258
2259 void SetLocationOffset(intptr_t line_offset, intptr_t col_offset) const; 2259 void SetLocationOffset(intptr_t line_offset, intptr_t col_offset) const;
2260 2260
2261 void GetTokenLocation(intptr_t token_pos, 2261 void GetTokenLocation(intptr_t token_pos,
2262 intptr_t* line, intptr_t* column) const; 2262 intptr_t* line, intptr_t* column) const;
2263 2263
2264 // Returns index of first and last token on the given line. Returns both
2265 // indices < 0 if no token exists on or after the line. If a token exists
2266 // after, but not on given line, returns in *first_token_index the index of
2267 // the first token after the line, and a negative value in *last_token_index.
2264 void TokenRangeAtLine(intptr_t line_number, 2268 void TokenRangeAtLine(intptr_t line_number,
2265 intptr_t* first_token_index, 2269 intptr_t* first_token_index,
2266 intptr_t* last_token_index) const; 2270 intptr_t* last_token_index) const;
2267 2271
2268 static intptr_t InstanceSize() { 2272 static intptr_t InstanceSize() {
2269 return RoundedAllocationSize(sizeof(RawScript)); 2273 return RoundedAllocationSize(sizeof(RawScript));
2270 } 2274 }
2271 2275
2272 static RawScript* New(const String& url, 2276 static RawScript* New(const String& url,
2273 const String& source, 2277 const String& source,
(...skipping 3902 matching lines...) Expand 10 before | Expand all | Expand 10 after
6176 6180
6177 6181
6178 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, 6182 RawObject* MegamorphicCache::GetTargetFunction(const Array& array,
6179 intptr_t index) { 6183 intptr_t index) {
6180 return array.At((index * kEntryLength) + kTargetFunctionIndex); 6184 return array.At((index * kEntryLength) + kTargetFunctionIndex);
6181 } 6185 }
6182 6186
6183 } // namespace dart 6187 } // namespace dart
6184 6188
6185 #endif // VM_OBJECT_H_ 6189 #endif // VM_OBJECT_H_
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698