Re: Reading tail calls specification

2017-07-26 Thread T.J. Crowder
On Wed, Jul 26, 2017 at 4:31 PM, Allen Wirfs-Brock wrote: > Note that the irregular indentation does not occur in the ES2015 > PDF which is a direct rendering of the MS Word source document > that was in use at that time. The irregular indentation (at > least then) as an

Re: Reading tail calls specification

2017-07-26 Thread Allen Wirfs-Brock
> On Jul 26, 2017, at 6:01 AM, T.J. Crowder > wrote: > > > **Ouch**, that's time I'd really like back. The problem is in the ES2015 and > ES2016 specs too, I assumed it had to mean something. Note that the irregular indentation does not occur in the ES2015

Re: Reading tail calls specification

2017-07-26 Thread Mike Samuel
On Wed, Jul 26, 2017 at 9:01 AM, T.J. Crowder wrote: > On Wed, Jul 26, 2017 at 1:52 PM, Michael Dyck > wrote: >> On 17-07-26 07:32 AM, T.J. Crowder wrote: >>> >>> Second, the general: What's the significance of the indentation? Some >>>

Re: Reading tail calls specification

2017-07-26 Thread T.J. Crowder
On Wed, Jul 26, 2017 at 1:52 PM, Michael Dyck wrote: > On 17-07-26 07:32 AM, T.J. Crowder wrote: >> >> Second, the general: What's the significance of the indentation? Some >> productions are indented more than others, and I can't see meaning in it. > > No significance, just a

Re: Reading tail calls specification

2017-07-26 Thread Michael Dyck
On 17-07-26 07:32 AM, T.J. Crowder wrote: Second, the general: What's the significance of the indentation? Some productions are indented more than others, and I can't see meaning in it. No significance, just a styling thing. See https://github.com/tc39/ecma262/issues/956 -Michael

Re: Reading tail calls specification

2017-07-26 Thread T.J. Crowder
Sorry, I meant to mention that I checked my understanding of that specific case against the current in-progress TCO implementation in V8 v5.8.283.41 (in Node 8.2.1 behind a flag), and it did indeed happily optimize the first and not the second: ```js "use strict"; // Optimized: function a(val,

Reading tail calls specification

2017-07-26 Thread T.J. Crowder
I'm wrapping my head around the details of TCO in the spec. Two parts to this: 1. Could I ask someone to double-check me on a particular understanding, and 2. What's the significance of some productions in the various statement and expression rules being indented and set apart from others? (A