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 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
250 | 250 |
251 void set_hydrogen_value(HValue* value) { hydrogen_value_ = value; } | 251 void set_hydrogen_value(HValue* value) { hydrogen_value_ = value; } |
252 HValue* hydrogen_value() const { return hydrogen_value_; } | 252 HValue* hydrogen_value() const { return hydrogen_value_; } |
253 | 253 |
254 void MarkAsCall() { bit_field_ = IsCallBits::update(bit_field_, true); } | 254 void MarkAsCall() { bit_field_ = IsCallBits::update(bit_field_, true); } |
255 bool IsCall() const { return IsCallBits::decode(bit_field_); } | 255 bool IsCall() const { return IsCallBits::decode(bit_field_); } |
256 | 256 |
257 // Interface to the register allocator and iterators. | 257 // Interface to the register allocator and iterators. |
258 bool ClobbersTemps() const { return IsCall(); } | 258 bool ClobbersTemps() const { return IsCall(); } |
259 bool ClobbersRegisters() const { return IsCall(); } | 259 bool ClobbersRegisters() const { return IsCall(); } |
260 virtual bool ClobbersDoubleRegisters() const { return IsCall(); } | 260 virtual bool ClobbersDoubleRegisters(Isolate* isolate) const V8_OVERRIDE { |
| 261 return IsCall(); |
| 262 } |
261 | 263 |
262 virtual void SetDeferredLazyDeoptimizationEnvironment(LEnvironment* env) { } | 264 virtual void SetDeferredLazyDeoptimizationEnvironment(LEnvironment* env) { } |
263 | 265 |
264 // Interface to the register allocator and iterators. | 266 // Interface to the register allocator and iterators. |
265 bool IsMarkedAsCall() const { return IsCall(); } | 267 bool IsMarkedAsCall() const { return IsCall(); } |
266 | 268 |
267 virtual bool HasResult() const = 0; | 269 virtual bool HasResult() const = 0; |
268 virtual LOperand* result() const = 0; | 270 virtual LOperand* result() const = 0; |
269 | 271 |
270 LOperand* FirstInput() { return InputAt(0); } | 272 LOperand* FirstInput() { return InputAt(0); } |
(...skipping 1687 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1958 public: | 1960 public: |
1959 explicit LCallRuntime(LOperand* context) { | 1961 explicit LCallRuntime(LOperand* context) { |
1960 inputs_[0] = context; | 1962 inputs_[0] = context; |
1961 } | 1963 } |
1962 | 1964 |
1963 LOperand* context() { return inputs_[0]; } | 1965 LOperand* context() { return inputs_[0]; } |
1964 | 1966 |
1965 DECLARE_CONCRETE_INSTRUCTION(CallRuntime, "call-runtime") | 1967 DECLARE_CONCRETE_INSTRUCTION(CallRuntime, "call-runtime") |
1966 DECLARE_HYDROGEN_ACCESSOR(CallRuntime) | 1968 DECLARE_HYDROGEN_ACCESSOR(CallRuntime) |
1967 | 1969 |
1968 virtual bool ClobbersDoubleRegisters() const V8_OVERRIDE { | 1970 virtual bool ClobbersDoubleRegisters(Isolate* isolate) const V8_OVERRIDE { |
1969 return save_doubles() == kDontSaveFPRegs; | 1971 return save_doubles() == kDontSaveFPRegs; |
1970 } | 1972 } |
1971 | 1973 |
1972 const Runtime::Function* function() const { return hydrogen()->function(); } | 1974 const Runtime::Function* function() const { return hydrogen()->function(); } |
1973 int arity() const { return hydrogen()->argument_count(); } | 1975 int arity() const { return hydrogen()->argument_count(); } |
1974 SaveFPRegsMode save_doubles() const { return hydrogen()->save_doubles(); } | 1976 SaveFPRegsMode save_doubles() const { return hydrogen()->save_doubles(); } |
1975 }; | 1977 }; |
1976 | 1978 |
1977 | 1979 |
1978 class LInteger32ToDouble V8_FINAL : public LTemplateInstruction<1, 1, 0> { | 1980 class LInteger32ToDouble V8_FINAL : public LTemplateInstruction<1, 1, 0> { |
(...skipping 696 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2675 : LChunkBuilderBase(graph->zone()), | 2677 : LChunkBuilderBase(graph->zone()), |
2676 chunk_(NULL), | 2678 chunk_(NULL), |
2677 info_(info), | 2679 info_(info), |
2678 graph_(graph), | 2680 graph_(graph), |
2679 status_(UNUSED), | 2681 status_(UNUSED), |
2680 current_instruction_(NULL), | 2682 current_instruction_(NULL), |
2681 current_block_(NULL), | 2683 current_block_(NULL), |
2682 next_block_(NULL), | 2684 next_block_(NULL), |
2683 allocator_(allocator) { } | 2685 allocator_(allocator) { } |
2684 | 2686 |
| 2687 Isolate* isolate() const { return graph_->isolate(); } |
| 2688 |
2685 // Build the sequence for the graph. | 2689 // Build the sequence for the graph. |
2686 LPlatformChunk* Build(); | 2690 LPlatformChunk* Build(); |
2687 | 2691 |
2688 LInstruction* CheckElideControlInstruction(HControlInstruction* instr); | 2692 LInstruction* CheckElideControlInstruction(HControlInstruction* instr); |
2689 | 2693 |
2690 // Declare methods that deal with the individual node types. | 2694 // Declare methods that deal with the individual node types. |
2691 #define DECLARE_DO(type) LInstruction* Do##type(H##type* node); | 2695 #define DECLARE_DO(type) LInstruction* Do##type(H##type* node); |
2692 HYDROGEN_CONCRETE_INSTRUCTION_LIST(DECLARE_DO) | 2696 HYDROGEN_CONCRETE_INSTRUCTION_LIST(DECLARE_DO) |
2693 #undef DECLARE_DO | 2697 #undef DECLARE_DO |
2694 | 2698 |
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2830 | 2834 |
2831 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); | 2835 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); |
2832 }; | 2836 }; |
2833 | 2837 |
2834 #undef DECLARE_HYDROGEN_ACCESSOR | 2838 #undef DECLARE_HYDROGEN_ACCESSOR |
2835 #undef DECLARE_CONCRETE_INSTRUCTION | 2839 #undef DECLARE_CONCRETE_INSTRUCTION |
2836 | 2840 |
2837 } } // namespace v8::int | 2841 } } // namespace v8::int |
2838 | 2842 |
2839 #endif // V8_X64_LITHIUM_X64_H_ | 2843 #endif // V8_X64_LITHIUM_X64_H_ |
OLD | NEW |