| 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 2121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2132 ZoneList<Handle<JSFunction> > inlined_closures_; | 2132 ZoneList<Handle<JSFunction> > inlined_closures_; |
| 2133 }; | 2133 }; |
| 2134 | 2134 |
| 2135 | 2135 |
| 2136 class LChunkBuilder BASE_EMBEDDED { | 2136 class LChunkBuilder BASE_EMBEDDED { |
| 2137 public: | 2137 public: |
| 2138 LChunkBuilder(CompilationInfo* info, HGraph* graph, LAllocator* allocator) | 2138 LChunkBuilder(CompilationInfo* info, HGraph* graph, LAllocator* allocator) |
| 2139 : chunk_(NULL), | 2139 : chunk_(NULL), |
| 2140 info_(info), | 2140 info_(info), |
| 2141 graph_(graph), | 2141 graph_(graph), |
| 2142 zone_(graph->isolate()->zone()), |
| 2142 status_(UNUSED), | 2143 status_(UNUSED), |
| 2143 current_instruction_(NULL), | 2144 current_instruction_(NULL), |
| 2144 current_block_(NULL), | 2145 current_block_(NULL), |
| 2145 next_block_(NULL), | 2146 next_block_(NULL), |
| 2146 argument_count_(0), | 2147 argument_count_(0), |
| 2147 allocator_(allocator), | 2148 allocator_(allocator), |
| 2148 position_(RelocInfo::kNoPosition), | 2149 position_(RelocInfo::kNoPosition), |
| 2149 instruction_pending_deoptimization_environment_(NULL), | 2150 instruction_pending_deoptimization_environment_(NULL), |
| 2150 pending_deoptimization_ast_id_(AstNode::kNoNumber) { } | 2151 pending_deoptimization_ast_id_(AstNode::kNoNumber) { } |
| 2151 | 2152 |
| 2152 // Build the sequence for the graph. | 2153 // Build the sequence for the graph. |
| 2153 LChunk* Build(); | 2154 LChunk* Build(); |
| 2154 | 2155 |
| 2155 // Declare methods that deal with the individual node types. | 2156 // Declare methods that deal with the individual node types. |
| 2156 #define DECLARE_DO(type) LInstruction* Do##type(H##type* node); | 2157 #define DECLARE_DO(type) LInstruction* Do##type(H##type* node); |
| 2157 HYDROGEN_CONCRETE_INSTRUCTION_LIST(DECLARE_DO) | 2158 HYDROGEN_CONCRETE_INSTRUCTION_LIST(DECLARE_DO) |
| 2158 #undef DECLARE_DO | 2159 #undef DECLARE_DO |
| 2159 | 2160 |
| 2160 private: | 2161 private: |
| 2161 enum Status { | 2162 enum Status { |
| 2162 UNUSED, | 2163 UNUSED, |
| 2163 BUILDING, | 2164 BUILDING, |
| 2164 DONE, | 2165 DONE, |
| 2165 ABORTED | 2166 ABORTED |
| 2166 }; | 2167 }; |
| 2167 | 2168 |
| 2168 LChunk* chunk() const { return chunk_; } | 2169 LChunk* chunk() const { return chunk_; } |
| 2169 CompilationInfo* info() const { return info_; } | 2170 CompilationInfo* info() const { return info_; } |
| 2170 HGraph* graph() const { return graph_; } | 2171 HGraph* graph() const { return graph_; } |
| 2172 Zone* zone() const { return zone_; } |
| 2171 | 2173 |
| 2172 bool is_unused() const { return status_ == UNUSED; } | 2174 bool is_unused() const { return status_ == UNUSED; } |
| 2173 bool is_building() const { return status_ == BUILDING; } | 2175 bool is_building() const { return status_ == BUILDING; } |
| 2174 bool is_done() const { return status_ == DONE; } | 2176 bool is_done() const { return status_ == DONE; } |
| 2175 bool is_aborted() const { return status_ == ABORTED; } | 2177 bool is_aborted() const { return status_ == ABORTED; } |
| 2176 | 2178 |
| 2177 void Abort(const char* format, ...); | 2179 void Abort(const char* format, ...); |
| 2178 | 2180 |
| 2179 // Methods for getting operands for Use / Define / Temp. | 2181 // Methods for getting operands for Use / Define / Temp. |
| 2180 LUnallocated* ToUnallocated(Register reg); | 2182 LUnallocated* ToUnallocated(Register reg); |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2266 LInstruction* DoBit(Token::Value op, HBitwiseBinaryOperation* instr); | 2268 LInstruction* DoBit(Token::Value op, HBitwiseBinaryOperation* instr); |
| 2267 LInstruction* DoShift(Token::Value op, HBitwiseBinaryOperation* instr); | 2269 LInstruction* DoShift(Token::Value op, HBitwiseBinaryOperation* instr); |
| 2268 LInstruction* DoArithmeticD(Token::Value op, | 2270 LInstruction* DoArithmeticD(Token::Value op, |
| 2269 HArithmeticBinaryOperation* instr); | 2271 HArithmeticBinaryOperation* instr); |
| 2270 LInstruction* DoArithmeticT(Token::Value op, | 2272 LInstruction* DoArithmeticT(Token::Value op, |
| 2271 HArithmeticBinaryOperation* instr); | 2273 HArithmeticBinaryOperation* instr); |
| 2272 | 2274 |
| 2273 LChunk* chunk_; | 2275 LChunk* chunk_; |
| 2274 CompilationInfo* info_; | 2276 CompilationInfo* info_; |
| 2275 HGraph* const graph_; | 2277 HGraph* const graph_; |
| 2278 Zone* zone_; |
| 2276 Status status_; | 2279 Status status_; |
| 2277 HInstruction* current_instruction_; | 2280 HInstruction* current_instruction_; |
| 2278 HBasicBlock* current_block_; | 2281 HBasicBlock* current_block_; |
| 2279 HBasicBlock* next_block_; | 2282 HBasicBlock* next_block_; |
| 2280 int argument_count_; | 2283 int argument_count_; |
| 2281 LAllocator* allocator_; | 2284 LAllocator* allocator_; |
| 2282 int position_; | 2285 int position_; |
| 2283 LInstruction* instruction_pending_deoptimization_environment_; | 2286 LInstruction* instruction_pending_deoptimization_environment_; |
| 2284 int pending_deoptimization_ast_id_; | 2287 int pending_deoptimization_ast_id_; |
| 2285 | 2288 |
| 2286 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); | 2289 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); |
| 2287 }; | 2290 }; |
| 2288 | 2291 |
| 2289 #undef DECLARE_HYDROGEN_ACCESSOR | 2292 #undef DECLARE_HYDROGEN_ACCESSOR |
| 2290 #undef DECLARE_CONCRETE_INSTRUCTION | 2293 #undef DECLARE_CONCRETE_INSTRUCTION |
| 2291 | 2294 |
| 2292 } } // namespace v8::internal | 2295 } } // namespace v8::internal |
| 2293 | 2296 |
| 2294 #endif // V8_MIPS_LITHIUM_MIPS_H_ | 2297 #endif // V8_MIPS_LITHIUM_MIPS_H_ |
| OLD | NEW |