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 138443012: Reland ArrayPop / ArrayPush. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: 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/mips/stub-cache-mips.cc ('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 V(ArrayPop)
876
877
878 class CallStubCompiler: public StubCompiler { 871 class CallStubCompiler: public StubCompiler {
879 public: 872 public:
880 CallStubCompiler(Isolate* isolate, 873 CallStubCompiler(Isolate* isolate,
881 int argc, 874 int argc,
882 Code::Kind kind, 875 Code::Kind kind,
883 ExtraICState extra_state, 876 ExtraICState extra_state,
884 InlineCacheHolderFlag cache_holder = OWN_MAP); 877 InlineCacheHolderFlag cache_holder = OWN_MAP);
885 878
886 Handle<Code> CompileCallField(Handle<JSObject> object, 879 Handle<Code> CompileCallField(Handle<JSObject> object,
887 Handle<JSObject> holder, 880 Handle<JSObject> holder,
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
934 // 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
935 // 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
936 // given function. 929 // given function.
937 Handle<Code> CompileCustomCall(Handle<Object> object, 930 Handle<Code> CompileCustomCall(Handle<Object> object,
938 Handle<JSObject> holder, 931 Handle<JSObject> holder,
939 Handle<Cell> cell, 932 Handle<Cell> cell,
940 Handle<JSFunction> function, 933 Handle<JSFunction> function,
941 Handle<String> name, 934 Handle<String> name,
942 Code::StubType type); 935 Code::StubType type);
943 936
944 #define DECLARE_CALL_GENERATOR(name) \
945 Handle<Code> Compile##name##Call(Handle<Object> object, \
946 Handle<JSObject> holder, \
947 Handle<Cell> cell, \
948 Handle<JSFunction> function, \
949 Handle<String> fname, \
950 Code::StubType type);
951 CUSTOM_CALL_IC_GENERATORS(DECLARE_CALL_GENERATOR)
952 #undef DECLARE_CALL_GENERATOR
953
954 Handle<Code> CompileFastApiCall(const CallOptimization& optimization, 937 Handle<Code> CompileFastApiCall(const CallOptimization& optimization,
955 Handle<Object> object, 938 Handle<Object> object,
956 Handle<JSObject> holder, 939 Handle<JSObject> holder,
957 Handle<Cell> cell, 940 Handle<Cell> cell,
958 Handle<JSFunction> function, 941 Handle<JSFunction> function,
959 Handle<String> name); 942 Handle<String> name);
960 943
961 Handle<Code> GetCode(Code::StubType type, Handle<Name> name); 944 Handle<Code> GetCode(Code::StubType type, Handle<Name> name);
962 Handle<Code> GetCode(Handle<JSFunction> function); 945 Handle<Code> GetCode(Handle<JSFunction> function);
963 946
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
1042 Handle<JSFunction> constant_function_; 1025 Handle<JSFunction> constant_function_;
1043 bool is_simple_api_call_; 1026 bool is_simple_api_call_;
1044 Handle<FunctionTemplateInfo> expected_receiver_type_; 1027 Handle<FunctionTemplateInfo> expected_receiver_type_;
1045 Handle<CallHandlerInfo> api_call_info_; 1028 Handle<CallHandlerInfo> api_call_info_;
1046 }; 1029 };
1047 1030
1048 1031
1049 } } // namespace v8::internal 1032 } } // namespace v8::internal
1050 1033
1051 #endif // V8_STUB_CACHE_H_ 1034 #endif // V8_STUB_CACHE_H_
OLDNEW
« no previous file with comments | « src/mips/stub-cache-mips.cc ('k') | src/stub-cache.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698