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

Side by Side Diff: src/x64/stub-cache-x64.cc

Issue 594055: Change the interface of CallStubCompiler::CompileCallInterceptor. (Closed)
Patch Set: Created 10 years, 10 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/stub-cache.cc ('k') | no next file » | 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 853 matching lines...) Expand 10 before | Expand all | Expand 10 after
864 // Handle call cache miss. 864 // Handle call cache miss.
865 __ bind(&miss); 865 __ bind(&miss);
866 Handle<Code> ic = ComputeCallMiss(arguments().immediate()); 866 Handle<Code> ic = ComputeCallMiss(arguments().immediate());
867 __ Jump(ic, RelocInfo::CODE_TARGET); 867 __ Jump(ic, RelocInfo::CODE_TARGET);
868 868
869 // Return the generated code. 869 // Return the generated code.
870 return GetCode(FIELD, name); 870 return GetCode(FIELD, name);
871 } 871 }
872 872
873 873
874 Object* CallStubCompiler::CompileCallInterceptor(Object* object, 874 Object* CallStubCompiler::CompileCallInterceptor(JSObject* object,
875 JSObject* holder, 875 JSObject* holder,
876 String* name) { 876 String* name) {
877 // ----------- S t a t e ------------- 877 // ----------- S t a t e -------------
878 // rcx : function name 878 // rcx : function name
879 // rsp[0] : return address 879 // rsp[0] : return address
880 // rsp[8] : argument argc 880 // rsp[8] : argument argc
881 // rsp[16] : argument argc - 1 881 // rsp[16] : argument argc - 1
882 // ... 882 // ...
883 // rsp[argc * 8] : argument 1 883 // rsp[argc * 8] : argument 1
884 // rsp[(argc + 1) * 8] : argument 0 = receiver 884 // rsp[(argc + 1) * 8] : argument 0 = receiver
885 // ----------------------------------- 885 // -----------------------------------
886 Label miss; 886 Label miss;
887 887
888 // Get the number of arguments. 888 // Get the number of arguments.
889 const int argc = arguments().immediate(); 889 const int argc = arguments().immediate();
890 890
891 LookupResult lookup; 891 LookupResult lookup;
892 LookupPostInterceptor(holder, name, &lookup); 892 LookupPostInterceptor(holder, name, &lookup);
893 893
894 // Get the receiver from the stack. 894 // Get the receiver from the stack.
895 __ movq(rdx, Operand(rsp, (argc + 1) * kPointerSize)); 895 __ movq(rdx, Operand(rsp, (argc + 1) * kPointerSize));
896 896
897 CallInterceptorCompiler compiler(arguments(), rcx); 897 CallInterceptorCompiler compiler(arguments(), rcx);
898 CompileLoadInterceptor(&compiler, 898 CompileLoadInterceptor(&compiler,
899 this, 899 this,
900 masm(), 900 masm(),
901 JSObject::cast(object), 901 object,
902 holder, 902 holder,
903 name, 903 name,
904 &lookup, 904 &lookup,
905 rdx, 905 rdx,
906 rbx, 906 rbx,
907 rdi, 907 rdi,
908 &miss); 908 &miss);
909 909
910 // Restore receiver. 910 // Restore receiver.
911 __ movq(rdx, Operand(rsp, (argc + 1) * kPointerSize)); 911 __ movq(rdx, Operand(rsp, (argc + 1) * kPointerSize));
(...skipping 970 matching lines...) Expand 10 before | Expand all | Expand 10 after
1882 __ Jump(generic_construct_stub, RelocInfo::CODE_TARGET); 1882 __ Jump(generic_construct_stub, RelocInfo::CODE_TARGET);
1883 1883
1884 // Return the generated code. 1884 // Return the generated code.
1885 return GetCode(); 1885 return GetCode();
1886 } 1886 }
1887 1887
1888 1888
1889 #undef __ 1889 #undef __
1890 1890
1891 } } // namespace v8::internal 1891 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/stub-cache.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698