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_X64 | 7 #if V8_TARGET_ARCH_X64 |
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 2380 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2391 HConstant::cast(instr->value())->NotInNewSpace() && | 2391 HConstant::cast(instr->value())->NotInNewSpace() && |
2392 !instr->field_representation().IsDouble(); | 2392 !instr->field_representation().IsDouble(); |
2393 | 2393 |
2394 LOperand* val; | 2394 LOperand* val; |
2395 if (needs_write_barrier) { | 2395 if (needs_write_barrier) { |
2396 val = UseTempRegister(instr->value()); | 2396 val = UseTempRegister(instr->value()); |
2397 } else if (is_external_location) { | 2397 } else if (is_external_location) { |
2398 val = UseFixed(instr->value(), rax); | 2398 val = UseFixed(instr->value(), rax); |
2399 } else if (can_be_constant) { | 2399 } else if (can_be_constant) { |
2400 val = UseRegisterOrConstant(instr->value()); | 2400 val = UseRegisterOrConstant(instr->value()); |
2401 } else if (instr->field_representation().IsSmi()) { | |
2402 val = UseRegister(instr->value()); | |
2403 } else if (instr->field_representation().IsDouble()) { | 2401 } else if (instr->field_representation().IsDouble()) { |
2404 val = UseRegisterAtStart(instr->value()); | 2402 val = UseRegisterAtStart(instr->value()); |
2405 } else { | 2403 } else { |
2406 val = UseRegister(instr->value()); | 2404 val = UseRegister(instr->value()); |
2407 } | 2405 } |
2408 | 2406 |
2409 // We only need a scratch register if we have a write barrier or we | 2407 // We only need a scratch register if we have a write barrier or we |
2410 // have a store into the properties array (not in-object-property). | 2408 // have a store into the properties array (not in-object-property). |
2411 LOperand* temp = (!is_in_object || needs_write_barrier || | 2409 LOperand* temp = (!is_in_object || needs_write_barrier || |
2412 needs_write_barrier_for_map) ? TempRegister() : NULL; | 2410 needs_write_barrier_for_map) ? TempRegister() : NULL; |
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2692 LOperand* function = UseRegisterAtStart(instr->function()); | 2690 LOperand* function = UseRegisterAtStart(instr->function()); |
2693 LAllocateBlockContext* result = | 2691 LAllocateBlockContext* result = |
2694 new(zone()) LAllocateBlockContext(context, function); | 2692 new(zone()) LAllocateBlockContext(context, function); |
2695 return MarkAsCall(DefineFixed(result, rsi), instr); | 2693 return MarkAsCall(DefineFixed(result, rsi), instr); |
2696 } | 2694 } |
2697 | 2695 |
2698 | 2696 |
2699 } } // namespace v8::internal | 2697 } } // namespace v8::internal |
2700 | 2698 |
2701 #endif // V8_TARGET_ARCH_X64 | 2699 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |