| 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 2035 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2046 | 2046 |
| 2047 LInstruction* LChunkBuilder::DoReturn(HReturn* instr) { | 2047 LInstruction* LChunkBuilder::DoReturn(HReturn* instr) { |
| 2048 LOperand* parameter_count = UseRegisterOrConstant(instr->parameter_count()); | 2048 LOperand* parameter_count = UseRegisterOrConstant(instr->parameter_count()); |
| 2049 return new(zone()) LReturn(UseFixed(instr->value(), r0), | 2049 return new(zone()) LReturn(UseFixed(instr->value(), r0), |
| 2050 parameter_count); | 2050 parameter_count); |
| 2051 } | 2051 } |
| 2052 | 2052 |
| 2053 | 2053 |
| 2054 LInstruction* LChunkBuilder::DoConstant(HConstant* instr) { | 2054 LInstruction* LChunkBuilder::DoConstant(HConstant* instr) { |
| 2055 Representation r = instr->representation(); | 2055 Representation r = instr->representation(); |
| 2056 if (r.IsInteger32()) { | 2056 if (r.IsSmi()) { |
| 2057 return DefineAsRegister(new(zone()) LConstantS); |
| 2058 } else if (r.IsInteger32()) { |
| 2057 return DefineAsRegister(new(zone()) LConstantI); | 2059 return DefineAsRegister(new(zone()) LConstantI); |
| 2058 } else if (r.IsDouble()) { | 2060 } else if (r.IsDouble()) { |
| 2059 return DefineAsRegister(new(zone()) LConstantD); | 2061 return DefineAsRegister(new(zone()) LConstantD); |
| 2060 } else if (r.IsSmiOrTagged()) { | 2062 } else if (r.IsTagged()) { |
| 2061 return DefineAsRegister(new(zone()) LConstantT); | 2063 return DefineAsRegister(new(zone()) LConstantT); |
| 2062 } else { | 2064 } else { |
| 2063 UNREACHABLE(); | 2065 UNREACHABLE(); |
| 2064 return NULL; | 2066 return NULL; |
| 2065 } | 2067 } |
| 2066 } | 2068 } |
| 2067 | 2069 |
| 2068 | 2070 |
| 2069 LInstruction* LChunkBuilder::DoLoadGlobalCell(HLoadGlobalCell* instr) { | 2071 LInstruction* LChunkBuilder::DoLoadGlobalCell(HLoadGlobalCell* instr) { |
| 2070 LLoadGlobalCell* result = new(zone()) LLoadGlobalCell; | 2072 LLoadGlobalCell* result = new(zone()) LLoadGlobalCell; |
| (...skipping 553 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2624 | 2626 |
| 2625 | 2627 |
| 2626 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { | 2628 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { |
| 2627 LOperand* object = UseRegister(instr->object()); | 2629 LOperand* object = UseRegister(instr->object()); |
| 2628 LOperand* index = UseRegister(instr->index()); | 2630 LOperand* index = UseRegister(instr->index()); |
| 2629 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index)); | 2631 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index)); |
| 2630 } | 2632 } |
| 2631 | 2633 |
| 2632 | 2634 |
| 2633 } } // namespace v8::internal | 2635 } } // namespace v8::internal |
| OLD | NEW |