| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 2803 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2814 class LPlatformChunk V8_FINAL : public LChunk { | 2814 class LPlatformChunk V8_FINAL : public LChunk { |
| 2815 public: | 2815 public: |
| 2816 LPlatformChunk(CompilationInfo* info, HGraph* graph) | 2816 LPlatformChunk(CompilationInfo* info, HGraph* graph) |
| 2817 : LChunk(info, graph) { } | 2817 : LChunk(info, graph) { } |
| 2818 | 2818 |
| 2819 int GetNextSpillIndex(); | 2819 int GetNextSpillIndex(); |
| 2820 LOperand* GetNextSpillSlot(RegisterKind kind); | 2820 LOperand* GetNextSpillSlot(RegisterKind kind); |
| 2821 }; | 2821 }; |
| 2822 | 2822 |
| 2823 | 2823 |
| 2824 class LChunkBuilder V8_FINAL BASE_EMBEDDED { | 2824 class LChunkBuilder V8_FINAL : public LChunkBuilderBase { |
| 2825 public: | 2825 public: |
| 2826 LChunkBuilder(CompilationInfo* info, HGraph* graph, LAllocator* allocator) | 2826 LChunkBuilder(CompilationInfo* info, HGraph* graph, LAllocator* allocator) |
| 2827 : chunk_(NULL), | 2827 : LChunkBuilderBase(graph->zone()), |
| 2828 chunk_(NULL), |
| 2828 info_(info), | 2829 info_(info), |
| 2829 graph_(graph), | 2830 graph_(graph), |
| 2830 zone_(graph->zone()), | |
| 2831 status_(UNUSED), | 2831 status_(UNUSED), |
| 2832 current_instruction_(NULL), | 2832 current_instruction_(NULL), |
| 2833 current_block_(NULL), | 2833 current_block_(NULL), |
| 2834 argument_count_(0), | |
| 2835 allocator_(allocator), | 2834 allocator_(allocator), |
| 2836 position_(RelocInfo::kNoPosition), | 2835 position_(RelocInfo::kNoPosition), |
| 2837 instruction_pending_deoptimization_environment_(NULL), | 2836 instruction_pending_deoptimization_environment_(NULL), |
| 2838 pending_deoptimization_ast_id_(BailoutId::None()) { } | 2837 pending_deoptimization_ast_id_(BailoutId::None()) { } |
| 2839 | 2838 |
| 2840 // Build the sequence for the graph. | 2839 // Build the sequence for the graph. |
| 2841 LPlatformChunk* Build(); | 2840 LPlatformChunk* Build(); |
| 2842 | 2841 |
| 2843 LInstruction* CheckElideControlInstruction(HControlInstruction* instr); | 2842 LInstruction* CheckElideControlInstruction(HControlInstruction* instr); |
| 2844 | 2843 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 2859 }; | 2858 }; |
| 2860 | 2859 |
| 2861 HGraph* graph() const { return graph_; } | 2860 HGraph* graph() const { return graph_; } |
| 2862 Isolate* isolate() const { return info_->isolate(); } | 2861 Isolate* isolate() const { return info_->isolate(); } |
| 2863 | 2862 |
| 2864 bool is_unused() const { return status_ == UNUSED; } | 2863 bool is_unused() const { return status_ == UNUSED; } |
| 2865 bool is_building() const { return status_ == BUILDING; } | 2864 bool is_building() const { return status_ == BUILDING; } |
| 2866 bool is_done() const { return status_ == DONE; } | 2865 bool is_done() const { return status_ == DONE; } |
| 2867 bool is_aborted() const { return status_ == ABORTED; } | 2866 bool is_aborted() const { return status_ == ABORTED; } |
| 2868 | 2867 |
| 2869 Zone* zone() const { return zone_; } | |
| 2870 int argument_count() const { return argument_count_; } | 2868 int argument_count() const { return argument_count_; } |
| 2871 CompilationInfo* info() const { return info_; } | 2869 CompilationInfo* info() const { return info_; } |
| 2872 Heap* heap() const { return isolate()->heap(); } | 2870 Heap* heap() const { return isolate()->heap(); } |
| 2873 | 2871 |
| 2874 void Abort(BailoutReason reason); | 2872 void Abort(BailoutReason reason); |
| 2875 | 2873 |
| 2876 // Methods for getting operands for Use / Define / Temp. | 2874 // Methods for getting operands for Use / Define / Temp. |
| 2877 LUnallocated* ToUnallocated(Register reg); | 2875 LUnallocated* ToUnallocated(Register reg); |
| 2878 LUnallocated* ToUnallocated(DoubleRegister reg); | 2876 LUnallocated* ToUnallocated(DoubleRegister reg); |
| 2879 | 2877 |
| (...skipping 26 matching lines...) Expand all Loading... |
| 2906 | 2904 |
| 2907 // An input operand in a register or a constant operand. | 2905 // An input operand in a register or a constant operand. |
| 2908 MUST_USE_RESULT LOperand* UseRegisterOrConstant(HValue* value); | 2906 MUST_USE_RESULT LOperand* UseRegisterOrConstant(HValue* value); |
| 2909 MUST_USE_RESULT LOperand* UseRegisterOrConstantAtStart(HValue* value); | 2907 MUST_USE_RESULT LOperand* UseRegisterOrConstantAtStart(HValue* value); |
| 2910 | 2908 |
| 2911 // A constant operand. | 2909 // A constant operand. |
| 2912 MUST_USE_RESULT LConstantOperand* UseConstant(HValue* value); | 2910 MUST_USE_RESULT LConstantOperand* UseConstant(HValue* value); |
| 2913 | 2911 |
| 2914 // An input operand in register, stack slot or a constant operand. | 2912 // An input operand in register, stack slot or a constant operand. |
| 2915 // Will not be moved to a register even if one is freely available. | 2913 // Will not be moved to a register even if one is freely available. |
| 2916 MUST_USE_RESULT LOperand* UseAny(HValue* value); | 2914 virtual MUST_USE_RESULT LOperand* UseAny(HValue* value); |
| 2917 | 2915 |
| 2918 // Temporary operand that must be in a register. | 2916 // Temporary operand that must be in a register. |
| 2919 MUST_USE_RESULT LUnallocated* TempRegister(); | 2917 MUST_USE_RESULT LUnallocated* TempRegister(); |
| 2920 | 2918 |
| 2921 // Temporary operand that must be in a fixed double register. | 2919 // Temporary operand that must be in a fixed double register. |
| 2922 MUST_USE_RESULT LOperand* FixedTemp(DoubleRegister reg); | 2920 MUST_USE_RESULT LOperand* FixedTemp(DoubleRegister reg); |
| 2923 | 2921 |
| 2924 // Methods for setting up define-use relationships. | 2922 // Methods for setting up define-use relationships. |
| 2925 // Return the same instruction that they are passed. | 2923 // Return the same instruction that they are passed. |
| 2926 template<int I, int T> | 2924 template<int I, int T> |
| (...skipping 21 matching lines...) Expand all Loading... |
| 2948 // By default we assume that instruction sequences generated for calls | 2946 // By default we assume that instruction sequences generated for calls |
| 2949 // cannot deoptimize eagerly and we do not attach environment to this | 2947 // cannot deoptimize eagerly and we do not attach environment to this |
| 2950 // instruction. | 2948 // instruction. |
| 2951 LInstruction* MarkAsCall( | 2949 LInstruction* MarkAsCall( |
| 2952 LInstruction* instr, | 2950 LInstruction* instr, |
| 2953 HInstruction* hinstr, | 2951 HInstruction* hinstr, |
| 2954 CanDeoptimize can_deoptimize = CANNOT_DEOPTIMIZE_EAGERLY); | 2952 CanDeoptimize can_deoptimize = CANNOT_DEOPTIMIZE_EAGERLY); |
| 2955 | 2953 |
| 2956 LInstruction* AssignPointerMap(LInstruction* instr); | 2954 LInstruction* AssignPointerMap(LInstruction* instr); |
| 2957 LInstruction* AssignEnvironment(LInstruction* instr); | 2955 LInstruction* AssignEnvironment(LInstruction* instr); |
| 2958 LEnvironment* CreateEnvironment(HEnvironment* hydrogen_env, | |
| 2959 int* argument_index_accumulator, | |
| 2960 ZoneList<HValue*>* objects_to_materialize); | |
| 2961 | 2956 |
| 2962 void VisitInstruction(HInstruction* current); | 2957 void VisitInstruction(HInstruction* current); |
| 2963 void DoBasicBlock(HBasicBlock* block); | 2958 void DoBasicBlock(HBasicBlock* block); |
| 2964 | 2959 |
| 2965 LInstruction* DoShift(Token::Value op, HBitwiseBinaryOperation* instr); | 2960 LInstruction* DoShift(Token::Value op, HBitwiseBinaryOperation* instr); |
| 2966 LInstruction* DoArithmeticD(Token::Value op, | 2961 LInstruction* DoArithmeticD(Token::Value op, |
| 2967 HArithmeticBinaryOperation* instr); | 2962 HArithmeticBinaryOperation* instr); |
| 2968 LInstruction* DoArithmeticT(Token::Value op, | 2963 LInstruction* DoArithmeticT(Token::Value op, |
| 2969 HBinaryOperation* instr); | 2964 HBinaryOperation* instr); |
| 2970 | 2965 |
| 2971 LPlatformChunk* chunk_; | 2966 LPlatformChunk* chunk_; |
| 2972 CompilationInfo* info_; | 2967 CompilationInfo* info_; |
| 2973 HGraph* const graph_; | 2968 HGraph* const graph_; |
| 2974 Zone* zone_; | |
| 2975 Status status_; | 2969 Status status_; |
| 2976 HInstruction* current_instruction_; | 2970 HInstruction* current_instruction_; |
| 2977 HBasicBlock* current_block_; | 2971 HBasicBlock* current_block_; |
| 2978 int argument_count_; | |
| 2979 LAllocator* allocator_; | 2972 LAllocator* allocator_; |
| 2980 int position_; | 2973 int position_; |
| 2981 LInstruction* instruction_pending_deoptimization_environment_; | 2974 LInstruction* instruction_pending_deoptimization_environment_; |
| 2982 BailoutId pending_deoptimization_ast_id_; | 2975 BailoutId pending_deoptimization_ast_id_; |
| 2983 | 2976 |
| 2984 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); | 2977 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); |
| 2985 }; | 2978 }; |
| 2986 | 2979 |
| 2987 #undef DECLARE_HYDROGEN_ACCESSOR | 2980 #undef DECLARE_HYDROGEN_ACCESSOR |
| 2988 #undef DECLARE_CONCRETE_INSTRUCTION | 2981 #undef DECLARE_CONCRETE_INSTRUCTION |
| 2989 | 2982 |
| 2990 } } // namespace v8::internal | 2983 } } // namespace v8::internal |
| 2991 | 2984 |
| 2992 #endif // V8_A64_LITHIUM_A64_H_ | 2985 #endif // V8_A64_LITHIUM_A64_H_ |
| OLD | NEW |