OLD | NEW |
1 // Copyright 2006-2009 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2009 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 3387 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3398 frame_->EmitPop(r1); | 3398 frame_->EmitPop(r1); |
3399 __ mov(r0, Operand(Smi::FromInt(scope_->num_parameters()))); | 3399 __ mov(r0, Operand(Smi::FromInt(scope_->num_parameters()))); |
3400 | 3400 |
3401 // Call the shared stub to get to arguments[key]. | 3401 // Call the shared stub to get to arguments[key]. |
3402 ArgumentsAccessStub stub(ArgumentsAccessStub::READ_ELEMENT); | 3402 ArgumentsAccessStub stub(ArgumentsAccessStub::READ_ELEMENT); |
3403 frame_->CallStub(&stub, 0); | 3403 frame_->CallStub(&stub, 0); |
3404 frame_->EmitPush(r0); | 3404 frame_->EmitPush(r0); |
3405 } | 3405 } |
3406 | 3406 |
3407 | 3407 |
| 3408 void CodeGenerator::GenerateRandomPositiveSmi(ZoneList<Expression*>* args) { |
| 3409 VirtualFrame::SpilledScope spilled_scope; |
| 3410 ASSERT(args->length() == 0); |
| 3411 __ Call(ExternalReference::random_positive_smi_function().address(), |
| 3412 RelocInfo::RUNTIME_ENTRY); |
| 3413 frame_->EmitPush(r0); |
| 3414 } |
| 3415 |
| 3416 |
3408 void CodeGenerator::GenerateObjectEquals(ZoneList<Expression*>* args) { | 3417 void CodeGenerator::GenerateObjectEquals(ZoneList<Expression*>* args) { |
3409 VirtualFrame::SpilledScope spilled_scope; | 3418 VirtualFrame::SpilledScope spilled_scope; |
3410 ASSERT(args->length() == 2); | 3419 ASSERT(args->length() == 2); |
3411 | 3420 |
3412 // Load the two objects into registers and perform the comparison. | 3421 // Load the two objects into registers and perform the comparison. |
3413 LoadAndSpill(args->at(0)); | 3422 LoadAndSpill(args->at(0)); |
3414 LoadAndSpill(args->at(1)); | 3423 LoadAndSpill(args->at(1)); |
3415 frame_->EmitPop(r0); | 3424 frame_->EmitPop(r0); |
3416 frame_->EmitPop(r1); | 3425 frame_->EmitPop(r1); |
3417 __ cmp(r0, Operand(r1)); | 3426 __ cmp(r0, Operand(r1)); |
(...skipping 2235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5653 __ mov(r2, Operand(0)); | 5662 __ mov(r2, Operand(0)); |
5654 __ GetBuiltinEntry(r3, Builtins::CALL_NON_FUNCTION); | 5663 __ GetBuiltinEntry(r3, Builtins::CALL_NON_FUNCTION); |
5655 __ Jump(Handle<Code>(Builtins::builtin(Builtins::ArgumentsAdaptorTrampoline)), | 5664 __ Jump(Handle<Code>(Builtins::builtin(Builtins::ArgumentsAdaptorTrampoline)), |
5656 RelocInfo::CODE_TARGET); | 5665 RelocInfo::CODE_TARGET); |
5657 } | 5666 } |
5658 | 5667 |
5659 | 5668 |
5660 #undef __ | 5669 #undef __ |
5661 | 5670 |
5662 } } // namespace v8::internal | 5671 } } // namespace v8::internal |
OLD | NEW |