Chromium Code Reviews| 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!! Used for printing and optimizations. | |
|
zra
2016/04/27 16:28:17
Could you explain a bit more what "Smi not first"
srdjan
2016/04/27 18:10:22
Added comment that the convention for ICData used
| |
| 1965 RawICData* AsUnaryClassChecksSortedByCount() const; | |
| 1966 | |
| 1963 // Consider only used entries. | 1967 // Consider only used entries. |
| 1964 bool AllTargetsHaveSameOwner(intptr_t owner_cid) const; | 1968 bool AllTargetsHaveSameOwner(intptr_t owner_cid) const; |
| 1965 bool AllReceiversAreNumbers() const; | 1969 bool AllReceiversAreNumbers() const; |
| 1966 bool HasOneTarget() const; | 1970 bool HasOneTarget() const; |
| 1967 bool HasReceiverClassId(intptr_t class_id) const; | 1971 bool HasReceiverClassId(intptr_t class_id) const; |
| 1968 | 1972 |
| 1969 static RawICData* New(const Function& owner, | 1973 static RawICData* New(const Function& owner, |
| 1970 const String& target_name, | 1974 const String& target_name, |
| 1971 const Array& arguments_descriptor, | 1975 const Array& arguments_descriptor, |
| 1972 intptr_t deopt_id, | 1976 intptr_t deopt_id, |
| (...skipping 6528 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 8501 | 8505 |
| 8502 | 8506 |
| 8503 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, | 8507 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, |
| 8504 intptr_t index) { | 8508 intptr_t index) { |
| 8505 return array.At((index * kEntryLength) + kTargetFunctionIndex); | 8509 return array.At((index * kEntryLength) + kTargetFunctionIndex); |
| 8506 } | 8510 } |
| 8507 | 8511 |
| 8508 } // namespace dart | 8512 } // namespace dart |
| 8509 | 8513 |
| 8510 #endif // VM_OBJECT_H_ | 8514 #endif // VM_OBJECT_H_ |
| OLD | NEW |