| 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 1523 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1534 } | 1534 } |
| 1535 | 1535 |
| 1536 bool IsNoSuchMethodDispatcher() const { | 1536 bool IsNoSuchMethodDispatcher() const { |
| 1537 return kind() == RawFunction::kNoSuchMethodDispatcher; | 1537 return kind() == RawFunction::kNoSuchMethodDispatcher; |
| 1538 } | 1538 } |
| 1539 | 1539 |
| 1540 bool IsInvokeFieldDispatcher() const { | 1540 bool IsInvokeFieldDispatcher() const { |
| 1541 return kind() == RawFunction::kInvokeFieldDispatcher; | 1541 return kind() == RawFunction::kInvokeFieldDispatcher; |
| 1542 } | 1542 } |
| 1543 | 1543 |
| 1544 bool IsInvokeClosureDispatcher() const { |
| 1545 return kind() == RawFunction::kInvokeClosureDispatcher; |
| 1546 } |
| 1547 |
| 1544 // Returns true iff an implicit closure function has been created | 1548 // Returns true iff an implicit closure function has been created |
| 1545 // for this function. | 1549 // for this function. |
| 1546 bool HasImplicitClosureFunction() const { | 1550 bool HasImplicitClosureFunction() const { |
| 1547 return implicit_closure_function() != null(); | 1551 return implicit_closure_function() != null(); |
| 1548 } | 1552 } |
| 1549 | 1553 |
| 1550 // Return the closure function implicitly created for this function. | 1554 // Return the closure function implicitly created for this function. |
| 1551 // If none exists yet, create one and remember it. | 1555 // If none exists yet, create one and remember it. |
| 1552 RawFunction* ImplicitClosureFunction() const; | 1556 RawFunction* ImplicitClosureFunction() const; |
| 1553 | 1557 |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1586 } | 1590 } |
| 1587 switch (kind()) { | 1591 switch (kind()) { |
| 1588 case RawFunction::kRegularFunction: | 1592 case RawFunction::kRegularFunction: |
| 1589 case RawFunction::kGetterFunction: | 1593 case RawFunction::kGetterFunction: |
| 1590 case RawFunction::kSetterFunction: | 1594 case RawFunction::kSetterFunction: |
| 1591 case RawFunction::kImplicitGetter: | 1595 case RawFunction::kImplicitGetter: |
| 1592 case RawFunction::kImplicitSetter: | 1596 case RawFunction::kImplicitSetter: |
| 1593 case RawFunction::kMethodExtractor: | 1597 case RawFunction::kMethodExtractor: |
| 1594 case RawFunction::kNoSuchMethodDispatcher: | 1598 case RawFunction::kNoSuchMethodDispatcher: |
| 1595 case RawFunction::kInvokeFieldDispatcher: | 1599 case RawFunction::kInvokeFieldDispatcher: |
| 1600 case RawFunction::kInvokeClosureDispatcher: |
| 1596 return true; | 1601 return true; |
| 1597 case RawFunction::kClosureFunction: | 1602 case RawFunction::kClosureFunction: |
| 1598 case RawFunction::kConstructor: | 1603 case RawFunction::kConstructor: |
| 1599 case RawFunction::kImplicitStaticFinalGetter: | 1604 case RawFunction::kImplicitStaticFinalGetter: |
| 1600 case RawFunction::kStaticInitializer: | 1605 case RawFunction::kStaticInitializer: |
| 1601 return false; | 1606 return false; |
| 1602 default: | 1607 default: |
| 1603 UNREACHABLE(); | 1608 UNREACHABLE(); |
| 1604 return false; | 1609 return false; |
| 1605 } | 1610 } |
| (...skipping 5122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6728 | 6733 |
| 6729 | 6734 |
| 6730 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, | 6735 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, |
| 6731 intptr_t index) { | 6736 intptr_t index) { |
| 6732 return array.At((index * kEntryLength) + kTargetFunctionIndex); | 6737 return array.At((index * kEntryLength) + kTargetFunctionIndex); |
| 6733 } | 6738 } |
| 6734 | 6739 |
| 6735 } // namespace dart | 6740 } // namespace dart |
| 6736 | 6741 |
| 6737 #endif // VM_OBJECT_H_ | 6742 #endif // VM_OBJECT_H_ |
| OLD | NEW |