From cc90f165ac7e9ae4e1dbdc1d6823327d981191a4 Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Sat, 14 May 2016 18:32:42 -0700 Subject: [PATCH] Implement get-supported-features. --- src/runtime/mit-macros.scm | 6 ++++++ src/runtime/runtime.pkg | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) 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)) -- 2.25.1