Skip to content

Commit

Permalink
Expr JIT template for isnull
Browse files Browse the repository at this point in the history
  • Loading branch information
niner committed Jan 21, 2018
1 parent 585485d commit 896e4d2
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/jit/core_templates.expr
Expand Up @@ -157,6 +157,15 @@
)
)

# This ought to be just: (or (flagval (zr $1)) (flagval (eq $1 (^vmnull))))
# But that causes a segfault in the expr tree walker
(template: isnull
(if (any (zr $1) (eq $1 (^vmnull)))
(const 1 int_sz)
(const 0 int_sz)
)
)

(template: wval
(call (^func MVM_sc_get_sc_object)
(arglist (carg (tc) ptr)
Expand Down

0 comments on commit 896e4d2

Please sign in to comment.