Commit b2f61492 authored by Kevin Modzelewski's avatar Kevin Modzelewski Committed by Kevin Modzelewski

Incorporate Marius's feedback

parent 43992f58
......@@ -36,7 +36,6 @@ public:
virtual ~BBAnalyzer() {}
virtual T merge(T from, T into) const = 0;
virtual T mergeBlank(T into) const = 0;
virtual void processBB(Map& starting, CFGBlock* block) const = 0;
};
......
......@@ -36,7 +36,7 @@ namespace pyston {
class LivenessBBVisitor : public NoopASTVisitor {
private:
struct Status {
enum Usage {
enum Usage : char {
NONE,
USED,
DEFINED,
......@@ -231,10 +231,6 @@ public:
return DefinednessAnalysis::PotentiallyDefined;
}
virtual void processBB(Map& starting, CFGBlock* block) const;
virtual DefinitionLevel mergeBlank(DefinitionLevel into) const {
assert(into != DefinednessAnalysis::Undefined);
return DefinednessAnalysis::PotentiallyDefined;
}
};
class DefinednessVisitor : public ASTVisitor {
......
......@@ -58,7 +58,7 @@ class PhiAnalysis;
class DefinednessAnalysis {
public:
enum DefinitionLevel {
enum DefinitionLevel : char {
Unknown,
Undefined,
PotentiallyDefined,
......@@ -96,12 +96,10 @@ public:
PhiAnalysis(VRegMap<DefinednessAnalysis::DefinitionLevel> initial_map, CFGBlock* initial_block,
bool initials_need_phis, LivenessAnalysis* liveness, ScopeInfo* scope_info);
// TODO: convert these to taking vregs
bool isRequired(int vreg, CFGBlock* block);
bool isRequiredAfter(int vreg, CFGBlock* block);
const VRegSet& getAllRequiredAfter(CFGBlock* block);
const VRegSet& getAllRequiredFor(CFGBlock* block);
// TODO: convert these to taking vregs
// If "name" may be undefined at the beginning of any immediate successor block of "block":
bool isPotentiallyUndefinedAfter(int vreg, CFGBlock* block);
// If "name" may be undefined at the beginning of "block"
......
......@@ -203,7 +203,7 @@ public:
class VRegSet {
private:
// TODO: switch just to a bool*
// TODO: switch just to a bool*?
std::vector<bool> v;
public:
......@@ -259,7 +259,7 @@ public:
template <typename T> class VRegMap {
private:
// TODO: switch just to a T*
// TODO: switch just to a T*?
std::vector<T> v;
public:
......
......@@ -347,7 +347,7 @@ public:
// The function pointer to the generated code. For convenience, it can be accessed
// as one of many different types.
// TODO: we instead make these functions that make sure that the function actually
// TODO: we instead make these accessor-functions that make sure that the code actually
// matches the C signature that we would return.
union {
Box* (*call)(Box*, Box*, Box*, Box**);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment