| 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 336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 347 static void GenerateInitialize(MacroAssembler* masm) { GenerateMiss(masm); } | 347 static void GenerateInitialize(MacroAssembler* masm) { GenerateMiss(masm); } |
| 348 static void GeneratePreMonomorphic(MacroAssembler* masm) { | 348 static void GeneratePreMonomorphic(MacroAssembler* masm) { |
| 349 GenerateMiss(masm); | 349 GenerateMiss(masm); |
| 350 } | 350 } |
| 351 static void GenerateMiss(MacroAssembler* masm); | 351 static void GenerateMiss(MacroAssembler* masm); |
| 352 static void GenerateNormal(MacroAssembler* masm); | 352 static void GenerateNormal(MacroAssembler* masm); |
| 353 static void GenerateRuntimeGetProperty(MacroAssembler* masm); | 353 static void GenerateRuntimeGetProperty(MacroAssembler* masm); |
| 354 | 354 |
| 355 static Handle<Code> initialize_stub(Isolate* isolate, | 355 static Handle<Code> initialize_stub(Isolate* isolate, |
| 356 ExtraICState extra_state); | 356 ExtraICState extra_state); |
| 357 static Handle<Code> initialize_stub_in_optimized_code( |
| 358 Isolate* isolate, ExtraICState extra_state); |
| 357 | 359 |
| 358 MUST_USE_RESULT MaybeHandle<Object> Load(Handle<Object> object, | 360 MUST_USE_RESULT MaybeHandle<Object> Load(Handle<Object> object, |
| 359 Handle<Name> name); | 361 Handle<Name> name); |
| 360 | 362 |
| 361 protected: | 363 protected: |
| 362 inline void set_target(Code* code); | 364 inline void set_target(Code* code); |
| 363 | 365 |
| 364 Handle<Code> slow_stub() const { | 366 Handle<Code> slow_stub() const { |
| 365 if (kind() == Code::LOAD_IC) { | 367 if (kind() == Code::LOAD_IC) { |
| 366 return isolate()->builtins()->LoadIC_Slow(); | 368 return isolate()->builtins()->LoadIC_Slow(); |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 414 static void GenerateGeneric(MacroAssembler* masm); | 416 static void GenerateGeneric(MacroAssembler* masm); |
| 415 static void GenerateString(MacroAssembler* masm); | 417 static void GenerateString(MacroAssembler* masm); |
| 416 | 418 |
| 417 // Bit mask to be tested against bit field for the cases when | 419 // Bit mask to be tested against bit field for the cases when |
| 418 // generic stub should go into slow case. | 420 // generic stub should go into slow case. |
| 419 // Access check is necessary explicitly since generic stub does not perform | 421 // Access check is necessary explicitly since generic stub does not perform |
| 420 // map checks. | 422 // map checks. |
| 421 static const int kSlowCaseBitFieldMask = | 423 static const int kSlowCaseBitFieldMask = |
| 422 (1 << Map::kIsAccessCheckNeeded) | (1 << Map::kHasIndexedInterceptor); | 424 (1 << Map::kIsAccessCheckNeeded) | (1 << Map::kHasIndexedInterceptor); |
| 423 | 425 |
| 426 static Handle<Code> initialize_stub(Isolate* isolate); |
| 427 static Handle<Code> initialize_stub_in_optimized_code(Isolate* isolate); |
| 424 static Handle<Code> generic_stub(Isolate* isolate); | 428 static Handle<Code> generic_stub(Isolate* isolate); |
| 425 static Handle<Code> pre_monomorphic_stub(Isolate* isolate); | 429 static Handle<Code> pre_monomorphic_stub(Isolate* isolate); |
| 426 | 430 |
| 427 protected: | 431 protected: |
| 428 Handle<Code> LoadElementStub(Handle<JSObject> receiver); | 432 Handle<Code> LoadElementStub(Handle<JSObject> receiver); |
| 429 virtual Handle<Code> pre_monomorphic_stub() const { | 433 virtual Handle<Code> pre_monomorphic_stub() const { |
| 430 return pre_monomorphic_stub(isolate()); | 434 return pre_monomorphic_stub(isolate()); |
| 431 } | 435 } |
| 432 | 436 |
| 433 private: | 437 private: |
| (...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 687 | 691 |
| 688 // Support functions for interceptor handlers. | 692 // Support functions for interceptor handlers. |
| 689 DECLARE_RUNTIME_FUNCTION(LoadPropertyWithInterceptorOnly); | 693 DECLARE_RUNTIME_FUNCTION(LoadPropertyWithInterceptorOnly); |
| 690 DECLARE_RUNTIME_FUNCTION(LoadPropertyWithInterceptor); | 694 DECLARE_RUNTIME_FUNCTION(LoadPropertyWithInterceptor); |
| 691 DECLARE_RUNTIME_FUNCTION(LoadElementWithInterceptor); | 695 DECLARE_RUNTIME_FUNCTION(LoadElementWithInterceptor); |
| 692 DECLARE_RUNTIME_FUNCTION(StorePropertyWithInterceptor); | 696 DECLARE_RUNTIME_FUNCTION(StorePropertyWithInterceptor); |
| 693 } | 697 } |
| 694 } // namespace v8::internal | 698 } // namespace v8::internal |
| 695 | 699 |
| 696 #endif // V8_IC_H_ | 700 #endif // V8_IC_H_ |
| OLD | NEW |