jashkenas/coffee-script — pull request #3026 by alexgorbatchev (2013-06-11 00:21:50+00:00)
Title: Patch stack trace optimizations

Love the `patchStackTrace` in 1.6.3. However, it's only applied when executing with `coffee` or `cake` because they call `run()`. There are other cases when entry to the application is not `coffee` (for example node-dev, mocha, jasmine, a custom `server.js` for amazon, etc). To be able to utilize patched stack traces, I've exposed the `patchStackTrace` and created `unpatchStackTrace` to reverse it.

Also, I noticed that source maps were being generated during `require()` calls and ONLY used to patch stack traces. I've changed moved source map generation to happen only during stack error patching. There's a tiny bit of penalty there, but it's better to do a little extra work then, rather at boot up time.

Opinions?