OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef V8_CRANKSHAFT_HYDROGEN_INSTRUCTIONS_H_ | 5 #ifndef V8_CRANKSHAFT_HYDROGEN_INSTRUCTIONS_H_ |
6 #define V8_CRANKSHAFT_HYDROGEN_INSTRUCTIONS_H_ | 6 #define V8_CRANKSHAFT_HYDROGEN_INSTRUCTIONS_H_ |
7 | 7 |
8 #include <cstring> | 8 #include <cstring> |
9 #include <iosfwd> | 9 #include <iosfwd> |
10 | 10 |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 V(ClassOfTestAndBranch) \ | 78 V(ClassOfTestAndBranch) \ |
79 V(CompareNumericAndBranch) \ | 79 V(CompareNumericAndBranch) \ |
80 V(CompareHoleAndBranch) \ | 80 V(CompareHoleAndBranch) \ |
81 V(CompareGeneric) \ | 81 V(CompareGeneric) \ |
82 V(CompareMinusZeroAndBranch) \ | 82 V(CompareMinusZeroAndBranch) \ |
83 V(CompareObjectEqAndBranch) \ | 83 V(CompareObjectEqAndBranch) \ |
84 V(CompareMap) \ | 84 V(CompareMap) \ |
85 V(Constant) \ | 85 V(Constant) \ |
86 V(ConstructDouble) \ | 86 V(ConstructDouble) \ |
87 V(Context) \ | 87 V(Context) \ |
| 88 V(DateField) \ |
88 V(DebugBreak) \ | 89 V(DebugBreak) \ |
89 V(DeclareGlobals) \ | 90 V(DeclareGlobals) \ |
90 V(Deoptimize) \ | 91 V(Deoptimize) \ |
91 V(Div) \ | 92 V(Div) \ |
92 V(DoubleBits) \ | 93 V(DoubleBits) \ |
93 V(DummyUse) \ | 94 V(DummyUse) \ |
94 V(EnterInlined) \ | 95 V(EnterInlined) \ |
95 V(EnvironmentMarker) \ | 96 V(EnvironmentMarker) \ |
96 V(ForceRepresentation) \ | 97 V(ForceRepresentation) \ |
97 V(ForInCacheArray) \ | 98 V(ForInCacheArray) \ |
(...skipping 7426 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7524 #ifdef DEBUG | 7525 #ifdef DEBUG |
7525 const Runtime::Function* function = HCallRuntime::cast(value)->function(); | 7526 const Runtime::Function* function = HCallRuntime::cast(value)->function(); |
7526 DCHECK(function->function_id == Runtime::kCreateObjectLiteral); | 7527 DCHECK(function->function_id == Runtime::kCreateObjectLiteral); |
7527 #endif | 7528 #endif |
7528 } | 7529 } |
7529 | 7530 |
7530 bool IsDeletable() const override { return true; } | 7531 bool IsDeletable() const override { return true; } |
7531 }; | 7532 }; |
7532 | 7533 |
7533 | 7534 |
| 7535 class HDateField final : public HUnaryOperation { |
| 7536 public: |
| 7537 DECLARE_INSTRUCTION_FACTORY_P2(HDateField, HValue*, Smi*); |
| 7538 |
| 7539 Smi* index() const { return index_; } |
| 7540 |
| 7541 Representation RequiredInputRepresentation(int index) override { |
| 7542 return Representation::Tagged(); |
| 7543 } |
| 7544 |
| 7545 DECLARE_CONCRETE_INSTRUCTION(DateField) |
| 7546 |
| 7547 private: |
| 7548 HDateField(HValue* date, Smi* index) |
| 7549 : HUnaryOperation(date), index_(index) { |
| 7550 set_representation(Representation::Tagged()); |
| 7551 } |
| 7552 |
| 7553 Smi* index_; |
| 7554 }; |
| 7555 |
| 7556 |
7534 class HSeqStringGetChar final : public HTemplateInstruction<2> { | 7557 class HSeqStringGetChar final : public HTemplateInstruction<2> { |
7535 public: | 7558 public: |
7536 static HInstruction* New(Isolate* isolate, Zone* zone, HValue* context, | 7559 static HInstruction* New(Isolate* isolate, Zone* zone, HValue* context, |
7537 String::Encoding encoding, HValue* string, | 7560 String::Encoding encoding, HValue* string, |
7538 HValue* index); | 7561 HValue* index); |
7539 | 7562 |
7540 Representation RequiredInputRepresentation(int index) override { | 7563 Representation RequiredInputRepresentation(int index) override { |
7541 return (index == 0) ? Representation::Tagged() | 7564 return (index == 0) ? Representation::Tagged() |
7542 : Representation::Integer32(); | 7565 : Representation::Integer32(); |
7543 } | 7566 } |
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7809 | 7832 |
7810 | 7833 |
7811 | 7834 |
7812 #undef DECLARE_INSTRUCTION | 7835 #undef DECLARE_INSTRUCTION |
7813 #undef DECLARE_CONCRETE_INSTRUCTION | 7836 #undef DECLARE_CONCRETE_INSTRUCTION |
7814 | 7837 |
7815 } // namespace internal | 7838 } // namespace internal |
7816 } // namespace v8 | 7839 } // namespace v8 |
7817 | 7840 |
7818 #endif // V8_CRANKSHAFT_HYDROGEN_INSTRUCTIONS_H_ | 7841 #endif // V8_CRANKSHAFT_HYDROGEN_INSTRUCTIONS_H_ |
OLD | NEW |