Mercurial > hg > CbC > old > device
view test/device.d @ 94:1ad7045741a7 dbinop
float dbinop fix
author | kono |
---|---|
date | Wed, 12 Mar 2003 15:28:44 +0900 |
parents | d35df41eac69 |
children |
line wrap: on
line source
struct env_segment1 { void *fp; void *sp; } struct cont_segment1 { int value; *return(); } segment1(env_segment1 e, cont_segment1 c) { cont_segment1 c1 = new_continuation(c,e); c.return = segment2; call_segment(e,c1); } call_segment(env_segment1 e, cont_segment1 c) { c.value = 1; c.return(); } segment2(env_segment2 e, cont_segment1 c) { cont_segment1 c1 = old_continuation(e); halt(e,c); } inline type new_continuation(c,e) { e.fp -= sizeof(type); return (type)e.fp; } inline type old_continuation(c,e) { e.fp += sizeof(c); return (type)e.fp; }