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

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

Issue 1427863002: Token stream iterator improvement (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 1 month 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
« 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 3182 matching lines...) Expand 10 before | Expand all | Expand 10 after
3193 // into the token objects array for IDENT or literal tokens). 3193 // into the token objects array for IDENT or literal tokens).
3194 intptr_t ReadToken() { 3194 intptr_t ReadToken() {
3195 int64_t value = stream_.ReadUnsigned(); 3195 int64_t value = stream_.ReadUnsigned();
3196 ASSERT((value >= 0) && (value <= kIntptrMax)); 3196 ASSERT((value >= 0) && (value <= kIntptrMax));
3197 return static_cast<intptr_t>(value); 3197 return static_cast<intptr_t>(value);
3198 } 3198 }
3199 3199
3200 TokenStream& tokens_; 3200 TokenStream& tokens_;
3201 ExternalTypedData& data_; 3201 ExternalTypedData& data_;
3202 ReadStream stream_; 3202 ReadStream stream_;
3203 GrowableObjectArray& token_objects_; 3203 Array& token_objects_;
3204 Object& obj_; 3204 Object& obj_;
3205 intptr_t cur_token_pos_; 3205 intptr_t cur_token_pos_;
3206 Token::Kind cur_token_kind_; 3206 Token::Kind cur_token_kind_;
3207 intptr_t cur_token_obj_index_; 3207 intptr_t cur_token_obj_index_;
3208 Iterator::StreamType stream_type_; 3208 Iterator::StreamType stream_type_;
3209 }; 3209 };
3210 3210
3211 private: 3211 private:
3212 void SetPrivateKey(const String& value) const; 3212 void SetPrivateKey(const String& value) const;
3213 3213
(...skipping 5011 matching lines...) Expand 10 before | Expand all | Expand 10 after
8225 8225
8226 8226
8227 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, 8227 RawObject* MegamorphicCache::GetTargetFunction(const Array& array,
8228 intptr_t index) { 8228 intptr_t index) {
8229 return array.At((index * kEntryLength) + kTargetFunctionIndex); 8229 return array.At((index * kEntryLength) + kTargetFunctionIndex);
8230 } 8230 }
8231 8231
8232 } // namespace dart 8232 } // namespace dart
8233 8233
8234 #endif // VM_OBJECT_H_ 8234 #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