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 2056 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2067 // Returns ICData with aggregated receiver count, sorted by highest count. | 2067 // Returns ICData with aggregated receiver count, sorted by highest count. |
2068 // Smi not first!! (the convention for ICData used in code generation is that | 2068 // Smi not first!! (the convention for ICData used in code generation is that |
2069 // Smi check is first) | 2069 // Smi check is first) |
2070 // Used for printing and optimizations. | 2070 // Used for printing and optimizations. |
2071 RawICData* AsUnaryClassChecksSortedByCount() const; | 2071 RawICData* AsUnaryClassChecksSortedByCount() const; |
2072 | 2072 |
2073 // Consider only used entries. | 2073 // Consider only used entries. |
2074 bool AllTargetsHaveSameOwner(intptr_t owner_cid) const; | 2074 bool AllTargetsHaveSameOwner(intptr_t owner_cid) const; |
2075 bool AllReceiversAreNumbers() const; | 2075 bool AllReceiversAreNumbers() const; |
2076 bool HasOneTarget() const; | 2076 bool HasOneTarget() const; |
2077 bool HasOnlyDispatcherOrImplicitAccessorTargets() const; | |
2078 bool HasReceiverClassId(intptr_t class_id) const; | 2077 bool HasReceiverClassId(intptr_t class_id) const; |
2079 | 2078 |
2080 static RawICData* New(const Function& owner, | 2079 static RawICData* New(const Function& owner, |
2081 const String& target_name, | 2080 const String& target_name, |
2082 const Array& arguments_descriptor, | 2081 const Array& arguments_descriptor, |
2083 intptr_t deopt_id, | 2082 intptr_t deopt_id, |
2084 intptr_t num_args_tested, | 2083 intptr_t num_args_tested, |
2085 bool is_static_call); | 2084 bool is_static_call); |
2086 static RawICData* NewFrom(const ICData& from, intptr_t num_args_tested); | 2085 static RawICData* NewFrom(const ICData& from, intptr_t num_args_tested); |
2087 | 2086 |
(...skipping 6919 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9007 | 9006 |
9008 inline void TypeArguments::SetHash(intptr_t value) const { | 9007 inline void TypeArguments::SetHash(intptr_t value) const { |
9009 // This is only safe because we create a new Smi, which does not cause | 9008 // This is only safe because we create a new Smi, which does not cause |
9010 // heap allocation. | 9009 // heap allocation. |
9011 StoreSmi(&raw_ptr()->hash_, Smi::New(value)); | 9010 StoreSmi(&raw_ptr()->hash_, Smi::New(value)); |
9012 } | 9011 } |
9013 | 9012 |
9014 } // namespace dart | 9013 } // namespace dart |
9015 | 9014 |
9016 #endif // RUNTIME_VM_OBJECT_H_ | 9015 #endif // RUNTIME_VM_OBJECT_H_ |
OLD | NEW |