| OLD | NEW | 
|---|
| 1 // Copyright 2012 the V8 project authors. All rights reserved.7 | 1 // Copyright 2012 the V8 project authors. All rights reserved.7 | 
| 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 1836 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1847 | 1847 | 
| 1848   if (!can_overflow) { | 1848   if (!can_overflow) { | 
| 1849     if (right->IsStackSlot()) { | 1849     if (right->IsStackSlot()) { | 
| 1850       Register right_reg = EmitLoadRegister(right, at); | 1850       Register right_reg = EmitLoadRegister(right, at); | 
| 1851       __ Addu(ToRegister(result), ToRegister(left), Operand(right_reg)); | 1851       __ Addu(ToRegister(result), ToRegister(left), Operand(right_reg)); | 
| 1852     } else { | 1852     } else { | 
| 1853       DCHECK(right->IsRegister() || right->IsConstantOperand()); | 1853       DCHECK(right->IsRegister() || right->IsConstantOperand()); | 
| 1854       __ Addu(ToRegister(result), ToRegister(left), ToOperand(right)); | 1854       __ Addu(ToRegister(result), ToRegister(left), ToOperand(right)); | 
| 1855     } | 1855     } | 
| 1856   } else {  // can_overflow. | 1856   } else {  // can_overflow. | 
| 1857     Register overflow = scratch0(); |  | 
| 1858     Register scratch = scratch1(); | 1857     Register scratch = scratch1(); | 
|  | 1858     Label no_overflow; | 
| 1859     if (right->IsStackSlot()) { | 1859     if (right->IsStackSlot()) { | 
| 1860       Register right_reg = EmitLoadRegister(right, scratch); | 1860       Register right_reg = EmitLoadRegister(right, scratch); | 
| 1861       __ AdduAndCheckForOverflow(ToRegister(result), | 1861       __ AdduAndCheckForOverflow(ToRegister(result), ToRegister(left), | 
| 1862                                  ToRegister(left), | 1862                                  right_reg, nullptr, | 
| 1863                                  right_reg, | 1863                                  &no_overflow);  // Reg at also used as scratch. | 
| 1864                                  overflow);  // Reg at also used as scratch. |  | 
| 1865     } else { | 1864     } else { | 
| 1866       DCHECK(right->IsRegister() || right->IsConstantOperand()); | 1865       DCHECK(right->IsRegister() || right->IsConstantOperand()); | 
| 1867       __ AdduAndCheckForOverflow(ToRegister(result), ToRegister(left), | 1866       __ AdduAndCheckForOverflow(ToRegister(result), ToRegister(left), | 
| 1868                                  ToOperand(right), overflow, scratch); | 1867                                  ToOperand(right), nullptr, &no_overflow, | 
|  | 1868                                  scratch); | 
| 1869     } | 1869     } | 
| 1870     DeoptimizeIf(lt, instr, Deoptimizer::kOverflow, overflow, | 1870     DeoptimizeIf(al, instr); | 
| 1871                  Operand(zero_reg)); | 1871     __ bind(&no_overflow); | 
| 1872   } | 1872   } | 
| 1873 } | 1873 } | 
| 1874 | 1874 | 
| 1875 | 1875 | 
| 1876 void LCodeGen::DoMathMinMax(LMathMinMax* instr) { | 1876 void LCodeGen::DoMathMinMax(LMathMinMax* instr) { | 
| 1877   LOperand* left = instr->left(); | 1877   LOperand* left = instr->left(); | 
| 1878   LOperand* right = instr->right(); | 1878   LOperand* right = instr->right(); | 
| 1879   HMathMinMax::Operation operation = instr->hydrogen()->operation(); | 1879   HMathMinMax::Operation operation = instr->hydrogen()->operation(); | 
| 1880   Condition condition = (operation == HMathMinMax::kMathMin) ? le : ge; | 1880   Condition condition = (operation == HMathMinMax::kMathMin) ? le : ge; | 
| 1881   if (instr->hydrogen()->representation().IsSmiOrInteger32()) { | 1881   if (instr->hydrogen()->representation().IsSmiOrInteger32()) { | 
| (...skipping 3946 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 5828   __ Push(at, ToRegister(instr->function())); | 5828   __ Push(at, ToRegister(instr->function())); | 
| 5829   CallRuntime(Runtime::kPushBlockContext, 2, instr); | 5829   CallRuntime(Runtime::kPushBlockContext, 2, instr); | 
| 5830   RecordSafepoint(Safepoint::kNoLazyDeopt); | 5830   RecordSafepoint(Safepoint::kNoLazyDeopt); | 
| 5831 } | 5831 } | 
| 5832 | 5832 | 
| 5833 | 5833 | 
| 5834 #undef __ | 5834 #undef __ | 
| 5835 | 5835 | 
| 5836 }  // namespace internal | 5836 }  // namespace internal | 
| 5837 }  // namespace v8 | 5837 }  // namespace v8 | 
| OLD | NEW | 
|---|