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 30 matching lines...) Expand all Loading... |
41 ICU(LoadIC_Miss) \ | 41 ICU(LoadIC_Miss) \ |
42 ICU(KeyedLoadIC_Miss) \ | 42 ICU(KeyedLoadIC_Miss) \ |
43 ICU(KeyedLoadIC_MissForceGeneric) \ | 43 ICU(KeyedLoadIC_MissForceGeneric) \ |
44 ICU(CallIC_Miss) \ | 44 ICU(CallIC_Miss) \ |
45 ICU(KeyedCallIC_Miss) \ | 45 ICU(KeyedCallIC_Miss) \ |
46 ICU(StoreIC_Miss) \ | 46 ICU(StoreIC_Miss) \ |
47 ICU(StoreIC_ArrayLength) \ | 47 ICU(StoreIC_ArrayLength) \ |
48 ICU(StoreIC_Slow) \ | 48 ICU(StoreIC_Slow) \ |
49 ICU(SharedStoreIC_ExtendStorage) \ | 49 ICU(SharedStoreIC_ExtendStorage) \ |
50 ICU(KeyedStoreIC_Miss) \ | 50 ICU(KeyedStoreIC_Miss) \ |
51 ICU(KeyedStoreIC_MissForceGeneric) \ | |
52 ICU(KeyedStoreIC_Slow) \ | 51 ICU(KeyedStoreIC_Slow) \ |
53 /* Utilities for IC stubs. */ \ | 52 /* Utilities for IC stubs. */ \ |
54 ICU(StoreCallbackProperty) \ | 53 ICU(StoreCallbackProperty) \ |
55 ICU(LoadPropertyWithInterceptorOnly) \ | 54 ICU(LoadPropertyWithInterceptorOnly) \ |
56 ICU(LoadPropertyWithInterceptorForLoad) \ | 55 ICU(LoadPropertyWithInterceptorForLoad) \ |
57 ICU(LoadPropertyWithInterceptorForCall) \ | 56 ICU(LoadPropertyWithInterceptorForCall) \ |
58 ICU(KeyedLoadPropertyWithInterceptor) \ | 57 ICU(KeyedLoadPropertyWithInterceptor) \ |
59 ICU(StoreInterceptorProperty) \ | 58 ICU(StoreInterceptorProperty) \ |
60 ICU(CompareIC_Miss) \ | 59 ICU(CompareIC_Miss) \ |
61 ICU(BinaryOpIC_Miss) \ | 60 ICU(BinaryOpIC_Miss) \ |
(...skipping 618 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
680 }; | 679 }; |
681 | 680 |
682 | 681 |
683 class KeyedStoreIC: public StoreIC { | 682 class KeyedStoreIC: public StoreIC { |
684 public: | 683 public: |
685 KeyedStoreIC(FrameDepth depth, Isolate* isolate) | 684 KeyedStoreIC(FrameDepth depth, Isolate* isolate) |
686 : StoreIC(depth, isolate) { | 685 : StoreIC(depth, isolate) { |
687 ASSERT(target()->is_keyed_store_stub()); | 686 ASSERT(target()->is_keyed_store_stub()); |
688 } | 687 } |
689 | 688 |
690 MUST_USE_RESULT MaybeObject* StoreForceGeneric(Handle<Object> object, | |
691 Handle<Object> name, | |
692 Handle<Object> value); | |
693 MUST_USE_RESULT MaybeObject* Store(Handle<Object> object, | 689 MUST_USE_RESULT MaybeObject* Store(Handle<Object> object, |
694 Handle<Object> name, | 690 Handle<Object> name, |
695 Handle<Object> value); | 691 Handle<Object> value); |
696 | 692 |
697 // Code generators for stub routines. Only called once at startup. | 693 // Code generators for stub routines. Only called once at startup. |
698 static void GenerateInitialize(MacroAssembler* masm) { | 694 static void GenerateInitialize(MacroAssembler* masm) { GenerateMiss(masm); } |
699 GenerateMiss(masm, MISS); | 695 static void GeneratePreMonomorphic(MacroAssembler* masm) { |
| 696 GenerateMiss(masm); |
700 } | 697 } |
701 static void GeneratePreMonomorphic(MacroAssembler* masm) { | 698 static void GenerateMiss(MacroAssembler* masm); |
702 GenerateMiss(masm, MISS); | |
703 } | |
704 static void GenerateMiss(MacroAssembler* masm, ICMissMode force_generic); | |
705 static void GenerateSlow(MacroAssembler* masm); | 699 static void GenerateSlow(MacroAssembler* masm); |
706 static void GenerateRuntimeSetProperty(MacroAssembler* masm, | 700 static void GenerateRuntimeSetProperty(MacroAssembler* masm, |
707 StrictModeFlag strict_mode); | 701 StrictModeFlag strict_mode); |
708 static void GenerateGeneric(MacroAssembler* masm, StrictModeFlag strict_mode); | 702 static void GenerateGeneric(MacroAssembler* masm, StrictModeFlag strict_mode); |
709 static void GenerateNonStrictArguments(MacroAssembler* masm); | 703 static void GenerateNonStrictArguments(MacroAssembler* masm); |
710 | 704 |
711 protected: | 705 protected: |
712 virtual Code::Kind kind() const { return Code::KEYED_STORE_IC; } | 706 virtual Code::Kind kind() const { return Code::KEYED_STORE_IC; } |
713 | 707 |
714 virtual void UpdateMegamorphicCache(Map* map, Name* name, Code* code) { } | 708 virtual void UpdateMegamorphicCache(Map* map, Name* name, Code* code) { } |
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
912 DECLARE_RUNTIME_FUNCTION(MaybeObject*, StoreIC_MissFromStubFailure); | 906 DECLARE_RUNTIME_FUNCTION(MaybeObject*, StoreIC_MissFromStubFailure); |
913 DECLARE_RUNTIME_FUNCTION(MaybeObject*, ElementsTransitionAndStoreIC_Miss); | 907 DECLARE_RUNTIME_FUNCTION(MaybeObject*, ElementsTransitionAndStoreIC_Miss); |
914 DECLARE_RUNTIME_FUNCTION(MaybeObject*, BinaryOpIC_Miss); | 908 DECLARE_RUNTIME_FUNCTION(MaybeObject*, BinaryOpIC_Miss); |
915 DECLARE_RUNTIME_FUNCTION(MaybeObject*, CompareNilIC_Miss); | 909 DECLARE_RUNTIME_FUNCTION(MaybeObject*, CompareNilIC_Miss); |
916 DECLARE_RUNTIME_FUNCTION(MaybeObject*, ToBooleanIC_Miss); | 910 DECLARE_RUNTIME_FUNCTION(MaybeObject*, ToBooleanIC_Miss); |
917 | 911 |
918 | 912 |
919 } } // namespace v8::internal | 913 } } // namespace v8::internal |
920 | 914 |
921 #endif // V8_IC_H_ | 915 #endif // V8_IC_H_ |
OLD | NEW |