                         cmp = ir.createICmpEq mask, (consts.int64_lowhi 0xfffa8000, 0x00000000), "cmpresult"
                         t = @loadBoolEjsValue true
                         f = @loadBoolEjsValue false
-                        ir.createSelect cmp, t, f, "sel"
+                        rv = ir.createSelect cmp, t, f, "sel"
+                        rv._ejs_returns_ejsval_bool = true
+                        rv
                 else
                         @createCall @ejs_runtime.typeof_is_string, [@visitOrNull exp.arguments[0]], "is_string", false
                                 

                                return @createCall callee, [(@visitOrNull n.argument.object), (@visit fake_literal)], "result"
                        else
                                throw "unhandled delete syntax"
                else
                        if not callee
                                throw "Internal error: unary operator '#{n.operator}' not implemented"


        handleTypeofIsBooleanIntrinsic: (exp) ->
                @createCall @ejs_runtime.typeof_is_boolean, [@visitOrNull exp.arguments[0]], "is_boolean", false

class AddFunctionsVisitor extends NodeVisitor
        constructor: (@module) ->
                super
