Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(53)

Side by Side Diff: runtime/vm/object.h

Issue 1153963002: Remove value check from ICData checks/house-keeping (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: c Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 3697 matching lines...) Expand 10 before | Expand all | Expand 10 after
3708 intptr_t GetCountAt(intptr_t index) const; 3708 intptr_t GetCountAt(intptr_t index) const;
3709 intptr_t AggregateCount() const; 3709 intptr_t AggregateCount() const;
3710 3710
3711 // Returns this->raw() if num_args_tested == 1 and arg_nr == 1, otherwise 3711 // Returns this->raw() if num_args_tested == 1 and arg_nr == 1, otherwise
3712 // returns a new ICData object containing only unique arg_nr checks. 3712 // returns a new ICData object containing only unique arg_nr checks.
3713 // Returns only used entries. 3713 // Returns only used entries.
3714 RawICData* AsUnaryClassChecksForArgNr(intptr_t arg_nr) const; 3714 RawICData* AsUnaryClassChecksForArgNr(intptr_t arg_nr) const;
3715 RawICData* AsUnaryClassChecks() const { 3715 RawICData* AsUnaryClassChecks() const {
3716 return AsUnaryClassChecksForArgNr(0); 3716 return AsUnaryClassChecksForArgNr(0);
3717 } 3717 }
3718 RawICData* AsUnaryClassChecksForCids(
3719 const GrowableArray<intptr_t>& cids, const Function& target) const;
3720 RawICData* AsUnaryClassChecksForCid(
3721 intptr_t cid, const Function& target) const;
3718 3722
3719 // Consider only used entries. 3723 // Consider only used entries.
3720 bool AllTargetsHaveSameOwner(intptr_t owner_cid) const; 3724 bool AllTargetsHaveSameOwner(intptr_t owner_cid) const;
3721 bool AllReceiversAreNumbers() const; 3725 bool AllReceiversAreNumbers() const;
3722 bool HasOneTarget() const; 3726 bool HasOneTarget() const;
3723 bool HasReceiverClassId(intptr_t class_id) const; 3727 bool HasReceiverClassId(intptr_t class_id) const;
3724 3728
3725 static RawICData* New(const Function& owner, 3729 static RawICData* New(const Function& owner,
3726 const String& target_name, 3730 const String& target_name,
3727 const Array& arguments_descriptor, 3731 const Array& arguments_descriptor,
3728 intptr_t deopt_id, 3732 intptr_t deopt_id,
3729 intptr_t num_args_tested); 3733 intptr_t num_args_tested);
3734 static RawICData* NewFrom(const ICData& from, intptr_t num_args_tested);
3730 3735
3731 static intptr_t TestEntryLengthFor(intptr_t num_args); 3736 static intptr_t TestEntryLengthFor(intptr_t num_args);
3732 3737
3733 static intptr_t TargetIndexFor(intptr_t num_args) { 3738 static intptr_t TargetIndexFor(intptr_t num_args) {
3734 return num_args; 3739 return num_args;
3735 } 3740 }
3736 3741
3737 static intptr_t CountIndexFor(intptr_t num_args) { 3742 static intptr_t CountIndexFor(intptr_t num_args) {
3738 return (num_args + 1); 3743 return (num_args + 1);
3739 } 3744 }
(...skipping 4009 matching lines...) Expand 10 before | Expand all | Expand 10 after
7749 7754
7750 7755
7751 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, 7756 RawObject* MegamorphicCache::GetTargetFunction(const Array& array,
7752 intptr_t index) { 7757 intptr_t index) {
7753 return array.At((index * kEntryLength) + kTargetFunctionIndex); 7758 return array.At((index * kEntryLength) + kTargetFunctionIndex);
7754 } 7759 }
7755 7760
7756 } // namespace dart 7761 } // namespace dart
7757 7762
7758 #endif // VM_OBJECT_H_ 7763 #endif // VM_OBJECT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698