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

Unified Diff: runtime/vm/constant_propagator.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 | « no previous file | runtime/vm/dart_api_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/constant_propagator.cc
diff --git a/runtime/vm/constant_propagator.cc b/runtime/vm/constant_propagator.cc
index 03ab8ae7c39aaac71cd94b8d91ebd85cd255fbc0..b8e7c2a014b43ec2cbdcafdc657cb151f82b5579 100644
--- a/runtime/vm/constant_propagator.cc
+++ b/runtime/vm/constant_propagator.cc
@@ -323,7 +323,7 @@ void ConstantPropagator::VisitRedefinition(RedefinitionInstr* instr) {
// class ids. Otherwise LICM might potentially hoist incorrect code.
const Object& value = instr->value()->definition()->constant_value();
if (IsConstant(value) &&
- CheckClassInstr::IsImmutableClassId(value.GetClassId())) {
+ !Field::IsExternalizableCid(value.GetClassId())) {
SetValue(instr, value);
} else {
SetValue(instr, non_constant_);
@@ -805,7 +805,7 @@ void ConstantPropagator::VisitLoadClassId(LoadClassIdInstr* instr) {
const Object& object = instr->object()->definition()->constant_value();
if (IsConstant(object)) {
cid = object.GetClassId();
- if (CheckClassInstr::IsImmutableClassId(cid)) {
+ if (!Field::IsExternalizableCid(cid)) {
SetValue(instr, Smi::ZoneHandle(Z, Smi::New(cid)));
return;
}
« no previous file with comments | « no previous file | runtime/vm/dart_api_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698