| 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 1942 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1953 // Returns this->raw() if num_args_tested == 1 and arg_nr == 1, otherwise | 1953 // Returns this->raw() if num_args_tested == 1 and arg_nr == 1, otherwise |
| 1954 // returns a new ICData object containing only unique arg_nr checks. | 1954 // returns a new ICData object containing only unique arg_nr checks. |
| 1955 // Returns only used entries. | 1955 // Returns only used entries. |
| 1956 RawICData* AsUnaryClassChecksForArgNr(intptr_t arg_nr) const; | 1956 RawICData* AsUnaryClassChecksForArgNr(intptr_t arg_nr) const; |
| 1957 RawICData* AsUnaryClassChecks() const { | 1957 RawICData* AsUnaryClassChecks() const { |
| 1958 return AsUnaryClassChecksForArgNr(0); | 1958 return AsUnaryClassChecksForArgNr(0); |
| 1959 } | 1959 } |
| 1960 RawICData* AsUnaryClassChecksForCid( | 1960 RawICData* AsUnaryClassChecksForCid( |
| 1961 intptr_t cid, const Function& target) const; | 1961 intptr_t cid, const Function& target) const; |
| 1962 | 1962 |
| 1963 // Returns ICData with aggregated receiver count, sorted by highest count. |
| 1964 // Smi not first!! (the convention for ICData used in code generation is that |
| 1965 // Smi check is first) |
| 1966 // Used for printing and optimizations. |
| 1967 RawICData* AsUnaryClassChecksSortedByCount() const; |
| 1968 |
| 1963 // Consider only used entries. | 1969 // Consider only used entries. |
| 1964 bool AllTargetsHaveSameOwner(intptr_t owner_cid) const; | 1970 bool AllTargetsHaveSameOwner(intptr_t owner_cid) const; |
| 1965 bool AllReceiversAreNumbers() const; | 1971 bool AllReceiversAreNumbers() const; |
| 1966 bool HasOneTarget() const; | 1972 bool HasOneTarget() const; |
| 1967 bool HasReceiverClassId(intptr_t class_id) const; | 1973 bool HasReceiverClassId(intptr_t class_id) const; |
| 1968 | 1974 |
| 1969 static RawICData* New(const Function& owner, | 1975 static RawICData* New(const Function& owner, |
| 1970 const String& target_name, | 1976 const String& target_name, |
| 1971 const Array& arguments_descriptor, | 1977 const Array& arguments_descriptor, |
| 1972 intptr_t deopt_id, | 1978 intptr_t deopt_id, |
| (...skipping 6528 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8501 | 8507 |
| 8502 | 8508 |
| 8503 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, | 8509 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, |
| 8504 intptr_t index) { | 8510 intptr_t index) { |
| 8505 return array.At((index * kEntryLength) + kTargetFunctionIndex); | 8511 return array.At((index * kEntryLength) + kTargetFunctionIndex); |
| 8506 } | 8512 } |
| 8507 | 8513 |
| 8508 } // namespace dart | 8514 } // namespace dart |
| 8509 | 8515 |
| 8510 #endif // VM_OBJECT_H_ | 8516 #endif // VM_OBJECT_H_ |
| OLD | NEW |