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

Side by Side Diff: src/arm/lithium-arm.h

Issue 7237024: Refactor handling of test expressions in the graph builder. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 9 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 | « no previous file | src/arm/lithium-arm.cc » ('j') | src/hydrogen.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 V(CallStub) \ 70 V(CallStub) \
71 V(CheckFunction) \ 71 V(CheckFunction) \
72 V(CheckInstanceType) \ 72 V(CheckInstanceType) \
73 V(CheckNonSmi) \ 73 V(CheckNonSmi) \
74 V(CheckMap) \ 74 V(CheckMap) \
75 V(CheckPrototypeMaps) \ 75 V(CheckPrototypeMaps) \
76 V(CheckSmi) \ 76 V(CheckSmi) \
77 V(ClampDToUint8) \ 77 V(ClampDToUint8) \
78 V(ClampIToUint8) \ 78 V(ClampIToUint8) \
79 V(ClampTToUint8) \ 79 V(ClampTToUint8) \
80 V(ClassOfTest) \
81 V(ClassOfTestAndBranch) \ 80 V(ClassOfTestAndBranch) \
82 V(CmpConstantEq) \
83 V(CmpConstantEqAndBranch) \ 81 V(CmpConstantEqAndBranch) \
84 V(CmpID) \
85 V(CmpIDAndBranch) \ 82 V(CmpIDAndBranch) \
86 V(CmpObjectEq) \
87 V(CmpObjectEqAndBranch) \ 83 V(CmpObjectEqAndBranch) \
88 V(CmpMapAndBranch) \ 84 V(CmpMapAndBranch) \
89 V(CmpT) \ 85 V(CmpT) \
90 V(ConstantD) \ 86 V(ConstantD) \
91 V(ConstantI) \ 87 V(ConstantI) \
92 V(ConstantT) \ 88 V(ConstantT) \
93 V(Context) \ 89 V(Context) \
94 V(DeleteProperty) \ 90 V(DeleteProperty) \
95 V(Deoptimize) \ 91 V(Deoptimize) \
96 V(DivI) \ 92 V(DivI) \
97 V(DoubleToI) \ 93 V(DoubleToI) \
98 V(ElementsKind) \ 94 V(ElementsKind) \
99 V(ExternalArrayLength) \ 95 V(ExternalArrayLength) \
100 V(FixedArrayLength) \ 96 V(FixedArrayLength) \
101 V(FunctionLiteral) \ 97 V(FunctionLiteral) \
102 V(GetCachedArrayIndex) \ 98 V(GetCachedArrayIndex) \
103 V(GlobalObject) \ 99 V(GlobalObject) \
104 V(GlobalReceiver) \ 100 V(GlobalReceiver) \
105 V(Goto) \ 101 V(Goto) \
106 V(HasCachedArrayIndex) \
107 V(HasCachedArrayIndexAndBranch) \ 102 V(HasCachedArrayIndexAndBranch) \
108 V(HasInstanceType) \
109 V(HasInstanceTypeAndBranch) \ 103 V(HasInstanceTypeAndBranch) \
110 V(In) \ 104 V(In) \
111 V(InstanceOf) \ 105 V(InstanceOf) \
112 V(InstanceOfKnownGlobal) \ 106 V(InstanceOfKnownGlobal) \
113 V(InstructionGap) \ 107 V(InstructionGap) \
114 V(Integer32ToDouble) \ 108 V(Integer32ToDouble) \
115 V(InvokeFunction) \ 109 V(InvokeFunction) \
116 V(IsConstructCall) \
117 V(IsConstructCallAndBranch) \ 110 V(IsConstructCallAndBranch) \
118 V(IsNull) \
119 V(IsNullAndBranch) \ 111 V(IsNullAndBranch) \
120 V(IsObject) \
121 V(IsObjectAndBranch) \ 112 V(IsObjectAndBranch) \
122 V(IsSmi) \
123 V(IsSmiAndBranch) \ 113 V(IsSmiAndBranch) \
124 V(IsUndetectable) \
125 V(IsUndetectableAndBranch) \ 114 V(IsUndetectableAndBranch) \
126 V(JSArrayLength) \ 115 V(JSArrayLength) \
127 V(Label) \ 116 V(Label) \
128 V(LazyBailout) \ 117 V(LazyBailout) \
129 V(LoadContextSlot) \ 118 V(LoadContextSlot) \
130 V(LoadElements) \ 119 V(LoadElements) \
131 V(LoadExternalArrayPointer) \ 120 V(LoadExternalArrayPointer) \
132 V(LoadFunctionPrototype) \ 121 V(LoadFunctionPrototype) \
133 V(LoadGlobalCell) \ 122 V(LoadGlobalCell) \
134 V(LoadGlobalGeneric) \ 123 V(LoadGlobalGeneric) \
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 V(StringAdd) \ 155 V(StringAdd) \
167 V(StringCharCodeAt) \ 156 V(StringCharCodeAt) \
168 V(StringCharFromCode) \ 157 V(StringCharFromCode) \
169 V(StringLength) \ 158 V(StringLength) \
170 V(SubI) \ 159 V(SubI) \
171 V(TaggedToI) \ 160 V(TaggedToI) \
172 V(ThisFunction) \ 161 V(ThisFunction) \
173 V(Throw) \ 162 V(Throw) \
174 V(ToFastProperties) \ 163 V(ToFastProperties) \
175 V(Typeof) \ 164 V(Typeof) \
176 V(TypeofIs) \
177 V(TypeofIsAndBranch) \ 165 V(TypeofIsAndBranch) \
178 V(UnaryMathOperation) \ 166 V(UnaryMathOperation) \
179 V(UnknownOSRValue) \ 167 V(UnknownOSRValue) \
180 V(ValueOf) 168 V(ValueOf)
181 169
182 170
183 #define DECLARE_CONCRETE_INSTRUCTION(type, mnemonic) \ 171 #define DECLARE_CONCRETE_INSTRUCTION(type, mnemonic) \
184 virtual Opcode opcode() const { return LInstruction::k##type; } \ 172 virtual Opcode opcode() const { return LInstruction::k##type; } \
185 virtual void CompileToNative(LCodeGen* generator); \ 173 virtual void CompileToNative(LCodeGen* generator); \
186 virtual const char* Mnemonic() const { return mnemonic; } \ 174 virtual const char* Mnemonic() const { return mnemonic; } \
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 #define DECLARE_PREDICATE(type) \ 213 #define DECLARE_PREDICATE(type) \
226 bool Is##type() const { return opcode() == k##type; } 214 bool Is##type() const { return opcode() == k##type; }
227 LITHIUM_CONCRETE_INSTRUCTION_LIST(DECLARE_PREDICATE) 215 LITHIUM_CONCRETE_INSTRUCTION_LIST(DECLARE_PREDICATE)
228 #undef DECLARE_PREDICATE 216 #undef DECLARE_PREDICATE
229 217
230 // Declare virtual predicates for instructions that don't have 218 // Declare virtual predicates for instructions that don't have
231 // an opcode. 219 // an opcode.
232 virtual bool IsGap() const { return false; } 220 virtual bool IsGap() const { return false; }
233 221
234 virtual bool IsControl() const { return false; } 222 virtual bool IsControl() const { return false; }
235 virtual void SetBranchTargets(int true_block_id, int false_block_id) { }
236 223
237 void set_environment(LEnvironment* env) { environment_ = env; } 224 void set_environment(LEnvironment* env) { environment_ = env; }
238 LEnvironment* environment() const { return environment_; } 225 LEnvironment* environment() const { return environment_; }
239 bool HasEnvironment() const { return environment_ != NULL; } 226 bool HasEnvironment() const { return environment_ != NULL; }
240 227
241 void set_pointer_map(LPointerMap* p) { pointer_map_.set(p); } 228 void set_pointer_map(LPointerMap* p) { pointer_map_.set(p); }
242 LPointerMap* pointer_map() const { return pointer_map_.get(); } 229 LPointerMap* pointer_map() const { return pointer_map_.get(); }
243 bool HasPointerMap() const { return pointer_map_.is_set(); } 230 bool HasPointerMap() const { return pointer_map_.is_set(); }
244 231
245 void set_hydrogen_value(HValue* value) { hydrogen_value_ = value; } 232 void set_hydrogen_value(HValue* value) { hydrogen_value_ = value; }
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
449 public: 436 public:
450 DECLARE_CONCRETE_INSTRUCTION(UnknownOSRValue, "unknown-osr-value") 437 DECLARE_CONCRETE_INSTRUCTION(UnknownOSRValue, "unknown-osr-value")
451 }; 438 };
452 439
453 440
454 template<int I, int T> 441 template<int I, int T>
455 class LControlInstruction: public LTemplateInstruction<0, I, T> { 442 class LControlInstruction: public LTemplateInstruction<0, I, T> {
456 public: 443 public:
457 virtual bool IsControl() const { return true; } 444 virtual bool IsControl() const { return true; }
458 445
459 int true_block_id() const { return true_block_id_; } 446 int SuccessorCount() { return hydrogen()->SuccessorCount(); }
460 int false_block_id() const { return false_block_id_; } 447 HBasicBlock* SuccessorAt(int i) { return hydrogen()->SuccessorAt(i); }
461 void SetBranchTargets(int true_block_id, int false_block_id) { 448 int true_block_id() { return hydrogen()->SuccessorAt(0)->block_id(); }
462 true_block_id_ = true_block_id; 449 int false_block_id() { return hydrogen()->SuccessorAt(1)->block_id(); }
463 false_block_id_ = false_block_id;
464 }
465 450
466 private: 451 private:
467 int true_block_id_; 452 HControlInstruction* hydrogen() {
468 int false_block_id_; 453 return HControlInstruction::cast(this->hydrogen_value());
454 }
469 }; 455 };
470 456
471 457
472 class LApplyArguments: public LTemplateInstruction<1, 4, 0> { 458 class LApplyArguments: public LTemplateInstruction<1, 4, 0> {
473 public: 459 public:
474 LApplyArguments(LOperand* function, 460 LApplyArguments(LOperand* function,
475 LOperand* receiver, 461 LOperand* receiver,
476 LOperand* length, 462 LOperand* length,
477 LOperand* elements) { 463 LOperand* elements) {
478 inputs_[0] = function; 464 inputs_[0] = function;
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
574 inputs_[0] = left; 560 inputs_[0] = left;
575 inputs_[1] = right; 561 inputs_[1] = right;
576 temps_[0] = temp; 562 temps_[0] = temp;
577 } 563 }
578 564
579 DECLARE_CONCRETE_INSTRUCTION(MulI, "mul-i") 565 DECLARE_CONCRETE_INSTRUCTION(MulI, "mul-i")
580 DECLARE_HYDROGEN_ACCESSOR(Mul) 566 DECLARE_HYDROGEN_ACCESSOR(Mul)
581 }; 567 };
582 568
583 569
584 class LCmpID: public LTemplateInstruction<1, 2, 0> {
585 public:
586 LCmpID(LOperand* left, LOperand* right) {
587 inputs_[0] = left;
588 inputs_[1] = right;
589 }
590
591 DECLARE_CONCRETE_INSTRUCTION(CmpID, "cmp-id")
592 DECLARE_HYDROGEN_ACCESSOR(Compare)
593
594 Token::Value op() const { return hydrogen()->token(); }
595 bool is_double() const {
596 return hydrogen()->GetInputRepresentation().IsDouble();
597 }
598 };
599
600
601 class LCmpIDAndBranch: public LControlInstruction<2, 0> { 570 class LCmpIDAndBranch: public LControlInstruction<2, 0> {
602 public: 571 public:
603 LCmpIDAndBranch(LOperand* left, LOperand* right) { 572 LCmpIDAndBranch(LOperand* left, LOperand* right) {
604 inputs_[0] = left; 573 inputs_[0] = left;
605 inputs_[1] = right; 574 inputs_[1] = right;
606 } 575 }
607 576
608 DECLARE_CONCRETE_INSTRUCTION(CmpIDAndBranch, "cmp-id-and-branch") 577 DECLARE_CONCRETE_INSTRUCTION(CmpIDAndBranch, "cmp-id-and-branch")
609 DECLARE_HYDROGEN_ACCESSOR(Compare) 578 DECLARE_HYDROGEN_ACCESSOR(CompareIDAndBranch)
610 579
611 Token::Value op() const { return hydrogen()->token(); } 580 Token::Value op() const { return hydrogen()->token(); }
612 bool is_double() const { 581 bool is_double() const {
613 return hydrogen()->GetInputRepresentation().IsDouble(); 582 return hydrogen()->GetInputRepresentation().IsDouble();
614 } 583 }
615 584
616 virtual void PrintDataTo(StringStream* stream); 585 virtual void PrintDataTo(StringStream* stream);
617 }; 586 };
618 587
619 588
620 class LUnaryMathOperation: public LTemplateInstruction<1, 1, 1> { 589 class LUnaryMathOperation: public LTemplateInstruction<1, 1, 1> {
621 public: 590 public:
622 LUnaryMathOperation(LOperand* value, LOperand* temp) { 591 LUnaryMathOperation(LOperand* value, LOperand* temp) {
623 inputs_[0] = value; 592 inputs_[0] = value;
624 temps_[0] = temp; 593 temps_[0] = temp;
625 } 594 }
626 595
627 DECLARE_CONCRETE_INSTRUCTION(UnaryMathOperation, "unary-math-operation") 596 DECLARE_CONCRETE_INSTRUCTION(UnaryMathOperation, "unary-math-operation")
628 DECLARE_HYDROGEN_ACCESSOR(UnaryMathOperation) 597 DECLARE_HYDROGEN_ACCESSOR(UnaryMathOperation)
629 598
630 virtual void PrintDataTo(StringStream* stream); 599 virtual void PrintDataTo(StringStream* stream);
631 BuiltinFunctionId op() const { return hydrogen()->op(); } 600 BuiltinFunctionId op() const { return hydrogen()->op(); }
632 }; 601 };
633 602
634 603
635 class LCmpObjectEq: public LTemplateInstruction<1, 2, 0> {
636 public:
637 LCmpObjectEq(LOperand* left, LOperand* right) {
638 inputs_[0] = left;
639 inputs_[1] = right;
640 }
641
642 DECLARE_CONCRETE_INSTRUCTION(CmpObjectEq, "cmp-object-eq")
643 };
644
645
646 class LCmpObjectEqAndBranch: public LControlInstruction<2, 0> { 604 class LCmpObjectEqAndBranch: public LControlInstruction<2, 0> {
647 public: 605 public:
648 LCmpObjectEqAndBranch(LOperand* left, LOperand* right) { 606 LCmpObjectEqAndBranch(LOperand* left, LOperand* right) {
649 inputs_[0] = left; 607 inputs_[0] = left;
650 inputs_[1] = right; 608 inputs_[1] = right;
651 } 609 }
652 610
653 DECLARE_CONCRETE_INSTRUCTION(CmpObjectEqAndBranch, 611 DECLARE_CONCRETE_INSTRUCTION(CmpObjectEqAndBranch,
654 "cmp-object-eq-and-branch") 612 "cmp-object-eq-and-branch")
655 }; 613 DECLARE_HYDROGEN_ACCESSOR(CompareObjectEqAndBranch)
656
657
658 class LCmpConstantEq: public LTemplateInstruction<1, 1, 0> {
659 public:
660 explicit LCmpConstantEq(LOperand* left) {
661 inputs_[0] = left;
662 }
663
664 DECLARE_CONCRETE_INSTRUCTION(CmpConstantEq, "cmp-constant-eq")
665 DECLARE_HYDROGEN_ACCESSOR(CompareConstantEq)
666 }; 614 };
667 615
668 616
669 class LCmpConstantEqAndBranch: public LControlInstruction<1, 0> { 617 class LCmpConstantEqAndBranch: public LControlInstruction<1, 0> {
670 public: 618 public:
671 explicit LCmpConstantEqAndBranch(LOperand* left) { 619 explicit LCmpConstantEqAndBranch(LOperand* left) {
672 inputs_[0] = left; 620 inputs_[0] = left;
673 } 621 }
674 622
675 DECLARE_CONCRETE_INSTRUCTION(CmpConstantEqAndBranch, 623 DECLARE_CONCRETE_INSTRUCTION(CmpConstantEqAndBranch,
676 "cmp-constant-eq-and-branch") 624 "cmp-constant-eq-and-branch")
677 DECLARE_HYDROGEN_ACCESSOR(CompareConstantEq) 625 DECLARE_HYDROGEN_ACCESSOR(CompareConstantEqAndBranch)
678 }; 626 };
679 627
680 628
681 class LIsNull: public LTemplateInstruction<1, 1, 0> {
682 public:
683 explicit LIsNull(LOperand* value) {
684 inputs_[0] = value;
685 }
686
687 DECLARE_CONCRETE_INSTRUCTION(IsNull, "is-null")
688 DECLARE_HYDROGEN_ACCESSOR(IsNull)
689
690 bool is_strict() const { return hydrogen()->is_strict(); }
691 };
692
693 class LIsNullAndBranch: public LControlInstruction<1, 0> { 629 class LIsNullAndBranch: public LControlInstruction<1, 0> {
694 public: 630 public:
695 explicit LIsNullAndBranch(LOperand* value) { 631 explicit LIsNullAndBranch(LOperand* value) {
696 inputs_[0] = value; 632 inputs_[0] = value;
697 } 633 }
698 634
699 DECLARE_CONCRETE_INSTRUCTION(IsNullAndBranch, "is-null-and-branch") 635 DECLARE_CONCRETE_INSTRUCTION(IsNullAndBranch, "is-null-and-branch")
700 DECLARE_HYDROGEN_ACCESSOR(IsNull) 636 DECLARE_HYDROGEN_ACCESSOR(IsNullAndBranch)
701 637
702 bool is_strict() const { return hydrogen()->is_strict(); } 638 bool is_strict() const { return hydrogen()->is_strict(); }
703 639
704 virtual void PrintDataTo(StringStream* stream); 640 virtual void PrintDataTo(StringStream* stream);
705 }; 641 };
706 642
707 643
708 class LIsObject: public LTemplateInstruction<1, 1, 0> {
709 public:
710 explicit LIsObject(LOperand* value) {
711 inputs_[0] = value;
712 }
713
714 DECLARE_CONCRETE_INSTRUCTION(IsObject, "is-object")
715 };
716
717
718 class LIsObjectAndBranch: public LControlInstruction<1, 1> { 644 class LIsObjectAndBranch: public LControlInstruction<1, 1> {
719 public: 645 public:
720 LIsObjectAndBranch(LOperand* value, LOperand* temp) { 646 LIsObjectAndBranch(LOperand* value, LOperand* temp) {
721 inputs_[0] = value; 647 inputs_[0] = value;
722 temps_[0] = temp; 648 temps_[0] = temp;
723 } 649 }
724 650
725 DECLARE_CONCRETE_INSTRUCTION(IsObjectAndBranch, "is-object-and-branch") 651 DECLARE_CONCRETE_INSTRUCTION(IsObjectAndBranch, "is-object-and-branch")
652 DECLARE_HYDROGEN_ACCESSOR(IsObjectAndBranch)
726 653
727 virtual void PrintDataTo(StringStream* stream); 654 virtual void PrintDataTo(StringStream* stream);
728 }; 655 };
729 656
730 657
731 class LIsSmi: public LTemplateInstruction<1, 1, 0> {
732 public:
733 explicit LIsSmi(LOperand* value) {
734 inputs_[0] = value;
735 }
736
737 DECLARE_CONCRETE_INSTRUCTION(IsSmi, "is-smi")
738 DECLARE_HYDROGEN_ACCESSOR(IsSmi)
739 };
740
741
742 class LIsSmiAndBranch: public LControlInstruction<1, 0> { 658 class LIsSmiAndBranch: public LControlInstruction<1, 0> {
743 public: 659 public:
744 explicit LIsSmiAndBranch(LOperand* value) { 660 explicit LIsSmiAndBranch(LOperand* value) {
745 inputs_[0] = value; 661 inputs_[0] = value;
746 } 662 }
747 663
748 DECLARE_CONCRETE_INSTRUCTION(IsSmiAndBranch, "is-smi-and-branch") 664 DECLARE_CONCRETE_INSTRUCTION(IsSmiAndBranch, "is-smi-and-branch")
665 DECLARE_HYDROGEN_ACCESSOR(IsSmiAndBranch)
749 666
750 virtual void PrintDataTo(StringStream* stream); 667 virtual void PrintDataTo(StringStream* stream);
751 }; 668 };
752 669
753 670
754 class LIsUndetectable: public LTemplateInstruction<1, 1, 0> {
755 public:
756 explicit LIsUndetectable(LOperand* value) {
757 inputs_[0] = value;
758 }
759
760 DECLARE_CONCRETE_INSTRUCTION(IsUndetectable, "is-undetectable")
761 DECLARE_HYDROGEN_ACCESSOR(IsUndetectable)
762 };
763
764
765 class LIsUndetectableAndBranch: public LControlInstruction<1, 1> { 671 class LIsUndetectableAndBranch: public LControlInstruction<1, 1> {
766 public: 672 public:
767 explicit LIsUndetectableAndBranch(LOperand* value, LOperand* temp) { 673 explicit LIsUndetectableAndBranch(LOperand* value, LOperand* temp) {
768 inputs_[0] = value; 674 inputs_[0] = value;
769 temps_[0] = temp; 675 temps_[0] = temp;
770 } 676 }
771 677
772 DECLARE_CONCRETE_INSTRUCTION(IsUndetectableAndBranch, 678 DECLARE_CONCRETE_INSTRUCTION(IsUndetectableAndBranch,
773 "is-undetectable-and-branch") 679 "is-undetectable-and-branch")
680 DECLARE_HYDROGEN_ACCESSOR(IsUndetectableAndBranch)
774 681
775 virtual void PrintDataTo(StringStream* stream); 682 virtual void PrintDataTo(StringStream* stream);
776 }; 683 };
777 684
778 685
779 class LHasInstanceType: public LTemplateInstruction<1, 1, 0> {
780 public:
781 explicit LHasInstanceType(LOperand* value) {
782 inputs_[0] = value;
783 }
784
785 DECLARE_CONCRETE_INSTRUCTION(HasInstanceType, "has-instance-type")
786 DECLARE_HYDROGEN_ACCESSOR(HasInstanceType)
787 };
788
789
790 class LHasInstanceTypeAndBranch: public LControlInstruction<1, 0> { 686 class LHasInstanceTypeAndBranch: public LControlInstruction<1, 0> {
791 public: 687 public:
792 explicit LHasInstanceTypeAndBranch(LOperand* value) { 688 explicit LHasInstanceTypeAndBranch(LOperand* value) {
793 inputs_[0] = value; 689 inputs_[0] = value;
794 } 690 }
795 691
796 DECLARE_CONCRETE_INSTRUCTION(HasInstanceTypeAndBranch, 692 DECLARE_CONCRETE_INSTRUCTION(HasInstanceTypeAndBranch,
797 "has-instance-type-and-branch") 693 "has-instance-type-and-branch")
798 DECLARE_HYDROGEN_ACCESSOR(HasInstanceType) 694 DECLARE_HYDROGEN_ACCESSOR(HasInstanceTypeAndBranch)
799 695
800 virtual void PrintDataTo(StringStream* stream); 696 virtual void PrintDataTo(StringStream* stream);
801 }; 697 };
802 698
803 699
804 class LGetCachedArrayIndex: public LTemplateInstruction<1, 1, 0> { 700 class LGetCachedArrayIndex: public LTemplateInstruction<1, 1, 0> {
805 public: 701 public:
806 explicit LGetCachedArrayIndex(LOperand* value) { 702 explicit LGetCachedArrayIndex(LOperand* value) {
807 inputs_[0] = value; 703 inputs_[0] = value;
808 } 704 }
809 705
810 DECLARE_CONCRETE_INSTRUCTION(GetCachedArrayIndex, "get-cached-array-index") 706 DECLARE_CONCRETE_INSTRUCTION(GetCachedArrayIndex, "get-cached-array-index")
811 DECLARE_HYDROGEN_ACCESSOR(GetCachedArrayIndex) 707 DECLARE_HYDROGEN_ACCESSOR(GetCachedArrayIndex)
812 }; 708 };
813 709
814 710
815 class LHasCachedArrayIndex: public LTemplateInstruction<1, 1, 0> {
816 public:
817 explicit LHasCachedArrayIndex(LOperand* value) {
818 inputs_[0] = value;
819 }
820
821 DECLARE_CONCRETE_INSTRUCTION(HasCachedArrayIndex, "has-cached-array-index")
822 DECLARE_HYDROGEN_ACCESSOR(HasCachedArrayIndex)
823 };
824
825
826 class LHasCachedArrayIndexAndBranch: public LControlInstruction<1, 0> { 711 class LHasCachedArrayIndexAndBranch: public LControlInstruction<1, 0> {
827 public: 712 public:
828 explicit LHasCachedArrayIndexAndBranch(LOperand* value) { 713 explicit LHasCachedArrayIndexAndBranch(LOperand* value) {
829 inputs_[0] = value; 714 inputs_[0] = value;
830 } 715 }
831 716
832 DECLARE_CONCRETE_INSTRUCTION(HasCachedArrayIndexAndBranch, 717 DECLARE_CONCRETE_INSTRUCTION(HasCachedArrayIndexAndBranch,
833 "has-cached-array-index-and-branch") 718 "has-cached-array-index-and-branch")
834 virtual void PrintDataTo(StringStream* stream); 719 DECLARE_HYDROGEN_ACCESSOR(HasCachedArrayIndexAndBranch)
835 };
836
837
838 class LClassOfTest: public LTemplateInstruction<1, 1, 0> {
839 public:
840 explicit LClassOfTest(LOperand* value) {
841 inputs_[0] = value;
842 }
843
844 DECLARE_CONCRETE_INSTRUCTION(ClassOfTest, "class-of-test")
845 DECLARE_HYDROGEN_ACCESSOR(ClassOfTest)
846 720
847 virtual void PrintDataTo(StringStream* stream); 721 virtual void PrintDataTo(StringStream* stream);
848 }; 722 };
849 723
850 724
851 class LClassOfTestAndBranch: public LControlInstruction<1, 1> { 725 class LClassOfTestAndBranch: public LControlInstruction<1, 1> {
852 public: 726 public:
853 LClassOfTestAndBranch(LOperand* value, LOperand* temp) { 727 LClassOfTestAndBranch(LOperand* value, LOperand* temp) {
854 inputs_[0] = value; 728 inputs_[0] = value;
855 temps_[0] = temp; 729 temps_[0] = temp;
856 } 730 }
857 731
858 DECLARE_CONCRETE_INSTRUCTION(ClassOfTestAndBranch, 732 DECLARE_CONCRETE_INSTRUCTION(ClassOfTestAndBranch,
859 "class-of-test-and-branch") 733 "class-of-test-and-branch")
860 DECLARE_HYDROGEN_ACCESSOR(ClassOfTest) 734 DECLARE_HYDROGEN_ACCESSOR(ClassOfTestAndBranch)
861 735
862 virtual void PrintDataTo(StringStream* stream); 736 virtual void PrintDataTo(StringStream* stream);
863 }; 737 };
864 738
865 739
866 class LCmpT: public LTemplateInstruction<1, 2, 0> { 740 class LCmpT: public LTemplateInstruction<1, 2, 0> {
867 public: 741 public:
868 LCmpT(LOperand* left, LOperand* right) { 742 LCmpT(LOperand* left, LOperand* right) {
869 inputs_[0] = left; 743 inputs_[0] = left;
870 inputs_[1] = right; 744 inputs_[1] = right;
871 } 745 }
872 746
873 DECLARE_CONCRETE_INSTRUCTION(CmpT, "cmp-t") 747 DECLARE_CONCRETE_INSTRUCTION(CmpT, "cmp-t")
874 DECLARE_HYDROGEN_ACCESSOR(Compare) 748 DECLARE_HYDROGEN_ACCESSOR(CompareGeneric)
875 749
876 Token::Value op() const { return hydrogen()->token(); } 750 Token::Value op() const { return hydrogen()->token(); }
877 }; 751 };
878 752
879 753
880 class LInstanceOf: public LTemplateInstruction<1, 2, 0> { 754 class LInstanceOf: public LTemplateInstruction<1, 2, 0> {
881 public: 755 public:
882 LInstanceOf(LOperand* left, LOperand* right) { 756 LInstanceOf(LOperand* left, LOperand* right) {
883 inputs_[0] = left; 757 inputs_[0] = left;
884 inputs_[1] = right; 758 inputs_[1] = right;
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
993 }; 867 };
994 868
995 869
996 class LBranch: public LControlInstruction<1, 0> { 870 class LBranch: public LControlInstruction<1, 0> {
997 public: 871 public:
998 explicit LBranch(LOperand* value) { 872 explicit LBranch(LOperand* value) {
999 inputs_[0] = value; 873 inputs_[0] = value;
1000 } 874 }
1001 875
1002 DECLARE_CONCRETE_INSTRUCTION(Branch, "branch") 876 DECLARE_CONCRETE_INSTRUCTION(Branch, "branch")
1003 DECLARE_HYDROGEN_ACCESSOR(Value) 877 DECLARE_HYDROGEN_ACCESSOR(Branch)
1004 878
1005 virtual void PrintDataTo(StringStream* stream); 879 virtual void PrintDataTo(StringStream* stream);
1006 }; 880 };
1007 881
1008 882
1009 class LCmpMapAndBranch: public LTemplateInstruction<0, 1, 1> { 883 class LCmpMapAndBranch: public LTemplateInstruction<0, 1, 1> {
1010 public: 884 public:
1011 LCmpMapAndBranch(LOperand* value, LOperand* temp) { 885 LCmpMapAndBranch(LOperand* value, LOperand* temp) {
1012 inputs_[0] = value; 886 inputs_[0] = value;
1013 temps_[0] = temp; 887 temps_[0] = temp;
(...skipping 958 matching lines...) Expand 10 before | Expand all | Expand 10 after
1972 class LTypeof: public LTemplateInstruction<1, 1, 0> { 1846 class LTypeof: public LTemplateInstruction<1, 1, 0> {
1973 public: 1847 public:
1974 explicit LTypeof(LOperand* value) { 1848 explicit LTypeof(LOperand* value) {
1975 inputs_[0] = value; 1849 inputs_[0] = value;
1976 } 1850 }
1977 1851
1978 DECLARE_CONCRETE_INSTRUCTION(Typeof, "typeof") 1852 DECLARE_CONCRETE_INSTRUCTION(Typeof, "typeof")
1979 }; 1853 };
1980 1854
1981 1855
1982 class LTypeofIs: public LTemplateInstruction<1, 1, 0> {
1983 public:
1984 explicit LTypeofIs(LOperand* value) {
1985 inputs_[0] = value;
1986 }
1987
1988 DECLARE_CONCRETE_INSTRUCTION(TypeofIs, "typeof-is")
1989 DECLARE_HYDROGEN_ACCESSOR(TypeofIs)
1990
1991 Handle<String> type_literal() { return hydrogen()->type_literal(); }
1992
1993 virtual void PrintDataTo(StringStream* stream);
1994 };
1995
1996
1997 class LTypeofIsAndBranch: public LControlInstruction<1, 0> { 1856 class LTypeofIsAndBranch: public LControlInstruction<1, 0> {
1998 public: 1857 public:
1999 explicit LTypeofIsAndBranch(LOperand* value) { 1858 explicit LTypeofIsAndBranch(LOperand* value) {
2000 inputs_[0] = value; 1859 inputs_[0] = value;
2001 } 1860 }
2002 1861
2003 DECLARE_CONCRETE_INSTRUCTION(TypeofIsAndBranch, "typeof-is-and-branch") 1862 DECLARE_CONCRETE_INSTRUCTION(TypeofIsAndBranch, "typeof-is-and-branch")
2004 DECLARE_HYDROGEN_ACCESSOR(TypeofIs) 1863 DECLARE_HYDROGEN_ACCESSOR(TypeofIsAndBranch)
2005 1864
2006 Handle<String> type_literal() { return hydrogen()->type_literal(); } 1865 Handle<String> type_literal() { return hydrogen()->type_literal(); }
2007 1866
2008 virtual void PrintDataTo(StringStream* stream); 1867 virtual void PrintDataTo(StringStream* stream);
2009 }; 1868 };
2010 1869
2011 1870
2012 class LIsConstructCall: public LTemplateInstruction<1, 0, 0> {
2013 public:
2014 DECLARE_CONCRETE_INSTRUCTION(IsConstructCall, "is-construct-call")
2015 DECLARE_HYDROGEN_ACCESSOR(IsConstructCall)
2016 };
2017
2018
2019 class LIsConstructCallAndBranch: public LControlInstruction<0, 1> { 1871 class LIsConstructCallAndBranch: public LControlInstruction<0, 1> {
2020 public: 1872 public:
2021 explicit LIsConstructCallAndBranch(LOperand* temp) { 1873 explicit LIsConstructCallAndBranch(LOperand* temp) {
2022 temps_[0] = temp; 1874 temps_[0] = temp;
2023 } 1875 }
2024 1876
2025 DECLARE_CONCRETE_INSTRUCTION(IsConstructCallAndBranch, 1877 DECLARE_CONCRETE_INSTRUCTION(IsConstructCallAndBranch,
2026 "is-construct-call-and-branch") 1878 "is-construct-call-and-branch")
2027 }; 1879 };
2028 1880
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after
2305 2157
2306 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); 2158 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder);
2307 }; 2159 };
2308 2160
2309 #undef DECLARE_HYDROGEN_ACCESSOR 2161 #undef DECLARE_HYDROGEN_ACCESSOR
2310 #undef DECLARE_CONCRETE_INSTRUCTION 2162 #undef DECLARE_CONCRETE_INSTRUCTION
2311 2163
2312 } } // namespace v8::internal 2164 } } // namespace v8::internal
2313 2165
2314 #endif // V8_ARM_LITHIUM_ARM_H_ 2166 #endif // V8_ARM_LITHIUM_ARM_H_
OLDNEW
« no previous file with comments | « no previous file | src/arm/lithium-arm.cc » ('j') | src/hydrogen.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698