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 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
303 __ bind(&function); | 303 __ bind(&function); |
304 } | 304 } |
305 | 305 |
306 // 5b. Get the code to call from the function and check that the number of | 306 // 5b. Get the code to call from the function and check that the number of |
307 // expected arguments matches what we're providing. If so, jump | 307 // expected arguments matches what we're providing. If so, jump |
308 // (tail-call) to the code in register edx without checking arguments. | 308 // (tail-call) to the code in register edx without checking arguments. |
309 __ movq(rdx, FieldOperand(rdi, JSFunction::kSharedFunctionInfoOffset)); | 309 __ movq(rdx, FieldOperand(rdi, JSFunction::kSharedFunctionInfoOffset)); |
310 __ movsxlq(rbx, | 310 __ movsxlq(rbx, |
311 FieldOperand(rdx, | 311 FieldOperand(rdx, |
312 SharedFunctionInfo::kFormalParameterCountOffset)); | 312 SharedFunctionInfo::kFormalParameterCountOffset)); |
313 __ movq(rdx, FieldOperand(rdx, SharedFunctionInfo::kCodeOffset)); | 313 __ movq(rdx, FieldOperand(rdi, JSFunction::kCodeOffset)); |
314 __ lea(rdx, FieldOperand(rdx, Code::kHeaderSize)); | 314 __ lea(rdx, FieldOperand(rdx, Code::kHeaderSize)); |
315 __ cmpq(rax, rbx); | 315 __ cmpq(rax, rbx); |
316 __ j(not_equal, | 316 __ j(not_equal, |
317 Handle<Code>(builtin(ArgumentsAdaptorTrampoline)), | 317 Handle<Code>(builtin(ArgumentsAdaptorTrampoline)), |
318 RelocInfo::CODE_TARGET); | 318 RelocInfo::CODE_TARGET); |
319 | 319 |
320 ParameterCount expected(0); | 320 ParameterCount expected(0); |
321 __ InvokeCode(rdx, expected, expected, JUMP_FUNCTION); | 321 __ InvokeCode(rdx, expected, expected, JUMP_FUNCTION); |
322 } | 322 } |
323 | 323 |
(...skipping 963 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1287 } | 1287 } |
1288 | 1288 |
1289 | 1289 |
1290 void Builtins::Generate_JSConstructEntryTrampoline(MacroAssembler* masm) { | 1290 void Builtins::Generate_JSConstructEntryTrampoline(MacroAssembler* masm) { |
1291 Generate_JSEntryTrampolineHelper(masm, true); | 1291 Generate_JSEntryTrampolineHelper(masm, true); |
1292 } | 1292 } |
1293 | 1293 |
1294 } } // namespace v8::internal | 1294 } } // namespace v8::internal |
1295 | 1295 |
1296 #endif // V8_TARGET_ARCH_X64 | 1296 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |