Done on all accounts. The test stays unchanged because the function
CheckStrictMode already checks that the code works outside of strict mode and
triggers SyntaxError in strict mode.

Thank you!
Martin


http://codereview.chromium.org/6382006/diff/6001/src/parser.cc
File src/parser.cc (right):

http://codereview.chromium.org/6382006/diff/6001/src/parser.cc#newcode3398
src/parser.cc:3398: if (name_loc.beg_pos != RelocInfo::kNoPosition) {
On 2011/01/25 13:03:55, Lasse Reichstein wrote:
Use name_loc.IsValid() here and below.

Done.

http://codereview.chromium.org/6382006/diff/6001/src/scanner-base.h
File src/scanner-base.h (right):

http://codereview.chromium.org/6382006/diff/6001/src/scanner-base.h#newcode276
src/scanner-base.h:276: return beg_pos >= 0 && end_pos >= 0;
On 2011/01/25 13:03:55, Lasse Reichstein wrote:
How about ... && end_pos >= beg_pos;
Seems more "valid" to me :)

Done. Using beg_pos >= 0 && end_pos >= beg_pos

because end_pos >= beg_pos >= 0 ===> end_pos >= 0

http://codereview.chromium.org/6382006/diff/6001/test/mjsunit/strict-mode.js
File test/mjsunit/strict-mode.js (right):

http://codereview.chromium.org/6382006/diff/6001/test/mjsunit/strict-mode.js#newcode91
test/mjsunit/strict-mode.js:91: CheckStrictMode("function foo(a, b, c,
d, b) {}", SyntaxError)
On 2011/01/25 13:03:55, Lasse Reichstein wrote:
How about checking that it's not an error in non-strict mode?

Already implemented. The CheckStrictMode function will compile the
snippet without strict mode and then in several configuration of strict
mode.

http://codereview.chromium.org/6382006/

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

Reply via email to