<!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>[192155] trunk/Source</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/192155">192155</a></dd>
<dt>Author</dt> <dd>youenn.fablet@crf.canon.fr</dd>
<dt>Date</dt> <dd>2015-11-09 06:15:21 -0800 (Mon, 09 Nov 2015)</dd>
</dl>
<h3>Log Message</h3>
<pre>JS Built-ins functions should be able to assert
https://bugs.webkit.org/show_bug.cgi?id=150333
Reviewed by Yusuke Suzuki.
Source/JavaScriptCore:
Introduced @assert to enable asserting in JS built-ins.
Adding a new bytecode 'assert' to implement it.
In debug builds, @assert generates 'assert' bytecodes.
In release builds, no byte code is produced for @assert.
In case assert is false, the JS built-in and the line number are dumped.
* bytecode/BytecodeList.json:
* bytecode/BytecodeUseDef.h:
(JSC::computeUsesForBytecodeOffset):
(JSC::computeDefsForBytecodeOffset):
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::dumpBytecode):
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::emitAssert):
* bytecompiler/BytecodeGenerator.h:
* bytecompiler/NodesCodegen.cpp: Generating op_assert bytecode for @assert for Debug builds.
(JSC::BytecodeIntrinsicNode::emit_intrinsic_assert):
* jit/JIT.cpp:
(JSC::JIT::privateCompileMainPass):
* jit/JIT.h:
* jit/JITOpcodes.cpp:
(JSC::JIT::emit_op_assert):
* jit/JITOpcodes32_64.cpp:
(JSC::JIT::emit_op_create_assert):
* llint/LowLevelInterpreter.asm:
* runtime/CommonIdentifiers.h: Adding @assert identifier as intrinsic.
* runtime/CommonSlowPaths.cpp:
(JSC::SLOW_PATH_DECL):
* runtime/CommonSlowPaths.h:
Source/WebCore:
* Modules/streams/ReadableStreamInternals.js:
(privateInitializeReadableStreamReader): Activating an @assert.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceJavaScriptCoreChangeLog">trunk/Source/JavaScriptCore/ChangeLog</a></li>
<li><a href="#trunkSourceJavaScriptCorebytecodeBytecodeListjson">trunk/Source/JavaScriptCore/bytecode/BytecodeList.json</a></li>
<li><a href="#trunkSourceJavaScriptCorebytecodeBytecodeUseDefh">trunk/Source/JavaScriptCore/bytecode/BytecodeUseDef.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="#trunkSourceJavaScriptCorejitJITcpp">trunk/Source/JavaScriptCore/jit/JIT.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCorejitJITh">trunk/Source/JavaScriptCore/jit/JIT.h</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="#trunkSourceJavaScriptCorellintLowLevelInterpreterasm">trunk/Source/JavaScriptCore/llint/LowLevelInterpreter.asm</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeCommonIdentifiersh">trunk/Source/JavaScriptCore/runtime/CommonIdentifiers.h</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="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreModulesstreamsReadableStreamInternalsjs">trunk/Source/WebCore/Modules/streams/ReadableStreamInternals.js</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceJavaScriptCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/ChangeLog (192154 => 192155)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/ChangeLog        2015-11-09 12:56:43 UTC (rev 192154)
+++ trunk/Source/JavaScriptCore/ChangeLog        2015-11-09 14:15:21 UTC (rev 192155)
</span><span class="lines">@@ -1,3 +1,41 @@
</span><ins>+2015-11-09 Youenn Fablet <youenn.fablet@crf.canon.fr>
+
+ JS Built-ins functions should be able to assert
+ https://bugs.webkit.org/show_bug.cgi?id=150333
+
+ Reviewed by Yusuke Suzuki.
+
+ Introduced @assert to enable asserting in JS built-ins.
+ Adding a new bytecode 'assert' to implement it.
+ In debug builds, @assert generates 'assert' bytecodes.
+ In release builds, no byte code is produced for @assert.
+
+ In case assert is false, the JS built-in and the line number are dumped.
+
+ * bytecode/BytecodeList.json:
+ * bytecode/BytecodeUseDef.h:
+ (JSC::computeUsesForBytecodeOffset):
+ (JSC::computeDefsForBytecodeOffset):
+ * bytecode/CodeBlock.cpp:
+ (JSC::CodeBlock::dumpBytecode):
+ * bytecompiler/BytecodeGenerator.cpp:
+ (JSC::BytecodeGenerator::emitAssert):
+ * bytecompiler/BytecodeGenerator.h:
+ * bytecompiler/NodesCodegen.cpp: Generating op_assert bytecode for @assert for Debug builds.
+ (JSC::BytecodeIntrinsicNode::emit_intrinsic_assert):
+ * jit/JIT.cpp:
+ (JSC::JIT::privateCompileMainPass):
+ * jit/JIT.h:
+ * jit/JITOpcodes.cpp:
+ (JSC::JIT::emit_op_assert):
+ * jit/JITOpcodes32_64.cpp:
+ (JSC::JIT::emit_op_create_assert):
+ * llint/LowLevelInterpreter.asm:
+ * runtime/CommonIdentifiers.h: Adding @assert identifier as intrinsic.
+ * runtime/CommonSlowPaths.cpp:
+ (JSC::SLOW_PATH_DECL):
+ * runtime/CommonSlowPaths.h:
+
</ins><span class="cx"> 2015-11-08 Yusuke Suzuki <utatane.tea@gmail.com>
</span><span class="cx">
</span><span class="cx"> [ES6] Minimize ES6_CLASS_SYNTAX ifdefs
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorebytecodeBytecodeListjson"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/bytecode/BytecodeList.json (192154 => 192155)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/bytecode/BytecodeList.json        2015-11-09 12:56:43 UTC (rev 192154)
+++ trunk/Source/JavaScriptCore/bytecode/BytecodeList.json        2015-11-09 14:15:21 UTC (rev 192155)
</span><span class="lines">@@ -127,7 +127,8 @@
</span><span class="cx"> { "name" : "op_enumerator_structure_pname", "length" : 4 },
</span><span class="cx"> { "name" : "op_enumerator_generic_pname", "length" : 4 },
</span><span class="cx"> { "name" : "op_to_index_string", "length" : 3 },
</span><del>- { "name" : "op_load_arrowfunction_this", "length" : 2 }
</del><ins>+ { "name" : "op_load_arrowfunction_this", "length" : 2 },
+ { "name" : "op_assert", "length" : 3 }
</ins><span class="cx"> ]
</span><span class="cx"> },
</span><span class="cx"> {
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorebytecodeBytecodeUseDefh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/bytecode/BytecodeUseDef.h (192154 => 192155)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/bytecode/BytecodeUseDef.h        2015-11-09 12:56:43 UTC (rev 192154)
+++ trunk/Source/JavaScriptCore/bytecode/BytecodeUseDef.h        2015-11-09 14:15:21 UTC (rev 192155)
</span><span class="lines">@@ -43,6 +43,7 @@
</span><span class="cx"> case op_new_regexp:
</span><span class="cx"> case op_new_array_buffer:
</span><span class="cx"> case op_throw_static_error:
</span><ins>+ case op_assert:
</ins><span class="cx"> case op_debug:
</span><span class="cx"> case op_jneq_ptr:
</span><span class="cx"> case op_loop_hint:
</span><span class="lines">@@ -252,6 +253,7 @@
</span><span class="cx"> case op_profile_did_call:
</span><span class="cx"> case op_throw:
</span><span class="cx"> case op_throw_static_error:
</span><ins>+ case op_assert:
</ins><span class="cx"> case op_debug:
</span><span class="cx"> case op_ret:
</span><span class="cx"> case op_jmp:
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorebytecodeCodeBlockcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/bytecode/CodeBlock.cpp (192154 => 192155)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/bytecode/CodeBlock.cpp        2015-11-09 12:56:43 UTC (rev 192154)
+++ trunk/Source/JavaScriptCore/bytecode/CodeBlock.cpp        2015-11-09 14:15:21 UTC (rev 192155)
</span><span class="lines">@@ -1488,9 +1488,16 @@
</span><span class="cx"> int debugHookID = (++it)->u.operand;
</span><span class="cx"> int hasBreakpointFlag = (++it)->u.operand;
</span><span class="cx"> printLocationAndOp(out, exec, location, it, "debug");
</span><del>- out.printf("%s %d", debugHookName(debugHookID), hasBreakpointFlag);
</del><ins>+ out.printf("%s, %d", debugHookName(debugHookID), hasBreakpointFlag);
</ins><span class="cx"> break;
</span><span class="cx"> }
</span><ins>+ case op_assert: {
+ int condition = (++it)->u.operand;
+ int line = (++it)->u.operand;
+ printLocationAndOp(out, exec, location, it, "assert");
+ out.printf("%s, %d", registerName(condition).data(), line);
+ break;
+ }
</ins><span class="cx"> case op_profile_will_call: {
</span><span class="cx"> int function = (++it)->u.operand;
</span><span class="cx"> printLocationOpAndRegisterOperand(out, exec, location, it, "profile_will_call", function);
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorebytecompilerBytecodeGeneratorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp (192154 => 192155)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp        2015-11-09 12:56:43 UTC (rev 192154)
+++ trunk/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp        2015-11-09 14:15:21 UTC (rev 192155)
</span><span class="lines">@@ -2283,6 +2283,14 @@
</span><span class="cx"> return value;
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+RegisterID* BytecodeGenerator::emitAssert(RegisterID* condition, int line)
+{
+ emitOpcode(op_assert);
+ instructions().append(condition->index());
+ instructions().append(line);
+ return condition;
+}
+
</ins><span class="cx"> RegisterID* BytecodeGenerator::emitCreateThis(RegisterID* dst)
</span><span class="cx"> {
</span><span class="cx"> size_t begin = instructions().size();
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorebytecompilerBytecodeGeneratorh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.h (192154 => 192155)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.h        2015-11-09 12:56:43 UTC (rev 192154)
+++ trunk/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.h        2015-11-09 14:15:21 UTC (rev 192155)
</span><span class="lines">@@ -531,6 +531,8 @@
</span><span class="cx"> RegisterID* emitDeleteByVal(RegisterID* dst, RegisterID* base, RegisterID* property);
</span><span class="cx"> RegisterID* emitPutByIndex(RegisterID* base, unsigned index, RegisterID* value);
</span><span class="cx">
</span><ins>+ RegisterID* emitAssert(RegisterID* condition, int line);
+
</ins><span class="cx"> void emitPutGetterById(RegisterID* base, const Identifier& property, unsigned propertyDescriptorOptions, RegisterID* getter);
</span><span class="cx"> void emitPutSetterById(RegisterID* base, const Identifier& property, unsigned propertyDescriptorOptions, RegisterID* setter);
</span><span class="cx"> void emitPutGetterSetter(RegisterID* base, const Identifier& property, unsigned attributes, RegisterID* getter, RegisterID* setter);
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorebytecompilerNodesCodegencpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp (192154 => 192155)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp        2015-11-09 12:56:43 UTC (rev 192154)
+++ trunk/Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp        2015-11-09 14:15:21 UTC (rev 192155)
</span><span class="lines">@@ -774,6 +774,19 @@
</span><span class="cx"> return (this->*m_emitter)(generator, dst);
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+RegisterID* BytecodeIntrinsicNode::emit_intrinsic_assert(BytecodeGenerator& generator, RegisterID* dst)
+{
+#ifndef NDEBUG
+ ArgumentListNode* node = m_args->m_listNode;
+ RefPtr<RegisterID> condition = generator.emitNode(node);
+ generator.emitAssert(condition.get(), node->firstLine());
+ return dst;
+#else
+ UNUSED_PARAM(generator);
+ return dst;
+#endif
+}
+
</ins><span class="cx"> RegisterID* BytecodeIntrinsicNode::emit_intrinsic_putByValDirect(BytecodeGenerator& generator, RegisterID* dst)
</span><span class="cx"> {
</span><span class="cx"> ArgumentListNode* node = m_args->m_listNode;
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorejitJITcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/jit/JIT.cpp (192154 => 192155)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/jit/JIT.cpp        2015-11-09 12:56:43 UTC (rev 192154)
+++ trunk/Source/JavaScriptCore/jit/JIT.cpp        2015-11-09 14:15:21 UTC (rev 192155)
</span><span class="lines">@@ -212,6 +212,7 @@
</span><span class="cx"> DEFINE_OP(op_create_scoped_arguments)
</span><span class="cx"> DEFINE_OP(op_create_out_of_band_arguments)
</span><span class="cx"> DEFINE_OP(op_check_tdz)
</span><ins>+ DEFINE_OP(op_assert)
</ins><span class="cx"> DEFINE_OP(op_debug)
</span><span class="cx"> DEFINE_OP(op_del_by_id)
</span><span class="cx"> DEFINE_OP(op_div)
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorejitJITh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/jit/JIT.h (192154 => 192155)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/jit/JIT.h        2015-11-09 12:56:43 UTC (rev 192154)
+++ trunk/Source/JavaScriptCore/jit/JIT.h        2015-11-09 14:15:21 UTC (rev 192155)
</span><span class="lines">@@ -492,6 +492,7 @@
</span><span class="cx"> void emit_op_create_scoped_arguments(Instruction*);
</span><span class="cx"> void emit_op_create_out_of_band_arguments(Instruction*);
</span><span class="cx"> void emit_op_check_tdz(Instruction*);
</span><ins>+ void emit_op_assert(Instruction*);
</ins><span class="cx"> void emit_op_debug(Instruction*);
</span><span class="cx"> void emit_op_del_by_id(Instruction*);
</span><span class="cx"> void emit_op_div(Instruction*);
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorejitJITOpcodescpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/jit/JITOpcodes.cpp (192154 => 192155)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/jit/JITOpcodes.cpp        2015-11-09 12:56:43 UTC (rev 192154)
+++ trunk/Source/JavaScriptCore/jit/JITOpcodes.cpp        2015-11-09 14:15:21 UTC (rev 192155)
</span><span class="lines">@@ -519,6 +519,12 @@
</span><span class="cx"> emitPutVirtualRegister(currentInstruction[2].u.operand);
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+void JIT::emit_op_assert(Instruction* currentInstruction)
+{
+ JITSlowPathCall slowPathCall(this, currentInstruction, slow_path_assert);
+ slowPathCall.call();
+}
+
</ins><span class="cx"> void JIT::emit_op_create_lexical_environment(Instruction* currentInstruction)
</span><span class="cx"> {
</span><span class="cx"> JITSlowPathCall slowPathCall(this, currentInstruction, slow_path_create_lexical_environment);
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorejitJITOpcodes32_64cpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/jit/JITOpcodes32_64.cpp (192154 => 192155)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/jit/JITOpcodes32_64.cpp        2015-11-09 12:56:43 UTC (rev 192154)
+++ trunk/Source/JavaScriptCore/jit/JITOpcodes32_64.cpp        2015-11-09 14:15:21 UTC (rev 192155)
</span><span class="lines">@@ -834,6 +834,12 @@
</span><span class="cx"> emitStore(thrownValue, regT1, regT0);
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+void JIT::emit_op_assert(Instruction* currentInstruction)
+{
+ JITSlowPathCall slowPathCall(this, currentInstruction, slow_path_assert);
+ slowPathCall.call();
+}
+
</ins><span class="cx"> void JIT::emit_op_create_lexical_environment(Instruction* currentInstruction)
</span><span class="cx"> {
</span><span class="cx"> JITSlowPathCall slowPathCall(this, currentInstruction, slow_path_create_lexical_environment);
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorellintLowLevelInterpreterasm"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/llint/LowLevelInterpreter.asm (192154 => 192155)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/llint/LowLevelInterpreter.asm        2015-11-09 12:56:43 UTC (rev 192154)
+++ trunk/Source/JavaScriptCore/llint/LowLevelInterpreter.asm        2015-11-09 14:15:21 UTC (rev 192155)
</span><span class="lines">@@ -1567,6 +1567,12 @@
</span><span class="cx"> dispatch(4)
</span><span class="cx">
</span><span class="cx">
</span><ins>+_llint_op_assert:
+ traceExecution()
+ callSlowPath(_slow_path_assert)
+ dispatch(3)
+
+
</ins><span class="cx"> _llint_op_create_lexical_environment:
</span><span class="cx"> traceExecution()
</span><span class="cx"> callSlowPath(_slow_path_create_lexical_environment)
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeCommonIdentifiersh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/CommonIdentifiers.h (192154 => 192155)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/CommonIdentifiers.h        2015-11-09 12:56:43 UTC (rev 192154)
+++ trunk/Source/JavaScriptCore/runtime/CommonIdentifiers.h        2015-11-09 14:15:21 UTC (rev 192155)
</span><span class="lines">@@ -264,6 +264,7 @@
</span><span class="cx"> macro(toStringTag)
</span><span class="cx">
</span><span class="cx"> #define JSC_COMMON_BYTECODE_INTRINSICS_EACH_NAME(macro) \
</span><ins>+ macro(assert) \
</ins><span class="cx"> macro(putByValDirect) \
</span><span class="cx"> macro(toString)
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeCommonSlowPathscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/CommonSlowPaths.cpp (192154 => 192155)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/CommonSlowPaths.cpp        2015-11-09 12:56:43 UTC (rev 192154)
+++ trunk/Source/JavaScriptCore/runtime/CommonSlowPaths.cpp        2015-11-09 14:15:21 UTC (rev 192155)
</span><span class="lines">@@ -637,6 +637,13 @@
</span><span class="cx"> END();
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+SLOW_PATH_DECL(slow_path_assert)
+{
+ BEGIN();
+ ASSERT_WITH_MESSAGE(OP(1).jsValue().asBoolean(), "JS assertion failed at line %d in:\n%s\n", pc[2].u.operand, exec->codeBlock()->sourceCodeForTools().data());
+ END();
+}
+
</ins><span class="cx"> SLOW_PATH_DECL(slow_path_create_lexical_environment)
</span><span class="cx"> {
</span><span class="cx"> BEGIN();
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeCommonSlowPathsh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/CommonSlowPaths.h (192154 => 192155)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/CommonSlowPaths.h        2015-11-09 12:56:43 UTC (rev 192154)
+++ trunk/Source/JavaScriptCore/runtime/CommonSlowPaths.h        2015-11-09 14:15:21 UTC (rev 192155)
</span><span class="lines">@@ -289,6 +289,7 @@
</span><span class="cx"> SLOW_PATH_HIDDEN_DECL(slow_path_next_generic_enumerator_pname);
</span><span class="cx"> SLOW_PATH_HIDDEN_DECL(slow_path_to_index_string);
</span><span class="cx"> SLOW_PATH_HIDDEN_DECL(slow_path_profile_type_clear_log);
</span><ins>+SLOW_PATH_HIDDEN_DECL(slow_path_assert);
</ins><span class="cx"> SLOW_PATH_HIDDEN_DECL(slow_path_create_lexical_environment);
</span><span class="cx"> SLOW_PATH_HIDDEN_DECL(slow_path_push_with_scope);
</span><span class="cx"> SLOW_PATH_HIDDEN_DECL(slow_path_resolve_scope);
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (192154 => 192155)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2015-11-09 12:56:43 UTC (rev 192154)
+++ trunk/Source/WebCore/ChangeLog        2015-11-09 14:15:21 UTC (rev 192155)
</span><span class="lines">@@ -1,3 +1,13 @@
</span><ins>+2015-11-09 Youenn Fablet <youenn.fablet@crf.canon.fr>
+
+ JS Built-ins functions should be able to assert
+ https://bugs.webkit.org/show_bug.cgi?id=150333
+
+ Reviewed by Yusuke Suzuki.
+
+ * Modules/streams/ReadableStreamInternals.js:
+ (privateInitializeReadableStreamReader): Activating an @assert.
+
</ins><span class="cx"> 2015-11-02 Sergio Villar Senin <svillar@igalia.com>
</span><span class="cx">
</span><span class="cx"> [css-grid] Improve grid container sizing with size constraints and intrinsic sizes
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesstreamsReadableStreamInternalsjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/streams/ReadableStreamInternals.js (192154 => 192155)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/streams/ReadableStreamInternals.js        2015-11-09 12:56:43 UTC (rev 192154)
+++ trunk/Source/WebCore/Modules/streams/ReadableStreamInternals.js        2015-11-09 14:15:21 UTC (rev 192155)
</span><span class="lines">@@ -51,7 +51,7 @@
</span><span class="cx"> this.@closedPromiseCapability = { @promise: @Promise.@resolve() };
</span><span class="cx"> return this;
</span><span class="cx"> }
</span><del>- // FIXME: ASSERT(stream.@state === @streamErrored);
</del><ins>+ @assert(stream.@state === @streamErrored);
</ins><span class="cx"> this.@ownerReadableStream = null;
</span><span class="cx"> this.@storedError = stream.@storedError;
</span><span class="cx"> this.@closedPromiseCapability = { @promise: @Promise.@reject(stream.@storedError) };
</span></span></pre>
</div>
</div>
</body>
</html>