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 2982 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2993 __ bind(&done); | 2993 __ bind(&done); |
2994 } | 2994 } |
2995 | 2995 |
2996 | 2996 |
2997 void LCodeGen::DoLoadRoot(LLoadRoot* instr) { | 2997 void LCodeGen::DoLoadRoot(LLoadRoot* instr) { |
2998 Register result = ToRegister(instr->result()); | 2998 Register result = ToRegister(instr->result()); |
2999 __ LoadRoot(result, instr->index()); | 2999 __ LoadRoot(result, instr->index()); |
3000 } | 3000 } |
3001 | 3001 |
3002 | 3002 |
3003 void LCodeGen::DoLoadExternalArrayPointer( | |
3004 LLoadExternalArrayPointer* instr) { | |
3005 Register to_reg = ToRegister(instr->result()); | |
3006 Register from_reg = ToRegister(instr->object()); | |
3007 __ lw(to_reg, FieldMemOperand(from_reg, | |
3008 ExternalArray::kExternalPointerOffset)); | |
3009 } | |
3010 | |
3011 | |
3012 void LCodeGen::DoAccessArgumentsAt(LAccessArgumentsAt* instr) { | 3003 void LCodeGen::DoAccessArgumentsAt(LAccessArgumentsAt* instr) { |
3013 Register arguments = ToRegister(instr->arguments()); | 3004 Register arguments = ToRegister(instr->arguments()); |
3014 Register result = ToRegister(instr->result()); | 3005 Register result = ToRegister(instr->result()); |
3015 // There are two words between the frame pointer and the last argument. | 3006 // There are two words between the frame pointer and the last argument. |
3016 // Subtracting from length accounts for one of them add one more. | 3007 // Subtracting from length accounts for one of them add one more. |
3017 if (instr->length()->IsConstantOperand()) { | 3008 if (instr->length()->IsConstantOperand()) { |
3018 int const_length = ToInteger32(LConstantOperand::cast(instr->length())); | 3009 int const_length = ToInteger32(LConstantOperand::cast(instr->length())); |
3019 if (instr->index()->IsConstantOperand()) { | 3010 if (instr->index()->IsConstantOperand()) { |
3020 int const_index = ToInteger32(LConstantOperand::cast(instr->index())); | 3011 int const_index = ToInteger32(LConstantOperand::cast(instr->index())); |
3021 int index = (const_length - const_index) + 1; | 3012 int index = (const_length - const_index) + 1; |
(...skipping 2786 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5808 __ Subu(scratch, result, scratch); | 5799 __ Subu(scratch, result, scratch); |
5809 __ lw(result, FieldMemOperand(scratch, | 5800 __ lw(result, FieldMemOperand(scratch, |
5810 FixedArray::kHeaderSize - kPointerSize)); | 5801 FixedArray::kHeaderSize - kPointerSize)); |
5811 __ bind(&done); | 5802 __ bind(&done); |
5812 } | 5803 } |
5813 | 5804 |
5814 | 5805 |
5815 #undef __ | 5806 #undef __ |
5816 | 5807 |
5817 } } // namespace v8::internal | 5808 } } // namespace v8::internal |
OLD | NEW |