Chromium Code Reviews| 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 416 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 427 } | 427 } |
| 428 | 428 |
| 429 static Handle<Code> pre_monomorphic_stub(Isolate* isolate) { | 429 static Handle<Code> pre_monomorphic_stub(Isolate* isolate) { |
| 430 return isolate->builtins()->LoadIC_PreMonomorphic(); | 430 return isolate->builtins()->LoadIC_PreMonomorphic(); |
| 431 } | 431 } |
| 432 | 432 |
| 433 virtual Handle<Code> pre_monomorphic_stub() { | 433 virtual Handle<Code> pre_monomorphic_stub() { |
| 434 return pre_monomorphic_stub(isolate()); | 434 return pre_monomorphic_stub(isolate()); |
| 435 } | 435 } |
| 436 | 436 |
| 437 Handle<Code> SimpleFieldLoad(int offset, | |
| 438 bool inobject = true, | |
| 439 Representation representation = | |
| 440 Representation::Tagged()); | |
|
ulan
2013/10/11 13:37:51
Indent to 4 spaces.
| |
| 441 | |
| 437 static void Clear(Isolate* isolate, Address address, Code* target); | 442 static void Clear(Isolate* isolate, Address address, Code* target); |
| 438 | 443 |
| 439 friend class IC; | 444 friend class IC; |
| 440 }; | 445 }; |
| 441 | 446 |
| 442 | 447 |
| 443 enum ICMissMode { | 448 enum ICMissMode { |
| 444 MISS_FORCE_GENERIC, | 449 MISS_FORCE_GENERIC, |
| 445 MISS | 450 MISS |
| 446 }; | 451 }; |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 486 virtual Handle<Code> megamorphic_stub() { | 491 virtual Handle<Code> megamorphic_stub() { |
| 487 return isolate()->builtins()->KeyedLoadIC_Generic(); | 492 return isolate()->builtins()->KeyedLoadIC_Generic(); |
| 488 } | 493 } |
| 489 virtual Handle<Code> generic_stub() const { | 494 virtual Handle<Code> generic_stub() const { |
| 490 return isolate()->builtins()->KeyedLoadIC_Generic(); | 495 return isolate()->builtins()->KeyedLoadIC_Generic(); |
| 491 } | 496 } |
| 492 virtual Handle<Code> slow_stub() const { | 497 virtual Handle<Code> slow_stub() const { |
| 493 return isolate()->builtins()->KeyedLoadIC_Slow(); | 498 return isolate()->builtins()->KeyedLoadIC_Slow(); |
| 494 } | 499 } |
| 495 | 500 |
| 496 virtual Handle<Code> CompileHandler(LookupResult* lookup, | |
| 497 Handle<JSObject> receiver, | |
| 498 Handle<String> name, | |
| 499 Handle<Object> unused); | |
| 500 virtual void UpdateMegamorphicCache(Map* map, Name* name, Code* code) { } | 501 virtual void UpdateMegamorphicCache(Map* map, Name* name, Code* code) { } |
| 501 | 502 |
| 502 private: | 503 private: |
| 503 // Stub accessors. | 504 // Stub accessors. |
| 504 static Handle<Code> initialize_stub(Isolate* isolate) { | 505 static Handle<Code> initialize_stub(Isolate* isolate) { |
| 505 return isolate->builtins()->KeyedLoadIC_Initialize(); | 506 return isolate->builtins()->KeyedLoadIC_Initialize(); |
| 506 } | 507 } |
| 507 static Handle<Code> pre_monomorphic_stub(Isolate* isolate) { | 508 static Handle<Code> pre_monomorphic_stub(Isolate* isolate) { |
| 508 return isolate->builtins()->KeyedLoadIC_PreMonomorphic(); | 509 return isolate->builtins()->KeyedLoadIC_PreMonomorphic(); |
| 509 } | 510 } |
| (...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 673 static void GenerateMiss(MacroAssembler* masm, ICMissMode force_generic); | 674 static void GenerateMiss(MacroAssembler* masm, ICMissMode force_generic); |
| 674 static void GenerateSlow(MacroAssembler* masm); | 675 static void GenerateSlow(MacroAssembler* masm); |
| 675 static void GenerateRuntimeSetProperty(MacroAssembler* masm, | 676 static void GenerateRuntimeSetProperty(MacroAssembler* masm, |
| 676 StrictModeFlag strict_mode); | 677 StrictModeFlag strict_mode); |
| 677 static void GenerateGeneric(MacroAssembler* masm, StrictModeFlag strict_mode); | 678 static void GenerateGeneric(MacroAssembler* masm, StrictModeFlag strict_mode); |
| 678 static void GenerateNonStrictArguments(MacroAssembler* masm); | 679 static void GenerateNonStrictArguments(MacroAssembler* masm); |
| 679 | 680 |
| 680 protected: | 681 protected: |
| 681 virtual Code::Kind kind() const { return Code::KEYED_STORE_IC; } | 682 virtual Code::Kind kind() const { return Code::KEYED_STORE_IC; } |
| 682 | 683 |
| 683 virtual Handle<Code> CompileHandler(LookupResult* lookup, | |
| 684 Handle<JSObject> receiver, | |
| 685 Handle<String> name, | |
| 686 Handle<Object> value); | |
| 687 virtual void UpdateMegamorphicCache(Map* map, Name* name, Code* code) { } | 684 virtual void UpdateMegamorphicCache(Map* map, Name* name, Code* code) { } |
| 688 | 685 |
| 689 virtual Handle<Code> pre_monomorphic_stub() { | 686 virtual Handle<Code> pre_monomorphic_stub() { |
| 690 return pre_monomorphic_stub(isolate(), strict_mode()); | 687 return pre_monomorphic_stub(isolate(), strict_mode()); |
| 691 } | 688 } |
| 692 static Handle<Code> pre_monomorphic_stub(Isolate* isolate, | 689 static Handle<Code> pre_monomorphic_stub(Isolate* isolate, |
| 693 StrictModeFlag strict_mode) { | 690 StrictModeFlag strict_mode) { |
| 694 if (strict_mode == kStrictMode) { | 691 if (strict_mode == kStrictMode) { |
| 695 return isolate->builtins()->KeyedStoreIC_PreMonomorphic_Strict(); | 692 return isolate->builtins()->KeyedStoreIC_PreMonomorphic_Strict(); |
| 696 } else { | 693 } else { |
| (...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 885 DECLARE_RUNTIME_FUNCTION(MaybeObject*, StoreIC_MissFromStubFailure); | 882 DECLARE_RUNTIME_FUNCTION(MaybeObject*, StoreIC_MissFromStubFailure); |
| 886 DECLARE_RUNTIME_FUNCTION(MaybeObject*, ElementsTransitionAndStoreIC_Miss); | 883 DECLARE_RUNTIME_FUNCTION(MaybeObject*, ElementsTransitionAndStoreIC_Miss); |
| 887 DECLARE_RUNTIME_FUNCTION(MaybeObject*, BinaryOpIC_Miss); | 884 DECLARE_RUNTIME_FUNCTION(MaybeObject*, BinaryOpIC_Miss); |
| 888 DECLARE_RUNTIME_FUNCTION(MaybeObject*, CompareNilIC_Miss); | 885 DECLARE_RUNTIME_FUNCTION(MaybeObject*, CompareNilIC_Miss); |
| 889 DECLARE_RUNTIME_FUNCTION(MaybeObject*, ToBooleanIC_Miss); | 886 DECLARE_RUNTIME_FUNCTION(MaybeObject*, ToBooleanIC_Miss); |
| 890 | 887 |
| 891 | 888 |
| 892 } } // namespace v8::internal | 889 } } // namespace v8::internal |
| 893 | 890 |
| 894 #endif // V8_IC_H_ | 891 #endif // V8_IC_H_ |
| OLD | NEW |