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_X64_LITHIUM_X64_H_ | 5 #ifndef V8_X64_LITHIUM_X64_H_ |
6 #define V8_X64_LITHIUM_X64_H_ | 6 #define V8_X64_LITHIUM_X64_H_ |
7 | 7 |
8 #include "hydrogen.h" | 8 #include "hydrogen.h" |
9 #include "lithium-allocator.h" | 9 #include "lithium-allocator.h" |
10 #include "lithium.h" | 10 #include "lithium.h" |
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
227 | 227 |
228 void set_hydrogen_value(HValue* value) { hydrogen_value_ = value; } | 228 void set_hydrogen_value(HValue* value) { hydrogen_value_ = value; } |
229 HValue* hydrogen_value() const { return hydrogen_value_; } | 229 HValue* hydrogen_value() const { return hydrogen_value_; } |
230 | 230 |
231 void MarkAsCall() { bit_field_ = IsCallBits::update(bit_field_, true); } | 231 void MarkAsCall() { bit_field_ = IsCallBits::update(bit_field_, true); } |
232 bool IsCall() const { return IsCallBits::decode(bit_field_); } | 232 bool IsCall() const { return IsCallBits::decode(bit_field_); } |
233 | 233 |
234 // Interface to the register allocator and iterators. | 234 // Interface to the register allocator and iterators. |
235 bool ClobbersTemps() const { return IsCall(); } | 235 bool ClobbersTemps() const { return IsCall(); } |
236 bool ClobbersRegisters() const { return IsCall(); } | 236 bool ClobbersRegisters() const { return IsCall(); } |
237 virtual bool ClobbersDoubleRegisters() const { return IsCall(); } | 237 virtual bool ClobbersDoubleRegisters(Isolate* isolate) const V8_OVERRIDE { |
| 238 return IsCall(); |
| 239 } |
238 | 240 |
239 virtual void SetDeferredLazyDeoptimizationEnvironment(LEnvironment* env) { } | 241 virtual void SetDeferredLazyDeoptimizationEnvironment(LEnvironment* env) { } |
240 | 242 |
241 // Interface to the register allocator and iterators. | 243 // Interface to the register allocator and iterators. |
242 bool IsMarkedAsCall() const { return IsCall(); } | 244 bool IsMarkedAsCall() const { return IsCall(); } |
243 | 245 |
244 virtual bool HasResult() const = 0; | 246 virtual bool HasResult() const = 0; |
245 virtual LOperand* result() const = 0; | 247 virtual LOperand* result() const = 0; |
246 | 248 |
247 LOperand* FirstInput() { return InputAt(0); } | 249 LOperand* FirstInput() { return InputAt(0); } |
(...skipping 1687 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1935 public: | 1937 public: |
1936 explicit LCallRuntime(LOperand* context) { | 1938 explicit LCallRuntime(LOperand* context) { |
1937 inputs_[0] = context; | 1939 inputs_[0] = context; |
1938 } | 1940 } |
1939 | 1941 |
1940 LOperand* context() { return inputs_[0]; } | 1942 LOperand* context() { return inputs_[0]; } |
1941 | 1943 |
1942 DECLARE_CONCRETE_INSTRUCTION(CallRuntime, "call-runtime") | 1944 DECLARE_CONCRETE_INSTRUCTION(CallRuntime, "call-runtime") |
1943 DECLARE_HYDROGEN_ACCESSOR(CallRuntime) | 1945 DECLARE_HYDROGEN_ACCESSOR(CallRuntime) |
1944 | 1946 |
1945 virtual bool ClobbersDoubleRegisters() const V8_OVERRIDE { | 1947 virtual bool ClobbersDoubleRegisters(Isolate* isolate) const V8_OVERRIDE { |
1946 return save_doubles() == kDontSaveFPRegs; | 1948 return save_doubles() == kDontSaveFPRegs; |
1947 } | 1949 } |
1948 | 1950 |
1949 const Runtime::Function* function() const { return hydrogen()->function(); } | 1951 const Runtime::Function* function() const { return hydrogen()->function(); } |
1950 int arity() const { return hydrogen()->argument_count(); } | 1952 int arity() const { return hydrogen()->argument_count(); } |
1951 SaveFPRegsMode save_doubles() const { return hydrogen()->save_doubles(); } | 1953 SaveFPRegsMode save_doubles() const { return hydrogen()->save_doubles(); } |
1952 }; | 1954 }; |
1953 | 1955 |
1954 | 1956 |
1955 class LInteger32ToDouble V8_FINAL : public LTemplateInstruction<1, 1, 0> { | 1957 class LInteger32ToDouble V8_FINAL : public LTemplateInstruction<1, 1, 0> { |
(...skipping 696 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2652 : LChunkBuilderBase(graph->zone()), | 2654 : LChunkBuilderBase(graph->zone()), |
2653 chunk_(NULL), | 2655 chunk_(NULL), |
2654 info_(info), | 2656 info_(info), |
2655 graph_(graph), | 2657 graph_(graph), |
2656 status_(UNUSED), | 2658 status_(UNUSED), |
2657 current_instruction_(NULL), | 2659 current_instruction_(NULL), |
2658 current_block_(NULL), | 2660 current_block_(NULL), |
2659 next_block_(NULL), | 2661 next_block_(NULL), |
2660 allocator_(allocator) { } | 2662 allocator_(allocator) { } |
2661 | 2663 |
| 2664 Isolate* isolate() const { return graph_->isolate(); } |
| 2665 |
2662 // Build the sequence for the graph. | 2666 // Build the sequence for the graph. |
2663 LPlatformChunk* Build(); | 2667 LPlatformChunk* Build(); |
2664 | 2668 |
2665 LInstruction* CheckElideControlInstruction(HControlInstruction* instr); | 2669 LInstruction* CheckElideControlInstruction(HControlInstruction* instr); |
2666 | 2670 |
2667 // Declare methods that deal with the individual node types. | 2671 // Declare methods that deal with the individual node types. |
2668 #define DECLARE_DO(type) LInstruction* Do##type(H##type* node); | 2672 #define DECLARE_DO(type) LInstruction* Do##type(H##type* node); |
2669 HYDROGEN_CONCRETE_INSTRUCTION_LIST(DECLARE_DO) | 2673 HYDROGEN_CONCRETE_INSTRUCTION_LIST(DECLARE_DO) |
2670 #undef DECLARE_DO | 2674 #undef DECLARE_DO |
2671 | 2675 |
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2807 | 2811 |
2808 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); | 2812 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); |
2809 }; | 2813 }; |
2810 | 2814 |
2811 #undef DECLARE_HYDROGEN_ACCESSOR | 2815 #undef DECLARE_HYDROGEN_ACCESSOR |
2812 #undef DECLARE_CONCRETE_INSTRUCTION | 2816 #undef DECLARE_CONCRETE_INSTRUCTION |
2813 | 2817 |
2814 } } // namespace v8::int | 2818 } } // namespace v8::int |
2815 | 2819 |
2816 #endif // V8_X64_LITHIUM_X64_H_ | 2820 #endif // V8_X64_LITHIUM_X64_H_ |
OLD | NEW |