<!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>[198014] releases/WebKitGTK/webkit-2.12/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/198014">198014</a></dd>
<dt>Author</dt> <dd>carlosgc@webkit.org</dd>
<dt>Date</dt> <dd>2016-03-11 06:28:31 -0800 (Fri, 11 Mar 2016)</dd>
</dl>
<h3>Log Message</h3>
<pre>Merge <a href="http://trac.webkit.org/projects/webkit/changeset/197303">r197303</a> - Shrink UnlinkedCodeBlock a bit.
<https://webkit.org/b/154797>
Reviewed by Anders Carlsson.
Move profiler-related members of UnlinkedCodeBlock into its RareData
structure, saving 40 bytes, and then reorder the other members of
UnlinkedCodeBlock to save another 24 bytes, netting a nice total 64.
The VM member was removed entirely since UnlinkedCodeBlock is a cell
and can retrieve its VM through MarkedBlock header lookup.
* bytecode/UnlinkedCodeBlock.cpp:
(JSC::UnlinkedCodeBlock::vm):
(JSC::UnlinkedCodeBlock::typeProfilerExpressionInfoForBytecodeOffset):
(JSC::UnlinkedCodeBlock::addTypeProfilerExpressionInfo):
(JSC::UnlinkedCodeBlock::UnlinkedCodeBlock): Deleted.
* bytecode/UnlinkedCodeBlock.h:
(JSC::UnlinkedCodeBlock::addRegExp):
(JSC::UnlinkedCodeBlock::addConstant):
(JSC::UnlinkedCodeBlock::addFunctionDecl):
(JSC::UnlinkedCodeBlock::addFunctionExpr):
(JSC::UnlinkedCodeBlock::addOpProfileControlFlowBytecodeOffset):
(JSC::UnlinkedCodeBlock::opProfileControlFlowBytecodeOffsets):
(JSC::UnlinkedCodeBlock::vm): Deleted.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#releasesWebKitGTKwebkit212SourceJavaScriptCoreChangeLog">releases/WebKitGTK/webkit-2.12/Source/JavaScriptCore/ChangeLog</a></li>
<li><a href="#releasesWebKitGTKwebkit212SourceJavaScriptCorebytecodeUnlinkedCodeBlockcpp">releases/WebKitGTK/webkit-2.12/Source/JavaScriptCore/bytecode/UnlinkedCodeBlock.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit212SourceJavaScriptCorebytecodeUnlinkedCodeBlockh">releases/WebKitGTK/webkit-2.12/Source/JavaScriptCore/bytecode/UnlinkedCodeBlock.h</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="releasesWebKitGTKwebkit212SourceJavaScriptCoreChangeLog"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.12/Source/JavaScriptCore/ChangeLog (198013 => 198014)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.12/Source/JavaScriptCore/ChangeLog        2016-03-11 14:14:11 UTC (rev 198013)
+++ releases/WebKitGTK/webkit-2.12/Source/JavaScriptCore/ChangeLog        2016-03-11 14:28:31 UTC (rev 198014)
</span><span class="lines">@@ -1,3 +1,31 @@
</span><ins>+2016-02-28 Andreas Kling <akling@apple.com>
+
+ Shrink UnlinkedCodeBlock a bit.
+ <https://webkit.org/b/154797>
+
+ Reviewed by Anders Carlsson.
+
+ Move profiler-related members of UnlinkedCodeBlock into its RareData
+ structure, saving 40 bytes, and then reorder the other members of
+ UnlinkedCodeBlock to save another 24 bytes, netting a nice total 64.
+
+ The VM member was removed entirely since UnlinkedCodeBlock is a cell
+ and can retrieve its VM through MarkedBlock header lookup.
+
+ * bytecode/UnlinkedCodeBlock.cpp:
+ (JSC::UnlinkedCodeBlock::vm):
+ (JSC::UnlinkedCodeBlock::typeProfilerExpressionInfoForBytecodeOffset):
+ (JSC::UnlinkedCodeBlock::addTypeProfilerExpressionInfo):
+ (JSC::UnlinkedCodeBlock::UnlinkedCodeBlock): Deleted.
+ * bytecode/UnlinkedCodeBlock.h:
+ (JSC::UnlinkedCodeBlock::addRegExp):
+ (JSC::UnlinkedCodeBlock::addConstant):
+ (JSC::UnlinkedCodeBlock::addFunctionDecl):
+ (JSC::UnlinkedCodeBlock::addFunctionExpr):
+ (JSC::UnlinkedCodeBlock::addOpProfileControlFlowBytecodeOffset):
+ (JSC::UnlinkedCodeBlock::opProfileControlFlowBytecodeOffsets):
+ (JSC::UnlinkedCodeBlock::vm): Deleted.
+
</ins><span class="cx"> 2016-03-07 Benjamin Poulain <benjamin@webkit.org>
</span><span class="cx">
</span><span class="cx"> [JSC] Remove a useless "Move" from baseline-JIT op_mul's fast path
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit212SourceJavaScriptCorebytecodeUnlinkedCodeBlockcpp"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.12/Source/JavaScriptCore/bytecode/UnlinkedCodeBlock.cpp (198013 => 198014)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.12/Source/JavaScriptCore/bytecode/UnlinkedCodeBlock.cpp        2016-03-11 14:14:11 UTC (rev 198013)
+++ releases/WebKitGTK/webkit-2.12/Source/JavaScriptCore/bytecode/UnlinkedCodeBlock.cpp        2016-03-11 14:28:31 UTC (rev 198014)
</span><span class="lines">@@ -56,7 +56,6 @@
</span><span class="cx"> , m_numVars(0)
</span><span class="cx"> , m_numCalleeLocals(0)
</span><span class="cx"> , m_numParameters(0)
</span><del>- , m_vm(vm)
</del><span class="cx"> , m_globalObjectRegister(VirtualRegister())
</span><span class="cx"> , m_usesEval(info.usesEval())
</span><span class="cx"> , m_isStrictMode(info.isStrictMode())
</span><span class="lines">@@ -85,6 +84,11 @@
</span><span class="cx"> ASSERT(m_constructorKind == static_cast<unsigned>(info.constructorKind()));
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+VM* UnlinkedCodeBlock::vm() const
+{
+ return MarkedBlock::blockFor(this)->vm();
+}
+
</ins><span class="cx"> void UnlinkedCodeBlock::visitChildren(JSCell* cell, SlotVisitor& visitor)
</span><span class="cx"> {
</span><span class="cx"> UnlinkedCodeBlock* thisObject = jsCast<UnlinkedCodeBlock*>(cell);
</span><span class="lines">@@ -270,9 +274,10 @@
</span><span class="cx">
</span><span class="cx"> bool UnlinkedCodeBlock::typeProfilerExpressionInfoForBytecodeOffset(unsigned bytecodeOffset, unsigned& startDivot, unsigned& endDivot)
</span><span class="cx"> {
</span><ins>+ ASSERT(m_rareData);
</ins><span class="cx"> static const bool verbose = false;
</span><del>- auto iter = m_typeProfilerInfoMap.find(bytecodeOffset);
- if (iter == m_typeProfilerInfoMap.end()) {
</del><ins>+ auto iter = m_rareData->m_typeProfilerInfoMap.find(bytecodeOffset);
+ if (iter == m_rareData->m_typeProfilerInfoMap.end()) {
</ins><span class="cx"> if (verbose)
</span><span class="cx"> dataLogF("Don't have assignment info for offset:%u\n", bytecodeOffset);
</span><span class="cx"> startDivot = UINT_MAX;
</span><span class="lines">@@ -280,7 +285,7 @@
</span><span class="cx"> return false;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- TypeProfilerExpressionRange& range = iter->value;
</del><ins>+ RareData::TypeProfilerExpressionRange& range = iter->value;
</ins><span class="cx"> startDivot = range.m_startDivot;
</span><span class="cx"> endDivot = range.m_endDivot;
</span><span class="cx"> return true;
</span><span class="lines">@@ -288,10 +293,11 @@
</span><span class="cx">
</span><span class="cx"> void UnlinkedCodeBlock::addTypeProfilerExpressionInfo(unsigned instructionOffset, unsigned startDivot, unsigned endDivot)
</span><span class="cx"> {
</span><del>- TypeProfilerExpressionRange range;
</del><ins>+ createRareDataIfNecessary();
+ RareData::TypeProfilerExpressionRange range;
</ins><span class="cx"> range.m_startDivot = startDivot;
</span><span class="cx"> range.m_endDivot = endDivot;
</span><del>- m_typeProfilerInfoMap.set(instructionOffset, range);
</del><ins>+ m_rareData->m_typeProfilerInfoMap.set(instructionOffset, range);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void UnlinkedProgramCodeBlock::visitChildren(JSCell* cell, SlotVisitor& visitor)
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit212SourceJavaScriptCorebytecodeUnlinkedCodeBlockh"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.12/Source/JavaScriptCore/bytecode/UnlinkedCodeBlock.h (198013 => 198014)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.12/Source/JavaScriptCore/bytecode/UnlinkedCodeBlock.h        2016-03-11 14:14:11 UTC (rev 198013)
+++ releases/WebKitGTK/webkit-2.12/Source/JavaScriptCore/bytecode/UnlinkedCodeBlock.h        2016-03-11 14:28:31 UTC (rev 198014)
</span><span class="lines">@@ -148,7 +148,7 @@
</span><span class="cx"> {
</span><span class="cx"> createRareDataIfNecessary();
</span><span class="cx"> unsigned size = m_rareData->m_regexps.size();
</span><del>- m_rareData->m_regexps.append(WriteBarrier<RegExp>(*m_vm, this, r));
</del><ins>+ m_rareData->m_regexps.append(WriteBarrier<RegExp>(*vm(), this, r));
</ins><span class="cx"> return size;
</span><span class="cx"> }
</span><span class="cx"> unsigned numberOfRegExps() const
</span><span class="lines">@@ -170,7 +170,7 @@
</span><span class="cx"> {
</span><span class="cx"> unsigned result = m_constantRegisters.size();
</span><span class="cx"> m_constantRegisters.append(WriteBarrier<Unknown>());
</span><del>- m_constantRegisters.last().set(*m_vm, this, v);
</del><ins>+ m_constantRegisters.last().set(*vm(), this, v);
</ins><span class="cx"> m_constantsSourceCodeRepresentation.append(sourceCodeRepresentation);
</span><span class="cx"> return result;
</span><span class="cx"> }
</span><span class="lines">@@ -249,7 +249,7 @@
</span><span class="cx"> {
</span><span class="cx"> unsigned size = m_functionDecls.size();
</span><span class="cx"> m_functionDecls.append(WriteBarrier<UnlinkedFunctionExecutable>());
</span><del>- m_functionDecls.last().set(*m_vm, this, n);
</del><ins>+ m_functionDecls.last().set(*vm(), this, n);
</ins><span class="cx"> return size;
</span><span class="cx"> }
</span><span class="cx"> UnlinkedFunctionExecutable* functionDecl(int index) { return m_functionDecls[index].get(); }
</span><span class="lines">@@ -258,7 +258,7 @@
</span><span class="cx"> {
</span><span class="cx"> unsigned size = m_functionExprs.size();
</span><span class="cx"> m_functionExprs.append(WriteBarrier<UnlinkedFunctionExecutable>());
</span><del>- m_functionExprs.last().set(*m_vm, this, n);
</del><ins>+ m_functionExprs.last().set(*vm(), this, n);
</ins><span class="cx"> return size;
</span><span class="cx"> }
</span><span class="cx"> UnlinkedFunctionExecutable* functionExpr(int index) { return m_functionExprs[index].get(); }
</span><span class="lines">@@ -269,7 +269,7 @@
</span><span class="cx"> void addExceptionHandler(const UnlinkedHandlerInfo& handler) { createRareDataIfNecessary(); return m_rareData->m_exceptionHandlers.append(handler); }
</span><span class="cx"> UnlinkedHandlerInfo& exceptionHandler(int index) { ASSERT(m_rareData); return m_rareData->m_exceptionHandlers[index]; }
</span><span class="cx">
</span><del>- VM* vm() const { return m_vm; }
</del><ins>+ VM* vm() const;
</ins><span class="cx">
</span><span class="cx"> UnlinkedArrayProfile addArrayProfile() { return m_arrayProfileCount++; }
</span><span class="cx"> unsigned numberOfArrayProfiles() { return m_arrayProfileCount; }
</span><span class="lines">@@ -345,8 +345,16 @@
</span><span class="cx"> ALWAYS_INLINE unsigned startColumn() const { return 0; }
</span><span class="cx"> unsigned endColumn() const { return m_endColumn; }
</span><span class="cx">
</span><del>- void addOpProfileControlFlowBytecodeOffset(size_t offset) { m_opProfileControlFlowBytecodeOffsets.append(offset); }
- const Vector<size_t>& opProfileControlFlowBytecodeOffsets() const { return m_opProfileControlFlowBytecodeOffsets; }
</del><ins>+ void addOpProfileControlFlowBytecodeOffset(size_t offset)
+ {
+ createRareDataIfNecessary();
+ m_rareData->m_opProfileControlFlowBytecodeOffsets.append(offset);
+ }
+ const Vector<size_t>& opProfileControlFlowBytecodeOffsets() const
+ {
+ ASSERT(m_rareData);
+ return m_rareData->m_opProfileControlFlowBytecodeOffsets;
+ }
</ins><span class="cx">
</span><span class="cx"> void dumpExpressionRangeInfo(); // For debugging purpose only.
</span><span class="cx">
</span><span class="lines">@@ -369,11 +377,10 @@
</span><span class="cx">
</span><span class="cx"> void getLineAndColumn(ExpressionRangeInfo&, unsigned& line, unsigned& column);
</span><span class="cx">
</span><ins>+ int m_numParameters;
+
</ins><span class="cx"> std::unique_ptr<UnlinkedInstructionStream> m_unlinkedInstructions;
</span><span class="cx">
</span><del>- int m_numParameters;
- VM* m_vm;
-
</del><span class="cx"> VirtualRegister m_thisRegister;
</span><span class="cx"> VirtualRegister m_scopeRegister;
</span><span class="cx"> VirtualRegister m_globalObjectRegister;
</span><span class="lines">@@ -398,17 +405,17 @@
</span><span class="cx">
</span><span class="cx"> Vector<unsigned> m_jumpTargets;
</span><span class="cx">
</span><ins>+ Vector<unsigned> m_propertyAccessInstructions;
+
</ins><span class="cx"> // Constant Pools
</span><span class="cx"> Vector<Identifier> m_identifiers;
</span><span class="cx"> Vector<WriteBarrier<Unknown>> m_constantRegisters;
</span><span class="cx"> Vector<SourceCodeRepresentation> m_constantsSourceCodeRepresentation;
</span><del>- std::array<unsigned, LinkTimeConstantCount> m_linkTimeConstants;
</del><span class="cx"> typedef Vector<WriteBarrier<UnlinkedFunctionExecutable>> FunctionExpressionVector;
</span><span class="cx"> FunctionExpressionVector m_functionDecls;
</span><span class="cx"> FunctionExpressionVector m_functionExprs;
</span><ins>+ std::array<unsigned, LinkTimeConstantCount> m_linkTimeConstants;
</ins><span class="cx">
</span><del>- Vector<unsigned> m_propertyAccessInstructions;
-
</del><span class="cx"> unsigned m_arrayProfileCount;
</span><span class="cx"> unsigned m_arrayAllocationProfileCount;
</span><span class="cx"> unsigned m_objectAllocationProfileCount;
</span><span class="lines">@@ -432,17 +439,18 @@
</span><span class="cx"> Vector<UnlinkedStringJumpTable> m_stringSwitchJumpTables;
</span><span class="cx">
</span><span class="cx"> Vector<ExpressionRangeInfo::FatPosition> m_expressionInfoFatPositions;
</span><ins>+
+ struct TypeProfilerExpressionRange {
+ unsigned m_startDivot;
+ unsigned m_endDivot;
+ };
+ HashMap<unsigned, TypeProfilerExpressionRange> m_typeProfilerInfoMap;
+ Vector<size_t> m_opProfileControlFlowBytecodeOffsets;
</ins><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> private:
</span><span class="cx"> std::unique_ptr<RareData> m_rareData;
</span><span class="cx"> Vector<ExpressionRangeInfo> m_expressionInfo;
</span><del>- struct TypeProfilerExpressionRange {
- unsigned m_startDivot;
- unsigned m_endDivot;
- };
- HashMap<unsigned, TypeProfilerExpressionRange> m_typeProfilerInfoMap;
- Vector<size_t> m_opProfileControlFlowBytecodeOffsets;
</del><span class="cx">
</span><span class="cx"> protected:
</span><span class="cx"> static void visitChildren(JSCell*, SlotVisitor&);
</span></span></pre>
</div>
</div>
</body>
</html>