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

Side by Side Diff: src/hydrogen.h

Issue 18034003: Add templatized Run() method for Hydrogen phases. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 5 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
« no previous file with comments | « no previous file | src/hydrogen.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 409 matching lines...) Expand 10 before | Expand all | Expand 10 after
420 if (uint32_instructions_ == NULL) { 420 if (uint32_instructions_ == NULL) {
421 uint32_instructions_ = new(zone()) ZoneList<HInstruction*>(4, zone()); 421 uint32_instructions_ = new(zone()) ZoneList<HInstruction*>(4, zone());
422 } 422 }
423 uint32_instructions_->Add(instr, zone()); 423 uint32_instructions_->Add(instr, zone());
424 } 424 }
425 425
426 private: 426 private:
427 HConstant* GetConstant(SetOncePointer<HConstant>* pointer, 427 HConstant* GetConstant(SetOncePointer<HConstant>* pointer,
428 int32_t integer_value); 428 int32_t integer_value);
429 429
430 template<class Phase>
431 void Run() { Phase phase(this); phase.Run(); }
432
430 void MarkLive(HValue* ref, HValue* instr, ZoneList<HValue*>* worklist); 433 void MarkLive(HValue* ref, HValue* instr, ZoneList<HValue*>* worklist);
431 void MarkLiveInstructions(); 434 void MarkLiveInstructions();
432 void RemoveDeadInstructions(); 435 void RemoveDeadInstructions();
433 void MarkAsDeoptimizingRecursively(HBasicBlock* block); 436 void MarkAsDeoptimizingRecursively(HBasicBlock* block);
434 void NullifyUnreachableInstructions(); 437 void NullifyUnreachableInstructions();
435 void InsertTypeConversions(HInstruction* instr); 438 void InsertTypeConversions(HInstruction* instr);
436 void PropagateMinusZeroChecks(HValue* value, BitVector* visited); 439 void PropagateMinusZeroChecks(HValue* value, BitVector* visited);
437 void RecursivelyMarkPhiDeoptimizeOnUndefined(HPhi* phi); 440 void RecursivelyMarkPhiDeoptimizeOnUndefined(HPhi* phi);
438 void InsertRepresentationChangeForUse(HValue* value, 441 void InsertRepresentationChangeForUse(HValue* value,
439 HValue* use_value, 442 HValue* use_value,
(...skipping 1609 matching lines...) Expand 10 before | Expand all | Expand 10 after
2049 EmbeddedVector<char, 64> filename_; 2052 EmbeddedVector<char, 64> filename_;
2050 HeapStringAllocator string_allocator_; 2053 HeapStringAllocator string_allocator_;
2051 StringStream trace_; 2054 StringStream trace_;
2052 int indent_; 2055 int indent_;
2053 }; 2056 };
2054 2057
2055 2058
2056 } } // namespace v8::internal 2059 } } // namespace v8::internal
2057 2060
2058 #endif // V8_HYDROGEN_H_ 2061 #endif // V8_HYDROGEN_H_
OLDNEW
« no previous file with comments | « no previous file | src/hydrogen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698