| 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 1442 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1453 ASSERT(instr->right()->representation().Equals(instr->representation())); | 1453 ASSERT(instr->right()->representation().Equals(instr->representation())); |
| 1454 if (instr->HasPowerOf2Divisor()) { | 1454 if (instr->HasPowerOf2Divisor()) { |
| 1455 ASSERT(!right->CanBeZero()); | 1455 ASSERT(!right->CanBeZero()); |
| 1456 LModI* mod = new(zone()) LModI(UseRegisterAtStart(left), | 1456 LModI* mod = new(zone()) LModI(UseRegisterAtStart(left), |
| 1457 UseOrConstant(right)); | 1457 UseOrConstant(right)); |
| 1458 LInstruction* result = DefineAsRegister(mod); | 1458 LInstruction* result = DefineAsRegister(mod); |
| 1459 return (left->CanBeNegative() && | 1459 return (left->CanBeNegative() && |
| 1460 instr->CheckFlag(HValue::kBailoutOnMinusZero)) | 1460 instr->CheckFlag(HValue::kBailoutOnMinusZero)) |
| 1461 ? AssignEnvironment(result) | 1461 ? AssignEnvironment(result) |
| 1462 : result; | 1462 : result; |
| 1463 } else if (instr->fixed_right_arg().has_value) { | |
| 1464 LModI* mod = new(zone()) LModI(UseRegisterAtStart(left), | |
| 1465 UseRegisterAtStart(right)); | |
| 1466 return AssignEnvironment(DefineAsRegister(mod)); | |
| 1467 } else { | 1463 } else { |
| 1468 LModI* mod = new(zone()) LModI(UseRegister(left), | 1464 LModI* mod = new(zone()) LModI(UseRegister(left), |
| 1469 UseRegister(right), | 1465 UseRegister(right), |
| 1470 TempRegister(), | 1466 TempRegister(), |
| 1471 FixedTemp(f20), | 1467 FixedTemp(f20), |
| 1472 FixedTemp(f22)); | 1468 FixedTemp(f22)); |
| 1473 LInstruction* result = DefineAsRegister(mod); | 1469 LInstruction* result = DefineAsRegister(mod); |
| 1474 return (right->CanBeZero() || | 1470 return (right->CanBeZero() || |
| 1475 (left->RangeCanInclude(kMinInt) && | 1471 (left->RangeCanInclude(kMinInt) && |
| 1476 right->RangeCanInclude(-1)) || | 1472 right->RangeCanInclude(-1)) || |
| (...skipping 1135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2612 | 2608 |
| 2613 | 2609 |
| 2614 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { | 2610 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { |
| 2615 LOperand* object = UseRegister(instr->object()); | 2611 LOperand* object = UseRegister(instr->object()); |
| 2616 LOperand* index = UseRegister(instr->index()); | 2612 LOperand* index = UseRegister(instr->index()); |
| 2617 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index)); | 2613 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index)); |
| 2618 } | 2614 } |
| 2619 | 2615 |
| 2620 | 2616 |
| 2621 } } // namespace v8::internal | 2617 } } // namespace v8::internal |
| OLD | NEW |