<!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>[181673] 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/181673">181673</a></dd>
<dt>Author</dt> <dd>ggaren@apple.com</dd>
<dt>Date</dt> <dd>2015-03-17 17:07:24 -0700 (Tue, 17 Mar 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>Function bodies should always include braces
https://bugs.webkit.org/show_bug.cgi?id=142795

Reviewed by Michael Saboff.

Source/JavaScriptCore:

Having a mode for excluding the opening and closing braces from a function
body was unnecessary and confusing.

* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::CodeBlock): Adopt the new one true linking function.

* bytecode/UnlinkedCodeBlock.cpp:
(JSC::generateFunctionCodeBlock):
(JSC::UnlinkedFunctionExecutable::link):
(JSC::UnlinkedFunctionExecutable::codeBlockFor): No need to pass through
a boolean: there is only one kind of function now.

(JSC::UnlinkedFunctionExecutable::linkInsideExecutable): Deleted.
(JSC::UnlinkedFunctionExecutable::linkGlobalCode): Deleted. Let's only
have one way to do things. This removes the old mode that would pretend
that a function always started at column 1. That pretense was not true:
an attribute event listener does not necessarily start at column 1.

* bytecode/UnlinkedCodeBlock.h:
* generate-js-builtins: Adopt the new one true linking function.

* parser/Parser.h:
(JSC::Parser&lt;LexerType&gt;::parse):
(JSC::parse): needsReparsingAdjustment is always true now, so I removed it.

* runtime/Executable.cpp:
(JSC::ScriptExecutable::newCodeBlockFor):
(JSC::FunctionExecutable::FunctionExecutable):
(JSC::ProgramExecutable::initializeGlobalProperties):
(JSC::FunctionExecutable::fromGlobalCode):
* runtime/Executable.h:
(JSC::FunctionExecutable::create):
(JSC::FunctionExecutable::bodyIncludesBraces): Deleted. Removed unused stuff.

* runtime/FunctionConstructor.cpp:
(JSC::constructFunctionSkippingEvalEnabledCheck): Always provide a
leading space because that's what this function's comment says is required
for web compatibility. We used to fake this up after the fact when
stringifying, based on the bodyIncludesBraces flag, but that flag is gone now.

* runtime/FunctionPrototype.cpp:
(JSC::insertSemicolonIfNeeded):
(JSC::functionProtoFuncToString): No need to add braces and/or a space
after the fact -- we always have them now.

LayoutTests:

Updated these test results to reflect the fact that JavaScriptCore now
honors the source code text positions provided by WebCore, even for 
attribute event handlers.

Unfortunately, the column numbers we used to report were wrong, and they
are still wrong now. The old column numbers were wrong because we would
always pretend that they started on column 1. The new column numbers
are wrong because WebCore records the column number after it finishes
parsing the element, rather than while it is parsing the event listener
attribute.

* fast/events/window-onerror2-expected.txt:
* fast/profiler/dead-time-expected.txt:
* fast/profiler/inline-event-handler-expected.txt:
* fast/profiler/stop-profiling-after-setTimeout-expected.txt:
* js/dom/script-start-end-locations-expected.txt:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsfasteventswindowonerror2expectedtxt">trunk/LayoutTests/fast/events/window-onerror2-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastprofilerdeadtimeexpectedtxt">trunk/LayoutTests/fast/profiler/dead-time-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastprofilerinlineeventhandlerexpectedtxt">trunk/LayoutTests/fast/profiler/inline-event-handler-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastprofilerstopprofilingaftersetTimeoutexpectedtxt">trunk/LayoutTests/fast/profiler/stop-profiling-after-setTimeout-expected.txt</a></li>
<li><a href="#trunkLayoutTestsjsdomscriptstartendlocationsexpectedtxt">trunk/LayoutTests/js/dom/script-start-end-locations-expected.txt</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="#trunkSourceJavaScriptCorebytecodeCodeBlockcpp">trunk/Source/JavaScriptCore/bytecode/CodeBlock.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="#trunkSourceJavaScriptCoregeneratejsbuiltins">trunk/Source/JavaScriptCore/generate-js-builtins</a></li>
<li><a href="#trunkSourceJavaScriptCoreparserParserh">trunk/Source/JavaScriptCore/parser/Parser.h</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="#trunkSourceJavaScriptCoreruntimeFunctionConstructorcpp">trunk/Source/JavaScriptCore/runtime/FunctionConstructor.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeFunctionPrototypecpp">trunk/Source/JavaScriptCore/runtime/FunctionPrototype.cpp</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (181672 => 181673)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2015-03-18 00:03:07 UTC (rev 181672)
+++ trunk/LayoutTests/ChangeLog        2015-03-18 00:07:24 UTC (rev 181673)
</span><span class="lines">@@ -1,3 +1,27 @@
</span><ins>+2015-03-17  Geoffrey Garen  &lt;ggaren@apple.com&gt;
+
+        Function bodies should always include braces
+        https://bugs.webkit.org/show_bug.cgi?id=142795
+
+        Reviewed by Michael Saboff.
+
+        Updated these test results to reflect the fact that JavaScriptCore now
+        honors the source code text positions provided by WebCore, even for 
+        attribute event handlers.
+
+        Unfortunately, the column numbers we used to report were wrong, and they
+        are still wrong now. The old column numbers were wrong because we would
+        always pretend that they started on column 1. The new column numbers
+        are wrong because WebCore records the column number after it finishes
+        parsing the element, rather than while it is parsing the event listener
+        attribute.
+
+        * fast/events/window-onerror2-expected.txt:
+        * fast/profiler/dead-time-expected.txt:
+        * fast/profiler/inline-event-handler-expected.txt:
+        * fast/profiler/stop-profiling-after-setTimeout-expected.txt:
+        * js/dom/script-start-end-locations-expected.txt:
+
</ins><span class="cx"> 2015-03-17  Zalan Bujtas  &lt;zalan@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Simple line layout: Split fragments on renderer boundary on the fly.
</span></span></pre></div>
<a id="trunkLayoutTestsfasteventswindowonerror2expectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/events/window-onerror2-expected.txt (181672 => 181673)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/events/window-onerror2-expected.txt        2015-03-18 00:03:07 UTC (rev 181672)
+++ trunk/LayoutTests/fast/events/window-onerror2-expected.txt        2015-03-18 00:07:24 UTC (rev 181673)
</span><span class="lines">@@ -1,6 +1,6 @@
</span><span class="cx"> Test that uncaught exceptions will be reported to the window.onerror handler. Bug 8519.
</span><span class="cx"> 
</span><span class="cx"> Main frame window.onerror: Error: Inline script exception at window-onerror2.html, line: 34, column: 47
</span><del>-Main frame window.onerror: Exception in onload at window-onerror2.html, line: 2, column: 66
</del><ins>+Main frame window.onerror: Exception in onload at window-onerror2.html, line: 2, column: 167
</ins><span class="cx"> Main frame window.onerror: Error: Exception in setTimeout at window-onerror2.html, line: 29, column: 47
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsfastprofilerdeadtimeexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/profiler/dead-time-expected.txt (181672 => 181673)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/profiler/dead-time-expected.txt        2015-03-18 00:03:07 UTC (rev 181672)
+++ trunk/LayoutTests/fast/profiler/dead-time-expected.txt        2015-03-18 00:07:24 UTC (rev 181673)
</span><span class="lines">@@ -4,7 +4,7 @@
</span><span class="cx"> 
</span><span class="cx"> Profile title: Dead time in profile.
</span><span class="cx"> Thread_1 (no file) (line 0:0)
</span><del>-   onload dead-time.html (line 21:1)
</del><ins>+   onload dead-time.html (line 21:45)
</ins><span class="cx">       startTest dead-time.html (line 13:1)
</span><span class="cx">          setTimeout (no file) (line 0:0)
</span><span class="cx">    (program) dead-time.html (line 1:1)
</span></span></pre></div>
<a id="trunkLayoutTestsfastprofilerinlineeventhandlerexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/profiler/inline-event-handler-expected.txt (181672 => 181673)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/profiler/inline-event-handler-expected.txt        2015-03-18 00:03:07 UTC (rev 181672)
+++ trunk/LayoutTests/fast/profiler/inline-event-handler-expected.txt        2015-03-18 00:07:24 UTC (rev 181673)
</span><span class="lines">@@ -7,7 +7,7 @@
</span><span class="cx">    startTest inline-event-handler.html (line 11:1)
</span><span class="cx">       getElementById (no file) (line 0:0)
</span><span class="cx">       click (no file) (line 0:0)
</span><del>-         onclick inline-event-handler.html (line 31:1)
</del><ins>+         onclick inline-event-handler.html (line 31:127)
</ins><span class="cx">             eventListener inline-event-handler.html (line 17:26)
</span><span class="cx">                anonymousFunction profiler-test-JS-resources.js (line 29:37)
</span><span class="cx">                   insertNewText profiler-test-JS-resources.js (line 17:26)
</span></span></pre></div>
<a id="trunkLayoutTestsfastprofilerstopprofilingaftersetTimeoutexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/profiler/stop-profiling-after-setTimeout-expected.txt (181672 => 181673)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/profiler/stop-profiling-after-setTimeout-expected.txt        2015-03-18 00:03:07 UTC (rev 181672)
+++ trunk/LayoutTests/fast/profiler/stop-profiling-after-setTimeout-expected.txt        2015-03-18 00:07:24 UTC (rev 181673)
</span><span class="lines">@@ -4,7 +4,7 @@
</span><span class="cx"> 
</span><span class="cx"> Profile title: Stop profiling from a timeout
</span><span class="cx"> Thread_1 (no file) (line 0:0)
</span><del>-   onload stop-profiling-after-setTimeout.html (line 21:1)
</del><ins>+   onload stop-profiling-after-setTimeout.html (line 21:45)
</ins><span class="cx">       startTest stop-profiling-after-setTimeout.html (line 13:1)
</span><span class="cx">          setTimeout (no file) (line 0:0)
</span><span class="cx">    (program) stop-profiling-after-setTimeout.html (line 1:1)
</span></span></pre></div>
<a id="trunkLayoutTestsjsdomscriptstartendlocationsexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/js/dom/script-start-end-locations-expected.txt (181672 => 181673)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/dom/script-start-end-locations-expected.txt        2015-03-18 00:03:07 UTC (rev 181672)
+++ trunk/LayoutTests/js/dom/script-start-end-locations-expected.txt        2015-03-18 00:07:24 UTC (rev 181673)
</span><span class="lines">@@ -243,32 +243,32 @@
</span><span class="cx"> eval { 1:1 - 1:56 }
</span><span class="cx"> 
</span><span class="cx">   new Function Object:
</span><del>-function &quot;&quot; { 1:1 - 1:228 }
-function &quot;nf1a&quot; { 1:60 - 1:219 }
-function &quot;nf1b&quot; { 1:90 - 1:209 }
-function &quot;nf1c&quot; { 1:120 - 1:199 }
</del><ins>+function &quot;&quot; { 1:16 - 1:245 }
+function &quot;nf1a&quot; { 1:77 - 1:236 }
+function &quot;nf1b&quot; { 1:107 - 1:226 }
+function &quot;nf1c&quot; { 1:137 - 1:216 }
</ins><span class="cx"> eval { 1:1 - 1:56 }
</span><del>-function &quot;&quot; { 1:1 - 17:8 }
</del><ins>+function &quot;&quot; { 1:16 - 17:8 }
</ins><span class="cx"> function &quot;nf2a&quot; { 4:21 - 15:5 }
</span><span class="cx"> function &quot;nf2b&quot; { 6:25 - 13:9 }
</span><span class="cx"> function &quot;nf2c&quot; { 8:29 - 11:13 }
</span><span class="cx"> eval { 1:1 - 1:56 }
</span><del>-function &quot;&quot; { 1:1 - 1:228 }
-function &quot;nf1a&quot; { 1:60 - 1:219 }
-function &quot;nf1b&quot; { 1:90 - 1:209 }
-function &quot;nf1c&quot; { 1:120 - 1:199 }
</del><ins>+function &quot;&quot; { 1:16 - 1:245 }
+function &quot;nf1a&quot; { 1:77 - 1:236 }
+function &quot;nf1b&quot; { 1:107 - 1:226 }
+function &quot;nf1c&quot; { 1:137 - 1:216 }
</ins><span class="cx"> eval { 1:1 - 1:56 }
</span><del>-function &quot;&quot; { 1:1 - 1:237 }
-function &quot;nfi1a&quot; { 1:61 - 1:227 }
-function &quot;nfi1b&quot; { 1:93 - 1:216 }
-function &quot;nfi1c&quot; { 1:125 - 1:205 }
</del><ins>+function &quot;&quot; { 1:16 - 1:254 }
+function &quot;nfi1a&quot; { 1:78 - 1:244 }
+function &quot;nfi1b&quot; { 1:110 - 1:233 }
+function &quot;nfi1c&quot; { 1:142 - 1:222 }
</ins><span class="cx"> eval { 1:1 - 1:56 }
</span><del>-function &quot;&quot; { 1:1 - 17:8 }
</del><ins>+function &quot;&quot; { 1:16 - 17:8 }
</ins><span class="cx"> function &quot;nf2a&quot; { 4:21 - 15:5 }
</span><span class="cx"> function &quot;nf2b&quot; { 6:25 - 13:9 }
</span><span class="cx"> function &quot;nf2c&quot; { 8:29 - 11:13 }
</span><span class="cx"> eval { 1:1 - 1:56 }
</span><del>-function &quot;&quot; { 1:1 - 17:9 }
</del><ins>+function &quot;&quot; { 1:16 - 17:9 }
</ins><span class="cx"> function &quot;nfi2a&quot; { 4:22 - 15:5 }
</span><span class="cx"> function &quot;nfi2b&quot; { 6:26 - 13:9 }
</span><span class="cx"> function &quot;nfi2c&quot; { 8:30 - 11:13 }
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/ChangeLog (181672 => 181673)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/ChangeLog        2015-03-18 00:03:07 UTC (rev 181672)
+++ trunk/Source/JavaScriptCore/ChangeLog        2015-03-18 00:07:24 UTC (rev 181673)
</span><span class="lines">@@ -1,3 +1,55 @@
</span><ins>+2015-03-17  Geoffrey Garen  &lt;ggaren@apple.com&gt;
+
+        Function bodies should always include braces
+        https://bugs.webkit.org/show_bug.cgi?id=142795
+
+        Reviewed by Michael Saboff.
+
+        Having a mode for excluding the opening and closing braces from a function
+        body was unnecessary and confusing.
+
+        * bytecode/CodeBlock.cpp:
+        (JSC::CodeBlock::CodeBlock): Adopt the new one true linking function.
+
+        * bytecode/UnlinkedCodeBlock.cpp:
+        (JSC::generateFunctionCodeBlock):
+        (JSC::UnlinkedFunctionExecutable::link):
+        (JSC::UnlinkedFunctionExecutable::codeBlockFor): No need to pass through
+        a boolean: there is only one kind of function now.
+
+        (JSC::UnlinkedFunctionExecutable::linkInsideExecutable): Deleted.
+        (JSC::UnlinkedFunctionExecutable::linkGlobalCode): Deleted. Let's only
+        have one way to do things. This removes the old mode that would pretend
+        that a function always started at column 1. That pretense was not true:
+        an attribute event listener does not necessarily start at column 1.
+
+        * bytecode/UnlinkedCodeBlock.h:
+        * generate-js-builtins: Adopt the new one true linking function.
+
+        * parser/Parser.h:
+        (JSC::Parser&lt;LexerType&gt;::parse):
+        (JSC::parse): needsReparsingAdjustment is always true now, so I removed it.
+
+        * runtime/Executable.cpp:
+        (JSC::ScriptExecutable::newCodeBlockFor):
+        (JSC::FunctionExecutable::FunctionExecutable):
+        (JSC::ProgramExecutable::initializeGlobalProperties):
+        (JSC::FunctionExecutable::fromGlobalCode):
+        * runtime/Executable.h:
+        (JSC::FunctionExecutable::create):
+        (JSC::FunctionExecutable::bodyIncludesBraces): Deleted. Removed unused stuff.
+
+        * runtime/FunctionConstructor.cpp:
+        (JSC::constructFunctionSkippingEvalEnabledCheck): Always provide a
+        leading space because that's what this function's comment says is required
+        for web compatibility. We used to fake this up after the fact when
+        stringifying, based on the bodyIncludesBraces flag, but that flag is gone now.
+
+        * runtime/FunctionPrototype.cpp:
+        (JSC::insertSemicolonIfNeeded):
+        (JSC::functionProtoFuncToString): No need to add braces and/or a space
+        after the fact -- we always have them now.
+
</ins><span class="cx"> 2015-03-17  Mark Lam  &lt;mark.lam@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Refactor execution time limit tests out of testapi.c.
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorebuiltinsBuiltinExecutablescpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/builtins/BuiltinExecutables.cpp (181672 => 181673)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/builtins/BuiltinExecutables.cpp        2015-03-18 00:03:07 UTC (rev 181672)
+++ trunk/Source/JavaScriptCore/builtins/BuiltinExecutables.cpp        2015-03-18 00:07:24 UTC (rev 181673)
</span><span class="lines">@@ -72,7 +72,7 @@
</span><span class="cx">         &amp;m_vm, source, 0, Identifier(), builtinMode, 
</span><span class="cx">         JSParserStrictMode::NotStrict, 
</span><span class="cx">         JSParserCodeType::Program,
</span><del>-        error, &amp;positionBeforeLastNewline, false, constructorKind);
</del><ins>+        error, &amp;positionBeforeLastNewline, constructorKind);
</ins><span class="cx"> 
</span><span class="cx">     if (!program) {
</span><span class="cx">         dataLog(&quot;Fatal error compiling builtin function '&quot;, name.string(), &quot;': &quot;, error.message());
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorebytecodeCodeBlockcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/bytecode/CodeBlock.cpp (181672 => 181673)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/bytecode/CodeBlock.cpp        2015-03-18 00:03:07 UTC (rev 181672)
+++ trunk/Source/JavaScriptCore/bytecode/CodeBlock.cpp        2015-03-18 00:07:24 UTC (rev 181673)
</span><span class="lines">@@ -1753,7 +1753,7 @@
</span><span class="cx">         UnlinkedFunctionExecutable* unlinkedExecutable = unlinkedCodeBlock-&gt;functionDecl(i);
</span><span class="cx">         if (vm()-&gt;typeProfiler() || vm()-&gt;controlFlowProfiler())
</span><span class="cx">             vm()-&gt;functionHasExecutedCache()-&gt;insertUnexecutedRange(m_ownerExecutable-&gt;sourceID(), unlinkedExecutable-&gt;typeProfilingStartOffset(), unlinkedExecutable-&gt;typeProfilingEndOffset());
</span><del>-        m_functionDecls[i].set(*m_vm, ownerExecutable, unlinkedExecutable-&gt;linkInsideExecutable(*m_vm, ownerExecutable-&gt;source()));
</del><ins>+        m_functionDecls[i].set(*m_vm, ownerExecutable, unlinkedExecutable-&gt;link(*m_vm, ownerExecutable-&gt;source()));
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     m_functionExprs.resizeToFit(unlinkedCodeBlock-&gt;numberOfFunctionExprs());
</span><span class="lines">@@ -1761,7 +1761,7 @@
</span><span class="cx">         UnlinkedFunctionExecutable* unlinkedExecutable = unlinkedCodeBlock-&gt;functionExpr(i);
</span><span class="cx">         if (vm()-&gt;typeProfiler() || vm()-&gt;controlFlowProfiler())
</span><span class="cx">             vm()-&gt;functionHasExecutedCache()-&gt;insertUnexecutedRange(m_ownerExecutable-&gt;sourceID(), unlinkedExecutable-&gt;typeProfilingStartOffset(), unlinkedExecutable-&gt;typeProfilingEndOffset());
</span><del>-        m_functionExprs[i].set(*m_vm, ownerExecutable, unlinkedExecutable-&gt;linkInsideExecutable(*m_vm, ownerExecutable-&gt;source()));
</del><ins>+        m_functionExprs[i].set(*m_vm, ownerExecutable, unlinkedExecutable-&gt;link(*m_vm, ownerExecutable-&gt;source()));
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     if (unlinkedCodeBlock-&gt;hasRareData()) {
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorebytecodeUnlinkedCodeBlockcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/bytecode/UnlinkedCodeBlock.cpp (181672 => 181673)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/bytecode/UnlinkedCodeBlock.cpp        2015-03-18 00:03:07 UTC (rev 181672)
+++ trunk/Source/JavaScriptCore/bytecode/UnlinkedCodeBlock.cpp        2015-03-18 00:07:24 UTC (rev 181673)
</span><span class="lines">@@ -52,13 +52,13 @@
</span><span class="cx"> static UnlinkedFunctionCodeBlock* generateFunctionCodeBlock(
</span><span class="cx">     VM&amp; vm, UnlinkedFunctionExecutable* executable, const SourceCode&amp; source,
</span><span class="cx">     CodeSpecializationKind kind, DebuggerMode debuggerMode, ProfilerMode profilerMode,
</span><del>-    UnlinkedFunctionKind functionKind, bool bodyIncludesBraces, ParserError&amp; error)
</del><ins>+    UnlinkedFunctionKind functionKind, ParserError&amp; error)
</ins><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><span class="cx">     std::unique_ptr&lt;FunctionNode&gt; function = parse&lt;FunctionNode&gt;(
</span><span class="cx">         &amp;vm, source, executable-&gt;parameters(), executable-&gt;name(), builtinMode,
</span><del>-        strictMode, JSParserCodeType::Function, error, 0, bodyIncludesBraces);
</del><ins>+        strictMode, JSParserCodeType::Function, error, 0);
</ins><span class="cx"> 
</span><span class="cx">     if (!function) {
</span><span class="cx">         ASSERT(error.isValid());
</span><span class="lines">@@ -129,12 +129,13 @@
</span><span class="cx">     visitor.append(&amp;thisObject-&gt;m_symbolTableForConstruct);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-FunctionExecutable* UnlinkedFunctionExecutable::linkInsideExecutable(VM&amp; vm, const SourceCode&amp; ownerSource)
</del><ins>+FunctionExecutable* UnlinkedFunctionExecutable::link(VM&amp; vm, const SourceCode&amp; ownerSource)
</ins><span class="cx"> {
</span><span class="cx">     SourceCode source = m_sourceOverride ? SourceCode(m_sourceOverride) : ownerSource;
</span><span class="cx">     unsigned firstLine = source.firstLine() + m_firstLineOffset;
</span><span class="cx">     unsigned startOffset = source.startOffset() + m_startOffset;
</span><span class="cx"> 
</span><ins>+    // Adjust to one-based indexing.
</ins><span class="cx">     bool startColumnIsOnFirstSourceLine = !m_firstLineOffset;
</span><span class="cx">     unsigned startColumn = m_unlinkedBodyStartColumn + (startColumnIsOnFirstSourceLine ? source.startColumn() : 1);
</span><span class="cx">     bool endColumnIsOnStartLine = !m_lineCount;
</span><span class="lines">@@ -144,27 +145,6 @@
</span><span class="cx">     return FunctionExecutable::create(vm, code, this, firstLine, firstLine + m_lineCount, startColumn, endColumn);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-FunctionExecutable* UnlinkedFunctionExecutable::linkGlobalCode(VM&amp; vm, const SourceCode&amp; source)
-{
-    ASSERT(!m_sourceOverride);
-    unsigned firstLine = source.firstLine() + m_firstLineOffset;
-    unsigned startOffset = source.startOffset() + m_startOffset;
-
-    // We don't have any owner executable. The source string is effectively like a global
-    // string (like in the handling of eval). Hence, the startColumn is always 1.
-    unsigned startColumn = 1;
-    bool endColumnIsOnStartLine = !m_lineCount;
-    // The unlinkedBodyEndColumn is 0-based. Hence, we need to add 1 to it. But if the
-    // endColumn is on the startLine, then we need to subtract back the adjustment for
-    // the open brace resulting in an adjustment of 0.
-    unsigned endColumnExcludingBraces = m_unlinkedBodyEndColumn + (endColumnIsOnStartLine ? 0 : 1);
-    unsigned startOffsetExcludingOpenBrace = startOffset + 1;
-    unsigned endOffsetExcludingCloseBrace = startOffset + m_sourceLength - 1;
-    SourceCode code(source.provider(), startOffsetExcludingOpenBrace, endOffsetExcludingCloseBrace, firstLine, startColumn);
-
-    return FunctionExecutable::create(vm, code, this, firstLine, firstLine + m_lineCount, startColumn, endColumnExcludingBraces, false);
-}
-
</del><span class="cx"> UnlinkedFunctionExecutable* UnlinkedFunctionExecutable::fromGlobalCode(const Identifier&amp; name, ExecState&amp; exec, const SourceCode&amp; source, JSObject*&amp; exception)
</span><span class="cx"> {
</span><span class="cx">     ParserError error;
</span><span class="lines">@@ -186,8 +166,7 @@
</span><span class="cx"> 
</span><span class="cx"> UnlinkedFunctionCodeBlock* UnlinkedFunctionExecutable::codeBlockFor(
</span><span class="cx">     VM&amp; vm, const SourceCode&amp; source, CodeSpecializationKind specializationKind, 
</span><del>-    DebuggerMode debuggerMode, ProfilerMode profilerMode, bool bodyIncludesBraces, 
-    ParserError&amp; error)
</del><ins>+    DebuggerMode debuggerMode, ProfilerMode profilerMode, ParserError&amp; error)
</ins><span class="cx"> {
</span><span class="cx">     switch (specializationKind) {
</span><span class="cx">     case CodeForCall:
</span><span class="lines">@@ -203,7 +182,7 @@
</span><span class="cx">     UnlinkedFunctionCodeBlock* result = generateFunctionCodeBlock(
</span><span class="cx">         vm, this, source, specializationKind, debuggerMode, profilerMode, 
</span><span class="cx">         isBuiltinFunction() ? UnlinkedBuiltinFunction : UnlinkedNormalFunction, 
</span><del>-        bodyIncludesBraces, error);
</del><ins>+        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 (181672 => 181673)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/bytecode/UnlinkedCodeBlock.h        2015-03-18 00:03:07 UTC (rev 181672)
+++ trunk/Source/JavaScriptCore/bytecode/UnlinkedCodeBlock.h        2015-03-18 00:07:24 UTC (rev 181673)
</span><span class="lines">@@ -135,12 +135,11 @@
</span><span class="cx"> 
</span><span class="cx">     UnlinkedFunctionCodeBlock* codeBlockFor(
</span><span class="cx">         VM&amp;, const SourceCode&amp;, CodeSpecializationKind, DebuggerMode, ProfilerMode, 
</span><del>-        bool bodyIncludesBraces, ParserError&amp;);
</del><ins>+        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><del>-    FunctionExecutable* linkInsideExecutable(VM&amp;, const SourceCode&amp;);
-    FunctionExecutable* linkGlobalCode(VM&amp;, const SourceCode&amp;);
</del><ins>+    FunctionExecutable* link(VM&amp;, const SourceCode&amp;);
</ins><span class="cx"> 
</span><span class="cx">     void clearCodeForRecompilation()
</span><span class="cx">     {
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoregeneratejsbuiltins"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/generate-js-builtins (181672 => 181673)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/generate-js-builtins        2015-03-18 00:03:07 UTC (rev 181672)
+++ trunk/Source/JavaScriptCore/generate-js-builtins        2015-03-18 00:07:24 UTC (rev 181673)
</span><span class="lines">@@ -267,7 +267,7 @@
</span><span class="cx"> #define JSC_DEFINE_BUILTIN_GENERATOR(codeName, functionName, argumentCount) \\
</span><span class="cx"> FunctionExecutable* codeName##Generator(VM&amp; vm) \\
</span><span class="cx"> { \\
</span><del>-    return vm.builtinExecutables()-&gt;codeName##Executable()-&gt;linkGlobalCode(vm, vm.builtinExecutables()-&gt;codeName##Source()); \\
</del><ins>+    return vm.builtinExecutables()-&gt;codeName##Executable()-&gt;link(vm, vm.builtinExecutables()-&gt;codeName##Source()); \\
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> JSC_FOREACH_BUILTIN(JSC_DEFINE_BUILTIN_GENERATOR)
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreparserParserh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/parser/Parser.h (181672 => 181673)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/parser/Parser.h        2015-03-18 00:03:07 UTC (rev 181672)
+++ trunk/Source/JavaScriptCore/parser/Parser.h        2015-03-18 00:07:24 UTC (rev 181673)
</span><span class="lines">@@ -433,7 +433,7 @@
</span><span class="cx">     ~Parser();
</span><span class="cx"> 
</span><span class="cx">     template &lt;class ParsedNode&gt;
</span><del>-    std::unique_ptr&lt;ParsedNode&gt; parse(ParserError&amp;, bool needReparsingAdjustment);
</del><ins>+    std::unique_ptr&lt;ParsedNode&gt; parse(ParserError&amp;);
</ins><span class="cx"> 
</span><span class="cx">     JSTextPosition positionBeforeLastNewline() const { return m_lexer-&gt;positionBeforeLastNewline(); }
</span><span class="cx">     Vector&lt;RefPtr&lt;StringImpl&gt;&gt;&amp;&amp; closedVariables() { return WTF::move(m_closedVariables); }
</span><span class="lines">@@ -904,12 +904,12 @@
</span><span class="cx"> 
</span><span class="cx"> template &lt;typename LexerType&gt;
</span><span class="cx"> template &lt;class ParsedNode&gt;
</span><del>-std::unique_ptr&lt;ParsedNode&gt; Parser&lt;LexerType&gt;::parse(ParserError&amp; error, bool needReparsingAdjustment)
</del><ins>+std::unique_ptr&lt;ParsedNode&gt; Parser&lt;LexerType&gt;::parse(ParserError&amp; error)
</ins><span class="cx"> {
</span><span class="cx">     int errLine;
</span><span class="cx">     String errMsg;
</span><span class="cx"> 
</span><del>-    if (ParsedNode::scopeIsFunction &amp;&amp; needReparsingAdjustment)
</del><ins>+    if (ParsedNode::scopeIsFunction)
</ins><span class="cx">         m_lexer-&gt;setIsReparsing();
</span><span class="cx"> 
</span><span class="cx">     m_sourceElements = 0;
</span><span class="lines">@@ -987,8 +987,7 @@
</span><span class="cx">     VM* vm, const SourceCode&amp; source, FunctionParameters* parameters,
</span><span class="cx">     const Identifier&amp; name, JSParserBuiltinMode builtinMode,
</span><span class="cx">     JSParserStrictMode strictMode, JSParserCodeType codeType,
</span><del>-    ParserError&amp; error, JSTextPosition* positionBeforeLastNewline = 0, 
-    bool needReparsingAdjustment = false, 
</del><ins>+    ParserError&amp; error, JSTextPosition* positionBeforeLastNewline = 0,
</ins><span class="cx">     ConstructorKind defaultConstructorKind = ConstructorKind::None)
</span><span class="cx"> {
</span><span class="cx">     SamplingRegion samplingRegion(&quot;Parsing&quot;);
</span><span class="lines">@@ -996,7 +995,7 @@
</span><span class="cx">     ASSERT(!source.provider()-&gt;source().isNull());
</span><span class="cx">     if (source.provider()-&gt;source().is8Bit()) {
</span><span class="cx">         Parser&lt;Lexer&lt;LChar&gt;&gt; parser(vm, source, parameters, name, builtinMode, strictMode, codeType, defaultConstructorKind);
</span><del>-        std::unique_ptr&lt;ParsedNode&gt; result = parser.parse&lt;ParsedNode&gt;(error, needReparsingAdjustment);
</del><ins>+        std::unique_ptr&lt;ParsedNode&gt; result = parser.parse&lt;ParsedNode&gt;(error);
</ins><span class="cx">         if (positionBeforeLastNewline)
</span><span class="cx">             *positionBeforeLastNewline = parser.positionBeforeLastNewline();
</span><span class="cx">         if (builtinMode == JSParserBuiltinMode::Builtin) {
</span><span class="lines">@@ -1008,7 +1007,7 @@
</span><span class="cx">         return result;
</span><span class="cx">     }
</span><span class="cx">     Parser&lt;Lexer&lt;UChar&gt;&gt; parser(vm, source, parameters, name, builtinMode, strictMode, codeType);
</span><del>-    std::unique_ptr&lt;ParsedNode&gt; result = parser.parse&lt;ParsedNode&gt;(error, needReparsingAdjustment);
</del><ins>+    std::unique_ptr&lt;ParsedNode&gt; result = parser.parse&lt;ParsedNode&gt;(error);
</ins><span class="cx">     if (positionBeforeLastNewline)
</span><span class="cx">         *positionBeforeLastNewline = parser.positionBeforeLastNewline();
</span><span class="cx">     return result;
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeExecutablecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/Executable.cpp (181672 => 181673)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/Executable.cpp        2015-03-18 00:03:07 UTC (rev 181672)
+++ trunk/Source/JavaScriptCore/runtime/Executable.cpp        2015-03-18 00:07:24 UTC (rev 181673)
</span><span class="lines">@@ -237,7 +237,7 @@
</span><span class="cx">     ProfilerMode profilerMode = globalObject-&gt;hasProfiler() ? ProfilerOn : ProfilerOff;
</span><span class="cx">     UnlinkedFunctionCodeBlock* unlinkedCodeBlock =
</span><span class="cx">         executable-&gt;m_unlinkedExecutable-&gt;codeBlockFor(
</span><del>-            *vm, executable-&gt;m_source, kind, debuggerMode, profilerMode, executable-&gt;bodyIncludesBraces(), error);
</del><ins>+            *vm, executable-&gt;m_source, kind, debuggerMode, profilerMode, error);
</ins><span class="cx">     recordParse(executable-&gt;m_unlinkedExecutable-&gt;features(), executable-&gt;m_unlinkedExecutable-&gt;hasCapturedVariables(), lineNo(), lastLine(), startColumn(), endColumn()); 
</span><span class="cx">     if (!unlinkedCodeBlock) {
</span><span class="cx">         exception = vm-&gt;throwException(
</span><span class="lines">@@ -396,11 +396,9 @@
</span><span class="cx"> 
</span><span class="cx"> FunctionExecutable::FunctionExecutable(VM&amp; vm, const SourceCode&amp; source, 
</span><span class="cx">     UnlinkedFunctionExecutable* unlinkedExecutable, unsigned firstLine, 
</span><del>-    unsigned lastLine, unsigned startColumn, unsigned endColumn, 
-    bool bodyIncludesBraces)
</del><ins>+    unsigned lastLine, unsigned startColumn, unsigned endColumn)
</ins><span class="cx">     : ScriptExecutable(vm.functionExecutableStructure.get(), vm, source, unlinkedExecutable-&gt;isInStrictContext())
</span><span class="cx">     , m_unlinkedExecutable(vm, this, unlinkedExecutable)
</span><del>-    , m_bodyIncludesBraces(bodyIncludesBraces)
</del><span class="cx"> {
</span><span class="cx">     RELEASE_ASSERT(!source.isNull());
</span><span class="cx">     ASSERT(source.length());
</span><span class="lines">@@ -508,7 +506,7 @@
</span><span class="cx"> 
</span><span class="cx">     for (size_t i = 0; i &lt; functionDeclarations.size(); ++i) {
</span><span class="cx">         UnlinkedFunctionExecutable* unlinkedFunctionExecutable = functionDeclarations[i].second.get();
</span><del>-        JSValue value = JSFunction::create(vm, unlinkedFunctionExecutable-&gt;linkInsideExecutable(vm, m_source), scope);
</del><ins>+        JSValue value = JSFunction::create(vm, unlinkedFunctionExecutable-&gt;link(vm, m_source), scope);
</ins><span class="cx">         globalObject-&gt;addFunction(callFrame, functionDeclarations[i].first, value);
</span><span class="cx">         if (vm.typeProfiler() || vm.controlFlowProfiler()) {
</span><span class="cx">             vm.functionHasExecutedCache()-&gt;insertUnexecutedRange(sourceID(), 
</span><span class="lines">@@ -614,7 +612,7 @@
</span><span class="cx">     UnlinkedFunctionExecutable* unlinkedExecutable = UnlinkedFunctionExecutable::fromGlobalCode(name, exec, source, exception);
</span><span class="cx">     if (!unlinkedExecutable)
</span><span class="cx">         return nullptr;
</span><del>-    return unlinkedExecutable-&gt;linkGlobalCode(exec.vm(), source);
</del><ins>+    return unlinkedExecutable-&gt;link(exec.vm(), source);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> String FunctionExecutable::paramString() const
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeExecutableh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/Executable.h (181672 => 181673)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/Executable.h        2015-03-18 00:03:07 UTC (rev 181672)
+++ trunk/Source/JavaScriptCore/runtime/Executable.h        2015-03-18 00:07:24 UTC (rev 181673)
</span><span class="lines">@@ -543,10 +543,9 @@
</span><span class="cx"> 
</span><span class="cx">     static FunctionExecutable* create(
</span><span class="cx">         VM&amp; vm, const SourceCode&amp; source, UnlinkedFunctionExecutable* unlinkedExecutable, 
</span><del>-        unsigned firstLine, unsigned lastLine, unsigned startColumn, unsigned endColumn, 
-        bool bodyIncludesBraces = true)
</del><ins>+        unsigned firstLine, unsigned lastLine, unsigned startColumn, unsigned endColumn)
</ins><span class="cx">     {
</span><del>-        FunctionExecutable* executable = new (NotNull, allocateCell&lt;FunctionExecutable&gt;(vm.heap)) FunctionExecutable(vm, source, unlinkedExecutable, firstLine, lastLine, startColumn, endColumn, bodyIncludesBraces);
</del><ins>+        FunctionExecutable* executable = new (NotNull, allocateCell&lt;FunctionExecutable&gt;(vm.heap)) FunctionExecutable(vm, source, unlinkedExecutable, firstLine, lastLine, startColumn, endColumn);
</ins><span class="cx">         executable-&gt;finishCreation(vm);
</span><span class="cx">         return executable;
</span><span class="cx">     }
</span><span class="lines">@@ -643,13 +642,10 @@
</span><span class="cx"> 
</span><span class="cx">     void clearCode();
</span><span class="cx"> 
</span><del>-    bool bodyIncludesBraces() const { return m_bodyIncludesBraces; }
-
</del><span class="cx"> private:
</span><span class="cx">     FunctionExecutable(
</span><span class="cx">         VM&amp;, const SourceCode&amp;, UnlinkedFunctionExecutable*, unsigned firstLine, 
</span><del>-        unsigned lastLine, unsigned startColumn, unsigned endColumn, 
-        bool bodyIncludesBraces);
</del><ins>+        unsigned lastLine, unsigned startColumn, unsigned endColumn);
</ins><span class="cx"> 
</span><span class="cx">     bool isCompiling()
</span><span class="cx">     {
</span><span class="lines">@@ -667,7 +663,6 @@
</span><span class="cx">     WriteBarrier&lt;UnlinkedFunctionExecutable&gt; m_unlinkedExecutable;
</span><span class="cx">     RefPtr&lt;FunctionCodeBlock&gt; m_codeBlockForCall;
</span><span class="cx">     RefPtr&lt;FunctionCodeBlock&gt; m_codeBlockForConstruct;
</span><del>-    bool m_bodyIncludesBraces;
</del><span class="cx">     RefPtr&lt;TypeSet&gt; m_returnStatementTypeSet;
</span><span class="cx"> };
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeFunctionConstructorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/FunctionConstructor.cpp (181672 => 181673)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/FunctionConstructor.cpp        2015-03-18 00:03:07 UTC (rev 181672)
+++ trunk/Source/JavaScriptCore/runtime/FunctionConstructor.cpp        2015-03-18 00:07:24 UTC (rev 181673)
</span><span class="lines">@@ -93,9 +93,9 @@
</span><span class="cx">     // We also need \n before the closing } to handle // comments at the end of the last line
</span><span class="cx">     String program;
</span><span class="cx">     if (args.isEmpty())
</span><del>-        program = ASCIILiteral(&quot;(function() {\n})&quot;);
</del><ins>+        program = ASCIILiteral(&quot;(function() { \n})&quot;);
</ins><span class="cx">     else if (args.size() == 1)
</span><del>-        program = makeString(&quot;(function() {&quot;, args.at(0).toString(exec)-&gt;value(exec), &quot;\n})&quot;);
</del><ins>+        program = makeString(&quot;(function() { &quot;, args.at(0).toString(exec)-&gt;value(exec), &quot;\n})&quot;);
</ins><span class="cx">     else {
</span><span class="cx">         StringBuilder builder;
</span><span class="cx">         builder.appendLiteral(&quot;(function(&quot;);
</span><span class="lines">@@ -104,7 +104,7 @@
</span><span class="cx">             builder.append(',');
</span><span class="cx">             builder.append(args.at(i).toString(exec)-&gt;value(exec));
</span><span class="cx">         }
</span><del>-        builder.appendLiteral(&quot;) {&quot;);
</del><ins>+        builder.appendLiteral(&quot;) { &quot;);
</ins><span class="cx">         builder.append(args.at(args.size() - 1).toString(exec)-&gt;value(exec));
</span><span class="cx">         builder.appendLiteral(&quot;\n})&quot;);
</span><span class="cx">         program = builder.toString();
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeFunctionPrototypecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/FunctionPrototype.cpp (181672 => 181673)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/FunctionPrototype.cpp        2015-03-18 00:03:07 UTC (rev 181672)
+++ trunk/Source/JavaScriptCore/runtime/FunctionPrototype.cpp        2015-03-18 00:07:24 UTC (rev 181673)
</span><span class="lines">@@ -82,11 +82,8 @@
</span><span class="cx"> // Functions
</span><span class="cx"> 
</span><span class="cx"> // Compatibility hack for the Optimost JavaScript library. (See &lt;rdar://problem/6595040&gt;.)
</span><del>-static inline void insertSemicolonIfNeeded(String&amp; functionBody, bool bodyIncludesBraces)
</del><ins>+static inline void insertSemicolonIfNeeded(String&amp; functionBody)
</ins><span class="cx"> {
</span><del>-    if (!bodyIncludesBraces)
-        functionBody = makeString(&quot;{ &quot;, functionBody, '}');
-
</del><span class="cx">     ASSERT(functionBody[0] == '{');
</span><span class="cx">     ASSERT(functionBody[functionBody.length() - 1] == '}');
</span><span class="cx"> 
</span><span class="lines">@@ -109,7 +106,7 @@
</span><span class="cx">             return JSValue::encode(jsMakeNontrivialString(exec, &quot;function &quot;, function-&gt;name(exec), &quot;() {\n    [native code]\n}&quot;));
</span><span class="cx">         FunctionExecutable* executable = function-&gt;jsExecutable();
</span><span class="cx">         String sourceString = executable-&gt;source().toString();
</span><del>-        insertSemicolonIfNeeded(sourceString, executable-&gt;bodyIncludesBraces());
</del><ins>+        insertSemicolonIfNeeded(sourceString);
</ins><span class="cx">         return JSValue::encode(jsMakeNontrivialString(exec, &quot;function &quot;, function-&gt;name(exec), &quot;(&quot;, executable-&gt;paramString(), &quot;) &quot;, sourceString));
</span><span class="cx">     }
</span><span class="cx"> 
</span></span></pre>
</div>
</div>

</body>
</html>