Index: runtime/vm/object.cc |
diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc |
index 9b2e3194209fc655ea93cab4e97204235adb5d27..e35f35f1db9967bd09cae847c5062e0eea499556 100644 |
--- a/runtime/vm/object.cc |
+++ b/runtime/vm/object.cc |
@@ -13520,95 +13520,6 @@ RawICData* ICData::Clone(const ICData& from) { |
} |
-static Token::Kind RecognizeArithmeticOp(const String& name) { |
- ASSERT(name.IsSymbol()); |
- if (name.raw() == Symbols::Plus().raw()) { |
- return Token::kADD; |
- } else if (name.raw() == Symbols::Minus().raw()) { |
- return Token::kSUB; |
- } else if (name.raw() == Symbols::Star().raw()) { |
- return Token::kMUL; |
- } else if (name.raw() == Symbols::Slash().raw()) { |
- return Token::kDIV; |
- } else if (name.raw() == Symbols::TruncDivOperator().raw()) { |
- return Token::kTRUNCDIV; |
- } else if (name.raw() == Symbols::Percent().raw()) { |
- return Token::kMOD; |
- } else if (name.raw() == Symbols::BitOr().raw()) { |
- return Token::kBIT_OR; |
- } else if (name.raw() == Symbols::Ampersand().raw()) { |
- return Token::kBIT_AND; |
- } else if (name.raw() == Symbols::Caret().raw()) { |
- return Token::kBIT_XOR; |
- } else if (name.raw() == Symbols::LeftShiftOperator().raw()) { |
- return Token::kSHL; |
- } else if (name.raw() == Symbols::RightShiftOperator().raw()) { |
- return Token::kSHR; |
- } else if (name.raw() == Symbols::Tilde().raw()) { |
- return Token::kBIT_NOT; |
- } else if (name.raw() == Symbols::UnaryMinus().raw()) { |
- return Token::kNEGATE; |
- } |
- return Token::kILLEGAL; |
-} |
- |
- |
-bool ICData::HasRangeFeedback() const { |
- const String& target = String::Handle(target_name()); |
- const Token::Kind token_kind = RecognizeArithmeticOp(target); |
- if (!Token::IsBinaryArithmeticOperator(token_kind) && |
- !Token::IsUnaryArithmeticOperator(token_kind)) { |
- return false; |
- } |
- |
- bool initialized = false; |
- const intptr_t len = NumberOfChecks(); |
- GrowableArray<intptr_t> class_ids; |
- for (intptr_t i = 0; i < len; i++) { |
- if (IsUsedAt(i)) { |
- initialized = true; |
- GetClassIdsAt(i, &class_ids); |
- for (intptr_t j = 0; j < class_ids.length(); j++) { |
- const intptr_t cid = class_ids[j]; |
- if ((cid != kSmiCid) && (cid != kMintCid)) { |
- return false; |
- } |
- } |
- } |
- } |
- |
- return initialized; |
-} |
- |
- |
-ICData::RangeFeedback ICData::DecodeRangeFeedbackAt(intptr_t idx) const { |
- ASSERT((0 <= idx) && (idx < 3)); |
- const uint32_t raw_feedback = |
- RangeFeedbackBits::decode(raw_ptr()->state_bits_); |
- const uint32_t feedback = |
- (raw_feedback >> (idx * kBitsPerRangeFeedback)) & kRangeFeedbackMask; |
- if ((feedback & kInt64RangeBit) != 0) { |
- return kInt64Range; |
- } |
- |
- if ((feedback & kUint32RangeBit) != 0) { |
- if ((feedback & kSignedRangeBit) == 0) { |
- return kUint32Range; |
- } |
- |
- // Check if Smi is large enough to accomodate Int33: a mixture of Uint32 |
- // and negative Int32 values. |
- return (kSmiBits < 33) ? kInt64Range : kSmiRange; |
- } |
- |
- if ((feedback & kInt32RangeBit) != 0) { |
- return kInt32Range; |
- } |
- |
- return kSmiRange; |
-} |
- |
- |
Code::Comments& Code::Comments::New(intptr_t count) { |
Comments* comments; |
if (count < 0 || count > (kIntptrMax / kNumberOfEntries)) { |