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

Unified Diff: runtime/vm/intermediate_language.cc

Issue 11262025: Check class instruction supports Smi check. This fixes missed inlining of isOdd/isEven (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
« no previous file with comments | « runtime/vm/intermediate_language.h ('k') | runtime/vm/intermediate_language_ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/intermediate_language.cc
===================================================================
--- runtime/vm/intermediate_language.cc (revision 14083)
+++ runtime/vm/intermediate_language.cc (working copy)
@@ -61,6 +61,25 @@
}
+
+CheckClassInstr::CheckClassInstr(Value* value,
+ intptr_t deopt_id,
+ const ICData& unary_checks)
+ : unary_checks_(unary_checks) {
+ ASSERT(value != NULL);
+ ASSERT(unary_checks.IsZoneHandle());
+ // Expected useful check data.
+ ASSERT(!unary_checks_.IsNull() &&
+ (unary_checks_.NumberOfChecks() > 0) &&
+ (unary_checks_.num_args_tested() == 1));
+ inputs_[0] = value;
+ deopt_id_ = deopt_id;
+ // Otherwise use CheckSmiInstr.
+ ASSERT((unary_checks_.NumberOfChecks() != 1) ||
+ (unary_checks_.GetReceiverClassIdAt(0) != kSmiCid));
+}
+
+
bool CheckClassInstr::AttributesEqual(Instruction* other) const {
CheckClassInstr* other_check = other->AsCheckClass();
ASSERT(other_check != NULL);
« no previous file with comments | « runtime/vm/intermediate_language.h ('k') | runtime/vm/intermediate_language_ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698