Chromium Code Reviews| 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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 59 ICU(BinaryOpIC_Miss) \ | 59 ICU(BinaryOpIC_Miss) \ |
| 60 ICU(CompareNilIC_Miss) \ | 60 ICU(CompareNilIC_Miss) \ |
| 61 ICU(Unreachable) \ | 61 ICU(Unreachable) \ |
| 62 ICU(ToBooleanIC_Miss) | 62 ICU(ToBooleanIC_Miss) |
| 63 // | 63 // |
| 64 // IC is the base class for LoadIC, StoreIC, CallIC, KeyedLoadIC, | 64 // IC is the base class for LoadIC, StoreIC, CallIC, KeyedLoadIC, |
| 65 // and KeyedStoreIC. | 65 // and KeyedStoreIC. |
| 66 // | 66 // |
| 67 class IC { | 67 class IC { |
| 68 public: | 68 public: |
| 69 // ICs store extra state in a Code object. The default extra state is | |
| 70 // kNoExtraICState. It's defined here and in Code::kNoExtraICState to prevent | |
| 71 // circular dependency, with the static assert below ensuring they are the | |
| 72 // same. | |
| 73 static const Code::ExtraICState kNoExtraICState = 0; | |
| 74 STATIC_ASSERT(kNoExtraICState == Code::kNoExtraICState); | |
| 69 // The ids for utility called from the generated code. | 75 // The ids for utility called from the generated code. |
| 70 enum UtilityId { | 76 enum UtilityId { |
| 71 #define CONST_NAME(name) k##name, | 77 #define CONST_NAME(name) k##name, |
| 72 IC_UTIL_LIST(CONST_NAME) | 78 IC_UTIL_LIST(CONST_NAME) |
| 73 #undef CONST_NAME | 79 #undef CONST_NAME |
| 74 kUtilityCount | 80 kUtilityCount |
| 75 }; | 81 }; |
| 76 | 82 |
| 77 // Looks up the address of the named utility. | 83 // Looks up the address of the named utility. |
| 78 static Address AddressFromUtilityId(UtilityId id); | 84 static Address AddressFromUtilityId(UtilityId id); |
| (...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 248 } | 254 } |
| 249 virtual Handle<Code> generic_stub() const { | 255 virtual Handle<Code> generic_stub() const { |
| 250 UNREACHABLE(); | 256 UNREACHABLE(); |
| 251 return Handle<Code>::null(); | 257 return Handle<Code>::null(); |
| 252 } | 258 } |
| 253 virtual StrictModeFlag strict_mode() const { return kNonStrictMode; } | 259 virtual StrictModeFlag strict_mode() const { return kNonStrictMode; } |
| 254 bool TryRemoveInvalidPrototypeDependentStub(Handle<Object> receiver, | 260 bool TryRemoveInvalidPrototypeDependentStub(Handle<Object> receiver, |
| 255 Handle<String> name); | 261 Handle<String> name); |
| 256 void TryRemoveInvalidHandlers(Handle<Map> map, Handle<String> name); | 262 void TryRemoveInvalidHandlers(Handle<Map> map, Handle<String> name); |
| 257 | 263 |
| 264 virtual Code::ExtraICState extra_ic_state() { return IC::kNoExtraICState; } | |
| 265 | |
| 258 private: | 266 private: |
| 259 Code* raw_target() const { return GetTargetAtAddress(address()); } | 267 Code* raw_target() const { return GetTargetAtAddress(address()); } |
| 260 | 268 |
| 261 // Frame pointer for the frame that uses (calls) the IC. | 269 // Frame pointer for the frame that uses (calls) the IC. |
| 262 Address fp_; | 270 Address fp_; |
| 263 | 271 |
| 264 // All access to the program counter of an IC structure is indirect | 272 // All access to the program counter of an IC structure is indirect |
| 265 // to make the code GC safe. This feature is crucial since | 273 // to make the code GC safe. This feature is crucial since |
| 266 // GetProperty and SetProperty are called and they in turn might | 274 // GetProperty and SetProperty are called and they in turn might |
| 267 // invoke the garbage collector. | 275 // invoke the garbage collector. |
| (...skipping 21 matching lines...) Expand all Loading... | |
| 289 | 297 |
| 290 IC::UtilityId id() const { return id_; } | 298 IC::UtilityId id() const { return id_; } |
| 291 private: | 299 private: |
| 292 Address address_; | 300 Address address_; |
| 293 IC::UtilityId id_; | 301 IC::UtilityId id_; |
| 294 }; | 302 }; |
| 295 | 303 |
| 296 | 304 |
| 297 class CallICBase: public IC { | 305 class CallICBase: public IC { |
| 298 public: | 306 public: |
| 299 class Contextual: public BitField<bool, 0, 1> {}; | 307 // ExtraICState bits |
| 308 class Contextual: public BitField<ContextualMode, 0, 1> {}; | |
| 300 class StringStubState: public BitField<StringStubFeedback, 1, 1> {}; | 309 class StringStubState: public BitField<StringStubFeedback, 1, 1> {}; |
| 310 static Code::ExtraICState ComputeExtraICState(ContextualMode mode, | |
| 311 StringStubFeedback feedback) { | |
| 312 return Contextual::encode(mode) | StringStubState::encode(feedback); | |
| 313 } | |
| 301 | 314 |
| 302 // Returns a JSFunction or a Failure. | 315 // Returns a JSFunction or a Failure. |
| 303 MUST_USE_RESULT MaybeObject* LoadFunction(Handle<Object> object, | 316 MUST_USE_RESULT MaybeObject* LoadFunction(Handle<Object> object, |
| 304 Handle<String> name); | 317 Handle<String> name); |
| 305 | 318 |
| 306 protected: | 319 protected: |
| 307 CallICBase(Code::Kind kind, Isolate* isolate) | 320 CallICBase(Code::Kind kind, Isolate* isolate) |
| 308 : IC(EXTRA_CALL_FRAME, isolate), kind_(kind) {} | 321 : IC(EXTRA_CALL_FRAME, isolate), kind_(kind) {} |
| 309 | 322 |
| 310 virtual Code::ExtraICState extra_ic_state() { return Code::kNoExtraICState; } | |
| 311 | |
| 312 // Compute a monomorphic stub if possible, otherwise return a null handle. | 323 // Compute a monomorphic stub if possible, otherwise return a null handle. |
| 313 Handle<Code> ComputeMonomorphicStub(LookupResult* lookup, | 324 Handle<Code> ComputeMonomorphicStub(LookupResult* lookup, |
| 314 Handle<Object> object, | 325 Handle<Object> object, |
| 315 Handle<String> name); | 326 Handle<String> name); |
| 316 | 327 |
| 317 // Update the inline cache and the global stub cache based on the lookup | 328 // Update the inline cache and the global stub cache based on the lookup |
| 318 // result. | 329 // result. |
| 319 void UpdateCaches(LookupResult* lookup, | 330 void UpdateCaches(LookupResult* lookup, |
| 320 Handle<Object> object, | 331 Handle<Object> object, |
| 321 Handle<String> name); | 332 Handle<String> name); |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 372 Code::ExtraICState extra_state) { | 383 Code::ExtraICState extra_state) { |
| 373 CallICBase::GenerateMiss(masm, argc, IC::kCallIC_Miss, extra_state); | 384 CallICBase::GenerateMiss(masm, argc, IC::kCallIC_Miss, extra_state); |
| 374 } | 385 } |
| 375 | 386 |
| 376 static void GenerateMegamorphic(MacroAssembler* masm, | 387 static void GenerateMegamorphic(MacroAssembler* masm, |
| 377 int argc, | 388 int argc, |
| 378 Code::ExtraICState extra_ic_state); | 389 Code::ExtraICState extra_ic_state); |
| 379 | 390 |
| 380 static void GenerateNormal(MacroAssembler* masm, int argc) { | 391 static void GenerateNormal(MacroAssembler* masm, int argc) { |
| 381 CallICBase::GenerateNormal(masm, argc); | 392 CallICBase::GenerateNormal(masm, argc); |
| 382 GenerateMiss(masm, argc, Code::kNoExtraICState); | 393 GenerateMiss(masm, argc, IC::kNoExtraICState); |
| 383 } | 394 } |
| 384 bool TryUpdateExtraICState(LookupResult* lookup, Handle<Object> object); | 395 bool TryUpdateExtraICState(LookupResult* lookup, Handle<Object> object); |
| 385 | 396 |
| 386 protected: | 397 protected: |
| 387 virtual Code::ExtraICState extra_ic_state() { return extra_ic_state_; } | 398 virtual Code::ExtraICState extra_ic_state() { return extra_ic_state_; } |
| 388 | 399 |
| 389 private: | 400 private: |
| 390 Code::ExtraICState extra_ic_state_; | 401 Code::ExtraICState extra_ic_state_; |
| 391 }; | 402 }; |
| 392 | 403 |
| 393 | 404 |
| 394 class KeyedCallIC: public CallICBase { | 405 class KeyedCallIC: public CallICBase { |
| 395 public: | 406 public: |
| 396 explicit KeyedCallIC(Isolate* isolate) | 407 explicit KeyedCallIC(Isolate* isolate) |
| 397 : CallICBase(Code::KEYED_CALL_IC, isolate) { | 408 : CallICBase(Code::KEYED_CALL_IC, isolate) { |
| 398 ASSERT(target()->is_keyed_call_stub()); | 409 ASSERT(target()->is_keyed_call_stub()); |
| 399 } | 410 } |
| 400 | 411 |
| 401 MUST_USE_RESULT MaybeObject* LoadFunction(Handle<Object> object, | 412 MUST_USE_RESULT MaybeObject* LoadFunction(Handle<Object> object, |
| 402 Handle<Object> key); | 413 Handle<Object> key); |
| 403 | 414 |
| 404 // Code generator routines. | 415 // Code generator routines. |
| 405 static void GenerateInitialize(MacroAssembler* masm, int argc) { | 416 static void GenerateInitialize(MacroAssembler* masm, int argc) { |
| 406 GenerateMiss(masm, argc); | 417 GenerateMiss(masm, argc); |
| 407 } | 418 } |
| 408 | 419 |
| 409 static void GenerateMiss(MacroAssembler* masm, int argc) { | 420 static void GenerateMiss(MacroAssembler* masm, int argc) { |
| 410 CallICBase::GenerateMiss(masm, argc, IC::kKeyedCallIC_Miss, | 421 CallICBase::GenerateMiss(masm, argc, IC::kKeyedCallIC_Miss, |
| 411 Code::kNoExtraICState); | 422 IC::kNoExtraICState); |
| 412 } | 423 } |
| 413 | 424 |
| 414 static void GenerateMegamorphic(MacroAssembler* masm, int argc); | 425 static void GenerateMegamorphic(MacroAssembler* masm, int argc); |
| 415 static void GenerateNormal(MacroAssembler* masm, int argc); | 426 static void GenerateNormal(MacroAssembler* masm, int argc); |
| 416 static void GenerateNonStrictArguments(MacroAssembler* masm, int argc); | 427 static void GenerateNonStrictArguments(MacroAssembler* masm, int argc); |
| 417 }; | 428 }; |
| 418 | 429 |
| 419 | 430 |
| 420 class LoadIC: public IC { | 431 class LoadIC: public IC { |
| 421 public: | 432 public: |
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 552 } | 563 } |
| 553 | 564 |
| 554 static void Clear(Isolate* isolate, Address address, Code* target); | 565 static void Clear(Isolate* isolate, Address address, Code* target); |
| 555 | 566 |
| 556 friend class IC; | 567 friend class IC; |
| 557 }; | 568 }; |
| 558 | 569 |
| 559 | 570 |
| 560 class StoreIC: public IC { | 571 class StoreIC: public IC { |
| 561 public: | 572 public: |
| 573 // ExtraICState bits | |
| 574 class StrictModeState: public BitField<StrictModeFlag, 0, 1> {}; | |
| 575 static Code::ExtraICState ComputeExtraICState(StrictModeFlag flag) { | |
| 576 return StrictModeState::encode(flag); | |
| 577 } | |
| 578 | |
| 579 static StrictModeFlag GetStrictMode(Code::ExtraICState state) { | |
| 580 return StrictModeState::decode(state); | |
| 581 } | |
| 582 | |
| 583 static const int kStrictModeICState = 1 << StrictModeState::kShift; | |
| 584 | |
| 562 StoreIC(FrameDepth depth, Isolate* isolate) | 585 StoreIC(FrameDepth depth, Isolate* isolate) |
| 563 : IC(depth, isolate), | 586 : IC(depth, isolate), |
| 564 strict_mode_(Code::GetStrictMode(target()->extra_ic_state())) { | 587 strict_mode_(StrictModeState::decode(target()->extra_ic_state())) { |
| 565 ASSERT(IsStoreStub()); | 588 ASSERT(IsStoreStub()); |
| 566 } | 589 } |
| 567 | 590 |
| 568 virtual StrictModeFlag strict_mode() const { return strict_mode_; } | 591 virtual StrictModeFlag strict_mode() const { return strict_mode_; } |
|
Toon Verwaest
2013/11/28 09:58:47
I guess you can make this nonvirtual now, and remo
mvstanton
2013/11/28 11:23:11
Done, and that caused a ripple into the stub compi
| |
| 569 | 592 |
| 570 // Code generators for stub routines. Only called once at startup. | 593 // Code generators for stub routines. Only called once at startup. |
| 571 static void GenerateSlow(MacroAssembler* masm); | 594 static void GenerateSlow(MacroAssembler* masm); |
| 572 static void GenerateInitialize(MacroAssembler* masm) { GenerateMiss(masm); } | 595 static void GenerateInitialize(MacroAssembler* masm) { GenerateMiss(masm); } |
| 573 static void GeneratePreMonomorphic(MacroAssembler* masm) { | 596 static void GeneratePreMonomorphic(MacroAssembler* masm) { |
| 574 GenerateMiss(masm); | 597 GenerateMiss(masm); |
| 575 } | 598 } |
| 576 static void GenerateMiss(MacroAssembler* masm); | 599 static void GenerateMiss(MacroAssembler* masm); |
| 577 static void GenerateMegamorphic(MacroAssembler* masm, | 600 static void GenerateMegamorphic(MacroAssembler* masm, |
| 578 StrictModeFlag strict_mode); | 601 StrictModeFlag strict_mode); |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 635 void UpdateCaches(LookupResult* lookup, | 658 void UpdateCaches(LookupResult* lookup, |
| 636 Handle<JSObject> receiver, | 659 Handle<JSObject> receiver, |
| 637 Handle<String> name, | 660 Handle<String> name, |
| 638 Handle<Object> value); | 661 Handle<Object> value); |
| 639 virtual Handle<Code> CompileHandler(LookupResult* lookup, | 662 virtual Handle<Code> CompileHandler(LookupResult* lookup, |
| 640 Handle<Object> object, | 663 Handle<Object> object, |
| 641 Handle<String> name, | 664 Handle<String> name, |
| 642 Handle<Object> value, | 665 Handle<Object> value, |
| 643 InlineCacheHolderFlag cache_holder); | 666 InlineCacheHolderFlag cache_holder); |
| 644 | 667 |
| 668 virtual Code::ExtraICState extra_ic_state() { | |
| 669 return ComputeExtraICState(strict_mode()); | |
| 670 } | |
| 671 | |
| 645 private: | 672 private: |
| 646 void set_target(Code* code) { | 673 void set_target(Code* code) { |
| 647 // Strict mode must be preserved across IC patching. | 674 // Strict mode must be preserved across IC patching. |
| 648 ASSERT(Code::GetStrictMode(code->extra_ic_state()) == | 675 ASSERT(GetStrictMode(code->extra_ic_state()) == |
| 649 Code::GetStrictMode(target()->extra_ic_state())); | 676 GetStrictMode(target()->extra_ic_state())); |
| 650 IC::set_target(code); | 677 IC::set_target(code); |
| 651 } | 678 } |
| 652 | 679 |
| 653 static Handle<Code> initialize_stub(Isolate* isolate, | 680 static Handle<Code> initialize_stub(Isolate* isolate, |
| 654 StrictModeFlag strict_mode) { | 681 StrictModeFlag strict_mode) { |
| 655 if (strict_mode == kStrictMode) { | 682 if (strict_mode == kStrictMode) { |
| 656 return isolate->builtins()->StoreIC_Initialize_Strict(); | 683 return isolate->builtins()->StoreIC_Initialize_Strict(); |
| 657 } else { | 684 } else { |
| 658 return isolate->builtins()->StoreIC_Initialize(); | 685 return isolate->builtins()->StoreIC_Initialize(); |
| 659 } | 686 } |
| (...skipping 14 matching lines...) Expand all Loading... | |
| 674 | 701 |
| 675 | 702 |
| 676 enum KeyedStoreIncrementLength { | 703 enum KeyedStoreIncrementLength { |
| 677 kDontIncrementLength, | 704 kDontIncrementLength, |
| 678 kIncrementLength | 705 kIncrementLength |
| 679 }; | 706 }; |
| 680 | 707 |
| 681 | 708 |
| 682 class KeyedStoreIC: public StoreIC { | 709 class KeyedStoreIC: public StoreIC { |
| 683 public: | 710 public: |
| 711 // ExtraICState bits (building on IC) | |
| 712 // ExtraICState bits | |
| 713 class ExtraICStateKeyedAccessStoreMode: | |
| 714 public BitField<KeyedAccessStoreMode, 1, 4> {}; // NOLINT | |
| 715 | |
| 716 static Code::ExtraICState ComputeExtraICState(StrictModeFlag flag, | |
| 717 KeyedAccessStoreMode mode) { | |
| 718 return StrictModeState::encode(flag) | | |
| 719 ExtraICStateKeyedAccessStoreMode::encode(mode); | |
| 720 } | |
| 721 | |
| 722 static KeyedAccessStoreMode GetKeyedAccessStoreMode( | |
| 723 Code::ExtraICState extra_state) { | |
| 724 return ExtraICStateKeyedAccessStoreMode::decode(extra_state); | |
| 725 } | |
| 726 | |
| 684 KeyedStoreIC(FrameDepth depth, Isolate* isolate) | 727 KeyedStoreIC(FrameDepth depth, Isolate* isolate) |
| 685 : StoreIC(depth, isolate) { | 728 : StoreIC(depth, isolate) { |
| 686 ASSERT(target()->is_keyed_store_stub()); | 729 ASSERT(target()->is_keyed_store_stub()); |
| 687 } | 730 } |
| 688 | 731 |
| 689 MUST_USE_RESULT MaybeObject* Store(Handle<Object> object, | 732 MUST_USE_RESULT MaybeObject* Store(Handle<Object> object, |
| 690 Handle<Object> name, | 733 Handle<Object> name, |
| 691 Handle<Object> value); | 734 Handle<Object> value); |
| 692 | 735 |
| 693 // Code generators for stub routines. Only called once at startup. | 736 // Code generators for stub routines. Only called once at startup. |
| 694 static void GenerateInitialize(MacroAssembler* masm) { GenerateMiss(masm); } | 737 static void GenerateInitialize(MacroAssembler* masm) { GenerateMiss(masm); } |
| 695 static void GeneratePreMonomorphic(MacroAssembler* masm) { | 738 static void GeneratePreMonomorphic(MacroAssembler* masm) { |
| 696 GenerateMiss(masm); | 739 GenerateMiss(masm); |
| 697 } | 740 } |
| 698 static void GenerateMiss(MacroAssembler* masm); | 741 static void GenerateMiss(MacroAssembler* masm); |
| 699 static void GenerateSlow(MacroAssembler* masm); | 742 static void GenerateSlow(MacroAssembler* masm); |
| 700 static void GenerateRuntimeSetProperty(MacroAssembler* masm, | 743 static void GenerateRuntimeSetProperty(MacroAssembler* masm, |
| 701 StrictModeFlag strict_mode); | 744 StrictModeFlag strict_mode); |
| 702 static void GenerateGeneric(MacroAssembler* masm, StrictModeFlag strict_mode); | 745 static void GenerateGeneric(MacroAssembler* masm, StrictModeFlag strict_mode); |
| 703 static void GenerateNonStrictArguments(MacroAssembler* masm); | 746 static void GenerateNonStrictArguments(MacroAssembler* masm); |
| 704 | 747 |
| 705 protected: | 748 protected: |
| 706 virtual Code::Kind kind() const { return Code::KEYED_STORE_IC; } | 749 virtual Code::Kind kind() const { return Code::KEYED_STORE_IC; } |
| 707 | 750 |
| 708 virtual void UpdateMegamorphicCache(Type* type, Name* name, Code* code) { } | 751 virtual void UpdateMegamorphicCache(Type* type, Name* name, Code* code) { } |
| 709 | 752 |
| 753 virtual Code::ExtraICState extra_ic_state() { | |
| 754 return ComputeExtraICState(strict_mode(), STANDARD_STORE); | |
| 755 } | |
| 756 | |
| 710 virtual Handle<Code> pre_monomorphic_stub() { | 757 virtual Handle<Code> pre_monomorphic_stub() { |
| 711 return pre_monomorphic_stub(isolate(), strict_mode()); | 758 return pre_monomorphic_stub(isolate(), strict_mode()); |
| 712 } | 759 } |
| 713 static Handle<Code> pre_monomorphic_stub(Isolate* isolate, | 760 static Handle<Code> pre_monomorphic_stub(Isolate* isolate, |
| 714 StrictModeFlag strict_mode) { | 761 StrictModeFlag strict_mode) { |
| 715 if (strict_mode == kStrictMode) { | 762 if (strict_mode == kStrictMode) { |
| 716 return isolate->builtins()->KeyedStoreIC_PreMonomorphic_Strict(); | 763 return isolate->builtins()->KeyedStoreIC_PreMonomorphic_Strict(); |
| 717 } else { | 764 } else { |
| 718 return isolate->builtins()->KeyedStoreIC_PreMonomorphic(); | 765 return isolate->builtins()->KeyedStoreIC_PreMonomorphic(); |
| 719 } | 766 } |
| 720 } | 767 } |
| 721 virtual Handle<Code> slow_stub() const { | 768 virtual Handle<Code> slow_stub() const { |
| 722 return isolate()->builtins()->KeyedStoreIC_Slow(); | 769 return isolate()->builtins()->KeyedStoreIC_Slow(); |
| 723 } | 770 } |
| 724 virtual Handle<Code> megamorphic_stub() { | 771 virtual Handle<Code> megamorphic_stub() { |
| 725 if (strict_mode() == kStrictMode) { | 772 if (strict_mode() == kStrictMode) { |
| 726 return isolate()->builtins()->KeyedStoreIC_Generic_Strict(); | 773 return isolate()->builtins()->KeyedStoreIC_Generic_Strict(); |
| 727 } else { | 774 } else { |
| 728 return isolate()->builtins()->KeyedStoreIC_Generic(); | 775 return isolate()->builtins()->KeyedStoreIC_Generic(); |
| 729 } | 776 } |
| 730 } | 777 } |
| 731 | 778 |
| 732 Handle<Code> StoreElementStub(Handle<JSObject> receiver, | 779 Handle<Code> StoreElementStub(Handle<JSObject> receiver, |
| 733 KeyedAccessStoreMode store_mode); | 780 KeyedAccessStoreMode store_mode); |
| 734 | 781 |
| 735 private: | 782 private: |
| 736 void set_target(Code* code) { | 783 void set_target(Code* code) { |
| 737 // Strict mode must be preserved across IC patching. | 784 // Strict mode must be preserved across IC patching. |
| 738 ASSERT(Code::GetStrictMode(code->extra_ic_state()) == strict_mode()); | 785 ASSERT(GetStrictMode(code->extra_ic_state()) == strict_mode()); |
| 739 IC::set_target(code); | 786 IC::set_target(code); |
| 740 } | 787 } |
| 741 | 788 |
| 742 // Stub accessors. | 789 // Stub accessors. |
| 743 static Handle<Code> initialize_stub(Isolate* isolate, | 790 static Handle<Code> initialize_stub(Isolate* isolate, |
| 744 StrictModeFlag strict_mode) { | 791 StrictModeFlag strict_mode) { |
| 745 if (strict_mode == kStrictMode) { | 792 if (strict_mode == kStrictMode) { |
| 746 return isolate->builtins()->KeyedStoreIC_Initialize_Strict(); | 793 return isolate->builtins()->KeyedStoreIC_Initialize_Strict(); |
| 747 } else { | 794 } else { |
| 748 return isolate->builtins()->KeyedStoreIC_Initialize(); | 795 return isolate->builtins()->KeyedStoreIC_Initialize(); |
| (...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 903 DECLARE_RUNTIME_FUNCTION(MaybeObject*, KeyedCallIC_MissFromStubFailure); | 950 DECLARE_RUNTIME_FUNCTION(MaybeObject*, KeyedCallIC_MissFromStubFailure); |
| 904 DECLARE_RUNTIME_FUNCTION(MaybeObject*, ElementsTransitionAndStoreIC_Miss); | 951 DECLARE_RUNTIME_FUNCTION(MaybeObject*, ElementsTransitionAndStoreIC_Miss); |
| 905 DECLARE_RUNTIME_FUNCTION(MaybeObject*, BinaryOpIC_Miss); | 952 DECLARE_RUNTIME_FUNCTION(MaybeObject*, BinaryOpIC_Miss); |
| 906 DECLARE_RUNTIME_FUNCTION(MaybeObject*, CompareNilIC_Miss); | 953 DECLARE_RUNTIME_FUNCTION(MaybeObject*, CompareNilIC_Miss); |
| 907 DECLARE_RUNTIME_FUNCTION(MaybeObject*, ToBooleanIC_Miss); | 954 DECLARE_RUNTIME_FUNCTION(MaybeObject*, ToBooleanIC_Miss); |
| 908 | 955 |
| 909 | 956 |
| 910 } } // namespace v8::internal | 957 } } // namespace v8::internal |
| 911 | 958 |
| 912 #endif // V8_IC_H_ | 959 #endif // V8_IC_H_ |
| OLD | NEW |