OLD | NEW |
1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
111 // HObjectLiteral | 111 // HObjectLiteral |
112 // HRegExpLiteral | 112 // HRegExpLiteral |
113 // HOsrEntry | 113 // HOsrEntry |
114 // HParameter | 114 // HParameter |
115 // HSimulate | 115 // HSimulate |
116 // HStackCheck | 116 // HStackCheck |
117 // HStoreKeyed | 117 // HStoreKeyed |
118 // HStoreKeyedFastElement | 118 // HStoreKeyedFastElement |
119 // HStoreKeyedGeneric | 119 // HStoreKeyedGeneric |
120 // HUnaryOperation | 120 // HUnaryOperation |
121 // HArrayLength | |
122 // HBitNot | 121 // HBitNot |
123 // HChange | 122 // HChange |
124 // HCheckFunction | 123 // HCheckFunction |
125 // HCheckInstanceType | 124 // HCheckInstanceType |
126 // HCheckMap | 125 // HCheckMap |
127 // HCheckNonSmi | 126 // HCheckNonSmi |
128 // HCheckPrototypeMaps | 127 // HCheckPrototypeMaps |
129 // HCheckSmi | 128 // HCheckSmi |
130 // HDeleteProperty | 129 // HDeleteProperty |
| 130 // HFixedArrayLength |
| 131 // HJSArrayLength |
131 // HLoadElements | 132 // HLoadElements |
132 // HTypeofIs | 133 // HTypeofIs |
133 // HLoadNamedField | 134 // HLoadNamedField |
134 // HLoadNamedGeneric | 135 // HLoadNamedGeneric |
135 // HLoadFunctionPrototype | 136 // HLoadFunctionPrototype |
136 // HPushArgument | 137 // HPushArgument |
137 // HTypeof | 138 // HTypeof |
138 // HUnaryMathOperation | 139 // HUnaryMathOperation |
139 // HUnaryPredicate | 140 // HUnaryPredicate |
140 // HClassOfTest | 141 // HClassOfTest |
(...skipping 23 matching lines...) Expand all Loading... |
164 HYDROGEN_CONCRETE_INSTRUCTION_LIST(V) | 165 HYDROGEN_CONCRETE_INSTRUCTION_LIST(V) |
165 | 166 |
166 | 167 |
167 #define HYDROGEN_CONCRETE_INSTRUCTION_LIST(V) \ | 168 #define HYDROGEN_CONCRETE_INSTRUCTION_LIST(V) \ |
168 V(AccessArgumentsAt) \ | 169 V(AccessArgumentsAt) \ |
169 V(Add) \ | 170 V(Add) \ |
170 V(ApplyArguments) \ | 171 V(ApplyArguments) \ |
171 V(ArgumentsElements) \ | 172 V(ArgumentsElements) \ |
172 V(ArgumentsLength) \ | 173 V(ArgumentsLength) \ |
173 V(ArgumentsObject) \ | 174 V(ArgumentsObject) \ |
174 V(ArrayLength) \ | |
175 V(ArrayLiteral) \ | 175 V(ArrayLiteral) \ |
176 V(BitAnd) \ | 176 V(BitAnd) \ |
177 V(BitNot) \ | 177 V(BitNot) \ |
178 V(BitOr) \ | 178 V(BitOr) \ |
179 V(BitXor) \ | 179 V(BitXor) \ |
180 V(BlockEntry) \ | 180 V(BlockEntry) \ |
181 V(BoundsCheck) \ | 181 V(BoundsCheck) \ |
182 V(Branch) \ | 182 V(Branch) \ |
183 V(CallConstantFunction) \ | 183 V(CallConstantFunction) \ |
184 V(CallFunction) \ | 184 V(CallFunction) \ |
(...skipping 12 matching lines...) Expand all Loading... |
197 V(CheckPrototypeMaps) \ | 197 V(CheckPrototypeMaps) \ |
198 V(CheckSmi) \ | 198 V(CheckSmi) \ |
199 V(Compare) \ | 199 V(Compare) \ |
200 V(CompareJSObjectEq) \ | 200 V(CompareJSObjectEq) \ |
201 V(CompareMapAndBranch) \ | 201 V(CompareMapAndBranch) \ |
202 V(Constant) \ | 202 V(Constant) \ |
203 V(DeleteProperty) \ | 203 V(DeleteProperty) \ |
204 V(Deoptimize) \ | 204 V(Deoptimize) \ |
205 V(Div) \ | 205 V(Div) \ |
206 V(EnterInlined) \ | 206 V(EnterInlined) \ |
| 207 V(FixedArrayLength) \ |
207 V(FunctionLiteral) \ | 208 V(FunctionLiteral) \ |
208 V(GlobalObject) \ | 209 V(GlobalObject) \ |
209 V(GlobalReceiver) \ | 210 V(GlobalReceiver) \ |
210 V(Goto) \ | 211 V(Goto) \ |
211 V(InstanceOf) \ | 212 V(InstanceOf) \ |
212 V(IsNull) \ | 213 V(IsNull) \ |
213 V(IsObject) \ | 214 V(IsObject) \ |
214 V(IsSmi) \ | 215 V(IsSmi) \ |
215 V(HasInstanceType) \ | 216 V(HasInstanceType) \ |
216 V(HasCachedArrayIndex) \ | 217 V(HasCachedArrayIndex) \ |
| 218 V(JSArrayLength) \ |
217 V(ClassOfTest) \ | 219 V(ClassOfTest) \ |
218 V(LeaveInlined) \ | 220 V(LeaveInlined) \ |
219 V(LoadElements) \ | 221 V(LoadElements) \ |
220 V(LoadGlobal) \ | 222 V(LoadGlobal) \ |
221 V(LoadKeyedFastElement) \ | 223 V(LoadKeyedFastElement) \ |
222 V(LoadKeyedGeneric) \ | 224 V(LoadKeyedGeneric) \ |
223 V(LoadNamedField) \ | 225 V(LoadNamedField) \ |
224 V(LoadNamedGeneric) \ | 226 V(LoadNamedGeneric) \ |
225 V(LoadFunctionPrototype) \ | 227 V(LoadFunctionPrototype) \ |
226 V(Mod) \ | 228 V(Mod) \ |
(...skipping 1105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1332 Handle<String> name() const { return name_; } | 1334 Handle<String> name() const { return name_; } |
1333 | 1335 |
1334 DECLARE_CONCRETE_INSTRUCTION(CallRuntime, "call_runtime") | 1336 DECLARE_CONCRETE_INSTRUCTION(CallRuntime, "call_runtime") |
1335 | 1337 |
1336 private: | 1338 private: |
1337 Runtime::Function* c_function_; | 1339 Runtime::Function* c_function_; |
1338 Handle<String> name_; | 1340 Handle<String> name_; |
1339 }; | 1341 }; |
1340 | 1342 |
1341 | 1343 |
1342 class HArrayLength: public HUnaryOperation { | 1344 class HJSArrayLength: public HUnaryOperation { |
1343 public: | 1345 public: |
1344 explicit HArrayLength(HValue* value) : HUnaryOperation(value) { | 1346 explicit HJSArrayLength(HValue* value) : HUnaryOperation(value) { |
1345 // The length of an array is stored as a tagged value in the array | 1347 // The length of an array is stored as a tagged value in the array |
1346 // object. It is guaranteed to be 32 bit integer, but it can be | 1348 // object. It is guaranteed to be 32 bit integer, but it can be |
1347 // represented as either a smi or heap number. | 1349 // represented as either a smi or heap number. |
1348 set_representation(Representation::Tagged()); | 1350 set_representation(Representation::Tagged()); |
1349 SetFlag(kDependsOnArrayLengths); | 1351 SetFlag(kDependsOnArrayLengths); |
1350 SetFlag(kUseGVN); | 1352 SetFlag(kUseGVN); |
1351 } | 1353 } |
1352 | 1354 |
1353 virtual Representation RequiredInputRepresentation(int index) const { | 1355 virtual Representation RequiredInputRepresentation(int index) const { |
1354 return Representation::Tagged(); | 1356 return Representation::Tagged(); |
1355 } | 1357 } |
1356 | 1358 |
1357 DECLARE_CONCRETE_INSTRUCTION(ArrayLength, "array_length") | 1359 DECLARE_CONCRETE_INSTRUCTION(JSArrayLength, "js_array_length") |
| 1360 }; |
| 1361 |
| 1362 |
| 1363 class HFixedArrayLength: public HUnaryOperation { |
| 1364 public: |
| 1365 explicit HFixedArrayLength(HValue* value) : HUnaryOperation(value) { |
| 1366 set_representation(Representation::Tagged()); |
| 1367 SetFlag(kDependsOnArrayLengths); |
| 1368 SetFlag(kUseGVN); |
| 1369 } |
| 1370 |
| 1371 virtual Representation RequiredInputRepresentation(int index) const { |
| 1372 return Representation::Tagged(); |
| 1373 } |
| 1374 |
| 1375 DECLARE_CONCRETE_INSTRUCTION(FixedArrayLength, "fixed_array_length") |
1358 }; | 1376 }; |
1359 | 1377 |
1360 | 1378 |
1361 class HBitNot: public HUnaryOperation { | 1379 class HBitNot: public HUnaryOperation { |
1362 public: | 1380 public: |
1363 explicit HBitNot(HValue* value) : HUnaryOperation(value) { | 1381 explicit HBitNot(HValue* value) : HUnaryOperation(value) { |
1364 set_representation(Representation::Integer32()); | 1382 set_representation(Representation::Integer32()); |
1365 SetFlag(kUseGVN); | 1383 SetFlag(kUseGVN); |
1366 SetFlag(kTruncatingToInt32); | 1384 SetFlag(kTruncatingToInt32); |
1367 } | 1385 } |
(...skipping 1612 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2980 HValue* object() const { return left(); } | 2998 HValue* object() const { return left(); } |
2981 HValue* key() const { return right(); } | 2999 HValue* key() const { return right(); } |
2982 }; | 3000 }; |
2983 | 3001 |
2984 #undef DECLARE_INSTRUCTION | 3002 #undef DECLARE_INSTRUCTION |
2985 #undef DECLARE_CONCRETE_INSTRUCTION | 3003 #undef DECLARE_CONCRETE_INSTRUCTION |
2986 | 3004 |
2987 } } // namespace v8::internal | 3005 } } // namespace v8::internal |
2988 | 3006 |
2989 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ | 3007 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ |
OLD | NEW |