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

Side by Side Diff: src/ia32/virtual-frame-ia32.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/ia32/virtual-frame-ia32.h ('k') | src/runtime.h » ('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 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 891 matching lines...) Expand 10 before | Expand all | Expand 10 after
902 arg1->ToRegister(eax); 902 arg1->ToRegister(eax);
903 arg0->ToRegister(edx); 903 arg0->ToRegister(edx);
904 } 904 }
905 905
906 arg0->Unuse(); 906 arg0->Unuse();
907 arg1->Unuse(); 907 arg1->Unuse();
908 return RawCallStub(stub); 908 return RawCallStub(stub);
909 } 909 }
910 910
911 911
912 Result VirtualFrame::CallJSFunction(int arg_count) {
913 Result function = Pop();
914
915 // InvokeFunction requires function in edi. Move it in there.
916 function.ToRegister(edi);
917 function.Unuse();
918
919 // +1 for receiver.
920 PrepareForCall(arg_count + 1, arg_count + 1);
921 ASSERT(cgen()->HasValidEntryRegisters());
922 ParameterCount count(arg_count);
923 __ InvokeFunction(edi, count, CALL_FUNCTION);
924 RestoreContextRegister();
925 Result result = cgen()->allocator()->Allocate(eax);
926 ASSERT(result.is_valid());
927 return result;
928 }
929
930
912 Result VirtualFrame::CallRuntime(Runtime::Function* f, int arg_count) { 931 Result VirtualFrame::CallRuntime(Runtime::Function* f, int arg_count) {
913 PrepareForCall(arg_count, arg_count); 932 PrepareForCall(arg_count, arg_count);
914 ASSERT(cgen()->HasValidEntryRegisters()); 933 ASSERT(cgen()->HasValidEntryRegisters());
915 __ CallRuntime(f, arg_count); 934 __ CallRuntime(f, arg_count);
916 Result result = cgen()->allocator()->Allocate(eax); 935 Result result = cgen()->allocator()->Allocate(eax);
917 ASSERT(result.is_valid()); 936 ASSERT(result.is_valid());
918 return result; 937 return result;
919 } 938 }
920 939
921 940
(...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after
1284 return; 1303 return;
1285 } 1304 }
1286 } 1305 }
1287 UNREACHABLE(); 1306 UNREACHABLE();
1288 } 1307 }
1289 1308
1290 1309
1291 #undef __ 1310 #undef __
1292 1311
1293 } } // namespace v8::internal 1312 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/ia32/virtual-frame-ia32.h ('k') | src/runtime.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698