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

Side by Side Diff: src/ia32/lithium-ia32.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
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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 V(CallStub) \ 64 V(CallStub) \
65 V(CheckFunction) \ 65 V(CheckFunction) \
66 V(CheckInstanceType) \ 66 V(CheckInstanceType) \
67 V(CheckMap) \ 67 V(CheckMap) \
68 V(CheckNonSmi) \ 68 V(CheckNonSmi) \
69 V(CheckPrototypeMaps) \ 69 V(CheckPrototypeMaps) \
70 V(CheckSmi) \ 70 V(CheckSmi) \
71 V(ClampDToUint8) \ 71 V(ClampDToUint8) \
72 V(ClampIToUint8) \ 72 V(ClampIToUint8) \
73 V(ClampTToUint8) \ 73 V(ClampTToUint8) \
74 V(ClassOfTest) \
75 V(ClassOfTestAndBranch) \ 74 V(ClassOfTestAndBranch) \
76 V(CmpID) \
77 V(CmpIDAndBranch) \ 75 V(CmpIDAndBranch) \
78 V(CmpObjectEq) \
79 V(CmpObjectEqAndBranch) \ 76 V(CmpObjectEqAndBranch) \
80 V(CmpMapAndBranch) \ 77 V(CmpMapAndBranch) \
81 V(CmpT) \ 78 V(CmpT) \
82 V(CmpConstantEq) \
83 V(CmpConstantEqAndBranch) \ 79 V(CmpConstantEqAndBranch) \
84 V(ConstantD) \ 80 V(ConstantD) \
85 V(ConstantI) \ 81 V(ConstantI) \
86 V(ConstantT) \ 82 V(ConstantT) \
87 V(Context) \ 83 V(Context) \
88 V(DeleteProperty) \ 84 V(DeleteProperty) \
89 V(Deoptimize) \ 85 V(Deoptimize) \
90 V(DivI) \ 86 V(DivI) \
91 V(DoubleToI) \ 87 V(DoubleToI) \
92 V(ElementsKind) \ 88 V(ElementsKind) \
93 V(ExternalArrayLength) \ 89 V(ExternalArrayLength) \
94 V(FixedArrayLength) \ 90 V(FixedArrayLength) \
95 V(FunctionLiteral) \ 91 V(FunctionLiteral) \
96 V(GetCachedArrayIndex) \ 92 V(GetCachedArrayIndex) \
97 V(GlobalObject) \ 93 V(GlobalObject) \
98 V(GlobalReceiver) \ 94 V(GlobalReceiver) \
99 V(Goto) \ 95 V(Goto) \
100 V(HasCachedArrayIndex) \
101 V(HasCachedArrayIndexAndBranch) \ 96 V(HasCachedArrayIndexAndBranch) \
102 V(HasInstanceType) \
103 V(HasInstanceTypeAndBranch) \ 97 V(HasInstanceTypeAndBranch) \
104 V(In) \ 98 V(In) \
105 V(InstanceOf) \ 99 V(InstanceOf) \
106 V(InstanceOfKnownGlobal) \ 100 V(InstanceOfKnownGlobal) \
107 V(InstructionGap) \ 101 V(InstructionGap) \
108 V(Integer32ToDouble) \ 102 V(Integer32ToDouble) \
109 V(InvokeFunction) \ 103 V(InvokeFunction) \
110 V(IsConstructCall) \
111 V(IsConstructCallAndBranch) \ 104 V(IsConstructCallAndBranch) \
112 V(IsNull) \
113 V(IsNullAndBranch) \ 105 V(IsNullAndBranch) \
114 V(IsObject) \
115 V(IsObjectAndBranch) \ 106 V(IsObjectAndBranch) \
116 V(IsSmi) \
117 V(IsSmiAndBranch) \ 107 V(IsSmiAndBranch) \
118 V(IsUndetectable) \
119 V(IsUndetectableAndBranch) \ 108 V(IsUndetectableAndBranch) \
120 V(JSArrayLength) \ 109 V(JSArrayLength) \
121 V(Label) \ 110 V(Label) \
122 V(LazyBailout) \ 111 V(LazyBailout) \
123 V(LoadContextSlot) \ 112 V(LoadContextSlot) \
124 V(LoadElements) \ 113 V(LoadElements) \
125 V(LoadExternalArrayPointer) \ 114 V(LoadExternalArrayPointer) \
126 V(LoadFunctionPrototype) \ 115 V(LoadFunctionPrototype) \
127 V(LoadGlobalCell) \ 116 V(LoadGlobalCell) \
128 V(LoadGlobalGeneric) \ 117 V(LoadGlobalGeneric) \
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 V(StringAdd) \ 149 V(StringAdd) \
161 V(StringCharCodeAt) \ 150 V(StringCharCodeAt) \
162 V(StringCharFromCode) \ 151 V(StringCharFromCode) \
163 V(StringLength) \ 152 V(StringLength) \
164 V(SubI) \ 153 V(SubI) \
165 V(TaggedToI) \ 154 V(TaggedToI) \
166 V(ThisFunction) \ 155 V(ThisFunction) \
167 V(Throw) \ 156 V(Throw) \
168 V(ToFastProperties) \ 157 V(ToFastProperties) \
169 V(Typeof) \ 158 V(Typeof) \
170 V(TypeofIs) \
171 V(TypeofIsAndBranch) \ 159 V(TypeofIsAndBranch) \
172 V(UnaryMathOperation) \ 160 V(UnaryMathOperation) \
173 V(UnknownOSRValue) \ 161 V(UnknownOSRValue) \
174 V(ValueOf) 162 V(ValueOf)
175 163
176 164
177 #define DECLARE_CONCRETE_INSTRUCTION(type, mnemonic) \ 165 #define DECLARE_CONCRETE_INSTRUCTION(type, mnemonic) \
178 virtual Opcode opcode() const { return LInstruction::k##type; } \ 166 virtual Opcode opcode() const { return LInstruction::k##type; } \
179 virtual void CompileToNative(LCodeGen* generator); \ 167 virtual void CompileToNative(LCodeGen* generator); \
180 virtual const char* Mnemonic() const { return mnemonic; } \ 168 virtual const char* Mnemonic() const { return mnemonic; } \
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 #define DECLARE_PREDICATE(type) \ 207 #define DECLARE_PREDICATE(type) \
220 bool Is##type() const { return opcode() == k##type; } 208 bool Is##type() const { return opcode() == k##type; }
221 LITHIUM_CONCRETE_INSTRUCTION_LIST(DECLARE_PREDICATE) 209 LITHIUM_CONCRETE_INSTRUCTION_LIST(DECLARE_PREDICATE)
222 #undef DECLARE_PREDICATE 210 #undef DECLARE_PREDICATE
223 211
224 // Declare virtual predicates for instructions that don't have 212 // Declare virtual predicates for instructions that don't have
225 // an opcode. 213 // an opcode.
226 virtual bool IsGap() const { return false; } 214 virtual bool IsGap() const { return false; }
227 215
228 virtual bool IsControl() const { return false; } 216 virtual bool IsControl() const { return false; }
229 virtual void SetBranchTargets(int true_block_id, int false_block_id) { }
230 217
231 void set_environment(LEnvironment* env) { environment_ = env; } 218 void set_environment(LEnvironment* env) { environment_ = env; }
232 LEnvironment* environment() const { return environment_; } 219 LEnvironment* environment() const { return environment_; }
233 bool HasEnvironment() const { return environment_ != NULL; } 220 bool HasEnvironment() const { return environment_ != NULL; }
234 221
235 void set_pointer_map(LPointerMap* p) { pointer_map_.set(p); } 222 void set_pointer_map(LPointerMap* p) { pointer_map_.set(p); }
236 LPointerMap* pointer_map() const { return pointer_map_.get(); } 223 LPointerMap* pointer_map() const { return pointer_map_.get(); }
237 bool HasPointerMap() const { return pointer_map_.is_set(); } 224 bool HasPointerMap() const { return pointer_map_.is_set(); }
238 225
239 226
(...skipping 209 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, 1> { 458 class LApplyArguments: public LTemplateInstruction<1, 4, 1> {
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 LOperand* temp) { 464 LOperand* temp) {
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
560 inputs_[0] = left; 546 inputs_[0] = left;
561 inputs_[1] = right; 547 inputs_[1] = right;
562 temps_[0] = temp; 548 temps_[0] = temp;
563 } 549 }
564 550
565 DECLARE_CONCRETE_INSTRUCTION(MulI, "mul-i") 551 DECLARE_CONCRETE_INSTRUCTION(MulI, "mul-i")
566 DECLARE_HYDROGEN_ACCESSOR(Mul) 552 DECLARE_HYDROGEN_ACCESSOR(Mul)
567 }; 553 };
568 554
569 555
570 class LCmpID: public LTemplateInstruction<1, 2, 0> {
571 public:
572 LCmpID(LOperand* left, LOperand* right) {
573 inputs_[0] = left;
574 inputs_[1] = right;
575 }
576
577 DECLARE_CONCRETE_INSTRUCTION(CmpID, "cmp-id")
578 DECLARE_HYDROGEN_ACCESSOR(Compare)
579
580 Token::Value op() const { return hydrogen()->token(); }
581 bool is_double() const {
582 return hydrogen()->GetInputRepresentation().IsDouble();
583 }
584 };
585
586
587 class LCmpIDAndBranch: public LControlInstruction<2, 0> { 556 class LCmpIDAndBranch: public LControlInstruction<2, 0> {
588 public: 557 public:
589 LCmpIDAndBranch(LOperand* left, LOperand* right) { 558 LCmpIDAndBranch(LOperand* left, LOperand* right) {
590 inputs_[0] = left; 559 inputs_[0] = left;
591 inputs_[1] = right; 560 inputs_[1] = right;
592 } 561 }
593 562
594 DECLARE_CONCRETE_INSTRUCTION(CmpIDAndBranch, "cmp-id-and-branch") 563 DECLARE_CONCRETE_INSTRUCTION(CmpIDAndBranch, "cmp-id-and-branch")
595 DECLARE_HYDROGEN_ACCESSOR(Compare) 564 DECLARE_HYDROGEN_ACCESSOR(CompareIDAndBranch)
596 565
597 Token::Value op() const { return hydrogen()->token(); } 566 Token::Value op() const { return hydrogen()->token(); }
598 bool is_double() const { 567 bool is_double() const {
599 return hydrogen()->GetInputRepresentation().IsDouble(); 568 return hydrogen()->GetInputRepresentation().IsDouble();
600 } 569 }
601 570
602 virtual void PrintDataTo(StringStream* stream); 571 virtual void PrintDataTo(StringStream* stream);
603 }; 572 };
604 573
605 574
606 class LUnaryMathOperation: public LTemplateInstruction<1, 1, 0> { 575 class LUnaryMathOperation: public LTemplateInstruction<1, 1, 0> {
607 public: 576 public:
608 explicit LUnaryMathOperation(LOperand* value) { 577 explicit LUnaryMathOperation(LOperand* value) {
609 inputs_[0] = value; 578 inputs_[0] = value;
610 } 579 }
611 580
612 DECLARE_CONCRETE_INSTRUCTION(UnaryMathOperation, "unary-math-operation") 581 DECLARE_CONCRETE_INSTRUCTION(UnaryMathOperation, "unary-math-operation")
613 DECLARE_HYDROGEN_ACCESSOR(UnaryMathOperation) 582 DECLARE_HYDROGEN_ACCESSOR(UnaryMathOperation)
614 583
615 virtual void PrintDataTo(StringStream* stream); 584 virtual void PrintDataTo(StringStream* stream);
616 BuiltinFunctionId op() const { return hydrogen()->op(); } 585 BuiltinFunctionId op() const { return hydrogen()->op(); }
617 }; 586 };
618 587
619 588
620 class LCmpObjectEq: public LTemplateInstruction<1, 2, 0> {
621 public:
622 LCmpObjectEq(LOperand* left, LOperand* right) {
623 inputs_[0] = left;
624 inputs_[1] = right;
625 }
626
627 DECLARE_CONCRETE_INSTRUCTION(CmpObjectEq, "cmp-object-eq")
628 };
629
630
631 class LCmpObjectEqAndBranch: public LControlInstruction<2, 0> { 589 class LCmpObjectEqAndBranch: public LControlInstruction<2, 0> {
632 public: 590 public:
633 LCmpObjectEqAndBranch(LOperand* left, LOperand* right) { 591 LCmpObjectEqAndBranch(LOperand* left, LOperand* right) {
634 inputs_[0] = left; 592 inputs_[0] = left;
635 inputs_[1] = right; 593 inputs_[1] = right;
636 } 594 }
637 595
638 DECLARE_CONCRETE_INSTRUCTION(CmpObjectEqAndBranch, 596 DECLARE_CONCRETE_INSTRUCTION(CmpObjectEqAndBranch,
639 "cmp-object-eq-and-branch") 597 "cmp-object-eq-and-branch")
640 }; 598 };
641 599
642 600
643 class LCmpConstantEq: public LTemplateInstruction<1, 1, 0> {
644 public:
645 explicit LCmpConstantEq(LOperand* left) {
646 inputs_[0] = left;
647 }
648
649 DECLARE_CONCRETE_INSTRUCTION(CmpConstantEq, "cmp-constant-eq")
650 DECLARE_HYDROGEN_ACCESSOR(CompareConstantEq)
651 };
652
653
654 class LCmpConstantEqAndBranch: public LControlInstruction<1, 0> { 601 class LCmpConstantEqAndBranch: public LControlInstruction<1, 0> {
655 public: 602 public:
656 explicit LCmpConstantEqAndBranch(LOperand* left) { 603 explicit LCmpConstantEqAndBranch(LOperand* left) {
657 inputs_[0] = left; 604 inputs_[0] = left;
658 } 605 }
659 606
660 DECLARE_CONCRETE_INSTRUCTION(CmpConstantEqAndBranch, 607 DECLARE_CONCRETE_INSTRUCTION(CmpConstantEqAndBranch,
661 "cmp-constant-eq-and-branch") 608 "cmp-constant-eq-and-branch")
662 DECLARE_HYDROGEN_ACCESSOR(CompareConstantEq) 609 DECLARE_HYDROGEN_ACCESSOR(CompareConstantEqAndBranch)
663 };
664
665
666 class LIsNull: public LTemplateInstruction<1, 1, 0> {
667 public:
668 explicit LIsNull(LOperand* value) {
669 inputs_[0] = value;
670 }
671
672 DECLARE_CONCRETE_INSTRUCTION(IsNull, "is-null")
673 DECLARE_HYDROGEN_ACCESSOR(IsNull)
674
675 bool is_strict() const { return hydrogen()->is_strict(); }
676 }; 610 };
677 611
678 612
679 class LIsNullAndBranch: public LControlInstruction<1, 1> { 613 class LIsNullAndBranch: public LControlInstruction<1, 1> {
680 public: 614 public:
681 LIsNullAndBranch(LOperand* value, LOperand* temp) { 615 LIsNullAndBranch(LOperand* value, LOperand* temp) {
682 inputs_[0] = value; 616 inputs_[0] = value;
683 temps_[0] = temp; 617 temps_[0] = temp;
684 } 618 }
685 619
686 DECLARE_CONCRETE_INSTRUCTION(IsNullAndBranch, "is-null-and-branch") 620 DECLARE_CONCRETE_INSTRUCTION(IsNullAndBranch, "is-null-and-branch")
687 DECLARE_HYDROGEN_ACCESSOR(IsNull) 621 DECLARE_HYDROGEN_ACCESSOR(IsNullAndBranch)
688 622
689 bool is_strict() const { return hydrogen()->is_strict(); } 623 bool is_strict() const { return hydrogen()->is_strict(); }
690 624
691 virtual void PrintDataTo(StringStream* stream); 625 virtual void PrintDataTo(StringStream* stream);
692 }; 626 };
693 627
694 628
695 class LIsObject: public LTemplateInstruction<1, 1, 0> {
696 public:
697 explicit LIsObject(LOperand* value) {
698 inputs_[0] = value;
699 }
700
701 DECLARE_CONCRETE_INSTRUCTION(IsObject, "is-object")
702 };
703
704
705 class LIsObjectAndBranch: public LControlInstruction<1, 1> { 629 class LIsObjectAndBranch: public LControlInstruction<1, 1> {
706 public: 630 public:
707 LIsObjectAndBranch(LOperand* value, LOperand* temp) { 631 LIsObjectAndBranch(LOperand* value, LOperand* temp) {
708 inputs_[0] = value; 632 inputs_[0] = value;
709 temps_[0] = temp; 633 temps_[0] = temp;
710 } 634 }
711 635
712 DECLARE_CONCRETE_INSTRUCTION(IsObjectAndBranch, "is-object-and-branch") 636 DECLARE_CONCRETE_INSTRUCTION(IsObjectAndBranch, "is-object-and-branch")
713 637
714 virtual void PrintDataTo(StringStream* stream); 638 virtual void PrintDataTo(StringStream* stream);
715 }; 639 };
716 640
717 641
718 class LIsSmi: public LTemplateInstruction<1, 1, 0> {
719 public:
720 explicit LIsSmi(LOperand* value) {
721 inputs_[0] = value;
722 }
723
724 DECLARE_CONCRETE_INSTRUCTION(IsSmi, "is-smi")
725 DECLARE_HYDROGEN_ACCESSOR(IsSmi)
726 };
727
728
729 class LIsSmiAndBranch: public LControlInstruction<1, 0> { 642 class LIsSmiAndBranch: public LControlInstruction<1, 0> {
730 public: 643 public:
731 explicit LIsSmiAndBranch(LOperand* value) { 644 explicit LIsSmiAndBranch(LOperand* value) {
732 inputs_[0] = value; 645 inputs_[0] = value;
733 } 646 }
734 647
735 DECLARE_CONCRETE_INSTRUCTION(IsSmiAndBranch, "is-smi-and-branch") 648 DECLARE_CONCRETE_INSTRUCTION(IsSmiAndBranch, "is-smi-and-branch")
649 DECLARE_HYDROGEN_ACCESSOR(IsSmiAndBranch)
736 650
737 virtual void PrintDataTo(StringStream* stream); 651 virtual void PrintDataTo(StringStream* stream);
738 }; 652 };
739 653
740 654
741 class LIsUndetectable: public LTemplateInstruction<1, 1, 0> {
742 public:
743 explicit LIsUndetectable(LOperand* value) {
744 inputs_[0] = value;
745 }
746
747 DECLARE_CONCRETE_INSTRUCTION(IsUndetectable, "is-undetectable")
748 DECLARE_HYDROGEN_ACCESSOR(IsUndetectable)
749 };
750
751
752 class LIsUndetectableAndBranch: public LControlInstruction<1, 1> { 655 class LIsUndetectableAndBranch: public LControlInstruction<1, 1> {
753 public: 656 public:
754 explicit LIsUndetectableAndBranch(LOperand* value, LOperand* temp) { 657 explicit LIsUndetectableAndBranch(LOperand* value, LOperand* temp) {
755 inputs_[0] = value; 658 inputs_[0] = value;
756 temps_[0] = temp; 659 temps_[0] = temp;
757 } 660 }
758 661
759 DECLARE_CONCRETE_INSTRUCTION(IsUndetectableAndBranch, 662 DECLARE_CONCRETE_INSTRUCTION(IsUndetectableAndBranch,
760 "is-undetectable-and-branch") 663 "is-undetectable-and-branch")
761 664
762 virtual void PrintDataTo(StringStream* stream); 665 virtual void PrintDataTo(StringStream* stream);
763 }; 666 };
764 667
765 668
766 class LHasInstanceType: public LTemplateInstruction<1, 1, 0> {
767 public:
768 explicit LHasInstanceType(LOperand* value) {
769 inputs_[0] = value;
770 }
771
772 DECLARE_CONCRETE_INSTRUCTION(HasInstanceType, "has-instance-type")
773 DECLARE_HYDROGEN_ACCESSOR(HasInstanceType)
774 };
775
776
777 class LHasInstanceTypeAndBranch: public LControlInstruction<1, 1> { 669 class LHasInstanceTypeAndBranch: public LControlInstruction<1, 1> {
778 public: 670 public:
779 LHasInstanceTypeAndBranch(LOperand* value, LOperand* temp) { 671 LHasInstanceTypeAndBranch(LOperand* value, LOperand* temp) {
780 inputs_[0] = value; 672 inputs_[0] = value;
781 temps_[0] = temp; 673 temps_[0] = temp;
782 } 674 }
783 675
784 DECLARE_CONCRETE_INSTRUCTION(HasInstanceTypeAndBranch, 676 DECLARE_CONCRETE_INSTRUCTION(HasInstanceTypeAndBranch,
785 "has-instance-type-and-branch") 677 "has-instance-type-and-branch")
786 DECLARE_HYDROGEN_ACCESSOR(HasInstanceType) 678 DECLARE_HYDROGEN_ACCESSOR(HasInstanceTypeAndBranch)
787 679
788 virtual void PrintDataTo(StringStream* stream); 680 virtual void PrintDataTo(StringStream* stream);
789 }; 681 };
790 682
791 683
792 class LGetCachedArrayIndex: public LTemplateInstruction<1, 1, 0> { 684 class LGetCachedArrayIndex: public LTemplateInstruction<1, 1, 0> {
793 public: 685 public:
794 explicit LGetCachedArrayIndex(LOperand* value) { 686 explicit LGetCachedArrayIndex(LOperand* value) {
795 inputs_[0] = value; 687 inputs_[0] = value;
796 } 688 }
797 689
798 DECLARE_CONCRETE_INSTRUCTION(GetCachedArrayIndex, "get-cached-array-index") 690 DECLARE_CONCRETE_INSTRUCTION(GetCachedArrayIndex, "get-cached-array-index")
799 DECLARE_HYDROGEN_ACCESSOR(GetCachedArrayIndex) 691 DECLARE_HYDROGEN_ACCESSOR(GetCachedArrayIndex)
800 }; 692 };
801 693
802 694
803 class LHasCachedArrayIndex: public LTemplateInstruction<1, 1, 0> {
804 public:
805 explicit LHasCachedArrayIndex(LOperand* value) {
806 inputs_[0] = value;
807 }
808
809 DECLARE_CONCRETE_INSTRUCTION(HasCachedArrayIndex, "has-cached-array-index")
810 DECLARE_HYDROGEN_ACCESSOR(HasCachedArrayIndex)
811 };
812
813
814 class LHasCachedArrayIndexAndBranch: public LControlInstruction<1, 0> { 695 class LHasCachedArrayIndexAndBranch: public LControlInstruction<1, 0> {
815 public: 696 public:
816 explicit LHasCachedArrayIndexAndBranch(LOperand* value) { 697 explicit LHasCachedArrayIndexAndBranch(LOperand* value) {
817 inputs_[0] = value; 698 inputs_[0] = value;
818 } 699 }
819 700
820 DECLARE_CONCRETE_INSTRUCTION(HasCachedArrayIndexAndBranch, 701 DECLARE_CONCRETE_INSTRUCTION(HasCachedArrayIndexAndBranch,
821 "has-cached-array-index-and-branch") 702 "has-cached-array-index-and-branch")
822 virtual void PrintDataTo(StringStream* stream); 703 virtual void PrintDataTo(StringStream* stream);
823 }; 704 };
824 705
825 706
826 class LIsConstructCall: public LTemplateInstruction<1, 0, 0> {
827 public:
828 DECLARE_CONCRETE_INSTRUCTION(IsConstructCall, "is-construct-call")
829 DECLARE_HYDROGEN_ACCESSOR(IsConstructCall)
830 };
831
832
833 class LIsConstructCallAndBranch: public LControlInstruction<0, 1> { 707 class LIsConstructCallAndBranch: public LControlInstruction<0, 1> {
834 public: 708 public:
835 explicit LIsConstructCallAndBranch(LOperand* temp) { 709 explicit LIsConstructCallAndBranch(LOperand* temp) {
836 temps_[0] = temp; 710 temps_[0] = temp;
837 } 711 }
838 712
839 DECLARE_CONCRETE_INSTRUCTION(IsConstructCallAndBranch, 713 DECLARE_CONCRETE_INSTRUCTION(IsConstructCallAndBranch,
840 "is-construct-call-and-branch") 714 "is-construct-call-and-branch")
841 }; 715 };
842 716
843 717
844 class LClassOfTest: public LTemplateInstruction<1, 1, 1> {
845 public:
846 LClassOfTest(LOperand* value, LOperand* temp) {
847 inputs_[0] = value;
848 temps_[0] = temp;
849 }
850
851 DECLARE_CONCRETE_INSTRUCTION(ClassOfTest, "class-of-test")
852 DECLARE_HYDROGEN_ACCESSOR(ClassOfTest)
853
854 virtual void PrintDataTo(StringStream* stream);
855 };
856
857
858 class LClassOfTestAndBranch: public LControlInstruction<1, 2> { 718 class LClassOfTestAndBranch: public LControlInstruction<1, 2> {
859 public: 719 public:
860 LClassOfTestAndBranch(LOperand* value, LOperand* temp, LOperand* temp2) { 720 LClassOfTestAndBranch(LOperand* value, LOperand* temp, LOperand* temp2) {
861 inputs_[0] = value; 721 inputs_[0] = value;
862 temps_[0] = temp; 722 temps_[0] = temp;
863 temps_[1] = temp2; 723 temps_[1] = temp2;
864 } 724 }
865 725
866 DECLARE_CONCRETE_INSTRUCTION(ClassOfTestAndBranch, 726 DECLARE_CONCRETE_INSTRUCTION(ClassOfTestAndBranch,
867 "class-of-test-and-branch") 727 "class-of-test-and-branch")
868 DECLARE_HYDROGEN_ACCESSOR(ClassOfTest) 728 DECLARE_HYDROGEN_ACCESSOR(ClassOfTestAndBranch)
869 729
870 virtual void PrintDataTo(StringStream* stream); 730 virtual void PrintDataTo(StringStream* stream);
871 }; 731 };
872 732
873 733
874 class LCmpT: public LTemplateInstruction<1, 2, 0> { 734 class LCmpT: public LTemplateInstruction<1, 2, 0> {
875 public: 735 public:
876 LCmpT(LOperand* left, LOperand* right) { 736 LCmpT(LOperand* left, LOperand* right) {
877 inputs_[0] = left; 737 inputs_[0] = left;
878 inputs_[1] = right; 738 inputs_[1] = right;
879 } 739 }
880 740
881 DECLARE_CONCRETE_INSTRUCTION(CmpT, "cmp-t") 741 DECLARE_CONCRETE_INSTRUCTION(CmpT, "cmp-t")
882 DECLARE_HYDROGEN_ACCESSOR(Compare) 742 DECLARE_HYDROGEN_ACCESSOR(CompareGeneric)
883 743
884 Token::Value op() const { return hydrogen()->token(); } 744 Token::Value op() const { return hydrogen()->token(); }
885 }; 745 };
886 746
887 747
888 class LInstanceOf: public LTemplateInstruction<1, 3, 0> { 748 class LInstanceOf: public LTemplateInstruction<1, 3, 0> {
889 public: 749 public:
890 LInstanceOf(LOperand* context, LOperand* left, LOperand* right) { 750 LInstanceOf(LOperand* context, LOperand* left, LOperand* right) {
891 inputs_[0] = context; 751 inputs_[0] = context;
892 inputs_[1] = left; 752 inputs_[1] = left;
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
1008 }; 868 };
1009 869
1010 870
1011 class LBranch: public LControlInstruction<1, 0> { 871 class LBranch: public LControlInstruction<1, 0> {
1012 public: 872 public:
1013 explicit LBranch(LOperand* value) { 873 explicit LBranch(LOperand* value) {
1014 inputs_[0] = value; 874 inputs_[0] = value;
1015 } 875 }
1016 876
1017 DECLARE_CONCRETE_INSTRUCTION(Branch, "branch") 877 DECLARE_CONCRETE_INSTRUCTION(Branch, "branch")
1018 DECLARE_HYDROGEN_ACCESSOR(Value) 878 DECLARE_HYDROGEN_ACCESSOR(Branch)
1019 879
1020 virtual void PrintDataTo(StringStream* stream); 880 virtual void PrintDataTo(StringStream* stream);
1021 }; 881 };
1022 882
1023 883
1024 class LCmpMapAndBranch: public LTemplateInstruction<0, 1, 0> { 884 class LCmpMapAndBranch: public LTemplateInstruction<0, 1, 0> {
1025 public: 885 public:
1026 explicit LCmpMapAndBranch(LOperand* value) { 886 explicit LCmpMapAndBranch(LOperand* value) {
1027 inputs_[0] = value; 887 inputs_[0] = value;
1028 } 888 }
(...skipping 998 matching lines...) Expand 10 before | Expand all | Expand 10 after
2027 class LTypeof: public LTemplateInstruction<1, 1, 0> { 1887 class LTypeof: public LTemplateInstruction<1, 1, 0> {
2028 public: 1888 public:
2029 explicit LTypeof(LOperand* value) { 1889 explicit LTypeof(LOperand* value) {
2030 inputs_[0] = value; 1890 inputs_[0] = value;
2031 } 1891 }
2032 1892
2033 DECLARE_CONCRETE_INSTRUCTION(Typeof, "typeof") 1893 DECLARE_CONCRETE_INSTRUCTION(Typeof, "typeof")
2034 }; 1894 };
2035 1895
2036 1896
2037 class LTypeofIs: public LTemplateInstruction<1, 1, 0> {
2038 public:
2039 explicit LTypeofIs(LOperand* value) {
2040 inputs_[0] = value;
2041 }
2042
2043 DECLARE_CONCRETE_INSTRUCTION(TypeofIs, "typeof-is")
2044 DECLARE_HYDROGEN_ACCESSOR(TypeofIs)
2045
2046 Handle<String> type_literal() { return hydrogen()->type_literal(); }
2047
2048 virtual void PrintDataTo(StringStream* stream);
2049 };
2050
2051
2052 class LTypeofIsAndBranch: public LControlInstruction<1, 0> { 1897 class LTypeofIsAndBranch: public LControlInstruction<1, 0> {
2053 public: 1898 public:
2054 explicit LTypeofIsAndBranch(LOperand* value) { 1899 explicit LTypeofIsAndBranch(LOperand* value) {
2055 inputs_[0] = value; 1900 inputs_[0] = value;
2056 } 1901 }
2057 1902
2058 DECLARE_CONCRETE_INSTRUCTION(TypeofIsAndBranch, "typeof-is-and-branch") 1903 DECLARE_CONCRETE_INSTRUCTION(TypeofIsAndBranch, "typeof-is-and-branch")
2059 DECLARE_HYDROGEN_ACCESSOR(TypeofIs) 1904 DECLARE_HYDROGEN_ACCESSOR(TypeofIsAndBranch)
2060 1905
2061 Handle<String> type_literal() { return hydrogen()->type_literal(); } 1906 Handle<String> type_literal() { return hydrogen()->type_literal(); }
2062 1907
2063 virtual void PrintDataTo(StringStream* stream); 1908 virtual void PrintDataTo(StringStream* stream);
2064 }; 1909 };
2065 1910
2066 1911
2067 class LDeleteProperty: public LTemplateInstruction<1, 2, 0> { 1912 class LDeleteProperty: public LTemplateInstruction<1, 2, 0> {
2068 public: 1913 public:
2069 LDeleteProperty(LOperand* obj, LOperand* key) { 1914 LDeleteProperty(LOperand* obj, LOperand* key) {
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
2348 2193
2349 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); 2194 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder);
2350 }; 2195 };
2351 2196
2352 #undef DECLARE_HYDROGEN_ACCESSOR 2197 #undef DECLARE_HYDROGEN_ACCESSOR
2353 #undef DECLARE_CONCRETE_INSTRUCTION 2198 #undef DECLARE_CONCRETE_INSTRUCTION
2354 2199
2355 } } // namespace v8::internal 2200 } } // namespace v8::internal
2356 2201
2357 #endif // V8_IA32_LITHIUM_IA32_H_ 2202 #endif // V8_IA32_LITHIUM_IA32_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698