OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 V(CompareObjectEqAndBranch) \ | 102 V(CompareObjectEqAndBranch) \ |
103 V(CompareMap) \ | 103 V(CompareMap) \ |
104 V(Constant) \ | 104 V(Constant) \ |
105 V(Context) \ | 105 V(Context) \ |
106 V(DateField) \ | 106 V(DateField) \ |
107 V(DebugBreak) \ | 107 V(DebugBreak) \ |
108 V(DeclareGlobals) \ | 108 V(DeclareGlobals) \ |
109 V(Deoptimize) \ | 109 V(Deoptimize) \ |
110 V(Div) \ | 110 V(Div) \ |
111 V(DummyUse) \ | 111 V(DummyUse) \ |
112 V(ElementsKind) \ | |
113 V(EnterInlined) \ | 112 V(EnterInlined) \ |
114 V(EnvironmentMarker) \ | 113 V(EnvironmentMarker) \ |
115 V(ForceRepresentation) \ | 114 V(ForceRepresentation) \ |
116 V(ForInCacheArray) \ | 115 V(ForInCacheArray) \ |
117 V(ForInPrepareMap) \ | 116 V(ForInPrepareMap) \ |
118 V(FunctionLiteral) \ | 117 V(FunctionLiteral) \ |
119 V(GetCachedArrayIndex) \ | 118 V(GetCachedArrayIndex) \ |
120 V(Goto) \ | 119 V(Goto) \ |
121 V(HasCachedArrayIndexAndBranch) \ | 120 V(HasCachedArrayIndexAndBranch) \ |
122 V(HasInstanceTypeAndBranch) \ | 121 V(HasInstanceTypeAndBranch) \ |
(...skipping 2409 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2532 : HUnaryOperation(value, HType::Smi()) { | 2531 : HUnaryOperation(value, HType::Smi()) { |
2533 set_representation(Representation::Smi()); | 2532 set_representation(Representation::Smi()); |
2534 SetFlag(kUseGVN); | 2533 SetFlag(kUseGVN); |
2535 SetGVNFlag(kDependsOnMaps); | 2534 SetGVNFlag(kDependsOnMaps); |
2536 } | 2535 } |
2537 | 2536 |
2538 virtual bool IsDeletable() const V8_OVERRIDE { return true; } | 2537 virtual bool IsDeletable() const V8_OVERRIDE { return true; } |
2539 }; | 2538 }; |
2540 | 2539 |
2541 | 2540 |
2542 class HElementsKind V8_FINAL : public HUnaryOperation { | |
2543 public: | |
2544 explicit HElementsKind(HValue* value) : HUnaryOperation(value) { | |
2545 set_representation(Representation::Integer32()); | |
2546 SetFlag(kUseGVN); | |
2547 SetGVNFlag(kDependsOnElementsKind); | |
2548 } | |
2549 | |
2550 virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { | |
2551 return Representation::Tagged(); | |
2552 } | |
2553 | |
2554 DECLARE_CONCRETE_INSTRUCTION(ElementsKind) | |
2555 | |
2556 protected: | |
2557 virtual bool DataEquals(HValue* other) V8_OVERRIDE { return true; } | |
2558 | |
2559 private: | |
2560 virtual bool IsDeletable() const V8_OVERRIDE { return true; } | |
2561 }; | |
2562 | |
2563 | |
2564 class HUnaryMathOperation V8_FINAL : public HTemplateInstruction<2> { | 2541 class HUnaryMathOperation V8_FINAL : public HTemplateInstruction<2> { |
2565 public: | 2542 public: |
2566 static HInstruction* New(Zone* zone, | 2543 static HInstruction* New(Zone* zone, |
2567 HValue* context, | 2544 HValue* context, |
2568 HValue* value, | 2545 HValue* value, |
2569 BuiltinFunctionId op); | 2546 BuiltinFunctionId op); |
2570 | 2547 |
2571 HValue* context() { return OperandAt(0); } | 2548 HValue* context() { return OperandAt(0); } |
2572 HValue* value() { return OperandAt(1); } | 2549 HValue* value() { return OperandAt(1); } |
2573 | 2550 |
(...skipping 4898 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7472 virtual bool IsDeletable() const V8_OVERRIDE { return true; } | 7449 virtual bool IsDeletable() const V8_OVERRIDE { return true; } |
7473 }; | 7450 }; |
7474 | 7451 |
7475 | 7452 |
7476 #undef DECLARE_INSTRUCTION | 7453 #undef DECLARE_INSTRUCTION |
7477 #undef DECLARE_CONCRETE_INSTRUCTION | 7454 #undef DECLARE_CONCRETE_INSTRUCTION |
7478 | 7455 |
7479 } } // namespace v8::internal | 7456 } } // namespace v8::internal |
7480 | 7457 |
7481 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ | 7458 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ |
OLD | NEW |