Group: comp.os.plan9 · Group Profile · Search for Stacksize in comp.os.plan9
Author: Pietro Gagliardi
Date: Jun 29, 2008 06:55
Hello. I have a simple push macro for a stack machine interpreter. It looks like this: #define push(s) ((void)(((stackptr = (stack + stacksize)) ? growstack() : (void)0), (*stackptr++ = errcheck(s)))) Does this boggle the mind? It's very simple: it checks for stack overflow and makes the stack bigger if so, then checks to see if s, a double, is NaN or В±Inf, and finally pushes ...
|