| 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 226 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 237 | 237 | 
| 238   ZoneList<HBasicBlock*> back_edges_; | 238   ZoneList<HBasicBlock*> back_edges_; | 
| 239   HBasicBlock* loop_header_; | 239   HBasicBlock* loop_header_; | 
| 240   ZoneList<HBasicBlock*> blocks_; | 240   ZoneList<HBasicBlock*> blocks_; | 
| 241   HStackCheck* stack_check_; | 241   HStackCheck* stack_check_; | 
| 242 }; | 242 }; | 
| 243 | 243 | 
| 244 class BoundsCheckTable; | 244 class BoundsCheckTable; | 
| 245 class HGraph: public ZoneObject { | 245 class HGraph: public ZoneObject { | 
| 246  public: | 246  public: | 
| 247   HGraph(CompilationInfo* info, Zone* zone); | 247   explicit HGraph(CompilationInfo* info); | 
| 248 | 248 | 
| 249   Isolate* isolate() { return isolate_; } | 249   Isolate* isolate() { return isolate_; } | 
| 250   Zone* zone() const { return zone_; } | 250   Zone* zone() const { return zone_; } | 
|  | 251   CompilationInfo* info() const { return info_; } | 
| 251 | 252 | 
| 252   const ZoneList<HBasicBlock*>* blocks() const { return &blocks_; } | 253   const ZoneList<HBasicBlock*>* blocks() const { return &blocks_; } | 
| 253   const ZoneList<HPhi*>* phi_list() const { return phi_list_; } | 254   const ZoneList<HPhi*>* phi_list() const { return phi_list_; } | 
| 254   HBasicBlock* entry_block() const { return entry_block_; } | 255   HBasicBlock* entry_block() const { return entry_block_; } | 
| 255   HEnvironment* start_environment() const { return start_environment_; } | 256   HEnvironment* start_environment() const { return start_environment_; } | 
| 256 | 257 | 
| 257   void InitializeInferredTypes(); | 258   void InitializeInferredTypes(); | 
| 258   void InsertTypeConversions(); | 259   void InsertTypeConversions(); | 
| 259   void InsertRepresentationChanges(); | 260   void InsertRepresentationChanges(); | 
| 260   void MarkDeoptimizeOnUndefined(); | 261   void MarkDeoptimizeOnUndefined(); | 
| (...skipping 12 matching lines...) Expand all  Loading... | 
| 273   // Returns false if there are phi-uses of the arguments-object | 274   // Returns false if there are phi-uses of the arguments-object | 
| 274   // which are not supported by the optimizing compiler. | 275   // which are not supported by the optimizing compiler. | 
| 275   bool CheckArgumentsPhiUses(); | 276   bool CheckArgumentsPhiUses(); | 
| 276 | 277 | 
| 277   // Returns false if there are phi-uses of an uninitialized const | 278   // Returns false if there are phi-uses of an uninitialized const | 
| 278   // which are not supported by the optimizing compiler. | 279   // which are not supported by the optimizing compiler. | 
| 279   bool CheckConstPhiUses(); | 280   bool CheckConstPhiUses(); | 
| 280 | 281 | 
| 281   void CollectPhis(); | 282   void CollectPhis(); | 
| 282 | 283 | 
| 283   Handle<Code> Compile(CompilationInfo* info, Zone* zone); | 284   Handle<Code> Compile(); | 
| 284 | 285 | 
| 285   void set_undefined_constant(HConstant* constant) { | 286   void set_undefined_constant(HConstant* constant) { | 
| 286     undefined_constant_.set(constant); | 287     undefined_constant_.set(constant); | 
| 287   } | 288   } | 
| 288   HConstant* GetConstantUndefined() const { return undefined_constant_.get(); } | 289   HConstant* GetConstantUndefined() const { return undefined_constant_.get(); } | 
| 289   HConstant* GetConstant1(); | 290   HConstant* GetConstant1(); | 
| 290   HConstant* GetConstantMinus1(); | 291   HConstant* GetConstantMinus1(); | 
| 291   HConstant* GetConstantTrue(); | 292   HConstant* GetConstantTrue(); | 
| 292   HConstant* GetConstantFalse(); | 293   HConstant* GetConstantFalse(); | 
| 293   HConstant* GetConstantHole(); | 294   HConstant* GetConstantHole(); | 
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 373   SetOncePointer<HConstant> constant_1_; | 374   SetOncePointer<HConstant> constant_1_; | 
| 374   SetOncePointer<HConstant> constant_minus1_; | 375   SetOncePointer<HConstant> constant_minus1_; | 
| 375   SetOncePointer<HConstant> constant_true_; | 376   SetOncePointer<HConstant> constant_true_; | 
| 376   SetOncePointer<HConstant> constant_false_; | 377   SetOncePointer<HConstant> constant_false_; | 
| 377   SetOncePointer<HConstant> constant_hole_; | 378   SetOncePointer<HConstant> constant_hole_; | 
| 378   SetOncePointer<HArgumentsObject> arguments_object_; | 379   SetOncePointer<HArgumentsObject> arguments_object_; | 
| 379 | 380 | 
| 380   SetOncePointer<HBasicBlock> osr_loop_entry_; | 381   SetOncePointer<HBasicBlock> osr_loop_entry_; | 
| 381   SetOncePointer<ZoneList<HUnknownOSRValue*> > osr_values_; | 382   SetOncePointer<ZoneList<HUnknownOSRValue*> > osr_values_; | 
| 382 | 383 | 
|  | 384   CompilationInfo* info_; | 
| 383   Zone* zone_; | 385   Zone* zone_; | 
| 384 | 386 | 
| 385   bool is_recursive_; | 387   bool is_recursive_; | 
| 386 | 388 | 
| 387   DISALLOW_COPY_AND_ASSIGN(HGraph); | 389   DISALLOW_COPY_AND_ASSIGN(HGraph); | 
| 388 }; | 390 }; | 
| 389 | 391 | 
| 390 | 392 | 
| 391 Zone* HBasicBlock::zone() const { return graph_->zone(); } | 393 Zone* HBasicBlock::zone() const { return graph_->zone(); } | 
| 392 | 394 | 
| (...skipping 430 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 823 | 825 | 
| 824     // Search the break stack for a break or continue target. | 826     // Search the break stack for a break or continue target. | 
| 825     HBasicBlock* Get(BreakableStatement* stmt, BreakType type, int* drop_extra); | 827     HBasicBlock* Get(BreakableStatement* stmt, BreakType type, int* drop_extra); | 
| 826 | 828 | 
| 827    private: | 829    private: | 
| 828     BreakAndContinueInfo* info_; | 830     BreakAndContinueInfo* info_; | 
| 829     HGraphBuilder* owner_; | 831     HGraphBuilder* owner_; | 
| 830     BreakAndContinueScope* next_; | 832     BreakAndContinueScope* next_; | 
| 831   }; | 833   }; | 
| 832 | 834 | 
| 833   HGraphBuilder(CompilationInfo* info, TypeFeedbackOracle* oracle, Zone* zone); | 835   HGraphBuilder(CompilationInfo* info, TypeFeedbackOracle* oracle); | 
| 834 | 836 | 
| 835   HGraph* CreateGraph(); | 837   HGraph* CreateGraph(); | 
| 836 | 838 | 
| 837   // Simple accessors. | 839   // Simple accessors. | 
| 838   HGraph* graph() const { return graph_; } | 840   HGraph* graph() const { return graph_; } | 
| 839   BreakAndContinueScope* break_scope() const { return break_scope_; } | 841   BreakAndContinueScope* break_scope() const { return break_scope_; } | 
| 840   void set_break_scope(BreakAndContinueScope* head) { break_scope_ = head; } | 842   void set_break_scope(BreakAndContinueScope* head) { break_scope_ = head; } | 
| 841 | 843 | 
| 842   HBasicBlock* current_block() const { return current_block_; } | 844   HBasicBlock* current_block() const { return current_block_; } | 
| 843   void set_current_block(HBasicBlock* block) { current_block_ = block; } | 845   void set_current_block(HBasicBlock* block) { current_block_ = block; } | 
| (...skipping 581 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1425   const char* filename_; | 1427   const char* filename_; | 
| 1426   HeapStringAllocator string_allocator_; | 1428   HeapStringAllocator string_allocator_; | 
| 1427   StringStream trace_; | 1429   StringStream trace_; | 
| 1428   int indent_; | 1430   int indent_; | 
| 1429 }; | 1431 }; | 
| 1430 | 1432 | 
| 1431 | 1433 | 
| 1432 } }  // namespace v8::internal | 1434 } }  // namespace v8::internal | 
| 1433 | 1435 | 
| 1434 #endif  // V8_HYDROGEN_H_ | 1436 #endif  // V8_HYDROGEN_H_ | 
| OLD | NEW | 
|---|