On Mon, 21 Jul 2014, Allen Wirfs-Brock wrote: > > > > Is there a more up to date version I can look at? I couldn't quite > > work out what the canonical file to look at was. I've been using this: > > I just release a new PDF draft Friday at > http://wiki.ecmascript.org/doku.php?id=harmony:specification_drafts#july_18_2014_draft_rev_26
Ah, cool, thanks. (Is there a URL that will always point to the very latest version, by any chance?) > >> is always initialized (by NextJob) with an empty execution context > >> stack. > > > > What step in NextJob does this? It seems that step 3 asserts it, but > > step 1 doesn't seem to affect the stack, and step 2 refers to the > > "suspend" prose, which seems mostly non-normative (I can't quite tell > > it's normative status -- there's no step-by-step algorithms, which > > seems to be the way the ES spec indications normativity, but there's > > no RFC2119-style prose either, so I can't tell the descriptive > > statements in that section from the prescriptive ones). > > It's because NextJob is only supposed to be used within an Job > initiation abstract operation that is passed to EnqueueJob. So, since > we start with an empty stack in 8.5 and each job each returns/unwinds to > its starting context it flows like this > > <empty stack> > create dummy root context > 8.5 Initialization, does stuff The "does stuff" in particular includes step 5, "Push newContext onto the execution context stack". > returns/unwinds to dummy root context Where? > NextJob, deletes dummy root context Where? Step 3 of NextJob says "Assert: The execution context stack is now empty", but I don't see anything that undoes the effect of 8.5's step 5, which makes it not empty. I admit I haven't made an exhaustive search of all the algorithms directly and indirectly called by 8.5. I started trying to trace all the steps between 8.5:5 and NextJob:3 in this e-mail, but that's a lot of calls so it's probably not worth including here. Do you have a precise pointer to the actual step that unwinds the stack? -- Ian Hickson U+1047E )\._.,--....,'``. fL http://ln.hixie.ch/ U+263A /, _.. \ _\ ;`._ ,. Things that are impossible just take longer. `._.-(,_..'--(,_..'`-.;.' _______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

