OLD | NEW |
1 // Copyright 2009 the V8 project authors. All rights reserved. | 1 // Copyright 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 697 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
708 __ IncrementCounter(&Counters::array_function_native, 1); | 708 __ IncrementCounter(&Counters::array_function_native, 1); |
709 __ movq(rax, rbx); | 709 __ movq(rax, rbx); |
710 __ ret(kPointerSize); | 710 __ ret(kPointerSize); |
711 | 711 |
712 // Check for one argument. Bail out if argument is not smi or if it is | 712 // Check for one argument. Bail out if argument is not smi or if it is |
713 // negative. | 713 // negative. |
714 __ bind(&argc_one_or_more); | 714 __ bind(&argc_one_or_more); |
715 __ cmpq(rax, Immediate(1)); | 715 __ cmpq(rax, Immediate(1)); |
716 __ j(not_equal, &argc_two_or_more); | 716 __ j(not_equal, &argc_two_or_more); |
717 __ movq(rdx, Operand(rsp, kPointerSize)); // Get the argument from the stack. | 717 __ movq(rdx, Operand(rsp, kPointerSize)); // Get the argument from the stack. |
718 __ JumpIfNotPositiveSmi(rdx, call_generic_code); | 718 __ JumpUnlessNonNegativeSmi(rdx, call_generic_code); |
719 | 719 |
720 // Handle construction of an empty array of a certain size. Bail out if size | 720 // Handle construction of an empty array of a certain size. Bail out if size |
721 // is to large to actually allocate an elements array. | 721 // is to large to actually allocate an elements array. |
722 __ SmiCompare(rdx, Smi::FromInt(JSObject::kInitialMaxFastElementArray)); | 722 __ SmiCompare(rdx, Smi::FromInt(JSObject::kInitialMaxFastElementArray)); |
723 __ j(greater_equal, call_generic_code); | 723 __ j(greater_equal, call_generic_code); |
724 | 724 |
725 // rax: argc | 725 // rax: argc |
726 // rdx: array_size (smi) | 726 // rdx: array_size (smi) |
727 // rdi: constructor | 727 // rdi: constructor |
728 // esp[0]: return address | 728 // esp[0]: return address |
(...skipping 614 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1343 __ LeaveInternalFrame(); | 1343 __ LeaveInternalFrame(); |
1344 | 1344 |
1345 // Do a tail-call of the compiled function. | 1345 // Do a tail-call of the compiled function. |
1346 __ lea(rcx, FieldOperand(rax, Code::kHeaderSize)); | 1346 __ lea(rcx, FieldOperand(rax, Code::kHeaderSize)); |
1347 __ jmp(rcx); | 1347 __ jmp(rcx); |
1348 } | 1348 } |
1349 | 1349 |
1350 } } // namespace v8::internal | 1350 } } // namespace v8::internal |
1351 | 1351 |
1352 #endif // V8_TARGET_ARCH_X64 | 1352 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |