| 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 1730 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1741 void set_script(const Script& value) const; | 1741 void set_script(const Script& value) const; |
| 1742 | 1742 |
| 1743 static RawPatchClass* New(); | 1743 static RawPatchClass* New(); |
| 1744 | 1744 |
| 1745 FINAL_HEAP_OBJECT_IMPLEMENTATION(PatchClass, Object); | 1745 FINAL_HEAP_OBJECT_IMPLEMENTATION(PatchClass, Object); |
| 1746 friend class Class; | 1746 friend class Class; |
| 1747 }; | 1747 }; |
| 1748 | 1748 |
| 1749 | 1749 |
| 1750 // Object holding information about an IC: test classes and their | 1750 // Object holding information about an IC: test classes and their |
| 1751 // corresponding targets. | 1751 // corresponding targets. The owner of the ICData can be either the function |
| 1752 // or the original ICData object. In case of background compilation we |
| 1753 // copy the ICData in a child object, thus freezing it during background |
| 1754 // compilation. Code may contain only original ICData objects. |
| 1752 class ICData : public Object { | 1755 class ICData : public Object { |
| 1753 public: | 1756 public: |
| 1754 RawFunction* owner() const { | 1757 RawFunction* Owner() const; |
| 1755 return raw_ptr()->owner_; | 1758 |
| 1759 RawICData* Original() const; |
| 1760 |
| 1761 void SetOriginal(const ICData& value) const; |
| 1762 |
| 1763 bool IsOriginal() const { |
| 1764 return Original() == this->raw(); |
| 1756 } | 1765 } |
| 1757 | 1766 |
| 1758 RawString* target_name() const { | 1767 RawString* target_name() const { |
| 1759 return raw_ptr()->target_name_; | 1768 return raw_ptr()->target_name_; |
| 1760 } | 1769 } |
| 1761 | 1770 |
| 1762 RawArray* arguments_descriptor() const { | 1771 RawArray* arguments_descriptor() const { |
| 1763 return raw_ptr()->args_descriptor_; | 1772 return raw_ptr()->args_descriptor_; |
| 1764 } | 1773 } |
| 1765 | 1774 |
| (...skipping 6457 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8223 | 8232 |
| 8224 | 8233 |
| 8225 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, | 8234 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, |
| 8226 intptr_t index) { | 8235 intptr_t index) { |
| 8227 return array.At((index * kEntryLength) + kTargetFunctionIndex); | 8236 return array.At((index * kEntryLength) + kTargetFunctionIndex); |
| 8228 } | 8237 } |
| 8229 | 8238 |
| 8230 } // namespace dart | 8239 } // namespace dart |
| 8231 | 8240 |
| 8232 #endif // VM_OBJECT_H_ | 8241 #endif // VM_OBJECT_H_ |
| OLD | NEW |