| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include <sstream> | 5 #include <sstream> |
| 6 | 6 |
| 7 #include "src/v8.h" | 7 #include "src/v8.h" |
| 8 | 8 |
| 9 #if V8_TARGET_ARCH_IA32 | 9 #if V8_TARGET_ARCH_IA32 |
| 10 | 10 |
| (...skipping 2175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2186 } | 2186 } |
| 2187 LInstruction* result = new(zone()) LStoreContextSlot(context, value, temp); | 2187 LInstruction* result = new(zone()) LStoreContextSlot(context, value, temp); |
| 2188 if (instr->RequiresHoleCheck() && instr->DeoptimizesOnHole()) { | 2188 if (instr->RequiresHoleCheck() && instr->DeoptimizesOnHole()) { |
| 2189 result = AssignEnvironment(result); | 2189 result = AssignEnvironment(result); |
| 2190 } | 2190 } |
| 2191 return result; | 2191 return result; |
| 2192 } | 2192 } |
| 2193 | 2193 |
| 2194 | 2194 |
| 2195 LInstruction* LChunkBuilder::DoLoadNamedField(HLoadNamedField* instr) { | 2195 LInstruction* LChunkBuilder::DoLoadNamedField(HLoadNamedField* instr) { |
| 2196 LOperand* obj = (instr->access().IsExternalMemory() && | 2196 LOperand* obj; |
| 2197 instr->access().offset() == 0) | 2197 if (instr->access().read_barrier()) { |
| 2198 ? UseRegisterOrConstantAtStart(instr->object()) | 2198 DCHECK(!instr->access().IsExternalMemory()); |
| 2199 : UseRegisterAtStart(instr->object()); | 2199 obj = UseRegister(instr->object()); |
| 2200 } else { |
| 2201 // With no read barrier we can have the same register for the object and |
| 2202 // the field. |
| 2203 obj = (instr->access().IsExternalMemory() && instr->access().offset() == 0) |
| 2204 ? UseRegisterOrConstantAtStart(instr->object()) |
| 2205 : UseRegisterAtStart(instr->object()); |
| 2206 } |
| 2200 return DefineAsRegister(new(zone()) LLoadNamedField(obj)); | 2207 return DefineAsRegister(new(zone()) LLoadNamedField(obj)); |
| 2201 } | 2208 } |
| 2202 | 2209 |
| 2203 | 2210 |
| 2204 LInstruction* LChunkBuilder::DoLoadNamedGeneric(HLoadNamedGeneric* instr) { | 2211 LInstruction* LChunkBuilder::DoLoadNamedGeneric(HLoadNamedGeneric* instr) { |
| 2205 LOperand* context = UseFixed(instr->context(), esi); | 2212 LOperand* context = UseFixed(instr->context(), esi); |
| 2206 LOperand* object = | 2213 LOperand* object = |
| 2207 UseFixed(instr->object(), LoadDescriptor::ReceiverRegister()); | 2214 UseFixed(instr->object(), LoadDescriptor::ReceiverRegister()); |
| 2208 LOperand* vector = NULL; | 2215 LOperand* vector = NULL; |
| 2209 if (instr->HasVectorAndSlot()) { | 2216 if (instr->HasVectorAndSlot()) { |
| (...skipping 525 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2735 LOperand* function = UseRegisterAtStart(instr->function()); | 2742 LOperand* function = UseRegisterAtStart(instr->function()); |
| 2736 LAllocateBlockContext* result = | 2743 LAllocateBlockContext* result = |
| 2737 new(zone()) LAllocateBlockContext(context, function); | 2744 new(zone()) LAllocateBlockContext(context, function); |
| 2738 return MarkAsCall(DefineFixed(result, esi), instr); | 2745 return MarkAsCall(DefineFixed(result, esi), instr); |
| 2739 } | 2746 } |
| 2740 | 2747 |
| 2741 | 2748 |
| 2742 } } // namespace v8::internal | 2749 } } // namespace v8::internal |
| 2743 | 2750 |
| 2744 #endif // V8_TARGET_ARCH_IA32 | 2751 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |