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

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

Issue 7795051: Change the x64 optimizing compiler to stop using the fixed context register rsi. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Remove stray edits. Created 9 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/x64/lithium-codegen-x64.cc ('k') | src/x64/lithium-x64.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 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 405 matching lines...) Expand 10 before | Expand all | Expand 10 after
416 LLabel* replacement_; 416 LLabel* replacement_;
417 }; 417 };
418 418
419 419
420 class LParameter: public LTemplateInstruction<1, 0, 0> { 420 class LParameter: public LTemplateInstruction<1, 0, 0> {
421 public: 421 public:
422 DECLARE_CONCRETE_INSTRUCTION(Parameter, "parameter") 422 DECLARE_CONCRETE_INSTRUCTION(Parameter, "parameter")
423 }; 423 };
424 424
425 425
426 class LCallStub: public LTemplateInstruction<1, 0, 0> { 426 class LCallStub: public LTemplateInstruction<1, 1, 0> {
427 public: 427 public:
428 explicit LCallStub(LOperand* context) {
429 inputs_[0] = context;
430 }
431
428 DECLARE_CONCRETE_INSTRUCTION(CallStub, "call-stub") 432 DECLARE_CONCRETE_INSTRUCTION(CallStub, "call-stub")
429 DECLARE_HYDROGEN_ACCESSOR(CallStub) 433 DECLARE_HYDROGEN_ACCESSOR(CallStub)
430 434
435 LOperand* context() { return inputs_[0]; }
436
431 TranscendentalCache::Type transcendental_type() { 437 TranscendentalCache::Type transcendental_type() {
432 return hydrogen()->transcendental_type(); 438 return hydrogen()->transcendental_type();
433 } 439 }
434 }; 440 };
435 441
436 442
437 class LUnknownOSRValue: public LTemplateInstruction<1, 0, 0> { 443 class LUnknownOSRValue: public LTemplateInstruction<1, 0, 0> {
438 public: 444 public:
439 DECLARE_CONCRETE_INSTRUCTION(UnknownOSRValue, "unknown-osr-value") 445 DECLARE_CONCRETE_INSTRUCTION(UnknownOSRValue, "unknown-osr-value")
440 }; 446 };
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
564 570
565 Token::Value op() const { return hydrogen()->token(); } 571 Token::Value op() const { return hydrogen()->token(); }
566 bool is_double() const { 572 bool is_double() const {
567 return hydrogen()->GetInputRepresentation().IsDouble(); 573 return hydrogen()->GetInputRepresentation().IsDouble();
568 } 574 }
569 575
570 virtual void PrintDataTo(StringStream* stream); 576 virtual void PrintDataTo(StringStream* stream);
571 }; 577 };
572 578
573 579
574 class LUnaryMathOperation: public LTemplateInstruction<1, 1, 0> { 580 class LUnaryMathOperation: public LTemplateInstruction<1, 2, 0> {
575 public: 581 public:
576 explicit LUnaryMathOperation(LOperand* value) { 582 LUnaryMathOperation(LOperand* context, LOperand* value) {
583 inputs_[1] = context;
577 inputs_[0] = value; 584 inputs_[0] = value;
578 } 585 }
579 586
587 LOperand* context() { return inputs_[1]; }
588 LOperand* value() { return inputs_[0]; }
589
580 DECLARE_CONCRETE_INSTRUCTION(UnaryMathOperation, "unary-math-operation") 590 DECLARE_CONCRETE_INSTRUCTION(UnaryMathOperation, "unary-math-operation")
581 DECLARE_HYDROGEN_ACCESSOR(UnaryMathOperation) 591 DECLARE_HYDROGEN_ACCESSOR(UnaryMathOperation)
582 592
583 virtual void PrintDataTo(StringStream* stream); 593 virtual void PrintDataTo(StringStream* stream);
584 BuiltinFunctionId op() const { return hydrogen()->op(); } 594 BuiltinFunctionId op() const { return hydrogen()->op(); }
585 }; 595 };
586 596
587 597
588 class LCmpObjectEqAndBranch: public LControlInstruction<2, 0> { 598 class LCmpObjectEqAndBranch: public LControlInstruction<2, 0> {
589 public: 599 public:
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
713 } 723 }
714 724
715 DECLARE_CONCRETE_INSTRUCTION(ClassOfTestAndBranch, 725 DECLARE_CONCRETE_INSTRUCTION(ClassOfTestAndBranch,
716 "class-of-test-and-branch") 726 "class-of-test-and-branch")
717 DECLARE_HYDROGEN_ACCESSOR(ClassOfTestAndBranch) 727 DECLARE_HYDROGEN_ACCESSOR(ClassOfTestAndBranch)
718 728
719 virtual void PrintDataTo(StringStream* stream); 729 virtual void PrintDataTo(StringStream* stream);
720 }; 730 };
721 731
722 732
723 class LCmpT: public LTemplateInstruction<1, 2, 0> { 733 class LCmpT: public LTemplateInstruction<1, 3, 0> {
724 public: 734 public:
725 LCmpT(LOperand* left, LOperand* right) { 735 LCmpT(LOperand* context, LOperand* left, LOperand* right) {
726 inputs_[0] = left; 736 inputs_[0] = context;
727 inputs_[1] = right; 737 inputs_[1] = left;
738 inputs_[2] = right;
728 } 739 }
729 740
741 LOperand* context() { return inputs_[0]; }
742 LOperand* left() { return inputs_[1]; }
743 LOperand* right() { return inputs_[2]; }
744
730 DECLARE_CONCRETE_INSTRUCTION(CmpT, "cmp-t") 745 DECLARE_CONCRETE_INSTRUCTION(CmpT, "cmp-t")
731 DECLARE_HYDROGEN_ACCESSOR(CompareGeneric) 746 DECLARE_HYDROGEN_ACCESSOR(CompareGeneric)
732 747
733 Token::Value op() const { return hydrogen()->token(); } 748 Token::Value op() const { return hydrogen()->token(); }
734 }; 749 };
735 750
736 751
737 class LIn: public LTemplateInstruction<1, 2, 0> { 752 class LIn: public LTemplateInstruction<1, 3, 0> {
738 public: 753 public:
739 LIn(LOperand* key, LOperand* object) { 754 LIn(LOperand* context, LOperand* key, LOperand* object) {
740 inputs_[0] = key; 755 inputs_[0] = context;
741 inputs_[1] = object; 756 inputs_[1] = key;
757 inputs_[2] = object;
742 } 758 }
743 759
744 LOperand* key() { return inputs_[0]; } 760 LOperand* context() { return inputs_[0]; }
745 LOperand* object() { return inputs_[1]; } 761 LOperand* key() { return inputs_[1]; }
762 LOperand* object() { return inputs_[2]; }
746 763
747 DECLARE_CONCRETE_INSTRUCTION(In, "in") 764 DECLARE_CONCRETE_INSTRUCTION(In, "in")
748 }; 765 };
749 766
750 767
751 class LInstanceOf: public LTemplateInstruction<1, 2, 0> { 768 class LInstanceOf: public LTemplateInstruction<1, 3, 0> {
752 public: 769 public:
753 LInstanceOf(LOperand* left, LOperand* right) { 770 LInstanceOf(LOperand* context, LOperand* left, LOperand* right) {
754 inputs_[0] = left; 771 inputs_[0] = context;
755 inputs_[1] = right; 772 inputs_[1] = left;
773 inputs_[2] = right;
756 } 774 }
757 775
776 LOperand* context() { return inputs_[0]; }
777 LOperand* left() { return inputs_[1]; }
778 LOperand* right() { return inputs_[2]; }
779
758 DECLARE_CONCRETE_INSTRUCTION(InstanceOf, "instance-of") 780 DECLARE_CONCRETE_INSTRUCTION(InstanceOf, "instance-of")
759 }; 781 };
760 782
761 783
762 class LInstanceOfKnownGlobal: public LTemplateInstruction<1, 1, 1> { 784 class LInstanceOfKnownGlobal: public LTemplateInstruction<1, 2, 1> {
763 public: 785 public:
764 LInstanceOfKnownGlobal(LOperand* value, LOperand* temp) { 786 LInstanceOfKnownGlobal(LOperand* context, LOperand* value, LOperand* temp) {
765 inputs_[0] = value; 787 inputs_[0] = context;
788 inputs_[1] = value;
766 temps_[0] = temp; 789 temps_[0] = temp;
767 } 790 }
768 791
792 LOperand* context() { return inputs_[0]; }
793 LOperand* value() { return inputs_[1]; }
794
769 DECLARE_CONCRETE_INSTRUCTION(InstanceOfKnownGlobal, 795 DECLARE_CONCRETE_INSTRUCTION(InstanceOfKnownGlobal,
770 "instance-of-known-global") 796 "instance-of-known-global")
771 DECLARE_HYDROGEN_ACCESSOR(InstanceOfKnownGlobal) 797 DECLARE_HYDROGEN_ACCESSOR(InstanceOfKnownGlobal)
772 798
773 Handle<JSFunction> function() const { return hydrogen()->function(); } 799 Handle<JSFunction> function() const { return hydrogen()->function(); }
774 }; 800 };
775 801
776 802
777 class LBoundsCheck: public LTemplateInstruction<0, 2, 0> { 803 class LBoundsCheck: public LTemplateInstruction<0, 2, 0> {
778 public: 804 public:
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
939 public: 965 public:
940 explicit LValueOf(LOperand* value) { 966 explicit LValueOf(LOperand* value) {
941 inputs_[0] = value; 967 inputs_[0] = value;
942 } 968 }
943 969
944 DECLARE_CONCRETE_INSTRUCTION(ValueOf, "value-of") 970 DECLARE_CONCRETE_INSTRUCTION(ValueOf, "value-of")
945 DECLARE_HYDROGEN_ACCESSOR(ValueOf) 971 DECLARE_HYDROGEN_ACCESSOR(ValueOf)
946 }; 972 };
947 973
948 974
949 class LThrow: public LTemplateInstruction<0, 1, 0> { 975 class LThrow: public LTemplateInstruction<0, 2, 0> {
950 public: 976 public:
951 explicit LThrow(LOperand* value) { 977 LThrow(LOperand* context, LOperand* value) {
952 inputs_[0] = value; 978 inputs_[0] = context;
979 inputs_[1] = value;
953 } 980 }
954 981
982 LOperand* context() { return inputs_[0]; }
983 LOperand* value() { return inputs_[1]; }
984
955 DECLARE_CONCRETE_INSTRUCTION(Throw, "throw") 985 DECLARE_CONCRETE_INSTRUCTION(Throw, "throw")
956 }; 986 };
957 987
958 988
959 class LBitNotI: public LTemplateInstruction<1, 1, 0> { 989 class LBitNotI: public LTemplateInstruction<1, 1, 0> {
960 public: 990 public:
961 explicit LBitNotI(LOperand* value) { 991 explicit LBitNotI(LOperand* value) {
962 inputs_[0] = value; 992 inputs_[0] = value;
963 } 993 }
964 994
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
1002 1032
1003 virtual Opcode opcode() const { return LInstruction::kArithmeticD; } 1033 virtual Opcode opcode() const { return LInstruction::kArithmeticD; }
1004 virtual void CompileToNative(LCodeGen* generator); 1034 virtual void CompileToNative(LCodeGen* generator);
1005 virtual const char* Mnemonic() const; 1035 virtual const char* Mnemonic() const;
1006 1036
1007 private: 1037 private:
1008 Token::Value op_; 1038 Token::Value op_;
1009 }; 1039 };
1010 1040
1011 1041
1012 class LArithmeticT: public LTemplateInstruction<1, 2, 0> { 1042 class LArithmeticT: public LTemplateInstruction<1, 3, 0> {
1013 public: 1043 public:
1014 LArithmeticT(Token::Value op, LOperand* left, LOperand* right) 1044 LArithmeticT(Token::Value op,
1045 LOperand* context,
1046 LOperand* left,
1047 LOperand* right)
1015 : op_(op) { 1048 : op_(op) {
1016 inputs_[0] = left; 1049 inputs_[0] = context;
1017 inputs_[1] = right; 1050 inputs_[1] = left;
1051 inputs_[2] = right;
1018 } 1052 }
1019 1053
1020 virtual Opcode opcode() const { return LInstruction::kArithmeticT; } 1054 virtual Opcode opcode() const { return LInstruction::kArithmeticT; }
1021 virtual void CompileToNative(LCodeGen* generator); 1055 virtual void CompileToNative(LCodeGen* generator);
1022 virtual const char* Mnemonic() const; 1056 virtual const char* Mnemonic() const;
1023 1057
1024 Token::Value op() const { return op_; } 1058 Token::Value op() const { return op_; }
1059 LOperand* context() { return inputs_[0]; }
1060 LOperand* left() { return inputs_[1]; }
1061 LOperand* right() { return inputs_[2]; }
1025 1062
1026 private: 1063 private:
1027 Token::Value op_; 1064 Token::Value op_;
1028 }; 1065 };
1029 1066
1030 1067
1031 class LReturn: public LTemplateInstruction<0, 1, 0> { 1068 class LReturn: public LTemplateInstruction<0, 1, 0> {
1032 public: 1069 public:
1033 explicit LReturn(LOperand* value) { 1070 explicit LReturn(LOperand* value) {
1034 inputs_[0] = value; 1071 inputs_[0] = value;
1035 } 1072 }
1036 1073
1037 DECLARE_CONCRETE_INSTRUCTION(Return, "return") 1074 DECLARE_CONCRETE_INSTRUCTION(Return, "return")
1038 }; 1075 };
1039 1076
1040 1077
1041 class LLoadNamedField: public LTemplateInstruction<1, 1, 0> { 1078 class LLoadNamedField: public LTemplateInstruction<1, 1, 0> {
1042 public: 1079 public:
1043 explicit LLoadNamedField(LOperand* object) { 1080 explicit LLoadNamedField(LOperand* object) {
1044 inputs_[0] = object; 1081 inputs_[0] = object;
1045 } 1082 }
1046 1083
1047 DECLARE_CONCRETE_INSTRUCTION(LoadNamedField, "load-named-field") 1084 DECLARE_CONCRETE_INSTRUCTION(LoadNamedField, "load-named-field")
1048 DECLARE_HYDROGEN_ACCESSOR(LoadNamedField) 1085 DECLARE_HYDROGEN_ACCESSOR(LoadNamedField)
1049 }; 1086 };
1050 1087
1051 1088
1052 class LLoadNamedFieldPolymorphic: public LTemplateInstruction<1, 1, 0> { 1089 class LLoadNamedFieldPolymorphic: public LTemplateInstruction<1, 2, 0> {
1053 public: 1090 public:
1054 explicit LLoadNamedFieldPolymorphic(LOperand* object) { 1091 LLoadNamedFieldPolymorphic(LOperand* context, LOperand* object) {
1055 inputs_[0] = object; 1092 inputs_[0] = context;
1093 inputs_[1] = object;
1056 } 1094 }
1057 1095
1058 DECLARE_CONCRETE_INSTRUCTION(LoadNamedField, "load-named-field-polymorphic") 1096 DECLARE_CONCRETE_INSTRUCTION(LoadNamedField, "load-named-field-polymorphic")
1059 DECLARE_HYDROGEN_ACCESSOR(LoadNamedFieldPolymorphic) 1097 DECLARE_HYDROGEN_ACCESSOR(LoadNamedFieldPolymorphic)
1060 1098
1061 LOperand* object() { return inputs_[0]; } 1099 LOperand* context() { return inputs_[0]; }
1100 LOperand* object() { return inputs_[1]; }
1062 }; 1101 };
1063 1102
1064 1103
1065 class LLoadNamedGeneric: public LTemplateInstruction<1, 1, 0> { 1104 class LLoadNamedGeneric: public LTemplateInstruction<1, 2, 0> {
1066 public: 1105 public:
1067 explicit LLoadNamedGeneric(LOperand* object) { 1106 LLoadNamedGeneric(LOperand* context, LOperand* object) {
1068 inputs_[0] = object; 1107 inputs_[0] = context;
1108 inputs_[1] = object;
1069 } 1109 }
1070 1110
1071 DECLARE_CONCRETE_INSTRUCTION(LoadNamedGeneric, "load-named-generic") 1111 DECLARE_CONCRETE_INSTRUCTION(LoadNamedGeneric, "load-named-generic")
1072 DECLARE_HYDROGEN_ACCESSOR(LoadNamedGeneric) 1112 DECLARE_HYDROGEN_ACCESSOR(LoadNamedGeneric)
1073 1113
1074 LOperand* object() { return inputs_[0]; } 1114 LOperand* context() { return inputs_[0]; }
1115 LOperand* object() { return inputs_[1]; }
1075 Handle<Object> name() const { return hydrogen()->name(); } 1116 Handle<Object> name() const { return hydrogen()->name(); }
1076 }; 1117 };
1077 1118
1078 1119
1079 class LLoadFunctionPrototype: public LTemplateInstruction<1, 1, 0> { 1120 class LLoadFunctionPrototype: public LTemplateInstruction<1, 1, 0> {
1080 public: 1121 public:
1081 explicit LLoadFunctionPrototype(LOperand* function) { 1122 explicit LLoadFunctionPrototype(LOperand* function) {
1082 inputs_[0] = function; 1123 inputs_[0] = function;
1083 } 1124 }
1084 1125
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
1154 DECLARE_HYDROGEN_ACCESSOR(LoadKeyedSpecializedArrayElement) 1195 DECLARE_HYDROGEN_ACCESSOR(LoadKeyedSpecializedArrayElement)
1155 1196
1156 LOperand* external_pointer() { return inputs_[0]; } 1197 LOperand* external_pointer() { return inputs_[0]; }
1157 LOperand* key() { return inputs_[1]; } 1198 LOperand* key() { return inputs_[1]; }
1158 JSObject::ElementsKind elements_kind() const { 1199 JSObject::ElementsKind elements_kind() const {
1159 return hydrogen()->elements_kind(); 1200 return hydrogen()->elements_kind();
1160 } 1201 }
1161 }; 1202 };
1162 1203
1163 1204
1164 class LLoadKeyedGeneric: public LTemplateInstruction<1, 2, 0> { 1205 class LLoadKeyedGeneric: public LTemplateInstruction<1, 3, 0> {
1165 public: 1206 public:
1166 LLoadKeyedGeneric(LOperand* obj, LOperand* key) { 1207 LLoadKeyedGeneric(LOperand* context, LOperand* obj, LOperand* key) {
1167 inputs_[0] = obj; 1208 inputs_[0] = context;
1168 inputs_[1] = key; 1209 inputs_[1] = obj;
1210 inputs_[2] = key;
1169 } 1211 }
1170 1212
1171 DECLARE_CONCRETE_INSTRUCTION(LoadKeyedGeneric, "load-keyed-generic") 1213 DECLARE_CONCRETE_INSTRUCTION(LoadKeyedGeneric, "load-keyed-generic")
1172 1214
1173 LOperand* object() { return inputs_[0]; } 1215 LOperand* context() { return inputs_[0]; }
1174 LOperand* key() { return inputs_[1]; } 1216 LOperand* object() { return inputs_[1]; }
1217 LOperand* key() { return inputs_[2]; }
1175 }; 1218 };
1176 1219
1177 1220
1178 class LLoadGlobalCell: public LTemplateInstruction<1, 0, 0> { 1221 class LLoadGlobalCell: public LTemplateInstruction<1, 0, 0> {
1179 public: 1222 public:
1180 DECLARE_CONCRETE_INSTRUCTION(LoadGlobalCell, "load-global-cell") 1223 DECLARE_CONCRETE_INSTRUCTION(LoadGlobalCell, "load-global-cell")
1181 DECLARE_HYDROGEN_ACCESSOR(LoadGlobalCell) 1224 DECLARE_HYDROGEN_ACCESSOR(LoadGlobalCell)
1182 }; 1225 };
1183 1226
1184 1227
1185 class LLoadGlobalGeneric: public LTemplateInstruction<1, 1, 0> { 1228 class LLoadGlobalGeneric: public LTemplateInstruction<1, 2, 0> {
1186 public: 1229 public:
1187 explicit LLoadGlobalGeneric(LOperand* global_object) { 1230 explicit LLoadGlobalGeneric(LOperand* context, LOperand* global_object) {
1188 inputs_[0] = global_object; 1231 inputs_[0] = context;
1232 inputs_[1] = global_object;
1189 } 1233 }
1190 1234
1191 DECLARE_CONCRETE_INSTRUCTION(LoadGlobalGeneric, "load-global-generic") 1235 DECLARE_CONCRETE_INSTRUCTION(LoadGlobalGeneric, "load-global-generic")
1192 DECLARE_HYDROGEN_ACCESSOR(LoadGlobalGeneric) 1236 DECLARE_HYDROGEN_ACCESSOR(LoadGlobalGeneric)
1193 1237
1194 LOperand* global_object() { return inputs_[0]; } 1238 LOperand* context() { return inputs_[0]; }
1239 LOperand* global_object() { return inputs_[1]; }
1195 Handle<Object> name() const { return hydrogen()->name(); } 1240 Handle<Object> name() const { return hydrogen()->name(); }
1196 bool for_typeof() const { return hydrogen()->for_typeof(); } 1241 bool for_typeof() const { return hydrogen()->for_typeof(); }
1197 }; 1242 };
1198 1243
1199 1244
1200 class LStoreGlobalCell: public LTemplateInstruction<0, 1, 1> { 1245 class LStoreGlobalCell: public LTemplateInstruction<0, 1, 1> {
1201 public: 1246 public:
1202 explicit LStoreGlobalCell(LOperand* value, LOperand* temp) { 1247 explicit LStoreGlobalCell(LOperand* value, LOperand* temp) {
1203 inputs_[0] = value; 1248 inputs_[0] = value;
1204 temps_[0] = temp; 1249 temps_[0] = temp;
1205 } 1250 }
1206 1251
1252 LOperand* value() { return inputs_[0]; }
1253
1207 DECLARE_CONCRETE_INSTRUCTION(StoreGlobalCell, "store-global-cell") 1254 DECLARE_CONCRETE_INSTRUCTION(StoreGlobalCell, "store-global-cell")
1208 DECLARE_HYDROGEN_ACCESSOR(StoreGlobalCell) 1255 DECLARE_HYDROGEN_ACCESSOR(StoreGlobalCell)
1209 }; 1256 };
1210 1257
1211 1258
1212 class LStoreGlobalGeneric: public LTemplateInstruction<0, 2, 0> { 1259 class LStoreGlobalGeneric: public LTemplateInstruction<0, 3, 0> {
1213 public: 1260 public:
1214 explicit LStoreGlobalGeneric(LOperand* global_object, 1261 explicit LStoreGlobalGeneric(LOperand* context,
1262 LOperand* global_object,
1215 LOperand* value) { 1263 LOperand* value) {
1216 inputs_[0] = global_object; 1264 inputs_[0] = context;
1217 inputs_[1] = value; 1265 inputs_[1] = global_object;
1266 inputs_[2] = value;
1218 } 1267 }
1219 1268
1220 DECLARE_CONCRETE_INSTRUCTION(StoreGlobalGeneric, "store-global-generic") 1269 DECLARE_CONCRETE_INSTRUCTION(StoreGlobalGeneric, "store-global-generic")
1221 DECLARE_HYDROGEN_ACCESSOR(StoreGlobalGeneric) 1270 DECLARE_HYDROGEN_ACCESSOR(StoreGlobalGeneric)
1222 1271
1223 LOperand* global_object() { return InputAt(0); } 1272 LOperand* context() { return InputAt(0); }
1273 LOperand* global_object() { return InputAt(1); }
1224 Handle<Object> name() const { return hydrogen()->name(); } 1274 Handle<Object> name() const { return hydrogen()->name(); }
1225 LOperand* value() { return InputAt(1); } 1275 LOperand* value() { return InputAt(2); }
1226 bool strict_mode() { return hydrogen()->strict_mode(); } 1276 bool strict_mode() { return hydrogen()->strict_mode(); }
1227 }; 1277 };
1228 1278
1229 1279
1230 class LLoadContextSlot: public LTemplateInstruction<1, 1, 0> { 1280 class LLoadContextSlot: public LTemplateInstruction<1, 1, 0> {
1231 public: 1281 public:
1232 explicit LLoadContextSlot(LOperand* context) { 1282 explicit LLoadContextSlot(LOperand* context) {
1233 inputs_[0] = context; 1283 inputs_[0] = context;
1234 } 1284 }
1235 1285
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
1289 explicit LOuterContext(LOperand* context) { 1339 explicit LOuterContext(LOperand* context) {
1290 inputs_[0] = context; 1340 inputs_[0] = context;
1291 } 1341 }
1292 1342
1293 DECLARE_CONCRETE_INSTRUCTION(OuterContext, "outer-context") 1343 DECLARE_CONCRETE_INSTRUCTION(OuterContext, "outer-context")
1294 1344
1295 LOperand* context() { return InputAt(0); } 1345 LOperand* context() { return InputAt(0); }
1296 }; 1346 };
1297 1347
1298 1348
1299 class LGlobalObject: public LTemplateInstruction<1, 0, 0> { 1349 class LGlobalObject: public LTemplateInstruction<1, 1, 0> {
1300 public: 1350 public:
1351 explicit LGlobalObject(LOperand* context) {
1352 inputs_[0] = context;
1353 }
1354
1301 DECLARE_CONCRETE_INSTRUCTION(GlobalObject, "global-object") 1355 DECLARE_CONCRETE_INSTRUCTION(GlobalObject, "global-object")
1356
1357 LOperand* context() { return InputAt(0); }
1302 }; 1358 };
1303 1359
1304 1360
1305 class LGlobalReceiver: public LTemplateInstruction<1, 1, 0> { 1361 class LGlobalReceiver: public LTemplateInstruction<1, 1, 0> {
1306 public: 1362 public:
1307 explicit LGlobalReceiver(LOperand* global_object) { 1363 explicit LGlobalReceiver(LOperand* global_object) {
1308 inputs_[0] = global_object; 1364 inputs_[0] = global_object;
1309 } 1365 }
1310 1366
1311 DECLARE_CONCRETE_INSTRUCTION(GlobalReceiver, "global-receiver") 1367 DECLARE_CONCRETE_INSTRUCTION(GlobalReceiver, "global-receiver")
1312 1368
1313 LOperand* global() { return InputAt(0); } 1369 LOperand* global() { return InputAt(0); }
1314 }; 1370 };
1315 1371
1316 1372
1317 class LCallConstantFunction: public LTemplateInstruction<1, 0, 0> { 1373 class LCallConstantFunction: public LTemplateInstruction<1, 0, 0> {
1318 public: 1374 public:
1319 DECLARE_CONCRETE_INSTRUCTION(CallConstantFunction, "call-constant-function") 1375 DECLARE_CONCRETE_INSTRUCTION(CallConstantFunction, "call-constant-function")
1320 DECLARE_HYDROGEN_ACCESSOR(CallConstantFunction) 1376 DECLARE_HYDROGEN_ACCESSOR(CallConstantFunction)
1321 1377
1322 virtual void PrintDataTo(StringStream* stream); 1378 virtual void PrintDataTo(StringStream* stream);
1323 1379
1324 Handle<JSFunction> function() { return hydrogen()->function(); } 1380 Handle<JSFunction> function() { return hydrogen()->function(); }
1325 int arity() const { return hydrogen()->argument_count() - 1; } 1381 int arity() const { return hydrogen()->argument_count() - 1; }
1326 }; 1382 };
1327 1383
1328 1384
1329 class LInvokeFunction: public LTemplateInstruction<1, 1, 0> { 1385 class LInvokeFunction: public LTemplateInstruction<1, 2, 0> {
1330 public: 1386 public:
1331 explicit LInvokeFunction(LOperand* function) { 1387 explicit LInvokeFunction(LOperand* context, LOperand* function) {
1332 inputs_[0] = function; 1388 inputs_[0] = context;
1389 inputs_[1] = function;
1333 } 1390 }
1334 1391
1335 DECLARE_CONCRETE_INSTRUCTION(InvokeFunction, "invoke-function") 1392 DECLARE_CONCRETE_INSTRUCTION(InvokeFunction, "invoke-function")
1336 DECLARE_HYDROGEN_ACCESSOR(InvokeFunction) 1393 DECLARE_HYDROGEN_ACCESSOR(InvokeFunction)
1337 1394
1338 LOperand* function() { return inputs_[0]; } 1395 LOperand* context() { return inputs_[0]; }
1396 LOperand* function() { return inputs_[1]; }
1339 1397
1340 virtual void PrintDataTo(StringStream* stream); 1398 virtual void PrintDataTo(StringStream* stream);
1341 1399
1342 int arity() const { return hydrogen()->argument_count() - 1; } 1400 int arity() const { return hydrogen()->argument_count() - 1; }
1343 }; 1401 };
1344 1402
1345 1403
1346 class LCallKeyed: public LTemplateInstruction<1, 1, 0> { 1404 class LCallKeyed: public LTemplateInstruction<1, 2, 0> {
1347 public: 1405 public:
1348 explicit LCallKeyed(LOperand* key) { 1406 explicit LCallKeyed(LOperand* context, LOperand* key) {
1349 inputs_[0] = key; 1407 inputs_[0] = context;
1408 inputs_[1] = key;
1350 } 1409 }
1351 1410
1352 DECLARE_CONCRETE_INSTRUCTION(CallKeyed, "call-keyed") 1411 DECLARE_CONCRETE_INSTRUCTION(CallKeyed, "call-keyed")
1353 DECLARE_HYDROGEN_ACCESSOR(CallKeyed) 1412 DECLARE_HYDROGEN_ACCESSOR(CallKeyed)
1354 1413
1355 LOperand* key() { return inputs_[0]; } 1414 LOperand* context() { return inputs_[0]; }
1415 LOperand* key() { return inputs_[1]; }
1356 1416
1357 virtual void PrintDataTo(StringStream* stream); 1417 virtual void PrintDataTo(StringStream* stream);
1358 1418
1359 int arity() const { return hydrogen()->argument_count() - 1; } 1419 int arity() const { return hydrogen()->argument_count() - 1; }
1360 }; 1420 };
1361 1421
1362 1422
1363 class LCallNamed: public LTemplateInstruction<1, 0, 0> { 1423 class LCallNamed: public LTemplateInstruction<1, 1, 0> {
1364 public: 1424 public:
1425 explicit LCallNamed(LOperand* context) {
1426 inputs_[0] = context;
1427 }
1428
1365 DECLARE_CONCRETE_INSTRUCTION(CallNamed, "call-named") 1429 DECLARE_CONCRETE_INSTRUCTION(CallNamed, "call-named")
1366 DECLARE_HYDROGEN_ACCESSOR(CallNamed) 1430 DECLARE_HYDROGEN_ACCESSOR(CallNamed)
1367 1431
1368 virtual void PrintDataTo(StringStream* stream); 1432 virtual void PrintDataTo(StringStream* stream);
1369 1433
1434 LOperand* context() { return inputs_[0]; }
1370 Handle<String> name() const { return hydrogen()->name(); } 1435 Handle<String> name() const { return hydrogen()->name(); }
1371 int arity() const { return hydrogen()->argument_count() - 1; } 1436 int arity() const { return hydrogen()->argument_count() - 1; }
1372 }; 1437 };
1373 1438
1374 1439
1375 class LCallFunction: public LTemplateInstruction<1, 0, 0> { 1440 class LCallFunction: public LTemplateInstruction<1, 1, 0> {
1376 public: 1441 public:
1377 LCallFunction() {} 1442 explicit LCallFunction(LOperand* context) {
1443 inputs_[0] = context;
1444 }
1378 1445
1379 DECLARE_CONCRETE_INSTRUCTION(CallFunction, "call-function") 1446 DECLARE_CONCRETE_INSTRUCTION(CallFunction, "call-function")
1380 DECLARE_HYDROGEN_ACCESSOR(CallFunction) 1447 DECLARE_HYDROGEN_ACCESSOR(CallFunction)
1381 1448
1449 LOperand* context() { return inputs_[0]; }
1382 int arity() const { return hydrogen()->argument_count() - 2; } 1450 int arity() const { return hydrogen()->argument_count() - 2; }
1383 }; 1451 };
1384 1452
1385 1453
1386 class LCallGlobal: public LTemplateInstruction<1, 0, 0> { 1454 class LCallGlobal: public LTemplateInstruction<1, 1, 0> {
1387 public: 1455 public:
1456 explicit LCallGlobal(LOperand* context) {
1457 inputs_[0] = context;
1458 }
1459
1388 DECLARE_CONCRETE_INSTRUCTION(CallGlobal, "call-global") 1460 DECLARE_CONCRETE_INSTRUCTION(CallGlobal, "call-global")
1389 DECLARE_HYDROGEN_ACCESSOR(CallGlobal) 1461 DECLARE_HYDROGEN_ACCESSOR(CallGlobal)
1390 1462
1391 virtual void PrintDataTo(StringStream* stream); 1463 virtual void PrintDataTo(StringStream* stream);
1392 1464
1465 LOperand* context() { return inputs_[0]; }
1393 Handle<String> name() const {return hydrogen()->name(); } 1466 Handle<String> name() const {return hydrogen()->name(); }
1394 int arity() const { return hydrogen()->argument_count() - 1; } 1467 int arity() const { return hydrogen()->argument_count() - 1; }
1395 }; 1468 };
1396 1469
1397 1470
1398 class LCallKnownGlobal: public LTemplateInstruction<1, 0, 0> { 1471 class LCallKnownGlobal: public LTemplateInstruction<1, 0, 0> {
1399 public: 1472 public:
1400 DECLARE_CONCRETE_INSTRUCTION(CallKnownGlobal, "call-known-global") 1473 DECLARE_CONCRETE_INSTRUCTION(CallKnownGlobal, "call-known-global")
1401 DECLARE_HYDROGEN_ACCESSOR(CallKnownGlobal) 1474 DECLARE_HYDROGEN_ACCESSOR(CallKnownGlobal)
1402 1475
1403 virtual void PrintDataTo(StringStream* stream); 1476 virtual void PrintDataTo(StringStream* stream);
1404 1477
1405 Handle<JSFunction> target() const { return hydrogen()->target(); } 1478 Handle<JSFunction> target() const { return hydrogen()->target(); }
1406 int arity() const { return hydrogen()->argument_count() - 1; } 1479 int arity() const { return hydrogen()->argument_count() - 1; }
1407 }; 1480 };
1408 1481
1409 1482
1410 class LCallNew: public LTemplateInstruction<1, 1, 0> { 1483 class LCallNew: public LTemplateInstruction<1, 2, 0> {
1411 public: 1484 public:
1412 explicit LCallNew(LOperand* constructor) { 1485 LCallNew(LOperand* context, LOperand* constructor) {
1413 inputs_[0] = constructor; 1486 inputs_[0] = context;
1487 inputs_[1] = constructor;
1414 } 1488 }
1415 1489
1416 DECLARE_CONCRETE_INSTRUCTION(CallNew, "call-new") 1490 DECLARE_CONCRETE_INSTRUCTION(CallNew, "call-new")
1417 DECLARE_HYDROGEN_ACCESSOR(CallNew) 1491 DECLARE_HYDROGEN_ACCESSOR(CallNew)
1418 1492
1419 virtual void PrintDataTo(StringStream* stream); 1493 virtual void PrintDataTo(StringStream* stream);
1420 1494
1495 LOperand* context() { return inputs_[0]; }
1496 LOperand* constructor() { return inputs_[1]; }
1421 int arity() const { return hydrogen()->argument_count() - 1; } 1497 int arity() const { return hydrogen()->argument_count() - 1; }
1422 }; 1498 };
1423 1499
1424 1500
1425 class LCallRuntime: public LTemplateInstruction<1, 0, 0> { 1501 class LCallRuntime: public LTemplateInstruction<1, 1, 0> {
1426 public: 1502 public:
1503 explicit LCallRuntime(LOperand* context) {
1504 inputs_[0] = context;
1505 }
1427 DECLARE_CONCRETE_INSTRUCTION(CallRuntime, "call-runtime") 1506 DECLARE_CONCRETE_INSTRUCTION(CallRuntime, "call-runtime")
1428 DECLARE_HYDROGEN_ACCESSOR(CallRuntime) 1507 DECLARE_HYDROGEN_ACCESSOR(CallRuntime)
1429 1508
1509 LOperand* context() { return inputs_[0]; }
1430 const Runtime::Function* function() const { return hydrogen()->function(); } 1510 const Runtime::Function* function() const { return hydrogen()->function(); }
1431 int arity() const { return hydrogen()->argument_count(); } 1511 int arity() const { return hydrogen()->argument_count(); }
1432 }; 1512 };
1433 1513
1434 1514
1435 class LInteger32ToDouble: public LTemplateInstruction<1, 1, 0> { 1515 class LInteger32ToDouble: public LTemplateInstruction<1, 1, 0> {
1436 public: 1516 public:
1437 explicit LInteger32ToDouble(LOperand* value) { 1517 explicit LInteger32ToDouble(LOperand* value) {
1438 inputs_[0] = value; 1518 inputs_[0] = value;
1439 } 1519 }
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
1546 LOperand* value() { return inputs_[1]; } 1626 LOperand* value() { return inputs_[1]; }
1547 1627
1548 Handle<Object> name() const { return hydrogen()->name(); } 1628 Handle<Object> name() const { return hydrogen()->name(); }
1549 bool is_in_object() { return hydrogen()->is_in_object(); } 1629 bool is_in_object() { return hydrogen()->is_in_object(); }
1550 int offset() { return hydrogen()->offset(); } 1630 int offset() { return hydrogen()->offset(); }
1551 bool needs_write_barrier() { return hydrogen()->NeedsWriteBarrier(); } 1631 bool needs_write_barrier() { return hydrogen()->NeedsWriteBarrier(); }
1552 Handle<Map> transition() const { return hydrogen()->transition(); } 1632 Handle<Map> transition() const { return hydrogen()->transition(); }
1553 }; 1633 };
1554 1634
1555 1635
1556 class LStoreNamedGeneric: public LTemplateInstruction<0, 2, 0> { 1636 class LStoreNamedGeneric: public LTemplateInstruction<0, 3, 0> {
1557 public: 1637 public:
1558 LStoreNamedGeneric(LOperand* object, LOperand* value) { 1638 LStoreNamedGeneric(LOperand* context, LOperand* object, LOperand* value) {
1559 inputs_[0] = object; 1639 inputs_[0] = context;
1560 inputs_[1] = value; 1640 inputs_[1] = object;
1641 inputs_[2] = value;
1561 } 1642 }
1562 1643
1563 DECLARE_CONCRETE_INSTRUCTION(StoreNamedGeneric, "store-named-generic") 1644 DECLARE_CONCRETE_INSTRUCTION(StoreNamedGeneric, "store-named-generic")
1564 DECLARE_HYDROGEN_ACCESSOR(StoreNamedGeneric) 1645 DECLARE_HYDROGEN_ACCESSOR(StoreNamedGeneric)
1565 1646
1566 virtual void PrintDataTo(StringStream* stream); 1647 virtual void PrintDataTo(StringStream* stream);
1567 1648
1568 LOperand* object() { return inputs_[0]; } 1649 LOperand* context() { return inputs_[0]; }
1569 LOperand* value() { return inputs_[1]; } 1650 LOperand* object() { return inputs_[1]; }
1651 LOperand* value() { return inputs_[2]; }
1570 Handle<Object> name() const { return hydrogen()->name(); } 1652 Handle<Object> name() const { return hydrogen()->name(); }
1571 bool strict_mode() { return hydrogen()->strict_mode(); } 1653 bool strict_mode() { return hydrogen()->strict_mode(); }
1572 }; 1654 };
1573 1655
1574 1656
1575 class LStoreKeyedFastElement: public LTemplateInstruction<0, 3, 0> { 1657 class LStoreKeyedFastElement: public LTemplateInstruction<0, 3, 0> {
1576 public: 1658 public:
1577 LStoreKeyedFastElement(LOperand* obj, LOperand* key, LOperand* val) { 1659 LStoreKeyedFastElement(LOperand* obj, LOperand* key, LOperand* val) {
1578 inputs_[0] = obj; 1660 inputs_[0] = obj;
1579 inputs_[1] = key; 1661 inputs_[1] = key;
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
1630 1712
1631 LOperand* external_pointer() { return inputs_[0]; } 1713 LOperand* external_pointer() { return inputs_[0]; }
1632 LOperand* key() { return inputs_[1]; } 1714 LOperand* key() { return inputs_[1]; }
1633 LOperand* value() { return inputs_[2]; } 1715 LOperand* value() { return inputs_[2]; }
1634 JSObject::ElementsKind elements_kind() const { 1716 JSObject::ElementsKind elements_kind() const {
1635 return hydrogen()->elements_kind(); 1717 return hydrogen()->elements_kind();
1636 } 1718 }
1637 }; 1719 };
1638 1720
1639 1721
1640 class LStoreKeyedGeneric: public LTemplateInstruction<0, 3, 0> { 1722 class LStoreKeyedGeneric: public LTemplateInstruction<0, 4, 0> {
1641 public: 1723 public:
1642 LStoreKeyedGeneric(LOperand* object, LOperand* key, LOperand* value) { 1724 LStoreKeyedGeneric(LOperand* context,
1643 inputs_[0] = object; 1725 LOperand* object,
1644 inputs_[1] = key; 1726 LOperand* key,
1645 inputs_[2] = value; 1727 LOperand* value) {
1728 inputs_[0] = context;
1729 inputs_[1] = object;
1730 inputs_[2] = key;
1731 inputs_[3] = value;
1646 } 1732 }
1647 1733
1648 DECLARE_CONCRETE_INSTRUCTION(StoreKeyedGeneric, "store-keyed-generic") 1734 DECLARE_CONCRETE_INSTRUCTION(StoreKeyedGeneric, "store-keyed-generic")
1649 DECLARE_HYDROGEN_ACCESSOR(StoreKeyedGeneric) 1735 DECLARE_HYDROGEN_ACCESSOR(StoreKeyedGeneric)
1650 1736
1651 virtual void PrintDataTo(StringStream* stream); 1737 virtual void PrintDataTo(StringStream* stream);
1652 1738
1653 LOperand* object() { return inputs_[0]; } 1739 LOperand* context() { return inputs_[0]; }
1654 LOperand* key() { return inputs_[1]; } 1740 LOperand* object() { return inputs_[1]; }
1655 LOperand* value() { return inputs_[2]; } 1741 LOperand* key() { return inputs_[2]; }
1742 LOperand* value() { return inputs_[3]; }
1656 bool strict_mode() { return hydrogen()->strict_mode(); } 1743 bool strict_mode() { return hydrogen()->strict_mode(); }
1657 }; 1744 };
1658 1745
1659 1746
1660 class LStringAdd: public LTemplateInstruction<1, 2, 0> { 1747 class LStringAdd: public LTemplateInstruction<1, 3, 0> {
1661 public: 1748 public:
1662 LStringAdd(LOperand* left, LOperand* right) { 1749 LStringAdd(LOperand* context, LOperand* left, LOperand* right) {
1663 inputs_[0] = left; 1750 inputs_[0] = context;
1664 inputs_[1] = right; 1751 inputs_[1] = left;
1752 inputs_[2] = right;
1665 } 1753 }
1666 1754
1667 DECLARE_CONCRETE_INSTRUCTION(StringAdd, "string-add") 1755 DECLARE_CONCRETE_INSTRUCTION(StringAdd, "string-add")
1668 DECLARE_HYDROGEN_ACCESSOR(StringAdd) 1756 DECLARE_HYDROGEN_ACCESSOR(StringAdd)
1669 1757
1670 LOperand* left() { return inputs_[0]; } 1758 LOperand* context() { return inputs_[0]; }
1671 LOperand* right() { return inputs_[1]; } 1759 LOperand* left() { return inputs_[1]; }
1760 LOperand* right() { return inputs_[2]; }
1672 }; 1761 };
1673 1762
1674 1763
1675 class LStringCharCodeAt: public LTemplateInstruction<1, 2, 0> { 1764 class LStringCharCodeAt: public LTemplateInstruction<1, 3, 0> {
1676 public: 1765 public:
1677 LStringCharCodeAt(LOperand* string, LOperand* index) { 1766 LStringCharCodeAt(LOperand* context, LOperand* string, LOperand* index) {
1678 inputs_[0] = string; 1767 inputs_[0] = context;
1679 inputs_[1] = index; 1768 inputs_[1] = string;
1769 inputs_[2] = index;
1680 } 1770 }
1681 1771
1682 DECLARE_CONCRETE_INSTRUCTION(StringCharCodeAt, "string-char-code-at") 1772 DECLARE_CONCRETE_INSTRUCTION(StringCharCodeAt, "string-char-code-at")
1683 DECLARE_HYDROGEN_ACCESSOR(StringCharCodeAt) 1773 DECLARE_HYDROGEN_ACCESSOR(StringCharCodeAt)
1684 1774
1685 LOperand* string() { return inputs_[0]; } 1775 LOperand* context() { return inputs_[0]; }
1686 LOperand* index() { return inputs_[1]; } 1776 LOperand* string() { return inputs_[1]; }
1777 LOperand* index() { return inputs_[2]; }
1687 }; 1778 };
1688 1779
1689 1780
1690 class LStringCharFromCode: public LTemplateInstruction<1, 1, 0> { 1781 class LStringCharFromCode: public LTemplateInstruction<1, 2, 0> {
1691 public: 1782 public:
1692 explicit LStringCharFromCode(LOperand* char_code) { 1783 LStringCharFromCode(LOperand* context, LOperand* char_code) {
1693 inputs_[0] = char_code; 1784 inputs_[0] = context;
1785 inputs_[1] = char_code;
1694 } 1786 }
1695 1787
1696 DECLARE_CONCRETE_INSTRUCTION(StringCharFromCode, "string-char-from-code") 1788 DECLARE_CONCRETE_INSTRUCTION(StringCharFromCode, "string-char-from-code")
1697 DECLARE_HYDROGEN_ACCESSOR(StringCharFromCode) 1789 DECLARE_HYDROGEN_ACCESSOR(StringCharFromCode)
1698 1790
1699 LOperand* char_code() { return inputs_[0]; } 1791 LOperand* context() { return inputs_[0]; }
1792 LOperand* char_code() { return inputs_[1]; }
1700 }; 1793 };
1701 1794
1702 1795
1703 class LStringLength: public LTemplateInstruction<1, 1, 0> { 1796 class LStringLength: public LTemplateInstruction<1, 1, 0> {
1704 public: 1797 public:
1705 explicit LStringLength(LOperand* string) { 1798 explicit LStringLength(LOperand* string) {
1706 inputs_[0] = string; 1799 inputs_[0] = string;
1707 } 1800 }
1708 1801
1709 DECLARE_CONCRETE_INSTRUCTION(StringLength, "string-length") 1802 DECLARE_CONCRETE_INSTRUCTION(StringLength, "string-length")
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
1814 class LCheckNonSmi: public LTemplateInstruction<0, 1, 0> { 1907 class LCheckNonSmi: public LTemplateInstruction<0, 1, 0> {
1815 public: 1908 public:
1816 explicit LCheckNonSmi(LOperand* value) { 1909 explicit LCheckNonSmi(LOperand* value) {
1817 inputs_[0] = value; 1910 inputs_[0] = value;
1818 } 1911 }
1819 1912
1820 DECLARE_CONCRETE_INSTRUCTION(CheckNonSmi, "check-non-smi") 1913 DECLARE_CONCRETE_INSTRUCTION(CheckNonSmi, "check-non-smi")
1821 }; 1914 };
1822 1915
1823 1916
1824 class LArrayLiteral: public LTemplateInstruction<1, 0, 0> { 1917 class LArrayLiteral: public LTemplateInstruction<1, 1, 0> {
1825 public: 1918 public:
1919 explicit LArrayLiteral(LOperand* context) {
1920 inputs_[0] = context;
1921 }
1922
1923 LOperand* context() { return inputs_[0]; }
1924
1826 DECLARE_CONCRETE_INSTRUCTION(ArrayLiteral, "array-literal") 1925 DECLARE_CONCRETE_INSTRUCTION(ArrayLiteral, "array-literal")
1827 DECLARE_HYDROGEN_ACCESSOR(ArrayLiteral) 1926 DECLARE_HYDROGEN_ACCESSOR(ArrayLiteral)
1828 }; 1927 };
1829 1928
1830 1929
1831 class LObjectLiteral: public LTemplateInstruction<1, 0, 0> { 1930 class LObjectLiteral: public LTemplateInstruction<1, 1, 0> {
1832 public: 1931 public:
1932 explicit LObjectLiteral(LOperand* context) {
1933 inputs_[0] = context;
1934 }
1935
1936 LOperand* context() { return inputs_[0]; }
1937
1833 DECLARE_CONCRETE_INSTRUCTION(ObjectLiteral, "object-literal") 1938 DECLARE_CONCRETE_INSTRUCTION(ObjectLiteral, "object-literal")
1834 DECLARE_HYDROGEN_ACCESSOR(ObjectLiteral) 1939 DECLARE_HYDROGEN_ACCESSOR(ObjectLiteral)
1835 }; 1940 };
1836 1941
1837 1942
1838 class LRegExpLiteral: public LTemplateInstruction<1, 0, 0> { 1943 class LRegExpLiteral: public LTemplateInstruction<1, 1, 0> {
1839 public: 1944 public:
1945 explicit LRegExpLiteral(LOperand* context) {
1946 inputs_[0] = context;
1947 }
1948
1949 LOperand* context() { return inputs_[0]; }
1950
1840 DECLARE_CONCRETE_INSTRUCTION(RegExpLiteral, "regexp-literal") 1951 DECLARE_CONCRETE_INSTRUCTION(RegExpLiteral, "regexp-literal")
1841 DECLARE_HYDROGEN_ACCESSOR(RegExpLiteral) 1952 DECLARE_HYDROGEN_ACCESSOR(RegExpLiteral)
1842 }; 1953 };
1843 1954
1844 1955
1845 class LFunctionLiteral: public LTemplateInstruction<1, 0, 0> { 1956 class LFunctionLiteral: public LTemplateInstruction<1, 1, 0> {
1846 public: 1957 public:
1958 explicit LFunctionLiteral(LOperand* context) {
1959 inputs_[0] = context;
1960 }
1961
1962 LOperand* context() { return inputs_[0]; }
1963
1847 DECLARE_CONCRETE_INSTRUCTION(FunctionLiteral, "function-literal") 1964 DECLARE_CONCRETE_INSTRUCTION(FunctionLiteral, "function-literal")
1848 DECLARE_HYDROGEN_ACCESSOR(FunctionLiteral) 1965 DECLARE_HYDROGEN_ACCESSOR(FunctionLiteral)
1849 1966
1850 Handle<SharedFunctionInfo> shared_info() { return hydrogen()->shared_info(); } 1967 Handle<SharedFunctionInfo> shared_info() { return hydrogen()->shared_info(); }
1851 }; 1968 };
1852 1969
1853 1970
1854 class LToFastProperties: public LTemplateInstruction<1, 1, 0> { 1971 class LToFastProperties: public LTemplateInstruction<1, 1, 0> {
1855 public: 1972 public:
1856 explicit LToFastProperties(LOperand* value) { 1973 explicit LToFastProperties(LOperand* value) {
1857 inputs_[0] = value; 1974 inputs_[0] = value;
1858 } 1975 }
1859 1976
1860 DECLARE_CONCRETE_INSTRUCTION(ToFastProperties, "to-fast-properties") 1977 DECLARE_CONCRETE_INSTRUCTION(ToFastProperties, "to-fast-properties")
1861 DECLARE_HYDROGEN_ACCESSOR(ToFastProperties) 1978 DECLARE_HYDROGEN_ACCESSOR(ToFastProperties)
1862 }; 1979 };
1863 1980
1864 1981
1865 class LTypeof: public LTemplateInstruction<1, 1, 0> { 1982 class LTypeof: public LTemplateInstruction<1, 2, 0> {
1866 public: 1983 public:
1867 explicit LTypeof(LOperand* value) { 1984 LTypeof(LOperand* context, LOperand* value) {
1868 inputs_[0] = value; 1985 inputs_[0] = context;
1986 inputs_[1] = value;
1869 } 1987 }
1870 1988
1989 LOperand* context() { return inputs_[0]; }
1990 LOperand* value() { return inputs_[1]; }
1991
1871 DECLARE_CONCRETE_INSTRUCTION(Typeof, "typeof") 1992 DECLARE_CONCRETE_INSTRUCTION(Typeof, "typeof")
1872 }; 1993 };
1873 1994
1874 1995
1875 class LTypeofIsAndBranch: public LControlInstruction<1, 0> { 1996 class LTypeofIsAndBranch: public LControlInstruction<1, 0> {
1876 public: 1997 public:
1877 explicit LTypeofIsAndBranch(LOperand* value) { 1998 explicit LTypeofIsAndBranch(LOperand* value) {
1878 inputs_[0] = value; 1999 inputs_[0] = value;
1879 } 2000 }
1880 2001
(...skipping 11 matching lines...) Expand all
1892 explicit LIsConstructCallAndBranch(LOperand* temp) { 2013 explicit LIsConstructCallAndBranch(LOperand* temp) {
1893 temps_[0] = temp; 2014 temps_[0] = temp;
1894 } 2015 }
1895 2016
1896 DECLARE_CONCRETE_INSTRUCTION(IsConstructCallAndBranch, 2017 DECLARE_CONCRETE_INSTRUCTION(IsConstructCallAndBranch,
1897 "is-construct-call-and-branch") 2018 "is-construct-call-and-branch")
1898 DECLARE_HYDROGEN_ACCESSOR(IsConstructCallAndBranch) 2019 DECLARE_HYDROGEN_ACCESSOR(IsConstructCallAndBranch)
1899 }; 2020 };
1900 2021
1901 2022
1902 class LDeleteProperty: public LTemplateInstruction<1, 2, 0> { 2023 class LDeleteProperty: public LTemplateInstruction<1, 3, 0> {
1903 public: 2024 public:
1904 LDeleteProperty(LOperand* obj, LOperand* key) { 2025 LDeleteProperty(LOperand* context, LOperand* obj, LOperand* key) {
1905 inputs_[0] = obj; 2026 inputs_[0] = context;
1906 inputs_[1] = key; 2027 inputs_[1] = obj;
2028 inputs_[2] = key;
1907 } 2029 }
1908 2030
1909 DECLARE_CONCRETE_INSTRUCTION(DeleteProperty, "delete-property") 2031 DECLARE_CONCRETE_INSTRUCTION(DeleteProperty, "delete-property")
1910 2032
1911 LOperand* object() { return inputs_[0]; } 2033 LOperand* context() { return inputs_[0]; }
1912 LOperand* key() { return inputs_[1]; } 2034 LOperand* object() { return inputs_[1]; }
2035 LOperand* key() { return inputs_[2]; }
1913 }; 2036 };
1914 2037
1915 2038
1916 class LOsrEntry: public LTemplateInstruction<0, 0, 0> { 2039 class LOsrEntry: public LTemplateInstruction<0, 0, 0> {
1917 public: 2040 public:
1918 LOsrEntry(); 2041 LOsrEntry();
1919 2042
1920 DECLARE_CONCRETE_INSTRUCTION(OsrEntry, "osr-entry") 2043 DECLARE_CONCRETE_INSTRUCTION(OsrEntry, "osr-entry")
1921 2044
1922 LOperand** SpilledRegisterArray() { return register_spills_; } 2045 LOperand** SpilledRegisterArray() { return register_spills_; }
1923 LOperand** SpilledDoubleRegisterArray() { return double_register_spills_; } 2046 LOperand** SpilledDoubleRegisterArray() { return double_register_spills_; }
1924 2047
1925 void MarkSpilledRegister(int allocation_index, LOperand* spill_operand); 2048 void MarkSpilledRegister(int allocation_index, LOperand* spill_operand);
1926 void MarkSpilledDoubleRegister(int allocation_index, 2049 void MarkSpilledDoubleRegister(int allocation_index,
1927 LOperand* spill_operand); 2050 LOperand* spill_operand);
1928 2051
1929 private: 2052 private:
1930 // Arrays of spill slot operands for registers with an assigned spill 2053 // Arrays of spill slot operands for registers with an assigned spill
1931 // slot, i.e., that must also be restored to the spill slot on OSR entry. 2054 // slot, i.e., that must also be restored to the spill slot on OSR entry.
1932 // NULL if the register has no assigned spill slot. Indexed by allocation 2055 // NULL if the register has no assigned spill slot. Indexed by allocation
1933 // index. 2056 // index.
1934 LOperand* register_spills_[Register::kNumAllocatableRegisters]; 2057 LOperand* register_spills_[Register::kNumAllocatableRegisters];
1935 LOperand* double_register_spills_[DoubleRegister::kNumAllocatableRegisters]; 2058 LOperand* double_register_spills_[DoubleRegister::kNumAllocatableRegisters];
1936 }; 2059 };
1937 2060
1938 2061
1939 class LStackCheck: public LTemplateInstruction<0, 0, 0> { 2062 class LStackCheck: public LTemplateInstruction<0, 1, 0> {
1940 public: 2063 public:
2064 explicit LStackCheck(LOperand* context) {
2065 inputs_[0] = context;
2066 }
2067
2068 LOperand* context() { return inputs_[0]; }
2069
1941 DECLARE_CONCRETE_INSTRUCTION(StackCheck, "stack-check") 2070 DECLARE_CONCRETE_INSTRUCTION(StackCheck, "stack-check")
1942 DECLARE_HYDROGEN_ACCESSOR(StackCheck) 2071 DECLARE_HYDROGEN_ACCESSOR(StackCheck)
1943 2072
1944 Label* done_label() { return &done_label_; } 2073 Label* done_label() { return &done_label_; }
1945 2074
1946 private: 2075 private:
1947 Label done_label_; 2076 Label done_label_;
1948 }; 2077 };
1949 2078
1950 2079
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
2173 2302
2174 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); 2303 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder);
2175 }; 2304 };
2176 2305
2177 #undef DECLARE_HYDROGEN_ACCESSOR 2306 #undef DECLARE_HYDROGEN_ACCESSOR
2178 #undef DECLARE_CONCRETE_INSTRUCTION 2307 #undef DECLARE_CONCRETE_INSTRUCTION
2179 2308
2180 } } // namespace v8::int 2309 } } // namespace v8::int
2181 2310
2182 #endif // V8_X64_LITHIUM_X64_H_ 2311 #endif // V8_X64_LITHIUM_X64_H_
OLDNEW
« no previous file with comments | « src/x64/lithium-codegen-x64.cc ('k') | src/x64/lithium-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698