From: Chris Hanson Date: Sun, 15 May 2016 01:32:42 +0000 (-0700) Subject: Implement get-supported-features. X-Git-Tag: mit-scheme-pucked-9.2.12~261^2~48 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=cc90f165ac7e9ae4e1dbdc1d6823327d981191a4;p=mit-scheme.git Implement get-supported-features. --- diff --git a/src/runtime/mit-macros.scm b/src/runtime/mit-macros.scm index 76df49bf0..835fe0e4c 100644 --- a/src/runtime/mit-macros.scm +++ b/src/runtime/mit-macros.scm @@ -136,6 +136,12 @@ USA. (define-feature 'i386 (machine? "IA-32")) (define-feature 'x86-64 (machine? "x86-64")) + +(define (get-supported-features) + (filter-map (lambda (p) + (and ((cdr p)) + (car p))) + supported-features)) (define-syntax :receive (er-macro-transformer diff --git a/src/runtime/runtime.pkg b/src/runtime/runtime.pkg index 7c634e3a7..54feee00b 100644 --- a/src/runtime/runtime.pkg +++ b/src/runtime/runtime.pkg @@ -4493,7 +4493,8 @@ USA. (quasiquote :quasiquote) (receive :receive) (unless :unless) - (when :when)) + (when :when) + get-supported-features) (export (runtime) parse-define-form))