| 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 3553 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3564 | 3564 |
| 3565 // ObjectPool contains constants, immediates and addresses embedded in code | 3565 // ObjectPool contains constants, immediates and addresses embedded in code |
| 3566 // and deoptimization infos. Each entry has an type-info associated with it | 3566 // and deoptimization infos. Each entry has an type-info associated with it |
| 3567 // which is stored in a typed data array (info_array). | 3567 // which is stored in a typed data array (info_array). |
| 3568 class ObjectPool : public Object { | 3568 class ObjectPool : public Object { |
| 3569 public: | 3569 public: |
| 3570 enum EntryType { | 3570 enum EntryType { |
| 3571 kTaggedObject, | 3571 kTaggedObject, |
| 3572 kImmediate, | 3572 kImmediate, |
| 3573 kExternalLabel, | 3573 kExternalLabel, |
| 3574 kNativeEntry, |
| 3574 }; | 3575 }; |
| 3575 | 3576 |
| 3576 struct Entry { | 3577 struct Entry { |
| 3577 Entry() : raw_value_(), type_() { } | 3578 Entry() : raw_value_(), type_() { } |
| 3578 explicit Entry(const Object* obj) : obj_(obj), type_(kTaggedObject) { } | 3579 explicit Entry(const Object* obj) : obj_(obj), type_(kTaggedObject) { } |
| 3579 Entry(uword value, EntryType info) : raw_value_(value), type_(info) { } | 3580 Entry(uword value, EntryType info) : raw_value_(value), type_(info) { } |
| 3580 union { | 3581 union { |
| 3581 const Object* obj_; | 3582 const Object* obj_; |
| 3582 uword raw_value_; | 3583 uword raw_value_; |
| 3583 }; | 3584 }; |
| (...skipping 4486 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8070 | 8071 |
| 8071 | 8072 |
| 8072 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, | 8073 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, |
| 8073 intptr_t index) { | 8074 intptr_t index) { |
| 8074 return array.At((index * kEntryLength) + kTargetFunctionIndex); | 8075 return array.At((index * kEntryLength) + kTargetFunctionIndex); |
| 8075 } | 8076 } |
| 8076 | 8077 |
| 8077 } // namespace dart | 8078 } // namespace dart |
| 8078 | 8079 |
| 8079 #endif // VM_OBJECT_H_ | 8080 #endif // VM_OBJECT_H_ |
| OLD | NEW |