| Index: src/ia32/lithium-codegen-ia32.cc
|
| diff --git a/src/ia32/lithium-codegen-ia32.cc b/src/ia32/lithium-codegen-ia32.cc
|
| index fb3c05ebab4f956655196bc728be25ef3d9038ea..4bed05280847f04382459659658edd0af8970004 100644
|
| --- a/src/ia32/lithium-codegen-ia32.cc
|
| +++ b/src/ia32/lithium-codegen-ia32.cc
|
| @@ -541,6 +541,10 @@ int32_t LCodeGen::ToInteger32(LConstantOperand* op) const {
|
| int32_t LCodeGen::ToRepresentation(LConstantOperand* op,
|
| const Representation& r) const {
|
| HConstant* constant = chunk_->LookupConstant(op);
|
| + if (r.IsExternal()) {
|
| + return reinterpret_cast<int32_t>(
|
| + constant->ExternalReferenceValue().address());
|
| + }
|
| int32_t value = constant->Integer32Value();
|
| if (r.IsInteger32()) return value;
|
| DCHECK(r.IsSmiOrTagged());
|
| @@ -4087,7 +4091,7 @@ void LCodeGen::DoStoreNamedField(LStoreNamedField* instr) {
|
| if (operand_value->IsRegister()) {
|
| Register value = ToRegister(operand_value);
|
| __ Store(value, operand, representation);
|
| - } else if (representation.IsInteger32()) {
|
| + } else if (representation.IsInteger32() || representation.IsExternal()) {
|
| Immediate immediate = ToImmediate(operand_value, representation);
|
| DCHECK(!instr->hydrogen()->NeedsWriteBarrier());
|
| __ mov(operand, immediate);
|
|
|