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 RUNTIME_VM_OBJECT_H_ | 5 #ifndef RUNTIME_VM_OBJECT_H_ |
6 #define RUNTIME_VM_OBJECT_H_ | 6 #define RUNTIME_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 2047 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2058 // Returns ICData with aggregated receiver count, sorted by highest count. | 2058 // Returns ICData with aggregated receiver count, sorted by highest count. |
2059 // Smi not first!! (the convention for ICData used in code generation is that | 2059 // Smi not first!! (the convention for ICData used in code generation is that |
2060 // Smi check is first) | 2060 // Smi check is first) |
2061 // Used for printing and optimizations. | 2061 // Used for printing and optimizations. |
2062 RawICData* AsUnaryClassChecksSortedByCount() const; | 2062 RawICData* AsUnaryClassChecksSortedByCount() const; |
2063 | 2063 |
2064 // Consider only used entries. | 2064 // Consider only used entries. |
2065 bool AllTargetsHaveSameOwner(intptr_t owner_cid) const; | 2065 bool AllTargetsHaveSameOwner(intptr_t owner_cid) const; |
2066 bool AllReceiversAreNumbers() const; | 2066 bool AllReceiversAreNumbers() const; |
2067 bool HasOneTarget() const; | 2067 bool HasOneTarget() const; |
2068 bool HasOnlyDispatcherOrImplicitAccessorTargets() const; | |
2069 bool HasReceiverClassId(intptr_t class_id) const; | 2068 bool HasReceiverClassId(intptr_t class_id) const; |
2070 | 2069 |
2071 static RawICData* New(const Function& owner, | 2070 static RawICData* New(const Function& owner, |
2072 const String& target_name, | 2071 const String& target_name, |
2073 const Array& arguments_descriptor, | 2072 const Array& arguments_descriptor, |
2074 intptr_t deopt_id, | 2073 intptr_t deopt_id, |
2075 intptr_t num_args_tested, | 2074 intptr_t num_args_tested, |
2076 bool is_static_call); | 2075 bool is_static_call); |
2077 static RawICData* NewFrom(const ICData& from, intptr_t num_args_tested); | 2076 static RawICData* NewFrom(const ICData& from, intptr_t num_args_tested); |
2078 | 2077 |
(...skipping 6865 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8944 | 8943 |
8945 inline void TypeArguments::SetHash(intptr_t value) const { | 8944 inline void TypeArguments::SetHash(intptr_t value) const { |
8946 // This is only safe because we create a new Smi, which does not cause | 8945 // This is only safe because we create a new Smi, which does not cause |
8947 // heap allocation. | 8946 // heap allocation. |
8948 StoreSmi(&raw_ptr()->hash_, Smi::New(value)); | 8947 StoreSmi(&raw_ptr()->hash_, Smi::New(value)); |
8949 } | 8948 } |
8950 | 8949 |
8951 } // namespace dart | 8950 } // namespace dart |
8952 | 8951 |
8953 #endif // RUNTIME_VM_OBJECT_H_ | 8952 #endif // RUNTIME_VM_OBJECT_H_ |
OLD | NEW |