This requires putting the original loop's body inside an inner for loop (with
the same labels as the original loop) and re-binding the temp variables in its
"next" expression. A second flag is added to the desugared code to ensure the
loop body executes at most once per loop.
BUG=v8:3683
LOG=y
Review URL: https://codereview.chromium.org/720863002
Cr-Commit-Position: refs/heads/master@{#25363}
This is in preparation for making --harmony and --es-staging synonyms.
The only remaining difference currently is block-scoping, which is still
implied by --harmony, to avoid regressing on a long-available feature.
Also removes the special-casing of --harmony-proxies.
R=adamk@chromium.org
BUG=
Review URL: https://codereview.chromium.org/693153004
Cr-Commit-Position: refs/heads/master@{#25115}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@25115 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
All JSObjects in V8 either have a map()->constructor() field or are
JSFunctions. JSProxy::Fix, however, was not enforcing this, and
Object.observe's use of JSObject::GetCreationContext() exposed this.
Note that this is not Object.observe-specific: the API call
v8::Object::CreationContext() also would have revealed this bug.
This patch chooses Object as a reasonable constructor to put on the
newly-fixed object's map. Note that this has no effect on the "constructor"
property in JS. In doing so, I've also tightened up the code underlying
JSProxy::Fix to only support JSObject and JSFunction as possible output
types.
BUG=405844
LOG=N
R=rossberg@chromium.org, verwaest@chromium.org
Review URL: https://codereview.chromium.org/505303004
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23466 ce2b1a6d-e550-0410-aec6-3dcde31c8c00