| 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_);
|
| }
|
|
|