Changeset 12559 in project for chicken/trunk


Ignore:
Timestamp:
11/19/08 11:17:36 (12 years ago)
Author:
felix winkelmann
Message:
  • put non-std macros into own unit (chicken-syntax) which makes chicken-more-macros.scm obsolete;
  • renamed chicken-ffi-macros.scm to chicken-ffi-syntax.scm
  • added missing entries to distribution/manifest
  • ec tests use only required exports now (and work)
  • bumped version to 4.0.0x2
  • various fixes in the manual
Location:
chicken/trunk
Files:
15 edited
2 moved

Legend:

Unmodified
Added
Removed
  • chicken/trunk/README

    r12320 r12559  
    33  (c)2000-2008 Felix L. Winkelmann
    44
    5   version 4.0.0x1
     5  version 4.0.0x2
    66
    77
  • chicken/trunk/TODO

    r12495 r12559  
    1515
    1616** modules
    17 *** chicken.import.scm refers to ##sys#chicken-macro-environment
    18     ... which is only set, if chicken-more-macros.scm is loaded, which
    19     is of course not the case inside a compiled executable (current
    20     workaround is to set them to nil by default)
    21 *** same for ##sys#chicken-ffi-macro-environment
    2217*** `require-extension' fails in interpreter when extension is .so without import library
    2318    probably because load and import is in same toplevel form, and the
  • chicken/trunk/buildversion

    r12320 r12559  
    1 4.0.0x1
     14.0.0x2
  • chicken/trunk/chicken-ffi-syntax.scm

    r12558 r12559  
    1 ;;;; chicken-ffi-macros.scm
     1;;;; chicken-ffi-syntax.scm
    22;
    33; Copyright (c) 2000-2007, Felix L. Winkelmann
  • chicken/trunk/chicken-syntax.scm

    r12558 r12559  
    1 ;;;; chicken-more-macros.scm - More syntax extensions
     1;;;; chicken-syntax.scm - non-standard syntax extensions
    22;
    33; Copyright (c) 2000-2007, Felix L. Winkelmann
     
    2626
    2727
    28 (##sys#provide 'chicken-more-macros)
     28(declare
     29  (unit chicken-syntax)
     30  (disable-interrupts)
     31  (fixnum) )
     32
     33(##sys#provide 'chicken-more-macros 'chicken-syntax)
    2934
    3035
  • chicken/trunk/chicken.scm

    r12301 r12559  
    2727
    2828(declare
    29   (uses srfi-1 srfi-4 utils files support compiler optimizer driver
     29  (uses chicken-syntax srfi-1 srfi-4 utils files support compiler optimizer driver
    3030        platform backend srfi-69)
    3131  (run-time-macros) )                   ;*** later: compile-syntax
     
    7070
    7171(eval-when (load)
    72   (include "chicken-more-macros")
    73   (include "chicken-ffi-macros") )
     72  (include "chicken-ffi-syntax") )
    7473
    7574
  • chicken/trunk/csi.scm

    r12122 r12559  
    2727
    2828(declare
    29   (uses srfi-69 ports)                  ; is here because a bootstrap from an older chicken may not make
     29  (uses chicken-syntax srfi-69 ports) ; is here because a bootstrap from an older chicken may not make
    3030  (usual-integrations)                  ;  this used automatically
    3131  (disable-interrupts)
     
    4141) )
    4242
    43 (include "chicken-more-macros")
    4443(include "banner")
    4544
  • chicken/trunk/distribution/manifest

    r12301 r12559  
    102102c-backend.scm
    103103c-platform.scm
    104 chicken-ffi-macros.scm
    105 chicken-more-macros.scm
     104chicken-ffi-syntax.scm
    106105chicken-profile.1
    107106chicken-profile.scm
     
    198197tests/apply-test.scm
    199198tests/embedded1.c
     199tests/embedded2.scm
    200200tests/fixnum-tests.scm
    201201tests/path-tests.scm
     
    209209tests/module-tests-compiled.scm
    210210tests/syntax-tests.scm
     211tests/syntax-tests-2.scm
    211212tests/ec.scm
    212213tests/ec-tests.scm
    213214tests/test-chained-modules.scm
     215tests/import-library-test1.scm
     216tests/import-library-test2.scm
     217tests/match-test.scm
     218tests/test.scm
     219tests/loopy-test.scm
     220tests/loopy-loop.scm
     221tests/r5rs_pitfalls.scm
    214222tweaks.scm
    215223utils.scm
     
    274282expand.scm
    275283expand.c
     284chicken-syntax.scm
     285chicken-syntax.c
    276286unsafe-declarations.scm
     287ports.import.scm
     288ports.import.c
     289files.import.scm
     290files.import.c
    277291scheme.import.scm
    278292scheme.import.c
     
    307321srfi-18.import.c
    308322utils.import.c
     323csi.import.scm
     324csi.import.c
    309325setup-download.scm
    310326setup-api.scm
  • chicken/trunk/eval.scm

    r12301 r12559  
    102102(define ##sys#core-library-modules
    103103  '(extras lolevel utils files tcp regex regex-extras posix srfi-1 srfi-4 srfi-13
    104            srfi-14 srfi-18 data-structures ports))
     104           srfi-14 srfi-18 data-structures ports chicken-syntax))
    105105
    106106(define ##sys#explicit-library-modules '())
  • chicken/trunk/extras.scm

    r10952 r12559  
    360360        (cond ((pair? obj)        (wr-expr obj col))
    361361              ((null? obj)        (wr-lst obj col))
    362               ((eof-object? obj)  (out "#<eof>" col))
     362              ((eof-object? obj)  (out "#!eof" col))
    363363              ((vector? obj)      (wr-lst (vector->list obj) (out "#" col)))
    364364              ((boolean? obj)     (out (if obj "#t" "#f") col))
  • chicken/trunk/manual/Non-standard macros and special forms

    r11219 r12559  
    2020
    2121* If {{ID}} names a built-in feature {{chicken srfi-0 srfi-2 srfi-6 srfi-8 srfi-9 srfi-10 srfi-17 srfi-23 srfi-30 srfi-39 srfi-55}}, then nothing is done.
    22 * If {{ID}} names one of the syntactic extensions {{chicken-more-macros chicken-ffi-macros}}, then this extension will be loaded.
     22* If {{ID}} names one of the syntactic extensions {{chicken-syntax chicken-ffi-syntax}}, then this extension will be loaded.
    2323* If {{ID}} names one of the core library units shipped with CHICKEN, then a {{(load-library 'ID)}} will be performed.
    2424* If {{ID}} names an installed extension with the {{syntax}} or {{require-at-runtime}} attribute, then the extensions is loaded at compile-time, probably doing a run-time {{(require ...)}} for any run-time requirements.
     
    2828
    2929* If {{ID}} names a built-in feature {{chicken srfi-0 srfi-2 srfi-6 srfi-8 srfi-9 srfi-10 srfi-17 srfi-23 srfi-30 srfi-39 srfi-55}}, then nothing is done.
    30 * If {{ID}} names one of the syntactic extensions {{chicken-more-macros chicken-ffi-macros}}, then this extension will be loaded at compile-time, making the syntactic extensions available in compiled code.
     30* If {{ID}} names one of the syntactic extensions {{chicken-syntax chicken-ffi-syntax}}, then this extension will be loaded at compile-time, making the syntactic extensions available in compiled code.
    3131* If {{ID}} names one of the core library units shipped with CHICKEN, or if the option {{-uses ID}} has been passed to the compiler, then a {{(declare (uses ID))}} is generated.
    3232* If {{ID}} names an installed extension with the {{syntax}} or {{require-at-runtime}} attribute, then the extension is loaded at compile-time, and code is emitted to {{(require ...)}} any needed run-time requirements.
  • chicken/trunk/manual/The User's Manual

    r12320 r12559  
    33== The User's Manual
    44
    5 This is the user's manual for the Chicken Scheme compiler, version 4.0.0x1
     5This is the user's manual for the Chicken Scheme compiler, version 4.0.0x2
    66
    77; [[Overview]] : What is Chicken?
  • chicken/trunk/manual/faq

    r11149 r12559  
    7373
    7474
    75 ==== How can I change {{match-error-control}} during compilation?
    76 
    77 Use {{eval-when}}, like this:
    78 
    79 <enscript highlight=scheme>
    80 (eval-when (compile)
    81 (match-error-control #:unspecified) )
    82 </enscript>
    83 
    84 
    8575==== Why doesn't CHICKEN support the full numeric tower by default?
    8676
     
    8878
    8979<enscript highlight=scheme>
    90 % chicken-setup numbers
     80% chicken-install numbers
    9181% csi -q
    9282#;1> (use numbers)
     
    195185Code compiled into a DLL to be loaded dynamically must be linked with the same runtime system as the loading
    196186application. That means that all dynamically loaded entities (including extensions built and installed with
    197 {{chicken-setup}}) must be compiled with the {{-windows}} {{csc}} option.
     187{{chicken-install}}) must be compiled with the {{-windows}} {{csc}} option.
    198188
    199189==== On Windows, {{csc.exe}} seems to be doing something wrong.
     
    264254=== Compiled macros
    265255
    266 ==== Why is {{define-macro}} complaining about unbound variables?
     256==== Why are low-level macros defined with {{define-syntax}} complaining about unbound variables?
    267257
    268258Macro bodies that are defined and used in a compiled source-file are
     
    589579interpreted (even if the caller program is compiled).
    590580
     581==== How do I use extended (non-standard) syntax in evaluated code at run-time?
     582
     583Normally, only standard Scheme syntax is available to the evaluator. To
     584use the extensions provided in the CHICKEN compiler and interpreter,
     585add:
     586
     587<enscript highlight=scheme>
     588(require-library chicken-syntax)
     589</enscript>
     590
    591591=== Extensions
    592592
     
    597597
    598598 $ export CHICKEN_REPOSITORY=~/chicken/
    599  $ chicken-setup extensionname
     599 $ chicken-install extensionname
    600600
    601601In order to make programs (including csi) see these eggs, you should set this variable when you run them.
  • chicken/trunk/rules.make

    r12301 r12559  
    3232       library eval data-structures ports files extras lolevel utils tcp srfi-1 srfi-4 srfi-13 \
    3333       srfi-14 srfi-18 srfi-69 $(POSIXFILE) regex scheduler \
    34        profiler stub expand runtime
     34       profiler stub expand chicken-syntax runtime
    3535LIBCHICKEN_SHARED_OBJECTS = $(LIBCHICKEN_OBJECTS_1:=$(O))
    3636LIBCHICKEN_STATIC_OBJECTS = $(LIBCHICKEN_OBJECTS_1:=-static$(O))
     
    3939       ulibrary ueval udata-structures uports ufiles uextras ulolevel uutils utcp usrfi-1 usrfi-4 \
    4040       usrfi-13 usrfi-14 usrfi-18 usrfi-69 u$(POSIXFILE) uregex scheduler \
    41        profiler stub expand uruntime
     41       profiler stub expand chicken-syntax uruntime
    4242LIBUCHICKEN_SHARED_OBJECTS = $(LIBUCHICKEN_OBJECTS_1:=$(O))
    4343LIBUCHICKEN_STATIC_OBJECTS = $(LIBUCHICKEN_OBJECTS_1:=-static$(O))
     
    4646       library eval data-structures ports files extras lolevel utils tcp srfi-1 srfi-4 srfi-13 \
    4747       srfi-14 srfi-18 srfi-69 $(POSIXFILE) regex scheduler \
    48        profiler stub expand gui-runtime
     48       profiler stub expand chicken-syntax gui-runtime
    4949LIBCHICKENGUI_SHARED_OBJECTS = $(LIBCHICKENGUI_OBJECTS_1:=$(O))
    5050LIBCHICKENGUI_STATIC_OBJECTS = $(LIBCHICKENGUI_OBJECTS_1:=-static$(O))
     
    102102          $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) \
    103103          $(C_COMPILER_BUILD_RUNTIME_OPTIONS) $< $(C_COMPILER_OUTPUT)
     104chicken-syntax$(O): chicken-syntax.c chicken.h $(CHICKEN_CONFIG_H)
     105        $(C_COMPILER) $(C_COMPILER_OPTIONS) $(C_COMPILER_PTABLES_OPTIONS) $(INCLUDES) \
     106          $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) \
     107          $(C_COMPILER_BUILD_RUNTIME_OPTIONS) $< $(C_COMPILER_OUTPUT)
    104108data-structures$(O): data-structures.c chicken.h $(CHICKEN_CONFIG_H)
    105109        $(C_COMPILER) $(C_COMPILER_OPTIONS) $(C_COMPILER_PTABLES_OPTIONS) $(INCLUDES) \
     
    274278          $(C_COMPILER_BUILD_RUNTIME_OPTIONS) $< $(C_COMPILER_OUTPUT)
    275279expand-static$(O): expand.c chicken.h $(CHICKEN_CONFIG_H)
     280        $(C_COMPILER) $(C_COMPILER_OPTIONS) $(C_COMPILER_PTABLES_OPTIONS) $(INCLUDES) \
     281          $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) \
     282          $(C_COMPILER_BUILD_RUNTIME_OPTIONS) $< $(C_COMPILER_OUTPUT)
     283chicken-syntax-static$(O): chicken-syntax.c chicken.h $(CHICKEN_CONFIG_H)
    276284        $(C_COMPILER) $(C_COMPILER_OPTIONS) $(C_COMPILER_PTABLES_OPTIONS) $(INCLUDES) \
    277285          $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) \
     
    10621070        $(INSTALL_PROGRAM) $(INSTALL_PROGRAM_FILE_OPTIONS) $(SRCDIR)README $(DESTDIR)$(IDOCDIR)
    10631071        $(INSTALL_PROGRAM) $(INSTALL_PROGRAM_FILE_OPTIONS) $(SRCDIR)LICENSE $(DESTDIR)$(IDOCDIR)
    1064         $(INSTALL_PROGRAM) $(INSTALL_PROGRAM_FILE_OPTIONS) $(SRCDIR)chicken-more-macros.scm $(DESTDIR)$(IDATADIR)
    10651072        -$(INSTALL_PROGRAM) $(INSTALL_PROGRAM_FILE_OPTIONS) chicken.info $(DESTDIR)$(IINFODIR)
    10661073        $(INSTALLINFO_PROGRAM) $(INSTALLINFO_PROGRAM_OPTIONS) --infodir=$(DESTDIR)$(IINFODIR) chicken.info
     
    11261133        $(CHICKEN) $< $(CHICKEN_LIBRARY_OPTIONS) -output-file $@
    11271134expand.c: $(SRCDIR)expand.scm $(SRCDIR)synrules.scm
     1135        $(CHICKEN) $< $(CHICKEN_LIBRARY_OPTIONS) -output-file $@
     1136chicken-syntax.c: $(SRCDIR)chicken-syntax.scm
    11281137        $(CHICKEN) $< $(CHICKEN_LIBRARY_OPTIONS) -output-file $@
    11291138data-structures.c: $(SRCDIR)data-structures.scm $(SRCDIR)private-namespace.scm
     
    12411250utils.import.c: $(SRCDIR)utils.import.scm
    12421251        $(CHICKEN) $< $(CHICKEN_IMPORT_LIBRARY_OPTIONS) -output-file $@
    1243 setup-api.import.c: $(SRCDIR)setup-api.import.scm $(SRCDIR)setup-api.scm
    1244         $(CHICKEN) $< $(CHICKEN_IMPORT_LIBRARY_OPTIONS) -output-file $@
    1245 setup-download.import.c: $(SRCDIR)setup-download.import.scm $(SRCDIR)setup-download.scm
    1246         $(CHICKEN) $< $(CHICKEN_IMPORT_LIBRARY_OPTIONS) -output-file $@
    1247 setup-utils.import.c: $(SRCDIR)setup-utils.import.scm $(SRCDIR)setup-utils.scm
    1248         $(CHICKEN) $< $(CHICKEN_IMPORT_LIBRARY_OPTIONS) -output-file $@
    1249 
    1250 chicken.c: $(SRCDIR)chicken.scm $(SRCDIR)chicken-more-macros.scm $(SRCDIR)chicken-ffi-macros.scm $(SRCDIR)private-namespace.scm $(SRCDIR)tweaks.scm
     1252setup-api.import.c: $(SRCDIR)setup-api.scm
     1253        $(CHICKEN) $< $(CHICKEN_IMPORT_LIBRARY_OPTIONS) -output-file $@
     1254setup-download.import.c: $(SRCDIR)setup-download.scm
     1255        $(CHICKEN) $< $(CHICKEN_IMPORT_LIBRARY_OPTIONS) -output-file $@
     1256setup-utils.import.c: $(SRCDIR)setup-utils.scm
     1257        $(CHICKEN) $< $(CHICKEN_IMPORT_LIBRARY_OPTIONS) -output-file $@
     1258
     1259chicken.c: $(SRCDIR)chicken.scm $(SRCDIR)chicken-ffi-syntax.scm $(SRCDIR)private-namespace.scm $(SRCDIR)tweaks.scm
    12511260        $(CHICKEN) $< $(CHICKEN_COMPILER_OPTIONS) -output-file $@
    12521261support.c: $(SRCDIR)support.scm $(SRCDIR)banner.scm $(SRCDIR)private-namespace.scm $(SRCDIR)tweaks.scm
     
    12631272        $(CHICKEN) $< $(CHICKEN_COMPILER_OPTIONS) -output-file $@
    12641273
    1265 csi.c: $(SRCDIR)csi.scm $(SRCDIR)banner.scm $(SRCDIR)chicken-more-macros.scm $(SRCDIR)private-namespace.scm
     1274csi.c: $(SRCDIR)csi.scm $(SRCDIR)banner.scm $(SRCDIR)private-namespace.scm
    12661275        $(CHICKEN) $< $(CHICKEN_PROGRAM_OPTIONS) -output-file $@ -extend $(SRCDIR)private-namespace.scm
    12671276chicken-profile.c: $(SRCDIR)chicken-profile.scm
     
    12891298.PHONY: distfiles dist
    12901299
    1291 distfiles: buildsvnrevision library.c eval.c expand.c data-structures.c ports.c files.c extras.c lolevel.c utils.c \
     1300distfiles: buildsvnrevision library.c eval.c expand.c chicken-syntax.c \
     1301        data-structures.c ports.c files.c extras.c lolevel.c utils.c \
    12921302        tcp.c srfi-1.c srfi-4.c srfi-13.c srfi-14.c srfi-18.c srfi-69.c \
    12931303        posixunix.c posixwin.c regex.c scheduler.c profiler.c stub.c \
     
    13291339
    13301340spotless: distclean
    1331         -$(REMOVE_COMMAND) $(REMOVE_COMMAND_OPTIONS) library.c eval.c data-structures.c ports.c files.c extras.c lolevel.c utils.c \
     1341        -$(REMOVE_COMMAND) $(REMOVE_COMMAND_OPTIONS) library.c eval.c data-structures.c \
     1342          ports.c files.c extras.c lolevel.c utils.c chicken-syntax.c \
    13321343          tcp.c srfi-1.c srfi-4.c srfi-13.c srfi-14.c srfi-18.c srfi-69.c expand.c \
    13331344          posixunix.c posixwin.c regex.c scheduler.c profiler.c stub.c \
     
    13871398        tar cfz $@ library.c eval.c data-structures.c ports.c files.c extras.c lolevel.c utils.c tcp.c \
    13881399          srfi-1.c srfi-4.c srfi-13.c srfi-14.c srfi-18.c srfi-69.c posixunix.c posixwin.c regex.c \
    1389           scheduler.c profiler.c stub.c expand.c $(COMPILER_OBJECTS_1:=.c)
     1400          scheduler.c profiler.c stub.c expand.c chicken-syntax.c \
     1401          $(COMPILER_OBJECTS_1:=.c)
    13901402
    13911403
  • chicken/trunk/tests/ec.scm

    r10909 r12559  
    1 (module ec (do-ec do-ec:do ec-simplify :do :let :parallel
     1(module ec (do-ec do-ec:do :do :let :parallel
    22                     :parallel-1 :while :while-1 :while-2
    3                      :until :until-1 :list :string :vector
    4                      ec-:vector-filter :integers :range
     3                     :until :until-1 :list :string
     4                     (:vector ec-:vector-filter)
     5                     :integers :range
    56                     :real-range :char-range :port :dispatched
    67                     :generator-proc dispatch-union
    7                      make-initial-:-dispatch :-dispatch
    8                      :-dispatch-ref :-dispatch-set! :
     8                     make-initial-:-dispatch
     9                     (: :-dispatch)
     10                     :-dispatch-ref :-dispatch-set!
    911                     fold3-ec fold-ec list-ec append-ec
    1012                     string-ec string-append-ec vector-ec
  • chicken/trunk/tests/runtests.sh

    r12436 r12559  
    2828echo "======================================== syntax tests (compiled) ..."
    2929$compile syntax-tests.scm && ./a.out
     30
     31echo "======================================== syntax tests (2, compiled) ..."
     32$compile syntax-tests-2.scm && ./a.out
    3033
    3134echo "======================================== import library tests ..."
  • chicken/trunk/version.scm

    r12320 r12559  
    1 (define-constant +build-version+ "4.0.0x1")
     1(define-constant +build-version+ "4.0.0x2")
Note: See TracChangeset for help on using the changeset viewer.