Differences From Artifact [1c0a1caee00496c7]:
- File
polemy/eval.d
- 2010-11-26 06:46:09 - part of checkin [552d43f567] on branch trunk - one-by-one M&E memoizer (user: kinaba) [annotate]
To Artifact [47affa2343c633ca]:
- File
polemy/eval.d
- 2010-11-26 07:14:27 - part of checkin [94f0382499] on branch trunk - changed the semantics of def foo(x @macro) {}, the @macro-layered parameter. - in @macro( foo(e) ), e is run in @macro (this is ok) - in @value( foo(e) ), e is run in (rawmacro)!! - in @rawmacro( foo(e) ), e is run in (rawmacro)!! (user: kinaba) [annotate]
219 { 219 {
220 Table newCtx = new Table(f.definitionContext(), Table.Ki 220 Table newCtx = new Table(f.definitionContext(), Table.Ki
221 foreach(i,p; f.params()) 221 foreach(i,p; f.params())
222 if( p.layers.empty ) 222 if( p.layers.empty )
223 newCtx.set(p.name, isMacroLayer(lay)?Mac 223 newCtx.set(p.name, isMacroLayer(lay)?Mac
224 else 224 else
225 foreach(argLay; p.layers) 225 foreach(argLay; p.layers)
> 226 if( lay!=MacroLayer && isMacroLa
> 227 newCtx.set(p.name, argLa
> 228 else
226 newCtx.set(p.name, argLay, eval( | 229 newCtx.set(p.name, argLa
227 scope _ = new PushCallStack(pos, callstackmsg); 230 scope _ = new PushCallStack(pos, callstackmsg);
228 return f.invoke(isMacroLayer(lay)?MacroLayer:lay, newCtx 231 return f.invoke(isMacroLayer(lay)?MacroLayer:lay, newCtx
229 } 232 }
230 throw genex!RuntimeException(pos, text("tried to call non-functi 233 throw genex!RuntimeException(pos, text("tried to call non-functi
231 } 234 }
232 235
233 Value lift(Value v, Layer lay, Table ctx, LexPosition pos) 236 Value lift(Value v, Layer lay, Table ctx, LexPosition pos)