| 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 3487 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3498 RawICData* AsUnaryClassChecksForArgNr(intptr_t arg_nr) const; | 3498 RawICData* AsUnaryClassChecksForArgNr(intptr_t arg_nr) const; |
| 3499 RawICData* AsUnaryClassChecks() const { | 3499 RawICData* AsUnaryClassChecks() const { |
| 3500 return AsUnaryClassChecksForArgNr(0); | 3500 return AsUnaryClassChecksForArgNr(0); |
| 3501 } | 3501 } |
| 3502 | 3502 |
| 3503 bool AllTargetsHaveSameOwner(intptr_t owner_cid) const; | 3503 bool AllTargetsHaveSameOwner(intptr_t owner_cid) const; |
| 3504 bool AllReceiversAreNumbers() const; | 3504 bool AllReceiversAreNumbers() const; |
| 3505 bool HasOneTarget() const; | 3505 bool HasOneTarget() const; |
| 3506 bool HasReceiverClassId(intptr_t class_id) const; | 3506 bool HasReceiverClassId(intptr_t class_id) const; |
| 3507 | 3507 |
| 3508 // Returns true if some entries have count 0, except if the ICData is used |
| 3509 // by an unoptimized static call. |
| 3510 bool HasUnusedEntries() const; |
| 3511 |
| 3512 // Returns a new ICData with all unused entries removed. |
| 3513 RawICData* FilterUnusedEntries() const; |
| 3514 |
| 3508 static RawICData* New(const Function& owner, | 3515 static RawICData* New(const Function& owner, |
| 3509 const String& target_name, | 3516 const String& target_name, |
| 3510 const Array& arguments_descriptor, | 3517 const Array& arguments_descriptor, |
| 3511 intptr_t deopt_id, | 3518 intptr_t deopt_id, |
| 3512 intptr_t num_args_tested); | 3519 intptr_t num_args_tested); |
| 3513 | 3520 |
| 3514 static intptr_t TestEntryLengthFor(intptr_t num_args); | 3521 static intptr_t TestEntryLengthFor(intptr_t num_args); |
| 3515 | 3522 |
| 3516 static intptr_t TargetIndexFor(intptr_t num_args) { | 3523 static intptr_t TargetIndexFor(intptr_t num_args) { |
| 3517 return num_args; | 3524 return num_args; |
| (...skipping 3801 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7319 | 7326 |
| 7320 | 7327 |
| 7321 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, | 7328 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, |
| 7322 intptr_t index) { | 7329 intptr_t index) { |
| 7323 return array.At((index * kEntryLength) + kTargetFunctionIndex); | 7330 return array.At((index * kEntryLength) + kTargetFunctionIndex); |
| 7324 } | 7331 } |
| 7325 | 7332 |
| 7326 } // namespace dart | 7333 } // namespace dart |
| 7327 | 7334 |
| 7328 #endif // VM_OBJECT_H_ | 7335 #endif // VM_OBJECT_H_ |
| OLD | NEW |