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 2886 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2897 __ ldr(to_reg, FieldMemOperand(from_reg, | 2897 __ ldr(to_reg, FieldMemOperand(from_reg, |
2898 ExternalArray::kExternalPointerOffset)); | 2898 ExternalArray::kExternalPointerOffset)); |
2899 } | 2899 } |
2900 | 2900 |
2901 | 2901 |
2902 void LCodeGen::DoAccessArgumentsAt(LAccessArgumentsAt* instr) { | 2902 void LCodeGen::DoAccessArgumentsAt(LAccessArgumentsAt* instr) { |
2903 Register arguments = ToRegister(instr->arguments()); | 2903 Register arguments = ToRegister(instr->arguments()); |
2904 Register length = ToRegister(instr->length()); | 2904 Register length = ToRegister(instr->length()); |
2905 Register index = ToRegister(instr->index()); | 2905 Register index = ToRegister(instr->index()); |
2906 Register result = ToRegister(instr->result()); | 2906 Register result = ToRegister(instr->result()); |
2907 | |
2908 // Bailout index is not a valid argument index. Use unsigned check to get | |
2909 // negative check for free. | |
2910 __ sub(length, length, index, SetCC); | |
2911 DeoptimizeIf(ls, instr->environment()); | |
2912 | |
2913 // There are two words between the frame pointer and the last argument. | 2907 // There are two words between the frame pointer and the last argument. |
2914 // Subtracting from length accounts for one of them add one more. | 2908 // Subtracting from length accounts for one of them add one more. |
| 2909 __ sub(length, length, index); |
2915 __ add(length, length, Operand(1)); | 2910 __ add(length, length, Operand(1)); |
2916 __ ldr(result, MemOperand(arguments, length, LSL, kPointerSizeLog2)); | 2911 __ ldr(result, MemOperand(arguments, length, LSL, kPointerSizeLog2)); |
2917 } | 2912 } |
2918 | 2913 |
2919 | 2914 |
2920 void LCodeGen::DoLoadKeyedFastElement(LLoadKeyedFastElement* instr) { | 2915 void LCodeGen::DoLoadKeyedFastElement(LLoadKeyedFastElement* instr) { |
2921 Register elements = ToRegister(instr->elements()); | 2916 Register elements = ToRegister(instr->elements()); |
2922 Register result = ToRegister(instr->result()); | 2917 Register result = ToRegister(instr->result()); |
2923 Register scratch = scratch0(); | 2918 Register scratch = scratch0(); |
2924 Register store_base = scratch; | 2919 Register store_base = scratch; |
(...skipping 2753 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5678 __ sub(scratch, result, Operand(index, LSL, kPointerSizeLog2 - kSmiTagSize)); | 5673 __ sub(scratch, result, Operand(index, LSL, kPointerSizeLog2 - kSmiTagSize)); |
5679 __ ldr(result, FieldMemOperand(scratch, | 5674 __ ldr(result, FieldMemOperand(scratch, |
5680 FixedArray::kHeaderSize - kPointerSize)); | 5675 FixedArray::kHeaderSize - kPointerSize)); |
5681 __ bind(&done); | 5676 __ bind(&done); |
5682 } | 5677 } |
5683 | 5678 |
5684 | 5679 |
5685 #undef __ | 5680 #undef __ |
5686 | 5681 |
5687 } } // namespace v8::internal | 5682 } } // namespace v8::internal |
OLD | NEW |