Make the parser track the language mode instead of keeping its own harmony flag.
authorkeuchel@chromium.org <keuchel@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Thu, 24 Nov 2011 15:58:09 +0000 (15:58 +0000)
committerkeuchel@chromium.org <keuchel@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Thu, 24 Nov 2011 15:58:09 +0000 (15:58 +0000)
commitcbf08248f71a930757dab4b3d81c6537be2680b3
tree2cca233960d77fbbe982b4f270dab64e39d2496f
parent1e9a7267ab35caf2f32ad591fc5dafaaa03466c0
Make the parser track the language mode instead of keeping its own harmony flag.

So far the parser had its own harmony flag to disable the harmony scoping
feature when parsing native functions. With the introduction of the extended
language mode this becomes unnecessary because native functions will never enter
the extended mode. The parser can thus track FLAG_harmony_scoping and the
language mode of the current scope to see if harmony features are allowed. The
scanner and preparser have to keep their flag, because they can't use
FLAG_harmony_scoping as it is not available for the preparser-process
executable.

This depends on:
http://codereview.chromium.org/8417035/

Review URL: http://codereview.chromium.org/8562002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10063 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
src/parser.cc
src/parser.h
test/cctest/test-parsing.cc