| 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 549 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 560 RelocInfo::CODE_TARGET); | 560 RelocInfo::CODE_TARGET); |
| 561 __ bind(&function); | 561 __ bind(&function); |
| 562 } | 562 } |
| 563 | 563 |
| 564 // 5b. Get the code to call from the function and check that the number of | 564 // 5b. Get the code to call from the function and check that the number of |
| 565 // expected arguments matches what we're providing. If so, jump | 565 // expected arguments matches what we're providing. If so, jump |
| 566 // (tail-call) to the code in register edx without checking arguments. | 566 // (tail-call) to the code in register edx without checking arguments. |
| 567 __ mov(edx, FieldOperand(edi, JSFunction::kSharedFunctionInfoOffset)); | 567 __ mov(edx, FieldOperand(edi, JSFunction::kSharedFunctionInfoOffset)); |
| 568 __ mov(ebx, | 568 __ mov(ebx, |
| 569 FieldOperand(edx, SharedFunctionInfo::kFormalParameterCountOffset)); | 569 FieldOperand(edx, SharedFunctionInfo::kFormalParameterCountOffset)); |
| 570 __ mov(edx, FieldOperand(edi, JSFunction::kCodeEntryOffset)); |
| 570 __ SmiUntag(ebx); | 571 __ SmiUntag(ebx); |
| 571 __ mov(edx, FieldOperand(edi, JSFunction::kCodeOffset)); | |
| 572 __ lea(edx, FieldOperand(edx, Code::kHeaderSize)); | |
| 573 __ cmp(eax, Operand(ebx)); | 572 __ cmp(eax, Operand(ebx)); |
| 574 __ j(not_equal, Handle<Code>(builtin(ArgumentsAdaptorTrampoline))); | 573 __ j(not_equal, Handle<Code>(builtin(ArgumentsAdaptorTrampoline))); |
| 575 | 574 |
| 576 ParameterCount expected(0); | 575 ParameterCount expected(0); |
| 577 __ InvokeCode(Operand(edx), expected, expected, JUMP_FUNCTION); | 576 __ InvokeCode(Operand(edx), expected, expected, JUMP_FUNCTION); |
| 578 } | 577 } |
| 579 | 578 |
| 580 | 579 |
| 581 void Builtins::Generate_FunctionApply(MacroAssembler* masm) { | 580 void Builtins::Generate_FunctionApply(MacroAssembler* masm) { |
| 582 __ EnterInternalFrame(); | 581 __ EnterInternalFrame(); |
| (...skipping 689 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1272 __ bind(&dont_adapt_arguments); | 1271 __ bind(&dont_adapt_arguments); |
| 1273 __ jmp(Operand(edx)); | 1272 __ jmp(Operand(edx)); |
| 1274 } | 1273 } |
| 1275 | 1274 |
| 1276 | 1275 |
| 1277 #undef __ | 1276 #undef __ |
| 1278 | 1277 |
| 1279 } } // namespace v8::internal | 1278 } } // namespace v8::internal |
| 1280 | 1279 |
| 1281 #endif // V8_TARGET_ARCH_IA32 | 1280 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |