public class OptimizerStats extends Object
Constructor and Description |
---|
OptimizerStats(String name) |
Modifier and Type | Method and Description |
---|---|
void |
add(OptimizerStats childStats)
Add a child stats object.
|
boolean |
didChange() |
List<OptimizerStats> |
getChildren()
Retrieves an immutable list of child stats objects.
|
String |
getName() |
int |
getNumMods() |
int |
getNumVisits() |
String |
prettyPrint()
Return a human-readable string representing the values of all statistics.
|
OptimizerStats |
recordModified()
Increment the number of times the tree was modified.
|
OptimizerStats |
recordModified(int numMods)
Increment the number of times the tree was modified.
|
OptimizerStats |
recordVisit()
Increment the number of times tree nodes were visited.
|
OptimizerStats |
recordVisits(int numVisits)
Increment the number of times tree nodes were visited.
|
public OptimizerStats(String name)
public void add(OptimizerStats childStats)
public boolean didChange()
true
if the AST changed during this pass.public List<OptimizerStats> getChildren()
public String getName()
public int getNumMods()
public int getNumVisits()
public String prettyPrint()
public OptimizerStats recordModified()
public OptimizerStats recordModified(int numMods)
numMods
- the number of changes made to the AST.public OptimizerStats recordVisit()
public OptimizerStats recordVisits(int numVisits)
Copyright © 2018. All rights reserved.