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

Unified Diff: src/hydrogen-environment-liveness.h

Issue 17587008: Refactor Hydrogen environment liveness analysis into an HPhase. (Closed) Base URL: git@github.com:v8/v8.git@master
Patch Set: Created 7 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 side-by-side diff with in-line comments
Download patch
Index: src/hydrogen-environment-liveness.h
diff --git a/src/hydrogen-environment-liveness.h b/src/hydrogen-environment-liveness.h
index 484e56d52eb0d54f31106a8439baa285dd6a763d..3ad91bdec795e4afdde955dbd24b747d31d53aa7 100644
--- a/src/hydrogen-environment-liveness.h
+++ b/src/hydrogen-environment-liveness.h
@@ -45,9 +45,9 @@ namespace internal {
// HOptimizedGraphBuilder::IsEligibleForEnvironmentLivenessAnalysis().
class EnvironmentSlotLivenessAnalyzer {
public:
- explicit EnvironmentSlotLivenessAnalyzer(HGraph* graph);
+ EnvironmentSlotLivenessAnalyzer(HGraph* graph, Zone* phase_zone);
- void AnalyzeAndTrim();
+ void Run();
private:
void ZapEnvironmentSlot(int index, HSimulate* simulate);
@@ -56,13 +56,11 @@ class EnvironmentSlotLivenessAnalyzer {
void UpdateLivenessAtBlockEnd(HBasicBlock* block, BitVector* live);
void UpdateLivenessAtInstruction(HInstruction* instr, BitVector* live);
- Zone* zone() { return &zone_; }
+ Zone* phase_zone() { return phase_zone_; }
HGraph* graph_;
- // Use a dedicated Zone for this phase, with a ZoneScope to ensure it
- // gets freed.
- Zone zone_;
- ZoneScope zone_scope_;
+ Zone* phase_zone_;
+ ZoneScope phase_zone_scope_;
int block_count_;

Powered by Google App Engine
This is Rietveld 408576698