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

Unified Diff: runtime/vm/constant_propagator.cc

Issue 2997173002: [vm] Remove Dart_MakeExternalString and --support-externalizable-strings (Closed)
Patch Set: Update vm.status Created 3 years, 4 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
Index: runtime/vm/constant_propagator.cc
diff --git a/runtime/vm/constant_propagator.cc b/runtime/vm/constant_propagator.cc
index 7fe14fa89105a9f36baee0e0ee85317943376d2a..046cc5d05c0c346ebf34fee11d616f465e5fe28b 100644
--- a/runtime/vm/constant_propagator.cc
+++ b/runtime/vm/constant_propagator.cc
@@ -289,11 +289,8 @@ void ConstantPropagator::VisitPhi(PhiInstr* instr) {
}
void ConstantPropagator::VisitRedefinition(RedefinitionInstr* instr) {
- // Ensure that we never remove redefinition of a constant unless we are also
- // are guaranteed to fold away code paths that correspond to non-matching
- // class ids. Otherwise LICM might potentially hoist incorrect code.
const Object& value = instr->value()->definition()->constant_value();
- if (IsConstant(value) && !Field::IsExternalizableCid(value.GetClassId())) {
+ if (IsConstant(value)) {
SetValue(instr, value);
} else {
SetValue(instr, non_constant_);
@@ -736,10 +733,8 @@ void ConstantPropagator::VisitLoadClassId(LoadClassIdInstr* instr) {
const Object& object = instr->object()->definition()->constant_value();
if (IsConstant(object)) {
cid = object.GetClassId();
- if (!Field::IsExternalizableCid(cid)) {
- SetValue(instr, Smi::ZoneHandle(Z, Smi::New(cid)));
- return;
- }
+ SetValue(instr, Smi::ZoneHandle(Z, Smi::New(cid)));
+ return;
}
SetValue(instr, non_constant_);
}

Powered by Google App Engine
This is Rietveld 408576698