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