Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(149)

Side by Side Diff: src/ic.h

Issue 25571002: Revert "Hydrogenisation of binops" (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/ia32/macro-assembler-ia32.cc ('k') | src/ic.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 ICU(KeyedStoreIC_Miss) \ 50 ICU(KeyedStoreIC_Miss) \
51 ICU(KeyedStoreIC_MissForceGeneric) \ 51 ICU(KeyedStoreIC_MissForceGeneric) \
52 ICU(KeyedStoreIC_Slow) \ 52 ICU(KeyedStoreIC_Slow) \
53 /* Utilities for IC stubs. */ \ 53 /* Utilities for IC stubs. */ \
54 ICU(StoreCallbackProperty) \ 54 ICU(StoreCallbackProperty) \
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(BinaryOp_Patch) \
60 ICU(CompareIC_Miss) \ 61 ICU(CompareIC_Miss) \
61 ICU(BinaryOpIC_Miss) \
62 ICU(CompareNilIC_Miss) \ 62 ICU(CompareNilIC_Miss) \
63 ICU(Unreachable) \ 63 ICU(Unreachable) \
64 ICU(ToBooleanIC_Miss) 64 ICU(ToBooleanIC_Miss)
65 // 65 //
66 // IC is the base class for LoadIC, StoreIC, CallIC, KeyedLoadIC, 66 // IC is the base class for LoadIC, StoreIC, CallIC, KeyedLoadIC,
67 // and KeyedStoreIC. 67 // and KeyedStoreIC.
68 // 68 //
69 class IC { 69 class IC {
70 public: 70 public:
71 // The ids for utility called from the generated code. 71 // The ids for utility called from the generated code.
(...skipping 656 matching lines...) Expand 10 before | Expand all | Expand 10 after
728 enum TypeInfo { 728 enum TypeInfo {
729 UNINITIALIZED, 729 UNINITIALIZED,
730 SMI, 730 SMI,
731 INT32, 731 INT32,
732 NUMBER, 732 NUMBER,
733 ODDBALL, 733 ODDBALL,
734 STRING, // Only used for addition operation. 734 STRING, // Only used for addition operation.
735 GENERIC 735 GENERIC
736 }; 736 };
737 737
738 explicit BinaryOpIC(Isolate* isolate) : IC(EXTRA_CALL_FRAME, isolate) { } 738 static void StubInfoToType(int minor_key,
739 Handle<Type>* left,
740 Handle<Type>* right,
741 Handle<Type>* result,
742 Isolate* isolate);
739 743
740 static Builtins::JavaScript TokenToJSBuiltin(Token::Value op); 744 explicit BinaryOpIC(Isolate* isolate) : IC(NO_EXTRA_FRAME, isolate) { }
745
746 void patch(Code* code);
741 747
742 static const char* GetName(TypeInfo type_info); 748 static const char* GetName(TypeInfo type_info);
743 749
744 MUST_USE_RESULT MaybeObject* Transition(Handle<Object> left, 750 static State ToState(TypeInfo type_info);
745 Handle<Object> right); 751
752 private:
753 static Handle<Type> TypeInfoToType(TypeInfo binary_type, Isolate* isolate);
746 }; 754 };
747 755
748 756
749 class CompareIC: public IC { 757 class CompareIC: public IC {
750 public: 758 public:
751 // The type/state lattice is defined by the following inequations: 759 // The type/state lattice is defined by the following inequations:
752 // UNINITIALIZED < ... 760 // UNINITIALIZED < ...
753 // ... < GENERIC 761 // ... < GENERIC
754 // SMI < NUMBER 762 // SMI < NUMBER
755 // INTERNALIZED_STRING < STRING 763 // INTERNALIZED_STRING < STRING
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
842 850
843 // Helper for BinaryOpIC and CompareIC. 851 // Helper for BinaryOpIC and CompareIC.
844 enum InlinedSmiCheck { ENABLE_INLINED_SMI_CHECK, DISABLE_INLINED_SMI_CHECK }; 852 enum InlinedSmiCheck { ENABLE_INLINED_SMI_CHECK, DISABLE_INLINED_SMI_CHECK };
845 void PatchInlinedSmiCode(Address address, InlinedSmiCheck check); 853 void PatchInlinedSmiCode(Address address, InlinedSmiCheck check);
846 854
847 DECLARE_RUNTIME_FUNCTION(MaybeObject*, KeyedLoadIC_MissFromStubFailure); 855 DECLARE_RUNTIME_FUNCTION(MaybeObject*, KeyedLoadIC_MissFromStubFailure);
848 DECLARE_RUNTIME_FUNCTION(MaybeObject*, KeyedStoreIC_MissFromStubFailure); 856 DECLARE_RUNTIME_FUNCTION(MaybeObject*, KeyedStoreIC_MissFromStubFailure);
849 DECLARE_RUNTIME_FUNCTION(MaybeObject*, UnaryOpIC_Miss); 857 DECLARE_RUNTIME_FUNCTION(MaybeObject*, UnaryOpIC_Miss);
850 DECLARE_RUNTIME_FUNCTION(MaybeObject*, StoreIC_MissFromStubFailure); 858 DECLARE_RUNTIME_FUNCTION(MaybeObject*, StoreIC_MissFromStubFailure);
851 DECLARE_RUNTIME_FUNCTION(MaybeObject*, ElementsTransitionAndStoreIC_Miss); 859 DECLARE_RUNTIME_FUNCTION(MaybeObject*, ElementsTransitionAndStoreIC_Miss);
852 DECLARE_RUNTIME_FUNCTION(MaybeObject*, BinaryOpIC_Miss);
853 DECLARE_RUNTIME_FUNCTION(MaybeObject*, CompareNilIC_Miss); 860 DECLARE_RUNTIME_FUNCTION(MaybeObject*, CompareNilIC_Miss);
854 DECLARE_RUNTIME_FUNCTION(MaybeObject*, ToBooleanIC_Miss); 861 DECLARE_RUNTIME_FUNCTION(MaybeObject*, ToBooleanIC_Miss);
855 862
856 863
857 } } // namespace v8::internal 864 } } // namespace v8::internal
858 865
859 #endif // V8_IC_H_ 866 #endif // V8_IC_H_
OLDNEW
« no previous file with comments | « src/ia32/macro-assembler-ia32.cc ('k') | src/ic.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698