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

Unified Diff: runtime/vm/intermediate_language.cc

Issue 1859273002: Add flag to disable string externalization (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 8 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/jit_optimizer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
}
« no previous file with comments | « runtime/vm/intermediate_language.h ('k') | runtime/vm/jit_optimizer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698