<!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&lt;T&gt;::Lexer):
(JSC::Lexer&lt;T&gt;::lex):
* parser/Lexer.h:
* parser/Parser.cpp:
(JSC::Parser&lt;LexerType&gt;::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  &lt;utatane.tea@gmail.com&gt;
+
+        [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  &lt;utatane.tea@gmail.com&gt;
</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 &quot;./resources/assert.js&quot;;
+
+// Eval's goal symbol is Script, not Module.
+shouldBe(eval(`
+&lt;!-- ok
+--&gt; ok
+42
+`), 42);
+
+// Function's goal symbol is not Module.
+shouldBe(new Function(`
+&lt;!-- ok
+--&gt; ok
+return 42
+`)(), 42);
+
+shouldThrow(() =&gt; {
+    checkModuleSyntax(`
+    &lt;!-- ng --&gt;
+    `)
+}, `SyntaxError: Unexpected token '&lt;':2`);
+
+shouldThrow(() =&gt; {
+    checkModuleSyntax(`
+--&gt;
+    `)
+}, `SyntaxError: Unexpected token '&gt;':2`);
+
+shouldThrow(() =&gt; {
+    checkModuleSyntax(`
+    function hello()
+    {
+        &lt;!-- ng --&gt;
+    }
+    `)
+}, `SyntaxError: Unexpected token '&lt;':4`);
+
+shouldThrow(() =&gt; {
+    checkModuleSyntax(`
+    function hello()
+    {
+--&gt;
+    }
+    `)
+}, `SyntaxError: Unexpected token '&gt;':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, &quot;NoException&quot;, [&quot;../../../../harness/assert.js&quot;, &quot;../../../../harness/sta.js&quot;], [:strict]
</span><span class="cx"> - path: test262/test/language/module-code/comment-multi-line-html-close.js
</span><del>-  cmd: runTest262 :fail, &quot;SyntaxError&quot;, [&quot;../../../harness/assert.js&quot;, &quot;../../../harness/sta.js&quot;], [:module]
</del><ins>+  cmd: runTest262 :normal, &quot;SyntaxError&quot;, [&quot;../../../harness/assert.js&quot;, &quot;../../../harness/sta.js&quot;], [:module]
</ins><span class="cx"> - path: test262/test/language/module-code/comment-single-line-html-close.js
</span><del>-  cmd: runTest262 :fail, &quot;SyntaxError&quot;, [&quot;../../../harness/assert.js&quot;, &quot;../../../harness/sta.js&quot;], [:module]
</del><ins>+  cmd: runTest262 :normal, &quot;SyntaxError&quot;, [&quot;../../../harness/assert.js&quot;, &quot;../../../harness/sta.js&quot;], [:module]
</ins><span class="cx"> - path: test262/test/language/module-code/comment-single-line-html-open.js
</span><del>-  cmd: runTest262 :fail, &quot;SyntaxError&quot;, [&quot;../../../harness/assert.js&quot;, &quot;../../../harness/sta.js&quot;], [:module]
</del><ins>+  cmd: runTest262 :normal, &quot;SyntaxError&quot;, [&quot;../../../harness/assert.js&quot;, &quot;../../../harness/sta.js&quot;], [:module]
</ins><span class="cx"> - path: test262/test/language/module-code/early-dup-export-decl.js
</span><span class="cx">   cmd: runTest262 :normal, &quot;SyntaxError&quot;, [&quot;../../../harness/assert.js&quot;, &quot;../../../harness/sta.js&quot;], [: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&lt;JSC::ProgramNode&gt;(
</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  &lt;utatane.tea@gmail.com&gt;
+
+        [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&lt;T&gt;::Lexer):
+        (JSC::Lexer&lt;T&gt;::lex):
+        * parser/Lexer.h:
+        * parser/Parser.cpp:
+        (JSC::Parser&lt;LexerType&gt;::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  &lt;utatane.tea@gmail.com&gt;
</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&lt;SourceProvider&gt; sourceOverride = isParsingDefaultConstructor ? source.provider() : nullptr;
</span><span class="cx">     std::unique_ptr&lt;ProgramNode&gt; program = parse&lt;ProgramNode&gt;(
</span><span class="cx">         &amp;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">         &amp;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-&gt;overrideName(name);
</span><span class="cx">     VariableEnvironment dummyTDZVariables;
</span><del>-    UnlinkedFunctionExecutable* functionExecutable = UnlinkedFunctionExecutable::create(&amp;vm, source, metadata, kind, constructAbility, dummyTDZVariables, DerivedContextType::None, WTFMove(sourceOverride));
</del><ins>+    UnlinkedFunctionExecutable* functionExecutable = UnlinkedFunctionExecutable::create(&amp;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&amp; 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&lt;unsigned&gt;(constructorKind))
</span><span class="cx">         , m_superBinding(static_cast&lt;unsigned&gt;(superBinding))
</span><ins>+        , m_commentMode(static_cast&lt;unsigned&gt;(commentMode))
</ins><span class="cx">         , m_parseMode(parseMode)
</span><span class="cx">         , m_derivedContextType(static_cast&lt;unsigned&gt;(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&lt;unsigned&gt;(constructorKind));
</span><span class="cx">         ASSERT(m_superBinding == static_cast&lt;unsigned&gt;(superBinding));
</span><ins>+        ASSERT(m_commentMode == static_cast&lt;unsigned&gt;(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&lt;ConstructorKind&gt;(m_constructorKind); }
</span><span class="cx">     SuperBinding superBinding() const { return static_cast&lt;SuperBinding&gt;(m_superBinding); }
</span><ins>+    JSParserCommentMode commentMode() const { return static_cast&lt;JSParserCommentMode&gt;(m_commentMode); }
</ins><span class="cx">     SourceParseMode parseMode() const { return m_parseMode; }
</span><span class="cx">     DerivedContextType derivedContextType() const { return static_cast&lt;DerivedContextType&gt;(m_derivedContextType); }
</span><span class="cx">     EvalContextType evalContextType() const { return static_cast&lt;EvalContextType&gt;(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&lt;unsigned&gt;(info.constructorKind()))
</del><span class="cx">     , m_superBinding(static_cast&lt;unsigned&gt;(info.superBinding()))
</span><del>-    , m_derivedContextType(static_cast&lt;unsigned&gt;(info.derivedContextType()))
-    , m_evalContextType(static_cast&lt;unsigned&gt;(info.evalContextType()))
</del><ins>+    , m_commentMode(static_cast&lt;unsigned&gt;(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&lt;unsigned&gt;(info.constructorKind()))
+    , m_derivedContextType(static_cast&lt;unsigned&gt;(info.derivedContextType()))
+    , m_evalContextType(static_cast&lt;unsigned&gt;(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&lt;ConstructorKind&gt;(m_constructorKind); }
</span><span class="cx">     SuperBinding superBinding() const { return static_cast&lt;SuperBinding&gt;(m_superBinding); }
</span><ins>+    JSParserCommentMode commentMode() const { return static_cast&lt;JSParserCommentMode&gt;(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-&gt;isBuiltinFunction() ? JSParserBuiltinMode::Builtin : JSParserBuiltinMode::NotBuiltin;
</span><span class="cx">     JSParserStrictMode strictMode = executable-&gt;isInStrictContext() ? JSParserStrictMode::Strict : JSParserStrictMode::NotStrict;
</span><ins>+    JSParserCommentMode commentMode = executable-&gt;commentMode();
</ins><span class="cx">     ASSERT(isFunctionParseMode(executable-&gt;parseMode()));
</span><span class="cx">     std::unique_ptr&lt;FunctionNode&gt; function = parse&lt;FunctionNode&gt;(
</span><del>-        &amp;vm, source, executable-&gt;name(), builtinMode, strictMode, executable-&gt;parseMode(), executable-&gt;superBinding(), error, nullptr);
</del><ins>+        &amp;vm, source, executable-&gt;name(), builtinMode, strictMode, commentMode, executable-&gt;parseMode(), executable-&gt;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-&gt;superBinding() == SuperBinding::Needed;
</span><span class="cx"> 
</span><del>-    UnlinkedFunctionCodeBlock* result = UnlinkedFunctionCodeBlock::create(&amp;vm, FunctionCode, ExecutableInfo(function-&gt;usesEval(), function-&gt;isStrictMode(), kind == CodeForConstruct, functionKind == UnlinkedBuiltinFunction, executable-&gt;constructorKind(), executable-&gt;superBinding(), parseMode, executable-&gt;derivedContextType(), false, isClassContext, EvalContextType::FunctionEvalContext), debuggerMode);
</del><ins>+    UnlinkedFunctionCodeBlock* result = UnlinkedFunctionCodeBlock::create(&amp;vm, FunctionCode, ExecutableInfo(function-&gt;usesEval(), function-&gt;isStrictMode(), kind == CodeForConstruct, functionKind == UnlinkedBuiltinFunction, executable-&gt;constructorKind(), commentMode, executable-&gt;superBinding(), parseMode, executable-&gt;derivedContextType(), false, isClassContext, EvalContextType::FunctionEvalContext), debuggerMode);
</ins><span class="cx"> 
</span><span class="cx">     error = BytecodeGenerator::generate(vm, function.get(), result, debuggerMode, executable-&gt;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&amp; source, RefPtr&lt;SourceProvider&gt;&amp;&amp; sourceOverride, FunctionMetadataNode* node, UnlinkedFunctionKind kind, ConstructAbility constructAbility, VariableEnvironment&amp; parentScopeTDZVariables, DerivedContextType derivedContextType)
</del><ins>+UnlinkedFunctionExecutable::UnlinkedFunctionExecutable(VM* vm, Structure* structure, const SourceCode&amp; source, RefPtr&lt;SourceProvider&gt;&amp;&amp; sourceOverride, FunctionMetadataNode* node, UnlinkedFunctionKind kind, ConstructAbility constructAbility, JSParserCommentMode commentMode, VariableEnvironment&amp; parentScopeTDZVariables, DerivedContextType derivedContextType)
</ins><span class="cx">     : Base(*vm, structure)
</span><span class="cx">     , m_firstLineOffset(node-&gt;firstLine() - source.firstLine())
</span><span class="cx">     , m_lineCount(node-&gt;lastLine() - node-&gt;firstLine())
</span><span class="lines">@@ -94,6 +95,7 @@
</span><span class="cx">     , m_constructAbility(static_cast&lt;unsigned&gt;(constructAbility))
</span><span class="cx">     , m_constructorKind(static_cast&lt;unsigned&gt;(node-&gt;constructorKind()))
</span><span class="cx">     , m_functionMode(static_cast&lt;unsigned&gt;(node-&gt;functionMode()))
</span><ins>+    , m_commentMode(static_cast&lt;unsigned&gt;(commentMode))
</ins><span class="cx">     , m_superBinding(static_cast&lt;unsigned&gt;(node-&gt;superBinding()))
</span><span class="cx">     , m_derivedContextType(static_cast&lt;unsigned&gt;(derivedContextType))
</span><span class="cx">     , m_sourceParseMode(static_cast&lt;unsigned&gt;(node-&gt;parseMode()))
</span><span class="lines">@@ -107,6 +109,7 @@
</span><span class="cx">     ASSERT(m_constructAbility == static_cast&lt;unsigned&gt;(constructAbility));
</span><span class="cx">     ASSERT(m_constructorKind == static_cast&lt;unsigned&gt;(node-&gt;constructorKind()));
</span><span class="cx">     ASSERT(m_functionMode == static_cast&lt;unsigned&gt;(node-&gt;functionMode()));
</span><ins>+    ASSERT(m_commentMode == static_cast&lt;unsigned&gt;(commentMode));
</ins><span class="cx">     ASSERT(m_superBinding == static_cast&lt;unsigned&gt;(node-&gt;superBinding()));
</span><span class="cx">     ASSERT(m_derivedContextType == static_cast&lt;unsigned&gt;(derivedContextType));
</span><span class="cx">     ASSERT(m_sourceParseMode == static_cast&lt;unsigned&gt;(node-&gt;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&amp; source, FunctionMetadataNode* node, UnlinkedFunctionKind unlinkedFunctionKind, ConstructAbility constructAbility, VariableEnvironment&amp; parentScopeTDZVariables, DerivedContextType derivedContextType, RefPtr&lt;SourceProvider&gt;&amp;&amp; sourceOverride = nullptr)
</del><ins>+    static UnlinkedFunctionExecutable* create(VM* vm, const SourceCode&amp; source, FunctionMetadataNode* node, UnlinkedFunctionKind unlinkedFunctionKind, ConstructAbility constructAbility, JSParserCommentMode commentMode, VariableEnvironment&amp; parentScopeTDZVariables, DerivedContextType derivedContextType, RefPtr&lt;SourceProvider&gt;&amp;&amp; sourceOverride = nullptr)
</ins><span class="cx">     {
</span><span class="cx">         UnlinkedFunctionExecutable* instance = new (NotNull, allocateCell&lt;UnlinkedFunctionExecutable&gt;(vm-&gt;heap))
</span><del>-            UnlinkedFunctionExecutable(vm, vm-&gt;unlinkedFunctionExecutableStructure.get(), source, WTFMove(sourceOverride), node, unlinkedFunctionKind, constructAbility, parentScopeTDZVariables, derivedContextType);
</del><ins>+            UnlinkedFunctionExecutable(vm, vm-&gt;unlinkedFunctionExecutableStructure.get(), source, WTFMove(sourceOverride), node, unlinkedFunctionKind, constructAbility, commentMode, parentScopeTDZVariables, derivedContextType);
</ins><span class="cx">         instance-&gt;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&lt;ConstructAbility&gt;(m_constructAbility); }
</span><ins>+    JSParserCommentMode commentMode() const { return static_cast&lt;JSParserCommentMode&gt;(m_commentMode); }
</ins><span class="cx">     bool isClassConstructorFunction() const { return constructorKind() != ConstructorKind::None; }
</span><span class="cx">     const VariableEnvironment* parentScopeTDZVariables() const { return &amp;m_parentScopeTDZVariables; }
</span><span class="cx">     
</span><span class="lines">@@ -140,7 +141,7 @@
</span><span class="cx">     void setSourceMappingURLDirective(const String&amp; sourceMappingURL) { m_sourceMappingURLDirective = sourceMappingURL; }
</span><span class="cx"> 
</span><span class="cx"> private:
</span><del>-    UnlinkedFunctionExecutable(VM*, Structure*, const SourceCode&amp;, RefPtr&lt;SourceProvider&gt;&amp;&amp; sourceOverride, FunctionMetadataNode*, UnlinkedFunctionKind, ConstructAbility, VariableEnvironment&amp;,  JSC::DerivedContextType);
</del><ins>+    UnlinkedFunctionExecutable(VM*, Structure*, const SourceCode&amp;, RefPtr&lt;SourceProvider&gt;&amp;&amp; sourceOverride, FunctionMetadataNode*, UnlinkedFunctionKind, ConstructAbility, JSParserCommentMode, VariableEnvironment&amp;,  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-&gt;usesThis(); }
</span><span class="cx">         ConstructorKind constructorKind() const { return m_codeBlock-&gt;constructorKind(); }
</span><span class="cx">         SuperBinding superBinding() const { return m_codeBlock-&gt;superBinding(); }
</span><ins>+        JSParserCommentMode commentMode() const { return m_codeBlock-&gt;commentMode(); }
</ins><span class="cx"> 
</span><span class="cx">         template&lt;typename... Args&gt;
</span><span class="cx">         static ParserError generate(VM&amp; vm, Args&amp;&amp; ...args)
</span><span class="lines">@@ -843,7 +844,7 @@
</span><span class="cx">             else if (parseMode == SourceParseMode::MethodMode &amp;&amp; metadata-&gt;constructorKind() == ConstructorKind::None)
</span><span class="cx">                 constructAbility = ConstructAbility::CannotConstruct;
</span><span class="cx"> 
</span><del>-            return UnlinkedFunctionExecutable::create(m_vm, m_scopeNode-&gt;source(), metadata, isBuiltinFunction() ? UnlinkedBuiltinFunction : UnlinkedNormalFunction, constructAbility, variablesUnderTDZ, newDerivedContextType);
</del><ins>+            return UnlinkedFunctionExecutable::create(m_vm, m_scopeNode-&gt;source(), metadata, isBuiltinFunction() ? UnlinkedBuiltinFunction : UnlinkedNormalFunction, constructAbility, commentMode(), variablesUnderTDZ, newDerivedContextType);
</ins><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         void getVariablesUnderTDZ(VariableEnvironment&amp;);
</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 &lt;typename T&gt;
</span><del>-Lexer&lt;T&gt;::Lexer(VM* vm, JSParserBuiltinMode builtinMode)
</del><ins>+Lexer&lt;T&gt;::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 == '!' &amp;&amp; peek(1) == '-' &amp;&amp; peek(2) == '-') {
</span><del>-            // &lt;!-- marks the beginning of a line comment (for www usage)
-            goto inSingleLineComment;
</del><ins>+            if (m_commentMode == JSParserCommentMode::Classic) {
+                // &lt;!-- marks the beginning of a line comment (for www usage)
+                goto inSingleLineComment;
+            }
</ins><span class="cx">         }
</span><span class="cx">         if (m_current == '&lt;') {
</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 &amp;&amp; m_current == '&gt;') {
</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 &lt;&gt;
</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 &lt;typename LexerType&gt;
</span><del>-Parser&lt;LexerType&gt;::Parser(VM* vm, const SourceCode&amp; source, JSParserBuiltinMode builtinMode, JSParserStrictMode strictMode, SourceParseMode parseMode, SuperBinding superBinding, ConstructorKind defaultConstructorKind, DerivedContextType derivedContextType, bool isEvalContext, EvalContextType evalContextType)
</del><ins>+Parser&lt;LexerType&gt;::Parser(VM* vm, const SourceCode&amp; 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(&amp;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&lt;LexerType&gt;(vm, builtinMode);
</del><ins>+    m_lexer = std::make_unique&lt;LexerType&gt;(vm, builtinMode, commentMode);
</ins><span class="cx">     m_lexer-&gt;setCode(source, &amp;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&amp;, JSParserBuiltinMode, JSParserStrictMode, SourceParseMode, SuperBinding, ConstructorKind defaultConstructorKind = ConstructorKind::None, DerivedContextType = DerivedContextType::None, bool isEvalContext = false, EvalContextType = EvalContextType::None);
</del><ins>+    Parser(VM*, const SourceCode&amp;, 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 &lt;class ParsedNode&gt;
</span><span class="lines">@@ -1583,6 +1583,7 @@
</span><span class="cx">     RefPtr&lt;SourceProviderCache&gt; 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&lt;ParsedNode&gt; parse(
</span><span class="cx">     VM* vm, const SourceCode&amp; source,
</span><span class="cx">     const Identifier&amp; 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&amp; 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()-&gt;source().isNull());
</span><span class="cx">     if (source.provider()-&gt;source().is8Bit()) {
</span><del>-        Parser&lt;Lexer&lt;LChar&gt;&gt; parser(vm, source, builtinMode, strictMode, parseMode, superBinding, defaultConstructorKind, derivedContextType, isEvalNode&lt;ParsedNode&gt;(), evalContextType);
</del><ins>+        Parser&lt;Lexer&lt;LChar&gt;&gt; parser(vm, source, builtinMode, strictMode, commentMode, parseMode, superBinding, defaultConstructorKind, derivedContextType, isEvalNode&lt;ParsedNode&gt;(), evalContextType);
</ins><span class="cx">         std::unique_ptr&lt;ParsedNode&gt; result = parser.parse&lt;ParsedNode&gt;(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, &quot;BuiltinExecutables::createDefaultConstructor should always use a 8-bit string&quot;);
</span><del>-    Parser&lt;Lexer&lt;UChar&gt;&gt; parser(vm, source, builtinMode, strictMode, parseMode, superBinding, defaultConstructorKind, derivedContextType, isEvalNode&lt;ParsedNode&gt;(), evalContextType);
</del><ins>+    Parser&lt;Lexer&lt;UChar&gt;&gt; parser(vm, source, builtinMode, strictMode, commentMode, parseMode, superBinding, defaultConstructorKind, derivedContextType, isEvalNode&lt;ParsedNode&gt;(), evalContextType);
</ins><span class="cx">     std::unique_ptr&lt;ParsedNode&gt; result = parser.parse&lt;ParsedNode&gt;(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&lt;unsigned&gt;(commentMode) &lt;&lt; 8) |
</ins><span class="cx">             (static_cast&lt;unsigned&gt;(isArrowFunctionContext) &lt;&lt; 7) |
</span><span class="cx">             (static_cast&lt;unsigned&gt;(evalContextType) &lt;&lt; 6) |
</span><span class="cx">             (static_cast&lt;unsigned&gt;(derivedContextType) &lt;&lt; 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&amp; sourceCode, const String&amp; name, SourceCodeType codeType, JSParserBuiltinMode builtinMode, JSParserStrictMode strictMode, DerivedContextType derivedContextType, EvalContextType evalContextType, bool isArrowFunctionContext)
</del><ins>+    SourceCodeKey(const SourceCode&amp; sourceCode, const String&amp; 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 &lt;class UnlinkedCodeBlockType, class ExecutableType&gt;
</span><del>-UnlinkedCodeBlockType* CodeCache::getGlobalCodeBlock(VM&amp; vm, ExecutableType* executable, const SourceCode&amp; source, JSParserBuiltinMode builtinMode, JSParserStrictMode strictMode, DebuggerMode debuggerMode, ParserError&amp; error, EvalContextType evalContextType, const VariableEnvironment* variablesUnderTDZ)
</del><ins>+UnlinkedCodeBlockType* CodeCache::getGlobalCodeBlock(VM&amp; vm, ExecutableType* executable, const SourceCode&amp; source, JSParserBuiltinMode builtinMode, JSParserStrictMode strictMode, JSParserCommentMode commentMode, DebuggerMode debuggerMode, ParserError&amp; error, EvalContextType evalContextType, const VariableEnvironment* variablesUnderTDZ)
</ins><span class="cx"> {
</span><span class="cx">     DerivedContextType derivedContextType = executable-&gt;derivedContextType();
</span><span class="cx">     bool isArrowFunctionContext = executable-&gt;isArrowFunctionContext();
</span><del>-    SourceCodeKey key(source, String(), CacheTypes&lt;UnlinkedCodeBlockType&gt;::codeType, builtinMode, strictMode, derivedContextType, evalContextType, isArrowFunctionContext);
</del><ins>+    SourceCodeKey key(source, String(), CacheTypes&lt;UnlinkedCodeBlockType&gt;::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&lt;UnlinkedCodeBlockType&gt;::RootNode RootNode;
</span><span class="cx">     std::unique_ptr&lt;RootNode&gt; rootNode = parse&lt;RootNode&gt;(
</span><del>-        &amp;vm, source, Identifier(), builtinMode, strictMode, CacheTypes&lt;UnlinkedCodeBlockType&gt;::parseMode, SuperBinding::NotNeeded, error, nullptr, ConstructorKind::None, derivedContextType, evalContextType);
</del><ins>+        &amp;vm, source, Identifier(), builtinMode, strictMode, commentMode, CacheTypes&lt;UnlinkedCodeBlockType&gt;::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&amp; vm, ProgramExecutable* executable, const SourceCode&amp; source, JSParserBuiltinMode builtinMode, JSParserStrictMode strictMode, DebuggerMode debuggerMode, ParserError&amp; error)
</span><span class="cx"> {
</span><span class="cx">     VariableEnvironment emptyParentTDZVariables;
</span><del>-    return getGlobalCodeBlock&lt;UnlinkedProgramCodeBlock&gt;(vm, executable, source, builtinMode, strictMode, debuggerMode, error, EvalContextType::None, &amp;emptyParentTDZVariables);
</del><ins>+    return getGlobalCodeBlock&lt;UnlinkedProgramCodeBlock&gt;(vm, executable, source, builtinMode, strictMode, JSParserCommentMode::Classic, debuggerMode, error, EvalContextType::None, &amp;emptyParentTDZVariables);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> UnlinkedEvalCodeBlock* CodeCache::getEvalCodeBlock(VM&amp; vm, EvalExecutable* executable, const SourceCode&amp; source, JSParserBuiltinMode builtinMode, JSParserStrictMode strictMode, DebuggerMode debuggerMode, ParserError&amp; error, EvalContextType evalContextType, const VariableEnvironment* variablesUnderTDZ)
</span><span class="cx"> {
</span><del>-    return getGlobalCodeBlock&lt;UnlinkedEvalCodeBlock&gt;(vm, executable, source, builtinMode, strictMode, debuggerMode, error, evalContextType, variablesUnderTDZ);
</del><ins>+    return getGlobalCodeBlock&lt;UnlinkedEvalCodeBlock&gt;(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&amp; vm, ModuleProgramExecutable* executable, const SourceCode&amp; source, JSParserBuiltinMode builtinMode, DebuggerMode debuggerMode, ParserError&amp; error)
</span><span class="cx"> {
</span><span class="cx">     VariableEnvironment emptyParentTDZVariables;
</span><del>-    return getGlobalCodeBlock&lt;UnlinkedModuleProgramCodeBlock&gt;(vm, executable, source, builtinMode, JSParserStrictMode::Strict, debuggerMode, error, EvalContextType::None, &amp;emptyParentTDZVariables);
</del><ins>+    return getGlobalCodeBlock&lt;UnlinkedModuleProgramCodeBlock&gt;(vm, executable, source, builtinMode, JSParserStrictMode::Strict, JSParserCommentMode::Module, debuggerMode, error, EvalContextType::None, &amp;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&lt;ProgramNode&gt; program = parse&lt;ProgramNode&gt;(
</span><span class="cx">         &amp;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, &amp;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-&gt;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(&amp;vm, source, metadata, UnlinkedNormalFunction, ConstructAbility::CanConstruct, emptyTDZVariables, DerivedContextType::None);
</del><ins>+    UnlinkedFunctionExecutable* functionExecutable = UnlinkedFunctionExecutable::create(&amp;vm, source, metadata, UnlinkedNormalFunction, ConstructAbility::CanConstruct, JSParserCommentMode::Classic, emptyTDZVariables, DerivedContextType::None);
</ins><span class="cx"> 
</span><span class="cx">     functionExecutable-&gt;setSourceURLDirective(source.provider()-&gt;sourceURL());
</span><span class="cx">     functionExecutable-&gt;setSourceMappingURLDirective(source.provider()-&gt;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 &lt;class UnlinkedCodeBlockType, class ExecutableType&gt; 
</span><del>-    UnlinkedCodeBlockType* getGlobalCodeBlock(VM&amp;, ExecutableType*, const SourceCode&amp;, JSParserBuiltinMode, JSParserStrictMode, DebuggerMode, ParserError&amp;, EvalContextType, const VariableEnvironment*);
</del><ins>+    UnlinkedCodeBlockType* getGlobalCodeBlock(VM&amp;, ExecutableType*, const SourceCode&amp;, JSParserBuiltinMode, JSParserStrictMode, JSParserCommentMode, DebuggerMode, ParserError&amp;, 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&lt;ProgramNode&gt;(
</span><span class="cx">         &amp;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&amp; source, ParserError&amp; 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&lt;ModuleProgramNode&gt; moduleProgramNode = parse&lt;ModuleProgramNode&gt;(
</span><span class="cx">         &amp;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 = &amp;exec-&gt;vm();
</span><span class="cx">     JSGlobalObject* lexicalGlobalObject = exec-&gt;lexicalGlobalObject();
</span><span class="cx">     std::unique_ptr&lt;ProgramNode&gt; programNode = parse&lt;ProgramNode&gt;(
</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-&gt;numVariables(); }
</span><span class="cx">     unsigned numberOfFunctionDecls() { return m_unlinkedEvalCodeBlock-&gt;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&amp; inferredName() { return m_unlinkedExecutable-&gt;inferredName(); }
</span><span class="cx">     size_t parameterCount() const { return m_unlinkedExecutable-&gt;parameterCount(); } // Excluding 'this'!
</span><span class="cx">     SourceParseMode parseMode() const { return m_unlinkedExecutable-&gt;parseMode(); }
</span><ins>+    JSParserCommentMode commentMode() const { return m_unlinkedExecutable-&gt;commentMode(); }
</ins><span class="cx">     const SourceCode&amp; classSource() const { return m_unlinkedExecutable-&gt;classSource(); }
</span><span class="cx"> 
</span><span class="cx">     static void visitChildren(JSCell*, SlotVisitor&amp;);
</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&lt;ModuleProgramNode&gt; moduleProgramNode = parse&lt;ModuleProgramNode&gt;(
</span><span class="cx">         &amp;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-&gt;lexicalGlobalObject(), sourceCode));
</span></span></pre>
</div>
</div>

</body>
</html>