| 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 1380 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1391 } | 1391 } |
| 1392 return NULL; | 1392 return NULL; |
| 1393 } | 1393 } |
| 1394 | 1394 |
| 1395 | 1395 |
| 1396 LInstruction* LChunkBuilder::DoMathFloorOfDiv(HMathFloorOfDiv* instr) { | 1396 LInstruction* LChunkBuilder::DoMathFloorOfDiv(HMathFloorOfDiv* instr) { |
| 1397 HValue* right = instr->right(); | 1397 HValue* right = instr->right(); |
| 1398 LOperand* dividend = UseRegister(instr->left()); | 1398 LOperand* dividend = UseRegister(instr->left()); |
| 1399 LOperand* divisor = UseRegisterOrConstant(right); | 1399 LOperand* divisor = UseRegisterOrConstant(right); |
| 1400 LOperand* remainder = TempRegister(); | 1400 LOperand* remainder = TempRegister(); |
| 1401 ASSERT(right->IsConstant() && | |
| 1402 HConstant::cast(right)->HasInteger32Value()); | |
| 1403 return AssignEnvironment(DefineAsRegister( | 1401 return AssignEnvironment(DefineAsRegister( |
| 1404 new(zone()) LMathFloorOfDiv(dividend, divisor, remainder))); | 1402 new(zone()) LMathFloorOfDiv(dividend, divisor, remainder))); |
| 1405 } | 1403 } |
| 1406 | 1404 |
| 1407 | 1405 |
| 1408 LInstruction* LChunkBuilder::DoMod(HMod* instr) { | 1406 LInstruction* LChunkBuilder::DoMod(HMod* instr) { |
| 1409 HValue* left = instr->left(); | 1407 HValue* left = instr->left(); |
| 1410 HValue* right = instr->right(); | 1408 HValue* right = instr->right(); |
| 1411 if (instr->representation().IsSmiOrInteger32()) { | 1409 if (instr->representation().IsSmiOrInteger32()) { |
| 1412 ASSERT(instr->left()->representation().Equals(instr->representation())); | 1410 ASSERT(instr->left()->representation().Equals(instr->representation())); |
| (...skipping 1118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2531 | 2529 |
| 2532 | 2530 |
| 2533 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { | 2531 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { |
| 2534 LOperand* object = UseRegister(instr->object()); | 2532 LOperand* object = UseRegister(instr->object()); |
| 2535 LOperand* index = UseRegister(instr->index()); | 2533 LOperand* index = UseRegister(instr->index()); |
| 2536 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index)); | 2534 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index)); |
| 2537 } | 2535 } |
| 2538 | 2536 |
| 2539 | 2537 |
| 2540 } } // namespace v8::internal | 2538 } } // namespace v8::internal |
| OLD | NEW |