From c9a061abf0a283123046051e627afa72769d1b31 Mon Sep 17 00:00:00 2001 From: Roland Conybeare Date: Wed, 19 Jun 2024 18:19:25 -0400 Subject: [PATCH] xo-jit: supply explicit_symbol_def to make_primitive() --- example/ex1/ex1.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/example/ex1/ex1.cpp b/example/ex1/ex1.cpp index 3929bcfa..6f5a7c35 100644 --- a/example/ex1/ex1.cpp +++ b/example/ex1/ex1.cpp @@ -81,7 +81,8 @@ main() { } { - auto expr = make_primitive("sqrt", &sqrt); + auto expr = make_primitive("sqrt", &sqrt, + false /*!explicit_symbol_def*/); log && log(xtag("expr", expr)); @@ -102,7 +103,8 @@ main() { { /* (sqrt 2) */ - auto fn = make_primitive("sqrt", &sqrt); + auto fn = make_primitive("sqrt", &sqrt, + false /*!explicit_symbol_def*/); auto arg = make_constant(2.0); auto call = make_apply(fn, {arg}); @@ -126,8 +128,10 @@ main() { { /* (lambda (x) (sin (cos x))) */ - auto sin = make_primitive("sin", ::sin); - auto cos = make_primitive("cos", ::cos); + auto sin = make_primitive("sin", ::sin, + false /*!explicit_symbol_def*/); + auto cos = make_primitive("cos", ::cos, + false /*!explicit_symbol_def*/); auto x_var = make_var("x", Reflect::require()); auto call1 = make_apply(cos, {x_var}); /* (cos x) */