| Index: runtime/vm/intermediate_language.cc
|
| diff --git a/runtime/vm/intermediate_language.cc b/runtime/vm/intermediate_language.cc
|
| index b9382a9e39086d1ab25160eac9d99cb45822449f..59cb8ab3e5827940d860dd5b0e9d4ed02c90e3be 100644
|
| --- a/runtime/vm/intermediate_language.cc
|
| +++ b/runtime/vm/intermediate_language.cc
|
| @@ -133,7 +133,6 @@ CheckClassInstr::CheckClassInstr(Value* value,
|
| unary_checks_(unary_checks),
|
| cids_(unary_checks.NumberOfChecks()),
|
| licm_hoisted_(false),
|
| - is_dense_switch_(IsDenseCidRange(unary_checks)),
|
| token_pos_(token_pos) {
|
| ASSERT(unary_checks.IsZoneHandle());
|
| // Expected useful check data.
|
| @@ -232,22 +231,14 @@ bool CheckClassInstr::DeoptIfNotNull() const {
|
| }
|
|
|
|
|
| -bool CheckClassInstr::IsDenseCidRange(const ICData& unary_checks) {
|
| - if (unary_checks.GetReceiverClassIdAt(0) == kSmiCid) return false;
|
| - if (unary_checks.NumberOfChecks() <= 2) return false;
|
| - intptr_t max = 0;
|
| - intptr_t min = kIntptrMax;
|
| - for (intptr_t i = 0; i < unary_checks.NumberOfChecks(); ++i) {
|
| - intptr_t cid = unary_checks.GetCidAt(i);
|
| - if (cid < min) min = cid;
|
| - if (cid > max) max = cid;
|
| - }
|
| - return (max - min) < kBitsPerWord;
|
| -}
|
| -
|
|
|
| bool CheckClassInstr::IsDenseSwitch() const {
|
| - return is_dense_switch_;
|
| + if (unary_checks().GetReceiverClassIdAt(0) == kSmiCid) return false;
|
| + if (cids_.length() > 2 &&
|
| + cids_[cids_.length() - 1] - cids_[0] < kBitsPerWord) {
|
| + return true;
|
| + }
|
| + return false;
|
| }
|
|
|
|
|
|
|