Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(414)

Side by Side Diff: src/x64/builtins-x64.cc

Issue 224903005: Reland "create a function call IC" (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Comments. Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/v8globals.h ('k') | src/x64/code-stubs-x64.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 582 matching lines...) Expand 10 before | Expand all | Expand 10 after
593 __ addp(rcx, Immediate(1)); 593 __ addp(rcx, Immediate(1));
594 __ bind(&entry); 594 __ bind(&entry);
595 __ cmpp(rcx, rax); 595 __ cmpp(rcx, rax);
596 __ j(not_equal, &loop); 596 __ j(not_equal, &loop);
597 597
598 // Invoke the code. 598 // Invoke the code.
599 if (is_construct) { 599 if (is_construct) {
600 // No type feedback cell is available 600 // No type feedback cell is available
601 __ LoadRoot(rbx, Heap::kUndefinedValueRootIndex); 601 __ LoadRoot(rbx, Heap::kUndefinedValueRootIndex);
602 // Expects rdi to hold function pointer. 602 // Expects rdi to hold function pointer.
603 CallConstructStub stub(NO_CALL_FUNCTION_FLAGS); 603 CallConstructStub stub(NO_CALL_CONSTRUCTOR_FLAGS);
604 __ CallStub(&stub); 604 __ CallStub(&stub);
605 } else { 605 } else {
606 ParameterCount actual(rax); 606 ParameterCount actual(rax);
607 // Function must be in rdi. 607 // Function must be in rdi.
608 __ InvokeFunction(rdi, actual, CALL_FUNCTION, NullCallWrapper()); 608 __ InvokeFunction(rdi, actual, CALL_FUNCTION, NullCallWrapper());
609 } 609 }
610 // Exit the internal frame. Notice that this also removes the empty 610 // Exit the internal frame. Notice that this also removes the empty
611 // context and the function left on the stack by the code 611 // context and the function left on the stack by the code
612 // invocation. 612 // invocation.
613 } 613 }
(...skipping 880 matching lines...) Expand 10 before | Expand all | Expand 10 after
1494 __ bind(&ok); 1494 __ bind(&ok);
1495 __ ret(0); 1495 __ ret(0);
1496 } 1496 }
1497 1497
1498 1498
1499 #undef __ 1499 #undef __
1500 1500
1501 } } // namespace v8::internal 1501 } } // namespace v8::internal
1502 1502
1503 #endif // V8_TARGET_ARCH_X64 1503 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/v8globals.h ('k') | src/x64/code-stubs-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698