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_ARM_LITHIUM_ARM_H_ | 5 #ifndef V8_CRANKSHAFT_ARM_LITHIUM_ARM_H_ |
6 #define V8_CRANKSHAFT_ARM_LITHIUM_ARM_H_ | 6 #define V8_CRANKSHAFT_ARM_LITHIUM_ARM_H_ |
7 | 7 |
8 #include "src/crankshaft/hydrogen.h" | 8 #include "src/crankshaft/hydrogen.h" |
9 #include "src/crankshaft/lithium.h" | 9 #include "src/crankshaft/lithium.h" |
10 #include "src/crankshaft/lithium-allocator.h" | 10 #include "src/crankshaft/lithium-allocator.h" |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 V(Deoptimize) \ | 60 V(Deoptimize) \ |
61 V(DivByConstI) \ | 61 V(DivByConstI) \ |
62 V(DivByPowerOf2I) \ | 62 V(DivByPowerOf2I) \ |
63 V(DivI) \ | 63 V(DivI) \ |
64 V(DoubleBits) \ | 64 V(DoubleBits) \ |
65 V(DoubleToI) \ | 65 V(DoubleToI) \ |
66 V(DoubleToSmi) \ | 66 V(DoubleToSmi) \ |
67 V(Drop) \ | 67 V(Drop) \ |
68 V(Dummy) \ | 68 V(Dummy) \ |
69 V(DummyUse) \ | 69 V(DummyUse) \ |
| 70 V(FastAllocate) \ |
70 V(FlooringDivByConstI) \ | 71 V(FlooringDivByConstI) \ |
71 V(FlooringDivByPowerOf2I) \ | 72 V(FlooringDivByPowerOf2I) \ |
72 V(FlooringDivI) \ | 73 V(FlooringDivI) \ |
73 V(ForInCacheArray) \ | 74 V(ForInCacheArray) \ |
74 V(ForInPrepareMap) \ | 75 V(ForInPrepareMap) \ |
75 V(GetCachedArrayIndex) \ | 76 V(GetCachedArrayIndex) \ |
76 V(Goto) \ | 77 V(Goto) \ |
77 V(HasCachedArrayIndexAndBranch) \ | 78 V(HasCachedArrayIndexAndBranch) \ |
78 V(HasInPrototypeChainAndBranch) \ | 79 V(HasInPrototypeChainAndBranch) \ |
79 V(HasInstanceTypeAndBranch) \ | 80 V(HasInstanceTypeAndBranch) \ |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
144 V(TaggedToI) \ | 145 V(TaggedToI) \ |
145 V(ThisFunction) \ | 146 V(ThisFunction) \ |
146 V(TransitionElementsKind) \ | 147 V(TransitionElementsKind) \ |
147 V(TrapAllocationMemento) \ | 148 V(TrapAllocationMemento) \ |
148 V(Typeof) \ | 149 V(Typeof) \ |
149 V(TypeofIsAndBranch) \ | 150 V(TypeofIsAndBranch) \ |
150 V(Uint32ToDouble) \ | 151 V(Uint32ToDouble) \ |
151 V(UnknownOSRValue) \ | 152 V(UnknownOSRValue) \ |
152 V(WrapReceiver) | 153 V(WrapReceiver) |
153 | 154 |
154 | |
155 #define DECLARE_CONCRETE_INSTRUCTION(type, mnemonic) \ | 155 #define DECLARE_CONCRETE_INSTRUCTION(type, mnemonic) \ |
156 Opcode opcode() const final { return LInstruction::k##type; } \ | 156 Opcode opcode() const final { return LInstruction::k##type; } \ |
157 void CompileToNative(LCodeGen* generator) final; \ | 157 void CompileToNative(LCodeGen* generator) final; \ |
158 const char* Mnemonic() const final { return mnemonic; } \ | 158 const char* Mnemonic() const final { return mnemonic; } \ |
159 static L##type* cast(LInstruction* instr) { \ | 159 static L##type* cast(LInstruction* instr) { \ |
160 DCHECK(instr->Is##type()); \ | 160 DCHECK(instr->Is##type()); \ |
161 return reinterpret_cast<L##type*>(instr); \ | 161 return reinterpret_cast<L##type*>(instr); \ |
162 } | 162 } |
163 | 163 |
164 | 164 |
(...skipping 2219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2384 | 2384 |
2385 LOperand* context() { return inputs_[0]; } | 2385 LOperand* context() { return inputs_[0]; } |
2386 LOperand* size() { return inputs_[1]; } | 2386 LOperand* size() { return inputs_[1]; } |
2387 LOperand* temp1() { return temps_[0]; } | 2387 LOperand* temp1() { return temps_[0]; } |
2388 LOperand* temp2() { return temps_[1]; } | 2388 LOperand* temp2() { return temps_[1]; } |
2389 | 2389 |
2390 DECLARE_CONCRETE_INSTRUCTION(Allocate, "allocate") | 2390 DECLARE_CONCRETE_INSTRUCTION(Allocate, "allocate") |
2391 DECLARE_HYDROGEN_ACCESSOR(Allocate) | 2391 DECLARE_HYDROGEN_ACCESSOR(Allocate) |
2392 }; | 2392 }; |
2393 | 2393 |
| 2394 class LFastAllocate final : public LTemplateInstruction<1, 1, 2> { |
| 2395 public: |
| 2396 LFastAllocate(LOperand* size, LOperand* temp1, LOperand* temp2) { |
| 2397 inputs_[0] = size; |
| 2398 temps_[0] = temp1; |
| 2399 temps_[1] = temp2; |
| 2400 } |
| 2401 |
| 2402 LOperand* size() { return inputs_[0]; } |
| 2403 LOperand* temp1() { return temps_[0]; } |
| 2404 LOperand* temp2() { return temps_[1]; } |
| 2405 |
| 2406 DECLARE_CONCRETE_INSTRUCTION(FastAllocate, "fast-allocate") |
| 2407 DECLARE_HYDROGEN_ACCESSOR(Allocate) |
| 2408 }; |
2394 | 2409 |
2395 class LTypeof final : public LTemplateInstruction<1, 2, 0> { | 2410 class LTypeof final : public LTemplateInstruction<1, 2, 0> { |
2396 public: | 2411 public: |
2397 LTypeof(LOperand* context, LOperand* value) { | 2412 LTypeof(LOperand* context, LOperand* value) { |
2398 inputs_[0] = context; | 2413 inputs_[0] = context; |
2399 inputs_[1] = value; | 2414 inputs_[1] = value; |
2400 } | 2415 } |
2401 | 2416 |
2402 LOperand* context() { return inputs_[0]; } | 2417 LOperand* context() { return inputs_[0]; } |
2403 LOperand* value() { return inputs_[1]; } | 2418 LOperand* value() { return inputs_[1]; } |
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2654 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); | 2669 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); |
2655 }; | 2670 }; |
2656 | 2671 |
2657 #undef DECLARE_HYDROGEN_ACCESSOR | 2672 #undef DECLARE_HYDROGEN_ACCESSOR |
2658 #undef DECLARE_CONCRETE_INSTRUCTION | 2673 #undef DECLARE_CONCRETE_INSTRUCTION |
2659 | 2674 |
2660 } // namespace internal | 2675 } // namespace internal |
2661 } // namespace v8 | 2676 } // namespace v8 |
2662 | 2677 |
2663 #endif // V8_CRANKSHAFT_ARM_LITHIUM_ARM_H_ | 2678 #endif // V8_CRANKSHAFT_ARM_LITHIUM_ARM_H_ |
OLD | NEW |