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_IA32 | 7 #if V8_TARGET_ARCH_IA32 |
8 | 8 |
9 #include "src/hydrogen-osr.h" | 9 #include "src/hydrogen-osr.h" |
10 #include "src/ia32/lithium-codegen-ia32.h" | 10 #include "src/ia32/lithium-codegen-ia32.h" |
(...skipping 2064 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2075 | 2075 |
2076 | 2076 |
2077 LInstruction* LChunkBuilder::DoConstant(HConstant* instr) { | 2077 LInstruction* LChunkBuilder::DoConstant(HConstant* instr) { |
2078 Representation r = instr->representation(); | 2078 Representation r = instr->representation(); |
2079 if (r.IsSmi()) { | 2079 if (r.IsSmi()) { |
2080 return DefineAsRegister(new(zone()) LConstantS); | 2080 return DefineAsRegister(new(zone()) LConstantS); |
2081 } else if (r.IsInteger32()) { | 2081 } else if (r.IsInteger32()) { |
2082 return DefineAsRegister(new(zone()) LConstantI); | 2082 return DefineAsRegister(new(zone()) LConstantI); |
2083 } else if (r.IsDouble()) { | 2083 } else if (r.IsDouble()) { |
2084 double value = instr->DoubleValue(); | 2084 double value = instr->DoubleValue(); |
2085 bool value_is_zero = BitCast<uint64_t, double>(value) == 0; | 2085 bool value_is_zero = bit_cast<uint64_t, double>(value) == 0; |
2086 LOperand* temp = value_is_zero ? NULL : TempRegister(); | 2086 LOperand* temp = value_is_zero ? NULL : TempRegister(); |
2087 return DefineAsRegister(new(zone()) LConstantD(temp)); | 2087 return DefineAsRegister(new(zone()) LConstantD(temp)); |
2088 } else if (r.IsExternal()) { | 2088 } else if (r.IsExternal()) { |
2089 return DefineAsRegister(new(zone()) LConstantE); | 2089 return DefineAsRegister(new(zone()) LConstantE); |
2090 } else if (r.IsTagged()) { | 2090 } else if (r.IsTagged()) { |
2091 return DefineAsRegister(new(zone()) LConstantT); | 2091 return DefineAsRegister(new(zone()) LConstantT); |
2092 } else { | 2092 } else { |
2093 UNREACHABLE(); | 2093 UNREACHABLE(); |
2094 return NULL; | 2094 return NULL; |
2095 } | 2095 } |
(...skipping 605 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2701 LOperand* function = UseRegisterAtStart(instr->function()); | 2701 LOperand* function = UseRegisterAtStart(instr->function()); |
2702 LAllocateBlockContext* result = | 2702 LAllocateBlockContext* result = |
2703 new(zone()) LAllocateBlockContext(context, function); | 2703 new(zone()) LAllocateBlockContext(context, function); |
2704 return MarkAsCall(DefineFixed(result, esi), instr); | 2704 return MarkAsCall(DefineFixed(result, esi), instr); |
2705 } | 2705 } |
2706 | 2706 |
2707 | 2707 |
2708 } } // namespace v8::internal | 2708 } } // namespace v8::internal |
2709 | 2709 |
2710 #endif // V8_TARGET_ARCH_IA32 | 2710 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |