OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 2118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2129 Representation r = instr->representation(); | 2129 Representation r = instr->representation(); |
2130 if (r.IsSmi()) { | 2130 if (r.IsSmi()) { |
2131 return DefineAsRegister(new(zone()) LConstantS); | 2131 return DefineAsRegister(new(zone()) LConstantS); |
2132 } else if (r.IsInteger32()) { | 2132 } else if (r.IsInteger32()) { |
2133 return DefineAsRegister(new(zone()) LConstantI); | 2133 return DefineAsRegister(new(zone()) LConstantI); |
2134 } else if (r.IsDouble()) { | 2134 } else if (r.IsDouble()) { |
2135 double value = instr->DoubleValue(); | 2135 double value = instr->DoubleValue(); |
2136 bool value_is_zero = BitCast<uint64_t, double>(value) == 0; | 2136 bool value_is_zero = BitCast<uint64_t, double>(value) == 0; |
2137 LOperand* temp = value_is_zero ? NULL : TempRegister(); | 2137 LOperand* temp = value_is_zero ? NULL : TempRegister(); |
2138 return DefineAsRegister(new(zone()) LConstantD(temp)); | 2138 return DefineAsRegister(new(zone()) LConstantD(temp)); |
| 2139 } else if (r.IsExternal()) { |
| 2140 return DefineAsRegister(new(zone()) LConstantE); |
2139 } else if (r.IsTagged()) { | 2141 } else if (r.IsTagged()) { |
2140 return DefineAsRegister(new(zone()) LConstantT); | 2142 return DefineAsRegister(new(zone()) LConstantT); |
2141 } else { | 2143 } else { |
2142 UNREACHABLE(); | 2144 UNREACHABLE(); |
2143 return NULL; | 2145 return NULL; |
2144 } | 2146 } |
2145 } | 2147 } |
2146 | 2148 |
2147 | 2149 |
2148 LInstruction* LChunkBuilder::DoLoadGlobalCell(HLoadGlobalCell* instr) { | 2150 LInstruction* LChunkBuilder::DoLoadGlobalCell(HLoadGlobalCell* instr) { |
(...skipping 616 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2765 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { | 2767 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { |
2766 LOperand* object = UseRegister(instr->object()); | 2768 LOperand* object = UseRegister(instr->object()); |
2767 LOperand* index = UseTempRegister(instr->index()); | 2769 LOperand* index = UseTempRegister(instr->index()); |
2768 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); | 2770 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); |
2769 } | 2771 } |
2770 | 2772 |
2771 | 2773 |
2772 } } // namespace v8::internal | 2774 } } // namespace v8::internal |
2773 | 2775 |
2774 #endif // V8_TARGET_ARCH_IA32 | 2776 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |