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

Side by Side Diff: src/ic.h

Issue 15302004: Convert ToBooleanStub to a HydrogenStub. Currently just using HBranch, which is still fully impleme… (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 6 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
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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 716 matching lines...) Expand 10 before | Expand all | Expand 10 after
792 void patch(Code* code); 792 void patch(Code* code);
793 793
794 static MUST_USE_RESULT MaybeObject* DoCompareNilSlow(EqualityKind kind, 794 static MUST_USE_RESULT MaybeObject* DoCompareNilSlow(EqualityKind kind,
795 NilValue nil, 795 NilValue nil,
796 Handle<Object> object); 796 Handle<Object> object);
797 }; 797 };
798 798
799 799
800 class ToBooleanIC: public IC { 800 class ToBooleanIC: public IC {
801 public: 801 public:
802 explicit ToBooleanIC(Isolate* isolate) : IC(NO_EXTRA_FRAME, isolate) { } 802 explicit ToBooleanIC(Isolate* isolate) : IC(EXTRA_CALL_FRAME, isolate) { }
803 803
804 void patch(Code* code); 804 void patch(Code* code);
805
806 MaybeObject* ToBoolean(Handle<Object> object, Code::ExtraICState state);
805 }; 807 };
806 808
807 809
808 // Helper for BinaryOpIC and CompareIC. 810 // Helper for BinaryOpIC and CompareIC.
809 enum InlinedSmiCheck { ENABLE_INLINED_SMI_CHECK, DISABLE_INLINED_SMI_CHECK }; 811 enum InlinedSmiCheck { ENABLE_INLINED_SMI_CHECK, DISABLE_INLINED_SMI_CHECK };
810 void PatchInlinedSmiCode(Address address, InlinedSmiCheck check); 812 void PatchInlinedSmiCode(Address address, InlinedSmiCheck check);
811 813
812 DECLARE_RUNTIME_FUNCTION(MaybeObject*, KeyedLoadIC_MissFromStubFailure); 814 DECLARE_RUNTIME_FUNCTION(MaybeObject*, KeyedLoadIC_MissFromStubFailure);
813 DECLARE_RUNTIME_FUNCTION(MaybeObject*, KeyedStoreIC_MissFromStubFailure); 815 DECLARE_RUNTIME_FUNCTION(MaybeObject*, KeyedStoreIC_MissFromStubFailure);
814 DECLARE_RUNTIME_FUNCTION(MaybeObject*, CompareNilIC_MissLight);
815 DECLARE_RUNTIME_FUNCTION(MaybeObject*, CompareNilIC_Miss); 816 DECLARE_RUNTIME_FUNCTION(MaybeObject*, CompareNilIC_Miss);
817 DECLARE_RUNTIME_FUNCTION(MaybeObject*, ToBooleanIC_Miss);
816 818
817 819
818 } } // namespace v8::internal 820 } } // namespace v8::internal
819 821
820 #endif // V8_IC_H_ 822 #endif // V8_IC_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698