OLD | NEW |
1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 3579 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3590 // in case no arguments adaptor frame is found below the current frame. | 3590 // in case no arguments adaptor frame is found below the current frame. |
3591 __ mov(r0, Operand(Smi::FromInt(scope()->num_parameters()))); | 3591 __ mov(r0, Operand(Smi::FromInt(scope()->num_parameters()))); |
3592 | 3592 |
3593 // Call the shared stub to get to the arguments.length. | 3593 // Call the shared stub to get to the arguments.length. |
3594 ArgumentsAccessStub stub(ArgumentsAccessStub::READ_LENGTH); | 3594 ArgumentsAccessStub stub(ArgumentsAccessStub::READ_LENGTH); |
3595 frame_->CallStub(&stub, 0); | 3595 frame_->CallStub(&stub, 0); |
3596 frame_->EmitPush(r0); | 3596 frame_->EmitPush(r0); |
3597 } | 3597 } |
3598 | 3598 |
3599 | 3599 |
3600 void CodeGenerator::GenerateArgumentsAccess(ZoneList<Expression*>* args) { | 3600 void CodeGenerator::GenerateArguments(ZoneList<Expression*>* args) { |
3601 VirtualFrame::SpilledScope spilled_scope; | 3601 VirtualFrame::SpilledScope spilled_scope; |
3602 ASSERT(args->length() == 1); | 3602 ASSERT(args->length() == 1); |
3603 | 3603 |
3604 // Satisfy contract with ArgumentsAccessStub: | 3604 // Satisfy contract with ArgumentsAccessStub: |
3605 // Load the key into r1 and the formal parameters count into r0. | 3605 // Load the key into r1 and the formal parameters count into r0. |
3606 LoadAndSpill(args->at(0)); | 3606 LoadAndSpill(args->at(0)); |
3607 frame_->EmitPop(r1); | 3607 frame_->EmitPop(r1); |
3608 __ mov(r0, Operand(Smi::FromInt(scope()->num_parameters()))); | 3608 __ mov(r0, Operand(Smi::FromInt(scope()->num_parameters()))); |
3609 | 3609 |
3610 // Call the shared stub to get to arguments[key]. | 3610 // Call the shared stub to get to arguments[key]. |
(...skipping 4344 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7955 | 7955 |
7956 // Just jump to runtime to add the two strings. | 7956 // Just jump to runtime to add the two strings. |
7957 __ bind(&string_add_runtime); | 7957 __ bind(&string_add_runtime); |
7958 __ TailCallRuntime(Runtime::kStringAdd, 2, 1); | 7958 __ TailCallRuntime(Runtime::kStringAdd, 2, 1); |
7959 } | 7959 } |
7960 | 7960 |
7961 | 7961 |
7962 #undef __ | 7962 #undef __ |
7963 | 7963 |
7964 } } // namespace v8::internal | 7964 } } // namespace v8::internal |
OLD | NEW |