| OLD | NEW |
| 1 // Copyright 2011 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 |
| (...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 351 virtual MaybeObject* GetExternalArrayStubWithoutMapCheck( | 351 virtual MaybeObject* GetExternalArrayStubWithoutMapCheck( |
| 352 JSObject::ElementsKind elements_kind) = 0; | 352 JSObject::ElementsKind elements_kind) = 0; |
| 353 | 353 |
| 354 protected: | 354 protected: |
| 355 virtual Code* string_stub() { | 355 virtual Code* string_stub() { |
| 356 return NULL; | 356 return NULL; |
| 357 } | 357 } |
| 358 | 358 |
| 359 virtual Code::Kind kind() const = 0; | 359 virtual Code::Kind kind() const = 0; |
| 360 | 360 |
| 361 virtual String* GetStubNameForCache(IC::State ic_state) = 0; | |
| 362 | |
| 363 MaybeObject* ComputeStub(JSObject* receiver, | 361 MaybeObject* ComputeStub(JSObject* receiver, |
| 364 bool is_store, | 362 bool is_store, |
| 365 StrictModeFlag strict_mode, | 363 StrictModeFlag strict_mode, |
| 366 Code* default_stub); | 364 Code* default_stub); |
| 367 | 365 |
| 368 virtual MaybeObject* ConstructMegamorphicStub( | 366 virtual MaybeObject* ConstructMegamorphicStub( |
| 369 MapList* receiver_maps, | 367 MapList* receiver_maps, |
| 370 CodeList* targets, | 368 CodeList* targets, |
| 371 StrictModeFlag strict_mode) = 0; | 369 StrictModeFlag strict_mode) = 0; |
| 372 | 370 |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 419 | 417 |
| 420 virtual MaybeObject* GetFastElementStubWithoutMapCheck( | 418 virtual MaybeObject* GetFastElementStubWithoutMapCheck( |
| 421 bool is_js_array); | 419 bool is_js_array); |
| 422 | 420 |
| 423 virtual MaybeObject* GetExternalArrayStubWithoutMapCheck( | 421 virtual MaybeObject* GetExternalArrayStubWithoutMapCheck( |
| 424 JSObject::ElementsKind elements_kind); | 422 JSObject::ElementsKind elements_kind); |
| 425 | 423 |
| 426 protected: | 424 protected: |
| 427 virtual Code::Kind kind() const { return Code::KEYED_LOAD_IC; } | 425 virtual Code::Kind kind() const { return Code::KEYED_LOAD_IC; } |
| 428 | 426 |
| 429 virtual String* GetStubNameForCache(IC::State ic_state); | |
| 430 | |
| 431 virtual MaybeObject* ConstructMegamorphicStub( | 427 virtual MaybeObject* ConstructMegamorphicStub( |
| 432 MapList* receiver_maps, | 428 MapList* receiver_maps, |
| 433 CodeList* targets, | 429 CodeList* targets, |
| 434 StrictModeFlag strict_mode); | 430 StrictModeFlag strict_mode); |
| 435 | 431 |
| 436 virtual Code* string_stub() { | 432 virtual Code* string_stub() { |
| 437 return isolate()->builtins()->builtin( | 433 return isolate()->builtins()->builtin( |
| 438 Builtins::kKeyedLoadIC_String); | 434 Builtins::kKeyedLoadIC_String); |
| 439 } | 435 } |
| 440 | 436 |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 574 | 570 |
| 575 virtual MaybeObject* GetFastElementStubWithoutMapCheck( | 571 virtual MaybeObject* GetFastElementStubWithoutMapCheck( |
| 576 bool is_js_array); | 572 bool is_js_array); |
| 577 | 573 |
| 578 virtual MaybeObject* GetExternalArrayStubWithoutMapCheck( | 574 virtual MaybeObject* GetExternalArrayStubWithoutMapCheck( |
| 579 JSObject::ElementsKind elements_kind); | 575 JSObject::ElementsKind elements_kind); |
| 580 | 576 |
| 581 protected: | 577 protected: |
| 582 virtual Code::Kind kind() const { return Code::KEYED_STORE_IC; } | 578 virtual Code::Kind kind() const { return Code::KEYED_STORE_IC; } |
| 583 | 579 |
| 584 virtual String* GetStubNameForCache(IC::State ic_state); | |
| 585 | |
| 586 virtual MaybeObject* ConstructMegamorphicStub( | 580 virtual MaybeObject* ConstructMegamorphicStub( |
| 587 MapList* receiver_maps, | 581 MapList* receiver_maps, |
| 588 CodeList* targets, | 582 CodeList* targets, |
| 589 StrictModeFlag strict_mode); | 583 StrictModeFlag strict_mode); |
| 590 | 584 |
| 591 private: | 585 private: |
| 592 // Update the inline cache. | 586 // Update the inline cache. |
| 593 void UpdateCaches(LookupResult* lookup, | 587 void UpdateCaches(LookupResult* lookup, |
| 594 State state, | 588 State state, |
| 595 StrictModeFlag strict_mode, | 589 StrictModeFlag strict_mode, |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 732 | 726 |
| 733 Token::Value op_; | 727 Token::Value op_; |
| 734 }; | 728 }; |
| 735 | 729 |
| 736 // Helper for BinaryOpIC and CompareIC. | 730 // Helper for BinaryOpIC and CompareIC. |
| 737 void PatchInlinedSmiCode(Address address); | 731 void PatchInlinedSmiCode(Address address); |
| 738 | 732 |
| 739 } } // namespace v8::internal | 733 } } // namespace v8::internal |
| 740 | 734 |
| 741 #endif // V8_IC_H_ | 735 #endif // V8_IC_H_ |
| OLD | NEW |