| 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 1951 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1962 | 1962 |
| 1963 LInstruction* LChunkBuilder::DoReturn(HReturn* instr) { | 1963 LInstruction* LChunkBuilder::DoReturn(HReturn* instr) { |
| 1964 LOperand* parameter_count = UseRegisterOrConstant(instr->parameter_count()); | 1964 LOperand* parameter_count = UseRegisterOrConstant(instr->parameter_count()); |
| 1965 return new(zone()) LReturn(UseFixed(instr->value(), rax), | 1965 return new(zone()) LReturn(UseFixed(instr->value(), rax), |
| 1966 parameter_count); | 1966 parameter_count); |
| 1967 } | 1967 } |
| 1968 | 1968 |
| 1969 | 1969 |
| 1970 LInstruction* LChunkBuilder::DoConstant(HConstant* instr) { | 1970 LInstruction* LChunkBuilder::DoConstant(HConstant* instr) { |
| 1971 Representation r = instr->representation(); | 1971 Representation r = instr->representation(); |
| 1972 if (r.IsInteger32()) { | 1972 if (r.IsSmi()) { |
| 1973 return DefineAsRegister(new(zone()) LConstantS); |
| 1974 } else if (r.IsInteger32()) { |
| 1973 return DefineAsRegister(new(zone()) LConstantI); | 1975 return DefineAsRegister(new(zone()) LConstantI); |
| 1974 } else if (r.IsDouble()) { | 1976 } else if (r.IsDouble()) { |
| 1975 LOperand* temp = TempRegister(); | 1977 LOperand* temp = TempRegister(); |
| 1976 return DefineAsRegister(new(zone()) LConstantD(temp)); | 1978 return DefineAsRegister(new(zone()) LConstantD(temp)); |
| 1977 } else if (r.IsSmiOrTagged()) { | 1979 } else if (r.IsTagged()) { |
| 1978 return DefineAsRegister(new(zone()) LConstantT); | 1980 return DefineAsRegister(new(zone()) LConstantT); |
| 1979 } else { | 1981 } else { |
| 1980 UNREACHABLE(); | 1982 UNREACHABLE(); |
| 1981 return NULL; | 1983 return NULL; |
| 1982 } | 1984 } |
| 1983 } | 1985 } |
| 1984 | 1986 |
| 1985 | 1987 |
| 1986 LInstruction* LChunkBuilder::DoLoadGlobalCell(HLoadGlobalCell* instr) { | 1988 LInstruction* LChunkBuilder::DoLoadGlobalCell(HLoadGlobalCell* instr) { |
| 1987 LLoadGlobalCell* result = new(zone()) LLoadGlobalCell; | 1989 LLoadGlobalCell* result = new(zone()) LLoadGlobalCell; |
| (...skipping 578 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2566 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { | 2568 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { |
| 2567 LOperand* object = UseRegister(instr->object()); | 2569 LOperand* object = UseRegister(instr->object()); |
| 2568 LOperand* index = UseTempRegister(instr->index()); | 2570 LOperand* index = UseTempRegister(instr->index()); |
| 2569 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); | 2571 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); |
| 2570 } | 2572 } |
| 2571 | 2573 |
| 2572 | 2574 |
| 2573 } } // namespace v8::internal | 2575 } } // namespace v8::internal |
| 2574 | 2576 |
| 2575 #endif // V8_TARGET_ARCH_X64 | 2577 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |