Differences From Artifact [09f6f71388735bcb]:
- File
polemy/eval.d
- 2010-11-27 14:23:54 - part of checkin [005474ba5b] on branch trunk - changed: not to lift _|_ (user: kinaba) [annotate]
To Artifact [271574033e4f3a71]:
- File
polemy/eval.d
- 2010-11-27 14:28:33 - part of checkin [950fc6d3d4] on branch trunk - no. lift _|_ for corecursion checking again. Current choices is, if it failed we instead assing _|_ itself. Maybe the better choice is to give up memoization when it failed to lift... (user: kinaba) [annotate]
414 414 // automatic memoized co-recursive execution
415 415 MemokeyType memokey = new MemokeyType(cast(void*)ast, lay, ctx);
416 416 if(auto p = memokey in memo)
417 417 {
418 418 (*p)[1] ++;
419 419 return (*p)[0];
420 420 }
421 - else
422 - memo[memokey] = tuple(cast(Value)new BottomValue, 0);
421 + else {
422 + Value v;
423 + try { v = evlay.lift(new BottomValue, ctx, pos); } catch { v = new BottomValue; }
424 + memo[memokey] = tuple(v, 0);
425 + }
423 426
424 427 Value r = nonMemoizedRun();
425 428
426 429 int touched = memo[memokey][1];
427 430 memo[memokey] = tuple(r, 12345678);
428 431 return r;
429 432 }