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 2051 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2062 // Returns ICData with aggregated receiver count, sorted by highest count. | 2062 // Returns ICData with aggregated receiver count, sorted by highest count. |
2063 // Smi not first!! (the convention for ICData used in code generation is that | 2063 // Smi not first!! (the convention for ICData used in code generation is that |
2064 // Smi check is first) | 2064 // Smi check is first) |
2065 // Used for printing and optimizations. | 2065 // Used for printing and optimizations. |
2066 RawICData* AsUnaryClassChecksSortedByCount() const; | 2066 RawICData* AsUnaryClassChecksSortedByCount() const; |
2067 | 2067 |
2068 // Consider only used entries. | 2068 // Consider only used entries. |
2069 bool AllTargetsHaveSameOwner(intptr_t owner_cid) const; | 2069 bool AllTargetsHaveSameOwner(intptr_t owner_cid) const; |
2070 bool AllReceiversAreNumbers() const; | 2070 bool AllReceiversAreNumbers() const; |
2071 bool HasOneTarget() const; | 2071 bool HasOneTarget() const; |
| 2072 bool HasOnlyDispatcherTargets() const; |
2072 bool HasReceiverClassId(intptr_t class_id) const; | 2073 bool HasReceiverClassId(intptr_t class_id) const; |
2073 | 2074 |
2074 static RawICData* New(const Function& owner, | 2075 static RawICData* New(const Function& owner, |
2075 const String& target_name, | 2076 const String& target_name, |
2076 const Array& arguments_descriptor, | 2077 const Array& arguments_descriptor, |
2077 intptr_t deopt_id, | 2078 intptr_t deopt_id, |
2078 intptr_t num_args_tested, | 2079 intptr_t num_args_tested, |
2079 bool is_static_call); | 2080 bool is_static_call); |
2080 static RawICData* NewFrom(const ICData& from, intptr_t num_args_tested); | 2081 static RawICData* NewFrom(const ICData& from, intptr_t num_args_tested); |
2081 | 2082 |
(...skipping 6735 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8817 | 8818 |
8818 inline void TypeArguments::SetHash(intptr_t value) const { | 8819 inline void TypeArguments::SetHash(intptr_t value) const { |
8819 // This is only safe because we create a new Smi, which does not cause | 8820 // This is only safe because we create a new Smi, which does not cause |
8820 // heap allocation. | 8821 // heap allocation. |
8821 StoreSmi(&raw_ptr()->hash_, Smi::New(value)); | 8822 StoreSmi(&raw_ptr()->hash_, Smi::New(value)); |
8822 } | 8823 } |
8823 | 8824 |
8824 } // namespace dart | 8825 } // namespace dart |
8825 | 8826 |
8826 #endif // VM_OBJECT_H_ | 8827 #endif // VM_OBJECT_H_ |
OLD | NEW |