Re: Maximally minimal stack trace standardization

2015-03-12 Thread Brendan Eich
Right, Mark pointed out shadowing as an advantage of using just a getStack lexical name. Need to see more to judge pleasantness. /be John Lenz wrote: I'm under the impression Error.getStack would suffer the same scoping issues and it would have to be a module import that a custom loader

Re: Maximally minimal stack trace standardization

2015-03-11 Thread Mark S. Miller
function is in scope can differ per scope as well as per loader. *From:* Mark S. Miller [mailto:erig...@google.com] *Sent:* Wednesday, March 11, 2015 12:12 *To:* Domenic Denicola *Cc:* John Lenz; es-discuss; Erik Arvidsson *Subject:* Re: Maximally minimal stack trace standardization

Re: Maximally minimal stack trace standardization

2015-03-11 Thread John Lenz
, March 11, 2015 12:12 *To:* Domenic Denicola *Cc:* John Lenz; es-discuss; Erik Arvidsson *Subject:* Re: Maximally minimal stack trace standardization No, that makes the std SES API non-conformant to the std API, making porting more difficult, and making it harder to write code that works

Re: Maximally minimal stack trace standardization

2015-03-11 Thread John Lenz
, March 11, 2015 12:12 *To:* Domenic Denicola *Cc:* John Lenz; es-discuss; Erik Arvidsson *Subject:* Re: Maximally minimal stack trace standardization No, that makes the std SES API non-conformant to the std API, making porting more difficult, and making it harder to write code that works

Re: Maximally minimal stack trace standardization

2015-03-11 Thread Brendan Eich
John Lenz wrote: b) It differs so wildly between platforms that cross-web content can't rely on it. It exists everywhere and from where I sit it is pretty essential and there is lot of wiring that exist to propagate and preserve stack traces. Yeah, I'd be careful concluding too

Re: Maximally minimal stack trace standardization

2015-03-11 Thread Mark Miller
: Maximally minimal stack trace standardization No, that makes the std SES API non-conformant to the std API, making porting more difficult, and making it harder to write code that works in both environments. Also, if you make it look like err.stack, then no matter what you stdize

Re: Maximally minimal stack trace standardization

2015-03-11 Thread John Lenz
I'm under the impression Error.getStack would suffer the same scoping issues and it would have to be a module import that a custom loader could override or a global method that could be hidden by scoping. This doesnt seem like a pleasant API and seems like something to be relegated to SES/Caja

Re: Maximally minimal stack trace standardization

2015-03-11 Thread John Lenz
[mailto:erig...@google.com] *Sent:* Wednesday, March 11, 2015 12:12 *To:* Domenic Denicola *Cc:* John Lenz; es-discuss; Erik Arvidsson *Subject:* Re: Maximally minimal stack trace standardization No, that makes the std SES API non-conformant to the std API, making porting more difficult

RE: Maximally minimal stack trace standardization

2015-03-10 Thread Domenic Denicola
Subject: Re: Maximally minimal stack trace standardization Ok, as long as we are clear there is an existing information leak on non-v8 engines. On Tue, Mar 10, 2015 at 1:48 PM, Mark S. Miller erig...@google.commailto:erig...@google.com wrote: On Chrome and Opera (v8), https://code.google.com/p

Re: Maximally minimal stack trace standardization

2015-03-10 Thread Mark S. Miller
scope as well as per loader. *From:* Mark S. Miller [mailto:erig...@google.com] *Sent:* Wednesday, March 11, 2015 12:12 *To:* Domenic Denicola *Cc:* John Lenz; es-discuss; Erik Arvidsson *Subject:* Re: Maximally minimal stack trace standardization No, that makes the std SES API non

Re: Maximally minimal stack trace standardization

2015-03-10 Thread Boris Zbarsky
On 3/10/15 10:45 PM, Domenic Denicola wrote: Can’t we just have Error.prototype.stack be a getter This. Right now, in SpiderMonkey, .stack is a value property on Error instances but I plan to change that in the near future for various reasons to use a getter anyway. We'll need to figure

RE: Maximally minimal stack trace standardization

2015-03-10 Thread Domenic Denicola
From: Mark S. Miller [mailto:erig...@google.com] I can selectively provide or deny a given getStack function to different code in the same realm. I see, thank you. I still think given the existence of .stack in existing browsers I'd rather standardize and converge that. But at least I

Re: Maximally minimal stack trace standardization

2015-03-10 Thread Mark S. Miller
that SES is allowed to delete and hide away for its own purposes later? *From:* es-discuss [mailto:es-discuss-boun...@mozilla.org] *On Behalf Of *John Lenz *Sent:* Wednesday, March 11, 2015 08:35 *To:* Mark S. Miller *Cc:* es-discuss; Erik Arvidsson *Subject:* Re: Maximally minimal stack

RE: Maximally minimal stack trace standardization

2015-03-10 Thread Domenic Denicola
-discuss; Erik Arvidsson Subject: Re: Maximally minimal stack trace standardization No, that makes the std SES API non-conformant to the std API, making porting more difficult, and making it harder to write code that works in both environments. Also, if you make it look like err.stack

Re: Maximally minimal stack trace standardization

2015-03-10 Thread John Lenz
On Mon, Mar 9, 2015 at 5:45 PM, Mark S. Miller erig...@google.com wrote: On Mon, Mar 9, 2015 at 5:02 PM, John Lenz concavel...@gmail.com wrote: On Mon, Mar 9, 2015 at 12:15 PM, Mark S. Miller erig...@google.com wrote: On Sat, Mar 7, 2015 at 2:55 PM, John Lenz concavel...@gmail.com wrote:

Re: Maximally minimal stack trace standardization

2015-03-10 Thread Mark S. Miller
On Chrome and Opera (v8), https://code.google.com/p/google-caja/source/browse/trunk/src/com/google/caja/ses/debug.js hides the stack. It is important that we not lose this. Regarding the rest, as previously discussed, there are enough differences between browsers that there is no legacy we must

Re: Maximally minimal stack trace standardization

2015-03-10 Thread John Lenz
Ok, as long as we are clear there is an existing information leak on non-v8 engines. On Tue, Mar 10, 2015 at 1:48 PM, Mark S. Miller erig...@google.com wrote: On Chrome and Opera (v8), https://code.google.com/p/google-caja/source/browse/trunk/src/com/google/caja/ses/debug.js hides the

Re: Maximally minimal stack trace standardization

2015-03-10 Thread Mark S. Miller
Yes there is. When I have time again, I'll file bugs on them. I should have done this long ago. Thanks. On Tue, Mar 10, 2015 at 4:34 PM, John Lenz concavel...@gmail.com wrote: Ok, as long as we are clear there is an existing information leak on non-v8 engines. On Tue, Mar 10, 2015 at 1:48

Re: Maximally minimal stack trace standardization

2015-03-09 Thread Mark S. Miller
On Sat, Mar 7, 2015 at 2:55 PM, John Lenz concavel...@gmail.com wrote: I wanted to ping this thread and see how we could get max-min stack traces to the next step? Hi John, the best way to take this to the next step is to read

Re: Maximally minimal stack trace standardization

2015-03-09 Thread Mark S. Miller
On Mon, Mar 9, 2015 at 5:02 PM, John Lenz concavel...@gmail.com wrote: On Mon, Mar 9, 2015 at 12:15 PM, Mark S. Miller erig...@google.com wrote: On Sat, Mar 7, 2015 at 2:55 PM, John Lenz concavel...@gmail.com wrote: I wanted to ping this thread and see how we could get max-min stack

Re: Maximally minimal stack trace standardization

2015-03-09 Thread John Lenz
On Mon, Mar 9, 2015 at 12:15 PM, Mark S. Miller erig...@google.com wrote: On Sat, Mar 7, 2015 at 2:55 PM, John Lenz concavel...@gmail.com wrote: I wanted to ping this thread and see how we could get max-min stack traces to the next step? Hi John, the best way to take this to the next step

Re: Maximally minimal stack trace standardization

2015-03-07 Thread John Lenz
I wanted to ping this thread and see how we could get max-min stack traces to the next step? On Fri, Oct 10, 2014 at 11:47 AM, Frankie Bagnardi f.bagna...@gmail.com wrote: I think this is a great idea. I often use stack traces, especially in node.js, for debug error messages and logging.

Re: Maximally minimal stack trace standardization

2014-10-10 Thread Frankie Bagnardi
I think this is a great idea. I often use stack traces, especially in node.js, for debug error messages and logging. This would make it much simpler to work with them. Also there are some libraries which end up with a lot of wrapped functions, which could be omitted using an error cleaner

Re: Maximally minimal stack trace standardization

2014-10-04 Thread John Lenz
Is ES6 shipping PTCs without implementer feedback? Or how have those that tried dealt with stack traces? On Sep 29, 2014 3:20 PM, John Lenz concavel...@gmail.com wrote: What does TC39 expect with regard to PTC and the standard-because-everyone-has-one stack property? Has any of the VMs

Re: Maximally minimal stack trace standardization

2014-09-30 Thread Andreas Rossberg
On 29 September 2014 19:25, Brendan Eich bren...@mozilla.org wrote: Mark S. Miller wrote: That's why, IIRC (haven't checked lately), TCO is only specified for calls from non-sloppy functions. PTC (Proper Tail Calls), not TCO. It's confusing to equate the two, from what I know (corrections

Re: Maximally minimal stack trace standardization

2014-09-30 Thread Andreas Rossberg
Boris' point seems to be -- and I agree -- that such a test would only be a semi-decision procedure. I.e., it can only falsify, but not validate the property for the test program. /Andreas On 30 September 2014 04:48, Brendan Eich bren...@mozilla.org wrote: Put it in a worker or node.js. The

Re: Maximally minimal stack trace standardization

2014-09-30 Thread Carl Smith
John Lenz, using source URLs for naming eval'ed code in the traceback provided to `window.onerror` isn't a de-facto standard; only V8 does it?? ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

Re: Maximally minimal stack trace standardization

2014-09-30 Thread Nick Fitzgerald
I remember web compat concerns, but if Chrome is exposing the `//# sourceURL` to the web in error stacks, maybe we can get away with it as well. I'd defer to jorendorff's opinion on this. We've also discussed exposing the source mapped location of stack frames to JS, but that's even trickier: *

Re: Maximally minimal stack trace standardization

2014-09-30 Thread Sam Tobin-Hochstadt
On Tue, Sep 30, 2014 at 6:56 AM, Andreas Rossberg rossb...@google.com wrote: On 29 September 2014 19:25, Brendan Eich bren...@mozilla.org wrote: Mark S. Miller wrote: That's why, IIRC (haven't checked lately), TCO is only specified for calls from non-sloppy functions. PTC (Proper Tail

Re: Maximally minimal stack trace standardization

2014-09-30 Thread Andreas Rossberg
On 30 September 2014 16:31, Sam Tobin-Hochstadt sa...@cs.indiana.edu wrote: On Tue, Sep 30, 2014 at 6:56 AM, Andreas Rossberg rossb...@google.com wrote: On 29 September 2014 19:25, Brendan Eich bren...@mozilla.org wrote: Mark S. Miller wrote: That's why, IIRC (haven't checked lately), TCO is

Re: Maximally minimal stack trace standardization

2014-09-30 Thread John Lenz
I don't believe we want source map involved as, as you say, that information needs to be retrieved separately. On Sep 30, 2014 5:17 AM, Fitzgerald, Nick nfitzger...@mozilla.com wrote: On 9/30/14, 3:44 AM, John Lenz wrote: It is a defacto standard. On Sep 29, 2014 6:36 PM, Brendan Eich

Re: Maximally minimal stack trace standardization

2014-09-30 Thread Carl Smith
On 30 September 2014 17:28, John Lenz concavel...@gmail.com wrote: I don't believe we want source map involved as, as you say, that information needs to be retrieved separately. I seems there's three parts to this. One is allowing evals to be named the way Chrome does, and providing line and

Re: Maximally minimal stack trace standardization

2014-09-30 Thread Carl Smith
Just to be clear, you can convert a stack trace into a struct pretty easily, and then do source mapping on it with Mozilla Source Maps. This already works. I can see why a console would provide integrated source map support, but no reason for that to be exposed to client code. It's only a rarely

Re: Maximally minimal stack trace standardization

2014-09-30 Thread Carl Smith
Sorry, I didn't mean to kind of hijack the thread. Just read it back. Really just wanted to share the point of view of someone who actually has to provide tracebacks to the user as a central feature in an app. It's difficult, but doable, but only in Chrome/Opera. Pragmatically, it'd just be nice

Re: Maximally minimal stack trace standardization

2014-09-29 Thread John Lenz
On Sat, Sep 27, 2014 at 10:53 PM, Filip Pizlo fpi...@apple.com wrote: I would also like to see this standardized. Comments inline. On Sep 27, 2014, at 10:15 PM, John Lenz concavel...@gmail.com wrote: I would like to get see stack traces standardized for ES7, to that end, I would like to

Re: Maximally minimal stack trace standardization

2014-09-29 Thread Andreas Rossberg
On 28 September 2014 17:01, Marius Gundersen gunder...@gmail.com wrote: The stacktrace should probably be an array of objects with the properties `filename`, `function`, `line` and `column`. Just to be clear, since you said array of objects: 'function' would still have to be string-valued, to

Re: Maximally minimal stack trace standardization

2014-09-29 Thread Filip Pizlo
On Sep 29, 2014, at 7:55 AM, John Lenz concavel...@gmail.com wrote: On Sat, Sep 27, 2014 at 10:53 PM, Filip Pizlo fpi...@apple.com mailto:fpi...@apple.com wrote: I would also like to see this standardized. Comments inline. On Sep 27, 2014, at 10:15 PM, John Lenz

Re: Maximally minimal stack trace standardization

2014-09-29 Thread Andreas Rossberg
On 29 September 2014 18:06, Filip Pizlo fpi...@apple.com wrote: - JS is a great language; it actually lets you write an honest loop. You don’t *need* tail calls. Let me repeat what I just wrote in my previous mail: I think not enough people appreciate the (substantial) difference between

Re: Maximally minimal stack trace standardization

2014-09-29 Thread Sam Tobin-Hochstadt
On Mon, Sep 29, 2014 at 10:55 AM, John Lenz concavel...@gmail.com wrote: I really have no idea what the behavior should be in the faces of optimized tail calls (which is must broader than simply self recursive methods that can be rewritten as a loop). I've seen various suggestions (a capped

Re: Maximally minimal stack trace standardization

2014-09-29 Thread Andreas Rossberg
On 29 September 2014 16:55, John Lenz concavel...@gmail.com wrote: On Sat, Sep 27, 2014 at 10:53 PM, Filip Pizlo fpi...@apple.com wrote: On Sep 27, 2014, at 10:15 PM, John Lenz concavel...@gmail.com wrote: I would like to get see stack traces standardized for ES7, to that end, I would

Re: Maximally minimal stack trace standardization

2014-09-29 Thread Mark S. Miller
On Mon, Sep 29, 2014 at 12:06 PM, Filip Pizlo fpi...@apple.com wrote: [...] I haven't actually seen anything about tail recursion optimizations being implemented, have any of the VM actually tried or committed to implementing tail call optimizations? We (JSC) haven’t. And we don’t plan to,

Re: Maximally minimal stack trace standardization

2014-09-29 Thread Brendan Eich
Mark S. Miller wrote: That's why, IIRC (haven't checked lately), TCO is only specified for calls from non-sloppy functions. PTC (Proper Tail Calls), not TCO. It's confusing to equate the two, from what I know (corrections welcome0. To add to confusion, ES6 drafts say Tail Position Calls

Re: Maximally minimal stack trace standardization

2014-09-29 Thread Filip Pizlo
On Sep 29, 2014, at 10:25 AM, Brendan Eich bren...@mozilla.org wrote: Mark S. Miller wrote: That's why, IIRC (haven't checked lately), TCO is only specified for calls from non-sloppy functions. PTC (Proper Tail Calls), not TCO. It's confusing to equate the two, from what I know

Re: Maximally minimal stack trace standardization

2014-09-29 Thread Filip Pizlo
On Sep 29, 2014, at 9:23 AM, Mark S. Miller erig...@google.com wrote: On Mon, Sep 29, 2014 at 12:06 PM, Filip Pizlo fpi...@apple.com wrote: [...] I haven't actually seen anything about tail recursion optimizations being implemented, have any of the VM actually tried or committed to

Re: Maximally minimal stack trace standardization

2014-09-29 Thread Allen Wirfs-Brock
On Sep 29, 2014, at 9:23 AM, Mark S. Miller wrote: Although we would both like to see function.caller gone as well, we are also both much more skeptical that this is possible. Let's assume that it is not. The conclusion that follows is only that sloppy calls to sloppy functions can't be

Re: Maximally minimal stack trace standardization

2014-09-29 Thread Mark S. Miller
Agreed. TCO or PTC specified only for strict mode functions, not for all non-sloppy functions. Would be nice to extend this at least to bound functions resulting from binding a strict function, but too late to consider for ES6. In any case, all such TCO extensions can compatibly happen later.

Re: Maximally minimal stack trace standardization

2014-09-29 Thread Allen Wirfs-Brock
On Sep 29, 2014, at 11:00 AM, Mark S. Miller wrote: Agreed. TCO or PTC specified only for strict mode functions, not for all non-sloppy functions. Would be nice to extend this at least to bound functions resulting from binding a strict function, but too late to consider for ES6. In any

Re: Maximally minimal stack trace standardization

2014-09-29 Thread Carl Smith
Just wanted to add that CoffeeShop [https://github.com/carlsmith/coffeeshop] already uses stack traces the way JSFiddle and CodePen may do if they were standardised. This only works on V8 as it's the only engine that respects sourceURL 'directives' when listing eval'ed code in stack traces.

Re: Maximally minimal stack trace standardization

2014-09-29 Thread Carl Smith
Sorry, this paragraph is a bit confusing... It's currently impossible to build a JavaScript shell in *any* browser. FF provides line and column numbers for compilation errors, but omits the actual name, so they may as well just not bother ~ it's impossible to build a traceback on Gecko

Re: Maximally minimal stack trace standardization

2014-09-29 Thread Brendan Eich
Allen Wirfs-Brock wrote: No particular reason an implementation can't optimize through that if they want to. The question is whether it should be normative. PTC is about observable asymptotic space performance (I keep saying :-P). /be ___

Re: Maximally minimal stack trace standardization

2014-09-29 Thread Mark Miller
Yes, I believe that we should consider some non-strict non-sloppy functions, such as .bind()ings of strict functions, to also normatively have some TCO/PTC requirements. However, it is too late to consider such for ES6 and we can always extend such TCO/PTC requirements to more cases later. On

Re: Maximally minimal stack trace standardization

2014-09-29 Thread Steve Fink
On 09/29/2014 09:14 AM, Sam Tobin-Hochstadt wrote: On Mon, Sep 29, 2014 at 10:55 AM, John Lenz concavel...@gmail.com wrote: I really have no idea what the behavior should be in the faces of optimized tail calls (which is must broader than simply self recursive methods that can be rewritten as

Re: Maximally minimal stack trace standardization

2014-09-29 Thread Allen Wirfs-Brock
On Sep 29, 2014, at 12:02 PM, Brendan Eich wrote: Allen Wirfs-Brock wrote: No particular reason an implementation can't optimize through that if they want to. The question is whether it should be normative. PTC is about observable asymptotic space performance (I keep saying :-P). /be

Re: Maximally minimal stack trace standardization

2014-09-29 Thread Mark S. Miller
The issue is the asymptotic space consumption almost-contract. The reason I say almost is that conformance of an implementation is not testable. Currently, the spec says nothing about when an implementation might run out of storage. So we (at least I) mean normative only in the following sense:

Re: Maximally minimal stack trace standardization

2014-09-29 Thread Sam Tobin-Hochstadt
On Mon, Sep 29, 2014 at 4:13 PM, Mark S. Miller erig...@google.com wrote: The issue is the asymptotic space consumption almost-contract. The reason I say almost is that conformance of an implementation is not testable. Currently, the spec says nothing about when an implementation might run out

Re: Maximally minimal stack trace standardization

2014-09-29 Thread Mark S. Miller
Practically speaking, I agree. On Mon, Sep 29, 2014 at 1:16 PM, Sam Tobin-Hochstadt sa...@cs.indiana.edu wrote: On Mon, Sep 29, 2014 at 4:13 PM, Mark S. Miller erig...@google.com wrote: The issue is the asymptotic space consumption almost-contract. The reason I say almost is that

Re: Maximally minimal stack trace standardization

2014-09-29 Thread Filip Pizlo
Another way to make this (somewhat) testable is to require specific error.stack behavior for TCO. For example, a call in tail position may require that the caller does not show up in the stack trace. -Filip On Sep 29, 2014, at 1:16 PM, Sam Tobin-Hochstadt sa...@cs.indiana.edu wrote: On

Re: Maximally minimal stack trace standardization

2014-09-29 Thread Sam Tobin-Hochstadt
I think this would be a mistake -- as I mentioned, there are a number of possible strategies for stack traces w/ proper tail calls, and as Steve Fink mentioned, these also arise when considering inlining and other optimizations. We shouldn't prevent implementations from trying to experiment with

Re: Maximally minimal stack trace standardization

2014-09-29 Thread Jason Orendorff
On Mon, Sep 29, 2014 at 3:02 PM, Allen Wirfs-Brock al...@wirfs-brock.com wrote: I can't imagine what you would want be to try to say about non-EMCAScript functions. Their internal call semantics is determined by the semantics of their implementation language. Function.prototype.apply,

Re: Maximally minimal stack trace standardization

2014-09-29 Thread Allen Wirfs-Brock
On Sep 29, 2014, at 1:13 PM, Mark S. Miller wrote: The issue is the asymptotic space consumption almost-contract. The reason I say almost is that conformance of an implementation is not testable. Currently, the spec says nothing about when an implementation might run out of storage. So

Re: Maximally minimal stack trace standardization

2014-09-29 Thread Filip Pizlo
On Sep 29, 2014, at 12:19 PM, Steve Fink sph...@gmail.com wrote: On 09/29/2014 09:14 AM, Sam Tobin-Hochstadt wrote: On Mon, Sep 29, 2014 at 10:55 AM, John Lenz concavel...@gmail.com wrote: I really have no idea what the behavior should be in the faces of optimized tail calls (which is

Re: Maximally minimal stack trace standardization

2014-09-29 Thread Filip Pizlo
On Sep 29, 2014, at 1:26 PM, Sam Tobin-Hochstadt sa...@cs.indiana.edu wrote: I think this would be a mistake -- as I mentioned, there are a number of possible strategies for stack traces w/ proper tail calls, But we should spec one of them, particularly if we want to move towards

Re: Maximally minimal stack trace standardization

2014-09-29 Thread Sam Tobin-Hochstadt
On Mon, Sep 29, 2014 at 4:57 PM, Filip Pizlo fpi...@apple.com wrote: On Sep 29, 2014, at 1:26 PM, Sam Tobin-Hochstadt sa...@cs.indiana.edu wrote: I think this would be a mistake -- as I mentioned, there are a number of possible strategies for stack traces w/ proper tail calls, But we

Re: Maximally minimal stack trace standardization

2014-09-29 Thread Allen Wirfs-Brock
On Sep 29, 2014, at 1:41 PM, Jason Orendorff wrote: On Mon, Sep 29, 2014 at 3:02 PM, Allen Wirfs-Brock al...@wirfs-brock.com wrote: I can't imagine what you would want be to try to say about non-EMCAScript functions. Their internal call semantics is determined by the semantics of their

Re: Maximally minimal stack trace standardization

2014-09-29 Thread Filip Pizlo
On Sep 29, 2014, at 2:05 PM, Sam Tobin-Hochstadt sa...@cs.indiana.edu wrote: On Mon, Sep 29, 2014 at 4:57 PM, Filip Pizlo fpi...@apple.com mailto:fpi...@apple.com wrote: On Sep 29, 2014, at 1:26 PM, Sam Tobin-Hochstadt sa...@cs.indiana.edu wrote: I think this would be a mistake --

Re: Maximally minimal stack trace standardization

2014-09-29 Thread John Lenz
The issues with sourceUrl and syntax errors is fixed in the latest Chrome dev channel and should be making its way to us in the near future. :-) On Mon, Sep 29, 2014 at 11:49 AM, Carl Smith carl.in...@gmail.com wrote: Just wanted to add that CoffeeShop [

Re: Maximally minimal stack trace standardization

2014-09-29 Thread John Lenz
On Mon, Sep 29, 2014 at 12:19 PM, Steve Fink sph...@gmail.com wrote: On 09/29/2014 09:14 AM, Sam Tobin-Hochstadt wrote: On Mon, Sep 29, 2014 at 10:55 AM, John Lenz concavel...@gmail.com wrote: I really have no idea what the behavior should be in the faces of optimized tail calls (which

Re: Maximally minimal stack trace standardization

2014-09-29 Thread John Lenz
What does TC39 expect with regard to PTC and the standard-because-everyone-has-one stack property? Has any of the VMs actually tried to implement PTC for JS? On Mon, Sep 29, 2014 at 12:02 PM, Brendan Eich bren...@mozilla.org wrote: Allen Wirfs-Brock wrote: No particular reason an

Re: Maximally minimal stack trace standardization

2014-09-29 Thread Jason Orendorff
On Mon, Sep 29, 2014 at 4:06 PM, Allen Wirfs-Brock al...@wirfs-brock.com wrote: On Sep 29, 2014, at 1:41 PM, Jason Orendorff wrote: Function.prototype.apply, Function.prototype.call, and Reflect.apply currently call PrepareForTailCall. Is this a bug? No, I don't believe so. Built-ins

Re: Maximally minimal stack trace standardization

2014-09-29 Thread Carl Smith
On 29 September 2014 23:04, John Lenz concavel...@gmail.com wrote: The issues with sourceUrl and syntax errors is fixed in the latest Chrome dev channel and should be making its way to us in the near future. :-) Awesome. I can add JavaScript support to the shell :) I still think the

Re: Maximally minimal stack trace standardization

2014-09-29 Thread Allen Wirfs-Brock
On Sep 29, 2014, at 3:37 PM, Jason Orendorff wrote: On Mon, Sep 29, 2014 at 4:06 PM, Allen Wirfs-Brock al...@wirfs-brock.com wrote: On Sep 29, 2014, at 1:41 PM, Jason Orendorff wrote: Function.prototype.apply, Function.prototype.call, and Reflect.apply currently call PrepareForTailCall. Is

Re: Maximally minimal stack trace standardization

2014-09-29 Thread Brendan Eich
Allen Wirfs-Brock wrote: On Sep 29, 2014, at 12:02 PM, Brendan Eich wrote: Allen Wirfs-Brock wrote: No particular reason an implementation can't optimize through that if they want to. The question is whether it should be normative. PTC is about observable asymptotic space performance (I

Re: Maximally minimal stack trace standardization

2014-09-29 Thread Brendan Eich
Carl Smith wrote: I still think the omission of some method for naming eval'ed code in the ES6 spec is unacceptable. It's not a nice-to-have that can be bundled with nicer stack objects, which are relatively unimportant [easily fixed with a regex]. See

Re: Maximally minimal stack trace standardization

2014-09-29 Thread Carl Smith
On 30 September 2014 00:33, Brendan Eich bren...@mozilla.org wrote: Carl Smith wrote: I still think the omission of some method for naming eval'ed code in the ES6 spec is unacceptable. It's not a nice-to-have that can be bundled with nicer stack objects, which are relatively unimportant

Re: Maximally minimal stack trace standardization

2014-09-29 Thread Brendan Eich
Carl Smith wrote: If the source URL hack, or some cleaner wrapper for it, was standardised, it'd make all the difference. Why don't we just make the source URL hack a de-facto standard? That's how evolution happens, in the best case. Cc'ing @fitzgen. /be

Re: Maximally minimal stack trace standardization

2014-09-29 Thread Boris Zbarsky
On 9/29/14, 4:16 PM, Sam Tobin-Hochstadt wrote: We'd consider it a spec violation (at least, I would), if this program ran out of space, ever: var i = 0; while (1) { i++; }; How would you know whether it does? You can't tell whether your program is terminated because it runs out

Re: Maximally minimal stack trace standardization

2014-09-29 Thread John Lenz
It is a defacto standard. On Sep 29, 2014 6:36 PM, Brendan Eich bren...@mozilla.org wrote: Carl Smith wrote: If the source URL hack, or some cleaner wrapper for it, was standardised, it'd make all the difference. Why don't we just make the source URL hack a de-facto standard? That's how

Re: Maximally minimal stack trace standardization

2014-09-29 Thread Brendan Eich
Put it in a worker or node.js. The point Sam was making was based on Ecma-262, no browser watchdog required. /be On Sep 29, 2014, at 6:47 PM, Boris Zbarsky bzbar...@mit.edu wrote: On 9/29/14, 4:16 PM, Sam Tobin-Hochstadt wrote: We'd consider it a spec violation (at least, I would), if this

Re: Maximally minimal stack trace standardization

2014-09-28 Thread Boris Zbarsky
On 9/28/14, 1:15 AM, John Lenz wrote: * the stack property (a string) I'd somewhat like to see this be an accessor, to allow implementations to compute the stack string lazily. Does this sound like a reasonable minimal set? Yes. -Boris ___

Re: Maximally minimal stack trace standardization

2014-09-28 Thread Erik Arvidsson
Last time this was tried the conclusion was that the current format using the stack property as a string could not be standardized. Different browsers use different format and therefore the format can not be changed without breaking existing code. The conclusion was that we needed to use a

Re: Maximally minimal stack trace standardization

2014-09-28 Thread Marius Gundersen
It would be helpful if the stack trace was machine readable, not just human readable. As Erik said [...] we might ass well stop using a string to represent this structured data. The stacktrace should probably be an array of objects with the properties `filename`, `function`, `line` and

Re: Maximally minimal stack trace standardization

2014-09-28 Thread Filip Pizlo
On Sep 28, 2014, at 8:01 AM, Marius Gundersen gunder...@gmail.com wrote: It would be helpful if the stack trace was machine readable, not just human readable. As Erik said +1 [...] we might ass well stop using a string to represent this structured data. The stacktrace should

Re: Maximally minimal stack trace standardization

2014-09-28 Thread John Lenz
Firefox has changed aspects (adding columns and other things) so I think it is possible that we can change this. Was there hard data otherwise? On Sep 28, 2014 6:26 AM, Erik Arvidsson erik.arvids...@gmail.com wrote: Last time this was tried the conclusion was that the current format using the

Re: Maximally minimal stack trace standardization

2014-09-28 Thread John Lenz
But that said an new name and structure would be fine with me. I'm a little worried stack would be out of sync with stack trace or whatever. Making stack an accesor of stackTrace would help but what do we do with writes? On Sep 28, 2014 4:35 PM, John Lenz concavel...@gmail.com wrote: Firefox has

Re: Maximally minimal stack trace standardization

2014-09-28 Thread John Lenz
Of course a standard string format can be machine readable (we maintain stack trace parsers for existing browsers) but it is inconvenient compared to simple JSON or whatever. On Sep 28, 2014 8:02 AM, Marius Gundersen gunder...@gmail.com wrote: It would be helpful if the stack trace was machine

Maximally minimal stack trace standardization

2014-09-27 Thread John Lenz
I would like to get see stack traces standardized for ES7, to that end, I would like to define a minimal set of behaviors that would need to be defined: * the stack property (a string) * when the stack property is attached (at Error object creation or at throw) * what happens when Error object

Re: Maximally minimal stack trace standardization

2014-09-27 Thread Filip Pizlo
I would also like to see this standardized. Comments inline. On Sep 27, 2014, at 10:15 PM, John Lenz concavel...@gmail.com wrote: I would like to get see stack traces standardized for ES7, to that end, I would like to define a minimal set of behaviors that would need to be defined: *