[Omake] SVN Commit: OMake Build System (Rev. 12336)

Jason J. Hickey jyh at cs.caltech.edu
Tue Oct 9 12:02:05 PDT 2007


Stricter static scoping for returns.  See bug #701.

   - Each return is annotated with "return <exp> from <id>"
     where <id> is a unique id for the function.
   - The return exception is caught only if the id matches.

Escaping returns abort.

    public.G(x) =
        value $x
    
    F(g) =
        G = $g
        export
    
    H() =
        F(x => ...)
            # This escaping function returns from H
            return $x
        export
    
    H()
    G(1)

This raises the exception:
*** omake error:
   File /Users/jyh/projects/omake/jumbo/keyword/test/return/Test3: line 10, characters 8-17
   uncaught return from H (File /Users/jyh/projects/omake/jumbo/keyword/test/return/Test3: line 8, characters 1-6)

----
Changes in omake-branches/jumbo/keyword:
    +5 -5       src/build/omake_build.ml
    +11 -4      src/env/omake_command_digest.ml
    +5 -2       src/env/omake_exn_print.ml
    +30 -10     src/env/omake_ir_ast.ml
    +39 -33     src/env/omake_ir_semant.ml
    +9 -9       src/eval/omake_eval.ml
    +7 -2       src/ir/omake_ir.ml
    +2 -2       src/ir/omake_ir_free_vars.ml
    +12 -4      src/ir/omake_ir_print.ml
    +2 -2       src/ir/omake_ir_util.ml
    +1 -1       src/ir/omake_value_type.ml
    +4 -1       src/main/omake_shell.ml
    Added       test/return/Test2
 
A hyperlinked version of this commit is available at
http://svn.metaprl.org/commitlogs/omake/2007-10.html#07/10/09.12:02:05



More information about the OMake-CVS mailing list