| 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 2034 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2045 public: | 2045 public: |
| 2046 explicit LCallRuntime(LOperand* context) { | 2046 explicit LCallRuntime(LOperand* context) { |
| 2047 inputs_[0] = context; | 2047 inputs_[0] = context; |
| 2048 } | 2048 } |
| 2049 | 2049 |
| 2050 LOperand* context() { return inputs_[0]; } | 2050 LOperand* context() { return inputs_[0]; } |
| 2051 | 2051 |
| 2052 DECLARE_CONCRETE_INSTRUCTION(CallRuntime, "call-runtime") | 2052 DECLARE_CONCRETE_INSTRUCTION(CallRuntime, "call-runtime") |
| 2053 DECLARE_HYDROGEN_ACCESSOR(CallRuntime) | 2053 DECLARE_HYDROGEN_ACCESSOR(CallRuntime) |
| 2054 | 2054 |
| 2055 virtual bool ClobbersDoubleRegisters() const V8_OVERRIDE { |
| 2056 return save_doubles() == kDontSaveFPRegs; |
| 2057 } |
| 2058 |
| 2055 const Runtime::Function* function() const { return hydrogen()->function(); } | 2059 const Runtime::Function* function() const { return hydrogen()->function(); } |
| 2056 int arity() const { return hydrogen()->argument_count(); } | 2060 int arity() const { return hydrogen()->argument_count(); } |
| 2061 SaveFPRegsMode save_doubles() const { return hydrogen()->save_doubles(); } |
| 2057 }; | 2062 }; |
| 2058 | 2063 |
| 2059 | 2064 |
| 2060 class LInteger32ToDouble V8_FINAL : public LTemplateInstruction<1, 1, 0> { | 2065 class LInteger32ToDouble V8_FINAL : public LTemplateInstruction<1, 1, 0> { |
| 2061 public: | 2066 public: |
| 2062 explicit LInteger32ToDouble(LOperand* value) { | 2067 explicit LInteger32ToDouble(LOperand* value) { |
| 2063 inputs_[0] = value; | 2068 inputs_[0] = value; |
| 2064 } | 2069 } |
| 2065 | 2070 |
| 2066 LOperand* value() { return inputs_[0]; } | 2071 LOperand* value() { return inputs_[0]; } |
| (...skipping 662 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2729 }; | 2734 }; |
| 2730 | 2735 |
| 2731 | 2736 |
| 2732 class LChunkBuilder; | 2737 class LChunkBuilder; |
| 2733 class LPlatformChunk V8_FINAL : public LChunk { | 2738 class LPlatformChunk V8_FINAL : public LChunk { |
| 2734 public: | 2739 public: |
| 2735 LPlatformChunk(CompilationInfo* info, HGraph* graph) | 2740 LPlatformChunk(CompilationInfo* info, HGraph* graph) |
| 2736 : LChunk(info, graph), | 2741 : LChunk(info, graph), |
| 2737 num_double_slots_(0) { } | 2742 num_double_slots_(0) { } |
| 2738 | 2743 |
| 2739 int GetNextSpillIndex(bool is_double); | 2744 int GetNextSpillIndex(RegisterKind kind); |
| 2740 LOperand* GetNextSpillSlot(bool is_double); | 2745 LOperand* GetNextSpillSlot(RegisterKind kind); |
| 2741 | 2746 |
| 2742 int num_double_slots() const { return num_double_slots_; } | 2747 int num_double_slots() const { return num_double_slots_; } |
| 2743 | 2748 |
| 2744 private: | 2749 private: |
| 2745 int num_double_slots_; | 2750 int num_double_slots_; |
| 2746 }; | 2751 }; |
| 2747 | 2752 |
| 2748 | 2753 |
| 2749 class LChunkBuilder V8_FINAL BASE_EMBEDDED { | 2754 class LChunkBuilder V8_FINAL BASE_EMBEDDED { |
| 2750 public: | 2755 public: |
| 2751 LChunkBuilder(CompilationInfo* info, HGraph* graph, LAllocator* allocator) | 2756 LChunkBuilder(CompilationInfo* info, HGraph* graph, LAllocator* allocator) |
| 2752 : chunk_(NULL), | 2757 : chunk_(NULL), |
| 2753 info_(info), | 2758 info_(info), |
| 2754 graph_(graph), | 2759 graph_(graph), |
| 2755 zone_(graph->zone()), | 2760 zone_(graph->zone()), |
| 2756 status_(UNUSED), | 2761 status_(UNUSED), |
| 2757 current_instruction_(NULL), | 2762 current_instruction_(NULL), |
| 2758 current_block_(NULL), | 2763 current_block_(NULL), |
| 2759 next_block_(NULL), | 2764 next_block_(NULL), |
| 2760 argument_count_(0), | 2765 argument_count_(0), |
| 2761 allocator_(allocator), | 2766 allocator_(allocator), |
| 2762 position_(RelocInfo::kNoPosition), | 2767 position_(RelocInfo::kNoPosition), |
| 2763 instruction_pending_deoptimization_environment_(NULL), | 2768 instruction_pending_deoptimization_environment_(NULL), |
| 2764 pending_deoptimization_ast_id_(BailoutId::None()) { } | 2769 pending_deoptimization_ast_id_(BailoutId::None()) { } |
| 2765 | 2770 |
| 2766 // Build the sequence for the graph. | 2771 // Build the sequence for the graph. |
| 2767 LPlatformChunk* Build(); | 2772 LPlatformChunk* Build(); |
| 2768 | 2773 |
| 2774 LInstruction* CheckElideControlInstruction(HControlInstruction* instr); |
| 2775 |
| 2769 // Declare methods that deal with the individual node types. | 2776 // Declare methods that deal with the individual node types. |
| 2770 #define DECLARE_DO(type) LInstruction* Do##type(H##type* node); | 2777 #define DECLARE_DO(type) LInstruction* Do##type(H##type* node); |
| 2771 HYDROGEN_CONCRETE_INSTRUCTION_LIST(DECLARE_DO) | 2778 HYDROGEN_CONCRETE_INSTRUCTION_LIST(DECLARE_DO) |
| 2772 #undef DECLARE_DO | 2779 #undef DECLARE_DO |
| 2773 | 2780 |
| 2774 static HValue* SimplifiedDivisorForMathFloorOfDiv(HValue* val); | 2781 static HValue* SimplifiedDivisorForMathFloorOfDiv(HValue* val); |
| 2775 | 2782 |
| 2776 LInstruction* DoMathFloor(HUnaryMathOperation* instr); | 2783 LInstruction* DoMathFloor(HUnaryMathOperation* instr); |
| 2777 LInstruction* DoMathRound(HUnaryMathOperation* instr); | 2784 LInstruction* DoMathRound(HUnaryMathOperation* instr); |
| 2778 LInstruction* DoMathAbs(HUnaryMathOperation* instr); | 2785 LInstruction* DoMathAbs(HUnaryMathOperation* instr); |
| (...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2921 | 2928 |
| 2922 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); | 2929 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); |
| 2923 }; | 2930 }; |
| 2924 | 2931 |
| 2925 #undef DECLARE_HYDROGEN_ACCESSOR | 2932 #undef DECLARE_HYDROGEN_ACCESSOR |
| 2926 #undef DECLARE_CONCRETE_INSTRUCTION | 2933 #undef DECLARE_CONCRETE_INSTRUCTION |
| 2927 | 2934 |
| 2928 } } // namespace v8::internal | 2935 } } // namespace v8::internal |
| 2929 | 2936 |
| 2930 #endif // V8_IA32_LITHIUM_IA32_H_ | 2937 #endif // V8_IA32_LITHIUM_IA32_H_ |
| OLD | NEW |