| 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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 }; | 76 }; |
| 77 | 77 |
| 78 void Initialize(); | 78 void Initialize(); |
| 79 | 79 |
| 80 Handle<JSObject> StubHolder(Handle<JSObject> receiver, | 80 Handle<JSObject> StubHolder(Handle<JSObject> receiver, |
| 81 Handle<JSObject> holder); | 81 Handle<JSObject> holder); |
| 82 | 82 |
| 83 Handle<Code> FindIC(Handle<Name> name, | 83 Handle<Code> FindIC(Handle<Name> name, |
| 84 Handle<Map> stub_holder_map, | 84 Handle<Map> stub_holder_map, |
| 85 Code::Kind kind, | 85 Code::Kind kind, |
| 86 Code::ExtraICState extra_state = Code::kNoExtraICState, | 86 Code::ExtraICState extra_state = IC::kNoExtraICState, |
| 87 InlineCacheHolderFlag cache_holder = OWN_MAP); | 87 InlineCacheHolderFlag cache_holder = OWN_MAP); |
| 88 | 88 |
| 89 Handle<Code> FindHandler(Handle<Name> name, | 89 Handle<Code> FindHandler(Handle<Name> name, |
| 90 Handle<Map> map, | 90 Handle<Map> map, |
| 91 Code::Kind kind, | 91 Code::Kind kind, |
| 92 InlineCacheHolderFlag cache_holder = OWN_MAP, | 92 InlineCacheHolderFlag cache_holder = OWN_MAP, |
| 93 StrictModeFlag strict_mode = kNonStrictMode); | 93 StrictModeFlag strict_mode = kNonStrictMode); |
| 94 | 94 |
| 95 Handle<Code> ComputeMonomorphicIC(Handle<Name> name, | 95 Handle<Code> ComputeMonomorphicIC(Handle<Name> name, |
| 96 Handle<Type> type, | 96 Handle<Type> type, |
| 97 Handle<Code> handler, | 97 Handle<Code> handler, |
| 98 StrictModeFlag strict_mode); | 98 Code::ExtraICState extra_ic_state); |
| 99 | 99 |
| 100 Handle<Code> ComputeLoadNonexistent(Handle<Name> name, Handle<Type> type); | 100 Handle<Code> ComputeLoadNonexistent(Handle<Name> name, Handle<Type> type); |
| 101 | 101 |
| 102 Handle<Code> ComputeKeyedLoadElement(Handle<Map> receiver_map); | 102 Handle<Code> ComputeKeyedLoadElement(Handle<Map> receiver_map); |
| 103 | 103 |
| 104 Handle<Code> ComputeKeyedStoreElement(Handle<Map> receiver_map, | 104 Handle<Code> ComputeKeyedStoreElement(Handle<Map> receiver_map, |
| 105 StrictModeFlag strict_mode, | 105 StrictModeFlag strict_mode, |
| 106 KeyedAccessStoreMode store_mode); | 106 KeyedAccessStoreMode store_mode); |
| 107 | 107 |
| 108 Handle<Code> ComputeCallField(int argc, | 108 Handle<Code> ComputeCallField(int argc, |
| (...skipping 474 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 583 } else if (kind_ == Code::STORE_IC) { | 583 } else if (kind_ == Code::STORE_IC) { |
| 584 return code->ic_state() == MONOMORPHIC | 584 return code->ic_state() == MONOMORPHIC |
| 585 ? Logger::STORE_IC_TAG : Logger::STORE_POLYMORPHIC_IC_TAG; | 585 ? Logger::STORE_IC_TAG : Logger::STORE_POLYMORPHIC_IC_TAG; |
| 586 } else { | 586 } else { |
| 587 return code->ic_state() == MONOMORPHIC | 587 return code->ic_state() == MONOMORPHIC |
| 588 ? Logger::KEYED_STORE_IC_TAG : Logger::KEYED_STORE_POLYMORPHIC_IC_TAG; | 588 ? Logger::KEYED_STORE_IC_TAG : Logger::KEYED_STORE_POLYMORPHIC_IC_TAG; |
| 589 } | 589 } |
| 590 } | 590 } |
| 591 void JitEvent(Handle<Name> name, Handle<Code> code); | 591 void JitEvent(Handle<Name> name, Handle<Code> code); |
| 592 | 592 |
| 593 virtual Code::ExtraICState extra_state() { return Code::kNoExtraICState; } | 593 virtual Code::ExtraICState extra_state() { return IC::kNoExtraICState; } |
| 594 virtual Register receiver() = 0; | 594 virtual Register receiver() = 0; |
| 595 virtual Register name() = 0; | 595 virtual Register name() = 0; |
| 596 virtual Register scratch1() = 0; | 596 virtual Register scratch1() = 0; |
| 597 virtual Register scratch2() = 0; | 597 virtual Register scratch2() = 0; |
| 598 virtual Register scratch3() = 0; | 598 virtual Register scratch3() = 0; |
| 599 | 599 |
| 600 void InitializeRegisters(); | 600 void InitializeRegisters(); |
| 601 | 601 |
| 602 bool IncludesNumberType(TypeHandleList* types); | 602 bool IncludesNumberType(TypeHandleList* types); |
| 603 | 603 |
| (...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 821 Label* label, | 821 Label* label, |
| 822 Handle<Name> name); | 822 Handle<Name> name); |
| 823 | 823 |
| 824 virtual Register receiver() { return registers_[0]; } | 824 virtual Register receiver() { return registers_[0]; } |
| 825 virtual Register name() { return registers_[1]; } | 825 virtual Register name() { return registers_[1]; } |
| 826 Register value() { return registers_[2]; } | 826 Register value() { return registers_[2]; } |
| 827 virtual Register scratch1() { return registers_[3]; } | 827 virtual Register scratch1() { return registers_[3]; } |
| 828 virtual Register scratch2() { return registers_[4]; } | 828 virtual Register scratch2() { return registers_[4]; } |
| 829 virtual Register scratch3() { return registers_[5]; } | 829 virtual Register scratch3() { return registers_[5]; } |
| 830 StrictModeFlag strict_mode() { return strict_mode_; } | 830 StrictModeFlag strict_mode() { return strict_mode_; } |
| 831 virtual Code::ExtraICState extra_state() { return strict_mode_; } | 831 virtual Code::ExtraICState extra_state() { |
| 832 return StoreIC::ComputeExtraICState(strict_mode_); |
| 833 } |
| 832 | 834 |
| 833 protected: | 835 protected: |
| 834 static Register* registers(); | 836 static Register* registers(); |
| 835 | 837 |
| 836 private: | 838 private: |
| 837 StrictModeFlag strict_mode_; | 839 StrictModeFlag strict_mode_; |
| 838 friend class BaseLoadStoreStubCompiler; | 840 friend class BaseLoadStoreStubCompiler; |
| 839 }; | 841 }; |
| 840 | 842 |
| 841 | 843 |
| (...skipping 10 matching lines...) Expand all Loading... |
| 852 Handle<Code> CompileStorePolymorphic(MapHandleList* receiver_maps, | 854 Handle<Code> CompileStorePolymorphic(MapHandleList* receiver_maps, |
| 853 CodeHandleList* handler_stubs, | 855 CodeHandleList* handler_stubs, |
| 854 MapHandleList* transitioned_maps); | 856 MapHandleList* transitioned_maps); |
| 855 | 857 |
| 856 Handle<Code> CompileStoreElementPolymorphic(MapHandleList* receiver_maps); | 858 Handle<Code> CompileStoreElementPolymorphic(MapHandleList* receiver_maps); |
| 857 | 859 |
| 858 static void GenerateStoreDictionaryElement(MacroAssembler* masm); | 860 static void GenerateStoreDictionaryElement(MacroAssembler* masm); |
| 859 | 861 |
| 860 protected: | 862 protected: |
| 861 virtual Code::ExtraICState extra_state() { | 863 virtual Code::ExtraICState extra_state() { |
| 862 return Code::ComputeExtraICState(store_mode_, strict_mode()); | 864 return KeyedStoreIC::ComputeExtraICState(strict_mode(), store_mode_); |
| 863 } | 865 } |
| 864 static Register* registers(); | 866 static Register* registers(); |
| 865 | 867 |
| 866 private: | 868 private: |
| 867 Register transition_map() { | 869 Register transition_map() { |
| 868 return registers()[3]; | 870 return registers()[3]; |
| 869 } | 871 } |
| 870 | 872 |
| 871 virtual void GenerateNameCheck(Handle<Name> name, | 873 virtual void GenerateNameCheck(Handle<Name> name, |
| 872 Register name_reg, | 874 Register name_reg, |
| (...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1039 Handle<JSFunction> constant_function_; | 1041 Handle<JSFunction> constant_function_; |
| 1040 bool is_simple_api_call_; | 1042 bool is_simple_api_call_; |
| 1041 Handle<FunctionTemplateInfo> expected_receiver_type_; | 1043 Handle<FunctionTemplateInfo> expected_receiver_type_; |
| 1042 Handle<CallHandlerInfo> api_call_info_; | 1044 Handle<CallHandlerInfo> api_call_info_; |
| 1043 }; | 1045 }; |
| 1044 | 1046 |
| 1045 | 1047 |
| 1046 } } // namespace v8::internal | 1048 } } // namespace v8::internal |
| 1047 | 1049 |
| 1048 #endif // V8_STUB_CACHE_H_ | 1050 #endif // V8_STUB_CACHE_H_ |
| OLD | NEW |