Rewrite "const" as "var" for iTunes/iBooks on the Mac
authorsbarati@apple.com <sbarati@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 3 Nov 2015 23:23:23 +0000 (23:23 +0000)
committersbarati@apple.com <sbarati@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 3 Nov 2015 23:23:23 +0000 (23:23 +0000)
commit6ef62a58ef88e437b63371a6a1aebcec1c16a2a0
tree1ae5b7cba69dd53ea74d1c6c220bc6b21c327ad0
parent9096f16b765ea976f789d1c93adee79305e24ca9
Rewrite "const" as "var" for iTunes/iBooks on the Mac
https://bugs.webkit.org/show_bug.cgi?id=150852

Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

VM now has a setting indicating if we should treat
"const" variables as "var" to more closely match
JSC's previous implementation of "const" before ES6.

* parser/Parser.h:
(JSC::Parser::next):
(JSC::Parser::nextExpectIdentifier):
* runtime/VM.h:
(JSC::VM::setShouldRewriteConstAsVar):
(JSC::VM::shouldRewriteConstAsVar):

Source/WebCore:

* bindings/js/JSDOMWindowBase.cpp:
(WebCore::JSDOMWindowBase::commonVM):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@191982 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/parser/Parser.h
Source/JavaScriptCore/runtime/VM.h
Source/WebCore/ChangeLog
Source/WebCore/bindings/js/JSDOMWindowBase.cpp