<!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>[181664] trunk/Source/JavaScriptCore</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/181664">181664</a></dd>
<dt>Author</dt> <dd>ggaren@apple.com</dd>
<dt>Date</dt> <dd>2015-03-17 14:15:03 -0700 (Tue, 17 Mar 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>Built-in functions should know that they use strict mode
https://bugs.webkit.org/show_bug.cgi?id=142788

Reviewed by Mark Lam.

Even though all of our builtin functions use strict mode, the parser
thinks that they don't. This is because Executable::toStrictness treats
builtin-ness and strict-ness as mutually exclusive.

The fix is to disambiguate builtin-ness from strict-ness.

This bug is currently unobservable because of some other parser bugs. But
it causes lots of test failures once those other bugs are fixed.

* API/JSScriptRef.cpp:
(parseScript):
* builtins/BuiltinExecutables.cpp:
(JSC::BuiltinExecutables::createBuiltinExecutable): Adopt the new API
for a separate value to indicate builtin-ness vs strict-ness.

* bytecode/UnlinkedCodeBlock.cpp:
(JSC::generateFunctionCodeBlock):
(JSC::UnlinkedFunctionExecutable::codeBlockFor): Ditto.

* bytecode/UnlinkedCodeBlock.h:
(JSC::UnlinkedFunctionExecutable::toStrictness): Deleted. This function
was misleading since it pretended that no builtin function was ever
strict, which is the opposite of true.

* parser/Lexer.cpp:
(JSC::Lexer&lt;T&gt;::Lexer):
* parser/Lexer.h:
* parser/Parser.cpp:
(JSC::Parser&lt;LexerType&gt;::Parser):
* parser/Parser.h:
(JSC::parse): Adopt the new API.

* parser/ParserModes.h: Added JSParserBuiltinMode, and tried to give
existing modes clearer names.

* runtime/CodeCache.cpp:
(JSC::CodeCache::getGlobalCodeBlock):
(JSC::CodeCache::getProgramCodeBlock):
(JSC::CodeCache::getEvalCodeBlock):
(JSC::CodeCache::getFunctionExecutableFromGlobalCode): Adopt the new API.

* runtime/CodeCache.h:
(JSC::SourceCodeKey::SourceCodeKey): Be sure to treat strict-ness and
bulitin-ness as separate pieces of the code cache key. We would not want
a user function to match a built-in function in the cache, even if they
agreed about strictness, since builtin functions have different lexing
rules.

* runtime/Completion.cpp:
(JSC::checkSyntax):
* runtime/Executable.cpp:
(JSC::FunctionExecutable::FunctionExecutable):
(JSC::ProgramExecutable::checkSyntax):
* runtime/Executable.h:
(JSC::FunctionExecutable::create):
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::createProgramCodeBlock):
(JSC::JSGlobalObject::createEvalCodeBlock): Adopt the new API.</pre>

<h3>Modified Paths</h3>
<ul>
<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="#trunkSourceJavaScriptCorebytecodeUnlinkedCodeBlockcpp">trunk/Source/JavaScriptCore/bytecode/UnlinkedCodeBlock.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCorebytecodeUnlinkedCodeBlockh">trunk/Source/JavaScriptCore/bytecode/UnlinkedCodeBlock.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="#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="#trunkSourceJavaScriptCoreruntimeJSGlobalObjectcpp">trunk/Source/JavaScriptCore/runtime/JSGlobalObject.cpp</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceJavaScriptCoreAPIJSScriptRefcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/API/JSScriptRef.cpp (181663 => 181664)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/API/JSScriptRef.cpp        2015-03-17 20:47:42 UTC (rev 181663)
+++ trunk/Source/JavaScriptCore/API/JSScriptRef.cpp        2015-03-17 21:15:03 UTC (rev 181664)
</span><span class="lines">@@ -68,7 +68,10 @@
</span><span class="cx"> 
</span><span class="cx"> static bool parseScript(VM* vm, const SourceCode&amp; source, ParserError&amp; error)
</span><span class="cx"> {
</span><del>-    return !!JSC::parse&lt;JSC::ProgramNode&gt;(vm, source, 0, Identifier(), JSParseNormal, JSParseProgramCode, error);
</del><ins>+    return !!JSC::parse&lt;JSC::ProgramNode&gt;(
+        vm, source, 0, Identifier(), JSParserBuiltinMode::NotBuiltin, 
+        JSParserStrictMode::NotStrict, JSParserCodeType::Program, 
+        error);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> extern &quot;C&quot; {
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/ChangeLog (181663 => 181664)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/ChangeLog        2015-03-17 20:47:42 UTC (rev 181663)
+++ trunk/Source/JavaScriptCore/ChangeLog        2015-03-17 21:15:03 UTC (rev 181664)
</span><span class="lines">@@ -1,3 +1,69 @@
</span><ins>+2015-03-17  Geoffrey Garen  &lt;ggaren@apple.com&gt;
+
+        Built-in functions should know that they use strict mode
+        https://bugs.webkit.org/show_bug.cgi?id=142788
+
+        Reviewed by Mark Lam.
+
+        Even though all of our builtin functions use strict mode, the parser
+        thinks that they don't. This is because Executable::toStrictness treats
+        builtin-ness and strict-ness as mutually exclusive.
+
+        The fix is to disambiguate builtin-ness from strict-ness.
+
+        This bug is currently unobservable because of some other parser bugs. But
+        it causes lots of test failures once those other bugs are fixed.
+
+        * API/JSScriptRef.cpp:
+        (parseScript):
+        * builtins/BuiltinExecutables.cpp:
+        (JSC::BuiltinExecutables::createBuiltinExecutable): Adopt the new API
+        for a separate value to indicate builtin-ness vs strict-ness.
+
+        * bytecode/UnlinkedCodeBlock.cpp:
+        (JSC::generateFunctionCodeBlock):
+        (JSC::UnlinkedFunctionExecutable::codeBlockFor): Ditto.
+
+        * bytecode/UnlinkedCodeBlock.h:
+        (JSC::UnlinkedFunctionExecutable::toStrictness): Deleted. This function
+        was misleading since it pretended that no builtin function was ever
+        strict, which is the opposite of true.
+
+        * parser/Lexer.cpp:
+        (JSC::Lexer&lt;T&gt;::Lexer):
+        * parser/Lexer.h:
+        * parser/Parser.cpp:
+        (JSC::Parser&lt;LexerType&gt;::Parser):
+        * parser/Parser.h:
+        (JSC::parse): Adopt the new API.
+
+        * parser/ParserModes.h: Added JSParserBuiltinMode, and tried to give
+        existing modes clearer names.
+
+        * runtime/CodeCache.cpp:
+        (JSC::CodeCache::getGlobalCodeBlock):
+        (JSC::CodeCache::getProgramCodeBlock):
+        (JSC::CodeCache::getEvalCodeBlock):
+        (JSC::CodeCache::getFunctionExecutableFromGlobalCode): Adopt the new API.
+
+        * runtime/CodeCache.h:
+        (JSC::SourceCodeKey::SourceCodeKey): Be sure to treat strict-ness and
+        bulitin-ness as separate pieces of the code cache key. We would not want
+        a user function to match a built-in function in the cache, even if they
+        agreed about strictness, since builtin functions have different lexing
+        rules.
+
+        * runtime/Completion.cpp:
+        (JSC::checkSyntax):
+        * runtime/Executable.cpp:
+        (JSC::FunctionExecutable::FunctionExecutable):
+        (JSC::ProgramExecutable::checkSyntax):
+        * runtime/Executable.h:
+        (JSC::FunctionExecutable::create):
+        * runtime/JSGlobalObject.cpp:
+        (JSC::JSGlobalObject::createProgramCodeBlock):
+        (JSC::JSGlobalObject::createEvalCodeBlock): Adopt the new API.
+
</ins><span class="cx"> 2015-03-16  Filip Pizlo  &lt;fpizlo@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         DFG IR shouldn't have a separate node for every kind of put hint that could be described using PromotedLocationDescriptor
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorebuiltinsBuiltinExecutablescpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/builtins/BuiltinExecutables.cpp (181663 => 181664)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/builtins/BuiltinExecutables.cpp        2015-03-17 20:47:42 UTC (rev 181663)
+++ trunk/Source/JavaScriptCore/builtins/BuiltinExecutables.cpp        2015-03-17 21:15:03 UTC (rev 181664)
</span><span class="lines">@@ -65,10 +65,13 @@
</span><span class="cx">     JSTextPosition positionBeforeLastNewline;
</span><span class="cx">     ParserError error;
</span><span class="cx">     bool isParsingDefaultConstructor = constructorKind != ConstructorKind::None;
</span><del>-    JSParserStrictness strictness = isParsingDefaultConstructor ? JSParseNormal : JSParseBuiltin;
</del><ins>+    JSParserBuiltinMode builtinMode = isParsingDefaultConstructor ? JSParserBuiltinMode::NotBuiltin : JSParserBuiltinMode::Builtin;
</ins><span class="cx">     UnlinkedFunctionKind kind = isParsingDefaultConstructor ? UnlinkedNormalFunction : UnlinkedBuiltinFunction;
</span><span class="cx">     RefPtr&lt;SourceProvider&gt; sourceOverride = isParsingDefaultConstructor ? source.provider() : nullptr;
</span><del>-    std::unique_ptr&lt;ProgramNode&gt; program = parse&lt;ProgramNode&gt;(&amp;m_vm, source, 0, Identifier(), strictness, JSParseProgramCode,
</del><ins>+    std::unique_ptr&lt;ProgramNode&gt; program = parse&lt;ProgramNode&gt;(
+        &amp;m_vm, source, 0, Identifier(), builtinMode, 
+        JSParserStrictMode::NotStrict, 
+        JSParserCodeType::Program,
</ins><span class="cx">         error, &amp;positionBeforeLastNewline, false, constructorKind);
</span><span class="cx"> 
</span><span class="cx">     if (!program) {
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorebytecodeUnlinkedCodeBlockcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/bytecode/UnlinkedCodeBlock.cpp (181663 => 181664)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/bytecode/UnlinkedCodeBlock.cpp        2015-03-17 20:47:42 UTC (rev 181663)
+++ trunk/Source/JavaScriptCore/bytecode/UnlinkedCodeBlock.cpp        2015-03-17 21:15:03 UTC (rev 181664)
</span><span class="lines">@@ -49,9 +49,16 @@
</span><span class="cx"> const ClassInfo UnlinkedEvalCodeBlock::s_info = { &quot;UnlinkedEvalCodeBlock&quot;, &amp;Base::s_info, 0, CREATE_METHOD_TABLE(UnlinkedEvalCodeBlock) };
</span><span class="cx"> const ClassInfo UnlinkedFunctionCodeBlock::s_info = { &quot;UnlinkedFunctionCodeBlock&quot;, &amp;Base::s_info, 0, CREATE_METHOD_TABLE(UnlinkedFunctionCodeBlock) };
</span><span class="cx"> 
</span><del>-static UnlinkedFunctionCodeBlock* generateFunctionCodeBlock(VM&amp; vm, UnlinkedFunctionExecutable* executable, const SourceCode&amp; source, CodeSpecializationKind kind, DebuggerMode debuggerMode, ProfilerMode profilerMode, UnlinkedFunctionKind functionKind, bool bodyIncludesBraces, ParserError&amp; error)
</del><ins>+static UnlinkedFunctionCodeBlock* generateFunctionCodeBlock(
+    VM&amp; vm, UnlinkedFunctionExecutable* executable, const SourceCode&amp; source,
+    CodeSpecializationKind kind, DebuggerMode debuggerMode, ProfilerMode profilerMode,
+    UnlinkedFunctionKind functionKind, bool bodyIncludesBraces, ParserError&amp; error)
</ins><span class="cx"> {
</span><del>-    std::unique_ptr&lt;FunctionNode&gt; function = parse&lt;FunctionNode&gt;(&amp;vm, source, executable-&gt;parameters(), executable-&gt;name(), executable-&gt;toStrictness(), JSParseFunctionCode, error, 0, bodyIncludesBraces);
</del><ins>+    JSParserBuiltinMode builtinMode = executable-&gt;isBuiltinFunction() ? JSParserBuiltinMode::Builtin : JSParserBuiltinMode::NotBuiltin;
+    JSParserStrictMode strictMode = executable-&gt;isInStrictContext() ? JSParserStrictMode::Strict : JSParserStrictMode::NotStrict;
+    std::unique_ptr&lt;FunctionNode&gt; function = parse&lt;FunctionNode&gt;(
+        &amp;vm, source, executable-&gt;parameters(), executable-&gt;name(), builtinMode,
+        strictMode, JSParserCodeType::Function, error, 0, bodyIncludesBraces);
</ins><span class="cx"> 
</span><span class="cx">     if (!function) {
</span><span class="cx">         ASSERT(error.isValid());
</span><span class="lines">@@ -177,7 +184,10 @@
</span><span class="cx">     return executable;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-UnlinkedFunctionCodeBlock* UnlinkedFunctionExecutable::codeBlockFor(VM&amp; vm, const SourceCode&amp; source, CodeSpecializationKind specializationKind, DebuggerMode debuggerMode, ProfilerMode profilerMode, bool bodyIncludesBraces, ParserError&amp; error)
</del><ins>+UnlinkedFunctionCodeBlock* UnlinkedFunctionExecutable::codeBlockFor(
+    VM&amp; vm, const SourceCode&amp; source, CodeSpecializationKind specializationKind, 
+    DebuggerMode debuggerMode, ProfilerMode profilerMode, bool bodyIncludesBraces, 
+    ParserError&amp; error)
</ins><span class="cx"> {
</span><span class="cx">     switch (specializationKind) {
</span><span class="cx">     case CodeForCall:
</span><span class="lines">@@ -190,7 +200,10 @@
</span><span class="cx">         break;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    UnlinkedFunctionCodeBlock* result = generateFunctionCodeBlock(vm, this, source, specializationKind, debuggerMode, profilerMode, isBuiltinFunction() ? UnlinkedBuiltinFunction : UnlinkedNormalFunction, bodyIncludesBraces, error);
</del><ins>+    UnlinkedFunctionCodeBlock* result = generateFunctionCodeBlock(
+        vm, this, source, specializationKind, debuggerMode, profilerMode, 
+        isBuiltinFunction() ? UnlinkedBuiltinFunction : UnlinkedNormalFunction, 
+        bodyIncludesBraces, error);
</ins><span class="cx">     
</span><span class="cx">     if (error.isValid())
</span><span class="cx">         return nullptr;
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorebytecodeUnlinkedCodeBlockh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/bytecode/UnlinkedCodeBlock.h (181663 => 181664)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/bytecode/UnlinkedCodeBlock.h        2015-03-17 20:47:42 UTC (rev 181663)
+++ trunk/Source/JavaScriptCore/bytecode/UnlinkedCodeBlock.h        2015-03-17 21:15:03 UTC (rev 181664)
</span><span class="lines">@@ -121,14 +121,6 @@
</span><span class="cx">     size_t parameterCount() const;
</span><span class="cx">     bool isInStrictContext() const { return m_isInStrictContext; }
</span><span class="cx">     FunctionMode functionMode() const { return m_functionMode; }
</span><del>-    JSParserStrictness toStrictness() const
-    {
-        if (m_isBuiltinFunction)
-            return JSParseBuiltin;
-        if (m_isInStrictContext)
-            return JSParseStrict;
-        return JSParseNormal;
-    }
</del><span class="cx">     ConstructorKind constructorKind() const { return static_cast&lt;ConstructorKind&gt;(m_constructorKind); }
</span><span class="cx"> 
</span><span class="cx">     unsigned unlinkedFunctionNameStart() const { return m_unlinkedFunctionNameStart; }
</span><span class="lines">@@ -141,7 +133,9 @@
</span><span class="cx"> 
</span><span class="cx">     String paramString() const;
</span><span class="cx"> 
</span><del>-    UnlinkedFunctionCodeBlock* codeBlockFor(VM&amp;, const SourceCode&amp;, CodeSpecializationKind, DebuggerMode, ProfilerMode, bool bodyIncludesBraces, ParserError&amp;);
</del><ins>+    UnlinkedFunctionCodeBlock* codeBlockFor(
+        VM&amp;, const SourceCode&amp;, CodeSpecializationKind, DebuggerMode, ProfilerMode, 
+        bool bodyIncludesBraces, ParserError&amp;);
</ins><span class="cx"> 
</span><span class="cx">     static UnlinkedFunctionExecutable* fromGlobalCode(const Identifier&amp;, ExecState&amp;, const SourceCode&amp;, JSObject*&amp; exception);
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreparserLexercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/parser/Lexer.cpp (181663 => 181664)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/parser/Lexer.cpp        2015-03-17 20:47:42 UTC (rev 181663)
+++ trunk/Source/JavaScriptCore/parser/Lexer.cpp        2015-03-17 21:15:03 UTC (rev 181664)
</span><span class="lines">@@ -488,10 +488,10 @@
</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, JSParserStrictness strictness)
</del><ins>+Lexer&lt;T&gt;::Lexer(VM* vm, JSParserBuiltinMode builtinMode)
</ins><span class="cx">     : m_isReparsing(false)
</span><span class="cx">     , m_vm(vm)
</span><del>-    , m_parsingBuiltinFunction(strictness == JSParseBuiltin)
</del><ins>+    , m_parsingBuiltinFunction(builtinMode == JSParserBuiltinMode::Builtin)
</ins><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreparserLexerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/parser/Lexer.h (181663 => 181664)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/parser/Lexer.h        2015-03-17 20:47:42 UTC (rev 181663)
+++ trunk/Source/JavaScriptCore/parser/Lexer.h        2015-03-17 21:15:03 UTC (rev 181664)
</span><span class="lines">@@ -71,7 +71,7 @@
</span><span class="cx">     WTF_MAKE_FAST_ALLOCATED;
</span><span class="cx"> 
</span><span class="cx"> public:
</span><del>-    Lexer(VM*, JSParserStrictness);
</del><ins>+    Lexer(VM*, JSParserBuiltinMode);
</ins><span class="cx">     ~Lexer();
</span><span class="cx"> 
</span><span class="cx">     // Character manipulation functions.
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreparserParsercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/parser/Parser.cpp (181663 => 181664)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/parser/Parser.cpp        2015-03-17 20:47:42 UTC (rev 181663)
+++ trunk/Source/JavaScriptCore/parser/Parser.cpp        2015-03-17 21:15:03 UTC (rev 181664)
</span><span class="lines">@@ -190,7 +190,11 @@
</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, FunctionParameters* parameters, const Identifier&amp; name, JSParserStrictness strictness, JSParserMode parserMode, ConstructorKind defaultConstructorKind)
</del><ins>+Parser&lt;LexerType&gt;::Parser(
+    VM* vm, const SourceCode&amp; source, FunctionParameters* parameters, 
+    const Identifier&amp; name, JSParserBuiltinMode builtinMode, 
+    JSParserStrictMode strictMode, JSParserCodeType codeType, 
+    ConstructorKind defaultConstructorKind)
</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">@@ -203,10 +207,10 @@
</span><span class="cx">     , m_lastIdentifier(0)
</span><span class="cx">     , m_lastFunctionName(nullptr)
</span><span class="cx">     , m_sourceElements(0)
</span><del>-    , m_parsingBuiltin(strictness == JSParseBuiltin)
</del><ins>+    , m_parsingBuiltin(builtinMode == JSParserBuiltinMode::Builtin)
</ins><span class="cx">     , m_defaultConstructorKind(defaultConstructorKind)
</span><span class="cx"> {
</span><del>-    m_lexer = std::make_unique&lt;LexerType&gt;(vm, strictness);
</del><ins>+    m_lexer = std::make_unique&lt;LexerType&gt;(vm, builtinMode);
</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 class="lines">@@ -214,9 +218,9 @@
</span><span class="cx">     m_token.m_location.lineStartOffset = source.startOffset();
</span><span class="cx">     m_functionCache = vm-&gt;addSourceProviderCache(source.provider());
</span><span class="cx">     ScopeRef scope = pushScope();
</span><del>-    if (parserMode == JSParseFunctionCode)
</del><ins>+    if (codeType == JSParserCodeType::Function)
</ins><span class="cx">         scope-&gt;setIsFunction();
</span><del>-    if (strictness == JSParseStrict)
</del><ins>+    if (strictMode == JSParserStrictMode::Strict)
</ins><span class="cx">         scope-&gt;setStrictMode();
</span><span class="cx">     if (parameters) {
</span><span class="cx">         bool hadBindingParameters = false;
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreparserParserh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/parser/Parser.h (181663 => 181664)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/parser/Parser.h        2015-03-17 20:47:42 UTC (rev 181663)
+++ trunk/Source/JavaScriptCore/parser/Parser.h        2015-03-17 21:15:03 UTC (rev 181664)
</span><span class="lines">@@ -426,7 +426,9 @@
</span><span class="cx">     WTF_MAKE_FAST_ALLOCATED;
</span><span class="cx"> 
</span><span class="cx"> public:
</span><del>-    Parser(VM*, const SourceCode&amp;, FunctionParameters*, const Identifier&amp;, JSParserStrictness, JSParserMode,
</del><ins>+    Parser(
+        VM*, const SourceCode&amp;, FunctionParameters*, const Identifier&amp;, 
+        JSParserBuiltinMode, JSParserStrictMode, JSParserCodeType,
</ins><span class="cx">         ConstructorKind defaultConstructorKind = ConstructorKind::None);
</span><span class="cx">     ~Parser();
</span><span class="cx"> 
</span><span class="lines">@@ -981,19 +983,23 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> template &lt;class ParsedNode&gt;
</span><del>-std::unique_ptr&lt;ParsedNode&gt; parse(VM* vm, const SourceCode&amp; source, FunctionParameters* parameters, const Identifier&amp; name,
-    JSParserStrictness strictness, JSParserMode parserMode, ParserError&amp; error, JSTextPosition* positionBeforeLastNewline = 0,
-    bool needReparsingAdjustment = false, ConstructorKind defaultConstructorKind = ConstructorKind::None)
</del><ins>+std::unique_ptr&lt;ParsedNode&gt; parse(
+    VM* vm, const SourceCode&amp; source, FunctionParameters* parameters,
+    const Identifier&amp; name, JSParserBuiltinMode builtinMode,
+    JSParserStrictMode strictMode, JSParserCodeType codeType,
+    ParserError&amp; error, JSTextPosition* positionBeforeLastNewline = 0, 
+    bool needReparsingAdjustment = false, 
+    ConstructorKind defaultConstructorKind = ConstructorKind::None)
</ins><span class="cx"> {
</span><span class="cx">     SamplingRegion samplingRegion(&quot;Parsing&quot;);
</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, parameters, name, strictness, parserMode, defaultConstructorKind);
</del><ins>+        Parser&lt;Lexer&lt;LChar&gt;&gt; parser(vm, source, parameters, name, builtinMode, strictMode, codeType, defaultConstructorKind);
</ins><span class="cx">         std::unique_ptr&lt;ParsedNode&gt; result = parser.parse&lt;ParsedNode&gt;(error, needReparsingAdjustment);
</span><span class="cx">         if (positionBeforeLastNewline)
</span><span class="cx">             *positionBeforeLastNewline = parser.positionBeforeLastNewline();
</span><del>-        if (strictness == JSParseBuiltin) {
</del><ins>+        if (builtinMode == JSParserBuiltinMode::Builtin) {
</ins><span class="cx">             if (!result)
</span><span class="cx">                 WTF::dataLog(&quot;Error compiling builtin: &quot;, error.message(), &quot;\n&quot;);
</span><span class="cx">             RELEASE_ASSERT(result);
</span><span class="lines">@@ -1001,7 +1007,7 @@
</span><span class="cx">         }
</span><span class="cx">         return result;
</span><span class="cx">     }
</span><del>-    Parser&lt;Lexer&lt;UChar&gt;&gt; parser(vm, source, parameters, name, strictness, parserMode);
</del><ins>+    Parser&lt;Lexer&lt;UChar&gt;&gt; parser(vm, source, parameters, name, builtinMode, strictMode, codeType);
</ins><span class="cx">     std::unique_ptr&lt;ParsedNode&gt; result = parser.parse&lt;ParsedNode&gt;(error, needReparsingAdjustment);
</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 (181663 => 181664)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/parser/ParserModes.h        2015-03-17 20:47:42 UTC (rev 181663)
+++ trunk/Source/JavaScriptCore/parser/ParserModes.h        2015-03-17 21:15:03 UTC (rev 181664)
</span><span class="lines">@@ -31,8 +31,9 @@
</span><span class="cx"> 
</span><span class="cx"> namespace JSC {
</span><span class="cx"> 
</span><del>-enum JSParserStrictness { JSParseNormal, JSParseBuiltin, JSParseStrict };
-enum JSParserMode { JSParseProgramCode, JSParseFunctionCode };
</del><ins>+enum class JSParserStrictMode { NotStrict, Strict };
+enum class JSParserBuiltinMode { NotBuiltin, Builtin };
+enum class JSParserCodeType { Program, Function };
</ins><span class="cx"> 
</span><span class="cx"> enum class ConstructorKind { None, Base, Derived };
</span><span class="cx"> enum class SuperBinding { Needed, NotNeeded };
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeCodeCachecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/CodeCache.cpp (181663 => 181664)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/CodeCache.cpp        2015-03-17 20:47:42 UTC (rev 181663)
+++ trunk/Source/JavaScriptCore/runtime/CodeCache.cpp        2015-03-17 21:15:03 UTC (rev 181664)
</span><span class="lines">@@ -75,9 +75,9 @@
</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, JSParserStrictness strictness, DebuggerMode debuggerMode, ProfilerMode profilerMode, ParserError&amp; error)
</del><ins>+UnlinkedCodeBlockType* CodeCache::getGlobalCodeBlock(VM&amp; vm, ExecutableType* executable, const SourceCode&amp; source, JSParserBuiltinMode builtinMode, JSParserStrictMode strictMode, DebuggerMode debuggerMode, ProfilerMode profilerMode, ParserError&amp; error)
</ins><span class="cx"> {
</span><del>-    SourceCodeKey key = SourceCodeKey(source, String(), CacheTypes&lt;UnlinkedCodeBlockType&gt;::codeType, strictness);
</del><ins>+    SourceCodeKey key = SourceCodeKey(source, String(), CacheTypes&lt;UnlinkedCodeBlockType&gt;::codeType, builtinMode, strictMode);
</ins><span class="cx">     SourceCodeValue* cache = m_sourceCode.findCacheAndUpdateAge(key);
</span><span class="cx">     bool canCache = debuggerMode == DebuggerOff &amp;&amp; profilerMode == ProfilerOff &amp;&amp; !vm.typeProfiler() &amp;&amp; !vm.controlFlowProfiler();
</span><span class="cx">     if (cache &amp;&amp; canCache) {
</span><span class="lines">@@ -92,7 +92,9 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     typedef typename CacheTypes&lt;UnlinkedCodeBlockType&gt;::RootNode RootNode;
</span><del>-    std::unique_ptr&lt;RootNode&gt; rootNode = parse&lt;RootNode&gt;(&amp;vm, source, 0, Identifier(), strictness, JSParseProgramCode, error);
</del><ins>+    std::unique_ptr&lt;RootNode&gt; rootNode = parse&lt;RootNode&gt;(
+        &amp;vm, source, 0, Identifier(), builtinMode, strictMode, 
+        JSParserCodeType::Program, error);
</ins><span class="cx">     if (!rootNode)
</span><span class="cx">         return nullptr;
</span><span class="cx"> 
</span><span class="lines">@@ -118,25 +120,31 @@
</span><span class="cx">     return unlinkedCodeBlock;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-UnlinkedProgramCodeBlock* CodeCache::getProgramCodeBlock(VM&amp; vm, ProgramExecutable* executable, const SourceCode&amp; source, JSParserStrictness strictness, DebuggerMode debuggerMode, ProfilerMode profilerMode, ParserError&amp; error)
</del><ins>+UnlinkedProgramCodeBlock* CodeCache::getProgramCodeBlock(VM&amp; vm, ProgramExecutable* executable, const SourceCode&amp; source, JSParserBuiltinMode builtinMode, JSParserStrictMode strictMode, DebuggerMode debuggerMode, ProfilerMode profilerMode, ParserError&amp; error)
</ins><span class="cx"> {
</span><del>-    return getGlobalCodeBlock&lt;UnlinkedProgramCodeBlock&gt;(vm, executable, source, strictness, debuggerMode, profilerMode, error);
</del><ins>+    return getGlobalCodeBlock&lt;UnlinkedProgramCodeBlock&gt;(vm, executable, source, builtinMode, strictMode, debuggerMode, profilerMode, error);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-UnlinkedEvalCodeBlock* CodeCache::getEvalCodeBlock(VM&amp; vm, EvalExecutable* executable, const SourceCode&amp; source, JSParserStrictness strictness, DebuggerMode debuggerMode, ProfilerMode profilerMode, ParserError&amp; error)
</del><ins>+UnlinkedEvalCodeBlock* CodeCache::getEvalCodeBlock(VM&amp; vm, EvalExecutable* executable, const SourceCode&amp; source, JSParserBuiltinMode builtinMode, JSParserStrictMode strictMode, DebuggerMode debuggerMode, ProfilerMode profilerMode, ParserError&amp; error)
</ins><span class="cx"> {
</span><del>-    return getGlobalCodeBlock&lt;UnlinkedEvalCodeBlock&gt;(vm, executable, source, strictness, debuggerMode, profilerMode, error);
</del><ins>+    return getGlobalCodeBlock&lt;UnlinkedEvalCodeBlock&gt;(vm, executable, source, builtinMode, strictMode, debuggerMode, profilerMode, error);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> UnlinkedFunctionExecutable* CodeCache::getFunctionExecutableFromGlobalCode(VM&amp; vm, const Identifier&amp; name, const SourceCode&amp; source, ParserError&amp; error)
</span><span class="cx"> {
</span><del>-    SourceCodeKey key = SourceCodeKey(source, name.string(), SourceCodeKey::FunctionType, JSParseNormal);
</del><ins>+    SourceCodeKey key = SourceCodeKey(
+        source, name.string(), SourceCodeKey::FunctionType, 
+        JSParserBuiltinMode::NotBuiltin, 
+        JSParserStrictMode::NotStrict);
</ins><span class="cx">     SourceCodeValue* cache = m_sourceCode.findCacheAndUpdateAge(key);
</span><span class="cx">     if (cache)
</span><span class="cx">         return jsCast&lt;UnlinkedFunctionExecutable*&gt;(cache-&gt;cell.get());
</span><span class="cx"> 
</span><span class="cx">     JSTextPosition positionBeforeLastNewline;
</span><del>-    std::unique_ptr&lt;ProgramNode&gt; program = parse&lt;ProgramNode&gt;(&amp;vm, source, 0, Identifier(), JSParseNormal, JSParseProgramCode, error, &amp;positionBeforeLastNewline);
</del><ins>+    std::unique_ptr&lt;ProgramNode&gt; program = parse&lt;ProgramNode&gt;(
+        &amp;vm, source, 0, Identifier(), JSParserBuiltinMode::NotBuiltin, 
+        JSParserStrictMode::NotStrict, JSParserCodeType::Program, 
+        error, &amp;positionBeforeLastNewline);
</ins><span class="cx">     if (!program) {
</span><span class="cx">         RELEASE_ASSERT(error.isValid());
</span><span class="cx">         return nullptr;
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeCodeCacheh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/CodeCache.h (181663 => 181664)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/CodeCache.h        2015-03-17 20:47:42 UTC (rev 181663)
+++ trunk/Source/JavaScriptCore/runtime/CodeCache.h        2015-03-17 21:15:03 UTC (rev 181664)
</span><span class="lines">@@ -61,10 +61,13 @@
</span><span class="cx">     {
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    SourceCodeKey(const SourceCode&amp; sourceCode, const String&amp; name, CodeType codeType, JSParserStrictness jsParserStrictness)
</del><ins>+    SourceCodeKey(const SourceCode&amp; sourceCode, const String&amp; name, CodeType codeType, JSParserBuiltinMode builtinMode, JSParserStrictMode strictMode)
</ins><span class="cx">         : m_sourceCode(sourceCode)
</span><span class="cx">         , m_name(name)
</span><del>-        , m_flags((codeType &lt;&lt; 2) | jsParserStrictness)
</del><ins>+        , m_flags(
+            (static_cast&lt;unsigned&gt;(codeType) &lt;&lt; 2) 
+            | (static_cast&lt;unsigned&gt;(builtinMode) &lt;&lt; 1) 
+            | static_cast&lt;unsigned&gt;(strictMode))
</ins><span class="cx">         , m_hash(string().impl()-&gt;hash())
</span><span class="cx">     {
</span><span class="cx">     }
</span><span class="lines">@@ -249,8 +252,8 @@
</span><span class="cx">     CodeCache();
</span><span class="cx">     ~CodeCache();
</span><span class="cx"> 
</span><del>-    UnlinkedProgramCodeBlock* getProgramCodeBlock(VM&amp;, ProgramExecutable*, const SourceCode&amp;, JSParserStrictness, DebuggerMode, ProfilerMode, ParserError&amp;);
-    UnlinkedEvalCodeBlock* getEvalCodeBlock(VM&amp;, EvalExecutable*, const SourceCode&amp;, JSParserStrictness, DebuggerMode, ProfilerMode, ParserError&amp;);
</del><ins>+    UnlinkedProgramCodeBlock* getProgramCodeBlock(VM&amp;, ProgramExecutable*, const SourceCode&amp;, JSParserBuiltinMode, JSParserStrictMode, DebuggerMode, ProfilerMode, ParserError&amp;);
+    UnlinkedEvalCodeBlock* getEvalCodeBlock(VM&amp;, EvalExecutable*, const SourceCode&amp;, JSParserBuiltinMode, JSParserStrictMode, DebuggerMode, ProfilerMode, ParserError&amp;);
</ins><span class="cx">     UnlinkedFunctionExecutable* getFunctionExecutableFromGlobalCode(VM&amp;, const Identifier&amp;, const SourceCode&amp;, ParserError&amp;);
</span><span class="cx"> 
</span><span class="cx">     void clear()
</span><span class="lines">@@ -260,7 +263,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;, JSParserStrictness, DebuggerMode, ProfilerMode, ParserError&amp;);
</del><ins>+    UnlinkedCodeBlockType* getGlobalCodeBlock(VM&amp;, ExecutableType*, const SourceCode&amp;, JSParserBuiltinMode, JSParserStrictMode, DebuggerMode, ProfilerMode, ParserError&amp;);
</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 (181663 => 181664)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/Completion.cpp        2015-03-17 20:47:42 UTC (rev 181663)
+++ trunk/Source/JavaScriptCore/runtime/Completion.cpp        2015-03-17 21:15:03 UTC (rev 181664)
</span><span class="lines">@@ -55,7 +55,9 @@
</span><span class="cx"> {
</span><span class="cx">     JSLockHolder lock(vm);
</span><span class="cx">     RELEASE_ASSERT(vm.atomicStringTable() == wtfThreadData().atomicStringTable());
</span><del>-    return !!parse&lt;ProgramNode&gt;(&amp;vm, source, 0, Identifier(), JSParseNormal, JSParseProgramCode, error);
</del><ins>+    return !!parse&lt;ProgramNode&gt;(
+        &amp;vm, source, 0, Identifier(), JSParserBuiltinMode::NotBuiltin, 
+        JSParserStrictMode::NotStrict, JSParserCodeType::Program, error);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> JSValue evaluate(ExecState* exec, const SourceCode&amp; source, JSValue thisValue, JSValue* returnedException)
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeExecutablecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/Executable.cpp (181663 => 181664)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/Executable.cpp        2015-03-17 20:47:42 UTC (rev 181663)
+++ trunk/Source/JavaScriptCore/runtime/Executable.cpp        2015-03-17 21:15:03 UTC (rev 181664)
</span><span class="lines">@@ -394,7 +394,10 @@
</span><span class="cx"> 
</span><span class="cx"> const ClassInfo FunctionExecutable::s_info = { &quot;FunctionExecutable&quot;, &amp;ScriptExecutable::s_info, 0, CREATE_METHOD_TABLE(FunctionExecutable) };
</span><span class="cx"> 
</span><del>-FunctionExecutable::FunctionExecutable(VM&amp; vm, const SourceCode&amp; source, UnlinkedFunctionExecutable* unlinkedExecutable, unsigned firstLine, unsigned lastLine, unsigned startColumn, unsigned endColumn, bool bodyIncludesBraces)
</del><ins>+FunctionExecutable::FunctionExecutable(VM&amp; vm, const SourceCode&amp; source, 
+    UnlinkedFunctionExecutable* unlinkedExecutable, unsigned firstLine, 
+    unsigned lastLine, unsigned startColumn, unsigned endColumn, 
+    bool bodyIncludesBraces)
</ins><span class="cx">     : ScriptExecutable(vm.functionExecutableStructure.get(), vm, source, unlinkedExecutable-&gt;isInStrictContext())
</span><span class="cx">     , m_unlinkedExecutable(vm, this, unlinkedExecutable)
</span><span class="cx">     , m_bodyIncludesBraces(bodyIncludesBraces)
</span><span class="lines">@@ -465,7 +468,9 @@
</span><span class="cx">     ParserError error;
</span><span class="cx">     VM* vm = &amp;exec-&gt;vm();
</span><span class="cx">     JSGlobalObject* lexicalGlobalObject = exec-&gt;lexicalGlobalObject();
</span><del>-    std::unique_ptr&lt;ProgramNode&gt; programNode = parse&lt;ProgramNode&gt;(vm, m_source, 0, Identifier(), JSParseNormal, JSParseProgramCode, error);
</del><ins>+    std::unique_ptr&lt;ProgramNode&gt; programNode = parse&lt;ProgramNode&gt;(
+        vm, m_source, 0, Identifier(), JSParserBuiltinMode::NotBuiltin, 
+        JSParserStrictMode::NotStrict, JSParserCodeType::Program, 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 (181663 => 181664)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/Executable.h        2015-03-17 20:47:42 UTC (rev 181663)
+++ trunk/Source/JavaScriptCore/runtime/Executable.h        2015-03-17 21:15:03 UTC (rev 181664)
</span><span class="lines">@@ -541,7 +541,10 @@
</span><span class="cx"> public:
</span><span class="cx">     typedef ScriptExecutable Base;
</span><span class="cx"> 
</span><del>-    static FunctionExecutable* create(VM&amp; vm, const SourceCode&amp; source, UnlinkedFunctionExecutable* unlinkedExecutable, unsigned firstLine, unsigned lastLine, unsigned startColumn, unsigned endColumn, bool bodyIncludesBraces = true)
</del><ins>+    static FunctionExecutable* create(
+        VM&amp; vm, const SourceCode&amp; source, UnlinkedFunctionExecutable* unlinkedExecutable, 
+        unsigned firstLine, unsigned lastLine, unsigned startColumn, unsigned endColumn, 
+        bool bodyIncludesBraces = true)
</ins><span class="cx">     {
</span><span class="cx">         FunctionExecutable* executable = new (NotNull, allocateCell&lt;FunctionExecutable&gt;(vm.heap)) FunctionExecutable(vm, source, unlinkedExecutable, firstLine, lastLine, startColumn, endColumn, bodyIncludesBraces);
</span><span class="cx">         executable-&gt;finishCreation(vm);
</span><span class="lines">@@ -643,7 +646,10 @@
</span><span class="cx">     bool bodyIncludesBraces() const { return m_bodyIncludesBraces; }
</span><span class="cx"> 
</span><span class="cx"> private:
</span><del>-    FunctionExecutable(VM&amp;, const SourceCode&amp;, UnlinkedFunctionExecutable*, unsigned firstLine, unsigned lastLine, unsigned startColumn, unsigned endColumn, bool bodyIncludesBraces);
</del><ins>+    FunctionExecutable(
+        VM&amp;, const SourceCode&amp;, UnlinkedFunctionExecutable*, unsigned firstLine, 
+        unsigned lastLine, unsigned startColumn, unsigned endColumn, 
+        bool bodyIncludesBraces);
</ins><span class="cx"> 
</span><span class="cx">     bool isCompiling()
</span><span class="cx">     {
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeJSGlobalObjectcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/JSGlobalObject.cpp (181663 => 181664)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/JSGlobalObject.cpp        2015-03-17 20:47:42 UTC (rev 181663)
+++ trunk/Source/JavaScriptCore/runtime/JSGlobalObject.cpp        2015-03-17 21:15:03 UTC (rev 181664)
</span><span class="lines">@@ -783,10 +783,12 @@
</span><span class="cx"> UnlinkedProgramCodeBlock* JSGlobalObject::createProgramCodeBlock(CallFrame* callFrame, ProgramExecutable* executable, JSObject** exception)
</span><span class="cx"> {
</span><span class="cx">     ParserError error;
</span><del>-    JSParserStrictness strictness = executable-&gt;isStrictMode() ? JSParseStrict : JSParseNormal;
</del><ins>+    JSParserStrictMode strictMode = executable-&gt;isStrictMode() ? JSParserStrictMode::Strict : JSParserStrictMode::NotStrict;
</ins><span class="cx">     DebuggerMode debuggerMode = hasDebugger() ? DebuggerOn : DebuggerOff;
</span><span class="cx">     ProfilerMode profilerMode = hasProfiler() ? ProfilerOn : ProfilerOff;
</span><del>-    UnlinkedProgramCodeBlock* unlinkedCodeBlock = vm().codeCache()-&gt;getProgramCodeBlock(vm(), executable, executable-&gt;source(), strictness, debuggerMode, profilerMode, error);
</del><ins>+    UnlinkedProgramCodeBlock* unlinkedCodeBlock = vm().codeCache()-&gt;getProgramCodeBlock(
+        vm(), executable, executable-&gt;source(), JSParserBuiltinMode::NotBuiltin, strictMode, 
+        debuggerMode, profilerMode, error);
</ins><span class="cx"> 
</span><span class="cx">     if (hasDebugger())
</span><span class="cx">         debugger()-&gt;sourceParsed(callFrame, executable-&gt;source().provider(), error.line(), error.message());
</span><span class="lines">@@ -802,10 +804,12 @@
</span><span class="cx"> UnlinkedEvalCodeBlock* JSGlobalObject::createEvalCodeBlock(CallFrame* callFrame, EvalExecutable* executable)
</span><span class="cx"> {
</span><span class="cx">     ParserError error;
</span><del>-    JSParserStrictness strictness = executable-&gt;isStrictMode() ? JSParseStrict : JSParseNormal;
</del><ins>+    JSParserStrictMode strictMode = executable-&gt;isStrictMode() ? JSParserStrictMode::Strict : JSParserStrictMode::NotStrict;
</ins><span class="cx">     DebuggerMode debuggerMode = hasDebugger() ? DebuggerOn : DebuggerOff;
</span><span class="cx">     ProfilerMode profilerMode = hasProfiler() ? ProfilerOn : ProfilerOff;
</span><del>-    UnlinkedEvalCodeBlock* unlinkedCodeBlock = vm().codeCache()-&gt;getEvalCodeBlock(vm(), executable, executable-&gt;source(), strictness, debuggerMode, profilerMode, error);
</del><ins>+    UnlinkedEvalCodeBlock* unlinkedCodeBlock = vm().codeCache()-&gt;getEvalCodeBlock(
+        vm(), executable, executable-&gt;source(), JSParserBuiltinMode::NotBuiltin, strictMode, 
+        debuggerMode, profilerMode, error);
</ins><span class="cx"> 
</span><span class="cx">     if (hasDebugger())
</span><span class="cx">         debugger()-&gt;sourceParsed(callFrame, executable-&gt;source().provider(), error.line(), error.message());
</span></span></pre>
</div>
</div>

</body>
</html>