OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 775 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
786 | 786 |
787 LOperand* index() { return inputs_[0]; } | 787 LOperand* index() { return inputs_[0]; } |
788 LOperand* length() { return inputs_[1]; } | 788 LOperand* length() { return inputs_[1]; } |
789 | 789 |
790 DECLARE_CONCRETE_INSTRUCTION(BoundsCheck, "bounds-check") | 790 DECLARE_CONCRETE_INSTRUCTION(BoundsCheck, "bounds-check") |
791 }; | 791 }; |
792 | 792 |
793 | 793 |
794 class LBitI: public LTemplateInstruction<1, 2, 0> { | 794 class LBitI: public LTemplateInstruction<1, 2, 0> { |
795 public: | 795 public: |
796 LBitI(Token::Value op, LOperand* left, LOperand* right) | 796 LBitI(LOperand* left, LOperand* right) { |
797 : op_(op) { | |
798 inputs_[0] = left; | 797 inputs_[0] = left; |
799 inputs_[1] = right; | 798 inputs_[1] = right; |
800 } | 799 } |
801 | 800 |
802 Token::Value op() const { return op_; } | 801 Token::Value op() const { return hydrogen()->op(); } |
803 | 802 |
804 DECLARE_CONCRETE_INSTRUCTION(BitI, "bit-i") | 803 DECLARE_CONCRETE_INSTRUCTION(BitI, "bit-i") |
805 | 804 DECLARE_HYDROGEN_ACCESSOR(Bitwise) |
806 private: | |
807 Token::Value op_; | |
808 }; | 805 }; |
809 | 806 |
810 | 807 |
811 class LShiftI: public LTemplateInstruction<1, 2, 0> { | 808 class LShiftI: public LTemplateInstruction<1, 2, 0> { |
812 public: | 809 public: |
813 LShiftI(Token::Value op, LOperand* left, LOperand* right, bool can_deopt) | 810 LShiftI(Token::Value op, LOperand* left, LOperand* right, bool can_deopt) |
814 : op_(op), can_deopt_(can_deopt) { | 811 : op_(op), can_deopt_(can_deopt) { |
815 inputs_[0] = left; | 812 inputs_[0] = left; |
816 inputs_[1] = right; | 813 inputs_[1] = right; |
817 } | 814 } |
(...skipping 1356 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2174 LInstruction* SetInstructionPendingDeoptimizationEnvironment( | 2171 LInstruction* SetInstructionPendingDeoptimizationEnvironment( |
2175 LInstruction* instr, int ast_id); | 2172 LInstruction* instr, int ast_id); |
2176 void ClearInstructionPendingDeoptimizationEnvironment(); | 2173 void ClearInstructionPendingDeoptimizationEnvironment(); |
2177 | 2174 |
2178 LEnvironment* CreateEnvironment(HEnvironment* hydrogen_env, | 2175 LEnvironment* CreateEnvironment(HEnvironment* hydrogen_env, |
2179 int* argument_index_accumulator); | 2176 int* argument_index_accumulator); |
2180 | 2177 |
2181 void VisitInstruction(HInstruction* current); | 2178 void VisitInstruction(HInstruction* current); |
2182 | 2179 |
2183 void DoBasicBlock(HBasicBlock* block, HBasicBlock* next_block); | 2180 void DoBasicBlock(HBasicBlock* block, HBasicBlock* next_block); |
2184 LInstruction* DoBit(Token::Value op, HBitwiseBinaryOperation* instr); | |
2185 LInstruction* DoShift(Token::Value op, HBitwiseBinaryOperation* instr); | 2181 LInstruction* DoShift(Token::Value op, HBitwiseBinaryOperation* instr); |
2186 LInstruction* DoArithmeticD(Token::Value op, | 2182 LInstruction* DoArithmeticD(Token::Value op, |
2187 HArithmeticBinaryOperation* instr); | 2183 HArithmeticBinaryOperation* instr); |
2188 LInstruction* DoArithmeticT(Token::Value op, | 2184 LInstruction* DoArithmeticT(Token::Value op, |
2189 HArithmeticBinaryOperation* instr); | 2185 HArithmeticBinaryOperation* instr); |
2190 | 2186 |
2191 LChunk* chunk_; | 2187 LChunk* chunk_; |
2192 CompilationInfo* info_; | 2188 CompilationInfo* info_; |
2193 HGraph* const graph_; | 2189 HGraph* const graph_; |
2194 Status status_; | 2190 Status status_; |
2195 HInstruction* current_instruction_; | 2191 HInstruction* current_instruction_; |
2196 HBasicBlock* current_block_; | 2192 HBasicBlock* current_block_; |
2197 HBasicBlock* next_block_; | 2193 HBasicBlock* next_block_; |
2198 int argument_count_; | 2194 int argument_count_; |
2199 LAllocator* allocator_; | 2195 LAllocator* allocator_; |
2200 int position_; | 2196 int position_; |
2201 LInstruction* instruction_pending_deoptimization_environment_; | 2197 LInstruction* instruction_pending_deoptimization_environment_; |
2202 int pending_deoptimization_ast_id_; | 2198 int pending_deoptimization_ast_id_; |
2203 | 2199 |
2204 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); | 2200 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); |
2205 }; | 2201 }; |
2206 | 2202 |
2207 #undef DECLARE_HYDROGEN_ACCESSOR | 2203 #undef DECLARE_HYDROGEN_ACCESSOR |
2208 #undef DECLARE_CONCRETE_INSTRUCTION | 2204 #undef DECLARE_CONCRETE_INSTRUCTION |
2209 | 2205 |
2210 } } // namespace v8::int | 2206 } } // namespace v8::int |
2211 | 2207 |
2212 #endif // V8_X64_LITHIUM_X64_H_ | 2208 #endif // V8_X64_LITHIUM_X64_H_ |
OLD | NEW |