xo-jit: + display + display_string
This commit is contained in:
parent
731b91889c
commit
4514901459
2 changed files with 19 additions and 1 deletions
|
|
@ -59,6 +59,9 @@ namespace xo {
|
|||
|
||||
llvm::Value * codegen(ref::brw<Expression> expr);
|
||||
|
||||
virtual void display(std::ostream & os) const;
|
||||
virtual std::string display_string() const;
|
||||
|
||||
private:
|
||||
Jit();
|
||||
|
||||
|
|
@ -83,7 +86,13 @@ namespace xo {
|
|||
* corresponding llvm interactor
|
||||
**/
|
||||
std::map<std::string, llvm::Value*> nested_env_;
|
||||
};
|
||||
}; /*Jit*/
|
||||
|
||||
inline std::ostream &
|
||||
operator<<(std::ostream & os, const Jit & x) {
|
||||
x.display(os);
|
||||
return os;
|
||||
}
|
||||
} /*namespace jit*/
|
||||
} /*namespace xo*/
|
||||
|
||||
|
|
|
|||
|
|
@ -244,6 +244,15 @@ namespace xo {
|
|||
return nullptr;
|
||||
} /*codegen*/
|
||||
|
||||
void
|
||||
Jit::display(std::ostream & os) const {
|
||||
os << "<Jit>";
|
||||
}
|
||||
|
||||
std::string
|
||||
Jit::display_string() const {
|
||||
return tostr(*this);
|
||||
}
|
||||
} /*namespace jit*/
|
||||
} /*namespace xo*/
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue