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 1997 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2008 | 2008 |
2009 MemOperand operand = BuildSeqStringOperand(string, instr->index(), encoding); | 2009 MemOperand operand = BuildSeqStringOperand(string, instr->index(), encoding); |
2010 if (encoding == String::ONE_BYTE_ENCODING) { | 2010 if (encoding == String::ONE_BYTE_ENCODING) { |
2011 __ strb(value, operand); | 2011 __ strb(value, operand); |
2012 } else { | 2012 } else { |
2013 __ strh(value, operand); | 2013 __ strh(value, operand); |
2014 } | 2014 } |
2015 } | 2015 } |
2016 | 2016 |
2017 | 2017 |
2018 void LCodeGen::DoThrow(LThrow* instr) { | |
2019 __ push(ToRegister(instr->value())); | |
2020 ASSERT(ToRegister(instr->context()).is(cp)); | |
2021 CallRuntime(Runtime::kThrow, 1, instr); | |
2022 | |
2023 if (FLAG_debug_code) { | |
2024 __ stop("Unreachable code."); | |
2025 } | |
2026 } | |
2027 | |
2028 | |
2029 void LCodeGen::DoAddI(LAddI* instr) { | 2018 void LCodeGen::DoAddI(LAddI* instr) { |
2030 LOperand* left = instr->left(); | 2019 LOperand* left = instr->left(); |
2031 LOperand* right = instr->right(); | 2020 LOperand* right = instr->right(); |
2032 LOperand* result = instr->result(); | 2021 LOperand* result = instr->result(); |
2033 bool can_overflow = instr->hydrogen()->CheckFlag(HValue::kCanOverflow); | 2022 bool can_overflow = instr->hydrogen()->CheckFlag(HValue::kCanOverflow); |
2034 SBit set_cond = can_overflow ? SetCC : LeaveCC; | 2023 SBit set_cond = can_overflow ? SetCC : LeaveCC; |
2035 | 2024 |
2036 if (right->IsStackSlot() || right->IsArgument()) { | 2025 if (right->IsStackSlot() || right->IsArgument()) { |
2037 Register right_reg = EmitLoadRegister(right, ip); | 2026 Register right_reg = EmitLoadRegister(right, ip); |
2038 __ add(ToRegister(result), ToRegister(left), Operand(right_reg), set_cond); | 2027 __ add(ToRegister(result), ToRegister(left), Operand(right_reg), set_cond); |
(...skipping 3751 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5790 __ sub(scratch, result, Operand::PointerOffsetFromSmiKey(index)); | 5779 __ sub(scratch, result, Operand::PointerOffsetFromSmiKey(index)); |
5791 __ ldr(result, FieldMemOperand(scratch, | 5780 __ ldr(result, FieldMemOperand(scratch, |
5792 FixedArray::kHeaderSize - kPointerSize)); | 5781 FixedArray::kHeaderSize - kPointerSize)); |
5793 __ bind(&done); | 5782 __ bind(&done); |
5794 } | 5783 } |
5795 | 5784 |
5796 | 5785 |
5797 #undef __ | 5786 #undef __ |
5798 | 5787 |
5799 } } // namespace v8::internal | 5788 } } // namespace v8::internal |
OLD | NEW |