| 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 2153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2164 } | 2164 } |
| 2165 LInstruction* result = new(zone()) LStoreContextSlot(context, value, temp); | 2165 LInstruction* result = new(zone()) LStoreContextSlot(context, value, temp); |
| 2166 if (instr->RequiresHoleCheck() && instr->DeoptimizesOnHole()) { | 2166 if (instr->RequiresHoleCheck() && instr->DeoptimizesOnHole()) { |
| 2167 result = AssignEnvironment(result); | 2167 result = AssignEnvironment(result); |
| 2168 } | 2168 } |
| 2169 return result; | 2169 return result; |
| 2170 } | 2170 } |
| 2171 | 2171 |
| 2172 | 2172 |
| 2173 LInstruction* LChunkBuilder::DoLoadNamedField(HLoadNamedField* instr) { | 2173 LInstruction* LChunkBuilder::DoLoadNamedField(HLoadNamedField* instr) { |
| 2174 LOperand* obj = (instr->access().IsExternalMemory() && | 2174 LOperand* obj; |
| 2175 instr->access().offset() == 0) | 2175 if (instr->access().read_barrier()) { |
| 2176 ? UseRegisterOrConstantAtStart(instr->object()) | 2176 DCHECK(!instr->access().IsExternalMemory()); |
| 2177 : UseRegisterAtStart(instr->object()); | 2177 obj = UseRegister(instr->object()); |
| 2178 } else { |
| 2179 // With no read barrier we can have the same register for the object and |
| 2180 // the field. |
| 2181 obj = (instr->access().IsExternalMemory() && instr->access().offset() == 0) |
| 2182 ? UseRegisterOrConstantAtStart(instr->object()) |
| 2183 : UseRegisterAtStart(instr->object()); |
| 2184 } |
| 2178 return DefineAsRegister(new(zone()) LLoadNamedField(obj)); | 2185 return DefineAsRegister(new(zone()) LLoadNamedField(obj)); |
| 2179 } | 2186 } |
| 2180 | 2187 |
| 2181 | 2188 |
| 2182 LInstruction* LChunkBuilder::DoLoadNamedGeneric(HLoadNamedGeneric* instr) { | 2189 LInstruction* LChunkBuilder::DoLoadNamedGeneric(HLoadNamedGeneric* instr) { |
| 2183 LOperand* context = UseFixed(instr->context(), esi); | 2190 LOperand* context = UseFixed(instr->context(), esi); |
| 2184 LOperand* object = | 2191 LOperand* object = |
| 2185 UseFixed(instr->object(), LoadDescriptor::ReceiverRegister()); | 2192 UseFixed(instr->object(), LoadDescriptor::ReceiverRegister()); |
| 2186 LOperand* vector = NULL; | 2193 LOperand* vector = NULL; |
| 2187 if (instr->HasVectorAndSlot()) { | 2194 if (instr->HasVectorAndSlot()) { |
| (...skipping 525 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2713 LOperand* function = UseRegisterAtStart(instr->function()); | 2720 LOperand* function = UseRegisterAtStart(instr->function()); |
| 2714 LAllocateBlockContext* result = | 2721 LAllocateBlockContext* result = |
| 2715 new(zone()) LAllocateBlockContext(context, function); | 2722 new(zone()) LAllocateBlockContext(context, function); |
| 2716 return MarkAsCall(DefineFixed(result, esi), instr); | 2723 return MarkAsCall(DefineFixed(result, esi), instr); |
| 2717 } | 2724 } |
| 2718 | 2725 |
| 2719 | 2726 |
| 2720 } } // namespace v8::internal | 2727 } } // namespace v8::internal |
| 2721 | 2728 |
| 2722 #endif // V8_TARGET_ARCH_IA32 | 2729 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |