The Great Embooleanating

A large number of functions had return values and/or arguments changed
to use ``bool`` types instead of ``int``.
This commit is contained in:
Tim Wojtulewicz 2020-03-11 10:41:46 -07:00 committed by Robin Sommer
parent 3c470ffe13
commit fd5e15b116
145 changed files with 1288 additions and 1331 deletions

View file

@ -35,7 +35,7 @@ public:
bool SetLocationInfo(const Location* start, const Location* end) override;
// True if the statement has no side effects, false otherwise.
virtual int IsPure() const;
virtual bool IsPure() const;
StmtList* AsStmtList()
{
@ -131,7 +131,7 @@ protected:
virtual IntrusivePtr<Val> DoExec(Frame* f, Val* v, stmt_flow_type& flow) const;
int IsPure() const override;
bool IsPure() const override;
IntrusivePtr<Expr> e;
};
@ -150,7 +150,7 @@ public:
protected:
IntrusivePtr<Val> DoExec(Frame* f, Val* v, stmt_flow_type& flow) const override;
int IsPure() const override;
bool IsPure() const override;
IntrusivePtr<Stmt> s1;
IntrusivePtr<Stmt> s2;
@ -195,7 +195,7 @@ public:
protected:
IntrusivePtr<Val> DoExec(Frame* f, Val* v, stmt_flow_type& flow) const override;
int IsPure() const override;
bool IsPure() const override;
// Initialize composite hash and case label map.
void Init();
@ -227,7 +227,7 @@ class AddStmt : public ExprStmt {
public:
explicit AddStmt(IntrusivePtr<Expr> e);
int IsPure() const override;
bool IsPure() const override;
IntrusivePtr<Val> Exec(Frame* f, stmt_flow_type& flow) const override;
TraversalCode Traverse(TraversalCallback* cb) const override;
@ -237,7 +237,7 @@ class DelStmt : public ExprStmt {
public:
explicit DelStmt(IntrusivePtr<Expr> e);
int IsPure() const override;
bool IsPure() const override;
IntrusivePtr<Val> Exec(Frame* f, stmt_flow_type& flow) const override;
TraversalCode Traverse(TraversalCallback* cb) const override;
@ -261,7 +261,7 @@ public:
WhileStmt(IntrusivePtr<Expr> loop_condition, IntrusivePtr<Stmt> body);
~WhileStmt() override;
int IsPure() const override;
bool IsPure() const override;
void Describe(ODesc* d) const override;
@ -287,7 +287,7 @@ public:
const Expr* LoopExpr() const { return e.get(); }
const Stmt* LoopBody() const { return body.get(); }
int IsPure() const override;
bool IsPure() const override;
void Describe(ODesc* d) const override;
@ -308,7 +308,7 @@ public:
NextStmt() : Stmt(STMT_NEXT) { }
IntrusivePtr<Val> Exec(Frame* f, stmt_flow_type& flow) const override;
int IsPure() const override;
bool IsPure() const override;
void Describe(ODesc* d) const override;
@ -322,7 +322,7 @@ public:
BreakStmt() : Stmt(STMT_BREAK) { }
IntrusivePtr<Val> Exec(Frame* f, stmt_flow_type& flow) const override;
int IsPure() const override;
bool IsPure() const override;
void Describe(ODesc* d) const override;
@ -336,7 +336,7 @@ public:
FallthroughStmt() : Stmt(STMT_FALLTHROUGH) { }
IntrusivePtr<Val> Exec(Frame* f, stmt_flow_type& flow) const override;
int IsPure() const override;
bool IsPure() const override;
void Describe(ODesc* d) const override;
@ -369,7 +369,7 @@ public:
TraversalCode Traverse(TraversalCallback* cb) const override;
protected:
int IsPure() const override;
bool IsPure() const override;
stmt_list stmts;
};
@ -414,7 +414,7 @@ public:
NullStmt() : Stmt(STMT_NULL) { }
IntrusivePtr<Val> Exec(Frame* f, stmt_flow_type& flow) const override;
int IsPure() const override;
bool IsPure() const override;
void Describe(ODesc* d) const override;
@ -430,7 +430,7 @@ public:
~WhenStmt() override;
IntrusivePtr<Val> Exec(Frame* f, stmt_flow_type& flow) const override;
int IsPure() const override;
bool IsPure() const override;
const Expr* Cond() const { return cond.get(); }
const Stmt* Body() const { return s1.get(); }