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/stub-cache.h

Issue 137693003: Remove ArrayPush from the custom call generators, and instead call directly to the handler in crank… (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comments (+ rebase..) Created 6 years, 11 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/isolate.h ('k') | src/stub-cache.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 850 matching lines...) Expand 10 before | Expand all | Expand 10 after
861 } 861 }
862 862
863 Register transition_map() { 863 Register transition_map() {
864 return registers()[3]; 864 return registers()[3];
865 } 865 }
866 866
867 friend class BaseLoadStoreStubCompiler; 867 friend class BaseLoadStoreStubCompiler;
868 }; 868 };
869 869
870 870
871 // Subset of FUNCTIONS_WITH_ID_LIST with custom constant/global call
872 // IC stubs.
873 #define CUSTOM_CALL_IC_GENERATORS(V) \
874 V(ArrayPush)
875
876
877 class CallStubCompiler: public StubCompiler { 871 class CallStubCompiler: public StubCompiler {
878 public: 872 public:
879 CallStubCompiler(Isolate* isolate, 873 CallStubCompiler(Isolate* isolate,
880 int argc, 874 int argc,
881 Code::Kind kind, 875 Code::Kind kind,
882 ExtraICState extra_state, 876 ExtraICState extra_state,
883 InlineCacheHolderFlag cache_holder = OWN_MAP); 877 InlineCacheHolderFlag cache_holder = OWN_MAP);
884 878
885 Handle<Code> CompileCallField(Handle<JSObject> object, 879 Handle<Code> CompileCallField(Handle<JSObject> object,
886 Handle<JSObject> holder, 880 Handle<JSObject> holder,
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
933 // Compiles a custom call constant/global IC. For constant calls cell is 927 // Compiles a custom call constant/global IC. For constant calls cell is
934 // NULL. Returns an empty handle if there is no custom call code for the 928 // NULL. Returns an empty handle if there is no custom call code for the
935 // given function. 929 // given function.
936 Handle<Code> CompileCustomCall(Handle<Object> object, 930 Handle<Code> CompileCustomCall(Handle<Object> object,
937 Handle<JSObject> holder, 931 Handle<JSObject> holder,
938 Handle<Cell> cell, 932 Handle<Cell> cell,
939 Handle<JSFunction> function, 933 Handle<JSFunction> function,
940 Handle<String> name, 934 Handle<String> name,
941 Code::StubType type); 935 Code::StubType type);
942 936
943 #define DECLARE_CALL_GENERATOR(name) \
944 Handle<Code> Compile##name##Call(Handle<Object> object, \
945 Handle<JSObject> holder, \
946 Handle<Cell> cell, \
947 Handle<JSFunction> function, \
948 Handle<String> fname, \
949 Code::StubType type);
950 CUSTOM_CALL_IC_GENERATORS(DECLARE_CALL_GENERATOR)
951 #undef DECLARE_CALL_GENERATOR
952
953 Handle<Code> CompileFastApiCall(const CallOptimization& optimization, 937 Handle<Code> CompileFastApiCall(const CallOptimization& optimization,
954 Handle<Object> object, 938 Handle<Object> object,
955 Handle<JSObject> holder, 939 Handle<JSObject> holder,
956 Handle<Cell> cell, 940 Handle<Cell> cell,
957 Handle<JSFunction> function, 941 Handle<JSFunction> function,
958 Handle<String> name); 942 Handle<String> name);
959 943
960 Handle<Code> GetCode(Code::StubType type, Handle<Name> name); 944 Handle<Code> GetCode(Code::StubType type, Handle<Name> name);
961 Handle<Code> GetCode(Handle<JSFunction> function); 945 Handle<Code> GetCode(Handle<JSFunction> function);
962 946
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
1041 Handle<JSFunction> constant_function_; 1025 Handle<JSFunction> constant_function_;
1042 bool is_simple_api_call_; 1026 bool is_simple_api_call_;
1043 Handle<FunctionTemplateInfo> expected_receiver_type_; 1027 Handle<FunctionTemplateInfo> expected_receiver_type_;
1044 Handle<CallHandlerInfo> api_call_info_; 1028 Handle<CallHandlerInfo> api_call_info_;
1045 }; 1029 };
1046 1030
1047 1031
1048 } } // namespace v8::internal 1032 } } // namespace v8::internal
1049 1033
1050 #endif // V8_STUB_CACHE_H_ 1034 #endif // V8_STUB_CACHE_H_
OLDNEW
« no previous file with comments | « src/isolate.h ('k') | src/stub-cache.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698