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

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

Issue 8426005: Merge IR classes for different bitwise operations AND, OR and XOR into one class. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 9 years, 1 month 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/hydrogen-instructions.cc ('k') | src/ia32/lithium-ia32.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 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 781 matching lines...) Expand 10 before | Expand all | Expand 10 after
792 792
793 LOperand* index() { return inputs_[0]; } 793 LOperand* index() { return inputs_[0]; }
794 LOperand* length() { return inputs_[1]; } 794 LOperand* length() { return inputs_[1]; }
795 795
796 DECLARE_CONCRETE_INSTRUCTION(BoundsCheck, "bounds-check") 796 DECLARE_CONCRETE_INSTRUCTION(BoundsCheck, "bounds-check")
797 }; 797 };
798 798
799 799
800 class LBitI: public LTemplateInstruction<1, 2, 0> { 800 class LBitI: public LTemplateInstruction<1, 2, 0> {
801 public: 801 public:
802 LBitI(Token::Value op, LOperand* left, LOperand* right) 802 LBitI(LOperand* left, LOperand* right) {
803 : op_(op) {
804 inputs_[0] = left; 803 inputs_[0] = left;
805 inputs_[1] = right; 804 inputs_[1] = right;
806 } 805 }
807 806
808 Token::Value op() const { return op_; } 807 Token::Value op() const { return hydrogen()->op(); }
809 808
810 DECLARE_CONCRETE_INSTRUCTION(BitI, "bit-i") 809 DECLARE_CONCRETE_INSTRUCTION(BitI, "bit-i")
811 810 DECLARE_HYDROGEN_ACCESSOR(Bitwise)
812 private:
813 Token::Value op_;
814 }; 811 };
815 812
816 813
817 class LShiftI: public LTemplateInstruction<1, 2, 0> { 814 class LShiftI: public LTemplateInstruction<1, 2, 0> {
818 public: 815 public:
819 LShiftI(Token::Value op, LOperand* left, LOperand* right, bool can_deopt) 816 LShiftI(Token::Value op, LOperand* left, LOperand* right, bool can_deopt)
820 : op_(op), can_deopt_(can_deopt) { 817 : op_(op), can_deopt_(can_deopt) {
821 inputs_[0] = left; 818 inputs_[0] = left;
822 inputs_[1] = right; 819 inputs_[1] = right;
823 } 820 }
(...skipping 1469 matching lines...) Expand 10 before | Expand all | Expand 10 after
2293 LInstruction* SetInstructionPendingDeoptimizationEnvironment( 2290 LInstruction* SetInstructionPendingDeoptimizationEnvironment(
2294 LInstruction* instr, int ast_id); 2291 LInstruction* instr, int ast_id);
2295 void ClearInstructionPendingDeoptimizationEnvironment(); 2292 void ClearInstructionPendingDeoptimizationEnvironment();
2296 2293
2297 LEnvironment* CreateEnvironment(HEnvironment* hydrogen_env, 2294 LEnvironment* CreateEnvironment(HEnvironment* hydrogen_env,
2298 int* argument_index_accumulator); 2295 int* argument_index_accumulator);
2299 2296
2300 void VisitInstruction(HInstruction* current); 2297 void VisitInstruction(HInstruction* current);
2301 2298
2302 void DoBasicBlock(HBasicBlock* block, HBasicBlock* next_block); 2299 void DoBasicBlock(HBasicBlock* block, HBasicBlock* next_block);
2303 LInstruction* DoBit(Token::Value op, HBitwiseBinaryOperation* instr);
2304 LInstruction* DoShift(Token::Value op, HBitwiseBinaryOperation* instr); 2300 LInstruction* DoShift(Token::Value op, HBitwiseBinaryOperation* instr);
2305 LInstruction* DoArithmeticD(Token::Value op, 2301 LInstruction* DoArithmeticD(Token::Value op,
2306 HArithmeticBinaryOperation* instr); 2302 HArithmeticBinaryOperation* instr);
2307 LInstruction* DoArithmeticT(Token::Value op, 2303 LInstruction* DoArithmeticT(Token::Value op,
2308 HArithmeticBinaryOperation* instr); 2304 HArithmeticBinaryOperation* instr);
2309 2305
2310 LChunk* chunk_; 2306 LChunk* chunk_;
2311 CompilationInfo* info_; 2307 CompilationInfo* info_;
2312 HGraph* const graph_; 2308 HGraph* const graph_;
2313 Status status_; 2309 Status status_;
2314 HInstruction* current_instruction_; 2310 HInstruction* current_instruction_;
2315 HBasicBlock* current_block_; 2311 HBasicBlock* current_block_;
2316 HBasicBlock* next_block_; 2312 HBasicBlock* next_block_;
2317 int argument_count_; 2313 int argument_count_;
2318 LAllocator* allocator_; 2314 LAllocator* allocator_;
2319 int position_; 2315 int position_;
2320 LInstruction* instruction_pending_deoptimization_environment_; 2316 LInstruction* instruction_pending_deoptimization_environment_;
2321 int pending_deoptimization_ast_id_; 2317 int pending_deoptimization_ast_id_;
2322 2318
2323 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); 2319 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder);
2324 }; 2320 };
2325 2321
2326 #undef DECLARE_HYDROGEN_ACCESSOR 2322 #undef DECLARE_HYDROGEN_ACCESSOR
2327 #undef DECLARE_CONCRETE_INSTRUCTION 2323 #undef DECLARE_CONCRETE_INSTRUCTION
2328 2324
2329 } } // namespace v8::internal 2325 } } // namespace v8::internal
2330 2326
2331 #endif // V8_IA32_LITHIUM_IA32_H_ 2327 #endif // V8_IA32_LITHIUM_IA32_H_
OLDNEW
« no previous file with comments | « src/hydrogen-instructions.cc ('k') | src/ia32/lithium-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698