Index: runtime/vm/intermediate_language.cc |
diff --git a/runtime/vm/intermediate_language.cc b/runtime/vm/intermediate_language.cc |
index 5b5ac04d502a2b9096de257f0f69903968046088..21a2e63632bfd7d9907be726be49fe0c9c5550fe 100644 |
--- a/runtime/vm/intermediate_language.cc |
+++ b/runtime/vm/intermediate_language.cc |
@@ -36,6 +36,7 @@ DEFINE_FLAG(bool, two_args_smi_icd, true, |
DEFINE_FLAG(bool, unbox_numeric_fields, true, |
"Support unboxed double and float32x4 fields."); |
DECLARE_FLAG(bool, eliminate_type_checks); |
+DECLARE_FLAG(bool, support_externalizable_strings); |
#if defined(DEBUG) |
@@ -169,22 +170,11 @@ bool CheckClassInstr::AttributesEqual(Instruction* other) const { |
} |
-bool CheckClassInstr::IsImmutableClassId(intptr_t cid) { |
- switch (cid) { |
- case kOneByteStringCid: |
- case kTwoByteStringCid: |
- return false; |
- default: |
- return true; |
- } |
-} |
- |
- |
static bool AreAllChecksImmutable(const ICData& checks) { |
const intptr_t len = checks.NumberOfChecks(); |
for (intptr_t i = 0; i < len; i++) { |
if (checks.IsUsedAt(i)) { |
- if (!CheckClassInstr::IsImmutableClassId( |
+ if (Field::IsExternalizableCid( |
checks.GetReceiverClassIdAt(i))) { |
return false; |
} |
@@ -203,7 +193,7 @@ EffectSet CheckClassInstr::Dependencies() const { |
EffectSet CheckClassIdInstr::Dependencies() const { |
// Externalization of strings via the API can change the class-id. |
- return !CheckClassInstr::IsImmutableClassId(cid_) ? |
+ return Field::IsExternalizableCid(cid_) ? |
EffectSet::Externalization() : EffectSet::None(); |
} |