[Omake] SVN Commit: OMake Build System [0.9.8.x] (Rev. 11162)

Jason J. Hickey jyh at cs.caltech.edu
Thu Jun 28 18:18:32 PDT 2007


There was an error in the semantic checker where it rejected .STATIC
rules in functions.  The following program now works as expected.

    g(x) =
        eprintln($"g($x)")
        add($x, 1)
    
    f(x) =
        .STATIC: :key: $x
            y = $(g $x)
        value $y
    
    println($(f 1))
    println($(f 2))
    println($(f 1))

This calls g only twice.

    g(1)
    2
    g(2)
    3
    2

Of course, .STATIC rules are only for values saved between runs.  We also
need the memo function.

----
Changes:
    +6 -0	omake-branches/0.9.8.x/src/env/omake_command_digest.ml
    +3 -2	omake-branches/0.9.8.x/src/env/omake_ir_ast.ml
    +4 -0	omake-branches/0.9.8.x/src/env/omake_ir_semant.ml
    +2 -0	omake-branches/0.9.8.x/src/eval/omake_eval.ml
    +1 -0	omake-branches/0.9.8.x/src/ir/omake_ir.ml
    +1 -0	omake-branches/0.9.8.x/src/ir/omake_ir_free_vars.ml
    +7 -0	omake-branches/0.9.8.x/src/ir/omake_ir_print.ml
 
A hyperlinked version of this commit is available at
http://svn.metaprl.org/commitlogs/omake/2007-06.html#07/06/28.18:18:32



More information about the OMake-CVS mailing list