| 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 1784 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1795 | 1795 |
| 1796 MemOperand operand = BuildSeqStringOperand(string, instr->index(), encoding); | 1796 MemOperand operand = BuildSeqStringOperand(string, instr->index(), encoding); |
| 1797 if (encoding == String::ONE_BYTE_ENCODING) { | 1797 if (encoding == String::ONE_BYTE_ENCODING) { |
| 1798 __ sb(value, operand); | 1798 __ sb(value, operand); |
| 1799 } else { | 1799 } else { |
| 1800 __ sh(value, operand); | 1800 __ sh(value, operand); |
| 1801 } | 1801 } |
| 1802 } | 1802 } |
| 1803 | 1803 |
| 1804 | 1804 |
| 1805 void LCodeGen::DoThrow(LThrow* instr) { | |
| 1806 __ push(ToRegister(instr->value())); | |
| 1807 ASSERT(ToRegister(instr->context()).is(cp)); | |
| 1808 CallRuntime(Runtime::kThrow, 1, instr); | |
| 1809 | |
| 1810 if (FLAG_debug_code) { | |
| 1811 __ stop("Unreachable code."); | |
| 1812 } | |
| 1813 } | |
| 1814 | |
| 1815 | |
| 1816 void LCodeGen::DoAddI(LAddI* instr) { | 1805 void LCodeGen::DoAddI(LAddI* instr) { |
| 1817 LOperand* left = instr->left(); | 1806 LOperand* left = instr->left(); |
| 1818 LOperand* right = instr->right(); | 1807 LOperand* right = instr->right(); |
| 1819 LOperand* result = instr->result(); | 1808 LOperand* result = instr->result(); |
| 1820 bool can_overflow = instr->hydrogen()->CheckFlag(HValue::kCanOverflow); | 1809 bool can_overflow = instr->hydrogen()->CheckFlag(HValue::kCanOverflow); |
| 1821 | 1810 |
| 1822 if (!can_overflow) { | 1811 if (!can_overflow) { |
| 1823 if (right->IsStackSlot() || right->IsArgument()) { | 1812 if (right->IsStackSlot() || right->IsArgument()) { |
| 1824 Register right_reg = EmitLoadRegister(right, at); | 1813 Register right_reg = EmitLoadRegister(right, at); |
| 1825 __ Addu(ToRegister(result), ToRegister(left), Operand(right_reg)); | 1814 __ Addu(ToRegister(result), ToRegister(left), Operand(right_reg)); |
| (...skipping 3954 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5780 __ Subu(scratch, result, scratch); | 5769 __ Subu(scratch, result, scratch); |
| 5781 __ lw(result, FieldMemOperand(scratch, | 5770 __ lw(result, FieldMemOperand(scratch, |
| 5782 FixedArray::kHeaderSize - kPointerSize)); | 5771 FixedArray::kHeaderSize - kPointerSize)); |
| 5783 __ bind(&done); | 5772 __ bind(&done); |
| 5784 } | 5773 } |
| 5785 | 5774 |
| 5786 | 5775 |
| 5787 #undef __ | 5776 #undef __ |
| 5788 | 5777 |
| 5789 } } // namespace v8::internal | 5778 } } // namespace v8::internal |
| OLD | NEW |