<!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>[212782] trunk/Source/JavaScriptCore</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/212782">212782</a></dd>
<dt>Author</dt> <dd>jfbastien@apple.com</dd>
<dt>Date</dt> <dd>2017-02-21 17:16:42 -0800 (Tue, 21 Feb 2017)</dd>
</dl>
<h3>Log Message</h3>
<pre>FullCodeOrigin for CodeBlock+CodeOrigin printing
https://bugs.webkit.org/show_bug.cgi?id=168673
Reviewed by Filip Pizlo.
WebAssembly doesn't have a CodeBlock, so printing it isn't
valid. This patch adds FullCodeOrigin to handle the
CodeBlock+CodeOrigin printing pattern, and uses it through all the
places I could find, including Repatch.cpp where it's relevant for
WebAssembly.
* CMakeLists.txt:
* JavaScriptCore.xcodeproj/project.pbxproj:
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::noticeIncomingCall):
* bytecode/FullCodeOrigin.cpp: Added.
(JSC::FullCodeOrigin::dump):
(JSC::FullCodeOrigin::dumpInContext):
* bytecode/FullCodeOrigin.h: Added.
(JSC::FullCodeOrigin::FullCodeOrigin):
* bytecode/PolymorphicAccess.cpp:
(JSC::PolymorphicAccess::regenerate):
* jit/PolymorphicCallStubRoutine.cpp:
(JSC::PolymorphicCallStubRoutine::PolymorphicCallStubRoutine):
* jit/Repatch.cpp:
(JSC::linkFor):
(JSC::linkDirectFor):
(JSC::linkVirtualFor):</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceJavaScriptCoreCMakeListstxt">trunk/Source/JavaScriptCore/CMakeLists.txt</a></li>
<li><a href="#trunkSourceJavaScriptCoreChangeLog">trunk/Source/JavaScriptCore/ChangeLog</a></li>
<li><a href="#trunkSourceJavaScriptCoreJavaScriptCorexcodeprojprojectpbxproj">trunk/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkSourceJavaScriptCorebytecodeCodeBlockcpp">trunk/Source/JavaScriptCore/bytecode/CodeBlock.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCorebytecodePolymorphicAccesscpp">trunk/Source/JavaScriptCore/bytecode/PolymorphicAccess.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCorejitPolymorphicCallStubRoutinecpp">trunk/Source/JavaScriptCore/jit/PolymorphicCallStubRoutine.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCorejitRepatchcpp">trunk/Source/JavaScriptCore/jit/Repatch.cpp</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a href="#trunkSourceJavaScriptCorebytecodeFullCodeOrigincpp">trunk/Source/JavaScriptCore/bytecode/FullCodeOrigin.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCorebytecodeFullCodeOriginh">trunk/Source/JavaScriptCore/bytecode/FullCodeOrigin.h</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceJavaScriptCoreCMakeListstxt"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/CMakeLists.txt (212781 => 212782)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/CMakeLists.txt        2017-02-22 01:07:10 UTC (rev 212781)
+++ trunk/Source/JavaScriptCore/CMakeLists.txt        2017-02-22 01:16:42 UTC (rev 212782)
</span><span class="lines">@@ -217,6 +217,7 @@
</span><span class="cx"> bytecode/ExecutionCounter.cpp
</span><span class="cx"> bytecode/ExitKind.cpp
</span><span class="cx"> bytecode/ExitingJITType.cpp
</span><ins>+ bytecode/FullCodeOrigin.cpp
</ins><span class="cx"> bytecode/FunctionCodeBlock.cpp
</span><span class="cx"> bytecode/GetByIdStatus.cpp
</span><span class="cx"> bytecode/GetByIdVariant.cpp
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/ChangeLog (212781 => 212782)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/ChangeLog        2017-02-22 01:07:10 UTC (rev 212781)
+++ trunk/Source/JavaScriptCore/ChangeLog        2017-02-22 01:16:42 UTC (rev 212782)
</span><span class="lines">@@ -1,3 +1,34 @@
</span><ins>+2017-02-21 JF Bastien <jfbastien@apple.com>
+
+ FullCodeOrigin for CodeBlock+CodeOrigin printing
+ https://bugs.webkit.org/show_bug.cgi?id=168673
+
+ Reviewed by Filip Pizlo.
+
+ WebAssembly doesn't have a CodeBlock, so printing it isn't
+ valid. This patch adds FullCodeOrigin to handle the
+ CodeBlock+CodeOrigin printing pattern, and uses it through all the
+ places I could find, including Repatch.cpp where it's relevant for
+ WebAssembly.
+
+ * CMakeLists.txt:
+ * JavaScriptCore.xcodeproj/project.pbxproj:
+ * bytecode/CodeBlock.cpp:
+ (JSC::CodeBlock::noticeIncomingCall):
+ * bytecode/FullCodeOrigin.cpp: Added.
+ (JSC::FullCodeOrigin::dump):
+ (JSC::FullCodeOrigin::dumpInContext):
+ * bytecode/FullCodeOrigin.h: Added.
+ (JSC::FullCodeOrigin::FullCodeOrigin):
+ * bytecode/PolymorphicAccess.cpp:
+ (JSC::PolymorphicAccess::regenerate):
+ * jit/PolymorphicCallStubRoutine.cpp:
+ (JSC::PolymorphicCallStubRoutine::PolymorphicCallStubRoutine):
+ * jit/Repatch.cpp:
+ (JSC::linkFor):
+ (JSC::linkDirectFor):
+ (JSC::linkVirtualFor):
+
</ins><span class="cx"> 2017-02-21 Filip Pizlo <fpizlo@apple.com>
</span><span class="cx">
</span><span class="cx"> Unreviewed, fix cloop. I managed to have my local patch for relanding be the one without the cloop
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreJavaScriptCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj (212781 => 212782)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj        2017-02-22 01:07:10 UTC (rev 212781)
+++ trunk/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj        2017-02-22 01:16:42 UTC (rev 212782)
</span><span class="lines">@@ -2058,6 +2058,8 @@
</span><span class="cx">                 AD2FCC301DB83D4900B3E736 /* JSWebAssembly.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AD2FCC2E1DB839F700B3E736 /* JSWebAssembly.cpp */; };
</span><span class="cx">                 AD2FCC311DB83D4900B3E736 /* JSWebAssembly.h in Headers */ = {isa = PBXBuildFile; fileRef = AD2FCC2F1DB839F700B3E736 /* JSWebAssembly.h */; };
</span><span class="cx">                 AD2FCC331DC4045400B3E736 /* WasmFormat.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AD2FCC321DC4045300B3E736 /* WasmFormat.cpp */; };
</span><ins>+                AD4252511E5D0E14009D2A97 /* FullCodeOrigin.h in Headers */ = {isa = PBXBuildFile; fileRef = AD4252501E5D0DEB009D2A97 /* FullCodeOrigin.h */; };
+                AD4252531E5D0F47009D2A97 /* FullCodeOrigin.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AD4252521E5D0F22009D2A97 /* FullCodeOrigin.cpp */; };
</ins><span class="cx">                 AD4937C31DDBE6140077C807 /* AbstractModuleRecord.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AD4937C11DDBE60A0077C807 /* AbstractModuleRecord.cpp */; };
</span><span class="cx">                 AD4937C41DDBE6140077C807 /* AbstractModuleRecord.h in Headers */ = {isa = PBXBuildFile; fileRef = AD4937C21DDBE60A0077C807 /* AbstractModuleRecord.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 AD4937C71DDD0AAE0077C807 /* WebAssemblyModuleRecord.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AD4937C51DDCDCF00077C807 /* WebAssemblyModuleRecord.cpp */; };
</span><span class="lines">@@ -4595,6 +4597,8 @@
</span><span class="cx">                 AD2FCC2E1DB839F700B3E736 /* JSWebAssembly.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSWebAssembly.cpp; sourceTree = "<group>"; };
</span><span class="cx">                 AD2FCC2F1DB839F700B3E736 /* JSWebAssembly.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSWebAssembly.h; sourceTree = "<group>"; };
</span><span class="cx">                 AD2FCC321DC4045300B3E736 /* WasmFormat.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WasmFormat.cpp; sourceTree = "<group>"; };
</span><ins>+                AD4252501E5D0DEB009D2A97 /* FullCodeOrigin.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FullCodeOrigin.h; sourceTree = "<group>"; };
+                AD4252521E5D0F22009D2A97 /* FullCodeOrigin.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FullCodeOrigin.cpp; sourceTree = "<group>"; };
</ins><span class="cx">                 AD4937C11DDBE60A0077C807 /* AbstractModuleRecord.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AbstractModuleRecord.cpp; sourceTree = "<group>"; };
</span><span class="cx">                 AD4937C21DDBE60A0077C807 /* AbstractModuleRecord.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AbstractModuleRecord.h; sourceTree = "<group>"; };
</span><span class="cx">                 AD4937C51DDCDCF00077C807 /* WebAssemblyModuleRecord.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = WebAssemblyModuleRecord.cpp; path = js/WebAssemblyModuleRecord.cpp; sourceTree = "<group>"; };
</span><span class="lines">@@ -7424,6 +7428,8 @@
</span><span class="cx">                                 0FB105831675480C00F8AB6E /* ExitKind.h */,
</span><span class="cx">                                 0F0B83AA14BCF5B900885B4F /* ExpressionRangeInfo.h */,
</span><span class="cx">                                 0F666EBF183566F900D017F1 /* FullBytecodeLiveness.h */,
</span><ins>+                                AD4252521E5D0F22009D2A97 /* FullCodeOrigin.cpp */,
+                                AD4252501E5D0DEB009D2A97 /* FullCodeOrigin.h */,
</ins><span class="cx">                                 14AD91161DCA97FD0014F9FE /* FunctionCodeBlock.cpp */,
</span><span class="cx">                                 14AD91071DCA92940014F9FE /* FunctionCodeBlock.h */,
</span><span class="cx">                                 0F93329514CA7DC10085F3C6 /* GetByIdStatus.cpp */,
</span><span class="lines">@@ -8914,6 +8920,7 @@
</span><span class="cx">                                 A700873E17CBE8D300C3E643 /* MapPrototype.h in Headers */,
</span><span class="cx">                                 C2B916C214DA014E00CBAC86 /* MarkedAllocator.h in Headers */,
</span><span class="cx">                                 0F7DF1461E2BEF6A0095951B /* MarkedAllocatorInlines.h in Headers */,
</span><ins>+                                AD4252511E5D0E14009D2A97 /* FullCodeOrigin.h in Headers */,
</ins><span class="cx">                                 142D6F0913539A2800B02E86 /* MarkedBlock.h in Headers */,
</span><span class="cx">                                 0F7C5FB81D888A0C0044F5E2 /* MarkedBlockInlines.h in Headers */,
</span><span class="cx">                                 141448CB13A176EC00F5BA1A /* MarkedBlockSet.h in Headers */,
</span><span class="lines">@@ -10448,6 +10455,7 @@
</span><span class="cx">                                 0FB5467D14F5CFD6002C2989 /* MethodOfGettingAValueProfile.cpp in Sources */,
</span><span class="cx">                                 E3794E751B77EB97005543AE /* ModuleAnalyzer.cpp in Sources */,
</span><span class="cx">                                 E355F3521B7DC85300C50DC5 /* ModuleLoaderPrototype.cpp in Sources */,
</span><ins>+                                AD4252531E5D0F47009D2A97 /* FullCodeOrigin.cpp in Sources */,
</ins><span class="cx">                                 14AD91181DCA97FD0014F9FE /* ModuleProgramCodeBlock.cpp in Sources */,
</span><span class="cx">                                 147341E41DC2CE9600AA29BA /* ModuleProgramExecutable.cpp in Sources */,
</span><span class="cx">                                 0F1FB3901E173A6B00A9BE50 /* MutatorScheduler.cpp in Sources */,
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorebytecodeCodeBlockcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/bytecode/CodeBlock.cpp (212781 => 212782)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/bytecode/CodeBlock.cpp        2017-02-22 01:07:10 UTC (rev 212781)
+++ trunk/Source/JavaScriptCore/bytecode/CodeBlock.cpp        2017-02-22 01:16:42 UTC (rev 212782)
</span><span class="lines">@@ -44,6 +44,7 @@
</span><span class="cx"> #include "DFGWorklist.h"
</span><span class="cx"> #include "Debugger.h"
</span><span class="cx"> #include "EvalCodeBlock.h"
</span><ins>+#include "FullCodeOrigin.h"
</ins><span class="cx"> #include "FunctionCodeBlock.h"
</span><span class="cx"> #include "FunctionExecutableDump.h"
</span><span class="cx"> #include "GetPutInfo.h"
</span><span class="lines">@@ -3580,7 +3581,7 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (callerCodeBlock->capabilityLevelState() == DFG::CapabilityLevelNotSet) {
</span><del>- dataLog("In call from ", *callerCodeBlock, " ", callerFrame->codeOrigin(), " to ", *this, ": caller's DFG capability level is not set.\n");
</del><ins>+ dataLog("In call from ", FullCodeOrigin(callerCodeBlock, callerFrame->codeOrigin()), " to ", *this, ": caller's DFG capability level is not set.\n");
</ins><span class="cx"> CRASH();
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorebytecodeFullCodeOrigincpp"></a>
<div class="addfile"><h4>Added: trunk/Source/JavaScriptCore/bytecode/FullCodeOrigin.cpp (0 => 212782)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/bytecode/FullCodeOrigin.cpp         (rev 0)
+++ trunk/Source/JavaScriptCore/bytecode/FullCodeOrigin.cpp        2017-02-22 01:16:42 UTC (rev 212782)
</span><span class="lines">@@ -0,0 +1,46 @@
</span><ins>+/*
+ * Copyright (C) 2017 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "FullCodeOrigin.h"
+
+namespace JSC {
+
+void FullCodeOrigin::dump(PrintStream& out) const
+{
+ if (m_codeBlock)
+ out.print(*m_codeBlock);
+ else
+ out.print("<none>");
+
+ out.print(" ", m_codeOrigin);
+}
+
+void FullCodeOrigin::dumpInContext(PrintStream& out, DumpContext*) const
+{
+ dump(out);
+}
+
+} // namespace JSC
</ins></span></pre></div>
<a id="trunkSourceJavaScriptCorebytecodeFullCodeOriginh"></a>
<div class="addfile"><h4>Added: trunk/Source/JavaScriptCore/bytecode/FullCodeOrigin.h (0 => 212782)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/bytecode/FullCodeOrigin.h         (rev 0)
+++ trunk/Source/JavaScriptCore/bytecode/FullCodeOrigin.h        2017-02-22 01:16:42 UTC (rev 212782)
</span><span class="lines">@@ -0,0 +1,51 @@
</span><ins>+/*
+ * Copyright (C) 2017 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#include "CodeBlock.h"
+#include "CodeOrigin.h"
+#include <wtf/PrintStream.h>
+
+namespace JSC {
+
+class FullCodeOrigin {
+public:
+ FullCodeOrigin(CodeBlock* codeBlock, CodeOrigin codeOrigin)
+ : m_codeBlock(codeBlock)
+ , m_codeOrigin(codeOrigin)
+ {
+ }
+ FullCodeOrigin() = delete;
+
+ JS_EXPORT_PRIVATE void dump(PrintStream&) const;
+ void dumpInContext(PrintStream&, DumpContext*) const;
+
+private:
+ CodeBlock* m_codeBlock;
+ CodeOrigin m_codeOrigin;
+};
+
+} // namespace JSC
</ins></span></pre></div>
<a id="trunkSourceJavaScriptCorebytecodePolymorphicAccesscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/bytecode/PolymorphicAccess.cpp (212781 => 212782)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/bytecode/PolymorphicAccess.cpp        2017-02-22 01:07:10 UTC (rev 212781)
+++ trunk/Source/JavaScriptCore/bytecode/PolymorphicAccess.cpp        2017-02-22 01:16:42 UTC (rev 212782)
</span><span class="lines">@@ -31,6 +31,7 @@
</span><span class="cx"> #include "BinarySwitch.h"
</span><span class="cx"> #include "CCallHelpers.h"
</span><span class="cx"> #include "CodeBlock.h"
</span><ins>+#include "FullCodeOrigin.h"
</ins><span class="cx"> #include "Heap.h"
</span><span class="cx"> #include "JITOperations.h"
</span><span class="cx"> #include "JSCInlines.h"
</span><span class="lines">@@ -524,7 +525,7 @@
</span><span class="cx"> linkBuffer.link(failure, stubInfo.slowPathStartLocation());
</span><span class="cx">
</span><span class="cx"> if (verbose)
</span><del>- dataLog(*codeBlock, " ", stubInfo.codeOrigin, ": Generating polymorphic access stub for ", listDump(cases), "\n");
</del><ins>+ dataLog(FullCodeOrigin(codeBlock, stubInfo.codeOrigin), ": Generating polymorphic access stub for ", listDump(cases), "\n");
</ins><span class="cx">
</span><span class="cx"> MacroAssemblerCodeRef code = FINALIZE_CODE_FOR(
</span><span class="cx"> codeBlock, linkBuffer,
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorejitPolymorphicCallStubRoutinecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/jit/PolymorphicCallStubRoutine.cpp (212781 => 212782)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/jit/PolymorphicCallStubRoutine.cpp        2017-02-22 01:07:10 UTC (rev 212781)
+++ trunk/Source/JavaScriptCore/jit/PolymorphicCallStubRoutine.cpp        2017-02-22 01:16:42 UTC (rev 212782)
</span><span class="lines">@@ -30,6 +30,7 @@
</span><span class="cx">
</span><span class="cx"> #include "CallLinkInfo.h"
</span><span class="cx"> #include "CodeBlock.h"
</span><ins>+#include "FullCodeOrigin.h"
</ins><span class="cx"> #include "JSCInlines.h"
</span><span class="cx"> #include "LinkBuffer.h"
</span><span class="cx">
</span><span class="lines">@@ -77,7 +78,7 @@
</span><span class="cx"> for (PolymorphicCallCase callCase : cases) {
</span><span class="cx"> m_variants.append(WriteBarrier<JSCell>(vm, owner, callCase.variant().rawCalleeCell()));
</span><span class="cx"> if (shouldDumpDisassemblyFor(callerFrame->codeBlock()))
</span><del>- dataLog("Linking polymorphic call in ", *callerFrame->codeBlock(), " at ", callerFrame->codeOrigin(), " to ", callCase.variant(), ", codeBlock = ", pointerDump(callCase.codeBlock()), "\n");
</del><ins>+ dataLog("Linking polymorphic call in ", FullCodeOrigin(callerFrame->codeBlock(), callerFrame->codeOrigin()), " to ", callCase.variant(), ", codeBlock = ", pointerDump(callCase.codeBlock()), "\n");
</ins><span class="cx"> if (CodeBlock* codeBlock = callCase.codeBlock())
</span><span class="cx"> codeBlock->linkIncomingPolymorphicCall(callerFrame, m_callNodes.add(&info));
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorejitRepatchcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/jit/Repatch.cpp (212781 => 212782)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/jit/Repatch.cpp        2017-02-22 01:07:10 UTC (rev 212781)
+++ trunk/Source/JavaScriptCore/jit/Repatch.cpp        2017-02-22 01:16:42 UTC (rev 212782)
</span><span class="lines">@@ -36,6 +36,7 @@
</span><span class="cx"> #include "DOMJITGetterSetter.h"
</span><span class="cx"> #include "DirectArguments.h"
</span><span class="cx"> #include "FTLThunks.h"
</span><ins>+#include "FullCodeOrigin.h"
</ins><span class="cx"> #include "FunctionCodeBlock.h"
</span><span class="cx"> #include "GCAwareJITStubRoutine.h"
</span><span class="cx"> #include "GetterSetter.h"
</span><span class="lines">@@ -602,7 +603,8 @@
</span><span class="cx"> callLinkInfo.setCallee(vm, owner, callee);
</span><span class="cx"> callLinkInfo.setLastSeenCallee(vm, owner, callee);
</span><span class="cx"> if (shouldDumpDisassemblyFor(callerCodeBlock))
</span><del>- dataLog("Linking call in ", *callerCodeBlock, " at ", callLinkInfo.codeOrigin(), " to ", pointerDump(calleeCodeBlock), ", entrypoint at ", codePtr, "\n");
</del><ins>+ dataLog("Linking call in ", FullCodeOrigin(callerCodeBlock, callLinkInfo.codeOrigin()), " to ", pointerDump(calleeCodeBlock), ", entrypoint at ", codePtr, "\n");
+
</ins><span class="cx"> MacroAssembler::repatchNearCall(callLinkInfo.hotPathOther(), CodeLocationLabel(codePtr));
</span><span class="cx">
</span><span class="cx"> if (calleeCodeBlock)
</span><span class="lines">@@ -629,7 +631,8 @@
</span><span class="cx"> ASSERT(!callLinkInfo.isLinked());
</span><span class="cx"> callLinkInfo.setCodeBlock(*vm, callerCodeBlock, jsCast<FunctionCodeBlock*>(calleeCodeBlock));
</span><span class="cx"> if (shouldDumpDisassemblyFor(callerCodeBlock))
</span><del>- dataLog("Linking call in ", *callerCodeBlock, " at ", callLinkInfo.codeOrigin(), " to ", pointerDump(calleeCodeBlock), ", entrypoint at ", codePtr, "\n");
</del><ins>+ dataLog("Linking call in ", FullCodeOrigin(callerCodeBlock, callLinkInfo.codeOrigin()), " to ", pointerDump(calleeCodeBlock), ", entrypoint at ", codePtr, "\n");
+
</ins><span class="cx"> if (callLinkInfo.callType() == CallLinkInfo::DirectTailCall)
</span><span class="cx"> MacroAssembler::repatchJumpToNop(callLinkInfo.patchableJump());
</span><span class="cx"> MacroAssembler::repatchNearCall(callLinkInfo.hotPathOther(), CodeLocationLabel(codePtr));
</span><span class="lines">@@ -684,7 +687,7 @@
</span><span class="cx"> CodeBlock* callerCodeBlock = callerFrame->codeBlock();
</span><span class="cx">
</span><span class="cx"> if (shouldDumpDisassemblyFor(callerCodeBlock))
</span><del>- dataLog("Linking virtual call at ", *callerCodeBlock, " ", callerFrame->codeOrigin(), "\n");
</del><ins>+ dataLog("Linking virtual call at ", FullCodeOrigin(callerCodeBlock, callerFrame->codeOrigin()), "\n");
</ins><span class="cx">
</span><span class="cx"> MacroAssemblerCodeRef virtualThunk = virtualThunkFor(&vm, callLinkInfo);
</span><span class="cx"> revertCall(&vm, callLinkInfo, virtualThunk);
</span></span></pre>
</div>
</div>
</body>
</html>