Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(118)

Side by Side Diff: src/ic.h

Issue 381633002: Use a register spec for StoreIC and KeyedStoreIC. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Code comments. Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/ia32/stub-cache-ia32.cc ('k') | src/x64/code-stubs-x64.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/macro-assembler.h" 8 #include "src/macro-assembler.h"
9 9
10 namespace v8 { 10 namespace v8 {
(...skipping 565 matching lines...) Expand 10 before | Expand all | Expand 10 after
576 } 576 }
577 static StrictMode GetStrictMode(ExtraICState state) { 577 static StrictMode GetStrictMode(ExtraICState state) {
578 return StrictModeState::decode(state); 578 return StrictModeState::decode(state);
579 } 579 }
580 580
581 // For convenience, a statically declared encoding of strict mode extra 581 // For convenience, a statically declared encoding of strict mode extra
582 // IC state. 582 // IC state.
583 static const ExtraICState kStrictModeState = 583 static const ExtraICState kStrictModeState =
584 1 << StrictModeState::kShift; 584 1 << StrictModeState::kShift;
585 585
586 enum RegisterInfo {
587 kReceiverIndex,
588 kNameIndex,
589 kValueIndex,
590 kRegisterArgumentCount
591 };
592 static const Register ReceiverRegister();
593 static const Register NameRegister();
594 static const Register ValueRegister();
595
586 StoreIC(FrameDepth depth, Isolate* isolate) 596 StoreIC(FrameDepth depth, Isolate* isolate)
587 : IC(depth, isolate) { 597 : IC(depth, isolate) {
588 ASSERT(IsStoreStub()); 598 ASSERT(IsStoreStub());
589 } 599 }
590 600
591 StrictMode strict_mode() const { 601 StrictMode strict_mode() const {
592 return StrictModeState::decode(extra_ic_state()); 602 return StrictModeState::decode(extra_ic_state());
593 } 603 }
594 604
595 // Code generators for stub routines. Only called once at startup. 605 // Code generators for stub routines. Only called once at startup.
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
684 KeyedAccessStoreMode mode) { 694 KeyedAccessStoreMode mode) {
685 return StrictModeState::encode(flag) | 695 return StrictModeState::encode(flag) |
686 ExtraICStateKeyedAccessStoreMode::encode(mode); 696 ExtraICStateKeyedAccessStoreMode::encode(mode);
687 } 697 }
688 698
689 static KeyedAccessStoreMode GetKeyedAccessStoreMode( 699 static KeyedAccessStoreMode GetKeyedAccessStoreMode(
690 ExtraICState extra_state) { 700 ExtraICState extra_state) {
691 return ExtraICStateKeyedAccessStoreMode::decode(extra_state); 701 return ExtraICStateKeyedAccessStoreMode::decode(extra_state);
692 } 702 }
693 703
704 static const Register ReceiverRegister();
705 static const Register NameRegister();
706 static const Register ValueRegister();
707
694 KeyedStoreIC(FrameDepth depth, Isolate* isolate) 708 KeyedStoreIC(FrameDepth depth, Isolate* isolate)
695 : StoreIC(depth, isolate) { 709 : StoreIC(depth, isolate) {
696 ASSERT(target()->is_keyed_store_stub()); 710 ASSERT(target()->is_keyed_store_stub());
697 } 711 }
698 712
699 MUST_USE_RESULT MaybeHandle<Object> Store(Handle<Object> object, 713 MUST_USE_RESULT MaybeHandle<Object> Store(Handle<Object> object,
700 Handle<Object> name, 714 Handle<Object> name,
701 Handle<Object> value); 715 Handle<Object> value);
702 716
703 // Code generators for stub routines. Only called once at startup. 717 // Code generators for stub routines. Only called once at startup.
(...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after
1024 DECLARE_RUNTIME_FUNCTION(ElementsTransitionAndStoreIC_Miss); 1038 DECLARE_RUNTIME_FUNCTION(ElementsTransitionAndStoreIC_Miss);
1025 DECLARE_RUNTIME_FUNCTION(BinaryOpIC_Miss); 1039 DECLARE_RUNTIME_FUNCTION(BinaryOpIC_Miss);
1026 DECLARE_RUNTIME_FUNCTION(BinaryOpIC_MissWithAllocationSite); 1040 DECLARE_RUNTIME_FUNCTION(BinaryOpIC_MissWithAllocationSite);
1027 DECLARE_RUNTIME_FUNCTION(CompareNilIC_Miss); 1041 DECLARE_RUNTIME_FUNCTION(CompareNilIC_Miss);
1028 DECLARE_RUNTIME_FUNCTION(ToBooleanIC_Miss); 1042 DECLARE_RUNTIME_FUNCTION(ToBooleanIC_Miss);
1029 1043
1030 1044
1031 } } // namespace v8::internal 1045 } } // namespace v8::internal
1032 1046
1033 #endif // V8_IC_H_ 1047 #endif // V8_IC_H_
OLDNEW
« no previous file with comments | « src/ia32/stub-cache-ia32.cc ('k') | src/x64/code-stubs-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698