OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 /* Utilities for IC stubs. */ \ | 52 /* Utilities for IC stubs. */ \ |
53 ICU(LoadCallbackProperty) \ | 53 ICU(LoadCallbackProperty) \ |
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(UnaryOp_Patch) \ | 60 ICU(UnaryOp_Patch) \ |
61 ICU(BinaryOp_Patch) \ | 61 ICU(BinaryOp_Patch) \ |
62 ICU(CompareIC_Miss) | 62 ICU(CompareIC_Miss) \ |
| 63 ICU(ToBoolean_Patch) |
63 // | 64 // |
64 // IC is the base class for LoadIC, StoreIC, CallIC, KeyedLoadIC, | 65 // IC is the base class for LoadIC, StoreIC, CallIC, KeyedLoadIC, |
65 // and KeyedStoreIC. | 66 // and KeyedStoreIC. |
66 // | 67 // |
67 class IC { | 68 class IC { |
68 public: | 69 public: |
69 // The ids for utility called from the generated code. | 70 // The ids for utility called from the generated code. |
70 enum UtilityId { | 71 enum UtilityId { |
71 #define CONST_NAME(name) k##name, | 72 #define CONST_NAME(name) k##name, |
72 IC_UTIL_LIST(CONST_NAME) | 73 IC_UTIL_LIST(CONST_NAME) |
(...skipping 640 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
713 State TargetState(State state, bool has_inlined_smi_code, | 714 State TargetState(State state, bool has_inlined_smi_code, |
714 Handle<Object> x, Handle<Object> y); | 715 Handle<Object> x, Handle<Object> y); |
715 | 716 |
716 bool strict() const { return op_ == Token::EQ_STRICT; } | 717 bool strict() const { return op_ == Token::EQ_STRICT; } |
717 Condition GetCondition() const { return ComputeCondition(op_); } | 718 Condition GetCondition() const { return ComputeCondition(op_); } |
718 State GetState() { return ComputeState(target()); } | 719 State GetState() { return ComputeState(target()); } |
719 | 720 |
720 Token::Value op_; | 721 Token::Value op_; |
721 }; | 722 }; |
722 | 723 |
| 724 |
| 725 class ToBooleanIC: public IC { |
| 726 public: |
| 727 explicit ToBooleanIC(Isolate* isolate) : IC(NO_EXTRA_FRAME, isolate) { } |
| 728 |
| 729 void patch(Code* code); |
| 730 }; |
| 731 |
| 732 |
723 // Helper for BinaryOpIC and CompareIC. | 733 // Helper for BinaryOpIC and CompareIC. |
724 void PatchInlinedSmiCode(Address address); | 734 void PatchInlinedSmiCode(Address address); |
725 | 735 |
726 } } // namespace v8::internal | 736 } } // namespace v8::internal |
727 | 737 |
728 #endif // V8_IC_H_ | 738 #endif // V8_IC_H_ |
OLD | NEW |