xo-jit: track new make_apply interface
This commit is contained in:
parent
32c7451191
commit
8d122425a0
2 changed files with 4 additions and 4 deletions
|
|
@ -104,7 +104,7 @@ main() {
|
|||
auto fn = make_primitive("sqrt", &sqrt);
|
||||
auto arg = make_constant(2.0);
|
||||
|
||||
auto call = make_apply(fn, arg);
|
||||
auto call = make_apply(fn, {arg});
|
||||
|
||||
log && log(xtag("expr", call));
|
||||
|
||||
|
|
@ -129,8 +129,8 @@ main() {
|
|||
auto cos = make_primitive("cos", ::cos);
|
||||
|
||||
auto x_var = make_var("x");
|
||||
auto call1 = make_apply(cos, x_var); /* (cos x) */
|
||||
auto call2 = make_apply(sin, call1); /* (sin (cos x)) */
|
||||
auto call1 = make_apply(cos, {x_var}); /* (cos x) */
|
||||
auto call2 = make_apply(sin, {call1}); /* (sin (cos x)) */
|
||||
|
||||
/* (define (lm_1 x) (sin (cos x))) */
|
||||
auto lambda = make_lambda("lm_1",
|
||||
|
|
|
|||
|
|
@ -464,7 +464,7 @@ namespace xo {
|
|||
return this->codegen_lambda(Lambda::from(expr));
|
||||
case exprtype::variable:
|
||||
return this->codegen_variable(Variable::from(expr));
|
||||
case exprtype::if_expr:
|
||||
case exprtype::ifexpr:
|
||||
return this->codegen_ifexpr(IfExpr::from(expr));
|
||||
case exprtype::invalid:
|
||||
case exprtype::n_expr:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue