>>7
Easier than that actually. I overcame my laziness and read section 7.13 of the standard. It is unbelievably lax, which is understandable, because it allows to: 1) store a pointer to the current stack frame, 2) restore the current stack frame to the stored value. Nothing more.
If you discard the stack frame by returning from a function which called setjmp, the behaviour is undefined.
All global state is guaranteed to remain the same as at the longjmp call. Pay attention: longjmp, not setjmp!
All local state in that frame is undefined -- all your local variables and shit. Ain't that some shit? (actually, the reason behind it is that compilers don't have to disable using registers for variables or somehow try to store them on setjmp and restore on longjmp).
Basically, this shit is required to do exactly these two things I said, and the standard describes it in so many words.
So I think you can emulate it with a simple try/catch in JS. Probably. That is, no need to convert any code to CPS, the part of all locals being undefined is extremely powerful. This thing is nowhere close to call-cc.