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_X64 | 9 #if V8_TARGET_ARCH_X64 |
10 | 10 |
(...skipping 2032 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2043 } | 2043 } |
2044 | 2044 |
2045 | 2045 |
2046 LInstruction* LChunkBuilder::DoConstant(HConstant* instr) { | 2046 LInstruction* LChunkBuilder::DoConstant(HConstant* instr) { |
2047 Representation r = instr->representation(); | 2047 Representation r = instr->representation(); |
2048 if (r.IsSmi()) { | 2048 if (r.IsSmi()) { |
2049 return DefineAsRegister(new(zone()) LConstantS); | 2049 return DefineAsRegister(new(zone()) LConstantS); |
2050 } else if (r.IsInteger32()) { | 2050 } else if (r.IsInteger32()) { |
2051 return DefineAsRegister(new(zone()) LConstantI); | 2051 return DefineAsRegister(new(zone()) LConstantI); |
2052 } else if (r.IsDouble()) { | 2052 } else if (r.IsDouble()) { |
2053 LOperand* temp = TempRegister(); | 2053 return DefineAsRegister(new (zone()) LConstantD); |
2054 return DefineAsRegister(new(zone()) LConstantD(temp)); | |
2055 } else if (r.IsExternal()) { | 2054 } else if (r.IsExternal()) { |
2056 return DefineAsRegister(new(zone()) LConstantE); | 2055 return DefineAsRegister(new(zone()) LConstantE); |
2057 } else if (r.IsTagged()) { | 2056 } else if (r.IsTagged()) { |
2058 return DefineAsRegister(new(zone()) LConstantT); | 2057 return DefineAsRegister(new(zone()) LConstantT); |
2059 } else { | 2058 } else { |
2060 UNREACHABLE(); | 2059 UNREACHABLE(); |
2061 return NULL; | 2060 return NULL; |
2062 } | 2061 } |
2063 } | 2062 } |
2064 | 2063 |
(...skipping 626 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2691 LOperand* function = UseRegisterAtStart(instr->function()); | 2690 LOperand* function = UseRegisterAtStart(instr->function()); |
2692 LAllocateBlockContext* result = | 2691 LAllocateBlockContext* result = |
2693 new(zone()) LAllocateBlockContext(context, function); | 2692 new(zone()) LAllocateBlockContext(context, function); |
2694 return MarkAsCall(DefineFixed(result, rsi), instr); | 2693 return MarkAsCall(DefineFixed(result, rsi), instr); |
2695 } | 2694 } |
2696 | 2695 |
2697 | 2696 |
2698 } } // namespace v8::internal | 2697 } } // namespace v8::internal |
2699 | 2698 |
2700 #endif // V8_TARGET_ARCH_X64 | 2699 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |