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 "src/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #if V8_TARGET_ARCH_X87 | 7 #if V8_TARGET_ARCH_X87 |
8 | 8 |
9 #include "src/hydrogen-osr.h" | 9 #include "src/hydrogen-osr.h" |
10 #include "src/lithium-inl.h" | 10 #include "src/lithium-inl.h" |
(...skipping 2371 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2382 LOperand* val; | 2382 LOperand* val; |
2383 if (instr->field_representation().IsInteger8() || | 2383 if (instr->field_representation().IsInteger8() || |
2384 instr->field_representation().IsUInteger8()) { | 2384 instr->field_representation().IsUInteger8()) { |
2385 // mov_b requires a byte register (i.e. any of eax, ebx, ecx, edx). | 2385 // mov_b requires a byte register (i.e. any of eax, ebx, ecx, edx). |
2386 // Just force the value to be in eax and we're safe here. | 2386 // Just force the value to be in eax and we're safe here. |
2387 val = UseFixed(instr->value(), eax); | 2387 val = UseFixed(instr->value(), eax); |
2388 } else if (needs_write_barrier) { | 2388 } else if (needs_write_barrier) { |
2389 val = UseTempRegister(instr->value()); | 2389 val = UseTempRegister(instr->value()); |
2390 } else if (can_be_constant) { | 2390 } else if (can_be_constant) { |
2391 val = UseRegisterOrConstant(instr->value()); | 2391 val = UseRegisterOrConstant(instr->value()); |
2392 } else if (instr->field_representation().IsSmi()) { | |
2393 val = UseTempRegister(instr->value()); | |
2394 } else if (instr->field_representation().IsDouble()) { | 2392 } else if (instr->field_representation().IsDouble()) { |
2395 val = UseRegisterAtStart(instr->value()); | 2393 val = UseRegisterAtStart(instr->value()); |
2396 } else { | 2394 } else { |
2397 val = UseRegister(instr->value()); | 2395 val = UseRegister(instr->value()); |
2398 } | 2396 } |
2399 | 2397 |
2400 // We only need a scratch register if we have a write barrier or we | 2398 // We only need a scratch register if we have a write barrier or we |
2401 // have a store into the properties array (not in-object-property). | 2399 // have a store into the properties array (not in-object-property). |
2402 LOperand* temp = (!is_in_object || needs_write_barrier || | 2400 LOperand* temp = (!is_in_object || needs_write_barrier || |
2403 needs_write_barrier_for_map) ? TempRegister() : NULL; | 2401 needs_write_barrier_for_map) ? TempRegister() : NULL; |
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2690 LOperand* function = UseRegisterAtStart(instr->function()); | 2688 LOperand* function = UseRegisterAtStart(instr->function()); |
2691 LAllocateBlockContext* result = | 2689 LAllocateBlockContext* result = |
2692 new(zone()) LAllocateBlockContext(context, function); | 2690 new(zone()) LAllocateBlockContext(context, function); |
2693 return MarkAsCall(DefineFixed(result, esi), instr); | 2691 return MarkAsCall(DefineFixed(result, esi), instr); |
2694 } | 2692 } |
2695 | 2693 |
2696 | 2694 |
2697 } } // namespace v8::internal | 2695 } } // namespace v8::internal |
2698 | 2696 |
2699 #endif // V8_TARGET_ARCH_X87 | 2697 #endif // V8_TARGET_ARCH_X87 |
OLD | NEW |