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 1032 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1043 | 1043 |
1044 // 5b. Get the code to call from the function and check that the number of | 1044 // 5b. Get the code to call from the function and check that the number of |
1045 // expected arguments matches what we're providing. If so, jump | 1045 // expected arguments matches what we're providing. If so, jump |
1046 // (tail-call) to the code in register edx without checking arguments. | 1046 // (tail-call) to the code in register edx without checking arguments. |
1047 // r0: actual number of arguments | 1047 // r0: actual number of arguments |
1048 // r1: function | 1048 // r1: function |
1049 __ ldr(r3, FieldMemOperand(r1, JSFunction::kSharedFunctionInfoOffset)); | 1049 __ ldr(r3, FieldMemOperand(r1, JSFunction::kSharedFunctionInfoOffset)); |
1050 __ ldr(r2, | 1050 __ ldr(r2, |
1051 FieldMemOperand(r3, SharedFunctionInfo::kFormalParameterCountOffset)); | 1051 FieldMemOperand(r3, SharedFunctionInfo::kFormalParameterCountOffset)); |
1052 __ mov(r2, Operand(r2, ASR, kSmiTagSize)); | 1052 __ mov(r2, Operand(r2, ASR, kSmiTagSize)); |
1053 __ ldr(r3, FieldMemOperand(r3, SharedFunctionInfo::kCodeOffset)); | 1053 __ ldr(r3, FieldMemOperand(r1, JSFunction::kCodeOffset)); |
1054 __ add(r3, r3, Operand(Code::kHeaderSize - kHeapObjectTag)); | 1054 __ add(r3, r3, Operand(Code::kHeaderSize - kHeapObjectTag)); |
1055 __ cmp(r2, r0); // Check formal and actual parameter counts. | 1055 __ cmp(r2, r0); // Check formal and actual parameter counts. |
1056 __ Jump(Handle<Code>(builtin(ArgumentsAdaptorTrampoline)), | 1056 __ Jump(Handle<Code>(builtin(ArgumentsAdaptorTrampoline)), |
1057 RelocInfo::CODE_TARGET, ne); | 1057 RelocInfo::CODE_TARGET, ne); |
1058 | 1058 |
1059 ParameterCount expected(0); | 1059 ParameterCount expected(0); |
1060 __ InvokeCode(r3, expected, expected, JUMP_FUNCTION); | 1060 __ InvokeCode(r3, expected, expected, JUMP_FUNCTION); |
1061 } | 1061 } |
1062 | 1062 |
1063 | 1063 |
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1311 __ bind(&dont_adapt_arguments); | 1311 __ bind(&dont_adapt_arguments); |
1312 __ Jump(r3); | 1312 __ Jump(r3); |
1313 } | 1313 } |
1314 | 1314 |
1315 | 1315 |
1316 #undef __ | 1316 #undef __ |
1317 | 1317 |
1318 } } // namespace v8::internal | 1318 } } // namespace v8::internal |
1319 | 1319 |
1320 #endif // V8_TARGET_ARCH_ARM | 1320 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |