| 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 2182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2193 ZoneList<Handle<JSFunction> > inlined_closures_; | 2193 ZoneList<Handle<JSFunction> > inlined_closures_; |
| 2194 }; | 2194 }; |
| 2195 | 2195 |
| 2196 | 2196 |
| 2197 class LChunkBuilder BASE_EMBEDDED { | 2197 class LChunkBuilder BASE_EMBEDDED { |
| 2198 public: | 2198 public: |
| 2199 LChunkBuilder(CompilationInfo* info, HGraph* graph, LAllocator* allocator) | 2199 LChunkBuilder(CompilationInfo* info, HGraph* graph, LAllocator* allocator) |
| 2200 : chunk_(NULL), | 2200 : chunk_(NULL), |
| 2201 info_(info), | 2201 info_(info), |
| 2202 graph_(graph), | 2202 graph_(graph), |
| 2203 zone_(graph->isolate()->zone()), |
| 2203 status_(UNUSED), | 2204 status_(UNUSED), |
| 2204 current_instruction_(NULL), | 2205 current_instruction_(NULL), |
| 2205 current_block_(NULL), | 2206 current_block_(NULL), |
| 2206 next_block_(NULL), | 2207 next_block_(NULL), |
| 2207 argument_count_(0), | 2208 argument_count_(0), |
| 2208 allocator_(allocator), | 2209 allocator_(allocator), |
| 2209 position_(RelocInfo::kNoPosition), | 2210 position_(RelocInfo::kNoPosition), |
| 2210 instruction_pending_deoptimization_environment_(NULL), | 2211 instruction_pending_deoptimization_environment_(NULL), |
| 2211 pending_deoptimization_ast_id_(AstNode::kNoNumber) { } | 2212 pending_deoptimization_ast_id_(AstNode::kNoNumber) { } |
| 2212 | 2213 |
| 2213 // Build the sequence for the graph. | 2214 // Build the sequence for the graph. |
| 2214 LChunk* Build(); | 2215 LChunk* Build(); |
| 2215 | 2216 |
| 2216 // Declare methods that deal with the individual node types. | 2217 // Declare methods that deal with the individual node types. |
| 2217 #define DECLARE_DO(type) LInstruction* Do##type(H##type* node); | 2218 #define DECLARE_DO(type) LInstruction* Do##type(H##type* node); |
| 2218 HYDROGEN_CONCRETE_INSTRUCTION_LIST(DECLARE_DO) | 2219 HYDROGEN_CONCRETE_INSTRUCTION_LIST(DECLARE_DO) |
| 2219 #undef DECLARE_DO | 2220 #undef DECLARE_DO |
| 2220 | 2221 |
| 2221 private: | 2222 private: |
| 2222 enum Status { | 2223 enum Status { |
| 2223 UNUSED, | 2224 UNUSED, |
| 2224 BUILDING, | 2225 BUILDING, |
| 2225 DONE, | 2226 DONE, |
| 2226 ABORTED | 2227 ABORTED |
| 2227 }; | 2228 }; |
| 2228 | 2229 |
| 2229 LChunk* chunk() const { return chunk_; } | 2230 LChunk* chunk() const { return chunk_; } |
| 2230 CompilationInfo* info() const { return info_; } | 2231 CompilationInfo* info() const { return info_; } |
| 2231 HGraph* graph() const { return graph_; } | 2232 HGraph* graph() const { return graph_; } |
| 2233 Zone* zone() const { return zone_; } |
| 2232 | 2234 |
| 2233 bool is_unused() const { return status_ == UNUSED; } | 2235 bool is_unused() const { return status_ == UNUSED; } |
| 2234 bool is_building() const { return status_ == BUILDING; } | 2236 bool is_building() const { return status_ == BUILDING; } |
| 2235 bool is_done() const { return status_ == DONE; } | 2237 bool is_done() const { return status_ == DONE; } |
| 2236 bool is_aborted() const { return status_ == ABORTED; } | 2238 bool is_aborted() const { return status_ == ABORTED; } |
| 2237 | 2239 |
| 2238 void Abort(const char* format, ...); | 2240 void Abort(const char* format, ...); |
| 2239 | 2241 |
| 2240 // Methods for getting operands for Use / Define / Temp. | 2242 // Methods for getting operands for Use / Define / Temp. |
| 2241 LUnallocated* ToUnallocated(Register reg); | 2243 LUnallocated* ToUnallocated(Register reg); |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2326 void DoBasicBlock(HBasicBlock* block, HBasicBlock* next_block); | 2328 void DoBasicBlock(HBasicBlock* block, HBasicBlock* next_block); |
| 2327 LInstruction* DoShift(Token::Value op, HBitwiseBinaryOperation* instr); | 2329 LInstruction* DoShift(Token::Value op, HBitwiseBinaryOperation* instr); |
| 2328 LInstruction* DoArithmeticD(Token::Value op, | 2330 LInstruction* DoArithmeticD(Token::Value op, |
| 2329 HArithmeticBinaryOperation* instr); | 2331 HArithmeticBinaryOperation* instr); |
| 2330 LInstruction* DoArithmeticT(Token::Value op, | 2332 LInstruction* DoArithmeticT(Token::Value op, |
| 2331 HArithmeticBinaryOperation* instr); | 2333 HArithmeticBinaryOperation* instr); |
| 2332 | 2334 |
| 2333 LChunk* chunk_; | 2335 LChunk* chunk_; |
| 2334 CompilationInfo* info_; | 2336 CompilationInfo* info_; |
| 2335 HGraph* const graph_; | 2337 HGraph* const graph_; |
| 2338 Zone* zone_; |
| 2336 Status status_; | 2339 Status status_; |
| 2337 HInstruction* current_instruction_; | 2340 HInstruction* current_instruction_; |
| 2338 HBasicBlock* current_block_; | 2341 HBasicBlock* current_block_; |
| 2339 HBasicBlock* next_block_; | 2342 HBasicBlock* next_block_; |
| 2340 int argument_count_; | 2343 int argument_count_; |
| 2341 LAllocator* allocator_; | 2344 LAllocator* allocator_; |
| 2342 int position_; | 2345 int position_; |
| 2343 LInstruction* instruction_pending_deoptimization_environment_; | 2346 LInstruction* instruction_pending_deoptimization_environment_; |
| 2344 int pending_deoptimization_ast_id_; | 2347 int pending_deoptimization_ast_id_; |
| 2345 | 2348 |
| 2346 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); | 2349 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); |
| 2347 }; | 2350 }; |
| 2348 | 2351 |
| 2349 #undef DECLARE_HYDROGEN_ACCESSOR | 2352 #undef DECLARE_HYDROGEN_ACCESSOR |
| 2350 #undef DECLARE_CONCRETE_INSTRUCTION | 2353 #undef DECLARE_CONCRETE_INSTRUCTION |
| 2351 | 2354 |
| 2352 } } // namespace v8::internal | 2355 } } // namespace v8::internal |
| 2353 | 2356 |
| 2354 #endif // V8_ARM_LITHIUM_ARM_H_ | 2357 #endif // V8_ARM_LITHIUM_ARM_H_ |
| OLD | NEW |