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) \ | |
89 V(DebugBreak) \ | 88 V(DebugBreak) \ |
90 V(DeclareGlobals) \ | 89 V(DeclareGlobals) \ |
91 V(Deoptimize) \ | 90 V(Deoptimize) \ |
92 V(Div) \ | 91 V(Div) \ |
93 V(DoubleBits) \ | 92 V(DoubleBits) \ |
94 V(DummyUse) \ | 93 V(DummyUse) \ |
95 V(EnterInlined) \ | 94 V(EnterInlined) \ |
96 V(EnvironmentMarker) \ | 95 V(EnvironmentMarker) \ |
97 V(ForceRepresentation) \ | 96 V(ForceRepresentation) \ |
98 V(ForInCacheArray) \ | 97 V(ForInCacheArray) \ |
(...skipping 7426 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7525 #ifdef DEBUG | 7524 #ifdef DEBUG |
7526 const Runtime::Function* function = HCallRuntime::cast(value)->function(); | 7525 const Runtime::Function* function = HCallRuntime::cast(value)->function(); |
7527 DCHECK(function->function_id == Runtime::kCreateObjectLiteral); | 7526 DCHECK(function->function_id == Runtime::kCreateObjectLiteral); |
7528 #endif | 7527 #endif |
7529 } | 7528 } |
7530 | 7529 |
7531 bool IsDeletable() const override { return true; } | 7530 bool IsDeletable() const override { return true; } |
7532 }; | 7531 }; |
7533 | 7532 |
7534 | 7533 |
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 | |
7557 class HSeqStringGetChar final : public HTemplateInstruction<2> { | 7534 class HSeqStringGetChar final : public HTemplateInstruction<2> { |
7558 public: | 7535 public: |
7559 static HInstruction* New(Isolate* isolate, Zone* zone, HValue* context, | 7536 static HInstruction* New(Isolate* isolate, Zone* zone, HValue* context, |
7560 String::Encoding encoding, HValue* string, | 7537 String::Encoding encoding, HValue* string, |
7561 HValue* index); | 7538 HValue* index); |
7562 | 7539 |
7563 Representation RequiredInputRepresentation(int index) override { | 7540 Representation RequiredInputRepresentation(int index) override { |
7564 return (index == 0) ? Representation::Tagged() | 7541 return (index == 0) ? Representation::Tagged() |
7565 : Representation::Integer32(); | 7542 : Representation::Integer32(); |
7566 } | 7543 } |
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7832 | 7809 |
7833 | 7810 |
7834 | 7811 |
7835 #undef DECLARE_INSTRUCTION | 7812 #undef DECLARE_INSTRUCTION |
7836 #undef DECLARE_CONCRETE_INSTRUCTION | 7813 #undef DECLARE_CONCRETE_INSTRUCTION |
7837 | 7814 |
7838 } // namespace internal | 7815 } // namespace internal |
7839 } // namespace v8 | 7816 } // namespace v8 |
7840 | 7817 |
7841 #endif // V8_CRANKSHAFT_HYDROGEN_INSTRUCTIONS_H_ | 7818 #endif // V8_CRANKSHAFT_HYDROGEN_INSTRUCTIONS_H_ |
OLD | NEW |