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

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

Issue 6614010: [Isolates] Merge 6700:7030 from bleeding_edge to isolates. (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/isolates/
Patch Set: '' Created 9 years, 9 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/ia32/lithium-codegen-ia32.cc ('k') | src/ia32/lithium-ia32.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 24 matching lines...) Expand all
35 35
36 namespace v8 { 36 namespace v8 {
37 namespace internal { 37 namespace internal {
38 38
39 // Forward declarations. 39 // Forward declarations.
40 class LCodeGen; 40 class LCodeGen;
41 41
42 #define LITHIUM_ALL_INSTRUCTION_LIST(V) \ 42 #define LITHIUM_ALL_INSTRUCTION_LIST(V) \
43 V(ControlInstruction) \ 43 V(ControlInstruction) \
44 V(Call) \ 44 V(Call) \
45 V(StoreKeyed) \
46 V(StoreNamed) \
47 LITHIUM_CONCRETE_INSTRUCTION_LIST(V) 45 LITHIUM_CONCRETE_INSTRUCTION_LIST(V)
48 46
49 47
50 #define LITHIUM_CONCRETE_INSTRUCTION_LIST(V) \ 48 #define LITHIUM_CONCRETE_INSTRUCTION_LIST(V) \
51 V(AccessArgumentsAt) \ 49 V(AccessArgumentsAt) \
52 V(AddI) \ 50 V(AddI) \
53 V(ApplyArguments) \ 51 V(ApplyArguments) \
54 V(ArgumentsElements) \ 52 V(ArgumentsElements) \
55 V(ArgumentsLength) \ 53 V(ArgumentsLength) \
56 V(ArithmeticD) \ 54 V(ArithmeticD) \
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 V(Label) \ 115 V(Label) \
118 V(LazyBailout) \ 116 V(LazyBailout) \
119 V(LoadContextSlot) \ 117 V(LoadContextSlot) \
120 V(LoadElements) \ 118 V(LoadElements) \
121 V(LoadFunctionPrototype) \ 119 V(LoadFunctionPrototype) \
122 V(LoadGlobal) \ 120 V(LoadGlobal) \
123 V(LoadKeyedFastElement) \ 121 V(LoadKeyedFastElement) \
124 V(LoadKeyedGeneric) \ 122 V(LoadKeyedGeneric) \
125 V(LoadNamedField) \ 123 V(LoadNamedField) \
126 V(LoadNamedGeneric) \ 124 V(LoadNamedGeneric) \
125 V(LoadPixelArrayElement) \
126 V(LoadPixelArrayExternalPointer) \
127 V(ModI) \ 127 V(ModI) \
128 V(MulI) \ 128 V(MulI) \
129 V(NumberTagD) \ 129 V(NumberTagD) \
130 V(NumberTagI) \ 130 V(NumberTagI) \
131 V(NumberUntagD) \ 131 V(NumberUntagD) \
132 V(ObjectLiteral) \ 132 V(ObjectLiteral) \
133 V(OsrEntry) \ 133 V(OsrEntry) \
134 V(OuterContext) \ 134 V(OuterContext) \
135 V(Parameter) \ 135 V(Parameter) \
136 V(PixelArrayLength) \
136 V(Power) \ 137 V(Power) \
137 V(PushArgument) \ 138 V(PushArgument) \
138 V(RegExpLiteral) \ 139 V(RegExpLiteral) \
139 V(Return) \ 140 V(Return) \
140 V(ShiftI) \ 141 V(ShiftI) \
141 V(SmiTag) \ 142 V(SmiTag) \
142 V(SmiUntag) \ 143 V(SmiUntag) \
143 V(StackCheck) \ 144 V(StackCheck) \
144 V(StoreContextSlot) \ 145 V(StoreContextSlot) \
145 V(StoreGlobal) \ 146 V(StoreGlobal) \
146 V(StoreKeyedFastElement) \ 147 V(StoreKeyedFastElement) \
147 V(StoreKeyedGeneric) \ 148 V(StoreKeyedGeneric) \
148 V(StoreNamedField) \ 149 V(StoreNamedField) \
149 V(StoreNamedGeneric) \ 150 V(StoreNamedGeneric) \
151 V(StorePixelArrayElement) \
150 V(StringCharCodeAt) \ 152 V(StringCharCodeAt) \
151 V(StringLength) \ 153 V(StringLength) \
152 V(SubI) \ 154 V(SubI) \
153 V(TaggedToI) \ 155 V(TaggedToI) \
154 V(Throw) \ 156 V(Throw) \
155 V(Typeof) \ 157 V(Typeof) \
156 V(TypeofIs) \ 158 V(TypeofIs) \
157 V(TypeofIsAndBranch) \ 159 V(TypeofIsAndBranch) \
158 V(UnaryMathOperation) \ 160 V(UnaryMathOperation) \
159 V(UnknownOSRValue) \ 161 V(UnknownOSRValue) \
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
418 LLabel* replacement_; 420 LLabel* replacement_;
419 }; 421 };
420 422
421 423
422 class LParameter: public LTemplateInstruction<1, 0, 0> { 424 class LParameter: public LTemplateInstruction<1, 0, 0> {
423 public: 425 public:
424 DECLARE_CONCRETE_INSTRUCTION(Parameter, "parameter") 426 DECLARE_CONCRETE_INSTRUCTION(Parameter, "parameter")
425 }; 427 };
426 428
427 429
428 class LCallStub: public LTemplateInstruction<1, 0, 0> { 430 class LCallStub: public LTemplateInstruction<1, 1, 0> {
429 public: 431 public:
432 explicit LCallStub(LOperand* context) {
433 inputs_[0] = context;
434 }
435
430 DECLARE_CONCRETE_INSTRUCTION(CallStub, "call-stub") 436 DECLARE_CONCRETE_INSTRUCTION(CallStub, "call-stub")
431 DECLARE_HYDROGEN_ACCESSOR(CallStub) 437 DECLARE_HYDROGEN_ACCESSOR(CallStub)
432 438
439 LOperand* context() { return inputs_[0]; }
440
433 TranscendentalCache::Type transcendental_type() { 441 TranscendentalCache::Type transcendental_type() {
434 return hydrogen()->transcendental_type(); 442 return hydrogen()->transcendental_type();
435 } 443 }
436 }; 444 };
437 445
438 446
439 class LUnknownOSRValue: public LTemplateInstruction<1, 0, 0> { 447 class LUnknownOSRValue: public LTemplateInstruction<1, 0, 0> {
440 public: 448 public:
441 DECLARE_CONCRETE_INSTRUCTION(UnknownOSRValue, "unknown-osr-value") 449 DECLARE_CONCRETE_INSTRUCTION(UnknownOSRValue, "unknown-osr-value")
442 }; 450 };
(...skipping 11 matching lines...) Expand all
454 true_block_id_ = true_block_id; 462 true_block_id_ = true_block_id;
455 false_block_id_ = false_block_id; 463 false_block_id_ = false_block_id;
456 } 464 }
457 465
458 private: 466 private:
459 int true_block_id_; 467 int true_block_id_;
460 int false_block_id_; 468 int false_block_id_;
461 }; 469 };
462 470
463 471
464 class LApplyArguments: public LTemplateInstruction<1, 4, 0> { 472 class LApplyArguments: public LTemplateInstruction<1, 4, 1> {
465 public: 473 public:
466 LApplyArguments(LOperand* function, 474 LApplyArguments(LOperand* function,
467 LOperand* receiver, 475 LOperand* receiver,
468 LOperand* length, 476 LOperand* length,
469 LOperand* elements) { 477 LOperand* elements,
478 LOperand* temp) {
470 inputs_[0] = function; 479 inputs_[0] = function;
471 inputs_[1] = receiver; 480 inputs_[1] = receiver;
472 inputs_[2] = length; 481 inputs_[2] = length;
473 inputs_[3] = elements; 482 inputs_[3] = elements;
483 temps_[0] = temp;
474 } 484 }
475 485
476 DECLARE_CONCRETE_INSTRUCTION(ApplyArguments, "apply-arguments") 486 DECLARE_CONCRETE_INSTRUCTION(ApplyArguments, "apply-arguments")
477 487
478 LOperand* function() { return inputs_[0]; } 488 LOperand* function() { return inputs_[0]; }
479 LOperand* receiver() { return inputs_[1]; } 489 LOperand* receiver() { return inputs_[1]; }
480 LOperand* length() { return inputs_[2]; } 490 LOperand* length() { return inputs_[2]; }
481 LOperand* elements() { return inputs_[3]; } 491 LOperand* elements() { return inputs_[3]; }
482 }; 492 };
483 493
(...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after
825 inputs_[1] = right; 835 inputs_[1] = right;
826 } 836 }
827 837
828 DECLARE_CONCRETE_INSTRUCTION(CmpTAndBranch, "cmp-t-and-branch") 838 DECLARE_CONCRETE_INSTRUCTION(CmpTAndBranch, "cmp-t-and-branch")
829 DECLARE_HYDROGEN_ACCESSOR(Compare) 839 DECLARE_HYDROGEN_ACCESSOR(Compare)
830 840
831 Token::Value op() const { return hydrogen()->token(); } 841 Token::Value op() const { return hydrogen()->token(); }
832 }; 842 };
833 843
834 844
835 class LInstanceOf: public LTemplateInstruction<1, 2, 0> { 845 class LInstanceOf: public LTemplateInstruction<1, 3, 0> {
836 public: 846 public:
837 LInstanceOf(LOperand* left, LOperand* right) { 847 LInstanceOf(LOperand* context, LOperand* left, LOperand* right) {
838 inputs_[0] = left; 848 inputs_[0] = context;
839 inputs_[1] = right; 849 inputs_[1] = left;
850 inputs_[2] = right;
840 } 851 }
841 852
842 DECLARE_CONCRETE_INSTRUCTION(InstanceOf, "instance-of") 853 DECLARE_CONCRETE_INSTRUCTION(InstanceOf, "instance-of")
854
855 LOperand* context() { return inputs_[0]; }
843 }; 856 };
844 857
845 858
846 class LInstanceOfAndBranch: public LControlInstruction<2, 0> { 859 class LInstanceOfAndBranch: public LControlInstruction<3, 0> {
847 public: 860 public:
848 LInstanceOfAndBranch(LOperand* left, LOperand* right) { 861 LInstanceOfAndBranch(LOperand* context, LOperand* left, LOperand* right) {
849 inputs_[0] = left; 862 inputs_[0] = context;
850 inputs_[1] = right; 863 inputs_[1] = left;
864 inputs_[2] = right;
851 } 865 }
852 866
853 DECLARE_CONCRETE_INSTRUCTION(InstanceOfAndBranch, "instance-of-and-branch") 867 DECLARE_CONCRETE_INSTRUCTION(InstanceOfAndBranch, "instance-of-and-branch")
868
869 LOperand* context() { return inputs_[0]; }
854 }; 870 };
855 871
856 872
857 class LInstanceOfKnownGlobal: public LTemplateInstruction<1, 1, 1> { 873 class LInstanceOfKnownGlobal: public LTemplateInstruction<1, 1, 1> {
858 public: 874 public:
859 LInstanceOfKnownGlobal(LOperand* value, LOperand* temp) { 875 LInstanceOfKnownGlobal(LOperand* value, LOperand* temp) {
860 inputs_[0] = value; 876 inputs_[0] = value;
861 temps_[0] = temp; 877 temps_[0] = temp;
862 } 878 }
863 879
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
1001 public: 1017 public:
1002 explicit LJSArrayLength(LOperand* value) { 1018 explicit LJSArrayLength(LOperand* value) {
1003 inputs_[0] = value; 1019 inputs_[0] = value;
1004 } 1020 }
1005 1021
1006 DECLARE_CONCRETE_INSTRUCTION(JSArrayLength, "js-array-length") 1022 DECLARE_CONCRETE_INSTRUCTION(JSArrayLength, "js-array-length")
1007 DECLARE_HYDROGEN_ACCESSOR(JSArrayLength) 1023 DECLARE_HYDROGEN_ACCESSOR(JSArrayLength)
1008 }; 1024 };
1009 1025
1010 1026
1027 class LPixelArrayLength: public LTemplateInstruction<1, 1, 0> {
1028 public:
1029 explicit LPixelArrayLength(LOperand* value) {
1030 inputs_[0] = value;
1031 }
1032
1033 DECLARE_CONCRETE_INSTRUCTION(PixelArrayLength, "pixel-array-length")
1034 DECLARE_HYDROGEN_ACCESSOR(PixelArrayLength)
1035 };
1036
1037
1011 class LFixedArrayLength: public LTemplateInstruction<1, 1, 0> { 1038 class LFixedArrayLength: public LTemplateInstruction<1, 1, 0> {
1012 public: 1039 public:
1013 explicit LFixedArrayLength(LOperand* value) { 1040 explicit LFixedArrayLength(LOperand* value) {
1014 inputs_[0] = value; 1041 inputs_[0] = value;
1015 } 1042 }
1016 1043
1017 DECLARE_CONCRETE_INSTRUCTION(FixedArrayLength, "fixed-array-length") 1044 DECLARE_CONCRETE_INSTRUCTION(FixedArrayLength, "fixed-array-length")
1018 DECLARE_HYDROGEN_ACCESSOR(FixedArrayLength) 1045 DECLARE_HYDROGEN_ACCESSOR(FixedArrayLength)
1019 }; 1046 };
1020 1047
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
1125 public: 1152 public:
1126 explicit LLoadNamedField(LOperand* object) { 1153 explicit LLoadNamedField(LOperand* object) {
1127 inputs_[0] = object; 1154 inputs_[0] = object;
1128 } 1155 }
1129 1156
1130 DECLARE_CONCRETE_INSTRUCTION(LoadNamedField, "load-named-field") 1157 DECLARE_CONCRETE_INSTRUCTION(LoadNamedField, "load-named-field")
1131 DECLARE_HYDROGEN_ACCESSOR(LoadNamedField) 1158 DECLARE_HYDROGEN_ACCESSOR(LoadNamedField)
1132 }; 1159 };
1133 1160
1134 1161
1135 class LLoadNamedGeneric: public LTemplateInstruction<1, 1, 0> { 1162 class LLoadNamedGeneric: public LTemplateInstruction<1, 2, 0> {
1136 public: 1163 public:
1137 explicit LLoadNamedGeneric(LOperand* object) { 1164 LLoadNamedGeneric(LOperand* context, LOperand* object) {
1138 inputs_[0] = object; 1165 inputs_[0] = context;
1166 inputs_[1] = object;
1139 } 1167 }
1140 1168
1141 DECLARE_CONCRETE_INSTRUCTION(LoadNamedGeneric, "load-named-generic") 1169 DECLARE_CONCRETE_INSTRUCTION(LoadNamedGeneric, "load-named-generic")
1142 DECLARE_HYDROGEN_ACCESSOR(LoadNamedGeneric) 1170 DECLARE_HYDROGEN_ACCESSOR(LoadNamedGeneric)
1143 1171
1144 LOperand* object() { return inputs_[0]; } 1172 LOperand* context() { return inputs_[0]; }
1173 LOperand* object() { return inputs_[1]; }
1145 Handle<Object> name() const { return hydrogen()->name(); } 1174 Handle<Object> name() const { return hydrogen()->name(); }
1146 }; 1175 };
1147 1176
1148 1177
1149 class LLoadFunctionPrototype: public LTemplateInstruction<1, 1, 1> { 1178 class LLoadFunctionPrototype: public LTemplateInstruction<1, 1, 1> {
1150 public: 1179 public:
1151 LLoadFunctionPrototype(LOperand* function, LOperand* temp) { 1180 LLoadFunctionPrototype(LOperand* function, LOperand* temp) {
1152 inputs_[0] = function; 1181 inputs_[0] = function;
1153 temps_[0] = temp; 1182 temps_[0] = temp;
1154 } 1183 }
1155 1184
1156 DECLARE_CONCRETE_INSTRUCTION(LoadFunctionPrototype, "load-function-prototype") 1185 DECLARE_CONCRETE_INSTRUCTION(LoadFunctionPrototype, "load-function-prototype")
1157 DECLARE_HYDROGEN_ACCESSOR(LoadFunctionPrototype) 1186 DECLARE_HYDROGEN_ACCESSOR(LoadFunctionPrototype)
1158 1187
1159 LOperand* function() { return inputs_[0]; } 1188 LOperand* function() { return inputs_[0]; }
1160 }; 1189 };
1161 1190
1162 1191
1163 class LLoadElements: public LTemplateInstruction<1, 1, 0> { 1192 class LLoadElements: public LTemplateInstruction<1, 1, 0> {
1164 public: 1193 public:
1165 explicit LLoadElements(LOperand* object) { 1194 explicit LLoadElements(LOperand* object) {
1166 inputs_[0] = object; 1195 inputs_[0] = object;
1167 } 1196 }
1168 1197
1169 DECLARE_CONCRETE_INSTRUCTION(LoadElements, "load-elements") 1198 DECLARE_CONCRETE_INSTRUCTION(LoadElements, "load-elements")
1170 }; 1199 };
1171 1200
1172 1201
1202 class LLoadPixelArrayExternalPointer: public LTemplateInstruction<1, 1, 0> {
1203 public:
1204 explicit LLoadPixelArrayExternalPointer(LOperand* object) {
1205 inputs_[0] = object;
1206 }
1207
1208 DECLARE_CONCRETE_INSTRUCTION(LoadPixelArrayExternalPointer,
1209 "load-pixel-array-external-pointer")
1210 };
1211
1212
1173 class LLoadKeyedFastElement: public LTemplateInstruction<1, 2, 0> { 1213 class LLoadKeyedFastElement: public LTemplateInstruction<1, 2, 0> {
1174 public: 1214 public:
1175 LLoadKeyedFastElement(LOperand* elements, LOperand* key) { 1215 LLoadKeyedFastElement(LOperand* elements, LOperand* key) {
1176 inputs_[0] = elements; 1216 inputs_[0] = elements;
1177 inputs_[1] = key; 1217 inputs_[1] = key;
1178 } 1218 }
1179 1219
1180 DECLARE_CONCRETE_INSTRUCTION(LoadKeyedFastElement, "load-keyed-fast-element") 1220 DECLARE_CONCRETE_INSTRUCTION(LoadKeyedFastElement, "load-keyed-fast-element")
1181 DECLARE_HYDROGEN_ACCESSOR(LoadKeyedFastElement) 1221 DECLARE_HYDROGEN_ACCESSOR(LoadKeyedFastElement)
1182 1222
1183 LOperand* elements() { return inputs_[0]; } 1223 LOperand* elements() { return inputs_[0]; }
1184 LOperand* key() { return inputs_[1]; } 1224 LOperand* key() { return inputs_[1]; }
1185 }; 1225 };
1186 1226
1187 1227
1188 class LLoadKeyedGeneric: public LTemplateInstruction<1, 2, 0> { 1228 class LLoadPixelArrayElement: public LTemplateInstruction<1, 2, 0> {
1189 public: 1229 public:
1190 LLoadKeyedGeneric(LOperand* obj, LOperand* key) { 1230 LLoadPixelArrayElement(LOperand* external_pointer, LOperand* key) {
1191 inputs_[0] = obj; 1231 inputs_[0] = external_pointer;
1192 inputs_[1] = key; 1232 inputs_[1] = key;
1193 } 1233 }
1194 1234
1235 DECLARE_CONCRETE_INSTRUCTION(LoadPixelArrayElement,
1236 "load-pixel-array-element")
1237 DECLARE_HYDROGEN_ACCESSOR(LoadPixelArrayElement)
1238
1239 LOperand* external_pointer() { return inputs_[0]; }
1240 LOperand* key() { return inputs_[1]; }
1241 };
1242
1243
1244 class LLoadKeyedGeneric: public LTemplateInstruction<1, 3, 0> {
1245 public:
1246 LLoadKeyedGeneric(LOperand* context, LOperand* obj, LOperand* key) {
1247 inputs_[0] = context;
1248 inputs_[1] = obj;
1249 inputs_[2] = key;
1250 }
1251
1195 DECLARE_CONCRETE_INSTRUCTION(LoadKeyedGeneric, "load-keyed-generic") 1252 DECLARE_CONCRETE_INSTRUCTION(LoadKeyedGeneric, "load-keyed-generic")
1196 1253
1197 LOperand* object() { return inputs_[0]; } 1254 LOperand* context() { return inputs_[0]; }
1198 LOperand* key() { return inputs_[1]; } 1255 LOperand* object() { return inputs_[1]; }
1256 LOperand* key() { return inputs_[2]; }
1199 }; 1257 };
1200 1258
1201 1259
1202 class LLoadGlobal: public LTemplateInstruction<1, 0, 0> { 1260 class LLoadGlobal: public LTemplateInstruction<1, 0, 0> {
1203 public: 1261 public:
1204 DECLARE_CONCRETE_INSTRUCTION(LoadGlobal, "load-global") 1262 DECLARE_CONCRETE_INSTRUCTION(LoadGlobal, "load-global")
1205 DECLARE_HYDROGEN_ACCESSOR(LoadGlobal) 1263 DECLARE_HYDROGEN_ACCESSOR(LoadGlobal)
1206 }; 1264 };
1207 1265
1208 1266
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
1310 DECLARE_CONCRETE_INSTRUCTION(CallConstantFunction, "call-constant-function") 1368 DECLARE_CONCRETE_INSTRUCTION(CallConstantFunction, "call-constant-function")
1311 DECLARE_HYDROGEN_ACCESSOR(CallConstantFunction) 1369 DECLARE_HYDROGEN_ACCESSOR(CallConstantFunction)
1312 1370
1313 virtual void PrintDataTo(StringStream* stream); 1371 virtual void PrintDataTo(StringStream* stream);
1314 1372
1315 Handle<JSFunction> function() { return hydrogen()->function(); } 1373 Handle<JSFunction> function() { return hydrogen()->function(); }
1316 int arity() const { return hydrogen()->argument_count() - 1; } 1374 int arity() const { return hydrogen()->argument_count() - 1; }
1317 }; 1375 };
1318 1376
1319 1377
1320 class LCallKeyed: public LTemplateInstruction<1, 1, 0> { 1378 class LCallKeyed: public LTemplateInstruction<1, 2, 0> {
1321 public: 1379 public:
1322 explicit LCallKeyed(LOperand* key) { 1380 LCallKeyed(LOperand* context, LOperand* key) {
1323 inputs_[0] = key; 1381 inputs_[0] = context;
1382 inputs_[1] = key;
1324 } 1383 }
1325 1384
1326 DECLARE_CONCRETE_INSTRUCTION(CallKeyed, "call-keyed") 1385 DECLARE_CONCRETE_INSTRUCTION(CallKeyed, "call-keyed")
1327 DECLARE_HYDROGEN_ACCESSOR(CallKeyed) 1386 DECLARE_HYDROGEN_ACCESSOR(CallKeyed)
1328 1387
1388 LOperand* context() { return inputs_[0]; }
1389 LOperand* key() { return inputs_[1]; }
1390
1329 virtual void PrintDataTo(StringStream* stream); 1391 virtual void PrintDataTo(StringStream* stream);
1330 1392
1331 int arity() const { return hydrogen()->argument_count() - 1; } 1393 int arity() const { return hydrogen()->argument_count() - 1; }
1332 }; 1394 };
1333 1395
1334 1396
1335 class LCallNamed: public LTemplateInstruction<1, 0, 0> { 1397 class LCallNamed: public LTemplateInstruction<1, 1, 0> {
1336 public: 1398 public:
1399 explicit LCallNamed(LOperand* context) {
1400 inputs_[0] = context;
1401 }
1402
1337 DECLARE_CONCRETE_INSTRUCTION(CallNamed, "call-named") 1403 DECLARE_CONCRETE_INSTRUCTION(CallNamed, "call-named")
1338 DECLARE_HYDROGEN_ACCESSOR(CallNamed) 1404 DECLARE_HYDROGEN_ACCESSOR(CallNamed)
1339 1405
1340 virtual void PrintDataTo(StringStream* stream); 1406 virtual void PrintDataTo(StringStream* stream);
1341 1407
1408 LOperand* context() { return inputs_[0]; }
1342 Handle<String> name() const { return hydrogen()->name(); } 1409 Handle<String> name() const { return hydrogen()->name(); }
1343 int arity() const { return hydrogen()->argument_count() - 1; } 1410 int arity() const { return hydrogen()->argument_count() - 1; }
1344 }; 1411 };
1345 1412
1346 1413
1347 class LCallFunction: public LTemplateInstruction<1, 0, 0> { 1414 class LCallFunction: public LTemplateInstruction<1, 1, 0> {
1348 public: 1415 public:
1416 explicit LCallFunction(LOperand* context) {
1417 inputs_[0] = context;
1418 }
1419
1349 DECLARE_CONCRETE_INSTRUCTION(CallFunction, "call-function") 1420 DECLARE_CONCRETE_INSTRUCTION(CallFunction, "call-function")
1350 DECLARE_HYDROGEN_ACCESSOR(CallFunction) 1421 DECLARE_HYDROGEN_ACCESSOR(CallFunction)
1351 1422
1423 LOperand* context() { return inputs_[0]; }
1352 int arity() const { return hydrogen()->argument_count() - 2; } 1424 int arity() const { return hydrogen()->argument_count() - 2; }
1353 }; 1425 };
1354 1426
1355 1427
1356 class LCallGlobal: public LTemplateInstruction<1, 0, 0> { 1428 class LCallGlobal: public LTemplateInstruction<1, 1, 0> {
1357 public: 1429 public:
1430 explicit LCallGlobal(LOperand* context) {
1431 inputs_[0] = context;
1432 }
1433
1358 DECLARE_CONCRETE_INSTRUCTION(CallGlobal, "call-global") 1434 DECLARE_CONCRETE_INSTRUCTION(CallGlobal, "call-global")
1359 DECLARE_HYDROGEN_ACCESSOR(CallGlobal) 1435 DECLARE_HYDROGEN_ACCESSOR(CallGlobal)
1360 1436
1361 virtual void PrintDataTo(StringStream* stream); 1437 virtual void PrintDataTo(StringStream* stream);
1362 1438
1439 LOperand* context() { return inputs_[0]; }
1363 Handle<String> name() const {return hydrogen()->name(); } 1440 Handle<String> name() const {return hydrogen()->name(); }
1364 int arity() const { return hydrogen()->argument_count() - 1; } 1441 int arity() const { return hydrogen()->argument_count() - 1; }
1365 }; 1442 };
1366 1443
1367 1444
1368 class LCallKnownGlobal: public LTemplateInstruction<1, 0, 0> { 1445 class LCallKnownGlobal: public LTemplateInstruction<1, 0, 0> {
1369 public: 1446 public:
1370 DECLARE_CONCRETE_INSTRUCTION(CallKnownGlobal, "call-known-global") 1447 DECLARE_CONCRETE_INSTRUCTION(CallKnownGlobal, "call-known-global")
1371 DECLARE_HYDROGEN_ACCESSOR(CallKnownGlobal) 1448 DECLARE_HYDROGEN_ACCESSOR(CallKnownGlobal)
1372 1449
1373 virtual void PrintDataTo(StringStream* stream); 1450 virtual void PrintDataTo(StringStream* stream);
1374 1451
1375 Handle<JSFunction> target() const { return hydrogen()->target(); } 1452 Handle<JSFunction> target() const { return hydrogen()->target(); }
1376 int arity() const { return hydrogen()->argument_count() - 1; } 1453 int arity() const { return hydrogen()->argument_count() - 1; }
1377 }; 1454 };
1378 1455
1379 1456
1380 class LCallNew: public LTemplateInstruction<1, 1, 0> { 1457 class LCallNew: public LTemplateInstruction<1, 2, 0> {
1381 public: 1458 public:
1382 explicit LCallNew(LOperand* constructor) { 1459 LCallNew(LOperand* context, LOperand* constructor) {
1383 inputs_[0] = constructor; 1460 inputs_[0] = context;
1461 inputs_[1] = constructor;
1384 } 1462 }
1385 1463
1386 DECLARE_CONCRETE_INSTRUCTION(CallNew, "call-new") 1464 DECLARE_CONCRETE_INSTRUCTION(CallNew, "call-new")
1387 DECLARE_HYDROGEN_ACCESSOR(CallNew) 1465 DECLARE_HYDROGEN_ACCESSOR(CallNew)
1388 1466
1389 virtual void PrintDataTo(StringStream* stream); 1467 virtual void PrintDataTo(StringStream* stream);
1390 1468
1469 LOperand* context() { return inputs_[0]; }
1470 LOperand* constructor() { return inputs_[1]; }
1391 int arity() const { return hydrogen()->argument_count() - 1; } 1471 int arity() const { return hydrogen()->argument_count() - 1; }
1392 }; 1472 };
1393 1473
1394 1474
1395 class LCallRuntime: public LTemplateInstruction<1, 0, 0> { 1475 class LCallRuntime: public LTemplateInstruction<1, 0, 0> {
1396 public: 1476 public:
1397 DECLARE_CONCRETE_INSTRUCTION(CallRuntime, "call-runtime") 1477 DECLARE_CONCRETE_INSTRUCTION(CallRuntime, "call-runtime")
1398 DECLARE_HYDROGEN_ACCESSOR(CallRuntime) 1478 DECLARE_HYDROGEN_ACCESSOR(CallRuntime)
1399 1479
1400 const Runtime::Function* function() const { return hydrogen()->function(); } 1480 const Runtime::Function* function() const { return hydrogen()->function(); }
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
1492 1572
1493 DECLARE_CONCRETE_INSTRUCTION(SmiUntag, "smi-untag") 1573 DECLARE_CONCRETE_INSTRUCTION(SmiUntag, "smi-untag")
1494 1574
1495 bool needs_check() const { return needs_check_; } 1575 bool needs_check() const { return needs_check_; }
1496 1576
1497 private: 1577 private:
1498 bool needs_check_; 1578 bool needs_check_;
1499 }; 1579 };
1500 1580
1501 1581
1502 class LStoreNamed: public LTemplateInstruction<0, 2, 1> { 1582 class LStoreNamedField: public LTemplateInstruction<0, 2, 1> {
1503 public: 1583 public:
1504 LStoreNamed(LOperand* obj, LOperand* val) { 1584 LStoreNamedField(LOperand* obj, LOperand* val, LOperand* temp) {
1505 inputs_[0] = obj; 1585 inputs_[0] = obj;
1506 inputs_[1] = val; 1586 inputs_[1] = val;
1507 }
1508
1509 DECLARE_INSTRUCTION(StoreNamed)
1510 DECLARE_HYDROGEN_ACCESSOR(StoreNamed)
1511
1512 virtual void PrintDataTo(StringStream* stream);
1513
1514 LOperand* object() { return inputs_[0]; }
1515 LOperand* value() { return inputs_[1]; }
1516 Handle<Object> name() const { return hydrogen()->name(); }
1517 };
1518
1519
1520 class LStoreNamedField: public LStoreNamed {
1521 public:
1522 LStoreNamedField(LOperand* obj, LOperand* val, LOperand* temp)
1523 : LStoreNamed(obj, val) {
1524 temps_[0] = temp; 1587 temps_[0] = temp;
1525 } 1588 }
1526 1589
1527 DECLARE_CONCRETE_INSTRUCTION(StoreNamedField, "store-named-field") 1590 DECLARE_CONCRETE_INSTRUCTION(StoreNamedField, "store-named-field")
1528 DECLARE_HYDROGEN_ACCESSOR(StoreNamedField) 1591 DECLARE_HYDROGEN_ACCESSOR(StoreNamedField)
1529 1592
1593 virtual void PrintDataTo(StringStream* stream);
1594
1595 LOperand* object() { return inputs_[0]; }
1596 LOperand* value() { return inputs_[1]; }
1597
1598 Handle<Object> name() const { return hydrogen()->name(); }
1530 bool is_in_object() { return hydrogen()->is_in_object(); } 1599 bool is_in_object() { return hydrogen()->is_in_object(); }
1531 int offset() { return hydrogen()->offset(); } 1600 int offset() { return hydrogen()->offset(); }
1532 bool needs_write_barrier() { return hydrogen()->NeedsWriteBarrier(); } 1601 bool needs_write_barrier() { return hydrogen()->NeedsWriteBarrier(); }
1533 Handle<Map> transition() const { return hydrogen()->transition(); } 1602 Handle<Map> transition() const { return hydrogen()->transition(); }
1534 }; 1603 };
1535 1604
1536 1605
1537 class LStoreNamedGeneric: public LStoreNamed { 1606 class LStoreNamedGeneric: public LTemplateInstruction<0, 3, 0> {
1538 public: 1607 public:
1539 LStoreNamedGeneric(LOperand* obj, LOperand* val) 1608 LStoreNamedGeneric(LOperand* context, LOperand* object, LOperand* value) {
1540 : LStoreNamed(obj, val) { } 1609 inputs_[0] = context;
1610 inputs_[1] = object;
1611 inputs_[2] = value;
1612 }
1541 1613
1542 DECLARE_CONCRETE_INSTRUCTION(StoreNamedGeneric, "store-named-generic") 1614 DECLARE_CONCRETE_INSTRUCTION(StoreNamedGeneric, "store-named-generic")
1543 DECLARE_HYDROGEN_ACCESSOR(StoreNamedGeneric) 1615 DECLARE_HYDROGEN_ACCESSOR(StoreNamedGeneric)
1616
1617 virtual void PrintDataTo(StringStream* stream);
1618
1619 LOperand* context() { return inputs_[0]; }
1620 LOperand* object() { return inputs_[1]; }
1621 LOperand* value() { return inputs_[2]; }
1622 Handle<Object> name() const { return hydrogen()->name(); }
1544 }; 1623 };
1545 1624
1546 1625
1547 class LStoreKeyed: public LTemplateInstruction<0, 3, 0> { 1626 class LStoreKeyedFastElement: public LTemplateInstruction<0, 3, 0> {
1548 public: 1627 public:
1549 LStoreKeyed(LOperand* obj, LOperand* key, LOperand* val) { 1628 LStoreKeyedFastElement(LOperand* obj, LOperand* key, LOperand* val) {
1550 inputs_[0] = obj; 1629 inputs_[0] = obj;
1551 inputs_[1] = key; 1630 inputs_[1] = key;
1552 inputs_[2] = val; 1631 inputs_[2] = val;
1553 } 1632 }
1554 1633
1555 DECLARE_INSTRUCTION(StoreKeyed) 1634 DECLARE_CONCRETE_INSTRUCTION(StoreKeyedFastElement,
1635 "store-keyed-fast-element")
1636 DECLARE_HYDROGEN_ACCESSOR(StoreKeyedFastElement)
1556 1637
1557 virtual void PrintDataTo(StringStream* stream); 1638 virtual void PrintDataTo(StringStream* stream);
1558 1639
1559 LOperand* object() { return inputs_[0]; } 1640 LOperand* object() { return inputs_[0]; }
1560 LOperand* key() { return inputs_[1]; } 1641 LOperand* key() { return inputs_[1]; }
1561 LOperand* value() { return inputs_[2]; } 1642 LOperand* value() { return inputs_[2]; }
1562 }; 1643 };
1563 1644
1564 1645
1565 class LStoreKeyedFastElement: public LStoreKeyed { 1646 class LStorePixelArrayElement: public LTemplateInstruction<0, 3, 1> {
1566 public: 1647 public:
1567 LStoreKeyedFastElement(LOperand* obj, LOperand* key, LOperand* val) 1648 LStorePixelArrayElement(LOperand* external_pointer,
1568 : LStoreKeyed(obj, key, val) {} 1649 LOperand* key,
1650 LOperand* val,
1651 LOperand* clamped) {
1652 inputs_[0] = external_pointer;
1653 inputs_[1] = key;
1654 inputs_[2] = val;
1655 temps_[0] = clamped;
1656 }
1569 1657
1570 DECLARE_CONCRETE_INSTRUCTION(StoreKeyedFastElement, 1658 DECLARE_CONCRETE_INSTRUCTION(StorePixelArrayElement,
1571 "store-keyed-fast-element") 1659 "store-pixel-array-element")
1572 DECLARE_HYDROGEN_ACCESSOR(StoreKeyedFastElement) 1660 DECLARE_HYDROGEN_ACCESSOR(StorePixelArrayElement)
1661
1662 LOperand* external_pointer() { return inputs_[0]; }
1663 LOperand* key() { return inputs_[1]; }
1664 LOperand* value() { return inputs_[2]; }
1573 }; 1665 };
1574 1666
1575 1667
1576 class LStoreKeyedGeneric: public LStoreKeyed { 1668 class LStoreKeyedGeneric: public LTemplateInstruction<0, 4, 0> {
1577 public: 1669 public:
1578 LStoreKeyedGeneric(LOperand* obj, LOperand* key, LOperand* val) 1670 LStoreKeyedGeneric(LOperand* context,
1579 : LStoreKeyed(obj, key, val) { } 1671 LOperand* object,
1672 LOperand* key,
1673 LOperand* value) {
1674 inputs_[0] = context;
1675 inputs_[1] = object;
1676 inputs_[2] = key;
1677 inputs_[3] = value;
1678 }
1580 1679
1581 DECLARE_CONCRETE_INSTRUCTION(StoreKeyedGeneric, "store-keyed-generic") 1680 DECLARE_CONCRETE_INSTRUCTION(StoreKeyedGeneric, "store-keyed-generic")
1681
1682 virtual void PrintDataTo(StringStream* stream);
1683
1684 LOperand* context() { return inputs_[0]; }
1685 LOperand* object() { return inputs_[1]; }
1686 LOperand* key() { return inputs_[2]; }
1687 LOperand* value() { return inputs_[3]; }
1582 }; 1688 };
1583 1689
1584 1690
1585 class LStringCharCodeAt: public LTemplateInstruction<1, 2, 0> { 1691 class LStringCharCodeAt: public LTemplateInstruction<1, 2, 0> {
1586 public: 1692 public:
1587 LStringCharCodeAt(LOperand* string, LOperand* index) { 1693 LStringCharCodeAt(LOperand* string, LOperand* index) {
1588 inputs_[0] = string; 1694 inputs_[0] = string;
1589 inputs_[1] = index; 1695 inputs_[1] = index;
1590 } 1696 }
1591 1697
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
1677 }; 1783 };
1678 1784
1679 1785
1680 class LArrayLiteral: public LTemplateInstruction<1, 0, 0> { 1786 class LArrayLiteral: public LTemplateInstruction<1, 0, 0> {
1681 public: 1787 public:
1682 DECLARE_CONCRETE_INSTRUCTION(ArrayLiteral, "array-literal") 1788 DECLARE_CONCRETE_INSTRUCTION(ArrayLiteral, "array-literal")
1683 DECLARE_HYDROGEN_ACCESSOR(ArrayLiteral) 1789 DECLARE_HYDROGEN_ACCESSOR(ArrayLiteral)
1684 }; 1790 };
1685 1791
1686 1792
1687 class LObjectLiteral: public LTemplateInstruction<1, 0, 0> { 1793 class LObjectLiteral: public LTemplateInstruction<1, 1, 0> {
1688 public: 1794 public:
1795 explicit LObjectLiteral(LOperand* context) {
1796 inputs_[0] = context;
1797 }
1798
1689 DECLARE_CONCRETE_INSTRUCTION(ObjectLiteral, "object-literal") 1799 DECLARE_CONCRETE_INSTRUCTION(ObjectLiteral, "object-literal")
1690 DECLARE_HYDROGEN_ACCESSOR(ObjectLiteral) 1800 DECLARE_HYDROGEN_ACCESSOR(ObjectLiteral)
1801
1802 LOperand* context() { return inputs_[0]; }
1691 }; 1803 };
1692 1804
1693 1805
1694 class LRegExpLiteral: public LTemplateInstruction<1, 0, 0> { 1806 class LRegExpLiteral: public LTemplateInstruction<1, 0, 0> {
1695 public: 1807 public:
1696 DECLARE_CONCRETE_INSTRUCTION(RegExpLiteral, "regexp-literal") 1808 DECLARE_CONCRETE_INSTRUCTION(RegExpLiteral, "regexp-literal")
1697 DECLARE_HYDROGEN_ACCESSOR(RegExpLiteral) 1809 DECLARE_HYDROGEN_ACCESSOR(RegExpLiteral)
1698 }; 1810 };
1699 1811
1700 1812
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after
2006 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); 2118 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder);
2007 }; 2119 };
2008 2120
2009 #undef DECLARE_HYDROGEN_ACCESSOR 2121 #undef DECLARE_HYDROGEN_ACCESSOR
2010 #undef DECLARE_INSTRUCTION 2122 #undef DECLARE_INSTRUCTION
2011 #undef DECLARE_CONCRETE_INSTRUCTION 2123 #undef DECLARE_CONCRETE_INSTRUCTION
2012 2124
2013 } } // namespace v8::internal 2125 } } // namespace v8::internal
2014 2126
2015 #endif // V8_IA32_LITHIUM_IA32_H_ 2127 #endif // V8_IA32_LITHIUM_IA32_H_
OLDNEW
« no previous file with comments | « src/ia32/lithium-codegen-ia32.cc ('k') | src/ia32/lithium-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698