<!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>[188242] 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/188242">188242</a></dd>
<dt>Author</dt> <dd>ggaren@apple.com</dd>
<dt>Date</dt> <dd>2015-08-10 18:26:30 -0700 (Mon, 10 Aug 2015)</dd>
</dl>
<h3>Log Message</h3>
<pre>Start beating UnlinkedCodeBlock.h/.cpp with the "One Class per File" stick
https://bugs.webkit.org/show_bug.cgi?id=147856
Reviewed by Saam Barati.
Split out UnlinkedFunctionExecutable.h/.cpp and ExecutableInfo.h into separate files.
* CMakeLists.txt:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
* JavaScriptCore.xcodeproj/project.pbxproj:
* bytecode/ExecutableInfo.h: Copied from Source/JavaScriptCore/bytecode/UnlinkedCodeBlock.h.
(JSC::ExecutableInfo::ExecutableInfo):
(JSC::UnlinkedStringJumpTable::offsetForValue): Deleted.
(JSC::UnlinkedSimpleJumpTable::add): Deleted.
(JSC::UnlinkedInstruction::UnlinkedInstruction): Deleted.
(JSC::UnlinkedCodeBlock::isConstructor): Deleted.
(JSC::UnlinkedCodeBlock::isStrictMode): Deleted.
(JSC::UnlinkedCodeBlock::usesEval): Deleted.
(JSC::UnlinkedCodeBlock::needsFullScopeChain): Deleted.
(JSC::UnlinkedCodeBlock::hasExpressionInfo): Deleted.
(JSC::UnlinkedCodeBlock::setThisRegister): Deleted.
(JSC::UnlinkedCodeBlock::setScopeRegister): Deleted.
(JSC::UnlinkedCodeBlock::setActivationRegister): Deleted.
(JSC::UnlinkedCodeBlock::usesGlobalObject): Deleted.
(JSC::UnlinkedCodeBlock::setGlobalObjectRegister): Deleted.
(JSC::UnlinkedCodeBlock::globalObjectRegister): Deleted.
(JSC::UnlinkedCodeBlock::setNumParameters): Deleted.
(JSC::UnlinkedCodeBlock::addParameter): Deleted.
(JSC::UnlinkedCodeBlock::numParameters): Deleted.
(JSC::UnlinkedCodeBlock::addRegExp): Deleted.
(JSC::UnlinkedCodeBlock::numberOfRegExps): Deleted.
(JSC::UnlinkedCodeBlock::regexp): Deleted.
(JSC::UnlinkedCodeBlock::numberOfIdentifiers): Deleted.
(JSC::UnlinkedCodeBlock::addIdentifier): Deleted.
(JSC::UnlinkedCodeBlock::identifier): Deleted.
(JSC::UnlinkedCodeBlock::identifiers): Deleted.
(JSC::UnlinkedCodeBlock::addConstant): Deleted.
(JSC::UnlinkedCodeBlock::registerIndexForLinkTimeConstant): Deleted.
(JSC::UnlinkedCodeBlock::constantRegisters): Deleted.
(JSC::UnlinkedCodeBlock::constantRegister): Deleted.
(JSC::UnlinkedCodeBlock::isConstantRegisterIndex): Deleted.
(JSC::UnlinkedCodeBlock::constantsSourceCodeRepresentation): Deleted.
(JSC::UnlinkedCodeBlock::numberOfJumpTargets): Deleted.
(JSC::UnlinkedCodeBlock::addJumpTarget): Deleted.
(JSC::UnlinkedCodeBlock::jumpTarget): Deleted.
(JSC::UnlinkedCodeBlock::lastJumpTarget): Deleted.
(JSC::UnlinkedCodeBlock::isBuiltinFunction): Deleted.
(JSC::UnlinkedCodeBlock::constructorKind): Deleted.
(JSC::UnlinkedCodeBlock::shrinkToFit): Deleted.
(JSC::UnlinkedCodeBlock::numberOfSwitchJumpTables): Deleted.
(JSC::UnlinkedCodeBlock::addSwitchJumpTable): Deleted.
(JSC::UnlinkedCodeBlock::switchJumpTable): Deleted.
(JSC::UnlinkedCodeBlock::numberOfStringSwitchJumpTables): Deleted.
(JSC::UnlinkedCodeBlock::addStringSwitchJumpTable): Deleted.
(JSC::UnlinkedCodeBlock::stringSwitchJumpTable): Deleted.
(JSC::UnlinkedCodeBlock::addFunctionDecl): Deleted.
(JSC::UnlinkedCodeBlock::functionDecl): Deleted.
(JSC::UnlinkedCodeBlock::numberOfFunctionDecls): Deleted.
(JSC::UnlinkedCodeBlock::addFunctionExpr): Deleted.
(JSC::UnlinkedCodeBlock::functionExpr): Deleted.
(JSC::UnlinkedCodeBlock::numberOfFunctionExprs): Deleted.
(JSC::UnlinkedCodeBlock::numberOfExceptionHandlers): Deleted.
(JSC::UnlinkedCodeBlock::addExceptionHandler): Deleted.
(JSC::UnlinkedCodeBlock::exceptionHandler): Deleted.
(JSC::UnlinkedCodeBlock::vm): Deleted.
(JSC::UnlinkedCodeBlock::addArrayProfile): Deleted.
(JSC::UnlinkedCodeBlock::numberOfArrayProfiles): Deleted.
(JSC::UnlinkedCodeBlock::addArrayAllocationProfile): Deleted.
(JSC::UnlinkedCodeBlock::numberOfArrayAllocationProfiles): Deleted.
(JSC::UnlinkedCodeBlock::addObjectAllocationProfile): Deleted.
(JSC::UnlinkedCodeBlock::numberOfObjectAllocationProfiles): Deleted.
(JSC::UnlinkedCodeBlock::addValueProfile): Deleted.
(JSC::UnlinkedCodeBlock::numberOfValueProfiles): Deleted.
(JSC::UnlinkedCodeBlock::addLLIntCallLinkInfo): Deleted.
(JSC::UnlinkedCodeBlock::numberOfLLintCallLinkInfos): Deleted.
(JSC::UnlinkedCodeBlock::codeType): Deleted.
(JSC::UnlinkedCodeBlock::thisRegister): Deleted.
(JSC::UnlinkedCodeBlock::scopeRegister): Deleted.
(JSC::UnlinkedCodeBlock::activationRegister): Deleted.
(JSC::UnlinkedCodeBlock::hasActivationRegister): Deleted.
(JSC::UnlinkedCodeBlock::addPropertyAccessInstruction): Deleted.
(JSC::UnlinkedCodeBlock::numberOfPropertyAccessInstructions): Deleted.
(JSC::UnlinkedCodeBlock::propertyAccessInstructions): Deleted.
(JSC::UnlinkedCodeBlock::constantBufferCount): Deleted.
(JSC::UnlinkedCodeBlock::addConstantBuffer): Deleted.
(JSC::UnlinkedCodeBlock::constantBuffer): Deleted.
(JSC::UnlinkedCodeBlock::hasRareData): Deleted.
(JSC::UnlinkedCodeBlock::recordParse): Deleted.
(JSC::UnlinkedCodeBlock::codeFeatures): Deleted.
(JSC::UnlinkedCodeBlock::hasCapturedVariables): Deleted.
(JSC::UnlinkedCodeBlock::firstLine): Deleted.
(JSC::UnlinkedCodeBlock::lineCount): Deleted.
(JSC::UnlinkedCodeBlock::startColumn): Deleted.
(JSC::UnlinkedCodeBlock::endColumn): Deleted.
(JSC::UnlinkedCodeBlock::addOpProfileControlFlowBytecodeOffset): Deleted.
(JSC::UnlinkedCodeBlock::opProfileControlFlowBytecodeOffsets): Deleted.
(JSC::UnlinkedCodeBlock::finishCreation): Deleted.
(JSC::UnlinkedCodeBlock::createRareDataIfNecessary): Deleted.
(JSC::UnlinkedGlobalCodeBlock::UnlinkedGlobalCodeBlock): Deleted.
* bytecode/UnlinkedCodeBlock.cpp:
(JSC::UnlinkedCodeBlock::UnlinkedCodeBlock):
(JSC::generateFunctionCodeBlock): Deleted.
(JSC::UnlinkedFunctionExecutable::UnlinkedFunctionExecutable): Deleted.
(JSC::UnlinkedFunctionExecutable::visitChildren): Deleted.
(JSC::UnlinkedFunctionExecutable::link): Deleted.
(JSC::UnlinkedFunctionExecutable::fromGlobalCode): Deleted.
(JSC::UnlinkedFunctionExecutable::codeBlockFor): Deleted.
* bytecode/UnlinkedCodeBlock.h:
(JSC::ExecutableInfo::ExecutableInfo): Deleted.
(JSC::ExecutableInfo::needsActivation): Deleted.
(JSC::ExecutableInfo::usesEval): Deleted.
(JSC::ExecutableInfo::isStrictMode): Deleted.
(JSC::ExecutableInfo::isConstructor): Deleted.
(JSC::ExecutableInfo::isBuiltinFunction): Deleted.
(JSC::ExecutableInfo::constructorKind): Deleted.
* bytecode/UnlinkedFunctionExecutable.cpp: Copied from Source/JavaScriptCore/bytecode/UnlinkedCodeBlock.cpp.
(JSC::generateFunctionCodeBlock):
(JSC::UnlinkedFunctionExecutable::codeBlockFor):
(JSC::UnlinkedCodeBlock::UnlinkedCodeBlock): Deleted.
(JSC::UnlinkedCodeBlock::visitChildren): Deleted.
(JSC::UnlinkedCodeBlock::lineNumberForBytecodeOffset): Deleted.
(JSC::UnlinkedCodeBlock::getLineAndColumn): Deleted.
(JSC::dumpLineColumnEntry): Deleted.
(JSC::UnlinkedCodeBlock::dumpExpressionRangeInfo): Deleted.
(JSC::UnlinkedCodeBlock::expressionRangeForBytecodeOffset): Deleted.
(JSC::UnlinkedCodeBlock::addExpressionInfo): Deleted.
(JSC::UnlinkedCodeBlock::typeProfilerExpressionInfoForBytecodeOffset): Deleted.
(JSC::UnlinkedCodeBlock::addTypeProfilerExpressionInfo): Deleted.
(JSC::UnlinkedProgramCodeBlock::visitChildren): Deleted.
(JSC::UnlinkedCodeBlock::~UnlinkedCodeBlock): Deleted.
(JSC::UnlinkedProgramCodeBlock::destroy): Deleted.
(JSC::UnlinkedEvalCodeBlock::destroy): Deleted.
(JSC::UnlinkedFunctionCodeBlock::destroy): Deleted.
(JSC::UnlinkedFunctionExecutable::destroy): Deleted.
(JSC::UnlinkedCodeBlock::setInstructions): Deleted.
(JSC::UnlinkedCodeBlock::instructions): Deleted.
* bytecode/UnlinkedFunctionExecutable.h: Copied from Source/JavaScriptCore/bytecode/UnlinkedCodeBlock.h.
(JSC::ExecutableInfo::ExecutableInfo): Deleted.
(JSC::ExecutableInfo::needsActivation): Deleted.
(JSC::ExecutableInfo::usesEval): Deleted.
(JSC::ExecutableInfo::isStrictMode): Deleted.
(JSC::ExecutableInfo::isConstructor): Deleted.
(JSC::ExecutableInfo::isBuiltinFunction): Deleted.
(JSC::ExecutableInfo::constructorKind): Deleted.
(JSC::UnlinkedStringJumpTable::offsetForValue): Deleted.
(JSC::UnlinkedSimpleJumpTable::add): Deleted.
(JSC::UnlinkedInstruction::UnlinkedInstruction): Deleted.
(JSC::UnlinkedCodeBlock::isConstructor): Deleted.
(JSC::UnlinkedCodeBlock::isStrictMode): Deleted.
(JSC::UnlinkedCodeBlock::usesEval): Deleted.
(JSC::UnlinkedCodeBlock::needsFullScopeChain): Deleted.
(JSC::UnlinkedCodeBlock::hasExpressionInfo): Deleted.
(JSC::UnlinkedCodeBlock::setThisRegister): Deleted.
(JSC::UnlinkedCodeBlock::setScopeRegister): Deleted.
(JSC::UnlinkedCodeBlock::setActivationRegister): Deleted.
(JSC::UnlinkedCodeBlock::usesGlobalObject): Deleted.
(JSC::UnlinkedCodeBlock::setGlobalObjectRegister): Deleted.
(JSC::UnlinkedCodeBlock::globalObjectRegister): Deleted.
(JSC::UnlinkedCodeBlock::setNumParameters): Deleted.
(JSC::UnlinkedCodeBlock::addParameter): Deleted.
(JSC::UnlinkedCodeBlock::numParameters): Deleted.
(JSC::UnlinkedCodeBlock::addRegExp): Deleted.
(JSC::UnlinkedCodeBlock::numberOfRegExps): Deleted.
(JSC::UnlinkedCodeBlock::regexp): Deleted.
(JSC::UnlinkedCodeBlock::numberOfIdentifiers): Deleted.
(JSC::UnlinkedCodeBlock::addIdentifier): Deleted.
(JSC::UnlinkedCodeBlock::identifier): Deleted.
(JSC::UnlinkedCodeBlock::identifiers): Deleted.
(JSC::UnlinkedCodeBlock::addConstant): Deleted.
(JSC::UnlinkedCodeBlock::registerIndexForLinkTimeConstant): Deleted.
(JSC::UnlinkedCodeBlock::constantRegisters): Deleted.
(JSC::UnlinkedCodeBlock::constantRegister): Deleted.
(JSC::UnlinkedCodeBlock::isConstantRegisterIndex): Deleted.
(JSC::UnlinkedCodeBlock::constantsSourceCodeRepresentation): Deleted.
(JSC::UnlinkedCodeBlock::numberOfJumpTargets): Deleted.
(JSC::UnlinkedCodeBlock::addJumpTarget): Deleted.
(JSC::UnlinkedCodeBlock::jumpTarget): Deleted.
(JSC::UnlinkedCodeBlock::lastJumpTarget): Deleted.
(JSC::UnlinkedCodeBlock::isBuiltinFunction): Deleted.
(JSC::UnlinkedCodeBlock::constructorKind): Deleted.
(JSC::UnlinkedCodeBlock::shrinkToFit): Deleted.
(JSC::UnlinkedCodeBlock::numberOfSwitchJumpTables): Deleted.
(JSC::UnlinkedCodeBlock::addSwitchJumpTable): Deleted.
(JSC::UnlinkedCodeBlock::switchJumpTable): Deleted.
(JSC::UnlinkedCodeBlock::numberOfStringSwitchJumpTables): Deleted.
(JSC::UnlinkedCodeBlock::addStringSwitchJumpTable): Deleted.
(JSC::UnlinkedCodeBlock::stringSwitchJumpTable): Deleted.
(JSC::UnlinkedCodeBlock::addFunctionDecl): Deleted.
(JSC::UnlinkedCodeBlock::functionDecl): Deleted.
(JSC::UnlinkedCodeBlock::numberOfFunctionDecls): Deleted.
(JSC::UnlinkedCodeBlock::addFunctionExpr): Deleted.
(JSC::UnlinkedCodeBlock::functionExpr): Deleted.
(JSC::UnlinkedCodeBlock::numberOfFunctionExprs): Deleted.
(JSC::UnlinkedCodeBlock::numberOfExceptionHandlers): Deleted.
(JSC::UnlinkedCodeBlock::addExceptionHandler): Deleted.
(JSC::UnlinkedCodeBlock::exceptionHandler): Deleted.
(JSC::UnlinkedCodeBlock::vm): Deleted.
(JSC::UnlinkedCodeBlock::addArrayProfile): Deleted.
(JSC::UnlinkedCodeBlock::numberOfArrayProfiles): Deleted.
(JSC::UnlinkedCodeBlock::addArrayAllocationProfile): Deleted.
(JSC::UnlinkedCodeBlock::numberOfArrayAllocationProfiles): Deleted.
(JSC::UnlinkedCodeBlock::addObjectAllocationProfile): Deleted.
(JSC::UnlinkedCodeBlock::numberOfObjectAllocationProfiles): Deleted.
(JSC::UnlinkedCodeBlock::addValueProfile): Deleted.
(JSC::UnlinkedCodeBlock::numberOfValueProfiles): Deleted.
(JSC::UnlinkedCodeBlock::addLLIntCallLinkInfo): Deleted.
(JSC::UnlinkedCodeBlock::numberOfLLintCallLinkInfos): Deleted.
(JSC::UnlinkedCodeBlock::codeType): Deleted.
(JSC::UnlinkedCodeBlock::thisRegister): Deleted.
(JSC::UnlinkedCodeBlock::scopeRegister): Deleted.
(JSC::UnlinkedCodeBlock::activationRegister): Deleted.
(JSC::UnlinkedCodeBlock::hasActivationRegister): Deleted.
(JSC::UnlinkedCodeBlock::addPropertyAccessInstruction): Deleted.
(JSC::UnlinkedCodeBlock::numberOfPropertyAccessInstructions): Deleted.
(JSC::UnlinkedCodeBlock::propertyAccessInstructions): Deleted.
(JSC::UnlinkedCodeBlock::constantBufferCount): Deleted.
(JSC::UnlinkedCodeBlock::addConstantBuffer): Deleted.
(JSC::UnlinkedCodeBlock::constantBuffer): Deleted.
(JSC::UnlinkedCodeBlock::hasRareData): Deleted.
(JSC::UnlinkedCodeBlock::recordParse): Deleted.
(JSC::UnlinkedCodeBlock::codeFeatures): Deleted.
(JSC::UnlinkedCodeBlock::hasCapturedVariables): Deleted.
(JSC::UnlinkedCodeBlock::firstLine): Deleted.
(JSC::UnlinkedCodeBlock::lineCount): Deleted.
(JSC::UnlinkedCodeBlock::startColumn): Deleted.
(JSC::UnlinkedCodeBlock::endColumn): Deleted.
(JSC::UnlinkedCodeBlock::addOpProfileControlFlowBytecodeOffset): Deleted.
(JSC::UnlinkedCodeBlock::opProfileControlFlowBytecodeOffsets): Deleted.
(JSC::UnlinkedCodeBlock::finishCreation): Deleted.
(JSC::UnlinkedCodeBlock::createRareDataIfNecessary): Deleted.
(JSC::UnlinkedGlobalCodeBlock::UnlinkedGlobalCodeBlock): Deleted.
* runtime/Executable.h:</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="#trunkSourceJavaScriptCoreJavaScriptCorevcxprojJavaScriptCorevcxproj">trunk/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCore.vcxproj</a></li>
<li><a href="#trunkSourceJavaScriptCoreJavaScriptCorevcxprojJavaScriptCorevcxprojfilters">trunk/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters</a></li>
<li><a href="#trunkSourceJavaScriptCoreJavaScriptCorexcodeprojprojectpbxproj">trunk/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkSourceJavaScriptCorebytecodeUnlinkedCodeBlockcpp">trunk/Source/JavaScriptCore/bytecode/UnlinkedCodeBlock.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCorebytecodeUnlinkedCodeBlockh">trunk/Source/JavaScriptCore/bytecode/UnlinkedCodeBlock.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeExecutableh">trunk/Source/JavaScriptCore/runtime/Executable.h</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a href="#trunkSourceJavaScriptCorebytecodeExecutableInfoh">trunk/Source/JavaScriptCore/bytecode/ExecutableInfo.h</a></li>
<li><a href="#trunkSourceJavaScriptCorebytecodeUnlinkedFunctionExecutablecpp">trunk/Source/JavaScriptCore/bytecode/UnlinkedFunctionExecutable.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCorebytecodeUnlinkedFunctionExecutableh">trunk/Source/JavaScriptCore/bytecode/UnlinkedFunctionExecutable.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 (188241 => 188242)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/CMakeLists.txt        2015-08-11 01:11:11 UTC (rev 188241)
+++ trunk/Source/JavaScriptCore/CMakeLists.txt        2015-08-11 01:26:30 UTC (rev 188242)
</span><span class="lines">@@ -115,6 +115,7 @@
</span><span class="cx"> bytecode/ToThisStatus.cpp
</span><span class="cx"> bytecode/TrackedReferences.cpp
</span><span class="cx"> bytecode/UnlinkedCodeBlock.cpp
</span><ins>+ bytecode/UnlinkedFunctionExecutable.cpp
</ins><span class="cx"> bytecode/UnlinkedInstructionStream.cpp
</span><span class="cx"> bytecode/ValueRecovery.cpp
</span><span class="cx"> bytecode/VariableWriteFireDetail.cpp
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/ChangeLog (188241 => 188242)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/ChangeLog        2015-08-11 01:11:11 UTC (rev 188241)
+++ trunk/Source/JavaScriptCore/ChangeLog        2015-08-11 01:26:30 UTC (rev 188242)
</span><span class="lines">@@ -1,3 +1,239 @@
</span><ins>+2015-08-10 Geoffrey Garen <ggaren@apple.com>
+
+ Start beating UnlinkedCodeBlock.h/.cpp with the "One Class per File" stick
+ https://bugs.webkit.org/show_bug.cgi?id=147856
+
+ Reviewed by Saam Barati.
+
+ Split out UnlinkedFunctionExecutable.h/.cpp and ExecutableInfo.h into separate files.
+
+ * CMakeLists.txt:
+ * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
+ * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
+ * JavaScriptCore.xcodeproj/project.pbxproj:
+ * bytecode/ExecutableInfo.h: Copied from Source/JavaScriptCore/bytecode/UnlinkedCodeBlock.h.
+ (JSC::ExecutableInfo::ExecutableInfo):
+ (JSC::UnlinkedStringJumpTable::offsetForValue): Deleted.
+ (JSC::UnlinkedSimpleJumpTable::add): Deleted.
+ (JSC::UnlinkedInstruction::UnlinkedInstruction): Deleted.
+ (JSC::UnlinkedCodeBlock::isConstructor): Deleted.
+ (JSC::UnlinkedCodeBlock::isStrictMode): Deleted.
+ (JSC::UnlinkedCodeBlock::usesEval): Deleted.
+ (JSC::UnlinkedCodeBlock::needsFullScopeChain): Deleted.
+ (JSC::UnlinkedCodeBlock::hasExpressionInfo): Deleted.
+ (JSC::UnlinkedCodeBlock::setThisRegister): Deleted.
+ (JSC::UnlinkedCodeBlock::setScopeRegister): Deleted.
+ (JSC::UnlinkedCodeBlock::setActivationRegister): Deleted.
+ (JSC::UnlinkedCodeBlock::usesGlobalObject): Deleted.
+ (JSC::UnlinkedCodeBlock::setGlobalObjectRegister): Deleted.
+ (JSC::UnlinkedCodeBlock::globalObjectRegister): Deleted.
+ (JSC::UnlinkedCodeBlock::setNumParameters): Deleted.
+ (JSC::UnlinkedCodeBlock::addParameter): Deleted.
+ (JSC::UnlinkedCodeBlock::numParameters): Deleted.
+ (JSC::UnlinkedCodeBlock::addRegExp): Deleted.
+ (JSC::UnlinkedCodeBlock::numberOfRegExps): Deleted.
+ (JSC::UnlinkedCodeBlock::regexp): Deleted.
+ (JSC::UnlinkedCodeBlock::numberOfIdentifiers): Deleted.
+ (JSC::UnlinkedCodeBlock::addIdentifier): Deleted.
+ (JSC::UnlinkedCodeBlock::identifier): Deleted.
+ (JSC::UnlinkedCodeBlock::identifiers): Deleted.
+ (JSC::UnlinkedCodeBlock::addConstant): Deleted.
+ (JSC::UnlinkedCodeBlock::registerIndexForLinkTimeConstant): Deleted.
+ (JSC::UnlinkedCodeBlock::constantRegisters): Deleted.
+ (JSC::UnlinkedCodeBlock::constantRegister): Deleted.
+ (JSC::UnlinkedCodeBlock::isConstantRegisterIndex): Deleted.
+ (JSC::UnlinkedCodeBlock::constantsSourceCodeRepresentation): Deleted.
+ (JSC::UnlinkedCodeBlock::numberOfJumpTargets): Deleted.
+ (JSC::UnlinkedCodeBlock::addJumpTarget): Deleted.
+ (JSC::UnlinkedCodeBlock::jumpTarget): Deleted.
+ (JSC::UnlinkedCodeBlock::lastJumpTarget): Deleted.
+ (JSC::UnlinkedCodeBlock::isBuiltinFunction): Deleted.
+ (JSC::UnlinkedCodeBlock::constructorKind): Deleted.
+ (JSC::UnlinkedCodeBlock::shrinkToFit): Deleted.
+ (JSC::UnlinkedCodeBlock::numberOfSwitchJumpTables): Deleted.
+ (JSC::UnlinkedCodeBlock::addSwitchJumpTable): Deleted.
+ (JSC::UnlinkedCodeBlock::switchJumpTable): Deleted.
+ (JSC::UnlinkedCodeBlock::numberOfStringSwitchJumpTables): Deleted.
+ (JSC::UnlinkedCodeBlock::addStringSwitchJumpTable): Deleted.
+ (JSC::UnlinkedCodeBlock::stringSwitchJumpTable): Deleted.
+ (JSC::UnlinkedCodeBlock::addFunctionDecl): Deleted.
+ (JSC::UnlinkedCodeBlock::functionDecl): Deleted.
+ (JSC::UnlinkedCodeBlock::numberOfFunctionDecls): Deleted.
+ (JSC::UnlinkedCodeBlock::addFunctionExpr): Deleted.
+ (JSC::UnlinkedCodeBlock::functionExpr): Deleted.
+ (JSC::UnlinkedCodeBlock::numberOfFunctionExprs): Deleted.
+ (JSC::UnlinkedCodeBlock::numberOfExceptionHandlers): Deleted.
+ (JSC::UnlinkedCodeBlock::addExceptionHandler): Deleted.
+ (JSC::UnlinkedCodeBlock::exceptionHandler): Deleted.
+ (JSC::UnlinkedCodeBlock::vm): Deleted.
+ (JSC::UnlinkedCodeBlock::addArrayProfile): Deleted.
+ (JSC::UnlinkedCodeBlock::numberOfArrayProfiles): Deleted.
+ (JSC::UnlinkedCodeBlock::addArrayAllocationProfile): Deleted.
+ (JSC::UnlinkedCodeBlock::numberOfArrayAllocationProfiles): Deleted.
+ (JSC::UnlinkedCodeBlock::addObjectAllocationProfile): Deleted.
+ (JSC::UnlinkedCodeBlock::numberOfObjectAllocationProfiles): Deleted.
+ (JSC::UnlinkedCodeBlock::addValueProfile): Deleted.
+ (JSC::UnlinkedCodeBlock::numberOfValueProfiles): Deleted.
+ (JSC::UnlinkedCodeBlock::addLLIntCallLinkInfo): Deleted.
+ (JSC::UnlinkedCodeBlock::numberOfLLintCallLinkInfos): Deleted.
+ (JSC::UnlinkedCodeBlock::codeType): Deleted.
+ (JSC::UnlinkedCodeBlock::thisRegister): Deleted.
+ (JSC::UnlinkedCodeBlock::scopeRegister): Deleted.
+ (JSC::UnlinkedCodeBlock::activationRegister): Deleted.
+ (JSC::UnlinkedCodeBlock::hasActivationRegister): Deleted.
+ (JSC::UnlinkedCodeBlock::addPropertyAccessInstruction): Deleted.
+ (JSC::UnlinkedCodeBlock::numberOfPropertyAccessInstructions): Deleted.
+ (JSC::UnlinkedCodeBlock::propertyAccessInstructions): Deleted.
+ (JSC::UnlinkedCodeBlock::constantBufferCount): Deleted.
+ (JSC::UnlinkedCodeBlock::addConstantBuffer): Deleted.
+ (JSC::UnlinkedCodeBlock::constantBuffer): Deleted.
+ (JSC::UnlinkedCodeBlock::hasRareData): Deleted.
+ (JSC::UnlinkedCodeBlock::recordParse): Deleted.
+ (JSC::UnlinkedCodeBlock::codeFeatures): Deleted.
+ (JSC::UnlinkedCodeBlock::hasCapturedVariables): Deleted.
+ (JSC::UnlinkedCodeBlock::firstLine): Deleted.
+ (JSC::UnlinkedCodeBlock::lineCount): Deleted.
+ (JSC::UnlinkedCodeBlock::startColumn): Deleted.
+ (JSC::UnlinkedCodeBlock::endColumn): Deleted.
+ (JSC::UnlinkedCodeBlock::addOpProfileControlFlowBytecodeOffset): Deleted.
+ (JSC::UnlinkedCodeBlock::opProfileControlFlowBytecodeOffsets): Deleted.
+ (JSC::UnlinkedCodeBlock::finishCreation): Deleted.
+ (JSC::UnlinkedCodeBlock::createRareDataIfNecessary): Deleted.
+ (JSC::UnlinkedGlobalCodeBlock::UnlinkedGlobalCodeBlock): Deleted.
+ * bytecode/UnlinkedCodeBlock.cpp:
+ (JSC::UnlinkedCodeBlock::UnlinkedCodeBlock):
+ (JSC::generateFunctionCodeBlock): Deleted.
+ (JSC::UnlinkedFunctionExecutable::UnlinkedFunctionExecutable): Deleted.
+ (JSC::UnlinkedFunctionExecutable::visitChildren): Deleted.
+ (JSC::UnlinkedFunctionExecutable::link): Deleted.
+ (JSC::UnlinkedFunctionExecutable::fromGlobalCode): Deleted.
+ (JSC::UnlinkedFunctionExecutable::codeBlockFor): Deleted.
+ * bytecode/UnlinkedCodeBlock.h:
+ (JSC::ExecutableInfo::ExecutableInfo): Deleted.
+ (JSC::ExecutableInfo::needsActivation): Deleted.
+ (JSC::ExecutableInfo::usesEval): Deleted.
+ (JSC::ExecutableInfo::isStrictMode): Deleted.
+ (JSC::ExecutableInfo::isConstructor): Deleted.
+ (JSC::ExecutableInfo::isBuiltinFunction): Deleted.
+ (JSC::ExecutableInfo::constructorKind): Deleted.
+ * bytecode/UnlinkedFunctionExecutable.cpp: Copied from Source/JavaScriptCore/bytecode/UnlinkedCodeBlock.cpp.
+ (JSC::generateFunctionCodeBlock):
+ (JSC::UnlinkedFunctionExecutable::codeBlockFor):
+ (JSC::UnlinkedCodeBlock::UnlinkedCodeBlock): Deleted.
+ (JSC::UnlinkedCodeBlock::visitChildren): Deleted.
+ (JSC::UnlinkedCodeBlock::lineNumberForBytecodeOffset): Deleted.
+ (JSC::UnlinkedCodeBlock::getLineAndColumn): Deleted.
+ (JSC::dumpLineColumnEntry): Deleted.
+ (JSC::UnlinkedCodeBlock::dumpExpressionRangeInfo): Deleted.
+ (JSC::UnlinkedCodeBlock::expressionRangeForBytecodeOffset): Deleted.
+ (JSC::UnlinkedCodeBlock::addExpressionInfo): Deleted.
+ (JSC::UnlinkedCodeBlock::typeProfilerExpressionInfoForBytecodeOffset): Deleted.
+ (JSC::UnlinkedCodeBlock::addTypeProfilerExpressionInfo): Deleted.
+ (JSC::UnlinkedProgramCodeBlock::visitChildren): Deleted.
+ (JSC::UnlinkedCodeBlock::~UnlinkedCodeBlock): Deleted.
+ (JSC::UnlinkedProgramCodeBlock::destroy): Deleted.
+ (JSC::UnlinkedEvalCodeBlock::destroy): Deleted.
+ (JSC::UnlinkedFunctionCodeBlock::destroy): Deleted.
+ (JSC::UnlinkedFunctionExecutable::destroy): Deleted.
+ (JSC::UnlinkedCodeBlock::setInstructions): Deleted.
+ (JSC::UnlinkedCodeBlock::instructions): Deleted.
+ * bytecode/UnlinkedFunctionExecutable.h: Copied from Source/JavaScriptCore/bytecode/UnlinkedCodeBlock.h.
+ (JSC::ExecutableInfo::ExecutableInfo): Deleted.
+ (JSC::ExecutableInfo::needsActivation): Deleted.
+ (JSC::ExecutableInfo::usesEval): Deleted.
+ (JSC::ExecutableInfo::isStrictMode): Deleted.
+ (JSC::ExecutableInfo::isConstructor): Deleted.
+ (JSC::ExecutableInfo::isBuiltinFunction): Deleted.
+ (JSC::ExecutableInfo::constructorKind): Deleted.
+ (JSC::UnlinkedStringJumpTable::offsetForValue): Deleted.
+ (JSC::UnlinkedSimpleJumpTable::add): Deleted.
+ (JSC::UnlinkedInstruction::UnlinkedInstruction): Deleted.
+ (JSC::UnlinkedCodeBlock::isConstructor): Deleted.
+ (JSC::UnlinkedCodeBlock::isStrictMode): Deleted.
+ (JSC::UnlinkedCodeBlock::usesEval): Deleted.
+ (JSC::UnlinkedCodeBlock::needsFullScopeChain): Deleted.
+ (JSC::UnlinkedCodeBlock::hasExpressionInfo): Deleted.
+ (JSC::UnlinkedCodeBlock::setThisRegister): Deleted.
+ (JSC::UnlinkedCodeBlock::setScopeRegister): Deleted.
+ (JSC::UnlinkedCodeBlock::setActivationRegister): Deleted.
+ (JSC::UnlinkedCodeBlock::usesGlobalObject): Deleted.
+ (JSC::UnlinkedCodeBlock::setGlobalObjectRegister): Deleted.
+ (JSC::UnlinkedCodeBlock::globalObjectRegister): Deleted.
+ (JSC::UnlinkedCodeBlock::setNumParameters): Deleted.
+ (JSC::UnlinkedCodeBlock::addParameter): Deleted.
+ (JSC::UnlinkedCodeBlock::numParameters): Deleted.
+ (JSC::UnlinkedCodeBlock::addRegExp): Deleted.
+ (JSC::UnlinkedCodeBlock::numberOfRegExps): Deleted.
+ (JSC::UnlinkedCodeBlock::regexp): Deleted.
+ (JSC::UnlinkedCodeBlock::numberOfIdentifiers): Deleted.
+ (JSC::UnlinkedCodeBlock::addIdentifier): Deleted.
+ (JSC::UnlinkedCodeBlock::identifier): Deleted.
+ (JSC::UnlinkedCodeBlock::identifiers): Deleted.
+ (JSC::UnlinkedCodeBlock::addConstant): Deleted.
+ (JSC::UnlinkedCodeBlock::registerIndexForLinkTimeConstant): Deleted.
+ (JSC::UnlinkedCodeBlock::constantRegisters): Deleted.
+ (JSC::UnlinkedCodeBlock::constantRegister): Deleted.
+ (JSC::UnlinkedCodeBlock::isConstantRegisterIndex): Deleted.
+ (JSC::UnlinkedCodeBlock::constantsSourceCodeRepresentation): Deleted.
+ (JSC::UnlinkedCodeBlock::numberOfJumpTargets): Deleted.
+ (JSC::UnlinkedCodeBlock::addJumpTarget): Deleted.
+ (JSC::UnlinkedCodeBlock::jumpTarget): Deleted.
+ (JSC::UnlinkedCodeBlock::lastJumpTarget): Deleted.
+ (JSC::UnlinkedCodeBlock::isBuiltinFunction): Deleted.
+ (JSC::UnlinkedCodeBlock::constructorKind): Deleted.
+ (JSC::UnlinkedCodeBlock::shrinkToFit): Deleted.
+ (JSC::UnlinkedCodeBlock::numberOfSwitchJumpTables): Deleted.
+ (JSC::UnlinkedCodeBlock::addSwitchJumpTable): Deleted.
+ (JSC::UnlinkedCodeBlock::switchJumpTable): Deleted.
+ (JSC::UnlinkedCodeBlock::numberOfStringSwitchJumpTables): Deleted.
+ (JSC::UnlinkedCodeBlock::addStringSwitchJumpTable): Deleted.
+ (JSC::UnlinkedCodeBlock::stringSwitchJumpTable): Deleted.
+ (JSC::UnlinkedCodeBlock::addFunctionDecl): Deleted.
+ (JSC::UnlinkedCodeBlock::functionDecl): Deleted.
+ (JSC::UnlinkedCodeBlock::numberOfFunctionDecls): Deleted.
+ (JSC::UnlinkedCodeBlock::addFunctionExpr): Deleted.
+ (JSC::UnlinkedCodeBlock::functionExpr): Deleted.
+ (JSC::UnlinkedCodeBlock::numberOfFunctionExprs): Deleted.
+ (JSC::UnlinkedCodeBlock::numberOfExceptionHandlers): Deleted.
+ (JSC::UnlinkedCodeBlock::addExceptionHandler): Deleted.
+ (JSC::UnlinkedCodeBlock::exceptionHandler): Deleted.
+ (JSC::UnlinkedCodeBlock::vm): Deleted.
+ (JSC::UnlinkedCodeBlock::addArrayProfile): Deleted.
+ (JSC::UnlinkedCodeBlock::numberOfArrayProfiles): Deleted.
+ (JSC::UnlinkedCodeBlock::addArrayAllocationProfile): Deleted.
+ (JSC::UnlinkedCodeBlock::numberOfArrayAllocationProfiles): Deleted.
+ (JSC::UnlinkedCodeBlock::addObjectAllocationProfile): Deleted.
+ (JSC::UnlinkedCodeBlock::numberOfObjectAllocationProfiles): Deleted.
+ (JSC::UnlinkedCodeBlock::addValueProfile): Deleted.
+ (JSC::UnlinkedCodeBlock::numberOfValueProfiles): Deleted.
+ (JSC::UnlinkedCodeBlock::addLLIntCallLinkInfo): Deleted.
+ (JSC::UnlinkedCodeBlock::numberOfLLintCallLinkInfos): Deleted.
+ (JSC::UnlinkedCodeBlock::codeType): Deleted.
+ (JSC::UnlinkedCodeBlock::thisRegister): Deleted.
+ (JSC::UnlinkedCodeBlock::scopeRegister): Deleted.
+ (JSC::UnlinkedCodeBlock::activationRegister): Deleted.
+ (JSC::UnlinkedCodeBlock::hasActivationRegister): Deleted.
+ (JSC::UnlinkedCodeBlock::addPropertyAccessInstruction): Deleted.
+ (JSC::UnlinkedCodeBlock::numberOfPropertyAccessInstructions): Deleted.
+ (JSC::UnlinkedCodeBlock::propertyAccessInstructions): Deleted.
+ (JSC::UnlinkedCodeBlock::constantBufferCount): Deleted.
+ (JSC::UnlinkedCodeBlock::addConstantBuffer): Deleted.
+ (JSC::UnlinkedCodeBlock::constantBuffer): Deleted.
+ (JSC::UnlinkedCodeBlock::hasRareData): Deleted.
+ (JSC::UnlinkedCodeBlock::recordParse): Deleted.
+ (JSC::UnlinkedCodeBlock::codeFeatures): Deleted.
+ (JSC::UnlinkedCodeBlock::hasCapturedVariables): Deleted.
+ (JSC::UnlinkedCodeBlock::firstLine): Deleted.
+ (JSC::UnlinkedCodeBlock::lineCount): Deleted.
+ (JSC::UnlinkedCodeBlock::startColumn): Deleted.
+ (JSC::UnlinkedCodeBlock::endColumn): Deleted.
+ (JSC::UnlinkedCodeBlock::addOpProfileControlFlowBytecodeOffset): Deleted.
+ (JSC::UnlinkedCodeBlock::opProfileControlFlowBytecodeOffsets): Deleted.
+ (JSC::UnlinkedCodeBlock::finishCreation): Deleted.
+ (JSC::UnlinkedCodeBlock::createRareDataIfNecessary): Deleted.
+ (JSC::UnlinkedGlobalCodeBlock::UnlinkedGlobalCodeBlock): Deleted.
+ * runtime/Executable.h:
+
</ins><span class="cx"> 2015-08-10 Mark Lam <mark.lam@apple.com>
</span><span class="cx">
</span><span class="cx"> Refactor LiveObjectList and LiveObjectData into their own files.
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreJavaScriptCorevcxprojJavaScriptCorevcxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCore.vcxproj (188241 => 188242)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCore.vcxproj        2015-08-11 01:11:11 UTC (rev 188241)
+++ trunk/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCore.vcxproj        2015-08-11 01:26:30 UTC (rev 188242)
</span><span class="lines">@@ -355,6 +355,7 @@
</span><span class="cx"> <ClCompile Include="..\bytecode\ToThisStatus.cpp" />
</span><span class="cx"> <ClCompile Include="..\bytecode\TrackedReferences.cpp" />
</span><span class="cx"> <ClCompile Include="..\bytecode\UnlinkedCodeBlock.cpp" />
</span><ins>+ <ClCompile Include="..\bytecode\UnlinkedFunctionExecutable.cpp" />
</ins><span class="cx"> <ClCompile Include="..\bytecode\UnlinkedInstructionStream.cpp" />
</span><span class="cx"> <ClCompile Include="..\bytecode\ValueRecovery.cpp" />
</span><span class="cx"> <ClCompile Include="..\bytecode\VariableWriteFireDetail.cpp" />
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreJavaScriptCorevcxprojJavaScriptCorevcxprojfilters"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters (188241 => 188242)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters        2015-08-11 01:11:11 UTC (rev 188241)
+++ trunk/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters        2015-08-11 01:26:30 UTC (rev 188242)
</span><span class="lines">@@ -219,6 +219,9 @@
</span><span class="cx"> <ClCompile Include="..\bytecode\UnlinkedCodeBlock.cpp">
</span><span class="cx"> <Filter>bytecode</Filter>
</span><span class="cx"> </ClCompile>
</span><ins>+ <ClCompile Include="..\bytecode\UnlinkedFunctionExecutable.cpp">
+ <Filter>bytecode</Filter>
+ </ClCompile>
</ins><span class="cx"> <ClCompile Include="..\bytecode\UnlinkedInstructionStream.cpp">
</span><span class="cx"> <Filter>bytecode</Filter>
</span><span class="cx"> </ClCompile>
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreJavaScriptCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj (188241 => 188242)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj        2015-08-11 01:11:11 UTC (rev 188241)
+++ trunk/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj        2015-08-11 01:26:30 UTC (rev 188242)
</span><span class="lines">@@ -770,6 +770,9 @@
</span><span class="cx">                 140D17D70E8AD4A9000CD17D /* JSBasePrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 140D17D60E8AD4A9000CD17D /* JSBasePrivate.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 141211310A48794D00480255 /* JavaScriptCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 932F5BD90822A1C700736975 /* JavaScriptCore.framework */; };
</span><span class="cx">                 141211340A48795800480255 /* minidom.c in Sources */ = {isa = PBXBuildFile; fileRef = 141211020A48780900480255 /* minidom.c */; };
</span><ins>+                14142E511B796ECE00F4BF4B /* UnlinkedFunctionExecutable.h in Headers */ = {isa = PBXBuildFile; fileRef = 14142E501B796ECE00F4BF4B /* UnlinkedFunctionExecutable.h */; settings = {ATTRIBUTES = (Private, ); }; };
+                14142E531B796EDD00F4BF4B /* ExecutableInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = 14142E521B796EDD00F4BF4B /* ExecutableInfo.h */; settings = {ATTRIBUTES = (Private, ); }; };
+                14142E551B7973C000F4BF4B /* UnlinkedFunctionExecutable.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 14142E541B7973C000F4BF4B /* UnlinkedFunctionExecutable.cpp */; };
</ins><span class="cx">                 141448CB13A176EC00F5BA1A /* MarkedBlockSet.h in Headers */ = {isa = PBXBuildFile; fileRef = 141448CA13A176EC00F5BA1A /* MarkedBlockSet.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 141448CD13A1783700F5BA1A /* TinyBloomFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = 141448CC13A1783700F5BA1A /* TinyBloomFilter.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 14150133154BB13F005D8C98 /* WeakSetInlines.h in Headers */ = {isa = PBXBuildFile; fileRef = 14150132154BB13F005D8C98 /* WeakSetInlines.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="lines">@@ -2550,6 +2553,9 @@
</span><span class="cx">                 141211020A48780900480255 /* minidom.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = minidom.c; path = tests/minidom.c; sourceTree = "<group>"; };
</span><span class="cx">                 1412110D0A48788700480255 /* minidom.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; name = minidom.js; path = tests/minidom.js; sourceTree = "<group>"; };
</span><span class="cx">                 141211200A48793C00480255 /* minidom */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = minidom; sourceTree = BUILT_PRODUCTS_DIR; };
</span><ins>+                14142E501B796ECE00F4BF4B /* UnlinkedFunctionExecutable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UnlinkedFunctionExecutable.h; sourceTree = "<group>"; };
+                14142E521B796EDD00F4BF4B /* ExecutableInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ExecutableInfo.h; sourceTree = "<group>"; };
+                14142E541B7973C000F4BF4B /* UnlinkedFunctionExecutable.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UnlinkedFunctionExecutable.cpp; sourceTree = "<group>"; };
</ins><span class="cx">                 141448CA13A176EC00F5BA1A /* MarkedBlockSet.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MarkedBlockSet.h; sourceTree = "<group>"; };
</span><span class="cx">                 141448CC13A1783700F5BA1A /* TinyBloomFilter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TinyBloomFilter.h; sourceTree = "<group>"; };
</span><span class="cx">                 14150132154BB13F005D8C98 /* WeakSetInlines.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WeakSetInlines.h; sourceTree = "<group>"; };
</span><span class="lines">@@ -5428,6 +5434,7 @@
</span><span class="cx">                                 0FBC0AE41496C7C100D4FBDD /* DFGExitProfile.cpp */,
</span><span class="cx">                                 0FBC0AE51496C7C100D4FBDD /* DFGExitProfile.h */,
</span><span class="cx">                                 969A07920ED1D3AE00F1F681 /* EvalCodeCache.h */,
</span><ins>+                                14142E521B796EDD00F4BF4B /* ExecutableInfo.h */,
</ins><span class="cx">                                 0F56A1D415001CF2002992B1 /* ExecutionCounter.cpp */,
</span><span class="cx">                                 0F56A1D115000F31002992B1 /* ExecutionCounter.h */,
</span><span class="cx">                                 0F0332BF18ADFAE1005F979A /* ExitingJITType.cpp */,
</span><span class="lines">@@ -5495,6 +5502,8 @@
</span><span class="cx">                                 0F2D4DE719832DAC007D4B19 /* TypeLocation.h */,
</span><span class="cx">                                 A79E781E15EECBA80047C855 /* UnlinkedCodeBlock.cpp */,
</span><span class="cx">                                 A79E781F15EECBA80047C855 /* UnlinkedCodeBlock.h */,
</span><ins>+                                14142E501B796ECE00F4BF4B /* UnlinkedFunctionExecutable.h */,
+                                14142E541B7973C000F4BF4B /* UnlinkedFunctionExecutable.cpp */,
</ins><span class="cx">                                 B59F89381891ADB500D5CCDC /* UnlinkedInstructionStream.cpp */,
</span><span class="cx">                                 B59F89371891AD3300D5CCDC /* UnlinkedInstructionStream.h */,
</span><span class="cx">                                 0F963B3613FC6FDE0002D9B2 /* ValueProfile.h */,
</span><span class="lines">@@ -6083,12 +6092,14 @@
</span><span class="cx">                                 0FDDBFB61666EEDA00C55FEF /* DFGVariableAccessDataDump.h in Headers */,
</span><span class="cx">                                 0F2BDC491522809600CD8910 /* DFGVariableEvent.h in Headers */,
</span><span class="cx">                                 0F2BDC4B1522809D00CD8910 /* DFGVariableEventStream.h in Headers */,
</span><ins>+                                14142E511B796ECE00F4BF4B /* UnlinkedFunctionExecutable.h in Headers */,
</ins><span class="cx">                                 0FFFC96014EF90BD00C72532 /* DFGVirtualRegisterAllocationPhase.h in Headers */,
</span><span class="cx">                                 0FC97F4218202119002C9B26 /* DFGWatchpointCollectionPhase.h in Headers */,
</span><span class="cx">                                 0FDB2CE8174830A2007B3C1B /* DFGWorklist.h in Headers */,
</span><span class="cx">                                 0FF42731158EBD54004CB9FF /* Disassembler.h in Headers */,
</span><span class="cx">                                 A70447EE17A0BD7000F5898E /* DumpContext.h in Headers */,
</span><span class="cx">                                 99E45A2418A1B2590026D88F /* EmptyInputCursor.h in Headers */,
</span><ins>+                                14142E531B796EDD00F4BF4B /* ExecutableInfo.h in Headers */,
</ins><span class="cx">                                 99E45A2618A1B2590026D88F /* EncodedValue.h in Headers */,
</span><span class="cx">                                 0F5874EE194FEB1200AAB2C1 /* DFGMayExit.h in Headers */,
</span><span class="cx">                                 BC3046070E1F497F003232CF /* Error.h in Headers */,
</span><span class="lines">@@ -7646,6 +7657,7 @@
</span><span class="cx">                                 0FB5467914F5C46B002C2989 /* LazyOperandValueProfile.cpp in Sources */,
</span><span class="cx">                                 95AB83420DA4322500BC83F3 /* LegacyProfiler.cpp in Sources */,
</span><span class="cx">                                 148F21B0107EC5410042EC2C /* Lexer.cpp in Sources */,
</span><ins>+                                14142E551B7973C000F4BF4B /* UnlinkedFunctionExecutable.cpp in Sources */,
</ins><span class="cx">                                 0FF4275715914A20004CB9FF /* LinkBuffer.cpp in Sources */,
</span><span class="cx">                                 A7E2EA6C0FB460CF00601F06 /* LiteralParser.cpp in Sources */,
</span><span class="cx">                                 FE20CE9D15F04A9500DF3430 /* LLIntCLoop.cpp in Sources */,
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorebytecodeExecutableInfohfromrev188219trunkSourceJavaScriptCorebytecodeUnlinkedCodeBlockh"></a>
<div class="copfile"><h4>Copied: trunk/Source/JavaScriptCore/bytecode/ExecutableInfo.h (from rev 188219, trunk/Source/JavaScriptCore/bytecode/UnlinkedCodeBlock.h) (0 => 188242)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/bytecode/ExecutableInfo.h         (rev 0)
+++ trunk/Source/JavaScriptCore/bytecode/ExecutableInfo.h        2015-08-11 01:26:30 UTC (rev 188242)
</span><span class="lines">@@ -0,0 +1,63 @@
</span><ins>+/*
+ * Copyright (C) 2012-2015 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.
+ */
+
+#ifndef ExecutableInfo_h
+#define ExecutableInfo_h
+
+#include "ParserModes.h"
+
+namespace JSC {
+
+struct ExecutableInfo {
+ ExecutableInfo(bool needsActivation, bool usesEval, bool isStrictMode, bool isConstructor, bool isBuiltinFunction, ConstructorKind constructorKind)
+ : m_needsActivation(needsActivation)
+ , m_usesEval(usesEval)
+ , m_isStrictMode(isStrictMode)
+ , m_isConstructor(isConstructor)
+ , m_isBuiltinFunction(isBuiltinFunction)
+ , m_constructorKind(static_cast<unsigned>(constructorKind))
+ {
+ ASSERT(m_constructorKind == static_cast<unsigned>(constructorKind));
+ }
+
+ bool needsActivation() const { return m_needsActivation; }
+ bool usesEval() const { return m_usesEval; }
+ bool isStrictMode() const { return m_isStrictMode; }
+ bool isConstructor() const { return m_isConstructor; }
+ bool isBuiltinFunction() const { return m_isBuiltinFunction; }
+ ConstructorKind constructorKind() const { return static_cast<ConstructorKind>(m_constructorKind); }
+
+private:
+ unsigned m_needsActivation : 1;
+ unsigned m_usesEval : 1;
+ unsigned m_isStrictMode : 1;
+ unsigned m_isConstructor : 1;
+ unsigned m_isBuiltinFunction : 1;
+ unsigned m_constructorKind : 2;
+};
+
+} // namespace JSC
+
+#endif // ExecutableInfo_h
</ins></span></pre></div>
<a id="trunkSourceJavaScriptCorebytecodeUnlinkedCodeBlockcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/bytecode/UnlinkedCodeBlock.cpp (188241 => 188242)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/bytecode/UnlinkedCodeBlock.cpp        2015-08-11 01:11:11 UTC (rev 188241)
+++ trunk/Source/JavaScriptCore/bytecode/UnlinkedCodeBlock.cpp        2015-08-11 01:26:30 UTC (rev 188242)
</span><span class="lines">@@ -31,6 +31,7 @@
</span><span class="cx"> #include "ClassInfo.h"
</span><span class="cx"> #include "CodeCache.h"
</span><span class="cx"> #include "Executable.h"
</span><ins>+#include "ExecutableInfo.h"
</ins><span class="cx"> #include "FunctionOverrides.h"
</span><span class="cx"> #include "JSString.h"
</span><span class="cx"> #include "JSCInlines.h"
</span><span class="lines">@@ -43,179 +44,12 @@
</span><span class="cx">
</span><span class="cx"> namespace JSC {
</span><span class="cx">
</span><del>-static_assert(sizeof(UnlinkedFunctionExecutable) <= 256, "UnlinkedFunctionExecutable should fit in a 256-byte cell.");
-
-const ClassInfo UnlinkedFunctionExecutable::s_info = { "UnlinkedFunctionExecutable", 0, 0, CREATE_METHOD_TABLE(UnlinkedFunctionExecutable) };
</del><span class="cx"> const ClassInfo UnlinkedCodeBlock::s_info = { "UnlinkedCodeBlock", 0, 0, CREATE_METHOD_TABLE(UnlinkedCodeBlock) };
</span><span class="cx"> const ClassInfo UnlinkedGlobalCodeBlock::s_info = { "UnlinkedGlobalCodeBlock", &Base::s_info, 0, CREATE_METHOD_TABLE(UnlinkedGlobalCodeBlock) };
</span><span class="cx"> const ClassInfo UnlinkedProgramCodeBlock::s_info = { "UnlinkedProgramCodeBlock", &Base::s_info, 0, CREATE_METHOD_TABLE(UnlinkedProgramCodeBlock) };
</span><span class="cx"> const ClassInfo UnlinkedEvalCodeBlock::s_info = { "UnlinkedEvalCodeBlock", &Base::s_info, 0, CREATE_METHOD_TABLE(UnlinkedEvalCodeBlock) };
</span><span class="cx"> const ClassInfo UnlinkedFunctionCodeBlock::s_info = { "UnlinkedFunctionCodeBlock", &Base::s_info, 0, CREATE_METHOD_TABLE(UnlinkedFunctionCodeBlock) };
</span><span class="cx">
</span><del>-static UnlinkedFunctionCodeBlock* generateFunctionCodeBlock(
- VM& vm, UnlinkedFunctionExecutable* executable, const SourceCode& source,
- CodeSpecializationKind kind, DebuggerMode debuggerMode, ProfilerMode profilerMode,
- UnlinkedFunctionKind functionKind, ParserError& error)
-{
- JSParserBuiltinMode builtinMode = executable->isBuiltinFunction() ? JSParserBuiltinMode::Builtin : JSParserBuiltinMode::NotBuiltin;
- JSParserStrictMode strictMode = executable->isInStrictContext() ? JSParserStrictMode::Strict : JSParserStrictMode::NotStrict;
- std::unique_ptr<FunctionNode> function = parse<FunctionNode>(
- &vm, source, executable->name(), builtinMode, strictMode,
- JSParserCodeType::Function, error, nullptr, executable->parseMode());
-
- if (!function) {
- ASSERT(error.isValid());
- return nullptr;
- }
-
- function->finishParsing(executable->name(), executable->functionMode());
- executable->recordParse(function->features(), function->hasCapturedVariables());
-
- UnlinkedFunctionCodeBlock* result = UnlinkedFunctionCodeBlock::create(&vm, FunctionCode,
- ExecutableInfo(function->needsActivation(), function->usesEval(), function->isStrictMode(), kind == CodeForConstruct, functionKind == UnlinkedBuiltinFunction, executable->constructorKind()));
- auto generator(std::make_unique<BytecodeGenerator>(vm, function.get(), result, debuggerMode, profilerMode, executable->parentScopeTDZVariables()));
- error = generator->generate();
- if (error.isValid())
- return nullptr;
- return result;
-}
-
-UnlinkedFunctionExecutable::UnlinkedFunctionExecutable(VM* vm, Structure* structure, const SourceCode& source, RefPtr<SourceProvider>&& sourceOverride, FunctionMetadataNode* node, UnlinkedFunctionKind kind, ConstructAbility constructAbility, VariableEnvironment& parentScopeTDZVariables)
- : Base(*vm, structure)
- , m_name(node->ident())
- , m_inferredName(node->inferredName())
- , m_sourceOverride(WTF::move(sourceOverride))
- , m_firstLineOffset(node->firstLine() - source.firstLine())
- , m_lineCount(node->lastLine() - node->firstLine())
- , m_unlinkedFunctionNameStart(node->functionNameStart() - source.startOffset())
- , m_unlinkedBodyStartColumn(node->startColumn())
- , m_unlinkedBodyEndColumn(m_lineCount ? node->endColumn() : node->endColumn() - node->startColumn())
- , m_startOffset(node->source().startOffset() - source.startOffset())
- , m_sourceLength(node->source().length())
- , m_parametersStartOffset(node->parametersStart())
- , m_typeProfilingStartOffset(node->functionKeywordStart())
- , m_typeProfilingEndOffset(node->startStartOffset() + node->source().length() - 1)
- , m_parameterCount(node->parameterCount())
- , m_parseMode(node->parseMode())
- , m_features(0)
- , m_isInStrictContext(node->isInStrictContext())
- , m_hasCapturedVariables(false)
- , m_isBuiltinFunction(kind == UnlinkedBuiltinFunction)
- , m_constructAbility(static_cast<unsigned>(constructAbility))
- , m_constructorKind(static_cast<unsigned>(node->constructorKind()))
- , m_functionMode(node->functionMode())
-{
- ASSERT(m_constructorKind == static_cast<unsigned>(node->constructorKind()));
- m_parentScopeTDZVariables.swap(parentScopeTDZVariables);
-}
-
-void UnlinkedFunctionExecutable::visitChildren(JSCell* cell, SlotVisitor& visitor)
-{
- UnlinkedFunctionExecutable* thisObject = jsCast<UnlinkedFunctionExecutable*>(cell);
- ASSERT_GC_OBJECT_INHERITS(thisObject, info());
- Base::visitChildren(thisObject, visitor);
- visitor.append(&thisObject->m_codeBlockForCall);
- visitor.append(&thisObject->m_codeBlockForConstruct);
- visitor.append(&thisObject->m_nameValue);
-}
-
-FunctionExecutable* UnlinkedFunctionExecutable::link(VM& vm, const SourceCode& ownerSource, int overrideLineNumber)
-{
- SourceCode source = m_sourceOverride ? SourceCode(m_sourceOverride) : ownerSource;
- unsigned firstLine = source.firstLine() + m_firstLineOffset;
- unsigned startOffset = source.startOffset() + m_startOffset;
- unsigned lineCount = m_lineCount;
-
- // Adjust to one-based indexing.
- bool startColumnIsOnFirstSourceLine = !m_firstLineOffset;
- unsigned startColumn = m_unlinkedBodyStartColumn + (startColumnIsOnFirstSourceLine ? source.startColumn() : 1);
- bool endColumnIsOnStartLine = !lineCount;
- unsigned endColumn = m_unlinkedBodyEndColumn + (endColumnIsOnStartLine ? startColumn : 1);
-
- SourceCode code(source.provider(), startOffset, startOffset + m_sourceLength, firstLine, startColumn);
- FunctionOverrides::OverrideInfo overrideInfo;
- bool hasFunctionOverride = false;
-
- if (UNLIKELY(Options::functionOverrides())) {
- hasFunctionOverride = FunctionOverrides::initializeOverrideFor(code, overrideInfo);
- if (hasFunctionOverride) {
- firstLine = overrideInfo.firstLine;
- lineCount = overrideInfo.lineCount;
- startColumn = overrideInfo.startColumn;
- endColumn = overrideInfo.endColumn;
- code = overrideInfo.sourceCode;
- }
- }
-
- FunctionExecutable* result = FunctionExecutable::create(vm, code, this, firstLine, firstLine + lineCount, startColumn, endColumn);
- if (overrideLineNumber != -1)
- result->setOverrideLineNumber(overrideLineNumber);
-
- if (UNLIKELY(hasFunctionOverride)) {
- result->overrideParameterAndTypeProfilingStartEndOffsets(
- overrideInfo.parametersStartOffset,
- overrideInfo.typeProfilingStartOffset,
- overrideInfo.typeProfilingEndOffset);
- }
-
- return result;
-}
-
-UnlinkedFunctionExecutable* UnlinkedFunctionExecutable::fromGlobalCode(
- const Identifier& name, ExecState& exec, const SourceCode& source,
- JSObject*& exception, int overrideLineNumber)
-{
- ParserError error;
- VM& vm = exec.vm();
- CodeCache* codeCache = vm.codeCache();
- UnlinkedFunctionExecutable* executable = codeCache->getFunctionExecutableFromGlobalCode(vm, name, source, error);
-
- auto& globalObject = *exec.lexicalGlobalObject();
- if (globalObject.hasDebugger())
- globalObject.debugger()->sourceParsed(&exec, source.provider(), error.line(), error.message());
-
- if (error.isValid()) {
- exception = error.toErrorObject(&globalObject, source, overrideLineNumber);
- return nullptr;
- }
-
- return executable;
-}
-
-UnlinkedFunctionCodeBlock* UnlinkedFunctionExecutable::codeBlockFor(
- VM& vm, const SourceCode& source, CodeSpecializationKind specializationKind,
- DebuggerMode debuggerMode, ProfilerMode profilerMode, ParserError& error)
-{
- switch (specializationKind) {
- case CodeForCall:
- if (UnlinkedFunctionCodeBlock* codeBlock = m_codeBlockForCall.get())
- return codeBlock;
- break;
- case CodeForConstruct:
- if (UnlinkedFunctionCodeBlock* codeBlock = m_codeBlockForConstruct.get())
- return codeBlock;
- break;
- }
-
- UnlinkedFunctionCodeBlock* result = generateFunctionCodeBlock(
- vm, this, source, specializationKind, debuggerMode, profilerMode,
- isBuiltinFunction() ? UnlinkedBuiltinFunction : UnlinkedNormalFunction,
- error);
-
- if (error.isValid())
- return nullptr;
-
- switch (specializationKind) {
- case CodeForCall:
- m_codeBlockForCall.set(vm, this, result);
- break;
- case CodeForConstruct:
- m_codeBlockForConstruct.set(vm, this, result);
- break;
- }
- return result;
-}
-
</del><span class="cx"> UnlinkedCodeBlock::UnlinkedCodeBlock(VM* vm, Structure* structure, CodeType codeType, const ExecutableInfo& info)
</span><span class="cx"> : Base(*vm, structure)
</span><span class="cx"> , m_numVars(0)
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorebytecodeUnlinkedCodeBlockh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/bytecode/UnlinkedCodeBlock.h (188241 => 188242)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/bytecode/UnlinkedCodeBlock.h        2015-08-11 01:11:11 UTC (rev 188241)
+++ trunk/Source/JavaScriptCore/bytecode/UnlinkedCodeBlock.h        2015-08-11 01:26:30 UTC (rev 188242)
</span><span class="lines">@@ -39,9 +39,9 @@
</span><span class="cx"> #include "RegExp.h"
</span><span class="cx"> #include "SpecialPointer.h"
</span><span class="cx"> #include "SymbolTable.h"
</span><ins>+#include "UnlinkedFunctionExecutable.h"
</ins><span class="cx"> #include "VariableEnvironment.h"
</span><span class="cx"> #include "VirtualRegister.h"
</span><del>-
</del><span class="cx"> #include <wtf/RefCountedArray.h>
</span><span class="cx"> #include <wtf/Vector.h>
</span><span class="cx">
</span><span class="lines">@@ -58,7 +58,9 @@
</span><span class="cx"> class SymbolTable;
</span><span class="cx"> class UnlinkedCodeBlock;
</span><span class="cx"> class UnlinkedFunctionCodeBlock;
</span><ins>+class UnlinkedFunctionExecutable;
</ins><span class="cx"> class UnlinkedInstructionStream;
</span><ins>+struct ExecutableInfo;
</ins><span class="cx">
</span><span class="cx"> typedef unsigned UnlinkedValueProfile;
</span><span class="cx"> typedef unsigned UnlinkedArrayProfile;
</span><span class="lines">@@ -66,157 +68,6 @@
</span><span class="cx"> typedef unsigned UnlinkedObjectAllocationProfile;
</span><span class="cx"> typedef unsigned UnlinkedLLIntCallLinkInfo;
</span><span class="cx">
</span><del>-struct ExecutableInfo {
- ExecutableInfo(bool needsActivation, bool usesEval, bool isStrictMode, bool isConstructor, bool isBuiltinFunction, ConstructorKind constructorKind)
- : m_needsActivation(needsActivation)
- , m_usesEval(usesEval)
- , m_isStrictMode(isStrictMode)
- , m_isConstructor(isConstructor)
- , m_isBuiltinFunction(isBuiltinFunction)
- , m_constructorKind(static_cast<unsigned>(constructorKind))
- {
- ASSERT(m_constructorKind == static_cast<unsigned>(constructorKind));
- }
-
- bool needsActivation() const { return m_needsActivation; }
- bool usesEval() const { return m_usesEval; }
- bool isStrictMode() const { return m_isStrictMode; }
- bool isConstructor() const { return m_isConstructor; }
- bool isBuiltinFunction() const { return m_isBuiltinFunction; }
- ConstructorKind constructorKind() const { return static_cast<ConstructorKind>(m_constructorKind); }
-
-private:
- unsigned m_needsActivation : 1;
- unsigned m_usesEval : 1;
- unsigned m_isStrictMode : 1;
- unsigned m_isConstructor : 1;
- unsigned m_isBuiltinFunction : 1;
- unsigned m_constructorKind : 2;
-};
-
-enum UnlinkedFunctionKind {
- UnlinkedNormalFunction,
- UnlinkedBuiltinFunction,
-};
-
-class UnlinkedFunctionExecutable final : public JSCell {
-public:
- friend class BuiltinExecutables;
- friend class CodeCache;
- friend class VM;
-
- typedef JSCell Base;
- static const unsigned StructureFlags = Base::StructureFlags | StructureIsImmortal;
-
- static UnlinkedFunctionExecutable* create(VM* vm, const SourceCode& source, FunctionMetadataNode* node, UnlinkedFunctionKind unlinkedFunctionKind, ConstructAbility constructAbility, VariableEnvironment& parentScopeTDZVariables, RefPtr<SourceProvider>&& sourceOverride = nullptr)
- {
- UnlinkedFunctionExecutable* instance = new (NotNull, allocateCell<UnlinkedFunctionExecutable>(vm->heap))
- UnlinkedFunctionExecutable(vm, vm->unlinkedFunctionExecutableStructure.get(), source, WTF::move(sourceOverride), node, unlinkedFunctionKind, constructAbility, parentScopeTDZVariables);
- instance->finishCreation(*vm);
- return instance;
- }
-
- const Identifier& name() const { return m_name; }
- const Identifier& inferredName() const { return m_inferredName; }
- JSString* nameValue() const { return m_nameValue.get(); }
- unsigned parameterCount() const { return m_parameterCount; };
- FunctionParseMode parseMode() const { return m_parseMode; };
- bool isInStrictContext() const { return m_isInStrictContext; }
- FunctionMode functionMode() const { return static_cast<FunctionMode>(m_functionMode); }
- ConstructorKind constructorKind() const { return static_cast<ConstructorKind>(m_constructorKind); }
-
- unsigned unlinkedFunctionNameStart() const { return m_unlinkedFunctionNameStart; }
- unsigned unlinkedBodyStartColumn() const { return m_unlinkedBodyStartColumn; }
- unsigned unlinkedBodyEndColumn() const { return m_unlinkedBodyEndColumn; }
- unsigned startOffset() const { return m_startOffset; }
- unsigned sourceLength() { return m_sourceLength; }
- unsigned parametersStartOffset() const { return m_parametersStartOffset; }
- unsigned typeProfilingStartOffset() const { return m_typeProfilingStartOffset; }
- unsigned typeProfilingEndOffset() const { return m_typeProfilingEndOffset; }
-
- UnlinkedFunctionCodeBlock* codeBlockFor(
- VM&, const SourceCode&, CodeSpecializationKind, DebuggerMode, ProfilerMode,
- ParserError&);
-
- static UnlinkedFunctionExecutable* fromGlobalCode(
- const Identifier&, ExecState&, const SourceCode&, JSObject*& exception,
- int overrideLineNumber);
-
- FunctionExecutable* link(VM&, const SourceCode&, int overrideLineNumber = -1);
-
- void clearCodeForRecompilation()
- {
- m_codeBlockForCall.clear();
- m_codeBlockForConstruct.clear();
- }
-
- void recordParse(CodeFeatures features, bool hasCapturedVariables)
- {
- m_features = features;
- m_hasCapturedVariables = hasCapturedVariables;
- }
-
- CodeFeatures features() const { return m_features; }
- bool hasCapturedVariables() const { return m_hasCapturedVariables; }
-
- static const bool needsDestruction = true;
- static void destroy(JSCell*);
-
- bool isBuiltinFunction() const { return m_isBuiltinFunction; }
- ConstructAbility constructAbility() const { return static_cast<ConstructAbility>(m_constructAbility); }
- bool isClassConstructorFunction() const { return constructorKind() != ConstructorKind::None; }
- const VariableEnvironment* parentScopeTDZVariables() const { return &m_parentScopeTDZVariables; }
-
-private:
- UnlinkedFunctionExecutable(VM*, Structure*, const SourceCode&, RefPtr<SourceProvider>&& sourceOverride, FunctionMetadataNode*, UnlinkedFunctionKind, ConstructAbility, VariableEnvironment&);
- WriteBarrier<UnlinkedFunctionCodeBlock> m_codeBlockForCall;
- WriteBarrier<UnlinkedFunctionCodeBlock> m_codeBlockForConstruct;
-
- Identifier m_name;
- Identifier m_inferredName;
- WriteBarrier<JSString> m_nameValue;
- RefPtr<SourceProvider> m_sourceOverride;
- VariableEnvironment m_parentScopeTDZVariables;
- unsigned m_firstLineOffset;
- unsigned m_lineCount;
- unsigned m_unlinkedFunctionNameStart;
- unsigned m_unlinkedBodyStartColumn;
- unsigned m_unlinkedBodyEndColumn;
- unsigned m_startOffset;
- unsigned m_sourceLength;
- unsigned m_parametersStartOffset;
- unsigned m_typeProfilingStartOffset;
- unsigned m_typeProfilingEndOffset;
- unsigned m_parameterCount;
- FunctionParseMode m_parseMode;
-
- CodeFeatures m_features;
-
- unsigned m_isInStrictContext : 1;
- unsigned m_hasCapturedVariables : 1;
- unsigned m_isBuiltinFunction : 1;
- unsigned m_constructAbility: 1;
- unsigned m_constructorKind : 2;
- unsigned m_functionMode : 1; // FunctionMode
-
-protected:
- void finishCreation(VM& vm)
- {
- Base::finishCreation(vm);
- m_nameValue.set(vm, this, jsString(&vm, name().string()));
- }
-
- static void visitChildren(JSCell*, SlotVisitor&);
-
-public:
- static Structure* createStructure(VM& vm, JSGlobalObject* globalObject, JSValue proto)
- {
- return Structure::create(vm, globalObject, proto, TypeInfo(UnlinkedFunctionExecutableType, StructureFlags), info());
- }
-
- DECLARE_EXPORT_INFO;
-};
-
</del><span class="cx"> struct UnlinkedStringJumpTable {
</span><span class="cx"> typedef HashMap<RefPtr<StringImpl>, int32_t> StringOffsetTable;
</span><span class="cx"> StringOffsetTable offsetTable;
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorebytecodeUnlinkedFunctionExecutablecppfromrev188219trunkSourceJavaScriptCorebytecodeUnlinkedCodeBlockcpp"></a>
<div class="copfile"><h4>Copied: trunk/Source/JavaScriptCore/bytecode/UnlinkedFunctionExecutable.cpp (from rev 188219, trunk/Source/JavaScriptCore/bytecode/UnlinkedCodeBlock.cpp) (0 => 188242)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/bytecode/UnlinkedFunctionExecutable.cpp         (rev 0)
+++ trunk/Source/JavaScriptCore/bytecode/UnlinkedFunctionExecutable.cpp        2015-08-11 01:26:30 UTC (rev 188242)
</span><span class="lines">@@ -0,0 +1,214 @@
</span><ins>+/*
+ * Copyright (C) 2012, 2013, 2015 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 "UnlinkedFunctionExecutable.h"
+
+#include "BytecodeGenerator.h"
+#include "ClassInfo.h"
+#include "CodeCache.h"
+#include "Executable.h"
+#include "ExecutableInfo.h"
+#include "FunctionOverrides.h"
+#include "JSCInlines.h"
+#include "JSString.h"
+#include "Parser.h"
+#include "SourceProvider.h"
+#include "Structure.h"
+#include "SymbolTable.h"
+#include "UnlinkedInstructionStream.h"
+#include <wtf/DataLog.h>
+
+namespace JSC {
+
+static_assert(sizeof(UnlinkedFunctionExecutable) <= 256, "UnlinkedFunctionExecutable should fit in a 256-byte cell.");
+
+const ClassInfo UnlinkedFunctionExecutable::s_info = { "UnlinkedFunctionExecutable", 0, 0, CREATE_METHOD_TABLE(UnlinkedFunctionExecutable) };
+
+static UnlinkedFunctionCodeBlock* generateFunctionCodeBlock(
+ VM& vm, UnlinkedFunctionExecutable* executable, const SourceCode& source,
+ CodeSpecializationKind kind, DebuggerMode debuggerMode, ProfilerMode profilerMode,
+ UnlinkedFunctionKind functionKind, ParserError& error)
+{
+ JSParserBuiltinMode builtinMode = executable->isBuiltinFunction() ? JSParserBuiltinMode::Builtin : JSParserBuiltinMode::NotBuiltin;
+ JSParserStrictMode strictMode = executable->isInStrictContext() ? JSParserStrictMode::Strict : JSParserStrictMode::NotStrict;
+ std::unique_ptr<FunctionNode> function = parse<FunctionNode>(
+ &vm, source, executable->name(), builtinMode, strictMode,
+ JSParserCodeType::Function, error, nullptr, executable->parseMode());
+
+ if (!function) {
+ ASSERT(error.isValid());
+ return nullptr;
+ }
+
+ function->finishParsing(executable->name(), executable->functionMode());
+ executable->recordParse(function->features(), function->hasCapturedVariables());
+
+ UnlinkedFunctionCodeBlock* result = UnlinkedFunctionCodeBlock::create(&vm, FunctionCode,
+ ExecutableInfo(function->needsActivation(), function->usesEval(), function->isStrictMode(), kind == CodeForConstruct, functionKind == UnlinkedBuiltinFunction, executable->constructorKind()));
+ auto generator(std::make_unique<BytecodeGenerator>(vm, function.get(), result, debuggerMode, profilerMode, executable->parentScopeTDZVariables()));
+ error = generator->generate();
+ if (error.isValid())
+ return nullptr;
+ return result;
+}
+
+UnlinkedFunctionExecutable::UnlinkedFunctionExecutable(VM* vm, Structure* structure, const SourceCode& source, RefPtr<SourceProvider>&& sourceOverride, FunctionMetadataNode* node, UnlinkedFunctionKind kind, ConstructAbility constructAbility, VariableEnvironment& parentScopeTDZVariables)
+ : Base(*vm, structure)
+ , m_name(node->ident())
+ , m_inferredName(node->inferredName())
+ , m_sourceOverride(WTF::move(sourceOverride))
+ , m_firstLineOffset(node->firstLine() - source.firstLine())
+ , m_lineCount(node->lastLine() - node->firstLine())
+ , m_unlinkedFunctionNameStart(node->functionNameStart() - source.startOffset())
+ , m_unlinkedBodyStartColumn(node->startColumn())
+ , m_unlinkedBodyEndColumn(m_lineCount ? node->endColumn() : node->endColumn() - node->startColumn())
+ , m_startOffset(node->source().startOffset() - source.startOffset())
+ , m_sourceLength(node->source().length())
+ , m_parametersStartOffset(node->parametersStart())
+ , m_typeProfilingStartOffset(node->functionKeywordStart())
+ , m_typeProfilingEndOffset(node->startStartOffset() + node->source().length() - 1)
+ , m_parameterCount(node->parameterCount())
+ , m_parseMode(node->parseMode())
+ , m_features(0)
+ , m_isInStrictContext(node->isInStrictContext())
+ , m_hasCapturedVariables(false)
+ , m_isBuiltinFunction(kind == UnlinkedBuiltinFunction)
+ , m_constructAbility(static_cast<unsigned>(constructAbility))
+ , m_constructorKind(static_cast<unsigned>(node->constructorKind()))
+ , m_functionMode(node->functionMode())
+{
+ ASSERT(m_constructorKind == static_cast<unsigned>(node->constructorKind()));
+ m_parentScopeTDZVariables.swap(parentScopeTDZVariables);
+}
+
+void UnlinkedFunctionExecutable::visitChildren(JSCell* cell, SlotVisitor& visitor)
+{
+ UnlinkedFunctionExecutable* thisObject = jsCast<UnlinkedFunctionExecutable*>(cell);
+ ASSERT_GC_OBJECT_INHERITS(thisObject, info());
+ Base::visitChildren(thisObject, visitor);
+ visitor.append(&thisObject->m_codeBlockForCall);
+ visitor.append(&thisObject->m_codeBlockForConstruct);
+ visitor.append(&thisObject->m_nameValue);
+}
+
+FunctionExecutable* UnlinkedFunctionExecutable::link(VM& vm, const SourceCode& ownerSource, int overrideLineNumber)
+{
+ SourceCode source = m_sourceOverride ? SourceCode(m_sourceOverride) : ownerSource;
+ unsigned firstLine = source.firstLine() + m_firstLineOffset;
+ unsigned startOffset = source.startOffset() + m_startOffset;
+ unsigned lineCount = m_lineCount;
+
+ // Adjust to one-based indexing.
+ bool startColumnIsOnFirstSourceLine = !m_firstLineOffset;
+ unsigned startColumn = m_unlinkedBodyStartColumn + (startColumnIsOnFirstSourceLine ? source.startColumn() : 1);
+ bool endColumnIsOnStartLine = !lineCount;
+ unsigned endColumn = m_unlinkedBodyEndColumn + (endColumnIsOnStartLine ? startColumn : 1);
+
+ SourceCode code(source.provider(), startOffset, startOffset + m_sourceLength, firstLine, startColumn);
+ FunctionOverrides::OverrideInfo overrideInfo;
+ bool hasFunctionOverride = false;
+
+ if (UNLIKELY(Options::functionOverrides())) {
+ hasFunctionOverride = FunctionOverrides::initializeOverrideFor(code, overrideInfo);
+ if (hasFunctionOverride) {
+ firstLine = overrideInfo.firstLine;
+ lineCount = overrideInfo.lineCount;
+ startColumn = overrideInfo.startColumn;
+ endColumn = overrideInfo.endColumn;
+ code = overrideInfo.sourceCode;
+ }
+ }
+
+ FunctionExecutable* result = FunctionExecutable::create(vm, code, this, firstLine, firstLine + lineCount, startColumn, endColumn);
+ if (overrideLineNumber != -1)
+ result->setOverrideLineNumber(overrideLineNumber);
+
+ if (UNLIKELY(hasFunctionOverride)) {
+ result->overrideParameterAndTypeProfilingStartEndOffsets(
+ overrideInfo.parametersStartOffset,
+ overrideInfo.typeProfilingStartOffset,
+ overrideInfo.typeProfilingEndOffset);
+ }
+
+ return result;
+}
+
+UnlinkedFunctionExecutable* UnlinkedFunctionExecutable::fromGlobalCode(
+ const Identifier& name, ExecState& exec, const SourceCode& source,
+ JSObject*& exception, int overrideLineNumber)
+{
+ ParserError error;
+ VM& vm = exec.vm();
+ CodeCache* codeCache = vm.codeCache();
+ UnlinkedFunctionExecutable* executable = codeCache->getFunctionExecutableFromGlobalCode(vm, name, source, error);
+
+ auto& globalObject = *exec.lexicalGlobalObject();
+ if (globalObject.hasDebugger())
+ globalObject.debugger()->sourceParsed(&exec, source.provider(), error.line(), error.message());
+
+ if (error.isValid()) {
+ exception = error.toErrorObject(&globalObject, source, overrideLineNumber);
+ return nullptr;
+ }
+
+ return executable;
+}
+
+UnlinkedFunctionCodeBlock* UnlinkedFunctionExecutable::codeBlockFor(
+ VM& vm, const SourceCode& source, CodeSpecializationKind specializationKind,
+ DebuggerMode debuggerMode, ProfilerMode profilerMode, ParserError& error)
+{
+ switch (specializationKind) {
+ case CodeForCall:
+ if (UnlinkedFunctionCodeBlock* codeBlock = m_codeBlockForCall.get())
+ return codeBlock;
+ break;
+ case CodeForConstruct:
+ if (UnlinkedFunctionCodeBlock* codeBlock = m_codeBlockForConstruct.get())
+ return codeBlock;
+ break;
+ }
+
+ UnlinkedFunctionCodeBlock* result = generateFunctionCodeBlock(
+ vm, this, source, specializationKind, debuggerMode, profilerMode,
+ isBuiltinFunction() ? UnlinkedBuiltinFunction : UnlinkedNormalFunction,
+ error);
+
+ if (error.isValid())
+ return nullptr;
+
+ switch (specializationKind) {
+ case CodeForCall:
+ m_codeBlockForCall.set(vm, this, result);
+ break;
+ case CodeForConstruct:
+ m_codeBlockForConstruct.set(vm, this, result);
+ break;
+ }
+ return result;
+}
+
+} // namespace JSC
</ins></span></pre></div>
<a id="trunkSourceJavaScriptCorebytecodeUnlinkedFunctionExecutablehfromrev188219trunkSourceJavaScriptCorebytecodeUnlinkedCodeBlockh"></a>
<div class="copfile"><h4>Copied: trunk/Source/JavaScriptCore/bytecode/UnlinkedFunctionExecutable.h (from rev 188219, trunk/Source/JavaScriptCore/bytecode/UnlinkedCodeBlock.h) (0 => 188242)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/bytecode/UnlinkedFunctionExecutable.h         (rev 0)
+++ trunk/Source/JavaScriptCore/bytecode/UnlinkedFunctionExecutable.h        2015-08-11 01:26:30 UTC (rev 188242)
</span><span class="lines">@@ -0,0 +1,180 @@
</span><ins>+/*
+ * Copyright (C) 2012-2015 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.
+ */
+
+#ifndef UnlinkedFunctionExecutable_h
+#define UnlinkedFunctionExecutable_h
+
+#include "BytecodeConventions.h"
+#include "CodeSpecializationKind.h"
+#include "CodeType.h"
+#include "ConstructAbility.h"
+#include "ExpressionRangeInfo.h"
+#include "HandlerInfo.h"
+#include "Identifier.h"
+#include "JSCell.h"
+#include "JSString.h"
+#include "ParserModes.h"
+#include "RegExp.h"
+#include "SpecialPointer.h"
+#include "VariableEnvironment.h"
+#include "VirtualRegister.h"
+#include <wtf/RefCountedArray.h>
+#include <wtf/Vector.h>
+
+namespace JSC {
+
+class FunctionMetadataNode;
+class FunctionExecutable;
+class ParserError;
+class SourceCode;
+class SourceProvider;
+class UnlinkedFunctionCodeBlock;
+
+enum UnlinkedFunctionKind {
+ UnlinkedNormalFunction,
+ UnlinkedBuiltinFunction,
+};
+
+class UnlinkedFunctionExecutable final : public JSCell {
+public:
+ friend class BuiltinExecutables;
+ friend class CodeCache;
+ friend class VM;
+
+ typedef JSCell Base;
+ static const unsigned StructureFlags = Base::StructureFlags | StructureIsImmortal;
+
+ static UnlinkedFunctionExecutable* create(VM* vm, const SourceCode& source, FunctionMetadataNode* node, UnlinkedFunctionKind unlinkedFunctionKind, ConstructAbility constructAbility, VariableEnvironment& parentScopeTDZVariables, RefPtr<SourceProvider>&& sourceOverride = nullptr)
+ {
+ UnlinkedFunctionExecutable* instance = new (NotNull, allocateCell<UnlinkedFunctionExecutable>(vm->heap))
+ UnlinkedFunctionExecutable(vm, vm->unlinkedFunctionExecutableStructure.get(), source, WTF::move(sourceOverride), node, unlinkedFunctionKind, constructAbility, parentScopeTDZVariables);
+ instance->finishCreation(*vm);
+ return instance;
+ }
+
+ const Identifier& name() const { return m_name; }
+ const Identifier& inferredName() const { return m_inferredName; }
+ JSString* nameValue() const { return m_nameValue.get(); }
+ unsigned parameterCount() const { return m_parameterCount; };
+ FunctionParseMode parseMode() const { return m_parseMode; };
+ bool isInStrictContext() const { return m_isInStrictContext; }
+ FunctionMode functionMode() const { return static_cast<FunctionMode>(m_functionMode); }
+ ConstructorKind constructorKind() const { return static_cast<ConstructorKind>(m_constructorKind); }
+
+ unsigned unlinkedFunctionNameStart() const { return m_unlinkedFunctionNameStart; }
+ unsigned unlinkedBodyStartColumn() const { return m_unlinkedBodyStartColumn; }
+ unsigned unlinkedBodyEndColumn() const { return m_unlinkedBodyEndColumn; }
+ unsigned startOffset() const { return m_startOffset; }
+ unsigned sourceLength() { return m_sourceLength; }
+ unsigned parametersStartOffset() const { return m_parametersStartOffset; }
+ unsigned typeProfilingStartOffset() const { return m_typeProfilingStartOffset; }
+ unsigned typeProfilingEndOffset() const { return m_typeProfilingEndOffset; }
+
+ UnlinkedFunctionCodeBlock* codeBlockFor(
+ VM&, const SourceCode&, CodeSpecializationKind, DebuggerMode, ProfilerMode,
+ ParserError&);
+
+ static UnlinkedFunctionExecutable* fromGlobalCode(
+ const Identifier&, ExecState&, const SourceCode&, JSObject*& exception,
+ int overrideLineNumber);
+
+ FunctionExecutable* link(VM&, const SourceCode&, int overrideLineNumber = -1);
+
+ void clearCodeForRecompilation()
+ {
+ m_codeBlockForCall.clear();
+ m_codeBlockForConstruct.clear();
+ }
+
+ void recordParse(CodeFeatures features, bool hasCapturedVariables)
+ {
+ m_features = features;
+ m_hasCapturedVariables = hasCapturedVariables;
+ }
+
+ CodeFeatures features() const { return m_features; }
+ bool hasCapturedVariables() const { return m_hasCapturedVariables; }
+
+ static const bool needsDestruction = true;
+ static void destroy(JSCell*);
+
+ bool isBuiltinFunction() const { return m_isBuiltinFunction; }
+ ConstructAbility constructAbility() const { return static_cast<ConstructAbility>(m_constructAbility); }
+ bool isClassConstructorFunction() const { return constructorKind() != ConstructorKind::None; }
+ const VariableEnvironment* parentScopeTDZVariables() const { return &m_parentScopeTDZVariables; }
+
+private:
+ UnlinkedFunctionExecutable(VM*, Structure*, const SourceCode&, RefPtr<SourceProvider>&& sourceOverride, FunctionMetadataNode*, UnlinkedFunctionKind, ConstructAbility, VariableEnvironment&);
+ WriteBarrier<UnlinkedFunctionCodeBlock> m_codeBlockForCall;
+ WriteBarrier<UnlinkedFunctionCodeBlock> m_codeBlockForConstruct;
+
+ Identifier m_name;
+ Identifier m_inferredName;
+ WriteBarrier<JSString> m_nameValue;
+ RefPtr<SourceProvider> m_sourceOverride;
+ VariableEnvironment m_parentScopeTDZVariables;
+ unsigned m_firstLineOffset;
+ unsigned m_lineCount;
+ unsigned m_unlinkedFunctionNameStart;
+ unsigned m_unlinkedBodyStartColumn;
+ unsigned m_unlinkedBodyEndColumn;
+ unsigned m_startOffset;
+ unsigned m_sourceLength;
+ unsigned m_parametersStartOffset;
+ unsigned m_typeProfilingStartOffset;
+ unsigned m_typeProfilingEndOffset;
+ unsigned m_parameterCount;
+ FunctionParseMode m_parseMode;
+
+ CodeFeatures m_features;
+
+ unsigned m_isInStrictContext : 1;
+ unsigned m_hasCapturedVariables : 1;
+ unsigned m_isBuiltinFunction : 1;
+ unsigned m_constructAbility: 1;
+ unsigned m_constructorKind : 2;
+ unsigned m_functionMode : 1; // FunctionMode
+
+protected:
+ void finishCreation(VM& vm)
+ {
+ Base::finishCreation(vm);
+ m_nameValue.set(vm, this, jsString(&vm, name().string()));
+ }
+
+ static void visitChildren(JSCell*, SlotVisitor&);
+
+public:
+ static Structure* createStructure(VM& vm, JSGlobalObject* globalObject, JSValue proto)
+ {
+ return Structure::create(vm, globalObject, proto, TypeInfo(UnlinkedFunctionExecutableType, StructureFlags), info());
+ }
+
+ DECLARE_EXPORT_INFO;
+};
+
+} // namespace JSC
+
+#endif // UnlinkedFunctionExecutable_h
</ins></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeExecutableh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/Executable.h (188241 => 188242)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/Executable.h        2015-08-11 01:11:11 UTC (rev 188241)
+++ trunk/Source/JavaScriptCore/runtime/Executable.h        2015-08-11 01:26:30 UTC (rev 188242)
</span><span class="lines">@@ -32,6 +32,7 @@
</span><span class="cx"> #include "CodeSpecializationKind.h"
</span><span class="cx"> #include "CompilationResult.h"
</span><span class="cx"> #include "DFGPlan.h"
</span><ins>+#include "ExecutableInfo.h"
</ins><span class="cx"> #include "HandlerInfo.h"
</span><span class="cx"> #include "InferredValue.h"
</span><span class="cx"> #include "JITCode.h"
</span><span class="lines">@@ -41,6 +42,7 @@
</span><span class="cx"> #include "SourceCode.h"
</span><span class="cx"> #include "TypeSet.h"
</span><span class="cx"> #include "UnlinkedCodeBlock.h"
</span><ins>+#include "UnlinkedFunctionExecutable.h"
</ins><span class="cx">
</span><span class="cx"> namespace JSC {
</span><span class="cx">
</span></span></pre>
</div>
</div>
</body>
</html>