From: Brit Butler Date: Thu, 9 May 2013 13:44:40 +0000 (-0400) Subject: Implement fboundp. X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=62c8c41796c1f2f385e7943b50234f41d43baa00;p=jscl.git Implement fboundp. --- diff --git a/src/boot.lisp b/src/boot.lisp index 44587f2..47f4309 100644 --- a/src/boot.lisp +++ b/src/boot.lisp @@ -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)) @@ -544,4 +547,3 @@ (defun error (fmt &rest args) (%throw (apply #'format nil fmt args))) - diff --git a/src/compiler.lisp b/src/compiler.lisp index 4a27413..be10266 100644 --- a/src/compiler.lisp +++ b/src/compiler.lisp @@ -1,4 +1,4 @@ -;;; compiler.lisp --- +;;; compiler.lisp --- ;; copyright (C) 2012, 2013 David Vazquez ;; Copyright (C) 2012 Raimon Grau @@ -1390,6 +1390,9 @@ (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* diff --git a/src/toplevel.lisp b/src/toplevel.lisp index b5ef24b..544022f 100644 --- a/src/toplevel.lisp +++ b/src/toplevel.lisp @@ -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*