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

Side by Side Diff: src/x64/virtual-frame-x64.cc

Issue 1623004: Faster invocation of custom comparator function. (Closed)
Patch Set: Next round Created 10 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
« no previous file with comments | « src/x64/virtual-frame-x64.h ('k') | test/mjsunit/fuzz-natives.js » ('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 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 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 806 matching lines...) Expand 10 before | Expand all | Expand 10 after
817 arg1->ToRegister(rax); 817 arg1->ToRegister(rax);
818 arg0->ToRegister(rdx); 818 arg0->ToRegister(rdx);
819 } 819 }
820 820
821 arg0->Unuse(); 821 arg0->Unuse();
822 arg1->Unuse(); 822 arg1->Unuse();
823 return RawCallStub(stub); 823 return RawCallStub(stub);
824 } 824 }
825 825
826 826
827 Result VirtualFrame::CallJSFunction(int arg_count) {
828 Result function = Pop();
829
830 // InvokeFunction requires function in rdi. Move it in there.
831 function.ToRegister(rdi);
832 function.Unuse();
833
834 // +1 for receiver.
835 PrepareForCall(arg_count + 1, arg_count + 1);
836 ASSERT(cgen()->HasValidEntryRegisters());
837 ParameterCount count(arg_count);
838 __ InvokeFunction(rdi, count, CALL_FUNCTION);
839 RestoreContextRegister();
840 Result result = cgen()->allocator()->Allocate(rax);
841 ASSERT(result.is_valid());
842 return result;
843 }
844
845
827 void VirtualFrame::SyncElementBelowStackPointer(int index) { 846 void VirtualFrame::SyncElementBelowStackPointer(int index) {
828 // Emit code to write elements below the stack pointer to their 847 // Emit code to write elements below the stack pointer to their
829 // (already allocated) stack address. 848 // (already allocated) stack address.
830 ASSERT(index <= stack_pointer_); 849 ASSERT(index <= stack_pointer_);
831 FrameElement element = elements_[index]; 850 FrameElement element = elements_[index];
832 ASSERT(!element.is_synced()); 851 ASSERT(!element.is_synced());
833 switch (element.type()) { 852 switch (element.type()) {
834 case FrameElement::INVALID: 853 case FrameElement::INVALID:
835 break; 854 break;
836 855
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
1112 // Grow the expression stack by handler size less one (the return 1131 // Grow the expression stack by handler size less one (the return
1113 // address is already pushed by a call instruction). 1132 // address is already pushed by a call instruction).
1114 Adjust(kHandlerSize - 1); 1133 Adjust(kHandlerSize - 1);
1115 __ PushTryHandler(IN_JAVASCRIPT, type); 1134 __ PushTryHandler(IN_JAVASCRIPT, type);
1116 } 1135 }
1117 1136
1118 1137
1119 #undef __ 1138 #undef __
1120 1139
1121 } } // namespace v8::internal 1140 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/x64/virtual-frame-x64.h ('k') | test/mjsunit/fuzz-natives.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698