<!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>[164835] 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/164835">164835</a></dd>
<dt>Author</dt> <dd>oliver@apple.com</dd>
<dt>Date</dt> <dd>2014-02-27 15:25:29 -0800 (Thu, 27 Feb 2014)</dd>
</dl>
<h3>Log Message</h3>
<pre>Slow cases for function.apply and function.call should not require vm re-entry
https://bugs.webkit.org/show_bug.cgi?id=129454
Reviewed by Geoffrey Garen.
Implement call and apply using builtins. Happily the use
of @call and @apply don't perform function equality checks
and just plant direct var_args calls. This did expose a few
codegen issues, but they're all covered by existing tests
once call and apply are implemented in JS.
* JavaScriptCore.xcodeproj/project.pbxproj:
* builtins/Function.prototype.js: Added.
(call):
(apply):
* bytecompiler/NodesCodegen.cpp:
(JSC::CallFunctionCallDotNode::emitBytecode):
(JSC::ApplyFunctionCallDotNode::emitBytecode):
* dfg/DFGCapabilities.cpp:
(JSC::DFG::capabilityLevel):
* interpreter/Interpreter.cpp:
(JSC::sizeFrameForVarargs):
(JSC::loadVarargs):
* interpreter/Interpreter.h:
* jit/JITCall.cpp:
(JSC::JIT::compileLoadVarargs):
* parser/ASTBuilder.h:
(JSC::ASTBuilder::makeFunctionCallNode):
* parser/Lexer.cpp:
(JSC::isSafeBuiltinIdentifier):
* runtime/CommonIdentifiers.h:
* runtime/FunctionPrototype.cpp:
(JSC::FunctionPrototype::addFunctionProperties):
* runtime/JSObject.cpp:
(JSC::JSObject::putDirectBuiltinFunction):
(JSC::JSObject::putDirectBuiltinFunctionWithoutTransition):
* runtime/JSObject.h:</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceJavaScriptCoreChangeLog">trunk/Source/JavaScriptCore/ChangeLog</a></li>
<li><a href="#trunkSourceJavaScriptCoreJavaScriptCorexcodeprojprojectpbxproj">trunk/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkSourceJavaScriptCorebytecompilerNodesCodegencpp">trunk/Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoredfgDFGCapabilitiescpp">trunk/Source/JavaScriptCore/dfg/DFGCapabilities.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreinterpreterInterpretercpp">trunk/Source/JavaScriptCore/interpreter/Interpreter.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreinterpreterInterpreterh">trunk/Source/JavaScriptCore/interpreter/Interpreter.h</a></li>
<li><a href="#trunkSourceJavaScriptCorejitJITCallcpp">trunk/Source/JavaScriptCore/jit/JITCall.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreparserASTBuilderh">trunk/Source/JavaScriptCore/parser/ASTBuilder.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreparserLexercpp">trunk/Source/JavaScriptCore/parser/Lexer.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeCommonIdentifiersh">trunk/Source/JavaScriptCore/runtime/CommonIdentifiers.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeFunctionPrototypecpp">trunk/Source/JavaScriptCore/runtime/FunctionPrototype.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeJSObjectcpp">trunk/Source/JavaScriptCore/runtime/JSObject.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeJSObjecth">trunk/Source/JavaScriptCore/runtime/JSObject.h</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a href="#trunkSourceJavaScriptCorebuiltinsFunctionprototypejs">trunk/Source/JavaScriptCore/builtins/Function.prototype.js</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceJavaScriptCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/ChangeLog (164834 => 164835)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/ChangeLog        2014-02-27 23:24:05 UTC (rev 164834)
+++ trunk/Source/JavaScriptCore/ChangeLog        2014-02-27 23:25:29 UTC (rev 164835)
</span><span class="lines">@@ -1,3 +1,43 @@
</span><ins>+2014-02-27 Oliver Hunt <oliver@apple.com>
+
+ Slow cases for function.apply and function.call should not require vm re-entry
+ https://bugs.webkit.org/show_bug.cgi?id=129454
+
+ Reviewed by Geoffrey Garen.
+
+ Implement call and apply using builtins. Happily the use
+ of @call and @apply don't perform function equality checks
+ and just plant direct var_args calls. This did expose a few
+ codegen issues, but they're all covered by existing tests
+ once call and apply are implemented in JS.
+
+ * JavaScriptCore.xcodeproj/project.pbxproj:
+ * builtins/Function.prototype.js: Added.
+ (call):
+ (apply):
+ * bytecompiler/NodesCodegen.cpp:
+ (JSC::CallFunctionCallDotNode::emitBytecode):
+ (JSC::ApplyFunctionCallDotNode::emitBytecode):
+ * dfg/DFGCapabilities.cpp:
+ (JSC::DFG::capabilityLevel):
+ * interpreter/Interpreter.cpp:
+ (JSC::sizeFrameForVarargs):
+ (JSC::loadVarargs):
+ * interpreter/Interpreter.h:
+ * jit/JITCall.cpp:
+ (JSC::JIT::compileLoadVarargs):
+ * parser/ASTBuilder.h:
+ (JSC::ASTBuilder::makeFunctionCallNode):
+ * parser/Lexer.cpp:
+ (JSC::isSafeBuiltinIdentifier):
+ * runtime/CommonIdentifiers.h:
+ * runtime/FunctionPrototype.cpp:
+ (JSC::FunctionPrototype::addFunctionProperties):
+ * runtime/JSObject.cpp:
+ (JSC::JSObject::putDirectBuiltinFunction):
+ (JSC::JSObject::putDirectBuiltinFunctionWithoutTransition):
+ * runtime/JSObject.h:
+
</ins><span class="cx"> 2014-02-27 Joseph Pecoraro <pecoraro@apple.com>
</span><span class="cx">
</span><span class="cx"> Web Inspector: Better name for RemoteInspectorDebuggableConnection dispatch queue
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreJavaScriptCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj (164834 => 164835)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj        2014-02-27 23:24:05 UTC (rev 164834)
+++ trunk/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj        2014-02-27 23:25:29 UTC (rev 164835)
</span><span class="lines">@@ -2729,6 +2729,7 @@
</span><span class="cx">                 A7A8AF3117ADB5F3005AB174 /* Uint8ClampedArray.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Uint8ClampedArray.h; sourceTree = "<group>"; };
</span><span class="cx">                 A7A8AF3217ADB5F3005AB174 /* Uint16Array.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Uint16Array.h; sourceTree = "<group>"; };
</span><span class="cx">                 A7A8AF3317ADB5F3005AB174 /* Uint32Array.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Uint32Array.h; sourceTree = "<group>"; };
</span><ins>+                A7A979C418BE8D9E002C3733 /* Function.prototype.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = Function.prototype.js; sourceTree = "<group>"; };
</ins><span class="cx">                 A7B48DB50EE74CFC00DCBDB6 /* ExecutableAllocator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ExecutableAllocator.h; sourceTree = "<group>"; };
</span><span class="cx">                 A7B48DB60EE74CFC00DCBDB6 /* ExecutableAllocator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ExecutableAllocator.cpp; sourceTree = "<group>"; };
</span><span class="cx">                 A7B4ACAE1484C9CE00B38A36 /* JSExportMacros.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSExportMacros.h; sourceTree = "<group>"; };
</span><span class="lines">@@ -4833,6 +4834,7 @@
</span><span class="cx">                                 A7D801A21880D66E0026C39B /* BuiltinExecutables.h */,
</span><span class="cx">                                 A75EE9B018AAB7E200AAD043 /* BuiltinNames.h */,
</span><span class="cx">                                 7CFBAC1C18B535E500D00750 /* Promise.prototype.js */,
</span><ins>+                                A7A979C418BE8D9E002C3733 /* Function.prototype.js */,
</ins><span class="cx">                         );
</span><span class="cx">                         path = builtins;
</span><span class="cx">                         sourceTree = "<group>";
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorebuiltinsFunctionprototypejs"></a>
<div class="addfile"><h4>Added: trunk/Source/JavaScriptCore/builtins/Function.prototype.js (0 => 164835)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/builtins/Function.prototype.js         (rev 0)
+++ trunk/Source/JavaScriptCore/builtins/Function.prototype.js        2014-02-27 23:25:29 UTC (rev 164835)
</span><span class="lines">@@ -0,0 +1,34 @@
</span><ins>+/*
+ * Copyright (C) 2014 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.
+ */
+
+function call(thisArgument) {
+ "use strict";
+ return this.@call(...arguments);
+}
+
+function apply(thisValue, argumentValues) {
+ "use strict";
+ return this.@apply(thisValue, argumentValues);
+}
</ins></span></pre></div>
<a id="trunkSourceJavaScriptCorebytecompilerNodesCodegencpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp (164834 => 164835)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp        2014-02-27 23:24:05 UTC (rev 164834)
+++ trunk/Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp        2014-02-27 23:25:29 UTC (rev 164835)
</span><span class="lines">@@ -28,6 +28,7 @@
</span><span class="cx"> #include "Nodes.h"
</span><span class="cx"> #include "NodeConstructors.h"
</span><span class="cx">
</span><ins>+#include "BuiltinNames.h"
</ins><span class="cx"> #include "BytecodeGenerator.h"
</span><span class="cx"> #include "CallFrame.h"
</span><span class="cx"> #include "Debugger.h"
</span><span class="lines">@@ -549,7 +550,7 @@
</span><span class="cx"> RefPtr<RegisterID> function;
</span><span class="cx"> bool emitCallCheck = !generator.isBuiltinFunction();
</span><span class="cx"> if (emitCallCheck) {
</span><del>- function = generator.emitGetById(generator.tempDestination(dst), base.get(), generator.propertyNames().call);
</del><ins>+ function = generator.emitGetById(generator.tempDestination(dst), base.get(), generator.propertyNames().builtinNames().callPublicName());
</ins><span class="cx"> generator.emitJumpIfNotFunctionCall(function.get(), realCall.get());
</span><span class="cx"> }
</span><span class="cx"> RefPtr<RegisterID> returnValue = generator.finalDestination(dst);
</span><span class="lines">@@ -620,7 +621,7 @@
</span><span class="cx"> RefPtr<RegisterID> returnValue = generator.finalDestination(dst, function.get());
</span><span class="cx"> bool emitCallCheck = !generator.isBuiltinFunction();
</span><span class="cx"> if (emitCallCheck) {
</span><del>- function = generator.emitGetById(generator.tempDestination(dst), base.get(), generator.propertyNames().apply);
</del><ins>+ function = generator.emitGetById(generator.tempDestination(dst), base.get(), generator.propertyNames().builtinNames().applyPublicName());
</ins><span class="cx"> generator.emitJumpIfNotFunctionApply(function.get(), realCall.get());
</span><span class="cx"> }
</span><span class="cx"> if (mayBeCall) {
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoredfgDFGCapabilitiescpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/dfg/DFGCapabilities.cpp (164834 => 164835)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/dfg/DFGCapabilities.cpp        2014-02-27 23:24:05 UTC (rev 164834)
+++ trunk/Source/JavaScriptCore/dfg/DFGCapabilities.cpp        2014-02-27 23:25:29 UTC (rev 164835)
</span><span class="lines">@@ -211,7 +211,8 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> case op_call_varargs:
</span><del>- if (codeBlock->usesArguments() && pc[4].u.operand == codeBlock->argumentsRegister().offset())
</del><ins>+ if (codeBlock->usesArguments() && pc[4].u.operand == codeBlock->argumentsRegister().offset()
+ && !pc[6].u.operand)
</ins><span class="cx"> return CanInline;
</span><span class="cx"> // FIXME: We should handle this.
</span><span class="cx"> // https://bugs.webkit.org/show_bug.cgi?id=127626
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreinterpreterInterpretercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/interpreter/Interpreter.cpp (164834 => 164835)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/interpreter/Interpreter.cpp        2014-02-27 23:24:05 UTC (rev 164834)
+++ trunk/Source/JavaScriptCore/interpreter/Interpreter.cpp        2014-02-27 23:25:29 UTC (rev 164835)
</span><span class="lines">@@ -137,10 +137,14 @@
</span><span class="cx"> return interpreter->execute(eval, callFrame, thisValue, callerScopeChain);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-CallFrame* sizeFrameForVarargs(CallFrame* callFrame, JSStack* stack, JSValue arguments, int firstFreeRegister, int32_t firstVarArgOffset)
</del><ins>+CallFrame* sizeFrameForVarargs(CallFrame* callFrame, JSStack* stack, JSValue arguments, int firstFreeRegister, uint32_t firstVarArgOffset)
</ins><span class="cx"> {
</span><span class="cx"> if (!arguments) { // f.apply(x, arguments), with arguments unmodified.
</span><del>- unsigned argumentCountIncludingThis = callFrame->argumentCountIncludingThis() - firstVarArgOffset;
</del><ins>+ unsigned argumentCountIncludingThis = callFrame->argumentCountIncludingThis();
+ if (argumentCountIncludingThis > firstVarArgOffset)
+ argumentCountIncludingThis -= firstVarArgOffset;
+ else
+ argumentCountIncludingThis = 1;
</ins><span class="cx"> unsigned paddedCalleeFrameOffset = WTF::roundUpToMultipleOf(stackAlignmentRegisters(), -firstFreeRegister + argumentCountIncludingThis + JSStack::CallFrameHeaderSize + 1);
</span><span class="cx"> CallFrame* newCallFrame = CallFrame::create(callFrame->registers() - paddedCalleeFrameOffset);
</span><span class="cx"> if (argumentCountIncludingThis > Arguments::MaxArguments + 1 || !stack->ensureCapacityFor(newCallFrame->registers())) {
</span><span class="lines">@@ -168,7 +172,11 @@
</span><span class="cx">
</span><span class="cx"> if (asObject(arguments)->classInfo() == Arguments::info()) {
</span><span class="cx"> Arguments* argsObject = asArguments(arguments);
</span><del>- unsigned argCount = argsObject->length(callFrame) - firstVarArgOffset;
</del><ins>+ unsigned argCount = argsObject->length(callFrame);
+ if (argCount >= firstVarArgOffset)
+ argCount -= firstVarArgOffset;
+ else
+ argCount = 0;
</ins><span class="cx"> unsigned paddedCalleeFrameOffset = WTF::roundUpToMultipleOf(stackAlignmentRegisters(), -firstFreeRegister + CallFrame::offsetFor(argCount + 1));
</span><span class="cx"> CallFrame* newCallFrame = CallFrame::create(callFrame->registers() - paddedCalleeFrameOffset);
</span><span class="cx"> if (argCount > Arguments::MaxArguments || !stack->ensureCapacityFor(newCallFrame->registers())) {
</span><span class="lines">@@ -180,7 +188,11 @@
</span><span class="cx">
</span><span class="cx"> if (isJSArray(arguments)) {
</span><span class="cx"> JSArray* array = asArray(arguments);
</span><del>- unsigned argCount = array->length() - firstVarArgOffset;
</del><ins>+ unsigned argCount = array->length();
+ if (argCount >= firstVarArgOffset)
+ argCount -= firstVarArgOffset;
+ else
+ argCount = 0;
</ins><span class="cx"> unsigned paddedCalleeFrameOffset = WTF::roundUpToMultipleOf(stackAlignmentRegisters(), -firstFreeRegister + CallFrame::offsetFor(argCount + 1));
</span><span class="cx"> CallFrame* newCallFrame = CallFrame::create(callFrame->registers() - paddedCalleeFrameOffset);
</span><span class="cx"> if (argCount > Arguments::MaxArguments || !stack->ensureCapacityFor(newCallFrame->registers())) {
</span><span class="lines">@@ -191,7 +203,11 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> JSObject* argObject = asObject(arguments);
</span><del>- unsigned argCount = argObject->get(callFrame, callFrame->propertyNames().length).toUInt32(callFrame) - firstVarArgOffset;
</del><ins>+ unsigned argCount = argObject->get(callFrame, callFrame->propertyNames().length).toUInt32(callFrame);
+ if (argCount >= firstVarArgOffset)
+ argCount -= firstVarArgOffset;
+ else
+ argCount = 0;
</ins><span class="cx"> unsigned paddedCalleeFrameOffset = WTF::roundUpToMultipleOf(stackAlignmentRegisters(), -firstFreeRegister + CallFrame::offsetFor(argCount + 1));
</span><span class="cx"> CallFrame* newCallFrame = CallFrame::create(callFrame->registers() - paddedCalleeFrameOffset);
</span><span class="cx"> if (argCount > Arguments::MaxArguments || !stack->ensureCapacityFor(newCallFrame->registers())) {
</span><span class="lines">@@ -201,11 +217,14 @@
</span><span class="cx"> return newCallFrame;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void loadVarargs(CallFrame* callFrame, CallFrame* newCallFrame, JSValue thisValue, JSValue arguments, int32_t firstVarArgOffset)
</del><ins>+void loadVarargs(CallFrame* callFrame, CallFrame* newCallFrame, JSValue thisValue, JSValue arguments, uint32_t firstVarArgOffset)
</ins><span class="cx"> {
</span><span class="cx"> if (!arguments) { // f.apply(x, arguments), with arguments unmodified.
</span><del>- unsigned argumentCountIncludingThis = callFrame->argumentCountIncludingThis() - firstVarArgOffset;
-
</del><ins>+ unsigned argumentCountIncludingThis = callFrame->argumentCountIncludingThis();
+ if (argumentCountIncludingThis > firstVarArgOffset)
+ argumentCountIncludingThis -= firstVarArgOffset;
+ else
+ argumentCountIncludingThis = 1;
</ins><span class="cx"> newCallFrame->setArgumentCountIncludingThis(argumentCountIncludingThis);
</span><span class="cx"> newCallFrame->setThisValue(thisValue);
</span><span class="cx"> for (size_t i = firstVarArgOffset; i < callFrame->argumentCount(); ++i)
</span><span class="lines">@@ -221,25 +240,38 @@
</span><span class="cx">
</span><span class="cx"> if (asObject(arguments)->classInfo() == Arguments::info()) {
</span><span class="cx"> Arguments* argsObject = asArguments(arguments);
</span><del>- unsigned argCount = argsObject->length(callFrame) - firstVarArgOffset;
- newCallFrame->setArgumentCountIncludingThis(argCount + 1);
</del><ins>+ unsigned argCount = argsObject->length(callFrame);
+ if (argCount >= firstVarArgOffset) {
+ argCount -= firstVarArgOffset;
+ newCallFrame->setArgumentCountIncludingThis(argCount + 1);
+ argsObject->copyToArguments(callFrame, newCallFrame, argCount, firstVarArgOffset);
+ } else
+ newCallFrame->setArgumentCountIncludingThis(1);
</ins><span class="cx"> newCallFrame->setThisValue(thisValue);
</span><del>- argsObject->copyToArguments(callFrame, newCallFrame, argCount, firstVarArgOffset);
</del><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (isJSArray(arguments)) {
</span><span class="cx"> JSArray* array = asArray(arguments);
</span><del>- unsigned argCount = array->length() - firstVarArgOffset;
- newCallFrame->setArgumentCountIncludingThis(argCount + 1);
</del><ins>+ unsigned argCount = array->length();
+ if (argCount >= firstVarArgOffset) {
+ argCount -= firstVarArgOffset;
+ newCallFrame->setArgumentCountIncludingThis(argCount + 1);
+ array->copyToArguments(callFrame, newCallFrame, argCount, firstVarArgOffset);
+ } else
+ newCallFrame->setArgumentCountIncludingThis(1);
</ins><span class="cx"> newCallFrame->setThisValue(thisValue);
</span><del>- array->copyToArguments(callFrame, newCallFrame, argCount, firstVarArgOffset);
</del><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> JSObject* argObject = asObject(arguments);
</span><del>- unsigned argCount = argObject->get(callFrame, callFrame->propertyNames().length).toUInt32(callFrame) - firstVarArgOffset;
- newCallFrame->setArgumentCountIncludingThis(argCount + 1);
</del><ins>+ unsigned argCount = argObject->get(callFrame, callFrame->propertyNames().length).toUInt32(callFrame);
+ if (argCount >= firstVarArgOffset) {
+ argCount -= firstVarArgOffset;
+ newCallFrame->setArgumentCountIncludingThis(argCount + 1);
+ } else
+ newCallFrame->setArgumentCountIncludingThis(1);
+
</ins><span class="cx"> newCallFrame->setThisValue(thisValue);
</span><span class="cx"> for (size_t i = 0; i < argCount; ++i) {
</span><span class="cx"> newCallFrame->setArgument(i, asObject(arguments)->get(callFrame, i + firstVarArgOffset));
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreinterpreterInterpreterh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/interpreter/Interpreter.h (164834 => 164835)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/interpreter/Interpreter.h        2014-02-27 23:24:05 UTC (rev 164834)
+++ trunk/Source/JavaScriptCore/interpreter/Interpreter.h        2014-02-27 23:25:29 UTC (rev 164835)
</span><span class="lines">@@ -285,8 +285,8 @@
</span><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> JSValue eval(CallFrame*);
</span><del>- CallFrame* sizeFrameForVarargs(CallFrame*, JSStack*, JSValue, int, int32_t firstVarArgOffset);
- void loadVarargs(CallFrame*, CallFrame*, JSValue, JSValue, int32_t firstVarArgOffset);
</del><ins>+ CallFrame* sizeFrameForVarargs(CallFrame*, JSStack*, JSValue, int, uint32_t firstVarArgOffset);
+ void loadVarargs(CallFrame*, CallFrame*, JSValue, JSValue, uint32_t firstVarArgOffset);
</ins><span class="cx"> } // namespace JSC
</span><span class="cx">
</span><span class="cx"> #endif // Interpreter_h
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorejitJITCallcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/jit/JITCall.cpp (164834 => 164835)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/jit/JITCall.cpp        2014-02-27 23:24:05 UTC (rev 164834)
+++ trunk/Source/JavaScriptCore/jit/JITCall.cpp        2014-02-27 23:25:29 UTC (rev 164835)
</span><span class="lines">@@ -71,8 +71,14 @@
</span><span class="cx"> slowCase.append(branch64(NotEqual, regT0, TrustedImm64(JSValue::encode(JSValue()))));
</span><span class="cx">
</span><span class="cx"> emitGetFromCallFrameHeader32(JSStack::ArgumentCount, regT0);
</span><del>- if (firstVarArgOffset)
</del><ins>+ if (firstVarArgOffset) {
+ Jump sufficientArguments = branch32(GreaterThan, regT0, TrustedImm32(firstVarArgOffset + 1));
+ move(TrustedImm32(1), regT0);
+ Jump endVarArgs = jump();
+ sufficientArguments.link(this);
</ins><span class="cx"> sub32(TrustedImm32(firstVarArgOffset), regT0);
</span><ins>+ endVarArgs.link(this);
+ }
</ins><span class="cx"> slowCase.append(branch32(Above, regT0, TrustedImm32(Arguments::MaxArguments + 1)));
</span><span class="cx"> // regT0: argumentCountIncludingThis
</span><span class="cx"> move(regT0, regT1);
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreparserASTBuilderh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/parser/ASTBuilder.h (164834 => 164835)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/parser/ASTBuilder.h        2014-02-27 23:24:05 UTC (rev 164834)
+++ trunk/Source/JavaScriptCore/parser/ASTBuilder.h        2014-02-27 23:25:29 UTC (rev 164835)
</span><span class="lines">@@ -26,6 +26,7 @@
</span><span class="cx"> #ifndef ASTBuilder_h
</span><span class="cx"> #define ASTBuilder_h
</span><span class="cx">
</span><ins>+#include "BuiltinNames.h"
</ins><span class="cx"> #include "NodeConstructors.h"
</span><span class="cx"> #include "SyntaxChecker.h"
</span><span class="cx"> #include <utility>
</span><span class="lines">@@ -888,9 +889,9 @@
</span><span class="cx"> ASSERT(func->isDotAccessorNode());
</span><span class="cx"> DotAccessorNode* dot = static_cast<DotAccessorNode*>(func);
</span><span class="cx"> FunctionCallDotNode* node;
</span><del>- if (dot->identifier() == m_vm->propertyNames->call || dot->identifier() == m_vm->propertyNames->callPrivateName)
</del><ins>+ if (dot->identifier() == m_vm->propertyNames->builtinNames().callPublicName() || dot->identifier() == m_vm->propertyNames->builtinNames().callPrivateName())
</ins><span class="cx"> node = new (m_vm) CallFunctionCallDotNode(location, dot->base(), dot->identifier(), args, divot, divotStart, divotEnd);
</span><del>- else if (dot->identifier() == m_vm->propertyNames->apply || dot->identifier() == m_vm->propertyNames->applyPrivateName)
</del><ins>+ else if (dot->identifier() == m_vm->propertyNames->builtinNames().applyPublicName() || dot->identifier() == m_vm->propertyNames->builtinNames().applyPrivateName())
</ins><span class="cx"> node = new (m_vm) ApplyFunctionCallDotNode(location, dot->base(), dot->identifier(), args, divot, divotStart, divotEnd);
</span><span class="cx"> else
</span><span class="cx"> node = new (m_vm) FunctionCallDotNode(location, dot->base(), dot->identifier(), args, divot, divotStart, divotEnd);
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreparserLexercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/parser/Lexer.cpp (164834 => 164835)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/parser/Lexer.cpp        2014-02-27 23:24:05 UTC (rev 164834)
+++ trunk/Source/JavaScriptCore/parser/Lexer.cpp        2014-02-27 23:25:29 UTC (rev 164835)
</span><span class="lines">@@ -27,6 +27,7 @@
</span><span class="cx">
</span><span class="cx"> #include "JSFunctionInlines.h"
</span><span class="cx">
</span><ins>+#include "BuiltinNames.h"
</ins><span class="cx"> #include "JSGlobalObjectFunctions.h"
</span><span class="cx"> #include "Identifier.h"
</span><span class="cx"> #include "NodeInfo.h"
</span><span class="lines">@@ -765,9 +766,9 @@
</span><span class="cx"> /* Just block any use of suspicious identifiers. This is intended to
</span><span class="cx"> * be used as a safety net while implementing builtins.
</span><span class="cx"> */
</span><del>- if (*ident == vm.propertyNames->call)
</del><ins>+ if (*ident == vm.propertyNames->builtinNames().callPublicName())
</ins><span class="cx"> return false;
</span><del>- if (*ident == vm.propertyNames->apply)
</del><ins>+ if (*ident == vm.propertyNames->builtinNames().applyPublicName())
</ins><span class="cx"> return false;
</span><span class="cx"> if (*ident == vm.propertyNames->eval)
</span><span class="cx"> return false;
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeCommonIdentifiersh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/CommonIdentifiers.h (164834 => 164835)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/CommonIdentifiers.h        2014-02-27 23:24:05 UTC (rev 164834)
+++ trunk/Source/JavaScriptCore/runtime/CommonIdentifiers.h        2014-02-27 23:25:29 UTC (rev 164835)
</span><span class="lines">@@ -63,7 +63,6 @@
</span><span class="cx"> macro(__lookupSetter__) \
</span><span class="cx"> macro(add) \
</span><span class="cx"> macro(anonymous) \
</span><del>- macro(apply) \
</del><span class="cx"> macro(arguments) \
</span><span class="cx"> macro(bind) \
</span><span class="cx"> macro(buffer) \
</span><span class="lines">@@ -73,7 +72,6 @@
</span><span class="cx"> macro(bytecodeIndex) \
</span><span class="cx"> macro(bytecodes) \
</span><span class="cx"> macro(bytecodesID) \
</span><del>- macro(call) \
</del><span class="cx"> macro(callee) \
</span><span class="cx"> macro(caller) \
</span><span class="cx"> macro(cast) \
</span><span class="lines">@@ -207,8 +205,6 @@
</span><span class="cx"> macro(yield)
</span><span class="cx">
</span><span class="cx"> #define JSC_COMMON_PRIVATE_IDENTIFIERS_EACH_PROPERTY_NAME(macro) \
</span><del>- macro(apply) \
- macro(call) \
</del><span class="cx"> macro(iterator) \
</span><span class="cx"> macro(iteratorNext) \
</span><span class="cx"> macro(resolve) \
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeFunctionPrototypecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/FunctionPrototype.cpp (164834 => 164835)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/FunctionPrototype.cpp        2014-02-27 23:24:05 UTC (rev 164834)
+++ trunk/Source/JavaScriptCore/runtime/FunctionPrototype.cpp        2014-02-27 23:25:29 UTC (rev 164835)
</span><span class="lines">@@ -22,6 +22,8 @@
</span><span class="cx"> #include "FunctionPrototype.h"
</span><span class="cx">
</span><span class="cx"> #include "Arguments.h"
</span><ins>+#include "BuiltinExecutables.h"
+#include "BuiltinNames.h"
</ins><span class="cx"> #include "JSArray.h"
</span><span class="cx"> #include "JSBoundFunction.h"
</span><span class="cx"> #include "JSFunction.h"
</span><span class="lines">@@ -38,8 +40,6 @@
</span><span class="cx"> const ClassInfo FunctionPrototype::s_info = { "Function", &Base::s_info, 0, 0, CREATE_METHOD_TABLE(FunctionPrototype) };
</span><span class="cx">
</span><span class="cx"> static EncodedJSValue JSC_HOST_CALL functionProtoFuncToString(ExecState*);
</span><del>-static EncodedJSValue JSC_HOST_CALL functionProtoFuncApply(ExecState*);
-static EncodedJSValue JSC_HOST_CALL functionProtoFuncCall(ExecState*);
</del><span class="cx"> static EncodedJSValue JSC_HOST_CALL functionProtoFuncBind(ExecState*);
</span><span class="cx">
</span><span class="cx"> FunctionPrototype::FunctionPrototype(VM& vm, Structure* structure)
</span><span class="lines">@@ -60,12 +60,9 @@
</span><span class="cx"> JSFunction* toStringFunction = JSFunction::create(vm, globalObject, 0, vm.propertyNames->toString.string(), functionProtoFuncToString);
</span><span class="cx"> putDirectWithoutTransition(vm, vm.propertyNames->toString, toStringFunction, DontEnum);
</span><span class="cx">
</span><del>- *applyFunction = JSFunction::create(vm, globalObject, 2, vm.propertyNames->apply.string(), functionProtoFuncApply);
- putDirectWithoutTransition(vm, vm.propertyNames->apply, *applyFunction, DontEnum);
</del><ins>+ *applyFunction = putDirectBuiltinFunctionWithoutTransition(vm, globalObject, vm.propertyNames->builtinNames().applyPublicName(), functionPrototypeApplyCodeGenerator(vm), DontEnum);
+ *callFunction = putDirectBuiltinFunctionWithoutTransition(vm, globalObject, vm.propertyNames->builtinNames().callPublicName(), functionPrototypeCallCodeGenerator(vm), DontEnum);
</ins><span class="cx">
</span><del>- *callFunction = JSFunction::create(vm, globalObject, 1, vm.propertyNames->call.string(), functionProtoFuncCall);
- putDirectWithoutTransition(vm, vm.propertyNames->call, *callFunction, DontEnum);
-
</del><span class="cx"> JSFunction* bindFunction = JSFunction::create(vm, globalObject, 1, vm.propertyNames->bind.string(), functionProtoFuncBind);
</span><span class="cx"> putDirectWithoutTransition(vm, vm.propertyNames->bind, bindFunction, DontEnum);
</span><span class="cx"> }
</span><span class="lines">@@ -124,55 +121,6 @@
</span><span class="cx"> return throwVMTypeError(exec);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-EncodedJSValue JSC_HOST_CALL functionProtoFuncApply(ExecState* exec)
-{
- JSValue thisValue = exec->hostThisValue();
- CallData callData;
- CallType callType = getCallData(thisValue, callData);
- if (callType == CallTypeNone)
- return throwVMTypeError(exec);
-
- JSValue array = exec->argument(1);
-
- MarkedArgumentBuffer applyArgs;
- if (!array.isUndefinedOrNull()) {
- if (!array.isObject())
- return throwVMTypeError(exec);
- if (asObject(array)->classInfo() == Arguments::info()) {
- if (asArguments(array)->length(exec) > Arguments::MaxArguments)
- return JSValue::encode(throwStackOverflowError(exec));
- asArguments(array)->fillArgList(exec, applyArgs);
- } else if (isJSArray(array)) {
- if (asArray(array)->length() > Arguments::MaxArguments)
- return JSValue::encode(throwStackOverflowError(exec));
- asArray(array)->fillArgList(exec, applyArgs);
- } else {
- unsigned length = asObject(array)->get(exec, exec->propertyNames().length).toUInt32(exec);
- if (length > Arguments::MaxArguments)
- return JSValue::encode(throwStackOverflowError(exec));
-
- for (unsigned i = 0; i < length; ++i)
- applyArgs.append(asObject(array)->get(exec, i));
- }
- }
-
- return JSValue::encode(call(exec, thisValue, callType, callData, exec->argument(0), applyArgs));
-}
-
-EncodedJSValue JSC_HOST_CALL functionProtoFuncCall(ExecState* exec)
-{
- JSValue thisValue = exec->hostThisValue();
- CallData callData;
- CallType callType = getCallData(thisValue, callData);
- if (callType == CallTypeNone)
- return throwVMTypeError(exec);
-
- ArgList args(exec);
- ArgList callArgs;
- args.getSlice(1, callArgs);
- return JSValue::encode(call(exec, thisValue, callType, callData, exec->argument(0), callArgs));
-}
-
</del><span class="cx"> // 15.3.4.5 Function.prototype.bind (thisArg [, arg1 [, arg2, ...]])
</span><span class="cx"> EncodedJSValue JSC_HOST_CALL functionProtoFuncBind(ExecState* exec)
</span><span class="cx"> {
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeJSObjectcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/JSObject.cpp (164834 => 164835)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/JSObject.cpp        2014-02-27 23:24:05 UTC (rev 164834)
+++ trunk/Source/JavaScriptCore/runtime/JSObject.cpp        2014-02-27 23:25:29 UTC (rev 164835)
</span><span class="lines">@@ -2245,7 +2245,7 @@
</span><span class="cx"> putDirect(vm, propertyName, function, attributes);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void JSObject::putDirectBuiltinFunction(VM& vm, JSGlobalObject* globalObject, const PropertyName& propertyName, FunctionExecutable* functionExecutable, unsigned attributes)
</del><ins>+JSFunction* JSObject::putDirectBuiltinFunction(VM& vm, JSGlobalObject* globalObject, const PropertyName& propertyName, FunctionExecutable* functionExecutable, unsigned attributes)
</ins><span class="cx"> {
</span><span class="cx"> StringImpl* name = propertyName.publicName();
</span><span class="cx"> if (!name)
</span><span class="lines">@@ -2253,8 +2253,20 @@
</span><span class="cx"> ASSERT(name);
</span><span class="cx"> JSFunction* function = JSFunction::createBuiltinFunction(vm, static_cast<FunctionExecutable*>(functionExecutable), globalObject);
</span><span class="cx"> putDirect(vm, propertyName, function, attributes);
</span><ins>+ return function;
</ins><span class="cx"> }
</span><span class="cx">
</span><ins>+JSFunction* JSObject::putDirectBuiltinFunctionWithoutTransition(VM& vm, JSGlobalObject* globalObject, const PropertyName& propertyName, FunctionExecutable* functionExecutable, unsigned attributes)
+{
+ StringImpl* name = propertyName.publicName();
+ if (!name)
+ name = vm.propertyNames->anonymous.impl();
+ ASSERT(name);
+ JSFunction* function = JSFunction::createBuiltinFunction(vm, static_cast<FunctionExecutable*>(functionExecutable), globalObject);
+ putDirectWithoutTransition(vm, propertyName, function, attributes);
+ return function;
+}
+
</ins><span class="cx"> void JSObject::putDirectNativeFunctionWithoutTransition(VM& vm, JSGlobalObject* globalObject, const PropertyName& propertyName, unsigned functionLength, NativeFunction nativeFunction, Intrinsic intrinsic, unsigned attributes)
</span><span class="cx"> {
</span><span class="cx"> StringImpl* name = propertyName.publicName();
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeJSObjecth"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/JSObject.h (164834 => 164835)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/JSObject.h        2014-02-27 23:24:05 UTC (rev 164834)
+++ trunk/Source/JavaScriptCore/runtime/JSObject.h        2014-02-27 23:25:29 UTC (rev 164835)
</span><span class="lines">@@ -67,6 +67,7 @@
</span><span class="cx"> class GetterSetter;
</span><span class="cx"> class HashEntry;
</span><span class="cx"> class InternalFunction;
</span><ins>+class JSFunction;
</ins><span class="cx"> class LLIntOffsetsExtractor;
</span><span class="cx"> class MarkedBlock;
</span><span class="cx"> class PropertyDescriptor;
</span><span class="lines">@@ -585,7 +586,8 @@
</span><span class="cx"> void putDirectUndefined(PropertyOffset offset) { locationForOffset(offset)->setUndefined(); }
</span><span class="cx">
</span><span class="cx"> JS_EXPORT_PRIVATE void putDirectNativeFunction(VM&, JSGlobalObject*, const PropertyName&, unsigned functionLength, NativeFunction, Intrinsic, unsigned attributes);
</span><del>- void putDirectBuiltinFunction(VM&, JSGlobalObject*, const PropertyName&, FunctionExecutable*, unsigned attributes);
</del><ins>+ JSFunction* putDirectBuiltinFunction(VM&, JSGlobalObject*, const PropertyName&, FunctionExecutable*, unsigned attributes);
+ JSFunction* putDirectBuiltinFunctionWithoutTransition(VM&, JSGlobalObject*, const PropertyName&, FunctionExecutable*, unsigned attributes);
</ins><span class="cx"> void putDirectNativeFunctionWithoutTransition(VM&, JSGlobalObject*, const PropertyName&, unsigned functionLength, NativeFunction, Intrinsic, unsigned attributes);
</span><span class="cx">
</span><span class="cx"> JS_EXPORT_PRIVATE static bool defineOwnProperty(JSObject*, ExecState*, PropertyName, const PropertyDescriptor&, bool shouldThrow);
</span></span></pre>
</div>
</div>
</body>
</html>