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

Side by Side Diff: src/x64/lithium-x64.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/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 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 20 matching lines...) Expand all
77 V(CmpID) \ 75 V(CmpID) \
78 V(CmpIDAndBranch) \ 76 V(CmpIDAndBranch) \
79 V(CmpJSObjectEq) \ 77 V(CmpJSObjectEq) \
80 V(CmpJSObjectEqAndBranch) \ 78 V(CmpJSObjectEqAndBranch) \
81 V(CmpMapAndBranch) \ 79 V(CmpMapAndBranch) \
82 V(CmpT) \ 80 V(CmpT) \
83 V(CmpTAndBranch) \ 81 V(CmpTAndBranch) \
84 V(ConstantD) \ 82 V(ConstantD) \
85 V(ConstantI) \ 83 V(ConstantI) \
86 V(ConstantT) \ 84 V(ConstantT) \
85 V(Context) \
87 V(DeleteProperty) \ 86 V(DeleteProperty) \
88 V(Deoptimize) \ 87 V(Deoptimize) \
89 V(DivI) \ 88 V(DivI) \
90 V(DoubleToI) \ 89 V(DoubleToI) \
91 V(FunctionLiteral) \ 90 V(FunctionLiteral) \
92 V(Gap) \ 91 V(Gap) \
93 V(GlobalObject) \ 92 V(GlobalObject) \
94 V(GlobalReceiver) \ 93 V(GlobalReceiver) \
95 V(Goto) \ 94 V(Goto) \
96 V(FixedArrayLength) \ 95 V(FixedArrayLength) \
(...skipping 17 matching lines...) Expand all
114 V(Label) \ 113 V(Label) \
115 V(LazyBailout) \ 114 V(LazyBailout) \
116 V(LoadContextSlot) \ 115 V(LoadContextSlot) \
117 V(LoadElements) \ 116 V(LoadElements) \
118 V(LoadGlobal) \ 117 V(LoadGlobal) \
119 V(LoadKeyedFastElement) \ 118 V(LoadKeyedFastElement) \
120 V(LoadKeyedGeneric) \ 119 V(LoadKeyedGeneric) \
121 V(LoadNamedField) \ 120 V(LoadNamedField) \
122 V(LoadNamedGeneric) \ 121 V(LoadNamedGeneric) \
123 V(LoadFunctionPrototype) \ 122 V(LoadFunctionPrototype) \
123 V(LoadPixelArrayElement) \
124 V(LoadPixelArrayExternalPointer) \
124 V(ModI) \ 125 V(ModI) \
125 V(MulI) \ 126 V(MulI) \
126 V(NumberTagD) \ 127 V(NumberTagD) \
127 V(NumberTagI) \ 128 V(NumberTagI) \
128 V(NumberUntagD) \ 129 V(NumberUntagD) \
129 V(ObjectLiteral) \ 130 V(ObjectLiteral) \
130 V(OsrEntry) \ 131 V(OsrEntry) \
132 V(OuterContext) \
131 V(Parameter) \ 133 V(Parameter) \
134 V(PixelArrayLength) \
132 V(Power) \ 135 V(Power) \
133 V(PushArgument) \ 136 V(PushArgument) \
134 V(RegExpLiteral) \ 137 V(RegExpLiteral) \
135 V(Return) \ 138 V(Return) \
136 V(ShiftI) \ 139 V(ShiftI) \
137 V(SmiTag) \ 140 V(SmiTag) \
138 V(SmiUntag) \ 141 V(SmiUntag) \
139 V(StackCheck) \ 142 V(StackCheck) \
143 V(StoreContextSlot) \
140 V(StoreGlobal) \ 144 V(StoreGlobal) \
141 V(StoreKeyedFastElement) \ 145 V(StoreKeyedFastElement) \
142 V(StoreKeyedGeneric) \ 146 V(StoreKeyedGeneric) \
143 V(StoreNamedField) \ 147 V(StoreNamedField) \
144 V(StoreNamedGeneric) \ 148 V(StoreNamedGeneric) \
149 V(StorePixelArrayElement) \
150 V(StringCharCodeAt) \
151 V(StringLength) \
145 V(SubI) \ 152 V(SubI) \
146 V(TaggedToI) \ 153 V(TaggedToI) \
147 V(Throw) \ 154 V(Throw) \
148 V(Typeof) \ 155 V(Typeof) \
149 V(TypeofIs) \ 156 V(TypeofIs) \
150 V(TypeofIsAndBranch) \ 157 V(TypeofIsAndBranch) \
151 V(IsConstructCall) \ 158 V(IsConstructCall) \
152 V(IsConstructCallAndBranch) \ 159 V(IsConstructCallAndBranch) \
153 V(UnaryMathOperation) \ 160 V(UnaryMathOperation) \
154 V(UnknownOSRValue) \ 161 V(UnknownOSRValue) \
(...skipping 663 matching lines...) Expand 10 before | Expand all | Expand 10 after
818 public: 825 public:
819 LInstanceOfAndBranch(LOperand* left, LOperand* right) { 826 LInstanceOfAndBranch(LOperand* left, LOperand* right) {
820 inputs_[0] = left; 827 inputs_[0] = left;
821 inputs_[1] = right; 828 inputs_[1] = right;
822 } 829 }
823 830
824 DECLARE_CONCRETE_INSTRUCTION(InstanceOfAndBranch, "instance-of-and-branch") 831 DECLARE_CONCRETE_INSTRUCTION(InstanceOfAndBranch, "instance-of-and-branch")
825 }; 832 };
826 833
827 834
828 class LInstanceOfKnownGlobal: public LTemplateInstruction<1, 1, 1> { 835 class LInstanceOfKnownGlobal: public LTemplateInstruction<1, 1, 0> {
829 public: 836 public:
830 LInstanceOfKnownGlobal(LOperand* value, LOperand* temp) { 837 explicit LInstanceOfKnownGlobal(LOperand* value) {
831 inputs_[0] = value; 838 inputs_[0] = value;
832 temps_[0] = temp;
833 } 839 }
834 840
835 DECLARE_CONCRETE_INSTRUCTION(InstanceOfKnownGlobal, 841 DECLARE_CONCRETE_INSTRUCTION(InstanceOfKnownGlobal,
836 "instance-of-known-global") 842 "instance-of-known-global")
837 DECLARE_HYDROGEN_ACCESSOR(InstanceOfKnownGlobal) 843 DECLARE_HYDROGEN_ACCESSOR(InstanceOfKnownGlobal)
838 844
839 Handle<JSFunction> function() const { return hydrogen()->function(); } 845 Handle<JSFunction> function() const { return hydrogen()->function(); }
840 }; 846 };
841 847
842 848
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
971 public: 977 public:
972 explicit LJSArrayLength(LOperand* value) { 978 explicit LJSArrayLength(LOperand* value) {
973 inputs_[0] = value; 979 inputs_[0] = value;
974 } 980 }
975 981
976 DECLARE_CONCRETE_INSTRUCTION(JSArrayLength, "js-array-length") 982 DECLARE_CONCRETE_INSTRUCTION(JSArrayLength, "js-array-length")
977 DECLARE_HYDROGEN_ACCESSOR(JSArrayLength) 983 DECLARE_HYDROGEN_ACCESSOR(JSArrayLength)
978 }; 984 };
979 985
980 986
987 class LPixelArrayLength: public LTemplateInstruction<1, 1, 0> {
988 public:
989 explicit LPixelArrayLength(LOperand* value) {
990 inputs_[0] = value;
991 }
992
993 DECLARE_CONCRETE_INSTRUCTION(PixelArrayLength, "pixel-array-length")
994 DECLARE_HYDROGEN_ACCESSOR(PixelArrayLength)
995 };
996
997
981 class LFixedArrayLength: public LTemplateInstruction<1, 1, 0> { 998 class LFixedArrayLength: public LTemplateInstruction<1, 1, 0> {
982 public: 999 public:
983 explicit LFixedArrayLength(LOperand* value) { 1000 explicit LFixedArrayLength(LOperand* value) {
984 inputs_[0] = value; 1001 inputs_[0] = value;
985 } 1002 }
986 1003
987 DECLARE_CONCRETE_INSTRUCTION(FixedArrayLength, "fixed-array-length") 1004 DECLARE_CONCRETE_INSTRUCTION(FixedArrayLength, "fixed-array-length")
988 DECLARE_HYDROGEN_ACCESSOR(FixedArrayLength) 1005 DECLARE_HYDROGEN_ACCESSOR(FixedArrayLength)
989 }; 1006 };
990 1007
991 1008
992 class LValueOf: public LTemplateInstruction<1, 1, 1> { 1009 class LValueOf: public LTemplateInstruction<1, 1, 0> {
993 public: 1010 public:
994 LValueOf(LOperand* value, LOperand* temp) { 1011 explicit LValueOf(LOperand* value) {
995 inputs_[0] = value; 1012 inputs_[0] = value;
996 temps_[0] = temp;
997 } 1013 }
998 1014
999 DECLARE_CONCRETE_INSTRUCTION(ValueOf, "value-of") 1015 DECLARE_CONCRETE_INSTRUCTION(ValueOf, "value-of")
1000 DECLARE_HYDROGEN_ACCESSOR(ValueOf) 1016 DECLARE_HYDROGEN_ACCESSOR(ValueOf)
1001 }; 1017 };
1002 1018
1003 1019
1004 class LThrow: public LTemplateInstruction<0, 1, 0> { 1020 class LThrow: public LTemplateInstruction<0, 1, 0> {
1005 public: 1021 public:
1006 explicit LThrow(LOperand* value) { 1022 explicit LThrow(LOperand* value) {
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
1109 } 1125 }
1110 1126
1111 DECLARE_CONCRETE_INSTRUCTION(LoadNamedGeneric, "load-named-generic") 1127 DECLARE_CONCRETE_INSTRUCTION(LoadNamedGeneric, "load-named-generic")
1112 DECLARE_HYDROGEN_ACCESSOR(LoadNamedGeneric) 1128 DECLARE_HYDROGEN_ACCESSOR(LoadNamedGeneric)
1113 1129
1114 LOperand* object() { return inputs_[0]; } 1130 LOperand* object() { return inputs_[0]; }
1115 Handle<Object> name() const { return hydrogen()->name(); } 1131 Handle<Object> name() const { return hydrogen()->name(); }
1116 }; 1132 };
1117 1133
1118 1134
1119 class LLoadFunctionPrototype: public LTemplateInstruction<1, 1, 1> { 1135 class LLoadFunctionPrototype: public LTemplateInstruction<1, 1, 0> {
1120 public: 1136 public:
1121 LLoadFunctionPrototype(LOperand* function, LOperand* temp) { 1137 explicit LLoadFunctionPrototype(LOperand* function) {
1122 inputs_[0] = function; 1138 inputs_[0] = function;
1123 temps_[0] = temp;
1124 } 1139 }
1125 1140
1126 DECLARE_CONCRETE_INSTRUCTION(LoadFunctionPrototype, "load-function-prototype") 1141 DECLARE_CONCRETE_INSTRUCTION(LoadFunctionPrototype, "load-function-prototype")
1127 DECLARE_HYDROGEN_ACCESSOR(LoadFunctionPrototype) 1142 DECLARE_HYDROGEN_ACCESSOR(LoadFunctionPrototype)
1128 1143
1129 LOperand* function() { return inputs_[0]; } 1144 LOperand* function() { return inputs_[0]; }
1130 }; 1145 };
1131 1146
1132 1147
1133 class LLoadElements: public LTemplateInstruction<1, 1, 0> { 1148 class LLoadElements: public LTemplateInstruction<1, 1, 0> {
1134 public: 1149 public:
1135 explicit LLoadElements(LOperand* object) { 1150 explicit LLoadElements(LOperand* object) {
1136 inputs_[0] = object; 1151 inputs_[0] = object;
1137 } 1152 }
1138 1153
1139 DECLARE_CONCRETE_INSTRUCTION(LoadElements, "load-elements") 1154 DECLARE_CONCRETE_INSTRUCTION(LoadElements, "load-elements")
1140 }; 1155 };
1141 1156
1142 1157
1158 class LLoadPixelArrayExternalPointer: public LTemplateInstruction<1, 1, 0> {
1159 public:
1160 explicit LLoadPixelArrayExternalPointer(LOperand* object) {
1161 inputs_[0] = object;
1162 }
1163
1164 DECLARE_CONCRETE_INSTRUCTION(LoadPixelArrayExternalPointer,
1165 "load-pixel-array-external-pointer")
1166 };
1167
1168
1143 class LLoadKeyedFastElement: public LTemplateInstruction<1, 2, 0> { 1169 class LLoadKeyedFastElement: public LTemplateInstruction<1, 2, 0> {
1144 public: 1170 public:
1145 LLoadKeyedFastElement(LOperand* elements, LOperand* key) { 1171 LLoadKeyedFastElement(LOperand* elements, LOperand* key) {
1146 inputs_[0] = elements; 1172 inputs_[0] = elements;
1147 inputs_[1] = key; 1173 inputs_[1] = key;
1148 } 1174 }
1149 1175
1150 DECLARE_CONCRETE_INSTRUCTION(LoadKeyedFastElement, "load-keyed-fast-element") 1176 DECLARE_CONCRETE_INSTRUCTION(LoadKeyedFastElement, "load-keyed-fast-element")
1151 DECLARE_HYDROGEN_ACCESSOR(LoadKeyedFastElement) 1177 DECLARE_HYDROGEN_ACCESSOR(LoadKeyedFastElement)
1152 1178
1153 LOperand* elements() { return inputs_[0]; } 1179 LOperand* elements() { return inputs_[0]; }
1154 LOperand* key() { return inputs_[1]; } 1180 LOperand* key() { return inputs_[1]; }
1155 }; 1181 };
1156 1182
1157 1183
1184 class LLoadPixelArrayElement: public LTemplateInstruction<1, 2, 0> {
1185 public:
1186 LLoadPixelArrayElement(LOperand* external_pointer, LOperand* key) {
1187 inputs_[0] = external_pointer;
1188 inputs_[1] = key;
1189 }
1190
1191 DECLARE_CONCRETE_INSTRUCTION(LoadPixelArrayElement,
1192 "load-pixel-array-element")
1193 DECLARE_HYDROGEN_ACCESSOR(LoadPixelArrayElement)
1194
1195 LOperand* external_pointer() { return inputs_[0]; }
1196 LOperand* key() { return inputs_[1]; }
1197 };
1198
1199
1158 class LLoadKeyedGeneric: public LTemplateInstruction<1, 2, 0> { 1200 class LLoadKeyedGeneric: public LTemplateInstruction<1, 2, 0> {
1159 public: 1201 public:
1160 LLoadKeyedGeneric(LOperand* obj, LOperand* key) { 1202 LLoadKeyedGeneric(LOperand* obj, LOperand* key) {
1161 inputs_[0] = obj; 1203 inputs_[0] = obj;
1162 inputs_[1] = key; 1204 inputs_[1] = key;
1163 } 1205 }
1164 1206
1165 DECLARE_CONCRETE_INSTRUCTION(LoadKeyedGeneric, "load-keyed-generic") 1207 DECLARE_CONCRETE_INSTRUCTION(LoadKeyedGeneric, "load-keyed-generic")
1166 1208
1167 LOperand* object() { return inputs_[0]; } 1209 LOperand* object() { return inputs_[0]; }
(...skipping 29 matching lines...) Expand all
1197 DECLARE_CONCRETE_INSTRUCTION(LoadContextSlot, "load-context-slot") 1239 DECLARE_CONCRETE_INSTRUCTION(LoadContextSlot, "load-context-slot")
1198 DECLARE_HYDROGEN_ACCESSOR(LoadContextSlot) 1240 DECLARE_HYDROGEN_ACCESSOR(LoadContextSlot)
1199 1241
1200 LOperand* context() { return InputAt(0); } 1242 LOperand* context() { return InputAt(0); }
1201 int slot_index() { return hydrogen()->slot_index(); } 1243 int slot_index() { return hydrogen()->slot_index(); }
1202 1244
1203 virtual void PrintDataTo(StringStream* stream); 1245 virtual void PrintDataTo(StringStream* stream);
1204 }; 1246 };
1205 1247
1206 1248
1249 class LStoreContextSlot: public LTemplateInstruction<0, 2, 0> {
1250 public:
1251 LStoreContextSlot(LOperand* context, LOperand* value) {
1252 inputs_[0] = context;
1253 inputs_[1] = value;
1254 }
1255
1256 DECLARE_CONCRETE_INSTRUCTION(StoreContextSlot, "store-context-slot")
1257 DECLARE_HYDROGEN_ACCESSOR(StoreContextSlot)
1258
1259 LOperand* context() { return InputAt(0); }
1260 LOperand* value() { return InputAt(1); }
1261 int slot_index() { return hydrogen()->slot_index(); }
1262 int needs_write_barrier() { return hydrogen()->NeedsWriteBarrier(); }
1263
1264 virtual void PrintDataTo(StringStream* stream);
1265 };
1266
1267
1207 class LPushArgument: public LTemplateInstruction<0, 1, 0> { 1268 class LPushArgument: public LTemplateInstruction<0, 1, 0> {
1208 public: 1269 public:
1209 explicit LPushArgument(LOperand* value) { 1270 explicit LPushArgument(LOperand* value) {
1210 inputs_[0] = value; 1271 inputs_[0] = value;
1211 } 1272 }
1212 1273
1213 DECLARE_CONCRETE_INSTRUCTION(PushArgument, "push-argument") 1274 DECLARE_CONCRETE_INSTRUCTION(PushArgument, "push-argument")
1214 }; 1275 };
1215 1276
1216 1277
1278 class LContext: public LTemplateInstruction<1, 0, 0> {
1279 public:
1280 DECLARE_CONCRETE_INSTRUCTION(Context, "context")
1281 };
1282
1283
1284 class LOuterContext: public LTemplateInstruction<1, 1, 0> {
1285 public:
1286 explicit LOuterContext(LOperand* context) {
1287 inputs_[0] = context;
1288 }
1289
1290 DECLARE_CONCRETE_INSTRUCTION(OuterContext, "outer-context")
1291
1292 LOperand* context() { return InputAt(0); }
1293 };
1294
1295
1217 class LGlobalObject: public LTemplateInstruction<1, 0, 0> { 1296 class LGlobalObject: public LTemplateInstruction<1, 0, 0> {
1218 public: 1297 public:
1219 DECLARE_CONCRETE_INSTRUCTION(GlobalObject, "global-object") 1298 DECLARE_CONCRETE_INSTRUCTION(GlobalObject, "global-object")
1220 }; 1299 };
1221 1300
1222 1301
1223 class LGlobalReceiver: public LTemplateInstruction<1, 0, 0> { 1302 class LGlobalReceiver: public LTemplateInstruction<1, 0, 0> {
1224 public: 1303 public:
1225 DECLARE_CONCRETE_INSTRUCTION(GlobalReceiver, "global-receiver") 1304 DECLARE_CONCRETE_INSTRUCTION(GlobalReceiver, "global-receiver")
1226 }; 1305 };
(...skipping 13 matching lines...) Expand all
1240 1319
1241 class LCallKeyed: public LTemplateInstruction<1, 1, 0> { 1320 class LCallKeyed: public LTemplateInstruction<1, 1, 0> {
1242 public: 1321 public:
1243 explicit LCallKeyed(LOperand* key) { 1322 explicit LCallKeyed(LOperand* key) {
1244 inputs_[0] = key; 1323 inputs_[0] = key;
1245 } 1324 }
1246 1325
1247 DECLARE_CONCRETE_INSTRUCTION(CallKeyed, "call-keyed") 1326 DECLARE_CONCRETE_INSTRUCTION(CallKeyed, "call-keyed")
1248 DECLARE_HYDROGEN_ACCESSOR(CallKeyed) 1327 DECLARE_HYDROGEN_ACCESSOR(CallKeyed)
1249 1328
1329 LOperand* key() { return inputs_[0]; }
1330
1250 virtual void PrintDataTo(StringStream* stream); 1331 virtual void PrintDataTo(StringStream* stream);
1251 1332
1252 int arity() const { return hydrogen()->argument_count() - 1; } 1333 int arity() const { return hydrogen()->argument_count() - 1; }
1253 }; 1334 };
1254 1335
1255 1336
1256 class LCallNamed: public LTemplateInstruction<1, 0, 0> { 1337 class LCallNamed: public LTemplateInstruction<1, 0, 0> {
1257 public: 1338 public:
1258 DECLARE_CONCRETE_INSTRUCTION(CallNamed, "call-named") 1339 DECLARE_CONCRETE_INSTRUCTION(CallNamed, "call-named")
1259 DECLARE_HYDROGEN_ACCESSOR(CallNamed) 1340 DECLARE_HYDROGEN_ACCESSOR(CallNamed)
1260 1341
1261 virtual void PrintDataTo(StringStream* stream); 1342 virtual void PrintDataTo(StringStream* stream);
1262 1343
1263 Handle<String> name() const { return hydrogen()->name(); } 1344 Handle<String> name() const { return hydrogen()->name(); }
1264 int arity() const { return hydrogen()->argument_count() - 1; } 1345 int arity() const { return hydrogen()->argument_count() - 1; }
1265 }; 1346 };
1266 1347
1267 1348
1268 class LCallFunction: public LTemplateInstruction<1, 0, 0> { 1349 class LCallFunction: public LTemplateInstruction<1, 0, 0> {
1269 public: 1350 public:
1351 LCallFunction() {}
1352
1270 DECLARE_CONCRETE_INSTRUCTION(CallFunction, "call-function") 1353 DECLARE_CONCRETE_INSTRUCTION(CallFunction, "call-function")
1271 DECLARE_HYDROGEN_ACCESSOR(CallFunction) 1354 DECLARE_HYDROGEN_ACCESSOR(CallFunction)
1272 1355
1273 int arity() const { return hydrogen()->argument_count() - 2; } 1356 int arity() const { return hydrogen()->argument_count() - 2; }
1274 }; 1357 };
1275 1358
1276 1359
1277 class LCallGlobal: public LTemplateInstruction<1, 0, 0> { 1360 class LCallGlobal: public LTemplateInstruction<1, 0, 0> {
1278 public: 1361 public:
1279 DECLARE_CONCRETE_INSTRUCTION(CallGlobal, "call-global") 1362 DECLARE_CONCRETE_INSTRUCTION(CallGlobal, "call-global")
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
1348 explicit LNumberTagD(LOperand* value, LOperand* temp) { 1431 explicit LNumberTagD(LOperand* value, LOperand* temp) {
1349 inputs_[0] = value; 1432 inputs_[0] = value;
1350 temps_[0] = temp; 1433 temps_[0] = temp;
1351 } 1434 }
1352 1435
1353 DECLARE_CONCRETE_INSTRUCTION(NumberTagD, "number-tag-d") 1436 DECLARE_CONCRETE_INSTRUCTION(NumberTagD, "number-tag-d")
1354 }; 1437 };
1355 1438
1356 1439
1357 // Sometimes truncating conversion from a tagged value to an int32. 1440 // Sometimes truncating conversion from a tagged value to an int32.
1358 class LDoubleToI: public LTemplateInstruction<1, 1, 1> { 1441 class LDoubleToI: public LTemplateInstruction<1, 1, 0> {
1359 public: 1442 public:
1360 LDoubleToI(LOperand* value, LOperand* temp) { 1443 explicit LDoubleToI(LOperand* value) {
1361 inputs_[0] = value; 1444 inputs_[0] = value;
1362 temps_[0] = temp;
1363 } 1445 }
1364 1446
1365 DECLARE_CONCRETE_INSTRUCTION(DoubleToI, "double-to-i") 1447 DECLARE_CONCRETE_INSTRUCTION(DoubleToI, "double-to-i")
1366 DECLARE_HYDROGEN_ACCESSOR(Change) 1448 DECLARE_HYDROGEN_ACCESSOR(Change)
1367 1449
1368 bool truncating() { return hydrogen()->CanTruncateToInt32(); } 1450 bool truncating() { return hydrogen()->CanTruncateToInt32(); }
1369 }; 1451 };
1370 1452
1371 1453
1372 // Truncating conversion from a tagged value to an int32. 1454 // Truncating conversion from a tagged value to an int32.
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
1413 1495
1414 DECLARE_CONCRETE_INSTRUCTION(SmiUntag, "smi-untag") 1496 DECLARE_CONCRETE_INSTRUCTION(SmiUntag, "smi-untag")
1415 1497
1416 bool needs_check() const { return needs_check_; } 1498 bool needs_check() const { return needs_check_; }
1417 1499
1418 private: 1500 private:
1419 bool needs_check_; 1501 bool needs_check_;
1420 }; 1502 };
1421 1503
1422 1504
1423 class LStoreNamed: public LTemplateInstruction<0, 2, 1> { 1505 class LStoreNamedField: public LTemplateInstruction<0, 2, 1> {
1424 public: 1506 public:
1425 LStoreNamed(LOperand* obj, LOperand* val) { 1507 LStoreNamedField(LOperand* object, LOperand* value, LOperand* temp) {
1426 inputs_[0] = obj; 1508 inputs_[0] = object;
1427 inputs_[1] = val; 1509 inputs_[1] = value;
1428 }
1429
1430 DECLARE_INSTRUCTION(StoreNamed)
1431 DECLARE_HYDROGEN_ACCESSOR(StoreNamed)
1432
1433 virtual void PrintDataTo(StringStream* stream);
1434
1435 LOperand* object() { return inputs_[0]; }
1436 LOperand* value() { return inputs_[1]; }
1437 Handle<Object> name() const { return hydrogen()->name(); }
1438 };
1439
1440
1441 class LStoreNamedField: public LStoreNamed {
1442 public:
1443 LStoreNamedField(LOperand* obj, LOperand* val, LOperand* temp)
1444 : LStoreNamed(obj, val) {
1445 temps_[0] = temp; 1510 temps_[0] = temp;
1446 } 1511 }
1447 1512
1448 DECLARE_CONCRETE_INSTRUCTION(StoreNamedField, "store-named-field") 1513 DECLARE_CONCRETE_INSTRUCTION(StoreNamedField, "store-named-field")
1449 DECLARE_HYDROGEN_ACCESSOR(StoreNamedField) 1514 DECLARE_HYDROGEN_ACCESSOR(StoreNamedField)
1450 1515
1516 virtual void PrintDataTo(StringStream* stream);
1517
1518 LOperand* object() { return inputs_[0]; }
1519 LOperand* value() { return inputs_[1]; }
1520
1521 Handle<Object> name() const { return hydrogen()->name(); }
1451 bool is_in_object() { return hydrogen()->is_in_object(); } 1522 bool is_in_object() { return hydrogen()->is_in_object(); }
1452 int offset() { return hydrogen()->offset(); } 1523 int offset() { return hydrogen()->offset(); }
1453 bool needs_write_barrier() { return hydrogen()->NeedsWriteBarrier(); } 1524 bool needs_write_barrier() { return hydrogen()->NeedsWriteBarrier(); }
1454 Handle<Map> transition() const { return hydrogen()->transition(); } 1525 Handle<Map> transition() const { return hydrogen()->transition(); }
1455 }; 1526 };
1456 1527
1457 1528
1458 class LStoreNamedGeneric: public LStoreNamed { 1529 class LStoreNamedGeneric: public LTemplateInstruction<0, 2, 0> {
1459 public: 1530 public:
1460 LStoreNamedGeneric(LOperand* obj, LOperand* val) 1531 LStoreNamedGeneric(LOperand* object, LOperand* value) {
1461 : LStoreNamed(obj, val) { } 1532 inputs_[0] = object;
1533 inputs_[1] = value;
1534 }
1462 1535
1463 DECLARE_CONCRETE_INSTRUCTION(StoreNamedGeneric, "store-named-generic") 1536 DECLARE_CONCRETE_INSTRUCTION(StoreNamedGeneric, "store-named-generic")
1464 DECLARE_HYDROGEN_ACCESSOR(StoreNamedGeneric) 1537 DECLARE_HYDROGEN_ACCESSOR(StoreNamedGeneric)
1538
1539 virtual void PrintDataTo(StringStream* stream);
1540
1541 LOperand* object() { return inputs_[0]; }
1542 LOperand* value() { return inputs_[1]; }
1543 Handle<Object> name() const { return hydrogen()->name(); }
1465 }; 1544 };
1466 1545
1467 1546
1468 class LStoreKeyed: public LTemplateInstruction<0, 3, 0> { 1547 class LStoreKeyedFastElement: public LTemplateInstruction<0, 3, 0> {
1469 public: 1548 public:
1470 LStoreKeyed(LOperand* obj, LOperand* key, LOperand* val) { 1549 LStoreKeyedFastElement(LOperand* obj, LOperand* key, LOperand* val) {
1471 inputs_[0] = obj; 1550 inputs_[0] = obj;
1472 inputs_[1] = key; 1551 inputs_[1] = key;
1473 inputs_[2] = val; 1552 inputs_[2] = val;
1474 } 1553 }
1475 1554
1476 DECLARE_INSTRUCTION(StoreKeyed) 1555 DECLARE_CONCRETE_INSTRUCTION(StoreKeyedFastElement,
1556 "store-keyed-fast-element")
1557 DECLARE_HYDROGEN_ACCESSOR(StoreKeyedFastElement)
1477 1558
1478 virtual void PrintDataTo(StringStream* stream); 1559 virtual void PrintDataTo(StringStream* stream);
1479 1560
1480 LOperand* object() { return inputs_[0]; } 1561 LOperand* object() { return inputs_[0]; }
1481 LOperand* key() { return inputs_[1]; } 1562 LOperand* key() { return inputs_[1]; }
1482 LOperand* value() { return inputs_[2]; } 1563 LOperand* value() { return inputs_[2]; }
1483 }; 1564 };
1484 1565
1485 1566
1486 class LStoreKeyedFastElement: public LStoreKeyed { 1567 class LStorePixelArrayElement: public LTemplateInstruction<0, 3, 0> {
1487 public: 1568 public:
1488 LStoreKeyedFastElement(LOperand* obj, LOperand* key, LOperand* val) 1569 LStorePixelArrayElement(LOperand* external_pointer,
1489 : LStoreKeyed(obj, key, val) {} 1570 LOperand* key,
1571 LOperand* val) {
1572 inputs_[0] = external_pointer;
1573 inputs_[1] = key;
1574 inputs_[2] = val;
1575 }
1490 1576
1491 DECLARE_CONCRETE_INSTRUCTION(StoreKeyedFastElement, 1577 DECLARE_CONCRETE_INSTRUCTION(StorePixelArrayElement,
1492 "store-keyed-fast-element") 1578 "store-pixel-array-element")
1493 DECLARE_HYDROGEN_ACCESSOR(StoreKeyedFastElement) 1579 DECLARE_HYDROGEN_ACCESSOR(StorePixelArrayElement)
1580
1581 LOperand* external_pointer() { return inputs_[0]; }
1582 LOperand* key() { return inputs_[1]; }
1583 LOperand* value() { return inputs_[2]; }
1494 }; 1584 };
1495 1585
1496 1586
1497 class LStoreKeyedGeneric: public LStoreKeyed { 1587 class LStoreKeyedGeneric: public LTemplateInstruction<0, 3, 0> {
1498 public: 1588 public:
1499 LStoreKeyedGeneric(LOperand* obj, LOperand* key, LOperand* val) 1589 LStoreKeyedGeneric(LOperand* object, LOperand* key, LOperand* value) {
1500 : LStoreKeyed(obj, key, val) { } 1590 inputs_[0] = object;
1591 inputs_[1] = key;
1592 inputs_[2] = value;
1593 }
1501 1594
1502 DECLARE_CONCRETE_INSTRUCTION(StoreKeyedGeneric, "store-keyed-generic") 1595 DECLARE_CONCRETE_INSTRUCTION(StoreKeyedGeneric, "store-keyed-generic")
1596
1597 virtual void PrintDataTo(StringStream* stream);
1598
1599 LOperand* object() { return inputs_[0]; }
1600 LOperand* key() { return inputs_[1]; }
1601 LOperand* value() { return inputs_[2]; }
1602 };
1603
1604
1605 class LStringCharCodeAt: public LTemplateInstruction<1, 2, 0> {
1606 public:
1607 LStringCharCodeAt(LOperand* string, LOperand* index) {
1608 inputs_[0] = string;
1609 inputs_[1] = index;
1610 }
1611
1612 DECLARE_CONCRETE_INSTRUCTION(StringCharCodeAt, "string-char-code-at")
1613 DECLARE_HYDROGEN_ACCESSOR(StringCharCodeAt)
1614
1615 LOperand* string() { return inputs_[0]; }
1616 LOperand* index() { return inputs_[1]; }
1617 };
1618
1619
1620 class LStringLength: public LTemplateInstruction<1, 1, 0> {
1621 public:
1622 explicit LStringLength(LOperand* string) {
1623 inputs_[0] = string;
1624 }
1625
1626 DECLARE_CONCRETE_INSTRUCTION(StringLength, "string-length")
1627 DECLARE_HYDROGEN_ACCESSOR(StringLength)
1628
1629 LOperand* string() { return inputs_[0]; }
1503 }; 1630 };
1504 1631
1505 1632
1506 class LCheckFunction: public LTemplateInstruction<0, 1, 0> { 1633 class LCheckFunction: public LTemplateInstruction<0, 1, 0> {
1507 public: 1634 public:
1508 explicit LCheckFunction(LOperand* value) { 1635 explicit LCheckFunction(LOperand* value) {
1509 inputs_[0] = value; 1636 inputs_[0] = value;
1510 } 1637 }
1511 1638
1512 DECLARE_CONCRETE_INSTRUCTION(CheckFunction, "check-function") 1639 DECLARE_CONCRETE_INSTRUCTION(CheckFunction, "check-function")
(...skipping 403 matching lines...) Expand 10 before | Expand all | Expand 10 after
1916 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); 2043 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder);
1917 }; 2044 };
1918 2045
1919 #undef DECLARE_HYDROGEN_ACCESSOR 2046 #undef DECLARE_HYDROGEN_ACCESSOR
1920 #undef DECLARE_INSTRUCTION 2047 #undef DECLARE_INSTRUCTION
1921 #undef DECLARE_CONCRETE_INSTRUCTION 2048 #undef DECLARE_CONCRETE_INSTRUCTION
1922 2049
1923 } } // namespace v8::int 2050 } } // namespace v8::int
1924 2051
1925 #endif // V8_X64_LITHIUM_X64_H_ 2052 #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