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

Side by Side Diff: src/hydrogen.h

Issue 10534139: One Zone per CompilationInfo. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 6 months 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
OLDNEW
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
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
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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
381 SetOncePointer<HConstant> constant_1_; 382 SetOncePointer<HConstant> constant_1_;
382 SetOncePointer<HConstant> constant_minus1_; 383 SetOncePointer<HConstant> constant_minus1_;
383 SetOncePointer<HConstant> constant_true_; 384 SetOncePointer<HConstant> constant_true_;
384 SetOncePointer<HConstant> constant_false_; 385 SetOncePointer<HConstant> constant_false_;
385 SetOncePointer<HConstant> constant_hole_; 386 SetOncePointer<HConstant> constant_hole_;
386 SetOncePointer<HArgumentsObject> arguments_object_; 387 SetOncePointer<HArgumentsObject> arguments_object_;
387 388
388 SetOncePointer<HBasicBlock> osr_loop_entry_; 389 SetOncePointer<HBasicBlock> osr_loop_entry_;
389 SetOncePointer<ZoneList<HUnknownOSRValue*> > osr_values_; 390 SetOncePointer<ZoneList<HUnknownOSRValue*> > osr_values_;
390 391
392 CompilationInfo* info_;
391 Zone* zone_; 393 Zone* zone_;
392 394
393 bool is_recursive_; 395 bool is_recursive_;
394 396
395 DISALLOW_COPY_AND_ASSIGN(HGraph); 397 DISALLOW_COPY_AND_ASSIGN(HGraph);
396 }; 398 };
397 399
398 400
399 Zone* HBasicBlock::zone() const { return graph_->zone(); } 401 Zone* HBasicBlock::zone() const { return graph_->zone(); }
400 402
(...skipping 430 matching lines...) Expand 10 before | Expand all | Expand 10 after
831 833
832 // Search the break stack for a break or continue target. 834 // Search the break stack for a break or continue target.
833 HBasicBlock* Get(BreakableStatement* stmt, BreakType type, int* drop_extra); 835 HBasicBlock* Get(BreakableStatement* stmt, BreakType type, int* drop_extra);
834 836
835 private: 837 private:
836 BreakAndContinueInfo* info_; 838 BreakAndContinueInfo* info_;
837 HGraphBuilder* owner_; 839 HGraphBuilder* owner_;
838 BreakAndContinueScope* next_; 840 BreakAndContinueScope* next_;
839 }; 841 };
840 842
841 HGraphBuilder(CompilationInfo* info, TypeFeedbackOracle* oracle, Zone* zone); 843 HGraphBuilder(CompilationInfo* info, TypeFeedbackOracle* oracle);
842 844
843 HGraph* CreateGraph(); 845 HGraph* CreateGraph();
844 846
845 // Simple accessors. 847 // Simple accessors.
846 HGraph* graph() const { return graph_; } 848 HGraph* graph() const { return graph_; }
847 BreakAndContinueScope* break_scope() const { return break_scope_; } 849 BreakAndContinueScope* break_scope() const { return break_scope_; }
848 void set_break_scope(BreakAndContinueScope* head) { break_scope_ = head; } 850 void set_break_scope(BreakAndContinueScope* head) { break_scope_ = head; }
849 851
850 HBasicBlock* current_block() const { return current_block_; } 852 HBasicBlock* current_block() const { return current_block_; }
851 void set_current_block(HBasicBlock* block) { current_block_ = block; } 853 void set_current_block(HBasicBlock* block) { current_block_ = block; }
(...skipping 579 matching lines...) Expand 10 before | Expand all | Expand 10 after
1431 const char* filename_; 1433 const char* filename_;
1432 HeapStringAllocator string_allocator_; 1434 HeapStringAllocator string_allocator_;
1433 StringStream trace_; 1435 StringStream trace_;
1434 int indent_; 1436 int indent_;
1435 }; 1437 };
1436 1438
1437 1439
1438 } } // namespace v8::internal 1440 } } // namespace v8::internal
1439 1441
1440 #endif // V8_HYDROGEN_H_ 1442 #endif // V8_HYDROGEN_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698