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