PTAL
https://codereview.chromium.org/631433002/diff/20001/src/preparser.h
File src/preparser.h (right):
https://codereview.chromium.org/631433002/diff/20001/src/preparser.h#newcode153
src/preparser.h:153: *scope_stack_ = scope_;
On 2014/10/07 10:28:32, Dmitry Lomov (chromium) wrote:
Why do you need this constructor?
This is due to how parser and preparser typedef Scope differently.
We have the same duplication of the constructor for FunctionState.
https://codereview.chromium.org/631433002/diff/20001/src/preparser.h#newcode2765
src/preparser.h:2765: BlockState block_state(&scope_, &scope);
On 2014/10/07 10:28:32, Dmitry Lomov (chromium) wrote:
Seems like BlockState block_state(&scope_, scope) will do just fine
here.
That works with PreParser but not with Parser.
https://codereview.chromium.org/631433002/diff/20001/src/runtime/runtime.cc
File src/runtime/runtime.cc (right):
https://codereview.chromium.org/631433002/diff/20001/src/runtime/runtime.cc#newcode376
src/runtime/runtime.cc:376: prototype_parent =
isolate->initial_object_prototype();
On 2014/10/07 10:28:32, Dmitry Lomov (chromium) wrote:
What happens, per spec, if user assigns to Object.prototype?
The spec uses %ObjectPrototype% which is the original Object.prototype.
https://people.mozilla.org/~jorendorff/es6-draft.html#sec-runtime-semantics-classdefinitionevaluation
https://codereview.chromium.org/631433002/diff/20001/src/runtime/runtime.cc#newcode405
src/runtime/runtime.cc:405: isolate, JSObject::SetPrototype(prototype,
prototype_parent, false));
On 2014/10/07 10:28:32, Dmitry Lomov (chromium) wrote:
Instead of SetPrototype here, I suggest using NewJSObjectFromMap with
an
appropriate Map (the prototype field of which is set to
prototype_parent), so
that we can avoid prototype mutation.
Done.
I used to have a todo for this... I'm not sure when the todo
dissappeared... well now it is done.
https://codereview.chromium.org/631433002/
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.