<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[204714] trunk</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/204714">204714</a></dd>
<dt>Author</dt> <dd>utatane.tea@gmail.com</dd>
<dt>Date</dt> <dd>2016-08-22 07:12:10 -0700 (Mon, 22 Aug 2016)</dd>
</dl>
<h3>Log Message</h3>
<pre>[ES6] Module should not allow HTML comments
https://bugs.webkit.org/show_bug.cgi?id=161041
Reviewed by Saam Barati.
JSTests:
* modules/html-comments.js: Added.
(shouldThrow):
* test262.yaml:
Source/JavaScriptCore:
ES6 Modules intentionally disable HTML comments[1].
[1]: https://tc39.github.io/ecma262/#sec-html-like-comments
* API/JSScriptRef.cpp:
(parseScript):
* builtins/BuiltinExecutables.cpp:
(JSC::BuiltinExecutables::createExecutable):
* bytecode/EvalCodeCache.h:
(JSC::EvalCodeCache::CacheKey::CacheKey):
* bytecode/ExecutableInfo.h:
(JSC::ExecutableInfo::ExecutableInfo):
(JSC::ExecutableInfo::commentMode):
(JSC::ExecutableInfo::superBinding): Deleted.
* bytecode/UnlinkedCodeBlock.cpp:
(JSC::UnlinkedCodeBlock::UnlinkedCodeBlock):
* bytecode/UnlinkedCodeBlock.h:
(JSC::UnlinkedCodeBlock::commentMode):
(JSC::UnlinkedCodeBlock::superBinding): Deleted.
* bytecode/UnlinkedFunctionExecutable.cpp:
(JSC::generateUnlinkedFunctionCodeBlock):
(JSC::UnlinkedFunctionExecutable::UnlinkedFunctionExecutable):
* bytecode/UnlinkedFunctionExecutable.h:
* bytecompiler/BytecodeGenerator.h:
(JSC::BytecodeGenerator::commentMode):
(JSC::BytecodeGenerator::makeFunction):
(JSC::BytecodeGenerator::superBinding): Deleted.
* parser/Lexer.cpp:
(JSC::Lexer<T>::Lexer):
(JSC::Lexer<T>::lex):
* parser/Lexer.h:
* parser/Parser.cpp:
(JSC::Parser<LexerType>::Parser):
* parser/Parser.h:
(JSC::parse):
* parser/ParserModes.h:
* parser/SourceCodeKey.h:
(JSC::SourceCodeFlags::SourceCodeFlags):
(JSC::SourceCodeKey::SourceCodeKey):
* runtime/CodeCache.cpp:
(JSC::CodeCache::getGlobalCodeBlock):
(JSC::CodeCache::getProgramCodeBlock):
(JSC::CodeCache::getEvalCodeBlock):
(JSC::CodeCache::getModuleProgramCodeBlock):
(JSC::CodeCache::getFunctionExecutableFromGlobalCode):
* runtime/CodeCache.h:
* runtime/Completion.cpp:
(JSC::checkSyntax):
(JSC::checkModuleSyntax):
* runtime/Executable.cpp:
(JSC::ProgramExecutable::checkSyntax):
* runtime/Executable.h:
* runtime/ModuleLoaderPrototype.cpp:
(JSC::moduleLoaderPrototypeParseModule):</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkJSTestsChangeLog">trunk/JSTests/ChangeLog</a></li>
<li><a href="#trunkJSTeststest262yaml">trunk/JSTests/test262.yaml</a></li>
<li><a href="#trunkSourceJavaScriptCoreAPIJSScriptRefcpp">trunk/Source/JavaScriptCore/API/JSScriptRef.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreChangeLog">trunk/Source/JavaScriptCore/ChangeLog</a></li>
<li><a href="#trunkSourceJavaScriptCorebuiltinsBuiltinExecutablescpp">trunk/Source/JavaScriptCore/builtins/BuiltinExecutables.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCorebytecodeEvalCodeCacheh">trunk/Source/JavaScriptCore/bytecode/EvalCodeCache.h</a></li>
<li><a href="#trunkSourceJavaScriptCorebytecodeExecutableInfoh">trunk/Source/JavaScriptCore/bytecode/ExecutableInfo.h</a></li>
<li><a href="#trunkSourceJavaScriptCorebytecodeUnlinkedCodeBlockcpp">trunk/Source/JavaScriptCore/bytecode/UnlinkedCodeBlock.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCorebytecodeUnlinkedCodeBlockh">trunk/Source/JavaScriptCore/bytecode/UnlinkedCodeBlock.h</a></li>
<li><a href="#trunkSourceJavaScriptCorebytecodeUnlinkedFunctionExecutablecpp">trunk/Source/JavaScriptCore/bytecode/UnlinkedFunctionExecutable.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCorebytecodeUnlinkedFunctionExecutableh">trunk/Source/JavaScriptCore/bytecode/UnlinkedFunctionExecutable.h</a></li>
<li><a href="#trunkSourceJavaScriptCorebytecompilerBytecodeGeneratorh">trunk/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreparserLexercpp">trunk/Source/JavaScriptCore/parser/Lexer.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreparserLexerh">trunk/Source/JavaScriptCore/parser/Lexer.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreparserParsercpp">trunk/Source/JavaScriptCore/parser/Parser.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreparserParserh">trunk/Source/JavaScriptCore/parser/Parser.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreparserParserModesh">trunk/Source/JavaScriptCore/parser/ParserModes.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreparserSourceCodeKeyh">trunk/Source/JavaScriptCore/parser/SourceCodeKey.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeCodeCachecpp">trunk/Source/JavaScriptCore/runtime/CodeCache.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeCodeCacheh">trunk/Source/JavaScriptCore/runtime/CodeCache.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeCompletioncpp">trunk/Source/JavaScriptCore/runtime/Completion.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeExecutablecpp">trunk/Source/JavaScriptCore/runtime/Executable.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeExecutableh">trunk/Source/JavaScriptCore/runtime/Executable.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeModuleLoaderPrototypecpp">trunk/Source/JavaScriptCore/runtime/ModuleLoaderPrototype.cpp</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a href="#trunkJSTestsmoduleshtmlcommentsjs">trunk/JSTests/modules/html-comments.js</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkJSTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/JSTests/ChangeLog (204713 => 204714)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/JSTests/ChangeLog        2016-08-22 13:51:54 UTC (rev 204713)
+++ trunk/JSTests/ChangeLog        2016-08-22 14:12:10 UTC (rev 204714)
</span><span class="lines">@@ -1,3 +1,14 @@
</span><ins>+2016-08-22 Yusuke Suzuki <utatane.tea@gmail.com>
+
+ [ES6] Module should not allow HTML comments
+ https://bugs.webkit.org/show_bug.cgi?id=161041
+
+ Reviewed by Saam Barati.
+
+ * modules/html-comments.js: Added.
+ (shouldThrow):
+ * test262.yaml:
+
</ins><span class="cx"> 2016-08-21 Yusuke Suzuki <utatane.tea@gmail.com>
</span><span class="cx">
</span><span class="cx"> [DFG] Should not fixup AnyIntUse in 32_64
</span></span></pre></div>
<a id="trunkJSTestsmoduleshtmlcommentsjs"></a>
<div class="addfile"><h4>Added: trunk/JSTests/modules/html-comments.js (0 => 204714)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/JSTests/modules/html-comments.js         (rev 0)
+++ trunk/JSTests/modules/html-comments.js        2016-08-22 14:12:10 UTC (rev 204714)
</span><span class="lines">@@ -0,0 +1,45 @@
</span><ins>+import { shouldBe, shouldThrow } from "./resources/assert.js";
+
+// Eval's goal symbol is Script, not Module.
+shouldBe(eval(`
+<!-- ok
+--> ok
+42
+`), 42);
+
+// Function's goal symbol is not Module.
+shouldBe(new Function(`
+<!-- ok
+--> ok
+return 42
+`)(), 42);
+
+shouldThrow(() => {
+ checkModuleSyntax(`
+ <!-- ng -->
+ `)
+}, `SyntaxError: Unexpected token '<':2`);
+
+shouldThrow(() => {
+ checkModuleSyntax(`
+-->
+ `)
+}, `SyntaxError: Unexpected token '>':2`);
+
+shouldThrow(() => {
+ checkModuleSyntax(`
+ function hello()
+ {
+ <!-- ng -->
+ }
+ `)
+}, `SyntaxError: Unexpected token '<':4`);
+
+shouldThrow(() => {
+ checkModuleSyntax(`
+ function hello()
+ {
+-->
+ }
+ `)
+}, `SyntaxError: Unexpected token '>':4`);
</ins></span></pre></div>
<a id="trunkJSTeststest262yaml"></a>
<div class="modfile"><h4>Modified: trunk/JSTests/test262.yaml (204713 => 204714)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/JSTests/test262.yaml        2016-08-22 13:51:54 UTC (rev 204713)
+++ trunk/JSTests/test262.yaml        2016-08-22 14:12:10 UTC (rev 204714)
</span><span class="lines">@@ -70820,11 +70820,11 @@
</span><span class="cx"> - path: test262/test/language/literals/string/mongolian-vowel-separator.js
</span><span class="cx"> cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], [:strict]
</span><span class="cx"> - path: test262/test/language/module-code/comment-multi-line-html-close.js
</span><del>- cmd: runTest262 :fail, "SyntaxError", ["../../../harness/assert.js", "../../../harness/sta.js"], [:module]
</del><ins>+ cmd: runTest262 :normal, "SyntaxError", ["../../../harness/assert.js", "../../../harness/sta.js"], [:module]
</ins><span class="cx"> - path: test262/test/language/module-code/comment-single-line-html-close.js
</span><del>- cmd: runTest262 :fail, "SyntaxError", ["../../../harness/assert.js", "../../../harness/sta.js"], [:module]
</del><ins>+ cmd: runTest262 :normal, "SyntaxError", ["../../../harness/assert.js", "../../../harness/sta.js"], [:module]
</ins><span class="cx"> - path: test262/test/language/module-code/comment-single-line-html-open.js
</span><del>- cmd: runTest262 :fail, "SyntaxError", ["../../../harness/assert.js", "../../../harness/sta.js"], [:module]
</del><ins>+ cmd: runTest262 :normal, "SyntaxError", ["../../../harness/assert.js", "../../../harness/sta.js"], [:module]
</ins><span class="cx"> - path: test262/test/language/module-code/early-dup-export-decl.js
</span><span class="cx"> cmd: runTest262 :normal, "SyntaxError", ["../../../harness/assert.js", "../../../harness/sta.js"], [:module]
</span><span class="cx"> - path: test262/test/language/module-code/early-dup-export-dflt-id.js
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreAPIJSScriptRefcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/API/JSScriptRef.cpp (204713 => 204714)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/API/JSScriptRef.cpp        2016-08-22 13:51:54 UTC (rev 204713)
+++ trunk/Source/JavaScriptCore/API/JSScriptRef.cpp        2016-08-22 14:12:10 UTC (rev 204714)
</span><span class="lines">@@ -76,7 +76,7 @@
</span><span class="cx"> {
</span><span class="cx"> return !!JSC::parse<JSC::ProgramNode>(
</span><span class="cx"> vm, source, Identifier(), JSParserBuiltinMode::NotBuiltin,
</span><del>- JSParserStrictMode::NotStrict, SourceParseMode::ProgramMode, SuperBinding::NotNeeded,
</del><ins>+ JSParserStrictMode::NotStrict, JSParserCommentMode::Classic, SourceParseMode::ProgramMode, SuperBinding::NotNeeded,
</ins><span class="cx"> error);
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/ChangeLog (204713 => 204714)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/ChangeLog        2016-08-22 13:51:54 UTC (rev 204713)
+++ trunk/Source/JavaScriptCore/ChangeLog        2016-08-22 14:12:10 UTC (rev 204714)
</span><span class="lines">@@ -1,3 +1,65 @@
</span><ins>+2016-08-22 Yusuke Suzuki <utatane.tea@gmail.com>
+
+ [ES6] Module should not allow HTML comments
+ https://bugs.webkit.org/show_bug.cgi?id=161041
+
+ Reviewed by Saam Barati.
+
+ ES6 Modules intentionally disable HTML comments[1].
+
+ [1]: https://tc39.github.io/ecma262/#sec-html-like-comments
+
+ * API/JSScriptRef.cpp:
+ (parseScript):
+ * builtins/BuiltinExecutables.cpp:
+ (JSC::BuiltinExecutables::createExecutable):
+ * bytecode/EvalCodeCache.h:
+ (JSC::EvalCodeCache::CacheKey::CacheKey):
+ * bytecode/ExecutableInfo.h:
+ (JSC::ExecutableInfo::ExecutableInfo):
+ (JSC::ExecutableInfo::commentMode):
+ (JSC::ExecutableInfo::superBinding): Deleted.
+ * bytecode/UnlinkedCodeBlock.cpp:
+ (JSC::UnlinkedCodeBlock::UnlinkedCodeBlock):
+ * bytecode/UnlinkedCodeBlock.h:
+ (JSC::UnlinkedCodeBlock::commentMode):
+ (JSC::UnlinkedCodeBlock::superBinding): Deleted.
+ * bytecode/UnlinkedFunctionExecutable.cpp:
+ (JSC::generateUnlinkedFunctionCodeBlock):
+ (JSC::UnlinkedFunctionExecutable::UnlinkedFunctionExecutable):
+ * bytecode/UnlinkedFunctionExecutable.h:
+ * bytecompiler/BytecodeGenerator.h:
+ (JSC::BytecodeGenerator::commentMode):
+ (JSC::BytecodeGenerator::makeFunction):
+ (JSC::BytecodeGenerator::superBinding): Deleted.
+ * parser/Lexer.cpp:
+ (JSC::Lexer<T>::Lexer):
+ (JSC::Lexer<T>::lex):
+ * parser/Lexer.h:
+ * parser/Parser.cpp:
+ (JSC::Parser<LexerType>::Parser):
+ * parser/Parser.h:
+ (JSC::parse):
+ * parser/ParserModes.h:
+ * parser/SourceCodeKey.h:
+ (JSC::SourceCodeFlags::SourceCodeFlags):
+ (JSC::SourceCodeKey::SourceCodeKey):
+ * runtime/CodeCache.cpp:
+ (JSC::CodeCache::getGlobalCodeBlock):
+ (JSC::CodeCache::getProgramCodeBlock):
+ (JSC::CodeCache::getEvalCodeBlock):
+ (JSC::CodeCache::getModuleProgramCodeBlock):
+ (JSC::CodeCache::getFunctionExecutableFromGlobalCode):
+ * runtime/CodeCache.h:
+ * runtime/Completion.cpp:
+ (JSC::checkSyntax):
+ (JSC::checkModuleSyntax):
+ * runtime/Executable.cpp:
+ (JSC::ProgramExecutable::checkSyntax):
+ * runtime/Executable.h:
+ * runtime/ModuleLoaderPrototype.cpp:
+ (JSC::moduleLoaderPrototypeParseModule):
+
</ins><span class="cx"> 2016-08-21 Yusuke Suzuki <utatane.tea@gmail.com>
</span><span class="cx">
</span><span class="cx"> [DFG] Should not fixup AnyIntUse in 32_64
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorebuiltinsBuiltinExecutablescpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/builtins/BuiltinExecutables.cpp (204713 => 204714)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/builtins/BuiltinExecutables.cpp        2016-08-22 13:51:54 UTC (rev 204713)
+++ trunk/Source/JavaScriptCore/builtins/BuiltinExecutables.cpp        2016-08-22 14:12:10 UTC (rev 204714)
</span><span class="lines">@@ -80,7 +80,7 @@
</span><span class="cx"> RefPtr<SourceProvider> sourceOverride = isParsingDefaultConstructor ? source.provider() : nullptr;
</span><span class="cx"> std::unique_ptr<ProgramNode> program = parse<ProgramNode>(
</span><span class="cx"> &vm, source, Identifier(), builtinMode,
</span><del>- JSParserStrictMode::NotStrict, SourceParseMode::ProgramMode, SuperBinding::NotNeeded, error,
</del><ins>+ JSParserStrictMode::NotStrict, JSParserCommentMode::Classic, SourceParseMode::ProgramMode, SuperBinding::NotNeeded, error,
</ins><span class="cx"> &positionBeforeLastNewline, constructorKind);
</span><span class="cx">
</span><span class="cx"> if (!program) {
</span><span class="lines">@@ -106,7 +106,7 @@
</span><span class="cx"> RELEASE_ASSERT(metadata);
</span><span class="cx"> metadata->overrideName(name);
</span><span class="cx"> VariableEnvironment dummyTDZVariables;
</span><del>- UnlinkedFunctionExecutable* functionExecutable = UnlinkedFunctionExecutable::create(&vm, source, metadata, kind, constructAbility, dummyTDZVariables, DerivedContextType::None, WTFMove(sourceOverride));
</del><ins>+ UnlinkedFunctionExecutable* functionExecutable = UnlinkedFunctionExecutable::create(&vm, source, metadata, kind, constructAbility, JSParserCommentMode::Classic, dummyTDZVariables, DerivedContextType::None, WTFMove(sourceOverride));
</ins><span class="cx"> return functionExecutable;
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorebytecodeEvalCodeCacheh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/bytecode/EvalCodeCache.h (204713 => 204714)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/bytecode/EvalCodeCache.h        2016-08-22 13:51:54 UTC (rev 204713)
+++ trunk/Source/JavaScriptCore/bytecode/EvalCodeCache.h        2016-08-22 14:12:10 UTC (rev 204714)
</span><span class="lines">@@ -50,7 +50,7 @@
</span><span class="cx"> public:
</span><span class="cx"> CacheKey(const String& source, DerivedContextType derivedContextType, EvalContextType evalContextType, bool isArrowFunctionContext)
</span><span class="cx"> : m_source(source.impl())
</span><del>- , m_flags(SourceCodeType::EvalType, JSParserBuiltinMode::NotBuiltin, JSParserStrictMode::NotStrict, derivedContextType, evalContextType, isArrowFunctionContext)
</del><ins>+ , m_flags(SourceCodeType::EvalType, JSParserBuiltinMode::NotBuiltin, JSParserStrictMode::NotStrict, JSParserCommentMode::Classic, derivedContextType, evalContextType, isArrowFunctionContext)
</ins><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorebytecodeExecutableInfoh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/bytecode/ExecutableInfo.h (204713 => 204714)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/bytecode/ExecutableInfo.h        2016-08-22 13:51:54 UTC (rev 204713)
+++ trunk/Source/JavaScriptCore/bytecode/ExecutableInfo.h        2016-08-22 14:12:10 UTC (rev 204714)
</span><span class="lines">@@ -36,7 +36,7 @@
</span><span class="cx"> // FIXME: These flags, ParserModes and propagation to XXXCodeBlocks should be reorganized.
</span><span class="cx"> // https://bugs.webkit.org/show_bug.cgi?id=151547
</span><span class="cx"> struct ExecutableInfo {
</span><del>- ExecutableInfo(bool usesEval, bool isStrictMode, bool isConstructor, bool isBuiltinFunction, ConstructorKind constructorKind, SuperBinding superBinding, SourceParseMode parseMode, DerivedContextType derivedContextType, bool isArrowFunctionContext, bool isClassContext, EvalContextType evalContextType)
</del><ins>+ ExecutableInfo(bool usesEval, bool isStrictMode, bool isConstructor, bool isBuiltinFunction, ConstructorKind constructorKind, JSParserCommentMode commentMode, SuperBinding superBinding, SourceParseMode parseMode, DerivedContextType derivedContextType, bool isArrowFunctionContext, bool isClassContext, EvalContextType evalContextType)
</ins><span class="cx"> : m_usesEval(usesEval)
</span><span class="cx"> , m_isStrictMode(isStrictMode)
</span><span class="cx"> , m_isConstructor(isConstructor)
</span><span class="lines">@@ -43,6 +43,7 @@
</span><span class="cx"> , m_isBuiltinFunction(isBuiltinFunction)
</span><span class="cx"> , m_constructorKind(static_cast<unsigned>(constructorKind))
</span><span class="cx"> , m_superBinding(static_cast<unsigned>(superBinding))
</span><ins>+ , m_commentMode(static_cast<unsigned>(commentMode))
</ins><span class="cx"> , m_parseMode(parseMode)
</span><span class="cx"> , m_derivedContextType(static_cast<unsigned>(derivedContextType))
</span><span class="cx"> , m_isArrowFunctionContext(isArrowFunctionContext)
</span><span class="lines">@@ -51,6 +52,7 @@
</span><span class="cx"> {
</span><span class="cx"> ASSERT(m_constructorKind == static_cast<unsigned>(constructorKind));
</span><span class="cx"> ASSERT(m_superBinding == static_cast<unsigned>(superBinding));
</span><ins>+ ASSERT(m_commentMode == static_cast<unsigned>(commentMode));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> bool usesEval() const { return m_usesEval; }
</span><span class="lines">@@ -59,6 +61,7 @@
</span><span class="cx"> bool isBuiltinFunction() const { return m_isBuiltinFunction; }
</span><span class="cx"> ConstructorKind constructorKind() const { return static_cast<ConstructorKind>(m_constructorKind); }
</span><span class="cx"> SuperBinding superBinding() const { return static_cast<SuperBinding>(m_superBinding); }
</span><ins>+ JSParserCommentMode commentMode() const { return static_cast<JSParserCommentMode>(m_commentMode); }
</ins><span class="cx"> SourceParseMode parseMode() const { return m_parseMode; }
</span><span class="cx"> DerivedContextType derivedContextType() const { return static_cast<DerivedContextType>(m_derivedContextType); }
</span><span class="cx"> EvalContextType evalContextType() const { return static_cast<EvalContextType>(m_evalContextType); }
</span><span class="lines">@@ -72,6 +75,7 @@
</span><span class="cx"> unsigned m_isBuiltinFunction : 1;
</span><span class="cx"> unsigned m_constructorKind : 2;
</span><span class="cx"> unsigned m_superBinding : 1;
</span><ins>+ unsigned m_commentMode: 1;
</ins><span class="cx"> SourceParseMode m_parseMode;
</span><span class="cx"> unsigned m_derivedContextType : 2;
</span><span class="cx"> unsigned m_isArrowFunctionContext : 1;
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorebytecodeUnlinkedCodeBlockcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/bytecode/UnlinkedCodeBlock.cpp (204713 => 204714)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/bytecode/UnlinkedCodeBlock.cpp        2016-08-22 13:51:54 UTC (rev 204713)
+++ trunk/Source/JavaScriptCore/bytecode/UnlinkedCodeBlock.cpp        2016-08-22 14:12:10 UTC (rev 204714)
</span><span class="lines">@@ -62,13 +62,14 @@
</span><span class="cx"> , m_isConstructor(info.isConstructor())
</span><span class="cx"> , m_hasCapturedVariables(false)
</span><span class="cx"> , m_isBuiltinFunction(info.isBuiltinFunction())
</span><del>- , m_constructorKind(static_cast<unsigned>(info.constructorKind()))
</del><span class="cx"> , m_superBinding(static_cast<unsigned>(info.superBinding()))
</span><del>- , m_derivedContextType(static_cast<unsigned>(info.derivedContextType()))
- , m_evalContextType(static_cast<unsigned>(info.evalContextType()))
</del><ins>+ , m_commentMode(static_cast<unsigned>(info.commentMode()))
</ins><span class="cx"> , m_isArrowFunctionContext(info.isArrowFunctionContext())
</span><span class="cx"> , m_isClassContext(info.isClassContext())
</span><span class="cx"> , m_wasCompiledWithDebuggingOpcodes(debuggerMode == DebuggerMode::DebuggerOn || Options::forceDebuggerBytecodeGeneration())
</span><ins>+ , m_constructorKind(static_cast<unsigned>(info.constructorKind()))
+ , m_derivedContextType(static_cast<unsigned>(info.derivedContextType()))
+ , m_evalContextType(static_cast<unsigned>(info.evalContextType()))
</ins><span class="cx"> , m_firstLine(0)
</span><span class="cx"> , m_lineCount(0)
</span><span class="cx"> , m_endColumn(UINT_MAX)
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorebytecodeUnlinkedCodeBlockh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/bytecode/UnlinkedCodeBlock.h (204713 => 204714)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/bytecode/UnlinkedCodeBlock.h        2016-08-22 13:51:54 UTC (rev 204713)
+++ trunk/Source/JavaScriptCore/bytecode/UnlinkedCodeBlock.h        2016-08-22 14:12:10 UTC (rev 204714)
</span><span class="lines">@@ -204,6 +204,7 @@
</span><span class="cx">
</span><span class="cx"> ConstructorKind constructorKind() const { return static_cast<ConstructorKind>(m_constructorKind); }
</span><span class="cx"> SuperBinding superBinding() const { return static_cast<SuperBinding>(m_superBinding); }
</span><ins>+ JSParserCommentMode commentMode() const { return static_cast<JSParserCommentMode>(m_commentMode); }
</ins><span class="cx">
</span><span class="cx"> void shrinkToFit()
</span><span class="cx"> {
</span><span class="lines">@@ -405,13 +406,14 @@
</span><span class="cx"> unsigned m_isConstructor : 1;
</span><span class="cx"> unsigned m_hasCapturedVariables : 1;
</span><span class="cx"> unsigned m_isBuiltinFunction : 1;
</span><del>- unsigned m_constructorKind : 2;
</del><span class="cx"> unsigned m_superBinding : 1;
</span><del>- unsigned m_derivedContextType : 2;
- unsigned m_evalContextType : 2;
</del><ins>+ unsigned m_commentMode: 1;
</ins><span class="cx"> unsigned m_isArrowFunctionContext : 1;
</span><span class="cx"> unsigned m_isClassContext : 1;
</span><span class="cx"> unsigned m_wasCompiledWithDebuggingOpcodes : 1;
</span><ins>+ unsigned m_constructorKind : 2;
+ unsigned m_derivedContextType : 2;
+ unsigned m_evalContextType : 2;
</ins><span class="cx"> unsigned m_firstLine;
</span><span class="cx"> unsigned m_lineCount;
</span><span class="cx"> unsigned m_endColumn;
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorebytecodeUnlinkedFunctionExecutablecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/bytecode/UnlinkedFunctionExecutable.cpp (204713 => 204714)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/bytecode/UnlinkedFunctionExecutable.cpp        2016-08-22 13:51:54 UTC (rev 204713)
+++ trunk/Source/JavaScriptCore/bytecode/UnlinkedFunctionExecutable.cpp        2016-08-22 14:12:10 UTC (rev 204714)
</span><span class="lines">@@ -51,9 +51,10 @@
</span><span class="cx"> {
</span><span class="cx"> JSParserBuiltinMode builtinMode = executable->isBuiltinFunction() ? JSParserBuiltinMode::Builtin : JSParserBuiltinMode::NotBuiltin;
</span><span class="cx"> JSParserStrictMode strictMode = executable->isInStrictContext() ? JSParserStrictMode::Strict : JSParserStrictMode::NotStrict;
</span><ins>+ JSParserCommentMode commentMode = executable->commentMode();
</ins><span class="cx"> ASSERT(isFunctionParseMode(executable->parseMode()));
</span><span class="cx"> std::unique_ptr<FunctionNode> function = parse<FunctionNode>(
</span><del>- &vm, source, executable->name(), builtinMode, strictMode, executable->parseMode(), executable->superBinding(), error, nullptr);
</del><ins>+ &vm, source, executable->name(), builtinMode, strictMode, commentMode, executable->parseMode(), executable->superBinding(), error, nullptr);
</ins><span class="cx">
</span><span class="cx"> if (!function) {
</span><span class="cx"> ASSERT(error.isValid());
</span><span class="lines">@@ -65,7 +66,7 @@
</span><span class="cx">
</span><span class="cx"> bool isClassContext = executable->superBinding() == SuperBinding::Needed;
</span><span class="cx">
</span><del>- UnlinkedFunctionCodeBlock* result = UnlinkedFunctionCodeBlock::create(&vm, FunctionCode, ExecutableInfo(function->usesEval(), function->isStrictMode(), kind == CodeForConstruct, functionKind == UnlinkedBuiltinFunction, executable->constructorKind(), executable->superBinding(), parseMode, executable->derivedContextType(), false, isClassContext, EvalContextType::FunctionEvalContext), debuggerMode);
</del><ins>+ UnlinkedFunctionCodeBlock* result = UnlinkedFunctionCodeBlock::create(&vm, FunctionCode, ExecutableInfo(function->usesEval(), function->isStrictMode(), kind == CodeForConstruct, functionKind == UnlinkedBuiltinFunction, executable->constructorKind(), commentMode, executable->superBinding(), parseMode, executable->derivedContextType(), false, isClassContext, EvalContextType::FunctionEvalContext), debuggerMode);
</ins><span class="cx">
</span><span class="cx"> error = BytecodeGenerator::generate(vm, function.get(), result, debuggerMode, executable->parentScopeTDZVariables());
</span><span class="cx">
</span><span class="lines">@@ -74,7 +75,7 @@
</span><span class="cx"> return result;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-UnlinkedFunctionExecutable::UnlinkedFunctionExecutable(VM* vm, Structure* structure, const SourceCode& source, RefPtr<SourceProvider>&& sourceOverride, FunctionMetadataNode* node, UnlinkedFunctionKind kind, ConstructAbility constructAbility, VariableEnvironment& parentScopeTDZVariables, DerivedContextType derivedContextType)
</del><ins>+UnlinkedFunctionExecutable::UnlinkedFunctionExecutable(VM* vm, Structure* structure, const SourceCode& source, RefPtr<SourceProvider>&& sourceOverride, FunctionMetadataNode* node, UnlinkedFunctionKind kind, ConstructAbility constructAbility, JSParserCommentMode commentMode, VariableEnvironment& parentScopeTDZVariables, DerivedContextType derivedContextType)
</ins><span class="cx"> : Base(*vm, structure)
</span><span class="cx"> , m_firstLineOffset(node->firstLine() - source.firstLine())
</span><span class="cx"> , m_lineCount(node->lastLine() - node->firstLine())
</span><span class="lines">@@ -94,6 +95,7 @@
</span><span class="cx"> , m_constructAbility(static_cast<unsigned>(constructAbility))
</span><span class="cx"> , m_constructorKind(static_cast<unsigned>(node->constructorKind()))
</span><span class="cx"> , m_functionMode(static_cast<unsigned>(node->functionMode()))
</span><ins>+ , m_commentMode(static_cast<unsigned>(commentMode))
</ins><span class="cx"> , m_superBinding(static_cast<unsigned>(node->superBinding()))
</span><span class="cx"> , m_derivedContextType(static_cast<unsigned>(derivedContextType))
</span><span class="cx"> , m_sourceParseMode(static_cast<unsigned>(node->parseMode()))
</span><span class="lines">@@ -107,6 +109,7 @@
</span><span class="cx"> ASSERT(m_constructAbility == static_cast<unsigned>(constructAbility));
</span><span class="cx"> ASSERT(m_constructorKind == static_cast<unsigned>(node->constructorKind()));
</span><span class="cx"> ASSERT(m_functionMode == static_cast<unsigned>(node->functionMode()));
</span><ins>+ ASSERT(m_commentMode == static_cast<unsigned>(commentMode));
</ins><span class="cx"> ASSERT(m_superBinding == static_cast<unsigned>(node->superBinding()));
</span><span class="cx"> ASSERT(m_derivedContextType == static_cast<unsigned>(derivedContextType));
</span><span class="cx"> ASSERT(m_sourceParseMode == static_cast<unsigned>(node->parseMode()));
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorebytecodeUnlinkedFunctionExecutableh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/bytecode/UnlinkedFunctionExecutable.h (204713 => 204714)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/bytecode/UnlinkedFunctionExecutable.h        2016-08-22 13:51:54 UTC (rev 204713)
+++ trunk/Source/JavaScriptCore/bytecode/UnlinkedFunctionExecutable.h        2016-08-22 14:12:10 UTC (rev 204714)
</span><span class="lines">@@ -64,10 +64,10 @@
</span><span class="cx"> typedef JSCell Base;
</span><span class="cx"> static const unsigned StructureFlags = Base::StructureFlags | StructureIsImmortal;
</span><span class="cx">
</span><del>- static UnlinkedFunctionExecutable* create(VM* vm, const SourceCode& source, FunctionMetadataNode* node, UnlinkedFunctionKind unlinkedFunctionKind, ConstructAbility constructAbility, VariableEnvironment& parentScopeTDZVariables, DerivedContextType derivedContextType, RefPtr<SourceProvider>&& sourceOverride = nullptr)
</del><ins>+ static UnlinkedFunctionExecutable* create(VM* vm, const SourceCode& source, FunctionMetadataNode* node, UnlinkedFunctionKind unlinkedFunctionKind, ConstructAbility constructAbility, JSParserCommentMode commentMode, VariableEnvironment& parentScopeTDZVariables, DerivedContextType derivedContextType, RefPtr<SourceProvider>&& sourceOverride = nullptr)
</ins><span class="cx"> {
</span><span class="cx"> UnlinkedFunctionExecutable* instance = new (NotNull, allocateCell<UnlinkedFunctionExecutable>(vm->heap))
</span><del>- UnlinkedFunctionExecutable(vm, vm->unlinkedFunctionExecutableStructure.get(), source, WTFMove(sourceOverride), node, unlinkedFunctionKind, constructAbility, parentScopeTDZVariables, derivedContextType);
</del><ins>+ UnlinkedFunctionExecutable(vm, vm->unlinkedFunctionExecutableStructure.get(), source, WTFMove(sourceOverride), node, unlinkedFunctionKind, constructAbility, commentMode, parentScopeTDZVariables, derivedContextType);
</ins><span class="cx"> instance->finishCreation(*vm);
</span><span class="cx"> return instance;
</span><span class="cx"> }
</span><span class="lines">@@ -127,6 +127,7 @@
</span><span class="cx">
</span><span class="cx"> bool isBuiltinFunction() const { return m_isBuiltinFunction; }
</span><span class="cx"> ConstructAbility constructAbility() const { return static_cast<ConstructAbility>(m_constructAbility); }
</span><ins>+ JSParserCommentMode commentMode() const { return static_cast<JSParserCommentMode>(m_commentMode); }
</ins><span class="cx"> bool isClassConstructorFunction() const { return constructorKind() != ConstructorKind::None; }
</span><span class="cx"> const VariableEnvironment* parentScopeTDZVariables() const { return &m_parentScopeTDZVariables; }
</span><span class="cx">
</span><span class="lines">@@ -140,7 +141,7 @@
</span><span class="cx"> void setSourceMappingURLDirective(const String& sourceMappingURL) { m_sourceMappingURLDirective = sourceMappingURL; }
</span><span class="cx">
</span><span class="cx"> private:
</span><del>- UnlinkedFunctionExecutable(VM*, Structure*, const SourceCode&, RefPtr<SourceProvider>&& sourceOverride, FunctionMetadataNode*, UnlinkedFunctionKind, ConstructAbility, VariableEnvironment&, JSC::DerivedContextType);
</del><ins>+ UnlinkedFunctionExecutable(VM*, Structure*, const SourceCode&, RefPtr<SourceProvider>&& sourceOverride, FunctionMetadataNode*, UnlinkedFunctionKind, ConstructAbility, JSParserCommentMode, VariableEnvironment&, JSC::DerivedContextType);
</ins><span class="cx">
</span><span class="cx"> unsigned m_firstLineOffset;
</span><span class="cx"> unsigned m_lineCount;
</span><span class="lines">@@ -160,6 +161,7 @@
</span><span class="cx"> unsigned m_constructAbility: 1;
</span><span class="cx"> unsigned m_constructorKind : 2;
</span><span class="cx"> unsigned m_functionMode : 2; // FunctionMode
</span><ins>+ unsigned m_commentMode: 1; // JSParserCommentMode
</ins><span class="cx"> unsigned m_superBinding : 1;
</span><span class="cx"> unsigned m_derivedContextType: 2;
</span><span class="cx"> unsigned m_sourceParseMode : 4; // SourceParseMode
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorebytecompilerBytecodeGeneratorh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.h (204713 => 204714)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.h        2016-08-22 13:51:54 UTC (rev 204713)
+++ trunk/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.h        2016-08-22 14:12:10 UTC (rev 204714)
</span><span class="lines">@@ -285,6 +285,7 @@
</span><span class="cx"> bool usesThis() const { return m_scopeNode->usesThis(); }
</span><span class="cx"> ConstructorKind constructorKind() const { return m_codeBlock->constructorKind(); }
</span><span class="cx"> SuperBinding superBinding() const { return m_codeBlock->superBinding(); }
</span><ins>+ JSParserCommentMode commentMode() const { return m_codeBlock->commentMode(); }
</ins><span class="cx">
</span><span class="cx"> template<typename... Args>
</span><span class="cx"> static ParserError generate(VM& vm, Args&& ...args)
</span><span class="lines">@@ -843,7 +844,7 @@
</span><span class="cx"> else if (parseMode == SourceParseMode::MethodMode && metadata->constructorKind() == ConstructorKind::None)
</span><span class="cx"> constructAbility = ConstructAbility::CannotConstruct;
</span><span class="cx">
</span><del>- return UnlinkedFunctionExecutable::create(m_vm, m_scopeNode->source(), metadata, isBuiltinFunction() ? UnlinkedBuiltinFunction : UnlinkedNormalFunction, constructAbility, variablesUnderTDZ, newDerivedContextType);
</del><ins>+ return UnlinkedFunctionExecutable::create(m_vm, m_scopeNode->source(), metadata, isBuiltinFunction() ? UnlinkedBuiltinFunction : UnlinkedNormalFunction, constructAbility, commentMode(), variablesUnderTDZ, newDerivedContextType);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void getVariablesUnderTDZ(VariableEnvironment&);
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreparserLexercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/parser/Lexer.cpp (204713 => 204714)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/parser/Lexer.cpp        2016-08-22 13:51:54 UTC (rev 204713)
+++ trunk/Source/JavaScriptCore/parser/Lexer.cpp        2016-08-22 14:12:10 UTC (rev 204714)
</span><span class="lines">@@ -486,10 +486,11 @@
</span><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> template <typename T>
</span><del>-Lexer<T>::Lexer(VM* vm, JSParserBuiltinMode builtinMode)
</del><ins>+Lexer<T>::Lexer(VM* vm, JSParserBuiltinMode builtinMode, JSParserCommentMode commentMode)
</ins><span class="cx"> : m_isReparsingFunction(false)
</span><span class="cx"> , m_vm(vm)
</span><span class="cx"> , m_parsingBuiltinFunction(builtinMode == JSParserBuiltinMode::Builtin)
</span><ins>+ , m_commentMode(commentMode)
</ins><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -1883,8 +1884,10 @@
</span><span class="cx"> case CharacterLess:
</span><span class="cx"> shift();
</span><span class="cx"> if (m_current == '!' && peek(1) == '-' && peek(2) == '-') {
</span><del>- // <!-- marks the beginning of a line comment (for www usage)
- goto inSingleLineComment;
</del><ins>+ if (m_commentMode == JSParserCommentMode::Classic) {
+ // <!-- marks the beginning of a line comment (for www usage)
+ goto inSingleLineComment;
+ }
</ins><span class="cx"> }
</span><span class="cx"> if (m_current == '<') {
</span><span class="cx"> shift();
</span><span class="lines">@@ -1936,8 +1939,10 @@
</span><span class="cx"> if (m_current == '-') {
</span><span class="cx"> shift();
</span><span class="cx"> if (m_atLineStart && m_current == '>') {
</span><del>- shift();
- goto inSingleLineComment;
</del><ins>+ if (m_commentMode == JSParserCommentMode::Classic) {
+ shift();
+ goto inSingleLineComment;
+ }
</ins><span class="cx"> }
</span><span class="cx"> token = (!m_terminator) ? MINUSMINUS : AUTOMINUSMINUS;
</span><span class="cx"> break;
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreparserLexerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/parser/Lexer.h (204713 => 204714)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/parser/Lexer.h        2016-08-22 13:51:54 UTC (rev 204713)
+++ trunk/Source/JavaScriptCore/parser/Lexer.h        2016-08-22 14:12:10 UTC (rev 204714)
</span><span class="lines">@@ -48,7 +48,7 @@
</span><span class="cx"> WTF_MAKE_FAST_ALLOCATED;
</span><span class="cx">
</span><span class="cx"> public:
</span><del>- Lexer(VM*, JSParserBuiltinMode);
</del><ins>+ Lexer(VM*, JSParserBuiltinMode, JSParserCommentMode);
</ins><span class="cx"> ~Lexer();
</span><span class="cx">
</span><span class="cx"> // Character manipulation functions.
</span><span class="lines">@@ -216,6 +216,7 @@
</span><span class="cx">
</span><span class="cx"> VM* m_vm;
</span><span class="cx"> bool m_parsingBuiltinFunction;
</span><ins>+ JSParserCommentMode m_commentMode;
</ins><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> template <>
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreparserParsercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/parser/Parser.cpp (204713 => 204714)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/parser/Parser.cpp        2016-08-22 13:51:54 UTC (rev 204713)
+++ trunk/Source/JavaScriptCore/parser/Parser.cpp        2016-08-22 14:12:10 UTC (rev 204714)
</span><span class="lines">@@ -189,7 +189,7 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> template <typename LexerType>
</span><del>-Parser<LexerType>::Parser(VM* vm, const SourceCode& source, JSParserBuiltinMode builtinMode, JSParserStrictMode strictMode, SourceParseMode parseMode, SuperBinding superBinding, ConstructorKind defaultConstructorKind, DerivedContextType derivedContextType, bool isEvalContext, EvalContextType evalContextType)
</del><ins>+Parser<LexerType>::Parser(VM* vm, const SourceCode& source, JSParserBuiltinMode builtinMode, JSParserStrictMode strictMode, JSParserCommentMode commentMode, SourceParseMode parseMode, SuperBinding superBinding, ConstructorKind defaultConstructorKind, DerivedContextType derivedContextType, bool isEvalContext, EvalContextType evalContextType)
</ins><span class="cx"> : m_vm(vm)
</span><span class="cx"> , m_source(&source)
</span><span class="cx"> , m_hasStackOverflow(false)
</span><span class="lines">@@ -198,11 +198,12 @@
</span><span class="cx"> , m_statementDepth(0)
</span><span class="cx"> , m_sourceElements(0)
</span><span class="cx"> , m_parsingBuiltin(builtinMode == JSParserBuiltinMode::Builtin)
</span><ins>+ , m_commentMode(commentMode)
</ins><span class="cx"> , m_superBinding(superBinding)
</span><span class="cx"> , m_defaultConstructorKind(defaultConstructorKind)
</span><span class="cx"> , m_immediateParentAllowsFunctionDeclarationInStatement(false)
</span><span class="cx"> {
</span><del>- m_lexer = std::make_unique<LexerType>(vm, builtinMode);
</del><ins>+ m_lexer = std::make_unique<LexerType>(vm, builtinMode, commentMode);
</ins><span class="cx"> m_lexer->setCode(source, &m_parserArena);
</span><span class="cx"> m_token.m_location.line = source.firstLine();
</span><span class="cx"> m_token.m_location.startOffset = source.startOffset();
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreparserParserh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/parser/Parser.h (204713 => 204714)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/parser/Parser.h        2016-08-22 13:51:54 UTC (rev 204713)
+++ trunk/Source/JavaScriptCore/parser/Parser.h        2016-08-22 14:12:10 UTC (rev 204714)
</span><span class="lines">@@ -793,7 +793,7 @@
</span><span class="cx"> WTF_MAKE_FAST_ALLOCATED;
</span><span class="cx">
</span><span class="cx"> public:
</span><del>- Parser(VM*, const SourceCode&, JSParserBuiltinMode, JSParserStrictMode, SourceParseMode, SuperBinding, ConstructorKind defaultConstructorKind = ConstructorKind::None, DerivedContextType = DerivedContextType::None, bool isEvalContext = false, EvalContextType = EvalContextType::None);
</del><ins>+ Parser(VM*, const SourceCode&, JSParserBuiltinMode, JSParserStrictMode, JSParserCommentMode, SourceParseMode, SuperBinding, ConstructorKind defaultConstructorKind = ConstructorKind::None, DerivedContextType = DerivedContextType::None, bool isEvalContext = false, EvalContextType = EvalContextType::None);
</ins><span class="cx"> ~Parser();
</span><span class="cx">
</span><span class="cx"> template <class ParsedNode>
</span><span class="lines">@@ -1583,6 +1583,7 @@
</span><span class="cx"> RefPtr<SourceProviderCache> m_functionCache;
</span><span class="cx"> SourceElements* m_sourceElements;
</span><span class="cx"> bool m_parsingBuiltin;
</span><ins>+ JSParserCommentMode m_commentMode;
</ins><span class="cx"> SuperBinding m_superBinding;
</span><span class="cx"> ConstructorKind m_defaultConstructorKind;
</span><span class="cx"> VariableEnvironment m_varDeclarations;
</span><span class="lines">@@ -1712,13 +1713,13 @@
</span><span class="cx"> std::unique_ptr<ParsedNode> parse(
</span><span class="cx"> VM* vm, const SourceCode& source,
</span><span class="cx"> const Identifier& name, JSParserBuiltinMode builtinMode,
</span><del>- JSParserStrictMode strictMode, SourceParseMode parseMode, SuperBinding superBinding,
</del><ins>+ JSParserStrictMode strictMode, JSParserCommentMode commentMode, SourceParseMode parseMode, SuperBinding superBinding,
</ins><span class="cx"> ParserError& error, JSTextPosition* positionBeforeLastNewline = nullptr,
</span><span class="cx"> ConstructorKind defaultConstructorKind = ConstructorKind::None, DerivedContextType derivedContextType = DerivedContextType::None, EvalContextType evalContextType = EvalContextType::None)
</span><span class="cx"> {
</span><span class="cx"> ASSERT(!source.provider()->source().isNull());
</span><span class="cx"> if (source.provider()->source().is8Bit()) {
</span><del>- Parser<Lexer<LChar>> parser(vm, source, builtinMode, strictMode, parseMode, superBinding, defaultConstructorKind, derivedContextType, isEvalNode<ParsedNode>(), evalContextType);
</del><ins>+ Parser<Lexer<LChar>> parser(vm, source, builtinMode, strictMode, commentMode, parseMode, superBinding, defaultConstructorKind, derivedContextType, isEvalNode<ParsedNode>(), evalContextType);
</ins><span class="cx"> std::unique_ptr<ParsedNode> result = parser.parse<ParsedNode>(error, name, parseMode);
</span><span class="cx"> if (positionBeforeLastNewline)
</span><span class="cx"> *positionBeforeLastNewline = parser.positionBeforeLastNewline();
</span><span class="lines">@@ -1729,7 +1730,7 @@
</span><span class="cx"> return result;
</span><span class="cx"> }
</span><span class="cx"> ASSERT_WITH_MESSAGE(defaultConstructorKind == ConstructorKind::None, "BuiltinExecutables::createDefaultConstructor should always use a 8-bit string");
</span><del>- Parser<Lexer<UChar>> parser(vm, source, builtinMode, strictMode, parseMode, superBinding, defaultConstructorKind, derivedContextType, isEvalNode<ParsedNode>(), evalContextType);
</del><ins>+ Parser<Lexer<UChar>> parser(vm, source, builtinMode, strictMode, commentMode, parseMode, superBinding, defaultConstructorKind, derivedContextType, isEvalNode<ParsedNode>(), evalContextType);
</ins><span class="cx"> std::unique_ptr<ParsedNode> result = parser.parse<ParsedNode>(error, name, parseMode);
</span><span class="cx"> if (positionBeforeLastNewline)
</span><span class="cx"> *positionBeforeLastNewline = parser.positionBeforeLastNewline();
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreparserParserModesh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/parser/ParserModes.h (204713 => 204714)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/parser/ParserModes.h        2016-08-22 13:51:54 UTC (rev 204713)
+++ trunk/Source/JavaScriptCore/parser/ParserModes.h        2016-08-22 14:12:10 UTC (rev 204714)
</span><span class="lines">@@ -33,6 +33,7 @@
</span><span class="cx">
</span><span class="cx"> enum class JSParserStrictMode { NotStrict, Strict };
</span><span class="cx"> enum class JSParserBuiltinMode { NotBuiltin, Builtin };
</span><ins>+enum class JSParserCommentMode { Classic, Module };
</ins><span class="cx"> enum class JSParserCodeType { Program, Function, Module };
</span><span class="cx">
</span><span class="cx"> enum class ConstructorKind { None, Base, Extends };
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreparserSourceCodeKeyh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/parser/SourceCodeKey.h (204713 => 204714)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/parser/SourceCodeKey.h        2016-08-22 13:51:54 UTC (rev 204713)
+++ trunk/Source/JavaScriptCore/parser/SourceCodeKey.h        2016-08-22 14:12:10 UTC (rev 204714)
</span><span class="lines">@@ -39,8 +39,9 @@
</span><span class="cx"> public:
</span><span class="cx"> SourceCodeFlags() = default;
</span><span class="cx">
</span><del>- SourceCodeFlags(SourceCodeType codeType, JSParserBuiltinMode builtinMode, JSParserStrictMode strictMode, DerivedContextType derivedContextType, EvalContextType evalContextType, bool isArrowFunctionContext)
</del><ins>+ SourceCodeFlags(SourceCodeType codeType, JSParserBuiltinMode builtinMode, JSParserStrictMode strictMode, JSParserCommentMode commentMode, DerivedContextType derivedContextType, EvalContextType evalContextType, bool isArrowFunctionContext)
</ins><span class="cx"> : m_flags(
</span><ins>+ (static_cast<unsigned>(commentMode) << 8) |
</ins><span class="cx"> (static_cast<unsigned>(isArrowFunctionContext) << 7) |
</span><span class="cx"> (static_cast<unsigned>(evalContextType) << 6) |
</span><span class="cx"> (static_cast<unsigned>(derivedContextType) << 4) |
</span><span class="lines">@@ -66,10 +67,10 @@
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx">
</span><del>- SourceCodeKey(const SourceCode& sourceCode, const String& name, SourceCodeType codeType, JSParserBuiltinMode builtinMode, JSParserStrictMode strictMode, DerivedContextType derivedContextType, EvalContextType evalContextType, bool isArrowFunctionContext)
</del><ins>+ SourceCodeKey(const SourceCode& sourceCode, const String& name, SourceCodeType codeType, JSParserBuiltinMode builtinMode, JSParserStrictMode strictMode, JSParserCommentMode commentMode, DerivedContextType derivedContextType, EvalContextType evalContextType, bool isArrowFunctionContext)
</ins><span class="cx"> : m_sourceCode(sourceCode)
</span><span class="cx"> , m_name(name)
</span><del>- , m_flags(codeType, builtinMode, strictMode, derivedContextType, evalContextType, isArrowFunctionContext)
</del><ins>+ , m_flags(codeType, builtinMode, strictMode, commentMode, derivedContextType, evalContextType, isArrowFunctionContext)
</ins><span class="cx"> , m_hash(sourceCode.hash())
</span><span class="cx"> {
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeCodeCachecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/CodeCache.cpp (204713 => 204714)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/CodeCache.cpp        2016-08-22 13:51:54 UTC (rev 204713)
+++ trunk/Source/JavaScriptCore/runtime/CodeCache.cpp        2016-08-22 14:12:10 UTC (rev 204714)
</span><span class="lines">@@ -81,11 +81,11 @@
</span><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> template <class UnlinkedCodeBlockType, class ExecutableType>
</span><del>-UnlinkedCodeBlockType* CodeCache::getGlobalCodeBlock(VM& vm, ExecutableType* executable, const SourceCode& source, JSParserBuiltinMode builtinMode, JSParserStrictMode strictMode, DebuggerMode debuggerMode, ParserError& error, EvalContextType evalContextType, const VariableEnvironment* variablesUnderTDZ)
</del><ins>+UnlinkedCodeBlockType* CodeCache::getGlobalCodeBlock(VM& vm, ExecutableType* executable, const SourceCode& source, JSParserBuiltinMode builtinMode, JSParserStrictMode strictMode, JSParserCommentMode commentMode, DebuggerMode debuggerMode, ParserError& error, EvalContextType evalContextType, const VariableEnvironment* variablesUnderTDZ)
</ins><span class="cx"> {
</span><span class="cx"> DerivedContextType derivedContextType = executable->derivedContextType();
</span><span class="cx"> bool isArrowFunctionContext = executable->isArrowFunctionContext();
</span><del>- SourceCodeKey key(source, String(), CacheTypes<UnlinkedCodeBlockType>::codeType, builtinMode, strictMode, derivedContextType, evalContextType, isArrowFunctionContext);
</del><ins>+ SourceCodeKey key(source, String(), CacheTypes<UnlinkedCodeBlockType>::codeType, builtinMode, strictMode, commentMode, derivedContextType, evalContextType, isArrowFunctionContext);
</ins><span class="cx"> SourceCodeValue* cache = m_sourceCode.findCacheAndUpdateAge(key);
</span><span class="cx"> // FIXME: We should do something smart for TDZ instead of just disabling caching.
</span><span class="cx"> // https://bugs.webkit.org/show_bug.cgi?id=154010
</span><span class="lines">@@ -104,7 +104,7 @@
</span><span class="cx"> }
</span><span class="cx"> typedef typename CacheTypes<UnlinkedCodeBlockType>::RootNode RootNode;
</span><span class="cx"> std::unique_ptr<RootNode> rootNode = parse<RootNode>(
</span><del>- &vm, source, Identifier(), builtinMode, strictMode, CacheTypes<UnlinkedCodeBlockType>::parseMode, SuperBinding::NotNeeded, error, nullptr, ConstructorKind::None, derivedContextType, evalContextType);
</del><ins>+ &vm, source, Identifier(), builtinMode, strictMode, commentMode, CacheTypes<UnlinkedCodeBlockType>::parseMode, SuperBinding::NotNeeded, error, nullptr, ConstructorKind::None, derivedContextType, evalContextType);
</ins><span class="cx"> if (!rootNode)
</span><span class="cx"> return nullptr;
</span><span class="cx">
</span><span class="lines">@@ -136,18 +136,18 @@
</span><span class="cx"> UnlinkedProgramCodeBlock* CodeCache::getProgramCodeBlock(VM& vm, ProgramExecutable* executable, const SourceCode& source, JSParserBuiltinMode builtinMode, JSParserStrictMode strictMode, DebuggerMode debuggerMode, ParserError& error)
</span><span class="cx"> {
</span><span class="cx"> VariableEnvironment emptyParentTDZVariables;
</span><del>- return getGlobalCodeBlock<UnlinkedProgramCodeBlock>(vm, executable, source, builtinMode, strictMode, debuggerMode, error, EvalContextType::None, &emptyParentTDZVariables);
</del><ins>+ return getGlobalCodeBlock<UnlinkedProgramCodeBlock>(vm, executable, source, builtinMode, strictMode, JSParserCommentMode::Classic, debuggerMode, error, EvalContextType::None, &emptyParentTDZVariables);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> UnlinkedEvalCodeBlock* CodeCache::getEvalCodeBlock(VM& vm, EvalExecutable* executable, const SourceCode& source, JSParserBuiltinMode builtinMode, JSParserStrictMode strictMode, DebuggerMode debuggerMode, ParserError& error, EvalContextType evalContextType, const VariableEnvironment* variablesUnderTDZ)
</span><span class="cx"> {
</span><del>- return getGlobalCodeBlock<UnlinkedEvalCodeBlock>(vm, executable, source, builtinMode, strictMode, debuggerMode, error, evalContextType, variablesUnderTDZ);
</del><ins>+ return getGlobalCodeBlock<UnlinkedEvalCodeBlock>(vm, executable, source, builtinMode, strictMode, JSParserCommentMode::Classic, debuggerMode, error, evalContextType, variablesUnderTDZ);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> UnlinkedModuleProgramCodeBlock* CodeCache::getModuleProgramCodeBlock(VM& vm, ModuleProgramExecutable* executable, const SourceCode& source, JSParserBuiltinMode builtinMode, DebuggerMode debuggerMode, ParserError& error)
</span><span class="cx"> {
</span><span class="cx"> VariableEnvironment emptyParentTDZVariables;
</span><del>- return getGlobalCodeBlock<UnlinkedModuleProgramCodeBlock>(vm, executable, source, builtinMode, JSParserStrictMode::Strict, debuggerMode, error, EvalContextType::None, &emptyParentTDZVariables);
</del><ins>+ return getGlobalCodeBlock<UnlinkedModuleProgramCodeBlock>(vm, executable, source, builtinMode, JSParserStrictMode::Strict, JSParserCommentMode::Module, debuggerMode, error, EvalContextType::None, &emptyParentTDZVariables);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> // FIXME: There's no need to add the function's name to the key here. It's already in the source code.
</span><span class="lines">@@ -158,6 +158,7 @@
</span><span class="cx"> source, name.string(), SourceCodeType::FunctionType,
</span><span class="cx"> JSParserBuiltinMode::NotBuiltin,
</span><span class="cx"> JSParserStrictMode::NotStrict,
</span><ins>+ JSParserCommentMode::Classic,
</ins><span class="cx"> DerivedContextType::None,
</span><span class="cx"> EvalContextType::None,
</span><span class="cx"> isArrowFunctionContext);
</span><span class="lines">@@ -172,7 +173,7 @@
</span><span class="cx"> JSTextPosition positionBeforeLastNewline;
</span><span class="cx"> std::unique_ptr<ProgramNode> program = parse<ProgramNode>(
</span><span class="cx"> &vm, source, Identifier(), JSParserBuiltinMode::NotBuiltin,
</span><del>- JSParserStrictMode::NotStrict, SourceParseMode::ProgramMode, SuperBinding::NotNeeded,
</del><ins>+ JSParserStrictMode::NotStrict, JSParserCommentMode::Classic, SourceParseMode::ProgramMode, SuperBinding::NotNeeded,
</ins><span class="cx"> error, &positionBeforeLastNewline);
</span><span class="cx"> if (!program) {
</span><span class="cx"> RELEASE_ASSERT(error.isValid());
</span><span class="lines">@@ -201,7 +202,7 @@
</span><span class="cx"> metadata->setEndPosition(positionBeforeLastNewline);
</span><span class="cx"> // The Function constructor only has access to global variables, so no variables will be under TDZ.
</span><span class="cx"> VariableEnvironment emptyTDZVariables;
</span><del>- UnlinkedFunctionExecutable* functionExecutable = UnlinkedFunctionExecutable::create(&vm, source, metadata, UnlinkedNormalFunction, ConstructAbility::CanConstruct, emptyTDZVariables, DerivedContextType::None);
</del><ins>+ UnlinkedFunctionExecutable* functionExecutable = UnlinkedFunctionExecutable::create(&vm, source, metadata, UnlinkedNormalFunction, ConstructAbility::CanConstruct, JSParserCommentMode::Classic, emptyTDZVariables, DerivedContextType::None);
</ins><span class="cx">
</span><span class="cx"> functionExecutable->setSourceURLDirective(source.provider()->sourceURL());
</span><span class="cx"> functionExecutable->setSourceMappingURLDirective(source.provider()->sourceMappingURL());
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeCodeCacheh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/CodeCache.h (204713 => 204714)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/CodeCache.h        2016-08-22 13:51:54 UTC (rev 204713)
+++ trunk/Source/JavaScriptCore/runtime/CodeCache.h        2016-08-22 14:12:10 UTC (rev 204714)
</span><span class="lines">@@ -199,7 +199,7 @@
</span><span class="cx">
</span><span class="cx"> private:
</span><span class="cx"> template <class UnlinkedCodeBlockType, class ExecutableType>
</span><del>- UnlinkedCodeBlockType* getGlobalCodeBlock(VM&, ExecutableType*, const SourceCode&, JSParserBuiltinMode, JSParserStrictMode, DebuggerMode, ParserError&, EvalContextType, const VariableEnvironment*);
</del><ins>+ UnlinkedCodeBlockType* getGlobalCodeBlock(VM&, ExecutableType*, const SourceCode&, JSParserBuiltinMode, JSParserStrictMode, JSParserCommentMode, DebuggerMode, ParserError&, EvalContextType, const VariableEnvironment*);
</ins><span class="cx">
</span><span class="cx"> CodeCacheMap m_sourceCode;
</span><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeCompletioncpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/Completion.cpp (204713 => 204714)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/Completion.cpp        2016-08-22 13:51:54 UTC (rev 204713)
+++ trunk/Source/JavaScriptCore/runtime/Completion.cpp        2016-08-22 14:12:10 UTC (rev 204714)
</span><span class="lines">@@ -65,7 +65,7 @@
</span><span class="cx"> RELEASE_ASSERT(vm.atomicStringTable() == wtfThreadData().atomicStringTable());
</span><span class="cx"> return !!parse<ProgramNode>(
</span><span class="cx"> &vm, source, Identifier(), JSParserBuiltinMode::NotBuiltin,
</span><del>- JSParserStrictMode::NotStrict, SourceParseMode::ProgramMode, SuperBinding::NotNeeded, error);
</del><ins>+ JSParserStrictMode::NotStrict, JSParserCommentMode::Classic, SourceParseMode::ProgramMode, SuperBinding::NotNeeded, error);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> bool checkModuleSyntax(ExecState* exec, const SourceCode& source, ParserError& error)
</span><span class="lines">@@ -75,7 +75,7 @@
</span><span class="cx"> RELEASE_ASSERT(vm.atomicStringTable() == wtfThreadData().atomicStringTable());
</span><span class="cx"> std::unique_ptr<ModuleProgramNode> moduleProgramNode = parse<ModuleProgramNode>(
</span><span class="cx"> &vm, source, Identifier(), JSParserBuiltinMode::NotBuiltin,
</span><del>- JSParserStrictMode::Strict, SourceParseMode::ModuleAnalyzeMode, SuperBinding::NotNeeded, error);
</del><ins>+ JSParserStrictMode::Strict, JSParserCommentMode::Module, SourceParseMode::ModuleAnalyzeMode, SuperBinding::NotNeeded, error);
</ins><span class="cx"> if (!moduleProgramNode)
</span><span class="cx"> return false;
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeExecutablecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/Executable.cpp (204713 => 204714)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/Executable.cpp        2016-08-22 13:51:54 UTC (rev 204713)
+++ trunk/Source/JavaScriptCore/runtime/Executable.cpp        2016-08-22 14:12:10 UTC (rev 204714)
</span><span class="lines">@@ -568,8 +568,8 @@
</span><span class="cx"> VM* vm = &exec->vm();
</span><span class="cx"> JSGlobalObject* lexicalGlobalObject = exec->lexicalGlobalObject();
</span><span class="cx"> std::unique_ptr<ProgramNode> programNode = parse<ProgramNode>(
</span><del>- vm, m_source, Identifier(), JSParserBuiltinMode::NotBuiltin,
- JSParserStrictMode::NotStrict, SourceParseMode::ProgramMode, SuperBinding::NotNeeded, error);
</del><ins>+ vm, m_source, Identifier(), JSParserBuiltinMode::NotBuiltin,
+ JSParserStrictMode::NotStrict, JSParserCommentMode::Classic, SourceParseMode::ProgramMode, SuperBinding::NotNeeded, error);
</ins><span class="cx"> if (programNode)
</span><span class="cx"> return 0;
</span><span class="cx"> ASSERT(error.isValid());
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeExecutableh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/Executable.h (204713 => 204714)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/Executable.h        2016-08-22 13:51:54 UTC (rev 204713)
+++ trunk/Source/JavaScriptCore/runtime/Executable.h        2016-08-22 14:12:10 UTC (rev 204714)
</span><span class="lines">@@ -446,7 +446,7 @@
</span><span class="cx">
</span><span class="cx"> DECLARE_INFO;
</span><span class="cx">
</span><del>- ExecutableInfo executableInfo() const { return ExecutableInfo(usesEval(), isStrictMode(), false, false, ConstructorKind::None, SuperBinding::NotNeeded, SourceParseMode::ProgramMode, derivedContextType(), isArrowFunctionContext(), false, evalContextType()); }
</del><ins>+ ExecutableInfo executableInfo() const { return ExecutableInfo(usesEval(), isStrictMode(), false, false, ConstructorKind::None, JSParserCommentMode::Classic, SuperBinding::NotNeeded, SourceParseMode::ProgramMode, derivedContextType(), isArrowFunctionContext(), false, evalContextType()); }
</ins><span class="cx">
</span><span class="cx"> unsigned numVariables() { return m_unlinkedEvalCodeBlock->numVariables(); }
</span><span class="cx"> unsigned numberOfFunctionDecls() { return m_unlinkedEvalCodeBlock->numberOfFunctionDecls(); }
</span><span class="lines">@@ -500,7 +500,7 @@
</span><span class="cx">
</span><span class="cx"> DECLARE_INFO;
</span><span class="cx">
</span><del>- ExecutableInfo executableInfo() const { return ExecutableInfo(usesEval(), isStrictMode(), false, false, ConstructorKind::None, SuperBinding::NotNeeded, SourceParseMode::ProgramMode, derivedContextType(), isArrowFunctionContext(), false, EvalContextType::None); }
</del><ins>+ ExecutableInfo executableInfo() const { return ExecutableInfo(usesEval(), isStrictMode(), false, false, ConstructorKind::None, JSParserCommentMode::Classic, SuperBinding::NotNeeded, SourceParseMode::ProgramMode, derivedContextType(), isArrowFunctionContext(), false, EvalContextType::None); }
</ins><span class="cx">
</span><span class="cx"> private:
</span><span class="cx"> friend class ExecutableBase;
</span><span class="lines">@@ -541,7 +541,7 @@
</span><span class="cx">
</span><span class="cx"> DECLARE_INFO;
</span><span class="cx">
</span><del>- ExecutableInfo executableInfo() const { return ExecutableInfo(usesEval(), isStrictMode(), false, false, ConstructorKind::None, SuperBinding::NotNeeded, SourceParseMode::ModuleEvaluateMode, derivedContextType(), isArrowFunctionContext(), false, EvalContextType::None); }
</del><ins>+ ExecutableInfo executableInfo() const { return ExecutableInfo(usesEval(), isStrictMode(), false, false, ConstructorKind::None, JSParserCommentMode::Module, SuperBinding::NotNeeded, SourceParseMode::ModuleEvaluateMode, derivedContextType(), isArrowFunctionContext(), false, EvalContextType::None); }
</ins><span class="cx">
</span><span class="cx"> UnlinkedModuleProgramCodeBlock* unlinkedModuleProgramCodeBlock() { return m_unlinkedModuleProgramCodeBlock.get(); }
</span><span class="cx">
</span><span class="lines">@@ -661,6 +661,7 @@
</span><span class="cx"> const Identifier& inferredName() { return m_unlinkedExecutable->inferredName(); }
</span><span class="cx"> size_t parameterCount() const { return m_unlinkedExecutable->parameterCount(); } // Excluding 'this'!
</span><span class="cx"> SourceParseMode parseMode() const { return m_unlinkedExecutable->parseMode(); }
</span><ins>+ JSParserCommentMode commentMode() const { return m_unlinkedExecutable->commentMode(); }
</ins><span class="cx"> const SourceCode& classSource() const { return m_unlinkedExecutable->classSource(); }
</span><span class="cx">
</span><span class="cx"> static void visitChildren(JSCell*, SlotVisitor&);
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeModuleLoaderPrototypecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/ModuleLoaderPrototype.cpp (204713 => 204714)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/ModuleLoaderPrototype.cpp        2016-08-22 13:51:54 UTC (rev 204713)
+++ trunk/Source/JavaScriptCore/runtime/ModuleLoaderPrototype.cpp        2016-08-22 14:12:10 UTC (rev 204714)
</span><span class="lines">@@ -124,7 +124,7 @@
</span><span class="cx"> ParserError error;
</span><span class="cx"> std::unique_ptr<ModuleProgramNode> moduleProgramNode = parse<ModuleProgramNode>(
</span><span class="cx"> &vm, sourceCode, Identifier(), JSParserBuiltinMode::NotBuiltin,
</span><del>- JSParserStrictMode::Strict, SourceParseMode::ModuleAnalyzeMode, SuperBinding::NotNeeded, error);
</del><ins>+ JSParserStrictMode::Strict, JSParserCommentMode::Module, SourceParseMode::ModuleAnalyzeMode, SuperBinding::NotNeeded, error);
</ins><span class="cx">
</span><span class="cx"> if (error.isValid()) {
</span><span class="cx"> throwVMError(exec, error.toErrorObject(exec->lexicalGlobalObject(), sourceCode));
</span></span></pre>
</div>
</div>
</body>
</html>