Implement fboundp.
authorBrit Butler <redline6561@gmail.com>
Thu, 9 May 2013 13:44:40 +0000 (09:44 -0400)
committerBrit Butler <redline6561@gmail.com>
Thu, 9 May 2013 13:44:40 +0000 (09:44 -0400)
src/boot.lisp
src/compiler.lisp
src/toplevel.lisp

index 44587f2..47f4309 100644 (file)
@@ -92,6 +92,9 @@
 (defun boundp (x)
   (boundp x))
 
+(defun fboundp (x)
+  (fboundp x))
+
 ;; Basic functions
 (defun = (x y) (= x y))
 (defun * (x y) (* x y))
 
 (defun error (fmt &rest args)
   (%throw (apply #'format nil fmt args)))
-
index 4a27413..be10266 100644 (file)
@@ -1,4 +1,4 @@
-;;; compiler.lisp --- 
+;;; compiler.lisp ---
 
 ;; copyright (C) 2012, 2013 David Vazquez
 ;; Copyright (C) 2012 Raimon Grau
 (define-builtin boundp (x)
   (js!bool (code "(" x ".value !== undefined)")))
 
+(define-builtin fboundp (x)
+  (js!bool (code "(" x ".fvalue !== undefined)")))
+
 (define-builtin symbol-value (x)
   (js!selfcall
     "var symbol = " x ";" *newline*
index b5ef24b..544022f 100644 (file)
@@ -60,7 +60,7 @@
           defparameter defun defvar destructuring-bind digit-char digit-char-p
           disassemble do do* documentation dolist dotimes ecase eighth eq eql
           equal error eval every export expt fdefinition fifth find
-          find-package find-symbol first flet format fourth fset funcall
+          find-package find-symbol first flet format fourth fboundp fset funcall
           function functionp gensym get-internal-real-time get-setf-expansion
           get-universal-time go identity if in-package incf integerp intern
           intersection keywordp labels lambda last length let let*