<!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>[150622] branches/dfgFourthTier/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/150622">150622</a></dd>
<dt>Author</dt> <dd>fpizlo@apple.com</dd>
<dt>Date</dt> <dd>2013-05-23 18:35:26 -0700 (Thu, 23 May 2013)</dd>
</dl>
<h3>Log Message</h3>
<pre>fourthTier: rationalize DFG::CapabilityLevel and DFGCapabilities.[h|cpp]
https://bugs.webkit.org/show_bug.cgi?id=116696
Reviewed by Sam Weinig.
Make it so that all capability calculation is funneled through one function, which tells
you everything you wanted to know: can it be inlined, and can it be compiled.
This work will help with https://bugs.webkit.org/show_bug.cgi?id=116557, since now the
JIT has a fairly authoritative answer to the "can it be inlined" question.
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::CodeBlock):
(JSC::ProgramCodeBlock::capabilityLevelInternal):
(JSC::EvalCodeBlock::capabilityLevelInternal):
(JSC::FunctionCodeBlock::capabilityLevelInternal):
* bytecode/CodeBlock.h:
(CodeBlock):
(JSC::CodeBlock::capabilityLevel):
(JSC::CodeBlock::capabilityLevelState):
(ProgramCodeBlock):
(EvalCodeBlock):
(FunctionCodeBlock):
* dfg/DFGCapabilities.cpp:
(JSC::DFG::debugFail):
(DFG):
(JSC::DFG::canInlineResolveOperations):
(JSC::DFG::capabilityLevel):
* dfg/DFGCapabilities.h:
(DFG):
(JSC::DFG::capabilityLevel):
(JSC::DFG::evalCapabilityLevel):
(JSC::DFG::programCapabilityLevel):
(JSC::DFG::functionForCallCapabilityLevel):
(JSC::DFG::functionForConstructCapabilityLevel):
(JSC::DFG::canInlineFunctionForCall):
(JSC::DFG::canInlineFunctionForClosureCall):
(JSC::DFG::canInlineFunctionForConstruct):
* dfg/DFGCommon.h:
(JSC::DFG::canCompile):
(DFG):
(JSC::DFG::canInline):
(JSC::DFG::leastUpperBound):
* dfg/DFGDriver.cpp:
(JSC::DFG::compile):
* jit/JIT.cpp:
(JSC::JIT::privateCompile):
* jit/JITPropertyAccess.cpp:
(JSC::JIT::privateCompilePutByIdTransition):
* jit/JITPropertyAccess32_64.cpp:
(JSC::JIT::privateCompilePutByIdTransition):
* tools/CodeProfile.cpp:
(JSC::CodeProfile::sample):</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#branchesdfgFourthTierSourceJavaScriptCoreChangeLog">branches/dfgFourthTier/Source/JavaScriptCore/ChangeLog</a></li>
<li><a href="#branchesdfgFourthTierSourceJavaScriptCorebytecodeCodeBlockcpp">branches/dfgFourthTier/Source/JavaScriptCore/bytecode/CodeBlock.cpp</a></li>
<li><a href="#branchesdfgFourthTierSourceJavaScriptCorebytecodeCodeBlockh">branches/dfgFourthTier/Source/JavaScriptCore/bytecode/CodeBlock.h</a></li>
<li><a href="#branchesdfgFourthTierSourceJavaScriptCoredfgDFGCapabilitiescpp">branches/dfgFourthTier/Source/JavaScriptCore/dfg/DFGCapabilities.cpp</a></li>
<li><a href="#branchesdfgFourthTierSourceJavaScriptCoredfgDFGCapabilitiesh">branches/dfgFourthTier/Source/JavaScriptCore/dfg/DFGCapabilities.h</a></li>
<li><a href="#branchesdfgFourthTierSourceJavaScriptCoredfgDFGCommonh">branches/dfgFourthTier/Source/JavaScriptCore/dfg/DFGCommon.h</a></li>
<li><a href="#branchesdfgFourthTierSourceJavaScriptCoredfgDFGDrivercpp">branches/dfgFourthTier/Source/JavaScriptCore/dfg/DFGDriver.cpp</a></li>
<li><a href="#branchesdfgFourthTierSourceJavaScriptCorejitJITcpp">branches/dfgFourthTier/Source/JavaScriptCore/jit/JIT.cpp</a></li>
<li><a href="#branchesdfgFourthTierSourceJavaScriptCorejitJITPropertyAccesscpp">branches/dfgFourthTier/Source/JavaScriptCore/jit/JITPropertyAccess.cpp</a></li>
<li><a href="#branchesdfgFourthTierSourceJavaScriptCorejitJITPropertyAccess32_64cpp">branches/dfgFourthTier/Source/JavaScriptCore/jit/JITPropertyAccess32_64.cpp</a></li>
<li><a href="#branchesdfgFourthTierSourceJavaScriptCoretoolsCodeProfilecpp">branches/dfgFourthTier/Source/JavaScriptCore/tools/CodeProfile.cpp</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="branchesdfgFourthTierSourceJavaScriptCoreChangeLog"></a>
<div class="modfile"><h4>Modified: branches/dfgFourthTier/Source/JavaScriptCore/ChangeLog (150621 => 150622)</h4>
<pre class="diff"><span>
<span class="info">--- branches/dfgFourthTier/Source/JavaScriptCore/ChangeLog 2013-05-24 01:33:04 UTC (rev 150621)
+++ branches/dfgFourthTier/Source/JavaScriptCore/ChangeLog 2013-05-24 01:35:26 UTC (rev 150622)
</span><span class="lines">@@ -1,3 +1,59 @@
</span><ins>+2013-05-23 Filip Pizlo <fpizlo@apple.com>
+
+ fourthTier: rationalize DFG::CapabilityLevel and DFGCapabilities.[h|cpp]
+ https://bugs.webkit.org/show_bug.cgi?id=116696
+
+ Reviewed by Sam Weinig.
+
+ Make it so that all capability calculation is funneled through one function, which tells
+ you everything you wanted to know: can it be inlined, and can it be compiled.
+
+ This work will help with https://bugs.webkit.org/show_bug.cgi?id=116557, since now the
+ JIT has a fairly authoritative answer to the "can it be inlined" question.
+
+ * bytecode/CodeBlock.cpp:
+ (JSC::CodeBlock::CodeBlock):
+ (JSC::ProgramCodeBlock::capabilityLevelInternal):
+ (JSC::EvalCodeBlock::capabilityLevelInternal):
+ (JSC::FunctionCodeBlock::capabilityLevelInternal):
+ * bytecode/CodeBlock.h:
+ (CodeBlock):
+ (JSC::CodeBlock::capabilityLevel):
+ (JSC::CodeBlock::capabilityLevelState):
+ (ProgramCodeBlock):
+ (EvalCodeBlock):
+ (FunctionCodeBlock):
+ * dfg/DFGCapabilities.cpp:
+ (JSC::DFG::debugFail):
+ (DFG):
+ (JSC::DFG::canInlineResolveOperations):
+ (JSC::DFG::capabilityLevel):
+ * dfg/DFGCapabilities.h:
+ (DFG):
+ (JSC::DFG::capabilityLevel):
+ (JSC::DFG::evalCapabilityLevel):
+ (JSC::DFG::programCapabilityLevel):
+ (JSC::DFG::functionForCallCapabilityLevel):
+ (JSC::DFG::functionForConstructCapabilityLevel):
+ (JSC::DFG::canInlineFunctionForCall):
+ (JSC::DFG::canInlineFunctionForClosureCall):
+ (JSC::DFG::canInlineFunctionForConstruct):
+ * dfg/DFGCommon.h:
+ (JSC::DFG::canCompile):
+ (DFG):
+ (JSC::DFG::canInline):
+ (JSC::DFG::leastUpperBound):
+ * dfg/DFGDriver.cpp:
+ (JSC::DFG::compile):
+ * jit/JIT.cpp:
+ (JSC::JIT::privateCompile):
+ * jit/JITPropertyAccess.cpp:
+ (JSC::JIT::privateCompilePutByIdTransition):
+ * jit/JITPropertyAccess32_64.cpp:
+ (JSC::JIT::privateCompilePutByIdTransition):
+ * tools/CodeProfile.cpp:
+ (JSC::CodeProfile::sample):
+
</ins><span class="cx"> 2013-05-22 Filip Pizlo <fpizlo@apple.com>
</span><span class="cx">
</span><span class="cx"> Merge http://trac.webkit.org/changeset/149162, since we need it after
</span></span></pre></div>
<a id="branchesdfgFourthTierSourceJavaScriptCorebytecodeCodeBlockcpp"></a>
<div class="modfile"><h4>Modified: branches/dfgFourthTier/Source/JavaScriptCore/bytecode/CodeBlock.cpp (150621 => 150622)</h4>
<pre class="diff"><span>
<span class="info">--- branches/dfgFourthTier/Source/JavaScriptCore/bytecode/CodeBlock.cpp 2013-05-24 01:33:04 UTC (rev 150621)
+++ branches/dfgFourthTier/Source/JavaScriptCore/bytecode/CodeBlock.cpp 2013-05-24 01:35:26 UTC (rev 150622)
</span><span class="lines">@@ -1598,7 +1598,7 @@
</span><span class="cx"> , m_resolveOperations(other.m_resolveOperations)
</span><span class="cx"> , m_putToBaseOperations(other.m_putToBaseOperations)
</span><span class="cx"> #if ENABLE(JIT)
</span><del>- , m_canCompileWithDFGState(DFG::CapabilityLevelNotSet)
</del><ins>+ , m_capabilityLevelState(DFG::CapabilityLevelNotSet)
</ins><span class="cx"> #endif
</span><span class="cx"> {
</span><span class="cx"> setNumParameters(other.numParameters());
</span><span class="lines">@@ -2851,21 +2851,21 @@
</span><span class="cx"> return static_cast<FunctionExecutable*>(ownerExecutable())->replaceWithDeferredOptimizedCodeFor(plan, m_isConstructor ? CodeForConstruct : CodeForCall);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-DFG::CapabilityLevel ProgramCodeBlock::canCompileWithDFGInternal()
</del><ins>+DFG::CapabilityLevel ProgramCodeBlock::capabilityLevelInternal()
</ins><span class="cx"> {
</span><del>- return DFG::canCompileProgram(this);
</del><ins>+ return DFG::programCapabilityLevel(this);
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-DFG::CapabilityLevel EvalCodeBlock::canCompileWithDFGInternal()
</del><ins>+DFG::CapabilityLevel EvalCodeBlock::capabilityLevelInternal()
</ins><span class="cx"> {
</span><del>- return DFG::canCompileEval(this);
</del><ins>+ return DFG::evalCapabilityLevel(this);
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-DFG::CapabilityLevel FunctionCodeBlock::canCompileWithDFGInternal()
</del><ins>+DFG::CapabilityLevel FunctionCodeBlock::capabilityLevelInternal()
</ins><span class="cx"> {
</span><span class="cx"> if (m_isConstructor)
</span><del>- return DFG::canCompileFunctionForConstruct(this);
- return DFG::canCompileFunctionForCall(this);
</del><ins>+ return DFG::functionForConstructCapabilityLevel(this);
+ return DFG::functionForCallCapabilityLevel(this);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void ProgramCodeBlock::jettison()
</span></span></pre></div>
<a id="branchesdfgFourthTierSourceJavaScriptCorebytecodeCodeBlockh"></a>
<div class="modfile"><h4>Modified: branches/dfgFourthTier/Source/JavaScriptCore/bytecode/CodeBlock.h (150621 => 150622)</h4>
<pre class="diff"><span>
<span class="info">--- branches/dfgFourthTier/Source/JavaScriptCore/bytecode/CodeBlock.h 2013-05-24 01:33:04 UTC (rev 150621)
+++ branches/dfgFourthTier/Source/JavaScriptCore/bytecode/CodeBlock.h 2013-05-24 01:35:26 UTC (rev 150622)
</span><span class="lines">@@ -306,14 +306,14 @@
</span><span class="cx"> }
</span><span class="cx"> virtual CodeBlock* replacement() = 0;
</span><span class="cx">
</span><del>- virtual DFG::CapabilityLevel canCompileWithDFGInternal() = 0;
- DFG::CapabilityLevel canCompileWithDFG()
</del><ins>+ virtual DFG::CapabilityLevel capabilityLevelInternal() = 0;
+ DFG::CapabilityLevel capabilityLevel()
</ins><span class="cx"> {
</span><del>- DFG::CapabilityLevel result = canCompileWithDFGInternal();
- m_canCompileWithDFGState = result;
</del><ins>+ DFG::CapabilityLevel result = capabilityLevelInternal();
+ m_capabilityLevelState = result;
</ins><span class="cx"> return result;
</span><span class="cx"> }
</span><del>- DFG::CapabilityLevel canCompileWithDFGState() { return m_canCompileWithDFGState; }
</del><ins>+ DFG::CapabilityLevel capabilityLevelState() { return m_capabilityLevelState; }
</ins><span class="cx">
</span><span class="cx"> bool hasOptimizedReplacement();
</span><span class="cx"> #else
</span><span class="lines">@@ -906,7 +906,7 @@
</span><span class="cx"> // without holding any locks, because the GC is guaranteed to wait until any
</span><span class="cx"> // concurrent compilation threads finish what they're doing.
</span><span class="cx"> ConcurrentJITLock m_lock;
</span><del>-
</del><ins>+
</ins><span class="cx"> protected:
</span><span class="cx"> #if ENABLE(JIT)
</span><span class="cx"> virtual CompilationResult jitCompileImpl(ExecState*) = 0;
</span><span class="lines">@@ -1103,7 +1103,7 @@
</span><span class="cx"> #endif
</span><span class="cx"> OwnPtr<RareData> m_rareData;
</span><span class="cx"> #if ENABLE(JIT)
</span><del>- DFG::CapabilityLevel m_canCompileWithDFGState;
</del><ins>+ DFG::CapabilityLevel m_capabilityLevelState;
</ins><span class="cx"> #endif
</span><span class="cx"> };
</span><span class="cx">
</span><span class="lines">@@ -1142,7 +1142,7 @@
</span><span class="cx"> virtual void jettison();
</span><span class="cx"> virtual CompilationResult jitCompileImpl(ExecState*);
</span><span class="cx"> virtual CodeBlock* replacement();
</span><del>- virtual DFG::CapabilityLevel canCompileWithDFGInternal();
</del><ins>+ virtual DFG::CapabilityLevel capabilityLevelInternal();
</ins><span class="cx"> #endif
</span><span class="cx"> };
</span><span class="cx">
</span><span class="lines">@@ -1168,7 +1168,7 @@
</span><span class="cx"> virtual void jettison();
</span><span class="cx"> virtual CompilationResult jitCompileImpl(ExecState*);
</span><span class="cx"> virtual CodeBlock* replacement();
</span><del>- virtual DFG::CapabilityLevel canCompileWithDFGInternal();
</del><ins>+ virtual DFG::CapabilityLevel capabilityLevelInternal();
</ins><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> private:
</span><span class="lines">@@ -1194,7 +1194,7 @@
</span><span class="cx"> virtual void jettison();
</span><span class="cx"> virtual CompilationResult jitCompileImpl(ExecState*);
</span><span class="cx"> virtual CodeBlock* replacement();
</span><del>- virtual DFG::CapabilityLevel canCompileWithDFGInternal();
</del><ins>+ virtual DFG::CapabilityLevel capabilityLevelInternal();
</ins><span class="cx"> #endif
</span><span class="cx"> };
</span><span class="cx">
</span></span></pre></div>
<a id="branchesdfgFourthTierSourceJavaScriptCoredfgDFGCapabilitiescpp"></a>
<div class="modfile"><h4>Modified: branches/dfgFourthTier/Source/JavaScriptCore/dfg/DFGCapabilities.cpp (150621 => 150622)</h4>
<pre class="diff"><span>
<span class="info">--- branches/dfgFourthTier/Source/JavaScriptCore/dfg/DFGCapabilities.cpp 2013-05-24 01:33:04 UTC (rev 150621)
+++ branches/dfgFourthTier/Source/JavaScriptCore/dfg/DFGCapabilities.cpp 2013-05-24 01:35:26 UTC (rev 150622)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2011 Apple Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2011, 2013 Apple Inc. All rights reserved.
</ins><span class="cx"> *
</span><span class="cx"> * Redistribution and use in source and binary forms, with or without
</span><span class="cx"> * modification, are permitted provided that the following conditions
</span><span class="lines">@@ -66,52 +66,201 @@
</span><span class="cx"> && !codeBlock->ownerExecutable()->needsActivation();
</span><span class="cx"> }
</span><span class="cx">
</span><del>-static inline void debugFail(CodeBlock* codeBlock, OpcodeID opcodeID, bool result)
</del><ins>+inline void debugFail(CodeBlock* codeBlock, OpcodeID opcodeID, CapabilityLevel result)
</ins><span class="cx"> {
</span><del>- ASSERT_UNUSED(result, !result);
-#if DFG_ENABLE(DEBUG_VERBOSE)
- dataLogF("Cannot handle code block %p because of opcode %s.\n", codeBlock, opcodeNames[opcodeID]);
-#else
- UNUSED_PARAM(codeBlock);
- UNUSED_PARAM(opcodeID);
- UNUSED_PARAM(result);
-#endif
</del><ins>+ if (Options::verboseCompilation() && !canCompile(result))
+ dataLog("Cannot compile code block ", *codeBlock, " because of opcode %s.\n", opcodeNames[opcodeID]);
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-static inline void debugFail(CodeBlock* codeBlock, OpcodeID opcodeID, CapabilityLevel result)
</del><ins>+// Opcode checking.
+inline bool canInlineResolveOperations(ResolveOperations* operations)
</ins><span class="cx"> {
</span><del>- ASSERT(result != CanCompile);
-#if DFG_ENABLE(DEBUG_VERBOSE)
- if (result == CannotCompile)
- dataLogF("Cannot handle code block %p because of opcode %s.\n", codeBlock, opcodeNames[opcodeID]);
- else {
- dataLogF("Cannot compile code block %p because of opcode %s, but inlining might be possible.\n", codeBlock, opcodeNames[opcodeID]);
</del><ins>+ for (unsigned i = 0; i < operations->size(); i++) {
+ switch (operations->data()[i].m_operation) {
+ case ResolveOperation::ReturnGlobalObjectAsBase:
+ case ResolveOperation::SetBaseToGlobal:
+ case ResolveOperation::SetBaseToUndefined:
+ case ResolveOperation::GetAndReturnGlobalProperty:
+ case ResolveOperation::GetAndReturnGlobalVar:
+ case ResolveOperation::GetAndReturnGlobalVarWatchable:
+ case ResolveOperation::SkipScopes:
+ case ResolveOperation::SetBaseToScope:
+ case ResolveOperation::ReturnScopeAsBase:
+ case ResolveOperation::GetAndReturnScopedVar:
+ continue;
+
+ case ResolveOperation::Fail:
+ // Fall-back resolves don't know how to deal with the ExecState* having a different
+ // global object (and scope) than the inlined code that is invoking that resolve.
+ return false;
+
+ case ResolveOperation::SkipTopScopeNode:
+ // We don't inline code blocks that create activations. Creation of
+ // activations is the only thing that leads to SkipTopScopeNode.
+ return false;
+
+ case ResolveOperation::CheckForDynamicEntriesBeforeGlobalScope:
+ // This would be easy to support in all cases.
+ return false;
+ }
</ins><span class="cx"> }
</span><del>-#else
- UNUSED_PARAM(codeBlock);
- UNUSED_PARAM(opcodeID);
- UNUSED_PARAM(result);
</del><ins>+ return true;
+}
+
+CapabilityLevel capabilityLevel(OpcodeID opcodeID, CodeBlock* codeBlock, Instruction* pc)
+{
+ switch (opcodeID) {
+ case op_enter:
+ case op_to_this:
+ case op_create_this:
+ case op_get_callee:
+ case op_bitand:
+ case op_bitor:
+ case op_bitxor:
+ case op_rshift:
+ case op_lshift:
+ case op_urshift:
+ case op_inc:
+ case op_dec:
+ case op_add:
+ case op_sub:
+ case op_negate:
+ case op_mul:
+ case op_mod:
+ case op_div:
+#if ENABLE(DEBUG_WITH_BREAKPOINT)
+ case op_debug:
</ins><span class="cx"> #endif
</span><ins>+ case op_mov:
+ case op_check_has_instance:
+ case op_instanceof:
+ case op_is_undefined:
+ case op_is_boolean:
+ case op_is_number:
+ case op_is_string:
+ case op_is_object:
+ case op_is_function:
+ case op_not:
+ case op_less:
+ case op_lesseq:
+ case op_greater:
+ case op_greatereq:
+ case op_eq:
+ case op_eq_null:
+ case op_stricteq:
+ case op_neq:
+ case op_neq_null:
+ case op_nstricteq:
+ case op_get_by_val:
+ case op_put_by_val:
+ case op_get_by_id:
+ case op_get_by_id_out_of_line:
+ case op_get_array_length:
+ case op_put_by_id:
+ case op_put_by_id_out_of_line:
+ case op_put_by_id_transition_direct:
+ case op_put_by_id_transition_direct_out_of_line:
+ case op_put_by_id_transition_normal:
+ case op_put_by_id_transition_normal_out_of_line:
+ case op_init_global_const_nop:
+ case op_init_global_const:
+ case op_init_global_const_check:
+ case op_jmp:
+ case op_jtrue:
+ case op_jfalse:
+ case op_jeq_null:
+ case op_jneq_null:
+ case op_jless:
+ case op_jlesseq:
+ case op_jgreater:
+ case op_jgreatereq:
+ case op_jnless:
+ case op_jnlesseq:
+ case op_jngreater:
+ case op_jngreatereq:
+ case op_loop_hint:
+ case op_ret:
+ case op_end:
+ case op_call_put_result:
+ case op_new_object:
+ case op_new_array:
+ case op_new_array_with_size:
+ case op_new_array_buffer:
+ case op_strcat:
+ case op_to_primitive:
+ case op_throw:
+ case op_throw_static_error:
+ case op_call:
+ case op_construct:
+ case op_init_lazy_reg:
+ case op_create_arguments:
+ case op_tear_off_arguments:
+ case op_get_argument_by_val:
+ case op_get_arguments_length:
+ case op_jneq_ptr:
+ case op_put_to_base_variable:
+ case op_put_to_base:
+ case op_typeof:
+ case op_to_number:
+ return CanCompileAndInline;
+
+ case op_call_varargs:
+ if (codeBlock->usesArguments() && pc[3].u.operand == codeBlock->argumentsRegister())
+ return CanInline;
+ return CannotCompile;
+
+ case op_resolve:
+ case op_resolve_global_property:
+ case op_resolve_global_var:
+ case op_resolve_scoped_var:
+ case op_resolve_scoped_var_on_top_scope:
+ case op_resolve_scoped_var_with_top_scope_check:
+ if (canInlineResolveOperations(pc[3].u.resolveOperations))
+ return CanCompileAndInline;
+ return CanCompile;
+
+ case op_get_scoped_var:
+ case op_put_scoped_var:
+ if (!codeBlock->needsFullScopeChain())
+ return CanCompileAndInline;
+ return CanCompile;
+
+ case op_resolve_base_to_global:
+ case op_resolve_base_to_global_dynamic:
+ case op_resolve_base_to_scope:
+ case op_resolve_base_to_scope_with_top_scope_check:
+ case op_resolve_base:
+ case op_resolve_with_base:
+ case op_resolve_with_this:
+ if (canInlineResolveOperations(pc[4].u.resolveOperations))
+ return CanCompileAndInline;
+ return CanCompile;
+
+ case op_new_regexp:
+ case op_create_activation:
+ case op_tear_off_activation:
+ case op_new_func:
+ case op_new_func_exp:
+ return CanCompile;
+
+ default:
+ return CannotCompile;
+ }
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-template<typename ReturnType, ReturnType (*canHandleOpcode)(OpcodeID, CodeBlock*, Instruction*)>
-ReturnType canHandleOpcodes(CodeBlock* codeBlock, ReturnType initialValue)
</del><ins>+CapabilityLevel capabilityLevel(CodeBlock* codeBlock)
</ins><span class="cx"> {
</span><span class="cx"> Interpreter* interpreter = codeBlock->vm()->interpreter;
</span><span class="cx"> Instruction* instructionsBegin = codeBlock->instructions().begin();
</span><span class="cx"> unsigned instructionCount = codeBlock->instructions().size();
</span><del>- ReturnType result = initialValue;
</del><ins>+ CapabilityLevel result = CanCompileAndInline;
</ins><span class="cx">
</span><span class="cx"> for (unsigned bytecodeOffset = 0; bytecodeOffset < instructionCount; ) {
</span><span class="cx"> switch (interpreter->getOpcodeID(instructionsBegin[bytecodeOffset].u.opcode)) {
</span><span class="cx"> #define DEFINE_OP(opcode, length) \
</span><span class="cx"> case opcode: { \
</span><del>- ReturnType current = canHandleOpcode( \
- opcode, codeBlock, instructionsBegin + bytecodeOffset); \
- if (current < result) { \
- result = current; \
- debugFail(codeBlock, opcode, current); \
- } \
</del><ins>+ result = leastUpperBound(result, capabilityLevel(opcode, codeBlock, instructionsBegin + bytecodeOffset)); \
+ debugFail(codeBlock, opcode, result); \
</ins><span class="cx"> bytecodeOffset += length; \
</span><span class="cx"> break; \
</span><span class="cx"> }
</span><span class="lines">@@ -126,18 +275,6 @@
</span><span class="cx"> return result;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-CapabilityLevel canCompileOpcodes(CodeBlock* codeBlock)
-{
- if (!MacroAssembler::supportsFloatingPoint())
- return CannotCompile;
- return canHandleOpcodes<CapabilityLevel, canCompileOpcode>(codeBlock, CanCompile);
-}
-
-bool canInlineOpcodes(CodeBlock* codeBlock)
-{
- return canHandleOpcodes<bool, canInlineOpcode>(codeBlock, true);
-}
-
</del><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> } } // namespace JSC::DFG
</span></span></pre></div>
<a id="branchesdfgFourthTierSourceJavaScriptCoredfgDFGCapabilitiesh"></a>
<div class="modfile"><h4>Modified: branches/dfgFourthTier/Source/JavaScriptCore/dfg/DFGCapabilities.h (150621 => 150622)</h4>
<pre class="diff"><span>
<span class="info">--- branches/dfgFourthTier/Source/JavaScriptCore/dfg/DFGCapabilities.h 2013-05-24 01:33:04 UTC (rev 150621)
+++ branches/dfgFourthTier/Source/JavaScriptCore/dfg/DFGCapabilities.h 2013-05-24 01:35:26 UTC (rev 150622)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2011, 2012 Apple Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2011, 2012, 2013 Apple Inc. All rights reserved.
</ins><span class="cx"> *
</span><span class="cx"> * Redistribution and use in source and binary forms, with or without
</span><span class="cx"> * modification, are permitted provided that the following conditions
</span><span class="lines">@@ -47,218 +47,9 @@
</span><span class="cx"> bool mightInlineFunctionForClosureCall(CodeBlock*);
</span><span class="cx"> bool mightInlineFunctionForConstruct(CodeBlock*);
</span><span class="cx">
</span><del>-// Opcode checking.
-inline bool canInlineResolveOperations(ResolveOperations* operations)
-{
- for (unsigned i = 0; i < operations->size(); i++) {
- switch (operations->data()[i].m_operation) {
- case ResolveOperation::ReturnGlobalObjectAsBase:
- case ResolveOperation::SetBaseToGlobal:
- case ResolveOperation::SetBaseToUndefined:
- case ResolveOperation::GetAndReturnGlobalProperty:
- case ResolveOperation::GetAndReturnGlobalVar:
- case ResolveOperation::GetAndReturnGlobalVarWatchable:
- case ResolveOperation::SkipScopes:
- case ResolveOperation::SetBaseToScope:
- case ResolveOperation::ReturnScopeAsBase:
- case ResolveOperation::GetAndReturnScopedVar:
- continue;
</del><ins>+inline CapabilityLevel capabilityLevel(OpcodeID opcodeID, CodeBlock* codeBlock, Instruction* pc);
</ins><span class="cx">
</span><del>- case ResolveOperation::Fail:
- // Fall-back resolves don't know how to deal with the ExecState* having a different
- // global object (and scope) than the inlined code that is invoking that resolve.
- return false;
-
- case ResolveOperation::SkipTopScopeNode:
- // We don't inline code blocks that create activations. Creation of
- // activations is the only thing that leads to SkipTopScopeNode.
- return false;
-
- case ResolveOperation::CheckForDynamicEntriesBeforeGlobalScope:
- // This would be easy to support in all cases.
- return false;
- }
- }
- return true;
-}
-
-inline CapabilityLevel canCompileOpcode(OpcodeID opcodeID, CodeBlock*, Instruction*)
-{
- switch (opcodeID) {
- case op_enter:
- case op_to_this:
- case op_create_this:
- case op_get_callee:
- case op_bitand:
- case op_bitor:
- case op_bitxor:
- case op_rshift:
- case op_lshift:
- case op_urshift:
- case op_inc:
- case op_dec:
- case op_add:
- case op_sub:
- case op_negate:
- case op_mul:
- case op_mod:
- case op_div:
-#if ENABLE(DEBUG_WITH_BREAKPOINT)
- case op_debug:
-#endif
- case op_mov:
- case op_check_has_instance:
- case op_instanceof:
- case op_is_undefined:
- case op_is_boolean:
- case op_is_number:
- case op_is_string:
- case op_is_object:
- case op_is_function:
- case op_not:
- case op_less:
- case op_lesseq:
- case op_greater:
- case op_greatereq:
- case op_eq:
- case op_eq_null:
- case op_stricteq:
- case op_neq:
- case op_neq_null:
- case op_nstricteq:
- case op_get_by_val:
- case op_put_by_val:
- case op_get_by_id:
- case op_get_by_id_out_of_line:
- case op_get_array_length:
- case op_put_by_id:
- case op_put_by_id_out_of_line:
- case op_put_by_id_transition_direct:
- case op_put_by_id_transition_direct_out_of_line:
- case op_put_by_id_transition_normal:
- case op_put_by_id_transition_normal_out_of_line:
- case op_init_global_const_nop:
- case op_init_global_const:
- case op_init_global_const_check:
- case op_jmp:
- case op_jtrue:
- case op_jfalse:
- case op_jeq_null:
- case op_jneq_null:
- case op_jless:
- case op_jlesseq:
- case op_jgreater:
- case op_jgreatereq:
- case op_jnless:
- case op_jnlesseq:
- case op_jngreater:
- case op_jngreatereq:
- case op_loop_hint:
- case op_ret:
- case op_end:
- case op_call_put_result:
- case op_new_object:
- case op_new_array:
- case op_new_array_with_size:
- case op_new_array_buffer:
- case op_strcat:
- case op_to_primitive:
- case op_throw:
- case op_throw_static_error:
- case op_call:
- case op_construct:
- case op_new_regexp:
- case op_init_lazy_reg:
- case op_create_activation:
- case op_tear_off_activation:
- case op_create_arguments:
- case op_tear_off_arguments:
- case op_new_func:
- case op_new_func_exp:
- case op_get_argument_by_val:
- case op_get_arguments_length:
- case op_jneq_ptr:
- case op_put_to_base_variable:
- case op_put_to_base:
- case op_typeof:
- case op_to_number:
- return CanCompile;
-
- case op_call_varargs:
- return MayInline;
-
- case op_resolve:
- case op_resolve_global_property:
- case op_resolve_global_var:
- case op_resolve_scoped_var:
- case op_resolve_scoped_var_on_top_scope:
- case op_resolve_scoped_var_with_top_scope_check:
- return CanCompile;
-
- case op_get_scoped_var:
- case op_put_scoped_var:
- return CanCompile;
-
- case op_resolve_base_to_global:
- case op_resolve_base_to_global_dynamic:
- case op_resolve_base_to_scope:
- case op_resolve_base_to_scope_with_top_scope_check:
- case op_resolve_base:
- case op_resolve_with_base:
- case op_resolve_with_this:
- return CanCompile;
-
- default:
- return CannotCompile;
- }
-}
-
-inline bool canInlineOpcode(OpcodeID opcodeID, CodeBlock* codeBlock, Instruction* pc)
-{
- switch (opcodeID) {
- case op_resolve:
- case op_resolve_global_property:
- case op_resolve_global_var:
- case op_resolve_scoped_var:
- case op_resolve_scoped_var_on_top_scope:
- case op_resolve_scoped_var_with_top_scope_check:
- return canInlineResolveOperations(pc[3].u.resolveOperations);
-
- case op_resolve_base_to_global:
- case op_resolve_base_to_global_dynamic:
- case op_resolve_base_to_scope:
- case op_resolve_base_to_scope_with_top_scope_check:
- case op_resolve_base:
- case op_resolve_with_base:
- case op_resolve_with_this:
- return canInlineResolveOperations(pc[4].u.resolveOperations);
-
- case op_get_scoped_var:
- case op_put_scoped_var:
- return !codeBlock->needsFullScopeChain();
-
- // Inlining doesn't correctly remap regular expression operands.
- case op_new_regexp:
-
- // We don't support inlining code that creates activations or has nested functions.
- case op_create_activation:
- case op_tear_off_activation:
- case op_new_func:
- case op_new_func_exp:
- return false;
-
- // Inlining supports op_call_varargs if it's a call that just forwards the caller's
- // arguments.
- case op_call_varargs:
- return codeBlock->usesArguments() && pc[3].u.operand == codeBlock->argumentsRegister();
-
- default:
- return canCompileOpcode(opcodeID, codeBlock, pc) == CanCompile;
- }
-}
-
-CapabilityLevel canCompileOpcodes(CodeBlock*);
-bool canInlineOpcodes(CodeBlock*);
</del><ins>+CapabilityLevel capabilityLevel(CodeBlock*);
</ins><span class="cx"> #else // ENABLE(DFG_JIT)
</span><span class="cx"> inline bool mightCompileEval(CodeBlock*) { return false; }
</span><span class="cx"> inline bool mightCompileProgram(CodeBlock*) { return false; }
</span><span class="lines">@@ -268,57 +59,55 @@
</span><span class="cx"> inline bool mightInlineFunctionForClosureCall(CodeBlock*) { return false; }
</span><span class="cx"> inline bool mightInlineFunctionForConstruct(CodeBlock*) { return false; }
</span><span class="cx">
</span><del>-inline CapabilityLevel canCompileOpcode(OpcodeID, CodeBlock*, Instruction*) { return CannotCompile; }
-inline bool canInlineOpcode(OpcodeID, CodeBlock*, Instruction*) { return false; }
-inline CapabilityLevel canCompileOpcodes(CodeBlock*) { return CannotCompile; }
-inline bool canInlineOpcodes(CodeBlock*) { return false; }
</del><ins>+inline CapabilityLevel capabilityLevel(OpcodeID, CodeBlock*, Instruction*) { return CannotCompile; }
+inline CapabilityLevel capabilityLevel(CodeBlock*) { return CannotCompile; }
</ins><span class="cx"> #endif // ENABLE(DFG_JIT)
</span><span class="cx">
</span><del>-inline CapabilityLevel canCompileEval(CodeBlock* codeBlock)
</del><ins>+inline CapabilityLevel evalCapabilityLevel(CodeBlock* codeBlock)
</ins><span class="cx"> {
</span><span class="cx"> if (!mightCompileEval(codeBlock))
</span><span class="cx"> return CannotCompile;
</span><span class="cx">
</span><del>- return canCompileOpcodes(codeBlock);
</del><ins>+ return capabilityLevel(codeBlock);
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-inline CapabilityLevel canCompileProgram(CodeBlock* codeBlock)
</del><ins>+inline CapabilityLevel programCapabilityLevel(CodeBlock* codeBlock)
</ins><span class="cx"> {
</span><span class="cx"> if (!mightCompileProgram(codeBlock))
</span><span class="cx"> return CannotCompile;
</span><span class="cx">
</span><del>- return canCompileOpcodes(codeBlock);
</del><ins>+ return capabilityLevel(codeBlock);
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-inline CapabilityLevel canCompileFunctionForCall(CodeBlock* codeBlock)
</del><ins>+inline CapabilityLevel functionForCallCapabilityLevel(CodeBlock* codeBlock)
</ins><span class="cx"> {
</span><span class="cx"> if (!mightCompileFunctionForCall(codeBlock))
</span><span class="cx"> return CannotCompile;
</span><span class="cx">
</span><del>- return canCompileOpcodes(codeBlock);
</del><ins>+ return capabilityLevel(codeBlock);
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-inline CapabilityLevel canCompileFunctionForConstruct(CodeBlock* codeBlock)
</del><ins>+inline CapabilityLevel functionForConstructCapabilityLevel(CodeBlock* codeBlock)
</ins><span class="cx"> {
</span><span class="cx"> if (!mightCompileFunctionForConstruct(codeBlock))
</span><span class="cx"> return CannotCompile;
</span><span class="cx">
</span><del>- return canCompileOpcodes(codeBlock);
</del><ins>+ return capabilityLevel(codeBlock);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> inline bool canInlineFunctionForCall(CodeBlock* codeBlock)
</span><span class="cx"> {
</span><del>- return mightInlineFunctionForCall(codeBlock) && canInlineOpcodes(codeBlock);
</del><ins>+ return mightInlineFunctionForCall(codeBlock) && canInline(capabilityLevel(codeBlock));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> inline bool canInlineFunctionForClosureCall(CodeBlock* codeBlock)
</span><span class="cx"> {
</span><del>- return mightInlineFunctionForClosureCall(codeBlock) && canInlineOpcodes(codeBlock);
</del><ins>+ return mightInlineFunctionForClosureCall(codeBlock) && canInline(capabilityLevel(codeBlock));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> inline bool canInlineFunctionForConstruct(CodeBlock* codeBlock)
</span><span class="cx"> {
</span><del>- return mightInlineFunctionForConstruct(codeBlock) && canInlineOpcodes(codeBlock);
</del><ins>+ return mightInlineFunctionForConstruct(codeBlock) && canInline(capabilityLevel(codeBlock));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> inline bool mightInlineFunctionFor(CodeBlock* codeBlock, CodeSpecializationKind kind)
</span></span></pre></div>
<a id="branchesdfgFourthTierSourceJavaScriptCoredfgDFGCommonh"></a>
<div class="modfile"><h4>Modified: branches/dfgFourthTier/Source/JavaScriptCore/dfg/DFGCommon.h (150621 => 150622)</h4>
<pre class="diff"><span>
<span class="info">--- branches/dfgFourthTier/Source/JavaScriptCore/dfg/DFGCommon.h 2013-05-24 01:33:04 UTC (rev 150621)
+++ branches/dfgFourthTier/Source/JavaScriptCore/dfg/DFGCommon.h 2013-05-24 01:35:26 UTC (rev 150622)
</span><span class="lines">@@ -279,8 +279,61 @@
</span><span class="cx">
</span><span class="cx"> // Put things here that must be defined even if ENABLE(DFG_JIT) is false.
</span><span class="cx">
</span><del>-enum CapabilityLevel { CannotCompile, MayInline, CanCompile, CapabilityLevelNotSet };
</del><ins>+enum CapabilityLevel { CannotCompile, CanInline, CanCompile, CanCompileAndInline, CapabilityLevelNotSet };
</ins><span class="cx">
</span><ins>+inline bool canCompile(CapabilityLevel level)
+{
+ switch (level) {
+ case CanCompile:
+ case CanCompileAndInline:
+ return true;
+ default:
+ return false;
+ }
+}
+
+inline bool canInline(CapabilityLevel level)
+{
+ switch (level) {
+ case CanInline:
+ case CanCompileAndInline:
+ return true;
+ default:
+ return false;
+ }
+}
+
+inline CapabilityLevel leastUpperBound(CapabilityLevel a, CapabilityLevel b)
+{
+ switch (a) {
+ case CannotCompile:
+ return CannotCompile;
+ case CanInline:
+ switch (b) {
+ case CanInline:
+ case CanCompileAndInline:
+ return CanInline;
+ default:
+ return CannotCompile;
+ }
+ case CanCompile:
+ switch (b) {
+ case CanCompile:
+ case CanCompileAndInline:
+ return CanCompile;
+ default:
+ return CannotCompile;
+ }
+ case CanCompileAndInline:
+ return b;
+ case CapabilityLevelNotSet:
+ ASSERT_NOT_REACHED();
+ return CannotCompile;
+ }
+ ASSERT_NOT_REACHED();
+ return CannotCompile;
+}
+
</ins><span class="cx"> // Unconditionally disable DFG disassembly support if the DFG is not compiled in.
</span><span class="cx"> inline bool shouldShowDisassembly()
</span><span class="cx"> {
</span></span></pre></div>
<a id="branchesdfgFourthTierSourceJavaScriptCoredfgDFGDrivercpp"></a>
<div class="modfile"><h4>Modified: branches/dfgFourthTier/Source/JavaScriptCore/dfg/DFGDriver.cpp (150621 => 150622)</h4>
<pre class="diff"><span>
<span class="info">--- branches/dfgFourthTier/Source/JavaScriptCore/dfg/DFGDriver.cpp 2013-05-24 01:33:04 UTC (rev 150621)
+++ branches/dfgFourthTier/Source/JavaScriptCore/dfg/DFGDriver.cpp 2013-05-24 01:35:26 UTC (rev 150622)
</span><span class="lines">@@ -64,7 +64,7 @@
</span><span class="cx">
</span><span class="cx"> ASSERT(osrEntryBytecodeIndex != UINT_MAX);
</span><span class="cx">
</span><del>- if (!Options::useDFGJIT())
</del><ins>+ if (!Options::useDFGJIT() || !MacroAssembler::supportsFloatingPoint())
</ins><span class="cx"> return CompilationFailed;
</span><span class="cx">
</span><span class="cx"> if (logCompilationChanges())
</span></span></pre></div>
<a id="branchesdfgFourthTierSourceJavaScriptCorejitJITcpp"></a>
<div class="modfile"><h4>Modified: branches/dfgFourthTier/Source/JavaScriptCore/jit/JIT.cpp (150621 => 150622)</h4>
<pre class="diff"><span>
<span class="info">--- branches/dfgFourthTier/Source/JavaScriptCore/jit/JIT.cpp 2013-05-24 01:33:04 UTC (rev 150621)
+++ branches/dfgFourthTier/Source/JavaScriptCore/jit/JIT.cpp 2013-05-24 01:35:26 UTC (rev 150622)
</span><span class="lines">@@ -602,18 +602,20 @@
</span><span class="cx"> PassRefPtr<JITCode> JIT::privateCompile(CodePtr* functionEntryArityCheck, JITCompilationEffort effort)
</span><span class="cx"> {
</span><span class="cx"> #if ENABLE(VALUE_PROFILER)
</span><del>- DFG::CapabilityLevel level = m_codeBlock->canCompileWithDFG();
</del><ins>+ DFG::CapabilityLevel level = m_codeBlock->capabilityLevel();
</ins><span class="cx"> switch (level) {
</span><span class="cx"> case DFG::CannotCompile:
</span><span class="cx"> m_canBeOptimized = false;
</span><ins>+ m_canBeOptimizedOrInlined = false;
</ins><span class="cx"> m_shouldEmitProfiling = false;
</span><span class="cx"> break;
</span><del>- case DFG::MayInline:
</del><ins>+ case DFG::CanInline:
</ins><span class="cx"> m_canBeOptimized = false;
</span><span class="cx"> m_canBeOptimizedOrInlined = true;
</span><span class="cx"> m_shouldEmitProfiling = true;
</span><span class="cx"> break;
</span><span class="cx"> case DFG::CanCompile:
</span><ins>+ case DFG::CanCompileAndInline:
</ins><span class="cx"> m_canBeOptimized = true;
</span><span class="cx"> m_canBeOptimizedOrInlined = true;
</span><span class="cx"> m_shouldEmitProfiling = true;
</span></span></pre></div>
<a id="branchesdfgFourthTierSourceJavaScriptCorejitJITPropertyAccesscpp"></a>
<div class="modfile"><h4>Modified: branches/dfgFourthTier/Source/JavaScriptCore/jit/JITPropertyAccess.cpp (150621 => 150622)</h4>
<pre class="diff"><span>
<span class="info">--- branches/dfgFourthTier/Source/JavaScriptCore/jit/JITPropertyAccess.cpp 2013-05-24 01:33:04 UTC (rev 150621)
+++ branches/dfgFourthTier/Source/JavaScriptCore/jit/JITPropertyAccess.cpp 2013-05-24 01:35:26 UTC (rev 150622)
</span><span class="lines">@@ -705,7 +705,7 @@
</span><span class="cx"> // If we succeed in all of our checks, and the code was optimizable, then make sure we
</span><span class="cx"> // decrement the rare case counter.
</span><span class="cx"> #if ENABLE(VALUE_PROFILER)
</span><del>- if (m_codeBlock->canCompileWithDFG() >= DFG::MayInline) {
</del><ins>+ if (m_codeBlock->capabilityLevelState() != DFG::CannotCompile) {
</ins><span class="cx"> sub32(
</span><span class="cx"> TrustedImm32(1),
</span><span class="cx"> AbsoluteAddress(&m_codeBlock->rareCaseProfileForBytecodeOffset(stubInfo->bytecodeIndex)->m_counter));
</span></span></pre></div>
<a id="branchesdfgFourthTierSourceJavaScriptCorejitJITPropertyAccess32_64cpp"></a>
<div class="modfile"><h4>Modified: branches/dfgFourthTier/Source/JavaScriptCore/jit/JITPropertyAccess32_64.cpp (150621 => 150622)</h4>
<pre class="diff"><span>
<span class="info">--- branches/dfgFourthTier/Source/JavaScriptCore/jit/JITPropertyAccess32_64.cpp 2013-05-24 01:33:04 UTC (rev 150621)
+++ branches/dfgFourthTier/Source/JavaScriptCore/jit/JITPropertyAccess32_64.cpp 2013-05-24 01:35:26 UTC (rev 150622)
</span><span class="lines">@@ -648,7 +648,7 @@
</span><span class="cx"> // If we succeed in all of our checks, and the code was optimizable, then make sure we
</span><span class="cx"> // decrement the rare case counter.
</span><span class="cx"> #if ENABLE(VALUE_PROFILER)
</span><del>- if (m_codeBlock->canCompileWithDFG() >= DFG::MayInline) {
</del><ins>+ if (m_codeBlock->capabilityLevelState() != DFG::CannotCompile) {
</ins><span class="cx"> sub32(
</span><span class="cx"> TrustedImm32(1),
</span><span class="cx"> AbsoluteAddress(&m_codeBlock->rareCaseProfileForBytecodeOffset(stubInfo->bytecodeIndex)->m_counter));
</span></span></pre></div>
<a id="branchesdfgFourthTierSourceJavaScriptCoretoolsCodeProfilecpp"></a>
<div class="modfile"><h4>Modified: branches/dfgFourthTier/Source/JavaScriptCore/tools/CodeProfile.cpp (150621 => 150622)</h4>
<pre class="diff"><span>
<span class="info">--- branches/dfgFourthTier/Source/JavaScriptCore/tools/CodeProfile.cpp 2013-05-24 01:33:04 UTC (rev 150621)
+++ branches/dfgFourthTier/Source/JavaScriptCore/tools/CodeProfile.cpp 2013-05-24 01:35:26 UTC (rev 150622)
</span><span class="lines">@@ -107,7 +107,7 @@
</span><span class="cx"> CodeBlock* codeBlock = static_cast<CodeBlock*>(ownerUID);
</span><span class="cx"> if (codeBlock->jitType() == JITCode::DFGJIT)
</span><span class="cx"> type = DFGJIT;
</span><del>- else if (codeBlock->canCompileWithDFGState() != DFG::CanCompile)
</del><ins>+ else if (!canCompile(codeBlock->capabilityLevelState()))
</ins><span class="cx"> type = BaselineOnly;
</span><span class="cx"> else if (codeBlock->replacement())
</span><span class="cx"> type = BaselineOSR;
</span></span></pre>
</div>
</div>
</body>
</html>