| Index: runtime/vm/intermediate_language_ia32.cc
|
| diff --git a/runtime/vm/intermediate_language_ia32.cc b/runtime/vm/intermediate_language_ia32.cc
|
| index 62d8bef02cce1a8e1cb43ff90512e15ebc583680..e0bfb7f48534340d1b489a42a927445e74f2453b 100644
|
| --- a/runtime/vm/intermediate_language_ia32.cc
|
| +++ b/runtime/vm/intermediate_language_ia32.cc
|
| @@ -151,15 +151,19 @@ LocationSummary* ConstantInstr::MakeLocationSummary(Zone* zone,
|
| const intptr_t kNumInputs = 0;
|
| return LocationSummary::Make(zone,
|
| kNumInputs,
|
| - Location::RequiresRegister(),
|
| + Assembler::IsSafe(value())
|
| + ? Location::Constant(this)
|
| + : Location::RequiresRegister(),
|
| LocationSummary::kNoCall);
|
| }
|
|
|
|
|
| void ConstantInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| // The register allocator drops constant definitions that have no uses.
|
| - if (!locs()->out(0).IsInvalid()) {
|
| - Register result = locs()->out(0).reg();
|
| + Location out = locs()->out(0);
|
| + ASSERT(out.IsRegister() || out.IsConstant() || out.IsInvalid());
|
| + if (out.IsRegister()) {
|
| + Register result = out.reg();
|
| __ LoadObjectSafely(result, value());
|
| }
|
| }
|
|
|