LGTM if the function isn't strict.

http://codereview.chromium.org/7067017/diff/1/src/bootstrapper.cc
File src/bootstrapper.cc (right):

http://codereview.chromium.org/7067017/diff/1/src/bootstrapper.cc#newcode557
src/bootstrapper.cc:557: factory()->NewFunctionWithoutPrototype(name,
kStrictMode);
It's should not be a strict function.
If it's a strict function, it throws if you do func.arguments. It
shouldn't for builtin functions.

http://codereview.chromium.org/7067017/diff/1/src/bootstrapper.cc#newcode557
src/bootstrapper.cc:557: factory()->NewFunctionWithoutPrototype(name,
kStrictMode);
Does this create a function with no .prototype property? It seems to
have a .prototype property if you check in the current version.

http://codereview.chromium.org/7067017/diff/1/src/bootstrapper.cc#newcode560
src/bootstrapper.cc:560: Builtins::kStrictModePoisonPill));
Just use an initializer instead of repeating "Handle<Code>":
 Handle<Code> code(isolate()-> ...);

http://codereview.chromium.org/7067017/diff/1/src/bootstrapper.cc#newcode563
src/bootstrapper.cc:563: global_context()->strict_mode_function_map());
Still not a strict function.

http://codereview.chromium.org/7067017/diff/1/src/messages.js
File src/messages.js (right):

http://codereview.chromium.org/7067017/diff/1/src/messages.js#newcode238
src/messages.js:238: strict_poison_pill:           ["'caller', 'callee',
and 'arguments' properties may not be accessed on strict mode functions
or the arguments objects for calls to them"],
Imprecise description.
You can't access "arguments" or "caller" on function objects, and not
"caller" or "callee" on arguments objects.

http://codereview.chromium.org/7067017/diff/1/test/mjsunit/regress/regress-1387.js
File test/mjsunit/regress/regress-1387.js (right):

http://codereview.chromium.org/7067017/diff/1/test/mjsunit/regress/regress-1387.js#newcode38
test/mjsunit/regress/regress-1387.js:38: assertEquals(get1, get2);
Also read get3 and get4 from foo.caller and foo.arguments, and see that
they are all the same.

http://codereview.chromium.org/7067017/

--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to