| 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 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 // Construct the IC structure with the given number of extra | 89 // Construct the IC structure with the given number of extra |
| 90 // JavaScript frames on the stack. | 90 // JavaScript frames on the stack. |
| 91 IC(FrameDepth depth, Isolate* isolate); | 91 IC(FrameDepth depth, Isolate* isolate); |
| 92 virtual ~IC() {} | 92 virtual ~IC() {} |
| 93 | 93 |
| 94 State state() const { return state_; } | 94 State state() const { return state_; } |
| 95 inline Address address() const; | 95 inline Address address() const; |
| 96 | 96 |
| 97 // Compute the current IC state based on the target stub, receiver and name. | 97 // Compute the current IC state based on the target stub, receiver and name. |
| 98 void UpdateState(Handle<Object> receiver, Handle<Object> name); | 98 void UpdateState(Handle<Object> receiver, Handle<Object> name); |
| 99 void MarkMonomorphicPrototypeFailure() { | 99 bool IsNameCompatibleWithMonomorphicPrototypeFailure(Handle<Object> name); |
| 100 void MarkMonomorphicPrototypeFailure(Handle<Object> name) { |
| 101 ASSERT(IsNameCompatibleWithMonomorphicPrototypeFailure(name)); |
| 100 state_ = MONOMORPHIC_PROTOTYPE_FAILURE; | 102 state_ = MONOMORPHIC_PROTOTYPE_FAILURE; |
| 101 } | 103 } |
| 102 | 104 |
| 103 // Clear the inline cache to initial state. | 105 // Clear the inline cache to initial state. |
| 104 static void Clear(Isolate* isolate, | 106 static void Clear(Isolate* isolate, |
| 105 Address address, | 107 Address address, |
| 106 ConstantPoolArray* constant_pool); | 108 ConstantPoolArray* constant_pool); |
| 107 | 109 |
| 108 #ifdef DEBUG | 110 #ifdef DEBUG |
| 109 bool IsLoadStub() const { | 111 bool IsLoadStub() const { |
| (...skipping 817 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 927 DECLARE_RUNTIME_FUNCTION(MaybeObject*, ElementsTransitionAndStoreIC_Miss); | 929 DECLARE_RUNTIME_FUNCTION(MaybeObject*, ElementsTransitionAndStoreIC_Miss); |
| 928 DECLARE_RUNTIME_FUNCTION(MaybeObject*, BinaryOpIC_Miss); | 930 DECLARE_RUNTIME_FUNCTION(MaybeObject*, BinaryOpIC_Miss); |
| 929 DECLARE_RUNTIME_FUNCTION(MaybeObject*, BinaryOpIC_MissWithAllocationSite); | 931 DECLARE_RUNTIME_FUNCTION(MaybeObject*, BinaryOpIC_MissWithAllocationSite); |
| 930 DECLARE_RUNTIME_FUNCTION(MaybeObject*, CompareNilIC_Miss); | 932 DECLARE_RUNTIME_FUNCTION(MaybeObject*, CompareNilIC_Miss); |
| 931 DECLARE_RUNTIME_FUNCTION(MaybeObject*, ToBooleanIC_Miss); | 933 DECLARE_RUNTIME_FUNCTION(MaybeObject*, ToBooleanIC_Miss); |
| 932 | 934 |
| 933 | 935 |
| 934 } } // namespace v8::internal | 936 } } // namespace v8::internal |
| 935 | 937 |
| 936 #endif // V8_IC_H_ | 938 #endif // V8_IC_H_ |
| OLD | NEW |