Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(59)

Side by Side Diff: src/x64/lithium-x64.h

Issue 596783002: Refactor bailout reasons and disable optimization in more cases. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: remove bogus assertion Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/runtime.cc ('k') | src/x64/lithium-x64.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "src/hydrogen.h" 8 #include "src/hydrogen.h"
9 #include "src/lithium.h" 9 #include "src/lithium.h"
10 #include "src/lithium-allocator.h" 10 #include "src/lithium-allocator.h"
(...skipping 2731 matching lines...) Expand 10 before | Expand all | Expand 10 after
2742 } 2742 }
2743 2743
2744 private: 2744 private:
2745 BitVector dehoisted_key_ids_; 2745 BitVector dehoisted_key_ids_;
2746 }; 2746 };
2747 2747
2748 2748
2749 class LChunkBuilder FINAL : public LChunkBuilderBase { 2749 class LChunkBuilder FINAL : public LChunkBuilderBase {
2750 public: 2750 public:
2751 LChunkBuilder(CompilationInfo* info, HGraph* graph, LAllocator* allocator) 2751 LChunkBuilder(CompilationInfo* info, HGraph* graph, LAllocator* allocator)
2752 : LChunkBuilderBase(graph->zone()), 2752 : LChunkBuilderBase(info, graph),
2753 chunk_(NULL),
2754 info_(info),
2755 graph_(graph),
2756 status_(UNUSED),
2757 current_instruction_(NULL), 2753 current_instruction_(NULL),
2758 current_block_(NULL), 2754 current_block_(NULL),
2759 next_block_(NULL), 2755 next_block_(NULL),
2760 allocator_(allocator) { } 2756 allocator_(allocator) {}
2761
2762 Isolate* isolate() const { return graph_->isolate(); }
2763 2757
2764 // Build the sequence for the graph. 2758 // Build the sequence for the graph.
2765 LPlatformChunk* Build(); 2759 LPlatformChunk* Build();
2766 2760
2767 // Declare methods that deal with the individual node types. 2761 // Declare methods that deal with the individual node types.
2768 #define DECLARE_DO(type) LInstruction* Do##type(H##type* node); 2762 #define DECLARE_DO(type) LInstruction* Do##type(H##type* node);
2769 HYDROGEN_CONCRETE_INSTRUCTION_LIST(DECLARE_DO) 2763 HYDROGEN_CONCRETE_INSTRUCTION_LIST(DECLARE_DO)
2770 #undef DECLARE_DO 2764 #undef DECLARE_DO
2771 2765
2772 LInstruction* DoMathFloor(HUnaryMathOperation* instr); 2766 LInstruction* DoMathFloor(HUnaryMathOperation* instr);
2773 LInstruction* DoMathRound(HUnaryMathOperation* instr); 2767 LInstruction* DoMathRound(HUnaryMathOperation* instr);
2774 LInstruction* DoMathFround(HUnaryMathOperation* instr); 2768 LInstruction* DoMathFround(HUnaryMathOperation* instr);
2775 LInstruction* DoMathAbs(HUnaryMathOperation* instr); 2769 LInstruction* DoMathAbs(HUnaryMathOperation* instr);
2776 LInstruction* DoMathLog(HUnaryMathOperation* instr); 2770 LInstruction* DoMathLog(HUnaryMathOperation* instr);
2777 LInstruction* DoMathExp(HUnaryMathOperation* instr); 2771 LInstruction* DoMathExp(HUnaryMathOperation* instr);
2778 LInstruction* DoMathSqrt(HUnaryMathOperation* instr); 2772 LInstruction* DoMathSqrt(HUnaryMathOperation* instr);
2779 LInstruction* DoMathPowHalf(HUnaryMathOperation* instr); 2773 LInstruction* DoMathPowHalf(HUnaryMathOperation* instr);
2780 LInstruction* DoMathClz32(HUnaryMathOperation* instr); 2774 LInstruction* DoMathClz32(HUnaryMathOperation* instr);
2781 LInstruction* DoDivByPowerOf2I(HDiv* instr); 2775 LInstruction* DoDivByPowerOf2I(HDiv* instr);
2782 LInstruction* DoDivByConstI(HDiv* instr); 2776 LInstruction* DoDivByConstI(HDiv* instr);
2783 LInstruction* DoDivI(HDiv* instr); 2777 LInstruction* DoDivI(HDiv* instr);
2784 LInstruction* DoModByPowerOf2I(HMod* instr); 2778 LInstruction* DoModByPowerOf2I(HMod* instr);
2785 LInstruction* DoModByConstI(HMod* instr); 2779 LInstruction* DoModByConstI(HMod* instr);
2786 LInstruction* DoModI(HMod* instr); 2780 LInstruction* DoModI(HMod* instr);
2787 LInstruction* DoFlooringDivByPowerOf2I(HMathFloorOfDiv* instr); 2781 LInstruction* DoFlooringDivByPowerOf2I(HMathFloorOfDiv* instr);
2788 LInstruction* DoFlooringDivByConstI(HMathFloorOfDiv* instr); 2782 LInstruction* DoFlooringDivByConstI(HMathFloorOfDiv* instr);
2789 LInstruction* DoFlooringDivI(HMathFloorOfDiv* instr); 2783 LInstruction* DoFlooringDivI(HMathFloorOfDiv* instr);
2790 2784
2791 private: 2785 private:
2792 enum Status {
2793 UNUSED,
2794 BUILDING,
2795 DONE,
2796 ABORTED
2797 };
2798
2799 LPlatformChunk* chunk() const { return chunk_; }
2800 CompilationInfo* info() const { return info_; }
2801 HGraph* graph() const { return graph_; }
2802
2803 bool is_unused() const { return status_ == UNUSED; }
2804 bool is_building() const { return status_ == BUILDING; }
2805 bool is_done() const { return status_ == DONE; }
2806 bool is_aborted() const { return status_ == ABORTED; }
2807
2808 void Abort(BailoutReason reason);
2809
2810 // Methods for getting operands for Use / Define / Temp. 2786 // Methods for getting operands for Use / Define / Temp.
2811 LUnallocated* ToUnallocated(Register reg); 2787 LUnallocated* ToUnallocated(Register reg);
2812 LUnallocated* ToUnallocated(XMMRegister reg); 2788 LUnallocated* ToUnallocated(XMMRegister reg);
2813 2789
2814 // Methods for setting up define-use relationships. 2790 // Methods for setting up define-use relationships.
2815 MUST_USE_RESULT LOperand* Use(HValue* value, LUnallocated* operand); 2791 MUST_USE_RESULT LOperand* Use(HValue* value, LUnallocated* operand);
2816 MUST_USE_RESULT LOperand* UseFixed(HValue* value, Register fixed_register); 2792 MUST_USE_RESULT LOperand* UseFixed(HValue* value, Register fixed_register);
2817 MUST_USE_RESULT LOperand* UseFixedDouble(HValue* value, 2793 MUST_USE_RESULT LOperand* UseFixedDouble(HValue* value,
2818 XMMRegister fixed_register); 2794 XMMRegister fixed_register);
2819 2795
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
2891 void AddInstruction(LInstruction* instr, HInstruction* current); 2867 void AddInstruction(LInstruction* instr, HInstruction* current);
2892 2868
2893 void DoBasicBlock(HBasicBlock* block, HBasicBlock* next_block); 2869 void DoBasicBlock(HBasicBlock* block, HBasicBlock* next_block);
2894 LInstruction* DoShift(Token::Value op, HBitwiseBinaryOperation* instr); 2870 LInstruction* DoShift(Token::Value op, HBitwiseBinaryOperation* instr);
2895 LInstruction* DoArithmeticD(Token::Value op, 2871 LInstruction* DoArithmeticD(Token::Value op,
2896 HArithmeticBinaryOperation* instr); 2872 HArithmeticBinaryOperation* instr);
2897 LInstruction* DoArithmeticT(Token::Value op, 2873 LInstruction* DoArithmeticT(Token::Value op,
2898 HBinaryOperation* instr); 2874 HBinaryOperation* instr);
2899 void FindDehoistedKeyDefinitions(HValue* candidate); 2875 void FindDehoistedKeyDefinitions(HValue* candidate);
2900 2876
2901 LPlatformChunk* chunk_;
2902 CompilationInfo* info_;
2903 HGraph* const graph_;
2904 Status status_;
2905 HInstruction* current_instruction_; 2877 HInstruction* current_instruction_;
2906 HBasicBlock* current_block_; 2878 HBasicBlock* current_block_;
2907 HBasicBlock* next_block_; 2879 HBasicBlock* next_block_;
2908 LAllocator* allocator_; 2880 LAllocator* allocator_;
2909 2881
2910 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); 2882 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder);
2911 }; 2883 };
2912 2884
2913 #undef DECLARE_HYDROGEN_ACCESSOR 2885 #undef DECLARE_HYDROGEN_ACCESSOR
2914 #undef DECLARE_CONCRETE_INSTRUCTION 2886 #undef DECLARE_CONCRETE_INSTRUCTION
2915 2887
2916 } } // namespace v8::int 2888 } } // namespace v8::int
2917 2889
2918 #endif // V8_X64_LITHIUM_X64_H_ 2890 #endif // V8_X64_LITHIUM_X64_H_
OLDNEW
« no previous file with comments | « src/runtime.cc ('k') | src/x64/lithium-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698