Gary Guo (2016-02-19T02:13:04.000Z)
Andreas <rossberg at google.com> wrote:> This would be fairly difficult to support by implementations. In V8, for example, we currently have no way of reconstructing that information, nor would it be easy or cheap to add that. A frame is created by the callee, but that does not know how it got called. Funnelling through that information would effectively require a hidden extra argument to _every_ call.
Placing a boolean flag theoretically should not introduce too much overhead. If we are not going to indicate tail call some way, debugging might be extremely difficult, and the stack result might be making no sense at all.
---
As for how to distinguish between special code source, such as native, if https://github.com/tc39/ecma262/issues/395 is resolved, we can use the built-in module name for the "source" field, and hopefully we can reserve some special built-in module name for native code, cross realm code, etc, and then we can have a unified representation of all frames. 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20160219/7bf675d4/attachment.html>
nbdd0121 at hotmail.com (2016-02-19T02:15:01.626Z)
Andreas <rossberg at google.com> wrote:
> This would be fairly difficult to support by implementations. In V8, for example, we currently have no way of reconstructing that information, nor would it be easy or cheap to add that. A frame is created by the callee, but that does not know how it got called. Funnelling through that information would effectively require a hidden extra argument to _every_ call.

Placing a boolean flag theoretically should not introduce too much overhead. If we are not going to indicate tail call some way, debugging might be extremely difficult, and the stack result might be making no sense at all.

---

As for how to distinguish between special code source, such as native, if https://github.com/tc39/ecma262/issues/395 is resolved, we can use the built-in module name for the "source" field, and hopefully we can reserve some special built-in module name for native code, cross realm code, etc, and then we can have a unified representation of all frames.