| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef V8_IC_H_ | 5 #ifndef V8_IC_H_ |
| 6 #define V8_IC_H_ | 6 #define V8_IC_H_ |
| 7 | 7 |
| 8 #include "src/ic/ic-state.h" | 8 #include "src/ic/ic-state.h" |
| 9 #include "src/macro-assembler.h" | 9 #include "src/macro-assembler.h" |
| 10 | 10 |
| (...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 288 private: | 288 private: |
| 289 Address address_; | 289 Address address_; |
| 290 IC::UtilityId id_; | 290 IC::UtilityId id_; |
| 291 }; | 291 }; |
| 292 | 292 |
| 293 | 293 |
| 294 class CallIC : public IC { | 294 class CallIC : public IC { |
| 295 public: | 295 public: |
| 296 explicit CallIC(Isolate* isolate) : IC(EXTRA_CALL_FRAME, isolate) {} | 296 explicit CallIC(Isolate* isolate) : IC(EXTRA_CALL_FRAME, isolate) {} |
| 297 | 297 |
| 298 void PatchMegamorphic(Handle<Object> function, Handle<FixedArray> vector, | 298 void PatchMegamorphic(Handle<Object> function, |
| 299 Handle<Smi> slot); | 299 Handle<TypeFeedbackVector> vector, Handle<Smi> slot); |
| 300 | 300 |
| 301 void HandleMiss(Handle<Object> receiver, Handle<Object> function, | 301 void HandleMiss(Handle<Object> receiver, Handle<Object> function, |
| 302 Handle<FixedArray> vector, Handle<Smi> slot); | 302 Handle<TypeFeedbackVector> vector, Handle<Smi> slot); |
| 303 | 303 |
| 304 // Returns true if a custom handler was installed. | 304 // Returns true if a custom handler was installed. |
| 305 bool DoCustomHandler(Handle<Object> receiver, Handle<Object> function, | 305 bool DoCustomHandler(Handle<Object> receiver, Handle<Object> function, |
| 306 Handle<FixedArray> vector, Handle<Smi> slot, | 306 Handle<TypeFeedbackVector> vector, Handle<Smi> slot, |
| 307 const CallICState& state); | 307 const CallICState& state); |
| 308 | 308 |
| 309 // Code generator routines. | 309 // Code generator routines. |
| 310 static Handle<Code> initialize_stub(Isolate* isolate, int argc, | 310 static Handle<Code> initialize_stub(Isolate* isolate, int argc, |
| 311 CallICState::CallType call_type); | 311 CallICState::CallType call_type); |
| 312 | 312 |
| 313 static void Clear(Isolate* isolate, Address address, Code* target, | 313 static void Clear(Isolate* isolate, Address address, Code* target, |
| 314 ConstantPoolArray* constant_pool); | 314 ConstantPoolArray* constant_pool); |
| 315 | 315 |
| 316 private: | 316 private: |
| 317 inline IC::State FeedbackToState(Handle<FixedArray> vector, | 317 inline IC::State FeedbackToState(Handle<TypeFeedbackVector> vector, |
| 318 Handle<Smi> slot) const; | 318 Handle<Smi> slot) const; |
| 319 }; | 319 }; |
| 320 | 320 |
| 321 | 321 |
| 322 class LoadIC : public IC { | 322 class LoadIC : public IC { |
| 323 public: | 323 public: |
| 324 static ExtraICState ComputeExtraICState(ContextualMode contextual_mode) { | 324 static ExtraICState ComputeExtraICState(ContextualMode contextual_mode) { |
| 325 return LoadICState(contextual_mode).GetExtraICState(); | 325 return LoadICState(contextual_mode).GetExtraICState(); |
| 326 } | 326 } |
| 327 | 327 |
| (...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 717 | 717 |
| 718 // Support functions for interceptor handlers. | 718 // Support functions for interceptor handlers. |
| 719 DECLARE_RUNTIME_FUNCTION(LoadPropertyWithInterceptorOnly); | 719 DECLARE_RUNTIME_FUNCTION(LoadPropertyWithInterceptorOnly); |
| 720 DECLARE_RUNTIME_FUNCTION(LoadPropertyWithInterceptor); | 720 DECLARE_RUNTIME_FUNCTION(LoadPropertyWithInterceptor); |
| 721 DECLARE_RUNTIME_FUNCTION(LoadElementWithInterceptor); | 721 DECLARE_RUNTIME_FUNCTION(LoadElementWithInterceptor); |
| 722 DECLARE_RUNTIME_FUNCTION(StorePropertyWithInterceptor); | 722 DECLARE_RUNTIME_FUNCTION(StorePropertyWithInterceptor); |
| 723 } | 723 } |
| 724 } // namespace v8::internal | 724 } // namespace v8::internal |
| 725 | 725 |
| 726 #endif // V8_IC_H_ | 726 #endif // V8_IC_H_ |
| OLD | NEW |