| OLD | NEW |
| 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 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 V(CallNew) \ | 89 V(CallNew) \ |
| 90 V(CallRuntime) \ | 90 V(CallRuntime) \ |
| 91 V(CallStub) \ | 91 V(CallStub) \ |
| 92 V(Change) \ | 92 V(Change) \ |
| 93 V(CheckFunction) \ | 93 V(CheckFunction) \ |
| 94 V(CheckInstanceType) \ | 94 V(CheckInstanceType) \ |
| 95 V(CheckMap) \ | 95 V(CheckMap) \ |
| 96 V(CheckNonSmi) \ | 96 V(CheckNonSmi) \ |
| 97 V(CheckPrototypeMaps) \ | 97 V(CheckPrototypeMaps) \ |
| 98 V(CheckSmi) \ | 98 V(CheckSmi) \ |
| 99 V(ClassOfTest) \ |
| 99 V(Compare) \ | 100 V(Compare) \ |
| 100 V(CompareJSObjectEq) \ | 101 V(CompareJSObjectEq) \ |
| 101 V(CompareMap) \ | 102 V(CompareMap) \ |
| 102 V(Constant) \ | 103 V(Constant) \ |
| 103 V(Context) \ | 104 V(Context) \ |
| 104 V(DeleteProperty) \ | 105 V(DeleteProperty) \ |
| 105 V(Deoptimize) \ | 106 V(Deoptimize) \ |
| 106 V(Div) \ | 107 V(Div) \ |
| 107 V(EnterInlined) \ | 108 V(EnterInlined) \ |
| 109 V(ExternalArrayLength) \ |
| 108 V(FixedArrayLength) \ | 110 V(FixedArrayLength) \ |
| 109 V(FunctionLiteral) \ | 111 V(FunctionLiteral) \ |
| 110 V(GetCachedArrayIndex) \ | 112 V(GetCachedArrayIndex) \ |
| 111 V(GlobalObject) \ | 113 V(GlobalObject) \ |
| 112 V(GlobalReceiver) \ | 114 V(GlobalReceiver) \ |
| 113 V(Goto) \ | 115 V(Goto) \ |
| 116 V(HasInstanceType) \ |
| 117 V(HasCachedArrayIndex) \ |
| 114 V(InstanceOf) \ | 118 V(InstanceOf) \ |
| 115 V(InstanceOfKnownGlobal) \ | 119 V(InstanceOfKnownGlobal) \ |
| 116 V(IsNull) \ | 120 V(IsNull) \ |
| 117 V(IsObject) \ | 121 V(IsObject) \ |
| 118 V(IsSmi) \ | 122 V(IsSmi) \ |
| 119 V(IsConstructCall) \ | 123 V(IsConstructCall) \ |
| 120 V(HasInstanceType) \ | |
| 121 V(HasCachedArrayIndex) \ | |
| 122 V(JSArrayLength) \ | 124 V(JSArrayLength) \ |
| 123 V(ClassOfTest) \ | |
| 124 V(LeaveInlined) \ | 125 V(LeaveInlined) \ |
| 125 V(LoadContextSlot) \ | 126 V(LoadContextSlot) \ |
| 126 V(LoadElements) \ | 127 V(LoadElements) \ |
| 128 V(LoadExternalArrayPointer) \ |
| 127 V(LoadFunctionPrototype) \ | 129 V(LoadFunctionPrototype) \ |
| 128 V(LoadGlobal) \ | 130 V(LoadGlobal) \ |
| 129 V(LoadKeyedFastElement) \ | 131 V(LoadKeyedFastElement) \ |
| 130 V(LoadKeyedGeneric) \ | 132 V(LoadKeyedGeneric) \ |
| 131 V(LoadNamedField) \ | 133 V(LoadNamedField) \ |
| 132 V(LoadNamedGeneric) \ | 134 V(LoadNamedGeneric) \ |
| 133 V(LoadPixelArrayElement) \ | 135 V(LoadPixelArrayElement) \ |
| 134 V(LoadPixelArrayExternalPointer) \ | |
| 135 V(Mod) \ | 136 V(Mod) \ |
| 136 V(Mul) \ | 137 V(Mul) \ |
| 137 V(ObjectLiteral) \ | 138 V(ObjectLiteral) \ |
| 138 V(OsrEntry) \ | 139 V(OsrEntry) \ |
| 139 V(OuterContext) \ | 140 V(OuterContext) \ |
| 140 V(Parameter) \ | 141 V(Parameter) \ |
| 141 V(PixelArrayLength) \ | |
| 142 V(Power) \ | 142 V(Power) \ |
| 143 V(PushArgument) \ | 143 V(PushArgument) \ |
| 144 V(RegExpLiteral) \ | 144 V(RegExpLiteral) \ |
| 145 V(Return) \ | 145 V(Return) \ |
| 146 V(Sar) \ | 146 V(Sar) \ |
| 147 V(Shl) \ | 147 V(Shl) \ |
| 148 V(Shr) \ | 148 V(Shr) \ |
| 149 V(Simulate) \ | 149 V(Simulate) \ |
| 150 V(StackCheck) \ | 150 V(StackCheck) \ |
| 151 V(StoreContextSlot) \ | 151 V(StoreContextSlot) \ |
| (...skipping 1216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1368 return Representation::Tagged(); | 1368 return Representation::Tagged(); |
| 1369 } | 1369 } |
| 1370 | 1370 |
| 1371 DECLARE_CONCRETE_INSTRUCTION(FixedArrayLength, "fixed_array_length") | 1371 DECLARE_CONCRETE_INSTRUCTION(FixedArrayLength, "fixed_array_length") |
| 1372 | 1372 |
| 1373 protected: | 1373 protected: |
| 1374 virtual bool DataEquals(HValue* other) const { return true; } | 1374 virtual bool DataEquals(HValue* other) const { return true; } |
| 1375 }; | 1375 }; |
| 1376 | 1376 |
| 1377 | 1377 |
| 1378 class HPixelArrayLength: public HUnaryOperation { | 1378 class HExternalArrayLength: public HUnaryOperation { |
| 1379 public: | 1379 public: |
| 1380 explicit HPixelArrayLength(HValue* value) : HUnaryOperation(value) { | 1380 explicit HExternalArrayLength(HValue* value) : HUnaryOperation(value) { |
| 1381 set_representation(Representation::Integer32()); | 1381 set_representation(Representation::Integer32()); |
| 1382 // The result of this instruction is idempotent as long as its inputs don't | 1382 // The result of this instruction is idempotent as long as its inputs don't |
| 1383 // change. The length of a pixel array cannot change once set, so it's not | 1383 // change. The length of a pixel array cannot change once set, so it's not |
| 1384 // necessary to introduce a kDependsOnArrayLengths or any other dependency. | 1384 // necessary to introduce a kDependsOnArrayLengths or any other dependency. |
| 1385 SetFlag(kUseGVN); | 1385 SetFlag(kUseGVN); |
| 1386 } | 1386 } |
| 1387 | 1387 |
| 1388 virtual Representation RequiredInputRepresentation(int index) const { | 1388 virtual Representation RequiredInputRepresentation(int index) const { |
| 1389 return Representation::Tagged(); | 1389 return Representation::Tagged(); |
| 1390 } | 1390 } |
| 1391 | 1391 |
| 1392 DECLARE_CONCRETE_INSTRUCTION(PixelArrayLength, "pixel_array_length") | 1392 DECLARE_CONCRETE_INSTRUCTION(ExternalArrayLength, "external_array_length") |
| 1393 | 1393 |
| 1394 protected: | 1394 protected: |
| 1395 virtual bool DataEquals(HValue* other) const { return true; } | 1395 virtual bool DataEquals(HValue* other) const { return true; } |
| 1396 }; | 1396 }; |
| 1397 | 1397 |
| 1398 | 1398 |
| 1399 class HBitNot: public HUnaryOperation { | 1399 class HBitNot: public HUnaryOperation { |
| 1400 public: | 1400 public: |
| 1401 explicit HBitNot(HValue* value) : HUnaryOperation(value) { | 1401 explicit HBitNot(HValue* value) : HUnaryOperation(value) { |
| 1402 set_representation(Representation::Integer32()); | 1402 set_representation(Representation::Integer32()); |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1507 return Representation::Tagged(); | 1507 return Representation::Tagged(); |
| 1508 } | 1508 } |
| 1509 | 1509 |
| 1510 DECLARE_CONCRETE_INSTRUCTION(LoadElements, "load-elements") | 1510 DECLARE_CONCRETE_INSTRUCTION(LoadElements, "load-elements") |
| 1511 | 1511 |
| 1512 protected: | 1512 protected: |
| 1513 virtual bool DataEquals(HValue* other) const { return true; } | 1513 virtual bool DataEquals(HValue* other) const { return true; } |
| 1514 }; | 1514 }; |
| 1515 | 1515 |
| 1516 | 1516 |
| 1517 class HLoadPixelArrayExternalPointer: public HUnaryOperation { | 1517 class HLoadExternalArrayPointer: public HUnaryOperation { |
| 1518 public: | 1518 public: |
| 1519 explicit HLoadPixelArrayExternalPointer(HValue* value) | 1519 explicit HLoadExternalArrayPointer(HValue* value) |
| 1520 : HUnaryOperation(value) { | 1520 : HUnaryOperation(value) { |
| 1521 set_representation(Representation::External()); | 1521 set_representation(Representation::External()); |
| 1522 // The result of this instruction is idempotent as long as its inputs don't | 1522 // The result of this instruction is idempotent as long as its inputs don't |
| 1523 // change. The external array of a pixel array elements object cannot | 1523 // change. The external array of a pixel array elements object cannot |
| 1524 // change once set, so it's no necessary to introduce any additional | 1524 // change once set, so it's no necessary to introduce any additional |
| 1525 // dependencies on top of the inputs. | 1525 // dependencies on top of the inputs. |
| 1526 SetFlag(kUseGVN); | 1526 SetFlag(kUseGVN); |
| 1527 } | 1527 } |
| 1528 | 1528 |
| 1529 virtual Representation RequiredInputRepresentation(int index) const { | 1529 virtual Representation RequiredInputRepresentation(int index) const { |
| 1530 return Representation::Tagged(); | 1530 return Representation::Tagged(); |
| 1531 } | 1531 } |
| 1532 | 1532 |
| 1533 DECLARE_CONCRETE_INSTRUCTION(LoadPixelArrayExternalPointer, | 1533 DECLARE_CONCRETE_INSTRUCTION(LoadExternalArrayPointer, |
| 1534 "load-pixel-array-external-pointer") | 1534 "load-external-array-pointer") |
| 1535 | 1535 |
| 1536 protected: | 1536 protected: |
| 1537 virtual bool DataEquals(HValue* other) const { return true; } | 1537 virtual bool DataEquals(HValue* other) const { return true; } |
| 1538 }; | 1538 }; |
| 1539 | 1539 |
| 1540 | 1540 |
| 1541 class HCheckMap: public HUnaryOperation { | 1541 class HCheckMap: public HUnaryOperation { |
| 1542 public: | 1542 public: |
| 1543 HCheckMap(HValue* value, Handle<Map> map) | 1543 HCheckMap(HValue* value, Handle<Map> map) |
| 1544 : HUnaryOperation(value), map_(map) { | 1544 : HUnaryOperation(value), map_(map) { |
| (...skipping 1919 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3464 HValue* object() const { return left(); } | 3464 HValue* object() const { return left(); } |
| 3465 HValue* key() const { return right(); } | 3465 HValue* key() const { return right(); } |
| 3466 }; | 3466 }; |
| 3467 | 3467 |
| 3468 #undef DECLARE_INSTRUCTION | 3468 #undef DECLARE_INSTRUCTION |
| 3469 #undef DECLARE_CONCRETE_INSTRUCTION | 3469 #undef DECLARE_CONCRETE_INSTRUCTION |
| 3470 | 3470 |
| 3471 } } // namespace v8::internal | 3471 } } // namespace v8::internal |
| 3472 | 3472 |
| 3473 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ | 3473 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ |
| OLD | NEW |