| 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 2303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2314 ZoneList<Handle<JSFunction> > inlined_closures_; | 2314 ZoneList<Handle<JSFunction> > inlined_closures_; |
| 2315 }; | 2315 }; |
| 2316 | 2316 |
| 2317 | 2317 |
| 2318 class LChunkBuilder BASE_EMBEDDED { | 2318 class LChunkBuilder BASE_EMBEDDED { |
| 2319 public: | 2319 public: |
| 2320 LChunkBuilder(CompilationInfo* info, HGraph* graph, LAllocator* allocator) | 2320 LChunkBuilder(CompilationInfo* info, HGraph* graph, LAllocator* allocator) |
| 2321 : chunk_(NULL), | 2321 : chunk_(NULL), |
| 2322 info_(info), | 2322 info_(info), |
| 2323 graph_(graph), | 2323 graph_(graph), |
| 2324 isolate_(graph->isolate()), | 2324 zone_(graph->isolate()->zone()), |
| 2325 status_(UNUSED), | 2325 status_(UNUSED), |
| 2326 current_instruction_(NULL), | 2326 current_instruction_(NULL), |
| 2327 current_block_(NULL), | 2327 current_block_(NULL), |
| 2328 next_block_(NULL), | 2328 next_block_(NULL), |
| 2329 argument_count_(0), | 2329 argument_count_(0), |
| 2330 allocator_(allocator), | 2330 allocator_(allocator), |
| 2331 position_(RelocInfo::kNoPosition), | 2331 position_(RelocInfo::kNoPosition), |
| 2332 instruction_pending_deoptimization_environment_(NULL), | 2332 instruction_pending_deoptimization_environment_(NULL), |
| 2333 pending_deoptimization_ast_id_(AstNode::kNoNumber) { } | 2333 pending_deoptimization_ast_id_(AstNode::kNoNumber) { } |
| 2334 | 2334 |
| 2335 // Build the sequence for the graph. | 2335 // Build the sequence for the graph. |
| 2336 LChunk* Build(); | 2336 LChunk* Build(); |
| 2337 | 2337 |
| 2338 // Declare methods that deal with the individual node types. | 2338 // Declare methods that deal with the individual node types. |
| 2339 #define DECLARE_DO(type) LInstruction* Do##type(H##type* node); | 2339 #define DECLARE_DO(type) LInstruction* Do##type(H##type* node); |
| 2340 HYDROGEN_CONCRETE_INSTRUCTION_LIST(DECLARE_DO) | 2340 HYDROGEN_CONCRETE_INSTRUCTION_LIST(DECLARE_DO) |
| 2341 #undef DECLARE_DO | 2341 #undef DECLARE_DO |
| 2342 | 2342 |
| 2343 private: | 2343 private: |
| 2344 enum Status { | 2344 enum Status { |
| 2345 UNUSED, | 2345 UNUSED, |
| 2346 BUILDING, | 2346 BUILDING, |
| 2347 DONE, | 2347 DONE, |
| 2348 ABORTED | 2348 ABORTED |
| 2349 }; | 2349 }; |
| 2350 | 2350 |
| 2351 LChunk* chunk() const { return chunk_; } | 2351 LChunk* chunk() const { return chunk_; } |
| 2352 CompilationInfo* info() const { return info_; } | 2352 CompilationInfo* info() const { return info_; } |
| 2353 HGraph* graph() const { return graph_; } | 2353 HGraph* graph() const { return graph_; } |
| 2354 Zone* zone() { return isolate_->zone(); } | 2354 Zone* zone() { return zone_; } |
| 2355 | 2355 |
| 2356 bool is_unused() const { return status_ == UNUSED; } | 2356 bool is_unused() const { return status_ == UNUSED; } |
| 2357 bool is_building() const { return status_ == BUILDING; } | 2357 bool is_building() const { return status_ == BUILDING; } |
| 2358 bool is_done() const { return status_ == DONE; } | 2358 bool is_done() const { return status_ == DONE; } |
| 2359 bool is_aborted() const { return status_ == ABORTED; } | 2359 bool is_aborted() const { return status_ == ABORTED; } |
| 2360 | 2360 |
| 2361 void Abort(const char* format, ...); | 2361 void Abort(const char* format, ...); |
| 2362 | 2362 |
| 2363 // Methods for getting operands for Use / Define / Temp. | 2363 // Methods for getting operands for Use / Define / Temp. |
| 2364 LUnallocated* ToUnallocated(Register reg); | 2364 LUnallocated* ToUnallocated(Register reg); |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2453 void DoBasicBlock(HBasicBlock* block, HBasicBlock* next_block); | 2453 void DoBasicBlock(HBasicBlock* block, HBasicBlock* next_block); |
| 2454 LInstruction* DoShift(Token::Value op, HBitwiseBinaryOperation* instr); | 2454 LInstruction* DoShift(Token::Value op, HBitwiseBinaryOperation* instr); |
| 2455 LInstruction* DoArithmeticD(Token::Value op, | 2455 LInstruction* DoArithmeticD(Token::Value op, |
| 2456 HArithmeticBinaryOperation* instr); | 2456 HArithmeticBinaryOperation* instr); |
| 2457 LInstruction* DoArithmeticT(Token::Value op, | 2457 LInstruction* DoArithmeticT(Token::Value op, |
| 2458 HArithmeticBinaryOperation* instr); | 2458 HArithmeticBinaryOperation* instr); |
| 2459 | 2459 |
| 2460 LChunk* chunk_; | 2460 LChunk* chunk_; |
| 2461 CompilationInfo* info_; | 2461 CompilationInfo* info_; |
| 2462 HGraph* const graph_; | 2462 HGraph* const graph_; |
| 2463 Isolate* isolate_; | 2463 Zone* zone_; |
| 2464 Status status_; | 2464 Status status_; |
| 2465 HInstruction* current_instruction_; | 2465 HInstruction* current_instruction_; |
| 2466 HBasicBlock* current_block_; | 2466 HBasicBlock* current_block_; |
| 2467 HBasicBlock* next_block_; | 2467 HBasicBlock* next_block_; |
| 2468 int argument_count_; | 2468 int argument_count_; |
| 2469 LAllocator* allocator_; | 2469 LAllocator* allocator_; |
| 2470 int position_; | 2470 int position_; |
| 2471 LInstruction* instruction_pending_deoptimization_environment_; | 2471 LInstruction* instruction_pending_deoptimization_environment_; |
| 2472 int pending_deoptimization_ast_id_; | 2472 int pending_deoptimization_ast_id_; |
| 2473 | 2473 |
| 2474 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); | 2474 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); |
| 2475 }; | 2475 }; |
| 2476 | 2476 |
| 2477 #undef DECLARE_HYDROGEN_ACCESSOR | 2477 #undef DECLARE_HYDROGEN_ACCESSOR |
| 2478 #undef DECLARE_CONCRETE_INSTRUCTION | 2478 #undef DECLARE_CONCRETE_INSTRUCTION |
| 2479 | 2479 |
| 2480 } } // namespace v8::internal | 2480 } } // namespace v8::internal |
| 2481 | 2481 |
| 2482 #endif // V8_IA32_LITHIUM_IA32_H_ | 2482 #endif // V8_IA32_LITHIUM_IA32_H_ |
| OLD | NEW |