| 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 1408 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1419 void set_is_abstract(bool value) const; | 1419 void set_is_abstract(bool value) const; |
| 1420 | 1420 |
| 1421 bool IsInlineable() const; | 1421 bool IsInlineable() const; |
| 1422 void set_is_inlinable(bool value) const; | 1422 void set_is_inlinable(bool value) const; |
| 1423 | 1423 |
| 1424 bool is_visible() const { | 1424 bool is_visible() const { |
| 1425 return VisibleBit::decode(raw_ptr()->kind_tag_); | 1425 return VisibleBit::decode(raw_ptr()->kind_tag_); |
| 1426 } | 1426 } |
| 1427 void set_is_visible(bool value) const; | 1427 void set_is_visible(bool value) const; |
| 1428 | 1428 |
| 1429 enum IntrinsicKind { | 1429 bool is_intrinsic() const { |
| 1430 kUnknownIntrinsic = 0, // Initial value. | 1430 return IntrinsicBit::decode(raw_ptr()->kind_tag_); |
| 1431 kIsIntrinsic, | |
| 1432 kIsNotIntrinsic, | |
| 1433 }; | |
| 1434 | |
| 1435 IntrinsicKind intrinsic_kind() const { | |
| 1436 return IntrinsicKindBits::decode(raw_ptr()->kind_tag_); | |
| 1437 } | 1431 } |
| 1438 void set_intrinsic_kind(IntrinsicKind value) const; | 1432 void set_is_intrinsic(bool value) const; |
| 1439 | 1433 |
| 1440 bool HasOptimizedCode() const; | 1434 bool HasOptimizedCode() const; |
| 1441 | 1435 |
| 1442 // Returns true if the argument counts are valid for calling this function. | 1436 // Returns true if the argument counts are valid for calling this function. |
| 1443 // Otherwise, it returns false and the reason (if error_message is not NULL). | 1437 // Otherwise, it returns false and the reason (if error_message is not NULL). |
| 1444 bool AreValidArgumentCounts(int num_arguments, | 1438 bool AreValidArgumentCounts(int num_arguments, |
| 1445 int num_named_arguments, | 1439 int num_named_arguments, |
| 1446 String* error_message) const; | 1440 String* error_message) const; |
| 1447 | 1441 |
| 1448 // Returns true if the total argument count and the names of optional | 1442 // Returns true if the total argument count and the names of optional |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1575 enum KindTagBits { | 1569 enum KindTagBits { |
| 1576 kStaticBit = 0, | 1570 kStaticBit = 0, |
| 1577 kConstBit = 1, | 1571 kConstBit = 1, |
| 1578 kOptimizableBit = 2, | 1572 kOptimizableBit = 2, |
| 1579 kInlinableBit = 3, | 1573 kInlinableBit = 3, |
| 1580 kHasFinallyBit = 4, | 1574 kHasFinallyBit = 4, |
| 1581 kNativeBit = 5, | 1575 kNativeBit = 5, |
| 1582 kAbstractBit = 6, | 1576 kAbstractBit = 6, |
| 1583 kExternalBit = 7, | 1577 kExternalBit = 7, |
| 1584 kVisibleBit = 8, | 1578 kVisibleBit = 8, |
| 1585 kIntrinsicTagBit = 9, | 1579 kIntrinsicBit = 9, |
| 1586 kIntrinsicTagSize = 2, | 1580 kKindTagBit = 10, |
| 1587 kKindTagBit = 11, | |
| 1588 kKindTagSize = 4, | 1581 kKindTagSize = 4, |
| 1589 }; | 1582 }; |
| 1590 class StaticBit : public BitField<bool, kStaticBit, 1> {}; | 1583 class StaticBit : public BitField<bool, kStaticBit, 1> {}; |
| 1591 class ConstBit : public BitField<bool, kConstBit, 1> {}; | 1584 class ConstBit : public BitField<bool, kConstBit, 1> {}; |
| 1592 class OptimizableBit : public BitField<bool, kOptimizableBit, 1> {}; | 1585 class OptimizableBit : public BitField<bool, kOptimizableBit, 1> {}; |
| 1593 class InlinableBit : public BitField<bool, kInlinableBit, 1> {}; | 1586 class InlinableBit : public BitField<bool, kInlinableBit, 1> {}; |
| 1594 class HasFinallyBit : public BitField<bool, kHasFinallyBit, 1> {}; | 1587 class HasFinallyBit : public BitField<bool, kHasFinallyBit, 1> {}; |
| 1595 class NativeBit : public BitField<bool, kNativeBit, 1> {}; | 1588 class NativeBit : public BitField<bool, kNativeBit, 1> {}; |
| 1596 class AbstractBit : public BitField<bool, kAbstractBit, 1> {}; | 1589 class AbstractBit : public BitField<bool, kAbstractBit, 1> {}; |
| 1597 class ExternalBit : public BitField<bool, kExternalBit, 1> {}; | 1590 class ExternalBit : public BitField<bool, kExternalBit, 1> {}; |
| 1598 class VisibleBit : public BitField<bool, kVisibleBit, 1> {}; | 1591 class VisibleBit : public BitField<bool, kVisibleBit, 1> {}; |
| 1599 class IntrinsicKindBits : | 1592 class IntrinsicBit : public BitField<bool, kIntrinsicBit, 1> {}; |
| 1600 public BitField<Function::IntrinsicKind, | |
| 1601 kIntrinsicTagBit, kIntrinsicTagSize> {}; // NOLINT | |
| 1602 class KindBits : | 1593 class KindBits : |
| 1603 public BitField<RawFunction::Kind, kKindTagBit, kKindTagSize> {}; // NOLINT | 1594 public BitField<RawFunction::Kind, kKindTagBit, kKindTagSize> {}; // NOLINT |
| 1604 | 1595 |
| 1605 void set_name(const String& value) const; | 1596 void set_name(const String& value) const; |
| 1606 void set_kind(RawFunction::Kind value) const; | 1597 void set_kind(RawFunction::Kind value) const; |
| 1607 void set_is_static(bool value) const; | 1598 void set_is_static(bool value) const; |
| 1608 void set_is_const(bool value) const; | 1599 void set_is_const(bool value) const; |
| 1609 void set_is_external(bool value) const; | 1600 void set_is_external(bool value) const; |
| 1610 void set_parent_function(const Function& value) const; | 1601 void set_parent_function(const Function& value) const; |
| 1611 void set_owner(const Object& value) const; | 1602 void set_owner(const Object& value) const; |
| (...skipping 4728 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6340 | 6331 |
| 6341 | 6332 |
| 6342 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, | 6333 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, |
| 6343 intptr_t index) { | 6334 intptr_t index) { |
| 6344 return array.At((index * kEntryLength) + kTargetFunctionIndex); | 6335 return array.At((index * kEntryLength) + kTargetFunctionIndex); |
| 6345 } | 6336 } |
| 6346 | 6337 |
| 6347 } // namespace dart | 6338 } // namespace dart |
| 6348 | 6339 |
| 6349 #endif // VM_OBJECT_H_ | 6340 #endif // VM_OBJECT_H_ |
| OLD | NEW |