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

Jason Hickey jyh at cs.caltech.edu
Thu Jul 19 14:03:56 PDT 2007


> map. =
>    extends $(Map)
>    $|key| = old
>
> map.foreach(key, val)
>    map = $(map.add $(key), new)
>    export map
>
> new = $(map.find key)
> if $(not $(equal $(new), new))
>    println($"Error: expected new, got $(new)")
>    exit 1

Why do you expect "new"?

There is a conflict here between the preserving variables in the  
body, or the variable in the hoist.

We could potentially allow the programmer to disambiguate: do not  
hoist by default, but allow it to be specified explcitly, by  
exporting "this".

     # For example
     i. =
         i = 0
         incr() =
             j = $(add $i, 1)
             i = $j
             export this i # export the "i" field, but not "j"
                           # then export ("hoist") the object

     i.incr()
     println($(i.i)) # prints "1"

Jason


On Jul 19, 2007, at 9:52 AM, Aleksey Nogin wrote:

> On 19.07.2007 09:06, Jason J. Hickey wrote:
>
>> Exports were not being hoisted correctly.  This fixes objects/Test6
> Thanks! But now I have another one for you - objects/Test8.
>
> Aleksey
>
> -- 
> Aleksey Nogin, Research Scientist
> Advanced Technologies Department, Information & System Sciences Lab
> HRL Laboratories, LLC, Malibu, CA
> _______________________________________________
> OMake-Devel mailing list
> OMake-Devel at metaprl.org
> https://lists.metaprl.org/mailman/listinfo/omake-devel

--
Jason Hickey                  http://www.cs.caltech.edu/~jyh
Caltech Computer Science      Tel: 626-395-6568 FAX: 626-792-4257





More information about the OMake-Devel mailing list