OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 1831 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1842 LMulConstIS* mul = new(zone()) LMulConstIS(left, right); | 1842 LMulConstIS* mul = new(zone()) LMulConstIS(left, right); |
1843 if (needs_environment) AssignEnvironment(mul); | 1843 if (needs_environment) AssignEnvironment(mul); |
1844 return DefineAsRegister(mul); | 1844 return DefineAsRegister(mul); |
1845 } | 1845 } |
1846 } | 1846 } |
1847 | 1847 |
1848 // LMulI/S can handle all cases, but it requires that a register is | 1848 // LMulI/S can handle all cases, but it requires that a register is |
1849 // allocated for the second operand. | 1849 // allocated for the second operand. |
1850 LInstruction* result; | 1850 LInstruction* result; |
1851 if (instr->representation().IsSmi()) { | 1851 if (instr->representation().IsSmi()) { |
1852 // TODO(jbramley/rmcilroy): Fix LMulS so we can UseRegisterAtStart here. | 1852 LOperand* right = UseRegisterAtStart(most_const); |
1853 LOperand* right = UseRegister(most_const); | |
1854 result = DefineAsRegister(new(zone()) LMulS(left, right)); | 1853 result = DefineAsRegister(new(zone()) LMulS(left, right)); |
1855 } else { | 1854 } else { |
1856 LOperand* right = UseRegisterAtStart(most_const); | 1855 LOperand* right = UseRegisterAtStart(most_const); |
1857 result = DefineAsRegister(new(zone()) LMulI(left, right)); | 1856 result = DefineAsRegister(new(zone()) LMulI(left, right)); |
1858 } | 1857 } |
1859 if (needs_environment) AssignEnvironment(result); | 1858 if (needs_environment) AssignEnvironment(result); |
1860 return result; | 1859 return result; |
1861 } else if (instr->representation().IsDouble()) { | 1860 } else if (instr->representation().IsDouble()) { |
1862 return DoArithmeticD(Token::MUL, instr); | 1861 return DoArithmeticD(Token::MUL, instr); |
1863 } else { | 1862 } else { |
(...skipping 636 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2500 | 2499 |
2501 LInstruction* LChunkBuilder::DoWrapReceiver(HWrapReceiver* instr) { | 2500 LInstruction* LChunkBuilder::DoWrapReceiver(HWrapReceiver* instr) { |
2502 LOperand* receiver = UseRegister(instr->receiver()); | 2501 LOperand* receiver = UseRegister(instr->receiver()); |
2503 LOperand* function = UseRegister(instr->function()); | 2502 LOperand* function = UseRegister(instr->function()); |
2504 LWrapReceiver* result = new(zone()) LWrapReceiver(receiver, function); | 2503 LWrapReceiver* result = new(zone()) LWrapReceiver(receiver, function); |
2505 return AssignEnvironment(DefineAsRegister(result)); | 2504 return AssignEnvironment(DefineAsRegister(result)); |
2506 } | 2505 } |
2507 | 2506 |
2508 | 2507 |
2509 } } // namespace v8::internal | 2508 } } // namespace v8::internal |
OLD | NEW |