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

Unified Diff: runtime/vm/object.h

Issue 11048032: Support for mixed null/smi equality: do not deoptimize, emit same optimized code as if that was smi… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: runtime/vm/object.h
===================================================================
--- runtime/vm/object.h (revision 13236)
+++ runtime/vm/object.h (working copy)
@@ -2735,6 +2735,8 @@
return OFFSET_OF(RawICData, function_);
}
+ // Adding checks.
+
// Adds one more class test to ICData. Length of 'classes' must be equal to
// the number of arguments tested. Use only for num_args_tested > 1.
void AddCheck(const GrowableArray<intptr_t>& class_ids,
@@ -2743,19 +2745,27 @@
// num_args_tested == 1.
void AddReceiverCheck(intptr_t receiver_class_id,
const Function& target) const;
+
+ // Retrieving checks.
+
void GetCheckAt(intptr_t index,
GrowableArray<intptr_t>* class_ids,
Function* target) const;
- void GetOneClassCheckAt(
- int index, intptr_t* class_id, Function* target) const;
+ void GetOneClassCheckAt(intptr_t index,
+ intptr_t* class_id,
+ Function* target) const;
+ intptr_t GetReceiverClassIdAt(intptr_t index) const;
+ intptr_t GetClassIdAt(intptr_t index, intptr_t arg_nr) const;
- intptr_t GetReceiverClassIdAt(intptr_t index) const;
RawFunction* GetTargetAt(intptr_t index) const;
RawFunction* GetTargetForReceiverClassId(intptr_t class_id) const;
- // Returns this->raw() if num_args_tested == 1, otherwise returns a new
- // ICData object containing only unique arg0 checks.
- RawICData* AsUnaryClassChecks() const;
+ // Returns this->raw() if num_args_tested == 1 and arg_nr == 1, otherwise
+ // returns a new ICData object containing only unique arg_nr checks.
+ RawICData* AsUnaryClassChecksForArgNr(intptr_t arg_nr) const;
+ RawICData* AsUnaryClassChecks() const {
+ return AsUnaryClassChecksForArgNr(0);
+ }
bool AllTargetsHaveSameOwner(intptr_t owner_cid) const;
bool AllReceiversAreNumbers() const;
@@ -2777,6 +2787,9 @@
void set_num_args_tested(intptr_t value) const;
void set_ic_data(const Array& value) const;
+ // Used in asserts to verify that a check is not added twice.
+ bool HasCheck(const GrowableArray<intptr_t>& cids) const;
+
intptr_t TestEntryLength() const;
void WriteSentinel() const;

Powered by Google App Engine
This is Rietveld 408576698