xo-jit: + display + display_string

This commit is contained in:
Roland Conybeare 2024-06-14 15:07:08 -04:00
commit 4514901459
2 changed files with 19 additions and 1 deletions

View file

@ -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*/

View file

@ -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*/