| 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 530 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 541 __ bind(&function); | 541 __ bind(&function); |
| 542 } | 542 } |
| 543 | 543 |
| 544 // 5b. Get the code to call from the function and check that the number of | 544 // 5b. Get the code to call from the function and check that the number of |
| 545 // expected arguments matches what we're providing. If so, jump | 545 // expected arguments matches what we're providing. If so, jump |
| 546 // (tail-call) to the code in register edx without checking arguments. | 546 // (tail-call) to the code in register edx without checking arguments. |
| 547 __ mov(edx, FieldOperand(edi, JSFunction::kSharedFunctionInfoOffset)); | 547 __ mov(edx, FieldOperand(edi, JSFunction::kSharedFunctionInfoOffset)); |
| 548 __ mov(ebx, | 548 __ mov(ebx, |
| 549 FieldOperand(edx, SharedFunctionInfo::kFormalParameterCountOffset)); | 549 FieldOperand(edx, SharedFunctionInfo::kFormalParameterCountOffset)); |
| 550 __ SmiUntag(ebx); | 550 __ SmiUntag(ebx); |
| 551 __ mov(edx, FieldOperand(edx, SharedFunctionInfo::kCodeOffset)); | 551 __ mov(edx, FieldOperand(edi, JSFunction::kCodeOffset)); |
| 552 __ lea(edx, FieldOperand(edx, Code::kHeaderSize)); | 552 __ lea(edx, FieldOperand(edx, Code::kHeaderSize)); |
| 553 __ cmp(eax, Operand(ebx)); | 553 __ cmp(eax, Operand(ebx)); |
| 554 __ j(not_equal, Handle<Code>(builtin(ArgumentsAdaptorTrampoline))); | 554 __ j(not_equal, Handle<Code>(builtin(ArgumentsAdaptorTrampoline))); |
| 555 | 555 |
| 556 ParameterCount expected(0); | 556 ParameterCount expected(0); |
| 557 __ InvokeCode(Operand(edx), expected, expected, JUMP_FUNCTION); | 557 __ InvokeCode(Operand(edx), expected, expected, JUMP_FUNCTION); |
| 558 } | 558 } |
| 559 | 559 |
| 560 | 560 |
| 561 void Builtins::Generate_FunctionApply(MacroAssembler* masm) { | 561 void Builtins::Generate_FunctionApply(MacroAssembler* masm) { |
| (...skipping 690 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1252 __ bind(&dont_adapt_arguments); | 1252 __ bind(&dont_adapt_arguments); |
| 1253 __ jmp(Operand(edx)); | 1253 __ jmp(Operand(edx)); |
| 1254 } | 1254 } |
| 1255 | 1255 |
| 1256 | 1256 |
| 1257 #undef __ | 1257 #undef __ |
| 1258 | 1258 |
| 1259 } } // namespace v8::internal | 1259 } } // namespace v8::internal |
| 1260 | 1260 |
| 1261 #endif // V8_TARGET_ARCH_IA32 | 1261 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |