| OLD | NEW |
| 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 888 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 899 | 899 |
| 900 // Subset of FUNCTIONS_WITH_ID_LIST with custom constant/global call | 900 // Subset of FUNCTIONS_WITH_ID_LIST with custom constant/global call |
| 901 // IC stubs. | 901 // IC stubs. |
| 902 #define CUSTOM_CALL_IC_GENERATORS(V) \ | 902 #define CUSTOM_CALL_IC_GENERATORS(V) \ |
| 903 V(ArrayPush) \ | 903 V(ArrayPush) \ |
| 904 V(ArrayPop) \ | 904 V(ArrayPop) \ |
| 905 V(StringCharCodeAt) \ | 905 V(StringCharCodeAt) \ |
| 906 V(StringCharAt) \ | 906 V(StringCharAt) \ |
| 907 V(StringFromCharCode) \ | 907 V(StringFromCharCode) \ |
| 908 V(MathFloor) \ | 908 V(MathFloor) \ |
| 909 V(MathAbs) \ | 909 V(MathAbs) |
| 910 V(ArrayCode) | |
| 911 | |
| 912 | |
| 913 #define SITE_SPECIFIC_CALL_GENERATORS(V) \ | |
| 914 V(ArrayCode) | |
| 915 | 910 |
| 916 | 911 |
| 917 class CallStubCompiler: public StubCompiler { | 912 class CallStubCompiler: public StubCompiler { |
| 918 public: | 913 public: |
| 919 CallStubCompiler(Isolate* isolate, | 914 CallStubCompiler(Isolate* isolate, |
| 920 int argc, | 915 int argc, |
| 921 Code::Kind kind, | 916 Code::Kind kind, |
| 922 ExtraICState extra_state, | 917 ExtraICState extra_state, |
| 923 InlineCacheHolderFlag cache_holder = OWN_MAP); | 918 InlineCacheHolderFlag cache_holder = OWN_MAP); |
| 924 | 919 |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 961 Handle<JSObject> holder, | 956 Handle<JSObject> holder, |
| 962 Handle<Name> name); | 957 Handle<Name> name); |
| 963 | 958 |
| 964 Handle<Code> CompileCallGlobal(Handle<JSObject> object, | 959 Handle<Code> CompileCallGlobal(Handle<JSObject> object, |
| 965 Handle<GlobalObject> holder, | 960 Handle<GlobalObject> holder, |
| 966 Handle<PropertyCell> cell, | 961 Handle<PropertyCell> cell, |
| 967 Handle<JSFunction> function, | 962 Handle<JSFunction> function, |
| 968 Handle<Name> name); | 963 Handle<Name> name); |
| 969 | 964 |
| 970 static bool HasCustomCallGenerator(Handle<JSFunction> function); | 965 static bool HasCustomCallGenerator(Handle<JSFunction> function); |
| 971 static bool CanBeCached(Handle<JSFunction> function); | |
| 972 | 966 |
| 973 private: | 967 private: |
| 974 // Compiles a custom call constant/global IC. For constant calls cell is | 968 // Compiles a custom call constant/global IC. For constant calls cell is |
| 975 // NULL. Returns an empty handle if there is no custom call code for the | 969 // NULL. Returns an empty handle if there is no custom call code for the |
| 976 // given function. | 970 // given function. |
| 977 Handle<Code> CompileCustomCall(Handle<Object> object, | 971 Handle<Code> CompileCustomCall(Handle<Object> object, |
| 978 Handle<JSObject> holder, | 972 Handle<JSObject> holder, |
| 979 Handle<Cell> cell, | 973 Handle<Cell> cell, |
| 980 Handle<JSFunction> function, | 974 Handle<JSFunction> function, |
| 981 Handle<String> name, | 975 Handle<String> name, |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1073 Handle<JSFunction> constant_function_; | 1067 Handle<JSFunction> constant_function_; |
| 1074 bool is_simple_api_call_; | 1068 bool is_simple_api_call_; |
| 1075 Handle<FunctionTemplateInfo> expected_receiver_type_; | 1069 Handle<FunctionTemplateInfo> expected_receiver_type_; |
| 1076 Handle<CallHandlerInfo> api_call_info_; | 1070 Handle<CallHandlerInfo> api_call_info_; |
| 1077 }; | 1071 }; |
| 1078 | 1072 |
| 1079 | 1073 |
| 1080 } } // namespace v8::internal | 1074 } } // namespace v8::internal |
| 1081 | 1075 |
| 1082 #endif // V8_STUB_CACHE_H_ | 1076 #endif // V8_STUB_CACHE_H_ |
| OLD | NEW |