| 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 3986 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3997 // Encode integer in SLEB128 format. | 3997 // Encode integer in SLEB128 format. |
| 3998 static void EncodeInteger(GrowableArray<uint8_t>* data, intptr_t value); | 3998 static void EncodeInteger(GrowableArray<uint8_t>* data, intptr_t value); |
| 3999 | 3999 |
| 4000 // Decode SLEB128 encoded integer. Update byte_index to the next integer. | 4000 // Decode SLEB128 encoded integer. Update byte_index to the next integer. |
| 4001 intptr_t DecodeInteger(intptr_t* byte_index) const; | 4001 intptr_t DecodeInteger(intptr_t* byte_index) const; |
| 4002 | 4002 |
| 4003 class Iterator : ValueObject { | 4003 class Iterator : ValueObject { |
| 4004 public: | 4004 public: |
| 4005 explicit Iterator(const CodeSourceMap& code_source_map) | 4005 explicit Iterator(const CodeSourceMap& code_source_map) |
| 4006 : code_source_map_(code_source_map), | 4006 : code_source_map_(code_source_map), |
| 4007 byte_index_(0), |
| 4007 cur_pc_offset_(0), | 4008 cur_pc_offset_(0), |
| 4008 cur_token_pos_(0) { | 4009 cur_token_pos_(0) { |
| 4009 } | 4010 } |
| 4010 | 4011 |
| 4011 bool MoveNext() { | 4012 bool MoveNext() { |
| 4012 // Moves to the next record. | 4013 // Moves to the next record. |
| 4013 while (byte_index_ < code_source_map_.Length()) { | 4014 while (byte_index_ < code_source_map_.Length()) { |
| 4014 cur_pc_offset_ += code_source_map_.DecodeInteger(&byte_index_); | 4015 cur_pc_offset_ += code_source_map_.DecodeInteger(&byte_index_); |
| 4015 cur_token_pos_ += code_source_map_.DecodeInteger(&byte_index_); | 4016 cur_token_pos_ += code_source_map_.DecodeInteger(&byte_index_); |
| 4016 | 4017 |
| (...skipping 4359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8376 | 8377 |
| 8377 | 8378 |
| 8378 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, | 8379 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, |
| 8379 intptr_t index) { | 8380 intptr_t index) { |
| 8380 return array.At((index * kEntryLength) + kTargetFunctionIndex); | 8381 return array.At((index * kEntryLength) + kTargetFunctionIndex); |
| 8381 } | 8382 } |
| 8382 | 8383 |
| 8383 } // namespace dart | 8384 } // namespace dart |
| 8384 | 8385 |
| 8385 #endif // VM_OBJECT_H_ | 8386 #endif // VM_OBJECT_H_ |
| OLD | NEW |