OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 1286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1297 | 1297 |
1298 LInstruction* LChunkBuilder::DoDiv(HDiv* instr) { | 1298 LInstruction* LChunkBuilder::DoDiv(HDiv* instr) { |
1299 if (instr->representation().IsDouble()) { | 1299 if (instr->representation().IsDouble()) { |
1300 return DoArithmeticD(Token::DIV, instr); | 1300 return DoArithmeticD(Token::DIV, instr); |
1301 } else if (instr->representation().IsInteger32()) { | 1301 } else if (instr->representation().IsInteger32()) { |
1302 // TODO(1042) The fixed register allocation | 1302 // TODO(1042) The fixed register allocation |
1303 // is needed because we call GenericBinaryOpStub from | 1303 // is needed because we call GenericBinaryOpStub from |
1304 // the generated code, which requires registers r0 | 1304 // the generated code, which requires registers r0 |
1305 // and r1 to be used. We should remove that | 1305 // and r1 to be used. We should remove that |
1306 // when we provide a native implementation. | 1306 // when we provide a native implementation. |
1307 LOperand* value = UseFixed(instr->left(), r0); | 1307 LOperand* dividend = UseFixed(instr->left(), r0); |
1308 LOperand* divisor = UseFixed(instr->right(), r1); | 1308 LOperand* divisor = UseFixed(instr->right(), r1); |
1309 return AssignEnvironment(AssignPointerMap( | 1309 return AssignEnvironment(AssignPointerMap( |
1310 DefineFixed(new LDivI(value, divisor), r0))); | 1310 DefineFixed(new LDivI(dividend, divisor), r0))); |
1311 } else { | 1311 } else { |
1312 return DoArithmeticT(Token::DIV, instr); | 1312 return DoArithmeticT(Token::DIV, instr); |
1313 } | 1313 } |
1314 } | 1314 } |
1315 | 1315 |
1316 | 1316 |
1317 LInstruction* LChunkBuilder::DoMod(HMod* instr) { | 1317 LInstruction* LChunkBuilder::DoMod(HMod* instr) { |
1318 if (instr->representation().IsInteger32()) { | 1318 if (instr->representation().IsInteger32()) { |
1319 // TODO(1042) The fixed register allocation | 1319 // TODO(1042) The fixed register allocation |
1320 // is needed because we call GenericBinaryOpStub from | 1320 // is needed because we call GenericBinaryOpStub from |
(...skipping 621 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1942 | 1942 |
1943 | 1943 |
1944 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) { | 1944 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) { |
1945 HEnvironment* outer = current_block_->last_environment()->outer(); | 1945 HEnvironment* outer = current_block_->last_environment()->outer(); |
1946 current_block_->UpdateEnvironment(outer); | 1946 current_block_->UpdateEnvironment(outer); |
1947 return NULL; | 1947 return NULL; |
1948 } | 1948 } |
1949 | 1949 |
1950 | 1950 |
1951 } } // namespace v8::internal | 1951 } } // namespace v8::internal |
OLD | NEW |