| 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 1716 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1727 return raw_ptr()->optimized_call_site_count_; | 1727 return raw_ptr()->optimized_call_site_count_; |
| 1728 } | 1728 } |
| 1729 void set_optimized_call_site_count(intptr_t value) const { | 1729 void set_optimized_call_site_count(intptr_t value) const { |
| 1730 ASSERT(value >= 0); | 1730 ASSERT(value >= 0); |
| 1731 if (value > kMaxInstructionCount) { | 1731 if (value > kMaxInstructionCount) { |
| 1732 value = kMaxInstructionCount; | 1732 value = kMaxInstructionCount; |
| 1733 } | 1733 } |
| 1734 raw_ptr()->optimized_call_site_count_ = static_cast<uint16_t>(value); | 1734 raw_ptr()->optimized_call_site_count_ = static_cast<uint16_t>(value); |
| 1735 } | 1735 } |
| 1736 | 1736 |
| 1737 bool is_optimizable() const; | 1737 bool IsOptimizable() const; |
| 1738 void set_is_optimizable(bool value) const; | 1738 bool IsNativeLeaf() const; |
| 1739 void SetIsOptimizable(bool value) const; |
| 1740 void SetIsNativeLeaf(bool value) const; |
| 1739 | 1741 |
| 1740 bool has_finally() const { | 1742 bool has_finally() const { |
| 1741 return HasFinallyBit::decode(raw_ptr()->kind_tag_); | 1743 return HasFinallyBit::decode(raw_ptr()->kind_tag_); |
| 1742 } | 1744 } |
| 1743 void set_has_finally(bool value) const; | 1745 void set_has_finally(bool value) const; |
| 1744 | 1746 |
| 1745 bool is_native() const { return NativeBit::decode(raw_ptr()->kind_tag_); } | 1747 bool is_native() const { return NativeBit::decode(raw_ptr()->kind_tag_); } |
| 1746 void set_is_native(bool value) const; | 1748 void set_is_native(bool value) const; |
| 1747 | 1749 |
| 1748 bool is_abstract() const { return AbstractBit::decode(raw_ptr()->kind_tag_); } | 1750 bool is_abstract() const { return AbstractBit::decode(raw_ptr()->kind_tag_); } |
| (...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1965 void set_is_external(bool value) const; | 1967 void set_is_external(bool value) const; |
| 1966 void set_parent_function(const Function& value) const; | 1968 void set_parent_function(const Function& value) const; |
| 1967 void set_owner(const Object& value) const; | 1969 void set_owner(const Object& value) const; |
| 1968 RawFunction* implicit_closure_function() const; | 1970 RawFunction* implicit_closure_function() const; |
| 1969 void set_implicit_closure_function(const Function& value) const; | 1971 void set_implicit_closure_function(const Function& value) const; |
| 1970 RawInstance* implicit_static_closure() const; | 1972 RawInstance* implicit_static_closure() const; |
| 1971 void set_implicit_static_closure(const Instance& closure) const; | 1973 void set_implicit_static_closure(const Instance& closure) const; |
| 1972 void set_num_optional_parameters(intptr_t value) const; // Encoded value. | 1974 void set_num_optional_parameters(intptr_t value) const; // Encoded value. |
| 1973 void set_kind_tag(intptr_t value) const; | 1975 void set_kind_tag(intptr_t value) const; |
| 1974 void set_data(const Object& value) const; | 1976 void set_data(const Object& value) const; |
| 1977 bool is_optimizable() const { |
| 1978 return OptimizableBit::decode(raw_ptr()->kind_tag_); |
| 1979 } |
| 1980 void set_is_optimizable(bool value) const; |
| 1975 | 1981 |
| 1976 static RawFunction* New(); | 1982 static RawFunction* New(); |
| 1977 | 1983 |
| 1978 void BuildSignatureParameters(bool instantiate, | 1984 void BuildSignatureParameters(bool instantiate, |
| 1979 NameVisibility name_visibility, | 1985 NameVisibility name_visibility, |
| 1980 const AbstractTypeArguments& instantiator, | 1986 const AbstractTypeArguments& instantiator, |
| 1981 const GrowableObjectArray& pieces) const; | 1987 const GrowableObjectArray& pieces) const; |
| 1982 RawString* BuildSignature(bool instantiate, | 1988 RawString* BuildSignature(bool instantiate, |
| 1983 NameVisibility name_visibility, | 1989 NameVisibility name_visibility, |
| 1984 const AbstractTypeArguments& instantiator) const; | 1990 const AbstractTypeArguments& instantiator) const; |
| (...skipping 4568 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6553 | 6559 |
| 6554 | 6560 |
| 6555 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, | 6561 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, |
| 6556 intptr_t index) { | 6562 intptr_t index) { |
| 6557 return array.At((index * kEntryLength) + kTargetFunctionIndex); | 6563 return array.At((index * kEntryLength) + kTargetFunctionIndex); |
| 6558 } | 6564 } |
| 6559 | 6565 |
| 6560 } // namespace dart | 6566 } // namespace dart |
| 6561 | 6567 |
| 6562 #endif // VM_OBJECT_H_ | 6568 #endif // VM_OBJECT_H_ |
| OLD | NEW |