Changeset 10872 in project


Ignore:
Timestamp:
05/19/08 07:15:29 (13 years ago)
Author:
felix winkelmann
Message:

started module documentation, changed linker options for dloadable files

Location:
chicken/branches/hygienic
Files:
3 added
1 deleted
15 edited

Legend:

Unmodified
Added
Removed
  • chicken/branches/hygienic/Makefile.bsd

    r10829 r10872  
    3838C_COMPILER_OPTIMIZATION_OPTIONS ?= -Os -fomit-frame-pointer
    3939endif
    40 LINKER_LINK_SHARED_LIBRARY_OPTIONS = -shared -Wl,-L.
     40LINKER_LINK_SHARED_LIBRARY_OPTIONS = -shared
    4141LINKER_LINK_SHARED_PROGRAM_OPTIONS = -Wl,-R$(LIBDIR)
    4242LIBRARIES = -lm
  • chicken/branches/hygienic/NEWS

    r10788 r10872  
    114.0.0x
    22
     3- the macro system has been completely overhauled and converted
     4  to hygienic macros
     5- a macro-aware module system has been added
    36- added "-sx" option to csi
     7- removed the following deprecated functions:
     8   [un]shift!
     9   andmap ormap
     10   byte-vector? byte-vector-fill!
     11   make-byte-vector byte-vector
     12   byte-vector-set! byte-vector-ref
     13   byte-vector->list list->byte-vector
     14   string->byte-vector byte-vector->string
     15   byte-vector-length
     16   make-static-byte-vector static-byte-vector->pointer
     17   byte-vector-move! byte-vector-append!
     18   set-file-position! set-user-id! set-group-id!
     19   set-process-group-id!
     20- the situation-identifiers "run-time" and "compile-time" have
     21  been removed
     22- the compiler options "-check-imports", "-import" and "-emit-exports"
     23  have been removed
     24- the following macros have been removed:
     25    define-foreign-record
     26    define-foreign-enum
     27    define-record
     28    define-macro
    429
    5303.1.9
  • chicken/branches/hygienic/TODO

    r10829 r10872  
    1818** foreign module
    1919** line-number retention over macro-expansion
     20** warnings for re-imports
    2021
    2122* syntax-error
     
    2627*** redefinition of imported id
    2728*** reimport of imported id
     29** "ports" import library
    2830
    29 * update manual/NEWS
    30 ** hygienic macros
    31 ** modules
     31* update manual
    3232** import libraries
    33 ** expand unit (move stuff from eval)
    34 ** document extensions
    35 *** user defined ellipsis
    36 *** define-compiled-syntax
    37 *** modules
    38 ** removed deprecated stuff
    39    [un]shift!
    40    andmap ormap
    41    byte-vector? byte-vector-fill!
    42    make-byte-vector byte-vector
    43    byte-vector-set! byte-vector-ref
    44    byte-vector->list list->byte-vector
    45    string->byte-vector byte-vector->string
    46    byte-vector-length
    47    make-static-byte-vector static-byte-vector->pointer
    48    byte-vector-move! byte-vector-append!
    49    set-file-position! set-user-id! set-group-id!
    50    set-process-group-id!
    5133** ack synrules authors
    5234** DSSSL lambda-lists work only with imported "chicken" module
    5335   let-optionals, etc.
    54 ** removals
    55 *** "run-time" and "compile-time" situations for eval-when
    56 *** syntax
    57     define-foreign-record
    58     define-foreign-enum
    59     define-record
    60     define-macro
    61 *** compiler options
    62     -check-imports
    63     -emit-exports
    64     -import
    65 
    66 * build
    67 ** compile and install import libraries
    68 *** where? probably in repository...
    69 *** install import libs as .scm when it is a static build
     36** link to explicit-renaming paper
    7037
    7138* csi
  • chicken/branches/hygienic/defaults.make

    r10804 r10872  
    182182endif
    183183LINKER_LINK_SHARED_LIBRARY_OPTIONS ?= -shared
    184 LINKER_LINK_DLOADABLE_OPTIONS ?= -shared
     184LINKER_LINK_DLOADABLE_OPTIONS ?= -shared -L.
    185185LIBRARIAN_OPTIONS ?= cru
    186186LIBRARIAN_OUTPUT_OPTION ?=
  • chicken/branches/hygienic/expand.scm

    r10788 r10872  
    765765           (d `(V: ,vsv))
    766766           (d `(S: ,vss))
     767           (for-each
     768            (lambda (imp)
     769              (when (assq (car imp) ##sys#import-environment)
     770                (##sys#warn "re-importing already imported identfier: " (car imp))) )
     771            vsv)
     772           (for-each
     773            (lambda (imp)
     774              (when (assq (car imp) ##sys#macro-environment)
     775                (##sys#warn "re-importing already imported syntax: " (car imp))) )
     776            vss)
    767777           (##sys#import-environment (append vsv (##sys#import-environment)))
    768778           (##sys#macro-environment (append vss (##sys#macro-environment))) ) )
  • chicken/branches/hygienic/manual/Declarations

    r10414 r10872  
    120120
    121121
    122 === import
    123 
    124  [declaration specifier] (import SYMBOL-OR-STRING ...)
    125 
    126 Adds new imports to the list of externally available toplevel variables. Arguments to this declaration
    127 may be either strings (designating {{.exports}} files, without the file-extension) or symbols
    128 which directly designate imported variables.
     122=== emit-import-library
     123
     124 [declaration specifier] (emit-import-library MODULENAME | (MODULENAME FILENAME) ...)
     125
     126Declares that any following definition of a module named {{MODULENAME}} should be written to
     127an external file (either a specified one or a file named {{"MODULENAME.import.scm"}}).
     128The compiler option {{-emit-import-library}} may also be used.
    129129
    130130
     
    305305knows about them.
    306306
    307 Previous: [[Non-standard macros and special forms]]
     307Previous: [[Modules and macros]]
    308308
    309309Next: [[Parameters]]
  • chicken/branches/hygienic/manual/Extensions to the standard

    r7036 r10872  
    8686     (baz foo) ) )
    8787
     88Local sequences of {{define-syntax}} forms are translated into equivalent
     89{{letrec-syntax}} forms that enclose the following forms as the body of
     90the expression.
     91
    8892[5.2] {{define}} with a single argument is allowed and initializes the toplevel or local binding
    8993to an unspecified value. CHICKEN supports ''curried'' definitions, where the variable name
     
    157161{{#:append}}.
    158162
    159 [6.7] The {{exit}} procedure exits a program right away and does ''not'' invoke pending {{dynamic-wind}} thunks.
    160 
    161163Previous: [[Deviations from the standard]]
    162164
  • chicken/branches/hygienic/manual/Non-standard macros and special forms

    r10804 r10872  
    485485</table>
    486486
    487 The situation specifiers {{compile-time}} and {{run-time}} are also
    488 defined and have the same meaning as {{compile}} and {{load}}, respectively.
    489 
    490487==== include
    491488
     
    515512Previous: [[Non-standard read syntax]]
    516513
    517 Next: [[Declarations]]
     514Next: [[Modules and macros]]
  • chicken/branches/hygienic/manual/Supported language

    r5945 r10872  
    88* [[Non-standard read syntax]]   
    99* [[Non-standard macros and special forms]]
    10 * [[Pattern matching]]
    11 * [[Declarations]]               
    12 * [[Parameters]]                 
     10* [[Modules and macros]]
     11* [[Declarations]]
     12* [[Parameters]]
    1313* [[Unit library]] basic Scheme definitions
    14 * [[Unit eval]] evaluation and macro-handling
     14* [[Unit eval]] evaluation
     15* [[Unit expand]] macro- and module handling
     16* [[Unit data-structures]] data structures
    1517* [[Unit extras]] useful utility definitions
    1618* [[Unit srfi-1]] List Library
     
    1820* [[Unit srfi-13]] String library
    1921* [[Unit srfi-14]] character set library             
    20 * [[Unit match]] pattern matching runtime-support
    2122* [[Unit regex]] regular expressions
    2223* [[Unit srfi-18]] multithreading
  • chicken/branches/hygienic/manual/Unit eval

    r10398 r10872  
    266266Previous: [[Unit library]]
    267267
    268 Next: [[Unit extras]]
     268Next: [[Unit expand]]
  • chicken/branches/hygienic/manual/Unit library

    r9418 r10872  
    486486
    487487Note that pending {{dynamic-wind}} thunks are ''not'' invoked when exiting your program in this way.
     488
    488489==== build-platform
    489490
  • chicken/branches/hygienic/manual/Unit regex

    r9418 r10872  
    256256
    257257
    258 Previous: [[Unit match]]
     258Previous: [[Unit srfi-14]]
    259259
    260260Next: [[Unit srfi-18]]
  • chicken/branches/hygienic/manual/Unit srfi-14

    r5945 r10872  
    1717Previous: [[Unit srfi-13]]
    1818
    19 Next: [[Unit match]]
     19Next: [[Unit regex]]
  • chicken/branches/hygienic/manual/Using the compiler

    r10414 r10872  
    3232
    3333; -case-insensitive : Enables the reader to read symbols case insensitive. The default is to read case sensitive (in violation of R5RS).  This option registers the {{case-insensitive}} feature identifier.
    34 
    35 ; -check-imports : Search for references to undefined global variables. For each library unit accessed via {{(declare (uses ...))}}, the compiler will search a file named {{UNITNAME.exports}} in the current include path and load its contents into the ''import-table'' (if found). Also, export-information for extensions (accessed through {{(require-extension ...)}}) will be searched and stored in the import-table. If a required extension does not provide explicit export-information a {{.exports}} file is searched (as with used units). After the analysis phase of the compiler, referenced toplevel variables for which no assignment was found will generate a warning. Also, re-assignments of imported variables will trigger a warning.
    3634
    3735; -check-syntax : Aborts compilation process after macro-expansion and syntax checks.
     
    9694; -epilogue FILENAME : Includes the file named {{FILENAME}} at the end of the compiled source file. The include-path is not searched. This option may be given multiple times.
    9795
    98 ; -emit-exports FILENAME : Write exported toplevel variables to {{FILENAME}}.
    99 
    10096; -emit-external-prototypes-first : Emit prototypes for callbacks defined with {{define-external}} before any other foreign declarations. This is sometimes useful, when C/C++ code embedded into the a Scheme program has to access the callbacks. By default the prototypes are emitted after foreign declarations.
    10197
     98; -emit-import-library MODULE : Specifies that an import library named {{MODULE.import.scm}} for the named module should be generated (equivalent to using the {{emit-import-library}} declaration).
     99
    102100; -explicit-use : Disables automatic use of the units {{library, eval}} and {{extras}}. Use this option if compiling a library unit instead of an application unit.
    103101
     
    119117
    120118; -help : Print a summary of available options and the format of the command line parameters and exit the compiler.
    121 
    122 ; -import FILENAME : Read exports from linked or loaded libraries from given file. See also {{-check-imports}}. This is equivalent to declaring {{(declare (import FILENAME))}}. Implies {{-check-imports}}.
    123119
    124120; -include-path PATHNAME : Specifies an additional search path for files included via the {{include}} special form. This option may be given multiple times. If the environment variable {{CHICKEN_INCLUDE_PATH}} is set, it should contain a list of alternative include pathnames separated by {{;}}.
  • chicken/branches/hygienic/rules.make

    r10829 r10872  
    776776
    777777%.import.so: %.import.o
    778         $(LINKER) $(LINKER_OPTIONS) $(LINKER_LINK_SHARED_LIBRARY_OPTIONS) \
    779           $(LINKER_LINK_DLOADABLE_OPTIONS) $^ $(LINKER_OUTPUT_OPTION) $@ \
     778        $(LINKER) $(LINKER_OPTIONS) $(LINKER_LINK_DLOADABLE_OPTIONS) $^ $(LINKER_OUTPUT_OPTION) $@ \
    780779          $(LINKER_LIBRARY_PREFIX)chicken$(LINKER_LIBRARY_SUFFIX) $(LIBRARIES)
    781780
Note: See TracChangeset for help on using the changeset viewer.