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

Unified Diff: runtime/vm/intermediate_language.cc

Issue 384703002: Revert r38116 because of crashes. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 5 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_arm.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 38117)
+++ runtime/vm/intermediate_language.cc (working copy)
@@ -95,19 +95,11 @@
}
-static int LowestFirst(const intptr_t* a, const intptr_t* b) {
- return *a - *b;
-}
-
-
CheckClassInstr::CheckClassInstr(Value* value,
intptr_t deopt_id,
const ICData& unary_checks,
intptr_t token_pos)
- : unary_checks_(unary_checks),
- cids_(unary_checks.NumberOfChecks()),
- licm_hoisted_(false),
- token_pos_(token_pos) {
+ : unary_checks_(unary_checks), licm_hoisted_(false), token_pos_(token_pos) {
ASSERT(unary_checks.IsZoneHandle());
// Expected useful check data.
ASSERT(!unary_checks_.IsNull());
@@ -118,10 +110,6 @@
// Otherwise use CheckSmiInstr.
ASSERT((unary_checks_.NumberOfChecks() != 1) ||
(unary_checks_.GetReceiverClassIdAt(0) != kSmiCid));
- for (intptr_t i = 0; i < unary_checks.NumberOfChecks(); ++i) {
- cids_.Add(unary_checks.GetReceiverClassIdAt(i));
- }
- cids_.Sort(LowestFirst);
}
@@ -164,33 +152,6 @@
}
-bool CheckClassInstr::IsDenseSwitch() const {
- if (unary_checks().GetReceiverClassIdAt(0) == kSmiCid) return false;
- if (cids_.length() > 2 &&
- cids_[cids_.length() - 1] - cids_[0] < kBitsPerWord) {
- return true;
- }
- return false;
-}
-
-
-intptr_t CheckClassInstr::ComputeCidMask() const {
- ASSERT(IsDenseSwitch());
- intptr_t mask = 0;
- for (intptr_t i = 0; i < cids_.length(); ++i) {
- mask |= 1 << (cids_[i] - cids_[0]);
- }
- return mask;
-}
-
-
-bool CheckClassInstr::IsDenseMask(intptr_t mask) {
- // Returns true if the mask is a continuos sequence of ones in its binary
- // representation (i.e. no holes)
- return mask == -1 || Utils::IsPowerOfTwo(mask + 1);
-}
-
-
bool LoadFieldInstr::IsUnboxedLoad() const {
return FLAG_unbox_numeric_fields
&& (field() != NULL)
« no previous file with comments | « runtime/vm/intermediate_language.h ('k') | runtime/vm/intermediate_language_arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698