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

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

Issue 10907234: Consistently use named getters for Lithium operands on ARM. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Use getters Created 8 years, 3 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') | 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 // 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 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
254 virtual void SetDeferredLazyDeoptimizationEnvironment(LEnvironment* env) { } 254 virtual void SetDeferredLazyDeoptimizationEnvironment(LEnvironment* env) { }
255 255
256 void MarkAsCall() { is_call_ = true; } 256 void MarkAsCall() { is_call_ = true; }
257 257
258 // Interface to the register allocator and iterators. 258 // Interface to the register allocator and iterators.
259 bool IsMarkedAsCall() const { return is_call_; } 259 bool IsMarkedAsCall() const { return is_call_; }
260 260
261 virtual bool HasResult() const = 0; 261 virtual bool HasResult() const = 0;
262 virtual LOperand* result() = 0; 262 virtual LOperand* result() = 0;
263 263
264 virtual int TempCount() = 0;
265 virtual LOperand* TempAt(int i) = 0;
266
267 LOperand* FirstInput() { return InputAt(0); } 264 LOperand* FirstInput() { return InputAt(0); }
268 LOperand* Output() { return HasResult() ? result() : NULL; } 265 LOperand* Output() { return HasResult() ? result() : NULL; }
269 266
270 #ifdef DEBUG 267 #ifdef DEBUG
271 void VerifyCall(); 268 void VerifyCall();
272 #endif 269 #endif
273 270
274 private: 271 private:
275 // Iterator support. 272 // Iterator support.
276 friend class InputIterator; 273 friend class InputIterator;
277 virtual int InputCount() = 0; 274 virtual int InputCount() = 0;
278 virtual LOperand* InputAt(int i) = 0; 275 virtual LOperand* InputAt(int i) = 0;
279 276
277 friend class TempIterator;
278 virtual int TempCount() = 0;
279 virtual LOperand* TempAt(int i) = 0;
280
280 LEnvironment* environment_; 281 LEnvironment* environment_;
281 SetOncePointer<LPointerMap> pointer_map_; 282 SetOncePointer<LPointerMap> pointer_map_;
282 HValue* hydrogen_value_; 283 HValue* hydrogen_value_;
283 bool is_call_; 284 bool is_call_;
284 }; 285 };
285 286
286 287
287 // R = number of result operands (0 or 1). 288 // R = number of result operands (0 or 1).
288 // I = number of input operands. 289 // I = number of input operands.
289 // T = number of temporary operands. 290 // T = number of temporary operands.
290 template<int R, int I, int T> 291 template<int R, int I, int T>
291 class LTemplateInstruction: public LInstruction { 292 class LTemplateInstruction: public LInstruction {
292 public: 293 public:
293 // Allow 0 or 1 output operands. 294 // Allow 0 or 1 output operands.
294 STATIC_ASSERT(R == 0 || R == 1); 295 STATIC_ASSERT(R == 0 || R == 1);
295 virtual bool HasResult() const { return R != 0; } 296 virtual bool HasResult() const { return R != 0; }
296 void set_result(LOperand* operand) { results_[0] = operand; } 297 void set_result(LOperand* operand) { results_[0] = operand; }
297 LOperand* result() { return results_[0]; } 298 LOperand* result() { return results_[0]; }
298 299
299 LOperand* InputAt(int i) { return inputs_[i]; }
300
301 int TempCount() { return T; }
302 LOperand* TempAt(int i) { return temps_[i]; }
303
304 protected: 300 protected:
305 EmbeddedContainer<LOperand*, R> results_; 301 EmbeddedContainer<LOperand*, R> results_;
306 EmbeddedContainer<LOperand*, I> inputs_; 302 EmbeddedContainer<LOperand*, I> inputs_;
307 EmbeddedContainer<LOperand*, T> temps_; 303 EmbeddedContainer<LOperand*, T> temps_;
308 304
309 private: 305 private:
310 virtual int InputCount() { return I; } 306 virtual int InputCount() { return I; }
307 virtual LOperand* InputAt(int i) { return inputs_[i]; }
308
309 virtual int TempCount() { return T; }
310 virtual LOperand* TempAt(int i) { return temps_[i]; }
311 }; 311 };
312 312
313 313
314 class LGap: public LTemplateInstruction<0, 0, 0> { 314 class LGap: public LTemplateInstruction<0, 0, 0> {
315 public: 315 public:
316 explicit LGap(HBasicBlock* block) 316 explicit LGap(HBasicBlock* block)
317 : block_(block) { 317 : block_(block) {
318 parallel_moves_[BEFORE] = NULL; 318 parallel_moves_[BEFORE] = NULL;
319 parallel_moves_[START] = NULL; 319 parallel_moves_[START] = NULL;
320 parallel_moves_[END] = NULL; 320 parallel_moves_[END] = NULL;
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
518 virtual void PrintDataTo(StringStream* stream); 518 virtual void PrintDataTo(StringStream* stream);
519 }; 519 };
520 520
521 521
522 class LArgumentsLength: public LTemplateInstruction<1, 1, 0> { 522 class LArgumentsLength: public LTemplateInstruction<1, 1, 0> {
523 public: 523 public:
524 explicit LArgumentsLength(LOperand* elements) { 524 explicit LArgumentsLength(LOperand* elements) {
525 inputs_[0] = elements; 525 inputs_[0] = elements;
526 } 526 }
527 527
528 LOperand* elements() { return inputs_[0]; }
529
528 DECLARE_CONCRETE_INSTRUCTION(ArgumentsLength, "arguments-length") 530 DECLARE_CONCRETE_INSTRUCTION(ArgumentsLength, "arguments-length")
529 }; 531 };
530 532
531 533
532 class LArgumentsElements: public LTemplateInstruction<1, 0, 0> { 534 class LArgumentsElements: public LTemplateInstruction<1, 0, 0> {
533 public: 535 public:
534 DECLARE_CONCRETE_INSTRUCTION(ArgumentsElements, "arguments-elements") 536 DECLARE_CONCRETE_INSTRUCTION(ArgumentsElements, "arguments-elements")
535 DECLARE_HYDROGEN_ACCESSOR(ArgumentsElements) 537 DECLARE_HYDROGEN_ACCESSOR(ArgumentsElements)
536 }; 538 };
537 539
538 540
539 class LModI: public LTemplateInstruction<1, 2, 3> { 541 class LModI: public LTemplateInstruction<1, 2, 3> {
540 public: 542 public:
541 // Used when the right hand is a constant power of 2. 543 // Used when the right hand is a constant power of 2.
542 LModI(LOperand* left, 544 LModI(LOperand* left,
543 LOperand* right) { 545 LOperand* right) {
544 inputs_[0] = left; 546 inputs_[0] = left;
545 inputs_[1] = right; 547 inputs_[1] = right;
546 temps_[0] = NULL; 548 temps_[0] = NULL;
547 temps_[1] = NULL; 549 temps_[1] = NULL;
548 temps_[2] = NULL; 550 temps_[2] = NULL;
549 } 551 }
550 552
551 // Used for the standard case. 553 // Used for the standard case.
552 LModI(LOperand* left, 554 LModI(LOperand* left,
553 LOperand* right, 555 LOperand* right,
554 LOperand* temp1, 556 LOperand* temp,
555 LOperand* temp2, 557 LOperand* temp2,
556 LOperand* temp3) { 558 LOperand* temp3) {
557 inputs_[0] = left; 559 inputs_[0] = left;
558 inputs_[1] = right; 560 inputs_[1] = right;
559 temps_[0] = temp1; 561 temps_[0] = temp;
560 temps_[1] = temp2; 562 temps_[1] = temp2;
561 temps_[2] = temp3; 563 temps_[2] = temp3;
562 } 564 }
563 565
566 LOperand* left() { return inputs_[0]; }
567 LOperand* right() { return inputs_[1]; }
568 LOperand* temp() { return temps_[0]; }
569 LOperand* temp2() { return temps_[1]; }
570 LOperand* temp3() { return temps_[2]; }
571
564 DECLARE_CONCRETE_INSTRUCTION(ModI, "mod-i") 572 DECLARE_CONCRETE_INSTRUCTION(ModI, "mod-i")
565 DECLARE_HYDROGEN_ACCESSOR(Mod) 573 DECLARE_HYDROGEN_ACCESSOR(Mod)
566 }; 574 };
567 575
568 576
569 class LDivI: public LTemplateInstruction<1, 2, 0> { 577 class LDivI: public LTemplateInstruction<1, 2, 0> {
570 public: 578 public:
571 LDivI(LOperand* left, LOperand* right) { 579 LDivI(LOperand* left, LOperand* right) {
572 inputs_[0] = left; 580 inputs_[0] = left;
573 inputs_[1] = right; 581 inputs_[1] = right;
574 } 582 }
575 583
584 LOperand* left() { return inputs_[0]; }
585 LOperand* right() { return inputs_[1]; }
586
576 DECLARE_CONCRETE_INSTRUCTION(DivI, "div-i") 587 DECLARE_CONCRETE_INSTRUCTION(DivI, "div-i")
577 DECLARE_HYDROGEN_ACCESSOR(Div) 588 DECLARE_HYDROGEN_ACCESSOR(Div)
578 }; 589 };
579 590
580 591
581 class LMathFloorOfDiv: public LTemplateInstruction<1, 2, 1> { 592 class LMathFloorOfDiv: public LTemplateInstruction<1, 2, 1> {
582 public: 593 public:
583 LMathFloorOfDiv(LOperand* left, 594 LMathFloorOfDiv(LOperand* left,
584 LOperand* right, 595 LOperand* right,
585 LOperand* temp = NULL) { 596 LOperand* temp = NULL) {
586 inputs_[0] = left; 597 inputs_[0] = left;
587 inputs_[1] = right; 598 inputs_[1] = right;
588 temps_[0] = temp; 599 temps_[0] = temp;
589 } 600 }
590 601
602 LOperand* left() { return inputs_[0]; }
603 LOperand* right() { return inputs_[1]; }
604 LOperand* temp() { return temps_[0]; }
605
591 DECLARE_CONCRETE_INSTRUCTION(MathFloorOfDiv, "math-floor-of-div") 606 DECLARE_CONCRETE_INSTRUCTION(MathFloorOfDiv, "math-floor-of-div")
592 DECLARE_HYDROGEN_ACCESSOR(MathFloorOfDiv) 607 DECLARE_HYDROGEN_ACCESSOR(MathFloorOfDiv)
593 }; 608 };
594 609
595 610
596 class LMulI: public LTemplateInstruction<1, 2, 1> { 611 class LMulI: public LTemplateInstruction<1, 2, 1> {
597 public: 612 public:
598 LMulI(LOperand* left, LOperand* right, LOperand* temp) { 613 LMulI(LOperand* left, LOperand* right, LOperand* temp) {
599 inputs_[0] = left; 614 inputs_[0] = left;
600 inputs_[1] = right; 615 inputs_[1] = right;
601 temps_[0] = temp; 616 temps_[0] = temp;
602 } 617 }
603 618
619 LOperand* left() { return inputs_[0]; }
620 LOperand* right() { return inputs_[1]; }
621 LOperand* temp() { return temps_[0]; }
622
604 DECLARE_CONCRETE_INSTRUCTION(MulI, "mul-i") 623 DECLARE_CONCRETE_INSTRUCTION(MulI, "mul-i")
605 DECLARE_HYDROGEN_ACCESSOR(Mul) 624 DECLARE_HYDROGEN_ACCESSOR(Mul)
606 }; 625 };
607 626
608 627
609 class LCmpIDAndBranch: public LControlInstruction<2, 0> { 628 class LCmpIDAndBranch: public LControlInstruction<2, 0> {
610 public: 629 public:
611 LCmpIDAndBranch(LOperand* left, LOperand* right) { 630 LCmpIDAndBranch(LOperand* left, LOperand* right) {
612 inputs_[0] = left; 631 inputs_[0] = left;
613 inputs_[1] = right; 632 inputs_[1] = right;
614 } 633 }
615 634
635 LOperand* left() { return inputs_[0]; }
636 LOperand* right() { return inputs_[1]; }
637
616 DECLARE_CONCRETE_INSTRUCTION(CmpIDAndBranch, "cmp-id-and-branch") 638 DECLARE_CONCRETE_INSTRUCTION(CmpIDAndBranch, "cmp-id-and-branch")
617 DECLARE_HYDROGEN_ACCESSOR(CompareIDAndBranch) 639 DECLARE_HYDROGEN_ACCESSOR(CompareIDAndBranch)
618 640
619 Token::Value op() const { return hydrogen()->token(); } 641 Token::Value op() const { return hydrogen()->token(); }
620 bool is_double() const { 642 bool is_double() const {
621 return hydrogen()->GetInputRepresentation().IsDouble(); 643 return hydrogen()->GetInputRepresentation().IsDouble();
622 } 644 }
623 645
624 virtual void PrintDataTo(StringStream* stream); 646 virtual void PrintDataTo(StringStream* stream);
625 }; 647 };
626 648
627 649
628 class LUnaryMathOperation: public LTemplateInstruction<1, 1, 1> { 650 class LUnaryMathOperation: public LTemplateInstruction<1, 1, 1> {
629 public: 651 public:
630 LUnaryMathOperation(LOperand* value, LOperand* temp) { 652 LUnaryMathOperation(LOperand* value, LOperand* temp) {
631 inputs_[0] = value; 653 inputs_[0] = value;
632 temps_[0] = temp; 654 temps_[0] = temp;
633 } 655 }
634 656
657 LOperand* value() { return inputs_[0]; }
658 LOperand* temp() { return temps_[0]; }
659
635 DECLARE_CONCRETE_INSTRUCTION(UnaryMathOperation, "unary-math-operation") 660 DECLARE_CONCRETE_INSTRUCTION(UnaryMathOperation, "unary-math-operation")
636 DECLARE_HYDROGEN_ACCESSOR(UnaryMathOperation) 661 DECLARE_HYDROGEN_ACCESSOR(UnaryMathOperation)
637 662
638 virtual void PrintDataTo(StringStream* stream); 663 virtual void PrintDataTo(StringStream* stream);
639 BuiltinFunctionId op() const { return hydrogen()->op(); } 664 BuiltinFunctionId op() const { return hydrogen()->op(); }
640 }; 665 };
641 666
642 667
643 class LCmpObjectEqAndBranch: public LControlInstruction<2, 0> { 668 class LCmpObjectEqAndBranch: public LControlInstruction<2, 0> {
644 public: 669 public:
645 LCmpObjectEqAndBranch(LOperand* left, LOperand* right) { 670 LCmpObjectEqAndBranch(LOperand* left, LOperand* right) {
646 inputs_[0] = left; 671 inputs_[0] = left;
647 inputs_[1] = right; 672 inputs_[1] = right;
648 } 673 }
649 674
675 LOperand* left() { return inputs_[0]; }
676 LOperand* right() { return inputs_[1]; }
677
650 DECLARE_CONCRETE_INSTRUCTION(CmpObjectEqAndBranch, 678 DECLARE_CONCRETE_INSTRUCTION(CmpObjectEqAndBranch,
651 "cmp-object-eq-and-branch") 679 "cmp-object-eq-and-branch")
652 DECLARE_HYDROGEN_ACCESSOR(CompareObjectEqAndBranch) 680 DECLARE_HYDROGEN_ACCESSOR(CompareObjectEqAndBranch)
653 }; 681 };
654 682
655 683
656 class LCmpConstantEqAndBranch: public LControlInstruction<1, 0> { 684 class LCmpConstantEqAndBranch: public LControlInstruction<1, 0> {
657 public: 685 public:
658 explicit LCmpConstantEqAndBranch(LOperand* left) { 686 explicit LCmpConstantEqAndBranch(LOperand* left) {
659 inputs_[0] = left; 687 inputs_[0] = left;
660 } 688 }
661 689
690 LOperand* left() { return inputs_[0]; }
691
662 DECLARE_CONCRETE_INSTRUCTION(CmpConstantEqAndBranch, 692 DECLARE_CONCRETE_INSTRUCTION(CmpConstantEqAndBranch,
663 "cmp-constant-eq-and-branch") 693 "cmp-constant-eq-and-branch")
664 DECLARE_HYDROGEN_ACCESSOR(CompareConstantEqAndBranch) 694 DECLARE_HYDROGEN_ACCESSOR(CompareConstantEqAndBranch)
665 }; 695 };
666 696
667 697
668 class LIsNilAndBranch: public LControlInstruction<1, 0> { 698 class LIsNilAndBranch: public LControlInstruction<1, 0> {
669 public: 699 public:
670 explicit LIsNilAndBranch(LOperand* value) { 700 explicit LIsNilAndBranch(LOperand* value) {
671 inputs_[0] = value; 701 inputs_[0] = value;
672 } 702 }
673 703
704 LOperand* value() { return inputs_[0]; }
705
674 DECLARE_CONCRETE_INSTRUCTION(IsNilAndBranch, "is-nil-and-branch") 706 DECLARE_CONCRETE_INSTRUCTION(IsNilAndBranch, "is-nil-and-branch")
675 DECLARE_HYDROGEN_ACCESSOR(IsNilAndBranch) 707 DECLARE_HYDROGEN_ACCESSOR(IsNilAndBranch)
676 708
677 EqualityKind kind() const { return hydrogen()->kind(); } 709 EqualityKind kind() const { return hydrogen()->kind(); }
678 NilValue nil() const { return hydrogen()->nil(); } 710 NilValue nil() const { return hydrogen()->nil(); }
679 711
680 virtual void PrintDataTo(StringStream* stream); 712 virtual void PrintDataTo(StringStream* stream);
681 }; 713 };
682 714
683 715
684 class LIsObjectAndBranch: public LControlInstruction<1, 1> { 716 class LIsObjectAndBranch: public LControlInstruction<1, 1> {
685 public: 717 public:
686 LIsObjectAndBranch(LOperand* value, LOperand* temp) { 718 LIsObjectAndBranch(LOperand* value, LOperand* temp) {
687 inputs_[0] = value; 719 inputs_[0] = value;
688 temps_[0] = temp; 720 temps_[0] = temp;
689 } 721 }
690 722
723 LOperand* value() { return inputs_[0]; }
724 LOperand* temp() { return temps_[0]; }
725
691 DECLARE_CONCRETE_INSTRUCTION(IsObjectAndBranch, "is-object-and-branch") 726 DECLARE_CONCRETE_INSTRUCTION(IsObjectAndBranch, "is-object-and-branch")
692 DECLARE_HYDROGEN_ACCESSOR(IsObjectAndBranch) 727 DECLARE_HYDROGEN_ACCESSOR(IsObjectAndBranch)
693 728
694 virtual void PrintDataTo(StringStream* stream); 729 virtual void PrintDataTo(StringStream* stream);
695 }; 730 };
696 731
697 732
698 class LIsStringAndBranch: public LControlInstruction<1, 1> { 733 class LIsStringAndBranch: public LControlInstruction<1, 1> {
699 public: 734 public:
700 LIsStringAndBranch(LOperand* value, LOperand* temp) { 735 LIsStringAndBranch(LOperand* value, LOperand* temp) {
701 inputs_[0] = value; 736 inputs_[0] = value;
702 temps_[0] = temp; 737 temps_[0] = temp;
703 } 738 }
704 739
740 LOperand* value() { return inputs_[0]; }
741 LOperand* temp() { return temps_[0]; }
742
705 DECLARE_CONCRETE_INSTRUCTION(IsStringAndBranch, "is-string-and-branch") 743 DECLARE_CONCRETE_INSTRUCTION(IsStringAndBranch, "is-string-and-branch")
706 DECLARE_HYDROGEN_ACCESSOR(IsStringAndBranch) 744 DECLARE_HYDROGEN_ACCESSOR(IsStringAndBranch)
707 745
708 virtual void PrintDataTo(StringStream* stream); 746 virtual void PrintDataTo(StringStream* stream);
709 }; 747 };
710 748
711 749
712 class LIsSmiAndBranch: public LControlInstruction<1, 0> { 750 class LIsSmiAndBranch: public LControlInstruction<1, 0> {
713 public: 751 public:
714 explicit LIsSmiAndBranch(LOperand* value) { 752 explicit LIsSmiAndBranch(LOperand* value) {
715 inputs_[0] = value; 753 inputs_[0] = value;
716 } 754 }
717 755
756 LOperand* value() { return inputs_[0]; }
757
718 DECLARE_CONCRETE_INSTRUCTION(IsSmiAndBranch, "is-smi-and-branch") 758 DECLARE_CONCRETE_INSTRUCTION(IsSmiAndBranch, "is-smi-and-branch")
719 DECLARE_HYDROGEN_ACCESSOR(IsSmiAndBranch) 759 DECLARE_HYDROGEN_ACCESSOR(IsSmiAndBranch)
720 760
721 virtual void PrintDataTo(StringStream* stream); 761 virtual void PrintDataTo(StringStream* stream);
722 }; 762 };
723 763
724 764
725 class LIsUndetectableAndBranch: public LControlInstruction<1, 1> { 765 class LIsUndetectableAndBranch: public LControlInstruction<1, 1> {
726 public: 766 public:
727 explicit LIsUndetectableAndBranch(LOperand* value, LOperand* temp) { 767 explicit LIsUndetectableAndBranch(LOperand* value, LOperand* temp) {
728 inputs_[0] = value; 768 inputs_[0] = value;
729 temps_[0] = temp; 769 temps_[0] = temp;
730 } 770 }
731 771
772 LOperand* value() { return inputs_[0]; }
773 LOperand* temp() { return temps_[0]; }
774
732 DECLARE_CONCRETE_INSTRUCTION(IsUndetectableAndBranch, 775 DECLARE_CONCRETE_INSTRUCTION(IsUndetectableAndBranch,
733 "is-undetectable-and-branch") 776 "is-undetectable-and-branch")
734 DECLARE_HYDROGEN_ACCESSOR(IsUndetectableAndBranch) 777 DECLARE_HYDROGEN_ACCESSOR(IsUndetectableAndBranch)
735 778
736 virtual void PrintDataTo(StringStream* stream); 779 virtual void PrintDataTo(StringStream* stream);
737 }; 780 };
738 781
739 782
740 class LStringCompareAndBranch: public LControlInstruction<2, 0> { 783 class LStringCompareAndBranch: public LControlInstruction<2, 0> {
741 public: 784 public:
742 LStringCompareAndBranch(LOperand* left, LOperand* right) { 785 LStringCompareAndBranch(LOperand* left, LOperand* right) {
743 inputs_[0] = left; 786 inputs_[0] = left;
744 inputs_[1] = right; 787 inputs_[1] = right;
745 } 788 }
746 789
790 LOperand* left() { return inputs_[0]; }
791 LOperand* right() { return inputs_[1]; }
792
747 DECLARE_CONCRETE_INSTRUCTION(StringCompareAndBranch, 793 DECLARE_CONCRETE_INSTRUCTION(StringCompareAndBranch,
748 "string-compare-and-branch") 794 "string-compare-and-branch")
749 DECLARE_HYDROGEN_ACCESSOR(StringCompareAndBranch) 795 DECLARE_HYDROGEN_ACCESSOR(StringCompareAndBranch)
750 796
751 Token::Value op() const { return hydrogen()->token(); } 797 Token::Value op() const { return hydrogen()->token(); }
752 798
753 virtual void PrintDataTo(StringStream* stream); 799 virtual void PrintDataTo(StringStream* stream);
754 }; 800 };
755 801
756 802
757 class LHasInstanceTypeAndBranch: public LControlInstruction<1, 0> { 803 class LHasInstanceTypeAndBranch: public LControlInstruction<1, 0> {
758 public: 804 public:
759 explicit LHasInstanceTypeAndBranch(LOperand* value) { 805 explicit LHasInstanceTypeAndBranch(LOperand* value) {
760 inputs_[0] = value; 806 inputs_[0] = value;
761 } 807 }
762 808
809 LOperand* value() { return inputs_[0]; }
810
763 DECLARE_CONCRETE_INSTRUCTION(HasInstanceTypeAndBranch, 811 DECLARE_CONCRETE_INSTRUCTION(HasInstanceTypeAndBranch,
764 "has-instance-type-and-branch") 812 "has-instance-type-and-branch")
765 DECLARE_HYDROGEN_ACCESSOR(HasInstanceTypeAndBranch) 813 DECLARE_HYDROGEN_ACCESSOR(HasInstanceTypeAndBranch)
766 814
767 virtual void PrintDataTo(StringStream* stream); 815 virtual void PrintDataTo(StringStream* stream);
768 }; 816 };
769 817
770 818
771 class LGetCachedArrayIndex: public LTemplateInstruction<1, 1, 0> { 819 class LGetCachedArrayIndex: public LTemplateInstruction<1, 1, 0> {
772 public: 820 public:
773 explicit LGetCachedArrayIndex(LOperand* value) { 821 explicit LGetCachedArrayIndex(LOperand* value) {
774 inputs_[0] = value; 822 inputs_[0] = value;
775 } 823 }
776 824
825 LOperand* value() { return inputs_[0]; }
826
777 DECLARE_CONCRETE_INSTRUCTION(GetCachedArrayIndex, "get-cached-array-index") 827 DECLARE_CONCRETE_INSTRUCTION(GetCachedArrayIndex, "get-cached-array-index")
778 DECLARE_HYDROGEN_ACCESSOR(GetCachedArrayIndex) 828 DECLARE_HYDROGEN_ACCESSOR(GetCachedArrayIndex)
779 }; 829 };
780 830
781 831
782 class LHasCachedArrayIndexAndBranch: public LControlInstruction<1, 0> { 832 class LHasCachedArrayIndexAndBranch: public LControlInstruction<1, 0> {
783 public: 833 public:
784 explicit LHasCachedArrayIndexAndBranch(LOperand* value) { 834 explicit LHasCachedArrayIndexAndBranch(LOperand* value) {
785 inputs_[0] = value; 835 inputs_[0] = value;
786 } 836 }
787 837
838 LOperand* value() { return inputs_[0]; }
839
788 DECLARE_CONCRETE_INSTRUCTION(HasCachedArrayIndexAndBranch, 840 DECLARE_CONCRETE_INSTRUCTION(HasCachedArrayIndexAndBranch,
789 "has-cached-array-index-and-branch") 841 "has-cached-array-index-and-branch")
790 DECLARE_HYDROGEN_ACCESSOR(HasCachedArrayIndexAndBranch) 842 DECLARE_HYDROGEN_ACCESSOR(HasCachedArrayIndexAndBranch)
791 843
792 virtual void PrintDataTo(StringStream* stream); 844 virtual void PrintDataTo(StringStream* stream);
793 }; 845 };
794 846
795 847
796 class LClassOfTestAndBranch: public LControlInstruction<1, 1> { 848 class LClassOfTestAndBranch: public LControlInstruction<1, 1> {
797 public: 849 public:
798 LClassOfTestAndBranch(LOperand* value, LOperand* temp) { 850 LClassOfTestAndBranch(LOperand* value, LOperand* temp) {
799 inputs_[0] = value; 851 inputs_[0] = value;
800 temps_[0] = temp; 852 temps_[0] = temp;
801 } 853 }
802 854
855 LOperand* value() { return inputs_[0]; }
856 LOperand* temp() { return temps_[0]; }
857
803 DECLARE_CONCRETE_INSTRUCTION(ClassOfTestAndBranch, 858 DECLARE_CONCRETE_INSTRUCTION(ClassOfTestAndBranch,
804 "class-of-test-and-branch") 859 "class-of-test-and-branch")
805 DECLARE_HYDROGEN_ACCESSOR(ClassOfTestAndBranch) 860 DECLARE_HYDROGEN_ACCESSOR(ClassOfTestAndBranch)
806 861
807 virtual void PrintDataTo(StringStream* stream); 862 virtual void PrintDataTo(StringStream* stream);
808 }; 863 };
809 864
810 865
811 class LCmpT: public LTemplateInstruction<1, 2, 0> { 866 class LCmpT: public LTemplateInstruction<1, 2, 0> {
812 public: 867 public:
813 LCmpT(LOperand* left, LOperand* right) { 868 LCmpT(LOperand* left, LOperand* right) {
814 inputs_[0] = left; 869 inputs_[0] = left;
815 inputs_[1] = right; 870 inputs_[1] = right;
816 } 871 }
817 872
873 LOperand* left() { return inputs_[0]; }
874 LOperand* right() { return inputs_[1]; }
875
818 DECLARE_CONCRETE_INSTRUCTION(CmpT, "cmp-t") 876 DECLARE_CONCRETE_INSTRUCTION(CmpT, "cmp-t")
819 DECLARE_HYDROGEN_ACCESSOR(CompareGeneric) 877 DECLARE_HYDROGEN_ACCESSOR(CompareGeneric)
820 878
821 Token::Value op() const { return hydrogen()->token(); } 879 Token::Value op() const { return hydrogen()->token(); }
822 }; 880 };
823 881
824 882
825 class LInstanceOf: public LTemplateInstruction<1, 2, 0> { 883 class LInstanceOf: public LTemplateInstruction<1, 2, 0> {
826 public: 884 public:
827 LInstanceOf(LOperand* left, LOperand* right) { 885 LInstanceOf(LOperand* left, LOperand* right) {
828 inputs_[0] = left; 886 inputs_[0] = left;
829 inputs_[1] = right; 887 inputs_[1] = right;
830 } 888 }
831 889
890 LOperand* left() { return inputs_[0]; }
891 LOperand* right() { return inputs_[1]; }
892
832 DECLARE_CONCRETE_INSTRUCTION(InstanceOf, "instance-of") 893 DECLARE_CONCRETE_INSTRUCTION(InstanceOf, "instance-of")
833 }; 894 };
834 895
835 896
836 class LInstanceOfKnownGlobal: public LTemplateInstruction<1, 1, 1> { 897 class LInstanceOfKnownGlobal: public LTemplateInstruction<1, 1, 1> {
837 public: 898 public:
838 LInstanceOfKnownGlobal(LOperand* value, LOperand* temp) { 899 LInstanceOfKnownGlobal(LOperand* value, LOperand* temp) {
839 inputs_[0] = value; 900 inputs_[0] = value;
840 temps_[0] = temp; 901 temps_[0] = temp;
841 } 902 }
842 903
904 LOperand* value() { return inputs_[0]; }
905 LOperand* temp() { return temps_[0]; }
906
843 DECLARE_CONCRETE_INSTRUCTION(InstanceOfKnownGlobal, 907 DECLARE_CONCRETE_INSTRUCTION(InstanceOfKnownGlobal,
844 "instance-of-known-global") 908 "instance-of-known-global")
845 DECLARE_HYDROGEN_ACCESSOR(InstanceOfKnownGlobal) 909 DECLARE_HYDROGEN_ACCESSOR(InstanceOfKnownGlobal)
846 910
847 Handle<JSFunction> function() const { return hydrogen()->function(); } 911 Handle<JSFunction> function() const { return hydrogen()->function(); }
848 LEnvironment* GetDeferredLazyDeoptimizationEnvironment() { 912 LEnvironment* GetDeferredLazyDeoptimizationEnvironment() {
849 return lazy_deopt_env_; 913 return lazy_deopt_env_;
850 } 914 }
851 virtual void SetDeferredLazyDeoptimizationEnvironment(LEnvironment* env) { 915 virtual void SetDeferredLazyDeoptimizationEnvironment(LEnvironment* env) {
852 lazy_deopt_env_ = env; 916 lazy_deopt_env_ = env;
(...skipping 19 matching lines...) Expand all
872 }; 936 };
873 937
874 938
875 class LBitI: public LTemplateInstruction<1, 2, 0> { 939 class LBitI: public LTemplateInstruction<1, 2, 0> {
876 public: 940 public:
877 LBitI(LOperand* left, LOperand* right) { 941 LBitI(LOperand* left, LOperand* right) {
878 inputs_[0] = left; 942 inputs_[0] = left;
879 inputs_[1] = right; 943 inputs_[1] = right;
880 } 944 }
881 945
946 LOperand* left() { return inputs_[0]; }
947 LOperand* right() { return inputs_[1]; }
948
882 Token::Value op() const { return hydrogen()->op(); } 949 Token::Value op() const { return hydrogen()->op(); }
883 950
884 DECLARE_CONCRETE_INSTRUCTION(BitI, "bit-i") 951 DECLARE_CONCRETE_INSTRUCTION(BitI, "bit-i")
885 DECLARE_HYDROGEN_ACCESSOR(Bitwise) 952 DECLARE_HYDROGEN_ACCESSOR(Bitwise)
886 }; 953 };
887 954
888 955
889 class LShiftI: public LTemplateInstruction<1, 2, 0> { 956 class LShiftI: public LTemplateInstruction<1, 2, 0> {
890 public: 957 public:
891 LShiftI(Token::Value op, LOperand* left, LOperand* right, bool can_deopt) 958 LShiftI(Token::Value op, LOperand* left, LOperand* right, bool can_deopt)
892 : op_(op), can_deopt_(can_deopt) { 959 : op_(op), can_deopt_(can_deopt) {
893 inputs_[0] = left; 960 inputs_[0] = left;
894 inputs_[1] = right; 961 inputs_[1] = right;
895 } 962 }
896 963
897 Token::Value op() const { return op_; } 964 Token::Value op() const { return op_; }
898 965 LOperand* left() { return inputs_[0]; }
966 LOperand* right() { return inputs_[1]; }
899 bool can_deopt() const { return can_deopt_; } 967 bool can_deopt() const { return can_deopt_; }
900 968
901 DECLARE_CONCRETE_INSTRUCTION(ShiftI, "shift-i") 969 DECLARE_CONCRETE_INSTRUCTION(ShiftI, "shift-i")
902 970
903 private: 971 private:
904 Token::Value op_; 972 Token::Value op_;
905 bool can_deopt_; 973 bool can_deopt_;
906 }; 974 };
907 975
908 976
909 class LSubI: public LTemplateInstruction<1, 2, 0> { 977 class LSubI: public LTemplateInstruction<1, 2, 0> {
910 public: 978 public:
911 LSubI(LOperand* left, LOperand* right) { 979 LSubI(LOperand* left, LOperand* right) {
912 inputs_[0] = left; 980 inputs_[0] = left;
913 inputs_[1] = right; 981 inputs_[1] = right;
914 } 982 }
915 983
984 LOperand* left() { return inputs_[0]; }
985 LOperand* right() { return inputs_[1]; }
986
916 DECLARE_CONCRETE_INSTRUCTION(SubI, "sub-i") 987 DECLARE_CONCRETE_INSTRUCTION(SubI, "sub-i")
917 DECLARE_HYDROGEN_ACCESSOR(Sub) 988 DECLARE_HYDROGEN_ACCESSOR(Sub)
918 }; 989 };
919 990
920 991
921 class LConstantI: public LTemplateInstruction<1, 0, 0> { 992 class LConstantI: public LTemplateInstruction<1, 0, 0> {
922 public: 993 public:
923 DECLARE_CONCRETE_INSTRUCTION(ConstantI, "constant-i") 994 DECLARE_CONCRETE_INSTRUCTION(ConstantI, "constant-i")
924 DECLARE_HYDROGEN_ACCESSOR(Constant) 995 DECLARE_HYDROGEN_ACCESSOR(Constant)
925 996
(...skipping 18 matching lines...) Expand all
944 Handle<Object> value() const { return hydrogen()->handle(); } 1015 Handle<Object> value() const { return hydrogen()->handle(); }
945 }; 1016 };
946 1017
947 1018
948 class LBranch: public LControlInstruction<1, 0> { 1019 class LBranch: public LControlInstruction<1, 0> {
949 public: 1020 public:
950 explicit LBranch(LOperand* value) { 1021 explicit LBranch(LOperand* value) {
951 inputs_[0] = value; 1022 inputs_[0] = value;
952 } 1023 }
953 1024
1025 LOperand* value() { return inputs_[0]; }
1026
954 DECLARE_CONCRETE_INSTRUCTION(Branch, "branch") 1027 DECLARE_CONCRETE_INSTRUCTION(Branch, "branch")
955 DECLARE_HYDROGEN_ACCESSOR(Branch) 1028 DECLARE_HYDROGEN_ACCESSOR(Branch)
956 1029
957 virtual void PrintDataTo(StringStream* stream); 1030 virtual void PrintDataTo(StringStream* stream);
958 }; 1031 };
959 1032
960 1033
961 class LCmpMapAndBranch: public LTemplateInstruction<0, 1, 1> { 1034 class LCmpMapAndBranch: public LTemplateInstruction<0, 1, 1> {
962 public: 1035 public:
963 LCmpMapAndBranch(LOperand* value, LOperand* temp) { 1036 LCmpMapAndBranch(LOperand* value, LOperand* temp) {
964 inputs_[0] = value; 1037 inputs_[0] = value;
965 temps_[0] = temp; 1038 temps_[0] = temp;
966 } 1039 }
967 1040
1041 LOperand* value() { return inputs_[0]; }
1042 LOperand* temp() { return temps_[0]; }
1043
968 DECLARE_CONCRETE_INSTRUCTION(CmpMapAndBranch, "cmp-map-and-branch") 1044 DECLARE_CONCRETE_INSTRUCTION(CmpMapAndBranch, "cmp-map-and-branch")
969 DECLARE_HYDROGEN_ACCESSOR(CompareMap) 1045 DECLARE_HYDROGEN_ACCESSOR(CompareMap)
970 1046
971 virtual bool IsControl() const { return true; } 1047 virtual bool IsControl() const { return true; }
972 1048
973 Handle<Map> map() const { return hydrogen()->map(); } 1049 Handle<Map> map() const { return hydrogen()->map(); }
974 int true_block_id() const { 1050 int true_block_id() const {
975 return hydrogen()->FirstSuccessor()->block_id(); 1051 return hydrogen()->FirstSuccessor()->block_id();
976 } 1052 }
977 int false_block_id() const { 1053 int false_block_id() const {
978 return hydrogen()->SecondSuccessor()->block_id(); 1054 return hydrogen()->SecondSuccessor()->block_id();
979 } 1055 }
980 }; 1056 };
981 1057
982 1058
983 class LJSArrayLength: public LTemplateInstruction<1, 1, 0> { 1059 class LJSArrayLength: public LTemplateInstruction<1, 1, 0> {
984 public: 1060 public:
985 explicit LJSArrayLength(LOperand* value) { 1061 explicit LJSArrayLength(LOperand* value) {
986 inputs_[0] = value; 1062 inputs_[0] = value;
987 } 1063 }
988 1064
1065 LOperand* value() { return inputs_[0]; }
1066
989 DECLARE_CONCRETE_INSTRUCTION(JSArrayLength, "js-array-length") 1067 DECLARE_CONCRETE_INSTRUCTION(JSArrayLength, "js-array-length")
990 DECLARE_HYDROGEN_ACCESSOR(JSArrayLength) 1068 DECLARE_HYDROGEN_ACCESSOR(JSArrayLength)
991 }; 1069 };
992 1070
993 1071
994 class LFixedArrayBaseLength: public LTemplateInstruction<1, 1, 0> { 1072 class LFixedArrayBaseLength: public LTemplateInstruction<1, 1, 0> {
995 public: 1073 public:
996 explicit LFixedArrayBaseLength(LOperand* value) { 1074 explicit LFixedArrayBaseLength(LOperand* value) {
997 inputs_[0] = value; 1075 inputs_[0] = value;
998 } 1076 }
999 1077
1078 LOperand* value() { return inputs_[0]; }
1079
1000 DECLARE_CONCRETE_INSTRUCTION(FixedArrayBaseLength, 1080 DECLARE_CONCRETE_INSTRUCTION(FixedArrayBaseLength,
1001 "fixed-array-base-length") 1081 "fixed-array-base-length")
1002 DECLARE_HYDROGEN_ACCESSOR(FixedArrayBaseLength) 1082 DECLARE_HYDROGEN_ACCESSOR(FixedArrayBaseLength)
1003 }; 1083 };
1004 1084
1005 1085
1006 class LMapEnumLength: public LTemplateInstruction<1, 1, 0> { 1086 class LMapEnumLength: public LTemplateInstruction<1, 1, 0> {
1007 public: 1087 public:
1008 explicit LMapEnumLength(LOperand* value) { 1088 explicit LMapEnumLength(LOperand* value) {
1009 inputs_[0] = value; 1089 inputs_[0] = value;
1010 } 1090 }
1011 1091
1092 LOperand* value() { return inputs_[0]; }
1093
1012 DECLARE_CONCRETE_INSTRUCTION(MapEnumLength, "map-enum-length") 1094 DECLARE_CONCRETE_INSTRUCTION(MapEnumLength, "map-enum-length")
1013 }; 1095 };
1014 1096
1015 1097
1016 class LElementsKind: public LTemplateInstruction<1, 1, 0> { 1098 class LElementsKind: public LTemplateInstruction<1, 1, 0> {
1017 public: 1099 public:
1018 explicit LElementsKind(LOperand* value) { 1100 explicit LElementsKind(LOperand* value) {
1019 inputs_[0] = value; 1101 inputs_[0] = value;
1020 } 1102 }
1021 1103
1104 LOperand* value() { return inputs_[0]; }
1105
1022 DECLARE_CONCRETE_INSTRUCTION(ElementsKind, "elements-kind") 1106 DECLARE_CONCRETE_INSTRUCTION(ElementsKind, "elements-kind")
1023 DECLARE_HYDROGEN_ACCESSOR(ElementsKind) 1107 DECLARE_HYDROGEN_ACCESSOR(ElementsKind)
1024 }; 1108 };
1025 1109
1026 1110
1027 class LValueOf: public LTemplateInstruction<1, 1, 1> { 1111 class LValueOf: public LTemplateInstruction<1, 1, 1> {
1028 public: 1112 public:
1029 LValueOf(LOperand* value, LOperand* temp) { 1113 LValueOf(LOperand* value, LOperand* temp) {
1030 inputs_[0] = value; 1114 inputs_[0] = value;
1031 temps_[0] = temp; 1115 temps_[0] = temp;
1032 } 1116 }
1033 1117
1118 LOperand* value() { return inputs_[0]; }
1119 LOperand* temp() { return temps_[0]; }
1120
1034 DECLARE_CONCRETE_INSTRUCTION(ValueOf, "value-of") 1121 DECLARE_CONCRETE_INSTRUCTION(ValueOf, "value-of")
1035 DECLARE_HYDROGEN_ACCESSOR(ValueOf) 1122 DECLARE_HYDROGEN_ACCESSOR(ValueOf)
1036 }; 1123 };
1037 1124
1038 1125
1039 class LDateField: public LTemplateInstruction<1, 1, 1> { 1126 class LDateField: public LTemplateInstruction<1, 1, 1> {
1040 public: 1127 public:
1041 LDateField(LOperand* date, LOperand* temp, Smi* index) : index_(index) { 1128 LDateField(LOperand* date, LOperand* temp, Smi* index) : index_(index) {
1042 inputs_[0] = date; 1129 inputs_[0] = date;
1043 temps_[0] = temp; 1130 temps_[0] = temp;
1044 } 1131 }
1045 1132
1133 LOperand* date() { return inputs_[0]; }
1134 LOperand* temp() { return temps_[0]; }
1135 Smi* index() const { return index_; }
1136
1046 DECLARE_CONCRETE_INSTRUCTION(ValueOf, "date-field") 1137 DECLARE_CONCRETE_INSTRUCTION(ValueOf, "date-field")
1047 DECLARE_HYDROGEN_ACCESSOR(ValueOf) 1138 DECLARE_HYDROGEN_ACCESSOR(ValueOf)
1048 Smi* index() const { return index_; }
1049 1139
1050 private: 1140 private:
1051 Smi* index_; 1141 Smi* index_;
1052 }; 1142 };
1053 1143
1054 1144
1055 class LSetDateField: public LTemplateInstruction<1, 2, 1> {
1056 public:
1057 LSetDateField(LOperand* date, LOperand* value, LOperand* temp, int index)
1058 : index_(index) {
1059 inputs_[0] = date;
1060 inputs_[1] = value;
1061 temps_[0] = temp;
1062 }
1063
1064 DECLARE_CONCRETE_INSTRUCTION(DateField, "date-set-field")
1065 DECLARE_HYDROGEN_ACCESSOR(DateField)
1066
1067 int index() const { return index_; }
1068
1069 private:
1070 int index_;
1071 };
1072
1073
1074 class LThrow: public LTemplateInstruction<0, 1, 0> { 1145 class LThrow: public LTemplateInstruction<0, 1, 0> {
1075 public: 1146 public:
1076 explicit LThrow(LOperand* value) { 1147 explicit LThrow(LOperand* value) {
1077 inputs_[0] = value; 1148 inputs_[0] = value;
1078 } 1149 }
1079 1150
1151 LOperand* value() { return inputs_[0]; }
1152
1080 DECLARE_CONCRETE_INSTRUCTION(Throw, "throw") 1153 DECLARE_CONCRETE_INSTRUCTION(Throw, "throw")
1081 }; 1154 };
1082 1155
1083 1156
1084 class LBitNotI: public LTemplateInstruction<1, 1, 0> { 1157 class LBitNotI: public LTemplateInstruction<1, 1, 0> {
1085 public: 1158 public:
1086 explicit LBitNotI(LOperand* value) { 1159 explicit LBitNotI(LOperand* value) {
1087 inputs_[0] = value; 1160 inputs_[0] = value;
1088 } 1161 }
1089 1162
1163 LOperand* value() { return inputs_[0]; }
1164
1090 DECLARE_CONCRETE_INSTRUCTION(BitNotI, "bit-not-i") 1165 DECLARE_CONCRETE_INSTRUCTION(BitNotI, "bit-not-i")
1091 }; 1166 };
1092 1167
1093 1168
1094 class LAddI: public LTemplateInstruction<1, 2, 0> { 1169 class LAddI: public LTemplateInstruction<1, 2, 0> {
1095 public: 1170 public:
1096 LAddI(LOperand* left, LOperand* right) { 1171 LAddI(LOperand* left, LOperand* right) {
1097 inputs_[0] = left; 1172 inputs_[0] = left;
1098 inputs_[1] = right; 1173 inputs_[1] = right;
1099 } 1174 }
1100 1175
1176 LOperand* left() { return inputs_[0]; }
1177 LOperand* right() { return inputs_[1]; }
1178
1101 DECLARE_CONCRETE_INSTRUCTION(AddI, "add-i") 1179 DECLARE_CONCRETE_INSTRUCTION(AddI, "add-i")
1102 DECLARE_HYDROGEN_ACCESSOR(Add) 1180 DECLARE_HYDROGEN_ACCESSOR(Add)
1103 }; 1181 };
1104 1182
1105 1183
1106 class LMathMinMax: public LTemplateInstruction<1, 2, 0> { 1184 class LMathMinMax: public LTemplateInstruction<1, 2, 0> {
1107 public: 1185 public:
1108 LMathMinMax(LOperand* left, LOperand* right) { 1186 LMathMinMax(LOperand* left, LOperand* right) {
1109 inputs_[0] = left; 1187 inputs_[0] = left;
1110 inputs_[1] = right; 1188 inputs_[1] = right;
1111 } 1189 }
1112 1190
1191 LOperand* left() { return inputs_[0]; }
1192 LOperand* right() { return inputs_[1]; }
1193
1113 DECLARE_CONCRETE_INSTRUCTION(MathMinMax, "min-max") 1194 DECLARE_CONCRETE_INSTRUCTION(MathMinMax, "min-max")
1114 DECLARE_HYDROGEN_ACCESSOR(MathMinMax) 1195 DECLARE_HYDROGEN_ACCESSOR(MathMinMax)
1115 }; 1196 };
1116 1197
1117 1198
1118 class LPower: public LTemplateInstruction<1, 2, 0> { 1199 class LPower: public LTemplateInstruction<1, 2, 0> {
1119 public: 1200 public:
1120 LPower(LOperand* left, LOperand* right) { 1201 LPower(LOperand* left, LOperand* right) {
1121 inputs_[0] = left; 1202 inputs_[0] = left;
1122 inputs_[1] = right; 1203 inputs_[1] = right;
1123 } 1204 }
1124 1205
1206 LOperand* left() { return inputs_[0]; }
1207 LOperand* right() { return inputs_[1]; }
1208
1125 DECLARE_CONCRETE_INSTRUCTION(Power, "power") 1209 DECLARE_CONCRETE_INSTRUCTION(Power, "power")
1126 DECLARE_HYDROGEN_ACCESSOR(Power) 1210 DECLARE_HYDROGEN_ACCESSOR(Power)
1127 }; 1211 };
1128 1212
1129 1213
1130 class LRandom: public LTemplateInstruction<1, 1, 0> { 1214 class LRandom: public LTemplateInstruction<1, 1, 0> {
1131 public: 1215 public:
1132 explicit LRandom(LOperand* global_object) { 1216 explicit LRandom(LOperand* global_object) {
1133 inputs_[0] = global_object; 1217 inputs_[0] = global_object;
1134 } 1218 }
1135 1219
1220 LOperand* global_object() { return inputs_[0]; }
1221
1136 DECLARE_CONCRETE_INSTRUCTION(Random, "random") 1222 DECLARE_CONCRETE_INSTRUCTION(Random, "random")
1137 DECLARE_HYDROGEN_ACCESSOR(Random) 1223 DECLARE_HYDROGEN_ACCESSOR(Random)
1138 }; 1224 };
1139 1225
1140 1226
1141 class LArithmeticD: public LTemplateInstruction<1, 2, 0> { 1227 class LArithmeticD: public LTemplateInstruction<1, 2, 0> {
1142 public: 1228 public:
1143 LArithmeticD(Token::Value op, LOperand* left, LOperand* right) 1229 LArithmeticD(Token::Value op, LOperand* left, LOperand* right)
1144 : op_(op) { 1230 : op_(op) {
1145 inputs_[0] = left; 1231 inputs_[0] = left;
1146 inputs_[1] = right; 1232 inputs_[1] = right;
1147 } 1233 }
1148 1234
1149 Token::Value op() const { return op_; } 1235 Token::Value op() const { return op_; }
1236 LOperand* left() { return inputs_[0]; }
1237 LOperand* right() { return inputs_[1]; }
1150 1238
1151 virtual Opcode opcode() const { return LInstruction::kArithmeticD; } 1239 virtual Opcode opcode() const { return LInstruction::kArithmeticD; }
1152 virtual void CompileToNative(LCodeGen* generator); 1240 virtual void CompileToNative(LCodeGen* generator);
1153 virtual const char* Mnemonic() const; 1241 virtual const char* Mnemonic() const;
1154 1242
1155 private: 1243 private:
1156 Token::Value op_; 1244 Token::Value op_;
1157 }; 1245 };
1158 1246
1159 1247
1160 class LArithmeticT: public LTemplateInstruction<1, 2, 0> { 1248 class LArithmeticT: public LTemplateInstruction<1, 2, 0> {
1161 public: 1249 public:
1162 LArithmeticT(Token::Value op, LOperand* left, LOperand* right) 1250 LArithmeticT(Token::Value op, LOperand* left, LOperand* right)
1163 : op_(op) { 1251 : op_(op) {
1164 inputs_[0] = left; 1252 inputs_[0] = left;
1165 inputs_[1] = right; 1253 inputs_[1] = right;
1166 } 1254 }
1167 1255
1256 LOperand* left() { return inputs_[0]; }
1257 LOperand* right() { return inputs_[1]; }
1258 Token::Value op() const { return op_; }
1259
1168 virtual Opcode opcode() const { return LInstruction::kArithmeticT; } 1260 virtual Opcode opcode() const { return LInstruction::kArithmeticT; }
1169 virtual void CompileToNative(LCodeGen* generator); 1261 virtual void CompileToNative(LCodeGen* generator);
1170 virtual const char* Mnemonic() const; 1262 virtual const char* Mnemonic() const;
1171 1263
1172 Token::Value op() const { return op_; }
1173
1174 private: 1264 private:
1175 Token::Value op_; 1265 Token::Value op_;
1176 }; 1266 };
1177 1267
1178 1268
1179 class LReturn: public LTemplateInstruction<0, 1, 0> { 1269 class LReturn: public LTemplateInstruction<0, 1, 0> {
1180 public: 1270 public:
1181 explicit LReturn(LOperand* value) { 1271 explicit LReturn(LOperand* value) {
1182 inputs_[0] = value; 1272 inputs_[0] = value;
1183 } 1273 }
1184 1274
1275 LOperand* value() { return inputs_[0]; }
1276
1185 DECLARE_CONCRETE_INSTRUCTION(Return, "return") 1277 DECLARE_CONCRETE_INSTRUCTION(Return, "return")
1186 }; 1278 };
1187 1279
1188 1280
1189 class LLoadNamedField: public LTemplateInstruction<1, 1, 0> { 1281 class LLoadNamedField: public LTemplateInstruction<1, 1, 0> {
1190 public: 1282 public:
1191 explicit LLoadNamedField(LOperand* object) { 1283 explicit LLoadNamedField(LOperand* object) {
1192 inputs_[0] = object; 1284 inputs_[0] = object;
1193 } 1285 }
1194 1286
1287 LOperand* object() { return inputs_[0]; }
1288
1195 DECLARE_CONCRETE_INSTRUCTION(LoadNamedField, "load-named-field") 1289 DECLARE_CONCRETE_INSTRUCTION(LoadNamedField, "load-named-field")
1196 DECLARE_HYDROGEN_ACCESSOR(LoadNamedField) 1290 DECLARE_HYDROGEN_ACCESSOR(LoadNamedField)
1197 }; 1291 };
1198 1292
1199 1293
1200 class LLoadNamedFieldPolymorphic: public LTemplateInstruction<1, 1, 0> { 1294 class LLoadNamedFieldPolymorphic: public LTemplateInstruction<1, 1, 0> {
1201 public: 1295 public:
1202 explicit LLoadNamedFieldPolymorphic(LOperand* object) { 1296 explicit LLoadNamedFieldPolymorphic(LOperand* object) {
1203 inputs_[0] = object; 1297 inputs_[0] = object;
1204 } 1298 }
1205 1299
1300 LOperand* object() { return inputs_[0]; }
1301
1206 DECLARE_CONCRETE_INSTRUCTION(LoadNamedField, "load-named-field-polymorphic") 1302 DECLARE_CONCRETE_INSTRUCTION(LoadNamedField, "load-named-field-polymorphic")
1207 DECLARE_HYDROGEN_ACCESSOR(LoadNamedFieldPolymorphic) 1303 DECLARE_HYDROGEN_ACCESSOR(LoadNamedFieldPolymorphic)
1208
1209 LOperand* object() { return inputs_[0]; }
1210 }; 1304 };
1211 1305
1212 1306
1213 class LLoadNamedGeneric: public LTemplateInstruction<1, 1, 0> { 1307 class LLoadNamedGeneric: public LTemplateInstruction<1, 1, 0> {
1214 public: 1308 public:
1215 explicit LLoadNamedGeneric(LOperand* object) { 1309 explicit LLoadNamedGeneric(LOperand* object) {
1216 inputs_[0] = object; 1310 inputs_[0] = object;
1217 } 1311 }
1218 1312
1313 LOperand* object() { return inputs_[0]; }
1314
1219 DECLARE_CONCRETE_INSTRUCTION(LoadNamedGeneric, "load-named-generic") 1315 DECLARE_CONCRETE_INSTRUCTION(LoadNamedGeneric, "load-named-generic")
1220 DECLARE_HYDROGEN_ACCESSOR(LoadNamedGeneric) 1316 DECLARE_HYDROGEN_ACCESSOR(LoadNamedGeneric)
1221 1317
1222 LOperand* object() { return inputs_[0]; }
1223 Handle<Object> name() const { return hydrogen()->name(); } 1318 Handle<Object> name() const { return hydrogen()->name(); }
1224 }; 1319 };
1225 1320
1226 1321
1227 class LLoadFunctionPrototype: public LTemplateInstruction<1, 1, 0> { 1322 class LLoadFunctionPrototype: public LTemplateInstruction<1, 1, 0> {
1228 public: 1323 public:
1229 explicit LLoadFunctionPrototype(LOperand* function) { 1324 explicit LLoadFunctionPrototype(LOperand* function) {
1230 inputs_[0] = function; 1325 inputs_[0] = function;
1231 } 1326 }
1232 1327
1328 LOperand* function() { return inputs_[0]; }
1329
1233 DECLARE_CONCRETE_INSTRUCTION(LoadFunctionPrototype, "load-function-prototype") 1330 DECLARE_CONCRETE_INSTRUCTION(LoadFunctionPrototype, "load-function-prototype")
1234 DECLARE_HYDROGEN_ACCESSOR(LoadFunctionPrototype) 1331 DECLARE_HYDROGEN_ACCESSOR(LoadFunctionPrototype)
1235
1236 LOperand* function() { return inputs_[0]; }
1237 }; 1332 };
1238 1333
1239 1334
1240 class LLoadElements: public LTemplateInstruction<1, 1, 0> { 1335 class LLoadElements: public LTemplateInstruction<1, 1, 0> {
1241 public: 1336 public:
1242 explicit LLoadElements(LOperand* object) { 1337 explicit LLoadElements(LOperand* object) {
1243 inputs_[0] = object; 1338 inputs_[0] = object;
1244 } 1339 }
1245 1340
1341 LOperand* object() { return inputs_[0]; }
1342
1246 DECLARE_CONCRETE_INSTRUCTION(LoadElements, "load-elements") 1343 DECLARE_CONCRETE_INSTRUCTION(LoadElements, "load-elements")
1247 }; 1344 };
1248 1345
1249 1346
1250 class LLoadExternalArrayPointer: public LTemplateInstruction<1, 1, 0> { 1347 class LLoadExternalArrayPointer: public LTemplateInstruction<1, 1, 0> {
1251 public: 1348 public:
1252 explicit LLoadExternalArrayPointer(LOperand* object) { 1349 explicit LLoadExternalArrayPointer(LOperand* object) {
1253 inputs_[0] = object; 1350 inputs_[0] = object;
1254 } 1351 }
1255 1352
1353 LOperand* object() { return inputs_[0]; }
1354
1256 DECLARE_CONCRETE_INSTRUCTION(LoadExternalArrayPointer, 1355 DECLARE_CONCRETE_INSTRUCTION(LoadExternalArrayPointer,
1257 "load-external-array-pointer") 1356 "load-external-array-pointer")
1258 }; 1357 };
1259 1358
1260 1359
1261 class LLoadKeyedFastElement: public LTemplateInstruction<1, 2, 0> { 1360 class LLoadKeyedFastElement: public LTemplateInstruction<1, 2, 0> {
1262 public: 1361 public:
1263 LLoadKeyedFastElement(LOperand* elements, LOperand* key) { 1362 LLoadKeyedFastElement(LOperand* elements, LOperand* key) {
1264 inputs_[0] = elements; 1363 inputs_[0] = elements;
1265 inputs_[1] = key; 1364 inputs_[1] = key;
1266 } 1365 }
1267 1366
1367 LOperand* elements() { return inputs_[0]; }
1368 LOperand* key() { return inputs_[1]; }
1369
1268 DECLARE_CONCRETE_INSTRUCTION(LoadKeyedFastElement, "load-keyed-fast-element") 1370 DECLARE_CONCRETE_INSTRUCTION(LoadKeyedFastElement, "load-keyed-fast-element")
1269 DECLARE_HYDROGEN_ACCESSOR(LoadKeyedFastElement) 1371 DECLARE_HYDROGEN_ACCESSOR(LoadKeyedFastElement)
1270 1372
1271 LOperand* elements() { return inputs_[0]; }
1272 LOperand* key() { return inputs_[1]; }
1273 uint32_t additional_index() const { return hydrogen()->index_offset(); } 1373 uint32_t additional_index() const { return hydrogen()->index_offset(); }
1274 }; 1374 };
1275 1375
1276 1376
1277 class LLoadKeyedFastDoubleElement: public LTemplateInstruction<1, 2, 0> { 1377 class LLoadKeyedFastDoubleElement: public LTemplateInstruction<1, 2, 0> {
1278 public: 1378 public:
1279 LLoadKeyedFastDoubleElement(LOperand* elements, LOperand* key) { 1379 LLoadKeyedFastDoubleElement(LOperand* elements, LOperand* key) {
1280 inputs_[0] = elements; 1380 inputs_[0] = elements;
1281 inputs_[1] = key; 1381 inputs_[1] = key;
1282 } 1382 }
1283 1383
1384 LOperand* elements() { return inputs_[0]; }
1385 LOperand* key() { return inputs_[1]; }
1386
1284 DECLARE_CONCRETE_INSTRUCTION(LoadKeyedFastDoubleElement, 1387 DECLARE_CONCRETE_INSTRUCTION(LoadKeyedFastDoubleElement,
1285 "load-keyed-fast-double-element") 1388 "load-keyed-fast-double-element")
1286 DECLARE_HYDROGEN_ACCESSOR(LoadKeyedFastDoubleElement) 1389 DECLARE_HYDROGEN_ACCESSOR(LoadKeyedFastDoubleElement)
1287 1390
1288 LOperand* elements() { return inputs_[0]; }
1289 LOperand* key() { return inputs_[1]; }
1290 uint32_t additional_index() const { return hydrogen()->index_offset(); } 1391 uint32_t additional_index() const { return hydrogen()->index_offset(); }
1291 }; 1392 };
1292 1393
1293 1394
1294 class LLoadKeyedSpecializedArrayElement: public LTemplateInstruction<1, 2, 0> { 1395 class LLoadKeyedSpecializedArrayElement: public LTemplateInstruction<1, 2, 0> {
1295 public: 1396 public:
1296 LLoadKeyedSpecializedArrayElement(LOperand* external_pointer, LOperand* key) { 1397 LLoadKeyedSpecializedArrayElement(LOperand* external_pointer, LOperand* key) {
1297 inputs_[0] = external_pointer; 1398 inputs_[0] = external_pointer;
1298 inputs_[1] = key; 1399 inputs_[1] = key;
1299 } 1400 }
1300 1401
1402 LOperand* external_pointer() { return inputs_[0]; }
1403 LOperand* key() { return inputs_[1]; }
1404
1301 DECLARE_CONCRETE_INSTRUCTION(LoadKeyedSpecializedArrayElement, 1405 DECLARE_CONCRETE_INSTRUCTION(LoadKeyedSpecializedArrayElement,
1302 "load-keyed-specialized-array-element") 1406 "load-keyed-specialized-array-element")
1303 DECLARE_HYDROGEN_ACCESSOR(LoadKeyedSpecializedArrayElement) 1407 DECLARE_HYDROGEN_ACCESSOR(LoadKeyedSpecializedArrayElement)
1304 1408
1305 LOperand* external_pointer() { return inputs_[0]; }
1306 LOperand* key() { return inputs_[1]; }
1307 ElementsKind elements_kind() const { 1409 ElementsKind elements_kind() const {
1308 return hydrogen()->elements_kind(); 1410 return hydrogen()->elements_kind();
1309 } 1411 }
1310 uint32_t additional_index() const { return hydrogen()->index_offset(); } 1412 uint32_t additional_index() const { return hydrogen()->index_offset(); }
1311 }; 1413 };
1312 1414
1313 1415
1314 class LLoadKeyedGeneric: public LTemplateInstruction<1, 2, 0> { 1416 class LLoadKeyedGeneric: public LTemplateInstruction<1, 2, 0> {
1315 public: 1417 public:
1316 LLoadKeyedGeneric(LOperand* obj, LOperand* key) { 1418 LLoadKeyedGeneric(LOperand* object, LOperand* key) {
1317 inputs_[0] = obj; 1419 inputs_[0] = object;
1318 inputs_[1] = key; 1420 inputs_[1] = key;
1319 } 1421 }
1320 1422
1321 DECLARE_CONCRETE_INSTRUCTION(LoadKeyedGeneric, "load-keyed-generic")
1322
1323 LOperand* object() { return inputs_[0]; } 1423 LOperand* object() { return inputs_[0]; }
1324 LOperand* key() { return inputs_[1]; } 1424 LOperand* key() { return inputs_[1]; }
1425
1426 DECLARE_CONCRETE_INSTRUCTION(LoadKeyedGeneric, "load-keyed-generic")
1325 }; 1427 };
1326 1428
1327 1429
1328 class LLoadGlobalCell: public LTemplateInstruction<1, 0, 0> { 1430 class LLoadGlobalCell: public LTemplateInstruction<1, 0, 0> {
1329 public: 1431 public:
1330 DECLARE_CONCRETE_INSTRUCTION(LoadGlobalCell, "load-global-cell") 1432 DECLARE_CONCRETE_INSTRUCTION(LoadGlobalCell, "load-global-cell")
1331 DECLARE_HYDROGEN_ACCESSOR(LoadGlobalCell) 1433 DECLARE_HYDROGEN_ACCESSOR(LoadGlobalCell)
1332 }; 1434 };
1333 1435
1334 1436
1335 class LLoadGlobalGeneric: public LTemplateInstruction<1, 1, 0> { 1437 class LLoadGlobalGeneric: public LTemplateInstruction<1, 1, 0> {
1336 public: 1438 public:
1337 explicit LLoadGlobalGeneric(LOperand* global_object) { 1439 explicit LLoadGlobalGeneric(LOperand* global_object) {
1338 inputs_[0] = global_object; 1440 inputs_[0] = global_object;
1339 } 1441 }
1340 1442
1443 LOperand* global_object() { return inputs_[0]; }
1444
1341 DECLARE_CONCRETE_INSTRUCTION(LoadGlobalGeneric, "load-global-generic") 1445 DECLARE_CONCRETE_INSTRUCTION(LoadGlobalGeneric, "load-global-generic")
1342 DECLARE_HYDROGEN_ACCESSOR(LoadGlobalGeneric) 1446 DECLARE_HYDROGEN_ACCESSOR(LoadGlobalGeneric)
1343 1447
1344 LOperand* global_object() { return inputs_[0]; }
1345 Handle<Object> name() const { return hydrogen()->name(); } 1448 Handle<Object> name() const { return hydrogen()->name(); }
1346 bool for_typeof() const { return hydrogen()->for_typeof(); } 1449 bool for_typeof() const { return hydrogen()->for_typeof(); }
1347 }; 1450 };
1348 1451
1349 1452
1350 class LStoreGlobalCell: public LTemplateInstruction<0, 1, 1> { 1453 class LStoreGlobalCell: public LTemplateInstruction<0, 1, 1> {
1351 public: 1454 public:
1352 LStoreGlobalCell(LOperand* value, LOperand* temp) { 1455 LStoreGlobalCell(LOperand* value, LOperand* temp) {
1353 inputs_[0] = value; 1456 inputs_[0] = value;
1354 temps_[0] = temp; 1457 temps_[0] = temp;
1355 } 1458 }
1356 1459
1460 LOperand* value() { return inputs_[0]; }
1461 LOperand* temp() { return temps_[0]; }
1462
1357 DECLARE_CONCRETE_INSTRUCTION(StoreGlobalCell, "store-global-cell") 1463 DECLARE_CONCRETE_INSTRUCTION(StoreGlobalCell, "store-global-cell")
1358 DECLARE_HYDROGEN_ACCESSOR(StoreGlobalCell) 1464 DECLARE_HYDROGEN_ACCESSOR(StoreGlobalCell)
1359
1360 LOperand* value() { return inputs_[0]; }
1361 }; 1465 };
1362 1466
1363 1467
1364 class LStoreGlobalGeneric: public LTemplateInstruction<0, 2, 0> { 1468 class LStoreGlobalGeneric: public LTemplateInstruction<0, 2, 0> {
1365 public: 1469 public:
1366 explicit LStoreGlobalGeneric(LOperand* global_object, 1470 explicit LStoreGlobalGeneric(LOperand* global_object,
1367 LOperand* value) { 1471 LOperand* value) {
1368 inputs_[0] = global_object; 1472 inputs_[0] = global_object;
1369 inputs_[1] = value; 1473 inputs_[1] = value;
1370 } 1474 }
1371 1475
1476 LOperand* global_object() { return inputs_[0]; }
1477 LOperand* value() { return inputs_[1]; }
1478
1372 DECLARE_CONCRETE_INSTRUCTION(StoreGlobalGeneric, "store-global-generic") 1479 DECLARE_CONCRETE_INSTRUCTION(StoreGlobalGeneric, "store-global-generic")
1373 DECLARE_HYDROGEN_ACCESSOR(StoreGlobalGeneric) 1480 DECLARE_HYDROGEN_ACCESSOR(StoreGlobalGeneric)
1374 1481
1375 LOperand* global_object() { return InputAt(0); }
1376 Handle<Object> name() const { return hydrogen()->name(); } 1482 Handle<Object> name() const { return hydrogen()->name(); }
1377 LOperand* value() { return InputAt(1); }
1378 StrictModeFlag strict_mode_flag() { return hydrogen()->strict_mode_flag(); } 1483 StrictModeFlag strict_mode_flag() { return hydrogen()->strict_mode_flag(); }
1379 }; 1484 };
1380 1485
1381 1486
1382 class LLoadContextSlot: public LTemplateInstruction<1, 1, 0> { 1487 class LLoadContextSlot: public LTemplateInstruction<1, 1, 0> {
1383 public: 1488 public:
1384 explicit LLoadContextSlot(LOperand* context) { 1489 explicit LLoadContextSlot(LOperand* context) {
1385 inputs_[0] = context; 1490 inputs_[0] = context;
1386 } 1491 }
1387 1492
1493 LOperand* context() { return inputs_[0]; }
1494
1388 DECLARE_CONCRETE_INSTRUCTION(LoadContextSlot, "load-context-slot") 1495 DECLARE_CONCRETE_INSTRUCTION(LoadContextSlot, "load-context-slot")
1389 DECLARE_HYDROGEN_ACCESSOR(LoadContextSlot) 1496 DECLARE_HYDROGEN_ACCESSOR(LoadContextSlot)
1390 1497
1391 LOperand* context() { return InputAt(0); }
1392 int slot_index() { return hydrogen()->slot_index(); } 1498 int slot_index() { return hydrogen()->slot_index(); }
1393 1499
1394 virtual void PrintDataTo(StringStream* stream); 1500 virtual void PrintDataTo(StringStream* stream);
1395 }; 1501 };
1396 1502
1397 1503
1398 class LStoreContextSlot: public LTemplateInstruction<0, 2, 0> { 1504 class LStoreContextSlot: public LTemplateInstruction<0, 2, 0> {
1399 public: 1505 public:
1400 LStoreContextSlot(LOperand* context, LOperand* value) { 1506 LStoreContextSlot(LOperand* context, LOperand* value) {
1401 inputs_[0] = context; 1507 inputs_[0] = context;
1402 inputs_[1] = value; 1508 inputs_[1] = value;
1403 } 1509 }
1404 1510
1511 LOperand* context() { return inputs_[0]; }
1512 LOperand* value() { return inputs_[1]; }
1513
1405 DECLARE_CONCRETE_INSTRUCTION(StoreContextSlot, "store-context-slot") 1514 DECLARE_CONCRETE_INSTRUCTION(StoreContextSlot, "store-context-slot")
1406 DECLARE_HYDROGEN_ACCESSOR(StoreContextSlot) 1515 DECLARE_HYDROGEN_ACCESSOR(StoreContextSlot)
1407 1516
1408 LOperand* context() { return InputAt(0); }
1409 LOperand* value() { return InputAt(1); }
1410 int slot_index() { return hydrogen()->slot_index(); } 1517 int slot_index() { return hydrogen()->slot_index(); }
1411 1518
1412 virtual void PrintDataTo(StringStream* stream); 1519 virtual void PrintDataTo(StringStream* stream);
1413 }; 1520 };
1414 1521
1415 1522
1416 class LPushArgument: public LTemplateInstruction<0, 1, 0> { 1523 class LPushArgument: public LTemplateInstruction<0, 1, 0> {
1417 public: 1524 public:
1418 explicit LPushArgument(LOperand* value) { 1525 explicit LPushArgument(LOperand* value) {
1419 inputs_[0] = value; 1526 inputs_[0] = value;
1420 } 1527 }
1421 1528
1529 LOperand* value() { return inputs_[0]; }
1530
1422 DECLARE_CONCRETE_INSTRUCTION(PushArgument, "push-argument") 1531 DECLARE_CONCRETE_INSTRUCTION(PushArgument, "push-argument")
1423 }; 1532 };
1424 1533
1425 1534
1426 class LDrop: public LTemplateInstruction<0, 0, 0> { 1535 class LDrop: public LTemplateInstruction<0, 0, 0> {
1427 public: 1536 public:
1428 explicit LDrop(int count) : count_(count) { } 1537 explicit LDrop(int count) : count_(count) { }
1429 1538
1430 int count() const { return count_; } 1539 int count() const { return count_; }
1431 1540
(...skipping 16 matching lines...) Expand all
1448 DECLARE_CONCRETE_INSTRUCTION(Context, "context") 1557 DECLARE_CONCRETE_INSTRUCTION(Context, "context")
1449 }; 1558 };
1450 1559
1451 1560
1452 class LOuterContext: public LTemplateInstruction<1, 1, 0> { 1561 class LOuterContext: public LTemplateInstruction<1, 1, 0> {
1453 public: 1562 public:
1454 explicit LOuterContext(LOperand* context) { 1563 explicit LOuterContext(LOperand* context) {
1455 inputs_[0] = context; 1564 inputs_[0] = context;
1456 } 1565 }
1457 1566
1567 LOperand* context() { return inputs_[0]; }
1568
1458 DECLARE_CONCRETE_INSTRUCTION(OuterContext, "outer-context") 1569 DECLARE_CONCRETE_INSTRUCTION(OuterContext, "outer-context")
1459
1460 LOperand* context() { return InputAt(0); }
1461 }; 1570 };
1462 1571
1463 1572
1464 class LDeclareGlobals: public LTemplateInstruction<0, 0, 0> { 1573 class LDeclareGlobals: public LTemplateInstruction<0, 0, 0> {
1465 public: 1574 public:
1466 DECLARE_CONCRETE_INSTRUCTION(DeclareGlobals, "declare-globals") 1575 DECLARE_CONCRETE_INSTRUCTION(DeclareGlobals, "declare-globals")
1467 DECLARE_HYDROGEN_ACCESSOR(DeclareGlobals) 1576 DECLARE_HYDROGEN_ACCESSOR(DeclareGlobals)
1468 }; 1577 };
1469 1578
1470 1579
1471 class LGlobalObject: public LTemplateInstruction<1, 1, 0> { 1580 class LGlobalObject: public LTemplateInstruction<1, 1, 0> {
1472 public: 1581 public:
1473 explicit LGlobalObject(LOperand* context) { 1582 explicit LGlobalObject(LOperand* context) {
1474 inputs_[0] = context; 1583 inputs_[0] = context;
1475 } 1584 }
1476 1585
1477 DECLARE_CONCRETE_INSTRUCTION(GlobalObject, "global-object") 1586 DECLARE_CONCRETE_INSTRUCTION(GlobalObject, "global-object")
1478 1587
1479 LOperand* context() { return InputAt(0); } 1588 LOperand* context() { return inputs_[0]; }
1480 }; 1589 };
1481 1590
1482 1591
1483 class LGlobalReceiver: public LTemplateInstruction<1, 1, 0> { 1592 class LGlobalReceiver: public LTemplateInstruction<1, 1, 0> {
1484 public: 1593 public:
1485 explicit LGlobalReceiver(LOperand* global_object) { 1594 explicit LGlobalReceiver(LOperand* global_object) {
1486 inputs_[0] = global_object; 1595 inputs_[0] = global_object;
1487 } 1596 }
1488 1597
1598 LOperand* global_object() { return inputs_[0]; }
1599
1489 DECLARE_CONCRETE_INSTRUCTION(GlobalReceiver, "global-receiver") 1600 DECLARE_CONCRETE_INSTRUCTION(GlobalReceiver, "global-receiver")
1490
1491 LOperand* global() { return InputAt(0); }
1492 }; 1601 };
1493 1602
1494 1603
1495 class LCallConstantFunction: public LTemplateInstruction<1, 0, 0> { 1604 class LCallConstantFunction: public LTemplateInstruction<1, 0, 0> {
1496 public: 1605 public:
1497 DECLARE_CONCRETE_INSTRUCTION(CallConstantFunction, "call-constant-function") 1606 DECLARE_CONCRETE_INSTRUCTION(CallConstantFunction, "call-constant-function")
1498 DECLARE_HYDROGEN_ACCESSOR(CallConstantFunction) 1607 DECLARE_HYDROGEN_ACCESSOR(CallConstantFunction)
1499 1608
1500 virtual void PrintDataTo(StringStream* stream); 1609 virtual void PrintDataTo(StringStream* stream);
1501 1610
1502 Handle<JSFunction> function() { return hydrogen()->function(); } 1611 Handle<JSFunction> function() { return hydrogen()->function(); }
1503 int arity() const { return hydrogen()->argument_count() - 1; } 1612 int arity() const { return hydrogen()->argument_count() - 1; }
1504 }; 1613 };
1505 1614
1506 1615
1507 class LInvokeFunction: public LTemplateInstruction<1, 1, 0> { 1616 class LInvokeFunction: public LTemplateInstruction<1, 1, 0> {
1508 public: 1617 public:
1509 explicit LInvokeFunction(LOperand* function) { 1618 explicit LInvokeFunction(LOperand* function) {
1510 inputs_[0] = function; 1619 inputs_[0] = function;
1511 } 1620 }
1512 1621
1622 LOperand* function() { return inputs_[0]; }
1623
1513 DECLARE_CONCRETE_INSTRUCTION(InvokeFunction, "invoke-function") 1624 DECLARE_CONCRETE_INSTRUCTION(InvokeFunction, "invoke-function")
1514 DECLARE_HYDROGEN_ACCESSOR(InvokeFunction) 1625 DECLARE_HYDROGEN_ACCESSOR(InvokeFunction)
1515 1626
1516 LOperand* function() { return inputs_[0]; }
1517
1518 virtual void PrintDataTo(StringStream* stream); 1627 virtual void PrintDataTo(StringStream* stream);
1519 1628
1520 int arity() const { return hydrogen()->argument_count() - 1; } 1629 int arity() const { return hydrogen()->argument_count() - 1; }
1521 Handle<JSFunction> known_function() { return hydrogen()->known_function(); } 1630 Handle<JSFunction> known_function() { return hydrogen()->known_function(); }
1522 }; 1631 };
1523 1632
1524 1633
1525 class LCallKeyed: public LTemplateInstruction<1, 1, 0> { 1634 class LCallKeyed: public LTemplateInstruction<1, 1, 0> {
1526 public: 1635 public:
1527 explicit LCallKeyed(LOperand* key) { 1636 explicit LCallKeyed(LOperand* key) {
1528 inputs_[0] = key; 1637 inputs_[0] = key;
1529 } 1638 }
1530 1639
1640 LOperand* key() { return inputs_[0]; }
1641
1531 DECLARE_CONCRETE_INSTRUCTION(CallKeyed, "call-keyed") 1642 DECLARE_CONCRETE_INSTRUCTION(CallKeyed, "call-keyed")
1532 DECLARE_HYDROGEN_ACCESSOR(CallKeyed) 1643 DECLARE_HYDROGEN_ACCESSOR(CallKeyed)
1533 1644
1534 virtual void PrintDataTo(StringStream* stream); 1645 virtual void PrintDataTo(StringStream* stream);
1535 1646
1536 int arity() const { return hydrogen()->argument_count() - 1; } 1647 int arity() const { return hydrogen()->argument_count() - 1; }
1537 }; 1648 };
1538 1649
1539 1650
1540 1651
1541 class LCallNamed: public LTemplateInstruction<1, 0, 0> { 1652 class LCallNamed: public LTemplateInstruction<1, 0, 0> {
1542 public: 1653 public:
1543 DECLARE_CONCRETE_INSTRUCTION(CallNamed, "call-named") 1654 DECLARE_CONCRETE_INSTRUCTION(CallNamed, "call-named")
1544 DECLARE_HYDROGEN_ACCESSOR(CallNamed) 1655 DECLARE_HYDROGEN_ACCESSOR(CallNamed)
1545 1656
1546 virtual void PrintDataTo(StringStream* stream); 1657 virtual void PrintDataTo(StringStream* stream);
1547 1658
1548 Handle<String> name() const { return hydrogen()->name(); } 1659 Handle<String> name() const { return hydrogen()->name(); }
1549 int arity() const { return hydrogen()->argument_count() - 1; } 1660 int arity() const { return hydrogen()->argument_count() - 1; }
1550 }; 1661 };
1551 1662
1552 1663
1553 class LCallFunction: public LTemplateInstruction<1, 1, 0> { 1664 class LCallFunction: public LTemplateInstruction<1, 1, 0> {
1554 public: 1665 public:
1555 explicit LCallFunction(LOperand* function) { 1666 explicit LCallFunction(LOperand* function) {
1556 inputs_[0] = function; 1667 inputs_[0] = function;
1557 } 1668 }
1558 1669
1670 LOperand* function() { return inputs_[0]; }
1671
1559 DECLARE_CONCRETE_INSTRUCTION(CallFunction, "call-function") 1672 DECLARE_CONCRETE_INSTRUCTION(CallFunction, "call-function")
1560 DECLARE_HYDROGEN_ACCESSOR(CallFunction) 1673 DECLARE_HYDROGEN_ACCESSOR(CallFunction)
1561 1674
1562 LOperand* function() { return inputs_[0]; }
1563 int arity() const { return hydrogen()->argument_count() - 1; } 1675 int arity() const { return hydrogen()->argument_count() - 1; }
1564 }; 1676 };
1565 1677
1566 1678
1567 class LCallGlobal: public LTemplateInstruction<1, 0, 0> { 1679 class LCallGlobal: public LTemplateInstruction<1, 0, 0> {
1568 public: 1680 public:
1569 DECLARE_CONCRETE_INSTRUCTION(CallGlobal, "call-global") 1681 DECLARE_CONCRETE_INSTRUCTION(CallGlobal, "call-global")
1570 DECLARE_HYDROGEN_ACCESSOR(CallGlobal) 1682 DECLARE_HYDROGEN_ACCESSOR(CallGlobal)
1571 1683
1572 virtual void PrintDataTo(StringStream* stream); 1684 virtual void PrintDataTo(StringStream* stream);
(...skipping 14 matching lines...) Expand all
1587 int arity() const { return hydrogen()->argument_count() - 1; } 1699 int arity() const { return hydrogen()->argument_count() - 1; }
1588 }; 1700 };
1589 1701
1590 1702
1591 class LCallNew: public LTemplateInstruction<1, 1, 0> { 1703 class LCallNew: public LTemplateInstruction<1, 1, 0> {
1592 public: 1704 public:
1593 explicit LCallNew(LOperand* constructor) { 1705 explicit LCallNew(LOperand* constructor) {
1594 inputs_[0] = constructor; 1706 inputs_[0] = constructor;
1595 } 1707 }
1596 1708
1709 LOperand* constructor() { return inputs_[0]; }
1710
1597 DECLARE_CONCRETE_INSTRUCTION(CallNew, "call-new") 1711 DECLARE_CONCRETE_INSTRUCTION(CallNew, "call-new")
1598 DECLARE_HYDROGEN_ACCESSOR(CallNew) 1712 DECLARE_HYDROGEN_ACCESSOR(CallNew)
1599 1713
1600 virtual void PrintDataTo(StringStream* stream); 1714 virtual void PrintDataTo(StringStream* stream);
1601 1715
1602 int arity() const { return hydrogen()->argument_count() - 1; } 1716 int arity() const { return hydrogen()->argument_count() - 1; }
1603 }; 1717 };
1604 1718
1605 1719
1606 class LCallRuntime: public LTemplateInstruction<1, 0, 0> { 1720 class LCallRuntime: public LTemplateInstruction<1, 0, 0> {
1607 public: 1721 public:
1608 DECLARE_CONCRETE_INSTRUCTION(CallRuntime, "call-runtime") 1722 DECLARE_CONCRETE_INSTRUCTION(CallRuntime, "call-runtime")
1609 DECLARE_HYDROGEN_ACCESSOR(CallRuntime) 1723 DECLARE_HYDROGEN_ACCESSOR(CallRuntime)
1610 1724
1611 const Runtime::Function* function() const { return hydrogen()->function(); } 1725 const Runtime::Function* function() const { return hydrogen()->function(); }
1612 int arity() const { return hydrogen()->argument_count(); } 1726 int arity() const { return hydrogen()->argument_count(); }
1613 }; 1727 };
1614 1728
1615 1729
1616 class LInteger32ToDouble: public LTemplateInstruction<1, 1, 0> { 1730 class LInteger32ToDouble: public LTemplateInstruction<1, 1, 0> {
1617 public: 1731 public:
1618 explicit LInteger32ToDouble(LOperand* value) { 1732 explicit LInteger32ToDouble(LOperand* value) {
1619 inputs_[0] = value; 1733 inputs_[0] = value;
1620 } 1734 }
1621 1735
1736 LOperand* value() { return inputs_[0]; }
1737
1622 DECLARE_CONCRETE_INSTRUCTION(Integer32ToDouble, "int32-to-double") 1738 DECLARE_CONCRETE_INSTRUCTION(Integer32ToDouble, "int32-to-double")
1623 }; 1739 };
1624 1740
1625 1741
1626 class LUint32ToDouble: public LTemplateInstruction<1, 1, 0> { 1742 class LUint32ToDouble: public LTemplateInstruction<1, 1, 0> {
1627 public: 1743 public:
1628 explicit LUint32ToDouble(LOperand* value) { 1744 explicit LUint32ToDouble(LOperand* value) {
1629 inputs_[0] = value; 1745 inputs_[0] = value;
1630 } 1746 }
1631 1747
1748 LOperand* value() { return inputs_[0]; }
1749
1632 DECLARE_CONCRETE_INSTRUCTION(Uint32ToDouble, "uint32-to-double") 1750 DECLARE_CONCRETE_INSTRUCTION(Uint32ToDouble, "uint32-to-double")
1633 }; 1751 };
1634 1752
1635 1753
1636 class LNumberTagI: public LTemplateInstruction<1, 1, 0> { 1754 class LNumberTagI: public LTemplateInstruction<1, 1, 0> {
1637 public: 1755 public:
1638 explicit LNumberTagI(LOperand* value) { 1756 explicit LNumberTagI(LOperand* value) {
1639 inputs_[0] = value; 1757 inputs_[0] = value;
1640 } 1758 }
1641 1759
1760 LOperand* value() { return inputs_[0]; }
1761
1642 DECLARE_CONCRETE_INSTRUCTION(NumberTagI, "number-tag-i") 1762 DECLARE_CONCRETE_INSTRUCTION(NumberTagI, "number-tag-i")
1643 }; 1763 };
1644 1764
1645 1765
1646 class LNumberTagU: public LTemplateInstruction<1, 1, 0> { 1766 class LNumberTagU: public LTemplateInstruction<1, 1, 0> {
1647 public: 1767 public:
1648 explicit LNumberTagU(LOperand* value) { 1768 explicit LNumberTagU(LOperand* value) {
1649 inputs_[0] = value; 1769 inputs_[0] = value;
1650 } 1770 }
1651 1771
1772 LOperand* value() { return inputs_[0]; }
1773
1652 DECLARE_CONCRETE_INSTRUCTION(NumberTagU, "number-tag-u") 1774 DECLARE_CONCRETE_INSTRUCTION(NumberTagU, "number-tag-u")
1653 }; 1775 };
1654 1776
1655 1777
1656 class LNumberTagD: public LTemplateInstruction<1, 1, 2> { 1778 class LNumberTagD: public LTemplateInstruction<1, 1, 2> {
1657 public: 1779 public:
1658 LNumberTagD(LOperand* value, LOperand* temp1, LOperand* temp2) { 1780 LNumberTagD(LOperand* value, LOperand* temp, LOperand* temp2) {
1659 inputs_[0] = value; 1781 inputs_[0] = value;
1660 temps_[0] = temp1; 1782 temps_[0] = temp;
1661 temps_[1] = temp2; 1783 temps_[1] = temp2;
1662 } 1784 }
1663 1785
1786 LOperand* value() { return inputs_[0]; }
1787 LOperand* temp() { return temps_[0]; }
1788 LOperand* temp2() { return temps_[1]; }
1789
1664 DECLARE_CONCRETE_INSTRUCTION(NumberTagD, "number-tag-d") 1790 DECLARE_CONCRETE_INSTRUCTION(NumberTagD, "number-tag-d")
1665 }; 1791 };
1666 1792
1667 1793
1668 // Sometimes truncating conversion from a tagged value to an int32. 1794 // Sometimes truncating conversion from a tagged value to an int32.
1669 class LDoubleToI: public LTemplateInstruction<1, 1, 2> { 1795 class LDoubleToI: public LTemplateInstruction<1, 1, 2> {
1670 public: 1796 public:
1671 LDoubleToI(LOperand* value, LOperand* temp1, LOperand* temp2) { 1797 LDoubleToI(LOperand* value, LOperand* temp, LOperand* temp2) {
1672 inputs_[0] = value; 1798 inputs_[0] = value;
1673 temps_[0] = temp1; 1799 temps_[0] = temp;
1674 temps_[1] = temp2; 1800 temps_[1] = temp2;
1675 } 1801 }
1676 1802
1803 LOperand* value() { return inputs_[0]; }
1804 LOperand* temp() { return temps_[0]; }
1805 LOperand* temp2() { return temps_[1]; }
1806
1677 DECLARE_CONCRETE_INSTRUCTION(DoubleToI, "double-to-i") 1807 DECLARE_CONCRETE_INSTRUCTION(DoubleToI, "double-to-i")
1678 DECLARE_HYDROGEN_ACCESSOR(UnaryOperation) 1808 DECLARE_HYDROGEN_ACCESSOR(UnaryOperation)
1679 1809
1680 bool truncating() { return hydrogen()->CanTruncateToInt32(); } 1810 bool truncating() { return hydrogen()->CanTruncateToInt32(); }
1681 }; 1811 };
1682 1812
1683 1813
1684 // Truncating conversion from a tagged value to an int32. 1814 // Truncating conversion from a tagged value to an int32.
1685 class LTaggedToI: public LTemplateInstruction<1, 1, 3> { 1815 class LTaggedToI: public LTemplateInstruction<1, 1, 3> {
1686 public: 1816 public:
1687 LTaggedToI(LOperand* value, 1817 LTaggedToI(LOperand* value,
1688 LOperand* temp1, 1818 LOperand* temp,
1689 LOperand* temp2, 1819 LOperand* temp2,
1690 LOperand* temp3) { 1820 LOperand* temp3) {
1691 inputs_[0] = value; 1821 inputs_[0] = value;
1692 temps_[0] = temp1; 1822 temps_[0] = temp;
1693 temps_[1] = temp2; 1823 temps_[1] = temp2;
1694 temps_[2] = temp3; 1824 temps_[2] = temp3;
1695 } 1825 }
1696 1826
1827 LOperand* value() { return inputs_[0]; }
1828 LOperand* temp() { return temps_[0]; }
1829 LOperand* temp2() { return temps_[1]; }
1830 LOperand* temp3() { return temps_[2]; }
1831
1697 DECLARE_CONCRETE_INSTRUCTION(TaggedToI, "tagged-to-i") 1832 DECLARE_CONCRETE_INSTRUCTION(TaggedToI, "tagged-to-i")
1698 DECLARE_HYDROGEN_ACCESSOR(UnaryOperation) 1833 DECLARE_HYDROGEN_ACCESSOR(UnaryOperation)
1699 1834
1700 bool truncating() { return hydrogen()->CanTruncateToInt32(); } 1835 bool truncating() { return hydrogen()->CanTruncateToInt32(); }
1701 }; 1836 };
1702 1837
1703 1838
1704 class LSmiTag: public LTemplateInstruction<1, 1, 0> { 1839 class LSmiTag: public LTemplateInstruction<1, 1, 0> {
1705 public: 1840 public:
1706 explicit LSmiTag(LOperand* value) { 1841 explicit LSmiTag(LOperand* value) {
1707 inputs_[0] = value; 1842 inputs_[0] = value;
1708 } 1843 }
1709 1844
1845 LOperand* value() { return inputs_[0]; }
1846
1710 DECLARE_CONCRETE_INSTRUCTION(SmiTag, "smi-tag") 1847 DECLARE_CONCRETE_INSTRUCTION(SmiTag, "smi-tag")
1711 }; 1848 };
1712 1849
1713 1850
1714 class LNumberUntagD: public LTemplateInstruction<1, 1, 0> { 1851 class LNumberUntagD: public LTemplateInstruction<1, 1, 0> {
1715 public: 1852 public:
1716 explicit LNumberUntagD(LOperand* value) { 1853 explicit LNumberUntagD(LOperand* value) {
1717 inputs_[0] = value; 1854 inputs_[0] = value;
1718 } 1855 }
1719 1856
1857 LOperand* value() { return inputs_[0]; }
1858
1720 DECLARE_CONCRETE_INSTRUCTION(NumberUntagD, "double-untag") 1859 DECLARE_CONCRETE_INSTRUCTION(NumberUntagD, "double-untag")
1721 DECLARE_HYDROGEN_ACCESSOR(Change) 1860 DECLARE_HYDROGEN_ACCESSOR(Change)
1722 }; 1861 };
1723 1862
1724 1863
1725 class LSmiUntag: public LTemplateInstruction<1, 1, 0> { 1864 class LSmiUntag: public LTemplateInstruction<1, 1, 0> {
1726 public: 1865 public:
1727 LSmiUntag(LOperand* value, bool needs_check) 1866 LSmiUntag(LOperand* value, bool needs_check)
1728 : needs_check_(needs_check) { 1867 : needs_check_(needs_check) {
1729 inputs_[0] = value; 1868 inputs_[0] = value;
1730 } 1869 }
1731 1870
1871 LOperand* value() { return inputs_[0]; }
1872 bool needs_check() const { return needs_check_; }
1873
1732 DECLARE_CONCRETE_INSTRUCTION(SmiUntag, "smi-untag") 1874 DECLARE_CONCRETE_INSTRUCTION(SmiUntag, "smi-untag")
1733 1875
1734 bool needs_check() const { return needs_check_; }
1735
1736 private: 1876 private:
1737 bool needs_check_; 1877 bool needs_check_;
1738 }; 1878 };
1739 1879
1740 1880
1741 class LStoreNamedField: public LTemplateInstruction<0, 2, 1> { 1881 class LStoreNamedField: public LTemplateInstruction<0, 2, 1> {
1742 public: 1882 public:
1743 LStoreNamedField(LOperand* obj, LOperand* val, LOperand* temp) { 1883 LStoreNamedField(LOperand* object, LOperand* value, LOperand* temp) {
1744 inputs_[0] = obj; 1884 inputs_[0] = object;
1745 inputs_[1] = val; 1885 inputs_[1] = value;
1746 temps_[0] = temp; 1886 temps_[0] = temp;
1747 } 1887 }
1748 1888
1889 LOperand* object() { return inputs_[0]; }
1890 LOperand* value() { return inputs_[1]; }
1891 LOperand* temp() { return temps_[0]; }
1892
1749 DECLARE_CONCRETE_INSTRUCTION(StoreNamedField, "store-named-field") 1893 DECLARE_CONCRETE_INSTRUCTION(StoreNamedField, "store-named-field")
1750 DECLARE_HYDROGEN_ACCESSOR(StoreNamedField) 1894 DECLARE_HYDROGEN_ACCESSOR(StoreNamedField)
1751 1895
1752 virtual void PrintDataTo(StringStream* stream); 1896 virtual void PrintDataTo(StringStream* stream);
1753 1897
1754 LOperand* object() { return inputs_[0]; }
1755 LOperand* value() { return inputs_[1]; }
1756
1757 Handle<Object> name() const { return hydrogen()->name(); } 1898 Handle<Object> name() const { return hydrogen()->name(); }
1758 bool is_in_object() { return hydrogen()->is_in_object(); } 1899 bool is_in_object() { return hydrogen()->is_in_object(); }
1759 int offset() { return hydrogen()->offset(); } 1900 int offset() { return hydrogen()->offset(); }
1760 Handle<Map> transition() const { return hydrogen()->transition(); } 1901 Handle<Map> transition() const { return hydrogen()->transition(); }
1761 }; 1902 };
1762 1903
1763 1904
1764 class LStoreNamedGeneric: public LTemplateInstruction<0, 2, 0> { 1905 class LStoreNamedGeneric: public LTemplateInstruction<0, 2, 0> {
1765 public: 1906 public:
1766 LStoreNamedGeneric(LOperand* obj, LOperand* val) { 1907 LStoreNamedGeneric(LOperand* object, LOperand* value) {
1767 inputs_[0] = obj; 1908 inputs_[0] = object;
1768 inputs_[1] = val; 1909 inputs_[1] = value;
1769 } 1910 }
1770 1911
1912 LOperand* object() { return inputs_[0]; }
1913 LOperand* value() { return inputs_[1]; }
1914
1771 DECLARE_CONCRETE_INSTRUCTION(StoreNamedGeneric, "store-named-generic") 1915 DECLARE_CONCRETE_INSTRUCTION(StoreNamedGeneric, "store-named-generic")
1772 DECLARE_HYDROGEN_ACCESSOR(StoreNamedGeneric) 1916 DECLARE_HYDROGEN_ACCESSOR(StoreNamedGeneric)
1773 1917
1774 virtual void PrintDataTo(StringStream* stream); 1918 virtual void PrintDataTo(StringStream* stream);
1775 1919
1776 LOperand* object() { return inputs_[0]; }
1777 LOperand* value() { return inputs_[1]; }
1778 Handle<Object> name() const { return hydrogen()->name(); } 1920 Handle<Object> name() const { return hydrogen()->name(); }
1779 StrictModeFlag strict_mode_flag() { return hydrogen()->strict_mode_flag(); } 1921 StrictModeFlag strict_mode_flag() { return hydrogen()->strict_mode_flag(); }
1780 }; 1922 };
1781 1923
1782 1924
1783 class LStoreKeyedFastElement: public LTemplateInstruction<0, 3, 0> { 1925 class LStoreKeyedFastElement: public LTemplateInstruction<0, 3, 0> {
1784 public: 1926 public:
1785 LStoreKeyedFastElement(LOperand* obj, LOperand* key, LOperand* val) { 1927 LStoreKeyedFastElement(LOperand* object, LOperand* key, LOperand* value) {
1786 inputs_[0] = obj; 1928 inputs_[0] = object;
1787 inputs_[1] = key; 1929 inputs_[1] = key;
1788 inputs_[2] = val; 1930 inputs_[2] = value;
1789 } 1931 }
1790 1932
1933 LOperand* object() { return inputs_[0]; }
1934 LOperand* key() { return inputs_[1]; }
1935 LOperand* value() { return inputs_[2]; }
1936
1791 DECLARE_CONCRETE_INSTRUCTION(StoreKeyedFastElement, 1937 DECLARE_CONCRETE_INSTRUCTION(StoreKeyedFastElement,
1792 "store-keyed-fast-element") 1938 "store-keyed-fast-element")
1793 DECLARE_HYDROGEN_ACCESSOR(StoreKeyedFastElement) 1939 DECLARE_HYDROGEN_ACCESSOR(StoreKeyedFastElement)
1794 1940
1795 virtual void PrintDataTo(StringStream* stream); 1941 virtual void PrintDataTo(StringStream* stream);
1796 1942
1797 LOperand* object() { return inputs_[0]; }
1798 LOperand* key() { return inputs_[1]; }
1799 LOperand* value() { return inputs_[2]; }
1800 uint32_t additional_index() const { return hydrogen()->index_offset(); } 1943 uint32_t additional_index() const { return hydrogen()->index_offset(); }
1801 }; 1944 };
1802 1945
1803 1946
1804 class LStoreKeyedFastDoubleElement: public LTemplateInstruction<0, 3, 0> { 1947 class LStoreKeyedFastDoubleElement: public LTemplateInstruction<0, 3, 0> {
1805 public: 1948 public:
1806 LStoreKeyedFastDoubleElement(LOperand* elements, 1949 LStoreKeyedFastDoubleElement(LOperand* elements,
1807 LOperand* key, 1950 LOperand* key,
1808 LOperand* val) { 1951 LOperand* value) {
1809 inputs_[0] = elements; 1952 inputs_[0] = elements;
1810 inputs_[1] = key; 1953 inputs_[1] = key;
1811 inputs_[2] = val; 1954 inputs_[2] = value;
1812 } 1955 }
1813 1956
1957 LOperand* elements() { return inputs_[0]; }
1958 LOperand* key() { return inputs_[1]; }
1959 LOperand* value() { return inputs_[2]; }
1960
1814 DECLARE_CONCRETE_INSTRUCTION(StoreKeyedFastDoubleElement, 1961 DECLARE_CONCRETE_INSTRUCTION(StoreKeyedFastDoubleElement,
1815 "store-keyed-fast-double-element") 1962 "store-keyed-fast-double-element")
1816 DECLARE_HYDROGEN_ACCESSOR(StoreKeyedFastDoubleElement) 1963 DECLARE_HYDROGEN_ACCESSOR(StoreKeyedFastDoubleElement)
1817 1964
1818 virtual void PrintDataTo(StringStream* stream); 1965 virtual void PrintDataTo(StringStream* stream);
1819 1966
1820 LOperand* elements() { return inputs_[0]; }
1821 LOperand* key() { return inputs_[1]; }
1822 LOperand* value() { return inputs_[2]; }
1823 uint32_t additional_index() const { return hydrogen()->index_offset(); } 1967 uint32_t additional_index() const { return hydrogen()->index_offset(); }
1824 1968
1825 bool NeedsCanonicalization() { return hydrogen()->NeedsCanonicalization(); } 1969 bool NeedsCanonicalization() { return hydrogen()->NeedsCanonicalization(); }
1826 }; 1970 };
1827 1971
1828 1972
1829 class LStoreKeyedGeneric: public LTemplateInstruction<0, 3, 0> { 1973 class LStoreKeyedGeneric: public LTemplateInstruction<0, 3, 0> {
1830 public: 1974 public:
1831 LStoreKeyedGeneric(LOperand* obj, LOperand* key, LOperand* val) { 1975 LStoreKeyedGeneric(LOperand* obj, LOperand* key, LOperand* value) {
1832 inputs_[0] = obj; 1976 inputs_[0] = obj;
1833 inputs_[1] = key; 1977 inputs_[1] = key;
1834 inputs_[2] = val; 1978 inputs_[2] = value;
1835 } 1979 }
1836 1980
1981 LOperand* object() { return inputs_[0]; }
1982 LOperand* key() { return inputs_[1]; }
1983 LOperand* value() { return inputs_[2]; }
1984
1837 DECLARE_CONCRETE_INSTRUCTION(StoreKeyedGeneric, "store-keyed-generic") 1985 DECLARE_CONCRETE_INSTRUCTION(StoreKeyedGeneric, "store-keyed-generic")
1838 DECLARE_HYDROGEN_ACCESSOR(StoreKeyedGeneric) 1986 DECLARE_HYDROGEN_ACCESSOR(StoreKeyedGeneric)
1839 1987
1840 virtual void PrintDataTo(StringStream* stream); 1988 virtual void PrintDataTo(StringStream* stream);
1841 1989
1842 LOperand* object() { return inputs_[0]; }
1843 LOperand* key() { return inputs_[1]; }
1844 LOperand* value() { return inputs_[2]; }
1845 StrictModeFlag strict_mode_flag() { return hydrogen()->strict_mode_flag(); } 1990 StrictModeFlag strict_mode_flag() { return hydrogen()->strict_mode_flag(); }
1846 }; 1991 };
1847 1992
1848 class LStoreKeyedSpecializedArrayElement: public LTemplateInstruction<0, 3, 0> { 1993 class LStoreKeyedSpecializedArrayElement: public LTemplateInstruction<0, 3, 0> {
1849 public: 1994 public:
1850 LStoreKeyedSpecializedArrayElement(LOperand* external_pointer, 1995 LStoreKeyedSpecializedArrayElement(LOperand* external_pointer,
1851 LOperand* key, 1996 LOperand* key,
1852 LOperand* val) { 1997 LOperand* value) {
1853 inputs_[0] = external_pointer; 1998 inputs_[0] = external_pointer;
1854 inputs_[1] = key; 1999 inputs_[1] = key;
1855 inputs_[2] = val; 2000 inputs_[2] = value;
1856 } 2001 }
1857 2002
2003 LOperand* external_pointer() { return inputs_[0]; }
2004 LOperand* key() { return inputs_[1]; }
2005 LOperand* value() { return inputs_[2]; }
2006
1858 DECLARE_CONCRETE_INSTRUCTION(StoreKeyedSpecializedArrayElement, 2007 DECLARE_CONCRETE_INSTRUCTION(StoreKeyedSpecializedArrayElement,
1859 "store-keyed-specialized-array-element") 2008 "store-keyed-specialized-array-element")
1860 DECLARE_HYDROGEN_ACCESSOR(StoreKeyedSpecializedArrayElement) 2009 DECLARE_HYDROGEN_ACCESSOR(StoreKeyedSpecializedArrayElement)
1861 2010
1862 LOperand* external_pointer() { return inputs_[0]; } 2011 ElementsKind elements_kind() const { return hydrogen()->elements_kind(); }
1863 LOperand* key() { return inputs_[1]; }
1864 LOperand* value() { return inputs_[2]; }
1865 ElementsKind elements_kind() const {
1866 return hydrogen()->elements_kind();
1867 }
1868 uint32_t additional_index() const { return hydrogen()->index_offset(); } 2012 uint32_t additional_index() const { return hydrogen()->index_offset(); }
1869 }; 2013 };
1870 2014
1871 2015
1872 class LTransitionElementsKind: public LTemplateInstruction<1, 1, 2> { 2016 class LTransitionElementsKind: public LTemplateInstruction<1, 1, 2> {
1873 public: 2017 public:
1874 LTransitionElementsKind(LOperand* object, 2018 LTransitionElementsKind(LOperand* object,
1875 LOperand* new_map_temp, 2019 LOperand* new_map_temp,
1876 LOperand* temp_reg) { 2020 LOperand* temp) {
1877 inputs_[0] = object; 2021 inputs_[0] = object;
1878 temps_[0] = new_map_temp; 2022 temps_[0] = new_map_temp;
1879 temps_[1] = temp_reg; 2023 temps_[1] = temp;
1880 } 2024 }
1881 2025
2026 LOperand* object() { return inputs_[0]; }
2027 LOperand* new_map_temp() { return temps_[0]; }
2028 LOperand* temp() { return temps_[1]; }
2029
1882 DECLARE_CONCRETE_INSTRUCTION(TransitionElementsKind, 2030 DECLARE_CONCRETE_INSTRUCTION(TransitionElementsKind,
1883 "transition-elements-kind") 2031 "transition-elements-kind")
1884 DECLARE_HYDROGEN_ACCESSOR(TransitionElementsKind) 2032 DECLARE_HYDROGEN_ACCESSOR(TransitionElementsKind)
1885 2033
1886 virtual void PrintDataTo(StringStream* stream); 2034 virtual void PrintDataTo(StringStream* stream);
1887 2035
1888 LOperand* object() { return inputs_[0]; }
1889 LOperand* new_map_reg() { return temps_[0]; }
1890 LOperand* temp_reg() { return temps_[1]; }
1891 Handle<Map> original_map() { return hydrogen()->original_map(); } 2036 Handle<Map> original_map() { return hydrogen()->original_map(); }
1892 Handle<Map> transitioned_map() { return hydrogen()->transitioned_map(); } 2037 Handle<Map> transitioned_map() { return hydrogen()->transitioned_map(); }
1893 }; 2038 };
1894 2039
1895 2040
1896 class LStringAdd: public LTemplateInstruction<1, 2, 0> { 2041 class LStringAdd: public LTemplateInstruction<1, 2, 0> {
1897 public: 2042 public:
1898 LStringAdd(LOperand* left, LOperand* right) { 2043 LStringAdd(LOperand* left, LOperand* right) {
1899 inputs_[0] = left; 2044 inputs_[0] = left;
1900 inputs_[1] = right; 2045 inputs_[1] = right;
1901 } 2046 }
1902 2047
2048 LOperand* left() { return inputs_[0]; }
2049 LOperand* right() { return inputs_[1]; }
2050
1903 DECLARE_CONCRETE_INSTRUCTION(StringAdd, "string-add") 2051 DECLARE_CONCRETE_INSTRUCTION(StringAdd, "string-add")
1904 DECLARE_HYDROGEN_ACCESSOR(StringAdd) 2052 DECLARE_HYDROGEN_ACCESSOR(StringAdd)
1905
1906 LOperand* left() { return inputs_[0]; }
1907 LOperand* right() { return inputs_[1]; }
1908 }; 2053 };
1909 2054
1910 2055
1911 2056
1912 class LStringCharCodeAt: public LTemplateInstruction<1, 2, 0> { 2057 class LStringCharCodeAt: public LTemplateInstruction<1, 2, 0> {
1913 public: 2058 public:
1914 LStringCharCodeAt(LOperand* string, LOperand* index) { 2059 LStringCharCodeAt(LOperand* string, LOperand* index) {
1915 inputs_[0] = string; 2060 inputs_[0] = string;
1916 inputs_[1] = index; 2061 inputs_[1] = index;
1917 } 2062 }
1918 2063
2064 LOperand* string() { return inputs_[0]; }
2065 LOperand* index() { return inputs_[1]; }
2066
1919 DECLARE_CONCRETE_INSTRUCTION(StringCharCodeAt, "string-char-code-at") 2067 DECLARE_CONCRETE_INSTRUCTION(StringCharCodeAt, "string-char-code-at")
1920 DECLARE_HYDROGEN_ACCESSOR(StringCharCodeAt) 2068 DECLARE_HYDROGEN_ACCESSOR(StringCharCodeAt)
1921
1922 LOperand* string() { return inputs_[0]; }
1923 LOperand* index() { return inputs_[1]; }
1924 }; 2069 };
1925 2070
1926 2071
1927 class LStringCharFromCode: public LTemplateInstruction<1, 1, 0> { 2072 class LStringCharFromCode: public LTemplateInstruction<1, 1, 0> {
1928 public: 2073 public:
1929 explicit LStringCharFromCode(LOperand* char_code) { 2074 explicit LStringCharFromCode(LOperand* char_code) {
1930 inputs_[0] = char_code; 2075 inputs_[0] = char_code;
1931 } 2076 }
1932 2077
2078 LOperand* char_code() { return inputs_[0]; }
2079
1933 DECLARE_CONCRETE_INSTRUCTION(StringCharFromCode, "string-char-from-code") 2080 DECLARE_CONCRETE_INSTRUCTION(StringCharFromCode, "string-char-from-code")
1934 DECLARE_HYDROGEN_ACCESSOR(StringCharFromCode) 2081 DECLARE_HYDROGEN_ACCESSOR(StringCharFromCode)
1935
1936 LOperand* char_code() { return inputs_[0]; }
1937 }; 2082 };
1938 2083
1939 2084
1940 class LStringLength: public LTemplateInstruction<1, 1, 0> { 2085 class LStringLength: public LTemplateInstruction<1, 1, 0> {
1941 public: 2086 public:
1942 explicit LStringLength(LOperand* string) { 2087 explicit LStringLength(LOperand* string) {
1943 inputs_[0] = string; 2088 inputs_[0] = string;
1944 } 2089 }
1945 2090
2091 LOperand* string() { return inputs_[0]; }
2092
1946 DECLARE_CONCRETE_INSTRUCTION(StringLength, "string-length") 2093 DECLARE_CONCRETE_INSTRUCTION(StringLength, "string-length")
1947 DECLARE_HYDROGEN_ACCESSOR(StringLength) 2094 DECLARE_HYDROGEN_ACCESSOR(StringLength)
1948
1949 LOperand* string() { return inputs_[0]; }
1950 }; 2095 };
1951 2096
1952 2097
1953 class LCheckFunction: public LTemplateInstruction<0, 1, 0> { 2098 class LCheckFunction: public LTemplateInstruction<0, 1, 0> {
1954 public: 2099 public:
1955 explicit LCheckFunction(LOperand* value) { 2100 explicit LCheckFunction(LOperand* value) {
1956 inputs_[0] = value; 2101 inputs_[0] = value;
1957 } 2102 }
1958 2103
1959 LOperand* value() { return InputAt(0); } 2104 LOperand* value() { return inputs_[0]; }
1960 2105
1961 DECLARE_CONCRETE_INSTRUCTION(CheckFunction, "check-function") 2106 DECLARE_CONCRETE_INSTRUCTION(CheckFunction, "check-function")
1962 DECLARE_HYDROGEN_ACCESSOR(CheckFunction) 2107 DECLARE_HYDROGEN_ACCESSOR(CheckFunction)
1963 }; 2108 };
1964 2109
1965 2110
1966 class LCheckInstanceType: public LTemplateInstruction<0, 1, 0> { 2111 class LCheckInstanceType: public LTemplateInstruction<0, 1, 0> {
1967 public: 2112 public:
1968 explicit LCheckInstanceType(LOperand* value) { 2113 explicit LCheckInstanceType(LOperand* value) {
1969 inputs_[0] = value; 2114 inputs_[0] = value;
1970 } 2115 }
1971 2116
2117 LOperand* value() { return inputs_[0]; }
2118
1972 DECLARE_CONCRETE_INSTRUCTION(CheckInstanceType, "check-instance-type") 2119 DECLARE_CONCRETE_INSTRUCTION(CheckInstanceType, "check-instance-type")
1973 DECLARE_HYDROGEN_ACCESSOR(CheckInstanceType) 2120 DECLARE_HYDROGEN_ACCESSOR(CheckInstanceType)
1974 }; 2121 };
1975 2122
1976 2123
1977 class LCheckMaps: public LTemplateInstruction<0, 1, 0> { 2124 class LCheckMaps: public LTemplateInstruction<0, 1, 0> {
1978 public: 2125 public:
1979 explicit LCheckMaps(LOperand* value) { 2126 explicit LCheckMaps(LOperand* value) {
1980 inputs_[0] = value; 2127 inputs_[0] = value;
1981 } 2128 }
1982 2129
2130 LOperand* value() { return inputs_[0]; }
2131
1983 DECLARE_CONCRETE_INSTRUCTION(CheckMaps, "check-maps") 2132 DECLARE_CONCRETE_INSTRUCTION(CheckMaps, "check-maps")
1984 DECLARE_HYDROGEN_ACCESSOR(CheckMaps) 2133 DECLARE_HYDROGEN_ACCESSOR(CheckMaps)
1985 }; 2134 };
1986 2135
1987 2136
1988 class LCheckPrototypeMaps: public LTemplateInstruction<0, 0, 2> { 2137 class LCheckPrototypeMaps: public LTemplateInstruction<0, 0, 2> {
1989 public: 2138 public:
1990 LCheckPrototypeMaps(LOperand* temp1, LOperand* temp2) { 2139 LCheckPrototypeMaps(LOperand* temp, LOperand* temp2) {
1991 temps_[0] = temp1; 2140 temps_[0] = temp;
1992 temps_[1] = temp2; 2141 temps_[1] = temp2;
1993 } 2142 }
1994 2143
2144 LOperand* temp() { return temps_[0]; }
2145 LOperand* temp2() { return temps_[1]; }
2146
1995 DECLARE_CONCRETE_INSTRUCTION(CheckPrototypeMaps, "check-prototype-maps") 2147 DECLARE_CONCRETE_INSTRUCTION(CheckPrototypeMaps, "check-prototype-maps")
1996 DECLARE_HYDROGEN_ACCESSOR(CheckPrototypeMaps) 2148 DECLARE_HYDROGEN_ACCESSOR(CheckPrototypeMaps)
1997 2149
1998 Handle<JSObject> prototype() const { return hydrogen()->prototype(); } 2150 Handle<JSObject> prototype() const { return hydrogen()->prototype(); }
1999 Handle<JSObject> holder() const { return hydrogen()->holder(); } 2151 Handle<JSObject> holder() const { return hydrogen()->holder(); }
2000 }; 2152 };
2001 2153
2002 2154
2003 class LCheckSmi: public LTemplateInstruction<0, 1, 0> { 2155 class LCheckSmi: public LTemplateInstruction<0, 1, 0> {
2004 public: 2156 public:
2005 explicit LCheckSmi(LOperand* value) { 2157 explicit LCheckSmi(LOperand* value) {
2006 inputs_[0] = value; 2158 inputs_[0] = value;
2007 } 2159 }
2008 2160
2161 LOperand* value() { return inputs_[0]; }
2162
2009 DECLARE_CONCRETE_INSTRUCTION(CheckSmi, "check-smi") 2163 DECLARE_CONCRETE_INSTRUCTION(CheckSmi, "check-smi")
2010 }; 2164 };
2011 2165
2012 2166
2013 class LCheckNonSmi: public LTemplateInstruction<0, 1, 0> { 2167 class LCheckNonSmi: public LTemplateInstruction<0, 1, 0> {
2014 public: 2168 public:
2015 explicit LCheckNonSmi(LOperand* value) { 2169 explicit LCheckNonSmi(LOperand* value) {
2016 inputs_[0] = value; 2170 inputs_[0] = value;
2017 } 2171 }
2018 2172
2173 LOperand* value() { return inputs_[0]; }
2174
2019 DECLARE_CONCRETE_INSTRUCTION(CheckNonSmi, "check-non-smi") 2175 DECLARE_CONCRETE_INSTRUCTION(CheckNonSmi, "check-non-smi")
2020 }; 2176 };
2021 2177
2022 2178
2023 class LClampDToUint8: public LTemplateInstruction<1, 1, 1> { 2179 class LClampDToUint8: public LTemplateInstruction<1, 1, 1> {
2024 public: 2180 public:
2025 LClampDToUint8(LOperand* value, LOperand* temp) { 2181 LClampDToUint8(LOperand* unclamped, LOperand* temp) {
2026 inputs_[0] = value; 2182 inputs_[0] = unclamped;
2027 temps_[0] = temp; 2183 temps_[0] = temp;
2028 } 2184 }
2029 2185
2030 LOperand* unclamped() { return inputs_[0]; } 2186 LOperand* unclamped() { return inputs_[0]; }
2187 LOperand* temp() { return temps_[0]; }
2031 2188
2032 DECLARE_CONCRETE_INSTRUCTION(ClampDToUint8, "clamp-d-to-uint8") 2189 DECLARE_CONCRETE_INSTRUCTION(ClampDToUint8, "clamp-d-to-uint8")
2033 }; 2190 };
2034 2191
2035 2192
2036 class LClampIToUint8: public LTemplateInstruction<1, 1, 0> { 2193 class LClampIToUint8: public LTemplateInstruction<1, 1, 0> {
2037 public: 2194 public:
2038 explicit LClampIToUint8(LOperand* value) { 2195 explicit LClampIToUint8(LOperand* unclamped) {
2039 inputs_[0] = value; 2196 inputs_[0] = unclamped;
2040 } 2197 }
2041 2198
2042 LOperand* unclamped() { return inputs_[0]; } 2199 LOperand* unclamped() { return inputs_[0]; }
2043 2200
2044 DECLARE_CONCRETE_INSTRUCTION(ClampIToUint8, "clamp-i-to-uint8") 2201 DECLARE_CONCRETE_INSTRUCTION(ClampIToUint8, "clamp-i-to-uint8")
2045 }; 2202 };
2046 2203
2047 2204
2048 class LClampTToUint8: public LTemplateInstruction<1, 1, 1> { 2205 class LClampTToUint8: public LTemplateInstruction<1, 1, 1> {
2049 public: 2206 public:
2050 LClampTToUint8(LOperand* value, LOperand* temp) { 2207 LClampTToUint8(LOperand* unclamped, LOperand* temp) {
2051 inputs_[0] = value; 2208 inputs_[0] = unclamped;
2052 temps_[0] = temp; 2209 temps_[0] = temp;
2053 } 2210 }
2054 2211
2055 LOperand* unclamped() { return inputs_[0]; } 2212 LOperand* unclamped() { return inputs_[0]; }
2213 LOperand* temp() { return temps_[0]; }
2056 2214
2057 DECLARE_CONCRETE_INSTRUCTION(ClampTToUint8, "clamp-t-to-uint8") 2215 DECLARE_CONCRETE_INSTRUCTION(ClampTToUint8, "clamp-t-to-uint8")
2058 }; 2216 };
2059 2217
2060 2218
2061 class LAllocateObject: public LTemplateInstruction<1, 0, 2> { 2219 class LAllocateObject: public LTemplateInstruction<1, 0, 2> {
2062 public: 2220 public:
2063 LAllocateObject(LOperand* temp1, LOperand* temp2) { 2221 LAllocateObject(LOperand* temp, LOperand* temp2) {
2064 temps_[0] = temp1; 2222 temps_[0] = temp;
2065 temps_[1] = temp2; 2223 temps_[1] = temp2;
2066 } 2224 }
2067 2225
2226 LOperand* temp() { return temps_[0]; }
2227 LOperand* temp2() { return temps_[1]; }
2228
2068 DECLARE_CONCRETE_INSTRUCTION(AllocateObject, "allocate-object") 2229 DECLARE_CONCRETE_INSTRUCTION(AllocateObject, "allocate-object")
2069 DECLARE_HYDROGEN_ACCESSOR(AllocateObject) 2230 DECLARE_HYDROGEN_ACCESSOR(AllocateObject)
2070 }; 2231 };
2071 2232
2072 2233
2073 class LFastLiteral: public LTemplateInstruction<1, 0, 0> { 2234 class LFastLiteral: public LTemplateInstruction<1, 0, 0> {
2074 public: 2235 public:
2075 DECLARE_CONCRETE_INSTRUCTION(FastLiteral, "fast-literal") 2236 DECLARE_CONCRETE_INSTRUCTION(FastLiteral, "fast-literal")
2076 DECLARE_HYDROGEN_ACCESSOR(FastLiteral) 2237 DECLARE_HYDROGEN_ACCESSOR(FastLiteral)
2077 }; 2238 };
(...skipping 28 matching lines...) Expand all
2106 Handle<SharedFunctionInfo> shared_info() { return hydrogen()->shared_info(); } 2267 Handle<SharedFunctionInfo> shared_info() { return hydrogen()->shared_info(); }
2107 }; 2268 };
2108 2269
2109 2270
2110 class LToFastProperties: public LTemplateInstruction<1, 1, 0> { 2271 class LToFastProperties: public LTemplateInstruction<1, 1, 0> {
2111 public: 2272 public:
2112 explicit LToFastProperties(LOperand* value) { 2273 explicit LToFastProperties(LOperand* value) {
2113 inputs_[0] = value; 2274 inputs_[0] = value;
2114 } 2275 }
2115 2276
2277 LOperand* value() { return inputs_[0]; }
2278
2116 DECLARE_CONCRETE_INSTRUCTION(ToFastProperties, "to-fast-properties") 2279 DECLARE_CONCRETE_INSTRUCTION(ToFastProperties, "to-fast-properties")
2117 DECLARE_HYDROGEN_ACCESSOR(ToFastProperties) 2280 DECLARE_HYDROGEN_ACCESSOR(ToFastProperties)
2118 }; 2281 };
2119 2282
2120 2283
2121 class LTypeof: public LTemplateInstruction<1, 1, 0> { 2284 class LTypeof: public LTemplateInstruction<1, 1, 0> {
2122 public: 2285 public:
2123 explicit LTypeof(LOperand* value) { 2286 explicit LTypeof(LOperand* value) {
2124 inputs_[0] = value; 2287 inputs_[0] = value;
2125 } 2288 }
2126 2289
2290 LOperand* value() { return inputs_[0]; }
2291
2127 DECLARE_CONCRETE_INSTRUCTION(Typeof, "typeof") 2292 DECLARE_CONCRETE_INSTRUCTION(Typeof, "typeof")
2128 }; 2293 };
2129 2294
2130 2295
2131 class LTypeofIsAndBranch: public LControlInstruction<1, 0> { 2296 class LTypeofIsAndBranch: public LControlInstruction<1, 0> {
2132 public: 2297 public:
2133 explicit LTypeofIsAndBranch(LOperand* value) { 2298 explicit LTypeofIsAndBranch(LOperand* value) {
2134 inputs_[0] = value; 2299 inputs_[0] = value;
2135 } 2300 }
2136 2301
2302 LOperand* value() { return inputs_[0]; }
2303
2137 DECLARE_CONCRETE_INSTRUCTION(TypeofIsAndBranch, "typeof-is-and-branch") 2304 DECLARE_CONCRETE_INSTRUCTION(TypeofIsAndBranch, "typeof-is-and-branch")
2138 DECLARE_HYDROGEN_ACCESSOR(TypeofIsAndBranch) 2305 DECLARE_HYDROGEN_ACCESSOR(TypeofIsAndBranch)
2139 2306
2140 Handle<String> type_literal() { return hydrogen()->type_literal(); } 2307 Handle<String> type_literal() { return hydrogen()->type_literal(); }
2141 2308
2142 virtual void PrintDataTo(StringStream* stream); 2309 virtual void PrintDataTo(StringStream* stream);
2143 }; 2310 };
2144 2311
2145 2312
2146 class LIsConstructCallAndBranch: public LControlInstruction<0, 1> { 2313 class LIsConstructCallAndBranch: public LControlInstruction<0, 1> {
2147 public: 2314 public:
2148 explicit LIsConstructCallAndBranch(LOperand* temp) { 2315 explicit LIsConstructCallAndBranch(LOperand* temp) {
2149 temps_[0] = temp; 2316 temps_[0] = temp;
2150 } 2317 }
2151 2318
2319 LOperand* temp() { return temps_[0]; }
2320
2152 DECLARE_CONCRETE_INSTRUCTION(IsConstructCallAndBranch, 2321 DECLARE_CONCRETE_INSTRUCTION(IsConstructCallAndBranch,
2153 "is-construct-call-and-branch") 2322 "is-construct-call-and-branch")
2154 }; 2323 };
2155 2324
2156 2325
2157 class LDeleteProperty: public LTemplateInstruction<1, 2, 0> { 2326 class LDeleteProperty: public LTemplateInstruction<1, 2, 0> {
2158 public: 2327 public:
2159 LDeleteProperty(LOperand* obj, LOperand* key) { 2328 LDeleteProperty(LOperand* object, LOperand* key) {
2160 inputs_[0] = obj; 2329 inputs_[0] = object;
2161 inputs_[1] = key; 2330 inputs_[1] = key;
2162 } 2331 }
2163 2332
2164 DECLARE_CONCRETE_INSTRUCTION(DeleteProperty, "delete-property")
2165
2166 LOperand* object() { return inputs_[0]; } 2333 LOperand* object() { return inputs_[0]; }
2167 LOperand* key() { return inputs_[1]; } 2334 LOperand* key() { return inputs_[1]; }
2335
2336 DECLARE_CONCRETE_INSTRUCTION(DeleteProperty, "delete-property")
2168 }; 2337 };
2169 2338
2170 2339
2171 class LOsrEntry: public LTemplateInstruction<0, 0, 0> { 2340 class LOsrEntry: public LTemplateInstruction<0, 0, 0> {
2172 public: 2341 public:
2173 LOsrEntry(); 2342 LOsrEntry();
2174 2343
2175 DECLARE_CONCRETE_INSTRUCTION(OsrEntry, "osr-entry") 2344 DECLARE_CONCRETE_INSTRUCTION(OsrEntry, "osr-entry")
2176 2345
2177 LOperand** SpilledRegisterArray() { return register_spills_; } 2346 LOperand** SpilledRegisterArray() { return register_spills_; }
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after
2439 2608
2440 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); 2609 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder);
2441 }; 2610 };
2442 2611
2443 #undef DECLARE_HYDROGEN_ACCESSOR 2612 #undef DECLARE_HYDROGEN_ACCESSOR
2444 #undef DECLARE_CONCRETE_INSTRUCTION 2613 #undef DECLARE_CONCRETE_INSTRUCTION
2445 2614
2446 } } // namespace v8::internal 2615 } } // namespace v8::internal
2447 2616
2448 #endif // V8_ARM_LITHIUM_ARM_H_ 2617 #endif // V8_ARM_LITHIUM_ARM_H_
OLDNEW
« no previous file with comments | « no previous file | src/arm/lithium-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698