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

Side by Side Diff: src/ic.h

Issue 26236004: Rollback of r17108, r17106, r17104 in trunk branch. (Closed) Base URL: https://v8.googlecode.com/svn/trunk
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 657 matching lines...) Expand 10 before | Expand all | Expand 10 after
729 enum TypeInfo { 729 enum TypeInfo {
730 UNINITIALIZED, 730 UNINITIALIZED,
731 SMI, 731 SMI,
732 INT32, 732 INT32,
733 NUMBER, 733 NUMBER,
734 ODDBALL, 734 ODDBALL,
735 STRING, // Only used for addition operation. 735 STRING, // Only used for addition operation.
736 GENERIC 736 GENERIC
737 }; 737 };
738 738
739 explicit BinaryOpIC(Isolate* isolate) : IC(EXTRA_CALL_FRAME, isolate) { } 739 static void StubInfoToType(int minor_key,
740 Handle<Type>* left,
741 Handle<Type>* right,
742 Handle<Type>* result,
743 Isolate* isolate);
740 744
741 static Builtins::JavaScript TokenToJSBuiltin(Token::Value op); 745 explicit BinaryOpIC(Isolate* isolate) : IC(NO_EXTRA_FRAME, isolate) { }
746
747 void patch(Code* code);
742 748
743 static const char* GetName(TypeInfo type_info); 749 static const char* GetName(TypeInfo type_info);
744 750
745 MUST_USE_RESULT MaybeObject* Transition(Handle<Object> left, 751 static State ToState(TypeInfo type_info);
746 Handle<Object> right); 752
753 private:
754 static Handle<Type> TypeInfoToType(TypeInfo binary_type, Isolate* isolate);
747 }; 755 };
748 756
749 757
750 class CompareIC: public IC { 758 class CompareIC: public IC {
751 public: 759 public:
752 // The type/state lattice is defined by the following inequations: 760 // The type/state lattice is defined by the following inequations:
753 // UNINITIALIZED < ... 761 // UNINITIALIZED < ...
754 // ... < GENERIC 762 // ... < GENERIC
755 // SMI < NUMBER 763 // SMI < NUMBER
756 // INTERNALIZED_STRING < STRING 764 // INTERNALIZED_STRING < STRING
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
843 851
844 // Helper for BinaryOpIC and CompareIC. 852 // Helper for BinaryOpIC and CompareIC.
845 enum InlinedSmiCheck { ENABLE_INLINED_SMI_CHECK, DISABLE_INLINED_SMI_CHECK }; 853 enum InlinedSmiCheck { ENABLE_INLINED_SMI_CHECK, DISABLE_INLINED_SMI_CHECK };
846 void PatchInlinedSmiCode(Address address, InlinedSmiCheck check); 854 void PatchInlinedSmiCode(Address address, InlinedSmiCheck check);
847 855
848 DECLARE_RUNTIME_FUNCTION(MaybeObject*, KeyedLoadIC_MissFromStubFailure); 856 DECLARE_RUNTIME_FUNCTION(MaybeObject*, KeyedLoadIC_MissFromStubFailure);
849 DECLARE_RUNTIME_FUNCTION(MaybeObject*, KeyedStoreIC_MissFromStubFailure); 857 DECLARE_RUNTIME_FUNCTION(MaybeObject*, KeyedStoreIC_MissFromStubFailure);
850 DECLARE_RUNTIME_FUNCTION(MaybeObject*, UnaryOpIC_Miss); 858 DECLARE_RUNTIME_FUNCTION(MaybeObject*, UnaryOpIC_Miss);
851 DECLARE_RUNTIME_FUNCTION(MaybeObject*, StoreIC_MissFromStubFailure); 859 DECLARE_RUNTIME_FUNCTION(MaybeObject*, StoreIC_MissFromStubFailure);
852 DECLARE_RUNTIME_FUNCTION(MaybeObject*, ElementsTransitionAndStoreIC_Miss); 860 DECLARE_RUNTIME_FUNCTION(MaybeObject*, ElementsTransitionAndStoreIC_Miss);
853 DECLARE_RUNTIME_FUNCTION(MaybeObject*, BinaryOpIC_Miss);
854 DECLARE_RUNTIME_FUNCTION(MaybeObject*, CompareNilIC_Miss); 861 DECLARE_RUNTIME_FUNCTION(MaybeObject*, CompareNilIC_Miss);
855 DECLARE_RUNTIME_FUNCTION(MaybeObject*, ToBooleanIC_Miss); 862 DECLARE_RUNTIME_FUNCTION(MaybeObject*, ToBooleanIC_Miss);
856 863
857 864
858 } } // namespace v8::internal 865 } } // namespace v8::internal
859 866
860 #endif // V8_IC_H_ 867 #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