<!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>[162969] branches/jsCStack/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/162969">162969</a></dd>
<dt>Author</dt> <dd>fpizlo@apple.com</dd>
<dt>Date</dt> <dd>2014-01-28 15:22:56 -0800 (Tue, 28 Jan 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>FTL should support ArrayPush
https://bugs.webkit.org/show_bug.cgi?id=127748

Reviewed by Oliver Hunt.

* ftl/FTLAbstractHeapRepository.h:
(JSC::FTL::AbstractHeapRepository::forArrayType):
* ftl/FTLCapabilities.cpp:
(JSC::FTL::canCompile):
* ftl/FTLIntrinsicRepository.h:
* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::LowerDFGToLLVM::compileNode):
(JSC::FTL::LowerDFGToLLVM::compileArrayPush):
* tests/stress/array-push-contiguous.js: Added.
(foo):
* tests/stress/array-push-double.js: Added.
(foo):</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#branchesjsCStackSourceJavaScriptCoreChangeLog">branches/jsCStack/Source/JavaScriptCore/ChangeLog</a></li>
<li><a href="#branchesjsCStackSourceJavaScriptCoreftlFTLAbstractHeapRepositoryh">branches/jsCStack/Source/JavaScriptCore/ftl/FTLAbstractHeapRepository.h</a></li>
<li><a href="#branchesjsCStackSourceJavaScriptCoreftlFTLCapabilitiescpp">branches/jsCStack/Source/JavaScriptCore/ftl/FTLCapabilities.cpp</a></li>
<li><a href="#branchesjsCStackSourceJavaScriptCoreftlFTLIntrinsicRepositoryh">branches/jsCStack/Source/JavaScriptCore/ftl/FTLIntrinsicRepository.h</a></li>
<li><a href="#branchesjsCStackSourceJavaScriptCoreftlFTLLowerDFGToLLVMcpp">branches/jsCStack/Source/JavaScriptCore/ftl/FTLLowerDFGToLLVM.cpp</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#branchesjsCStackSourceJavaScriptCoretestsstressarraypushcontiguousjs">branches/jsCStack/Source/JavaScriptCore/tests/stress/array-push-contiguous.js</a></li>
<li><a href="#branchesjsCStackSourceJavaScriptCoretestsstressarraypushdoublethennanjs">branches/jsCStack/Source/JavaScriptCore/tests/stress/array-push-double-then-nan.js</a></li>
<li><a href="#branchesjsCStackSourceJavaScriptCoretestsstressarraypushdoublejs">branches/jsCStack/Source/JavaScriptCore/tests/stress/array-push-double.js</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="branchesjsCStackSourceJavaScriptCoreChangeLog"></a>
<div class="modfile"><h4>Modified: branches/jsCStack/Source/JavaScriptCore/ChangeLog (162968 => 162969)</h4>
<pre class="diff"><span>
<span class="info">--- branches/jsCStack/Source/JavaScriptCore/ChangeLog        2014-01-28 23:12:19 UTC (rev 162968)
+++ branches/jsCStack/Source/JavaScriptCore/ChangeLog        2014-01-28 23:22:56 UTC (rev 162969)
</span><span class="lines">@@ -1,3 +1,23 @@
</span><ins>+2014-01-27  Filip Pizlo  &lt;fpizlo@apple.com&gt;
+
+        FTL should support ArrayPush
+        https://bugs.webkit.org/show_bug.cgi?id=127748
+
+        Reviewed by Oliver Hunt.
+
+        * ftl/FTLAbstractHeapRepository.h:
+        (JSC::FTL::AbstractHeapRepository::forArrayType):
+        * ftl/FTLCapabilities.cpp:
+        (JSC::FTL::canCompile):
+        * ftl/FTLIntrinsicRepository.h:
+        * ftl/FTLLowerDFGToLLVM.cpp:
+        (JSC::FTL::LowerDFGToLLVM::compileNode):
+        (JSC::FTL::LowerDFGToLLVM::compileArrayPush):
+        * tests/stress/array-push-contiguous.js: Added.
+        (foo):
+        * tests/stress/array-push-double.js: Added.
+        (foo):
+
</ins><span class="cx"> 2014-01-28  Filip Pizlo  &lt;fpizlo@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Arity fixup clobbers callee-saves, causing FTL-&gt;FTL arity fixed-up calls to corrupt state
</span></span></pre></div>
<a id="branchesjsCStackSourceJavaScriptCoreftlFTLAbstractHeapRepositoryh"></a>
<div class="modfile"><h4>Modified: branches/jsCStack/Source/JavaScriptCore/ftl/FTLAbstractHeapRepository.h (162968 => 162969)</h4>
<pre class="diff"><span>
<span class="info">--- branches/jsCStack/Source/JavaScriptCore/ftl/FTLAbstractHeapRepository.h        2014-01-28 23:12:19 UTC (rev 162968)
+++ branches/jsCStack/Source/JavaScriptCore/ftl/FTLAbstractHeapRepository.h        2014-01-28 23:22:56 UTC (rev 162969)
</span><span class="lines">@@ -30,6 +30,7 @@
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(FTL_JIT)
</span><span class="cx"> 
</span><ins>+#include &quot;DFGArrayMode.h&quot;
</ins><span class="cx"> #include &quot;FTLAbstractHeap.h&quot;
</span><span class="cx"> #include &quot;IndexingType.h&quot;
</span><span class="cx"> 
</span><span class="lines">@@ -136,6 +137,24 @@
</span><span class="cx">             return 0;
</span><span class="cx">         }
</span><span class="cx">     }
</span><ins>+    
+    IndexedAbstractHeap&amp; forArrayType(DFG::Array::Type type)
+    {
+        switch (type) {
+        case DFG::Array::Int32:
+            return indexedInt32Properties;
+        case DFG::Array::Double:
+            return indexedDoubleProperties;
+        case DFG::Array::Contiguous:
+            return indexedContiguousProperties;
+        case DFG::Array::ArrayStorage:
+        case DFG::Array::SlowPutArrayStorage:
+            return indexedArrayStorageProperties;
+        default:
+            RELEASE_ASSERT_NOT_REACHED();
+            return indexedInt32Properties;
+        }
+    }
</ins><span class="cx"> 
</span><span class="cx"> private:
</span><span class="cx">     friend class AbstractHeap;
</span></span></pre></div>
<a id="branchesjsCStackSourceJavaScriptCoreftlFTLCapabilitiescpp"></a>
<div class="modfile"><h4>Modified: branches/jsCStack/Source/JavaScriptCore/ftl/FTLCapabilities.cpp (162968 => 162969)</h4>
<pre class="diff"><span>
<span class="info">--- branches/jsCStack/Source/JavaScriptCore/ftl/FTLCapabilities.cpp        2014-01-28 23:12:19 UTC (rev 162968)
+++ branches/jsCStack/Source/JavaScriptCore/ftl/FTLCapabilities.cpp        2014-01-28 23:22:56 UTC (rev 162969)
</span><span class="lines">@@ -201,6 +201,16 @@
</span><span class="cx">             return CannotCompile;
</span><span class="cx">         }
</span><span class="cx">         break;
</span><ins>+    case ArrayPush:
+        switch (node-&gt;arrayMode().type()) {
+        case Array::Int32:
+        case Array::Contiguous:
+        case Array::Double:
+            break;
+        default:
+            return CannotCompile;
+        }
+        break;
</ins><span class="cx">     case CompareEq:
</span><span class="cx">         if (node-&gt;isBinaryUseKind(Int32Use))
</span><span class="cx">             break;
</span></span></pre></div>
<a id="branchesjsCStackSourceJavaScriptCoreftlFTLIntrinsicRepositoryh"></a>
<div class="modfile"><h4>Modified: branches/jsCStack/Source/JavaScriptCore/ftl/FTLIntrinsicRepository.h (162968 => 162969)</h4>
<pre class="diff"><span>
<span class="info">--- branches/jsCStack/Source/JavaScriptCore/ftl/FTLIntrinsicRepository.h        2014-01-28 23:12:19 UTC (rev 162968)
+++ branches/jsCStack/Source/JavaScriptCore/ftl/FTLIntrinsicRepository.h        2014-01-28 23:22:56 UTC (rev 162969)
</span><span class="lines">@@ -63,6 +63,8 @@
</span><span class="cx">     macro(I_JITOperation_EJss, functionType(intPtr, intPtr, intPtr)) \
</span><span class="cx">     macro(J_JITOperation_E, functionType(int64, intPtr)) \
</span><span class="cx">     macro(J_JITOperation_EAZ, functionType(int64, intPtr, intPtr, int32)) \
</span><ins>+    macro(J_JITOperation_EDA, functionType(int64, intPtr, doubleType, intPtr)) \
+    macro(J_JITOperation_EJA, functionType(int64, intPtr, int64, intPtr)) \
</ins><span class="cx">     macro(J_JITOperation_EJJ, functionType(int64, intPtr, int64, int64)) \
</span><span class="cx">     macro(J_JITOperation_EJssZ, functionType(int64, intPtr, intPtr, int32)) \
</span><span class="cx">     macro(J_JITOperation_ESsiJI, functionType(int64, intPtr, intPtr, int64, intPtr)) \
</span></span></pre></div>
<a id="branchesjsCStackSourceJavaScriptCoreftlFTLLowerDFGToLLVMcpp"></a>
<div class="modfile"><h4>Modified: branches/jsCStack/Source/JavaScriptCore/ftl/FTLLowerDFGToLLVM.cpp (162968 => 162969)</h4>
<pre class="diff"><span>
<span class="info">--- branches/jsCStack/Source/JavaScriptCore/ftl/FTLLowerDFGToLLVM.cpp        2014-01-28 23:12:19 UTC (rev 162968)
+++ branches/jsCStack/Source/JavaScriptCore/ftl/FTLLowerDFGToLLVM.cpp        2014-01-28 23:22:56 UTC (rev 162969)
</span><span class="lines">@@ -416,6 +416,9 @@
</span><span class="cx">         case PutByValDirect:
</span><span class="cx">             compilePutByVal();
</span><span class="cx">             break;
</span><ins>+        case ArrayPush:
+            compileArrayPush();
+            break;
</ins><span class="cx">         case NewObject:
</span><span class="cx">             compileNewObject();
</span><span class="cx">             break;
</span><span class="lines">@@ -2181,6 +2184,102 @@
</span><span class="cx">         }
</span><span class="cx">     }
</span><span class="cx">     
</span><ins>+    void compileArrayPush()
+    {
+        LValue base = lowCell(m_node-&gt;child1());
+        LValue storage = lowStorage(m_node-&gt;child3());
+        
+        switch (m_node-&gt;arrayMode().type()) {
+        case Array::Int32:
+        case Array::Contiguous:
+        case Array::Double: {
+            if (true) {
+                LValue value;
+                if (m_node-&gt;arrayMode().type() != Array::Double) {
+                    value = lowJSValue(m_node-&gt;child2(), ManualOperandSpeculation);
+                    if (m_node-&gt;arrayMode().type() == Array::Int32) {
+                        FTL_TYPE_CHECK(
+                            jsValueValue(value), m_node-&gt;child2(), SpecInt32, isNotInt32(value));
+                    }
+                } else {
+                    value = lowDouble(m_node-&gt;child2());
+                    FTL_TYPE_CHECK(
+                        doubleValue(value), m_node-&gt;child2(), SpecFullRealNumber,
+                        m_out.doubleNotEqualOrUnordered(value, value));
+                }
+                
+                LValue operation;
+                if (m_node-&gt;arrayMode().type() != Array::Double)
+                    operation = m_out.operation(operationArrayPush);
+                else
+                    operation = m_out.operation(operationArrayPushDouble);
+                setJSValue(vmCall(operation, m_callFrame, value, base));
+                return;
+            }
+            
+            LValue value;
+            LType refType;
+            
+            if (m_node-&gt;arrayMode().type() != Array::Double) {
+                value = lowJSValue(m_node-&gt;child2(), ManualOperandSpeculation);
+                if (m_node-&gt;arrayMode().type() == Array::Int32) {
+                    FTL_TYPE_CHECK(
+                        jsValueValue(value), m_node-&gt;child2(), SpecInt32, isNotInt32(value));
+                }
+                refType = m_out.ref64;
+            } else {
+                value = lowDouble(m_node-&gt;child2());
+                FTL_TYPE_CHECK(
+                    doubleValue(value), m_node-&gt;child2(), SpecFullRealNumber,
+                    m_out.doubleNotEqualOrUnordered(value, value));
+                refType = m_out.refDouble;
+            }
+            
+            IndexedAbstractHeap&amp; heap = m_heaps.forArrayType(m_node-&gt;arrayMode().type());
+
+            LValue prevLength = m_out.load32(storage, m_heaps.Butterfly_publicLength);
+            
+            LBasicBlock fastPath = FTL_NEW_BLOCK(m_out, (&quot;ArrayPush int32/contiguous fast path&quot;));
+            LBasicBlock slowPath = FTL_NEW_BLOCK(m_out, (&quot;ArrayPush int32/contiguous slow path&quot;));
+            LBasicBlock continuation = FTL_NEW_BLOCK(m_out, (&quot;ArrayPush int32/contiguous continuation&quot;));
+            
+            m_out.branch(
+                m_out.aboveOrEqual(
+                    prevLength, m_out.load32(storage, m_heaps.Butterfly_vectorLength)),
+                slowPath, fastPath);
+            
+            LBasicBlock lastNext = m_out.appendTo(fastPath, slowPath);
+            m_out.store(
+                value,
+                m_out.baseIndex(heap, storage, m_out.zeroExt(prevLength, m_out.intPtr)),
+                refType);
+            LValue newLength = m_out.add(prevLength, m_out.int32One);
+            m_out.store32(newLength, storage, m_heaps.Butterfly_publicLength);
+            
+            ValueFromBlock fastResult = m_out.anchor(boxInt32(newLength));
+            m_out.jump(continuation);
+            
+            m_out.appendTo(slowPath, continuation);
+            LValue operation;
+            if (m_node-&gt;arrayMode().type() != Array::Double)
+                operation = m_out.operation(operationArrayPush);
+            else
+                operation = m_out.operation(operationArrayPushDouble);
+            ValueFromBlock slowResult = m_out.anchor(
+                vmCall(operation, m_callFrame, value, base));
+            m_out.jump(continuation);
+            
+            m_out.appendTo(continuation, lastNext);
+            setJSValue(m_out.phi(m_out.int64, fastResult, slowResult));
+            return;
+        }
+            
+        default:
+            RELEASE_ASSERT_NOT_REACHED();
+            return;
+        }
+    }
+    
</ins><span class="cx">     void compileNewObject()
</span><span class="cx">     {
</span><span class="cx">         Structure* structure = m_node-&gt;structure();
</span></span></pre></div>
<a id="branchesjsCStackSourceJavaScriptCoretestsstressarraypushcontiguousjs"></a>
<div class="addfile"><h4>Added: branches/jsCStack/Source/JavaScriptCore/tests/stress/array-push-contiguous.js (0 => 162969)</h4>
<pre class="diff"><span>
<span class="info">--- branches/jsCStack/Source/JavaScriptCore/tests/stress/array-push-contiguous.js                                (rev 0)
+++ branches/jsCStack/Source/JavaScriptCore/tests/stress/array-push-contiguous.js        2014-01-28 23:22:56 UTC (rev 162969)
</span><span class="lines">@@ -0,0 +1,18 @@
</span><ins>+function foo() {
+    var array = [];
+    var result = [];
+    for (var i = 0; i &lt; 42; ++i)
+        result.push(array.push(&quot;hello&quot;));
+    return [array, result];
+}
+
+noInline(foo);
+
+for (var i = 0; i &lt; 100000; ++i) {
+    var result = foo();
+    if (result[0].toString() != &quot;hello,hello,hello,hello,hello,hello,hello,hello,hello,hello,hello,hello,hello,hello,hello,hello,hello,hello,hello,hello,hello,hello,hello,hello,hello,hello,hello,hello,hello,hello,hello,hello,hello,hello,hello,hello,hello,hello,hello,hello,hello,hello&quot;)
+        throw &quot;Error: bad array: &quot; + result[0];
+    if (result[1].toString() != &quot;1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42&quot;)
+        throw &quot;Error: bad array: &quot; + result[1];
+}
+
</ins></span></pre></div>
<a id="branchesjsCStackSourceJavaScriptCoretestsstressarraypushdoublethennanjs"></a>
<div class="addfile"><h4>Added: branches/jsCStack/Source/JavaScriptCore/tests/stress/array-push-double-then-nan.js (0 => 162969)</h4>
<pre class="diff"><span>
<span class="info">--- branches/jsCStack/Source/JavaScriptCore/tests/stress/array-push-double-then-nan.js                                (rev 0)
+++ branches/jsCStack/Source/JavaScriptCore/tests/stress/array-push-double-then-nan.js        2014-01-28 23:22:56 UTC (rev 162969)
</span><span class="lines">@@ -0,0 +1,23 @@
</span><ins>+function foo(x) {
+    var array = [];
+    var result = [];
+    for (var i = 0; i &lt; 42; ++i)
+        result.push(array.push(x));
+    return [array, result];
+}
+
+noInline(foo);
+
+for (var i = 0; i &lt; 100000; ++i) {
+    var result = foo(5.5);
+    if (result[0].toString() != &quot;5.5,5.5,5.5,5.5,5.5,5.5,5.5,5.5,5.5,5.5,5.5,5.5,5.5,5.5,5.5,5.5,5.5,5.5,5.5,5.5,5.5,5.5,5.5,5.5,5.5,5.5,5.5,5.5,5.5,5.5,5.5,5.5,5.5,5.5,5.5,5.5,5.5,5.5,5.5,5.5,5.5,5.5&quot;)
+        throw &quot;Error: bad array: &quot; + result[0];
+    if (result[1].toString() != &quot;1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42&quot;)
+        throw &quot;Error: bad array: &quot; + result[1];
+}
+
+var result = foo(0/0);
+if (result[0].toString() != &quot;NaN,NaN,NaN,NaN,NaN,NaN,NaN,NaN,NaN,NaN,NaN,NaN,NaN,NaN,NaN,NaN,NaN,NaN,NaN,NaN,NaN,NaN,NaN,NaN,NaN,NaN,NaN,NaN,NaN,NaN,NaN,NaN,NaN,NaN,NaN,NaN,NaN,NaN,NaN,NaN,NaN,NaN&quot;)
+    throw &quot;Error: bad array: &quot; + result[0];
+if (result[1].toString() != &quot;1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42&quot;)
+    throw &quot;Error: bad array: &quot; + result[1];
</ins></span></pre></div>
<a id="branchesjsCStackSourceJavaScriptCoretestsstressarraypushdoublejs"></a>
<div class="addfile"><h4>Added: branches/jsCStack/Source/JavaScriptCore/tests/stress/array-push-double.js (0 => 162969)</h4>
<pre class="diff"><span>
<span class="info">--- branches/jsCStack/Source/JavaScriptCore/tests/stress/array-push-double.js                                (rev 0)
+++ branches/jsCStack/Source/JavaScriptCore/tests/stress/array-push-double.js        2014-01-28 23:22:56 UTC (rev 162969)
</span><span class="lines">@@ -0,0 +1,18 @@
</span><ins>+function foo() {
+    var array = [];
+    var result = [];
+    for (var i = 0; i &lt; 42; ++i)
+        result.push(array.push(7.5 - i));
+    return [array, result];
+}
+
+noInline(foo);
+
+for (var i = 0; i &lt; 100000; ++i) {
+    var result = foo();
+    if (result[0].toString() != &quot;7.5,6.5,5.5,4.5,3.5,2.5,1.5,0.5,-0.5,-1.5,-2.5,-3.5,-4.5,-5.5,-6.5,-7.5,-8.5,-9.5,-10.5,-11.5,-12.5,-13.5,-14.5,-15.5,-16.5,-17.5,-18.5,-19.5,-20.5,-21.5,-22.5,-23.5,-24.5,-25.5,-26.5,-27.5,-28.5,-29.5,-30.5,-31.5,-32.5,-33.5&quot;)
+        throw &quot;Error: bad array: &quot; + result[0];
+    if (result[1].toString() != &quot;1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42&quot;)
+        throw &quot;Error: bad array: &quot; + result[1];
+}
+
</ins></span></pre>
</div>
</div>

</body>
</html>