| Index: src/x64/lithium-x64.cc
|
| diff --git a/src/x64/lithium-x64.cc b/src/x64/lithium-x64.cc
|
| index 9c6efed3d2f57ea37a8a1ed37aaeb5be97c8918c..4153417473e24e4dfc2d915799b294dc3c4413d5 100644
|
| --- a/src/x64/lithium-x64.cc
|
| +++ b/src/x64/lithium-x64.cc
|
| @@ -1997,6 +1997,8 @@ LInstruction* LChunkBuilder::DoConstant(HConstant* instr) {
|
| } else if (r.IsDouble()) {
|
| LOperand* temp = TempRegister();
|
| return DefineAsRegister(new(zone()) LConstantD(temp));
|
| + } else if (r.IsExternal()) {
|
| + return DefineAsRegister(new(zone()) LConstantE);
|
| } else if (r.IsTagged()) {
|
| return DefineAsRegister(new(zone()) LConstantT);
|
| } else {
|
| @@ -2074,6 +2076,10 @@ LInstruction* LChunkBuilder::DoStoreContextSlot(HStoreContextSlot* instr) {
|
|
|
|
|
| LInstruction* LChunkBuilder::DoLoadNamedField(HLoadNamedField* instr) {
|
| + if (instr->access().IsExternalMemory() && instr->access().offset() == 0) {
|
| + LOperand* obj = UseRegisterOrConstantAtStart(instr->object());
|
| + return DefineFixed(new(zone()) LLoadNamedField(obj), rax);
|
| + }
|
| LOperand* obj = UseRegisterAtStart(instr->object());
|
| return DefineAsRegister(new(zone()) LLoadNamedField(obj));
|
| }
|
| @@ -2249,6 +2255,8 @@ LInstruction* LChunkBuilder::DoTrapAllocationMemento(
|
|
|
| LInstruction* LChunkBuilder::DoStoreNamedField(HStoreNamedField* instr) {
|
| bool is_in_object = instr->access().IsInobject();
|
| + bool is_external_location = instr->access().IsExternalMemory() &&
|
| + instr->access().offset() == 0;
|
| bool needs_write_barrier = instr->NeedsWriteBarrier();
|
| bool needs_write_barrier_for_map = !instr->transition().is_null() &&
|
| instr->NeedsWriteBarrierForMap();
|
| @@ -2258,6 +2266,11 @@ LInstruction* LChunkBuilder::DoStoreNamedField(HStoreNamedField* instr) {
|
| obj = is_in_object
|
| ? UseRegister(instr->object())
|
| : UseTempRegister(instr->object());
|
| + } else if (is_external_location) {
|
| + ASSERT(!is_in_object);
|
| + ASSERT(!needs_write_barrier);
|
| + ASSERT(!needs_write_barrier_for_map);
|
| + obj = UseRegisterOrConstant(instr->object());
|
| } else {
|
| obj = needs_write_barrier_for_map
|
| ? UseRegister(instr->object())
|
| @@ -2271,6 +2284,8 @@ LInstruction* LChunkBuilder::DoStoreNamedField(HStoreNamedField* instr) {
|
| LOperand* val;
|
| if (needs_write_barrier) {
|
| val = UseTempRegister(instr->value());
|
| + } else if (is_external_location) {
|
| + val = UseFixed(instr->value(), rax);
|
| } else if (can_be_constant) {
|
| val = UseRegisterOrConstant(instr->value());
|
| } else if (FLAG_track_fields && instr->field_representation().IsSmi()) {
|
|
|