| OLD | NEW |
| 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 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 12 matching lines...) Expand all Loading... |
| 23 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 23 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
| 24 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 24 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 27 | 27 |
| 28 #ifndef V8_STUB_CACHE_H_ | 28 #ifndef V8_STUB_CACHE_H_ |
| 29 #define V8_STUB_CACHE_H_ | 29 #define V8_STUB_CACHE_H_ |
| 30 | 30 |
| 31 #include "arguments.h" | 31 #include "arguments.h" |
| 32 #include "macro-assembler.h" | 32 #include "macro-assembler.h" |
| 33 #include "zone-inl.h" |
| 33 | 34 |
| 34 namespace v8 { | 35 namespace v8 { |
| 35 namespace internal { | 36 namespace internal { |
| 36 | 37 |
| 37 | 38 |
| 38 // The stub cache is used for megamorphic calls and property accesses. | 39 // The stub cache is used for megamorphic calls and property accesses. |
| 39 // It maps (map, name, type)->Code* | 40 // It maps (map, name, type)->Code* |
| 40 | 41 |
| 41 // The design of the table uses the inline cache stubs used for | 42 // The design of the table uses the inline cache stubs used for |
| 42 // mono-morphic calls. The beauty of this, we do not have to | 43 // mono-morphic calls. The beauty of this, we do not have to |
| (...skipping 17 matching lines...) Expand all Loading... |
| 60 | 61 |
| 61 class StubCache { | 62 class StubCache { |
| 62 public: | 63 public: |
| 63 struct Entry { | 64 struct Entry { |
| 64 String* key; | 65 String* key; |
| 65 Code* value; | 66 Code* value; |
| 66 }; | 67 }; |
| 67 | 68 |
| 68 void Initialize(bool create_heap_objects); | 69 void Initialize(bool create_heap_objects); |
| 69 | 70 |
| 71 |
| 70 // Computes the right stub matching. Inserts the result in the | 72 // Computes the right stub matching. Inserts the result in the |
| 71 // cache before returning. This might compile a stub if needed. | 73 // cache before returning. This might compile a stub if needed. |
| 72 MUST_USE_RESULT MaybeObject* ComputeLoadNonexistent(String* name, | 74 MUST_USE_RESULT MaybeObject* ComputeLoadNonexistent( |
| 73 JSObject* receiver); | 75 String* name, |
| 76 JSObject* receiver); |
| 74 | 77 |
| 75 MUST_USE_RESULT MaybeObject* ComputeLoadField(String* name, | 78 MUST_USE_RESULT MaybeObject* ComputeLoadField(String* name, |
| 76 JSObject* receiver, | 79 JSObject* receiver, |
| 77 JSObject* holder, | 80 JSObject* holder, |
| 78 int field_index); | 81 int field_index); |
| 79 | 82 |
| 80 MUST_USE_RESULT MaybeObject* ComputeLoadCallback(String* name, | 83 MUST_USE_RESULT MaybeObject* ComputeLoadCallback( |
| 81 JSObject* receiver, | 84 String* name, |
| 82 JSObject* holder, | 85 JSObject* receiver, |
| 83 AccessorInfo* callback); | 86 JSObject* holder, |
| 87 AccessorInfo* callback); |
| 84 | 88 |
| 85 MUST_USE_RESULT MaybeObject* ComputeLoadConstant(String* name, | 89 MUST_USE_RESULT MaybeObject* ComputeLoadConstant(String* name, |
| 86 JSObject* receiver, | 90 JSObject* receiver, |
| 87 JSObject* holder, | 91 JSObject* holder, |
| 88 Object* value); | 92 Object* value); |
| 89 | 93 |
| 90 MUST_USE_RESULT MaybeObject* ComputeLoadInterceptor(String* name, | 94 MUST_USE_RESULT MaybeObject* ComputeLoadInterceptor( |
| 91 JSObject* receiver, | 95 String* name, |
| 92 JSObject* holder); | 96 JSObject* receiver, |
| 97 JSObject* holder); |
| 93 | 98 |
| 94 MUST_USE_RESULT MaybeObject* ComputeLoadNormal(); | 99 MUST_USE_RESULT MaybeObject* ComputeLoadNormal(); |
| 95 | 100 |
| 96 MUST_USE_RESULT MaybeObject* ComputeLoadGlobal(String* name, | 101 |
| 97 JSObject* receiver, | 102 MUST_USE_RESULT MaybeObject* ComputeLoadGlobal( |
| 98 GlobalObject* holder, | 103 String* name, |
| 99 JSGlobalPropertyCell* cell, | 104 JSObject* receiver, |
| 100 bool is_dont_delete); | 105 GlobalObject* holder, |
| 106 JSGlobalPropertyCell* cell, |
| 107 bool is_dont_delete); |
| 108 |
| 101 | 109 |
| 102 // --- | 110 // --- |
| 103 | 111 |
| 104 MUST_USE_RESULT MaybeObject* ComputeKeyedLoadField(String* name, | 112 MUST_USE_RESULT MaybeObject* ComputeKeyedLoadField(String* name, |
| 105 JSObject* receiver, | 113 JSObject* receiver, |
| 106 JSObject* holder, | 114 JSObject* holder, |
| 107 int field_index); | 115 int field_index); |
| 108 | 116 |
| 109 MUST_USE_RESULT MaybeObject* ComputeKeyedLoadCallback(String* name, | 117 MUST_USE_RESULT MaybeObject* ComputeKeyedLoadCallback( |
| 110 JSObject* receiver, | 118 String* name, |
| 111 JSObject* holder, | 119 JSObject* receiver, |
| 112 AccessorInfo* callback); | 120 JSObject* holder, |
| 121 AccessorInfo* callback); |
| 113 | 122 |
| 114 MUST_USE_RESULT MaybeObject* ComputeKeyedLoadConstant(String* name, | 123 MUST_USE_RESULT MaybeObject* ComputeKeyedLoadConstant( |
| 115 JSObject* receiver, | 124 String* name, |
| 116 JSObject* holder, | 125 JSObject* receiver, |
| 117 Object* value); | 126 JSObject* holder, |
| 127 Object* value); |
| 118 | 128 |
| 119 MUST_USE_RESULT MaybeObject* ComputeKeyedLoadInterceptor(String* name, | 129 MUST_USE_RESULT MaybeObject* ComputeKeyedLoadInterceptor( |
| 120 JSObject* receiver, | 130 String* name, |
| 121 JSObject* holder); | 131 JSObject* receiver, |
| 132 JSObject* holder); |
| 122 | 133 |
| 123 MUST_USE_RESULT MaybeObject* ComputeKeyedLoadArrayLength(String* name, | 134 MUST_USE_RESULT MaybeObject* ComputeKeyedLoadArrayLength( |
| 124 JSArray* receiver); | 135 String* name, |
| 136 JSArray* receiver); |
| 125 | 137 |
| 126 MUST_USE_RESULT MaybeObject* ComputeKeyedLoadStringLength(String* name, | 138 MUST_USE_RESULT MaybeObject* ComputeKeyedLoadStringLength( |
| 127 String* receiver); | 139 String* name, |
| 140 String* receiver); |
| 128 | 141 |
| 129 MUST_USE_RESULT MaybeObject* ComputeKeyedLoadFunctionPrototype( | 142 MUST_USE_RESULT MaybeObject* ComputeKeyedLoadFunctionPrototype( |
| 130 String* name, JSFunction* receiver); | 143 String* name, |
| 144 JSFunction* receiver); |
| 145 |
| 146 MUST_USE_RESULT MaybeObject* ComputeKeyedLoadSpecialized( |
| 147 JSObject* receiver); |
| 131 | 148 |
| 132 // --- | 149 // --- |
| 133 | 150 |
| 134 MUST_USE_RESULT MaybeObject* ComputeStoreField(String* name, | 151 MUST_USE_RESULT MaybeObject* ComputeStoreField(String* name, |
| 135 JSObject* receiver, | 152 JSObject* receiver, |
| 136 int field_index, | 153 int field_index, |
| 137 Map* transition = NULL); | 154 Map* transition = NULL); |
| 138 | 155 |
| 139 MUST_USE_RESULT MaybeObject* ComputeStoreNormal(); | 156 MUST_USE_RESULT MaybeObject* ComputeStoreNormal(); |
| 140 | 157 |
| 141 MUST_USE_RESULT MaybeObject* ComputeStoreGlobal(String* name, | 158 MUST_USE_RESULT MaybeObject* ComputeStoreGlobal( |
| 142 GlobalObject* receiver, | 159 String* name, |
| 143 JSGlobalPropertyCell* cell); | 160 GlobalObject* receiver, |
| 161 JSGlobalPropertyCell* cell); |
| 144 | 162 |
| 145 MUST_USE_RESULT MaybeObject* ComputeStoreCallback(String* name, | 163 MUST_USE_RESULT MaybeObject* ComputeStoreCallback( |
| 146 JSObject* receiver, | 164 String* name, |
| 147 AccessorInfo* callback); | 165 JSObject* receiver, |
| 166 AccessorInfo* callback); |
| 148 | 167 |
| 149 MUST_USE_RESULT MaybeObject* ComputeStoreInterceptor(String* name, | 168 MUST_USE_RESULT MaybeObject* ComputeStoreInterceptor( |
| 150 JSObject* receiver); | 169 String* name, |
| 170 JSObject* receiver); |
| 151 | 171 |
| 152 // --- | 172 // --- |
| 153 | 173 |
| 154 MUST_USE_RESULT MaybeObject* ComputeKeyedStoreField(String* name, | 174 MUST_USE_RESULT MaybeObject* ComputeKeyedStoreField( |
| 155 JSObject* receiver, | 175 String* name, |
| 156 int field_index, | 176 JSObject* receiver, |
| 157 Map* transition = NULL); | 177 int field_index, |
| 178 Map* transition = NULL); |
| 179 |
| 180 MUST_USE_RESULT MaybeObject* ComputeKeyedStoreSpecialized( |
| 181 JSObject* receiver); |
| 158 | 182 |
| 159 // --- | 183 // --- |
| 160 | 184 |
| 161 MUST_USE_RESULT MaybeObject* ComputeCallField(int argc, | 185 MUST_USE_RESULT MaybeObject* ComputeCallField(int argc, |
| 162 InLoopFlag in_loop, | 186 InLoopFlag in_loop, |
| 163 Code::Kind, | 187 Code::Kind, |
| 164 String* name, | 188 String* name, |
| 165 Object* object, | 189 Object* object, |
| 166 JSObject* holder, | 190 JSObject* holder, |
| 167 int index); | 191 int index); |
| 168 | 192 |
| 169 MUST_USE_RESULT MaybeObject* ComputeCallConstant(int argc, | 193 MUST_USE_RESULT MaybeObject* ComputeCallConstant(int argc, |
| 170 InLoopFlag in_loop, | 194 InLoopFlag in_loop, |
| 171 Code::Kind, | 195 Code::Kind, |
| 172 String* name, | 196 String* name, |
| 173 Object* object, | 197 Object* object, |
| 174 JSObject* holder, | 198 JSObject* holder, |
| 175 JSFunction* function); | 199 JSFunction* function); |
| 176 | 200 |
| 177 MUST_USE_RESULT MaybeObject* ComputeCallNormal(int argc, | 201 MUST_USE_RESULT MaybeObject* ComputeCallNormal(int argc, |
| 178 InLoopFlag in_loop, | 202 InLoopFlag in_loop, |
| 179 Code::Kind, | 203 Code::Kind, |
| 180 String* name, | 204 String* name, |
| 181 JSObject* receiver); | 205 JSObject* receiver); |
| 182 | 206 |
| 183 MUST_USE_RESULT MaybeObject* ComputeCallInterceptor(int argc, | 207 MUST_USE_RESULT MaybeObject* ComputeCallInterceptor(int argc, |
| 184 Code::Kind, | 208 Code::Kind, |
| 185 String* name, | 209 String* name, |
| 186 Object* object, | 210 Object* object, |
| 187 JSObject* holder); | 211 JSObject* holder); |
| 188 | 212 |
| 189 MUST_USE_RESULT MaybeObject* ComputeCallGlobal(int argc, | 213 MUST_USE_RESULT MaybeObject* ComputeCallGlobal( |
| 190 InLoopFlag in_loop, | 214 int argc, |
| 191 Code::Kind, | 215 InLoopFlag in_loop, |
| 192 String* name, | 216 Code::Kind, |
| 193 JSObject* receiver, | 217 String* name, |
| 194 GlobalObject* holder, | 218 JSObject* receiver, |
| 195 JSGlobalPropertyCell* cell, | 219 GlobalObject* holder, |
| 196 JSFunction* function); | 220 JSGlobalPropertyCell* cell, |
| 221 JSFunction* function); |
| 197 | 222 |
| 198 // --- | 223 // --- |
| 199 | 224 |
| 200 MUST_USE_RESULT MaybeObject* ComputeCallInitialize(int argc, | 225 MUST_USE_RESULT MaybeObject* ComputeCallInitialize(int argc, |
| 201 InLoopFlag in_loop, | 226 InLoopFlag in_loop, |
| 202 Code::Kind kind); | 227 Code::Kind kind); |
| 203 | 228 |
| 204 Handle<Code> ComputeCallInitialize(int argc, InLoopFlag in_loop); | 229 Handle<Code> ComputeCallInitialize(int argc, InLoopFlag in_loop); |
| 205 | 230 |
| 206 Handle<Code> ComputeKeyedCallInitialize(int argc, InLoopFlag in_loop); | 231 Handle<Code> ComputeKeyedCallInitialize(int argc, InLoopFlag in_loop); |
| (...skipping 24 matching lines...) Expand all Loading... |
| 231 MUST_USE_RESULT MaybeObject* ComputeCallDebugPrepareStepIn(int argc, | 256 MUST_USE_RESULT MaybeObject* ComputeCallDebugPrepareStepIn(int argc, |
| 232 Code::Kind kind); | 257 Code::Kind kind); |
| 233 #endif | 258 #endif |
| 234 | 259 |
| 235 // Update cache for entry hash(name, map). | 260 // Update cache for entry hash(name, map). |
| 236 Code* Set(String* name, Map* map, Code* code); | 261 Code* Set(String* name, Map* map, Code* code); |
| 237 | 262 |
| 238 // Clear the lookup table (@ mark compact collection). | 263 // Clear the lookup table (@ mark compact collection). |
| 239 void Clear(); | 264 void Clear(); |
| 240 | 265 |
| 266 // Collect all maps that match the name and flags. |
| 267 void CollectMatchingMaps(ZoneMapList* types, |
| 268 String* name, |
| 269 Code::Flags flags); |
| 270 |
| 241 // Generate code for probing the stub cache table. | 271 // Generate code for probing the stub cache table. |
| 242 // Arguments extra and extra2 may be used to pass additional scratch | 272 // Arguments extra and extra2 may be used to pass additional scratch |
| 243 // registers. Set to no_reg if not needed. | 273 // registers. Set to no_reg if not needed. |
| 244 void GenerateProbe(MacroAssembler* masm, | 274 void GenerateProbe(MacroAssembler* masm, |
| 245 Code::Flags flags, | 275 Code::Flags flags, |
| 246 Register receiver, | 276 Register receiver, |
| 247 Register name, | 277 Register name, |
| 248 Register scratch, | 278 Register scratch, |
| 249 Register extra, | 279 Register extra, |
| 250 Register extra2 = no_reg); | 280 Register extra2 = no_reg); |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 353 MaybeObject* LoadPropertyWithInterceptorForLoad(RUNTIME_CALLING_CONVENTION); | 383 MaybeObject* LoadPropertyWithInterceptorForLoad(RUNTIME_CALLING_CONVENTION); |
| 354 MaybeObject* LoadPropertyWithInterceptorForCall(RUNTIME_CALLING_CONVENTION); | 384 MaybeObject* LoadPropertyWithInterceptorForCall(RUNTIME_CALLING_CONVENTION); |
| 355 MaybeObject* StoreInterceptorProperty(RUNTIME_CALLING_CONVENTION); | 385 MaybeObject* StoreInterceptorProperty(RUNTIME_CALLING_CONVENTION); |
| 356 MaybeObject* CallInterceptorProperty(RUNTIME_CALLING_CONVENTION); | 386 MaybeObject* CallInterceptorProperty(RUNTIME_CALLING_CONVENTION); |
| 357 MaybeObject* KeyedLoadPropertyWithInterceptor(RUNTIME_CALLING_CONVENTION); | 387 MaybeObject* KeyedLoadPropertyWithInterceptor(RUNTIME_CALLING_CONVENTION); |
| 358 | 388 |
| 359 | 389 |
| 360 // The stub compiler compiles stubs for the stub cache. | 390 // The stub compiler compiles stubs for the stub cache. |
| 361 class StubCompiler BASE_EMBEDDED { | 391 class StubCompiler BASE_EMBEDDED { |
| 362 public: | 392 public: |
| 363 enum CheckType { | |
| 364 RECEIVER_MAP_CHECK, | |
| 365 STRING_CHECK, | |
| 366 NUMBER_CHECK, | |
| 367 BOOLEAN_CHECK | |
| 368 }; | |
| 369 | |
| 370 StubCompiler() : scope_(), masm_(NULL, 256), failure_(NULL) { } | 393 StubCompiler() : scope_(), masm_(NULL, 256), failure_(NULL) { } |
| 371 | 394 |
| 372 MUST_USE_RESULT MaybeObject* CompileCallInitialize(Code::Flags flags); | 395 MUST_USE_RESULT MaybeObject* CompileCallInitialize(Code::Flags flags); |
| 373 MUST_USE_RESULT MaybeObject* CompileCallPreMonomorphic(Code::Flags flags); | 396 MUST_USE_RESULT MaybeObject* CompileCallPreMonomorphic(Code::Flags flags); |
| 374 MUST_USE_RESULT MaybeObject* CompileCallNormal(Code::Flags flags); | 397 MUST_USE_RESULT MaybeObject* CompileCallNormal(Code::Flags flags); |
| 375 MUST_USE_RESULT MaybeObject* CompileCallMegamorphic(Code::Flags flags); | 398 MUST_USE_RESULT MaybeObject* CompileCallMegamorphic(Code::Flags flags); |
| 376 MUST_USE_RESULT MaybeObject* CompileCallMiss(Code::Flags flags); | 399 MUST_USE_RESULT MaybeObject* CompileCallMiss(Code::Flags flags); |
| 377 #ifdef ENABLE_DEBUGGER_SUPPORT | 400 #ifdef ENABLE_DEBUGGER_SUPPORT |
| 378 MUST_USE_RESULT MaybeObject* CompileCallDebugBreak(Code::Flags flags); | 401 MUST_USE_RESULT MaybeObject* CompileCallDebugBreak(Code::Flags flags); |
| 379 MUST_USE_RESULT MaybeObject* CompileCallDebugPrepareStepIn(Code::Flags flags); | 402 MUST_USE_RESULT MaybeObject* CompileCallDebugPrepareStepIn(Code::Flags flags); |
| (...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 551 JSObject* holder, | 574 JSObject* holder, |
| 552 String* name); | 575 String* name); |
| 553 | 576 |
| 554 MUST_USE_RESULT MaybeObject* CompileLoadGlobal(JSObject* object, | 577 MUST_USE_RESULT MaybeObject* CompileLoadGlobal(JSObject* object, |
| 555 GlobalObject* holder, | 578 GlobalObject* holder, |
| 556 JSGlobalPropertyCell* cell, | 579 JSGlobalPropertyCell* cell, |
| 557 String* name, | 580 String* name, |
| 558 bool is_dont_delete); | 581 bool is_dont_delete); |
| 559 | 582 |
| 560 private: | 583 private: |
| 561 MaybeObject* GetCode(PropertyType type, String* name); | 584 MUST_USE_RESULT MaybeObject* GetCode(PropertyType type, String* name); |
| 562 }; | 585 }; |
| 563 | 586 |
| 564 | 587 |
| 565 class KeyedLoadStubCompiler: public StubCompiler { | 588 class KeyedLoadStubCompiler: public StubCompiler { |
| 566 public: | 589 public: |
| 567 MUST_USE_RESULT MaybeObject* CompileLoadField(String* name, | 590 MUST_USE_RESULT MaybeObject* CompileLoadField(String* name, |
| 568 JSObject* object, | 591 JSObject* object, |
| 569 JSObject* holder, | 592 JSObject* holder, |
| 570 int index); | 593 int index); |
| 571 | 594 |
| 572 MUST_USE_RESULT MaybeObject* CompileLoadCallback(String* name, | 595 MUST_USE_RESULT MaybeObject* CompileLoadCallback(String* name, |
| 573 JSObject* object, | 596 JSObject* object, |
| 574 JSObject* holder, | 597 JSObject* holder, |
| 575 AccessorInfo* callback); | 598 AccessorInfo* callback); |
| 576 | 599 |
| 577 MUST_USE_RESULT MaybeObject* CompileLoadConstant(String* name, | 600 MUST_USE_RESULT MaybeObject* CompileLoadConstant(String* name, |
| 578 JSObject* object, | 601 JSObject* object, |
| 579 JSObject* holder, | 602 JSObject* holder, |
| 580 Object* value); | 603 Object* value); |
| 581 | 604 |
| 582 MUST_USE_RESULT MaybeObject* CompileLoadInterceptor(JSObject* object, | 605 MUST_USE_RESULT MaybeObject* CompileLoadInterceptor(JSObject* object, |
| 583 JSObject* holder, | 606 JSObject* holder, |
| 584 String* name); | 607 String* name); |
| 585 | 608 |
| 586 MUST_USE_RESULT MaybeObject* CompileLoadArrayLength(String* name); | 609 MUST_USE_RESULT MaybeObject* CompileLoadArrayLength(String* name); |
| 587 MUST_USE_RESULT MaybeObject* CompileLoadStringLength(String* name); | 610 MUST_USE_RESULT MaybeObject* CompileLoadStringLength(String* name); |
| 588 MUST_USE_RESULT MaybeObject* CompileLoadFunctionPrototype(String* name); | 611 MUST_USE_RESULT MaybeObject* CompileLoadFunctionPrototype(String* name); |
| 589 | 612 |
| 613 MUST_USE_RESULT MaybeObject* CompileLoadSpecialized(JSObject* receiver); |
| 614 |
| 590 private: | 615 private: |
| 591 MaybeObject* GetCode(PropertyType type, String* name); | 616 MaybeObject* GetCode(PropertyType type, String* name); |
| 592 }; | 617 }; |
| 593 | 618 |
| 594 | 619 |
| 595 class StoreStubCompiler: public StubCompiler { | 620 class StoreStubCompiler: public StubCompiler { |
| 596 public: | 621 public: |
| 597 MUST_USE_RESULT MaybeObject* CompileStoreField(JSObject* object, | 622 MUST_USE_RESULT MaybeObject* CompileStoreField(JSObject* object, |
| 598 int index, | 623 int index, |
| 599 Map* transition, | 624 Map* transition, |
| 600 String* name); | 625 String* name); |
| 626 |
| 601 MUST_USE_RESULT MaybeObject* CompileStoreCallback(JSObject* object, | 627 MUST_USE_RESULT MaybeObject* CompileStoreCallback(JSObject* object, |
| 602 AccessorInfo* callbacks, | 628 AccessorInfo* callbacks, |
| 603 String* name); | 629 String* name); |
| 604 MUST_USE_RESULT MaybeObject* CompileStoreInterceptor(JSObject* object, | 630 MUST_USE_RESULT MaybeObject* CompileStoreInterceptor(JSObject* object, |
| 605 String* name); | 631 String* name); |
| 606 MUST_USE_RESULT MaybeObject* CompileStoreGlobal(GlobalObject* object, | 632 MUST_USE_RESULT MaybeObject* CompileStoreGlobal(GlobalObject* object, |
| 607 JSGlobalPropertyCell* holder, | 633 JSGlobalPropertyCell* holder, |
| 608 String* name); | 634 String* name); |
| 609 | 635 |
| 610 | 636 |
| 611 private: | 637 private: |
| 612 MUST_USE_RESULT MaybeObject* GetCode(PropertyType type, String* name); | 638 MaybeObject* GetCode(PropertyType type, String* name); |
| 613 }; | 639 }; |
| 614 | 640 |
| 615 | 641 |
| 616 class KeyedStoreStubCompiler: public StubCompiler { | 642 class KeyedStoreStubCompiler: public StubCompiler { |
| 617 public: | 643 public: |
| 618 MaybeObject* CompileStoreField(JSObject* object, | 644 MUST_USE_RESULT MaybeObject* CompileStoreField(JSObject* object, |
| 619 int index, | 645 int index, |
| 620 Map* transition, | 646 Map* transition, |
| 621 String* name); | 647 String* name); |
| 648 |
| 649 MUST_USE_RESULT MaybeObject* CompileStoreSpecialized(JSObject* receiver); |
| 622 | 650 |
| 623 private: | 651 private: |
| 624 MaybeObject* GetCode(PropertyType type, String* name); | 652 MaybeObject* GetCode(PropertyType type, String* name); |
| 625 }; | 653 }; |
| 626 | 654 |
| 627 | 655 |
| 628 // List of functions with custom constant call IC stubs. | 656 // List of functions with custom constant call IC stubs. |
| 629 // | 657 // |
| 630 // Installation of custom call generators for the selected builtins is | 658 // Installation of custom call generators for the selected builtins is |
| 631 // handled by the bootstrapper. | 659 // handled by the bootstrapper. |
| (...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 785 | 813 |
| 786 JSFunction* constant_function_; | 814 JSFunction* constant_function_; |
| 787 bool is_simple_api_call_; | 815 bool is_simple_api_call_; |
| 788 FunctionTemplateInfo* expected_receiver_type_; | 816 FunctionTemplateInfo* expected_receiver_type_; |
| 789 CallHandlerInfo* api_call_info_; | 817 CallHandlerInfo* api_call_info_; |
| 790 }; | 818 }; |
| 791 | 819 |
| 792 } } // namespace v8::internal | 820 } } // namespace v8::internal |
| 793 | 821 |
| 794 #endif // V8_STUB_CACHE_H_ | 822 #endif // V8_STUB_CACHE_H_ |
| OLD | NEW |