| 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 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 Code::Kind, | 131 Code::Kind, |
| 132 ExtraICState extra_state, | 132 ExtraICState extra_state, |
| 133 Handle<Name> name, | 133 Handle<Name> name, |
| 134 Handle<JSObject> object, | 134 Handle<JSObject> object, |
| 135 Handle<GlobalObject> holder, | 135 Handle<GlobalObject> holder, |
| 136 Handle<PropertyCell> cell, | 136 Handle<PropertyCell> cell, |
| 137 Handle<JSFunction> function); | 137 Handle<JSFunction> function); |
| 138 | 138 |
| 139 // --- | 139 // --- |
| 140 | 140 |
| 141 Handle<Code> ComputeCallInitialize(int argc, ContextualMode mode); | 141 Handle<Code> ComputeCallInitialize(int argc); |
| 142 | 142 |
| 143 Handle<Code> ComputeKeyedCallInitialize(int argc); | 143 Handle<Code> ComputeKeyedCallInitialize(int argc); |
| 144 | 144 |
| 145 Handle<Code> ComputeCallPreMonomorphic(int argc, | 145 Handle<Code> ComputeCallPreMonomorphic(int argc, |
| 146 Code::Kind kind, | 146 Code::Kind kind, |
| 147 ExtraICState extra_state); | 147 ExtraICState extra_state); |
| 148 | 148 |
| 149 Handle<Code> ComputeCallNormal(int argc, | 149 Handle<Code> ComputeCallNormal(int argc, |
| 150 Code::Kind kind, | 150 Code::Kind kind, |
| 151 ExtraICState state); | 151 ExtraICState state); |
| (...skipping 26 matching lines...) Expand all Loading... |
| 178 KeyedAccessStoreMode store_mode, | 178 KeyedAccessStoreMode store_mode, |
| 179 StrictModeFlag strict_mode); | 179 StrictModeFlag strict_mode); |
| 180 | 180 |
| 181 Handle<Code> ComputePolymorphicIC(TypeHandleList* types, | 181 Handle<Code> ComputePolymorphicIC(TypeHandleList* types, |
| 182 CodeHandleList* handlers, | 182 CodeHandleList* handlers, |
| 183 int number_of_valid_maps, | 183 int number_of_valid_maps, |
| 184 Handle<Name> name, | 184 Handle<Name> name, |
| 185 ExtraICState extra_ic_state); | 185 ExtraICState extra_ic_state); |
| 186 | 186 |
| 187 // Finds the Code object stored in the Heap::non_monomorphic_cache(). | 187 // Finds the Code object stored in the Heap::non_monomorphic_cache(). |
| 188 Code* FindCallInitialize(int argc, ContextualMode mode, Code::Kind kind); | 188 Code* FindCallInitialize(int argc, Code::Kind kind); |
| 189 Code* FindPreMonomorphicIC(Code::Kind kind, ExtraICState extra_ic_state); | 189 Code* FindPreMonomorphicIC(Code::Kind kind, ExtraICState extra_ic_state); |
| 190 | 190 |
| 191 #ifdef ENABLE_DEBUGGER_SUPPORT | 191 #ifdef ENABLE_DEBUGGER_SUPPORT |
| 192 Handle<Code> ComputeCallDebugBreak(int argc, Code::Kind kind); | 192 Handle<Code> ComputeCallDebugBreak(int argc, Code::Kind kind); |
| 193 | 193 |
| 194 Handle<Code> ComputeCallDebugPrepareStepIn(int argc, Code::Kind kind); | 194 Handle<Code> ComputeCallDebugPrepareStepIn(int argc, Code::Kind kind); |
| 195 #endif | 195 #endif |
| 196 | 196 |
| 197 // Update cache for entry hash(name, map). | 197 // Update cache for entry hash(name, map). |
| 198 Code* Set(Name* name, Map* map, Code* code); | 198 Code* Set(Name* name, Map* map, Code* code); |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 262 // LoadWithInterceptor. | 262 // LoadWithInterceptor. |
| 263 static const int kInterceptorArgsNameIndex = 0; | 263 static const int kInterceptorArgsNameIndex = 0; |
| 264 static const int kInterceptorArgsInfoIndex = 1; | 264 static const int kInterceptorArgsInfoIndex = 1; |
| 265 static const int kInterceptorArgsThisIndex = 2; | 265 static const int kInterceptorArgsThisIndex = 2; |
| 266 static const int kInterceptorArgsHolderIndex = 3; | 266 static const int kInterceptorArgsHolderIndex = 3; |
| 267 static const int kInterceptorArgsLength = 4; | 267 static const int kInterceptorArgsLength = 4; |
| 268 | 268 |
| 269 private: | 269 private: |
| 270 explicit StubCache(Isolate* isolate); | 270 explicit StubCache(Isolate* isolate); |
| 271 | 271 |
| 272 Handle<Code> ComputeCallInitialize(int argc, | 272 Handle<Code> ComputeCallInitialize(int argc, Code::Kind kind); |
| 273 ContextualMode mode, | |
| 274 Code::Kind kind); | |
| 275 | 273 |
| 276 // The stub cache has a primary and secondary level. The two levels have | 274 // The stub cache has a primary and secondary level. The two levels have |
| 277 // different hashing algorithms in order to avoid simultaneous collisions | 275 // different hashing algorithms in order to avoid simultaneous collisions |
| 278 // in both caches. Unlike a probing strategy (quadratic or otherwise) the | 276 // in both caches. Unlike a probing strategy (quadratic or otherwise) the |
| 279 // update strategy on updates is fairly clear and simple: Any existing entry | 277 // update strategy on updates is fairly clear and simple: Any existing entry |
| 280 // in the primary cache is moved to the secondary cache, and secondary cache | 278 // in the primary cache is moved to the secondary cache, and secondary cache |
| 281 // entries are overwritten. | 279 // entries are overwritten. |
| 282 | 280 |
| 283 // Hash algorithm for the primary table. This algorithm is replicated in | 281 // Hash algorithm for the primary table. This algorithm is replicated in |
| 284 // assembler for every architecture. Returns an index into the table that | 282 // assembler for every architecture. Returns an index into the table that |
| (...skipping 790 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1075 Handle<JSFunction> constant_function_; | 1073 Handle<JSFunction> constant_function_; |
| 1076 bool is_simple_api_call_; | 1074 bool is_simple_api_call_; |
| 1077 Handle<FunctionTemplateInfo> expected_receiver_type_; | 1075 Handle<FunctionTemplateInfo> expected_receiver_type_; |
| 1078 Handle<CallHandlerInfo> api_call_info_; | 1076 Handle<CallHandlerInfo> api_call_info_; |
| 1079 }; | 1077 }; |
| 1080 | 1078 |
| 1081 | 1079 |
| 1082 } } // namespace v8::internal | 1080 } } // namespace v8::internal |
| 1083 | 1081 |
| 1084 #endif // V8_STUB_CACHE_H_ | 1082 #endif // V8_STUB_CACHE_H_ |
| OLD | NEW |