| 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 3586 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3597 | 3597 |
| 3598 // ObjectPool contains constants, immediates and addresses embedded in code | 3598 // ObjectPool contains constants, immediates and addresses embedded in code |
| 3599 // and deoptimization infos. Each entry has an type-info associated with it | 3599 // and deoptimization infos. Each entry has an type-info associated with it |
| 3600 // which is stored in a typed data array (info_array). | 3600 // which is stored in a typed data array (info_array). |
| 3601 class ObjectPool : public Object { | 3601 class ObjectPool : public Object { |
| 3602 public: | 3602 public: |
| 3603 enum EntryType { | 3603 enum EntryType { |
| 3604 kTaggedObject, | 3604 kTaggedObject, |
| 3605 kImmediate, | 3605 kImmediate, |
| 3606 kExternalLabel, | 3606 kExternalLabel, |
| 3607 kNativeEntry, |
| 3607 }; | 3608 }; |
| 3608 | 3609 |
| 3609 struct Entry { | 3610 struct Entry { |
| 3610 Entry() : raw_value_(), type_() { } | 3611 Entry() : raw_value_(), type_() { } |
| 3611 explicit Entry(const Object* obj) : obj_(obj), type_(kTaggedObject) { } | 3612 explicit Entry(const Object* obj) : obj_(obj), type_(kTaggedObject) { } |
| 3612 Entry(uword value, EntryType info) : raw_value_(value), type_(info) { } | 3613 Entry(uword value, EntryType info) : raw_value_(value), type_(info) { } |
| 3613 union { | 3614 union { |
| 3614 const Object* obj_; | 3615 const Object* obj_; |
| 3615 uword raw_value_; | 3616 uword raw_value_; |
| 3616 }; | 3617 }; |
| (...skipping 4509 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8126 | 8127 |
| 8127 | 8128 |
| 8128 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, | 8129 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, |
| 8129 intptr_t index) { | 8130 intptr_t index) { |
| 8130 return array.At((index * kEntryLength) + kTargetFunctionIndex); | 8131 return array.At((index * kEntryLength) + kTargetFunctionIndex); |
| 8131 } | 8132 } |
| 8132 | 8133 |
| 8133 } // namespace dart | 8134 } // namespace dart |
| 8134 | 8135 |
| 8135 #endif // VM_OBJECT_H_ | 8136 #endif // VM_OBJECT_H_ |
| OLD | NEW |