| 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 945 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 956 __ GetBuiltinEntry(rdx, Builtins::CALL_NON_FUNCTION); | 956 __ GetBuiltinEntry(rdx, Builtins::CALL_NON_FUNCTION); |
| 957 __ Jump(masm->isolate()->builtins()->ArgumentsAdaptorTrampoline(), | 957 __ Jump(masm->isolate()->builtins()->ArgumentsAdaptorTrampoline(), |
| 958 RelocInfo::CODE_TARGET); | 958 RelocInfo::CODE_TARGET); |
| 959 __ bind(&function); | 959 __ bind(&function); |
| 960 } | 960 } |
| 961 | 961 |
| 962 // 5b. Get the code to call from the function and check that the number of | 962 // 5b. Get the code to call from the function and check that the number of |
| 963 // expected arguments matches what we're providing. If so, jump | 963 // expected arguments matches what we're providing. If so, jump |
| 964 // (tail-call) to the code in register edx without checking arguments. | 964 // (tail-call) to the code in register edx without checking arguments. |
| 965 __ movp(rdx, FieldOperand(rdi, JSFunction::kSharedFunctionInfoOffset)); | 965 __ movp(rdx, FieldOperand(rdi, JSFunction::kSharedFunctionInfoOffset)); |
| 966 __ movsxlq(rbx, | 966 __ LoadSharedFunctionInfoSpecialField(rbx, rdx, |
| 967 FieldOperand(rdx, | 967 SharedFunctionInfo::kFormalParameterCountOffset); |
| 968 SharedFunctionInfo::kFormalParameterCountOffset)); | |
| 969 __ movp(rdx, FieldOperand(rdi, JSFunction::kCodeEntryOffset)); | 968 __ movp(rdx, FieldOperand(rdi, JSFunction::kCodeEntryOffset)); |
| 970 __ cmpp(rax, rbx); | 969 __ cmpp(rax, rbx); |
| 971 __ j(not_equal, | 970 __ j(not_equal, |
| 972 masm->isolate()->builtins()->ArgumentsAdaptorTrampoline(), | 971 masm->isolate()->builtins()->ArgumentsAdaptorTrampoline(), |
| 973 RelocInfo::CODE_TARGET); | 972 RelocInfo::CODE_TARGET); |
| 974 | 973 |
| 975 ParameterCount expected(0); | 974 ParameterCount expected(0); |
| 976 __ InvokeCode(rdx, expected, expected, JUMP_FUNCTION, NullCallWrapper()); | 975 __ InvokeCode(rdx, expected, expected, JUMP_FUNCTION, NullCallWrapper()); |
| 977 } | 976 } |
| 978 | 977 |
| (...skipping 515 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1494 __ bind(&ok); | 1493 __ bind(&ok); |
| 1495 __ ret(0); | 1494 __ ret(0); |
| 1496 } | 1495 } |
| 1497 | 1496 |
| 1498 | 1497 |
| 1499 #undef __ | 1498 #undef __ |
| 1500 | 1499 |
| 1501 } } // namespace v8::internal | 1500 } } // namespace v8::internal |
| 1502 | 1501 |
| 1503 #endif // V8_TARGET_ARCH_X64 | 1502 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |