<!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>[206853] 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/206853">206853</a></dd>
<dt>Author</dt> <dd>utatane.tea@gmail.com</dd>
<dt>Date</dt> <dd>2016-10-06 00:44:23 -0700 (Thu, 06 Oct 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>[JSC] Add @throwXXXError bytecode intrinsic
https://bugs.webkit.org/show_bug.cgi?id=162995

Reviewed by Saam Barati.

Source/JavaScriptCore:

Builtin JS code need to check arguments carefully since it is somewhat standard library for JS.
So bunch of `throw new @TypeError(&quot;...&quot;)` exists while usual code does not have so many.
However the above code bloats 32 instructions per site, enlarges the size of bytecodes of builtins,
and prevent us from inlining. We should have a way to reduce this size.

Fortunately, we already have such a opcode: op_throw_static_error. In this patch,
1. We extends op_throw_static_error to throw arbitrary errors. Previously, only TypeError and ReferenceError are allowed.
   We can embed ErrorType enum in op_throw_static_error to throw any types of errors.
2. We introduce several new bytecode intrinsics, `@throwTypeError(&quot;...&quot;)`, `@throwRangeError(&quot;...&quot;)`,
   and `@throwOutOfMemoryError()`. And use it inside builtin JS instead of `throw new @TypeError(&quot;...&quot;)` thingy.
3. DFG Node for throw_static_error is incorrectly named as &quot;ThrowReferenceError&quot;. This patch renames it to &quot;ThrowStaticError&quot;.

* builtins/ArrayConstructor.js:
* builtins/ArrayIteratorPrototype.js:
(next):
* builtins/ArrayPrototype.js:
(values):
(keys):
(entries):
(reduce):
(reduceRight):
(every):
(forEach):
(filter):
(map):
(some):
(fill):
(find):
(findIndex):
(includes):
(sort):
(concatSlowPath):
(copyWithin):
* builtins/DatePrototype.js:
(toLocaleString.toDateTimeOptionsAnyAll):
(toLocaleString):
(toLocaleDateString.toDateTimeOptionsDateDate):
(toLocaleDateString):
(toLocaleTimeString.toDateTimeOptionsTimeTime):
(toLocaleTimeString):
* builtins/FunctionPrototype.js:
(bind):
* builtins/GeneratorPrototype.js:
(globalPrivate.generatorResume):
* builtins/GlobalOperations.js:
(globalPrivate.speciesConstructor):
* builtins/MapPrototype.js:
(forEach):
* builtins/ModuleLoaderPrototype.js:
(provide):
* builtins/ObjectConstructor.js:
(values):
(entries):
(assign):
* builtins/PromiseConstructor.js:
(race):
(reject):
(resolve):
* builtins/PromiseOperations.js:
(globalPrivate.newPromiseCapability.executor):
(globalPrivate.newPromiseCapability):
(globalPrivate.initializePromise):
* builtins/PromisePrototype.js:
* builtins/ReflectObject.js:
(apply):
(deleteProperty):
(has):
* builtins/RegExpPrototype.js:
(globalPrivate.regExpExec):
(match):
(replace):
(search):
(split):
(intrinsic.RegExpTestIntrinsic.test):
* builtins/SetPrototype.js:
(forEach):
* builtins/StringConstructor.js:
(raw):
* builtins/StringIteratorPrototype.js:
(next):
* builtins/StringPrototype.js:
(match):
(globalPrivate.repeatSlowPath):
(repeat):
(padStart):
(padEnd):
(intrinsic.StringPrototypeReplaceIntrinsic.replace):
(localeCompare):
(search):
(split):
* builtins/TypedArrayConstructor.js:
(of):
(from):
* builtins/TypedArrayPrototype.js:
(globalPrivate.typedArraySpeciesConstructor):
(every):
(find):
(findIndex):
(forEach):
(some):
(subarray):
(reduce):
(reduceRight):
(map):
(filter):
* bytecode/BytecodeIntrinsicRegistry.h:
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::dumpBytecode):
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::emitThrowStaticError):
(JSC::BytecodeGenerator::emitThrowReferenceError):
(JSC::BytecodeGenerator::emitThrowTypeError):
(JSC::BytecodeGenerator::emitThrowRangeError):
(JSC::BytecodeGenerator::emitThrowOutOfMemoryError):
(JSC::BytecodeGenerator::emitReadOnlyExceptionIfNeeded):
* bytecompiler/BytecodeGenerator.h:
* bytecompiler/NodesCodegen.cpp:
(JSC::BytecodeIntrinsicNode::emit_intrinsic_throwTypeError):
(JSC::BytecodeIntrinsicNode::emit_intrinsic_throwRangeError):
(JSC::BytecodeIntrinsicNode::emit_intrinsic_throwOutOfMemoryError):
* dfg/DFGAbstractInterpreterInlines.h:
(JSC::DFG::AbstractInterpreter&lt;AbstractStateType&gt;::executeEffects):
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::parseBlock):
* dfg/DFGClobberize.h:
(JSC::DFG::clobberize):
* dfg/DFGDoesGC.cpp:
(JSC::DFG::doesGC):
* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupNode):
* dfg/DFGNodeType.h:
* dfg/DFGPredictionPropagationPhase.cpp:
* dfg/DFGSafeToExecute.h:
(JSC::DFG::safeToExecute):
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* ftl/FTLCapabilities.cpp:
(JSC::FTL::canCompile):
* ftl/FTLLowerDFGToB3.cpp:
(JSC::FTL::DFG::LowerDFGToB3::compileNode):
* jit/JITOpcodes.cpp:
(JSC::JIT::emit_op_throw_static_error):
* jit/JITOpcodes32_64.cpp:
(JSC::JIT::emit_op_throw_static_error): Deleted.
* jit/JITOperations.cpp:
* jit/JITOperations.h:
* llint/LLIntSlowPaths.cpp:
(JSC::LLInt::LLINT_SLOW_PATH_DECL): Deleted.
* llint/LLIntSlowPaths.h:
* llint/LowLevelInterpreter.asm:
* runtime/CommonSlowPaths.cpp:
(JSC::SLOW_PATH_DECL):
* runtime/CommonSlowPaths.h:
* runtime/Error.cpp:
(JSC::createError):
(WTF::printInternal):
* runtime/Error.h:

LayoutTests:

* js/Object-assign-expected.txt:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsjsObjectassignexpectedtxt">trunk/LayoutTests/js/Object-assign-expected.txt</a></li>
<li><a href="#trunkSourceJavaScriptCoreChangeLog">trunk/Source/JavaScriptCore/ChangeLog</a></li>
<li><a href="#trunkSourceJavaScriptCorebuiltinsArrayConstructorjs">trunk/Source/JavaScriptCore/builtins/ArrayConstructor.js</a></li>
<li><a href="#trunkSourceJavaScriptCorebuiltinsArrayIteratorPrototypejs">trunk/Source/JavaScriptCore/builtins/ArrayIteratorPrototype.js</a></li>
<li><a href="#trunkSourceJavaScriptCorebuiltinsArrayPrototypejs">trunk/Source/JavaScriptCore/builtins/ArrayPrototype.js</a></li>
<li><a href="#trunkSourceJavaScriptCorebuiltinsDatePrototypejs">trunk/Source/JavaScriptCore/builtins/DatePrototype.js</a></li>
<li><a href="#trunkSourceJavaScriptCorebuiltinsFunctionPrototypejs">trunk/Source/JavaScriptCore/builtins/FunctionPrototype.js</a></li>
<li><a href="#trunkSourceJavaScriptCorebuiltinsGeneratorPrototypejs">trunk/Source/JavaScriptCore/builtins/GeneratorPrototype.js</a></li>
<li><a href="#trunkSourceJavaScriptCorebuiltinsGlobalOperationsjs">trunk/Source/JavaScriptCore/builtins/GlobalOperations.js</a></li>
<li><a href="#trunkSourceJavaScriptCorebuiltinsMapPrototypejs">trunk/Source/JavaScriptCore/builtins/MapPrototype.js</a></li>
<li><a href="#trunkSourceJavaScriptCorebuiltinsModuleLoaderPrototypejs">trunk/Source/JavaScriptCore/builtins/ModuleLoaderPrototype.js</a></li>
<li><a href="#trunkSourceJavaScriptCorebuiltinsObjectConstructorjs">trunk/Source/JavaScriptCore/builtins/ObjectConstructor.js</a></li>
<li><a href="#trunkSourceJavaScriptCorebuiltinsPromiseConstructorjs">trunk/Source/JavaScriptCore/builtins/PromiseConstructor.js</a></li>
<li><a href="#trunkSourceJavaScriptCorebuiltinsPromiseOperationsjs">trunk/Source/JavaScriptCore/builtins/PromiseOperations.js</a></li>
<li><a href="#trunkSourceJavaScriptCorebuiltinsPromisePrototypejs">trunk/Source/JavaScriptCore/builtins/PromisePrototype.js</a></li>
<li><a href="#trunkSourceJavaScriptCorebuiltinsReflectObjectjs">trunk/Source/JavaScriptCore/builtins/ReflectObject.js</a></li>
<li><a href="#trunkSourceJavaScriptCorebuiltinsRegExpPrototypejs">trunk/Source/JavaScriptCore/builtins/RegExpPrototype.js</a></li>
<li><a href="#trunkSourceJavaScriptCorebuiltinsSetPrototypejs">trunk/Source/JavaScriptCore/builtins/SetPrototype.js</a></li>
<li><a href="#trunkSourceJavaScriptCorebuiltinsStringConstructorjs">trunk/Source/JavaScriptCore/builtins/StringConstructor.js</a></li>
<li><a href="#trunkSourceJavaScriptCorebuiltinsStringIteratorPrototypejs">trunk/Source/JavaScriptCore/builtins/StringIteratorPrototype.js</a></li>
<li><a href="#trunkSourceJavaScriptCorebuiltinsStringPrototypejs">trunk/Source/JavaScriptCore/builtins/StringPrototype.js</a></li>
<li><a href="#trunkSourceJavaScriptCorebuiltinsTypedArrayConstructorjs">trunk/Source/JavaScriptCore/builtins/TypedArrayConstructor.js</a></li>
<li><a href="#trunkSourceJavaScriptCorebuiltinsTypedArrayPrototypejs">trunk/Source/JavaScriptCore/builtins/TypedArrayPrototype.js</a></li>
<li><a href="#trunkSourceJavaScriptCorebytecodeBytecodeIntrinsicRegistryh">trunk/Source/JavaScriptCore/bytecode/BytecodeIntrinsicRegistry.h</a></li>
<li><a href="#trunkSourceJavaScriptCorebytecodeCodeBlockcpp">trunk/Source/JavaScriptCore/bytecode/CodeBlock.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCorebytecompilerBytecodeGeneratorcpp">trunk/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCorebytecompilerBytecodeGeneratorh">trunk/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.h</a></li>
<li><a href="#trunkSourceJavaScriptCorebytecompilerNodesCodegencpp">trunk/Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoredfgDFGAbstractInterpreterInlinesh">trunk/Source/JavaScriptCore/dfg/DFGAbstractInterpreterInlines.h</a></li>
<li><a href="#trunkSourceJavaScriptCoredfgDFGByteCodeParsercpp">trunk/Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoredfgDFGClobberizeh">trunk/Source/JavaScriptCore/dfg/DFGClobberize.h</a></li>
<li><a href="#trunkSourceJavaScriptCoredfgDFGDoesGCcpp">trunk/Source/JavaScriptCore/dfg/DFGDoesGC.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoredfgDFGFixupPhasecpp">trunk/Source/JavaScriptCore/dfg/DFGFixupPhase.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoredfgDFGNodeTypeh">trunk/Source/JavaScriptCore/dfg/DFGNodeType.h</a></li>
<li><a href="#trunkSourceJavaScriptCoredfgDFGPredictionPropagationPhasecpp">trunk/Source/JavaScriptCore/dfg/DFGPredictionPropagationPhase.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoredfgDFGSafeToExecuteh">trunk/Source/JavaScriptCore/dfg/DFGSafeToExecute.h</a></li>
<li><a href="#trunkSourceJavaScriptCoredfgDFGSpeculativeJIT32_64cpp">trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT32_64.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoredfgDFGSpeculativeJIT64cpp">trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT64.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreftlFTLCapabilitiescpp">trunk/Source/JavaScriptCore/ftl/FTLCapabilities.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreftlFTLLowerDFGToB3cpp">trunk/Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCorejitJITOpcodescpp">trunk/Source/JavaScriptCore/jit/JITOpcodes.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCorejitJITOpcodes32_64cpp">trunk/Source/JavaScriptCore/jit/JITOpcodes32_64.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCorejitJITOperationscpp">trunk/Source/JavaScriptCore/jit/JITOperations.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCorejitJITOperationsh">trunk/Source/JavaScriptCore/jit/JITOperations.h</a></li>
<li><a href="#trunkSourceJavaScriptCorellintLLIntSlowPathscpp">trunk/Source/JavaScriptCore/llint/LLIntSlowPaths.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCorellintLLIntSlowPathsh">trunk/Source/JavaScriptCore/llint/LLIntSlowPaths.h</a></li>
<li><a href="#trunkSourceJavaScriptCorellintLowLevelInterpreterasm">trunk/Source/JavaScriptCore/llint/LowLevelInterpreter.asm</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeCommonSlowPathscpp">trunk/Source/JavaScriptCore/runtime/CommonSlowPaths.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeCommonSlowPathsh">trunk/Source/JavaScriptCore/runtime/CommonSlowPaths.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeErrorcpp">trunk/Source/JavaScriptCore/runtime/Error.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeErrorh">trunk/Source/JavaScriptCore/runtime/Error.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (206852 => 206853)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2016-10-06 06:54:46 UTC (rev 206852)
+++ trunk/LayoutTests/ChangeLog        2016-10-06 07:44:23 UTC (rev 206853)
</span><span class="lines">@@ -1,3 +1,12 @@
</span><ins>+2016-10-05  Yusuke Suzuki  &lt;utatane.tea@gmail.com&gt;
+
+        [JSC] Add @throwXXXError bytecode intrinsic
+        https://bugs.webkit.org/show_bug.cgi?id=162995
+
+        Reviewed by Saam Barati.
+
+        * js/Object-assign-expected.txt:
+
</ins><span class="cx"> 2016-10-05  Wenson Hsieh  &lt;wenson_hsieh@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Introduce InputEvent bindings in preparation for the input events spec
</span></span></pre></div>
<a id="trunkLayoutTestsjsObjectassignexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/js/Object-assign-expected.txt (206852 => 206853)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/Object-assign-expected.txt        2016-10-06 06:54:46 UTC (rev 206852)
+++ trunk/LayoutTests/js/Object-assign-expected.txt        2016-10-06 07:44:23 UTC (rev 206853)
</span><span class="lines">@@ -6,9 +6,9 @@
</span><span class="cx"> PASS Object.assign.length is 2
</span><span class="cx"> PASS Object.assign.name is 'assign'
</span><span class="cx"> check TypeError on null/undefined
</span><del>-PASS Object.assign() threw exception TypeError: can't convert undefined to object.
-PASS Object.assign(undefined) threw exception TypeError: can't convert undefined to object.
-PASS Object.assign(null) threw exception TypeError: can't convert null to object.
</del><ins>+PASS Object.assign() threw exception TypeError: Object.assign requires that input parameter not be null or undefined.
+PASS Object.assign(undefined) threw exception TypeError: Object.assign requires that input parameter not be null or undefined.
+PASS Object.assign(null) threw exception TypeError: Object.assign requires that input parameter not be null or undefined.
</ins><span class="cx"> PASS var target = {}, ret = Object.assign(target); target === ret is true
</span><span class="cx"> multiple sources are copied
</span><span class="cx"> PASS var target = {}, ret = Object.assign(target, {a: 1}); target === ret is true
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/ChangeLog (206852 => 206853)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/ChangeLog        2016-10-06 06:54:46 UTC (rev 206852)
+++ trunk/Source/JavaScriptCore/ChangeLog        2016-10-06 07:44:23 UTC (rev 206853)
</span><span class="lines">@@ -1,5 +1,172 @@
</span><span class="cx"> 2016-10-05  Yusuke Suzuki  &lt;utatane.tea@gmail.com&gt;
</span><span class="cx"> 
</span><ins>+        [JSC] Add @throwXXXError bytecode intrinsic
+        https://bugs.webkit.org/show_bug.cgi?id=162995
+
+        Reviewed by Saam Barati.
+
+        Builtin JS code need to check arguments carefully since it is somewhat standard library for JS.
+        So bunch of `throw new @TypeError(&quot;...&quot;)` exists while usual code does not have so many.
+        However the above code bloats 32 instructions per site, enlarges the size of bytecodes of builtins,
+        and prevent us from inlining. We should have a way to reduce this size.
+
+        Fortunately, we already have such a opcode: op_throw_static_error. In this patch,
+        1. We extends op_throw_static_error to throw arbitrary errors. Previously, only TypeError and ReferenceError are allowed.
+           We can embed ErrorType enum in op_throw_static_error to throw any types of errors.
+        2. We introduce several new bytecode intrinsics, `@throwTypeError(&quot;...&quot;)`, `@throwRangeError(&quot;...&quot;)`,
+           and `@throwOutOfMemoryError()`. And use it inside builtin JS instead of `throw new @TypeError(&quot;...&quot;)` thingy.
+        3. DFG Node for throw_static_error is incorrectly named as &quot;ThrowReferenceError&quot;. This patch renames it to &quot;ThrowStaticError&quot;.
+
+        * builtins/ArrayConstructor.js:
+        * builtins/ArrayIteratorPrototype.js:
+        (next):
+        * builtins/ArrayPrototype.js:
+        (values):
+        (keys):
+        (entries):
+        (reduce):
+        (reduceRight):
+        (every):
+        (forEach):
+        (filter):
+        (map):
+        (some):
+        (fill):
+        (find):
+        (findIndex):
+        (includes):
+        (sort):
+        (concatSlowPath):
+        (copyWithin):
+        * builtins/DatePrototype.js:
+        (toLocaleString.toDateTimeOptionsAnyAll):
+        (toLocaleString):
+        (toLocaleDateString.toDateTimeOptionsDateDate):
+        (toLocaleDateString):
+        (toLocaleTimeString.toDateTimeOptionsTimeTime):
+        (toLocaleTimeString):
+        * builtins/FunctionPrototype.js:
+        (bind):
+        * builtins/GeneratorPrototype.js:
+        (globalPrivate.generatorResume):
+        * builtins/GlobalOperations.js:
+        (globalPrivate.speciesConstructor):
+        * builtins/MapPrototype.js:
+        (forEach):
+        * builtins/ModuleLoaderPrototype.js:
+        (provide):
+        * builtins/ObjectConstructor.js:
+        (values):
+        (entries):
+        (assign):
+        * builtins/PromiseConstructor.js:
+        (race):
+        (reject):
+        (resolve):
+        * builtins/PromiseOperations.js:
+        (globalPrivate.newPromiseCapability.executor):
+        (globalPrivate.newPromiseCapability):
+        (globalPrivate.initializePromise):
+        * builtins/PromisePrototype.js:
+        * builtins/ReflectObject.js:
+        (apply):
+        (deleteProperty):
+        (has):
+        * builtins/RegExpPrototype.js:
+        (globalPrivate.regExpExec):
+        (match):
+        (replace):
+        (search):
+        (split):
+        (intrinsic.RegExpTestIntrinsic.test):
+        * builtins/SetPrototype.js:
+        (forEach):
+        * builtins/StringConstructor.js:
+        (raw):
+        * builtins/StringIteratorPrototype.js:
+        (next):
+        * builtins/StringPrototype.js:
+        (match):
+        (globalPrivate.repeatSlowPath):
+        (repeat):
+        (padStart):
+        (padEnd):
+        (intrinsic.StringPrototypeReplaceIntrinsic.replace):
+        (localeCompare):
+        (search):
+        (split):
+        * builtins/TypedArrayConstructor.js:
+        (of):
+        (from):
+        * builtins/TypedArrayPrototype.js:
+        (globalPrivate.typedArraySpeciesConstructor):
+        (every):
+        (find):
+        (findIndex):
+        (forEach):
+        (some):
+        (subarray):
+        (reduce):
+        (reduceRight):
+        (map):
+        (filter):
+        * bytecode/BytecodeIntrinsicRegistry.h:
+        * bytecode/CodeBlock.cpp:
+        (JSC::CodeBlock::dumpBytecode):
+        * bytecompiler/BytecodeGenerator.cpp:
+        (JSC::BytecodeGenerator::emitThrowStaticError):
+        (JSC::BytecodeGenerator::emitThrowReferenceError):
+        (JSC::BytecodeGenerator::emitThrowTypeError):
+        (JSC::BytecodeGenerator::emitThrowRangeError):
+        (JSC::BytecodeGenerator::emitThrowOutOfMemoryError):
+        (JSC::BytecodeGenerator::emitReadOnlyExceptionIfNeeded):
+        * bytecompiler/BytecodeGenerator.h:
+        * bytecompiler/NodesCodegen.cpp:
+        (JSC::BytecodeIntrinsicNode::emit_intrinsic_throwTypeError):
+        (JSC::BytecodeIntrinsicNode::emit_intrinsic_throwRangeError):
+        (JSC::BytecodeIntrinsicNode::emit_intrinsic_throwOutOfMemoryError):
+        * dfg/DFGAbstractInterpreterInlines.h:
+        (JSC::DFG::AbstractInterpreter&lt;AbstractStateType&gt;::executeEffects):
+        * dfg/DFGByteCodeParser.cpp:
+        (JSC::DFG::ByteCodeParser::parseBlock):
+        * dfg/DFGClobberize.h:
+        (JSC::DFG::clobberize):
+        * dfg/DFGDoesGC.cpp:
+        (JSC::DFG::doesGC):
+        * dfg/DFGFixupPhase.cpp:
+        (JSC::DFG::FixupPhase::fixupNode):
+        * dfg/DFGNodeType.h:
+        * dfg/DFGPredictionPropagationPhase.cpp:
+        * dfg/DFGSafeToExecute.h:
+        (JSC::DFG::safeToExecute):
+        * dfg/DFGSpeculativeJIT32_64.cpp:
+        (JSC::DFG::SpeculativeJIT::compile):
+        * dfg/DFGSpeculativeJIT64.cpp:
+        (JSC::DFG::SpeculativeJIT::compile):
+        * ftl/FTLCapabilities.cpp:
+        (JSC::FTL::canCompile):
+        * ftl/FTLLowerDFGToB3.cpp:
+        (JSC::FTL::DFG::LowerDFGToB3::compileNode):
+        * jit/JITOpcodes.cpp:
+        (JSC::JIT::emit_op_throw_static_error):
+        * jit/JITOpcodes32_64.cpp:
+        (JSC::JIT::emit_op_throw_static_error): Deleted.
+        * jit/JITOperations.cpp:
+        * jit/JITOperations.h:
+        * llint/LLIntSlowPaths.cpp:
+        (JSC::LLInt::LLINT_SLOW_PATH_DECL): Deleted.
+        * llint/LLIntSlowPaths.h:
+        * llint/LowLevelInterpreter.asm:
+        * runtime/CommonSlowPaths.cpp:
+        (JSC::SLOW_PATH_DECL):
+        * runtime/CommonSlowPaths.h:
+        * runtime/Error.cpp:
+        (JSC::createError):
+        (WTF::printInternal):
+        * runtime/Error.h:
+
+2016-10-05  Yusuke Suzuki  &lt;utatane.tea@gmail.com&gt;
+
</ins><span class="cx">         Unreviewed, attempt to fix CLoop build after r206846
</span><span class="cx">         https://bugs.webkit.org/show_bug.cgi?id=162941
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorebuiltinsArrayConstructorjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/builtins/ArrayConstructor.js (206852 => 206853)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/builtins/ArrayConstructor.js        2016-10-06 06:54:46 UTC (rev 206852)
+++ trunk/Source/JavaScriptCore/builtins/ArrayConstructor.js        2016-10-06 07:44:23 UTC (rev 206853)
</span><span class="lines">@@ -47,7 +47,7 @@
</span><span class="cx"> 
</span><span class="cx">     if (mapFn !== @undefined) {
</span><span class="cx">         if (typeof mapFn !== &quot;function&quot;)
</span><del>-            throw new @TypeError(&quot;Array.from requires that the second argument, when provided, be a function&quot;);
</del><ins>+            @throwTypeError(&quot;Array.from requires that the second argument, when provided, be a function&quot;);
</ins><span class="cx"> 
</span><span class="cx">         if (arguments.length &gt; 2)
</span><span class="cx">             thisArg = arguments[2];
</span><span class="lines">@@ -54,12 +54,12 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     if (items == null)
</span><del>-        throw new @TypeError(&quot;Array.from requires an array-like object - not null or undefined&quot;);
</del><ins>+        @throwTypeError(&quot;Array.from requires an array-like object - not null or undefined&quot;);
</ins><span class="cx"> 
</span><span class="cx">     var iteratorMethod = items.@iteratorSymbol;
</span><span class="cx">     if (iteratorMethod != null) {
</span><span class="cx">         if (typeof iteratorMethod !== &quot;function&quot;)
</span><del>-            throw new @TypeError(&quot;Array.from requires that the property of the first argument, items[Symbol.iterator], when exists, be a function&quot;);
</del><ins>+            @throwTypeError(&quot;Array.from requires that the property of the first argument, items[Symbol.iterator], when exists, be a function&quot;);
</ins><span class="cx"> 
</span><span class="cx">         var result = @isConstructor(thisObj) ? new thisObj() : [];
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorebuiltinsArrayIteratorPrototypejs"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/builtins/ArrayIteratorPrototype.js (206852 => 206853)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/builtins/ArrayIteratorPrototype.js        2016-10-06 06:54:46 UTC (rev 206852)
+++ trunk/Source/JavaScriptCore/builtins/ArrayIteratorPrototype.js        2016-10-06 07:44:23 UTC (rev 206853)
</span><span class="lines">@@ -29,11 +29,11 @@
</span><span class="cx">     &quot;use strict&quot;;
</span><span class="cx"> 
</span><span class="cx">     if (this == null)
</span><del>-        throw new @TypeError(&quot;%ArrayIteratorPrototype%.next requires that |this| not be null or undefined&quot;);
</del><ins>+        @throwTypeError(&quot;%ArrayIteratorPrototype%.next requires that |this| not be null or undefined&quot;);
</ins><span class="cx"> 
</span><span class="cx">     let next = this.@arrayIteratorNext;
</span><span class="cx">     if (next === @undefined)
</span><del>-        throw new @TypeError(&quot;%ArrayIteratorPrototype%.next requires that |this| be an Array Iterator instance&quot;);
</del><ins>+        @throwTypeError(&quot;%ArrayIteratorPrototype%.next requires that |this| be an Array Iterator instance&quot;);
</ins><span class="cx"> 
</span><span class="cx">     return next.@call(this);
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorebuiltinsArrayPrototypejs"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/builtins/ArrayPrototype.js (206852 => 206853)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/builtins/ArrayPrototype.js        2016-10-06 06:54:46 UTC (rev 206852)
+++ trunk/Source/JavaScriptCore/builtins/ArrayPrototype.js        2016-10-06 07:44:23 UTC (rev 206853)
</span><span class="lines">@@ -40,7 +40,7 @@
</span><span class="cx">     &quot;use strict&quot;;
</span><span class="cx"> 
</span><span class="cx">     if (this == null)
</span><del>-        throw new @TypeError(&quot;Array.prototype.values requires that |this| not be null or undefined&quot;);
</del><ins>+        @throwTypeError(&quot;Array.prototype.values requires that |this| not be null or undefined&quot;);
</ins><span class="cx"> 
</span><span class="cx">     return new @createArrayIterator(@Object(this), &quot;value&quot;, @arrayIteratorValueNext);
</span><span class="cx"> }
</span><span class="lines">@@ -50,7 +50,7 @@
</span><span class="cx">     &quot;use strict&quot;;
</span><span class="cx"> 
</span><span class="cx">     if (this == null)
</span><del>-        throw new @TypeError(&quot;Array.prototype.keys requires that |this| not be null or undefined&quot;);
</del><ins>+        @throwTypeError(&quot;Array.prototype.keys requires that |this| not be null or undefined&quot;);
</ins><span class="cx"> 
</span><span class="cx">     return new @createArrayIterator(@Object(this), &quot;key&quot;, @arrayIteratorKeyNext);
</span><span class="cx"> }
</span><span class="lines">@@ -60,7 +60,7 @@
</span><span class="cx">     &quot;use strict&quot;;
</span><span class="cx"> 
</span><span class="cx">     if (this == null)
</span><del>-        throw new @TypeError(&quot;Array.prototype.entries requires that |this| not be null or undefined&quot;);
</del><ins>+        @throwTypeError(&quot;Array.prototype.entries requires that |this| not be null or undefined&quot;);
</ins><span class="cx"> 
</span><span class="cx">     return new @createArrayIterator(@Object(this), &quot;key+value&quot;, @arrayIteratorKeyValueNext);
</span><span class="cx"> }
</span><span class="lines">@@ -70,16 +70,16 @@
</span><span class="cx">     &quot;use strict&quot;;
</span><span class="cx"> 
</span><span class="cx">     if (this == null)
</span><del>-        throw new @TypeError(&quot;Array.prototype.reduce requires that |this| not be null or undefined&quot;);
</del><ins>+        @throwTypeError(&quot;Array.prototype.reduce requires that |this| not be null or undefined&quot;);
</ins><span class="cx"> 
</span><span class="cx">     var array = @Object(this);
</span><span class="cx">     var length = @toLength(array.length);
</span><span class="cx"> 
</span><span class="cx">     if (typeof callback !== &quot;function&quot;)
</span><del>-        throw new @TypeError(&quot;Array.prototype.reduce callback must be a function&quot;);
</del><ins>+        @throwTypeError(&quot;Array.prototype.reduce callback must be a function&quot;);
</ins><span class="cx"> 
</span><span class="cx">     if (length === 0 &amp;&amp; arguments.length &lt; 2)
</span><del>-        throw new @TypeError(&quot;reduce of empty array with no initial value&quot;);
</del><ins>+        @throwTypeError(&quot;reduce of empty array with no initial value&quot;);
</ins><span class="cx"> 
</span><span class="cx">     var accumulator, k = 0;
</span><span class="cx">     if (arguments.length &gt; 1)
</span><span class="lines">@@ -88,7 +88,7 @@
</span><span class="cx">         while (k &lt; length &amp;&amp; !(k in array))
</span><span class="cx">             k += 1;
</span><span class="cx">         if (k &gt;= length)
</span><del>-            throw new @TypeError(&quot;reduce of empty array with no initial value&quot;);
</del><ins>+            @throwTypeError(&quot;reduce of empty array with no initial value&quot;);
</ins><span class="cx">         accumulator = array[k++];
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -105,16 +105,16 @@
</span><span class="cx">     &quot;use strict&quot;;
</span><span class="cx"> 
</span><span class="cx">     if (this == null)
</span><del>-        throw new @TypeError(&quot;Array.prototype.reduceRight requires that |this| not be null or undefined&quot;);
</del><ins>+        @throwTypeError(&quot;Array.prototype.reduceRight requires that |this| not be null or undefined&quot;);
</ins><span class="cx"> 
</span><span class="cx">     var array = @Object(this);
</span><span class="cx">     var length = @toLength(array.length);
</span><span class="cx"> 
</span><span class="cx">     if (typeof callback !== &quot;function&quot;)
</span><del>-        throw new @TypeError(&quot;Array.prototype.reduceRight callback must be a function&quot;);
</del><ins>+        @throwTypeError(&quot;Array.prototype.reduceRight callback must be a function&quot;);
</ins><span class="cx"> 
</span><span class="cx">     if (length === 0 &amp;&amp; arguments.length &lt; 2)
</span><del>-        throw new @TypeError(&quot;reduceRight of empty array with no initial value&quot;);
</del><ins>+        @throwTypeError(&quot;reduceRight of empty array with no initial value&quot;);
</ins><span class="cx"> 
</span><span class="cx">     var accumulator, k = length - 1;
</span><span class="cx">     if (arguments.length &gt; 1)
</span><span class="lines">@@ -123,7 +123,7 @@
</span><span class="cx">         while (k &gt;= 0 &amp;&amp; !(k in array))
</span><span class="cx">             k -= 1;
</span><span class="cx">         if (k &lt; 0)
</span><del>-            throw new @TypeError(&quot;reduceRight of empty array with no initial value&quot;);
</del><ins>+            @throwTypeError(&quot;reduceRight of empty array with no initial value&quot;);
</ins><span class="cx">         accumulator = array[k--];
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -140,13 +140,13 @@
</span><span class="cx">     &quot;use strict&quot;;
</span><span class="cx"> 
</span><span class="cx">     if (this == null)
</span><del>-        throw new @TypeError(&quot;Array.prototype.every requires that |this| not be null or undefined&quot;);
</del><ins>+        @throwTypeError(&quot;Array.prototype.every requires that |this| not be null or undefined&quot;);
</ins><span class="cx">     
</span><span class="cx">     var array = @Object(this);
</span><span class="cx">     var length = @toLength(array.length);
</span><span class="cx"> 
</span><span class="cx">     if (typeof callback !== &quot;function&quot;)
</span><del>-        throw new @TypeError(&quot;Array.prototype.every callback must be a function&quot;);
</del><ins>+        @throwTypeError(&quot;Array.prototype.every callback must be a function&quot;);
</ins><span class="cx">     
</span><span class="cx">     var thisArg = arguments.length &gt; 1 ? arguments[1] : @undefined;
</span><span class="cx">     
</span><span class="lines">@@ -165,13 +165,13 @@
</span><span class="cx">     &quot;use strict&quot;;
</span><span class="cx"> 
</span><span class="cx">     if (this == null)
</span><del>-        throw new @TypeError(&quot;Array.prototype.forEach requires that |this| not be null or undefined&quot;);
</del><ins>+        @throwTypeError(&quot;Array.prototype.forEach requires that |this| not be null or undefined&quot;);
</ins><span class="cx">     
</span><span class="cx">     var array = @Object(this);
</span><span class="cx">     var length = @toLength(array.length);
</span><span class="cx"> 
</span><span class="cx">     if (typeof callback !== &quot;function&quot;)
</span><del>-        throw new @TypeError(&quot;Array.prototype.forEach callback must be a function&quot;);
</del><ins>+        @throwTypeError(&quot;Array.prototype.forEach callback must be a function&quot;);
</ins><span class="cx">     
</span><span class="cx">     var thisArg = arguments.length &gt; 1 ? arguments[1] : @undefined;
</span><span class="cx">     
</span><span class="lines">@@ -186,13 +186,13 @@
</span><span class="cx">     &quot;use strict&quot;;
</span><span class="cx"> 
</span><span class="cx">     if (this == null)
</span><del>-        throw new @TypeError(&quot;Array.prototype.filter requires that |this| not be null or undefined&quot;);
</del><ins>+        @throwTypeError(&quot;Array.prototype.filter requires that |this| not be null or undefined&quot;);
</ins><span class="cx">     
</span><span class="cx">     var array = @Object(this);
</span><span class="cx">     var length = @toLength(array.length);
</span><span class="cx"> 
</span><span class="cx">     if (typeof callback !== &quot;function&quot;)
</span><del>-        throw new @TypeError(&quot;Array.prototype.filter callback must be a function&quot;);
</del><ins>+        @throwTypeError(&quot;Array.prototype.filter callback must be a function&quot;);
</ins><span class="cx">     
</span><span class="cx">     var thisArg = arguments.length &gt; 1 ? arguments[1] : @undefined;
</span><span class="cx"> 
</span><span class="lines">@@ -235,13 +235,13 @@
</span><span class="cx">     &quot;use strict&quot;;
</span><span class="cx"> 
</span><span class="cx">     if (this == null)
</span><del>-        throw new @TypeError(&quot;Array.prototype.map requires that |this| not be null or undefined&quot;);
</del><ins>+        @throwTypeError(&quot;Array.prototype.map requires that |this| not be null or undefined&quot;);
</ins><span class="cx">     
</span><span class="cx">     var array = @Object(this);
</span><span class="cx">     var length = @toLength(array.length);
</span><span class="cx"> 
</span><span class="cx">     if (typeof callback !== &quot;function&quot;)
</span><del>-        throw new @TypeError(&quot;Array.prototype.map callback must be a function&quot;);
</del><ins>+        @throwTypeError(&quot;Array.prototype.map callback must be a function&quot;);
</ins><span class="cx">     
</span><span class="cx">     var thisArg = arguments.length &gt; 1 ? arguments[1] : @undefined;
</span><span class="cx"> 
</span><span class="lines">@@ -281,13 +281,13 @@
</span><span class="cx">     &quot;use strict&quot;;
</span><span class="cx"> 
</span><span class="cx">     if (this == null)
</span><del>-        throw new @TypeError(&quot;Array.prototype.some requires that |this| not be null or undefined&quot;);
</del><ins>+        @throwTypeError(&quot;Array.prototype.some requires that |this| not be null or undefined&quot;);
</ins><span class="cx">     
</span><span class="cx">     var array = @Object(this);
</span><span class="cx">     var length = @toLength(array.length);
</span><span class="cx"> 
</span><span class="cx">     if (typeof callback !== &quot;function&quot;)
</span><del>-        throw new @TypeError(&quot;Array.prototype.some callback must be a function&quot;);
</del><ins>+        @throwTypeError(&quot;Array.prototype.some callback must be a function&quot;);
</ins><span class="cx">     
</span><span class="cx">     var thisArg = arguments.length &gt; 1 ? arguments[1] : @undefined;
</span><span class="cx">     for (var i = 0; i &lt; length; i++) {
</span><span class="lines">@@ -304,7 +304,7 @@
</span><span class="cx">     &quot;use strict&quot;;
</span><span class="cx"> 
</span><span class="cx">     if (this == null)
</span><del>-        throw new @TypeError(&quot;Array.prototype.fill requires that |this| not be null or undefined&quot;);
</del><ins>+        @throwTypeError(&quot;Array.prototype.fill requires that |this| not be null or undefined&quot;);
</ins><span class="cx"> 
</span><span class="cx">     var array = @Object(this);
</span><span class="cx">     var length = @toLength(array.length);
</span><span class="lines">@@ -345,13 +345,13 @@
</span><span class="cx">     &quot;use strict&quot;;
</span><span class="cx"> 
</span><span class="cx">     if (this == null)
</span><del>-        throw new @TypeError(&quot;Array.prototype.find requires that |this| not be null or undefined&quot;);
</del><ins>+        @throwTypeError(&quot;Array.prototype.find requires that |this| not be null or undefined&quot;);
</ins><span class="cx">     
</span><span class="cx">     var array = @Object(this);
</span><span class="cx">     var length = @toLength(array.length);
</span><span class="cx"> 
</span><span class="cx">     if (typeof callback !== &quot;function&quot;)
</span><del>-        throw new @TypeError(&quot;Array.prototype.find callback must be a function&quot;);
</del><ins>+        @throwTypeError(&quot;Array.prototype.find callback must be a function&quot;);
</ins><span class="cx">     
</span><span class="cx">     var thisArg = arguments.length &gt; 1 ? arguments[1] : @undefined;
</span><span class="cx">     for (var i = 0; i &lt; length; i++) {
</span><span class="lines">@@ -367,13 +367,13 @@
</span><span class="cx">     &quot;use strict&quot;;
</span><span class="cx"> 
</span><span class="cx">     if (this == null)
</span><del>-        throw new @TypeError(&quot;Array.prototype.findIndex requires that |this| not be null or undefined&quot;);
</del><ins>+        @throwTypeError(&quot;Array.prototype.findIndex requires that |this| not be null or undefined&quot;);
</ins><span class="cx">     
</span><span class="cx">     var array = @Object(this);
</span><span class="cx">     var length = @toLength(array.length);
</span><span class="cx"> 
</span><span class="cx">     if (typeof callback !== &quot;function&quot;)
</span><del>-        throw new @TypeError(&quot;Array.prototype.findIndex callback must be a function&quot;);
</del><ins>+        @throwTypeError(&quot;Array.prototype.findIndex callback must be a function&quot;);
</ins><span class="cx">     
</span><span class="cx">     var thisArg = arguments.length &gt; 1 ? arguments[1] : @undefined;
</span><span class="cx">     for (var i = 0; i &lt; length; i++) {
</span><span class="lines">@@ -388,7 +388,7 @@
</span><span class="cx">     &quot;use strict&quot;;
</span><span class="cx"> 
</span><span class="cx">     if (this == null)
</span><del>-        throw new @TypeError(&quot;Array.prototype.includes requires that |this| not be null or undefined&quot;);
</del><ins>+        @throwTypeError(&quot;Array.prototype.includes requires that |this| not be null or undefined&quot;);
</ins><span class="cx"> 
</span><span class="cx">     var array = @Object(this);
</span><span class="cx">     var length = @toLength(array.length);
</span><span class="lines">@@ -638,10 +638,10 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     if (this == null)
</span><del>-        throw new @TypeError(&quot;Array.prototype.sort requires that |this| not be null or undefined&quot;);
</del><ins>+        @throwTypeError(&quot;Array.prototype.sort requires that |this| not be null or undefined&quot;);
</ins><span class="cx"> 
</span><span class="cx">     if (typeof this == &quot;string&quot;)
</span><del>-        throw new @TypeError(&quot;Attempted to assign to readonly property.&quot;);
</del><ins>+        @throwTypeError(&quot;Attempted to assign to readonly property.&quot;);
</ins><span class="cx"> 
</span><span class="cx">     var array = @Object(this);
</span><span class="cx"> 
</span><span class="lines">@@ -658,7 +658,7 @@
</span><span class="cx">     &quot;use strict&quot;;
</span><span class="cx"> 
</span><span class="cx">     if (this == null)
</span><del>-        throw new @TypeError(&quot;Array.prototype.concat requires that |this| not be null or undefined&quot;);
</del><ins>+        @throwTypeError(&quot;Array.prototype.concat requires that |this| not be null or undefined&quot;);
</ins><span class="cx"> 
</span><span class="cx">     var currentElement = @Object(this);
</span><span class="cx"> 
</span><span class="lines">@@ -697,7 +697,7 @@
</span><span class="cx">                 resultIndex += length;
</span><span class="cx">             } else {
</span><span class="cx">                 if (length + resultIndex &gt; @MAX_SAFE_INTEGER)
</span><del>-                    throw @TypeError(&quot;length exceeded the maximum safe integer&quot;);
</del><ins>+                    @throwTypeError(&quot;length exceeded the maximum safe integer&quot;);
</ins><span class="cx">                 for (var i = 0; i &lt; length; i++) {
</span><span class="cx">                     if (i in currentElement)
</span><span class="cx">                         @putByValDirect(result, resultIndex, currentElement[i]);
</span><span class="lines">@@ -706,7 +706,7 @@
</span><span class="cx">             }
</span><span class="cx">         } else {
</span><span class="cx">             if (resultIndex &gt;= @MAX_SAFE_INTEGER)
</span><del>-                throw @TypeError(&quot;length exceeded the maximum safe integer&quot;);
</del><ins>+                @throwTypeError(&quot;length exceeded the maximum safe integer&quot;);
</ins><span class="cx">             @putByValDirect(result, resultIndex++, currentElement);
</span><span class="cx">         }
</span><span class="cx">         currentElement = arguments[argIndex];
</span><span class="lines">@@ -748,7 +748,7 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     if (this == null)
</span><del>-        throw new @TypeError(&quot;Array.copyWithin requires that |this| not be null or undefined&quot;);
</del><ins>+        @throwTypeError(&quot;Array.copyWithin requires that |this| not be null or undefined&quot;);
</ins><span class="cx"> 
</span><span class="cx">     var array = @Object(this);
</span><span class="cx">     var length = @toLength(array.length);
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorebuiltinsDatePrototypejs"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/builtins/DatePrototype.js (206852 => 206853)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/builtins/DatePrototype.js        2016-10-06 06:54:46 UTC (rev 206852)
+++ trunk/Source/JavaScriptCore/builtins/DatePrototype.js        2016-10-06 07:44:23 UTC (rev 206853)
</span><span class="lines">@@ -38,7 +38,7 @@
</span><span class="cx">         if (opts === @undefined)
</span><span class="cx">             options = null;
</span><span class="cx">         else if (opts === null)
</span><del>-            throw new @TypeError(&quot;null is not an object&quot;);
</del><ins>+            @throwTypeError(&quot;null is not an object&quot;);
</ins><span class="cx">         else
</span><span class="cx">             options = @Object(opts);
</span><span class="cx"> 
</span><span class="lines">@@ -95,7 +95,7 @@
</span><span class="cx">         if (opts === @undefined)
</span><span class="cx">             options = null;
</span><span class="cx">         else if (opts === null)
</span><del>-            throw new @TypeError(&quot;null is not an object&quot;);
</del><ins>+            @throwTypeError(&quot;null is not an object&quot;);
</ins><span class="cx">         else
</span><span class="cx">             options = @Object(opts);
</span><span class="cx"> 
</span><span class="lines">@@ -145,7 +145,7 @@
</span><span class="cx">         if (opts === @undefined)
</span><span class="cx">             options = null;
</span><span class="cx">         else if (opts === null)
</span><del>-            throw new @TypeError(&quot;null is not an object&quot;);
</del><ins>+            @throwTypeError(&quot;null is not an object&quot;);
</ins><span class="cx">         else
</span><span class="cx">             options = @Object(opts);
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorebuiltinsFunctionPrototypejs"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/builtins/FunctionPrototype.js (206852 => 206853)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/builtins/FunctionPrototype.js        2016-10-06 06:54:46 UTC (rev 206852)
+++ trunk/Source/JavaScriptCore/builtins/FunctionPrototype.js        2016-10-06 07:44:23 UTC (rev 206853)
</span><span class="lines">@@ -63,7 +63,7 @@
</span><span class="cx"> 
</span><span class="cx">     let target = this;
</span><span class="cx">     if (typeof target !== &quot;function&quot;)
</span><del>-        throw new @TypeError(&quot;|this| is not a function inside Function.prototype.bind&quot;);
</del><ins>+        @throwTypeError(&quot;|this| is not a function inside Function.prototype.bind&quot;);
</ins><span class="cx"> 
</span><span class="cx">     let argumentCount = arguments.length;
</span><span class="cx">     let boundArgs = null;
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorebuiltinsGeneratorPrototypejs"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/builtins/GeneratorPrototype.js (206852 => 206853)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/builtins/GeneratorPrototype.js        2016-10-06 06:54:46 UTC (rev 206852)
+++ trunk/Source/JavaScriptCore/builtins/GeneratorPrototype.js        2016-10-06 07:44:23 UTC (rev 206853)
</span><span class="lines">@@ -36,10 +36,10 @@
</span><span class="cx">     let value = @undefined;
</span><span class="cx"> 
</span><span class="cx">     if (typeof state !== 'number')
</span><del>-        throw new @TypeError(&quot;|this| should be a generator&quot;);
</del><ins>+        @throwTypeError(&quot;|this| should be a generator&quot;);
</ins><span class="cx"> 
</span><span class="cx">     if (state === @GeneratorStateExecuting)
</span><del>-        throw new @TypeError(&quot;Generator is executing&quot;);
</del><ins>+        @throwTypeError(&quot;Generator is executing&quot;);
</ins><span class="cx"> 
</span><span class="cx">     if (state === @GeneratorStateCompleted) {
</span><span class="cx">         if (resumeMode === @GeneratorResumeModeThrow)
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorebuiltinsGlobalOperationsjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/builtins/GlobalOperations.js (206852 => 206853)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/builtins/GlobalOperations.js        2016-10-06 06:54:46 UTC (rev 206852)
+++ trunk/Source/JavaScriptCore/builtins/GlobalOperations.js        2016-10-06 07:44:23 UTC (rev 206853)
</span><span class="lines">@@ -71,11 +71,11 @@
</span><span class="cx">     if (constructor === @undefined)
</span><span class="cx">         return defaultConstructor;
</span><span class="cx">     if (!@isObject(constructor))
</span><del>-        throw new @TypeError(&quot;|this|.constructor is not an Object or undefined&quot;);
</del><ins>+        @throwTypeError(&quot;|this|.constructor is not an Object or undefined&quot;);
</ins><span class="cx">     constructor = constructor.@speciesSymbol;
</span><span class="cx">     if (constructor == null)
</span><span class="cx">         return defaultConstructor;
</span><span class="cx">     if (@isConstructor(constructor))
</span><span class="cx">         return constructor;
</span><del>-    throw new @TypeError(&quot;|this|.constructor[Symbol.species] is not a constructor&quot;);
</del><ins>+    @throwTypeError(&quot;|this|.constructor[Symbol.species] is not a constructor&quot;);
</ins><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorebuiltinsMapPrototypejs"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/builtins/MapPrototype.js (206852 => 206853)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/builtins/MapPrototype.js        2016-10-06 06:54:46 UTC (rev 206852)
+++ trunk/Source/JavaScriptCore/builtins/MapPrototype.js        2016-10-06 07:44:23 UTC (rev 206853)
</span><span class="lines">@@ -28,10 +28,10 @@
</span><span class="cx">     &quot;use strict&quot;;
</span><span class="cx"> 
</span><span class="cx">     if (!@isMap(this))
</span><del>-        throw new @TypeError(&quot;Map operation called on non-Map object&quot;);
</del><ins>+        @throwTypeError(&quot;Map operation called on non-Map object&quot;);
</ins><span class="cx"> 
</span><span class="cx">     if (typeof callback !== 'function')
</span><del>-        throw new @TypeError(&quot;Map.prototype.forEach callback must be a function&quot;);
</del><ins>+        @throwTypeError(&quot;Map.prototype.forEach callback must be a function&quot;);
</ins><span class="cx"> 
</span><span class="cx">     var thisArg = arguments.length &gt; 1 ? arguments[1] : @undefined;
</span><span class="cx">     var iterator = @MapIterator(this);
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorebuiltinsModuleLoaderPrototypejs"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/builtins/ModuleLoaderPrototype.js (206852 => 206853)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/builtins/ModuleLoaderPrototype.js        2016-10-06 06:54:46 UTC (rev 206852)
+++ trunk/Source/JavaScriptCore/builtins/ModuleLoaderPrototype.js        2016-10-06 07:44:23 UTC (rev 206853)
</span><span class="lines">@@ -481,7 +481,7 @@
</span><span class="cx"> 
</span><span class="cx">     if (stage === @ModuleFetch) {
</span><span class="cx">         if (entry.state &gt; @ModuleFetch)
</span><del>-            throw new @TypeError(&quot;Requested module is already fetched.&quot;);
</del><ins>+            @throwTypeError(&quot;Requested module is already fetched.&quot;);
</ins><span class="cx">         this.fulfillFetch(entry, value);
</span><span class="cx">         return;
</span><span class="cx">     }
</span><span class="lines">@@ -488,7 +488,7 @@
</span><span class="cx"> 
</span><span class="cx">     if (stage === @ModuleTranslate) {
</span><span class="cx">         if (entry.state &gt; @ModuleTranslate)
</span><del>-            throw new @TypeError(&quot;Requested module is already translated.&quot;);
</del><ins>+            @throwTypeError(&quot;Requested module is already translated.&quot;);
</ins><span class="cx">         this.fulfillFetch(entry, @undefined);
</span><span class="cx">         this.fulfillTranslate(entry, value);
</span><span class="cx">         return;
</span><span class="lines">@@ -496,7 +496,7 @@
</span><span class="cx"> 
</span><span class="cx">     if (stage === @ModuleInstantiate) {
</span><span class="cx">         if (entry.state &gt; @ModuleInstantiate)
</span><del>-            throw new @TypeError(&quot;Requested module is already instantiated.&quot;);
</del><ins>+            @throwTypeError(&quot;Requested module is already instantiated.&quot;);
</ins><span class="cx">         this.fulfillFetch(entry, @undefined);
</span><span class="cx">         this.fulfillTranslate(entry, value);
</span><span class="cx">         entry.translate.then((source) =&gt; {
</span><span class="lines">@@ -505,7 +505,7 @@
</span><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    throw new @TypeError(&quot;Requested module is already ready to be executed.&quot;);
</del><ins>+    @throwTypeError(&quot;Requested module is already ready to be executed.&quot;);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> function loadAndEvaluateModule(moduleName, referrer, initiator)
</span><span class="lines">@@ -542,7 +542,7 @@
</span><span class="cx"> 
</span><span class="cx">     var entry = this.ensureRegistered(key);
</span><span class="cx">     if (entry.state &lt; @ModuleLink)
</span><del>-        throw new @TypeError(&quot;Requested module is not instantiated yet.&quot;);
</del><ins>+        @throwTypeError(&quot;Requested module is not instantiated yet.&quot;);
</ins><span class="cx"> 
</span><span class="cx">     this.link(entry, initiator);
</span><span class="cx">     return this.moduleEvaluation(entry.module, initiator);
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorebuiltinsObjectConstructorjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/builtins/ObjectConstructor.js (206852 => 206853)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/builtins/ObjectConstructor.js        2016-10-06 06:54:46 UTC (rev 206852)
+++ trunk/Source/JavaScriptCore/builtins/ObjectConstructor.js        2016-10-06 07:44:23 UTC (rev 206853)
</span><span class="lines">@@ -53,7 +53,7 @@
</span><span class="cx">     &quot;use strict&quot;;
</span><span class="cx">     
</span><span class="cx">     if (object == null)
</span><del>-        throw new @TypeError(&quot;Object.values requires that input parameter not be null or undefined&quot;);
</del><ins>+        @throwTypeError(&quot;Object.values requires that input parameter not be null or undefined&quot;);
</ins><span class="cx"> 
</span><span class="cx">     return @enumerableOwnProperties(object, @iterationKindValue);
</span><span class="cx"> }
</span><span class="lines">@@ -63,7 +63,7 @@
</span><span class="cx">     &quot;use strict&quot;;
</span><span class="cx">     
</span><span class="cx">     if (object == null)
</span><del>-        throw new @TypeError(&quot;Object.entries requires that input parameter not be null or undefined&quot;);
</del><ins>+        @throwTypeError(&quot;Object.entries requires that input parameter not be null or undefined&quot;);
</ins><span class="cx">     
</span><span class="cx">     return @enumerableOwnProperties(object, @iterationKindKeyValue);
</span><span class="cx"> }
</span><span class="lines">@@ -73,7 +73,7 @@
</span><span class="cx">     &quot;use strict&quot;;
</span><span class="cx"> 
</span><span class="cx">     if (target == null)
</span><del>-        throw new @TypeError(&quot;can't convert &quot; + target + &quot; to object&quot;);
</del><ins>+        @throwTypeError(&quot;Object.assign requires that input parameter not be null or undefined&quot;);
</ins><span class="cx"> 
</span><span class="cx">     let objTarget = @Object(target);
</span><span class="cx">     for (let s = 1, argumentsLength = arguments.length; s &lt; argumentsLength; ++s) {
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorebuiltinsPromiseConstructorjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/builtins/PromiseConstructor.js (206852 => 206853)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/builtins/PromiseConstructor.js        2016-10-06 06:54:46 UTC (rev 206852)
+++ trunk/Source/JavaScriptCore/builtins/PromiseConstructor.js        2016-10-06 07:44:23 UTC (rev 206853)
</span><span class="lines">@@ -28,7 +28,7 @@
</span><span class="cx">     &quot;use strict&quot;;
</span><span class="cx"> 
</span><span class="cx">     if (!@isObject(this))
</span><del>-        throw new @TypeError(&quot;|this| is not a object&quot;);
</del><ins>+        @throwTypeError(&quot;|this| is not a object&quot;);
</ins><span class="cx"> 
</span><span class="cx">     var promiseCapability = @newPromiseCapability(this);
</span><span class="cx"> 
</span><span class="lines">@@ -80,7 +80,7 @@
</span><span class="cx">     &quot;use strict&quot;;
</span><span class="cx"> 
</span><span class="cx">     if (!@isObject(this))
</span><del>-        throw new @TypeError(&quot;|this| is not a object&quot;);
</del><ins>+        @throwTypeError(&quot;|this| is not a object&quot;);
</ins><span class="cx"> 
</span><span class="cx">     var promiseCapability = @newPromiseCapability(this);
</span><span class="cx"> 
</span><span class="lines">@@ -101,7 +101,7 @@
</span><span class="cx">     &quot;use strict&quot;;
</span><span class="cx"> 
</span><span class="cx">     if (!@isObject(this))
</span><del>-        throw new @TypeError(&quot;|this| is not a object&quot;);
</del><ins>+        @throwTypeError(&quot;|this| is not a object&quot;);
</ins><span class="cx"> 
</span><span class="cx">     var promiseCapability = @newPromiseCapability(this);
</span><span class="cx"> 
</span><span class="lines">@@ -115,7 +115,7 @@
</span><span class="cx">     &quot;use strict&quot;;
</span><span class="cx"> 
</span><span class="cx">     if (!@isObject(this))
</span><del>-        throw new @TypeError(&quot;|this| is not a object&quot;);
</del><ins>+        @throwTypeError(&quot;|this| is not a object&quot;);
</ins><span class="cx"> 
</span><span class="cx">     if (@isPromise(value)) {
</span><span class="cx">         var valueConstructor = value.constructor;
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorebuiltinsPromiseOperationsjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/builtins/PromiseOperations.js (206852 => 206853)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/builtins/PromiseOperations.js        2016-10-06 06:54:46 UTC (rev 206852)
+++ trunk/Source/JavaScriptCore/builtins/PromiseOperations.js        2016-10-06 07:44:23 UTC (rev 206853)
</span><span class="lines">@@ -51,7 +51,7 @@
</span><span class="cx">     &quot;use strict&quot;;
</span><span class="cx"> 
</span><span class="cx">     if (!@isConstructor(constructor))
</span><del>-        throw new @TypeError(&quot;promise capability requires a constructor function&quot;);
</del><ins>+        @throwTypeError(&quot;promise capability requires a constructor function&quot;);
</ins><span class="cx"> 
</span><span class="cx">     var promiseCapability = {
</span><span class="cx">         @promise: @undefined,
</span><span class="lines">@@ -62,9 +62,9 @@
</span><span class="cx">     function executor(resolve, reject)
</span><span class="cx">     {
</span><span class="cx">         if (promiseCapability.@resolve !== @undefined)
</span><del>-            throw new @TypeError(&quot;resolve function is already set&quot;);
</del><ins>+            @throwTypeError(&quot;resolve function is already set&quot;);
</ins><span class="cx">         if (promiseCapability.@reject !== @undefined)
</span><del>-            throw new @TypeError(&quot;reject function is already set&quot;);
</del><ins>+            @throwTypeError(&quot;reject function is already set&quot;);
</ins><span class="cx"> 
</span><span class="cx">         promiseCapability.@resolve = resolve;
</span><span class="cx">         promiseCapability.@reject = reject;
</span><span class="lines">@@ -73,10 +73,10 @@
</span><span class="cx">     var promise = new constructor(executor);
</span><span class="cx"> 
</span><span class="cx">     if (typeof promiseCapability.@resolve !== &quot;function&quot;)
</span><del>-        throw new @TypeError(&quot;executor did not take a resolve function&quot;);
</del><ins>+        @throwTypeError(&quot;executor did not take a resolve function&quot;);
</ins><span class="cx"> 
</span><span class="cx">     if (typeof promiseCapability.@reject !== &quot;function&quot;)
</span><del>-        throw new @TypeError(&quot;executor did not take a reject function&quot;);
</del><ins>+        @throwTypeError(&quot;executor did not take a reject function&quot;);
</ins><span class="cx"> 
</span><span class="cx">     promiseCapability.@promise = promise;
</span><span class="cx"> 
</span><span class="lines">@@ -208,7 +208,7 @@
</span><span class="cx">     &quot;use strict&quot;;
</span><span class="cx"> 
</span><span class="cx">     if (typeof executor !== 'function')
</span><del>-        throw new @TypeError(&quot;Promise constructor takes a function argument&quot;);
</del><ins>+        @throwTypeError(&quot;Promise constructor takes a function argument&quot;);
</ins><span class="cx"> 
</span><span class="cx">     this.@promiseState = @promiseStatePending;
</span><span class="cx">     this.@promiseFulfillReactions = [];
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorebuiltinsPromisePrototypejs"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/builtins/PromisePrototype.js (206852 => 206853)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/builtins/PromisePrototype.js        2016-10-06 06:54:46 UTC (rev 206852)
+++ trunk/Source/JavaScriptCore/builtins/PromisePrototype.js        2016-10-06 07:44:23 UTC (rev 206853)
</span><span class="lines">@@ -35,7 +35,7 @@
</span><span class="cx">     &quot;use strict&quot;;
</span><span class="cx"> 
</span><span class="cx">     if (!@isPromise(this))
</span><del>-        throw new @TypeError(&quot;|this| is not a object&quot;);
</del><ins>+        @throwTypeError(&quot;|this| is not a object&quot;);
</ins><span class="cx"> 
</span><span class="cx">     var constructor = @speciesConstructor(this, @Promise);
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorebuiltinsReflectObjectjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/builtins/ReflectObject.js (206852 => 206853)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/builtins/ReflectObject.js        2016-10-06 06:54:46 UTC (rev 206852)
+++ trunk/Source/JavaScriptCore/builtins/ReflectObject.js        2016-10-06 07:44:23 UTC (rev 206853)
</span><span class="lines">@@ -29,10 +29,10 @@
</span><span class="cx">     &quot;use strict&quot;;
</span><span class="cx"> 
</span><span class="cx">     if (typeof target !== &quot;function&quot;)
</span><del>-        throw new @TypeError(&quot;Reflect.apply requires the first argument be a function&quot;);
</del><ins>+        @throwTypeError(&quot;Reflect.apply requires the first argument be a function&quot;);
</ins><span class="cx"> 
</span><span class="cx">     if (!@isObject(argumentsList))
</span><del>-        throw new @TypeError(&quot;Reflect.apply requires the third argument be an object&quot;);
</del><ins>+        @throwTypeError(&quot;Reflect.apply requires the third argument be an object&quot;);
</ins><span class="cx"> 
</span><span class="cx">     return target.@apply(thisArgument, argumentsList);
</span><span class="cx"> }
</span><span class="lines">@@ -44,7 +44,7 @@
</span><span class="cx">     // raised by the delete operator under the strict mode.
</span><span class="cx"> 
</span><span class="cx">     if (!@isObject(target))
</span><del>-        throw new @TypeError(&quot;Reflect.deleteProperty requires the first argument be an object&quot;);
</del><ins>+        @throwTypeError(&quot;Reflect.deleteProperty requires the first argument be an object&quot;);
</ins><span class="cx"> 
</span><span class="cx">     return delete target[propertyKey];
</span><span class="cx"> }
</span><span class="lines">@@ -55,7 +55,7 @@
</span><span class="cx">     &quot;use strict&quot;;
</span><span class="cx"> 
</span><span class="cx">     if (!@isObject(target))
</span><del>-        throw new @TypeError(&quot;Reflect.has requires the first argument be an object&quot;);
</del><ins>+        @throwTypeError(&quot;Reflect.has requires the first argument be an object&quot;);
</ins><span class="cx"> 
</span><span class="cx">     return propertyKey in target;
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorebuiltinsRegExpPrototypejs"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/builtins/RegExpPrototype.js (206852 => 206853)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/builtins/RegExpPrototype.js        2016-10-06 06:54:46 UTC (rev 206852)
+++ trunk/Source/JavaScriptCore/builtins/RegExpPrototype.js        2016-10-06 07:44:23 UTC (rev 206853)
</span><span class="lines">@@ -56,7 +56,7 @@
</span><span class="cx">     if (exec !== builtinExec &amp;&amp; typeof exec === &quot;function&quot;) {
</span><span class="cx">         let result = exec.@call(regexp, str);
</span><span class="cx">         if (result !== null &amp;&amp; !@isObject(result))
</span><del>-            throw new @TypeError(&quot;The result of a RegExp exec must be null or an object&quot;);
</del><ins>+            @throwTypeError(&quot;The result of a RegExp exec must be null or an object&quot;);
</ins><span class="cx">         return result;
</span><span class="cx">     }
</span><span class="cx">     return builtinExec.@call(regexp, str);
</span><span class="lines">@@ -84,7 +84,7 @@
</span><span class="cx">     &quot;use strict&quot;;
</span><span class="cx"> 
</span><span class="cx">     if (!@isObject(this))
</span><del>-        throw new @TypeError(&quot;RegExp.prototype.@@match requires that |this| be an Object&quot;);
</del><ins>+        @throwTypeError(&quot;RegExp.prototype.@@match requires that |this| be an Object&quot;);
</ins><span class="cx"> 
</span><span class="cx">     let regexp = this;
</span><span class="cx"> 
</span><span class="lines">@@ -116,10 +116,10 @@
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         if (resultList.length &gt; maximumReasonableMatchSize)
</span><del>-            throw new @Error(&quot;Out of memory&quot;);
</del><ins>+            @throwOutOfMemoryError();
</ins><span class="cx"> 
</span><span class="cx">         if (!@isObject(result))
</span><del>-            throw new @TypeError(&quot;RegExp.prototype.@@match call to RegExp.exec didn't return null or an object&quot;);
</del><ins>+            @throwTypeError(&quot;RegExp.prototype.@@match call to RegExp.exec didn't return null or an object&quot;);
</ins><span class="cx"> 
</span><span class="cx">         let resultString = @toString(result[0]);
</span><span class="cx"> 
</span><span class="lines">@@ -208,7 +208,7 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     if (!@isObject(this))
</span><del>-        throw new @TypeError(&quot;RegExp.prototype.@@replace requires that |this| be an Object&quot;);
</del><ins>+        @throwTypeError(&quot;RegExp.prototype.@@replace requires that |this| be an Object&quot;);
</ins><span class="cx"> 
</span><span class="cx">     let regexp = this;
</span><span class="cx"> 
</span><span class="lines">@@ -309,7 +309,7 @@
</span><span class="cx">     // 1. Let rx be the this value.
</span><span class="cx">     // 2. If Type(rx) is not Object, throw a TypeError exception.
</span><span class="cx">     if (!@isObject(this))
</span><del>-        throw new @TypeError(&quot;RegExp.prototype.@@search requires that |this| be an Object&quot;);
</del><ins>+        @throwTypeError(&quot;RegExp.prototype.@@search requires that |this| be an Object&quot;);
</ins><span class="cx"> 
</span><span class="cx">     // 3. Let S be ? ToString(string).
</span><span class="cx">     let str = @toString(strArg)
</span><span class="lines">@@ -374,7 +374,7 @@
</span><span class="cx">     // 1. Let rx be the this value.
</span><span class="cx">     // 2. If Type(rx) is not Object, throw a TypeError exception.
</span><span class="cx">     if (!@isObject(this))
</span><del>-        throw new @TypeError(&quot;RegExp.prototype.@@split requires that |this| be an Object&quot;);
</del><ins>+        @throwTypeError(&quot;RegExp.prototype.@@split requires that |this| be an Object&quot;);
</ins><span class="cx">     let regexp = this;
</span><span class="cx"> 
</span><span class="cx">     // 3. Let S be ? ToString(string).
</span><span class="lines">@@ -514,7 +514,7 @@
</span><span class="cx">     // 1. Let R be the this value.
</span><span class="cx">     // 2. If Type(R) is not Object, throw a TypeError exception.
</span><span class="cx">     if (!@isObject(regexp))
</span><del>-        throw new @TypeError(&quot;RegExp.prototype.test requires that |this| be an Object&quot;);
</del><ins>+        @throwTypeError(&quot;RegExp.prototype.test requires that |this| be an Object&quot;);
</ins><span class="cx"> 
</span><span class="cx">     // 3. Let string be ? ToString(S).
</span><span class="cx">     let str = @toString(strArg);
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorebuiltinsSetPrototypejs"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/builtins/SetPrototype.js (206852 => 206853)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/builtins/SetPrototype.js        2016-10-06 06:54:46 UTC (rev 206852)
+++ trunk/Source/JavaScriptCore/builtins/SetPrototype.js        2016-10-06 07:44:23 UTC (rev 206853)
</span><span class="lines">@@ -28,10 +28,10 @@
</span><span class="cx">     &quot;use strict&quot;;
</span><span class="cx"> 
</span><span class="cx">     if (!@isSet(this))
</span><del>-        throw new @TypeError(&quot;Set operation called on non-Set object&quot;);
</del><ins>+        @throwTypeError(&quot;Set operation called on non-Set object&quot;);
</ins><span class="cx"> 
</span><span class="cx">     if (typeof callback !== 'function')
</span><del>-        throw new @TypeError(&quot;Set.prototype.forEach callback must be a function&quot;);
</del><ins>+        @throwTypeError(&quot;Set.prototype.forEach callback must be a function&quot;);
</ins><span class="cx"> 
</span><span class="cx">     var thisArg = arguments.length &gt; 1 ? arguments[1] : @undefined;
</span><span class="cx">     var iterator = @SetIterator(this);
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorebuiltinsStringConstructorjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/builtins/StringConstructor.js (206852 => 206853)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/builtins/StringConstructor.js        2016-10-06 06:54:46 UTC (rev 206852)
+++ trunk/Source/JavaScriptCore/builtins/StringConstructor.js        2016-10-06 07:44:23 UTC (rev 206853)
</span><span class="lines">@@ -28,12 +28,12 @@
</span><span class="cx">     &quot;use strict&quot;;
</span><span class="cx"> 
</span><span class="cx">     if (template === null || template === @undefined)
</span><del>-        throw new @TypeError(&quot;String.raw requires template not be null or undefined&quot;);
</del><ins>+        @throwTypeError(&quot;String.raw requires template not be null or undefined&quot;);
</ins><span class="cx">     var cookedSegments = @Object(template);
</span><span class="cx"> 
</span><span class="cx">     var rawValue = cookedSegments.raw;
</span><span class="cx">     if (rawValue === null || rawValue === @undefined)
</span><del>-        throw new @TypeError(&quot;String.raw requires template.raw not be null or undefined&quot;);
</del><ins>+        @throwTypeError(&quot;String.raw requires template.raw not be null or undefined&quot;);
</ins><span class="cx">     var rawSegments = @Object(rawValue);
</span><span class="cx"> 
</span><span class="cx">     var numberOfSubstitutions = arguments.length - 1;
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorebuiltinsStringIteratorPrototypejs"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/builtins/StringIteratorPrototype.js (206852 => 206853)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/builtins/StringIteratorPrototype.js        2016-10-06 06:54:46 UTC (rev 206852)
+++ trunk/Source/JavaScriptCore/builtins/StringIteratorPrototype.js        2016-10-06 07:44:23 UTC (rev 206853)
</span><span class="lines">@@ -28,11 +28,11 @@
</span><span class="cx">     &quot;use strict&quot;;
</span><span class="cx"> 
</span><span class="cx">     if (this == null)
</span><del>-        throw new @TypeError(&quot;%StringIteratorPrototype%.next requires that |this| not be null or undefined&quot;);
</del><ins>+        @throwTypeError(&quot;%StringIteratorPrototype%.next requires that |this| not be null or undefined&quot;);
</ins><span class="cx"> 
</span><span class="cx">     var position = this.@stringIteratorNextIndex;
</span><span class="cx">     if (position === @undefined)
</span><del>-        throw new @TypeError(&quot;%StringIteratorPrototype%.next requires that |this| be a String Iterator instance&quot;);
</del><ins>+        @throwTypeError(&quot;%StringIteratorPrototype%.next requires that |this| be a String Iterator instance&quot;);
</ins><span class="cx"> 
</span><span class="cx">     var done = true;
</span><span class="cx">     var value = @undefined;
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorebuiltinsStringPrototypejs"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/builtins/StringPrototype.js (206852 => 206853)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/builtins/StringPrototype.js        2016-10-06 06:54:46 UTC (rev 206852)
+++ trunk/Source/JavaScriptCore/builtins/StringPrototype.js        2016-10-06 07:44:23 UTC (rev 206853)
</span><span class="lines">@@ -30,7 +30,7 @@
</span><span class="cx">     &quot;use strict&quot;;
</span><span class="cx"> 
</span><span class="cx">     if (this == null)
</span><del>-        throw new @TypeError(&quot;String.prototype.match requires that |this| not be null or undefined&quot;);
</del><ins>+        @throwTypeError(&quot;String.prototype.match requires that |this| not be null or undefined&quot;);
</ins><span class="cx"> 
</span><span class="cx">     if (regexp != null) {
</span><span class="cx">         var matcher = regexp.@matchSymbol;
</span><span class="lines">@@ -57,7 +57,7 @@
</span><span class="cx">         return string;
</span><span class="cx"> 
</span><span class="cx">     if (string.length * count &gt; @MAX_STRING_LENGTH)
</span><del>-        throw new @Error(&quot;Out of memory&quot;);
</del><ins>+        @throwOutOfMemoryError();
</ins><span class="cx"> 
</span><span class="cx">     // Bit operation onto |count| is safe because |count| should be within Int32 range,
</span><span class="cx">     // Repeat log N times to generate the repeated string rope.
</span><span class="lines">@@ -102,13 +102,13 @@
</span><span class="cx">     &quot;use strict&quot;;
</span><span class="cx"> 
</span><span class="cx">     if (this == null)
</span><del>-        throw new @TypeError(&quot;String.prototype.repeat requires that |this| not be null or undefined&quot;);
</del><ins>+        @throwTypeError(&quot;String.prototype.repeat requires that |this| not be null or undefined&quot;);
</ins><span class="cx"> 
</span><span class="cx">     var string = @toString(this);
</span><span class="cx">     count = @toInteger(count);
</span><span class="cx"> 
</span><span class="cx">     if (count &lt; 0 || count === @Infinity)
</span><del>-        throw new @RangeError(&quot;String.prototype.repeat argument must be greater than or equal to 0 and not be Infinity&quot;);
</del><ins>+        @throwRangeError(&quot;String.prototype.repeat argument must be greater than or equal to 0 and not be Infinity&quot;);
</ins><span class="cx"> 
</span><span class="cx">     if (string.length === 1)
</span><span class="cx">         return @repeatCharacter(string, count);
</span><span class="lines">@@ -121,7 +121,7 @@
</span><span class="cx">     &quot;use strict&quot;;
</span><span class="cx"> 
</span><span class="cx">     if (this == null)
</span><del>-        throw new @TypeError(&quot;String.prototype.padStart requires that |this| not be null or undefined&quot;);
</del><ins>+        @throwTypeError(&quot;String.prototype.padStart requires that |this| not be null or undefined&quot;);
</ins><span class="cx"> 
</span><span class="cx">     var string = @toString(this);
</span><span class="cx">     maxLength = @toLength(maxLength);
</span><span class="lines">@@ -141,7 +141,7 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     if (maxLength &gt; @MAX_STRING_LENGTH)
</span><del>-        throw new @Error(&quot;Out of memory&quot;);
</del><ins>+        @throwOutOfMemoryError();
</ins><span class="cx"> 
</span><span class="cx">     var fillLength = maxLength - stringLength;
</span><span class="cx">     var truncatedStringFiller;
</span><span class="lines">@@ -158,7 +158,7 @@
</span><span class="cx">     &quot;use strict&quot;;
</span><span class="cx"> 
</span><span class="cx">     if (this == null)
</span><del>-        throw new @TypeError(&quot;String.prototype.padEnd requires that |this| not be null or undefined&quot;);
</del><ins>+        @throwTypeError(&quot;String.prototype.padEnd requires that |this| not be null or undefined&quot;);
</ins><span class="cx"> 
</span><span class="cx">     var string = @toString(this);
</span><span class="cx">     maxLength = @toLength(maxLength);
</span><span class="lines">@@ -178,7 +178,7 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     if (maxLength &gt; @MAX_STRING_LENGTH)
</span><del>-        throw new @Error(&quot;Out of memory&quot;);
</del><ins>+        @throwOutOfMemoryError();
</ins><span class="cx"> 
</span><span class="cx">     var fillLength = maxLength - stringLength;
</span><span class="cx">     var truncatedStringFiller;
</span><span class="lines">@@ -216,7 +216,7 @@
</span><span class="cx">     &quot;use strict&quot;;
</span><span class="cx"> 
</span><span class="cx">     if (this == null)
</span><del>-        throw new @TypeError(&quot;String.prototype.replace requires that |this| not be null or undefined&quot;);
</del><ins>+        @throwTypeError(&quot;String.prototype.replace requires that |this| not be null or undefined&quot;);
</ins><span class="cx"> 
</span><span class="cx">     if (search != null) {
</span><span class="cx">         let replacer = search.@replaceSymbol;
</span><span class="lines">@@ -241,7 +241,7 @@
</span><span class="cx"> 
</span><span class="cx">     // 1. Let O be RequireObjectCoercible(this value).
</span><span class="cx">     if (this == null)
</span><del>-        throw new @TypeError(&quot;String.prototype.localeCompare requires that |this| not be null or undefined&quot;);
</del><ins>+        @throwTypeError(&quot;String.prototype.localeCompare requires that |this| not be null or undefined&quot;);
</ins><span class="cx"> 
</span><span class="cx">     // 2. Let S be ToString(O).
</span><span class="cx">     // 3. ReturnIfAbrupt(S).
</span><span class="lines">@@ -268,7 +268,7 @@
</span><span class="cx">     &quot;use strict&quot;;
</span><span class="cx"> 
</span><span class="cx">     if (this == null)
</span><del>-        throw new @TypeError(&quot;String.prototype.search requires that |this| not be null or undefined&quot;);
</del><ins>+        @throwTypeError(&quot;String.prototype.search requires that |this| not be null or undefined&quot;);
</ins><span class="cx"> 
</span><span class="cx">     if (regexp != null) {
</span><span class="cx">         var searcher = regexp.@searchSymbol;
</span><span class="lines">@@ -286,7 +286,7 @@
</span><span class="cx">     &quot;use strict&quot;;
</span><span class="cx">     
</span><span class="cx">     if (this == null)
</span><del>-        throw new @TypeError(&quot;String.prototype.split requires that |this| not be null or undefined&quot;);
</del><ins>+        @throwTypeError(&quot;String.prototype.split requires that |this| not be null or undefined&quot;);
</ins><span class="cx">     
</span><span class="cx">     if (separator != null) {
</span><span class="cx">         var splitter = separator.@splitSymbol;
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorebuiltinsTypedArrayConstructorjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/builtins/TypedArrayConstructor.js (206852 => 206853)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/builtins/TypedArrayConstructor.js        2016-10-06 06:54:46 UTC (rev 206852)
+++ trunk/Source/JavaScriptCore/builtins/TypedArrayConstructor.js        2016-10-06 07:44:23 UTC (rev 206853)
</span><span class="lines">@@ -34,7 +34,7 @@
</span><span class="cx">     let len = arguments.length;
</span><span class="cx">     let constructFunction = this.@allocateTypedArray;
</span><span class="cx">     if (constructFunction === @undefined)
</span><del>-        throw new @TypeError(&quot;TypedArray.of requires its this argument to subclass a TypedArray constructor&quot;);
</del><ins>+        @throwTypeError(&quot;TypedArray.of requires its this argument to subclass a TypedArray constructor&quot;);
</ins><span class="cx"> 
</span><span class="cx">     let result = constructFunction(len);
</span><span class="cx"> 
</span><span class="lines">@@ -54,7 +54,7 @@
</span><span class="cx"> 
</span><span class="cx">     if (mapFn !== @undefined) {
</span><span class="cx">         if (typeof mapFn !== &quot;function&quot;)
</span><del>-            throw new @TypeError(&quot;TypedArray.from requires that the second argument, when provided, be a function&quot;);
</del><ins>+            @throwTypeError(&quot;TypedArray.from requires that the second argument, when provided, be a function&quot;);
</ins><span class="cx"> 
</span><span class="cx">         if (arguments.length &gt; 2)
</span><span class="cx">             thisArg = arguments[2];
</span><span class="lines">@@ -61,12 +61,12 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     if (items == null)
</span><del>-        throw new @TypeError(&quot;TypedArray.from requires an array-like object - not null or undefined&quot;);
</del><ins>+        @throwTypeError(&quot;TypedArray.from requires an array-like object - not null or undefined&quot;);
</ins><span class="cx"> 
</span><span class="cx">     let iteratorMethod = items.@iteratorSymbol;
</span><span class="cx">     if (iteratorMethod != null) {
</span><span class="cx">         if (typeof iteratorMethod !== &quot;function&quot;)
</span><del>-            throw new @TypeError(&quot;TypedArray.from requires that the property of the first argument, items[Symbol.iterator], when exists, be a function&quot;);
</del><ins>+            @throwTypeError(&quot;TypedArray.from requires that the property of the first argument, items[Symbol.iterator], when exists, be a function&quot;);
</ins><span class="cx"> 
</span><span class="cx">         let accumulator = [];
</span><span class="cx"> 
</span><span class="lines">@@ -89,7 +89,7 @@
</span><span class="cx"> 
</span><span class="cx">         let constructFunction = this.@allocateTypedArray;
</span><span class="cx">         if (constructFunction === @undefined)
</span><del>-            throw new @TypeError(&quot;TypedArray.from requires its this argument subclass a TypedArray constructor&quot;);
</del><ins>+            @throwTypeError(&quot;TypedArray.from requires its this argument subclass a TypedArray constructor&quot;);
</ins><span class="cx"> 
</span><span class="cx">         let result = constructFunction(k);
</span><span class="cx"> 
</span><span class="lines">@@ -105,7 +105,7 @@
</span><span class="cx"> 
</span><span class="cx">     let constructFunction = this.@allocateTypedArray;
</span><span class="cx">     if (constructFunction === @undefined)
</span><del>-        throw new @TypeError(&quot;this does not subclass a TypedArray constructor&quot;);
</del><ins>+        @throwTypeError(&quot;this does not subclass a TypedArray constructor&quot;);
</ins><span class="cx"> 
</span><span class="cx">     let result = constructFunction(arrayLikeLength);
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorebuiltinsTypedArrayPrototypejs"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/builtins/TypedArrayPrototype.js (206852 => 206853)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/builtins/TypedArrayPrototype.js        2016-10-06 06:54:46 UTC (rev 206852)
+++ trunk/Source/JavaScriptCore/builtins/TypedArrayPrototype.js        2016-10-06 07:44:23 UTC (rev 206853)
</span><span class="lines">@@ -40,7 +40,7 @@
</span><span class="cx">         return @typedArrayGetOriginalConstructor(value);
</span><span class="cx"> 
</span><span class="cx">     if (!@isObject(constructor))
</span><del>-        throw new @TypeError(&quot;|this|.constructor is not an Object or undefined&quot;);
</del><ins>+        @throwTypeError(&quot;|this|.constructor is not an Object or undefined&quot;);
</ins><span class="cx"> 
</span><span class="cx">     constructor = constructor.@speciesSymbol;
</span><span class="cx">     if (constructor == null)
</span><span class="lines">@@ -96,7 +96,7 @@
</span><span class="cx">     var thisArg = arguments.length &gt; 1 ? arguments[1] : @undefined;
</span><span class="cx"> 
</span><span class="cx">     if (typeof callback !== &quot;function&quot;)
</span><del>-        throw new @TypeError(&quot;TypedArray.prototype.every callback must be a function&quot;);
</del><ins>+        @throwTypeError(&quot;TypedArray.prototype.every callback must be a function&quot;);
</ins><span class="cx"> 
</span><span class="cx">     for (var i = 0; i &lt; length; i++) {
</span><span class="cx">         if (!callback.@call(thisArg, this[i], i, this))
</span><span class="lines">@@ -136,7 +136,7 @@
</span><span class="cx">     var thisArg = arguments.length &gt; 1 ? arguments[1] : @undefined;
</span><span class="cx"> 
</span><span class="cx">     if (typeof callback !== &quot;function&quot;)
</span><del>-        throw new @TypeError(&quot;TypedArray.prototype.find callback must be a function&quot;);
</del><ins>+        @throwTypeError(&quot;TypedArray.prototype.find callback must be a function&quot;);
</ins><span class="cx"> 
</span><span class="cx">     for (var i = 0; i &lt; length; i++) {
</span><span class="cx">         let elem = this[i];
</span><span class="lines">@@ -153,7 +153,7 @@
</span><span class="cx">     var thisArg = arguments.length &gt; 1 ? arguments[1] : @undefined;
</span><span class="cx"> 
</span><span class="cx">     if (typeof callback !== &quot;function&quot;)
</span><del>-        throw new @TypeError(&quot;TypedArray.prototype.findIndex callback must be a function&quot;);
</del><ins>+        @throwTypeError(&quot;TypedArray.prototype.findIndex callback must be a function&quot;);
</ins><span class="cx"> 
</span><span class="cx">     for (var i = 0; i &lt; length; i++) {
</span><span class="cx">         if (callback.@call(thisArg, this[i], i, this))
</span><span class="lines">@@ -169,7 +169,7 @@
</span><span class="cx">     var thisArg = arguments.length &gt; 1 ? arguments[1] : @undefined;
</span><span class="cx"> 
</span><span class="cx">     if (typeof callback !== &quot;function&quot;)
</span><del>-        throw new @TypeError(&quot;TypedArray.prototype.forEach callback must be a function&quot;);
</del><ins>+        @throwTypeError(&quot;TypedArray.prototype.forEach callback must be a function&quot;);
</ins><span class="cx"> 
</span><span class="cx">     for (var i = 0; i &lt; length; i++)
</span><span class="cx">         callback.@call(thisArg, this[i], i, this);
</span><span class="lines">@@ -183,7 +183,7 @@
</span><span class="cx">     var thisArg = arguments.length &gt; 1 ? arguments[1] : @undefined;
</span><span class="cx"> 
</span><span class="cx">     if (typeof callback !== &quot;function&quot;)
</span><del>-        throw new @TypeError(&quot;TypedArray.prototype.some callback must be a function&quot;);
</del><ins>+        @throwTypeError(&quot;TypedArray.prototype.some callback must be a function&quot;);
</ins><span class="cx"> 
</span><span class="cx">     for (var i = 0; i &lt; length; i++) {
</span><span class="cx">         if (callback.@call(thisArg, this[i], i, this))
</span><span class="lines">@@ -263,7 +263,7 @@
</span><span class="cx">     &quot;use strict&quot;;
</span><span class="cx"> 
</span><span class="cx">     if (!@isTypedArrayView(this))
</span><del>-        throw new @TypeError(&quot;|this| should be a typed array view&quot;);
</del><ins>+        @throwTypeError(&quot;|this| should be a typed array view&quot;);
</ins><span class="cx"> 
</span><span class="cx">     let start = @toInteger(begin);
</span><span class="cx">     let finish;
</span><span class="lines">@@ -283,10 +283,10 @@
</span><span class="cx">     var length = @typedArrayLength(this);
</span><span class="cx"> 
</span><span class="cx">     if (typeof callback !== &quot;function&quot;)
</span><del>-        throw new @TypeError(&quot;TypedArray.prototype.reduce callback must be a function&quot;);
</del><ins>+        @throwTypeError(&quot;TypedArray.prototype.reduce callback must be a function&quot;);
</ins><span class="cx"> 
</span><span class="cx">     if (length === 0 &amp;&amp; arguments.length &lt; 2)
</span><del>-        throw new @TypeError(&quot;TypedArray.prototype.reduce of empty array with no initial value&quot;);
</del><ins>+        @throwTypeError(&quot;TypedArray.prototype.reduce of empty array with no initial value&quot;);
</ins><span class="cx"> 
</span><span class="cx">     var accumulator, k = 0;
</span><span class="cx">     if (arguments.length &gt; 1)
</span><span class="lines">@@ -308,10 +308,10 @@
</span><span class="cx">     var length = @typedArrayLength(this);
</span><span class="cx"> 
</span><span class="cx">     if (typeof callback !== &quot;function&quot;)
</span><del>-        throw new @TypeError(&quot;TypedArray.prototype.reduceRight callback must be a function&quot;);
</del><ins>+        @throwTypeError(&quot;TypedArray.prototype.reduceRight callback must be a function&quot;);
</ins><span class="cx"> 
</span><span class="cx">     if (length === 0 &amp;&amp; arguments.length &lt; 2)
</span><del>-        throw new @TypeError(&quot;TypedArray.prototype.reduceRight of empty array with no initial value&quot;);
</del><ins>+        @throwTypeError(&quot;TypedArray.prototype.reduceRight of empty array with no initial value&quot;);
</ins><span class="cx"> 
</span><span class="cx">     var accumulator, k = length - 1;
</span><span class="cx">     if (arguments.length &gt; 1)
</span><span class="lines">@@ -333,7 +333,7 @@
</span><span class="cx">     var length = @typedArrayLength(this);
</span><span class="cx"> 
</span><span class="cx">     if (typeof callback !== &quot;function&quot;)
</span><del>-        throw new @TypeError(&quot;TypedArray.prototype.map callback must be a function&quot;);
</del><ins>+        @throwTypeError(&quot;TypedArray.prototype.map callback must be a function&quot;);
</ins><span class="cx"> 
</span><span class="cx">     var thisArg = arguments.length &gt; 1 ? arguments[1] : @undefined;
</span><span class="cx"> 
</span><span class="lines">@@ -367,7 +367,7 @@
</span><span class="cx">     var length = @typedArrayLength(this);
</span><span class="cx"> 
</span><span class="cx">     if (typeof callback !== &quot;function&quot;)
</span><del>-        throw new @TypeError(&quot;TypedArray.prototype.filter callback must be a function&quot;);
</del><ins>+        @throwTypeError(&quot;TypedArray.prototype.filter callback must be a function&quot;);
</ins><span class="cx"> 
</span><span class="cx">     var thisArg = arguments.length &gt; 1 ? arguments[1] : @undefined;
</span><span class="cx">     var kept = [];
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorebytecodeBytecodeIntrinsicRegistryh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/bytecode/BytecodeIntrinsicRegistry.h (206852 => 206853)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/bytecode/BytecodeIntrinsicRegistry.h        2016-10-06 06:54:46 UTC (rev 206852)
+++ trunk/Source/JavaScriptCore/bytecode/BytecodeIntrinsicRegistry.h        2016-10-06 07:44:23 UTC (rev 206853)
</span><span class="lines">@@ -48,6 +48,9 @@
</span><span class="cx">     macro(isMap) \
</span><span class="cx">     macro(isSet) \
</span><span class="cx">     macro(tailCallForwardArguments) \
</span><ins>+    macro(throwTypeError) \
+    macro(throwRangeError) \
+    macro(throwOutOfMemoryError) \
</ins><span class="cx">     macro(tryGetById) \
</span><span class="cx">     macro(putByValDirect) \
</span><span class="cx">     macro(toNumber) \
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorebytecodeCodeBlockcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/bytecode/CodeBlock.cpp (206852 => 206853)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/bytecode/CodeBlock.cpp        2016-10-06 06:54:46 UTC (rev 206852)
+++ trunk/Source/JavaScriptCore/bytecode/CodeBlock.cpp        2016-10-06 07:44:23 UTC (rev 206853)
</span><span class="lines">@@ -1674,9 +1674,10 @@
</span><span class="cx">         }
</span><span class="cx">         case op_throw_static_error: {
</span><span class="cx">             int k0 = (++it)-&gt;u.operand;
</span><del>-            int k1 = (++it)-&gt;u.operand;
</del><ins>+            ErrorType k1 = static_cast&lt;ErrorType&gt;((++it)-&gt;u.unsignedValue);
</ins><span class="cx">             printLocationAndOp(out, exec, location, it, &quot;throw_static_error&quot;);
</span><del>-            out.printf(&quot;%s, %s&quot;, constantName(k0).data(), k1 ? &quot;true&quot; : &quot;false&quot;);
</del><ins>+            out.printf(&quot;%s, &quot;, constantName(k0).data());
+            out.print(k1);
</ins><span class="cx">             break;
</span><span class="cx">         }
</span><span class="cx">         case op_debug: {
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorebytecompilerBytecodeGeneratorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp (206852 => 206853)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp        2016-10-06 06:54:46 UTC (rev 206852)
+++ trunk/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp        2016-10-06 07:44:23 UTC (rev 206853)
</span><span class="lines">@@ -3905,20 +3905,38 @@
</span><span class="cx">     return localScopeDepth() + m_finallyDepth;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void BytecodeGenerator::emitThrowReferenceError(const String&amp; message)
</del><ins>+void BytecodeGenerator::emitThrowStaticError(ErrorType errorType, const Identifier&amp; message)
</ins><span class="cx"> {
</span><span class="cx">     emitOpcode(op_throw_static_error);
</span><del>-    instructions().append(addConstantValue(addStringConstant(Identifier::fromString(m_vm, message)))-&gt;index());
-    instructions().append(true);
</del><ins>+    instructions().append(addConstantValue(addStringConstant(message))-&gt;index());
+    instructions().append(static_cast&lt;unsigned&gt;(errorType));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void BytecodeGenerator::emitThrowReferenceError(const String&amp; message)
+{
+    emitThrowStaticError(ErrorType::ReferenceError, Identifier::fromString(m_vm, message));
+}
+
</ins><span class="cx"> void BytecodeGenerator::emitThrowTypeError(const String&amp; message)
</span><span class="cx"> {
</span><del>-    emitOpcode(op_throw_static_error);
-    instructions().append(addConstantValue(addStringConstant(Identifier::fromString(m_vm, message)))-&gt;index());
-    instructions().append(false);
</del><ins>+    emitThrowStaticError(ErrorType::TypeError, Identifier::fromString(m_vm, message));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void BytecodeGenerator::emitThrowTypeError(const Identifier&amp; message)
+{
+    emitThrowStaticError(ErrorType::TypeError, message);
+}
+
+void BytecodeGenerator::emitThrowRangeError(const Identifier&amp; message)
+{
+    emitThrowStaticError(ErrorType::RangeError, message);
+}
+
+void BytecodeGenerator::emitThrowOutOfMemoryError()
+{
+    emitThrowStaticError(ErrorType::Error, Identifier::fromString(m_vm, &quot;Out of memory&quot;));
+}
+
</ins><span class="cx"> void BytecodeGenerator::emitPushFunctionNameScope(const Identifier&amp; property, RegisterID* callee, bool isCaptured)
</span><span class="cx"> {
</span><span class="cx">     // There is some nuance here:
</span><span class="lines">@@ -4104,9 +4122,7 @@
</span><span class="cx">     // If we're in strict mode, we always throw.
</span><span class="cx">     // If we're not in strict mode, we throw for &quot;const&quot; variables but not the function callee.
</span><span class="cx">     if (isStrictMode() || variable.isConst()) {
</span><del>-        emitOpcode(op_throw_static_error);
-        instructions().append(addConstantValue(addStringConstant(Identifier::fromString(m_vm, StrictModeReadonlyPropertyWriteError)))-&gt;index());
-        instructions().append(false);
</del><ins>+        emitThrowTypeError(Identifier::fromString(m_vm, StrictModeReadonlyPropertyWriteError));
</ins><span class="cx">         return true;
</span><span class="cx">     }
</span><span class="cx">     return false;
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorebytecompilerBytecodeGeneratorh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.h (206852 => 206853)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.h        2016-10-06 06:54:46 UTC (rev 206852)
+++ trunk/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.h        2016-10-06 07:44:23 UTC (rev 206853)
</span><span class="lines">@@ -662,8 +662,12 @@
</span><span class="cx">             emitUnaryNoDstOp(op_throw, exc);
</span><span class="cx">         }
</span><span class="cx"> 
</span><ins>+        void emitThrowStaticError(ErrorType, const Identifier&amp; message);
</ins><span class="cx">         void emitThrowReferenceError(const String&amp; message);
</span><span class="cx">         void emitThrowTypeError(const String&amp; message);
</span><ins>+        void emitThrowTypeError(const Identifier&amp; message);
+        void emitThrowRangeError(const Identifier&amp; message);
+        void emitThrowOutOfMemoryError();
</ins><span class="cx"> 
</span><span class="cx">         void emitPushCatchScope(VariableEnvironment&amp;);
</span><span class="cx">         void emitPopCatchScope(VariableEnvironment&amp;);
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorebytecompilerNodesCodegencpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp (206852 => 206853)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp        2016-10-06 06:54:46 UTC (rev 206852)
+++ trunk/Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp        2016-10-06 07:44:23 UTC (rev 206853)
</span><span class="lines">@@ -898,6 +898,36 @@
</span><span class="cx">     return generator.emitCallForwardArgumentsInTailPosition(finalDst.get(), function.get(), thisRegister.get(), generator.newTemporary(), 0, divot(), divotStart(), divotEnd(), DebuggableCall::No);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+RegisterID* BytecodeIntrinsicNode::emit_intrinsic_throwTypeError(BytecodeGenerator&amp; generator, RegisterID* dst)
+{
+    ArgumentListNode* node = m_args-&gt;m_listNode;
+    ASSERT(node-&gt;m_expr-&gt;isString());
+    const Identifier&amp; ident = static_cast&lt;StringNode*&gt;(node-&gt;m_expr)-&gt;value();
+    ASSERT(!node-&gt;m_next);
+
+    generator.emitThrowTypeError(ident);
+    return dst;
+}
+
+RegisterID* BytecodeIntrinsicNode::emit_intrinsic_throwRangeError(BytecodeGenerator&amp; generator, RegisterID* dst)
+{
+    ArgumentListNode* node = m_args-&gt;m_listNode;
+    ASSERT(node-&gt;m_expr-&gt;isString());
+    const Identifier&amp; ident = static_cast&lt;StringNode*&gt;(node-&gt;m_expr)-&gt;value();
+    ASSERT(!node-&gt;m_next);
+
+    generator.emitThrowRangeError(ident);
+    return dst;
+}
+
+RegisterID* BytecodeIntrinsicNode::emit_intrinsic_throwOutOfMemoryError(BytecodeGenerator&amp; generator, RegisterID* dst)
+{
+    ASSERT(!m_args-&gt;m_listNode);
+
+    generator.emitThrowOutOfMemoryError();
+    return dst;
+}
+
</ins><span class="cx"> RegisterID* BytecodeIntrinsicNode::emit_intrinsic_tryGetById(BytecodeGenerator&amp; generator, RegisterID* dst)
</span><span class="cx"> {
</span><span class="cx">     ArgumentListNode* node = m_args-&gt;m_listNode;
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoredfgDFGAbstractInterpreterInlinesh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/dfg/DFGAbstractInterpreterInlines.h (206852 => 206853)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/dfg/DFGAbstractInterpreterInlines.h        2016-10-06 06:54:46 UTC (rev 206852)
+++ trunk/Source/JavaScriptCore/dfg/DFGAbstractInterpreterInlines.h        2016-10-06 07:44:23 UTC (rev 206853)
</span><span class="lines">@@ -1785,7 +1785,7 @@
</span><span class="cx">         break;
</span><span class="cx">         
</span><span class="cx">     case Throw:
</span><del>-    case ThrowReferenceError:
</del><ins>+    case ThrowStaticError:
</ins><span class="cx">         m_state.setIsValid(false);
</span><span class="cx">         break;
</span><span class="cx">             
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoredfgDFGByteCodeParsercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp (206852 => 206853)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp        2016-10-06 06:54:46 UTC (rev 206852)
+++ trunk/Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp        2016-10-06 07:44:23 UTC (rev 206853)
</span><span class="lines">@@ -4660,7 +4660,7 @@
</span><span class="cx">             LAST_OPCODE(op_throw);
</span><span class="cx">             
</span><span class="cx">         case op_throw_static_error:
</span><del>-            addToGraph(ThrowReferenceError);
</del><ins>+            addToGraph(ThrowStaticError);
</ins><span class="cx">             flushForTerminal();
</span><span class="cx">             addToGraph(Unreachable);
</span><span class="cx">             LAST_OPCODE(op_throw_static_error);
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoredfgDFGClobberizeh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/dfg/DFGClobberize.h (206852 => 206853)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/dfg/DFGClobberize.h        2016-10-06 06:54:46 UTC (rev 206852)
+++ trunk/Source/JavaScriptCore/dfg/DFGClobberize.h        2016-10-06 07:44:23 UTC (rev 206853)
</span><span class="lines">@@ -1265,7 +1265,7 @@
</span><span class="cx">             return;
</span><span class="cx">         }
</span><span class="cx">         
</span><del>-    case ThrowReferenceError:
</del><ins>+    case ThrowStaticError:
</ins><span class="cx">         write(SideState);
</span><span class="cx">         return;
</span><span class="cx">         
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoredfgDFGDoesGCcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/dfg/DFGDoesGC.cpp (206852 => 206853)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/dfg/DFGDoesGC.cpp        2016-10-06 06:54:46 UTC (rev 206852)
+++ trunk/Source/JavaScriptCore/dfg/DFGDoesGC.cpp        2016-10-06 07:44:23 UTC (rev 206853)
</span><span class="lines">@@ -282,7 +282,7 @@
</span><span class="cx">     case NewFunction:
</span><span class="cx">     case NewGeneratorFunction:
</span><span class="cx">     case NewTypedArray:
</span><del>-    case ThrowReferenceError:
</del><ins>+    case ThrowStaticError:
</ins><span class="cx">     case GetPropertyEnumerator:
</span><span class="cx">     case GetEnumeratorStructurePname:
</span><span class="cx">     case GetEnumeratorGenericPname:
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoredfgDFGFixupPhasecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/dfg/DFGFixupPhase.cpp (206852 => 206853)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/dfg/DFGFixupPhase.cpp        2016-10-06 06:54:46 UTC (rev 206852)
+++ trunk/Source/JavaScriptCore/dfg/DFGFixupPhase.cpp        2016-10-06 07:44:23 UTC (rev 206853)
</span><span class="lines">@@ -1757,7 +1757,7 @@
</span><span class="cx">         case TailCall:
</span><span class="cx">         case TailCallVarargs:
</span><span class="cx">         case Throw:
</span><del>-        case ThrowReferenceError:
</del><ins>+        case ThrowStaticError:
</ins><span class="cx">         case CountExecution:
</span><span class="cx">         case ForceOSRExit:
</span><span class="cx">         case CheckBadCell:
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoredfgDFGNodeTypeh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/dfg/DFGNodeType.h (206852 => 206853)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/dfg/DFGNodeType.h        2016-10-06 06:54:46 UTC (rev 206852)
+++ trunk/Source/JavaScriptCore/dfg/DFGNodeType.h        2016-10-06 07:44:23 UTC (rev 206853)
</span><span class="lines">@@ -350,7 +350,7 @@
</span><span class="cx">     \
</span><span class="cx">     /* These aren't terminals but always exit */ \
</span><span class="cx">     macro(Throw, NodeMustGenerate) \
</span><del>-    macro(ThrowReferenceError, NodeMustGenerate) \
</del><ins>+    macro(ThrowStaticError, NodeMustGenerate) \
</ins><span class="cx">     \
</span><span class="cx">     /* Block terminals. */\
</span><span class="cx">     macro(Jump, NodeMustGenerate) \
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoredfgDFGPredictionPropagationPhasecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/dfg/DFGPredictionPropagationPhase.cpp (206852 => 206853)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/dfg/DFGPredictionPropagationPhase.cpp        2016-10-06 06:54:46 UTC (rev 206852)
+++ trunk/Source/JavaScriptCore/dfg/DFGPredictionPropagationPhase.cpp        2016-10-06 07:44:23 UTC (rev 206853)
</span><span class="lines">@@ -1057,7 +1057,7 @@
</span><span class="cx">         case Switch:
</span><span class="cx">         case ProfileType:
</span><span class="cx">         case ProfileControlFlow:
</span><del>-        case ThrowReferenceError:
</del><ins>+        case ThrowStaticError:
</ins><span class="cx">         case ForceOSRExit:
</span><span class="cx">         case SetArgument:
</span><span class="cx">         case SetFunctionName:
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoredfgDFGSafeToExecuteh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/dfg/DFGSafeToExecute.h (206852 => 206853)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/dfg/DFGSafeToExecute.h        2016-10-06 06:54:46 UTC (rev 206852)
+++ trunk/Source/JavaScriptCore/dfg/DFGSafeToExecute.h        2016-10-06 07:44:23 UTC (rev 206853)
</span><span class="lines">@@ -304,7 +304,7 @@
</span><span class="cx">     case TailCallVarargs:
</span><span class="cx">     case TailCallForwardVarargs:
</span><span class="cx">     case Throw:
</span><del>-    case ThrowReferenceError:
</del><ins>+    case ThrowStaticError:
</ins><span class="cx">     case CountExecution:
</span><span class="cx">     case ForceOSRExit:
</span><span class="cx">     case CheckWatchdogTimer:
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoredfgDFGSpeculativeJIT32_64cpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT32_64.cpp (206852 => 206853)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT32_64.cpp        2016-10-06 06:54:46 UTC (rev 206852)
+++ trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT32_64.cpp        2016-10-06 07:44:23 UTC (rev 206853)
</span><span class="lines">@@ -3479,7 +3479,7 @@
</span><span class="cx">     }
</span><span class="cx">         
</span><span class="cx">     case Throw:
</span><del>-    case ThrowReferenceError: {
</del><ins>+    case ThrowStaticError: {
</ins><span class="cx">         // We expect that throw statements are rare and are intended to exit the code block
</span><span class="cx">         // anyway, so we just OSR back to the old JIT for now.
</span><span class="cx">         terminateSpeculativeExecution(Uncountable, JSValueRegs(), 0);
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoredfgDFGSpeculativeJIT64cpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT64.cpp (206852 => 206853)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT64.cpp        2016-10-06 06:54:46 UTC (rev 206852)
+++ trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT64.cpp        2016-10-06 07:44:23 UTC (rev 206853)
</span><span class="lines">@@ -3479,7 +3479,7 @@
</span><span class="cx">     }
</span><span class="cx">         
</span><span class="cx">     case Throw:
</span><del>-    case ThrowReferenceError: {
</del><ins>+    case ThrowStaticError: {
</ins><span class="cx">         // We expect that throw statements are rare and are intended to exit the code block
</span><span class="cx">         // anyway, so we just OSR back to the old JIT for now.
</span><span class="cx">         terminateSpeculativeExecution(Uncountable, JSValueRegs(), 0);
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreftlFTLCapabilitiescpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/ftl/FTLCapabilities.cpp (206852 => 206853)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/ftl/FTLCapabilities.cpp        2016-10-06 06:54:46 UTC (rev 206852)
+++ trunk/Source/JavaScriptCore/ftl/FTLCapabilities.cpp        2016-10-06 07:44:23 UTC (rev 206853)
</span><span class="lines">@@ -179,7 +179,7 @@
</span><span class="cx">     case MultiPutByOffset:
</span><span class="cx">     case ToPrimitive:
</span><span class="cx">     case Throw:
</span><del>-    case ThrowReferenceError:
</del><ins>+    case ThrowStaticError:
</ins><span class="cx">     case Unreachable:
</span><span class="cx">     case In:
</span><span class="cx">     case HasOwnProperty:
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreftlFTLLowerDFGToB3cpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp (206852 => 206853)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp        2016-10-06 06:54:46 UTC (rev 206852)
+++ trunk/Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp        2016-10-06 07:44:23 UTC (rev 206853)
</span><span class="lines">@@ -890,7 +890,7 @@
</span><span class="cx">             compileForceOSRExit();
</span><span class="cx">             break;
</span><span class="cx">         case Throw:
</span><del>-        case ThrowReferenceError:
</del><ins>+        case ThrowStaticError:
</ins><span class="cx">             compileThrow();
</span><span class="cx">             break;
</span><span class="cx">         case InvalidationPoint:
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorejitJITOpcodescpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/jit/JITOpcodes.cpp (206852 => 206853)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/jit/JITOpcodes.cpp        2016-10-06 06:54:46 UTC (rev 206852)
+++ trunk/Source/JavaScriptCore/jit/JITOpcodes.cpp        2016-10-06 07:44:23 UTC (rev 206853)
</span><span class="lines">@@ -618,12 +618,6 @@
</span><span class="cx">     jump(returnValueGPR);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void JIT::emit_op_throw_static_error(Instruction* currentInstruction)
-{
-    move(TrustedImm64(JSValue::encode(m_codeBlock-&gt;getConstant(currentInstruction[1].u.operand))), regT0);
-    callOperation(operationThrowStaticError, regT0, currentInstruction[2].u.operand);
-}
-
</del><span class="cx"> void JIT::emit_op_debug(Instruction* currentInstruction)
</span><span class="cx"> {
</span><span class="cx">     load32(codeBlock()-&gt;debuggerRequestsAddress(), regT0);
</span><span class="lines">@@ -938,6 +932,12 @@
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void JIT::emit_op_throw_static_error(Instruction* currentInstruction)
+{
+    JITSlowPathCall slowPathCall(this, currentInstruction, slow_path_throw_static_error);
+    slowPathCall.call();
+}
+
</ins><span class="cx"> void JIT::emit_op_watchdog(Instruction*)
</span><span class="cx"> {
</span><span class="cx">     ASSERT(m_vm-&gt;watchdog());
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorejitJITOpcodes32_64cpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/jit/JITOpcodes32_64.cpp (206852 => 206853)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/jit/JITOpcodes32_64.cpp        2016-10-06 06:54:46 UTC (rev 206852)
+++ trunk/Source/JavaScriptCore/jit/JITOpcodes32_64.cpp        2016-10-06 07:44:23 UTC (rev 206853)
</span><span class="lines">@@ -919,12 +919,6 @@
</span><span class="cx">     jump(returnValueGPR);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void JIT::emit_op_throw_static_error(Instruction* currentInstruction)
-{
-    emitLoad(m_codeBlock-&gt;getConstant(currentInstruction[1].u.operand), regT1, regT0);
-    callOperation(operationThrowStaticError, regT1, regT0, currentInstruction[2].u.operand);
-}
-
</del><span class="cx"> void JIT::emit_op_debug(Instruction* currentInstruction)
</span><span class="cx"> {
</span><span class="cx">     load32(codeBlock()-&gt;debuggerRequestsAddress(), regT0);
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorejitJITOperationscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/jit/JITOperations.cpp (206852 => 206853)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/jit/JITOperations.cpp        2016-10-06 06:54:46 UTC (rev 206852)
+++ trunk/Source/JavaScriptCore/jit/JITOperations.cpp        2016-10-06 07:44:23 UTC (rev 206853)
</span><span class="lines">@@ -1164,21 +1164,6 @@
</span><span class="cx">     return nullptr;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void JIT_OPERATION operationThrowStaticError(ExecState* exec, EncodedJSValue encodedValue, int32_t referenceErrorFlag)
-{
-    VM&amp; vm = exec-&gt;vm();
-    NativeCallFrameTracer tracer(&amp;vm, exec);
-    auto scope = DECLARE_THROW_SCOPE(vm);
-
-    JSValue errorMessageValue = JSValue::decode(encodedValue);
-    RELEASE_ASSERT(errorMessageValue.isString());
-    String errorMessage = asString(errorMessageValue)-&gt;value(exec);
-    if (referenceErrorFlag)
-        throwException(exec, scope, createReferenceError(exec, errorMessage));
-    else
-        throwTypeError(exec, scope, errorMessage);
-}
-
</del><span class="cx"> void JIT_OPERATION operationDebug(ExecState* exec, int32_t debugHookType)
</span><span class="cx"> {
</span><span class="cx">     VM&amp; vm = exec-&gt;vm();
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorejitJITOperationsh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/jit/JITOperations.h (206852 => 206853)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/jit/JITOperations.h        2016-10-06 06:54:46 UTC (rev 206852)
+++ trunk/Source/JavaScriptCore/jit/JITOperations.h        2016-10-06 07:44:23 UTC (rev 206853)
</span><span class="lines">@@ -376,7 +376,6 @@
</span><span class="cx"> JSCell* JIT_OPERATION operationNewObject(ExecState*, Structure*) WTF_INTERNAL;
</span><span class="cx"> EncodedJSValue JIT_OPERATION operationNewRegexp(ExecState*, void*) WTF_INTERNAL;
</span><span class="cx"> UnusedPtr JIT_OPERATION operationHandleWatchdogTimer(ExecState*) WTF_INTERNAL;
</span><del>-void JIT_OPERATION operationThrowStaticError(ExecState*, EncodedJSValue, int32_t) WTF_INTERNAL;
</del><span class="cx"> void JIT_OPERATION operationThrow(ExecState*, EncodedJSValue) WTF_INTERNAL;
</span><span class="cx"> void JIT_OPERATION operationDebug(ExecState*, int32_t) WTF_INTERNAL;
</span><span class="cx"> #if ENABLE(DFG_JIT)
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorellintLLIntSlowPathscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/llint/LLIntSlowPaths.cpp (206852 => 206853)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/llint/LLIntSlowPaths.cpp        2016-10-06 06:54:46 UTC (rev 206852)
+++ trunk/Source/JavaScriptCore/llint/LLIntSlowPaths.cpp        2016-10-06 07:44:23 UTC (rev 206853)
</span><span class="lines">@@ -1474,18 +1474,6 @@
</span><span class="cx">     LLINT_THROW(LLINT_OP_C(1).jsValue());
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-LLINT_SLOW_PATH_DECL(slow_path_throw_static_error)
-{
-    LLINT_BEGIN();
-    JSValue errorMessageValue = LLINT_OP_C(1).jsValue();
-    RELEASE_ASSERT(errorMessageValue.isString());
-    String errorMessage = asString(errorMessageValue)-&gt;value(exec);
-    if (pc[2].u.operand)
-        LLINT_THROW(createReferenceError(exec, errorMessage));
-    else
-        LLINT_THROW(createTypeError(exec, errorMessage));
-}
-
</del><span class="cx"> LLINT_SLOW_PATH_DECL(slow_path_handle_watchdog_timer)
</span><span class="cx"> {
</span><span class="cx">     LLINT_BEGIN_NO_SET_PC();
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorellintLLIntSlowPathsh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/llint/LLIntSlowPaths.h (206852 => 206853)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/llint/LLIntSlowPaths.h        2016-10-06 06:54:46 UTC (rev 206852)
+++ trunk/Source/JavaScriptCore/llint/LLIntSlowPaths.h        2016-10-06 07:44:23 UTC (rev 206853)
</span><span class="lines">@@ -116,7 +116,6 @@
</span><span class="cx"> LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_strcat);
</span><span class="cx"> LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_to_primitive);
</span><span class="cx"> LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_throw);
</span><del>-LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_throw_static_error);
</del><span class="cx"> LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_handle_watchdog_timer);
</span><span class="cx"> LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_debug);
</span><span class="cx"> LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_handle_exception);
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorellintLowLevelInterpreterasm"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/llint/LowLevelInterpreter.asm (206852 => 206853)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/llint/LowLevelInterpreter.asm        2016-10-06 06:54:46 UTC (rev 206852)
+++ trunk/Source/JavaScriptCore/llint/LowLevelInterpreter.asm        2016-10-06 07:44:23 UTC (rev 206853)
</span><span class="lines">@@ -1741,7 +1741,7 @@
</span><span class="cx"> 
</span><span class="cx"> _llint_op_throw_static_error:
</span><span class="cx">     traceExecution()
</span><del>-    callOpcodeSlowPath(_llint_slow_path_throw_static_error)
</del><ins>+    callOpcodeSlowPath(_slow_path_throw_static_error)
</ins><span class="cx">     dispatch(3)
</span><span class="cx"> 
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeCommonSlowPathscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/CommonSlowPaths.cpp (206852 => 206853)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/CommonSlowPaths.cpp        2016-10-06 06:54:46 UTC (rev 206852)
+++ trunk/Source/JavaScriptCore/runtime/CommonSlowPaths.cpp        2016-10-06 07:44:23 UTC (rev 206853)
</span><span class="lines">@@ -966,4 +966,14 @@
</span><span class="cx">     END();
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+SLOW_PATH_DECL(slow_path_throw_static_error)
+{
+    BEGIN();
+    JSValue errorMessageValue = OP_C(1).jsValue();
+    RELEASE_ASSERT(errorMessageValue.isString());
+    String errorMessage = asString(errorMessageValue)-&gt;value(exec);
+    ErrorType errorType = static_cast&lt;ErrorType&gt;(pc[2].u.unsignedValue);
+    THROW(createError(exec, errorType, errorMessage));
+}
+
</ins><span class="cx"> } // namespace JSC
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeCommonSlowPathsh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/CommonSlowPaths.h (206852 => 206853)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/CommonSlowPaths.h        2016-10-06 06:54:46 UTC (rev 206852)
+++ trunk/Source/JavaScriptCore/runtime/CommonSlowPaths.h        2016-10-06 07:44:23 UTC (rev 206853)
</span><span class="lines">@@ -258,5 +258,6 @@
</span><span class="cx"> SLOW_PATH_HIDDEN_DECL(slow_path_put_by_val_with_this);
</span><span class="cx"> SLOW_PATH_HIDDEN_DECL(slow_path_define_data_property);
</span><span class="cx"> SLOW_PATH_HIDDEN_DECL(slow_path_define_accessor_property);
</span><ins>+SLOW_PATH_HIDDEN_DECL(slow_path_throw_static_error);
</ins><span class="cx"> 
</span><span class="cx"> } // namespace JSC
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeErrorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/Error.cpp (206852 => 206853)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/Error.cpp        2016-10-06 06:54:46 UTC (rev 206852)
+++ trunk/Source/JavaScriptCore/runtime/Error.cpp        2016-10-06 07:44:23 UTC (rev 206853)
</span><span class="lines">@@ -98,6 +98,28 @@
</span><span class="cx">     return ErrorInstance::create(exec, globalObject-&gt;vm(), globalObject-&gt;URIErrorConstructor()-&gt;errorStructure(), message, appender, TypeNothing, true);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+JSObject* createError(ExecState* exec, ErrorType errorType, const String&amp; message)
+{
+    switch (errorType) {
+    case ErrorType::Error:
+        return createError(exec, message);
+    case ErrorType::EvalError:
+        return createEvalError(exec, message);
+    case ErrorType::RangeError:
+        return createRangeError(exec, message);
+    case ErrorType::ReferenceError:
+        return createReferenceError(exec, message);
+    case ErrorType::SyntaxError:
+        return createSyntaxError(exec, message);
+    case ErrorType::TypeError:
+        return createTypeError(exec, message);
+    case ErrorType::URIError:
+        return createURIError(exec, message);
+    }
+    ASSERT_NOT_REACHED();
+    return nullptr;
+}
+
</ins><span class="cx"> class FindFirstCallerFrameWithCodeblockFunctor {
</span><span class="cx"> public:
</span><span class="cx">     FindFirstCallerFrameWithCodeblockFunctor(CallFrame* startCallFrame)
</span><span class="lines">@@ -282,3 +304,36 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> } // namespace JSC
</span><ins>+
+namespace WTF {
+
+using namespace JSC;
+
+void printInternal(PrintStream&amp; out, JSC::ErrorType errorType)
+{
+    switch (errorType) {
+    case JSC::ErrorType::Error:
+        out.print(&quot;Error&quot;);
+        break;
+    case JSC::ErrorType::EvalError:
+        out.print(&quot;EvalError&quot;);
+        break;
+    case JSC::ErrorType::RangeError:
+        out.print(&quot;RangeError&quot;);
+        break;
+    case JSC::ErrorType::ReferenceError:
+        out.print(&quot;ReferenceError&quot;);
+        break;
+    case JSC::ErrorType::SyntaxError:
+        out.print(&quot;SyntaxError&quot;);
+        break;
+    case JSC::ErrorType::TypeError:
+        out.print(&quot;TypeError&quot;);
+        break;
+    case JSC::ErrorType::URIError:
+        out.print(&quot;URIError&quot;);
+        break;
+    }
+}
+
+} // namespace WTF
</ins></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeErrorh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/Error.h (206852 => 206853)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/Error.h        2016-10-06 06:54:46 UTC (rev 206852)
+++ trunk/Source/JavaScriptCore/runtime/Error.h        2016-10-06 07:44:23 UTC (rev 206853)
</span><span class="lines">@@ -38,6 +38,16 @@
</span><span class="cx"> class SourceCode;
</span><span class="cx"> class Structure;
</span><span class="cx"> 
</span><ins>+enum class ErrorType : uint8_t {
+    Error,
+    EvalError,
+    RangeError,
+    ReferenceError,
+    SyntaxError,
+    TypeError,
+    URIError,
+};
+
</ins><span class="cx"> // ExecState wrappers.
</span><span class="cx"> JSObject* createError(ExecState*, const String&amp;, ErrorInstance::SourceAppender);
</span><span class="cx"> JSObject* createEvalError(ExecState*, const String&amp;, ErrorInstance::SourceAppender);
</span><span class="lines">@@ -60,7 +70,9 @@
</span><span class="cx"> JS_EXPORT_PRIVATE JSObject* createURIError(ExecState*, const String&amp;);
</span><span class="cx"> JS_EXPORT_PRIVATE JSObject* createOutOfMemoryError(ExecState*);
</span><span class="cx"> 
</span><ins>+JS_EXPORT_PRIVATE JSObject* createError(ExecState*, ErrorType, const String&amp;);
</ins><span class="cx"> 
</span><ins>+
</ins><span class="cx"> bool addErrorInfoAndGetBytecodeOffset(ExecState*, VM&amp;, JSObject*, bool, CallFrame*&amp;, unsigned* = nullptr);
</span><span class="cx"> 
</span><span class="cx"> JS_EXPORT_PRIVATE void addErrorInfo(ExecState*, JSObject*, bool); 
</span><span class="lines">@@ -146,3 +158,11 @@
</span><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace JSC
</span><ins>+
+namespace WTF {
+
+class PrintStream;
+
+void printInternal(PrintStream&amp;, JSC::ErrorType);
+
+} // namespace WTF
</ins></span></pre>
</div>
</div>

</body>
</html>