| 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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 ICU(LoadPropertyWithInterceptorOnly) \ | 55 ICU(LoadPropertyWithInterceptorOnly) \ |
| 56 ICU(LoadPropertyWithInterceptorForLoad) \ | 56 ICU(LoadPropertyWithInterceptorForLoad) \ |
| 57 ICU(LoadPropertyWithInterceptorForCall) \ | 57 ICU(LoadPropertyWithInterceptorForCall) \ |
| 58 ICU(KeyedLoadPropertyWithInterceptor) \ | 58 ICU(KeyedLoadPropertyWithInterceptor) \ |
| 59 ICU(StoreInterceptorProperty) \ | 59 ICU(StoreInterceptorProperty) \ |
| 60 ICU(UnaryOp_Patch) \ | 60 ICU(UnaryOp_Patch) \ |
| 61 ICU(BinaryOp_Patch) \ | 61 ICU(BinaryOp_Patch) \ |
| 62 ICU(CompareIC_Miss) \ | 62 ICU(CompareIC_Miss) \ |
| 63 ICU(CompareNilIC_Miss) \ | 63 ICU(CompareNilIC_Miss) \ |
| 64 ICU(Unreachable) \ | 64 ICU(Unreachable) \ |
| 65 ICU(ToBoolean_Patch) | 65 ICU(ToBooleanIC_Miss) |
| 66 // | 66 // |
| 67 // IC is the base class for LoadIC, StoreIC, CallIC, KeyedLoadIC, | 67 // IC is the base class for LoadIC, StoreIC, CallIC, KeyedLoadIC, |
| 68 // and KeyedStoreIC. | 68 // and KeyedStoreIC. |
| 69 // | 69 // |
| 70 class IC { | 70 class IC { |
| 71 public: | 71 public: |
| 72 // The ids for utility called from the generated code. | 72 // The ids for utility called from the generated code. |
| 73 enum UtilityId { | 73 enum UtilityId { |
| 74 #define CONST_NAME(name) k##name, | 74 #define CONST_NAME(name) k##name, |
| 75 IC_UTIL_LIST(CONST_NAME) | 75 IC_UTIL_LIST(CONST_NAME) |
| (...skipping 706 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 782 class CompareNilIC: public IC { | 782 class CompareNilIC: public IC { |
| 783 public: | 783 public: |
| 784 explicit CompareNilIC(Isolate* isolate) : IC(EXTRA_CALL_FRAME, isolate) {} | 784 explicit CompareNilIC(Isolate* isolate) : IC(EXTRA_CALL_FRAME, isolate) {} |
| 785 | 785 |
| 786 MUST_USE_RESULT MaybeObject* CompareNil(Handle<Object> object); | 786 MUST_USE_RESULT MaybeObject* CompareNil(Handle<Object> object); |
| 787 | 787 |
| 788 static Handle<Code> GetUninitialized(); | 788 static Handle<Code> GetUninitialized(); |
| 789 | 789 |
| 790 static void Clear(Address address, Code* target); | 790 static void Clear(Address address, Code* target); |
| 791 | 791 |
| 792 void patch(Code* code); | |
| 793 | |
| 794 static MUST_USE_RESULT MaybeObject* DoCompareNilSlow(EqualityKind kind, | 792 static MUST_USE_RESULT MaybeObject* DoCompareNilSlow(EqualityKind kind, |
| 795 NilValue nil, | 793 NilValue nil, |
| 796 Handle<Object> object); | 794 Handle<Object> object); |
| 797 }; | 795 }; |
| 798 | 796 |
| 799 | 797 |
| 800 class ToBooleanIC: public IC { | 798 class ToBooleanIC: public IC { |
| 801 public: | 799 public: |
| 802 explicit ToBooleanIC(Isolate* isolate) : IC(NO_EXTRA_FRAME, isolate) { } | 800 explicit ToBooleanIC(Isolate* isolate) : IC(EXTRA_CALL_FRAME, isolate) { } |
| 803 | 801 |
| 804 void patch(Code* code); | 802 MaybeObject* ToBoolean(Handle<Object> object, Code::ExtraICState state); |
| 805 }; | 803 }; |
| 806 | 804 |
| 807 | 805 |
| 808 // Helper for BinaryOpIC and CompareIC. | 806 // Helper for BinaryOpIC and CompareIC. |
| 809 enum InlinedSmiCheck { ENABLE_INLINED_SMI_CHECK, DISABLE_INLINED_SMI_CHECK }; | 807 enum InlinedSmiCheck { ENABLE_INLINED_SMI_CHECK, DISABLE_INLINED_SMI_CHECK }; |
| 810 void PatchInlinedSmiCode(Address address, InlinedSmiCheck check); | 808 void PatchInlinedSmiCode(Address address, InlinedSmiCheck check); |
| 811 | 809 |
| 812 DECLARE_RUNTIME_FUNCTION(MaybeObject*, KeyedLoadIC_MissFromStubFailure); | 810 DECLARE_RUNTIME_FUNCTION(MaybeObject*, KeyedLoadIC_MissFromStubFailure); |
| 813 DECLARE_RUNTIME_FUNCTION(MaybeObject*, KeyedStoreIC_MissFromStubFailure); | 811 DECLARE_RUNTIME_FUNCTION(MaybeObject*, KeyedStoreIC_MissFromStubFailure); |
| 814 DECLARE_RUNTIME_FUNCTION(MaybeObject*, CompareNilIC_MissLight); | |
| 815 DECLARE_RUNTIME_FUNCTION(MaybeObject*, CompareNilIC_Miss); | 812 DECLARE_RUNTIME_FUNCTION(MaybeObject*, CompareNilIC_Miss); |
| 813 DECLARE_RUNTIME_FUNCTION(MaybeObject*, ToBooleanIC_Miss); |
| 816 | 814 |
| 817 | 815 |
| 818 } } // namespace v8::internal | 816 } } // namespace v8::internal |
| 819 | 817 |
| 820 #endif // V8_IC_H_ | 818 #endif // V8_IC_H_ |
| OLD | NEW |