| OLD | NEW |
| 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 |
| 11 // with the distribution. | 11 // with the distribution. |
| (...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 190 StrictModeFlag strict_mode); | 190 StrictModeFlag strict_mode); |
| 191 | 191 |
| 192 | 192 |
| 193 MUST_USE_RESULT MaybeObject* ComputeKeyedLoadOrStoreExternalArray( | 193 MUST_USE_RESULT MaybeObject* ComputeKeyedLoadOrStoreExternalArray( |
| 194 JSObject* receiver, | 194 JSObject* receiver, |
| 195 bool is_store, | 195 bool is_store, |
| 196 StrictModeFlag strict_mode); | 196 StrictModeFlag strict_mode); |
| 197 | 197 |
| 198 // --- | 198 // --- |
| 199 | 199 |
| 200 MUST_USE_RESULT MaybeObject* ComputeCallField(int argc, | 200 MUST_USE_RESULT MaybeObject* ComputeCallField( |
| 201 InLoopFlag in_loop, | 201 int argc, |
| 202 Code::Kind, | 202 InLoopFlag in_loop, |
| 203 String* name, | 203 Code::Kind, |
| 204 Object* object, | 204 Code::ExtraICState extra_ic_state, |
| 205 JSObject* holder, | 205 String* name, |
| 206 int index); | 206 Object* object, |
| 207 JSObject* holder, |
| 208 int index); |
| 207 | 209 |
| 208 MUST_USE_RESULT MaybeObject* ComputeCallConstant( | 210 MUST_USE_RESULT MaybeObject* ComputeCallConstant( |
| 209 int argc, | 211 int argc, |
| 210 InLoopFlag in_loop, | 212 InLoopFlag in_loop, |
| 211 Code::Kind, | 213 Code::Kind, |
| 212 Code::ExtraICState extra_ic_state, | 214 Code::ExtraICState extra_ic_state, |
| 213 String* name, | 215 String* name, |
| 214 Object* object, | 216 Object* object, |
| 215 JSObject* holder, | 217 JSObject* holder, |
| 216 JSFunction* function); | 218 JSFunction* function); |
| 217 | 219 |
| 218 MUST_USE_RESULT MaybeObject* ComputeCallNormal(int argc, | 220 MUST_USE_RESULT MaybeObject* ComputeCallNormal( |
| 219 InLoopFlag in_loop, | 221 int argc, |
| 220 Code::Kind, | 222 InLoopFlag in_loop, |
| 221 String* name, | 223 Code::Kind, |
| 222 JSObject* receiver); | 224 Code::ExtraICState extra_ic_state, |
| 225 String* name, |
| 226 JSObject* receiver); |
| 223 | 227 |
| 224 MUST_USE_RESULT MaybeObject* ComputeCallInterceptor(int argc, | 228 MUST_USE_RESULT MaybeObject* ComputeCallInterceptor( |
| 225 Code::Kind, | 229 int argc, |
| 226 String* name, | 230 Code::Kind, |
| 227 Object* object, | 231 Code::ExtraICState extra_ic_state, |
| 228 JSObject* holder); | 232 String* name, |
| 233 Object* object, |
| 234 JSObject* holder); |
| 229 | 235 |
| 230 MUST_USE_RESULT MaybeObject* ComputeCallGlobal( | 236 MUST_USE_RESULT MaybeObject* ComputeCallGlobal( |
| 231 int argc, | 237 int argc, |
| 232 InLoopFlag in_loop, | 238 InLoopFlag in_loop, |
| 233 Code::Kind, | 239 Code::Kind, |
| 240 Code::ExtraICState extra_ic_state, |
| 234 String* name, | 241 String* name, |
| 235 JSObject* receiver, | 242 JSObject* receiver, |
| 236 GlobalObject* holder, | 243 GlobalObject* holder, |
| 237 JSGlobalPropertyCell* cell, | 244 JSGlobalPropertyCell* cell, |
| 238 JSFunction* function); | 245 JSFunction* function); |
| 239 | 246 |
| 240 // --- | 247 // --- |
| 241 | 248 |
| 242 MUST_USE_RESULT MaybeObject* ComputeCallInitialize(int argc, | 249 MUST_USE_RESULT MaybeObject* ComputeCallInitialize(int argc, |
| 243 InLoopFlag in_loop, | 250 InLoopFlag in_loop, |
| 251 RelocInfo::Mode mode, |
| 244 Code::Kind kind); | 252 Code::Kind kind); |
| 245 | 253 |
| 246 Handle<Code> ComputeCallInitialize(int argc, InLoopFlag in_loop); | 254 Handle<Code> ComputeCallInitialize(int argc, |
| 255 InLoopFlag in_loop, |
| 256 RelocInfo::Mode mode); |
| 247 | 257 |
| 248 Handle<Code> ComputeKeyedCallInitialize(int argc, InLoopFlag in_loop); | 258 Handle<Code> ComputeKeyedCallInitialize(int argc, InLoopFlag in_loop); |
| 249 | 259 |
| 250 MUST_USE_RESULT MaybeObject* ComputeCallPreMonomorphic( | 260 MUST_USE_RESULT MaybeObject* ComputeCallPreMonomorphic( |
| 251 int argc, | 261 int argc, |
| 252 InLoopFlag in_loop, | 262 InLoopFlag in_loop, |
| 253 Code::Kind kind); | 263 Code::Kind kind, |
| 264 Code::ExtraICState extra_ic_state); |
| 254 | 265 |
| 255 MUST_USE_RESULT MaybeObject* ComputeCallNormal(int argc, | 266 MUST_USE_RESULT MaybeObject* ComputeCallNormal(int argc, |
| 256 InLoopFlag in_loop, | 267 InLoopFlag in_loop, |
| 257 Code::Kind kind); | 268 Code::Kind kind, |
| 269 Code::ExtraICState state); |
| 258 | 270 |
| 259 MUST_USE_RESULT MaybeObject* ComputeCallMegamorphic(int argc, | 271 MUST_USE_RESULT MaybeObject* ComputeCallMegamorphic(int argc, |
| 260 InLoopFlag in_loop, | 272 InLoopFlag in_loop, |
| 261 Code::Kind kind); | 273 Code::Kind kind, |
| 274 Code::ExtraICState state); |
| 262 | 275 |
| 263 MUST_USE_RESULT MaybeObject* ComputeCallMiss(int argc, Code::Kind kind); | 276 MUST_USE_RESULT MaybeObject* ComputeCallMiss(int argc, |
| 277 Code::Kind kind, |
| 278 Code::ExtraICState state); |
| 264 | 279 |
| 265 // Finds the Code object stored in the Heap::non_monomorphic_cache(). | 280 // Finds the Code object stored in the Heap::non_monomorphic_cache(). |
| 266 MUST_USE_RESULT Code* FindCallInitialize(int argc, | 281 MUST_USE_RESULT Code* FindCallInitialize(int argc, |
| 267 InLoopFlag in_loop, | 282 InLoopFlag in_loop, |
| 283 RelocInfo::Mode mode, |
| 268 Code::Kind kind); | 284 Code::Kind kind); |
| 269 | 285 |
| 270 #ifdef ENABLE_DEBUGGER_SUPPORT | 286 #ifdef ENABLE_DEBUGGER_SUPPORT |
| 271 MUST_USE_RESULT MaybeObject* ComputeCallDebugBreak(int argc, Code::Kind kind); | 287 MUST_USE_RESULT MaybeObject* ComputeCallDebugBreak(int argc, Code::Kind kind); |
| 272 | 288 |
| 273 MUST_USE_RESULT MaybeObject* ComputeCallDebugPrepareStepIn(int argc, | 289 MUST_USE_RESULT MaybeObject* ComputeCallDebugPrepareStepIn(int argc, |
| 274 Code::Kind kind); | 290 Code::Kind kind); |
| 275 #endif | 291 #endif |
| 276 | 292 |
| 277 // Update cache for entry hash(name, map). | 293 // Update cache for entry hash(name, map). |
| (...skipping 436 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 714 int index, | 730 int index, |
| 715 String* name); | 731 String* name); |
| 716 MUST_USE_RESULT MaybeObject* CompileCallConstant(Object* object, | 732 MUST_USE_RESULT MaybeObject* CompileCallConstant(Object* object, |
| 717 JSObject* holder, | 733 JSObject* holder, |
| 718 JSFunction* function, | 734 JSFunction* function, |
| 719 String* name, | 735 String* name, |
| 720 CheckType check); | 736 CheckType check); |
| 721 MUST_USE_RESULT MaybeObject* CompileCallInterceptor(JSObject* object, | 737 MUST_USE_RESULT MaybeObject* CompileCallInterceptor(JSObject* object, |
| 722 JSObject* holder, | 738 JSObject* holder, |
| 723 String* name); | 739 String* name); |
| 724 MUST_USE_RESULT MaybeObject* CompileCallGlobal(JSObject* object, | 740 MUST_USE_RESULT MaybeObject* CompileCallGlobal( |
| 725 GlobalObject* holder, | 741 JSObject* object, |
| 726 JSGlobalPropertyCell* cell, | 742 GlobalObject* holder, |
| 727 JSFunction* function, | 743 JSGlobalPropertyCell* cell, |
| 728 String* name); | 744 JSFunction* function, |
| 745 String* name, |
| 746 Code::ExtraICState extra_ic_state); |
| 729 | 747 |
| 730 static bool HasCustomCallGenerator(JSFunction* function); | 748 static bool HasCustomCallGenerator(JSFunction* function); |
| 731 | 749 |
| 732 private: | 750 private: |
| 733 // Compiles a custom call constant/global IC. For constant calls | 751 // Compiles a custom call constant/global IC. For constant calls |
| 734 // cell is NULL. Returns undefined if there is no custom call code | 752 // cell is NULL. Returns undefined if there is no custom call code |
| 735 // for the given function or it can't be generated. | 753 // for the given function or it can't be generated. |
| 736 MUST_USE_RESULT MaybeObject* CompileCustomCall(Object* object, | 754 MUST_USE_RESULT MaybeObject* CompileCustomCall(Object* object, |
| 737 JSObject* holder, | 755 JSObject* holder, |
| 738 JSGlobalPropertyCell* cell, | 756 JSGlobalPropertyCell* cell, |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 858 MUST_USE_RESULT MaybeObject* CompileKeyedStoreStub( | 876 MUST_USE_RESULT MaybeObject* CompileKeyedStoreStub( |
| 859 JSObject* receiver, ExternalArrayType array_type, Code::Flags flags); | 877 JSObject* receiver, ExternalArrayType array_type, Code::Flags flags); |
| 860 | 878 |
| 861 private: | 879 private: |
| 862 MaybeObject* GetCode(Code::Flags flags); | 880 MaybeObject* GetCode(Code::Flags flags); |
| 863 }; | 881 }; |
| 864 | 882 |
| 865 } } // namespace v8::internal | 883 } } // namespace v8::internal |
| 866 | 884 |
| 867 #endif // V8_STUB_CACHE_H_ | 885 #endif // V8_STUB_CACHE_H_ |
| OLD | NEW |