<!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>[195000] 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/195000">195000</a></dd>
<dt>Author</dt> <dd>sbarati@apple.com</dd>
<dt>Date</dt> <dd>2016-01-13 16:28:40 -0800 (Wed, 13 Jan 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>NativeExecutable should have a name field
https://bugs.webkit.org/show_bug.cgi?id=153083

Reviewed by Geoffrey Garen.

This is going to help the SamplingProfiler come up
with names for NativeExecutable objects it encounters.

* jit/JITThunks.cpp:
(JSC::JITThunks::finalize):
(JSC::JITThunks::hostFunctionStub):
* jit/JITThunks.h:
* runtime/Executable.h:
* runtime/JSBoundFunction.cpp:
(JSC::JSBoundFunction::create):
* runtime/JSFunction.cpp:
(JSC::JSFunction::create):
(JSC::JSFunction::lookUpOrCreateNativeExecutable):
* runtime/JSFunction.h:
(JSC::JSFunction::createImpl):
* runtime/JSNativeStdFunction.cpp:
(JSC::JSNativeStdFunction::create):
* runtime/VM.cpp:
(JSC::thunkGeneratorForIntrinsic):
(JSC::VM::getHostFunction):
* runtime/VM.h:
(JSC::VM::getCTIStub):
(JSC::VM::exceptionOffset):</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceJavaScriptCoreChangeLog">trunk/Source/JavaScriptCore/ChangeLog</a></li>
<li><a href="#trunkSourceJavaScriptCorejitJITThunkscpp">trunk/Source/JavaScriptCore/jit/JITThunks.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCorejitJITThunksh">trunk/Source/JavaScriptCore/jit/JITThunks.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeExecutableh">trunk/Source/JavaScriptCore/runtime/Executable.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeJSBoundFunctioncpp">trunk/Source/JavaScriptCore/runtime/JSBoundFunction.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeJSFunctioncpp">trunk/Source/JavaScriptCore/runtime/JSFunction.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeJSFunctionh">trunk/Source/JavaScriptCore/runtime/JSFunction.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeJSNativeStdFunctioncpp">trunk/Source/JavaScriptCore/runtime/JSNativeStdFunction.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeVMcpp">trunk/Source/JavaScriptCore/runtime/VM.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeVMh">trunk/Source/JavaScriptCore/runtime/VM.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceJavaScriptCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/ChangeLog (194999 => 195000)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/ChangeLog        2016-01-14 00:04:56 UTC (rev 194999)
+++ trunk/Source/JavaScriptCore/ChangeLog        2016-01-14 00:28:40 UTC (rev 195000)
</span><span class="lines">@@ -1,3 +1,34 @@
</span><ins>+2016-01-13  Saam barati  &lt;sbarati@apple.com&gt;
+
+        NativeExecutable should have a name field
+        https://bugs.webkit.org/show_bug.cgi?id=153083
+
+        Reviewed by Geoffrey Garen.
+
+        This is going to help the SamplingProfiler come up
+        with names for NativeExecutable objects it encounters.
+
+        * jit/JITThunks.cpp:
+        (JSC::JITThunks::finalize):
+        (JSC::JITThunks::hostFunctionStub):
+        * jit/JITThunks.h:
+        * runtime/Executable.h:
+        * runtime/JSBoundFunction.cpp:
+        (JSC::JSBoundFunction::create):
+        * runtime/JSFunction.cpp:
+        (JSC::JSFunction::create):
+        (JSC::JSFunction::lookUpOrCreateNativeExecutable):
+        * runtime/JSFunction.h:
+        (JSC::JSFunction::createImpl):
+        * runtime/JSNativeStdFunction.cpp:
+        (JSC::JSNativeStdFunction::create):
+        * runtime/VM.cpp:
+        (JSC::thunkGeneratorForIntrinsic):
+        (JSC::VM::getHostFunction):
+        * runtime/VM.h:
+        (JSC::VM::getCTIStub):
+        (JSC::VM::exceptionOffset):
+
</ins><span class="cx"> 2016-01-13  Keith Miller  &lt;keith_miller@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [ES6] Support subclassing the String builtin object
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorejitJITThunkscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/jit/JITThunks.cpp (194999 => 195000)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/jit/JITThunks.cpp        2016-01-14 00:04:56 UTC (rev 194999)
+++ trunk/Source/JavaScriptCore/jit/JITThunks.cpp        2016-01-14 00:28:40 UTC (rev 195000)
</span><span class="lines">@@ -82,7 +82,7 @@
</span><span class="cx">     weakRemove(*m_hostFunctionStubMap, std::make_pair(nativeExecutable-&gt;function(), nativeExecutable-&gt;constructor()), nativeExecutable);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-NativeExecutable* JITThunks::hostFunctionStub(VM* vm, NativeFunction function, NativeFunction constructor)
</del><ins>+NativeExecutable* JITThunks::hostFunctionStub(VM* vm, NativeFunction function, NativeFunction constructor, const String&amp; name)
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(!isCompilationThread());
</span><span class="cx"> 
</span><span class="lines">@@ -94,12 +94,12 @@
</span><span class="cx">         adoptRef(new NativeJITCode(JIT::compileCTINativeCall(vm, function), JITCode::HostCallThunk)),
</span><span class="cx">         function,
</span><span class="cx">         adoptRef(new NativeJITCode(MacroAssemblerCodeRef::createSelfManagedCodeRef(ctiNativeConstruct(vm)), JITCode::HostCallThunk)),
</span><del>-        constructor, NoIntrinsic);
</del><ins>+        constructor, NoIntrinsic, name);
</ins><span class="cx">     weakAdd(*m_hostFunctionStubMap, std::make_pair(function, constructor), Weak&lt;NativeExecutable&gt;(nativeExecutable, this));
</span><span class="cx">     return nativeExecutable;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-NativeExecutable* JITThunks::hostFunctionStub(VM* vm, NativeFunction function, ThunkGenerator generator, Intrinsic intrinsic)
</del><ins>+NativeExecutable* JITThunks::hostFunctionStub(VM* vm, NativeFunction function, ThunkGenerator generator, Intrinsic intrinsic, const String&amp; name)
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(!isCompilationThread());    
</span><span class="cx">     ASSERT(vm-&gt;canUseJIT());
</span><span class="lines">@@ -116,7 +116,7 @@
</span><span class="cx">     
</span><span class="cx">     RefPtr&lt;JITCode&gt; forConstruct = adoptRef(new NativeJITCode(MacroAssemblerCodeRef::createSelfManagedCodeRef(ctiNativeConstruct(vm)), JITCode::HostCallThunk));
</span><span class="cx">     
</span><del>-    NativeExecutable* nativeExecutable = NativeExecutable::create(*vm, forCall, function, forConstruct, callHostFunctionAsConstructor, intrinsic);
</del><ins>+    NativeExecutable* nativeExecutable = NativeExecutable::create(*vm, forCall, function, forConstruct, callHostFunctionAsConstructor, intrinsic, name);
</ins><span class="cx">     weakAdd(*m_hostFunctionStubMap, std::make_pair(function, &amp;callHostFunctionAsConstructor), Weak&lt;NativeExecutable&gt;(nativeExecutable, this));
</span><span class="cx">     return nativeExecutable;
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorejitJITThunksh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/jit/JITThunks.h (194999 => 195000)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/jit/JITThunks.h        2016-01-14 00:04:56 UTC (rev 194999)
+++ trunk/Source/JavaScriptCore/jit/JITThunks.h        2016-01-14 00:28:40 UTC (rev 195000)
</span><span class="lines">@@ -57,8 +57,8 @@
</span><span class="cx"> 
</span><span class="cx">     MacroAssemblerCodeRef ctiStub(VM*, ThunkGenerator);
</span><span class="cx"> 
</span><del>-    NativeExecutable* hostFunctionStub(VM*, NativeFunction, NativeFunction constructor);
-    NativeExecutable* hostFunctionStub(VM*, NativeFunction, ThunkGenerator, Intrinsic);
</del><ins>+    NativeExecutable* hostFunctionStub(VM*, NativeFunction, NativeFunction constructor, const String&amp; name);
+    NativeExecutable* hostFunctionStub(VM*, NativeFunction, ThunkGenerator, Intrinsic, const String&amp; name);
</ins><span class="cx"> 
</span><span class="cx">     void clearHostFunctionStubs();
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeExecutableh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/Executable.h (194999 => 195000)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/Executable.h        2016-01-14 00:04:56 UTC (rev 194999)
+++ trunk/Source/JavaScriptCore/runtime/Executable.h        2016-01-14 00:28:40 UTC (rev 195000)
</span><span class="lines">@@ -257,11 +257,11 @@
</span><span class="cx">     typedef ExecutableBase Base;
</span><span class="cx">     static const unsigned StructureFlags = Base::StructureFlags | StructureIsImmortal;
</span><span class="cx"> 
</span><del>-    static NativeExecutable* create(VM&amp; vm, PassRefPtr&lt;JITCode&gt; callThunk, NativeFunction function, PassRefPtr&lt;JITCode&gt; constructThunk, NativeFunction constructor, Intrinsic intrinsic)
</del><ins>+    static NativeExecutable* create(VM&amp; vm, PassRefPtr&lt;JITCode&gt; callThunk, NativeFunction function, PassRefPtr&lt;JITCode&gt; constructThunk, NativeFunction constructor, Intrinsic intrinsic, const String&amp; name)
</ins><span class="cx">     {
</span><span class="cx">         NativeExecutable* executable;
</span><span class="cx">         executable = new (NotNull, allocateCell&lt;NativeExecutable&gt;(vm.heap)) NativeExecutable(vm, function, constructor);
</span><del>-        executable-&gt;finishCreation(vm, callThunk, constructThunk, intrinsic);
</del><ins>+        executable-&gt;finishCreation(vm, callThunk, constructThunk, intrinsic, name);
</ins><span class="cx">         return executable;
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -294,13 +294,16 @@
</span><span class="cx"> 
</span><span class="cx">     Intrinsic intrinsic() const;
</span><span class="cx"> 
</span><ins>+    const String&amp; name() const { return m_name; }
+
</ins><span class="cx"> protected:
</span><del>-    void finishCreation(VM&amp; vm, PassRefPtr&lt;JITCode&gt; callThunk, PassRefPtr&lt;JITCode&gt; constructThunk, Intrinsic intrinsic)
</del><ins>+    void finishCreation(VM&amp; vm, PassRefPtr&lt;JITCode&gt; callThunk, PassRefPtr&lt;JITCode&gt; constructThunk, Intrinsic intrinsic, const String&amp; name)
</ins><span class="cx">     {
</span><span class="cx">         Base::finishCreation(vm);
</span><span class="cx">         m_jitCodeForCall = callThunk;
</span><span class="cx">         m_jitCodeForConstruct = constructThunk;
</span><span class="cx">         m_intrinsic = intrinsic;
</span><ins>+        m_name = name;
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx"> private:
</span><span class="lines">@@ -317,6 +320,8 @@
</span><span class="cx">     NativeFunction m_constructor;
</span><span class="cx">         
</span><span class="cx">     Intrinsic m_intrinsic;
</span><ins>+
+    String m_name;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> class ScriptExecutable : public ExecutableBase {
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeJSBoundFunctioncpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/JSBoundFunction.cpp (194999 => 195000)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/JSBoundFunction.cpp        2016-01-14 00:04:56 UTC (rev 194999)
+++ trunk/Source/JavaScriptCore/runtime/JSBoundFunction.cpp        2016-01-14 00:28:40 UTC (rev 195000)
</span><span class="lines">@@ -93,7 +93,7 @@
</span><span class="cx">     ConstructData constructData;
</span><span class="cx">     ConstructType constructType = JSC::getConstructData(targetFunction, constructData);
</span><span class="cx">     bool canConstruct = constructType != ConstructTypeNone;
</span><del>-    NativeExecutable* executable = vm.getHostFunction(boundFunctionCall, canConstruct ? boundFunctionConstruct : callHostFunctionAsConstructor);
</del><ins>+    NativeExecutable* executable = vm.getHostFunction(boundFunctionCall, canConstruct ? boundFunctionConstruct : callHostFunctionAsConstructor, name);
</ins><span class="cx">     JSBoundFunction* function = new (NotNull, allocateCell&lt;JSBoundFunction&gt;(vm.heap)) JSBoundFunction(vm, globalObject, globalObject-&gt;boundFunctionStructure(), targetFunction, boundThis, boundArgs);
</span><span class="cx"> 
</span><span class="cx">     function-&gt;finishCreation(vm, executable, length, name);
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeJSFunctioncpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/JSFunction.cpp (194999 => 195000)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/JSFunction.cpp        2016-01-14 00:04:56 UTC (rev 194999)
+++ trunk/Source/JavaScriptCore/runtime/JSFunction.cpp        2016-01-14 00:28:40 UTC (rev 195000)
</span><span class="lines">@@ -78,22 +78,22 @@
</span><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-NativeExecutable* JSFunction::lookUpOrCreateNativeExecutable(VM&amp; vm, NativeFunction nativeFunction, Intrinsic intrinsic, NativeFunction nativeConstructor)
</del><ins>+NativeExecutable* JSFunction::lookUpOrCreateNativeExecutable(VM&amp; vm, NativeFunction nativeFunction, Intrinsic intrinsic, NativeFunction nativeConstructor, const String&amp; name)
</ins><span class="cx"> {
</span><span class="cx"> #if !ENABLE(JIT)
</span><span class="cx">     UNUSED_PARAM(intrinsic);
</span><span class="cx"> #else
</span><span class="cx">     if (intrinsic != NoIntrinsic &amp;&amp; vm.canUseJIT()) {
</span><span class="cx">         ASSERT(nativeConstructor == callHostFunctionAsConstructor);
</span><del>-        return vm.getHostFunction(nativeFunction, intrinsic);
</del><ins>+        return vm.getHostFunction(nativeFunction, intrinsic, name);
</ins><span class="cx">     }
</span><span class="cx"> #endif
</span><del>-    return vm.getHostFunction(nativeFunction, nativeConstructor);
</del><ins>+    return vm.getHostFunction(nativeFunction, nativeConstructor, name);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> JSFunction* JSFunction::create(VM&amp; vm, JSGlobalObject* globalObject, int length, const String&amp; name, NativeFunction nativeFunction, Intrinsic intrinsic, NativeFunction nativeConstructor)
</span><span class="cx"> {
</span><del>-    NativeExecutable* executable = lookUpOrCreateNativeExecutable(vm, nativeFunction, intrinsic, nativeConstructor);
</del><ins>+    NativeExecutable* executable = lookUpOrCreateNativeExecutable(vm, nativeFunction, intrinsic, nativeConstructor, name);
</ins><span class="cx">     JSFunction* function = new (NotNull, allocateCell&lt;JSFunction&gt;(vm.heap)) JSFunction(vm, globalObject, globalObject-&gt;functionStructure());
</span><span class="cx">     // Can't do this during initialization because getHostFunction might do a GC allocation.
</span><span class="cx">     function-&gt;finishCreation(vm, executable, length, name);
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeJSFunctionh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/JSFunction.h (194999 => 195000)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/JSFunction.h        2016-01-14 00:04:56 UTC (rev 194999)
+++ trunk/Source/JavaScriptCore/runtime/JSFunction.h        2016-01-14 00:28:40 UTC (rev 195000)
</span><span class="lines">@@ -176,7 +176,7 @@
</span><span class="cx">     static void visitChildren(JSCell*, SlotVisitor&amp;);
</span><span class="cx"> 
</span><span class="cx"> 
</span><del>-    static NativeExecutable* lookUpOrCreateNativeExecutable(VM&amp;, NativeFunction, Intrinsic, NativeFunction nativeConstructor);
</del><ins>+    static NativeExecutable* lookUpOrCreateNativeExecutable(VM&amp;, NativeFunction, Intrinsic, NativeFunction nativeConstructor, const String&amp; name);
</ins><span class="cx"> 
</span><span class="cx"> private:
</span><span class="cx">     static JSFunction* createImpl(VM&amp; vm, FunctionExecutable* executable, JSScope* scope)
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeJSNativeStdFunctioncpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/JSNativeStdFunction.cpp (194999 => 195000)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/JSNativeStdFunction.cpp        2016-01-14 00:04:56 UTC (rev 194999)
+++ trunk/Source/JavaScriptCore/runtime/JSNativeStdFunction.cpp        2016-01-14 00:28:40 UTC (rev 195000)
</span><span class="lines">@@ -66,7 +66,7 @@
</span><span class="cx"> 
</span><span class="cx"> JSNativeStdFunction* JSNativeStdFunction::create(VM&amp; vm, JSGlobalObject* globalObject, int length, const String&amp; name, NativeStdFunction&amp;&amp; nativeStdFunction, Intrinsic intrinsic, NativeFunction nativeConstructor)
</span><span class="cx"> {
</span><del>-    NativeExecutable* executable = lookUpOrCreateNativeExecutable(vm, runStdFunction, intrinsic, nativeConstructor);
</del><ins>+    NativeExecutable* executable = lookUpOrCreateNativeExecutable(vm, runStdFunction, intrinsic, nativeConstructor, name);
</ins><span class="cx">     NativeStdFunctionCell* functionCell = NativeStdFunctionCell::create(vm, WTFMove(nativeStdFunction));
</span><span class="cx">     JSNativeStdFunction* function = new (NotNull, allocateCell&lt;JSNativeStdFunction&gt;(vm.heap)) JSNativeStdFunction(vm, globalObject, globalObject-&gt;nativeStdFunctionStructure());
</span><span class="cx">     function-&gt;finishCreation(vm, executable, length, name, functionCell);
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeVMcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/VM.cpp (194999 => 195000)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/VM.cpp        2016-01-14 00:04:56 UTC (rev 194999)
+++ trunk/Source/JavaScriptCore/runtime/VM.cpp        2016-01-14 00:28:40 UTC (rev 195000)
</span><span class="lines">@@ -480,24 +480,24 @@
</span><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-NativeExecutable* VM::getHostFunction(NativeFunction function, NativeFunction constructor)
</del><ins>+NativeExecutable* VM::getHostFunction(NativeFunction function, NativeFunction constructor, const String&amp; name)
</ins><span class="cx"> {
</span><del>-    return jitStubs-&gt;hostFunctionStub(this, function, constructor);
</del><ins>+    return jitStubs-&gt;hostFunctionStub(this, function, constructor, name);
</ins><span class="cx"> }
</span><del>-NativeExecutable* VM::getHostFunction(NativeFunction function, Intrinsic intrinsic)
</del><ins>+NativeExecutable* VM::getHostFunction(NativeFunction function, Intrinsic intrinsic, const String&amp; name)
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(canUseJIT());
</span><del>-    return jitStubs-&gt;hostFunctionStub(this, function, intrinsic != NoIntrinsic ? thunkGeneratorForIntrinsic(intrinsic) : 0, intrinsic);
</del><ins>+    return jitStubs-&gt;hostFunctionStub(this, function, intrinsic != NoIntrinsic ? thunkGeneratorForIntrinsic(intrinsic) : 0, intrinsic, name);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #else // !ENABLE(JIT)
</span><span class="cx"> 
</span><del>-NativeExecutable* VM::getHostFunction(NativeFunction function, NativeFunction constructor)
</del><ins>+NativeExecutable* VM::getHostFunction(NativeFunction function, NativeFunction constructor, const String&amp; name)
</ins><span class="cx"> {
</span><span class="cx">     return NativeExecutable::create(*this,
</span><span class="cx">         adoptRef(new NativeJITCode(MacroAssemblerCodeRef::createLLIntCodeRef(llint_native_call_trampoline), JITCode::HostCallThunk)), function,
</span><span class="cx">         adoptRef(new NativeJITCode(MacroAssemblerCodeRef::createLLIntCodeRef(llint_native_construct_trampoline), JITCode::HostCallThunk)), constructor,
</span><del>-        NoIntrinsic);
</del><ins>+        NoIntrinsic, name);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #endif // !ENABLE(JIT)
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeVMh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/VM.h (194999 => 195000)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/VM.h        2016-01-14 00:04:56 UTC (rev 194999)
+++ trunk/Source/JavaScriptCore/runtime/VM.h        2016-01-14 00:28:40 UTC (rev 195000)
</span><span class="lines">@@ -390,7 +390,7 @@
</span><span class="cx">     {
</span><span class="cx">         return jitStubs-&gt;ctiStub(this, generator);
</span><span class="cx">     }
</span><del>-    NativeExecutable* getHostFunction(NativeFunction, Intrinsic);
</del><ins>+    NativeExecutable* getHostFunction(NativeFunction, Intrinsic, const String&amp; name);
</ins><span class="cx">     
</span><span class="cx">     std::unique_ptr&lt;RegisterAtOffsetList&gt; allCalleeSaveRegisterOffsets;
</span><span class="cx">     
</span><span class="lines">@@ -401,7 +401,7 @@
</span><span class="cx"> #if ENABLE(FTL_JIT)
</span><span class="cx">     std::unique_ptr&lt;FTL::Thunks&gt; ftlThunks;
</span><span class="cx"> #endif
</span><del>-    NativeExecutable* getHostFunction(NativeFunction, NativeFunction constructor);
</del><ins>+    NativeExecutable* getHostFunction(NativeFunction, NativeFunction constructor, const String&amp; name);
</ins><span class="cx"> 
</span><span class="cx">     static ptrdiff_t exceptionOffset()
</span><span class="cx">     {
</span></span></pre>
</div>
</div>

</body>
</html>