| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 // LOsrEntry | 107 // LOsrEntry |
| 108 // LParameter | 108 // LParameter |
| 109 // LRegExpConstructResult | 109 // LRegExpConstructResult |
| 110 // LStackCheck | 110 // LStackCheck |
| 111 // LStoreKeyed | 111 // LStoreKeyed |
| 112 // LStoreKeyedFastElement | 112 // LStoreKeyedFastElement |
| 113 // LStoreKeyedGeneric | 113 // LStoreKeyedGeneric |
| 114 // LStoreNamed | 114 // LStoreNamed |
| 115 // LStoreNamedField | 115 // LStoreNamedField |
| 116 // LStoreNamedGeneric | 116 // LStoreNamedGeneric |
| 117 // LStringCharCodeAt |
| 117 // LBitNotI | 118 // LBitNotI |
| 118 // LCallNew | 119 // LCallNew |
| 119 // LCheckFunction | 120 // LCheckFunction |
| 120 // LCheckPrototypeMaps | 121 // LCheckPrototypeMaps |
| 121 // LCheckInstanceType | 122 // LCheckInstanceType |
| 122 // LCheckMap | 123 // LCheckMap |
| 123 // LCheckSmi | 124 // LCheckSmi |
| 124 // LClassOfTest | 125 // LClassOfTest |
| 125 // LDeleteProperty | 126 // LDeleteProperty |
| 126 // LDoubleToI | 127 // LDoubleToI |
| 127 // LFixedArrayLength | 128 // LFixedArrayLength |
| 128 // LHasCachedArrayIndex | 129 // LHasCachedArrayIndex |
| 129 // LHasInstanceType | 130 // LHasInstanceType |
| 130 // LInteger32ToDouble | 131 // LInteger32ToDouble |
| 131 // LIsNull | 132 // LIsNull |
| 132 // LIsObject | 133 // LIsObject |
| 133 // LIsSmi | 134 // LIsSmi |
| 134 // LJSArrayLength | 135 // LJSArrayLength |
| 135 // LLoadNamedField | 136 // LLoadNamedField |
| 136 // LLoadNamedGeneric | 137 // LLoadNamedGeneric |
| 137 // LLoadFunctionPrototype | 138 // LLoadFunctionPrototype |
| 138 // LNumberTagD | 139 // LNumberTagD |
| 139 // LNumberTagI | 140 // LNumberTagI |
| 140 // LPushArgument | 141 // LPushArgument |
| 141 // LReturn | 142 // LReturn |
| 142 // LSmiTag | 143 // LSmiTag |
| 143 // LStoreGlobal | 144 // LStoreGlobal |
| 145 // LStringLength |
| 144 // LTaggedToI | 146 // LTaggedToI |
| 145 // LThrow | 147 // LThrow |
| 146 // LTypeof | 148 // LTypeof |
| 147 // LTypeofIs | 149 // LTypeofIs |
| 148 // LUnaryMathOperation | 150 // LUnaryMathOperation |
| 149 // LValueOf | 151 // LValueOf |
| 150 // LUnknownOSRValue | 152 // LUnknownOSRValue |
| 151 | 153 |
| 152 #define LITHIUM_ALL_INSTRUCTION_LIST(V) \ | 154 #define LITHIUM_ALL_INSTRUCTION_LIST(V) \ |
| 153 V(ControlInstruction) \ | 155 V(ControlInstruction) \ |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 246 V(Return) \ | 248 V(Return) \ |
| 247 V(ShiftI) \ | 249 V(ShiftI) \ |
| 248 V(SmiTag) \ | 250 V(SmiTag) \ |
| 249 V(SmiUntag) \ | 251 V(SmiUntag) \ |
| 250 V(StackCheck) \ | 252 V(StackCheck) \ |
| 251 V(StoreGlobal) \ | 253 V(StoreGlobal) \ |
| 252 V(StoreKeyedFastElement) \ | 254 V(StoreKeyedFastElement) \ |
| 253 V(StoreKeyedGeneric) \ | 255 V(StoreKeyedGeneric) \ |
| 254 V(StoreNamedField) \ | 256 V(StoreNamedField) \ |
| 255 V(StoreNamedGeneric) \ | 257 V(StoreNamedGeneric) \ |
| 258 V(StringCharCodeAt) \ |
| 259 V(StringLength) \ |
| 256 V(SubI) \ | 260 V(SubI) \ |
| 257 V(TaggedToI) \ | 261 V(TaggedToI) \ |
| 258 V(Throw) \ | 262 V(Throw) \ |
| 259 V(Typeof) \ | 263 V(Typeof) \ |
| 260 V(TypeofIs) \ | 264 V(TypeofIs) \ |
| 261 V(TypeofIsAndBranch) \ | 265 V(TypeofIsAndBranch) \ |
| 262 V(UnaryMathOperation) \ | 266 V(UnaryMathOperation) \ |
| 263 V(UnknownOSRValue) \ | 267 V(UnknownOSRValue) \ |
| 264 V(ValueOf) | 268 V(ValueOf) |
| 265 | 269 |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 328 } | 332 } |
| 329 | 333 |
| 330 private: | 334 private: |
| 331 SetOncePointer<LEnvironment> environment_; | 335 SetOncePointer<LEnvironment> environment_; |
| 332 SetOncePointer<LPointerMap> pointer_map_; | 336 SetOncePointer<LPointerMap> pointer_map_; |
| 333 HValue* hydrogen_value_; | 337 HValue* hydrogen_value_; |
| 334 SetOncePointer<LEnvironment> deoptimization_environment_; | 338 SetOncePointer<LEnvironment> deoptimization_environment_; |
| 335 }; | 339 }; |
| 336 | 340 |
| 337 | 341 |
| 338 template<typename T, int N> | 342 template<typename ElementType, int NumElements> |
| 339 class OperandContainer { | 343 class OperandContainer { |
| 340 public: | 344 public: |
| 341 OperandContainer() { | 345 OperandContainer() { |
| 342 for (int i = 0; i < N; i++) elems_[i] = NULL; | 346 for (int i = 0; i < NumElements; i++) elems_[i] = NULL; |
| 343 } | 347 } |
| 344 int length() { return N; } | 348 int length() { return NumElements; } |
| 345 T& operator[](int i) { | 349 ElementType& operator[](int i) { |
| 346 ASSERT(i < length()); | 350 ASSERT(i < length()); |
| 347 return elems_[i]; | 351 return elems_[i]; |
| 348 } | 352 } |
| 349 void PrintOperandsTo(StringStream* stream); | 353 void PrintOperandsTo(StringStream* stream); |
| 350 | 354 |
| 351 private: | 355 private: |
| 352 T elems_[N]; | 356 ElementType elems_[NumElements]; |
| 353 }; | 357 }; |
| 354 | 358 |
| 355 | 359 |
| 356 template<typename T> | 360 template<typename ElementType> |
| 357 class OperandContainer<T, 0> { | 361 class OperandContainer<ElementType, 0> { |
| 358 public: | 362 public: |
| 359 int length() { return 0; } | 363 int length() { return 0; } |
| 360 void PrintOperandsTo(StringStream* stream) { } | 364 void PrintOperandsTo(StringStream* stream) { } |
| 361 }; | 365 }; |
| 362 | 366 |
| 363 | 367 |
| 364 template<int R, int I, int T = 0> | 368 // R = number of result operands (0 or 1). |
| 369 // I = number of input operands. |
| 370 // T = number of temporary operands. |
| 371 template<int R, int I, int T> |
| 365 class LTemplateInstruction: public LInstruction { | 372 class LTemplateInstruction: public LInstruction { |
| 366 public: | 373 public: |
| 367 // Allow 0 or 1 output operands. | 374 // Allow 0 or 1 output operands. |
| 368 STATIC_ASSERT(R == 0 || R == 1); | 375 STATIC_ASSERT(R == 0 || R == 1); |
| 369 virtual bool HasResult() const { return R != 0; } | 376 virtual bool HasResult() const { return R != 0; } |
| 370 void set_result(LOperand* operand) { results_[0] = operand; } | 377 void set_result(LOperand* operand) { results_[0] = operand; } |
| 371 LOperand* result() { return results_[0]; } | 378 LOperand* result() { return results_[0]; } |
| 372 | 379 |
| 373 int InputCount() { return I; } | 380 int InputCount() { return I; } |
| 374 LOperand* InputAt(int i) { return inputs_[i]; } | 381 LOperand* InputAt(int i) { return inputs_[i]; } |
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 505 } | 512 } |
| 506 }; | 513 }; |
| 507 | 514 |
| 508 | 515 |
| 509 class LUnknownOSRValue: public LTemplateInstruction<1, 0, 0> { | 516 class LUnknownOSRValue: public LTemplateInstruction<1, 0, 0> { |
| 510 public: | 517 public: |
| 511 DECLARE_CONCRETE_INSTRUCTION(UnknownOSRValue, "unknown-osr-value") | 518 DECLARE_CONCRETE_INSTRUCTION(UnknownOSRValue, "unknown-osr-value") |
| 512 }; | 519 }; |
| 513 | 520 |
| 514 | 521 |
| 515 template<int I, int T = 0> | 522 template<int I, int T> |
| 516 class LControlInstruction: public LTemplateInstruction<0, I, T> { | 523 class LControlInstruction: public LTemplateInstruction<0, I, T> { |
| 517 public: | 524 public: |
| 518 DECLARE_INSTRUCTION(ControlInstruction) | 525 DECLARE_INSTRUCTION(ControlInstruction) |
| 519 virtual bool IsControl() const { return true; } | 526 virtual bool IsControl() const { return true; } |
| 520 | 527 |
| 521 int true_block_id() const { return true_block_id_; } | 528 int true_block_id() const { return true_block_id_; } |
| 522 int false_block_id() const { return false_block_id_; } | 529 int false_block_id() const { return false_block_id_; } |
| 523 void SetBranchTargets(int true_block_id, int false_block_id) { | 530 void SetBranchTargets(int true_block_id, int false_block_id) { |
| 524 true_block_id_ = true_block_id; | 531 true_block_id_ = true_block_id; |
| 525 false_block_id_ = false_block_id; | 532 false_block_id_ = false_block_id; |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 563 DECLARE_CONCRETE_INSTRUCTION(AccessArgumentsAt, "access-arguments-at") | 570 DECLARE_CONCRETE_INSTRUCTION(AccessArgumentsAt, "access-arguments-at") |
| 564 | 571 |
| 565 LOperand* arguments() { return inputs_[0]; } | 572 LOperand* arguments() { return inputs_[0]; } |
| 566 LOperand* length() { return inputs_[1]; } | 573 LOperand* length() { return inputs_[1]; } |
| 567 LOperand* index() { return inputs_[2]; } | 574 LOperand* index() { return inputs_[2]; } |
| 568 | 575 |
| 569 virtual void PrintDataTo(StringStream* stream); | 576 virtual void PrintDataTo(StringStream* stream); |
| 570 }; | 577 }; |
| 571 | 578 |
| 572 | 579 |
| 573 class LArgumentsLength: public LTemplateInstruction<1, 1> { | 580 class LArgumentsLength: public LTemplateInstruction<1, 1, 0> { |
| 574 public: | 581 public: |
| 575 explicit LArgumentsLength(LOperand* elements) { | 582 explicit LArgumentsLength(LOperand* elements) { |
| 576 inputs_[0] = elements; | 583 inputs_[0] = elements; |
| 577 } | 584 } |
| 578 | 585 |
| 579 DECLARE_CONCRETE_INSTRUCTION(ArgumentsLength, "arguments-length") | 586 DECLARE_CONCRETE_INSTRUCTION(ArgumentsLength, "arguments-length") |
| 580 }; | 587 }; |
| 581 | 588 |
| 582 | 589 |
| 583 class LArgumentsElements: public LTemplateInstruction<1, 0, 0> { | 590 class LArgumentsElements: public LTemplateInstruction<1, 0, 0> { |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 620 inputs_[0] = left; | 627 inputs_[0] = left; |
| 621 inputs_[1] = right; | 628 inputs_[1] = right; |
| 622 temps_[0] = temp; | 629 temps_[0] = temp; |
| 623 } | 630 } |
| 624 | 631 |
| 625 DECLARE_CONCRETE_INSTRUCTION(MulI, "mul-i") | 632 DECLARE_CONCRETE_INSTRUCTION(MulI, "mul-i") |
| 626 DECLARE_HYDROGEN_ACCESSOR(Mul) | 633 DECLARE_HYDROGEN_ACCESSOR(Mul) |
| 627 }; | 634 }; |
| 628 | 635 |
| 629 | 636 |
| 630 class LCmpID: public LTemplateInstruction<1, 2> { | 637 class LCmpID: public LTemplateInstruction<1, 2, 0> { |
| 631 public: | 638 public: |
| 632 LCmpID(LOperand* left, LOperand* right) { | 639 LCmpID(LOperand* left, LOperand* right) { |
| 633 inputs_[0] = left; | 640 inputs_[0] = left; |
| 634 inputs_[1] = right; | 641 inputs_[1] = right; |
| 635 } | 642 } |
| 636 | 643 |
| 637 DECLARE_CONCRETE_INSTRUCTION(CmpID, "cmp-id") | 644 DECLARE_CONCRETE_INSTRUCTION(CmpID, "cmp-id") |
| 638 DECLARE_HYDROGEN_ACCESSOR(Compare) | 645 DECLARE_HYDROGEN_ACCESSOR(Compare) |
| 639 | 646 |
| 640 Token::Value op() const { return hydrogen()->token(); } | 647 Token::Value op() const { return hydrogen()->token(); } |
| 641 bool is_double() const { | 648 bool is_double() const { |
| 642 return hydrogen()->GetInputRepresentation().IsDouble(); | 649 return hydrogen()->GetInputRepresentation().IsDouble(); |
| 643 } | 650 } |
| 644 }; | 651 }; |
| 645 | 652 |
| 646 | 653 |
| 647 class LCmpIDAndBranch: public LControlInstruction<2> { | 654 class LCmpIDAndBranch: public LControlInstruction<2, 0> { |
| 648 public: | 655 public: |
| 649 LCmpIDAndBranch(LOperand* left, LOperand* right) { | 656 LCmpIDAndBranch(LOperand* left, LOperand* right) { |
| 650 inputs_[0] = left; | 657 inputs_[0] = left; |
| 651 inputs_[1] = right; | 658 inputs_[1] = right; |
| 652 } | 659 } |
| 653 | 660 |
| 654 DECLARE_CONCRETE_INSTRUCTION(CmpIDAndBranch, "cmp-id-and-branch") | 661 DECLARE_CONCRETE_INSTRUCTION(CmpIDAndBranch, "cmp-id-and-branch") |
| 655 DECLARE_HYDROGEN_ACCESSOR(Compare) | 662 DECLARE_HYDROGEN_ACCESSOR(Compare) |
| 656 | 663 |
| 657 Token::Value op() const { return hydrogen()->token(); } | 664 Token::Value op() const { return hydrogen()->token(); } |
| 658 bool is_double() const { | 665 bool is_double() const { |
| 659 return hydrogen()->GetInputRepresentation().IsDouble(); | 666 return hydrogen()->GetInputRepresentation().IsDouble(); |
| 660 } | 667 } |
| 661 | 668 |
| 662 virtual void PrintDataTo(StringStream* stream); | 669 virtual void PrintDataTo(StringStream* stream); |
| 663 }; | 670 }; |
| 664 | 671 |
| 665 | 672 |
| 666 class LUnaryMathOperation: public LTemplateInstruction<1, 1> { | 673 class LUnaryMathOperation: public LTemplateInstruction<1, 1, 0> { |
| 667 public: | 674 public: |
| 668 explicit LUnaryMathOperation(LOperand* value) { | 675 explicit LUnaryMathOperation(LOperand* value) { |
| 669 inputs_[0] = value; | 676 inputs_[0] = value; |
| 670 } | 677 } |
| 671 | 678 |
| 672 DECLARE_CONCRETE_INSTRUCTION(UnaryMathOperation, "unary-math-operation") | 679 DECLARE_CONCRETE_INSTRUCTION(UnaryMathOperation, "unary-math-operation") |
| 673 DECLARE_HYDROGEN_ACCESSOR(UnaryMathOperation) | 680 DECLARE_HYDROGEN_ACCESSOR(UnaryMathOperation) |
| 674 | 681 |
| 675 virtual void PrintDataTo(StringStream* stream); | 682 virtual void PrintDataTo(StringStream* stream); |
| 676 BuiltinFunctionId op() const { return hydrogen()->op(); } | 683 BuiltinFunctionId op() const { return hydrogen()->op(); } |
| 677 }; | 684 }; |
| 678 | 685 |
| 679 | 686 |
| 680 class LCmpJSObjectEq: public LTemplateInstruction<1, 2> { | 687 class LCmpJSObjectEq: public LTemplateInstruction<1, 2, 0> { |
| 681 public: | 688 public: |
| 682 LCmpJSObjectEq(LOperand* left, LOperand* right) { | 689 LCmpJSObjectEq(LOperand* left, LOperand* right) { |
| 683 inputs_[0] = left; | 690 inputs_[0] = left; |
| 684 inputs_[1] = right; | 691 inputs_[1] = right; |
| 685 } | 692 } |
| 686 | 693 |
| 687 DECLARE_CONCRETE_INSTRUCTION(CmpJSObjectEq, "cmp-jsobject-eq") | 694 DECLARE_CONCRETE_INSTRUCTION(CmpJSObjectEq, "cmp-jsobject-eq") |
| 688 }; | 695 }; |
| 689 | 696 |
| 690 | 697 |
| 691 class LCmpJSObjectEqAndBranch: public LControlInstruction<2> { | 698 class LCmpJSObjectEqAndBranch: public LControlInstruction<2, 0> { |
| 692 public: | 699 public: |
| 693 LCmpJSObjectEqAndBranch(LOperand* left, LOperand* right) { | 700 LCmpJSObjectEqAndBranch(LOperand* left, LOperand* right) { |
| 694 inputs_[0] = left; | 701 inputs_[0] = left; |
| 695 inputs_[1] = right; | 702 inputs_[1] = right; |
| 696 } | 703 } |
| 697 | 704 |
| 698 DECLARE_CONCRETE_INSTRUCTION(CmpJSObjectEqAndBranch, | 705 DECLARE_CONCRETE_INSTRUCTION(CmpJSObjectEqAndBranch, |
| 699 "cmp-jsobject-eq-and-branch") | 706 "cmp-jsobject-eq-and-branch") |
| 700 }; | 707 }; |
| 701 | 708 |
| 702 | 709 |
| 703 class LIsNull: public LTemplateInstruction<1, 1> { | 710 class LIsNull: public LTemplateInstruction<1, 1, 0> { |
| 704 public: | 711 public: |
| 705 explicit LIsNull(LOperand* value) { | 712 explicit LIsNull(LOperand* value) { |
| 706 inputs_[0] = value; | 713 inputs_[0] = value; |
| 707 } | 714 } |
| 708 | 715 |
| 709 DECLARE_CONCRETE_INSTRUCTION(IsNull, "is-null") | 716 DECLARE_CONCRETE_INSTRUCTION(IsNull, "is-null") |
| 710 DECLARE_HYDROGEN_ACCESSOR(IsNull) | 717 DECLARE_HYDROGEN_ACCESSOR(IsNull) |
| 711 | 718 |
| 712 bool is_strict() const { return hydrogen()->is_strict(); } | 719 bool is_strict() const { return hydrogen()->is_strict(); } |
| 713 }; | 720 }; |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 747 temps_[0] = temp; | 754 temps_[0] = temp; |
| 748 temps_[1] = temp2; | 755 temps_[1] = temp2; |
| 749 } | 756 } |
| 750 | 757 |
| 751 DECLARE_CONCRETE_INSTRUCTION(IsObjectAndBranch, "is-object-and-branch") | 758 DECLARE_CONCRETE_INSTRUCTION(IsObjectAndBranch, "is-object-and-branch") |
| 752 | 759 |
| 753 virtual void PrintDataTo(StringStream* stream); | 760 virtual void PrintDataTo(StringStream* stream); |
| 754 }; | 761 }; |
| 755 | 762 |
| 756 | 763 |
| 757 class LIsSmi: public LTemplateInstruction<1, 1> { | 764 class LIsSmi: public LTemplateInstruction<1, 1, 0> { |
| 758 public: | 765 public: |
| 759 explicit LIsSmi(LOperand* value) { | 766 explicit LIsSmi(LOperand* value) { |
| 760 inputs_[0] = value; | 767 inputs_[0] = value; |
| 761 } | 768 } |
| 762 | 769 |
| 763 DECLARE_CONCRETE_INSTRUCTION(IsSmi, "is-smi") | 770 DECLARE_CONCRETE_INSTRUCTION(IsSmi, "is-smi") |
| 764 DECLARE_HYDROGEN_ACCESSOR(IsSmi) | 771 DECLARE_HYDROGEN_ACCESSOR(IsSmi) |
| 765 }; | 772 }; |
| 766 | 773 |
| 767 | 774 |
| 768 class LIsSmiAndBranch: public LControlInstruction<1> { | 775 class LIsSmiAndBranch: public LControlInstruction<1, 0> { |
| 769 public: | 776 public: |
| 770 explicit LIsSmiAndBranch(LOperand* value) { | 777 explicit LIsSmiAndBranch(LOperand* value) { |
| 771 inputs_[0] = value; | 778 inputs_[0] = value; |
| 772 } | 779 } |
| 773 | 780 |
| 774 DECLARE_CONCRETE_INSTRUCTION(IsSmiAndBranch, "is-smi-and-branch") | 781 DECLARE_CONCRETE_INSTRUCTION(IsSmiAndBranch, "is-smi-and-branch") |
| 775 | 782 |
| 776 virtual void PrintDataTo(StringStream* stream); | 783 virtual void PrintDataTo(StringStream* stream); |
| 777 }; | 784 }; |
| 778 | 785 |
| 779 | 786 |
| 780 class LHasInstanceType: public LTemplateInstruction<1, 1> { | 787 class LHasInstanceType: public LTemplateInstruction<1, 1, 0> { |
| 781 public: | 788 public: |
| 782 explicit LHasInstanceType(LOperand* value) { | 789 explicit LHasInstanceType(LOperand* value) { |
| 783 inputs_[0] = value; | 790 inputs_[0] = value; |
| 784 } | 791 } |
| 785 | 792 |
| 786 DECLARE_CONCRETE_INSTRUCTION(HasInstanceType, "has-instance-type") | 793 DECLARE_CONCRETE_INSTRUCTION(HasInstanceType, "has-instance-type") |
| 787 DECLARE_HYDROGEN_ACCESSOR(HasInstanceType) | 794 DECLARE_HYDROGEN_ACCESSOR(HasInstanceType) |
| 788 }; | 795 }; |
| 789 | 796 |
| 790 | 797 |
| 791 class LHasInstanceTypeAndBranch: public LControlInstruction<1, 1> { | 798 class LHasInstanceTypeAndBranch: public LControlInstruction<1, 1> { |
| 792 public: | 799 public: |
| 793 LHasInstanceTypeAndBranch(LOperand* value, LOperand* temp) { | 800 LHasInstanceTypeAndBranch(LOperand* value, LOperand* temp) { |
| 794 inputs_[0] = value; | 801 inputs_[0] = value; |
| 795 temps_[0] = temp; | 802 temps_[0] = temp; |
| 796 } | 803 } |
| 797 | 804 |
| 798 DECLARE_CONCRETE_INSTRUCTION(HasInstanceTypeAndBranch, | 805 DECLARE_CONCRETE_INSTRUCTION(HasInstanceTypeAndBranch, |
| 799 "has-instance-type-and-branch") | 806 "has-instance-type-and-branch") |
| 800 DECLARE_HYDROGEN_ACCESSOR(HasInstanceType) | 807 DECLARE_HYDROGEN_ACCESSOR(HasInstanceType) |
| 801 | 808 |
| 802 virtual void PrintDataTo(StringStream* stream); | 809 virtual void PrintDataTo(StringStream* stream); |
| 803 }; | 810 }; |
| 804 | 811 |
| 805 | 812 |
| 806 class LHasCachedArrayIndex: public LTemplateInstruction<1, 1> { | 813 class LHasCachedArrayIndex: public LTemplateInstruction<1, 1, 0> { |
| 807 public: | 814 public: |
| 808 explicit LHasCachedArrayIndex(LOperand* value) { | 815 explicit LHasCachedArrayIndex(LOperand* value) { |
| 809 inputs_[0] = value; | 816 inputs_[0] = value; |
| 810 } | 817 } |
| 811 | 818 |
| 812 DECLARE_CONCRETE_INSTRUCTION(HasCachedArrayIndex, "has-cached-array-index") | 819 DECLARE_CONCRETE_INSTRUCTION(HasCachedArrayIndex, "has-cached-array-index") |
| 813 DECLARE_HYDROGEN_ACCESSOR(HasCachedArrayIndex) | 820 DECLARE_HYDROGEN_ACCESSOR(HasCachedArrayIndex) |
| 814 }; | 821 }; |
| 815 | 822 |
| 816 | 823 |
| 817 class LHasCachedArrayIndexAndBranch: public LControlInstruction<1> { | 824 class LHasCachedArrayIndexAndBranch: public LControlInstruction<1, 0> { |
| 818 public: | 825 public: |
| 819 explicit LHasCachedArrayIndexAndBranch(LOperand* value) { | 826 explicit LHasCachedArrayIndexAndBranch(LOperand* value) { |
| 820 inputs_[0] = value; | 827 inputs_[0] = value; |
| 821 } | 828 } |
| 822 | 829 |
| 823 DECLARE_CONCRETE_INSTRUCTION(HasCachedArrayIndexAndBranch, | 830 DECLARE_CONCRETE_INSTRUCTION(HasCachedArrayIndexAndBranch, |
| 824 "has-cached-array-index-and-branch") | 831 "has-cached-array-index-and-branch") |
| 825 virtual void PrintDataTo(StringStream* stream); | 832 virtual void PrintDataTo(StringStream* stream); |
| 826 }; | 833 }; |
| 827 | 834 |
| (...skipping 21 matching lines...) Expand all Loading... |
| 849 } | 856 } |
| 850 | 857 |
| 851 DECLARE_CONCRETE_INSTRUCTION(ClassOfTestAndBranch, | 858 DECLARE_CONCRETE_INSTRUCTION(ClassOfTestAndBranch, |
| 852 "class-of-test-and-branch") | 859 "class-of-test-and-branch") |
| 853 DECLARE_HYDROGEN_ACCESSOR(ClassOfTest) | 860 DECLARE_HYDROGEN_ACCESSOR(ClassOfTest) |
| 854 | 861 |
| 855 virtual void PrintDataTo(StringStream* stream); | 862 virtual void PrintDataTo(StringStream* stream); |
| 856 }; | 863 }; |
| 857 | 864 |
| 858 | 865 |
| 859 class LCmpT: public LTemplateInstruction<1, 2> { | 866 class LCmpT: public LTemplateInstruction<1, 2, 0> { |
| 860 public: | 867 public: |
| 861 LCmpT(LOperand* left, LOperand* right) { | 868 LCmpT(LOperand* left, LOperand* right) { |
| 862 inputs_[0] = left; | 869 inputs_[0] = left; |
| 863 inputs_[1] = right; | 870 inputs_[1] = right; |
| 864 } | 871 } |
| 865 | 872 |
| 866 DECLARE_CONCRETE_INSTRUCTION(CmpT, "cmp-t") | 873 DECLARE_CONCRETE_INSTRUCTION(CmpT, "cmp-t") |
| 867 DECLARE_HYDROGEN_ACCESSOR(Compare) | 874 DECLARE_HYDROGEN_ACCESSOR(Compare) |
| 868 | 875 |
| 869 Token::Value op() const { return hydrogen()->token(); } | 876 Token::Value op() const { return hydrogen()->token(); } |
| 870 }; | 877 }; |
| 871 | 878 |
| 872 | 879 |
| 873 class LCmpTAndBranch: public LControlInstruction<2> { | 880 class LCmpTAndBranch: public LControlInstruction<2, 0> { |
| 874 public: | 881 public: |
| 875 LCmpTAndBranch(LOperand* left, LOperand* right) { | 882 LCmpTAndBranch(LOperand* left, LOperand* right) { |
| 876 inputs_[0] = left; | 883 inputs_[0] = left; |
| 877 inputs_[1] = right; | 884 inputs_[1] = right; |
| 878 } | 885 } |
| 879 | 886 |
| 880 DECLARE_CONCRETE_INSTRUCTION(CmpTAndBranch, "cmp-t-and-branch") | 887 DECLARE_CONCRETE_INSTRUCTION(CmpTAndBranch, "cmp-t-and-branch") |
| 881 DECLARE_HYDROGEN_ACCESSOR(Compare) | 888 DECLARE_HYDROGEN_ACCESSOR(Compare) |
| 882 | 889 |
| 883 Token::Value op() const { return hydrogen()->token(); } | 890 Token::Value op() const { return hydrogen()->token(); } |
| 884 }; | 891 }; |
| 885 | 892 |
| 886 | 893 |
| 887 class LInstanceOf: public LTemplateInstruction<1, 2> { | 894 class LInstanceOf: public LTemplateInstruction<1, 2, 0> { |
| 888 public: | 895 public: |
| 889 LInstanceOf(LOperand* left, LOperand* right) { | 896 LInstanceOf(LOperand* left, LOperand* right) { |
| 890 inputs_[0] = left; | 897 inputs_[0] = left; |
| 891 inputs_[1] = right; | 898 inputs_[1] = right; |
| 892 } | 899 } |
| 893 | 900 |
| 894 DECLARE_CONCRETE_INSTRUCTION(InstanceOf, "instance-of") | 901 DECLARE_CONCRETE_INSTRUCTION(InstanceOf, "instance-of") |
| 895 }; | 902 }; |
| 896 | 903 |
| 897 | 904 |
| 898 class LInstanceOfAndBranch: public LControlInstruction<2> { | 905 class LInstanceOfAndBranch: public LControlInstruction<2, 0> { |
| 899 public: | 906 public: |
| 900 LInstanceOfAndBranch(LOperand* left, LOperand* right) { | 907 LInstanceOfAndBranch(LOperand* left, LOperand* right) { |
| 901 inputs_[0] = left; | 908 inputs_[0] = left; |
| 902 inputs_[1] = right; | 909 inputs_[1] = right; |
| 903 } | 910 } |
| 904 | 911 |
| 905 DECLARE_CONCRETE_INSTRUCTION(InstanceOfAndBranch, "instance-of-and-branch") | 912 DECLARE_CONCRETE_INSTRUCTION(InstanceOfAndBranch, "instance-of-and-branch") |
| 906 }; | 913 }; |
| 907 | 914 |
| 908 | 915 |
| (...skipping 19 matching lines...) Expand all Loading... |
| 928 inputs_[1] = length; | 935 inputs_[1] = length; |
| 929 } | 936 } |
| 930 | 937 |
| 931 LOperand* index() { return inputs_[0]; } | 938 LOperand* index() { return inputs_[0]; } |
| 932 LOperand* length() { return inputs_[1]; } | 939 LOperand* length() { return inputs_[1]; } |
| 933 | 940 |
| 934 DECLARE_CONCRETE_INSTRUCTION(BoundsCheck, "bounds-check") | 941 DECLARE_CONCRETE_INSTRUCTION(BoundsCheck, "bounds-check") |
| 935 }; | 942 }; |
| 936 | 943 |
| 937 | 944 |
| 938 class LBitI: public LTemplateInstruction<1, 2> { | 945 class LBitI: public LTemplateInstruction<1, 2, 0> { |
| 939 public: | 946 public: |
| 940 LBitI(Token::Value op, LOperand* left, LOperand* right) | 947 LBitI(Token::Value op, LOperand* left, LOperand* right) |
| 941 : op_(op) { | 948 : op_(op) { |
| 942 inputs_[0] = left; | 949 inputs_[0] = left; |
| 943 inputs_[1] = right; | 950 inputs_[1] = right; |
| 944 } | 951 } |
| 945 | 952 |
| 946 Token::Value op() const { return op_; } | 953 Token::Value op() const { return op_; } |
| 947 | 954 |
| 948 DECLARE_CONCRETE_INSTRUCTION(BitI, "bit-i") | 955 DECLARE_CONCRETE_INSTRUCTION(BitI, "bit-i") |
| 949 | 956 |
| 950 private: | 957 private: |
| 951 Token::Value op_; | 958 Token::Value op_; |
| 952 }; | 959 }; |
| 953 | 960 |
| 954 | 961 |
| 955 class LShiftI: public LTemplateInstruction<1, 2> { | 962 class LShiftI: public LTemplateInstruction<1, 2, 0> { |
| 956 public: | 963 public: |
| 957 LShiftI(Token::Value op, LOperand* left, LOperand* right, bool can_deopt) | 964 LShiftI(Token::Value op, LOperand* left, LOperand* right, bool can_deopt) |
| 958 : op_(op), can_deopt_(can_deopt) { | 965 : op_(op), can_deopt_(can_deopt) { |
| 959 inputs_[0] = left; | 966 inputs_[0] = left; |
| 960 inputs_[1] = right; | 967 inputs_[1] = right; |
| 961 } | 968 } |
| 962 | 969 |
| 963 Token::Value op() const { return op_; } | 970 Token::Value op() const { return op_; } |
| 964 | 971 |
| 965 bool can_deopt() const { return can_deopt_; } | 972 bool can_deopt() const { return can_deopt_; } |
| 966 | 973 |
| 967 DECLARE_CONCRETE_INSTRUCTION(ShiftI, "shift-i") | 974 DECLARE_CONCRETE_INSTRUCTION(ShiftI, "shift-i") |
| 968 | 975 |
| 969 private: | 976 private: |
| 970 Token::Value op_; | 977 Token::Value op_; |
| 971 bool can_deopt_; | 978 bool can_deopt_; |
| 972 }; | 979 }; |
| 973 | 980 |
| 974 | 981 |
| 975 class LSubI: public LTemplateInstruction<1, 2> { | 982 class LSubI: public LTemplateInstruction<1, 2, 0> { |
| 976 public: | 983 public: |
| 977 LSubI(LOperand* left, LOperand* right) { | 984 LSubI(LOperand* left, LOperand* right) { |
| 978 inputs_[0] = left; | 985 inputs_[0] = left; |
| 979 inputs_[1] = right; | 986 inputs_[1] = right; |
| 980 } | 987 } |
| 981 | 988 |
| 982 DECLARE_CONCRETE_INSTRUCTION(SubI, "sub-i") | 989 DECLARE_CONCRETE_INSTRUCTION(SubI, "sub-i") |
| 983 DECLARE_HYDROGEN_ACCESSOR(Sub) | 990 DECLARE_HYDROGEN_ACCESSOR(Sub) |
| 984 }; | 991 }; |
| 985 | 992 |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1018 explicit LConstantT(Handle<Object> value) : value_(value) { } | 1025 explicit LConstantT(Handle<Object> value) : value_(value) { } |
| 1019 Handle<Object> value() const { return value_; } | 1026 Handle<Object> value() const { return value_; } |
| 1020 | 1027 |
| 1021 DECLARE_CONCRETE_INSTRUCTION(ConstantT, "constant-t") | 1028 DECLARE_CONCRETE_INSTRUCTION(ConstantT, "constant-t") |
| 1022 | 1029 |
| 1023 private: | 1030 private: |
| 1024 Handle<Object> value_; | 1031 Handle<Object> value_; |
| 1025 }; | 1032 }; |
| 1026 | 1033 |
| 1027 | 1034 |
| 1028 class LBranch: public LControlInstruction<1> { | 1035 class LBranch: public LControlInstruction<1, 0> { |
| 1029 public: | 1036 public: |
| 1030 explicit LBranch(LOperand* value) { | 1037 explicit LBranch(LOperand* value) { |
| 1031 inputs_[0] = value; | 1038 inputs_[0] = value; |
| 1032 } | 1039 } |
| 1033 | 1040 |
| 1034 DECLARE_CONCRETE_INSTRUCTION(Branch, "branch") | 1041 DECLARE_CONCRETE_INSTRUCTION(Branch, "branch") |
| 1035 DECLARE_HYDROGEN_ACCESSOR(Value) | 1042 DECLARE_HYDROGEN_ACCESSOR(Value) |
| 1036 | 1043 |
| 1037 virtual void PrintDataTo(StringStream* stream); | 1044 virtual void PrintDataTo(StringStream* stream); |
| 1038 }; | 1045 }; |
| 1039 | 1046 |
| 1040 | 1047 |
| 1041 class LCmpMapAndBranch: public LTemplateInstruction<0, 1> { | 1048 class LCmpMapAndBranch: public LTemplateInstruction<0, 1, 0> { |
| 1042 public: | 1049 public: |
| 1043 explicit LCmpMapAndBranch(LOperand* value) { | 1050 explicit LCmpMapAndBranch(LOperand* value) { |
| 1044 inputs_[0] = value; | 1051 inputs_[0] = value; |
| 1045 } | 1052 } |
| 1046 | 1053 |
| 1047 DECLARE_CONCRETE_INSTRUCTION(CmpMapAndBranch, "cmp-map-and-branch") | 1054 DECLARE_CONCRETE_INSTRUCTION(CmpMapAndBranch, "cmp-map-and-branch") |
| 1048 DECLARE_HYDROGEN_ACCESSOR(CompareMapAndBranch) | 1055 DECLARE_HYDROGEN_ACCESSOR(CompareMap) |
| 1049 | 1056 |
| 1050 virtual bool IsControl() const { return true; } | 1057 virtual bool IsControl() const { return true; } |
| 1051 | 1058 |
| 1052 Handle<Map> map() const { return hydrogen()->map(); } | 1059 Handle<Map> map() const { return hydrogen()->map(); } |
| 1053 int true_block_id() const { | 1060 int true_block_id() const { |
| 1054 return hydrogen()->true_destination()->block_id(); | 1061 return hydrogen()->FirstSuccessor()->block_id(); |
| 1055 } | 1062 } |
| 1056 int false_block_id() const { | 1063 int false_block_id() const { |
| 1057 return hydrogen()->false_destination()->block_id(); | 1064 return hydrogen()->SecondSuccessor()->block_id(); |
| 1058 } | 1065 } |
| 1059 }; | 1066 }; |
| 1060 | 1067 |
| 1061 | 1068 |
| 1062 class LJSArrayLength: public LTemplateInstruction<1, 1> { | 1069 class LJSArrayLength: public LTemplateInstruction<1, 1, 0> { |
| 1063 public: | 1070 public: |
| 1064 explicit LJSArrayLength(LOperand* value) { | 1071 explicit LJSArrayLength(LOperand* value) { |
| 1065 inputs_[0] = value; | 1072 inputs_[0] = value; |
| 1066 } | 1073 } |
| 1067 | 1074 |
| 1068 DECLARE_CONCRETE_INSTRUCTION(JSArrayLength, "js-array-length") | 1075 DECLARE_CONCRETE_INSTRUCTION(JSArrayLength, "js-array-length") |
| 1069 DECLARE_HYDROGEN_ACCESSOR(JSArrayLength) | 1076 DECLARE_HYDROGEN_ACCESSOR(JSArrayLength) |
| 1070 }; | 1077 }; |
| 1071 | 1078 |
| 1072 | 1079 |
| 1073 class LFixedArrayLength: public LTemplateInstruction<1, 1> { | 1080 class LFixedArrayLength: public LTemplateInstruction<1, 1, 0> { |
| 1074 public: | 1081 public: |
| 1075 explicit LFixedArrayLength(LOperand* value) { | 1082 explicit LFixedArrayLength(LOperand* value) { |
| 1076 inputs_[0] = value; | 1083 inputs_[0] = value; |
| 1077 } | 1084 } |
| 1078 | 1085 |
| 1079 DECLARE_CONCRETE_INSTRUCTION(FixedArrayLength, "fixed-array-length") | 1086 DECLARE_CONCRETE_INSTRUCTION(FixedArrayLength, "fixed-array-length") |
| 1080 DECLARE_HYDROGEN_ACCESSOR(FixedArrayLength) | 1087 DECLARE_HYDROGEN_ACCESSOR(FixedArrayLength) |
| 1081 }; | 1088 }; |
| 1082 | 1089 |
| 1083 | 1090 |
| 1084 class LValueOf: public LTemplateInstruction<1, 1, 1> { | 1091 class LValueOf: public LTemplateInstruction<1, 1, 1> { |
| 1085 public: | 1092 public: |
| 1086 LValueOf(LOperand* value, LOperand* temp) { | 1093 LValueOf(LOperand* value, LOperand* temp) { |
| 1087 inputs_[0] = value; | 1094 inputs_[0] = value; |
| 1088 temps_[0] = temp; | 1095 temps_[0] = temp; |
| 1089 } | 1096 } |
| 1090 | 1097 |
| 1091 DECLARE_CONCRETE_INSTRUCTION(ValueOf, "value-of") | 1098 DECLARE_CONCRETE_INSTRUCTION(ValueOf, "value-of") |
| 1092 DECLARE_HYDROGEN_ACCESSOR(ValueOf) | 1099 DECLARE_HYDROGEN_ACCESSOR(ValueOf) |
| 1093 }; | 1100 }; |
| 1094 | 1101 |
| 1095 | 1102 |
| 1096 class LThrow: public LTemplateInstruction<0, 1> { | 1103 class LThrow: public LTemplateInstruction<0, 1, 0> { |
| 1097 public: | 1104 public: |
| 1098 explicit LThrow(LOperand* value) { | 1105 explicit LThrow(LOperand* value) { |
| 1099 inputs_[0] = value; | 1106 inputs_[0] = value; |
| 1100 } | 1107 } |
| 1101 | 1108 |
| 1102 DECLARE_CONCRETE_INSTRUCTION(Throw, "throw") | 1109 DECLARE_CONCRETE_INSTRUCTION(Throw, "throw") |
| 1103 }; | 1110 }; |
| 1104 | 1111 |
| 1105 | 1112 |
| 1106 class LBitNotI: public LTemplateInstruction<1, 1> { | 1113 class LBitNotI: public LTemplateInstruction<1, 1, 0> { |
| 1107 public: | 1114 public: |
| 1108 explicit LBitNotI(LOperand* value) { | 1115 explicit LBitNotI(LOperand* value) { |
| 1109 inputs_[0] = value; | 1116 inputs_[0] = value; |
| 1110 } | 1117 } |
| 1111 | 1118 |
| 1112 DECLARE_CONCRETE_INSTRUCTION(BitNotI, "bit-not-i") | 1119 DECLARE_CONCRETE_INSTRUCTION(BitNotI, "bit-not-i") |
| 1113 }; | 1120 }; |
| 1114 | 1121 |
| 1115 | 1122 |
| 1116 class LAddI: public LTemplateInstruction<1, 2> { | 1123 class LAddI: public LTemplateInstruction<1, 2, 0> { |
| 1117 public: | 1124 public: |
| 1118 LAddI(LOperand* left, LOperand* right) { | 1125 LAddI(LOperand* left, LOperand* right) { |
| 1119 inputs_[0] = left; | 1126 inputs_[0] = left; |
| 1120 inputs_[1] = right; | 1127 inputs_[1] = right; |
| 1121 } | 1128 } |
| 1122 | 1129 |
| 1123 DECLARE_CONCRETE_INSTRUCTION(AddI, "add-i") | 1130 DECLARE_CONCRETE_INSTRUCTION(AddI, "add-i") |
| 1124 DECLARE_HYDROGEN_ACCESSOR(Add) | 1131 DECLARE_HYDROGEN_ACCESSOR(Add) |
| 1125 }; | 1132 }; |
| 1126 | 1133 |
| 1127 | 1134 |
| 1128 class LPower: public LTemplateInstruction<1, 2> { | 1135 class LPower: public LTemplateInstruction<1, 2, 0> { |
| 1129 public: | 1136 public: |
| 1130 LPower(LOperand* left, LOperand* right) { | 1137 LPower(LOperand* left, LOperand* right) { |
| 1131 inputs_[0] = left; | 1138 inputs_[0] = left; |
| 1132 inputs_[1] = right; | 1139 inputs_[1] = right; |
| 1133 } | 1140 } |
| 1134 | 1141 |
| 1135 DECLARE_CONCRETE_INSTRUCTION(Power, "power") | 1142 DECLARE_CONCRETE_INSTRUCTION(Power, "power") |
| 1136 DECLARE_HYDROGEN_ACCESSOR(Power) | 1143 DECLARE_HYDROGEN_ACCESSOR(Power) |
| 1137 }; | 1144 }; |
| 1138 | 1145 |
| 1139 | 1146 |
| 1140 class LArithmeticD: public LTemplateInstruction<1, 2> { | 1147 class LArithmeticD: public LTemplateInstruction<1, 2, 0> { |
| 1141 public: | 1148 public: |
| 1142 LArithmeticD(Token::Value op, LOperand* left, LOperand* right) | 1149 LArithmeticD(Token::Value op, LOperand* left, LOperand* right) |
| 1143 : op_(op) { | 1150 : op_(op) { |
| 1144 inputs_[0] = left; | 1151 inputs_[0] = left; |
| 1145 inputs_[1] = right; | 1152 inputs_[1] = right; |
| 1146 } | 1153 } |
| 1147 | 1154 |
| 1148 Token::Value op() const { return op_; } | 1155 Token::Value op() const { return op_; } |
| 1149 | 1156 |
| 1150 virtual void CompileToNative(LCodeGen* generator); | 1157 virtual void CompileToNative(LCodeGen* generator); |
| 1151 virtual const char* Mnemonic() const; | 1158 virtual const char* Mnemonic() const; |
| 1152 | 1159 |
| 1153 private: | 1160 private: |
| 1154 Token::Value op_; | 1161 Token::Value op_; |
| 1155 }; | 1162 }; |
| 1156 | 1163 |
| 1157 | 1164 |
| 1158 class LArithmeticT: public LTemplateInstruction<1, 2> { | 1165 class LArithmeticT: public LTemplateInstruction<1, 2, 0> { |
| 1159 public: | 1166 public: |
| 1160 LArithmeticT(Token::Value op, LOperand* left, LOperand* right) | 1167 LArithmeticT(Token::Value op, LOperand* left, LOperand* right) |
| 1161 : op_(op) { | 1168 : op_(op) { |
| 1162 inputs_[0] = left; | 1169 inputs_[0] = left; |
| 1163 inputs_[1] = right; | 1170 inputs_[1] = right; |
| 1164 } | 1171 } |
| 1165 | 1172 |
| 1166 virtual void CompileToNative(LCodeGen* generator); | 1173 virtual void CompileToNative(LCodeGen* generator); |
| 1167 virtual const char* Mnemonic() const; | 1174 virtual const char* Mnemonic() const; |
| 1168 | 1175 |
| 1169 Token::Value op() const { return op_; } | 1176 Token::Value op() const { return op_; } |
| 1170 | 1177 |
| 1171 private: | 1178 private: |
| 1172 Token::Value op_; | 1179 Token::Value op_; |
| 1173 }; | 1180 }; |
| 1174 | 1181 |
| 1175 | 1182 |
| 1176 class LReturn: public LTemplateInstruction<0, 1> { | 1183 class LReturn: public LTemplateInstruction<0, 1, 0> { |
| 1177 public: | 1184 public: |
| 1178 explicit LReturn(LOperand* value) { | 1185 explicit LReturn(LOperand* value) { |
| 1179 inputs_[0] = value; | 1186 inputs_[0] = value; |
| 1180 } | 1187 } |
| 1181 | 1188 |
| 1182 DECLARE_CONCRETE_INSTRUCTION(Return, "return") | 1189 DECLARE_CONCRETE_INSTRUCTION(Return, "return") |
| 1183 }; | 1190 }; |
| 1184 | 1191 |
| 1185 | 1192 |
| 1186 class LLoadNamedField: public LTemplateInstruction<1, 1> { | 1193 class LLoadNamedField: public LTemplateInstruction<1, 1, 0> { |
| 1187 public: | 1194 public: |
| 1188 explicit LLoadNamedField(LOperand* object) { | 1195 explicit LLoadNamedField(LOperand* object) { |
| 1189 inputs_[0] = object; | 1196 inputs_[0] = object; |
| 1190 } | 1197 } |
| 1191 | 1198 |
| 1192 DECLARE_CONCRETE_INSTRUCTION(LoadNamedField, "load-named-field") | 1199 DECLARE_CONCRETE_INSTRUCTION(LoadNamedField, "load-named-field") |
| 1193 DECLARE_HYDROGEN_ACCESSOR(LoadNamedField) | 1200 DECLARE_HYDROGEN_ACCESSOR(LoadNamedField) |
| 1194 }; | 1201 }; |
| 1195 | 1202 |
| 1196 | 1203 |
| 1197 class LLoadNamedGeneric: public LTemplateInstruction<1, 1> { | 1204 class LLoadNamedGeneric: public LTemplateInstruction<1, 1, 0> { |
| 1198 public: | 1205 public: |
| 1199 explicit LLoadNamedGeneric(LOperand* object) { | 1206 explicit LLoadNamedGeneric(LOperand* object) { |
| 1200 inputs_[0] = object; | 1207 inputs_[0] = object; |
| 1201 } | 1208 } |
| 1202 | 1209 |
| 1203 DECLARE_CONCRETE_INSTRUCTION(LoadNamedGeneric, "load-named-generic") | 1210 DECLARE_CONCRETE_INSTRUCTION(LoadNamedGeneric, "load-named-generic") |
| 1204 DECLARE_HYDROGEN_ACCESSOR(LoadNamedGeneric) | 1211 DECLARE_HYDROGEN_ACCESSOR(LoadNamedGeneric) |
| 1205 | 1212 |
| 1206 LOperand* object() { return inputs_[0]; } | 1213 LOperand* object() { return inputs_[0]; } |
| 1207 Handle<Object> name() const { return hydrogen()->name(); } | 1214 Handle<Object> name() const { return hydrogen()->name(); } |
| 1208 }; | 1215 }; |
| 1209 | 1216 |
| 1210 | 1217 |
| 1211 class LLoadFunctionPrototype: public LTemplateInstruction<1, 1, 1> { | 1218 class LLoadFunctionPrototype: public LTemplateInstruction<1, 1, 1> { |
| 1212 public: | 1219 public: |
| 1213 LLoadFunctionPrototype(LOperand* function, LOperand* temp) { | 1220 LLoadFunctionPrototype(LOperand* function, LOperand* temp) { |
| 1214 inputs_[0] = function; | 1221 inputs_[0] = function; |
| 1215 temps_[0] = temp; | 1222 temps_[0] = temp; |
| 1216 } | 1223 } |
| 1217 | 1224 |
| 1218 DECLARE_CONCRETE_INSTRUCTION(LoadFunctionPrototype, "load-function-prototype") | 1225 DECLARE_CONCRETE_INSTRUCTION(LoadFunctionPrototype, "load-function-prototype") |
| 1219 DECLARE_HYDROGEN_ACCESSOR(LoadFunctionPrototype) | 1226 DECLARE_HYDROGEN_ACCESSOR(LoadFunctionPrototype) |
| 1220 | 1227 |
| 1221 LOperand* function() { return inputs_[0]; } | 1228 LOperand* function() { return inputs_[0]; } |
| 1222 }; | 1229 }; |
| 1223 | 1230 |
| 1224 | 1231 |
| 1225 class LLoadElements: public LTemplateInstruction<1, 1> { | 1232 class LLoadElements: public LTemplateInstruction<1, 1, 0> { |
| 1226 public: | 1233 public: |
| 1227 explicit LLoadElements(LOperand* object) { | 1234 explicit LLoadElements(LOperand* object) { |
| 1228 inputs_[0] = object; | 1235 inputs_[0] = object; |
| 1229 } | 1236 } |
| 1230 | 1237 |
| 1231 DECLARE_CONCRETE_INSTRUCTION(LoadElements, "load-elements") | 1238 DECLARE_CONCRETE_INSTRUCTION(LoadElements, "load-elements") |
| 1232 }; | 1239 }; |
| 1233 | 1240 |
| 1234 | 1241 |
| 1235 class LLoadKeyedFastElement: public LTemplateInstruction<1, 2> { | 1242 class LLoadKeyedFastElement: public LTemplateInstruction<1, 2, 0> { |
| 1236 public: | 1243 public: |
| 1237 LLoadKeyedFastElement(LOperand* elements, LOperand* key) { | 1244 LLoadKeyedFastElement(LOperand* elements, LOperand* key) { |
| 1238 inputs_[0] = elements; | 1245 inputs_[0] = elements; |
| 1239 inputs_[1] = key; | 1246 inputs_[1] = key; |
| 1240 } | 1247 } |
| 1241 | 1248 |
| 1242 DECLARE_CONCRETE_INSTRUCTION(LoadKeyedFastElement, "load-keyed-fast-element") | 1249 DECLARE_CONCRETE_INSTRUCTION(LoadKeyedFastElement, "load-keyed-fast-element") |
| 1243 DECLARE_HYDROGEN_ACCESSOR(LoadKeyedFastElement) | 1250 DECLARE_HYDROGEN_ACCESSOR(LoadKeyedFastElement) |
| 1244 | 1251 |
| 1245 LOperand* elements() { return inputs_[0]; } | 1252 LOperand* elements() { return inputs_[0]; } |
| 1246 LOperand* key() { return inputs_[1]; } | 1253 LOperand* key() { return inputs_[1]; } |
| 1247 }; | 1254 }; |
| 1248 | 1255 |
| 1249 | 1256 |
| 1250 class LLoadKeyedGeneric: public LTemplateInstruction<1, 2> { | 1257 class LLoadKeyedGeneric: public LTemplateInstruction<1, 2, 0> { |
| 1251 public: | 1258 public: |
| 1252 LLoadKeyedGeneric(LOperand* obj, LOperand* key) { | 1259 LLoadKeyedGeneric(LOperand* obj, LOperand* key) { |
| 1253 inputs_[0] = obj; | 1260 inputs_[0] = obj; |
| 1254 inputs_[1] = key; | 1261 inputs_[1] = key; |
| 1255 } | 1262 } |
| 1256 | 1263 |
| 1257 DECLARE_CONCRETE_INSTRUCTION(LoadKeyedGeneric, "load-keyed-generic") | 1264 DECLARE_CONCRETE_INSTRUCTION(LoadKeyedGeneric, "load-keyed-generic") |
| 1258 | 1265 |
| 1259 LOperand* object() { return inputs_[0]; } | 1266 LOperand* object() { return inputs_[0]; } |
| 1260 LOperand* key() { return inputs_[1]; } | 1267 LOperand* key() { return inputs_[1]; } |
| 1261 }; | 1268 }; |
| 1262 | 1269 |
| 1263 | 1270 |
| 1264 class LLoadGlobal: public LTemplateInstruction<1, 0, 0> { | 1271 class LLoadGlobal: public LTemplateInstruction<1, 0, 0> { |
| 1265 public: | 1272 public: |
| 1266 DECLARE_CONCRETE_INSTRUCTION(LoadGlobal, "load-global") | 1273 DECLARE_CONCRETE_INSTRUCTION(LoadGlobal, "load-global") |
| 1267 DECLARE_HYDROGEN_ACCESSOR(LoadGlobal) | 1274 DECLARE_HYDROGEN_ACCESSOR(LoadGlobal) |
| 1268 }; | 1275 }; |
| 1269 | 1276 |
| 1270 | 1277 |
| 1271 class LStoreGlobal: public LTemplateInstruction<0, 1> { | 1278 class LStoreGlobal: public LTemplateInstruction<0, 1, 0> { |
| 1272 public: | 1279 public: |
| 1273 explicit LStoreGlobal(LOperand* value) { | 1280 explicit LStoreGlobal(LOperand* value) { |
| 1274 inputs_[0] = value; | 1281 inputs_[0] = value; |
| 1275 } | 1282 } |
| 1276 | 1283 |
| 1277 DECLARE_CONCRETE_INSTRUCTION(StoreGlobal, "store-global") | 1284 DECLARE_CONCRETE_INSTRUCTION(StoreGlobal, "store-global") |
| 1278 DECLARE_HYDROGEN_ACCESSOR(StoreGlobal) | 1285 DECLARE_HYDROGEN_ACCESSOR(StoreGlobal) |
| 1279 }; | 1286 }; |
| 1280 | 1287 |
| 1281 | 1288 |
| 1282 class LLoadContextSlot: public LTemplateInstruction<1, 0, 0> { | 1289 class LLoadContextSlot: public LTemplateInstruction<1, 0, 0> { |
| 1283 public: | 1290 public: |
| 1284 DECLARE_CONCRETE_INSTRUCTION(LoadContextSlot, "load-context-slot") | 1291 DECLARE_CONCRETE_INSTRUCTION(LoadContextSlot, "load-context-slot") |
| 1285 DECLARE_HYDROGEN_ACCESSOR(LoadContextSlot) | 1292 DECLARE_HYDROGEN_ACCESSOR(LoadContextSlot) |
| 1286 | 1293 |
| 1287 int context_chain_length() { return hydrogen()->context_chain_length(); } | 1294 int context_chain_length() { return hydrogen()->context_chain_length(); } |
| 1288 int slot_index() { return hydrogen()->slot_index(); } | 1295 int slot_index() { return hydrogen()->slot_index(); } |
| 1289 | 1296 |
| 1290 virtual void PrintDataTo(StringStream* stream); | 1297 virtual void PrintDataTo(StringStream* stream); |
| 1291 }; | 1298 }; |
| 1292 | 1299 |
| 1293 | 1300 |
| 1294 class LPushArgument: public LTemplateInstruction<0, 1> { | 1301 class LPushArgument: public LTemplateInstruction<0, 1, 0> { |
| 1295 public: | 1302 public: |
| 1296 explicit LPushArgument(LOperand* value) { | 1303 explicit LPushArgument(LOperand* value) { |
| 1297 inputs_[0] = value; | 1304 inputs_[0] = value; |
| 1298 } | 1305 } |
| 1299 | 1306 |
| 1300 DECLARE_CONCRETE_INSTRUCTION(PushArgument, "push-argument") | 1307 DECLARE_CONCRETE_INSTRUCTION(PushArgument, "push-argument") |
| 1301 }; | 1308 }; |
| 1302 | 1309 |
| 1303 | 1310 |
| 1304 class LGlobalObject: public LTemplateInstruction<1, 0, 0> { | 1311 class LGlobalObject: public LTemplateInstruction<1, 0, 0> { |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1378 DECLARE_CONCRETE_INSTRUCTION(CallKnownGlobal, "call-known-global") | 1385 DECLARE_CONCRETE_INSTRUCTION(CallKnownGlobal, "call-known-global") |
| 1379 DECLARE_HYDROGEN_ACCESSOR(CallKnownGlobal) | 1386 DECLARE_HYDROGEN_ACCESSOR(CallKnownGlobal) |
| 1380 | 1387 |
| 1381 virtual void PrintDataTo(StringStream* stream); | 1388 virtual void PrintDataTo(StringStream* stream); |
| 1382 | 1389 |
| 1383 Handle<JSFunction> target() const { return hydrogen()->target(); } | 1390 Handle<JSFunction> target() const { return hydrogen()->target(); } |
| 1384 int arity() const { return hydrogen()->argument_count() - 1; } | 1391 int arity() const { return hydrogen()->argument_count() - 1; } |
| 1385 }; | 1392 }; |
| 1386 | 1393 |
| 1387 | 1394 |
| 1388 class LCallNew: public LTemplateInstruction<1, 1> { | 1395 class LCallNew: public LTemplateInstruction<1, 1, 0> { |
| 1389 public: | 1396 public: |
| 1390 explicit LCallNew(LOperand* constructor) { | 1397 explicit LCallNew(LOperand* constructor) { |
| 1391 inputs_[0] = constructor; | 1398 inputs_[0] = constructor; |
| 1392 } | 1399 } |
| 1393 | 1400 |
| 1394 DECLARE_CONCRETE_INSTRUCTION(CallNew, "call-new") | 1401 DECLARE_CONCRETE_INSTRUCTION(CallNew, "call-new") |
| 1395 DECLARE_HYDROGEN_ACCESSOR(CallNew) | 1402 DECLARE_HYDROGEN_ACCESSOR(CallNew) |
| 1396 | 1403 |
| 1397 virtual void PrintDataTo(StringStream* stream); | 1404 virtual void PrintDataTo(StringStream* stream); |
| 1398 | 1405 |
| 1399 int arity() const { return hydrogen()->argument_count() - 1; } | 1406 int arity() const { return hydrogen()->argument_count() - 1; } |
| 1400 }; | 1407 }; |
| 1401 | 1408 |
| 1402 | 1409 |
| 1403 class LCallRuntime: public LTemplateInstruction<1, 0, 0> { | 1410 class LCallRuntime: public LTemplateInstruction<1, 0, 0> { |
| 1404 public: | 1411 public: |
| 1405 DECLARE_CONCRETE_INSTRUCTION(CallRuntime, "call-runtime") | 1412 DECLARE_CONCRETE_INSTRUCTION(CallRuntime, "call-runtime") |
| 1406 DECLARE_HYDROGEN_ACCESSOR(CallRuntime) | 1413 DECLARE_HYDROGEN_ACCESSOR(CallRuntime) |
| 1407 | 1414 |
| 1408 Runtime::Function* function() const { return hydrogen()->function(); } | 1415 Runtime::Function* function() const { return hydrogen()->function(); } |
| 1409 int arity() const { return hydrogen()->argument_count(); } | 1416 int arity() const { return hydrogen()->argument_count(); } |
| 1410 }; | 1417 }; |
| 1411 | 1418 |
| 1412 | 1419 |
| 1413 class LInteger32ToDouble: public LTemplateInstruction<1, 1> { | 1420 class LInteger32ToDouble: public LTemplateInstruction<1, 1, 0> { |
| 1414 public: | 1421 public: |
| 1415 explicit LInteger32ToDouble(LOperand* value) { | 1422 explicit LInteger32ToDouble(LOperand* value) { |
| 1416 inputs_[0] = value; | 1423 inputs_[0] = value; |
| 1417 } | 1424 } |
| 1418 | 1425 |
| 1419 DECLARE_CONCRETE_INSTRUCTION(Integer32ToDouble, "int32-to-double") | 1426 DECLARE_CONCRETE_INSTRUCTION(Integer32ToDouble, "int32-to-double") |
| 1420 }; | 1427 }; |
| 1421 | 1428 |
| 1422 | 1429 |
| 1423 class LNumberTagI: public LTemplateInstruction<1, 1> { | 1430 class LNumberTagI: public LTemplateInstruction<1, 1, 0> { |
| 1424 public: | 1431 public: |
| 1425 explicit LNumberTagI(LOperand* value) { | 1432 explicit LNumberTagI(LOperand* value) { |
| 1426 inputs_[0] = value; | 1433 inputs_[0] = value; |
| 1427 } | 1434 } |
| 1428 | 1435 |
| 1429 DECLARE_CONCRETE_INSTRUCTION(NumberTagI, "number-tag-i") | 1436 DECLARE_CONCRETE_INSTRUCTION(NumberTagI, "number-tag-i") |
| 1430 }; | 1437 }; |
| 1431 | 1438 |
| 1432 | 1439 |
| 1433 class LNumberTagD: public LTemplateInstruction<1, 1, 1> { | 1440 class LNumberTagD: public LTemplateInstruction<1, 1, 1> { |
| 1434 public: | 1441 public: |
| 1435 explicit LNumberTagD(LOperand* value, LOperand* temp) { | 1442 LNumberTagD(LOperand* value, LOperand* temp) { |
| 1436 inputs_[0] = value; | 1443 inputs_[0] = value; |
| 1437 temps_[0] = temp; | 1444 temps_[0] = temp; |
| 1438 } | 1445 } |
| 1439 | 1446 |
| 1440 DECLARE_CONCRETE_INSTRUCTION(NumberTagD, "number-tag-d") | 1447 DECLARE_CONCRETE_INSTRUCTION(NumberTagD, "number-tag-d") |
| 1441 }; | 1448 }; |
| 1442 | 1449 |
| 1443 | 1450 |
| 1444 // Sometimes truncating conversion from a tagged value to an int32. | 1451 // Sometimes truncating conversion from a tagged value to an int32. |
| 1445 class LDoubleToI: public LTemplateInstruction<1, 1, 1> { | 1452 class LDoubleToI: public LTemplateInstruction<1, 1, 1> { |
| (...skipping 18 matching lines...) Expand all Loading... |
| 1464 temps_[0] = temp; | 1471 temps_[0] = temp; |
| 1465 } | 1472 } |
| 1466 | 1473 |
| 1467 DECLARE_CONCRETE_INSTRUCTION(TaggedToI, "tagged-to-i") | 1474 DECLARE_CONCRETE_INSTRUCTION(TaggedToI, "tagged-to-i") |
| 1468 DECLARE_HYDROGEN_ACCESSOR(Change) | 1475 DECLARE_HYDROGEN_ACCESSOR(Change) |
| 1469 | 1476 |
| 1470 bool truncating() { return hydrogen()->CanTruncateToInt32(); } | 1477 bool truncating() { return hydrogen()->CanTruncateToInt32(); } |
| 1471 }; | 1478 }; |
| 1472 | 1479 |
| 1473 | 1480 |
| 1474 class LSmiTag: public LTemplateInstruction<1, 1> { | 1481 class LSmiTag: public LTemplateInstruction<1, 1, 0> { |
| 1475 public: | 1482 public: |
| 1476 explicit LSmiTag(LOperand* value) { | 1483 explicit LSmiTag(LOperand* value) { |
| 1477 inputs_[0] = value; | 1484 inputs_[0] = value; |
| 1478 } | 1485 } |
| 1479 | 1486 |
| 1480 DECLARE_CONCRETE_INSTRUCTION(SmiTag, "smi-tag") | 1487 DECLARE_CONCRETE_INSTRUCTION(SmiTag, "smi-tag") |
| 1481 }; | 1488 }; |
| 1482 | 1489 |
| 1483 | 1490 |
| 1484 class LNumberUntagD: public LTemplateInstruction<1, 1> { | 1491 class LNumberUntagD: public LTemplateInstruction<1, 1, 0> { |
| 1485 public: | 1492 public: |
| 1486 explicit LNumberUntagD(LOperand* value) { | 1493 explicit LNumberUntagD(LOperand* value) { |
| 1487 inputs_[0] = value; | 1494 inputs_[0] = value; |
| 1488 } | 1495 } |
| 1489 | 1496 |
| 1490 DECLARE_CONCRETE_INSTRUCTION(NumberUntagD, "double-untag") | 1497 DECLARE_CONCRETE_INSTRUCTION(NumberUntagD, "double-untag") |
| 1491 }; | 1498 }; |
| 1492 | 1499 |
| 1493 | 1500 |
| 1494 class LSmiUntag: public LTemplateInstruction<1, 1> { | 1501 class LSmiUntag: public LTemplateInstruction<1, 1, 0> { |
| 1495 public: | 1502 public: |
| 1496 LSmiUntag(LOperand* value, bool needs_check) | 1503 LSmiUntag(LOperand* value, bool needs_check) |
| 1497 : needs_check_(needs_check) { | 1504 : needs_check_(needs_check) { |
| 1498 inputs_[0] = value; | 1505 inputs_[0] = value; |
| 1499 } | 1506 } |
| 1500 | 1507 |
| 1501 DECLARE_CONCRETE_INSTRUCTION(SmiUntag, "smi-untag") | 1508 DECLARE_CONCRETE_INSTRUCTION(SmiUntag, "smi-untag") |
| 1502 | 1509 |
| 1503 bool needs_check() const { return needs_check_; } | 1510 bool needs_check() const { return needs_check_; } |
| 1504 | 1511 |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1583 | 1590 |
| 1584 class LStoreKeyedGeneric: public LStoreKeyed { | 1591 class LStoreKeyedGeneric: public LStoreKeyed { |
| 1585 public: | 1592 public: |
| 1586 LStoreKeyedGeneric(LOperand* obj, LOperand* key, LOperand* val) | 1593 LStoreKeyedGeneric(LOperand* obj, LOperand* key, LOperand* val) |
| 1587 : LStoreKeyed(obj, key, val) { } | 1594 : LStoreKeyed(obj, key, val) { } |
| 1588 | 1595 |
| 1589 DECLARE_CONCRETE_INSTRUCTION(StoreKeyedGeneric, "store-keyed-generic") | 1596 DECLARE_CONCRETE_INSTRUCTION(StoreKeyedGeneric, "store-keyed-generic") |
| 1590 }; | 1597 }; |
| 1591 | 1598 |
| 1592 | 1599 |
| 1593 class LCheckFunction: public LTemplateInstruction<0, 1> { | 1600 class LStringCharCodeAt: public LTemplateInstruction<1, 2, 0> { |
| 1601 public: |
| 1602 LStringCharCodeAt(LOperand* string, LOperand* index) { |
| 1603 inputs_[0] = string; |
| 1604 inputs_[1] = index; |
| 1605 } |
| 1606 |
| 1607 DECLARE_CONCRETE_INSTRUCTION(StringCharCodeAt, "string-char-code-at") |
| 1608 DECLARE_HYDROGEN_ACCESSOR(StringCharCodeAt) |
| 1609 |
| 1610 LOperand* string() { return inputs_[0]; } |
| 1611 LOperand* index() { return inputs_[1]; } |
| 1612 }; |
| 1613 |
| 1614 |
| 1615 class LStringLength: public LTemplateInstruction<1, 1, 0> { |
| 1616 public: |
| 1617 explicit LStringLength(LOperand* string) { |
| 1618 inputs_[0] = string; |
| 1619 } |
| 1620 |
| 1621 DECLARE_CONCRETE_INSTRUCTION(StringLength, "string-length") |
| 1622 DECLARE_HYDROGEN_ACCESSOR(StringLength) |
| 1623 |
| 1624 LOperand* string() { return inputs_[0]; } |
| 1625 }; |
| 1626 |
| 1627 |
| 1628 class LCheckFunction: public LTemplateInstruction<0, 1, 0> { |
| 1594 public: | 1629 public: |
| 1595 explicit LCheckFunction(LOperand* value) { | 1630 explicit LCheckFunction(LOperand* value) { |
| 1596 inputs_[0] = value; | 1631 inputs_[0] = value; |
| 1597 } | 1632 } |
| 1598 | 1633 |
| 1599 DECLARE_CONCRETE_INSTRUCTION(CheckFunction, "check-function") | 1634 DECLARE_CONCRETE_INSTRUCTION(CheckFunction, "check-function") |
| 1600 DECLARE_HYDROGEN_ACCESSOR(CheckFunction) | 1635 DECLARE_HYDROGEN_ACCESSOR(CheckFunction) |
| 1601 }; | 1636 }; |
| 1602 | 1637 |
| 1603 | 1638 |
| 1604 class LCheckInstanceType: public LTemplateInstruction<0, 1, 1> { | 1639 class LCheckInstanceType: public LTemplateInstruction<0, 1, 1> { |
| 1605 public: | 1640 public: |
| 1606 LCheckInstanceType(LOperand* value, LOperand* temp) { | 1641 LCheckInstanceType(LOperand* value, LOperand* temp) { |
| 1607 inputs_[0] = value; | 1642 inputs_[0] = value; |
| 1608 temps_[0] = temp; | 1643 temps_[0] = temp; |
| 1609 } | 1644 } |
| 1610 | 1645 |
| 1611 DECLARE_CONCRETE_INSTRUCTION(CheckInstanceType, "check-instance-type") | 1646 DECLARE_CONCRETE_INSTRUCTION(CheckInstanceType, "check-instance-type") |
| 1612 DECLARE_HYDROGEN_ACCESSOR(CheckInstanceType) | 1647 DECLARE_HYDROGEN_ACCESSOR(CheckInstanceType) |
| 1613 }; | 1648 }; |
| 1614 | 1649 |
| 1615 | 1650 |
| 1616 class LCheckMap: public LTemplateInstruction<0, 1> { | 1651 class LCheckMap: public LTemplateInstruction<0, 1, 0> { |
| 1617 public: | 1652 public: |
| 1618 explicit LCheckMap(LOperand* value) { | 1653 explicit LCheckMap(LOperand* value) { |
| 1619 inputs_[0] = value; | 1654 inputs_[0] = value; |
| 1620 } | 1655 } |
| 1621 | 1656 |
| 1622 DECLARE_CONCRETE_INSTRUCTION(CheckMap, "check-map") | 1657 DECLARE_CONCRETE_INSTRUCTION(CheckMap, "check-map") |
| 1623 DECLARE_HYDROGEN_ACCESSOR(CheckMap) | 1658 DECLARE_HYDROGEN_ACCESSOR(CheckMap) |
| 1624 }; | 1659 }; |
| 1625 | 1660 |
| 1626 | 1661 |
| 1627 class LCheckPrototypeMaps: public LTemplateInstruction<0, 0, 1> { | 1662 class LCheckPrototypeMaps: public LTemplateInstruction<0, 0, 1> { |
| 1628 public: | 1663 public: |
| 1629 explicit LCheckPrototypeMaps(LOperand* temp) { | 1664 explicit LCheckPrototypeMaps(LOperand* temp) { |
| 1630 temps_[0] = temp; | 1665 temps_[0] = temp; |
| 1631 } | 1666 } |
| 1632 | 1667 |
| 1633 DECLARE_CONCRETE_INSTRUCTION(CheckPrototypeMaps, "check-prototype-maps") | 1668 DECLARE_CONCRETE_INSTRUCTION(CheckPrototypeMaps, "check-prototype-maps") |
| 1634 DECLARE_HYDROGEN_ACCESSOR(CheckPrototypeMaps) | 1669 DECLARE_HYDROGEN_ACCESSOR(CheckPrototypeMaps) |
| 1635 | 1670 |
| 1636 Handle<JSObject> prototype() const { return hydrogen()->prototype(); } | 1671 Handle<JSObject> prototype() const { return hydrogen()->prototype(); } |
| 1637 Handle<JSObject> holder() const { return hydrogen()->holder(); } | 1672 Handle<JSObject> holder() const { return hydrogen()->holder(); } |
| 1638 }; | 1673 }; |
| 1639 | 1674 |
| 1640 | 1675 |
| 1641 class LCheckSmi: public LTemplateInstruction<0, 1> { | 1676 class LCheckSmi: public LTemplateInstruction<0, 1, 0> { |
| 1642 public: | 1677 public: |
| 1643 LCheckSmi(LOperand* value, Condition condition) | 1678 LCheckSmi(LOperand* value, Condition condition) |
| 1644 : condition_(condition) { | 1679 : condition_(condition) { |
| 1645 inputs_[0] = value; | 1680 inputs_[0] = value; |
| 1646 } | 1681 } |
| 1647 | 1682 |
| 1648 Condition condition() const { return condition_; } | 1683 Condition condition() const { return condition_; } |
| 1649 | 1684 |
| 1650 virtual void CompileToNative(LCodeGen* generator); | 1685 virtual void CompileToNative(LCodeGen* generator); |
| 1651 virtual const char* Mnemonic() const { | 1686 virtual const char* Mnemonic() const { |
| (...skipping 28 matching lines...) Expand all Loading... |
| 1680 | 1715 |
| 1681 class LFunctionLiteral: public LTemplateInstruction<1, 0, 0> { | 1716 class LFunctionLiteral: public LTemplateInstruction<1, 0, 0> { |
| 1682 public: | 1717 public: |
| 1683 DECLARE_CONCRETE_INSTRUCTION(FunctionLiteral, "function-literal") | 1718 DECLARE_CONCRETE_INSTRUCTION(FunctionLiteral, "function-literal") |
| 1684 DECLARE_HYDROGEN_ACCESSOR(FunctionLiteral) | 1719 DECLARE_HYDROGEN_ACCESSOR(FunctionLiteral) |
| 1685 | 1720 |
| 1686 Handle<SharedFunctionInfo> shared_info() { return hydrogen()->shared_info(); } | 1721 Handle<SharedFunctionInfo> shared_info() { return hydrogen()->shared_info(); } |
| 1687 }; | 1722 }; |
| 1688 | 1723 |
| 1689 | 1724 |
| 1690 class LTypeof: public LTemplateInstruction<1, 1> { | 1725 class LTypeof: public LTemplateInstruction<1, 1, 0> { |
| 1691 public: | 1726 public: |
| 1692 explicit LTypeof(LOperand* value) { | 1727 explicit LTypeof(LOperand* value) { |
| 1693 inputs_[0] = value; | 1728 inputs_[0] = value; |
| 1694 } | 1729 } |
| 1695 | 1730 |
| 1696 DECLARE_CONCRETE_INSTRUCTION(Typeof, "typeof") | 1731 DECLARE_CONCRETE_INSTRUCTION(Typeof, "typeof") |
| 1697 }; | 1732 }; |
| 1698 | 1733 |
| 1699 | 1734 |
| 1700 class LTypeofIs: public LTemplateInstruction<1, 1> { | 1735 class LTypeofIs: public LTemplateInstruction<1, 1, 0> { |
| 1701 public: | 1736 public: |
| 1702 explicit LTypeofIs(LOperand* value) { | 1737 explicit LTypeofIs(LOperand* value) { |
| 1703 inputs_[0] = value; | 1738 inputs_[0] = value; |
| 1704 } | 1739 } |
| 1705 | 1740 |
| 1706 DECLARE_CONCRETE_INSTRUCTION(TypeofIs, "typeof-is") | 1741 DECLARE_CONCRETE_INSTRUCTION(TypeofIs, "typeof-is") |
| 1707 DECLARE_HYDROGEN_ACCESSOR(TypeofIs) | 1742 DECLARE_HYDROGEN_ACCESSOR(TypeofIs) |
| 1708 | 1743 |
| 1709 Handle<String> type_literal() { return hydrogen()->type_literal(); } | 1744 Handle<String> type_literal() { return hydrogen()->type_literal(); } |
| 1710 | 1745 |
| 1711 virtual void PrintDataTo(StringStream* stream); | 1746 virtual void PrintDataTo(StringStream* stream); |
| 1712 }; | 1747 }; |
| 1713 | 1748 |
| 1714 | 1749 |
| 1715 class LTypeofIsAndBranch: public LControlInstruction<1> { | 1750 class LTypeofIsAndBranch: public LControlInstruction<1, 0> { |
| 1716 public: | 1751 public: |
| 1717 explicit LTypeofIsAndBranch(LOperand* value) { | 1752 explicit LTypeofIsAndBranch(LOperand* value) { |
| 1718 inputs_[0] = value; | 1753 inputs_[0] = value; |
| 1719 } | 1754 } |
| 1720 | 1755 |
| 1721 DECLARE_CONCRETE_INSTRUCTION(TypeofIsAndBranch, "typeof-is-and-branch") | 1756 DECLARE_CONCRETE_INSTRUCTION(TypeofIsAndBranch, "typeof-is-and-branch") |
| 1722 DECLARE_HYDROGEN_ACCESSOR(TypeofIs) | 1757 DECLARE_HYDROGEN_ACCESSOR(TypeofIs) |
| 1723 | 1758 |
| 1724 Handle<String> type_literal() { return hydrogen()->type_literal(); } | 1759 Handle<String> type_literal() { return hydrogen()->type_literal(); } |
| 1725 | 1760 |
| 1726 virtual void PrintDataTo(StringStream* stream); | 1761 virtual void PrintDataTo(StringStream* stream); |
| 1727 }; | 1762 }; |
| 1728 | 1763 |
| 1729 | 1764 |
| 1730 class LDeleteProperty: public LTemplateInstruction<1, 2> { | 1765 class LDeleteProperty: public LTemplateInstruction<1, 2, 0> { |
| 1731 public: | 1766 public: |
| 1732 LDeleteProperty(LOperand* obj, LOperand* key) { | 1767 LDeleteProperty(LOperand* obj, LOperand* key) { |
| 1733 inputs_[0] = obj; | 1768 inputs_[0] = obj; |
| 1734 inputs_[1] = key; | 1769 inputs_[1] = key; |
| 1735 } | 1770 } |
| 1736 | 1771 |
| 1737 DECLARE_CONCRETE_INSTRUCTION(DeleteProperty, "delete-property") | 1772 DECLARE_CONCRETE_INSTRUCTION(DeleteProperty, "delete-property") |
| 1738 | 1773 |
| 1739 LOperand* object() { return inputs_[0]; } | 1774 LOperand* object() { return inputs_[0]; } |
| 1740 LOperand* key() { return inputs_[1]; } | 1775 LOperand* key() { return inputs_[1]; } |
| (...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1986 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); | 2021 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); |
| 1987 }; | 2022 }; |
| 1988 | 2023 |
| 1989 #undef DECLARE_HYDROGEN_ACCESSOR | 2024 #undef DECLARE_HYDROGEN_ACCESSOR |
| 1990 #undef DECLARE_INSTRUCTION | 2025 #undef DECLARE_INSTRUCTION |
| 1991 #undef DECLARE_CONCRETE_INSTRUCTION | 2026 #undef DECLARE_CONCRETE_INSTRUCTION |
| 1992 | 2027 |
| 1993 } } // namespace v8::internal | 2028 } } // namespace v8::internal |
| 1994 | 2029 |
| 1995 #endif // V8_IA32_LITHIUM_IA32_H_ | 2030 #endif // V8_IA32_LITHIUM_IA32_H_ |
| OLD | NEW |