| 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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 V(CheckInstanceType) \ | 65 V(CheckInstanceType) \ |
| 66 V(CheckMaps) \ | 66 V(CheckMaps) \ |
| 67 V(CheckMapValue) \ | 67 V(CheckMapValue) \ |
| 68 V(CheckNonSmi) \ | 68 V(CheckNonSmi) \ |
| 69 V(CheckSmi) \ | 69 V(CheckSmi) \ |
| 70 V(CheckValue) \ | 70 V(CheckValue) \ |
| 71 V(ClampDToUint8) \ | 71 V(ClampDToUint8) \ |
| 72 V(ClampIToUint8) \ | 72 V(ClampIToUint8) \ |
| 73 V(ClampTToUint8) \ | 73 V(ClampTToUint8) \ |
| 74 V(ClassOfTestAndBranch) \ | 74 V(ClassOfTestAndBranch) \ |
| 75 V(CompareMinusZeroAndBranch) \ |
| 75 V(CompareNumericAndBranch) \ | 76 V(CompareNumericAndBranch) \ |
| 76 V(CmpObjectEqAndBranch) \ | 77 V(CmpObjectEqAndBranch) \ |
| 77 V(CmpHoleAndBranch) \ | 78 V(CmpHoleAndBranch) \ |
| 78 V(CmpMapAndBranch) \ | 79 V(CmpMapAndBranch) \ |
| 79 V(CmpT) \ | 80 V(CmpT) \ |
| 80 V(ConstantD) \ | 81 V(ConstantD) \ |
| 81 V(ConstantE) \ | 82 V(ConstantE) \ |
| 82 V(ConstantI) \ | 83 V(ConstantI) \ |
| 83 V(ConstantS) \ | 84 V(ConstantS) \ |
| 84 V(ConstantT) \ | 85 V(ConstantT) \ |
| 85 V(Context) \ | 86 V(Context) \ |
| 86 V(DateField) \ | 87 V(DateField) \ |
| 87 V(DebugBreak) \ | 88 V(DebugBreak) \ |
| 88 V(DeclareGlobals) \ | 89 V(DeclareGlobals) \ |
| 89 V(Deoptimize) \ | 90 V(Deoptimize) \ |
| 90 V(DivI) \ | 91 V(DivI) \ |
| 91 V(DoubleToI) \ | 92 V(DoubleToI) \ |
| 92 V(DoubleToSmi) \ | 93 V(DoubleToSmi) \ |
| 93 V(Drop) \ | 94 V(Drop) \ |
| 94 V(DummyUse) \ | 95 V(DummyUse) \ |
| 96 V(Dummy) \ |
| 95 V(ElementsKind) \ | 97 V(ElementsKind) \ |
| 96 V(ForInCacheArray) \ | 98 V(ForInCacheArray) \ |
| 97 V(ForInPrepareMap) \ | 99 V(ForInPrepareMap) \ |
| 98 V(FunctionLiteral) \ | 100 V(FunctionLiteral) \ |
| 99 V(GetCachedArrayIndex) \ | 101 V(GetCachedArrayIndex) \ |
| 100 V(GlobalObject) \ | 102 V(GlobalObject) \ |
| 101 V(GlobalReceiver) \ | 103 V(GlobalReceiver) \ |
| 102 V(Goto) \ | 104 V(Goto) \ |
| 103 V(HasCachedArrayIndexAndBranch) \ | 105 V(HasCachedArrayIndexAndBranch) \ |
| 104 V(HasInstanceTypeAndBranch) \ | 106 V(HasInstanceTypeAndBranch) \ |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 147 V(NumberTagU) \ | 149 V(NumberTagU) \ |
| 148 V(NumberUntagD) \ | 150 V(NumberUntagD) \ |
| 149 V(OsrEntry) \ | 151 V(OsrEntry) \ |
| 150 V(OuterContext) \ | 152 V(OuterContext) \ |
| 151 V(Parameter) \ | 153 V(Parameter) \ |
| 152 V(Power) \ | 154 V(Power) \ |
| 153 V(PushArgument) \ | 155 V(PushArgument) \ |
| 154 V(Random) \ | 156 V(Random) \ |
| 155 V(RegExpLiteral) \ | 157 V(RegExpLiteral) \ |
| 156 V(Return) \ | 158 V(Return) \ |
| 159 V(SeqStringGetChar) \ |
| 157 V(SeqStringSetChar) \ | 160 V(SeqStringSetChar) \ |
| 158 V(ShiftI) \ | 161 V(ShiftI) \ |
| 159 V(SmiTag) \ | 162 V(SmiTag) \ |
| 160 V(SmiUntag) \ | 163 V(SmiUntag) \ |
| 161 V(StackCheck) \ | 164 V(StackCheck) \ |
| 162 V(StoreCodeEntry) \ | 165 V(StoreCodeEntry) \ |
| 163 V(StoreContextSlot) \ | 166 V(StoreContextSlot) \ |
| 164 V(StoreGlobalCell) \ | 167 V(StoreGlobalCell) \ |
| 165 V(StoreGlobalGeneric) \ | 168 V(StoreGlobalGeneric) \ |
| 166 V(StoreKeyed) \ | 169 V(StoreKeyed) \ |
| 167 V(StoreKeyedGeneric) \ | 170 V(StoreKeyedGeneric) \ |
| 168 V(StoreNamedField) \ | 171 V(StoreNamedField) \ |
| 169 V(StoreNamedGeneric) \ | 172 V(StoreNamedGeneric) \ |
| 170 V(StringAdd) \ | 173 V(StringAdd) \ |
| 171 V(StringCharCodeAt) \ | 174 V(StringCharCodeAt) \ |
| 172 V(StringCharFromCode) \ | 175 V(StringCharFromCode) \ |
| 173 V(StringCompareAndBranch) \ | 176 V(StringCompareAndBranch) \ |
| 174 V(SubI) \ | 177 V(SubI) \ |
| 175 V(TaggedToI) \ | 178 V(TaggedToI) \ |
| 176 V(ThisFunction) \ | 179 V(ThisFunction) \ |
| 177 V(Throw) \ | 180 V(Throw) \ |
| 178 V(ToFastProperties) \ | 181 V(ToFastProperties) \ |
| 179 V(TransitionElementsKind) \ | 182 V(TransitionElementsKind) \ |
| 180 V(TrapAllocationMemento) \ | 183 V(TrapAllocationMemento) \ |
| 181 V(Typeof) \ | 184 V(Typeof) \ |
| 182 V(TypeofIsAndBranch) \ | 185 V(TypeofIsAndBranch) \ |
| 183 V(Uint32ToDouble) \ | 186 V(Uint32ToDouble) \ |
| 187 V(Uint32ToSmi) \ |
| 184 V(UnknownOSRValue) \ | 188 V(UnknownOSRValue) \ |
| 185 V(ValueOf) \ | 189 V(ValueOf) \ |
| 186 V(WrapReceiver) | 190 V(WrapReceiver) |
| 187 | 191 |
| 188 | 192 |
| 189 #define DECLARE_CONCRETE_INSTRUCTION(type, mnemonic) \ | 193 #define DECLARE_CONCRETE_INSTRUCTION(type, mnemonic) \ |
| 190 virtual Opcode opcode() const V8_FINAL V8_OVERRIDE { \ | 194 virtual Opcode opcode() const V8_FINAL V8_OVERRIDE { \ |
| 191 return LInstruction::k##type; \ | 195 return LInstruction::k##type; \ |
| 192 } \ | 196 } \ |
| 193 virtual void CompileToNative(LCodeGen* generator) V8_FINAL V8_OVERRIDE; \ | 197 virtual void CompileToNative(LCodeGen* generator) V8_FINAL V8_OVERRIDE; \ |
| (...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 414 void set_gap_instructions_size(int gap_instructions_size) { | 418 void set_gap_instructions_size(int gap_instructions_size) { |
| 415 gap_instructions_size_ = gap_instructions_size; | 419 gap_instructions_size_ = gap_instructions_size; |
| 416 } | 420 } |
| 417 int gap_instructions_size() { return gap_instructions_size_; } | 421 int gap_instructions_size() { return gap_instructions_size_; } |
| 418 | 422 |
| 419 private: | 423 private: |
| 420 int gap_instructions_size_; | 424 int gap_instructions_size_; |
| 421 }; | 425 }; |
| 422 | 426 |
| 423 | 427 |
| 428 class LDummy V8_FINAL : public LTemplateInstruction<1, 0, 0> { |
| 429 public: |
| 430 explicit LDummy() { } |
| 431 DECLARE_CONCRETE_INSTRUCTION(Dummy, "dummy") |
| 432 }; |
| 433 |
| 434 |
| 424 class LDummyUse V8_FINAL : public LTemplateInstruction<1, 1, 0> { | 435 class LDummyUse V8_FINAL : public LTemplateInstruction<1, 1, 0> { |
| 425 public: | 436 public: |
| 426 explicit LDummyUse(LOperand* value) { | 437 explicit LDummyUse(LOperand* value) { |
| 427 inputs_[0] = value; | 438 inputs_[0] = value; |
| 428 } | 439 } |
| 429 DECLARE_CONCRETE_INSTRUCTION(DummyUse, "dummy-use") | 440 DECLARE_CONCRETE_INSTRUCTION(DummyUse, "dummy-use") |
| 430 }; | 441 }; |
| 431 | 442 |
| 432 | 443 |
| 433 class LDeoptimize V8_FINAL : public LTemplateInstruction<0, 0, 0> { | 444 class LDeoptimize V8_FINAL : public LTemplateInstruction<0, 0, 0> { |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 465 | 476 |
| 466 class LParameter V8_FINAL : public LTemplateInstruction<1, 0, 0> { | 477 class LParameter V8_FINAL : public LTemplateInstruction<1, 0, 0> { |
| 467 public: | 478 public: |
| 468 virtual bool HasInterestingComment(LCodeGen* gen) const V8_OVERRIDE { | 479 virtual bool HasInterestingComment(LCodeGen* gen) const V8_OVERRIDE { |
| 469 return false; | 480 return false; |
| 470 } | 481 } |
| 471 DECLARE_CONCRETE_INSTRUCTION(Parameter, "parameter") | 482 DECLARE_CONCRETE_INSTRUCTION(Parameter, "parameter") |
| 472 }; | 483 }; |
| 473 | 484 |
| 474 | 485 |
| 475 class LCallStub V8_FINAL : public LTemplateInstruction<1, 0, 0> { | 486 class LCallStub V8_FINAL : public LTemplateInstruction<1, 1, 0> { |
| 476 public: | 487 public: |
| 488 explicit LCallStub(LOperand* context) { |
| 489 inputs_[0] = context; |
| 490 } |
| 491 |
| 492 LOperand* context() { return inputs_[0]; } |
| 493 |
| 477 DECLARE_CONCRETE_INSTRUCTION(CallStub, "call-stub") | 494 DECLARE_CONCRETE_INSTRUCTION(CallStub, "call-stub") |
| 478 DECLARE_HYDROGEN_ACCESSOR(CallStub) | 495 DECLARE_HYDROGEN_ACCESSOR(CallStub) |
| 479 | 496 |
| 480 TranscendentalCache::Type transcendental_type() { | 497 TranscendentalCache::Type transcendental_type() { |
| 481 return hydrogen()->transcendental_type(); | 498 return hydrogen()->transcendental_type(); |
| 482 } | 499 } |
| 483 }; | 500 }; |
| 484 | 501 |
| 485 | 502 |
| 486 class LUnknownOSRValue V8_FINAL : public LTemplateInstruction<1, 0, 0> { | 503 class LUnknownOSRValue V8_FINAL : public LTemplateInstruction<1, 0, 0> { |
| (...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 720 inputs_[0] = value; | 737 inputs_[0] = value; |
| 721 } | 738 } |
| 722 | 739 |
| 723 LOperand* value() { return inputs_[0]; } | 740 LOperand* value() { return inputs_[0]; } |
| 724 | 741 |
| 725 DECLARE_CONCRETE_INSTRUCTION(MathRound, "math-round") | 742 DECLARE_CONCRETE_INSTRUCTION(MathRound, "math-round") |
| 726 DECLARE_HYDROGEN_ACCESSOR(UnaryMathOperation) | 743 DECLARE_HYDROGEN_ACCESSOR(UnaryMathOperation) |
| 727 }; | 744 }; |
| 728 | 745 |
| 729 | 746 |
| 730 class LMathAbs V8_FINAL : public LTemplateInstruction<1, 1, 0> { | 747 class LMathAbs V8_FINAL : public LTemplateInstruction<1, 2, 0> { |
| 731 public: | 748 public: |
| 732 explicit LMathAbs(LOperand* value) { | 749 explicit LMathAbs(LOperand* context, LOperand* value) { |
| 750 inputs_[1] = context; |
| 733 inputs_[0] = value; | 751 inputs_[0] = value; |
| 734 } | 752 } |
| 735 | 753 |
| 754 LOperand* context() { return inputs_[1]; } |
| 736 LOperand* value() { return inputs_[0]; } | 755 LOperand* value() { return inputs_[0]; } |
| 737 | 756 |
| 738 DECLARE_CONCRETE_INSTRUCTION(MathAbs, "math-abs") | 757 DECLARE_CONCRETE_INSTRUCTION(MathAbs, "math-abs") |
| 739 DECLARE_HYDROGEN_ACCESSOR(UnaryMathOperation) | 758 DECLARE_HYDROGEN_ACCESSOR(UnaryMathOperation) |
| 740 }; | 759 }; |
| 741 | 760 |
| 742 | 761 |
| 743 class LMathLog V8_FINAL : public LTemplateInstruction<1, 1, 0> { | 762 class LMathLog V8_FINAL : public LTemplateInstruction<1, 1, 0> { |
| 744 public: | 763 public: |
| 745 explicit LMathLog(LOperand* value) { | 764 explicit LMathLog(LOperand* value) { |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 849 inputs_[0] = object; | 868 inputs_[0] = object; |
| 850 } | 869 } |
| 851 | 870 |
| 852 LOperand* object() { return inputs_[0]; } | 871 LOperand* object() { return inputs_[0]; } |
| 853 | 872 |
| 854 DECLARE_CONCRETE_INSTRUCTION(CmpHoleAndBranch, "cmp-hole-and-branch") | 873 DECLARE_CONCRETE_INSTRUCTION(CmpHoleAndBranch, "cmp-hole-and-branch") |
| 855 DECLARE_HYDROGEN_ACCESSOR(CompareHoleAndBranch) | 874 DECLARE_HYDROGEN_ACCESSOR(CompareHoleAndBranch) |
| 856 }; | 875 }; |
| 857 | 876 |
| 858 | 877 |
| 878 class LCompareMinusZeroAndBranch V8_FINAL : public LControlInstruction<1, 0> { |
| 879 public: |
| 880 explicit LCompareMinusZeroAndBranch(LOperand* value) { |
| 881 inputs_[0] = value; |
| 882 } |
| 883 |
| 884 LOperand* value() { return inputs_[0]; } |
| 885 |
| 886 DECLARE_CONCRETE_INSTRUCTION(CompareMinusZeroAndBranch, |
| 887 "cmp-minus-zero-and-branch") |
| 888 DECLARE_HYDROGEN_ACCESSOR(CompareMinusZeroAndBranch) |
| 889 }; |
| 890 |
| 891 |
| 892 |
| 859 class LIsObjectAndBranch V8_FINAL : public LControlInstruction<1, 0> { | 893 class LIsObjectAndBranch V8_FINAL : public LControlInstruction<1, 0> { |
| 860 public: | 894 public: |
| 861 explicit LIsObjectAndBranch(LOperand* value) { | 895 explicit LIsObjectAndBranch(LOperand* value) { |
| 862 inputs_[0] = value; | 896 inputs_[0] = value; |
| 863 } | 897 } |
| 864 | 898 |
| 865 LOperand* value() { return inputs_[0]; } | 899 LOperand* value() { return inputs_[0]; } |
| 866 | 900 |
| 867 DECLARE_CONCRETE_INSTRUCTION(IsObjectAndBranch, "is-object-and-branch") | 901 DECLARE_CONCRETE_INSTRUCTION(IsObjectAndBranch, "is-object-and-branch") |
| 868 DECLARE_HYDROGEN_ACCESSOR(IsObjectAndBranch) | 902 DECLARE_HYDROGEN_ACCESSOR(IsObjectAndBranch) |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 914 LOperand* temp() { return temps_[0]; } | 948 LOperand* temp() { return temps_[0]; } |
| 915 | 949 |
| 916 DECLARE_CONCRETE_INSTRUCTION(IsUndetectableAndBranch, | 950 DECLARE_CONCRETE_INSTRUCTION(IsUndetectableAndBranch, |
| 917 "is-undetectable-and-branch") | 951 "is-undetectable-and-branch") |
| 918 DECLARE_HYDROGEN_ACCESSOR(IsUndetectableAndBranch) | 952 DECLARE_HYDROGEN_ACCESSOR(IsUndetectableAndBranch) |
| 919 | 953 |
| 920 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; | 954 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; |
| 921 }; | 955 }; |
| 922 | 956 |
| 923 | 957 |
| 924 class LStringCompareAndBranch V8_FINAL : public LControlInstruction<2, 0> { | 958 class LStringCompareAndBranch V8_FINAL : public LControlInstruction<3, 0> { |
| 925 public: | 959 public: |
| 926 explicit LStringCompareAndBranch(LOperand* left, LOperand* right) { | 960 explicit LStringCompareAndBranch(LOperand* context, |
| 927 inputs_[0] = left; | 961 LOperand* left, |
| 928 inputs_[1] = right; | 962 LOperand* right) { |
| 963 inputs_[0] = context; |
| 964 inputs_[1] = left; |
| 965 inputs_[2] = right; |
| 929 } | 966 } |
| 930 | 967 |
| 931 LOperand* left() { return inputs_[0]; } | 968 LOperand* context() { return inputs_[0]; } |
| 932 LOperand* right() { return inputs_[1]; } | 969 LOperand* left() { return inputs_[1]; } |
| 970 LOperand* right() { return inputs_[2]; } |
| 933 | 971 |
| 934 DECLARE_CONCRETE_INSTRUCTION(StringCompareAndBranch, | 972 DECLARE_CONCRETE_INSTRUCTION(StringCompareAndBranch, |
| 935 "string-compare-and-branch") | 973 "string-compare-and-branch") |
| 936 DECLARE_HYDROGEN_ACCESSOR(StringCompareAndBranch) | 974 DECLARE_HYDROGEN_ACCESSOR(StringCompareAndBranch) |
| 937 | 975 |
| 938 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; | 976 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; |
| 939 | 977 |
| 940 Token::Value op() const { return hydrogen()->token(); } | 978 Token::Value op() const { return hydrogen()->token(); } |
| 941 }; | 979 }; |
| 942 | 980 |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1000 LOperand* temp2() { return temps_[1]; } | 1038 LOperand* temp2() { return temps_[1]; } |
| 1001 | 1039 |
| 1002 DECLARE_CONCRETE_INSTRUCTION(ClassOfTestAndBranch, | 1040 DECLARE_CONCRETE_INSTRUCTION(ClassOfTestAndBranch, |
| 1003 "class-of-test-and-branch") | 1041 "class-of-test-and-branch") |
| 1004 DECLARE_HYDROGEN_ACCESSOR(ClassOfTestAndBranch) | 1042 DECLARE_HYDROGEN_ACCESSOR(ClassOfTestAndBranch) |
| 1005 | 1043 |
| 1006 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; | 1044 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; |
| 1007 }; | 1045 }; |
| 1008 | 1046 |
| 1009 | 1047 |
| 1010 class LCmpT V8_FINAL : public LTemplateInstruction<1, 2, 0> { | 1048 class LCmpT V8_FINAL : public LTemplateInstruction<1, 3, 0> { |
| 1011 public: | 1049 public: |
| 1012 LCmpT(LOperand* left, LOperand* right) { | 1050 LCmpT(LOperand* context, LOperand* left, LOperand* right) { |
| 1013 inputs_[0] = left; | 1051 inputs_[0] = context; |
| 1014 inputs_[1] = right; | 1052 inputs_[1] = left; |
| 1053 inputs_[2] = right; |
| 1015 } | 1054 } |
| 1016 | 1055 |
| 1017 LOperand* left() { return inputs_[0]; } | 1056 LOperand* context() { return inputs_[0]; } |
| 1018 LOperand* right() { return inputs_[1]; } | 1057 LOperand* left() { return inputs_[1]; } |
| 1058 LOperand* right() { return inputs_[2]; } |
| 1019 | 1059 |
| 1020 DECLARE_CONCRETE_INSTRUCTION(CmpT, "cmp-t") | 1060 DECLARE_CONCRETE_INSTRUCTION(CmpT, "cmp-t") |
| 1021 DECLARE_HYDROGEN_ACCESSOR(CompareGeneric) | 1061 DECLARE_HYDROGEN_ACCESSOR(CompareGeneric) |
| 1022 | 1062 |
| 1023 Token::Value op() const { return hydrogen()->token(); } | 1063 Token::Value op() const { return hydrogen()->token(); } |
| 1024 }; | 1064 }; |
| 1025 | 1065 |
| 1026 | 1066 |
| 1027 class LInstanceOf V8_FINAL : public LTemplateInstruction<1, 2, 0> { | 1067 class LInstanceOf V8_FINAL : public LTemplateInstruction<1, 3, 0> { |
| 1028 public: | 1068 public: |
| 1029 LInstanceOf(LOperand* left, LOperand* right) { | 1069 LInstanceOf(LOperand* context, LOperand* left, LOperand* right) { |
| 1030 inputs_[0] = left; | 1070 inputs_[0] = context; |
| 1031 inputs_[1] = right; | 1071 inputs_[1] = left; |
| 1072 inputs_[2] = right; |
| 1032 } | 1073 } |
| 1033 | 1074 |
| 1034 LOperand* left() { return inputs_[0]; } | 1075 LOperand* context() { return inputs_[0]; } |
| 1035 LOperand* right() { return inputs_[1]; } | 1076 LOperand* left() { return inputs_[1]; } |
| 1077 LOperand* right() { return inputs_[2]; } |
| 1036 | 1078 |
| 1037 DECLARE_CONCRETE_INSTRUCTION(InstanceOf, "instance-of") | 1079 DECLARE_CONCRETE_INSTRUCTION(InstanceOf, "instance-of") |
| 1038 }; | 1080 }; |
| 1039 | 1081 |
| 1040 | 1082 |
| 1041 class LInstanceOfKnownGlobal V8_FINAL : public LTemplateInstruction<1, 1, 1> { | 1083 class LInstanceOfKnownGlobal V8_FINAL : public LTemplateInstruction<1, 2, 1> { |
| 1042 public: | 1084 public: |
| 1043 LInstanceOfKnownGlobal(LOperand* value, LOperand* temp) { | 1085 LInstanceOfKnownGlobal(LOperand* context, LOperand* value, LOperand* temp) { |
| 1044 inputs_[0] = value; | 1086 inputs_[0] = context; |
| 1087 inputs_[1] = value; |
| 1045 temps_[0] = temp; | 1088 temps_[0] = temp; |
| 1046 } | 1089 } |
| 1047 | 1090 |
| 1048 LOperand* value() { return inputs_[0]; } | 1091 LOperand* context() { return inputs_[0]; } |
| 1092 LOperand* value() { return inputs_[1]; } |
| 1049 LOperand* temp() { return temps_[0]; } | 1093 LOperand* temp() { return temps_[0]; } |
| 1050 | 1094 |
| 1051 DECLARE_CONCRETE_INSTRUCTION(InstanceOfKnownGlobal, | 1095 DECLARE_CONCRETE_INSTRUCTION(InstanceOfKnownGlobal, |
| 1052 "instance-of-known-global") | 1096 "instance-of-known-global") |
| 1053 DECLARE_HYDROGEN_ACCESSOR(InstanceOfKnownGlobal) | 1097 DECLARE_HYDROGEN_ACCESSOR(InstanceOfKnownGlobal) |
| 1054 | 1098 |
| 1055 Handle<JSFunction> function() const { return hydrogen()->function(); } | 1099 Handle<JSFunction> function() const { return hydrogen()->function(); } |
| 1056 LEnvironment* GetDeferredLazyDeoptimizationEnvironment() { | 1100 LEnvironment* GetDeferredLazyDeoptimizationEnvironment() { |
| 1057 return lazy_deopt_env_; | 1101 return lazy_deopt_env_; |
| 1058 } | 1102 } |
| (...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1273 Smi* index() const { return index_; } | 1317 Smi* index() const { return index_; } |
| 1274 | 1318 |
| 1275 DECLARE_CONCRETE_INSTRUCTION(DateField, "date-field") | 1319 DECLARE_CONCRETE_INSTRUCTION(DateField, "date-field") |
| 1276 DECLARE_HYDROGEN_ACCESSOR(DateField) | 1320 DECLARE_HYDROGEN_ACCESSOR(DateField) |
| 1277 | 1321 |
| 1278 private: | 1322 private: |
| 1279 Smi* index_; | 1323 Smi* index_; |
| 1280 }; | 1324 }; |
| 1281 | 1325 |
| 1282 | 1326 |
| 1327 class LSeqStringGetChar V8_FINAL : public LTemplateInstruction<1, 2, 0> { |
| 1328 public: |
| 1329 LSeqStringGetChar(LOperand* string, LOperand* index) { |
| 1330 inputs_[0] = string; |
| 1331 inputs_[1] = index; |
| 1332 } |
| 1333 |
| 1334 LOperand* string() const { return inputs_[0]; } |
| 1335 LOperand* index() const { return inputs_[1]; } |
| 1336 |
| 1337 DECLARE_CONCRETE_INSTRUCTION(SeqStringGetChar, "seq-string-get-char") |
| 1338 DECLARE_HYDROGEN_ACCESSOR(SeqStringGetChar) |
| 1339 }; |
| 1340 |
| 1341 |
| 1283 class LSeqStringSetChar V8_FINAL : public LTemplateInstruction<1, 3, 0> { | 1342 class LSeqStringSetChar V8_FINAL : public LTemplateInstruction<1, 3, 0> { |
| 1284 public: | 1343 public: |
| 1285 LSeqStringSetChar(String::Encoding encoding, | 1344 LSeqStringSetChar(LOperand* string, |
| 1286 LOperand* string, | |
| 1287 LOperand* index, | 1345 LOperand* index, |
| 1288 LOperand* value) : encoding_(encoding) { | 1346 LOperand* value) { |
| 1289 inputs_[0] = string; | 1347 inputs_[0] = string; |
| 1290 inputs_[1] = index; | 1348 inputs_[1] = index; |
| 1291 inputs_[2] = value; | 1349 inputs_[2] = value; |
| 1292 } | 1350 } |
| 1293 | 1351 |
| 1294 String::Encoding encoding() { return encoding_; } | |
| 1295 LOperand* string() { return inputs_[0]; } | 1352 LOperand* string() { return inputs_[0]; } |
| 1296 LOperand* index() { return inputs_[1]; } | 1353 LOperand* index() { return inputs_[1]; } |
| 1297 LOperand* value() { return inputs_[2]; } | 1354 LOperand* value() { return inputs_[2]; } |
| 1298 | 1355 |
| 1299 DECLARE_CONCRETE_INSTRUCTION(SeqStringSetChar, "seq-string-set-char") | 1356 DECLARE_CONCRETE_INSTRUCTION(SeqStringSetChar, "seq-string-set-char") |
| 1300 DECLARE_HYDROGEN_ACCESSOR(SeqStringSetChar) | 1357 DECLARE_HYDROGEN_ACCESSOR(SeqStringSetChar) |
| 1301 | |
| 1302 private: | |
| 1303 String::Encoding encoding_; | |
| 1304 }; | 1358 }; |
| 1305 | 1359 |
| 1306 | 1360 |
| 1307 class LThrow V8_FINAL : public LTemplateInstruction<0, 1, 0> { | 1361 class LThrow V8_FINAL : public LTemplateInstruction<0, 2, 0> { |
| 1308 public: | 1362 public: |
| 1309 explicit LThrow(LOperand* value) { | 1363 explicit LThrow(LOperand* context, LOperand* value) { |
| 1310 inputs_[0] = value; | 1364 inputs_[0] = context; |
| 1365 inputs_[1] = value; |
| 1311 } | 1366 } |
| 1312 | 1367 |
| 1313 LOperand* value() { return inputs_[0]; } | 1368 LOperand* context() { return inputs_[0]; } |
| 1369 LOperand* value() { return inputs_[1]; } |
| 1314 | 1370 |
| 1315 DECLARE_CONCRETE_INSTRUCTION(Throw, "throw") | 1371 DECLARE_CONCRETE_INSTRUCTION(Throw, "throw") |
| 1316 }; | 1372 }; |
| 1317 | 1373 |
| 1318 | 1374 |
| 1319 class LAddI V8_FINAL : public LTemplateInstruction<1, 2, 0> { | 1375 class LAddI V8_FINAL : public LTemplateInstruction<1, 2, 0> { |
| 1320 public: | 1376 public: |
| 1321 LAddI(LOperand* left, LOperand* right) { | 1377 LAddI(LOperand* left, LOperand* right) { |
| 1322 inputs_[0] = left; | 1378 inputs_[0] = left; |
| 1323 inputs_[1] = right; | 1379 inputs_[1] = right; |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1404 return LInstruction::kArithmeticD; | 1460 return LInstruction::kArithmeticD; |
| 1405 } | 1461 } |
| 1406 virtual void CompileToNative(LCodeGen* generator) V8_OVERRIDE; | 1462 virtual void CompileToNative(LCodeGen* generator) V8_OVERRIDE; |
| 1407 virtual const char* Mnemonic() const V8_OVERRIDE; | 1463 virtual const char* Mnemonic() const V8_OVERRIDE; |
| 1408 | 1464 |
| 1409 private: | 1465 private: |
| 1410 Token::Value op_; | 1466 Token::Value op_; |
| 1411 }; | 1467 }; |
| 1412 | 1468 |
| 1413 | 1469 |
| 1414 class LArithmeticT V8_FINAL : public LTemplateInstruction<1, 2, 0> { | 1470 class LArithmeticT V8_FINAL : public LTemplateInstruction<1, 3, 0> { |
| 1415 public: | 1471 public: |
| 1416 LArithmeticT(Token::Value op, LOperand* left, LOperand* right) | 1472 LArithmeticT(Token::Value op, |
| 1473 LOperand* context, |
| 1474 LOperand* left, |
| 1475 LOperand* right) |
| 1417 : op_(op) { | 1476 : op_(op) { |
| 1418 inputs_[0] = left; | 1477 inputs_[0] = context; |
| 1419 inputs_[1] = right; | 1478 inputs_[1] = left; |
| 1479 inputs_[2] = right; |
| 1420 } | 1480 } |
| 1421 | 1481 |
| 1422 Token::Value op() const { return op_; } | 1482 Token::Value op() const { return op_; } |
| 1423 LOperand* left() { return inputs_[0]; } | 1483 LOperand* context() { return inputs_[0]; } |
| 1424 LOperand* right() { return inputs_[1]; } | 1484 LOperand* left() { return inputs_[1]; } |
| 1485 LOperand* right() { return inputs_[2]; } |
| 1425 | 1486 |
| 1426 virtual Opcode opcode() const V8_OVERRIDE { | 1487 virtual Opcode opcode() const V8_OVERRIDE { |
| 1427 return LInstruction::kArithmeticT; | 1488 return LInstruction::kArithmeticT; |
| 1428 } | 1489 } |
| 1429 virtual void CompileToNative(LCodeGen* generator) V8_OVERRIDE; | 1490 virtual void CompileToNative(LCodeGen* generator) V8_OVERRIDE; |
| 1430 virtual const char* Mnemonic() const V8_OVERRIDE; | 1491 virtual const char* Mnemonic() const V8_OVERRIDE; |
| 1431 | 1492 |
| 1432 private: | 1493 private: |
| 1433 Token::Value op_; | 1494 Token::Value op_; |
| 1434 }; | 1495 }; |
| 1435 | 1496 |
| 1436 | 1497 |
| 1437 class LReturn V8_FINAL : public LTemplateInstruction<0, 2, 0> { | 1498 class LReturn V8_FINAL : public LTemplateInstruction<0, 3, 0> { |
| 1438 public: | 1499 public: |
| 1439 explicit LReturn(LOperand* value, LOperand* parameter_count) { | 1500 explicit LReturn(LOperand* value, |
| 1501 LOperand* context, |
| 1502 LOperand* parameter_count) { |
| 1440 inputs_[0] = value; | 1503 inputs_[0] = value; |
| 1441 inputs_[1] = parameter_count; | 1504 inputs_[1] = context; |
| 1505 inputs_[2] = parameter_count; |
| 1442 } | 1506 } |
| 1443 | 1507 |
| 1444 LOperand* value() { return inputs_[0]; } | 1508 LOperand* value() { return inputs_[0]; } |
| 1509 LOperand* context() { return inputs_[1]; } |
| 1445 | 1510 |
| 1446 bool has_constant_parameter_count() { | 1511 bool has_constant_parameter_count() { |
| 1447 return parameter_count()->IsConstantOperand(); | 1512 return parameter_count()->IsConstantOperand(); |
| 1448 } | 1513 } |
| 1449 LConstantOperand* constant_parameter_count() { | 1514 LConstantOperand* constant_parameter_count() { |
| 1450 ASSERT(has_constant_parameter_count()); | 1515 ASSERT(has_constant_parameter_count()); |
| 1451 return LConstantOperand::cast(parameter_count()); | 1516 return LConstantOperand::cast(parameter_count()); |
| 1452 } | 1517 } |
| 1453 LOperand* parameter_count() { return inputs_[1]; } | 1518 LOperand* parameter_count() { return inputs_[2]; } |
| 1454 | 1519 |
| 1455 DECLARE_CONCRETE_INSTRUCTION(Return, "return") | 1520 DECLARE_CONCRETE_INSTRUCTION(Return, "return") |
| 1456 DECLARE_HYDROGEN_ACCESSOR(Return) | 1521 DECLARE_HYDROGEN_ACCESSOR(Return) |
| 1457 }; | 1522 }; |
| 1458 | 1523 |
| 1459 | 1524 |
| 1460 class LLoadNamedField V8_FINAL : public LTemplateInstruction<1, 1, 0> { | 1525 class LLoadNamedField V8_FINAL : public LTemplateInstruction<1, 1, 0> { |
| 1461 public: | 1526 public: |
| 1462 explicit LLoadNamedField(LOperand* object) { | 1527 explicit LLoadNamedField(LOperand* object) { |
| 1463 inputs_[0] = object; | 1528 inputs_[0] = object; |
| 1464 } | 1529 } |
| 1465 | 1530 |
| 1466 LOperand* object() { return inputs_[0]; } | 1531 LOperand* object() { return inputs_[0]; } |
| 1467 | 1532 |
| 1468 DECLARE_CONCRETE_INSTRUCTION(LoadNamedField, "load-named-field") | 1533 DECLARE_CONCRETE_INSTRUCTION(LoadNamedField, "load-named-field") |
| 1469 DECLARE_HYDROGEN_ACCESSOR(LoadNamedField) | 1534 DECLARE_HYDROGEN_ACCESSOR(LoadNamedField) |
| 1470 }; | 1535 }; |
| 1471 | 1536 |
| 1472 | 1537 |
| 1473 class LLoadNamedGeneric V8_FINAL : public LTemplateInstruction<1, 1, 0> { | 1538 class LLoadNamedGeneric V8_FINAL : public LTemplateInstruction<1, 2, 0> { |
| 1474 public: | 1539 public: |
| 1475 explicit LLoadNamedGeneric(LOperand* object) { | 1540 explicit LLoadNamedGeneric(LOperand* context, LOperand* object) { |
| 1476 inputs_[0] = object; | 1541 inputs_[0] = context; |
| 1542 inputs_[1] = object; |
| 1477 } | 1543 } |
| 1478 | 1544 |
| 1479 DECLARE_CONCRETE_INSTRUCTION(LoadNamedGeneric, "load-named-generic") | 1545 DECLARE_CONCRETE_INSTRUCTION(LoadNamedGeneric, "load-named-generic") |
| 1480 DECLARE_HYDROGEN_ACCESSOR(LoadNamedGeneric) | 1546 DECLARE_HYDROGEN_ACCESSOR(LoadNamedGeneric) |
| 1481 | 1547 |
| 1482 LOperand* object() { return inputs_[0]; } | 1548 LOperand* context() { return inputs_[0]; } |
| 1549 LOperand* object() { return inputs_[1]; } |
| 1483 Handle<Object> name() const { return hydrogen()->name(); } | 1550 Handle<Object> name() const { return hydrogen()->name(); } |
| 1484 }; | 1551 }; |
| 1485 | 1552 |
| 1486 | 1553 |
| 1487 class LLoadFunctionPrototype V8_FINAL : public LTemplateInstruction<1, 1, 0> { | 1554 class LLoadFunctionPrototype V8_FINAL : public LTemplateInstruction<1, 1, 0> { |
| 1488 public: | 1555 public: |
| 1489 explicit LLoadFunctionPrototype(LOperand* function) { | 1556 explicit LLoadFunctionPrototype(LOperand* function) { |
| 1490 inputs_[0] = function; | 1557 inputs_[0] = function; |
| 1491 } | 1558 } |
| 1492 | 1559 |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1536 LOperand* elements() { return inputs_[0]; } | 1603 LOperand* elements() { return inputs_[0]; } |
| 1537 LOperand* key() { return inputs_[1]; } | 1604 LOperand* key() { return inputs_[1]; } |
| 1538 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; | 1605 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; |
| 1539 uint32_t additional_index() const { return hydrogen()->index_offset(); } | 1606 uint32_t additional_index() const { return hydrogen()->index_offset(); } |
| 1540 ElementsKind elements_kind() const { | 1607 ElementsKind elements_kind() const { |
| 1541 return hydrogen()->elements_kind(); | 1608 return hydrogen()->elements_kind(); |
| 1542 } | 1609 } |
| 1543 }; | 1610 }; |
| 1544 | 1611 |
| 1545 | 1612 |
| 1546 class LLoadKeyedGeneric V8_FINAL : public LTemplateInstruction<1, 2, 0> { | 1613 class LLoadKeyedGeneric V8_FINAL : public LTemplateInstruction<1, 3, 0> { |
| 1547 public: | 1614 public: |
| 1548 LLoadKeyedGeneric(LOperand* obj, LOperand* key) { | 1615 LLoadKeyedGeneric(LOperand* context, LOperand* obj, LOperand* key) { |
| 1549 inputs_[0] = obj; | 1616 inputs_[0] = context; |
| 1550 inputs_[1] = key; | 1617 inputs_[1] = obj; |
| 1618 inputs_[2] = key; |
| 1551 } | 1619 } |
| 1552 | 1620 |
| 1553 DECLARE_CONCRETE_INSTRUCTION(LoadKeyedGeneric, "load-keyed-generic") | 1621 DECLARE_CONCRETE_INSTRUCTION(LoadKeyedGeneric, "load-keyed-generic") |
| 1554 | 1622 |
| 1555 LOperand* object() { return inputs_[0]; } | 1623 LOperand* context() { return inputs_[0]; } |
| 1556 LOperand* key() { return inputs_[1]; } | 1624 LOperand* object() { return inputs_[1]; } |
| 1625 LOperand* key() { return inputs_[2]; } |
| 1557 }; | 1626 }; |
| 1558 | 1627 |
| 1559 | 1628 |
| 1560 class LLoadGlobalCell V8_FINAL : public LTemplateInstruction<1, 0, 0> { | 1629 class LLoadGlobalCell V8_FINAL : public LTemplateInstruction<1, 0, 0> { |
| 1561 public: | 1630 public: |
| 1562 DECLARE_CONCRETE_INSTRUCTION(LoadGlobalCell, "load-global-cell") | 1631 DECLARE_CONCRETE_INSTRUCTION(LoadGlobalCell, "load-global-cell") |
| 1563 DECLARE_HYDROGEN_ACCESSOR(LoadGlobalCell) | 1632 DECLARE_HYDROGEN_ACCESSOR(LoadGlobalCell) |
| 1564 }; | 1633 }; |
| 1565 | 1634 |
| 1566 | 1635 |
| 1567 class LLoadGlobalGeneric V8_FINAL : public LTemplateInstruction<1, 1, 0> { | 1636 class LLoadGlobalGeneric V8_FINAL : public LTemplateInstruction<1, 2, 0> { |
| 1568 public: | 1637 public: |
| 1569 explicit LLoadGlobalGeneric(LOperand* global_object) { | 1638 explicit LLoadGlobalGeneric(LOperand* context, LOperand* global_object) { |
| 1570 inputs_[0] = global_object; | 1639 inputs_[0] = context; |
| 1640 inputs_[1] = global_object; |
| 1571 } | 1641 } |
| 1572 | 1642 |
| 1573 DECLARE_CONCRETE_INSTRUCTION(LoadGlobalGeneric, "load-global-generic") | 1643 DECLARE_CONCRETE_INSTRUCTION(LoadGlobalGeneric, "load-global-generic") |
| 1574 DECLARE_HYDROGEN_ACCESSOR(LoadGlobalGeneric) | 1644 DECLARE_HYDROGEN_ACCESSOR(LoadGlobalGeneric) |
| 1575 | 1645 |
| 1576 LOperand* global_object() { return inputs_[0]; } | 1646 LOperand* context() { return inputs_[0]; } |
| 1647 LOperand* global_object() { return inputs_[1]; } |
| 1577 Handle<Object> name() const { return hydrogen()->name(); } | 1648 Handle<Object> name() const { return hydrogen()->name(); } |
| 1578 bool for_typeof() const { return hydrogen()->for_typeof(); } | 1649 bool for_typeof() const { return hydrogen()->for_typeof(); } |
| 1579 }; | 1650 }; |
| 1580 | 1651 |
| 1581 | 1652 |
| 1582 class LStoreGlobalCell V8_FINAL : public LTemplateInstruction<0, 1, 1> { | 1653 class LStoreGlobalCell V8_FINAL : public LTemplateInstruction<0, 1, 1> { |
| 1583 public: | 1654 public: |
| 1584 explicit LStoreGlobalCell(LOperand* value, LOperand* temp) { | 1655 explicit LStoreGlobalCell(LOperand* value, LOperand* temp) { |
| 1585 inputs_[0] = value; | 1656 inputs_[0] = value; |
| 1586 temps_[0] = temp; | 1657 temps_[0] = temp; |
| 1587 } | 1658 } |
| 1588 | 1659 |
| 1589 LOperand* value() { return inputs_[0]; } | 1660 LOperand* value() { return inputs_[0]; } |
| 1590 LOperand* temp() { return temps_[0]; } | 1661 LOperand* temp() { return temps_[0]; } |
| 1591 | 1662 |
| 1592 DECLARE_CONCRETE_INSTRUCTION(StoreGlobalCell, "store-global-cell") | 1663 DECLARE_CONCRETE_INSTRUCTION(StoreGlobalCell, "store-global-cell") |
| 1593 DECLARE_HYDROGEN_ACCESSOR(StoreGlobalCell) | 1664 DECLARE_HYDROGEN_ACCESSOR(StoreGlobalCell) |
| 1594 }; | 1665 }; |
| 1595 | 1666 |
| 1596 | 1667 |
| 1597 class LStoreGlobalGeneric V8_FINAL : public LTemplateInstruction<0, 2, 0> { | 1668 class LStoreGlobalGeneric V8_FINAL : public LTemplateInstruction<0, 3, 0> { |
| 1598 public: | 1669 public: |
| 1599 explicit LStoreGlobalGeneric(LOperand* global_object, | 1670 explicit LStoreGlobalGeneric(LOperand* context, |
| 1671 LOperand* global_object, |
| 1600 LOperand* value) { | 1672 LOperand* value) { |
| 1601 inputs_[0] = global_object; | 1673 inputs_[0] = context; |
| 1602 inputs_[1] = value; | 1674 inputs_[1] = global_object; |
| 1675 inputs_[2] = value; |
| 1603 } | 1676 } |
| 1604 | 1677 |
| 1605 LOperand* global_object() { return inputs_[0]; } | 1678 LOperand* context() { return inputs_[0]; } |
| 1606 LOperand* value() { return inputs_[1]; } | 1679 LOperand* global_object() { return inputs_[1]; } |
| 1680 LOperand* value() { return inputs_[2]; } |
| 1607 | 1681 |
| 1608 DECLARE_CONCRETE_INSTRUCTION(StoreGlobalGeneric, "store-global-generic") | 1682 DECLARE_CONCRETE_INSTRUCTION(StoreGlobalGeneric, "store-global-generic") |
| 1609 DECLARE_HYDROGEN_ACCESSOR(StoreGlobalGeneric) | 1683 DECLARE_HYDROGEN_ACCESSOR(StoreGlobalGeneric) |
| 1610 | 1684 |
| 1611 Handle<Object> name() const { return hydrogen()->name(); } | 1685 Handle<Object> name() const { return hydrogen()->name(); } |
| 1612 StrictModeFlag strict_mode_flag() { return hydrogen()->strict_mode_flag(); } | 1686 StrictModeFlag strict_mode_flag() { return hydrogen()->strict_mode_flag(); } |
| 1613 }; | 1687 }; |
| 1614 | 1688 |
| 1615 | 1689 |
| 1616 class LLoadContextSlot V8_FINAL : public LTemplateInstruction<1, 1, 0> { | 1690 class LLoadContextSlot V8_FINAL : public LTemplateInstruction<1, 1, 0> { |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1728 explicit LOuterContext(LOperand* context) { | 1802 explicit LOuterContext(LOperand* context) { |
| 1729 inputs_[0] = context; | 1803 inputs_[0] = context; |
| 1730 } | 1804 } |
| 1731 | 1805 |
| 1732 LOperand* context() { return inputs_[0]; } | 1806 LOperand* context() { return inputs_[0]; } |
| 1733 | 1807 |
| 1734 DECLARE_CONCRETE_INSTRUCTION(OuterContext, "outer-context") | 1808 DECLARE_CONCRETE_INSTRUCTION(OuterContext, "outer-context") |
| 1735 }; | 1809 }; |
| 1736 | 1810 |
| 1737 | 1811 |
| 1738 class LDeclareGlobals V8_FINAL : public LTemplateInstruction<0, 0, 0> { | 1812 class LDeclareGlobals V8_FINAL : public LTemplateInstruction<0, 1, 0> { |
| 1739 public: | 1813 public: |
| 1814 explicit LDeclareGlobals(LOperand* context) { |
| 1815 inputs_[0] = context; |
| 1816 } |
| 1817 |
| 1818 LOperand* context() { return inputs_[0]; } |
| 1819 |
| 1740 DECLARE_CONCRETE_INSTRUCTION(DeclareGlobals, "declare-globals") | 1820 DECLARE_CONCRETE_INSTRUCTION(DeclareGlobals, "declare-globals") |
| 1741 DECLARE_HYDROGEN_ACCESSOR(DeclareGlobals) | 1821 DECLARE_HYDROGEN_ACCESSOR(DeclareGlobals) |
| 1742 }; | 1822 }; |
| 1743 | 1823 |
| 1744 | 1824 |
| 1745 class LGlobalObject V8_FINAL : public LTemplateInstruction<1, 0, 0> { | 1825 class LGlobalObject V8_FINAL : public LTemplateInstruction<1, 1, 0> { |
| 1746 public: | 1826 public: |
| 1827 explicit LGlobalObject(LOperand* context) { |
| 1828 inputs_[0] = context; |
| 1829 } |
| 1830 |
| 1831 LOperand* context() { return inputs_[0]; } |
| 1832 |
| 1747 DECLARE_CONCRETE_INSTRUCTION(GlobalObject, "global-object") | 1833 DECLARE_CONCRETE_INSTRUCTION(GlobalObject, "global-object") |
| 1748 }; | 1834 }; |
| 1749 | 1835 |
| 1750 | 1836 |
| 1751 class LGlobalReceiver V8_FINAL : public LTemplateInstruction<1, 1, 0> { | 1837 class LGlobalReceiver V8_FINAL : public LTemplateInstruction<1, 1, 0> { |
| 1752 public: | 1838 public: |
| 1753 explicit LGlobalReceiver(LOperand* global_object) { | 1839 explicit LGlobalReceiver(LOperand* global_object) { |
| 1754 inputs_[0] = global_object; | 1840 inputs_[0] = global_object; |
| 1755 } | 1841 } |
| 1756 | 1842 |
| 1757 LOperand* global() { return inputs_[0]; } | 1843 LOperand* global() { return inputs_[0]; } |
| 1758 | 1844 |
| 1759 DECLARE_CONCRETE_INSTRUCTION(GlobalReceiver, "global-receiver") | 1845 DECLARE_CONCRETE_INSTRUCTION(GlobalReceiver, "global-receiver") |
| 1760 }; | 1846 }; |
| 1761 | 1847 |
| 1762 | 1848 |
| 1763 class LCallConstantFunction V8_FINAL : public LTemplateInstruction<1, 0, 0> { | 1849 class LCallConstantFunction V8_FINAL : public LTemplateInstruction<1, 0, 0> { |
| 1764 public: | 1850 public: |
| 1765 DECLARE_CONCRETE_INSTRUCTION(CallConstantFunction, "call-constant-function") | 1851 DECLARE_CONCRETE_INSTRUCTION(CallConstantFunction, "call-constant-function") |
| 1766 DECLARE_HYDROGEN_ACCESSOR(CallConstantFunction) | 1852 DECLARE_HYDROGEN_ACCESSOR(CallConstantFunction) |
| 1767 | 1853 |
| 1768 virtual void PrintDataTo(StringStream* stream); | 1854 virtual void PrintDataTo(StringStream* stream); |
| 1769 | 1855 |
| 1770 Handle<JSFunction> function() { return hydrogen()->function(); } | 1856 Handle<JSFunction> function() { return hydrogen()->function(); } |
| 1771 int arity() const { return hydrogen()->argument_count() - 1; } | 1857 int arity() const { return hydrogen()->argument_count() - 1; } |
| 1772 }; | 1858 }; |
| 1773 | 1859 |
| 1774 | 1860 |
| 1775 class LInvokeFunction V8_FINAL : public LTemplateInstruction<1, 1, 0> { | 1861 class LInvokeFunction V8_FINAL : public LTemplateInstruction<1, 2, 0> { |
| 1776 public: | 1862 public: |
| 1777 explicit LInvokeFunction(LOperand* function) { | 1863 LInvokeFunction(LOperand* context, LOperand* function) { |
| 1778 inputs_[0] = function; | 1864 inputs_[0] = context; |
| 1865 inputs_[1] = function; |
| 1779 } | 1866 } |
| 1780 | 1867 |
| 1781 LOperand* function() { return inputs_[0]; } | 1868 LOperand* context() { return inputs_[0]; } |
| 1869 LOperand* function() { return inputs_[1]; } |
| 1782 | 1870 |
| 1783 DECLARE_CONCRETE_INSTRUCTION(InvokeFunction, "invoke-function") | 1871 DECLARE_CONCRETE_INSTRUCTION(InvokeFunction, "invoke-function") |
| 1784 DECLARE_HYDROGEN_ACCESSOR(InvokeFunction) | 1872 DECLARE_HYDROGEN_ACCESSOR(InvokeFunction) |
| 1785 | 1873 |
| 1786 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; | 1874 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; |
| 1787 | 1875 |
| 1788 int arity() const { return hydrogen()->argument_count() - 1; } | 1876 int arity() const { return hydrogen()->argument_count() - 1; } |
| 1789 }; | 1877 }; |
| 1790 | 1878 |
| 1791 | 1879 |
| 1792 class LCallKeyed V8_FINAL : public LTemplateInstruction<1, 1, 0> { | 1880 class LCallKeyed V8_FINAL : public LTemplateInstruction<1, 2, 0> { |
| 1793 public: | 1881 public: |
| 1794 explicit LCallKeyed(LOperand* key) { | 1882 LCallKeyed(LOperand* context, LOperand* key) { |
| 1795 inputs_[0] = key; | 1883 inputs_[0] = context; |
| 1884 inputs_[1] = key; |
| 1796 } | 1885 } |
| 1797 | 1886 |
| 1798 DECLARE_CONCRETE_INSTRUCTION(CallKeyed, "call-keyed") | 1887 DECLARE_CONCRETE_INSTRUCTION(CallKeyed, "call-keyed") |
| 1799 DECLARE_HYDROGEN_ACCESSOR(CallKeyed) | 1888 DECLARE_HYDROGEN_ACCESSOR(CallKeyed) |
| 1800 | 1889 |
| 1801 LOperand* key() { return inputs_[0]; } | 1890 LOperand* context() { return inputs_[0]; } |
| 1891 LOperand* key() { return inputs_[1]; } |
| 1802 | 1892 |
| 1803 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; | 1893 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; |
| 1804 | 1894 |
| 1805 int arity() const { return hydrogen()->argument_count() - 1; } | 1895 int arity() const { return hydrogen()->argument_count() - 1; } |
| 1806 }; | 1896 }; |
| 1807 | 1897 |
| 1808 | 1898 |
| 1809 class LCallNamed V8_FINAL : public LTemplateInstruction<1, 0, 0> { | 1899 class LCallNamed V8_FINAL : public LTemplateInstruction<1, 1, 0> { |
| 1810 public: | 1900 public: |
| 1901 explicit LCallNamed(LOperand* context) { |
| 1902 inputs_[0] = context; |
| 1903 } |
| 1904 |
| 1905 LOperand* context() { return inputs_[0]; } |
| 1906 |
| 1811 DECLARE_CONCRETE_INSTRUCTION(CallNamed, "call-named") | 1907 DECLARE_CONCRETE_INSTRUCTION(CallNamed, "call-named") |
| 1812 DECLARE_HYDROGEN_ACCESSOR(CallNamed) | 1908 DECLARE_HYDROGEN_ACCESSOR(CallNamed) |
| 1813 | 1909 |
| 1814 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; | 1910 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; |
| 1815 | 1911 |
| 1816 Handle<String> name() const { return hydrogen()->name(); } | 1912 Handle<String> name() const { return hydrogen()->name(); } |
| 1817 int arity() const { return hydrogen()->argument_count() - 1; } | 1913 int arity() const { return hydrogen()->argument_count() - 1; } |
| 1818 }; | 1914 }; |
| 1819 | 1915 |
| 1820 | 1916 |
| 1821 class LCallFunction V8_FINAL : public LTemplateInstruction<1, 1, 0> { | 1917 class LCallFunction V8_FINAL : public LTemplateInstruction<1, 2, 0> { |
| 1822 public: | 1918 public: |
| 1823 explicit LCallFunction(LOperand* function) { | 1919 LCallFunction(LOperand* context, LOperand* function) { |
| 1824 inputs_[0] = function; | 1920 inputs_[0] = context; |
| 1921 inputs_[1] = function; |
| 1825 } | 1922 } |
| 1826 | 1923 |
| 1827 DECLARE_CONCRETE_INSTRUCTION(CallFunction, "call-function") | 1924 DECLARE_CONCRETE_INSTRUCTION(CallFunction, "call-function") |
| 1828 DECLARE_HYDROGEN_ACCESSOR(CallFunction) | 1925 DECLARE_HYDROGEN_ACCESSOR(CallFunction) |
| 1829 | 1926 |
| 1830 LOperand* function() { return inputs_[0]; } | 1927 LOperand* context() { return inputs_[0]; } |
| 1928 LOperand* function() { return inputs_[1]; } |
| 1831 int arity() const { return hydrogen()->argument_count() - 1; } | 1929 int arity() const { return hydrogen()->argument_count() - 1; } |
| 1832 }; | 1930 }; |
| 1833 | 1931 |
| 1834 | 1932 |
| 1835 class LCallGlobal V8_FINAL : public LTemplateInstruction<1, 0, 0> { | 1933 class LCallGlobal V8_FINAL : public LTemplateInstruction<1, 1, 0> { |
| 1836 public: | 1934 public: |
| 1935 explicit LCallGlobal(LOperand* context) { |
| 1936 inputs_[0] = context; |
| 1937 } |
| 1938 |
| 1939 LOperand* context() { return inputs_[0]; } |
| 1940 |
| 1837 DECLARE_CONCRETE_INSTRUCTION(CallGlobal, "call-global") | 1941 DECLARE_CONCRETE_INSTRUCTION(CallGlobal, "call-global") |
| 1838 DECLARE_HYDROGEN_ACCESSOR(CallGlobal) | 1942 DECLARE_HYDROGEN_ACCESSOR(CallGlobal) |
| 1839 | 1943 |
| 1840 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; | 1944 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; |
| 1841 | 1945 |
| 1842 Handle<String> name() const {return hydrogen()->name(); } | 1946 Handle<String> name() const {return hydrogen()->name(); } |
| 1843 int arity() const { return hydrogen()->argument_count() - 1; } | 1947 int arity() const { return hydrogen()->argument_count() - 1; } |
| 1844 }; | 1948 }; |
| 1845 | 1949 |
| 1846 | 1950 |
| 1847 class LCallKnownGlobal V8_FINAL : public LTemplateInstruction<1, 0, 0> { | 1951 class LCallKnownGlobal V8_FINAL : public LTemplateInstruction<1, 0, 0> { |
| 1848 public: | 1952 public: |
| 1849 DECLARE_CONCRETE_INSTRUCTION(CallKnownGlobal, "call-known-global") | 1953 DECLARE_CONCRETE_INSTRUCTION(CallKnownGlobal, "call-known-global") |
| 1850 DECLARE_HYDROGEN_ACCESSOR(CallKnownGlobal) | 1954 DECLARE_HYDROGEN_ACCESSOR(CallKnownGlobal) |
| 1851 | 1955 |
| 1852 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; | 1956 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; |
| 1853 | 1957 |
| 1854 int arity() const { return hydrogen()->argument_count() - 1; } | 1958 int arity() const { return hydrogen()->argument_count() - 1; } |
| 1855 }; | 1959 }; |
| 1856 | 1960 |
| 1857 | 1961 |
| 1858 class LCallNew V8_FINAL : public LTemplateInstruction<1, 1, 0> { | 1962 class LCallNew V8_FINAL : public LTemplateInstruction<1, 2, 0> { |
| 1859 public: | 1963 public: |
| 1860 explicit LCallNew(LOperand* constructor) { | 1964 LCallNew(LOperand* context, LOperand* constructor) { |
| 1861 inputs_[0] = constructor; | 1965 inputs_[0] = context; |
| 1966 inputs_[1] = constructor; |
| 1862 } | 1967 } |
| 1863 | 1968 |
| 1864 LOperand* constructor() { return inputs_[0]; } | 1969 LOperand* context() { return inputs_[0]; } |
| 1970 LOperand* constructor() { return inputs_[1]; } |
| 1865 | 1971 |
| 1866 DECLARE_CONCRETE_INSTRUCTION(CallNew, "call-new") | 1972 DECLARE_CONCRETE_INSTRUCTION(CallNew, "call-new") |
| 1867 DECLARE_HYDROGEN_ACCESSOR(CallNew) | 1973 DECLARE_HYDROGEN_ACCESSOR(CallNew) |
| 1868 | 1974 |
| 1869 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; | 1975 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; |
| 1870 | 1976 |
| 1871 int arity() const { return hydrogen()->argument_count() - 1; } | 1977 int arity() const { return hydrogen()->argument_count() - 1; } |
| 1872 }; | 1978 }; |
| 1873 | 1979 |
| 1874 | 1980 |
| 1875 class LCallNewArray V8_FINAL : public LTemplateInstruction<1, 1, 0> { | 1981 class LCallNewArray V8_FINAL : public LTemplateInstruction<1, 2, 0> { |
| 1876 public: | 1982 public: |
| 1877 explicit LCallNewArray(LOperand* constructor) { | 1983 LCallNewArray(LOperand* context, LOperand* constructor) { |
| 1878 inputs_[0] = constructor; | 1984 inputs_[0] = context; |
| 1985 inputs_[1] = constructor; |
| 1879 } | 1986 } |
| 1880 | 1987 |
| 1881 LOperand* constructor() { return inputs_[0]; } | 1988 LOperand* context() { return inputs_[0]; } |
| 1989 LOperand* constructor() { return inputs_[1]; } |
| 1882 | 1990 |
| 1883 DECLARE_CONCRETE_INSTRUCTION(CallNewArray, "call-new-array") | 1991 DECLARE_CONCRETE_INSTRUCTION(CallNewArray, "call-new-array") |
| 1884 DECLARE_HYDROGEN_ACCESSOR(CallNewArray) | 1992 DECLARE_HYDROGEN_ACCESSOR(CallNewArray) |
| 1885 | 1993 |
| 1886 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; | 1994 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; |
| 1887 | 1995 |
| 1888 int arity() const { return hydrogen()->argument_count() - 1; } | 1996 int arity() const { return hydrogen()->argument_count() - 1; } |
| 1889 }; | 1997 }; |
| 1890 | 1998 |
| 1891 | 1999 |
| 1892 class LCallRuntime V8_FINAL : public LTemplateInstruction<1, 0, 0> { | 2000 class LCallRuntime V8_FINAL : public LTemplateInstruction<1, 1, 0> { |
| 1893 public: | 2001 public: |
| 2002 explicit LCallRuntime(LOperand* context) { |
| 2003 inputs_[0] = context; |
| 2004 } |
| 2005 |
| 2006 LOperand* context() { return inputs_[0]; } |
| 2007 |
| 1894 DECLARE_CONCRETE_INSTRUCTION(CallRuntime, "call-runtime") | 2008 DECLARE_CONCRETE_INSTRUCTION(CallRuntime, "call-runtime") |
| 1895 DECLARE_HYDROGEN_ACCESSOR(CallRuntime) | 2009 DECLARE_HYDROGEN_ACCESSOR(CallRuntime) |
| 1896 | 2010 |
| 1897 virtual bool ClobbersDoubleRegisters() const V8_OVERRIDE { | 2011 virtual bool ClobbersDoubleRegisters() const V8_OVERRIDE { |
| 1898 return save_doubles() == kDontSaveFPRegs; | 2012 return save_doubles() == kDontSaveFPRegs; |
| 1899 } | 2013 } |
| 1900 | 2014 |
| 1901 const Runtime::Function* function() const { return hydrogen()->function(); } | 2015 const Runtime::Function* function() const { return hydrogen()->function(); } |
| 1902 int arity() const { return hydrogen()->argument_count(); } | 2016 int arity() const { return hydrogen()->argument_count(); } |
| 1903 SaveFPRegsMode save_doubles() const { return hydrogen()->save_doubles(); } | 2017 SaveFPRegsMode save_doubles() const { return hydrogen()->save_doubles(); } |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1936 temps_[0] = temp; | 2050 temps_[0] = temp; |
| 1937 } | 2051 } |
| 1938 | 2052 |
| 1939 LOperand* value() { return inputs_[0]; } | 2053 LOperand* value() { return inputs_[0]; } |
| 1940 LOperand* temp() { return temps_[0]; } | 2054 LOperand* temp() { return temps_[0]; } |
| 1941 | 2055 |
| 1942 DECLARE_CONCRETE_INSTRUCTION(Uint32ToDouble, "uint32-to-double") | 2056 DECLARE_CONCRETE_INSTRUCTION(Uint32ToDouble, "uint32-to-double") |
| 1943 }; | 2057 }; |
| 1944 | 2058 |
| 1945 | 2059 |
| 2060 class LUint32ToSmi V8_FINAL : public LTemplateInstruction<1, 1, 0> { |
| 2061 public: |
| 2062 explicit LUint32ToSmi(LOperand* value) { |
| 2063 inputs_[0] = value; |
| 2064 } |
| 2065 |
| 2066 LOperand* value() { return inputs_[0]; } |
| 2067 |
| 2068 DECLARE_CONCRETE_INSTRUCTION(Uint32ToSmi, "uint32-to-smi") |
| 2069 DECLARE_HYDROGEN_ACCESSOR(Change) |
| 2070 }; |
| 2071 |
| 2072 |
| 1946 class LNumberTagI V8_FINAL : public LTemplateInstruction<1, 1, 0> { | 2073 class LNumberTagI V8_FINAL : public LTemplateInstruction<1, 1, 0> { |
| 1947 public: | 2074 public: |
| 1948 explicit LNumberTagI(LOperand* value) { | 2075 explicit LNumberTagI(LOperand* value) { |
| 1949 inputs_[0] = value; | 2076 inputs_[0] = value; |
| 1950 } | 2077 } |
| 1951 | 2078 |
| 1952 LOperand* value() { return inputs_[0]; } | 2079 LOperand* value() { return inputs_[0]; } |
| 1953 | 2080 |
| 1954 DECLARE_CONCRETE_INSTRUCTION(NumberTagI, "number-tag-i") | 2081 DECLARE_CONCRETE_INSTRUCTION(NumberTagI, "number-tag-i") |
| 1955 }; | 2082 }; |
| (...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2090 | 2217 |
| 2091 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; | 2218 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; |
| 2092 | 2219 |
| 2093 Handle<Map> transition() const { return hydrogen()->transition_map(); } | 2220 Handle<Map> transition() const { return hydrogen()->transition_map(); } |
| 2094 Representation representation() const { | 2221 Representation representation() const { |
| 2095 return hydrogen()->field_representation(); | 2222 return hydrogen()->field_representation(); |
| 2096 } | 2223 } |
| 2097 }; | 2224 }; |
| 2098 | 2225 |
| 2099 | 2226 |
| 2100 class LStoreNamedGeneric V8_FINAL : public LTemplateInstruction<0, 2, 0> { | 2227 class LStoreNamedGeneric V8_FINAL : public LTemplateInstruction<0, 3, 0> { |
| 2101 public: | 2228 public: |
| 2102 LStoreNamedGeneric(LOperand* object, LOperand* value) { | 2229 LStoreNamedGeneric(LOperand* context, LOperand* object, LOperand* value) { |
| 2103 inputs_[0] = object; | 2230 inputs_[0] = context; |
| 2104 inputs_[1] = value; | 2231 inputs_[1] = object; |
| 2232 inputs_[2] = value; |
| 2105 } | 2233 } |
| 2106 | 2234 |
| 2107 LOperand* object() { return inputs_[0]; } | 2235 LOperand* context() { return inputs_[0]; } |
| 2108 LOperand* value() { return inputs_[1]; } | 2236 LOperand* object() { return inputs_[1]; } |
| 2237 LOperand* value() { return inputs_[2]; } |
| 2109 | 2238 |
| 2110 DECLARE_CONCRETE_INSTRUCTION(StoreNamedGeneric, "store-named-generic") | 2239 DECLARE_CONCRETE_INSTRUCTION(StoreNamedGeneric, "store-named-generic") |
| 2111 DECLARE_HYDROGEN_ACCESSOR(StoreNamedGeneric) | 2240 DECLARE_HYDROGEN_ACCESSOR(StoreNamedGeneric) |
| 2112 | 2241 |
| 2113 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; | 2242 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; |
| 2114 | 2243 |
| 2115 Handle<Object> name() const { return hydrogen()->name(); } | 2244 Handle<Object> name() const { return hydrogen()->name(); } |
| 2116 StrictModeFlag strict_mode_flag() { return hydrogen()->strict_mode_flag(); } | 2245 StrictModeFlag strict_mode_flag() { return hydrogen()->strict_mode_flag(); } |
| 2117 }; | 2246 }; |
| 2118 | 2247 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 2133 | 2262 |
| 2134 DECLARE_CONCRETE_INSTRUCTION(StoreKeyed, "store-keyed") | 2263 DECLARE_CONCRETE_INSTRUCTION(StoreKeyed, "store-keyed") |
| 2135 DECLARE_HYDROGEN_ACCESSOR(StoreKeyed) | 2264 DECLARE_HYDROGEN_ACCESSOR(StoreKeyed) |
| 2136 | 2265 |
| 2137 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; | 2266 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; |
| 2138 bool NeedsCanonicalization() { return hydrogen()->NeedsCanonicalization(); } | 2267 bool NeedsCanonicalization() { return hydrogen()->NeedsCanonicalization(); } |
| 2139 uint32_t additional_index() const { return hydrogen()->index_offset(); } | 2268 uint32_t additional_index() const { return hydrogen()->index_offset(); } |
| 2140 }; | 2269 }; |
| 2141 | 2270 |
| 2142 | 2271 |
| 2143 class LStoreKeyedGeneric V8_FINAL : public LTemplateInstruction<0, 3, 0> { | 2272 class LStoreKeyedGeneric V8_FINAL : public LTemplateInstruction<0, 4, 0> { |
| 2144 public: | 2273 public: |
| 2145 LStoreKeyedGeneric(LOperand* object, LOperand* key, LOperand* value) { | 2274 LStoreKeyedGeneric(LOperand* context, |
| 2146 inputs_[0] = object; | 2275 LOperand* object, |
| 2147 inputs_[1] = key; | 2276 LOperand* key, |
| 2148 inputs_[2] = value; | 2277 LOperand* value) { |
| 2278 inputs_[0] = context; |
| 2279 inputs_[1] = object; |
| 2280 inputs_[2] = key; |
| 2281 inputs_[3] = value; |
| 2149 } | 2282 } |
| 2150 | 2283 |
| 2151 LOperand* object() { return inputs_[0]; } | 2284 LOperand* context() { return inputs_[0]; } |
| 2152 LOperand* key() { return inputs_[1]; } | 2285 LOperand* object() { return inputs_[1]; } |
| 2153 LOperand* value() { return inputs_[2]; } | 2286 LOperand* key() { return inputs_[2]; } |
| 2287 LOperand* value() { return inputs_[3]; } |
| 2154 | 2288 |
| 2155 DECLARE_CONCRETE_INSTRUCTION(StoreKeyedGeneric, "store-keyed-generic") | 2289 DECLARE_CONCRETE_INSTRUCTION(StoreKeyedGeneric, "store-keyed-generic") |
| 2156 DECLARE_HYDROGEN_ACCESSOR(StoreKeyedGeneric) | 2290 DECLARE_HYDROGEN_ACCESSOR(StoreKeyedGeneric) |
| 2157 | 2291 |
| 2158 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; | 2292 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; |
| 2159 | 2293 |
| 2160 StrictModeFlag strict_mode_flag() { return hydrogen()->strict_mode_flag(); } | 2294 StrictModeFlag strict_mode_flag() { return hydrogen()->strict_mode_flag(); } |
| 2161 }; | 2295 }; |
| 2162 | 2296 |
| 2163 | 2297 |
| 2164 class LTransitionElementsKind V8_FINAL : public LTemplateInstruction<0, 1, 2> { | 2298 class LTransitionElementsKind V8_FINAL : public LTemplateInstruction<0, 2, 2> { |
| 2165 public: | 2299 public: |
| 2166 LTransitionElementsKind(LOperand* object, | 2300 LTransitionElementsKind(LOperand* object, |
| 2301 LOperand* context, |
| 2167 LOperand* new_map_temp, | 2302 LOperand* new_map_temp, |
| 2168 LOperand* temp) { | 2303 LOperand* temp) { |
| 2169 inputs_[0] = object; | 2304 inputs_[0] = object; |
| 2305 inputs_[1] = context; |
| 2170 temps_[0] = new_map_temp; | 2306 temps_[0] = new_map_temp; |
| 2171 temps_[1] = temp; | 2307 temps_[1] = temp; |
| 2172 } | 2308 } |
| 2173 | 2309 |
| 2174 LOperand* object() { return inputs_[0]; } | 2310 LOperand* object() { return inputs_[0]; } |
| 2311 LOperand* context() { return inputs_[1]; } |
| 2175 LOperand* new_map_temp() { return temps_[0]; } | 2312 LOperand* new_map_temp() { return temps_[0]; } |
| 2176 LOperand* temp() { return temps_[1]; } | 2313 LOperand* temp() { return temps_[1]; } |
| 2177 | 2314 |
| 2178 DECLARE_CONCRETE_INSTRUCTION(TransitionElementsKind, | 2315 DECLARE_CONCRETE_INSTRUCTION(TransitionElementsKind, |
| 2179 "transition-elements-kind") | 2316 "transition-elements-kind") |
| 2180 DECLARE_HYDROGEN_ACCESSOR(TransitionElementsKind) | 2317 DECLARE_HYDROGEN_ACCESSOR(TransitionElementsKind) |
| 2181 | 2318 |
| 2182 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; | 2319 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; |
| 2183 | 2320 |
| 2184 Handle<Map> original_map() { return hydrogen()->original_map().handle(); } | 2321 Handle<Map> original_map() { return hydrogen()->original_map().handle(); } |
| (...skipping 14 matching lines...) Expand all Loading... |
| 2199 } | 2336 } |
| 2200 | 2337 |
| 2201 LOperand* object() { return inputs_[0]; } | 2338 LOperand* object() { return inputs_[0]; } |
| 2202 LOperand* temp() { return temps_[0]; } | 2339 LOperand* temp() { return temps_[0]; } |
| 2203 | 2340 |
| 2204 DECLARE_CONCRETE_INSTRUCTION(TrapAllocationMemento, | 2341 DECLARE_CONCRETE_INSTRUCTION(TrapAllocationMemento, |
| 2205 "trap-allocation-memento") | 2342 "trap-allocation-memento") |
| 2206 }; | 2343 }; |
| 2207 | 2344 |
| 2208 | 2345 |
| 2209 class LStringAdd V8_FINAL : public LTemplateInstruction<1, 2, 0> { | 2346 class LStringAdd V8_FINAL : public LTemplateInstruction<1, 3, 0> { |
| 2210 public: | 2347 public: |
| 2211 LStringAdd(LOperand* left, LOperand* right) { | 2348 LStringAdd(LOperand* context, LOperand* left, LOperand* right) { |
| 2212 inputs_[0] = left; | 2349 inputs_[0] = context; |
| 2213 inputs_[1] = right; | 2350 inputs_[1] = left; |
| 2351 inputs_[2] = right; |
| 2214 } | 2352 } |
| 2215 | 2353 |
| 2216 LOperand* left() { return inputs_[0]; } | 2354 LOperand* context() { return inputs_[0]; } |
| 2217 LOperand* right() { return inputs_[1]; } | 2355 LOperand* left() { return inputs_[1]; } |
| 2356 LOperand* right() { return inputs_[2]; } |
| 2218 | 2357 |
| 2219 DECLARE_CONCRETE_INSTRUCTION(StringAdd, "string-add") | 2358 DECLARE_CONCRETE_INSTRUCTION(StringAdd, "string-add") |
| 2220 DECLARE_HYDROGEN_ACCESSOR(StringAdd) | 2359 DECLARE_HYDROGEN_ACCESSOR(StringAdd) |
| 2221 }; | 2360 }; |
| 2222 | 2361 |
| 2223 | 2362 |
| 2224 class LStringCharCodeAt V8_FINAL : public LTemplateInstruction<1, 2, 0> { | 2363 class LStringCharCodeAt V8_FINAL : public LTemplateInstruction<1, 3, 0> { |
| 2225 public: | 2364 public: |
| 2226 LStringCharCodeAt(LOperand* string, LOperand* index) { | 2365 LStringCharCodeAt(LOperand* context, LOperand* string, LOperand* index) { |
| 2227 inputs_[0] = string; | 2366 inputs_[0] = context; |
| 2228 inputs_[1] = index; | 2367 inputs_[1] = string; |
| 2368 inputs_[2] = index; |
| 2229 } | 2369 } |
| 2230 | 2370 |
| 2231 LOperand* string() { return inputs_[0]; } | 2371 LOperand* context() { return inputs_[0]; } |
| 2232 LOperand* index() { return inputs_[1]; } | 2372 LOperand* string() { return inputs_[1]; } |
| 2373 LOperand* index() { return inputs_[2]; } |
| 2233 | 2374 |
| 2234 DECLARE_CONCRETE_INSTRUCTION(StringCharCodeAt, "string-char-code-at") | 2375 DECLARE_CONCRETE_INSTRUCTION(StringCharCodeAt, "string-char-code-at") |
| 2235 DECLARE_HYDROGEN_ACCESSOR(StringCharCodeAt) | 2376 DECLARE_HYDROGEN_ACCESSOR(StringCharCodeAt) |
| 2236 }; | 2377 }; |
| 2237 | 2378 |
| 2238 | 2379 |
| 2239 class LStringCharFromCode V8_FINAL : public LTemplateInstruction<1, 1, 0> { | 2380 class LStringCharFromCode V8_FINAL : public LTemplateInstruction<1, 2, 0> { |
| 2240 public: | 2381 public: |
| 2241 explicit LStringCharFromCode(LOperand* char_code) { | 2382 explicit LStringCharFromCode(LOperand* context, LOperand* char_code) { |
| 2242 inputs_[0] = char_code; | 2383 inputs_[0] = context; |
| 2384 inputs_[1] = char_code; |
| 2243 } | 2385 } |
| 2244 | 2386 |
| 2245 LOperand* char_code() { return inputs_[0]; } | 2387 LOperand* context() { return inputs_[0]; } |
| 2388 LOperand* char_code() { return inputs_[1]; } |
| 2246 | 2389 |
| 2247 DECLARE_CONCRETE_INSTRUCTION(StringCharFromCode, "string-char-from-code") | 2390 DECLARE_CONCRETE_INSTRUCTION(StringCharFromCode, "string-char-from-code") |
| 2248 DECLARE_HYDROGEN_ACCESSOR(StringCharFromCode) | 2391 DECLARE_HYDROGEN_ACCESSOR(StringCharFromCode) |
| 2249 }; | 2392 }; |
| 2250 | 2393 |
| 2251 | 2394 |
| 2252 class LCheckValue V8_FINAL : public LTemplateInstruction<0, 1, 0> { | 2395 class LCheckValue V8_FINAL : public LTemplateInstruction<0, 1, 0> { |
| 2253 public: | 2396 public: |
| 2254 explicit LCheckValue(LOperand* value) { | 2397 explicit LCheckValue(LOperand* value) { |
| 2255 inputs_[0] = value; | 2398 inputs_[0] = value; |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2345 inputs_[0] = value; | 2488 inputs_[0] = value; |
| 2346 } | 2489 } |
| 2347 | 2490 |
| 2348 LOperand* value() { return inputs_[0]; } | 2491 LOperand* value() { return inputs_[0]; } |
| 2349 | 2492 |
| 2350 DECLARE_CONCRETE_INSTRUCTION(CheckNonSmi, "check-non-smi") | 2493 DECLARE_CONCRETE_INSTRUCTION(CheckNonSmi, "check-non-smi") |
| 2351 DECLARE_HYDROGEN_ACCESSOR(CheckHeapObject) | 2494 DECLARE_HYDROGEN_ACCESSOR(CheckHeapObject) |
| 2352 }; | 2495 }; |
| 2353 | 2496 |
| 2354 | 2497 |
| 2355 class LAllocate V8_FINAL : public LTemplateInstruction<1, 1, 1> { | 2498 class LAllocate V8_FINAL : public LTemplateInstruction<1, 2, 1> { |
| 2356 public: | 2499 public: |
| 2357 LAllocate(LOperand* size, LOperand* temp) { | 2500 LAllocate(LOperand* context, LOperand* size, LOperand* temp) { |
| 2358 inputs_[0] = size; | 2501 inputs_[0] = context; |
| 2502 inputs_[1] = size; |
| 2359 temps_[0] = temp; | 2503 temps_[0] = temp; |
| 2360 } | 2504 } |
| 2361 | 2505 |
| 2362 LOperand* size() { return inputs_[0]; } | 2506 LOperand* context() { return inputs_[0]; } |
| 2507 LOperand* size() { return inputs_[1]; } |
| 2363 LOperand* temp() { return temps_[0]; } | 2508 LOperand* temp() { return temps_[0]; } |
| 2364 | 2509 |
| 2365 DECLARE_CONCRETE_INSTRUCTION(Allocate, "allocate") | 2510 DECLARE_CONCRETE_INSTRUCTION(Allocate, "allocate") |
| 2366 DECLARE_HYDROGEN_ACCESSOR(Allocate) | 2511 DECLARE_HYDROGEN_ACCESSOR(Allocate) |
| 2367 }; | 2512 }; |
| 2368 | 2513 |
| 2369 | 2514 |
| 2370 class LRegExpLiteral V8_FINAL : public LTemplateInstruction<1, 0, 0> { | 2515 class LRegExpLiteral V8_FINAL : public LTemplateInstruction<1, 1, 0> { |
| 2371 public: | 2516 public: |
| 2517 explicit LRegExpLiteral(LOperand* context) { |
| 2518 inputs_[0] = context; |
| 2519 } |
| 2520 |
| 2521 LOperand* context() { return inputs_[0]; } |
| 2522 |
| 2372 DECLARE_CONCRETE_INSTRUCTION(RegExpLiteral, "regexp-literal") | 2523 DECLARE_CONCRETE_INSTRUCTION(RegExpLiteral, "regexp-literal") |
| 2373 DECLARE_HYDROGEN_ACCESSOR(RegExpLiteral) | 2524 DECLARE_HYDROGEN_ACCESSOR(RegExpLiteral) |
| 2374 }; | 2525 }; |
| 2375 | 2526 |
| 2376 | 2527 |
| 2377 class LFunctionLiteral V8_FINAL : public LTemplateInstruction<1, 0, 0> { | 2528 class LFunctionLiteral V8_FINAL : public LTemplateInstruction<1, 1, 0> { |
| 2378 public: | 2529 public: |
| 2530 explicit LFunctionLiteral(LOperand* context) { |
| 2531 inputs_[0] = context; |
| 2532 } |
| 2533 |
| 2534 LOperand* context() { return inputs_[0]; } |
| 2535 |
| 2379 DECLARE_CONCRETE_INSTRUCTION(FunctionLiteral, "function-literal") | 2536 DECLARE_CONCRETE_INSTRUCTION(FunctionLiteral, "function-literal") |
| 2380 DECLARE_HYDROGEN_ACCESSOR(FunctionLiteral) | 2537 DECLARE_HYDROGEN_ACCESSOR(FunctionLiteral) |
| 2381 }; | 2538 }; |
| 2382 | 2539 |
| 2383 | 2540 |
| 2384 class LToFastProperties V8_FINAL : public LTemplateInstruction<1, 1, 0> { | 2541 class LToFastProperties V8_FINAL : public LTemplateInstruction<1, 1, 0> { |
| 2385 public: | 2542 public: |
| 2386 explicit LToFastProperties(LOperand* value) { | 2543 explicit LToFastProperties(LOperand* value) { |
| 2387 inputs_[0] = value; | 2544 inputs_[0] = value; |
| 2388 } | 2545 } |
| 2389 | 2546 |
| 2390 LOperand* value() { return inputs_[0]; } | 2547 LOperand* value() { return inputs_[0]; } |
| 2391 | 2548 |
| 2392 DECLARE_CONCRETE_INSTRUCTION(ToFastProperties, "to-fast-properties") | 2549 DECLARE_CONCRETE_INSTRUCTION(ToFastProperties, "to-fast-properties") |
| 2393 DECLARE_HYDROGEN_ACCESSOR(ToFastProperties) | 2550 DECLARE_HYDROGEN_ACCESSOR(ToFastProperties) |
| 2394 }; | 2551 }; |
| 2395 | 2552 |
| 2396 | 2553 |
| 2397 class LTypeof V8_FINAL : public LTemplateInstruction<1, 1, 0> { | 2554 class LTypeof V8_FINAL : public LTemplateInstruction<1, 2, 0> { |
| 2398 public: | 2555 public: |
| 2399 explicit LTypeof(LOperand* value) { | 2556 LTypeof(LOperand* context, LOperand* value) { |
| 2400 inputs_[0] = value; | 2557 inputs_[0] = context; |
| 2558 inputs_[1] = value; |
| 2401 } | 2559 } |
| 2402 | 2560 |
| 2403 LOperand* value() { return inputs_[0]; } | 2561 LOperand* context() { return inputs_[0]; } |
| 2562 LOperand* value() { return inputs_[1]; } |
| 2404 | 2563 |
| 2405 DECLARE_CONCRETE_INSTRUCTION(Typeof, "typeof") | 2564 DECLARE_CONCRETE_INSTRUCTION(Typeof, "typeof") |
| 2406 }; | 2565 }; |
| 2407 | 2566 |
| 2408 | 2567 |
| 2409 class LTypeofIsAndBranch V8_FINAL : public LControlInstruction<1, 0> { | 2568 class LTypeofIsAndBranch V8_FINAL : public LControlInstruction<1, 0> { |
| 2410 public: | 2569 public: |
| 2411 explicit LTypeofIsAndBranch(LOperand* value) { | 2570 explicit LTypeofIsAndBranch(LOperand* value) { |
| 2412 inputs_[0] = value; | 2571 inputs_[0] = value; |
| 2413 } | 2572 } |
| (...skipping 27 matching lines...) Expand all Loading... |
| 2441 public: | 2600 public: |
| 2442 LOsrEntry() {} | 2601 LOsrEntry() {} |
| 2443 | 2602 |
| 2444 virtual bool HasInterestingComment(LCodeGen* gen) const V8_OVERRIDE { | 2603 virtual bool HasInterestingComment(LCodeGen* gen) const V8_OVERRIDE { |
| 2445 return false; | 2604 return false; |
| 2446 } | 2605 } |
| 2447 DECLARE_CONCRETE_INSTRUCTION(OsrEntry, "osr-entry") | 2606 DECLARE_CONCRETE_INSTRUCTION(OsrEntry, "osr-entry") |
| 2448 }; | 2607 }; |
| 2449 | 2608 |
| 2450 | 2609 |
| 2451 class LStackCheck V8_FINAL : public LTemplateInstruction<0, 0, 0> { | 2610 class LStackCheck V8_FINAL : public LTemplateInstruction<0, 1, 0> { |
| 2452 public: | 2611 public: |
| 2612 explicit LStackCheck(LOperand* context) { |
| 2613 inputs_[0] = context; |
| 2614 } |
| 2615 |
| 2616 LOperand* context() { return inputs_[0]; } |
| 2617 |
| 2453 DECLARE_CONCRETE_INSTRUCTION(StackCheck, "stack-check") | 2618 DECLARE_CONCRETE_INSTRUCTION(StackCheck, "stack-check") |
| 2454 DECLARE_HYDROGEN_ACCESSOR(StackCheck) | 2619 DECLARE_HYDROGEN_ACCESSOR(StackCheck) |
| 2455 | 2620 |
| 2456 Label* done_label() { return &done_label_; } | 2621 Label* done_label() { return &done_label_; } |
| 2457 | 2622 |
| 2458 private: | 2623 private: |
| 2459 Label done_label_; | 2624 Label done_label_; |
| 2460 }; | 2625 }; |
| 2461 | 2626 |
| 2462 | 2627 |
| 2463 class LForInPrepareMap V8_FINAL : public LTemplateInstruction<1, 1, 0> { | 2628 class LForInPrepareMap V8_FINAL : public LTemplateInstruction<1, 2, 0> { |
| 2464 public: | 2629 public: |
| 2465 explicit LForInPrepareMap(LOperand* object) { | 2630 LForInPrepareMap(LOperand* context, LOperand* object) { |
| 2466 inputs_[0] = object; | 2631 inputs_[0] = context; |
| 2632 inputs_[1] = object; |
| 2467 } | 2633 } |
| 2468 | 2634 |
| 2469 LOperand* object() { return inputs_[0]; } | 2635 LOperand* context() { return inputs_[0]; } |
| 2636 LOperand* object() { return inputs_[1]; } |
| 2470 | 2637 |
| 2471 DECLARE_CONCRETE_INSTRUCTION(ForInPrepareMap, "for-in-prepare-map") | 2638 DECLARE_CONCRETE_INSTRUCTION(ForInPrepareMap, "for-in-prepare-map") |
| 2472 }; | 2639 }; |
| 2473 | 2640 |
| 2474 | 2641 |
| 2475 class LForInCacheArray V8_FINAL : public LTemplateInstruction<1, 1, 0> { | 2642 class LForInCacheArray V8_FINAL : public LTemplateInstruction<1, 1, 0> { |
| 2476 public: | 2643 public: |
| 2477 explicit LForInCacheArray(LOperand* map) { | 2644 explicit LForInCacheArray(LOperand* map) { |
| 2478 inputs_[0] = map; | 2645 inputs_[0] = map; |
| 2479 } | 2646 } |
| (...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2697 | 2864 |
| 2698 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); | 2865 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); |
| 2699 }; | 2866 }; |
| 2700 | 2867 |
| 2701 #undef DECLARE_HYDROGEN_ACCESSOR | 2868 #undef DECLARE_HYDROGEN_ACCESSOR |
| 2702 #undef DECLARE_CONCRETE_INSTRUCTION | 2869 #undef DECLARE_CONCRETE_INSTRUCTION |
| 2703 | 2870 |
| 2704 } } // namespace v8::int | 2871 } } // namespace v8::int |
| 2705 | 2872 |
| 2706 #endif // V8_X64_LITHIUM_X64_H_ | 2873 #endif // V8_X64_LITHIUM_X64_H_ |
| OLD | NEW |