<!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>[163960] trunk</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/163960">163960</a></dd>
<dt>Author</dt> <dd>oliver@apple.com</dd>
<dt>Date</dt> <dd>2014-02-12 09:14:23 -0800 (Wed, 12 Feb 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>Make it possible to implement JS builtins in JS
https://bugs.webkit.org/show_bug.cgi?id=127887

Reviewed by Michael Saboff.

.:

* GNUmakefile.am:
* Source/cmake/gtest/CMakeLists.txt:

Source/JavaScriptCore:

This patch makes it possible to write builtin functions in JS.
The bindings, generators, and definitions are all created automatically
based on js files in the builtins/ directory.  This patch includes one
such case: Array.prototype.js with an implementation of every().

There's a lot of refactoring to make it possible for CommonIdentifiers
to include the output of the generated files (DerivedSources/JSCBuiltins.{h,cpp})
without breaking the offset extractor. The result of this refactoring
is that CommonIdentifiers, and a few other miscellaneous headers now
need to be included directly as they were formerly captured through other
paths.

In addition this adds a flag to the Lookup table's hashentry to indicate
that a static function is actually backed by JS. There is then a lot of
logic to thread the special nature of the functon to where it matters.
This allows toString(), .caller, etc to mimic the behaviour of a host
function.

Notes on writing builtins:
 - Each function is compiled independently of the others, and those
   implementations cannot currently capture all global properties (as
   that could be potentially unsafe). If a function does capture a
   global we will deliberately crash.
 - For those &quot;global&quot; properties that we do want access to, we use
   the @ prefix, e.g. Object(this) becomes @Object(this). The @ identifiers
   are private names, and behave just like regular properties, only
   without the risk of adulteration. Again, in the @Object case, we
   explicitly duplicate the ObjectConstructor reference on the GlobalObject
   so that we have guaranteed access to the original version of the
   constructor.
 - call, apply, eval, and Function are all rejected identifiers, again
   to prevent anything from accidentally using an adulterated object.
   Instead @call and @apply are available, and happily they completely
   drop the neq_ptr instruction as they're defined as always being the
   original call/apply functions.

These restrictions are just intended to make it harder to accidentally
make changes that are incorrect (for instance calling whatever has been
assigned to global.Object, instead of the original constructor function).
However, making a mistake like this should result in a purely semantic
error as fundamentally these functions are treated as though they were
regular JS code in the host global, and have no more privileges than
any other JS.

The initial proof of concept is Array.prototype.every, this shows a 65%
performance improvement, and that improvement is significantly hurt by
our poor optimisation of op_in.

As this is such a limited function, we have not yet exported all symbols
that we could possibly need, but as we implement more, the likelihood
of encountering missing features will reduce.

* API/JSCallbackObjectFunctions.h:
(JSC::JSCallbackObject&lt;Parent&gt;::getOwnPropertySlot):
(JSC::JSCallbackObject&lt;Parent&gt;::put):
(JSC::JSCallbackObject&lt;Parent&gt;::deleteProperty):
(JSC::JSCallbackObject&lt;Parent&gt;::getStaticValue):
(JSC::JSCallbackObject&lt;Parent&gt;::staticFunctionGetter):
(JSC::JSCallbackObject&lt;Parent&gt;::callbackGetter):
* CMakeLists.txt:
* DerivedSources.make:
* GNUmakefile.am:
* GNUmakefile.list.am:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
* JavaScriptCore.vcxproj/JavaScriptCoreCommon.props:
* JavaScriptCore.vcxproj/copy-files.cmd:
* JavaScriptCore.xcodeproj/project.pbxproj:
* builtins/Array.prototype.js:
(every):
* builtins/BuiltinExecutables.cpp: Added.
(JSC::BuiltinExecutables::BuiltinExecutables):
(JSC::BuiltinExecutables::createBuiltinExecutable):
* builtins/BuiltinExecutables.h:
(JSC::BuiltinExecutables::create):
* builtins/BuiltinNames.h: Added.
(JSC::BuiltinNames::BuiltinNames):
(JSC::BuiltinNames::getPrivateName):
(JSC::BuiltinNames::getPublicName):
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::CodeBlock):
* bytecode/UnlinkedCodeBlock.cpp:
(JSC::generateFunctionCodeBlock):
(JSC::UnlinkedFunctionExecutable::UnlinkedFunctionExecutable):
(JSC::UnlinkedFunctionExecutable::codeBlockFor):
(JSC::UnlinkedCodeBlock::UnlinkedCodeBlock):
* bytecode/UnlinkedCodeBlock.h:
(JSC::ExecutableInfo::ExecutableInfo):
(JSC::UnlinkedFunctionExecutable::create):
(JSC::UnlinkedFunctionExecutable::toStrictness):
(JSC::UnlinkedFunctionExecutable::isBuiltinFunction):
(JSC::UnlinkedCodeBlock::isBuiltinFunction):
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::BytecodeGenerator):
* bytecompiler/BytecodeGenerator.h:
(JSC::BytecodeGenerator::isBuiltinFunction):
(JSC::BytecodeGenerator::makeFunction):
* bytecompiler/NodesCodegen.cpp:
(JSC::CallFunctionCallDotNode::emitBytecode):
(JSC::ApplyFunctionCallDotNode::emitBytecode):
* create_hash_table:
* generate-js-builtins: Added.
(getCopyright):
(getFunctions):
(generateCode):
(mangleName):
(FunctionExecutable):
(Identifier):
(JSGlobalObject):
(SourceCode):
(UnlinkedFunctionExecutable):
(VM):
* interpreter/CachedCall.h:
(JSC::CachedCall::CachedCall):
* parser/ASTBuilder.h:
(JSC::ASTBuilder::makeFunctionCallNode):
* parser/Lexer.cpp:
(JSC::Lexer&lt;T&gt;::Lexer):
(JSC::isSafeBuiltinIdentifier):
(JSC::Lexer&lt;LChar&gt;::parseIdentifier):
(JSC::Lexer&lt;UChar&gt;::parseIdentifier):
(JSC::Lexer&lt;T&gt;::lex):
* parser/Lexer.h:
(JSC::isSafeIdentifier):
(JSC::Lexer&lt;T&gt;::lexExpectIdentifier):
* parser/Nodes.cpp:
(JSC::ProgramNode::setClosedVariables):
* parser/Nodes.h:
(JSC::ScopeNode::capturedVariables):
(JSC::ScopeNode::setClosedVariables):
(JSC::ProgramNode::closedVariables):
* parser/Parser.cpp:
(JSC::Parser&lt;LexerType&gt;::Parser):
(JSC::Parser&lt;LexerType&gt;::parseInner):
(JSC::Parser&lt;LexerType&gt;::didFinishParsing):
(JSC::Parser&lt;LexerType&gt;::printUnexpectedTokenText):
* parser/Parser.h:
(JSC::Scope::getUsedVariables):
(JSC::Parser::closedVariables):
(JSC::parse):
* parser/ParserModes.h:
* parser/ParserTokens.h:
* runtime/ArrayPrototype.cpp:
* runtime/CodeCache.cpp:
(JSC::CodeCache::getFunctionExecutableFromGlobalCode):
* runtime/CommonIdentifiers.cpp:
(JSC::CommonIdentifiers::CommonIdentifiers):
(JSC::CommonIdentifiers::~CommonIdentifiers):
(JSC::CommonIdentifiers::getPrivateName):
(JSC::CommonIdentifiers::getPublicName):
* runtime/CommonIdentifiers.h:
(JSC::CommonIdentifiers::builtinNames):
* runtime/ExceptionHelpers.cpp:
(JSC::createUndefinedVariableError):
* runtime/Executable.h:
(JSC::EvalExecutable::executableInfo):
(JSC::ProgramExecutable::executableInfo):
(JSC::FunctionExecutable::isBuiltinFunction):
* runtime/FunctionPrototype.cpp:
(JSC::functionProtoFuncToString):
* runtime/JSActivation.cpp:
(JSC::JSActivation::symbolTableGet):
(JSC::JSActivation::symbolTablePut):
(JSC::JSActivation::symbolTablePutWithAttributes):
* runtime/JSFunction.cpp:
(JSC::JSFunction::createBuiltinFunction):
(JSC::JSFunction::calculatedDisplayName):
(JSC::JSFunction::sourceCode):
(JSC::JSFunction::isHostOrBuiltinFunction):
(JSC::JSFunction::isBuiltinFunction):
(JSC::JSFunction::callerGetter):
(JSC::JSFunction::getOwnPropertySlot):
(JSC::JSFunction::getOwnNonIndexPropertyNames):
(JSC::JSFunction::put):
(JSC::JSFunction::defineOwnProperty):
* runtime/JSFunction.h:
* runtime/JSFunctionInlines.h:
(JSC::JSFunction::nativeFunction):
(JSC::JSFunction::nativeConstructor):
(JSC::isHostFunction):
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::reset):
(JSC::JSGlobalObject::visitChildren):
* runtime/JSGlobalObject.h:
(JSC::JSGlobalObject::objectConstructor):
(JSC::JSGlobalObject::symbolTableHasProperty):
* runtime/JSObject.cpp:
(JSC::getClassPropertyNames):
(JSC::JSObject::reifyStaticFunctionsForDelete):
(JSC::JSObject::putDirectBuiltinFunction):
* runtime/JSObject.h:
* runtime/JSSymbolTableObject.cpp:
(JSC::JSSymbolTableObject::getOwnNonIndexPropertyNames):
* runtime/JSSymbolTableObject.h:
(JSC::symbolTableGet):
(JSC::symbolTablePut):
(JSC::symbolTablePutWithAttributes):
* runtime/Lookup.cpp:
(JSC::setUpStaticFunctionSlot):
* runtime/Lookup.h:
(JSC::HashEntry::builtinGenerator):
(JSC::HashEntry::propertyGetter):
(JSC::HashEntry::propertyPutter):
(JSC::HashTable::entry):
(JSC::getStaticPropertySlot):
(JSC::getStaticValueSlot):
(JSC::putEntry):
* runtime/NativeErrorConstructor.cpp:
(JSC::NativeErrorConstructor::finishCreation):
* runtime/NativeErrorConstructor.h:
* runtime/PropertySlot.h:
* runtime/VM.cpp:
(JSC::VM::VM):
* runtime/VM.h:
(JSC::VM::builtinExecutables):

Tools:

CMake updates

* DumpRenderTree/CMakeLists.txt:
* WebKitTestRunner/CMakeLists.txt:
* WinCELauncher/CMakeLists.txt:

LayoutTests:

Updated the test results for new error messages (now that they're
actually helpful), and added a js-regress test to track performance.

* js/array-every-expected.txt:
* js/dom/array-prototype-properties-expected.txt:
* js/regress/array-prototype-every-expected.txt: Added.
* js/regress/array-prototype-every.html: Added.
* js/regress/script-tests/array-prototype-every.js: Added.
(test1):
(test2):
(test3):</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkChangeLog">trunk/ChangeLog</a></li>
<li><a href="#trunkGNUmakefileam">trunk/GNUmakefile.am</a></li>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsjsarrayeveryexpectedtxt">trunk/LayoutTests/js/array-every-expected.txt</a></li>
<li><a href="#trunkLayoutTestsjsdomarrayprototypepropertiesexpectedtxt">trunk/LayoutTests/js/dom/array-prototype-properties-expected.txt</a></li>
<li><a href="#trunkSourceJavaScriptCoreAPIJSCallbackObjectFunctionsh">trunk/Source/JavaScriptCore/API/JSCallbackObjectFunctions.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreCMakeListstxt">trunk/Source/JavaScriptCore/CMakeLists.txt</a></li>
<li><a href="#trunkSourceJavaScriptCoreChangeLog">trunk/Source/JavaScriptCore/ChangeLog</a></li>
<li><a href="#trunkSourceJavaScriptCoreDerivedSourcesmake">trunk/Source/JavaScriptCore/DerivedSources.make</a></li>
<li><a href="#trunkSourceJavaScriptCoreGNUmakefileam">trunk/Source/JavaScriptCore/GNUmakefile.am</a></li>
<li><a href="#trunkSourceJavaScriptCoreGNUmakefilelistam">trunk/Source/JavaScriptCore/GNUmakefile.list.am</a></li>
<li><a href="#trunkSourceJavaScriptCoreJavaScriptCorevcxprojJavaScriptCorevcxproj">trunk/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCore.vcxproj</a></li>
<li><a href="#trunkSourceJavaScriptCoreJavaScriptCorevcxprojJavaScriptCorevcxprojfilters">trunk/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters</a></li>
<li><a href="#trunkSourceJavaScriptCoreJavaScriptCorevcxprojJavaScriptCoreCommonprops">trunk/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCoreCommon.props</a></li>
<li><a href="#trunkSourceJavaScriptCoreJavaScriptCorevcxprojcopyfilescmd">trunk/Source/JavaScriptCore/JavaScriptCore.vcxproj/copy-files.cmd</a></li>
<li><a href="#trunkSourceJavaScriptCoreJavaScriptCorexcodeprojprojectpbxproj">trunk/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkSourceJavaScriptCorebytecodeCodeBlockcpp">trunk/Source/JavaScriptCore/bytecode/CodeBlock.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCorebytecodeUnlinkedCodeBlockcpp">trunk/Source/JavaScriptCore/bytecode/UnlinkedCodeBlock.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCorebytecodeUnlinkedCodeBlockh">trunk/Source/JavaScriptCore/bytecode/UnlinkedCodeBlock.h</a></li>
<li><a href="#trunkSourceJavaScriptCorebytecompilerBytecodeGeneratorcpp">trunk/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCorebytecompilerBytecodeGeneratorh">trunk/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.h</a></li>
<li><a href="#trunkSourceJavaScriptCorebytecompilerNodesCodegencpp">trunk/Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCorecreate_hash_table">trunk/Source/JavaScriptCore/create_hash_table</a></li>
<li><a href="#trunkSourceJavaScriptCoreinterpreterCachedCallh">trunk/Source/JavaScriptCore/interpreter/CachedCall.h</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="#trunkSourceJavaScriptCoreparserLexerh">trunk/Source/JavaScriptCore/parser/Lexer.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreparserNodescpp">trunk/Source/JavaScriptCore/parser/Nodes.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreparserNodesh">trunk/Source/JavaScriptCore/parser/Nodes.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreparserParsercpp">trunk/Source/JavaScriptCore/parser/Parser.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreparserParserh">trunk/Source/JavaScriptCore/parser/Parser.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreparserParserModesh">trunk/Source/JavaScriptCore/parser/ParserModes.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreparserParserTokensh">trunk/Source/JavaScriptCore/parser/ParserTokens.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeArrayPrototypecpp">trunk/Source/JavaScriptCore/runtime/ArrayPrototype.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeCodeCachecpp">trunk/Source/JavaScriptCore/runtime/CodeCache.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeCommonIdentifierscpp">trunk/Source/JavaScriptCore/runtime/CommonIdentifiers.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeCommonIdentifiersh">trunk/Source/JavaScriptCore/runtime/CommonIdentifiers.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeExceptionHelperscpp">trunk/Source/JavaScriptCore/runtime/ExceptionHelpers.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeExecutableh">trunk/Source/JavaScriptCore/runtime/Executable.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeFunctionPrototypecpp">trunk/Source/JavaScriptCore/runtime/FunctionPrototype.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeJSActivationcpp">trunk/Source/JavaScriptCore/runtime/JSActivation.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="#trunkSourceJavaScriptCoreruntimeJSFunctionInlinesh">trunk/Source/JavaScriptCore/runtime/JSFunctionInlines.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeJSGlobalObjectcpp">trunk/Source/JavaScriptCore/runtime/JSGlobalObject.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeJSGlobalObjecth">trunk/Source/JavaScriptCore/runtime/JSGlobalObject.h</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>
<li><a href="#trunkSourceJavaScriptCoreruntimeJSSymbolTableObjectcpp">trunk/Source/JavaScriptCore/runtime/JSSymbolTableObject.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeJSSymbolTableObjecth">trunk/Source/JavaScriptCore/runtime/JSSymbolTableObject.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeLookupcpp">trunk/Source/JavaScriptCore/runtime/Lookup.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeLookuph">trunk/Source/JavaScriptCore/runtime/Lookup.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeNativeErrorConstructorcpp">trunk/Source/JavaScriptCore/runtime/NativeErrorConstructor.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeNativeErrorConstructorh">trunk/Source/JavaScriptCore/runtime/NativeErrorConstructor.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimePropertySloth">trunk/Source/JavaScriptCore/runtime/PropertySlot.h</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>
<li><a href="#trunkSourcecmakegtestCMakeListstxt">trunk/Source/cmake/gtest/CMakeLists.txt</a></li>
<li><a href="#trunkToolsChangeLog">trunk/Tools/ChangeLog</a></li>
<li><a href="#trunkToolsDumpRenderTreeCMakeListstxt">trunk/Tools/DumpRenderTree/CMakeLists.txt</a></li>
<li><a href="#trunkToolsWebKitTestRunnerCMakeListstxt">trunk/Tools/WebKitTestRunner/CMakeLists.txt</a></li>
<li><a href="#trunkToolsWinCELauncherCMakeListstxt">trunk/Tools/WinCELauncher/CMakeLists.txt</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsjsregressarrayprototypeeveryexpectedtxt">trunk/LayoutTests/js/regress/array-prototype-every-expected.txt</a></li>
<li><a href="#trunkLayoutTestsjsregressarrayprototypeeveryhtml">trunk/LayoutTests/js/regress/array-prototype-every.html</a></li>
<li><a href="#trunkLayoutTestsjsregressscripttestsarrayprototypeeveryjs">trunk/LayoutTests/js/regress/script-tests/array-prototype-every.js</a></li>
<li><a href="#trunkSourceJavaScriptCorebuiltinsArrayprototypejs">trunk/Source/JavaScriptCore/builtins/Array.prototype.js</a></li>
<li><a href="#trunkSourceJavaScriptCorebuiltinsBuiltinExecutablescpp">trunk/Source/JavaScriptCore/builtins/BuiltinExecutables.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCorebuiltinsBuiltinExecutablesh">trunk/Source/JavaScriptCore/builtins/BuiltinExecutables.h</a></li>
<li><a href="#trunkSourceJavaScriptCorebuiltinsBuiltinNamesh">trunk/Source/JavaScriptCore/builtins/BuiltinNames.h</a></li>
<li><a href="#trunkSourceJavaScriptCoregeneratejsbuiltins">trunk/Source/JavaScriptCore/generate-js-builtins</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/ChangeLog (163959 => 163960)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/ChangeLog        2014-02-12 17:10:25 UTC (rev 163959)
+++ trunk/ChangeLog        2014-02-12 17:14:23 UTC (rev 163960)
</span><span class="lines">@@ -1,3 +1,13 @@
</span><ins>+2014-02-11  Oliver Hunt  &lt;oliver@apple.com&gt;
+
+        Make it possible to implement JS builtins in JS
+        https://bugs.webkit.org/show_bug.cgi?id=127887
+
+        Reviewed by Michael Saboff.
+
+        * GNUmakefile.am:
+        * Source/cmake/gtest/CMakeLists.txt:
+
</ins><span class="cx"> 2014-02-12  Ryan Lortie  &lt;desrt@desrt.ca&gt;
</span><span class="cx"> 
</span><span class="cx">         'ar T' is not portable and breaks the build on FreeBSD
</span></span></pre></div>
<a id="trunkGNUmakefileam"></a>
<div class="modfile"><h4>Modified: trunk/GNUmakefile.am (163959 => 163960)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/GNUmakefile.am        2014-02-12 17:10:25 UTC (rev 163959)
+++ trunk/GNUmakefile.am        2014-02-12 17:14:23 UTC (rev 163960)
</span><span class="lines">@@ -68,6 +68,7 @@
</span><span class="cx"> dom_binding_idls :=
</span><span class="cx"> wtf_sources :=
</span><span class="cx"> javascriptcore_h_api :=
</span><ins>+javascriptcore_builtins_js_nosources :=
</ins><span class="cx"> javascriptcore_cppflags:=
</span><span class="cx"> javascriptcore_cflags :=
</span><span class="cx"> javascriptcore_sources :=
</span></span></pre></div>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (163959 => 163960)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2014-02-12 17:10:25 UTC (rev 163959)
+++ trunk/LayoutTests/ChangeLog        2014-02-12 17:14:23 UTC (rev 163960)
</span><span class="lines">@@ -1,3 +1,22 @@
</span><ins>+2014-02-11  Oliver Hunt  &lt;oliver@apple.com&gt;
+
+        Make it possible to implement JS builtins in JS
+        https://bugs.webkit.org/show_bug.cgi?id=127887
+
+        Reviewed by Michael Saboff.
+
+        Updated the test results for new error messages (now that they're
+        actually helpful), and added a js-regress test to track performance.
+
+        * js/array-every-expected.txt:
+        * js/dom/array-prototype-properties-expected.txt:
+        * js/regress/array-prototype-every-expected.txt: Added.
+        * js/regress/array-prototype-every.html: Added.
+        * js/regress/script-tests/array-prototype-every.js: Added.
+        (test1):
+        (test2):
+        (test3):
+
</ins><span class="cx"> 2014-02-12  Raphael Kubo da Costa  &lt;raphael.kubo.da.costa@intel.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Update the HTML Media Capture implementation.
</span></span></pre></div>
<a id="trunkLayoutTestsjsarrayeveryexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/js/array-every-expected.txt (163959 => 163960)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/array-every-expected.txt        2014-02-12 17:10:25 UTC (rev 163959)
+++ trunk/LayoutTests/js/array-every-expected.txt        2014-02-12 17:14:23 UTC (rev 163960)
</span><span class="lines">@@ -30,12 +30,12 @@
</span><span class="cx"> PASS [12, 54, 18, 130, 44].every(isBigEnoughAndException) threw exception exception from function.
</span><span class="cx"> 
</span><span class="cx"> 5.0 Wrong Type for Callback Test
</span><del>-PASS [12, 5, 8, 130, 44].every(5) threw exception TypeError: Type error.
-PASS [12, 5, 8, 130, 44].every('wrong') threw exception TypeError: Type error.
-PASS [12, 5, 8, 130, 44].every(new Object()) threw exception TypeError: Type error.
-PASS [12, 5, 8, 130, 44].every(null) threw exception TypeError: Type error.
-PASS [12, 5, 8, 130, 44].every(undefined) threw exception TypeError: Type error.
-PASS [12, 5, 8, 130, 44].every() threw exception TypeError: Type error.
</del><ins>+PASS [12, 5, 8, 130, 44].every(5) threw exception TypeError: Array.prototype.every callback must be a function.
+PASS [12, 5, 8, 130, 44].every('wrong') threw exception TypeError: Array.prototype.every callback must be a function.
+PASS [12, 5, 8, 130, 44].every(new Object()) threw exception TypeError: Array.prototype.every callback must be a function.
+PASS [12, 5, 8, 130, 44].every(null) threw exception TypeError: Array.prototype.every callback must be a function.
+PASS [12, 5, 8, 130, 44].every(undefined) threw exception TypeError: Array.prototype.every callback must be a function.
+PASS [12, 5, 8, 130, 44].every() threw exception TypeError: Array.prototype.every callback must be a function.
</ins><span class="cx"> 
</span><span class="cx"> 6.0 Early Exit (&quot;Short Circuiting&quot;)
</span><span class="cx"> PASS [12, 5, 8, 130, 44].every(isBigEnoughShortCircuit) is false
</span></span></pre></div>
<a id="trunkLayoutTestsjsdomarrayprototypepropertiesexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/js/dom/array-prototype-properties-expected.txt (163959 => 163960)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/dom/array-prototype-properties-expected.txt        2014-02-12 17:10:25 UTC (rev 163959)
+++ trunk/LayoutTests/js/dom/array-prototype-properties-expected.txt        2014-02-12 17:14:23 UTC (rev 163960)
</span><span class="lines">@@ -15,7 +15,7 @@
</span><span class="cx"> PASS Array.prototype.sort.call(undefined) threw exception TypeError: undefined is not an object (evaluating 'Array.prototype.sort.call(undefined)').
</span><span class="cx"> PASS Array.prototype.splice.call(undefined, 0, 1) threw exception TypeError: undefined is not an object (evaluating 'Array.prototype.splice.call(undefined, 0, 1)').
</span><span class="cx"> PASS Array.prototype.unshift.call(undefined, {}) threw exception TypeError: undefined is not an object (evaluating 'Array.prototype.unshift.call(undefined, {})').
</span><del>-PASS Array.prototype.every.call(undefined, toString) threw exception TypeError: undefined is not an object (evaluating 'Array.prototype.every.call(undefined, toString)').
</del><ins>+PASS Array.prototype.every.call(undefined, toString) threw exception TypeError: Array.prototype.every requires that |this| not be undefined.
</ins><span class="cx"> PASS Array.prototype.forEach.call(undefined, toString) threw exception TypeError: undefined is not an object (evaluating 'Array.prototype.forEach.call(undefined, toString)').
</span><span class="cx"> PASS Array.prototype.some.call(undefined, toString) threw exception TypeError: undefined is not an object (evaluating 'Array.prototype.some.call(undefined, toString)').
</span><span class="cx"> PASS Array.prototype.indexOf.call(undefined, 0) threw exception TypeError: undefined is not an object (evaluating 'Array.prototype.indexOf.call(undefined, 0)').
</span></span></pre></div>
<a id="trunkLayoutTestsjsregressarrayprototypeeveryexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/js/regress/array-prototype-every-expected.txt (0 => 163960)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/regress/array-prototype-every-expected.txt                                (rev 0)
+++ trunk/LayoutTests/js/regress/array-prototype-every-expected.txt        2014-02-12 17:14:23 UTC (rev 163960)
</span><span class="lines">@@ -0,0 +1,10 @@
</span><ins>+JSRegress/array-prototype-every
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+PASS no exception thrown
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsjsregressarrayprototypeeveryhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/js/regress/array-prototype-every.html (0 => 163960)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/regress/array-prototype-every.html                                (rev 0)
+++ trunk/LayoutTests/js/regress/array-prototype-every.html        2014-02-12 17:14:23 UTC (rev 163960)
</span><span class="lines">@@ -0,0 +1,12 @@
</span><ins>+&lt;!DOCTYPE HTML PUBLIC &quot;-//IETF//DTD HTML//EN&quot;&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;script src=&quot;resources/regress-pre.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;script-tests/array-prototype-every.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;resources/regress-post.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsjsregressscripttestsarrayprototypeeveryjs"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/js/regress/script-tests/array-prototype-every.js (0 => 163960)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/regress/script-tests/array-prototype-every.js                                (rev 0)
+++ trunk/LayoutTests/js/regress/script-tests/array-prototype-every.js        2014-02-12 17:14:23 UTC (rev 163960)
</span><span class="lines">@@ -0,0 +1,29 @@
</span><ins>+var result = 0;
+function test1(a) {
+    result &lt;&lt; 1;
+    result++;
+    return true;
+}
+function test2(a,b) {
+    result ^= 3;
+    result *= 3;
+    return true;
+}
+function test3(a,b,c) {
+    result ^= result &gt;&gt; 1;
+    return true;
+}
+
+var result = 0;
+var array = []
+for (var i = 0; i &lt; 100000; ++i)
+    array[i] = 1;
+
+for (var i = 0; i &lt; 10; i++) {
+    array.every(test1);
+    array.every(test2);
+    array.every(test3);
+}
+
+if (result != 1428810496)
+    throw &quot;Error: bad result: &quot; + result;
</ins></span></pre></div>
<a id="trunkSourceJavaScriptCoreAPIJSCallbackObjectFunctionsh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/API/JSCallbackObjectFunctions.h (163959 => 163960)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/API/JSCallbackObjectFunctions.h        2014-02-12 17:10:25 UTC (rev 163959)
+++ trunk/Source/JavaScriptCore/API/JSCallbackObjectFunctions.h        2014-02-12 17:14:23 UTC (rev 163960)
</span><span class="lines">@@ -136,7 +136,7 @@
</span><span class="cx">     JSObjectRef thisRef = toRef(thisObject);
</span><span class="cx">     RefPtr&lt;OpaqueJSString&gt; propertyNameRef;
</span><span class="cx">     
</span><del>-    if (StringImpl* name = propertyName.publicName()) {
</del><ins>+    if (StringImpl* name = propertyName.uid()) {
</ins><span class="cx">         for (JSClassRef jsClass = thisObject-&gt;classRef(); jsClass; jsClass = jsClass-&gt;parentClass) {
</span><span class="cx">             // optional optimization to bypass getProperty in cases when we only need to know if the property exists
</span><span class="cx">             if (JSObjectHasPropertyCallback hasProperty = jsClass-&gt;hasProperty) {
</span><span class="lines">@@ -228,7 +228,7 @@
</span><span class="cx">     RefPtr&lt;OpaqueJSString&gt; propertyNameRef;
</span><span class="cx">     JSValueRef valueRef = toRef(exec, value);
</span><span class="cx">     
</span><del>-    if (StringImpl* name = propertyName.publicName()) {
</del><ins>+    if (StringImpl* name = propertyName.uid()) {
</ins><span class="cx">         for (JSClassRef jsClass = thisObject-&gt;classRef(); jsClass; jsClass = jsClass-&gt;parentClass) {
</span><span class="cx">             if (JSObjectSetPropertyCallback setProperty = jsClass-&gt;setProperty) {
</span><span class="cx">                 if (!propertyNameRef)
</span><span class="lines">@@ -343,7 +343,7 @@
</span><span class="cx">     JSObjectRef thisRef = toRef(thisObject);
</span><span class="cx">     RefPtr&lt;OpaqueJSString&gt; propertyNameRef;
</span><span class="cx">     
</span><del>-    if (StringImpl* name = propertyName.publicName()) {
</del><ins>+    if (StringImpl* name = propertyName.uid()) {
</ins><span class="cx">         for (JSClassRef jsClass = thisObject-&gt;classRef(); jsClass; jsClass = jsClass-&gt;parentClass) {
</span><span class="cx">             if (JSObjectDeletePropertyCallback deleteProperty = jsClass-&gt;deleteProperty) {
</span><span class="cx">                 if (!propertyNameRef)
</span><span class="lines">@@ -564,7 +564,7 @@
</span><span class="cx"> {
</span><span class="cx">     JSObjectRef thisRef = toRef(this);
</span><span class="cx">     
</span><del>-    if (StringImpl* name = propertyName.publicName()) {
</del><ins>+    if (StringImpl* name = propertyName.uid()) {
</ins><span class="cx">         for (JSClassRef jsClass = classRef(); jsClass; jsClass = jsClass-&gt;parentClass) {
</span><span class="cx">             if (OpaqueJSClassStaticValuesTable* staticValues = jsClass-&gt;staticValues(exec)) {
</span><span class="cx">                 if (StaticValueEntry* entry = staticValues-&gt;get(name)) {
</span><span class="lines">@@ -600,7 +600,7 @@
</span><span class="cx">     if (Parent::getOwnPropertySlot(thisObj, exec, propertyName, slot2))
</span><span class="cx">         return JSValue::encode(slot2.getValue(exec, propertyName));
</span><span class="cx"> 
</span><del>-    if (StringImpl* name = propertyName.publicName()) {
</del><ins>+    if (StringImpl* name = propertyName.uid()) {
</ins><span class="cx">         for (JSClassRef jsClass = thisObj-&gt;classRef(); jsClass; jsClass = jsClass-&gt;parentClass) {
</span><span class="cx">             if (OpaqueJSClassStaticFunctionsTable* staticFunctions = jsClass-&gt;staticFunctions(exec)) {
</span><span class="cx">                 if (StaticFunctionEntry* entry = staticFunctions-&gt;get(name)) {
</span><span class="lines">@@ -626,7 +626,7 @@
</span><span class="cx">     JSObjectRef thisRef = toRef(thisObj);
</span><span class="cx">     RefPtr&lt;OpaqueJSString&gt; propertyNameRef;
</span><span class="cx">     
</span><del>-    if (StringImpl* name = propertyName.publicName()) {
</del><ins>+    if (StringImpl* name = propertyName.uid()) {
</ins><span class="cx">         for (JSClassRef jsClass = thisObj-&gt;classRef(); jsClass; jsClass = jsClass-&gt;parentClass) {
</span><span class="cx">             if (JSObjectGetPropertyCallback getProperty = jsClass-&gt;getProperty) {
</span><span class="cx">                 if (!propertyNameRef)
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreCMakeListstxt"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/CMakeLists.txt (163959 => 163960)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/CMakeLists.txt        2014-02-12 17:10:25 UTC (rev 163959)
+++ trunk/Source/JavaScriptCore/CMakeLists.txt        2014-02-12 17:14:23 UTC (rev 163960)
</span><span class="lines">@@ -5,6 +5,7 @@
</span><span class="cx">     &quot;${JAVASCRIPTCORE_DIR}/ForwardingHeaders&quot;
</span><span class="cx">     &quot;${JAVASCRIPTCORE_DIR}/assembler&quot;
</span><span class="cx">     &quot;${JAVASCRIPTCORE_DIR}/bindings&quot;
</span><ins>+    &quot;${JAVASCRIPTCORE_DIR}/builtins&quot;
</ins><span class="cx">     &quot;${JAVASCRIPTCORE_DIR}/bytecode&quot;
</span><span class="cx">     &quot;${JAVASCRIPTCORE_DIR}/bytecompiler&quot;
</span><span class="cx">     &quot;${JAVASCRIPTCORE_DIR}/dfg&quot;
</span><span class="lines">@@ -52,6 +53,8 @@
</span><span class="cx">     bindings/ScriptObject.cpp
</span><span class="cx">     bindings/ScriptValue.cpp
</span><span class="cx"> 
</span><ins>+    builtins/BuiltinExecutables.cpp
+
</ins><span class="cx">     bytecode/ArrayAllocationProfile.cpp
</span><span class="cx">     bytecode/ArrayProfile.cpp
</span><span class="cx">     bytecode/BytecodeBasicBlock.cpp
</span><span class="lines">@@ -719,7 +722,7 @@
</span><span class="cx"> macro(GENERATE_HASH_LUT _input _output)
</span><span class="cx">     add_custom_command(
</span><span class="cx">         OUTPUT ${_output}
</span><del>-        DEPENDS ${HASH_LUT_GENERATOR} ${_input}
</del><ins>+        DEPENDS ${HASH_LUT_GENERATOR} ${_input} ${CMAKE_CURRENT_SOURCE_DIR}/generate-js-builtins
</ins><span class="cx">         COMMAND ${PERL_EXECUTABLE} ${HASH_LUT_GENERATOR} ${_input} -i &gt; ${_output}
</span><span class="cx">         VERBATIM)
</span><span class="cx">     list(APPEND JavaScriptCore_HEADERS ${_output})
</span><span class="lines">@@ -748,6 +751,7 @@
</span><span class="cx">     yarr
</span><span class="cx"> 
</span><span class="cx">     collector/handles
</span><ins>+    ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}
</ins><span class="cx"> )
</span><span class="cx"> 
</span><span class="cx"> set(JavaScriptCore_FORWARDING_HEADERS_FILES
</span><span class="lines">@@ -775,8 +779,11 @@
</span><span class="cx">     assembler/LinkBuffer.h
</span><span class="cx">     assembler/MacroAssembler.h
</span><span class="cx">     assembler/MacroAssemblerCodeRef.h
</span><ins>+    assembler/MacroAssemblerCodeRef.h
</ins><span class="cx">     jit/GPRInfo.h
</span><span class="cx">     runtime/VM.h
</span><ins>+
+    ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/JSCBuiltins.h
</ins><span class="cx"> )
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="lines">@@ -828,16 +835,27 @@
</span><span class="cx">     COMMAND ${PYTHON_EXECUTABLE} ${JavaScriptCore_INSPECTOR_SCRIPTS_DIR}/CodeGeneratorInspector.py ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/InspectorJS.json --output_h_dir &quot;${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}&quot; --output_cpp_dir &quot;${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}&quot; --output_js_dir &quot;${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}&quot; --output_type JavaScript --write_always &amp;&amp; mkdir -p ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/inspector &amp;&amp; cp ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/InspectorJSBackendDispatchers.h ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/InspectorJSFrontendDispatchers.h ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/InspectorJSTypeBuilders.h ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/inspector
</span><span class="cx">     VERBATIM)
</span><span class="cx"> 
</span><ins>+# JSCBuiltins
+file(GLOB JSCBuiltins_js_files &quot;${CMAKE_CURRENT_SOURCE_DIR}/builtins/*.js&quot;)
+add_custom_command(
+   OUTPUT ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/JSCBuiltins.cpp ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/JSCBuiltins.h
+   MAIN_DEPENDENCY ${CMAKE_CURRENT_SOURCE_DIR}/generate-js-builtins
+   DEPENDS ${JSCBuiltins_js_files}
+   COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/generate-js-builtins ${JSCBuiltins_js_files} ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/JSCBuiltins.h ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/JSCBuiltins.cpp
+   VERBATIM)
+
</ins><span class="cx"> list(APPEND JavaScriptCore_SOURCES
</span><span class="cx">     ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/InspectorJSBackendDispatchers.cpp
</span><span class="cx">     ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/InspectorJSFrontendDispatchers.cpp
</span><span class="cx">     ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/InspectorJSTypeBuilders.cpp
</span><ins>+    ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/JSCBuiltins.cpp
</ins><span class="cx"> )
</span><span class="cx"> 
</span><span class="cx"> list(APPEND JavaScriptCore_HEADERS
</span><span class="cx">     ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/InspectorJSBackendDispatchers.h
</span><span class="cx">     ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/InspectorJSFrontendDispatchers.h
</span><span class="cx">     ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/InspectorJSTypeBuilders.h
</span><ins>+    ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/JSCBuiltins.h
</ins><span class="cx"> )
</span><span class="cx"> 
</span><span class="cx"> add_custom_command(
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/ChangeLog (163959 => 163960)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/ChangeLog        2014-02-12 17:10:25 UTC (rev 163959)
+++ trunk/Source/JavaScriptCore/ChangeLog        2014-02-12 17:14:23 UTC (rev 163960)
</span><span class="lines">@@ -1,3 +1,227 @@
</span><ins>+2014-02-11  Oliver Hunt  &lt;oliver@apple.com&gt;
+
+        Make it possible to implement JS builtins in JS
+        https://bugs.webkit.org/show_bug.cgi?id=127887
+
+        Reviewed by Michael Saboff.
+
+        This patch makes it possible to write builtin functions in JS.
+        The bindings, generators, and definitions are all created automatically
+        based on js files in the builtins/ directory.  This patch includes one
+        such case: Array.prototype.js with an implementation of every().
+
+        There's a lot of refactoring to make it possible for CommonIdentifiers
+        to include the output of the generated files (DerivedSources/JSCBuiltins.{h,cpp})
+        without breaking the offset extractor. The result of this refactoring
+        is that CommonIdentifiers, and a few other miscellaneous headers now
+        need to be included directly as they were formerly captured through other
+        paths.
+
+        In addition this adds a flag to the Lookup table's hashentry to indicate
+        that a static function is actually backed by JS. There is then a lot of
+        logic to thread the special nature of the functon to where it matters.
+        This allows toString(), .caller, etc to mimic the behaviour of a host
+        function.
+
+        Notes on writing builtins:
+         - Each function is compiled independently of the others, and those
+           implementations cannot currently capture all global properties (as
+           that could be potentially unsafe). If a function does capture a
+           global we will deliberately crash.
+         - For those &quot;global&quot; properties that we do want access to, we use
+           the @ prefix, e.g. Object(this) becomes @Object(this). The @ identifiers
+           are private names, and behave just like regular properties, only
+           without the risk of adulteration. Again, in the @Object case, we
+           explicitly duplicate the ObjectConstructor reference on the GlobalObject
+           so that we have guaranteed access to the original version of the
+           constructor.
+         - call, apply, eval, and Function are all rejected identifiers, again
+           to prevent anything from accidentally using an adulterated object.
+           Instead @call and @apply are available, and happily they completely
+           drop the neq_ptr instruction as they're defined as always being the
+           original call/apply functions.
+
+        These restrictions are just intended to make it harder to accidentally
+        make changes that are incorrect (for instance calling whatever has been
+        assigned to global.Object, instead of the original constructor function).
+        However, making a mistake like this should result in a purely semantic
+        error as fundamentally these functions are treated as though they were
+        regular JS code in the host global, and have no more privileges than
+        any other JS.
+
+        The initial proof of concept is Array.prototype.every, this shows a 65%
+        performance improvement, and that improvement is significantly hurt by
+        our poor optimisation of op_in.
+
+        As this is such a limited function, we have not yet exported all symbols
+        that we could possibly need, but as we implement more, the likelihood
+        of encountering missing features will reduce.
+
+
+        * API/JSCallbackObjectFunctions.h:
+        (JSC::JSCallbackObject&lt;Parent&gt;::getOwnPropertySlot):
+        (JSC::JSCallbackObject&lt;Parent&gt;::put):
+        (JSC::JSCallbackObject&lt;Parent&gt;::deleteProperty):
+        (JSC::JSCallbackObject&lt;Parent&gt;::getStaticValue):
+        (JSC::JSCallbackObject&lt;Parent&gt;::staticFunctionGetter):
+        (JSC::JSCallbackObject&lt;Parent&gt;::callbackGetter):
+        * CMakeLists.txt:
+        * DerivedSources.make:
+        * GNUmakefile.am:
+        * GNUmakefile.list.am:
+        * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
+        * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
+        * JavaScriptCore.vcxproj/JavaScriptCoreCommon.props:
+        * JavaScriptCore.vcxproj/copy-files.cmd:
+        * JavaScriptCore.xcodeproj/project.pbxproj:
+        * builtins/Array.prototype.js:
+        (every):
+        * builtins/BuiltinExecutables.cpp: Added.
+        (JSC::BuiltinExecutables::BuiltinExecutables):
+        (JSC::BuiltinExecutables::createBuiltinExecutable):
+        * builtins/BuiltinExecutables.h:
+        (JSC::BuiltinExecutables::create):
+        * builtins/BuiltinNames.h: Added.
+        (JSC::BuiltinNames::BuiltinNames):
+        (JSC::BuiltinNames::getPrivateName):
+        (JSC::BuiltinNames::getPublicName):
+        * bytecode/CodeBlock.cpp:
+        (JSC::CodeBlock::CodeBlock):
+        * bytecode/UnlinkedCodeBlock.cpp:
+        (JSC::generateFunctionCodeBlock):
+        (JSC::UnlinkedFunctionExecutable::UnlinkedFunctionExecutable):
+        (JSC::UnlinkedFunctionExecutable::codeBlockFor):
+        (JSC::UnlinkedCodeBlock::UnlinkedCodeBlock):
+        * bytecode/UnlinkedCodeBlock.h:
+        (JSC::ExecutableInfo::ExecutableInfo):
+        (JSC::UnlinkedFunctionExecutable::create):
+        (JSC::UnlinkedFunctionExecutable::toStrictness):
+        (JSC::UnlinkedFunctionExecutable::isBuiltinFunction):
+        (JSC::UnlinkedCodeBlock::isBuiltinFunction):
+        * bytecompiler/BytecodeGenerator.cpp:
+        (JSC::BytecodeGenerator::BytecodeGenerator):
+        * bytecompiler/BytecodeGenerator.h:
+        (JSC::BytecodeGenerator::isBuiltinFunction):
+        (JSC::BytecodeGenerator::makeFunction):
+        * bytecompiler/NodesCodegen.cpp:
+        (JSC::CallFunctionCallDotNode::emitBytecode):
+        (JSC::ApplyFunctionCallDotNode::emitBytecode):
+        * create_hash_table:
+        * generate-js-builtins: Added.
+        (getCopyright):
+        (getFunctions):
+        (generateCode):
+        (mangleName):
+        (FunctionExecutable):
+        (Identifier):
+        (JSGlobalObject):
+        (SourceCode):
+        (UnlinkedFunctionExecutable):
+        (VM):
+        * interpreter/CachedCall.h:
+        (JSC::CachedCall::CachedCall):
+        * parser/ASTBuilder.h:
+        (JSC::ASTBuilder::makeFunctionCallNode):
+        * parser/Lexer.cpp:
+        (JSC::Lexer&lt;T&gt;::Lexer):
+        (JSC::isSafeBuiltinIdentifier):
+        (JSC::Lexer&lt;LChar&gt;::parseIdentifier):
+        (JSC::Lexer&lt;UChar&gt;::parseIdentifier):
+        (JSC::Lexer&lt;T&gt;::lex):
+        * parser/Lexer.h:
+        (JSC::isSafeIdentifier):
+        (JSC::Lexer&lt;T&gt;::lexExpectIdentifier):
+        * parser/Nodes.cpp:
+        (JSC::ProgramNode::setClosedVariables):
+        * parser/Nodes.h:
+        (JSC::ScopeNode::capturedVariables):
+        (JSC::ScopeNode::setClosedVariables):
+        (JSC::ProgramNode::closedVariables):
+        * parser/Parser.cpp:
+        (JSC::Parser&lt;LexerType&gt;::Parser):
+        (JSC::Parser&lt;LexerType&gt;::parseInner):
+        (JSC::Parser&lt;LexerType&gt;::didFinishParsing):
+        (JSC::Parser&lt;LexerType&gt;::printUnexpectedTokenText):
+        * parser/Parser.h:
+        (JSC::Scope::getUsedVariables):
+        (JSC::Parser::closedVariables):
+        (JSC::parse):
+        * parser/ParserModes.h:
+        * parser/ParserTokens.h:
+        * runtime/ArrayPrototype.cpp:
+        * runtime/CodeCache.cpp:
+        (JSC::CodeCache::getFunctionExecutableFromGlobalCode):
+        * runtime/CommonIdentifiers.cpp:
+        (JSC::CommonIdentifiers::CommonIdentifiers):
+        (JSC::CommonIdentifiers::~CommonIdentifiers):
+        (JSC::CommonIdentifiers::getPrivateName):
+        (JSC::CommonIdentifiers::getPublicName):
+        * runtime/CommonIdentifiers.h:
+        (JSC::CommonIdentifiers::builtinNames):
+        * runtime/ExceptionHelpers.cpp:
+        (JSC::createUndefinedVariableError):
+        * runtime/Executable.h:
+        (JSC::EvalExecutable::executableInfo):
+        (JSC::ProgramExecutable::executableInfo):
+        (JSC::FunctionExecutable::isBuiltinFunction):
+        * runtime/FunctionPrototype.cpp:
+        (JSC::functionProtoFuncToString):
+        * runtime/JSActivation.cpp:
+        (JSC::JSActivation::symbolTableGet):
+        (JSC::JSActivation::symbolTablePut):
+        (JSC::JSActivation::symbolTablePutWithAttributes):
+        * runtime/JSFunction.cpp:
+        (JSC::JSFunction::createBuiltinFunction):
+        (JSC::JSFunction::calculatedDisplayName):
+        (JSC::JSFunction::sourceCode):
+        (JSC::JSFunction::isHostOrBuiltinFunction):
+        (JSC::JSFunction::isBuiltinFunction):
+        (JSC::JSFunction::callerGetter):
+        (JSC::JSFunction::getOwnPropertySlot):
+        (JSC::JSFunction::getOwnNonIndexPropertyNames):
+        (JSC::JSFunction::put):
+        (JSC::JSFunction::defineOwnProperty):
+        * runtime/JSFunction.h:
+        * runtime/JSFunctionInlines.h:
+        (JSC::JSFunction::nativeFunction):
+        (JSC::JSFunction::nativeConstructor):
+        (JSC::isHostFunction):
+        * runtime/JSGlobalObject.cpp:
+        (JSC::JSGlobalObject::reset):
+        (JSC::JSGlobalObject::visitChildren):
+        * runtime/JSGlobalObject.h:
+        (JSC::JSGlobalObject::objectConstructor):
+        (JSC::JSGlobalObject::symbolTableHasProperty):
+        * runtime/JSObject.cpp:
+        (JSC::getClassPropertyNames):
+        (JSC::JSObject::reifyStaticFunctionsForDelete):
+        (JSC::JSObject::putDirectBuiltinFunction):
+        * runtime/JSObject.h:
+        * runtime/JSSymbolTableObject.cpp:
+        (JSC::JSSymbolTableObject::getOwnNonIndexPropertyNames):
+        * runtime/JSSymbolTableObject.h:
+        (JSC::symbolTableGet):
+        (JSC::symbolTablePut):
+        (JSC::symbolTablePutWithAttributes):
+        * runtime/Lookup.cpp:
+        (JSC::setUpStaticFunctionSlot):
+        * runtime/Lookup.h:
+        (JSC::HashEntry::builtinGenerator):
+        (JSC::HashEntry::propertyGetter):
+        (JSC::HashEntry::propertyPutter):
+        (JSC::HashTable::entry):
+        (JSC::getStaticPropertySlot):
+        (JSC::getStaticValueSlot):
+        (JSC::putEntry):
+        * runtime/NativeErrorConstructor.cpp:
+        (JSC::NativeErrorConstructor::finishCreation):
+        * runtime/NativeErrorConstructor.h:
+        * runtime/PropertySlot.h:
+        * runtime/VM.cpp:
+        (JSC::VM::VM):
+        * runtime/VM.h:
+        (JSC::VM::builtinExecutables):
+
</ins><span class="cx"> 2014-02-11  Brent Fulgham  &lt;bfulgham@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Remove some unintended copies in ranged for loops
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreDerivedSourcesmake"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/DerivedSources.make (163959 => 163960)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/DerivedSources.make        2014-02-12 17:10:25 UTC (rev 163959)
+++ trunk/Source/JavaScriptCore/DerivedSources.make        2014-02-12 17:14:23 UTC (rev 163960)
</span><span class="lines">@@ -28,8 +28,9 @@
</span><span class="cx">     $(JavaScriptCore) \
</span><span class="cx">     $(JavaScriptCore)/parser \
</span><span class="cx">     $(JavaScriptCore)/runtime \
</span><del>-    $(JavaScriptCore)/interpreter \
-    $(JavaScriptCore)/jit \
</del><ins>+        $(JavaScriptCore)/interpreter \
+        $(JavaScriptCore)/jit \
+        $(JavaScriptCore)/builtins \
</ins><span class="cx"> #
</span><span class="cx"> 
</span><span class="cx"> .PHONY : all
</span><span class="lines">@@ -57,8 +58,18 @@
</span><span class="cx">     RegExpObject.lut.h \
</span><span class="cx">     StringConstructor.lut.h \
</span><span class="cx">     udis86_itab.h \
</span><ins>+    JSCBuiltins \
</ins><span class="cx"> #
</span><span class="cx"> 
</span><ins>+# builtin functions
+.PHONY: JSCBuiltins
+
+JSCBuiltins: $(JavaScriptCore)/generate-js-builtins JSCBuiltins.h JSCBuiltins.cpp
+JSCBuiltins.h: $(JavaScriptCore)/generate-js-builtins $(JavaScriptCore)/builtins/*.js
+        python $^ $@
+                                                                                                                                                                 
+JSCBuiltins.cpp: JSCBuiltins.h
+
</ins><span class="cx"> # lookup tables for classes
</span><span class="cx"> 
</span><span class="cx"> %.lut.h: create_hash_table %.cpp
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreGNUmakefileam"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/GNUmakefile.am (163959 => 163960)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/GNUmakefile.am        2014-02-12 17:10:25 UTC (rev 163959)
+++ trunk/Source/JavaScriptCore/GNUmakefile.am        2014-02-12 17:14:23 UTC (rev 163960)
</span><span class="lines">@@ -51,6 +51,7 @@
</span><span class="cx">         -I$(srcdir)/Source/JavaScriptCore/ForwardingHeaders \
</span><span class="cx">         -I$(srcdir)/Source/JavaScriptCore/assembler \
</span><span class="cx">         -I$(srcdir)/Source/JavaScriptCore/bindings \
</span><ins>+        -I$(srcdir)/Source/JavaScriptCore/builtins \
</ins><span class="cx">         -I$(srcdir)/Source/JavaScriptCore/bytecode \
</span><span class="cx">         -I$(srcdir)/Source/JavaScriptCore/bytecompiler \
</span><span class="cx">         -I$(srcdir)/Source/JavaScriptCore/debugger \
</span><span class="lines">@@ -110,12 +111,16 @@
</span><span class="cx">         $(AM_V_GEN)$(RUBY) $(srcdir)/Source/JavaScriptCore/offlineasm/generate_offset_extractor.rb $(srcdir)/Source/JavaScriptCore/llint/LowLevelInterpreter.asm $@
</span><span class="cx">         $(AM_V_at)touch $@
</span><span class="cx"> 
</span><del>-$(Programs_LLIntOffsetsExtractor_OBJECTS): DerivedSources/JavaScriptCore/LLIntDesiredOffsets.h
</del><ins>+$(Programs_LLIntOffsetsExtractor_OBJECTS): DerivedSources/JavaScriptCore/LLIntDesiredOffsets.h 
</ins><span class="cx"> 
</span><span class="cx"> DerivedSources/JavaScriptCore/LLIntAssembly.h: Programs/LLIntOffsetsExtractor$(EXEEXT)
</span><span class="cx">         $(AM_V_GEN)$(RUBY) $(srcdir)/Source/JavaScriptCore/offlineasm/asm.rb $(srcdir)/Source/JavaScriptCore/llint/LowLevelInterpreter.asm Programs/LLIntOffsetsExtractor$(EXEEXT) $@
</span><span class="cx">         $(AM_V_at)touch $@
</span><span class="cx"> 
</span><ins>+DerivedSources/JavaScriptCore/JSCBuiltins.h: DerivedSources/JavaScriptCore/JSCBuiltins.cpp
+DerivedSources/JavaScriptCore/JSCBuiltins.cpp: $(srcdir)/Source/JavaScriptCore/generate-js-builtins $(javascriptcore_builtins_js_nosources)
+        $(AM_V_GEN)$(PYTHON) $^ $@
+
</ins><span class="cx"> $(libjavascriptcoregtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_OBJECTS): DerivedSources/JavaScriptCore/LLIntAssembly.h
</span><span class="cx"> 
</span><span class="cx"> jsc: $(javascriptcore_built_nosources) Programs/jsc$(EXEEXT)
</span><span class="lines">@@ -217,6 +222,7 @@
</span><span class="cx">         Source/JavaScriptCore/KeywordLookupGenerator.py \
</span><span class="cx">         Source/JavaScriptCore/parser/Keywords.table \
</span><span class="cx">         Source/JavaScriptCore/THANKS \
</span><ins>+        $(javascriptcore_builtins_js_nosources) \
</ins><span class="cx">         $(llint_nosources) \
</span><span class="cx">         $(offlineasm_nosources)
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreGNUmakefilelistam"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/GNUmakefile.list.am (163959 => 163960)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/GNUmakefile.list.am        2014-02-12 17:10:25 UTC (rev 163959)
+++ trunk/Source/JavaScriptCore/GNUmakefile.list.am        2014-02-12 17:14:23 UTC (rev 163960)
</span><span class="lines">@@ -20,6 +20,8 @@
</span><span class="cx">         DerivedSources/JavaScriptCore/ErrorPrototype.lut.h \
</span><span class="cx">         DerivedSources/JavaScriptCore/JSDataViewPrototype.lut.h \
</span><span class="cx">         DerivedSources/JavaScriptCore/JSGlobalObject.lut.h \
</span><ins>+        DerivedSources/JavaScriptCore/JSCBuiltins.cpp \
+        DerivedSources/JavaScriptCore/JSCBuiltins.h \
</ins><span class="cx">         DerivedSources/JavaScriptCore/JSONObject.lut.h \
</span><span class="cx">         DerivedSources/JavaScriptCore/JSPromiseConstructor.lut.h \
</span><span class="cx">         DerivedSources/JavaScriptCore/JSPromisePrototype.lut.h \
</span><span class="lines">@@ -35,6 +37,9 @@
</span><span class="cx">         DerivedSources/JavaScriptCore/LLIntDesiredOffsets.h \
</span><span class="cx">         DerivedSources/JavaScriptCore/LLIntAssembly.h
</span><span class="cx"> 
</span><ins>+javascriptcore_builtins_js_nosources += \
+        Source/JavaScriptCore/builtins/Array.prototype.js
+
</ins><span class="cx"> javascriptcore_sources += \
</span><span class="cx">         Source/JavaScriptCore/API/APICallbackFunction.h \
</span><span class="cx">         Source/JavaScriptCore/API/APICast.h \
</span><span class="lines">@@ -102,6 +107,8 @@
</span><span class="cx">     Source/JavaScriptCore/bindings/ScriptObject.h \
</span><span class="cx">     Source/JavaScriptCore/bindings/ScriptValue.cpp \
</span><span class="cx">     Source/JavaScriptCore/bindings/ScriptValue.h \
</span><ins>+    Source/JavaScriptCore/builtins/BuiltinExecutables.cpp \
+    Source/JavaScriptCore/builtins/BuiltinExecutables.h \
</ins><span class="cx">         Source/JavaScriptCore/bytecode/ArrayAllocationProfile.cpp \
</span><span class="cx">         Source/JavaScriptCore/bytecode/ArrayAllocationProfile.h \
</span><span class="cx">         Source/JavaScriptCore/bytecode/ArrayProfile.cpp \
</span><span class="lines">@@ -1271,7 +1278,9 @@
</span><span class="cx">         DerivedSources/JavaScriptCore/InspectorJSFrontendDispatchers.cpp \
</span><span class="cx">         DerivedSources/JavaScriptCore/InspectorJSFrontendDispatchers.h \
</span><span class="cx">         DerivedSources/JavaScriptCore/InspectorJSTypeBuilders.cpp \
</span><del>-        DerivedSources/JavaScriptCore/InspectorJSTypeBuilders.h
</del><ins>+        DerivedSources/JavaScriptCore/InspectorJSTypeBuilders.h \
+        DerivedSources/JavaScriptCore/JSCBuiltins.cpp \
+        DerivedSources/JavaScriptCore/JSCBuiltins.h
</ins><span class="cx"> 
</span><span class="cx"> llint_nosources += \
</span><span class="cx">         Source/JavaScriptCore/llint/LowLevelInterpreter32_64.asm \
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreJavaScriptCorevcxprojJavaScriptCorevcxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCore.vcxproj (163959 => 163960)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCore.vcxproj        2014-02-12 17:10:25 UTC (rev 163959)
+++ trunk/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCore.vcxproj        2014-02-12 17:14:23 UTC (rev 163960)
</span><span class="lines">@@ -309,6 +309,7 @@
</span><span class="cx">     &lt;ClCompile Include=&quot;..\bindings\ScriptFunctionCall.cpp&quot; /&gt;
</span><span class="cx">     &lt;ClCompile Include=&quot;..\bindings\ScriptObject.cpp&quot; /&gt;
</span><span class="cx">     &lt;ClCompile Include=&quot;..\bindings\ScriptValue.cpp&quot; /&gt;
</span><ins>+    &lt;ClInclude Include=&quot;..\builtins\BuiltinExecutables.cpp&quot; /&gt;
</ins><span class="cx">     &lt;ClCompile Include=&quot;..\bytecode\ArrayAllocationProfile.cpp&quot; /&gt;
</span><span class="cx">     &lt;ClCompile Include=&quot;..\bytecode\ArrayProfile.cpp&quot; /&gt;
</span><span class="cx">     &lt;ClCompile Include=&quot;..\bytecode\BytecodeBasicBlock.cpp&quot; /&gt;
</span><span class="lines">@@ -732,6 +733,7 @@
</span><span class="cx">     &lt;ClCompile Include=&quot;$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\InspectorJSBackendDispatchers.cpp&quot; /&gt;
</span><span class="cx">     &lt;ClCompile Include=&quot;$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\InspectorJSFrontendDispatchers.cpp&quot; /&gt;
</span><span class="cx">     &lt;ClCompile Include=&quot;$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\InspectorJSTypeBuilders.cpp&quot; /&gt;
</span><ins>+    &lt;ClCompile Include=&quot;$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSCBuiltins.cpp&quot; /&gt;
</ins><span class="cx">   &lt;/ItemGroup&gt;
</span><span class="cx">   &lt;ItemGroup&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\ArrayConstructor.lut.h&quot; /&gt;
</span><span class="lines">@@ -761,6 +763,7 @@
</span><span class="cx">     &lt;ClInclude Include=&quot;$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\RegExpObject.lut.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\RegExpPrototype.lut.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\StringConstructor.lut.h&quot; /&gt;
</span><ins>+    &lt;ClInclude Include=&quot;$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSCBuiltins.h&quot; /&gt;
</ins><span class="cx">   &lt;/ItemGroup&gt;
</span><span class="cx">   &lt;ItemGroup&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;..\API\APICallbackFunction.h&quot; /&gt;
</span><span class="lines">@@ -809,6 +812,7 @@
</span><span class="cx">     &lt;ClInclude Include=&quot;..\bindings\ScriptFunctionCall.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;..\bindings\ScriptObject.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;..\bindings\ScriptValue.h&quot; /&gt;
</span><ins>+    &lt;ClInclude Include=&quot;..\builtins\BuiltinExecutables.h&quot; /&gt;
</ins><span class="cx">     &lt;ClInclude Include=&quot;..\bytecode\ArrayAllocationProfile.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;..\bytecode\ArrayProfile.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;..\bytecode\ByValInfo.h&quot; /&gt;
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreJavaScriptCorevcxprojJavaScriptCorevcxprojfilters"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters (163959 => 163960)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters        2014-02-12 17:10:25 UTC (rev 163959)
+++ trunk/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters        2014-02-12 17:14:23 UTC (rev 163960)
</span><span class="lines">@@ -7,6 +7,9 @@
</span><span class="cx">     &lt;Filter Include=&quot;bindings&quot;&gt;
</span><span class="cx">       &lt;UniqueIdentifier&gt;{0bace123-4582-eebc-9314-7819b376c198}&lt;/UniqueIdentifier&gt;
</span><span class="cx">     &lt;/Filter&gt;
</span><ins>+    &lt;Filter Include=&quot;builtins&quot;&gt;
+      &lt;UniqueIdentifier&gt;{3b9d72a5-135b-43b3-a524-c6d2b9d29d35}&lt;/UniqueIdentifier&gt;
+    &lt;/Filter&gt;
</ins><span class="cx">     &lt;Filter Include=&quot;bytecode&quot;&gt;
</span><span class="cx">       &lt;UniqueIdentifier&gt;{766088a0-1216-4854-aa43-560c5e283668}&lt;/UniqueIdentifier&gt;
</span><span class="cx">     &lt;/Filter&gt;
</span><span class="lines">@@ -108,6 +111,9 @@
</span><span class="cx">     &lt;ClCompile Include=&quot;..\assembler\MacroAssembler.cpp&quot;&gt;
</span><span class="cx">       &lt;Filter&gt;assembler&lt;/Filter&gt;
</span><span class="cx">     &lt;/ClCompile&gt;
</span><ins>+    &lt;ClCompile Include=&quot;..\builtins\BuiltinExecutables.cpp&quot;&gt;
+      &lt;Filter&gt;builtins&lt;/Filter&gt;
+    &lt;/ClCompile&gt;
</ins><span class="cx">     &lt;ClCompile Include=&quot;..\bytecode\ArrayAllocationProfile.cpp&quot;&gt;
</span><span class="cx">       &lt;Filter&gt;bytecode&lt;/Filter&gt;
</span><span class="cx">     &lt;/ClCompile&gt;
</span><span class="lines">@@ -1329,6 +1335,9 @@
</span><span class="cx">     &lt;ClCompile Include=&quot;$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\InspectorJSTypeBuilders.cpp&quot;&gt;
</span><span class="cx">       &lt;Filter&gt;Derived Sources&lt;/Filter&gt;
</span><span class="cx">     &lt;/ClCompile&gt;
</span><ins>+    &lt;ClCompile Include=&quot;$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSCBuiltins.cpp&quot;&gt;
+      &lt;Filter&gt;Derived Sources&lt;/Filter&gt;
+    &lt;/ClCompile&gt;
</ins><span class="cx">   &lt;/ItemGroup&gt;
</span><span class="cx">   &lt;ItemGroup&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;..\API\APICallbackFunction.h&quot;&gt;
</span><span class="lines">@@ -1454,6 +1463,9 @@
</span><span class="cx">     &lt;ClInclude Include=&quot;..\assembler\X86Assembler.h&quot;&gt;
</span><span class="cx">       &lt;Filter&gt;assembler&lt;/Filter&gt;
</span><span class="cx">     &lt;/ClInclude&gt;
</span><ins>+    &lt;ClCompile Include=&quot;..\builtins\BuiltinExecutables.h&quot;&gt;
+      &lt;Filter&gt;builtins&lt;/Filter&gt;
+    &lt;/ClCompile&gt;
</ins><span class="cx">     &lt;ClInclude Include=&quot;..\bytecode\ArrayAllocationProfile.h&quot;&gt;
</span><span class="cx">       &lt;Filter&gt;bytecode&lt;/Filter&gt;
</span><span class="cx">     &lt;/ClInclude&gt;
</span><span class="lines">@@ -2556,6 +2568,9 @@
</span><span class="cx">     &lt;ClInclude Include=&quot;$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\ArrayPrototype.lut.h&quot;&gt;
</span><span class="cx">       &lt;Filter&gt;Derived Sources&lt;/Filter&gt;
</span><span class="cx">     &lt;/ClInclude&gt;
</span><ins>+    &lt;ClInclude Include=&quot;$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSCBuiltins.h&quot;&gt;
+      &lt;Filter&gt;Derived Sources&lt;/Filter&gt;
+    &lt;/ClInclude&gt;
</ins><span class="cx">     &lt;ClInclude Include=&quot;..\runtime\VM.h&quot;&gt;
</span><span class="cx">       &lt;Filter&gt;runtime&lt;/Filter&gt;
</span><span class="cx">     &lt;/ClInclude&gt;
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreJavaScriptCorevcxprojJavaScriptCoreCommonprops"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCoreCommon.props (163959 => 163960)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCoreCommon.props        2014-02-12 17:10:25 UTC (rev 163959)
+++ trunk/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCoreCommon.props        2014-02-12 17:14:23 UTC (rev 163960)
</span><span class="lines">@@ -5,7 +5,7 @@
</span><span class="cx">   &lt;PropertyGroup /&gt;
</span><span class="cx">   &lt;ItemDefinitionGroup&gt;
</span><span class="cx">     &lt;ClCompile&gt;
</span><del>-      &lt;AdditionalIncludeDirectories&gt;..\;..\tools\;..\runtime\;..\llint\;..\jit\;..\disassembler\;..\heap\;..\debugger\;..\assembler\;..\profiler\;..\yarr\;..\interpreter\;..\bytecode\;..\dfg\;..\bytecompiler\;..\parser\;..\API\;..\ftl\;..\bindings\;..\inspector\;$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\JavaScriptCore\DerivedSources\;$(ConfigurationBuildDir)\include\;$(ConfigurationBuildDir)\include\JavaScriptCore\;$(ConfigurationBuildDir)\include\private\;$(WebKit_Libraries)\include;$(WebKit_Libraries)\include\private;%(AdditionalIncludeDirectories)&lt;/AdditionalIncludeDirectories&gt;
</del><ins>+      &lt;AdditionalIncludeDirectories&gt;..\;..\tools\;..\runtime\;..\llint\;..\jit\;..\disassembler\;..\heap\;..\debugger\;..\assembler\;..\profiler\;..\yarr\;..\interpreter\;..\bytecode\;..\builtins\;..\dfg\;..\bytecompiler\;..\parser\;..\API\;..\ftl\;..\bindings\;..\inspector\;$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\JavaScriptCore\DerivedSources\;$(ConfigurationBuildDir)\include\;$(ConfigurationBuildDir)\include\JavaScriptCore\;$(ConfigurationBuildDir)\include\private\;$(WebKit_Libraries)\include;$(WebKit_Libraries)\include\private;%(AdditionalIncludeDirectories)&lt;/AdditionalIncludeDirectories&gt;
</ins><span class="cx">       &lt;ForcedIncludeFiles&gt;ICUVersion.h;%(ForcedIncludeFiles)&lt;/ForcedIncludeFiles&gt;
</span><span class="cx">     &lt;/ClCompile&gt;
</span><span class="cx">     &lt;Link&gt;
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreJavaScriptCorevcxprojcopyfilescmd"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/JavaScriptCore.vcxproj/copy-files.cmd (163959 => 163960)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/JavaScriptCore.vcxproj/copy-files.cmd        2014-02-12 17:10:25 UTC (rev 163959)
+++ trunk/Source/JavaScriptCore/JavaScriptCore.vcxproj/copy-files.cmd        2014-02-12 17:14:23 UTC (rev 163960)
</span><span class="lines">@@ -42,6 +42,7 @@
</span><span class="cx">     assembler
</span><span class="cx">     bindings
</span><span class="cx">     bytecode
</span><ins>+    builtins
</ins><span class="cx">     dfg
</span><span class="cx">     disassembler
</span><span class="cx">     heap
</span><span class="lines">@@ -72,6 +73,9 @@
</span><span class="cx"> xcopy /y &quot;%DerivedSourcesDirectory%\InspectorJSBackendDispatchers.h&quot; &quot;%PrivateHeadersDirectory%&quot; &gt;NUL
</span><span class="cx"> xcopy /y &quot;%DerivedSourcesDirectory%\InspectorJSFrontendDispatchers.h&quot; &quot;%PrivateHeadersDirectory%&quot; &gt;NUL
</span><span class="cx"> 
</span><ins>+echo Copying builtins header as if it were a private header...
+xcopy /y &quot;%DerivedSourcesDirectory%\JSCBuiltins.h&quot; &quot;%PrivateHeadersDirectory%&quot; &gt;NUL
+
</ins><span class="cx"> echo Copying resources...
</span><span class="cx"> mkdir &quot;%ResourcesDirectory%&quot; 2&gt;NUL
</span><span class="cx"> xcopy /y /d JavaScriptCore.resources\* &quot;%ResourcesDirectory%&quot; &gt;NUL
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreJavaScriptCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj (163959 => 163960)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj        2014-02-12 17:10:25 UTC (rev 163959)
+++ trunk/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj        2014-02-12 17:14:23 UTC (rev 163960)
</span><span class="lines">@@ -1101,6 +1101,7 @@
</span><span class="cx">                 A74DEF95182D991400522C22 /* JSMapIterator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A74DEF8F182D991400522C22 /* JSMapIterator.cpp */; };
</span><span class="cx">                 A74DEF96182D991400522C22 /* JSMapIterator.h in Headers */ = {isa = PBXBuildFile; fileRef = A74DEF90182D991400522C22 /* JSMapIterator.h */; };
</span><span class="cx">                 A75706DE118A2BCF0057F88F /* JITArithmetic32_64.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A75706DD118A2BCF0057F88F /* JITArithmetic32_64.cpp */; };
</span><ins>+                A75EE9B218AAB7E200AAD043 /* BuiltinNames.h in Headers */ = {isa = PBXBuildFile; fileRef = A75EE9B018AAB7E200AAD043 /* BuiltinNames.h */; };
</ins><span class="cx">                 A76140CD182982CB00750624 /* ArgumentsIteratorConstructor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A76140C7182982CB00750624 /* ArgumentsIteratorConstructor.cpp */; };
</span><span class="cx">                 A76140CE182982CB00750624 /* ArgumentsIteratorConstructor.h in Headers */ = {isa = PBXBuildFile; fileRef = A76140C8182982CB00750624 /* ArgumentsIteratorConstructor.h */; };
</span><span class="cx">                 A76140CF182982CB00750624 /* ArgumentsIteratorPrototype.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A76140C9182982CB00750624 /* ArgumentsIteratorPrototype.cpp */; };
</span><span class="lines">@@ -1187,6 +1188,10 @@
</span><span class="cx">                 A7CA3AE817DA41AE006538AF /* JSWeakMap.h in Headers */ = {isa = PBXBuildFile; fileRef = A7CA3AE217DA41AE006538AF /* JSWeakMap.h */; };
</span><span class="cx">                 A7CA3AEB17DA5168006538AF /* WeakMapData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A7CA3AE917DA5168006538AF /* WeakMapData.cpp */; };
</span><span class="cx">                 A7CA3AEC17DA5168006538AF /* WeakMapData.h in Headers */ = {isa = PBXBuildFile; fileRef = A7CA3AEA17DA5168006538AF /* WeakMapData.h */; };
</span><ins>+                A7D801A41880D66E0026C39B /* BuiltinExecutables.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A7D801A11880D66E0026C39B /* BuiltinExecutables.cpp */; };
+                A7D801A51880D66E0026C39B /* BuiltinExecutables.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D801A21880D66E0026C39B /* BuiltinExecutables.h */; settings = {ATTRIBUTES = (Private, ); }; };
+                A7D801A81880D6A80026C39B /* JSCBuiltins.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A7D801A61880D6A80026C39B /* JSCBuiltins.cpp */; };
+                A7D801A91880D6A80026C39B /* JSCBuiltins.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D801A71880D6A80026C39B /* JSCBuiltins.h */; };
</ins><span class="cx">                 A7D89CF217A0B8CC00773AD8 /* DFGBasicBlock.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A7D89CE317A0B8CC00773AD8 /* DFGBasicBlock.cpp */; };
</span><span class="cx">                 A7D89CF317A0B8CC00773AD8 /* DFGBlockInsertionSet.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A7D89CE417A0B8CC00773AD8 /* DFGBlockInsertionSet.cpp */; };
</span><span class="cx">                 A7D89CF417A0B8CC00773AD8 /* DFGBlockInsertionSet.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D89CE517A0B8CC00773AD8 /* DFGBlockInsertionSet.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="lines">@@ -2147,7 +2152,7 @@
</span><span class="cx">                 14D857740A4696C80032146C /* testapi.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; name = testapi.js; path = API/tests/testapi.js; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 14DA818E0D99FD2000B0A4FB /* JSActivation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSActivation.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 14DA818F0D99FD2000B0A4FB /* JSActivation.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSActivation.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><del>-                14DE0D680D02431400AACCA2 /* JSGlobalObject.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSGlobalObject.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</del><ins>+                14DE0D680D02431400AACCA2 /* JSGlobalObject.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; lineEnding = 0; path = JSGlobalObject.cpp; sourceTree = &quot;&lt;group&gt;&quot;; xcLanguageSpecificationIdentifier = xcode.lang.cpp; };
</ins><span class="cx">                 14DF04D916B3996D0016A513 /* StaticPropertyAnalysis.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StaticPropertyAnalysis.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 14E84F9914EE1ACC00D6D5D4 /* WeakBlock.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WeakBlock.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 14E84F9A14EE1ACC00D6D5D4 /* WeakBlock.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WeakBlock.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -2229,7 +2234,7 @@
</span><span class="cx">                 65FB5115184EE8F800C12B70 /* ProtoCallFrame.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ProtoCallFrame.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 65FB5116184EE9BC00C12B70 /* ProtoCallFrame.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ProtoCallFrame.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 704FD35305697E6D003DBED9 /* BooleanObject.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = BooleanObject.h; sourceTree = &quot;&lt;group&gt;&quot;; tabWidth = 8; };
</span><del>-                7C008CD0186F8A9300955C24 /* JSPromiseFunctions.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSPromiseFunctions.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</del><ins>+                7C008CD0186F8A9300955C24 /* JSPromiseFunctions.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; lineEnding = 0; path = JSPromiseFunctions.cpp; sourceTree = &quot;&lt;group&gt;&quot;; xcLanguageSpecificationIdentifier = xcode.lang.cpp; };
</ins><span class="cx">                 7C008CD1186F8A9300955C24 /* JSPromiseFunctions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSPromiseFunctions.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 7C008CD8187124BB00955C24 /* JSPromiseDeferred.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSPromiseDeferred.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 7C008CD9187124BB00955C24 /* JSPromiseDeferred.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSPromiseDeferred.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -2238,9 +2243,9 @@
</span><span class="cx">                 7C008CE5187631B600955C24 /* Microtask.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Microtask.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 7C184E1817BEDBD3007CB63A /* JSPromise.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSPromise.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 7C184E1917BEDBD3007CB63A /* JSPromise.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSPromise.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><del>-                7C184E1C17BEE22E007CB63A /* JSPromisePrototype.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSPromisePrototype.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</del><ins>+                7C184E1C17BEE22E007CB63A /* JSPromisePrototype.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; lineEnding = 0; path = JSPromisePrototype.cpp; sourceTree = &quot;&lt;group&gt;&quot;; xcLanguageSpecificationIdentifier = xcode.lang.cpp; };
</ins><span class="cx">                 7C184E1D17BEE22E007CB63A /* JSPromisePrototype.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSPromisePrototype.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><del>-                7C184E2017BEE240007CB63A /* JSPromiseConstructor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSPromiseConstructor.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</del><ins>+                7C184E2017BEE240007CB63A /* JSPromiseConstructor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; lineEnding = 0; path = JSPromiseConstructor.cpp; sourceTree = &quot;&lt;group&gt;&quot;; xcLanguageSpecificationIdentifier = xcode.lang.cpp; };
</ins><span class="cx">                 7C184E2117BEE240007CB63A /* JSPromiseConstructor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSPromiseConstructor.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 7C184E2417BFFA36007CB63A /* JSPromiseConstructor.lut.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = JSPromiseConstructor.lut.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 7C184E2517BFFA36007CB63A /* JSPromisePrototype.lut.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = JSPromisePrototype.lut.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -2541,6 +2546,7 @@
</span><span class="cx">                 A71236E41195F33C00BD2174 /* JITOpcodes32_64.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JITOpcodes32_64.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 A718F61A11754A21002465A7 /* RegExpJitTables.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RegExpJitTables.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 A718F8211178EB4B002465A7 /* create_regex_tables */ = {isa = PBXFileReference; explicitFileType = text.script.python; fileEncoding = 4; path = create_regex_tables; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><ins>+                A71DA80D1880D71F00D1F299 /* generate-js-builtins */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.python; path = &quot;generate-js-builtins&quot;; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx">                 A72028B41797601E0098028C /* JSCTestRunnerUtils.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSCTestRunnerUtils.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 A72028B51797601E0098028C /* JSCTestRunnerUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSCTestRunnerUtils.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 A72028B91797603D0098028C /* JSFunctionInlines.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSFunctionInlines.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -2580,9 +2586,10 @@
</span><span class="cx">                 A74DEF8F182D991400522C22 /* JSMapIterator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSMapIterator.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 A74DEF90182D991400522C22 /* JSMapIterator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSMapIterator.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 A75706DD118A2BCF0057F88F /* JITArithmetic32_64.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JITArithmetic32_64.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><ins>+                A75EE9B018AAB7E200AAD043 /* BuiltinNames.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BuiltinNames.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx">                 A76140C7182982CB00750624 /* ArgumentsIteratorConstructor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ArgumentsIteratorConstructor.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 A76140C8182982CB00750624 /* ArgumentsIteratorConstructor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ArgumentsIteratorConstructor.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><del>-                A76140C9182982CB00750624 /* ArgumentsIteratorPrototype.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ArgumentsIteratorPrototype.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</del><ins>+                A76140C9182982CB00750624 /* ArgumentsIteratorPrototype.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; lineEnding = 0; path = ArgumentsIteratorPrototype.cpp; sourceTree = &quot;&lt;group&gt;&quot;; xcLanguageSpecificationIdentifier = xcode.lang.cpp; };
</ins><span class="cx">                 A76140CA182982CB00750624 /* ArgumentsIteratorPrototype.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ArgumentsIteratorPrototype.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 A76140CB182982CB00750624 /* JSArgumentsIterator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSArgumentsIterator.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 A76140CC182982CB00750624 /* JSArgumentsIterator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSArgumentsIterator.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -2647,9 +2654,9 @@
</span><span class="cx">                 A7B4ACAE1484C9CE00B38A36 /* JSExportMacros.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSExportMacros.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 A7BDAEC017F4EA1400F6140C /* ArrayIteratorConstructor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ArrayIteratorConstructor.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 A7BDAEC117F4EA1400F6140C /* ArrayIteratorConstructor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ArrayIteratorConstructor.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><del>-                A7BDAEC217F4EA1400F6140C /* ArrayIteratorPrototype.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ArrayIteratorPrototype.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</del><ins>+                A7BDAEC217F4EA1400F6140C /* ArrayIteratorPrototype.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; lineEnding = 0; path = ArrayIteratorPrototype.cpp; sourceTree = &quot;&lt;group&gt;&quot;; xcLanguageSpecificationIdentifier = xcode.lang.cpp; };
</ins><span class="cx">                 A7BDAEC317F4EA1400F6140C /* ArrayIteratorPrototype.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ArrayIteratorPrototype.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><del>-                A7BDAEC417F4EA1400F6140C /* JSArrayIterator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSArrayIterator.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</del><ins>+                A7BDAEC417F4EA1400F6140C /* JSArrayIterator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; lineEnding = 0; path = JSArrayIterator.cpp; sourceTree = &quot;&lt;group&gt;&quot;; xcLanguageSpecificationIdentifier = xcode.lang.cpp; };
</ins><span class="cx">                 A7BDAEC517F4EA1400F6140C /* JSArrayIterator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSArrayIterator.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 A7BFF3BF179868940002F462 /* DFGFiltrationResult.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DFGFiltrationResult.h; path = dfg/DFGFiltrationResult.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 A7C0C4AA167C08CD0017011D /* JSScriptRef.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSScriptRef.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -2669,6 +2676,11 @@
</span><span class="cx">                 A7CA3AE217DA41AE006538AF /* JSWeakMap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSWeakMap.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 A7CA3AE917DA5168006538AF /* WeakMapData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WeakMapData.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 A7CA3AEA17DA5168006538AF /* WeakMapData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WeakMapData.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><ins>+                A7D801A01880D66E0026C39B /* Array.prototype.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = Array.prototype.js; sourceTree = &quot;&lt;group&gt;&quot;; };
+                A7D801A11880D66E0026C39B /* BuiltinExecutables.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = BuiltinExecutables.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
+                A7D801A21880D66E0026C39B /* BuiltinExecutables.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BuiltinExecutables.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                A7D801A61880D6A80026C39B /* JSCBuiltins.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSCBuiltins.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
+                A7D801A71880D6A80026C39B /* JSCBuiltins.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSCBuiltins.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx">                 A7D89CE317A0B8CC00773AD8 /* DFGBasicBlock.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DFGBasicBlock.cpp; path = dfg/DFGBasicBlock.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 A7D89CE417A0B8CC00773AD8 /* DFGBlockInsertionSet.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DFGBlockInsertionSet.cpp; path = dfg/DFGBlockInsertionSet.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 A7D89CE517A0B8CC00773AD8 /* DFGBlockInsertionSet.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DFGBlockInsertionSet.h; path = dfg/DFGBlockInsertionSet.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -2871,7 +2883,7 @@
</span><span class="cx">                 F5BB2BC5030F772101FCFE1D /* Completion.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = Completion.h; sourceTree = &quot;&lt;group&gt;&quot;; tabWidth = 8; };
</span><span class="cx">                 F5C290E60284F98E018635CA /* JavaScriptCorePrefix.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = JavaScriptCorePrefix.h; sourceTree = &quot;&lt;group&gt;&quot;; tabWidth = 8; };
</span><span class="cx">                 F68EBB8C0255D4C601FF60F7 /* config.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = config.h; sourceTree = &quot;&lt;group&gt;&quot;; tabWidth = 8; };
</span><del>-                F692A84D0255597D01FF60F7 /* ArrayPrototype.cpp */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ArrayPrototype.cpp; sourceTree = &quot;&lt;group&gt;&quot;; tabWidth = 8; };
</del><ins>+                F692A84D0255597D01FF60F7 /* ArrayPrototype.cpp */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.cpp.cpp; lineEnding = 0; path = ArrayPrototype.cpp; sourceTree = &quot;&lt;group&gt;&quot;; tabWidth = 8; xcLanguageSpecificationIdentifier = xcode.lang.cpp; };
</ins><span class="cx">                 F692A84E0255597D01FF60F7 /* ArrayPrototype.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = ArrayPrototype.h; sourceTree = &quot;&lt;group&gt;&quot;; tabWidth = 8; };
</span><span class="cx">                 F692A8500255597D01FF60F7 /* BooleanObject.cpp */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.cpp.cpp; path = BooleanObject.cpp; sourceTree = &quot;&lt;group&gt;&quot;; tabWidth = 8; };
</span><span class="cx">                 F692A8540255597D01FF60F7 /* create_hash_table */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = text.script.perl; path = create_hash_table; sourceTree = &quot;&lt;group&gt;&quot;; tabWidth = 8; };
</span><span class="lines">@@ -3009,6 +3021,7 @@
</span><span class="cx">                                 8604F4F2143A6C4400B295F5 /* ChangeLog */,
</span><span class="cx">                                 F692A8540255597D01FF60F7 /* create_hash_table */,
</span><span class="cx">                                 A718F8211178EB4B002465A7 /* create_regex_tables */,
</span><ins>+                                A71DA80D1880D71F00D1F299 /* generate-js-builtins */,
</ins><span class="cx">                                 45E12D8806A49B0F00E9DF84 /* jsc.cpp */,
</span><span class="cx">                                 F68EBB8C0255D4C601FF60F7 /* config.h */,
</span><span class="cx">                                 F5C290E60284F98E018635CA /* JavaScriptCorePrefix.h */,
</span><span class="lines">@@ -3017,6 +3030,7 @@
</span><span class="cx">                                 1432EBD70A34CAD400717B9F /* API */,
</span><span class="cx">                                 9688CB120ED12B4E001D649F /* assembler */,
</span><span class="cx">                                 A54CF2EA184EA73900237F19 /* bindings */,
</span><ins>+                                A7D8019F1880D66E0026C39B /* builtins */,
</ins><span class="cx">                                 969A078F0ED1D3AE00F1F681 /* bytecode */,
</span><span class="cx">                                 7E39D81D0EC38EFA003AF11A /* bytecompiler */,
</span><span class="cx">                                 1C90513E0BA9E8830081E9D0 /* Configurations */,
</span><span class="lines">@@ -3601,6 +3615,8 @@
</span><span class="cx">                 650FDF8D09D0FCA700769E54 /* Derived Sources */ = {
</span><span class="cx">                         isa = PBXGroup;
</span><span class="cx">                         children = (
</span><ins>+                                A7D801A61880D6A80026C39B /* JSCBuiltins.cpp */,
+                                A7D801A71880D6A80026C39B /* JSCBuiltins.h */,
</ins><span class="cx">                                 BC18C5230E16FC8A00B34460 /* ArrayPrototype.lut.h */,
</span><span class="cx">                                 BCD203E70E1718F4002C7E82 /* DatePrototype.lut.h */,
</span><span class="cx">                                 A513E5C6185F9436007E95AD /* InjectedScriptSource.h */,
</span><span class="lines">@@ -4704,6 +4720,17 @@
</span><span class="cx">                         path = remote;
</span><span class="cx">                         sourceTree = &quot;&lt;group&gt;&quot;;
</span><span class="cx">                 };
</span><ins>+                A7D8019F1880D66E0026C39B /* builtins */ = {
+                        isa = PBXGroup;
+                        children = (
+                                A7D801A01880D66E0026C39B /* Array.prototype.js */,
+                                A7D801A11880D66E0026C39B /* BuiltinExecutables.cpp */,
+                                A7D801A21880D66E0026C39B /* BuiltinExecutables.h */,
+                                A75EE9B018AAB7E200AAD043 /* BuiltinNames.h */,
+                        );
+                        path = builtins;
+                        sourceTree = &quot;&lt;group&gt;&quot;;
+                };
</ins><span class="cx"> /* End PBXGroup section */
</span><span class="cx"> 
</span><span class="cx"> /* Begin PBXHeadersBuildPhase section */
</span><span class="lines">@@ -4913,6 +4940,7 @@
</span><span class="cx">                                 0FD81AD3154FB4F000983E72 /* DFGDominators.h in Headers */,
</span><span class="cx">                                 0F1E3A471534CBB9000F9456 /* DFGDoubleFormatState.h in Headers */,
</span><span class="cx">                                 0FD3C82814115D4F00FD81CB /* DFGDriver.h in Headers */,
</span><ins>+                                A75EE9B218AAB7E200AAD043 /* BuiltinNames.h in Headers */,
</ins><span class="cx">                                 0F66E16C14DF3F1600B7B2E4 /* DFGEdge.h in Headers */,
</span><span class="cx">                                 A7D9A29617A0BC7400EE2618 /* DFGEdgeDominates.h in Headers */,
</span><span class="cx">                                 A7986D5717A0BB1E00A95DD0 /* DFGEdgeUsesStructure.h in Headers */,
</span><span class="lines">@@ -5027,6 +5055,7 @@
</span><span class="cx">                                 0FEA0A1D1708B00700BB722C /* FTLAbstractHeap.h in Headers */,
</span><span class="cx">                                 0FEA0A1F1708B00700BB722C /* FTLAbstractHeapRepository.h in Headers */,
</span><span class="cx">                                 A59455931824744700CC3843 /* JSGlobalObjectDebuggable.h in Headers */,
</span><ins>+                                A7D801A91880D6A80026C39B /* JSCBuiltins.h in Headers */,
</ins><span class="cx">                                 0FEA0A0A170513DB00BB722C /* FTLCapabilities.h in Headers */,
</span><span class="cx">                                 0F48532A187DFDEC0083B687 /* FTLRecoveryOpcode.h in Headers */,
</span><span class="cx">                                 0FEA0A231709606900BB722C /* FTLCommonValues.h in Headers */,
</span><span class="lines">@@ -5103,6 +5132,7 @@
</span><span class="cx">                                 BC18C40F0E16F5CD00B34460 /* Identifier.h in Headers */,
</span><span class="cx">                                 C25F8BCE157544A900245B71 /* IncrementalSweeper.h in Headers */,
</span><span class="cx">                                 0FB7F39915ED8E4600F167B2 /* IndexingHeader.h in Headers */,
</span><ins>+                                A7D801A51880D66E0026C39B /* BuiltinExecutables.h in Headers */,
</ins><span class="cx">                                 0FB7F39A15ED8E4600F167B2 /* IndexingHeaderInlines.h in Headers */,
</span><span class="cx">                                 0FB7F39B15ED8E4600F167B2 /* IndexingType.h in Headers */,
</span><span class="cx">                                 0FCEFAB01805CA6D00472CE4 /* InitializeLLVM.h in Headers */,
</span><span class="lines">@@ -6007,6 +6037,7 @@
</span><span class="cx">                                 A7D89CF217A0B8CC00773AD8 /* DFGBasicBlock.cpp in Sources */,
</span><span class="cx">                                 A70B083217A0B79B00DAF14B /* DFGBinarySwitch.cpp in Sources */,
</span><span class="cx">                                 A7D89CF317A0B8CC00773AD8 /* DFGBlockInsertionSet.cpp in Sources */,
</span><ins>+                                A7D801A41880D66E0026C39B /* BuiltinExecutables.cpp in Sources */,
</ins><span class="cx">                                 86EC9DC41328DF82002B2AD7 /* DFGByteCodeParser.cpp in Sources */,
</span><span class="cx">                                 0FD82E2114172CE300179C94 /* DFGCapabilities.cpp in Sources */,
</span><span class="cx">                                 0FFFC95714EF90A000C72532 /* DFGCFAPhase.cpp in Sources */,
</span><span class="lines">@@ -6023,6 +6054,7 @@
</span><span class="cx">                                 0FFFC95914EF90A600C72532 /* DFGCSEPhase.cpp in Sources */,
</span><span class="cx">                                 0F2FC77216E12F710038D976 /* DFGDCEPhase.cpp in Sources */,
</span><span class="cx">                                 0F8F2B99172F04FF007DBDA5 /* DFGDesiredIdentifiers.cpp in Sources */,
</span><ins>+                                A7D801A81880D6A80026C39B /* JSCBuiltins.cpp in Sources */,
</ins><span class="cx">                                 A73E1330179624CD00E4DEA8 /* DFGDesiredStructureChains.cpp in Sources */,
</span><span class="cx">                                 C2C0F7CD17BBFC5B00464FE4 /* DFGDesiredTransitions.cpp in Sources */,
</span><span class="cx">                                 0FE8534B1723CDA500B618F5 /* DFGDesiredWatchpoints.cpp in Sources */,
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorebuiltinsArrayprototypejsfromrev163959trunkSourceJavaScriptCoreruntimeJSFunctionInlinesh"></a>
<div class="copfile"><h4>Copied: trunk/Source/JavaScriptCore/builtins/Array.prototype.js (from rev 163959, trunk/Source/JavaScriptCore/runtime/JSFunctionInlines.h) (0 => 163960)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/builtins/Array.prototype.js                                (rev 0)
+++ trunk/Source/JavaScriptCore/builtins/Array.prototype.js        2014-02-12 17:14:23 UTC (rev 163960)
</span><span class="lines">@@ -0,0 +1,51 @@
</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 every(callback /*, thisArg */) {
+    &quot;use strict&quot;;
+    if (this === null)
+        throw new @TypeError(&quot;Array.prototype.every requires that |this| not be null&quot;);
+    
+    if (this === undefined)
+        throw new @TypeError(&quot;Array.prototype.every requires that |this| not be undefined&quot;);
+    
+    var array = @Object(this);
+    var length = array.length &gt;&gt;&gt; 0;
+    
+    if (typeof callback !== &quot;function&quot;)
+        throw new @TypeError(&quot;Array.prototype.every callback must be a function&quot;);
+
+    var thisArg = arguments.length &gt; 1 ? arguments[1] : undefined;
+    
+    for (var i = 0; i &lt; length; i++) {
+        if (!(i in array))
+            continue;
+        if (!callback.@call(thisArg, array[i], i, array))
+            return false;
+    }
+    
+    return true;
+}
+
</ins></span></pre></div>
<a id="trunkSourceJavaScriptCorebuiltinsBuiltinExecutablescpp"></a>
<div class="addfile"><h4>Added: trunk/Source/JavaScriptCore/builtins/BuiltinExecutables.cpp (0 => 163960)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/builtins/BuiltinExecutables.cpp                                (rev 0)
+++ trunk/Source/JavaScriptCore/builtins/BuiltinExecutables.cpp        2014-02-12 17:14:23 UTC (rev 163960)
</span><span class="lines">@@ -0,0 +1,95 @@
</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.
+ */
+
+
+#include &quot;config.h&quot;
+#include &quot;BuiltinExecutables.h&quot;
+
+#include &quot;BuiltinNames.h&quot;
+#include &quot;Executable.h&quot;
+#include &quot;JSCInlines.h&quot;
+#include &quot;Parser.h&quot;
+
+namespace JSC {
+
+BuiltinExecutables::BuiltinExecutables(VM&amp; vm)
+    : m_vm(vm)
+#define INITIALIZE_BUILTIN_SOURCE_MEMBERS(name, functionName, length) , m_##name##Source(makeSource(StringImpl::createFromLiteral(s_##name, length), StringImpl::createFromLiteral(&quot;&lt;builtin&gt;&quot;)))
+    JSC_FOREACH_BUILTIN(INITIALIZE_BUILTIN_SOURCE_MEMBERS)
+#undef EXPOSE_BUILTIN_STRINGS
+{
+}
+
+UnlinkedFunctionExecutable* BuiltinExecutables::createBuiltinExecutable(const SourceCode&amp; source, const Identifier&amp; name)
+{
+    JSTextPosition positionBeforeLastNewline;
+    ParserError error;
+    RefPtr&lt;ProgramNode&gt; program = parse&lt;ProgramNode&gt;(&amp;m_vm, source, 0, Identifier(), JSParseBuiltin, JSParseProgramCode, error, &amp;positionBeforeLastNewline);
+
+    if (!program) {
+        dataLog(&quot;Fatal error compiling builtin function '&quot;, name.string(), &quot;': &quot;, error.m_message);
+        CRASH();
+    }
+
+    StatementNode* exprStatement = program-&gt;singleStatement();
+    RELEASE_ASSERT(exprStatement);
+    RELEASE_ASSERT(exprStatement-&gt;isExprStatement());
+    ExpressionNode* funcExpr = static_cast&lt;ExprStatementNode*&gt;(exprStatement)-&gt;expr();
+    RELEASE_ASSERT(funcExpr);
+    RELEASE_ASSERT(funcExpr-&gt;isFuncExprNode());
+    FunctionBodyNode* body = static_cast&lt;FuncExprNode*&gt;(funcExpr)-&gt;body();
+    RELEASE_ASSERT(!program-&gt;hasCapturedVariables());
+    
+    body-&gt;setEndPosition(positionBeforeLastNewline);
+    RELEASE_ASSERT(body);
+    RELEASE_ASSERT(body-&gt;ident().isNull());
+    
+    // This function assumes an input string that would result in a single anonymous function expression.
+    body-&gt;setEndPosition(positionBeforeLastNewline);
+    RELEASE_ASSERT(body);
+    for (const auto&amp; closedVariable : program-&gt;closedVariables()) {
+        if (closedVariable == m_vm.propertyNames-&gt;arguments.impl())
+        continue;
+        
+        if (closedVariable == m_vm.propertyNames-&gt;undefinedKeyword.impl())
+            continue;
+        RELEASE_ASSERT(closedVariable-&gt;isEmptyUnique());
+    }
+    UnlinkedFunctionExecutable* functionExecutable = UnlinkedFunctionExecutable::create(&amp;m_vm, source, body, true, UnlinkedBuiltinFunction);
+    functionExecutable-&gt;m_nameValue.set(m_vm, functionExecutable, jsString(&amp;m_vm, name.string()));
+    return functionExecutable;
+}
+
+#define DEFINE_BUILTIN_EXECUTABLES(name, functionName, length) \
+UnlinkedFunctionExecutable* BuiltinExecutables::name##Executable() \
+{\
+    if (!m_##name##Executable)\
+        m_##name##Executable = createBuiltinExecutable(m_##name##Source, m_vm.propertyNames-&gt;builtinNames().functionName());\
+    return m_##name##Executable.get();\
+}
+JSC_FOREACH_BUILTIN(DEFINE_BUILTIN_EXECUTABLES)
+#undef EXPOSE_BUILTIN_SOURCES
+
+}
</ins></span></pre></div>
<a id="trunkSourceJavaScriptCorebuiltinsBuiltinExecutableshfromrev163959trunkSourceJavaScriptCoreruntimeJSFunctionInlinesh"></a>
<div class="copfile"><h4>Copied: trunk/Source/JavaScriptCore/builtins/BuiltinExecutables.h (from rev 163959, trunk/Source/JavaScriptCore/runtime/JSFunctionInlines.h) (0 => 163960)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/builtins/BuiltinExecutables.h                                (rev 0)
+++ trunk/Source/JavaScriptCore/builtins/BuiltinExecutables.h        2014-02-12 17:14:23 UTC (rev 163960)
</span><span class="lines">@@ -0,0 +1,67 @@
</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.
+ */
+
+#ifndef BuiltinExecutables_h
+#define BuiltinExecutables_h
+
+#include &quot;JSCBuiltins.h&quot;
+#include &quot;SourceCode.h&quot;
+#include &quot;Weak.h&quot;
+#include &lt;wtf/PassOwnPtr.h&gt;
+
+namespace JSC {
+
+class UnlinkedFunctionExecutable;
+class Identifier;
+class VM;
+
+class BuiltinExecutables {
+public:
+    static PassOwnPtr&lt;BuiltinExecutables&gt; create(VM&amp; vm)
+    {
+        return adoptPtr(new BuiltinExecutables(vm));
+    }
+    
+#define EXPOSE_BUILTIN_EXECUTABLES(name, functionName, length) \
+UnlinkedFunctionExecutable* name##Executable(); \
+const SourceCode&amp; name##Source() { return m_##name##Source; }
+    
+    JSC_FOREACH_BUILTIN(EXPOSE_BUILTIN_EXECUTABLES)
+#undef EXPOSE_BUILTIN_SOURCES
+    
+private:
+    BuiltinExecutables(VM&amp;);
+    VM&amp; m_vm;
+    UnlinkedFunctionExecutable* createBuiltinExecutable(const SourceCode&amp;, const Identifier&amp;);
+#define DECLARE_BUILTIN_SOURCE_MEMBERS(name, functionName, length)\
+    SourceCode m_##name##Source; \
+    Weak&lt;UnlinkedFunctionExecutable&gt; m_##name##Executable;
+    JSC_FOREACH_BUILTIN(DECLARE_BUILTIN_SOURCE_MEMBERS)
+#undef DECLARE_BUILTIN_SOURCE_MEMBERS
+};
+
+}
+
+#endif
</ins></span></pre></div>
<a id="trunkSourceJavaScriptCorebuiltinsBuiltinNamesh"></a>
<div class="addfile"><h4>Added: trunk/Source/JavaScriptCore/builtins/BuiltinNames.h (0 => 163960)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/builtins/BuiltinNames.h                                (rev 0)
+++ trunk/Source/JavaScriptCore/builtins/BuiltinNames.h        2014-02-12 17:14:23 UTC (rev 163960)
</span><span class="lines">@@ -0,0 +1,97 @@
</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.
+ */
+
+#ifndef BuiltinNames_h
+#define BuiltinNames_h
+
+#include &quot;CommonIdentifiers.h&quot;
+#include &quot;JSCBuiltins.h&quot;
+
+namespace JSC {
+    
+#define INITIALISE_BUILTIN_NAMES(name) , m_##name(vm, #name), m_##name##PrivateName(Identifier::from(PrivateName()))
+#define DECLARE_BUILTIN_NAMES(name) const Identifier m_##name; const Identifier m_##name##PrivateName;;
+#define DECLARE_BUILTIN_IDENTIFIER_ACCESSOR(name) \
+    const Identifier&amp; name() const { return m_##name; } \
+    const Identifier&amp; name##PrivateName() const { return m_##name##PrivateName; }
+
+#define INITIALISE_PRIVATE_TO_PUBLIC_ENTRY(name) m_privateToPublicMap.add(m_##name##PrivateName.impl(), &amp;m_##name);
+#define INITIALISE_PUBLIC_TO_PRIVATE_ENTRY(name) m_publicToPrivateMap.add(m_##name.impl(), &amp;m_##name##PrivateName);
+    
+class BuiltinNames {
+    WTF_MAKE_NONCOPYABLE(BuiltinNames); WTF_MAKE_FAST_ALLOCATED;
+    
+public:
+    BuiltinNames(VM* vm, CommonIdentifiers* commonIdentifiers)
+        : m_emptyIdentifier(commonIdentifiers-&gt;emptyIdentifier)
+        JSC_FOREACH_BUILTIN_FUNCTION_NAME(INITIALISE_BUILTIN_NAMES)
+        JSC_COMMON_PRIVATE_IDENTIFIERS_EACH_PROPERTY_NAME(INITIALISE_BUILTIN_NAMES)
+    {
+        JSC_FOREACH_BUILTIN_FUNCTION_NAME(INITIALISE_PRIVATE_TO_PUBLIC_ENTRY)
+        JSC_COMMON_PRIVATE_IDENTIFIERS_EACH_PROPERTY_NAME(INITIALISE_PRIVATE_TO_PUBLIC_ENTRY)
+        JSC_FOREACH_BUILTIN_FUNCTION_NAME(INITIALISE_PUBLIC_TO_PRIVATE_ENTRY)
+        JSC_COMMON_PRIVATE_IDENTIFIERS_EACH_PROPERTY_NAME(INITIALISE_PUBLIC_TO_PRIVATE_ENTRY)
+    }
+
+    const Identifier* getPrivateName(const Identifier&amp;) const;
+    const Identifier&amp; getPublicName(const Identifier&amp;) const;
+    
+    JSC_FOREACH_BUILTIN_FUNCTION_NAME(DECLARE_BUILTIN_IDENTIFIER_ACCESSOR)
+    JSC_COMMON_PRIVATE_IDENTIFIERS_EACH_PROPERTY_NAME(DECLARE_BUILTIN_IDENTIFIER_ACCESSOR)
+
+private:
+    Identifier m_emptyIdentifier;
+    JSC_FOREACH_BUILTIN_FUNCTION_NAME(DECLARE_BUILTIN_NAMES)
+    JSC_COMMON_PRIVATE_IDENTIFIERS_EACH_PROPERTY_NAME(DECLARE_BUILTIN_NAMES)
+    typedef HashMap&lt;RefPtr&lt;StringImpl&gt;, const Identifier*, IdentifierRepHash&gt; BuiltinNamesMap;
+    BuiltinNamesMap m_publicToPrivateMap;
+    BuiltinNamesMap m_privateToPublicMap;
+};
+
+#undef DECLARE_BUILTIN_NAMES
+#undef INITIALISE_BUILTIN_NAMES
+#undef DECLARE_BUILTIN_IDENTIFIER_ACCESSOR
+
+
+inline const Identifier* BuiltinNames::getPrivateName(const Identifier&amp; ident) const
+{
+    auto iter = m_publicToPrivateMap.find(ident.impl());
+    if (iter != m_publicToPrivateMap.end())
+        return iter-&gt;value;
+    return 0;
+}
+
+inline const Identifier&amp; BuiltinNames::getPublicName(const Identifier&amp; ident) const
+{
+    auto iter = m_privateToPublicMap.find(ident.impl());
+    if (iter != m_privateToPublicMap.end())
+        return *iter-&gt;value;
+    return m_emptyIdentifier;
+}
+
+    
+}
+
+#endif
</ins></span></pre></div>
<a id="trunkSourceJavaScriptCorebytecodeCodeBlockcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/bytecode/CodeBlock.cpp (163959 => 163960)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/bytecode/CodeBlock.cpp        2014-02-12 17:10:25 UTC (rev 163959)
+++ trunk/Source/JavaScriptCore/bytecode/CodeBlock.cpp        2014-02-12 17:14:23 UTC (rev 163960)
</span><span class="lines">@@ -1594,7 +1594,7 @@
</span><span class="cx"> 
</span><span class="cx">     setConstantRegisters(unlinkedCodeBlock-&gt;constantRegisters());
</span><span class="cx">     if (unlinkedCodeBlock-&gt;usesGlobalObject())
</span><del>-        m_constantRegisters[unlinkedCodeBlock-&gt;globalObjectRegister().offset()].set(*m_vm, ownerExecutable, m_globalObject.get());
</del><ins>+        m_constantRegisters[unlinkedCodeBlock-&gt;globalObjectRegister().toConstantIndex()].set(*m_vm, ownerExecutable, m_globalObject.get());
</ins><span class="cx">     m_functionDecls.resizeToFit(unlinkedCodeBlock-&gt;numberOfFunctionDecls());
</span><span class="cx">     for (size_t count = unlinkedCodeBlock-&gt;numberOfFunctionDecls(), i = 0; i &lt; count; ++i) {
</span><span class="cx">         UnlinkedFunctionExecutable* unlinkedExecutable = unlinkedCodeBlock-&gt;functionDecl(i);
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorebytecodeUnlinkedCodeBlockcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/bytecode/UnlinkedCodeBlock.cpp (163959 => 163960)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/bytecode/UnlinkedCodeBlock.cpp        2014-02-12 17:10:25 UTC (rev 163959)
+++ trunk/Source/JavaScriptCore/bytecode/UnlinkedCodeBlock.cpp        2014-02-12 17:14:23 UTC (rev 163960)
</span><span class="lines">@@ -49,9 +49,9 @@
</span><span class="cx"> const ClassInfo UnlinkedEvalCodeBlock::s_info = { &quot;UnlinkedEvalCodeBlock&quot;, &amp;Base::s_info, 0, 0, CREATE_METHOD_TABLE(UnlinkedEvalCodeBlock) };
</span><span class="cx"> const ClassInfo UnlinkedFunctionCodeBlock::s_info = { &quot;UnlinkedFunctionCodeBlock&quot;, &amp;Base::s_info, 0, 0, CREATE_METHOD_TABLE(UnlinkedFunctionCodeBlock) };
</span><span class="cx"> 
</span><del>-static UnlinkedFunctionCodeBlock* generateFunctionCodeBlock(VM&amp; vm, UnlinkedFunctionExecutable* executable, const SourceCode&amp; source, CodeSpecializationKind kind, DebuggerMode debuggerMode, ProfilerMode profilerMode, ParserError&amp; error)
</del><ins>+static UnlinkedFunctionCodeBlock* generateFunctionCodeBlock(VM&amp; vm, UnlinkedFunctionExecutable* executable, const SourceCode&amp; source, CodeSpecializationKind kind, DebuggerMode debuggerMode, ProfilerMode profilerMode, UnlinkedFunctionKind functionKind, ParserError&amp; error)
</ins><span class="cx"> {
</span><del>-    RefPtr&lt;FunctionBodyNode&gt; body = parse&lt;FunctionBodyNode&gt;(&amp;vm, source, executable-&gt;parameters(), executable-&gt;name(), executable-&gt;isInStrictContext() ? JSParseStrict : JSParseNormal, JSParseFunctionCode, error);
</del><ins>+    RefPtr&lt;FunctionBodyNode&gt; body = parse&lt;FunctionBodyNode&gt;(&amp;vm, source, executable-&gt;parameters(), executable-&gt;name(), executable-&gt;toStrictness(), JSParseFunctionCode, error);
</ins><span class="cx"> 
</span><span class="cx">     if (!body) {
</span><span class="cx">         ASSERT(error.m_type != ParserError::ErrorNone);
</span><span class="lines">@@ -63,7 +63,7 @@
</span><span class="cx">     body-&gt;finishParsing(executable-&gt;parameters(), executable-&gt;name(), executable-&gt;functionMode());
</span><span class="cx">     executable-&gt;recordParse(body-&gt;features(), body-&gt;hasCapturedVariables());
</span><span class="cx">     
</span><del>-    UnlinkedFunctionCodeBlock* result = UnlinkedFunctionCodeBlock::create(&amp;vm, FunctionCode, ExecutableInfo(body-&gt;needsActivation(), body-&gt;usesEval(), body-&gt;isStrictMode(), kind == CodeForConstruct));
</del><ins>+    UnlinkedFunctionCodeBlock* result = UnlinkedFunctionCodeBlock::create(&amp;vm, FunctionCode, ExecutableInfo(body-&gt;needsActivation(), body-&gt;usesEval(), body-&gt;isStrictMode(), kind == CodeForConstruct, functionKind == UnlinkedBuiltinFunction));
</ins><span class="cx">     OwnPtr&lt;BytecodeGenerator&gt; generator(adoptPtr(new BytecodeGenerator(vm, body.get(), result, debuggerMode, profilerMode)));
</span><span class="cx">     error = generator-&gt;generate();
</span><span class="cx">     body-&gt;destroyData();
</span><span class="lines">@@ -82,13 +82,14 @@
</span><span class="cx">     return addConstant(v);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-UnlinkedFunctionExecutable::UnlinkedFunctionExecutable(VM* vm, Structure* structure, const SourceCode&amp; source, FunctionBodyNode* node, bool isFromGlobalCode)
</del><ins>+UnlinkedFunctionExecutable::UnlinkedFunctionExecutable(VM* vm, Structure* structure, const SourceCode&amp; source, FunctionBodyNode* node, bool isFromGlobalCode, UnlinkedFunctionKind kind)
</ins><span class="cx">     : Base(*vm, structure)
</span><span class="cx">     , m_numCapturedVariables(node-&gt;capturedVariableCount())
</span><span class="cx">     , m_forceUsesArguments(node-&gt;usesArguments())
</span><span class="cx">     , m_isInStrictContext(node-&gt;isStrictMode())
</span><span class="cx">     , m_hasCapturedVariables(node-&gt;hasCapturedVariables())
</span><span class="cx">     , m_isFromGlobalCode(isFromGlobalCode)
</span><ins>+    , m_isBuiltinFunction(kind == UnlinkedBuiltinFunction)
</ins><span class="cx">     , m_name(node-&gt;ident())
</span><span class="cx">     , m_inferredName(node-&gt;inferredName())
</span><span class="cx">     , m_parameters(node-&gt;parameters())
</span><span class="lines">@@ -166,7 +167,7 @@
</span><span class="cx">         break;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    UnlinkedFunctionCodeBlock* result = generateFunctionCodeBlock(vm, this, source, specializationKind, debuggerMode, profilerMode, error);
</del><ins>+    UnlinkedFunctionCodeBlock* result = generateFunctionCodeBlock(vm, this, source, specializationKind, debuggerMode, profilerMode, isBuiltinFunction() ? UnlinkedBuiltinFunction : UnlinkedNormalFunction, error);
</ins><span class="cx">     
</span><span class="cx">     if (error.m_type != ParserError::ErrorNone)
</span><span class="cx">         return 0;
</span><span class="lines">@@ -210,6 +211,7 @@
</span><span class="cx">     , m_isStrictMode(info.m_isStrictMode)
</span><span class="cx">     , m_isConstructor(info.m_isConstructor)
</span><span class="cx">     , m_hasCapturedVariables(false)
</span><ins>+    , m_isBuiltinFunction(info.m_isBuiltinFunction)
</ins><span class="cx">     , m_firstLine(0)
</span><span class="cx">     , m_lineCount(0)
</span><span class="cx">     , m_endColumn(UINT_MAX)
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorebytecodeUnlinkedCodeBlockh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/bytecode/UnlinkedCodeBlock.h (163959 => 163960)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/bytecode/UnlinkedCodeBlock.h        2014-02-12 17:10:25 UTC (rev 163959)
+++ trunk/Source/JavaScriptCore/bytecode/UnlinkedCodeBlock.h        2014-02-12 17:14:23 UTC (rev 163960)
</span><span class="lines">@@ -66,26 +66,35 @@
</span><span class="cx"> typedef unsigned UnlinkedLLIntCallLinkInfo;
</span><span class="cx"> 
</span><span class="cx"> struct ExecutableInfo {
</span><del>-    ExecutableInfo(bool needsActivation, bool usesEval, bool isStrictMode, bool isConstructor)
</del><ins>+    ExecutableInfo(bool needsActivation, bool usesEval, bool isStrictMode, bool isConstructor, bool isBuiltinFunction)
</ins><span class="cx">         : m_needsActivation(needsActivation)
</span><span class="cx">         , m_usesEval(usesEval)
</span><span class="cx">         , m_isStrictMode(isStrictMode)
</span><span class="cx">         , m_isConstructor(isConstructor)
</span><ins>+        , m_isBuiltinFunction(isBuiltinFunction)
</ins><span class="cx">     {
</span><span class="cx">     }
</span><del>-    bool m_needsActivation;
-    bool m_usesEval;
-    bool m_isStrictMode;
-    bool m_isConstructor;
</del><ins>+    bool m_needsActivation : 1;
+    bool m_usesEval : 1;
+    bool m_isStrictMode : 1;
+    bool m_isConstructor : 1;
+    bool m_isBuiltinFunction : 1;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><ins>+enum UnlinkedFunctionKind {
+    UnlinkedNormalFunction,
+    UnlinkedBuiltinFunction,
+};
+
</ins><span class="cx"> class UnlinkedFunctionExecutable : public JSCell {
</span><span class="cx"> public:
</span><ins>+    friend class BuiltinExecutables;
</ins><span class="cx">     friend class CodeCache;
</span><ins>+    friend class VM;
</ins><span class="cx">     typedef JSCell Base;
</span><del>-    static UnlinkedFunctionExecutable* create(VM* vm, const SourceCode&amp; source, FunctionBodyNode* node, bool isFromGlobalCode = false)
</del><ins>+    static UnlinkedFunctionExecutable* create(VM* vm, const SourceCode&amp; source, FunctionBodyNode* node, bool isFromGlobalCode, UnlinkedFunctionKind unlinkedFunctionKind)
</ins><span class="cx">     {
</span><del>-        UnlinkedFunctionExecutable* instance = new (NotNull, allocateCell&lt;UnlinkedFunctionExecutable&gt;(vm-&gt;heap)) UnlinkedFunctionExecutable(vm, vm-&gt;unlinkedFunctionExecutableStructure.get(), source, node, isFromGlobalCode);
</del><ins>+        UnlinkedFunctionExecutable* instance = new (NotNull, allocateCell&lt;UnlinkedFunctionExecutable&gt;(vm-&gt;heap)) UnlinkedFunctionExecutable(vm, vm-&gt;unlinkedFunctionExecutableStructure.get(), source, node, isFromGlobalCode, unlinkedFunctionKind);
</ins><span class="cx">         instance-&gt;finishCreation(*vm);
</span><span class="cx">         return instance;
</span><span class="cx">     }
</span><span class="lines">@@ -100,6 +109,14 @@
</span><span class="cx">     size_t parameterCount() const;
</span><span class="cx">     bool isInStrictContext() const { return m_isInStrictContext; }
</span><span class="cx">     FunctionMode functionMode() const { return m_functionMode; }
</span><ins>+    JSParserStrictness toStrictness() const
+    {
+        if (m_isBuiltinFunction)
+            return JSParseBuiltin;
+        if (m_isInStrictContext)
+            return JSParseStrict;
+        return JSParseNormal;
+    }
</ins><span class="cx"> 
</span><span class="cx">     unsigned firstLineOffset() const { return m_firstLineOffset; }
</span><span class="cx">     unsigned lineCount() const { return m_lineCount; }
</span><span class="lines">@@ -142,8 +159,10 @@
</span><span class="cx">     static const bool hasImmortalStructure = true;
</span><span class="cx">     static void destroy(JSCell*);
</span><span class="cx"> 
</span><ins>+    bool isBuiltinFunction() const { return m_isBuiltinFunction; }
+
</ins><span class="cx"> private:
</span><del>-    UnlinkedFunctionExecutable(VM*, Structure*, const SourceCode&amp;, FunctionBodyNode*, bool isFromGlobalCode);
</del><ins>+    UnlinkedFunctionExecutable(VM*, Structure*, const SourceCode&amp;, FunctionBodyNode*, bool isFromGlobalCode, UnlinkedFunctionKind);
</ins><span class="cx">     WriteBarrier&lt;UnlinkedFunctionCodeBlock&gt; m_codeBlockForCall;
</span><span class="cx">     WriteBarrier&lt;UnlinkedFunctionCodeBlock&gt; m_codeBlockForConstruct;
</span><span class="cx"> 
</span><span class="lines">@@ -152,6 +171,7 @@
</span><span class="cx">     bool m_isInStrictContext : 1;
</span><span class="cx">     bool m_hasCapturedVariables : 1;
</span><span class="cx">     bool m_isFromGlobalCode : 1;
</span><ins>+    bool m_isBuiltinFunction : 1;
</ins><span class="cx"> 
</span><span class="cx">     Identifier m_name;
</span><span class="cx">     Identifier m_inferredName;
</span><span class="lines">@@ -318,6 +338,8 @@
</span><span class="cx">     void setIsNumericCompareFunction(bool isNumericCompareFunction) { m_isNumericCompareFunction = isNumericCompareFunction; }
</span><span class="cx">     bool isNumericCompareFunction() const { return m_isNumericCompareFunction; }
</span><span class="cx"> 
</span><ins>+    bool isBuiltinFunction() const { return m_isBuiltinFunction; }
+    
</ins><span class="cx">     void shrinkToFit()
</span><span class="cx">     {
</span><span class="cx">         m_jumpTargets.shrinkToFit();
</span><span class="lines">@@ -500,6 +522,7 @@
</span><span class="cx">     bool m_isStrictMode : 1;
</span><span class="cx">     bool m_isConstructor : 1;
</span><span class="cx">     bool m_hasCapturedVariables : 1;
</span><ins>+    bool m_isBuiltinFunction : 1;
</ins><span class="cx">     unsigned m_firstLine;
</span><span class="cx">     unsigned m_lineCount;
</span><span class="cx">     unsigned m_endColumn;
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorebytecompilerBytecodeGeneratorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp (163959 => 163960)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp        2014-02-12 17:10:25 UTC (rev 163959)
+++ trunk/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp        2014-02-12 17:14:23 UTC (rev 163960)
</span><span class="lines">@@ -182,6 +182,7 @@
</span><span class="cx"> #endif
</span><span class="cx">     , m_usesExceptions(false)
</span><span class="cx">     , m_expressionTooDeep(false)
</span><ins>+    , m_isBuiltinFunction(false)
</ins><span class="cx"> {
</span><span class="cx">     m_codeBlock-&gt;setNumParameters(1); // Allocate space for &quot;this&quot;
</span><span class="cx"> 
</span><span class="lines">@@ -225,7 +226,13 @@
</span><span class="cx"> #endif
</span><span class="cx">     , m_usesExceptions(false)
</span><span class="cx">     , m_expressionTooDeep(false)
</span><ins>+    , m_isBuiltinFunction(codeBlock-&gt;isBuiltinFunction())
</ins><span class="cx"> {
</span><ins>+    if (m_isBuiltinFunction) {
+        m_shouldEmitProfileHooks = false;
+        m_shouldEmitDebugHooks = false;
+    }
+
</ins><span class="cx">     m_symbolTable-&gt;setUsesNonStrictEval(codeBlock-&gt;usesEval() &amp;&amp; !codeBlock-&gt;isStrictMode());
</span><span class="cx">     Vector&lt;Identifier&gt; boundParameterProperties;
</span><span class="cx">     FunctionParameters&amp; parameters = *functionBody-&gt;parameters();
</span><span class="lines">@@ -433,6 +440,7 @@
</span><span class="cx"> #endif
</span><span class="cx">     , m_usesExceptions(false)
</span><span class="cx">     , m_expressionTooDeep(false)
</span><ins>+    , m_isBuiltinFunction(false)
</ins><span class="cx"> {
</span><span class="cx">     m_symbolTable-&gt;setUsesNonStrictEval(codeBlock-&gt;usesEval() &amp;&amp; !codeBlock-&gt;isStrictMode());
</span><span class="cx">     m_codeBlock-&gt;setNumParameters(1);
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorebytecompilerBytecodeGeneratorh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.h (163959 => 163960)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.h        2014-02-12 17:10:25 UTC (rev 163959)
+++ trunk/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.h        2014-02-12 17:14:23 UTC (rev 163960)
</span><span class="lines">@@ -462,7 +462,9 @@
</span><span class="cx">         bool shouldEmitDebugHooks() { return m_shouldEmitDebugHooks; }
</span><span class="cx">         
</span><span class="cx">         bool isStrictMode() const { return m_codeBlock-&gt;isStrictMode(); }
</span><del>-
</del><ins>+        
+        bool isBuiltinFunction() const { return m_isBuiltinFunction; }
+        
</ins><span class="cx">     private:
</span><span class="cx">         friend class Label;
</span><span class="cx">         
</span><span class="lines">@@ -544,7 +546,7 @@
</span><span class="cx">         
</span><span class="cx">         UnlinkedFunctionExecutable* makeFunction(FunctionBodyNode* body)
</span><span class="cx">         {
</span><del>-            return UnlinkedFunctionExecutable::create(m_vm, m_scopeNode-&gt;source(), body);
</del><ins>+            return UnlinkedFunctionExecutable::create(m_vm, m_scopeNode-&gt;source(), body, false, isBuiltinFunction() ? UnlinkedBuiltinFunction : UnlinkedNormalFunction);
</ins><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         RegisterID* emitInitLazyRegister(RegisterID*);
</span><span class="lines">@@ -678,6 +680,7 @@
</span><span class="cx"> 
</span><span class="cx">         bool m_usesExceptions;
</span><span class="cx">         bool m_expressionTooDeep;
</span><ins>+        bool m_isBuiltinFunction;
</ins><span class="cx">     };
</span><span class="cx"> 
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorebytecompilerNodesCodegencpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp (163959 => 163960)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp        2014-02-12 17:10:25 UTC (rev 163959)
+++ trunk/Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp        2014-02-12 17:14:23 UTC (rev 163960)
</span><span class="lines">@@ -535,9 +535,12 @@
</span><span class="cx">     RefPtr&lt;Label&gt; end = generator.newLabel();
</span><span class="cx">     RefPtr&lt;RegisterID&gt; base = generator.emitNode(m_base);
</span><span class="cx">     generator.emitExpressionInfo(subexpressionDivot(), subexpressionStart(), subexpressionEnd());
</span><del>-    RefPtr&lt;RegisterID&gt; function = generator.emitGetById(generator.tempDestination(dst), base.get(), m_ident);
</del><ins>+    RefPtr&lt;RegisterID&gt; function = generator.emitGetById(generator.tempDestination(dst), base.get(), generator.propertyNames().call);
</ins><span class="cx">     RefPtr&lt;RegisterID&gt; returnValue = generator.finalDestination(dst, function.get());
</span><del>-    generator.emitJumpIfNotFunctionCall(function.get(), realCall.get());
</del><ins>+    bool emitCallCheck = !generator.isBuiltinFunction();
+    if (emitCallCheck)
+        generator.emitJumpIfNotFunctionCall(function.get(), realCall.get());
+
</ins><span class="cx">     {
</span><span class="cx">         if (m_args-&gt;m_listNode &amp;&amp; m_args-&gt;m_listNode-&gt;m_expr) {
</span><span class="cx">             ArgumentListNode* oldList = m_args-&gt;m_listNode;
</span><span class="lines">@@ -547,24 +550,24 @@
</span><span class="cx">             CallArguments callArguments(generator, m_args);
</span><span class="cx">             generator.emitNode(callArguments.thisRegister(), oldList-&gt;m_expr);
</span><span class="cx">             generator.emitCall(returnValue.get(), realFunction.get(), NoExpectedFunction, callArguments, divot(), divotStart(), divotEnd());
</span><del>-            generator.emitJump(end.get());
-
</del><span class="cx">             m_args-&gt;m_listNode = oldList;
</span><span class="cx">         } else {
</span><span class="cx">             RefPtr&lt;RegisterID&gt; realFunction = generator.emitMove(generator.tempDestination(dst), base.get());
</span><span class="cx">             CallArguments callArguments(generator, m_args);
</span><span class="cx">             generator.emitLoad(callArguments.thisRegister(), jsUndefined());
</span><span class="cx">             generator.emitCall(returnValue.get(), realFunction.get(), NoExpectedFunction, callArguments, divot(), divotStart(), divotEnd());
</span><del>-            generator.emitJump(end.get());
</del><span class="cx">         }
</span><span class="cx">     }
</span><del>-    generator.emitLabel(realCall.get());
-    {
-        CallArguments callArguments(generator, m_args);
-        generator.emitMove(callArguments.thisRegister(), base.get());
-        generator.emitCall(returnValue.get(), function.get(), NoExpectedFunction, callArguments, divot(), divotStart(), divotEnd());
</del><ins>+    if (emitCallCheck) {
+        generator.emitJump(end.get());
+        generator.emitLabel(realCall.get());
+        {
+            CallArguments callArguments(generator, m_args);
+            generator.emitMove(callArguments.thisRegister(), base.get());
+            generator.emitCall(returnValue.get(), function.get(), NoExpectedFunction, callArguments, divot(), divotStart(), divotEnd());
+        }
+        generator.emitLabel(end.get());
</ins><span class="cx">     }
</span><del>-    generator.emitLabel(end.get());
</del><span class="cx">     return returnValue.get();
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -585,65 +588,67 @@
</span><span class="cx">     RefPtr&lt;Label&gt; end = generator.newLabel();
</span><span class="cx">     RefPtr&lt;RegisterID&gt; base = generator.emitNode(m_base);
</span><span class="cx">     generator.emitExpressionInfo(subexpressionDivot(), subexpressionStart(), subexpressionEnd());
</span><del>-    RefPtr&lt;RegisterID&gt; function = generator.emitGetById(generator.tempDestination(dst), base.get(), m_ident);
</del><ins>+    RefPtr&lt;RegisterID&gt; function;
</ins><span class="cx">     RefPtr&lt;RegisterID&gt; returnValue = generator.finalDestination(dst, function.get());
</span><del>-    generator.emitJumpIfNotFunctionApply(function.get(), realCall.get());
-    {
-        if (mayBeCall) {
-            if (m_args-&gt;m_listNode &amp;&amp; m_args-&gt;m_listNode-&gt;m_expr) {
-                ArgumentListNode* oldList = m_args-&gt;m_listNode;
-                if (m_args-&gt;m_listNode-&gt;m_next) {
-                    ASSERT(m_args-&gt;m_listNode-&gt;m_next-&gt;m_expr-&gt;isSimpleArray());
-                    ASSERT(!m_args-&gt;m_listNode-&gt;m_next-&gt;m_next);
-                    m_args-&gt;m_listNode = static_cast&lt;ArrayNode*&gt;(m_args-&gt;m_listNode-&gt;m_next-&gt;m_expr)-&gt;toArgumentList(generator.vm(), 0, 0);
-                    RefPtr&lt;RegisterID&gt; realFunction = generator.emitMove(generator.tempDestination(dst), base.get());
-                    CallArguments callArguments(generator, m_args);
-                    generator.emitNode(callArguments.thisRegister(), oldList-&gt;m_expr);
-                    generator.emitCall(returnValue.get(), realFunction.get(), NoExpectedFunction, callArguments, divot(), divotStart(), divotEnd());
-                } else {
-                    m_args-&gt;m_listNode = m_args-&gt;m_listNode-&gt;m_next;
-                    RefPtr&lt;RegisterID&gt; realFunction = generator.emitMove(generator.tempDestination(dst), base.get());
-                    CallArguments callArguments(generator, m_args);
-                    generator.emitNode(callArguments.thisRegister(), oldList-&gt;m_expr);
-                    generator.emitCall(returnValue.get(), realFunction.get(), NoExpectedFunction, callArguments, divot(), divotStart(), divotEnd());
-                }
-                m_args-&gt;m_listNode = oldList;
</del><ins>+    bool emitCallCheck = !generator.isBuiltinFunction();
+    if (emitCallCheck) {
+        function = generator.emitGetById(generator.tempDestination(dst), base.get(), generator.propertyNames().apply);
+        generator.emitJumpIfNotFunctionApply(function.get(), realCall.get());
+    }
+    if (mayBeCall) {
+        if (m_args-&gt;m_listNode &amp;&amp; m_args-&gt;m_listNode-&gt;m_expr) {
+            ArgumentListNode* oldList = m_args-&gt;m_listNode;
+            if (m_args-&gt;m_listNode-&gt;m_next) {
+                ASSERT(m_args-&gt;m_listNode-&gt;m_next-&gt;m_expr-&gt;isSimpleArray());
+                ASSERT(!m_args-&gt;m_listNode-&gt;m_next-&gt;m_next);
+                m_args-&gt;m_listNode = static_cast&lt;ArrayNode*&gt;(m_args-&gt;m_listNode-&gt;m_next-&gt;m_expr)-&gt;toArgumentList(generator.vm(), 0, 0);
+                RefPtr&lt;RegisterID&gt; realFunction = generator.emitMove(generator.tempDestination(dst), base.get());
+                CallArguments callArguments(generator, m_args);
+                generator.emitNode(callArguments.thisRegister(), oldList-&gt;m_expr);
+                generator.emitCall(returnValue.get(), realFunction.get(), NoExpectedFunction, callArguments, divot(), divotStart(), divotEnd());
</ins><span class="cx">             } else {
</span><ins>+                m_args-&gt;m_listNode = m_args-&gt;m_listNode-&gt;m_next;
</ins><span class="cx">                 RefPtr&lt;RegisterID&gt; realFunction = generator.emitMove(generator.tempDestination(dst), base.get());
</span><span class="cx">                 CallArguments callArguments(generator, m_args);
</span><del>-                generator.emitLoad(callArguments.thisRegister(), jsUndefined());
</del><ins>+                generator.emitNode(callArguments.thisRegister(), oldList-&gt;m_expr);
</ins><span class="cx">                 generator.emitCall(returnValue.get(), realFunction.get(), NoExpectedFunction, callArguments, divot(), divotStart(), divotEnd());
</span><span class="cx">             }
</span><ins>+            m_args-&gt;m_listNode = oldList;
</ins><span class="cx">         } else {
</span><del>-            ASSERT(m_args-&gt;m_listNode &amp;&amp; m_args-&gt;m_listNode-&gt;m_next);
-            RefPtr&lt;RegisterID&gt; profileHookRegister;
-            if (generator.shouldEmitProfileHooks())
-                profileHookRegister = generator.newTemporary();
</del><span class="cx">             RefPtr&lt;RegisterID&gt; realFunction = generator.emitMove(generator.tempDestination(dst), base.get());
</span><del>-            RefPtr&lt;RegisterID&gt; thisRegister = generator.emitNode(m_args-&gt;m_listNode-&gt;m_expr);
-            RefPtr&lt;RegisterID&gt; argsRegister;
-            ArgumentListNode* args = m_args-&gt;m_listNode-&gt;m_next;
-            if (args-&gt;m_expr-&gt;isResolveNode() &amp;&amp; generator.willResolveToArguments(static_cast&lt;ResolveNode*&gt;(args-&gt;m_expr)-&gt;identifier()))
-                argsRegister = generator.uncheckedRegisterForArguments();
-            else
-                argsRegister = generator.emitNode(args-&gt;m_expr);
</del><ins>+            CallArguments callArguments(generator, m_args);
+            generator.emitLoad(callArguments.thisRegister(), jsUndefined());
+            generator.emitCall(returnValue.get(), realFunction.get(), NoExpectedFunction, callArguments, divot(), divotStart(), divotEnd());
+        }
+    } else {
+        ASSERT(m_args-&gt;m_listNode &amp;&amp; m_args-&gt;m_listNode-&gt;m_next);
+        RefPtr&lt;RegisterID&gt; profileHookRegister;
+        if (generator.shouldEmitProfileHooks())
+            profileHookRegister = generator.newTemporary();
+        RefPtr&lt;RegisterID&gt; realFunction = generator.emitMove(generator.tempDestination(dst), base.get());
+        RefPtr&lt;RegisterID&gt; thisRegister = generator.emitNode(m_args-&gt;m_listNode-&gt;m_expr);
+        RefPtr&lt;RegisterID&gt; argsRegister;
+        ArgumentListNode* args = m_args-&gt;m_listNode-&gt;m_next;
+        if (args-&gt;m_expr-&gt;isResolveNode() &amp;&amp; generator.willResolveToArguments(static_cast&lt;ResolveNode*&gt;(args-&gt;m_expr)-&gt;identifier()))
+            argsRegister = generator.uncheckedRegisterForArguments();
+        else
+            argsRegister = generator.emitNode(args-&gt;m_expr);
</ins><span class="cx"> 
</span><del>-            // Function.prototype.apply ignores extra arguments, but we still
-            // need to evaluate them for side effects.
-            while ((args = args-&gt;m_next))
-                generator.emitNode(args-&gt;m_expr);
</del><ins>+        // Function.prototype.apply ignores extra arguments, but we still
+        // need to evaluate them for side effects.
+        while ((args = args-&gt;m_next))
+            generator.emitNode(args-&gt;m_expr);
</ins><span class="cx"> 
</span><del>-            generator.emitCallVarargs(returnValue.get(), realFunction.get(), thisRegister.get(), argsRegister.get(), generator.newTemporary(), profileHookRegister.get(), divot(), divotStart(), divotEnd());
-        }
</del><ins>+        generator.emitCallVarargs(returnValue.get(), realFunction.get(), thisRegister.get(), argsRegister.get(), generator.newTemporary(), profileHookRegister.get(), divot(), divotStart(), divotEnd());
+    }
+    if (emitCallCheck) {
</ins><span class="cx">         generator.emitJump(end.get());
</span><del>-    }
-    generator.emitLabel(realCall.get());
-    {
</del><ins>+        generator.emitLabel(realCall.get());
</ins><span class="cx">         CallArguments callArguments(generator, m_args);
</span><span class="cx">         generator.emitMove(callArguments.thisRegister(), base.get());
</span><span class="cx">         generator.emitCall(returnValue.get(), function.get(), NoExpectedFunction, callArguments, divot(), divotStart(), divotEnd());
</span><ins>+        generator.emitLabel(end.get());
</ins><span class="cx">     }
</span><del>-    generator.emitLabel(end.get());
</del><span class="cx">     return returnValue.get();
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorecreate_hash_table"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/create_hash_table (163959 => 163960)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/create_hash_table        2014-02-12 17:10:25 UTC (rev 163959)
+++ trunk/Source/JavaScriptCore/create_hash_table        2014-02-12 17:14:23 UTC (rev 163960)
</span><span class="lines">@@ -248,7 +248,9 @@
</span><span class="cx">     my $nameEntries = &quot;${name}Values&quot;;
</span><span class="cx">     $nameEntries =~ s/:/_/g;
</span><span class="cx"> 
</span><ins>+    print &quot;\n#include \&quot;JSCBuiltins.h\&quot;\n&quot;;
</ins><span class="cx">     print &quot;\n#include \&quot;Lookup.h\&quot;\n&quot; if ($includelookup);
</span><ins>+
</ins><span class="cx">     if ($useNameSpace) {
</span><span class="cx">         print &quot;\nnamespace ${useNameSpace} {\n&quot;;
</span><span class="cx">         print &quot;\nusing namespace JSC;\n&quot;;
</span><span class="lines">@@ -289,7 +291,17 @@
</span><span class="cx">             $intrinsic = &quot;RegExpTestIntrinsic&quot; if ($key eq &quot;test&quot;);
</span><span class="cx">         }
</span><span class="cx"> 
</span><ins>+        if ($values[$i]{&quot;type&quot;} eq &quot;Function&quot;)  {
+            my $tableHead = $name;
+            $tableHead =~ s/Table$//;
+            print &quot; #if JSC_BUILTIN_EXISTS(&quot; . uc($tableHead . $key) .&quot;)\n&quot;;
+            print &quot;   { \&quot;$key\&quot;, (($attrs[$i]) &amp; ~Function) | Builtin, $intrinsic, (intptr_t)static_cast&lt;BuiltinGenerator&gt;(&quot; . $tableHead . ucfirst($key) . &quot;CodeGenerator), (intptr_t)$secondValue },\n&quot;;
+            print &quot; #else\n&quot;
+        }
</ins><span class="cx">         print &quot;   { \&quot;$key\&quot;, $attrs[$i], $intrinsic, (intptr_t)&quot; . $firstCastStr . &quot;($firstValue), (intptr_t)&quot; . $secondCastStr . &quot;($secondValue) },\n&quot;;
</span><ins>+        if ($values[$i]{&quot;type&quot;} eq &quot;Function&quot;)  {
+            print &quot; #endif\n&quot;
+        }
</ins><span class="cx">         $i++;
</span><span class="cx">     }
</span><span class="cx">     print &quot;   { 0, 0, NoIntrinsic, 0, 0 }\n&quot;;
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoregeneratejsbuiltins"></a>
<div class="addfile"><h4>Added: trunk/Source/JavaScriptCore/generate-js-builtins (0 => 163960)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/generate-js-builtins                                (rev 0)
+++ trunk/Source/JavaScriptCore/generate-js-builtins        2014-02-12 17:14:23 UTC (rev 163960)
</span><span class="lines">@@ -0,0 +1,304 @@
</span><ins>+#!/usr/bin/python
+# 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.
+
+import filecmp
+import fnmatch
+import os
+import re
+import shutil
+import sys
+import datetime
+import json
+
+copyrightText = &quot;&quot;&quot; *
+ * 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. 
+ */\n
+&quot;&quot;&quot;
+
+generatorString = &quot;/* Generated by %s do not hand edit. */\n&quot; % os.path.basename(__file__)
+
+functionHeadRegExp = re.compile(r&quot;function\s+\w+\s*\(.*?\)&quot;, re.MULTILINE | re.S)
+functionNameRegExp = re.compile(r&quot;function\s+(\w+)\s*\(&quot;, re.MULTILINE | re.S)
+functionParameterFinder = re.compile(r&quot;^function\s+(?:\w+)\s*\(((?:\s*\w+)?\s*(?:\s*,\s*\w+)*)?\)&quot;, re.MULTILINE | re.S)
+
+multilineCommentRegExp = re.compile(r&quot;\/\*.*?\*\/&quot;, re.MULTILINE | re.S)
+singleLineCommentRegExp = re.compile(r&quot;\/\/.*?\n&quot;, re.MULTILINE | re.S)
+
+def getCopyright(source):
+    copyrightBlock = multilineCommentRegExp.findall(source)[0]
+    copyrightBlock = copyrightBlock[:copyrightBlock.index(&quot;Redistribution&quot;)]
+    copyRightLines = []
+
+    for line in copyrightBlock.split(&quot;\n&quot;):
+        line = line.replace(&quot;/*&quot;, &quot;&quot;)
+        line = line.replace(&quot;*/&quot;, &quot;&quot;)
+        line = line.replace(&quot;*&quot;, &quot;&quot;)
+        line = line.replace(&quot;Copyright&quot;, &quot;&quot;)
+        line = line.replace(&quot;copyright&quot;, &quot;&quot;)
+        line = line.replace(&quot;(C)&quot;, &quot;&quot;)
+        line = line.replace(&quot;(c)&quot;, &quot;&quot;)
+        line = line.strip()
+        if len(line) == 0:
+            continue
+
+        copyRightLines.append(line)
+    
+    return list(set(copyRightLines))
+
+
+
+def getFunctions(source):
+
+    source = multilineCommentRegExp.sub(&quot;/**/&quot;, singleLineCommentRegExp.sub(&quot;//\n&quot;, source))
+
+    matches = [ f for f in functionHeadRegExp.finditer(source)]
+    functionBounds = []
+    start = 0
+    end = 0
+    for match in matches:
+        start = match.start()
+        if start &lt; end:
+            continue
+        end = match.end()
+        while source[end] != '{':
+            end = end + 1
+        depth = 1
+        end = end + 1
+        while depth &gt; 0:
+            if source[end] == '{':
+                depth = depth + 1
+            elif source[end] == '}':
+                depth = depth - 1
+            end = end + 1
+        functionBounds.append((start, end))
+
+    functions = [source[start:end].strip() for (start, end) in functionBounds]
+    result = []
+    for function in functions:
+        function = multilineCommentRegExp.sub(&quot;&quot;, function)
+        functionName = functionNameRegExp.findall(function)[0]
+        functionParameters = functionParameterFinder.findall(function)[0].split(',')
+        if len(functionParameters[0]) == 0:
+            functionParameters = []
+            
+        result.append((functionName, function, functionParameters))
+    return result
+        
+
+def generateCode(source):
+    inputFile = open(source, &quot;r&quot;)
+    baseName = os.path.basename(source).replace(&quot;.js&quot;, &quot;&quot;)
+    
+    source = &quot;&quot;
+    for line in inputFile:
+        source = source + line
+    
+    if sys.platform == &quot;cygwin&quot;:
+        source = source.replace(&quot;\r\n&quot;, &quot;\n&quot;)
+    return (baseName, getFunctions(source), getCopyright(source))
+
+def mangleName(object, name):
+    qName = object + &quot;.&quot; + name
+    mangledName = &quot;&quot;
+    i = 0
+    while i &lt; len(qName):
+        if qName[i] == '.':
+            mangledName = mangledName + qName[i + 1].upper()
+            i = i + 1
+        else:
+            mangledName = mangledName + qName[i]
+        i = i + 1
+    return mangledName
+
+builtins = []
+
+baseName = sys.argv[-1]
+builtin_definitions = sys.argv[1:-1]
+(output_base, _) = os.path.splitext(sys.argv[-1])
+
+copyrights = []
+for file in builtin_definitions:
+    if fnmatch.fnmatch(file, '*.js'):
+        (baseName, functions, objectCopyrights) = generateCode(file)
+        copyrights.extend(objectCopyrights)
+        builtins.append((baseName, functions))
+
+copyrights = list(set(copyrights))
+
+copyrightBody = &quot;&quot;
+for copyright in copyrights:
+    copyrightBody = copyrightBody +&quot; * Copyright (C) &quot; + copyright + &quot;\n&quot;
+
+builtinsHeader = open(output_base + &quot;.h.tmp&quot;, &quot;w&quot;)
+builtinsImplementation = open(output_base + &quot;.cpp.tmp&quot;, &quot;w&quot;)
+copyrightText = &quot;/*\n&quot; + copyrightBody + copyrightText
+builtinsHeader.write(&quot;&quot;&quot;%s
+%s
+
+#ifndef JSCBuiltins_H
+#define JSCBuiltins_H
+
+namespace JSC {
+
+class FunctionExecutable;
+class Identifier;
+class JSGlobalObject;
+class SourceCode;
+class UnlinkedFunctionExecutable;
+class VM;
+
+FunctionExecutable* createBuiltinExecutable(VM&amp;, UnlinkedFunctionExecutable*, const SourceCode&amp;);
+
+&quot;&quot;&quot; % (generatorString, copyrightText))
+
+codeReferences = []
+
+for (objectName, functions) in builtins:
+    print(&quot;Generating bindings for the %s builtin.&quot; % objectName)
+    builtinsHeader.write(&quot;/* %s functions */\n&quot; % objectName)
+    for (name, implementation, _) in functions:
+        mangledName = mangleName(objectName, name)
+        mangledName = mangledName[0].lower() + mangledName[1:] + &quot;Code&quot;
+        codeReferences.append((mangledName, name, implementation))
+        builtinsHeader.write(&quot;extern const char* s_%s;\n&quot; % mangledName)
+        builtinsHeader.write(&quot;extern const int s_%sLength;\n&quot; % mangledName)
+    builtinsHeader.write(&quot;\n&quot;)
+    builtinsHeader.write(&quot;#define JSC_FOREACH_%s_BUILTIN(macro) \\\n&quot; % objectName.replace(&quot;.&quot;, &quot;_&quot;).upper())
+    for (name, implementation, arguments) in functions:
+        mangledName = mangleName(objectName, name)
+        builtinsHeader.write(&quot;    macro(%s, %s, %d) \\\n&quot; % (name, mangledName, len(arguments)))
+    builtinsHeader.write(&quot;\n&quot;)
+    for (name, implementation, arguments) in functions:
+        builtinsHeader.write(&quot;#define JSC_BUILTIN_%s 1\n&quot; % mangleName(objectName, name).upper())
+    builtinsHeader.write(&quot;\n\n&quot;)
+names = []
+builtinsHeader.write(&quot;#define JSC_FOREACH_BUILTIN(macro)\\\n&quot;)
+for (codeReference, functionName, source) in codeReferences:
+    builtinsHeader.write(&quot;    macro(%s, %s, s_%sLength) \\\n&quot; % (codeReference, functionName, codeReference))
+    names.append(functionName)
+
+builtinsHeader.write(&quot;\n\n&quot;)
+builtinsHeader.write(&quot;#define JSC_FOREACH_BUILTIN_FUNCTION_NAME(macro) \\\n&quot;)
+for name in sorted(set(names)):
+    builtinsHeader.write(&quot;    macro(%s) \\\n&quot; % name)
+builtinsHeader.write(&quot;&quot;&quot;
+
+#define JSC_DECLARE_BUILTIN_GENERATOR(codeName, functionName, argumentCount) \\
+    FunctionExecutable* codeName##Generator(VM&amp;);
+
+JSC_FOREACH_BUILTIN(JSC_DECLARE_BUILTIN_GENERATOR)
+#undef JSC_DECLARE_BUILTIN_GENERATOR
+
+#define JSC_BUILTIN_EXISTS(name) defined JSC_BUILTIN_ ## name
+
+}
+
+#endif
+
+&quot;&quot;&quot;)
+
+builtinsImplementation.write(&quot;&quot;&quot;%s
+%s
+
+#include &quot;config.h&quot;
+
+#include &quot;JSCBuiltins.h&quot;
+
+#include &quot;BuiltinExecutables.h&quot;
+#include &quot;Executable.h&quot;
+#include &quot;JSCellInlines.h&quot;
+#include &quot;VM.h&quot;
+
+namespace JSC {
+
+&quot;&quot;&quot;  % (generatorString, copyrightText))
+
+for (codeReference, name, source) in codeReferences:
+    source = &quot;(function &quot; + source[source.index(&quot;(&quot;):] + &quot;)&quot;
+    lines = json.dumps(source)[1:-1].split(&quot;\\n&quot;)
+    sourceLength = len(source)
+    source = &quot;&quot;
+    for line in lines:
+        source = source + (&quot;    \&quot;%s\\n\&quot; \\\n&quot; % line)
+    builtinsImplementation.write(&quot;const char* s_%s =\n%s;\n\n&quot; % (codeReference, source))
+    builtinsImplementation.write(&quot;const int s_%sLength = %d;\n\n&quot; % (codeReference, sourceLength + 1)) # + 1 for \n
+
+builtinsImplementation.write(&quot;&quot;&quot;
+FunctionExecutable* createBuiltinExecutable(VM&amp; vm, UnlinkedFunctionExecutable* unlinkedExecutable, const SourceCode&amp; source)
+{
+    unsigned lineCount = unlinkedExecutable-&gt;lineCount();
+    unsigned startColumn = 1;
+    unsigned sourceLength = unlinkedExecutable-&gt;sourceLength();
+    bool endColumnIsOnStartLine = !lineCount;
+    unsigned endColumnExcludingBraces = unlinkedExecutable-&gt;unlinkedBodyEndColumn() + (endColumnIsOnStartLine ? 0 : 1);
+    unsigned startOffset = unlinkedExecutable-&gt;startOffset();
+    unsigned startOffsetExcludingOpenBrace = startOffset + 1;
+    unsigned endOffsetExcludingCloseBrace = startOffset + sourceLength - 1;
+    SourceCode bodySource(source.provider(), startOffsetExcludingOpenBrace, endOffsetExcludingCloseBrace, 0, startColumn);
+    return FunctionExecutable::create(vm, bodySource, unlinkedExecutable, 0, lineCount, startColumn, endColumnExcludingBraces, false);
+}
+
+#define JSC_DEFINE_BUILTIN_GENERATOR(codeName, functionName, argumentCount) \\
+FunctionExecutable* codeName##Generator(VM&amp; vm) \\
+{ \\
+    return createBuiltinExecutable(vm, vm.builtinExecutables()-&gt;codeName##Executable(), vm.builtinExecutables()-&gt;codeName##Source()); \\
+}
+
+JSC_FOREACH_BUILTIN(JSC_DEFINE_BUILTIN_GENERATOR)
+#undef JSC_DEFINE_BUILTIN_GENERATOR
+}
+
+&quot;&quot;&quot;)
+
+builtinsHeader.close()
+builtinsImplementation.close()
+
+if (not os.path.exists(output_base + &quot;.h&quot;)) or (not filecmp.cmp(output_base + &quot;.h.tmp&quot;, output_base + &quot;.h&quot;, shallow=False)):
+    os.rename(output_base + &quot;.h.tmp&quot;, output_base + &quot;.h&quot;)
+else:
+    os.remove(output_base + &quot;.h.tmp&quot;)
+
+if (not os.path.exists(output_base + &quot;.cpp&quot;)) or (not filecmp.cmp(output_base + &quot;.cpp.tmp&quot;, output_base + &quot;.cpp&quot;, shallow=False)):
+    os.rename(output_base + &quot;.cpp.tmp&quot;, output_base + &quot;.cpp&quot;)
+else:
+    os.remove(output_base + &quot;.cpp.tmp&quot;)
</ins></span></pre></div>
<a id="trunkSourceJavaScriptCoreinterpreterCachedCallh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/interpreter/CachedCall.h (163959 => 163960)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/interpreter/CachedCall.h        2014-02-12 17:10:25 UTC (rev 163959)
+++ trunk/Source/JavaScriptCore/interpreter/CachedCall.h        2014-02-12 17:14:23 UTC (rev 163960)
</span><span class="lines">@@ -43,7 +43,7 @@
</span><span class="cx">             , m_interpreter(callFrame-&gt;interpreter())
</span><span class="cx">             , m_entryScope(callFrame-&gt;vm(), function-&gt;scope()-&gt;globalObject())
</span><span class="cx">         {
</span><del>-            ASSERT(!function-&gt;isHostFunction());
</del><ins>+            ASSERT(!function-&gt;isHostFunctionNonInline());
</ins><span class="cx">             if (callFrame-&gt;vm().isSafeToRecurse()) {
</span><span class="cx">                 m_arguments.resize(argumentCount);
</span><span class="cx">                 m_closure = m_interpreter-&gt;prepareForRepeatCall(function-&gt;jsExecutable(), callFrame, &amp;m_protoCallFrame, function, argumentCount + 1, function-&gt;scope(), m_arguments.data());
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreparserASTBuilderh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/parser/ASTBuilder.h (163959 => 163960)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/parser/ASTBuilder.h        2014-02-12 17:10:25 UTC (rev 163959)
+++ trunk/Source/JavaScriptCore/parser/ASTBuilder.h        2014-02-12 17:14:23 UTC (rev 163960)
</span><span class="lines">@@ -888,9 +888,9 @@
</span><span class="cx">     ASSERT(func-&gt;isDotAccessorNode());
</span><span class="cx">     DotAccessorNode* dot = static_cast&lt;DotAccessorNode*&gt;(func);
</span><span class="cx">     FunctionCallDotNode* node;
</span><del>-    if (dot-&gt;identifier() == m_vm-&gt;propertyNames-&gt;call)
</del><ins>+    if (dot-&gt;identifier() == m_vm-&gt;propertyNames-&gt;call || dot-&gt;identifier() == m_vm-&gt;propertyNames-&gt;callPrivateName)
</ins><span class="cx">         node = new (m_vm) CallFunctionCallDotNode(location, dot-&gt;base(), dot-&gt;identifier(), args, divot, divotStart, divotEnd);
</span><del>-    else if (dot-&gt;identifier() == m_vm-&gt;propertyNames-&gt;apply)
</del><ins>+    else if (dot-&gt;identifier() == m_vm-&gt;propertyNames-&gt;apply || dot-&gt;identifier() == m_vm-&gt;propertyNames-&gt;applyPrivateName)
</ins><span class="cx">         node = new (m_vm) ApplyFunctionCallDotNode(location, dot-&gt;base(), dot-&gt;identifier(), args, divot, divotStart, divotEnd);
</span><span class="cx">     else
</span><span class="cx">         node = new (m_vm) FunctionCallDotNode(location, dot-&gt;base(), dot-&gt;identifier(), args, divot, divotStart, divotEnd);
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreparserLexercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/parser/Lexer.cpp (163959 => 163960)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/parser/Lexer.cpp        2014-02-12 17:10:25 UTC (rev 163959)
+++ trunk/Source/JavaScriptCore/parser/Lexer.cpp        2014-02-12 17:14:23 UTC (rev 163960)
</span><span class="lines">@@ -91,6 +91,7 @@
</span><span class="cx"> 
</span><span class="cx">     // Other types (only one so far)
</span><span class="cx">     CharacterWhiteSpace,
</span><ins>+    CharacterPrivateIdentifierStart
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> // 256 Latin-1 codes
</span><span class="lines">@@ -159,7 +160,7 @@
</span><span class="cx"> /*  61 - =                  */ CharacterEqual,
</span><span class="cx"> /*  62 - &gt;                  */ CharacterGreater,
</span><span class="cx"> /*  63 - ?                  */ CharacterQuestion,
</span><del>-/*  64 - @                  */ CharacterInvalid,
</del><ins>+/*  64 - @                  */ CharacterPrivateIdentifierStart,
</ins><span class="cx"> /*  65 - A                  */ CharacterIdentifierStart,
</span><span class="cx"> /*  66 - B                  */ CharacterIdentifierStart,
</span><span class="cx"> /*  67 - C                  */ CharacterIdentifierStart,
</span><span class="lines">@@ -487,9 +488,10 @@
</span><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> template &lt;typename T&gt;
</span><del>-Lexer&lt;T&gt;::Lexer(VM* vm)
</del><ins>+Lexer&lt;T&gt;::Lexer(VM* vm, JSParserStrictness strictness)
</ins><span class="cx">     : m_isReparsing(false)
</span><span class="cx">     , m_vm(vm)
</span><ins>+    , m_parsingBuiltinFunction(strictness == JSParseBuiltin)
</ins><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -754,7 +756,27 @@
</span><span class="cx">     ASSERT(c &lt;= static_cast&lt;int&gt;(USHRT_MAX));
</span><span class="cx">     m_buffer16.append(static_cast&lt;UChar&gt;(c));
</span><span class="cx"> }
</span><del>-
</del><ins>+    
+#if !ASSERT_DISABLED
+bool isSafeBuiltinIdentifier(VM&amp; vm, const Identifier* ident)
+{
+    if (!ident)
+        return true;
+    /* Just block any use of suspicious identifiers.  This is intended to
+     * be used as a safety net while implementing builtins.
+     */
+    if (*ident == vm.propertyNames-&gt;call)
+        return false;
+    if (*ident == vm.propertyNames-&gt;apply)
+        return false;
+    if (*ident == vm.propertyNames-&gt;eval)
+        return false;
+    if (*ident == vm.propertyNames-&gt;Function)
+        return false;
+    return true;
+}
+#endif
+    
</ins><span class="cx"> template &lt;&gt;
</span><span class="cx"> template &lt;bool shouldCreateIdentifier&gt; ALWAYS_INLINE JSTokenType Lexer&lt;LChar&gt;::parseIdentifier(JSTokenData* tokenData, unsigned lexerFlags, bool strictMode)
</span><span class="cx"> {
</span><span class="lines">@@ -766,7 +788,11 @@
</span><span class="cx">             return keyword == RESERVED_IF_STRICT &amp;&amp; !strictMode ? IDENT : keyword;
</span><span class="cx">         }
</span><span class="cx">     }
</span><del>-
</del><ins>+    
+    bool isPrivateName = m_current == '@' &amp;&amp; m_parsingBuiltinFunction;
+    if (isPrivateName)
+        shift();
+    
</ins><span class="cx">     const LChar* identifierStart = currentSourcePtr();
</span><span class="cx">     unsigned identifierLineStart = currentLineStartOffset();
</span><span class="cx">     
</span><span class="lines">@@ -780,15 +806,26 @@
</span><span class="cx"> 
</span><span class="cx">     const Identifier* ident = 0;
</span><span class="cx">     
</span><del>-    if (shouldCreateIdentifier) {
</del><ins>+    if (shouldCreateIdentifier || m_parsingBuiltinFunction) {
</ins><span class="cx">         int identifierLength = currentSourcePtr() - identifierStart;
</span><span class="cx">         ident = makeIdentifier(identifierStart, identifierLength);
</span><del>-
</del><ins>+        if (m_parsingBuiltinFunction) {
+            if (!isSafeBuiltinIdentifier(*m_vm, ident) &amp;&amp; !isPrivateName) {
+                m_lexErrorMessage = makeString(&quot;The use of '&quot;, ident-&gt;string(), &quot;' is disallowed in builtin functions.&quot;);
+                return ERRORTOK;
+            }
+            if (isPrivateName)
+                ident = m_vm-&gt;propertyNames-&gt;getPrivateName(*ident);
+            else if (*ident == m_vm-&gt;propertyNames-&gt;undefinedKeyword)
+                tokenData-&gt;ident = &amp;m_vm-&gt;propertyNames-&gt;undefinedPrivateName;
+            if (!ident)
+                return INVALID_PRIVATE_NAME_ERRORTOK;
+        }
</ins><span class="cx">         tokenData-&gt;ident = ident;
</span><span class="cx">     } else
</span><span class="cx">         tokenData-&gt;ident = 0;
</span><span class="cx"> 
</span><del>-    if (UNLIKELY((remaining &lt; maxTokenLength) &amp;&amp; !(lexerFlags &amp; LexerFlagsIgnoreReservedWords))) {
</del><ins>+    if (UNLIKELY((remaining &lt; maxTokenLength) &amp;&amp; !(lexerFlags &amp; LexerFlagsIgnoreReservedWords)) &amp;&amp; !isPrivateName) {
</ins><span class="cx">         ASSERT(shouldCreateIdentifier);
</span><span class="cx">         if (remaining &lt; maxTokenLength) {
</span><span class="cx">             const HashEntry* entry = m_vm-&gt;keywords-&gt;getKeyword(*ident);
</span><span class="lines">@@ -815,6 +852,10 @@
</span><span class="cx">             return keyword == RESERVED_IF_STRICT &amp;&amp; !strictMode ? IDENT : keyword;
</span><span class="cx">         }
</span><span class="cx">     }
</span><ins>+    
+    bool isPrivateName = m_current == '@' &amp;&amp; m_parsingBuiltinFunction;
+    if (isPrivateName)
+        shift();
</ins><span class="cx"> 
</span><span class="cx">     const UChar* identifierStart = currentSourcePtr();
</span><span class="cx">     int identifierLineStart = currentLineStartOffset();
</span><span class="lines">@@ -827,6 +868,7 @@
</span><span class="cx">     }
</span><span class="cx">     
</span><span class="cx">     if (UNLIKELY(m_current == '\\')) {
</span><ins>+        ASSERT(!isPrivateName);
</ins><span class="cx">         setOffsetFromSourcePtr(identifierStart, identifierLineStart);
</span><span class="cx">         return parseIdentifierSlowCase&lt;shouldCreateIdentifier&gt;(tokenData, lexerFlags, strictMode);
</span><span class="cx">     }
</span><span class="lines">@@ -838,18 +880,29 @@
</span><span class="cx"> 
</span><span class="cx">     const Identifier* ident = 0;
</span><span class="cx">     
</span><del>-    if (shouldCreateIdentifier) {
</del><ins>+    if (shouldCreateIdentifier || m_parsingBuiltinFunction) {
</ins><span class="cx">         int identifierLength = currentSourcePtr() - identifierStart;
</span><span class="cx">         if (isAll8Bit)
</span><span class="cx">             ident = makeIdentifierLCharFromUChar(identifierStart, identifierLength);
</span><span class="cx">         else
</span><span class="cx">             ident = makeIdentifier(identifierStart, identifierLength);
</span><del>-        
</del><ins>+        if (m_parsingBuiltinFunction) {
+            if (!isSafeBuiltinIdentifier(*m_vm, ident) &amp;&amp; !isPrivateName) {
+                m_lexErrorMessage = makeString(&quot;The use of '&quot;, ident-&gt;string(), &quot;' is disallowed in builtin functions.&quot;);
+                return ERRORTOK;
+            }
+            if (isPrivateName)
+                ident = m_vm-&gt;propertyNames-&gt;getPrivateName(*ident);
+            else if (*ident == m_vm-&gt;propertyNames-&gt;undefinedKeyword)
+                tokenData-&gt;ident = &amp;m_vm-&gt;propertyNames-&gt;undefinedPrivateName;
+            if (!ident)
+                return INVALID_PRIVATE_NAME_ERRORTOK;
+        }
</ins><span class="cx">         tokenData-&gt;ident = ident;
</span><span class="cx">     } else
</span><span class="cx">         tokenData-&gt;ident = 0;
</span><span class="cx">     
</span><del>-    if (UNLIKELY((remaining &lt; maxTokenLength) &amp;&amp; !(lexerFlags &amp; LexerFlagsIgnoreReservedWords))) {
</del><ins>+    if (UNLIKELY((remaining &lt; maxTokenLength) &amp;&amp; !(lexerFlags &amp; LexerFlagsIgnoreReservedWords)) &amp;&amp; !isPrivateName) {
</ins><span class="cx">         ASSERT(shouldCreateIdentifier);
</span><span class="cx">         if (remaining &lt; maxTokenLength) {
</span><span class="cx">             const HashEntry* entry = m_vm-&gt;keywords-&gt;getKeyword(*ident);
</span><span class="lines">@@ -1659,6 +1712,7 @@
</span><span class="cx">         ASSERT(isIdentStart(m_current));
</span><span class="cx">         FALLTHROUGH;
</span><span class="cx">     case CharacterBackSlash:
</span><ins>+        parseIdent:
</ins><span class="cx">         if (lexerFlags &amp; LexexFlagsDontBuildKeywords)
</span><span class="cx">             token = parseIdentifier&lt;false&gt;(tokenData, lexerFlags, strictMode);
</span><span class="cx">         else
</span><span class="lines">@@ -1671,6 +1725,11 @@
</span><span class="cx">         m_terminator = true;
</span><span class="cx">         m_lineStart = m_code;
</span><span class="cx">         goto start;
</span><ins>+    case CharacterPrivateIdentifierStart:
+        if (m_parsingBuiltinFunction)
+            goto parseIdent;
+
+        FALLTHROUGH;
</ins><span class="cx">     case CharacterInvalid:
</span><span class="cx">         m_lexErrorMessage = invalidCharacterMessage();
</span><span class="cx">         token = ERRORTOK;
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreparserLexerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/parser/Lexer.h (163959 => 163960)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/parser/Lexer.h        2014-02-12 17:10:25 UTC (rev 163959)
+++ trunk/Source/JavaScriptCore/parser/Lexer.h        2014-02-12 17:14:23 UTC (rev 163960)
</span><span class="lines">@@ -71,7 +71,7 @@
</span><span class="cx">     WTF_MAKE_FAST_ALLOCATED;
</span><span class="cx"> 
</span><span class="cx"> public:
</span><del>-    Lexer(VM*);
</del><ins>+    Lexer(VM*, JSParserStrictness);
</ins><span class="cx">     ~Lexer();
</span><span class="cx"> 
</span><span class="cx">     // Character manipulation functions.
</span><span class="lines">@@ -237,6 +237,7 @@
</span><span class="cx">     IdentifierArena* m_arena;
</span><span class="cx"> 
</span><span class="cx">     VM* m_vm;
</span><ins>+    bool m_parsingBuiltinFunction;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> template &lt;&gt;
</span><span class="lines">@@ -335,6 +336,12 @@
</span><span class="cx">     return &amp;m_arena-&gt;makeIdentifierLCharFromUChar(m_vm, characters, length);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+#if ASSERT_DISABLED
+ALWAYS_INLINE bool isSafeBuiltinIdentifier(VM&amp;, const Identifier*) { return true; }
+#else
+bool isSafeBuiltinIdentifier(VM&amp;, const Identifier*);
+#endif
+
</ins><span class="cx"> template &lt;typename T&gt;
</span><span class="cx"> ALWAYS_INLINE JSTokenType Lexer&lt;T&gt;::lexExpectIdentifier(JSToken* tokenRecord, unsigned lexerFlags, bool strictMode)
</span><span class="cx"> {
</span><span class="lines">@@ -370,10 +377,15 @@
</span><span class="cx">     ASSERT(currentOffset() &gt;= currentLineStartOffset());
</span><span class="cx"> 
</span><span class="cx">     // Create the identifier if needed
</span><del>-    if (lexerFlags &amp; LexexFlagsDontBuildKeywords)
</del><ins>+    if (lexerFlags &amp; LexexFlagsDontBuildKeywords
+#if !ASSERT_DISABLED
+        &amp;&amp; !m_parsingBuiltinFunction
+#endif
+        )
</ins><span class="cx">         tokenData-&gt;ident = 0;
</span><span class="cx">     else
</span><span class="cx">         tokenData-&gt;ident = makeLCharIdentifier(start, ptr - start);
</span><ins>+
</ins><span class="cx">     tokenLocation-&gt;line = m_lineNumber;
</span><span class="cx">     tokenLocation-&gt;lineStartOffset = currentLineStartOffset();
</span><span class="cx">     tokenLocation-&gt;startOffset = offsetFromSourcePtr(start);
</span><span class="lines">@@ -381,6 +393,13 @@
</span><span class="cx">     ASSERT(tokenLocation-&gt;startOffset &gt;= tokenLocation-&gt;lineStartOffset);
</span><span class="cx">     tokenRecord-&gt;m_startPosition = startPosition;
</span><span class="cx">     tokenRecord-&gt;m_endPosition = currentPosition();
</span><ins>+#if !ASSERT_DISABLED
+    if (m_parsingBuiltinFunction) {
+        if (!isSafeBuiltinIdentifier(*m_vm, tokenData-&gt;ident))
+            return ERRORTOK;
+    }
+#endif
+
</ins><span class="cx">     m_lastToken = IDENT;
</span><span class="cx">     return IDENT;
</span><span class="cx">     
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreparserNodescpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/parser/Nodes.cpp (163959 => 163960)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/parser/Nodes.cpp        2014-02-12 17:10:25 UTC (rev 163959)
+++ trunk/Source/JavaScriptCore/parser/Nodes.cpp        2014-02-12 17:14:23 UTC (rev 163960)
</span><span class="lines">@@ -132,6 +132,12 @@
</span><span class="cx">     return node.release();
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+
+void ProgramNode::setClosedVariables(const Vector&lt;RefPtr&lt;StringImpl&gt;&gt;&amp;&amp; closedVariables)
+{
+    m_closedVariables = std::move(closedVariables);
+}
+
</ins><span class="cx"> // ------------------------------ EvalNode -----------------------------
</span><span class="cx"> 
</span><span class="cx"> inline EvalNode::EvalNode(VM* vm, const JSTokenLocation&amp; startLocation, const JSTokenLocation&amp; endLocation, unsigned endColumn, SourceElements* children, VarStack* varStack, FunctionStack* funcStack, IdentifierSet&amp; capturedVariables, const SourceCode&amp; source, CodeFeatures features, int numConstants)
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreparserNodesh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/parser/Nodes.h (163959 => 163960)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/parser/Nodes.h        2014-02-12 17:10:25 UTC (rev 163959)
+++ trunk/Source/JavaScriptCore/parser/Nodes.h        2014-02-12 17:14:23 UTC (rev 163960)
</span><span class="lines">@@ -1431,6 +1431,7 @@
</span><span class="cx">         bool needsActivation() const { return (hasCapturedVariables()) || (m_features &amp; (EvalFeature | WithFeature | CatchFeature)); }
</span><span class="cx">         bool hasCapturedVariables() const { return !!m_capturedVariables.size(); }
</span><span class="cx">         size_t capturedVariableCount() const { return m_capturedVariables.size(); }
</span><ins>+        const IdentifierSet&amp; capturedVariables() const { return m_capturedVariables; }
</ins><span class="cx">         bool captures(const Identifier&amp; ident) { return m_capturedVariables.contains(ident.impl()); }
</span><span class="cx"> 
</span><span class="cx">         VarStack&amp; varStack() { return m_varStack; }
</span><span class="lines">@@ -1446,6 +1447,8 @@
</span><span class="cx">         StatementNode* singleStatement() const;
</span><span class="cx"> 
</span><span class="cx">         void emitStatementsBytecode(BytecodeGenerator&amp;, RegisterID* destination);
</span><ins>+        
+        void setClosedVariables(const Vector&lt;RefPtr&lt;StringImpl&gt;&gt;&amp;&amp;) { }
</ins><span class="cx"> 
</span><span class="cx">     protected:
</span><span class="cx">         void setSource(const SourceCode&amp; source) { m_source = source; }
</span><span class="lines">@@ -1475,11 +1478,13 @@
</span><span class="cx"> 
</span><span class="cx">         static const bool scopeIsFunction = false;
</span><span class="cx"> 
</span><ins>+        void setClosedVariables(const Vector&lt;RefPtr&lt;StringImpl&gt;&gt;&amp;&amp;);
+        const Vector&lt;RefPtr&lt;StringImpl&gt;&gt;&amp; closedVariables() const { return m_closedVariables; }
</ins><span class="cx">     private:
</span><span class="cx">         ProgramNode(VM*, const JSTokenLocation&amp; start, const JSTokenLocation&amp; end, unsigned startColumn, unsigned endColumn, SourceElements*, VarStack*, FunctionStack*, IdentifierSet&amp;, const SourceCode&amp;, CodeFeatures, int numConstants);
</span><span class="cx"> 
</span><span class="cx">         virtual void emitBytecode(BytecodeGenerator&amp;, RegisterID* = 0) override;
</span><del>-
</del><ins>+        Vector&lt;RefPtr&lt;StringImpl&gt;&gt; m_closedVariables;
</ins><span class="cx">         unsigned m_startColumn;
</span><span class="cx">         unsigned m_endColumn;
</span><span class="cx">     };
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreparserParsercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/parser/Parser.cpp (163959 => 163960)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/parser/Parser.cpp        2014-02-12 17:10:25 UTC (rev 163959)
+++ trunk/Source/JavaScriptCore/parser/Parser.cpp        2014-02-12 17:14:23 UTC (rev 163960)
</span><span class="lines">@@ -205,8 +205,9 @@
</span><span class="cx">     , m_lastIdentifier(0)
</span><span class="cx">     , m_lastFunctionName(nullptr)
</span><span class="cx">     , m_sourceElements(0)
</span><ins>+    , m_parsingBuiltin(strictness == JSParseBuiltin)
</ins><span class="cx"> {
</span><del>-    m_lexer = adoptPtr(new LexerType(vm));
</del><ins>+    m_lexer = adoptPtr(new LexerType(vm, strictness));
</ins><span class="cx">     m_arena = m_vm-&gt;parserArena.get();
</span><span class="cx">     m_lexer-&gt;setCode(source, m_arena);
</span><span class="cx">     m_token.m_location.line = source.firstLine();
</span><span class="lines">@@ -271,6 +272,7 @@
</span><span class="cx">     IdentifierSet capturedVariables;
</span><span class="cx">     bool modifiedParameter = false;
</span><span class="cx">     scope-&gt;getCapturedVariables(capturedVariables, modifiedParameter);
</span><ins>+    
</ins><span class="cx">     CodeFeatures features = context.features();
</span><span class="cx">     if (scope-&gt;strictMode())
</span><span class="cx">         features |= StrictModeFeature;
</span><span class="lines">@@ -278,21 +280,36 @@
</span><span class="cx">         features |= ShadowsArgumentsFeature;
</span><span class="cx">     if (modifiedParameter)
</span><span class="cx">         features |= ModifiedParameterFeature;
</span><del>-
</del><ins>+    
+    Vector&lt;RefPtr&lt;StringImpl&gt;&gt; closedVariables;
+    if (m_parsingBuiltin) {
+        RELEASE_ASSERT(!capturedVariables.size());
+        IdentifierSet usedVariables;
+        scope-&gt;getUsedVariables(usedVariables);
+        for (const auto&amp; variable : usedVariables) {
+            if (scope-&gt;hasDeclaredVariable(Identifier(m_vm, variable.get())))
+                continue;
+            
+            if (scope-&gt;hasDeclaredParameter(Identifier(m_vm, variable.get())))
+                continue;
+            closedVariables.append(variable);
+        }
+    }
</ins><span class="cx">     didFinishParsing(sourceElements, context.varDeclarations(), context.funcDeclarations(), features,
</span><del>-        context.numConstants(), capturedVariables);
</del><ins>+        context.numConstants(), capturedVariables, std::move(closedVariables));
</ins><span class="cx"> 
</span><span class="cx">     return parseError;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> template &lt;typename LexerType&gt;
</span><span class="cx"> void Parser&lt;LexerType&gt;::didFinishParsing(SourceElements* sourceElements, ParserArenaData&lt;DeclarationStacks::VarStack&gt;* varStack, 
</span><del>-    ParserArenaData&lt;DeclarationStacks::FunctionStack&gt;* funcStack, CodeFeatures features, int numConstants, IdentifierSet&amp; capturedVars)
</del><ins>+    ParserArenaData&lt;DeclarationStacks::FunctionStack&gt;* funcStack, CodeFeatures features, int numConstants, IdentifierSet&amp; capturedVars, const Vector&lt;RefPtr&lt;StringImpl&gt;&gt;&amp;&amp; closedVariables)
</ins><span class="cx"> {
</span><span class="cx">     m_sourceElements = sourceElements;
</span><span class="cx">     m_varDeclarations = varStack;
</span><span class="cx">     m_funcDeclarations = funcStack;
</span><span class="cx">     m_capturedVariables.swap(capturedVars);
</span><ins>+    m_closedVariables = closedVariables;
</ins><span class="cx">     m_features = features;
</span><span class="cx">     m_numConstants = numConstants;
</span><span class="cx"> }
</span><span class="lines">@@ -2362,6 +2379,10 @@
</span><span class="cx">     case RESERVED:
</span><span class="cx">         out.print(&quot;Unexpected use of reserved word '&quot;, getToken(), &quot;'&quot;);
</span><span class="cx">         return;
</span><ins>+
+    case INVALID_PRIVATE_NAME_ERRORTOK:
+        out.print(&quot;Invalid private name '&quot;, getToken(), &quot;'&quot;);
+        return;
</ins><span class="cx">             
</span><span class="cx">     case IDENT:
</span><span class="cx">         out.print(&quot;Unexpected identifier '&quot;, getToken(), &quot;'&quot;);
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreparserParserh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/parser/Parser.h (163959 => 163960)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/parser/Parser.h        2014-02-12 17:10:25 UTC (rev 163959)
+++ trunk/Source/JavaScriptCore/parser/Parser.h        2014-02-12 17:14:23 UTC (rev 163960)
</span><span class="lines">@@ -259,6 +259,10 @@
</span><span class="cx">         return isValidStrictMode ? BindingSucceeded : StrictBindingFailed;
</span><span class="cx">     }
</span><span class="cx"> 
</span><ins>+    void getUsedVariables(IdentifierSet&amp; usedVariables)
+    {
+        usedVariables.swap(m_usedVariables);
+    }
</ins><span class="cx"> 
</span><span class="cx">     void useVariable(const Identifier* ident, bool isEval)
</span><span class="cx">     {
</span><span class="lines">@@ -414,6 +418,7 @@
</span><span class="cx">     PassRefPtr&lt;ParsedNode&gt; parse(ParserError&amp;);
</span><span class="cx"> 
</span><span class="cx">     JSTextPosition positionBeforeLastNewline() const { return m_lexer-&gt;positionBeforeLastNewline(); }
</span><ins>+    const Vector&lt;RefPtr&lt;StringImpl&gt;&gt;&amp;&amp; closedVariables() { return std::move(m_closedVariables); }
</ins><span class="cx"> 
</span><span class="cx"> private:
</span><span class="cx">     struct AllowInOverride {
</span><span class="lines">@@ -540,7 +545,7 @@
</span><span class="cx">     String parseInner();
</span><span class="cx"> 
</span><span class="cx">     void didFinishParsing(SourceElements*, ParserArenaData&lt;DeclarationStacks::VarStack&gt;*, 
</span><del>-        ParserArenaData&lt;DeclarationStacks::FunctionStack&gt;*, CodeFeatures, int, IdentifierSet&amp;);
</del><ins>+        ParserArenaData&lt;DeclarationStacks::FunctionStack&gt;*, CodeFeatures, int, IdentifierSet&amp;, const Vector&lt;RefPtr&lt;StringImpl&gt;&gt;&amp;&amp;);
</ins><span class="cx"> 
</span><span class="cx">     // Used to determine type of error to report.
</span><span class="cx">     bool isFunctionBodyNode(ScopeNode*) { return false; }
</span><span class="lines">@@ -840,9 +845,11 @@
</span><span class="cx">     const Identifier* m_lastFunctionName;
</span><span class="cx">     RefPtr&lt;SourceProviderCache&gt; m_functionCache;
</span><span class="cx">     SourceElements* m_sourceElements;
</span><ins>+    bool m_parsingBuiltin;
</ins><span class="cx">     ParserArenaData&lt;DeclarationStacks::VarStack&gt;* m_varDeclarations;
</span><span class="cx">     ParserArenaData&lt;DeclarationStacks::FunctionStack&gt;* m_funcDeclarations;
</span><span class="cx">     IdentifierSet m_capturedVariables;
</span><ins>+    Vector&lt;RefPtr&lt;StringImpl&gt;&gt; m_closedVariables;
</ins><span class="cx">     CodeFeatures m_features;
</span><span class="cx">     int m_numConstants;
</span><span class="cx">     
</span><span class="lines">@@ -957,6 +964,12 @@
</span><span class="cx">         RefPtr&lt;ParsedNode&gt; result = parser.parse&lt;ParsedNode&gt;(error);
</span><span class="cx">         if (positionBeforeLastNewline)
</span><span class="cx">             *positionBeforeLastNewline = parser.positionBeforeLastNewline();
</span><ins>+        if (strictness == JSParseBuiltin) {
+            if (!result)
+                WTF::dataLog(&quot;Error compiling builtin: &quot;, error.m_message, &quot;\n&quot;);
+            RELEASE_ASSERT(result);
+            result-&gt;setClosedVariables(std::move(parser.closedVariables()));
+        }
</ins><span class="cx">         return result.release();
</span><span class="cx">     }
</span><span class="cx">     Parser&lt;Lexer&lt;UChar&gt;&gt; parser(vm, source, parameters, name, strictness, parserMode);
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreparserParserModesh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/parser/ParserModes.h (163959 => 163960)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/parser/ParserModes.h        2014-02-12 17:10:25 UTC (rev 163959)
+++ trunk/Source/JavaScriptCore/parser/ParserModes.h        2014-02-12 17:14:23 UTC (rev 163960)
</span><span class="lines">@@ -31,7 +31,7 @@
</span><span class="cx"> 
</span><span class="cx"> namespace JSC {
</span><span class="cx"> 
</span><del>-enum JSParserStrictness { JSParseNormal, JSParseStrict };
</del><ins>+enum JSParserStrictness { JSParseNormal, JSParseBuiltin, JSParseStrict };
</ins><span class="cx"> enum JSParserMode { JSParseProgramCode, JSParseFunctionCode };
</span><span class="cx"> 
</span><span class="cx"> enum ProfilerMode { ProfilerOff, ProfilerOn };
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreparserParserTokensh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/parser/ParserTokens.h (163959 => 163960)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/parser/ParserTokens.h        2014-02-12 17:10:25 UTC (rev 163959)
+++ trunk/Source/JavaScriptCore/parser/ParserTokens.h        2014-02-12 17:14:23 UTC (rev 163960)
</span><span class="lines">@@ -149,6 +149,7 @@
</span><span class="cx">     INVALID_NUMERIC_LITERAL_ERRORTOK = 7 | ErrorTokenFlag,
</span><span class="cx">     UNTERMINATED_STRING_LITERAL_ERRORTOK = 8 | ErrorTokenFlag | UnterminatedErrorTokenFlag,
</span><span class="cx">     INVALID_STRING_LITERAL_ERRORTOK = 9 | ErrorTokenFlag,
</span><ins>+    INVALID_PRIVATE_NAME_ERRORTOK = 10 | ErrorTokenFlag
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> struct JSTextPosition {
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeArrayPrototypecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/ArrayPrototype.cpp (163959 => 163960)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/ArrayPrototype.cpp        2014-02-12 17:10:25 UTC (rev 163959)
+++ trunk/Source/JavaScriptCore/runtime/ArrayPrototype.cpp        2014-02-12 17:14:23 UTC (rev 163960)
</span><span class="lines">@@ -56,7 +56,6 @@
</span><span class="cx"> static EncodedJSValue JSC_HOST_CALL arrayProtoFuncSort(ExecState*);
</span><span class="cx"> static EncodedJSValue JSC_HOST_CALL arrayProtoFuncSplice(ExecState*);
</span><span class="cx"> static EncodedJSValue JSC_HOST_CALL arrayProtoFuncUnShift(ExecState*);
</span><del>-static EncodedJSValue JSC_HOST_CALL arrayProtoFuncEvery(ExecState*);
</del><span class="cx"> static EncodedJSValue JSC_HOST_CALL arrayProtoFuncForEach(ExecState*);
</span><span class="cx"> static EncodedJSValue JSC_HOST_CALL arrayProtoFuncSome(ExecState*);
</span><span class="cx"> static EncodedJSValue JSC_HOST_CALL arrayProtoFuncIndexOf(ExecState*);
</span><span class="lines">@@ -955,69 +954,6 @@
</span><span class="cx">     return JSValue::encode(resultArray);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-// Documentation for these three is available at:
-// http://developer-test.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Objects:Array:every
-// http://developer-test.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Objects:Array:forEach
-// http://developer-test.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Objects:Array:some
-
-EncodedJSValue JSC_HOST_CALL arrayProtoFuncEvery(ExecState* exec)
-{
-    JSObject* thisObj = exec-&gt;hostThisValue().toThis(exec, StrictMode).toObject(exec);
-    unsigned length = thisObj-&gt;get(exec, exec-&gt;propertyNames().length).toUInt32(exec);
-    if (exec-&gt;hadException())
-        return JSValue::encode(jsUndefined());
-
-    JSValue function = exec-&gt;argument(0);
-    CallData callData;
-    CallType callType = getCallData(function, callData);
-    if (callType == CallTypeNone)
-        return throwVMTypeError(exec);
-
-    JSValue applyThis = exec-&gt;argument(1);
-
-    JSValue result = jsBoolean(true);
-
-    unsigned k = 0;
-    if (callType == CallTypeJS &amp;&amp; isJSArray(thisObj)) {
-        JSFunction* f = jsCast&lt;JSFunction*&gt;(function);
-        JSArray* array = asArray(thisObj);
-        CachedCall cachedCall(exec, f, 3);
-        for (; k &lt; length &amp;&amp; !exec-&gt;hadException(); ++k) {
-            if (UNLIKELY(!array-&gt;canGetIndexQuickly(k)))
-                break;
-            
-            cachedCall.setThis(applyThis);
-            cachedCall.setArgument(0, array-&gt;getIndexQuickly(k));
-            cachedCall.setArgument(1, jsNumber(k));
-            cachedCall.setArgument(2, thisObj);
-            JSValue result = cachedCall.call();
-            if (!result.toBoolean(exec))
-                return JSValue::encode(jsBoolean(false));
-        }
-    }
-    for (; k &lt; length &amp;&amp; !exec-&gt;hadException(); ++k) {
-        PropertySlot slot(thisObj);
-        if (!thisObj-&gt;getPropertySlot(exec, k, slot))
-            continue;
-
-        MarkedArgumentBuffer eachArguments;
-        eachArguments.append(slot.getValue(exec, k));
-        eachArguments.append(jsNumber(k));
-        eachArguments.append(thisObj);
-
-        if (exec-&gt;hadException())
-            return JSValue::encode(jsUndefined());
-
-        bool predicateResult = call(exec, function, callType, callData, applyThis, eachArguments).toBoolean(exec);
-        if (!predicateResult) {
-            result = jsBoolean(false);
-            break;
-        }
-    }
-
-    return JSValue::encode(result);
-}
-
</del><span class="cx"> EncodedJSValue JSC_HOST_CALL arrayProtoFuncForEach(ExecState* exec)
</span><span class="cx"> {
</span><span class="cx">     JSObject* thisObj = exec-&gt;hostThisValue().toThis(exec, StrictMode).toObject(exec);
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeCodeCachecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/CodeCache.cpp (163959 => 163960)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/CodeCache.cpp        2014-02-12 17:10:25 UTC (rev 163959)
+++ trunk/Source/JavaScriptCore/runtime/CodeCache.cpp        2014-02-12 17:14:23 UTC (rev 163960)
</span><span class="lines">@@ -144,24 +144,26 @@
</span><span class="cx">     JSTextPosition positionBeforeLastNewline;
</span><span class="cx">     RefPtr&lt;ProgramNode&gt; program = parse&lt;ProgramNode&gt;(&amp;vm, source, 0, Identifier(), JSParseNormal, JSParseProgramCode, error, &amp;positionBeforeLastNewline);
</span><span class="cx">     if (!program) {
</span><del>-        ASSERT(error.m_type != ParserError::ErrorNone);
</del><ins>+        RELEASE_ASSERT(error.m_type != ParserError::ErrorNone);
</ins><span class="cx">         m_sourceCode.remove(addResult.iterator);
</span><span class="cx">         return 0;
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     // This function assumes an input string that would result in a single anonymous function expression.
</span><span class="cx">     StatementNode* exprStatement = program-&gt;singleStatement();
</span><del>-    ASSERT(exprStatement);
-    ASSERT(exprStatement-&gt;isExprStatement());
</del><ins>+    RELEASE_ASSERT(exprStatement);
+    RELEASE_ASSERT(exprStatement-&gt;isExprStatement());
</ins><span class="cx">     ExpressionNode* funcExpr = static_cast&lt;ExprStatementNode*&gt;(exprStatement)-&gt;expr();
</span><del>-    ASSERT(funcExpr);
</del><ins>+    RELEASE_ASSERT(funcExpr);
</ins><span class="cx">     RELEASE_ASSERT(funcExpr-&gt;isFuncExprNode());
</span><span class="cx">     FunctionBodyNode* body = static_cast&lt;FuncExprNode*&gt;(funcExpr)-&gt;body();
</span><ins>+    RELEASE_ASSERT(!program-&gt;hasCapturedVariables());
+    
</ins><span class="cx">     body-&gt;setEndPosition(positionBeforeLastNewline);
</span><del>-    ASSERT(body);
-    ASSERT(body-&gt;ident().isNull());
</del><ins>+    RELEASE_ASSERT(body);
+    RELEASE_ASSERT(body-&gt;ident().isNull());
</ins><span class="cx"> 
</span><del>-    UnlinkedFunctionExecutable* functionExecutable = UnlinkedFunctionExecutable::create(&amp;vm, source, body, true);
</del><ins>+    UnlinkedFunctionExecutable* functionExecutable = UnlinkedFunctionExecutable::create(&amp;vm, source, body, true, UnlinkedNormalFunction);
</ins><span class="cx">     functionExecutable-&gt;m_nameValue.set(vm, functionExecutable, jsString(&amp;vm, name.string()));
</span><span class="cx"> 
</span><span class="cx">     addResult.iterator-&gt;value = SourceCodeValue(vm, functionExecutable, m_sourceCode.age());
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeCommonIdentifierscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/CommonIdentifiers.cpp (163959 => 163960)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/CommonIdentifiers.cpp        2014-02-12 17:10:25 UTC (rev 163959)
+++ trunk/Source/JavaScriptCore/runtime/CommonIdentifiers.cpp        2014-02-12 17:14:23 UTC (rev 163960)
</span><span class="lines">@@ -21,13 +21,15 @@
</span><span class="cx"> #include &quot;config.h&quot;
</span><span class="cx"> #include &quot;CommonIdentifiers.h&quot;
</span><span class="cx"> 
</span><ins>+#include &quot;BuiltinNames.h&quot;
+#include &quot;JSCBuiltins.h&quot;
</ins><span class="cx"> #include &quot;PrivateName.h&quot;
</span><span class="cx"> 
</span><span class="cx"> namespace JSC {
</span><span class="cx"> 
</span><span class="cx"> #define INITIALIZE_PROPERTY_NAME(name) , name(vm, #name)
</span><span class="cx"> #define INITIALIZE_KEYWORD(name) , name##Keyword(vm, #name)
</span><del>-#define INITIALIZE_PRIVATE_NAME(name) , name##PrivateName(Identifier::from(PrivateName()))
</del><ins>+#define INITIALIZE_PRIVATE_NAME(name) , name##PrivateName(m_builtinNames-&gt;name##PrivateName())
</ins><span class="cx"> 
</span><span class="cx"> CommonIdentifiers::CommonIdentifiers(VM* vm)
</span><span class="cx">     : nullIdentifier()
</span><span class="lines">@@ -35,11 +37,26 @@
</span><span class="cx">     , underscoreProto(vm, &quot;__proto__&quot;)
</span><span class="cx">     , thisIdentifier(vm, &quot;this&quot;)
</span><span class="cx">     , useStrictIdentifier(vm, &quot;use strict&quot;)
</span><del>-    , hasNextIdentifier(vm, &quot;hasNext&quot;)
</del><ins>+    , m_builtinNames(new BuiltinNames(vm, this))
</ins><span class="cx">     JSC_COMMON_IDENTIFIERS_EACH_KEYWORD(INITIALIZE_KEYWORD)
</span><span class="cx">     JSC_COMMON_IDENTIFIERS_EACH_PROPERTY_NAME(INITIALIZE_PROPERTY_NAME)
</span><span class="cx">     JSC_COMMON_PRIVATE_IDENTIFIERS_EACH_PROPERTY_NAME(INITIALIZE_PRIVATE_NAME)
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+CommonIdentifiers::~CommonIdentifiers()
+{
+}
+
+const Identifier* CommonIdentifiers::getPrivateName(const Identifier&amp; ident) const
+{
+    return m_builtinNames-&gt;getPrivateName(ident);
+}
+    
+Identifier CommonIdentifiers::getPublicName(const Identifier&amp; ident) const
+{
+    return m_builtinNames-&gt;getPublicName(ident);
+}
+
+
</ins><span class="cx"> } // namespace JSC
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeCommonIdentifiersh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/CommonIdentifiers.h (163959 => 163960)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/CommonIdentifiers.h        2014-02-12 17:10:25 UTC (rev 163959)
+++ trunk/Source/JavaScriptCore/runtime/CommonIdentifiers.h        2014-02-12 17:14:23 UTC (rev 163960)
</span><span class="lines">@@ -207,6 +207,8 @@
</span><span class="cx">     macro(yield)
</span><span class="cx"> 
</span><span class="cx"> #define JSC_COMMON_PRIVATE_IDENTIFIERS_EACH_PROPERTY_NAME(macro) \
</span><ins>+    macro(apply) \
+    macro(call) \
</ins><span class="cx">     macro(iterator) \
</span><span class="cx">     macro(iteratorNext) \
</span><span class="cx">     macro(resolve) \
</span><span class="lines">@@ -217,23 +219,33 @@
</span><span class="cx">     macro(index) \
</span><span class="cx">     macro(values) \
</span><span class="cx">     macro(deferred) \
</span><del>-    macro(countdownHolder)
</del><ins>+    macro(countdownHolder) \
+    macro(Object) \
+    macro(TypeError) \
+    macro(undefined)
</ins><span class="cx"> 
</span><span class="cx"> namespace JSC {
</span><del>-
</del><ins>+    
+    class BuiltinNames;
+    
</ins><span class="cx">     class CommonIdentifiers {
</span><span class="cx">         WTF_MAKE_NONCOPYABLE(CommonIdentifiers); WTF_MAKE_FAST_ALLOCATED;
</span><span class="cx">     private:
</span><span class="cx">         CommonIdentifiers(VM*);
</span><ins>+        ~CommonIdentifiers();
</ins><span class="cx">         friend class VM;
</span><del>-
</del><ins>+        
</ins><span class="cx">     public:
</span><ins>+        const BuiltinNames&amp; builtinNames() const { return *m_builtinNames; }
</ins><span class="cx">         const Identifier nullIdentifier;
</span><span class="cx">         const Identifier emptyIdentifier;
</span><span class="cx">         const Identifier underscoreProto;
</span><span class="cx">         const Identifier thisIdentifier;
</span><span class="cx">         const Identifier useStrictIdentifier;
</span><del>-        const Identifier hasNextIdentifier;
</del><ins>+    private:
+        std::unique_ptr&lt;BuiltinNames&gt; m_builtinNames;
+
+    public:
</ins><span class="cx">         
</span><span class="cx"> #define JSC_IDENTIFIER_DECLARE_KEYWORD_NAME_GLOBAL(name) const Identifier name##Keyword;
</span><span class="cx">         JSC_COMMON_IDENTIFIERS_EACH_KEYWORD(JSC_IDENTIFIER_DECLARE_KEYWORD_NAME_GLOBAL)
</span><span class="lines">@@ -246,6 +258,9 @@
</span><span class="cx"> #define JSC_IDENTIFIER_DECLARE_PRIVATE_PROPERTY_NAME_GLOBAL(name) const Identifier name##PrivateName;
</span><span class="cx">         JSC_COMMON_PRIVATE_IDENTIFIERS_EACH_PROPERTY_NAME(JSC_IDENTIFIER_DECLARE_PRIVATE_PROPERTY_NAME_GLOBAL)
</span><span class="cx"> #undef JSC_IDENTIFIER_DECLARE_PRIVATE_PROPERTY_NAME_GLOBAL
</span><ins>+        
+        const Identifier* getPrivateName(const Identifier&amp;) const;
+        Identifier getPublicName(const Identifier&amp;) const;
</ins><span class="cx">     };
</span><span class="cx"> 
</span><span class="cx"> } // namespace JSC
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeExceptionHelperscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/ExceptionHelpers.cpp (163959 => 163960)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/ExceptionHelpers.cpp        2014-02-12 17:10:25 UTC (rev 163959)
+++ trunk/Source/JavaScriptCore/runtime/ExceptionHelpers.cpp        2014-02-12 17:14:23 UTC (rev 163960)
</span><span class="lines">@@ -81,6 +81,11 @@
</span><span class="cx"> 
</span><span class="cx"> JSObject* createUndefinedVariableError(ExecState* exec, const Identifier&amp; ident)
</span><span class="cx"> {
</span><ins>+    
+    if (ident.impl()-&gt;isEmptyUnique()) {
+        String message(makeString(&quot;Can't find private variable: @&quot;, exec-&gt;propertyNames().getPublicName(ident).string()));
+        return createReferenceError(exec, message);
+    }
</ins><span class="cx">     String message(makeString(&quot;Can't find variable: &quot;, ident.string()));
</span><span class="cx">     return createReferenceError(exec, message);
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeExecutableh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/Executable.h (163959 => 163960)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/Executable.h        2014-02-12 17:10:25 UTC (rev 163959)
+++ trunk/Source/JavaScriptCore/runtime/Executable.h        2014-02-12 17:14:23 UTC (rev 163960)
</span><span class="lines">@@ -484,7 +484,7 @@
</span><span class="cx"> 
</span><span class="cx">     void clearCode();
</span><span class="cx"> 
</span><del>-    ExecutableInfo executableInfo() const { return ExecutableInfo(needsActivation(), usesEval(), isStrictMode(), false); }
</del><ins>+    ExecutableInfo executableInfo() const { return ExecutableInfo(needsActivation(), usesEval(), isStrictMode(), false, false); }
</ins><span class="cx"> 
</span><span class="cx">     unsigned numVariables() { return m_unlinkedEvalCodeBlock-&gt;numVariables(); }
</span><span class="cx">     unsigned numberOfFunctionDecls() { return m_unlinkedEvalCodeBlock-&gt;numberOfFunctionDecls(); }
</span><span class="lines">@@ -540,7 +540,7 @@
</span><span class="cx"> 
</span><span class="cx">     void clearCode();
</span><span class="cx"> 
</span><del>-    ExecutableInfo executableInfo() const { return ExecutableInfo(needsActivation(), usesEval(), isStrictMode(), false); }
</del><ins>+    ExecutableInfo executableInfo() const { return ExecutableInfo(needsActivation(), usesEval(), isStrictMode(), false, false); }
</ins><span class="cx"> 
</span><span class="cx"> private:
</span><span class="cx">     friend class ScriptExecutable;
</span><span class="lines">@@ -630,6 +630,7 @@
</span><span class="cx">     }
</span><span class="cx">         
</span><span class="cx">     FunctionMode functionMode() { return m_unlinkedExecutable-&gt;functionMode(); }
</span><ins>+    bool isBuiltinFunction() const { return m_unlinkedExecutable-&gt;isBuiltinFunction(); }
</ins><span class="cx">     const Identifier&amp; name() { return m_unlinkedExecutable-&gt;name(); }
</span><span class="cx">     const Identifier&amp; inferredName() { return m_unlinkedExecutable-&gt;inferredName(); }
</span><span class="cx">     JSString* nameValue() const { return m_unlinkedExecutable-&gt;nameValue(); }
</span><span class="lines">@@ -677,14 +678,6 @@
</span><span class="cx">     bool m_didParseForTheFirstTime;
</span><span class="cx"> };
</span><span class="cx"> 
</span><del>-inline bool isHostFunction(JSValue value, NativeFunction nativeFunction)
-{
-    JSFunction* function = jsCast&lt;JSFunction*&gt;(getJSFunction(value));
-    if (!function || !function-&gt;isHostFunction())
-        return false;
-    return function-&gt;nativeFunction() == nativeFunction;
-}
-
</del><span class="cx"> inline void ExecutableBase::clearCodeVirtual(ExecutableBase* executable)
</span><span class="cx"> {
</span><span class="cx">     switch (executable-&gt;structure()-&gt;typeInfo().type()) {
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeFunctionPrototypecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/FunctionPrototype.cpp (163959 => 163960)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/FunctionPrototype.cpp        2014-02-12 17:10:25 UTC (rev 163959)
+++ trunk/Source/JavaScriptCore/runtime/FunctionPrototype.cpp        2014-02-12 17:14:23 UTC (rev 163960)
</span><span class="lines">@@ -108,7 +108,7 @@
</span><span class="cx">     JSValue thisValue = exec-&gt;hostThisValue();
</span><span class="cx">     if (thisValue.inherits(JSFunction::info())) {
</span><span class="cx">         JSFunction* function = jsCast&lt;JSFunction*&gt;(thisValue);
</span><del>-        if (function-&gt;isHostFunction())
</del><ins>+        if (function-&gt;isHostOrBuiltinFunction())
</ins><span class="cx">             return JSValue::encode(jsMakeNontrivialString(exec, &quot;function &quot;, function-&gt;name(exec), &quot;() {\n    [native code]\n}&quot;));
</span><span class="cx">         FunctionExecutable* executable = function-&gt;jsExecutable();
</span><span class="cx">         String sourceString = executable-&gt;source().toString();
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeJSActivationcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/JSActivation.cpp (163959 => 163960)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/JSActivation.cpp        2014-02-12 17:10:25 UTC (rev 163959)
+++ trunk/Source/JavaScriptCore/runtime/JSActivation.cpp        2014-02-12 17:14:23 UTC (rev 163960)
</span><span class="lines">@@ -58,7 +58,7 @@
</span><span class="cx"> 
</span><span class="cx"> inline bool JSActivation::symbolTableGet(PropertyName propertyName, PropertySlot&amp; slot)
</span><span class="cx"> {
</span><del>-    SymbolTableEntry entry = symbolTable()-&gt;inlineGet(propertyName.publicName());
</del><ins>+    SymbolTableEntry entry = symbolTable()-&gt;inlineGet(propertyName.uid());
</ins><span class="cx">     if (entry.isNull())
</span><span class="cx">         return false;
</span><span class="cx"> 
</span><span class="lines">@@ -72,7 +72,7 @@
</span><span class="cx"> 
</span><span class="cx"> inline bool JSActivation::symbolTableGet(PropertyName propertyName, PropertyDescriptor&amp; descriptor)
</span><span class="cx"> {
</span><del>-    SymbolTableEntry entry = symbolTable()-&gt;inlineGet(propertyName.publicName());
</del><ins>+    SymbolTableEntry entry = symbolTable()-&gt;inlineGet(propertyName.uid());
</ins><span class="cx">     if (entry.isNull())
</span><span class="cx">         return false;
</span><span class="cx"> 
</span><span class="lines">@@ -89,7 +89,7 @@
</span><span class="cx">     VM&amp; vm = exec-&gt;vm();
</span><span class="cx">     ASSERT(!Heap::heap(value) || Heap::heap(value) == Heap::heap(this));
</span><span class="cx">     
</span><del>-    SymbolTableEntry entry = symbolTable()-&gt;inlineGet(propertyName.publicName());
</del><ins>+    SymbolTableEntry entry = symbolTable()-&gt;inlineGet(propertyName.uid());
</ins><span class="cx">     if (entry.isNull())
</span><span class="cx">         return false;
</span><span class="cx">     if (entry.isReadOnly()) {
</span><span class="lines">@@ -136,7 +136,7 @@
</span><span class="cx">     WriteBarrierBase&lt;Unknown&gt;* reg;
</span><span class="cx">     {
</span><span class="cx">         ConcurrentJITLocker locker(symbolTable()-&gt;m_lock);
</span><del>-        SymbolTable::Map::iterator iter = symbolTable()-&gt;find(locker, propertyName.publicName());
</del><ins>+        SymbolTable::Map::iterator iter = symbolTable()-&gt;find(locker, propertyName.uid());
</ins><span class="cx">         if (iter == symbolTable()-&gt;end(locker))
</span><span class="cx">             return false;
</span><span class="cx">         SymbolTableEntry&amp; entry = iter-&gt;value;
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeJSFunctioncpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/JSFunction.cpp (163959 => 163960)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/JSFunction.cpp        2014-02-12 17:10:25 UTC (rev 163959)
+++ trunk/Source/JavaScriptCore/runtime/JSFunction.cpp        2014-02-12 17:14:23 UTC (rev 163960)
</span><span class="lines">@@ -33,7 +33,8 @@
</span><span class="cx"> #include &quot;FunctionPrototype.h&quot;
</span><span class="cx"> #include &quot;GetterSetter.h&quot;
</span><span class="cx"> #include &quot;JSArray.h&quot;
</span><del>-#include &quot;JSBoundFunction.h&quot; 
</del><ins>+#include &quot;JSBoundFunction.h&quot;
+#include &quot;JSFunctionInlines.h&quot;
</ins><span class="cx"> #include &quot;JSGlobalObject.h&quot;
</span><span class="cx"> #include &quot;JSNameScope.h&quot; 
</span><span class="cx"> #include &quot;JSNotAnObject.h&quot;
</span><span class="lines">@@ -119,6 +120,14 @@
</span><span class="cx">     m_scope.set(vm, this, JSNameScope::create(vm, m_scope-&gt;globalObject(), executable-&gt;name(), this, ReadOnly | DontDelete, m_scope.get()));
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+JSFunction* JSFunction::createBuiltinFunction(VM&amp; vm, FunctionExecutable* executable, JSGlobalObject* globalObject)
+{
+    JSFunction* function = create(vm, executable, globalObject);
+    function-&gt;putDirect(vm, vm.propertyNames-&gt;name, jsString(&amp;vm, executable-&gt;name().string()), DontDelete | ReadOnly | DontEnum);
+    function-&gt;putDirect(vm, vm.propertyNames-&gt;length, jsNumber(executable-&gt;parameterCount()), DontDelete | ReadOnly | DontEnum);
+    return function;
+}
+
</ins><span class="cx"> ObjectAllocationProfile* JSFunction::createAllocationProfile(ExecState* exec, size_t inlineCapacity)
</span><span class="cx"> {
</span><span class="cx">     VM&amp; vm = exec-&gt;vm();
</span><span class="lines">@@ -152,7 +161,7 @@
</span><span class="cx">         return explicitName;
</span><span class="cx">     
</span><span class="cx">     const String actualName = name(exec);
</span><del>-    if (!actualName.isEmpty() || isHostFunction())
</del><ins>+    if (!actualName.isEmpty() || isHostOrBuiltinFunction())
</ins><span class="cx">         return actualName;
</span><span class="cx">     
</span><span class="cx">     return jsExecutable()-&gt;inferredName().string();
</span><span class="lines">@@ -160,11 +169,21 @@
</span><span class="cx"> 
</span><span class="cx"> const SourceCode* JSFunction::sourceCode() const
</span><span class="cx"> {
</span><del>-    if (isHostFunction())
</del><ins>+    if (isHostOrBuiltinFunction())
</ins><span class="cx">         return 0;
</span><span class="cx">     return &amp;jsExecutable()-&gt;source();
</span><span class="cx"> }
</span><ins>+    
+bool JSFunction::isHostOrBuiltinFunction() const
+{
+    return isHostFunction() || isBuiltinFunction();
+}
</ins><span class="cx"> 
</span><ins>+bool JSFunction::isBuiltinFunction() const
+{
+    return !isHostFunction() &amp;&amp; jsExecutable()-&gt;isBuiltinFunction();
+}
+
</ins><span class="cx"> void JSFunction::visitChildren(JSCell* cell, SlotVisitor&amp; visitor)
</span><span class="cx"> {
</span><span class="cx">     JSFunction* thisObject = jsCast&lt;JSFunction*&gt;(cell);
</span><span class="lines">@@ -287,7 +306,7 @@
</span><span class="cx">     if (!caller.isObject() || !asObject(caller)-&gt;inherits(JSFunction::info()))
</span><span class="cx">         return JSValue::encode(caller);
</span><span class="cx">     JSFunction* function = jsCast&lt;JSFunction*&gt;(caller);
</span><del>-    if (function-&gt;isHostFunction() || !function-&gt;jsExecutable()-&gt;isStrictMode())
</del><ins>+    if (function-&gt;isHostOrBuiltinFunction() || !function-&gt;jsExecutable()-&gt;isStrictMode())
</ins><span class="cx">         return JSValue::encode(caller);
</span><span class="cx">     return JSValue::encode(throwTypeError(exec, ASCIILiteral(&quot;Function.caller used to retrieve strict caller&quot;)));
</span><span class="cx"> }
</span><span class="lines">@@ -309,7 +328,7 @@
</span><span class="cx"> bool JSFunction::getOwnPropertySlot(JSObject* object, ExecState* exec, PropertyName propertyName, PropertySlot&amp; slot)
</span><span class="cx"> {
</span><span class="cx">     JSFunction* thisObject = jsCast&lt;JSFunction*&gt;(object);
</span><del>-    if (thisObject-&gt;isHostFunction())
</del><ins>+    if (thisObject-&gt;isHostOrBuiltinFunction())
</ins><span class="cx">         return Base::getOwnPropertySlot(thisObject, exec, propertyName, slot);
</span><span class="cx"> 
</span><span class="cx">     if (propertyName == exec-&gt;propertyNames().prototype) {
</span><span class="lines">@@ -371,7 +390,7 @@
</span><span class="cx"> void JSFunction::getOwnNonIndexPropertyNames(JSObject* object, ExecState* exec, PropertyNameArray&amp; propertyNames, EnumerationMode mode)
</span><span class="cx"> {
</span><span class="cx">     JSFunction* thisObject = jsCast&lt;JSFunction*&gt;(object);
</span><del>-    if (!thisObject-&gt;isHostFunction() &amp;&amp; (mode == IncludeDontEnumProperties)) {
</del><ins>+    if (!thisObject-&gt;isHostOrBuiltinFunction() &amp;&amp; (mode == IncludeDontEnumProperties)) {
</ins><span class="cx">         // Make sure prototype has been reified.
</span><span class="cx">         PropertySlot slot(thisObject);
</span><span class="cx">         thisObject-&gt;methodTable()-&gt;getOwnPropertySlot(thisObject, exec, exec-&gt;propertyNames().prototype, slot);
</span><span class="lines">@@ -387,7 +406,7 @@
</span><span class="cx"> void JSFunction::put(JSCell* cell, ExecState* exec, PropertyName propertyName, JSValue value, PutPropertySlot&amp; slot)
</span><span class="cx"> {
</span><span class="cx">     JSFunction* thisObject = jsCast&lt;JSFunction*&gt;(cell);
</span><del>-    if (thisObject-&gt;isHostFunction()) {
</del><ins>+    if (thisObject-&gt;isHostOrBuiltinFunction()) {
</ins><span class="cx">         Base::put(thisObject, exec, propertyName, value, slot);
</span><span class="cx">         return;
</span><span class="cx">     }
</span><span class="lines">@@ -435,7 +454,7 @@
</span><span class="cx"> bool JSFunction::defineOwnProperty(JSObject* object, ExecState* exec, PropertyName propertyName, const PropertyDescriptor&amp; descriptor, bool throwException)
</span><span class="cx"> {
</span><span class="cx">     JSFunction* thisObject = jsCast&lt;JSFunction*&gt;(object);
</span><del>-    if (thisObject-&gt;isHostFunction())
</del><ins>+    if (thisObject-&gt;isHostOrBuiltinFunction())
</ins><span class="cx">         return Base::defineOwnProperty(object, exec, propertyName, descriptor, throwException);
</span><span class="cx"> 
</span><span class="cx">     if (propertyName == exec-&gt;propertyNames().prototype) {
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeJSFunctionh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/JSFunction.h (163959 => 163960)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/JSFunction.h        2014-02-12 17:10:25 UTC (rev 163959)
+++ trunk/Source/JavaScriptCore/runtime/JSFunction.h        2014-02-12 17:14:23 UTC (rev 163960)
</span><span class="lines">@@ -68,6 +68,8 @@
</span><span class="cx">             return function;
</span><span class="cx">         }
</span><span class="cx">         
</span><ins>+        static JSFunction* createBuiltinFunction(VM&amp;, FunctionExecutable*, JSGlobalObject*);
+        
</ins><span class="cx">         static void destroy(JSCell*);
</span><span class="cx">         
</span><span class="cx">         JS_EXPORT_PRIVATE String name(ExecState*);
</span><span class="lines">@@ -146,6 +148,10 @@
</span><span class="cx">             return m_allocationProfileWatchpoint;
</span><span class="cx">         }
</span><span class="cx"> 
</span><ins>+        bool isHostOrBuiltinFunction() const;
+        bool isBuiltinFunction() const;
+        JS_EXPORT_PRIVATE bool isHostFunctionNonInline() const;
+
</ins><span class="cx">     protected:
</span><span class="cx">         const static unsigned StructureFlags = OverridesGetOwnPropertySlot | ImplementsHasInstance | OverridesVisitChildren | OverridesGetPropertyNames | JSObject::StructureFlags;
</span><span class="cx"> 
</span><span class="lines">@@ -170,8 +176,6 @@
</span><span class="cx">     private:
</span><span class="cx">         friend class LLIntOffsetsExtractor;
</span><span class="cx">         
</span><del>-        JS_EXPORT_PRIVATE bool isHostFunctionNonInline() const;
-
</del><span class="cx">         static EncodedJSValue argumentsGetter(ExecState*, JSObject*, EncodedJSValue, PropertyName);
</span><span class="cx">         static EncodedJSValue callerGetter(ExecState*, JSObject*, EncodedJSValue, PropertyName);
</span><span class="cx">         static EncodedJSValue lengthGetter(ExecState*, JSObject*, EncodedJSValue, PropertyName);
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeJSFunctionInlinesh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/JSFunctionInlines.h (163959 => 163960)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/JSFunctionInlines.h        2014-02-12 17:10:25 UTC (rev 163959)
+++ trunk/Source/JavaScriptCore/runtime/JSFunctionInlines.h        2014-02-12 17:14:23 UTC (rev 163960)
</span><span class="lines">@@ -53,16 +53,24 @@
</span><span class="cx"> 
</span><span class="cx"> inline NativeFunction JSFunction::nativeFunction()
</span><span class="cx"> {
</span><del>-    ASSERT(isHostFunction());
</del><ins>+    ASSERT(isHostFunctionNonInline());
</ins><span class="cx">     return static_cast&lt;NativeExecutable*&gt;(m_executable.get())-&gt;function();
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> inline NativeFunction JSFunction::nativeConstructor()
</span><span class="cx"> {
</span><del>-    ASSERT(isHostFunction());
</del><ins>+    ASSERT(isHostFunctionNonInline());
</ins><span class="cx">     return static_cast&lt;NativeExecutable*&gt;(m_executable.get())-&gt;constructor();
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+inline bool isHostFunction(JSValue value, NativeFunction nativeFunction)
+{
+    JSFunction* function = jsCast&lt;JSFunction*&gt;(getJSFunction(value));
+    if (!function || !function-&gt;isHostFunction())
+        return false;
+    return function-&gt;nativeFunction() == nativeFunction;
+}
+
</ins><span class="cx"> } // namespace JSC
</span><span class="cx"> 
</span><span class="cx"> #endif // JSFunctionInlines_h
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeJSGlobalObjectcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/JSGlobalObject.cpp (163959 => 163960)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/JSGlobalObject.cpp        2014-02-12 17:10:25 UTC (rev 163959)
+++ trunk/Source/JavaScriptCore/runtime/JSGlobalObject.cpp        2014-02-12 17:14:23 UTC (rev 163960)
</span><span class="lines">@@ -353,7 +353,8 @@
</span><span class="cx"> 
</span><span class="cx">     // Constructors
</span><span class="cx"> 
</span><del>-    JSCell* objectConstructor = ObjectConstructor::create(vm, ObjectConstructor::createStructure(vm, this, m_functionPrototype.get()), m_objectPrototype.get());
</del><ins>+    ObjectConstructor* objectConstructor = ObjectConstructor::create(vm, ObjectConstructor::createStructure(vm, this, m_functionPrototype.get()), m_objectPrototype.get());
+    m_objectConstructor.set(vm, this, objectConstructor);
</ins><span class="cx">     JSCell* functionConstructor = FunctionConstructor::create(vm, FunctionConstructor::createStructure(vm, this, m_functionPrototype.get()), m_functionPrototype.get());
</span><span class="cx">     JSCell* arrayConstructor = ArrayConstructor::create(vm, ArrayConstructor::createStructure(vm, this, m_functionPrototype.get()), m_arrayPrototype.get());
</span><span class="cx"> 
</span><span class="lines">@@ -439,7 +440,10 @@
</span><span class="cx">     GlobalPropertyInfo staticGlobals[] = {
</span><span class="cx">         GlobalPropertyInfo(vm.propertyNames-&gt;NaN, jsNaN(), DontEnum | DontDelete | ReadOnly),
</span><span class="cx">         GlobalPropertyInfo(vm.propertyNames-&gt;Infinity, jsNumber(std::numeric_limits&lt;double&gt;::infinity()), DontEnum | DontDelete | ReadOnly),
</span><del>-        GlobalPropertyInfo(vm.propertyNames-&gt;undefinedKeyword, jsUndefined(), DontEnum | DontDelete | ReadOnly)
</del><ins>+        GlobalPropertyInfo(vm.propertyNames-&gt;undefinedKeyword, jsUndefined(), DontEnum | DontDelete | ReadOnly),
+        GlobalPropertyInfo(vm.propertyNames-&gt;undefinedPrivateName, jsUndefined(), DontEnum | DontDelete | ReadOnly),
+        GlobalPropertyInfo(vm.propertyNames-&gt;ObjectPrivateName, objectConstructor, DontEnum | DontDelete | ReadOnly),
+        GlobalPropertyInfo(vm.propertyNames-&gt;TypeErrorPrivateName, m_typeErrorConstructor.get(), DontEnum | DontDelete | ReadOnly)
</ins><span class="cx">     };
</span><span class="cx">     addStaticGlobals(staticGlobals, WTF_ARRAY_LENGTH(staticGlobals));
</span><span class="cx">     
</span><span class="lines">@@ -615,6 +619,7 @@
</span><span class="cx">     visitor.append(&amp;thisObject-&gt;m_syntaxErrorConstructor);
</span><span class="cx">     visitor.append(&amp;thisObject-&gt;m_typeErrorConstructor);
</span><span class="cx">     visitor.append(&amp;thisObject-&gt;m_URIErrorConstructor);
</span><ins>+    visitor.append(&amp;thisObject-&gt;m_objectConstructor);
</ins><span class="cx">     visitor.append(&amp;thisObject-&gt;m_promiseConstructor);
</span><span class="cx"> 
</span><span class="cx">     visitor.append(&amp;thisObject-&gt;m_evalFunction);
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeJSGlobalObjecth"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/JSGlobalObject.h (163959 => 163960)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/JSGlobalObject.h        2014-02-12 17:10:25 UTC (rev 163959)
+++ trunk/Source/JavaScriptCore/runtime/JSGlobalObject.h        2014-02-12 17:14:23 UTC (rev 163960)
</span><span class="lines">@@ -68,6 +68,7 @@
</span><span class="cx"> class LLIntOffsetsExtractor;
</span><span class="cx"> class Microtask;
</span><span class="cx"> class NativeErrorConstructor;
</span><ins>+class ObjectConstructor;
</ins><span class="cx"> class ProgramCodeBlock;
</span><span class="cx"> class ProgramExecutable;
</span><span class="cx"> class RegExpConstructor;
</span><span class="lines">@@ -159,6 +160,7 @@
</span><span class="cx">     WriteBarrier&lt;NativeErrorConstructor&gt; m_typeErrorConstructor;
</span><span class="cx">     WriteBarrier&lt;NativeErrorConstructor&gt; m_URIErrorConstructor;
</span><span class="cx">     WriteBarrier&lt;JSPromiseConstructor&gt; m_promiseConstructor;
</span><ins>+    WriteBarrier&lt;ObjectConstructor&gt; m_objectConstructor;
</ins><span class="cx"> 
</span><span class="cx">     WriteBarrier&lt;JSFunction&gt; m_evalFunction;
</span><span class="cx">     WriteBarrier&lt;JSFunction&gt; m_callFunction;
</span><span class="lines">@@ -335,6 +337,7 @@
</span><span class="cx">     RegExpConstructor* regExpConstructor() const { return m_regExpConstructor.get(); }
</span><span class="cx"> 
</span><span class="cx">     ErrorConstructor* errorConstructor() const { return m_errorConstructor.get(); }
</span><ins>+    ObjectConstructor* objectConstructor() const { return m_objectConstructor.get(); }
</ins><span class="cx">     NativeErrorConstructor* evalErrorConstructor() const { return m_evalErrorConstructor.get(); }
</span><span class="cx">     NativeErrorConstructor* rangeErrorConstructor() const { return m_rangeErrorConstructor.get(); }
</span><span class="cx">     NativeErrorConstructor* referenceErrorConstructor() const { return m_referenceErrorConstructor.get(); }
</span><span class="lines">@@ -591,7 +594,7 @@
</span><span class="cx"> 
</span><span class="cx"> inline bool JSGlobalObject::symbolTableHasProperty(PropertyName propertyName)
</span><span class="cx"> {
</span><del>-    SymbolTableEntry entry = symbolTable()-&gt;inlineGet(propertyName.publicName());
</del><ins>+    SymbolTableEntry entry = symbolTable()-&gt;inlineGet(propertyName.uid());
</ins><span class="cx">     return !entry.isNull();
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeJSObjectcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/JSObject.cpp (163959 => 163960)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/JSObject.cpp        2014-02-12 17:10:25 UTC (rev 163959)
+++ trunk/Source/JavaScriptCore/runtime/JSObject.cpp        2014-02-12 17:14:23 UTC (rev 163960)
</span><span class="lines">@@ -87,7 +87,7 @@
</span><span class="cx">         int hashSizeMask = table-&gt;compactSize - 1;
</span><span class="cx">         const HashEntry* entry = table-&gt;table;
</span><span class="cx">         for (int i = 0; i &lt;= hashSizeMask; ++i, ++entry) {
</span><del>-            if (entry-&gt;key() &amp;&amp; (!(entry-&gt;attributes() &amp; DontEnum) || (mode == IncludeDontEnumProperties)) &amp;&amp; !((entry-&gt;attributes() &amp; Function) &amp;&amp; didReify))
</del><ins>+            if (entry-&gt;key() &amp;&amp; (!(entry-&gt;attributes() &amp; DontEnum) || (mode == IncludeDontEnumProperties)) &amp;&amp; !((entry-&gt;attributes() &amp; BuiltinOrFunction) &amp;&amp; didReify))
</ins><span class="cx">                 propertyNames.add(entry-&gt;key());
</span><span class="cx">         }
</span><span class="cx">     }
</span><span class="lines">@@ -1618,7 +1618,7 @@
</span><span class="cx">             continue;
</span><span class="cx">         PropertySlot slot(this);
</span><span class="cx">         for (HashTable::ConstIterator iter = hashTable-&gt;begin(vm); iter != hashTable-&gt;end(vm); ++iter) {
</span><del>-            if (iter-&gt;attributes() &amp; Function)
</del><ins>+            if (iter-&gt;attributes() &amp; BuiltinOrFunction)
</ins><span class="cx">                 setUpStaticFunctionSlot(globalObject()-&gt;globalExec(), *iter, this, Identifier(&amp;vm, iter-&gt;key()), slot);
</span><span class="cx">         }
</span><span class="cx">     }
</span><span class="lines">@@ -2236,6 +2236,16 @@
</span><span class="cx">     putDirect(vm, propertyName, function, attributes);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void JSObject::putDirectBuiltinFunction(VM&amp; vm, JSGlobalObject* globalObject, const PropertyName&amp; propertyName, FunctionExecutable* functionExecutable, unsigned attributes)
+{
+    StringImpl* name = propertyName.publicName();
+    if (!name)
+        name = vm.propertyNames-&gt;anonymous.impl();
+    ASSERT(name);
+    JSFunction* function = JSFunction::createBuiltinFunction(vm, static_cast&lt;FunctionExecutable*&gt;(functionExecutable), globalObject);
+    putDirect(vm, propertyName, function, attributes);
+}
+
</ins><span class="cx"> void JSObject::putDirectNativeFunctionWithoutTransition(VM&amp; vm, JSGlobalObject* globalObject, const PropertyName&amp; 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 (163959 => 163960)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/JSObject.h        2014-02-12 17:10:25 UTC (rev 163959)
+++ trunk/Source/JavaScriptCore/runtime/JSObject.h        2014-02-12 17:14:23 UTC (rev 163960)
</span><span class="lines">@@ -581,6 +581,7 @@
</span><span class="cx">     void putDirectUndefined(PropertyOffset offset) { locationForOffset(offset)-&gt;setUndefined(); }
</span><span class="cx"> 
</span><span class="cx">     void putDirectNativeFunction(VM&amp;, JSGlobalObject*, const PropertyName&amp;, unsigned functionLength, NativeFunction, Intrinsic, unsigned attributes);
</span><ins>+    void putDirectBuiltinFunction(VM&amp;, JSGlobalObject*, const PropertyName&amp;, FunctionExecutable*, unsigned attributes);
</ins><span class="cx">     void putDirectNativeFunctionWithoutTransition(VM&amp;, JSGlobalObject*, const PropertyName&amp;, 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&amp;, bool shouldThrow);
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeJSSymbolTableObjectcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/JSSymbolTableObject.cpp (163959 => 163960)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/JSSymbolTableObject.cpp        2014-02-12 17:10:25 UTC (rev 163959)
+++ trunk/Source/JavaScriptCore/runtime/JSSymbolTableObject.cpp        2014-02-12 17:14:23 UTC (rev 163960)
</span><span class="lines">@@ -64,6 +64,8 @@
</span><span class="cx">         ConcurrentJITLocker locker(thisObject-&gt;symbolTable()-&gt;m_lock);
</span><span class="cx">         SymbolTable::Map::iterator end = thisObject-&gt;symbolTable()-&gt;end(locker);
</span><span class="cx">         for (SymbolTable::Map::iterator it = thisObject-&gt;symbolTable()-&gt;begin(locker); it != end; ++it) {
</span><ins>+            if (it-&gt;key-&gt;isEmptyUnique())
+                continue;
</ins><span class="cx">             if (!(it-&gt;value.getAttributes() &amp; DontEnum) || (mode == IncludeDontEnumProperties))
</span><span class="cx">                 propertyNames.add(Identifier(exec, it-&gt;key.get()));
</span><span class="cx">         }
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeJSSymbolTableObjecth"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/JSSymbolTableObject.h (163959 => 163960)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/JSSymbolTableObject.h        2014-02-12 17:10:25 UTC (rev 163959)
+++ trunk/Source/JavaScriptCore/runtime/JSSymbolTableObject.h        2014-02-12 17:14:23 UTC (rev 163960)
</span><span class="lines">@@ -72,7 +72,7 @@
</span><span class="cx"> {
</span><span class="cx">     SymbolTable&amp; symbolTable = *object-&gt;symbolTable();
</span><span class="cx">     ConcurrentJITLocker locker(symbolTable.m_lock);
</span><del>-    SymbolTable::Map::iterator iter = symbolTable.find(locker, propertyName.publicName());
</del><ins>+    SymbolTable::Map::iterator iter = symbolTable.find(locker, propertyName.uid());
</ins><span class="cx">     if (iter == symbolTable.end(locker))
</span><span class="cx">         return false;
</span><span class="cx">     SymbolTableEntry::Fast entry = iter-&gt;value;
</span><span class="lines">@@ -87,7 +87,7 @@
</span><span class="cx"> {
</span><span class="cx">     SymbolTable&amp; symbolTable = *object-&gt;symbolTable();
</span><span class="cx">     ConcurrentJITLocker locker(symbolTable.m_lock);
</span><del>-    SymbolTable::Map::iterator iter = symbolTable.find(locker, propertyName.publicName());
</del><ins>+    SymbolTable::Map::iterator iter = symbolTable.find(locker, propertyName.uid());
</ins><span class="cx">     if (iter == symbolTable.end(locker))
</span><span class="cx">         return false;
</span><span class="cx">     SymbolTableEntry::Fast entry = iter-&gt;value;
</span><span class="lines">@@ -104,7 +104,7 @@
</span><span class="cx"> {
</span><span class="cx">     SymbolTable&amp; symbolTable = *object-&gt;symbolTable();
</span><span class="cx">     ConcurrentJITLocker locker(symbolTable.m_lock);
</span><del>-    SymbolTable::Map::iterator iter = symbolTable.find(locker, propertyName.publicName());
</del><ins>+    SymbolTable::Map::iterator iter = symbolTable.find(locker, propertyName.uid());
</ins><span class="cx">     if (iter == symbolTable.end(locker))
</span><span class="cx">         return false;
</span><span class="cx">     SymbolTableEntry::Fast entry = iter-&gt;value;
</span><span class="lines">@@ -126,7 +126,7 @@
</span><span class="cx">     {
</span><span class="cx">         SymbolTable&amp; symbolTable = *object-&gt;symbolTable();
</span><span class="cx">         GCSafeConcurrentJITLocker locker(symbolTable.m_lock, exec-&gt;vm().heap);
</span><del>-        SymbolTable::Map::iterator iter = symbolTable.find(locker, propertyName.publicName());
</del><ins>+        SymbolTable::Map::iterator iter = symbolTable.find(locker, propertyName.uid());
</ins><span class="cx">         if (iter == symbolTable.end(locker))
</span><span class="cx">             return false;
</span><span class="cx">         bool wasFat;
</span><span class="lines">@@ -159,7 +159,7 @@
</span><span class="cx">     {
</span><span class="cx">         SymbolTable&amp; symbolTable = *object-&gt;symbolTable();
</span><span class="cx">         ConcurrentJITLocker locker(symbolTable.m_lock);
</span><del>-        SymbolTable::Map::iterator iter = symbolTable.find(locker, propertyName.publicName());
</del><ins>+        SymbolTable::Map::iterator iter = symbolTable.find(locker, propertyName.uid());
</ins><span class="cx">         if (iter == symbolTable.end(locker))
</span><span class="cx">             return false;
</span><span class="cx">         SymbolTableEntry&amp; entry = iter-&gt;value;
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeLookupcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/Lookup.cpp (163959 => 163960)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/Lookup.cpp        2014-02-12 17:10:25 UTC (rev 163959)
+++ trunk/Source/JavaScriptCore/runtime/Lookup.cpp        2014-02-12 17:14:23 UTC (rev 163960)
</span><span class="lines">@@ -68,7 +68,7 @@
</span><span class="cx"> bool setUpStaticFunctionSlot(ExecState* exec, const HashEntry* entry, JSObject* thisObj, PropertyName propertyName, PropertySlot&amp; slot)
</span><span class="cx"> {
</span><span class="cx">     ASSERT(thisObj-&gt;globalObject());
</span><del>-    ASSERT(entry-&gt;attributes() &amp; Function);
</del><ins>+    ASSERT(entry-&gt;attributes() &amp; BuiltinOrFunction);
</ins><span class="cx">     VM&amp; vm = exec-&gt;vm();
</span><span class="cx">     unsigned attributes;
</span><span class="cx">     PropertyOffset offset = thisObj-&gt;getDirectOffset(vm, propertyName, attributes);
</span><span class="lines">@@ -79,9 +79,13 @@
</span><span class="cx">         if (thisObj-&gt;staticFunctionsReified())
</span><span class="cx">             return false;
</span><span class="cx">     
</span><del>-        thisObj-&gt;putDirectNativeFunction(
-            vm, thisObj-&gt;globalObject(), propertyName, entry-&gt;functionLength(),
-            entry-&gt;function(), entry-&gt;intrinsic(), entry-&gt;attributes());
</del><ins>+        if (entry-&gt;attributes() &amp; Builtin)
+            thisObj-&gt;putDirectBuiltinFunction(vm, thisObj-&gt;globalObject(), propertyName, entry-&gt;builtinGenerator()(vm), entry-&gt;attributes());
+        else {
+            thisObj-&gt;putDirectNativeFunction(
+                vm, thisObj-&gt;globalObject(), propertyName, entry-&gt;functionLength(),
+                entry-&gt;function(), entry-&gt;intrinsic(), entry-&gt;attributes());
+        }
</ins><span class="cx">         offset = thisObj-&gt;getDirectOffset(vm, propertyName, attributes);
</span><span class="cx">         ASSERT(isValidOffset(offset));
</span><span class="cx">     }
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeLookuph"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/Lookup.h (163959 => 163960)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/Lookup.h        2014-02-12 17:10:25 UTC (rev 163959)
+++ trunk/Source/JavaScriptCore/runtime/Lookup.h        2014-02-12 17:14:23 UTC (rev 163960)
</span><span class="lines">@@ -43,6 +43,7 @@
</span><span class="cx">     // ie. typedef JSValue (*GetFunction)(ExecState*, JSObject* baseObject)
</span><span class="cx">     typedef PropertySlot::GetValueFunc GetFunction;
</span><span class="cx">     typedef PutPropertySlot::PutValueFunc PutFunction;
</span><ins>+    typedef FunctionExecutable* (*BuiltinGenerator)(VM&amp;);
</ins><span class="cx"> 
</span><span class="cx">     class HashEntry {
</span><span class="cx">         WTF_MAKE_FAST_ALLOCATED;
</span><span class="lines">@@ -68,11 +69,12 @@
</span><span class="cx">             return m_intrinsic;
</span><span class="cx">         }
</span><span class="cx"> 
</span><ins>+        BuiltinGenerator builtinGenerator() const { ASSERT(m_attributes &amp; Builtin); return m_u.builtinGenerator.generatorValue; }
</ins><span class="cx">         NativeFunction function() const { ASSERT(m_attributes &amp; Function); return m_u.function.functionValue; }
</span><span class="cx">         unsigned char functionLength() const { ASSERT(m_attributes &amp; Function); return static_cast&lt;unsigned char&gt;(m_u.function.length); }
</span><span class="cx"> 
</span><del>-        GetFunction propertyGetter() const { ASSERT(!(m_attributes &amp; Function)); return m_u.property.get; }
-        PutFunction propertyPutter() const { ASSERT(!(m_attributes &amp; Function)); return m_u.property.put; }
</del><ins>+        GetFunction propertyGetter() const { ASSERT(!(m_attributes &amp; BuiltinOrFunction)); return m_u.property.get; }
+        PutFunction propertyPutter() const { ASSERT(!(m_attributes &amp; BuiltinOrFunction)); return m_u.property.put; }
</ins><span class="cx"> 
</span><span class="cx">         intptr_t lexerValue() const { ASSERT(!m_attributes); return m_u.lexer.value; }
</span><span class="cx"> 
</span><span class="lines">@@ -94,6 +96,10 @@
</span><span class="cx">                 intptr_t length; // number of arguments for function
</span><span class="cx">             } function;
</span><span class="cx">             struct {
</span><ins>+                BuiltinGenerator generatorValue;
+                intptr_t unused;
+            } builtinGenerator;
+            struct {
</ins><span class="cx">                 GetFunction get;
</span><span class="cx">                 PutFunction put;
</span><span class="cx">             } property;
</span><span class="lines">@@ -209,7 +215,7 @@
</span><span class="cx">     private:
</span><span class="cx">         ALWAYS_INLINE const HashEntry* entry(PropertyName propertyName) const
</span><span class="cx">         {
</span><del>-            StringImpl* impl = propertyName.publicName();
</del><ins>+            StringImpl* impl = propertyName.uid();
</ins><span class="cx">             if (!impl)
</span><span class="cx">                 return 0;
</span><span class="cx">         
</span><span class="lines">@@ -249,7 +255,7 @@
</span><span class="cx">         if (!entry) // not found, forward to parent
</span><span class="cx">             return ParentImp::getOwnPropertySlot(thisObj, exec, propertyName, slot);
</span><span class="cx"> 
</span><del>-        if (entry-&gt;attributes() &amp; Function)
</del><ins>+        if (entry-&gt;attributes() &amp; BuiltinOrFunction)
</ins><span class="cx">             return setUpStaticFunctionSlot(exec, entry, thisObj, propertyName, slot);
</span><span class="cx"> 
</span><span class="cx">         slot.setCacheableCustom(thisObj, entry-&gt;attributes(), entry-&gt;propertyGetter());
</span><span class="lines">@@ -286,7 +292,7 @@
</span><span class="cx">         if (!entry) // not found, forward to parent
</span><span class="cx">             return ParentImp::getOwnPropertySlot(thisObj, exec, propertyName, slot);
</span><span class="cx"> 
</span><del>-        ASSERT(!(entry-&gt;attributes() &amp; Function));
</del><ins>+        ASSERT(!(entry-&gt;attributes() &amp; BuiltinOrFunction));
</ins><span class="cx"> 
</span><span class="cx">         slot.setCacheableCustom(thisObj, entry-&gt;attributes(), entry-&gt;propertyGetter());
</span><span class="cx">         return true;
</span><span class="lines">@@ -295,7 +301,7 @@
</span><span class="cx">     inline void putEntry(ExecState* exec, const HashEntry* entry, JSObject* base, PropertyName propertyName, JSValue value, PutPropertySlot&amp; slot)
</span><span class="cx">     {
</span><span class="cx">         // If this is a function put it as an override property.
</span><del>-        if (entry-&gt;attributes() &amp; Function) {
</del><ins>+        if (entry-&gt;attributes() &amp; BuiltinOrFunction) {
</ins><span class="cx">             if (JSObject* thisObject = jsDynamicCast&lt;JSObject*&gt;(slot.thisValue()))
</span><span class="cx">                 thisObject-&gt;putDirect(exec-&gt;vm(), propertyName, value);
</span><span class="cx">         } else if (!(entry-&gt;attributes() &amp; ReadOnly)) {
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeNativeErrorConstructorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/NativeErrorConstructor.cpp (163959 => 163960)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/NativeErrorConstructor.cpp        2014-02-12 17:10:25 UTC (rev 163959)
+++ trunk/Source/JavaScriptCore/runtime/NativeErrorConstructor.cpp        2014-02-12 17:14:23 UTC (rev 163960)
</span><span class="lines">@@ -38,6 +38,20 @@
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void NativeErrorConstructor::finishCreation(VM&amp; vm, JSGlobalObject* globalObject, Structure* prototypeStructure, const String&amp; name)
+{
+    Base::finishCreation(vm, name);
+    ASSERT(inherits(info()));
+    
+    NativeErrorPrototype* prototype = NativeErrorPrototype::create(vm, globalObject, prototypeStructure, name, this);
+    
+    putDirect(vm, vm.propertyNames-&gt;length, jsNumber(1), DontDelete | ReadOnly | DontEnum); // ECMA 15.11.7.5
+    putDirect(vm, vm.propertyNames-&gt;prototype, prototype, DontDelete | ReadOnly | DontEnum);
+    m_errorStructure.set(vm, this, ErrorInstance::createStructure(vm, globalObject, prototype));
+    ASSERT(m_errorStructure);
+    ASSERT(m_errorStructure-&gt;isObject());
+}
+
</ins><span class="cx"> void NativeErrorConstructor::visitChildren(JSCell* cell, SlotVisitor&amp; visitor)
</span><span class="cx"> {
</span><span class="cx">     NativeErrorConstructor* thisObject = jsCast&lt;NativeErrorConstructor*&gt;(cell);
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeNativeErrorConstructorh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/NativeErrorConstructor.h (163959 => 163960)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/NativeErrorConstructor.h        2014-02-12 17:10:25 UTC (rev 163959)
+++ trunk/Source/JavaScriptCore/runtime/NativeErrorConstructor.h        2014-02-12 17:14:23 UTC (rev 163960)
</span><span class="lines">@@ -51,20 +51,8 @@
</span><span class="cx">         Structure* errorStructure() { return m_errorStructure.get(); }
</span><span class="cx"> 
</span><span class="cx">     protected:
</span><del>-        void finishCreation(VM&amp; vm, JSGlobalObject* globalObject, Structure* prototypeStructure, const String&amp; name)
-        {
-            Base::finishCreation(vm, name);
-            ASSERT(inherits(info()));
</del><ins>+        void finishCreation(VM&amp;, JSGlobalObject*, Structure* prototypeStructure, const String&amp; name);
</ins><span class="cx"> 
</span><del>-            NativeErrorPrototype* prototype = NativeErrorPrototype::create(vm, globalObject, prototypeStructure, name, this);
-
-            putDirect(vm, vm.propertyNames-&gt;length, jsNumber(1), DontDelete | ReadOnly | DontEnum); // ECMA 15.11.7.5
-            putDirect(vm, vm.propertyNames-&gt;prototype, prototype, DontDelete | ReadOnly | DontEnum);
-            m_errorStructure.set(vm, this, ErrorInstance::createStructure(vm, globalObject, prototype));
-            ASSERT(m_errorStructure);
-            ASSERT(m_errorStructure-&gt;isObject());
-        }
-
</del><span class="cx">     private:
</span><span class="cx">         NativeErrorConstructor(VM&amp;, Structure*);
</span><span class="cx">         static const unsigned StructureFlags = OverridesVisitChildren | InternalFunction::StructureFlags;
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimePropertySloth"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/PropertySlot.h (163959 => 163960)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/PropertySlot.h        2014-02-12 17:10:25 UTC (rev 163959)
+++ trunk/Source/JavaScriptCore/runtime/PropertySlot.h        2014-02-12 17:14:23 UTC (rev 163960)
</span><span class="lines">@@ -36,13 +36,15 @@
</span><span class="cx"> // ECMA 262-3 8.6.1
</span><span class="cx"> // Property attributes
</span><span class="cx"> enum Attribute {
</span><del>-    None         = 0,
-    ReadOnly     = 1 &lt;&lt; 1,  // property can be only read, not written
-    DontEnum     = 1 &lt;&lt; 2,  // property doesn't appear in (for .. in ..)
-    DontDelete   = 1 &lt;&lt; 3,  // property can't be deleted
-    Function     = 1 &lt;&lt; 4,  // property is a function - only used by static hashtables
-    Accessor     = 1 &lt;&lt; 5,  // property is a getter/setter
-    CustomAccessor = 1 &lt;&lt; 6,
</del><ins>+    None              = 0,
+    ReadOnly          = 1 &lt;&lt; 1,  // property can be only read, not written
+    DontEnum          = 1 &lt;&lt; 2,  // property doesn't appear in (for .. in ..)
+    DontDelete        = 1 &lt;&lt; 3,  // property can't be deleted
+    Function          = 1 &lt;&lt; 4,  // property is a function - only used by static hashtables
+    Accessor          = 1 &lt;&lt; 5,  // property is a getter/setter
+    CustomAccessor    = 1 &lt;&lt; 6,
+    Builtin           = 1 &lt;&lt; 7, // property is a builtin function - only used by static hashtables
+    BuiltinOrFunction = Builtin | Function, // helper only used by static hashtables
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> class PropertySlot {
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeVMcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/VM.cpp (163959 => 163960)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/VM.cpp        2014-02-12 17:10:25 UTC (rev 163959)
+++ trunk/Source/JavaScriptCore/runtime/VM.cpp        2014-02-12 17:14:23 UTC (rev 163960)
</span><span class="lines">@@ -32,6 +32,7 @@
</span><span class="cx"> #include &quot;ArgList.h&quot;
</span><span class="cx"> #include &quot;ArityCheckFailReturnThunks.h&quot;
</span><span class="cx"> #include &quot;ArrayBufferNeuteringWatchpoint.h&quot;
</span><ins>+#include &quot;BuiltinExecutables.h&quot;
</ins><span class="cx"> #include &quot;CodeBlock.h&quot;
</span><span class="cx"> #include &quot;CodeCache.h&quot;
</span><span class="cx"> #include &quot;CommonIdentifiers.h&quot;
</span><span class="lines">@@ -68,13 +69,16 @@
</span><span class="cx"> #include &quot;Lookup.h&quot;
</span><span class="cx"> #include &quot;MapData.h&quot;
</span><span class="cx"> #include &quot;Nodes.h&quot;
</span><ins>+#include &quot;Parser.h&quot;
</ins><span class="cx"> #include &quot;ParserArena.h&quot;
</span><ins>+#include &quot;PropertyMapHashTable.h&quot;
</ins><span class="cx"> #include &quot;RegExpCache.h&quot;
</span><span class="cx"> #include &quot;RegExpObject.h&quot;
</span><span class="cx"> #include &quot;SimpleTypedArrayController.h&quot;
</span><span class="cx"> #include &quot;SourceProviderCache.h&quot;
</span><span class="cx"> #include &quot;StrictEvalActivation.h&quot;
</span><span class="cx"> #include &quot;StrongInlines.h&quot;
</span><ins>+#include &quot;StructureInlines.h&quot;
</ins><span class="cx"> #include &quot;UnlinkedCodeBlock.h&quot;
</span><span class="cx"> #include &quot;WeakMapData.h&quot;
</span><span class="cx"> #include &lt;wtf/ProcessID.h&gt;
</span><span class="lines">@@ -226,6 +230,7 @@
</span><span class="cx">     , m_inDefineOwnProperty(false)
</span><span class="cx">     , m_codeCache(CodeCache::create())
</span><span class="cx">     , m_enabledProfiler(nullptr)
</span><ins>+    , m_builtinExecutables(BuiltinExecutables::create(*this))
</ins><span class="cx"> {
</span><span class="cx">     interpreter = new Interpreter(*this);
</span><span class="cx">     StackBounds stack = wtfThreadData().stack();
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeVMh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/VM.h (163959 => 163960)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/VM.h        2014-02-12 17:10:25 UTC (rev 163959)
+++ trunk/Source/JavaScriptCore/runtime/VM.h        2014-02-12 17:14:23 UTC (rev 163960)
</span><span class="lines">@@ -44,6 +44,7 @@
</span><span class="cx"> #include &quot;PrivateName.h&quot;
</span><span class="cx"> #include &quot;PrototypeMap.h&quot;
</span><span class="cx"> #include &quot;SmallStrings.h&quot;
</span><ins>+#include &quot;SourceCode.h&quot;
</ins><span class="cx"> #include &quot;Strong.h&quot;
</span><span class="cx"> #include &quot;ThunkGenerators.h&quot;
</span><span class="cx"> #include &quot;TypedArrayController.h&quot;
</span><span class="lines">@@ -69,6 +70,7 @@
</span><span class="cx"> namespace JSC {
</span><span class="cx"> 
</span><span class="cx">     class ArityCheckFailReturnThunks;
</span><ins>+    class BuiltinExecutables;
</ins><span class="cx">     class CodeBlock;
</span><span class="cx">     class CodeCache;
</span><span class="cx">     class CommonIdentifiers;
</span><span class="lines">@@ -497,6 +499,8 @@
</span><span class="cx">         void registerWatchpointForImpureProperty(const Identifier&amp;, Watchpoint*);
</span><span class="cx">         // FIXME: Use AtomicString once it got merged with Identifier.
</span><span class="cx">         JS_EXPORT_PRIVATE void addImpureProperty(const String&amp;);
</span><ins>+        
+        BuiltinExecutables* builtinExecutables() { return m_builtinExecutables.get(); }
</ins><span class="cx"> 
</span><span class="cx">     private:
</span><span class="cx">         friend class LLIntOffsetsExtractor;
</span><span class="lines">@@ -537,10 +541,9 @@
</span><span class="cx">         JSValue m_exception;
</span><span class="cx">         bool m_inDefineOwnProperty;
</span><span class="cx">         OwnPtr&lt;CodeCache&gt; m_codeCache;
</span><ins>+        LegacyProfiler* m_enabledProfiler;
+        OwnPtr&lt;BuiltinExecutables&gt; m_builtinExecutables;
</ins><span class="cx">         RefCountedArray&lt;StackFrame&gt; m_exceptionStack;
</span><del>-
-        LegacyProfiler* m_enabledProfiler;
-
</del><span class="cx">         HashMap&lt;String, RefPtr&lt;WatchpointSet&gt;&gt; m_impurePropertyWatchpointSets;
</span><span class="cx">     };
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourcecmakegtestCMakeListstxt"></a>
<div class="modfile"><h4>Modified: trunk/Source/cmake/gtest/CMakeLists.txt (163959 => 163960)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/cmake/gtest/CMakeLists.txt        2014-02-12 17:10:25 UTC (rev 163959)
+++ trunk/Source/cmake/gtest/CMakeLists.txt        2014-02-12 17:14:23 UTC (rev 163960)
</span><span class="lines">@@ -6,6 +6,7 @@
</span><span class="cx"> include_directories(${THIRDPARTY_DIR}/gtest
</span><span class="cx">     ${THIRDPARTY_DIR}/gtest/include
</span><span class="cx">     ${JAVASCRIPTCORE_DIR}
</span><ins>+    ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}
</ins><span class="cx">     ${WTF_DIR}
</span><span class="cx"> )
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkToolsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Tools/ChangeLog (163959 => 163960)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/ChangeLog        2014-02-12 17:10:25 UTC (rev 163959)
+++ trunk/Tools/ChangeLog        2014-02-12 17:14:23 UTC (rev 163960)
</span><span class="lines">@@ -1,3 +1,16 @@
</span><ins>+2014-02-11  Oliver Hunt  &lt;oliver@apple.com&gt;
+
+        Make it possible to implement JS builtins in JS
+        https://bugs.webkit.org/show_bug.cgi?id=127887
+
+        Reviewed by Michael Saboff.
+
+        CMake updates
+
+        * DumpRenderTree/CMakeLists.txt:
+        * WebKitTestRunner/CMakeLists.txt:
+        * WinCELauncher/CMakeLists.txt:
+
</ins><span class="cx"> 2014-02-11  Filip Pizlo  &lt;fpizlo@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         It should be possible to force copy-webkitlibraries-blahblah to copy things regardless of timestamp
</span></span></pre></div>
<a id="trunkToolsDumpRenderTreeCMakeListstxt"></a>
<div class="modfile"><h4>Modified: trunk/Tools/DumpRenderTree/CMakeLists.txt (163959 => 163960)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/DumpRenderTree/CMakeLists.txt        2014-02-12 17:10:25 UTC (rev 163959)
+++ trunk/Tools/DumpRenderTree/CMakeLists.txt        2014-02-12 17:14:23 UTC (rev 163960)
</span><span class="lines">@@ -58,6 +58,7 @@
</span><span class="cx">     ${JAVASCRIPTCORE_DIR}/profiler
</span><span class="cx">     ${JAVASCRIPTCORE_DIR}/runtime
</span><span class="cx">     ${JAVASCRIPTCORE_DIR}/ForwardingHeaders
</span><ins>+    ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}
</ins><span class="cx">     ${TOOLS_DIR}/DumpRenderTree
</span><span class="cx">     ${WTF_DIR}
</span><span class="cx">     ${CMAKE_SOURCE_DIR}/Source
</span></span></pre></div>
<a id="trunkToolsWebKitTestRunnerCMakeListstxt"></a>
<div class="modfile"><h4>Modified: trunk/Tools/WebKitTestRunner/CMakeLists.txt (163959 => 163960)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/WebKitTestRunner/CMakeLists.txt        2014-02-12 17:10:25 UTC (rev 163959)
+++ trunk/Tools/WebKitTestRunner/CMakeLists.txt        2014-02-12 17:14:23 UTC (rev 163960)
</span><span class="lines">@@ -28,6 +28,7 @@
</span><span class="cx">     ${WEBKIT_TESTRUNNER_DIR}/InjectedBundle/atk
</span><span class="cx">     ${JAVASCRIPTCORE_DIR}
</span><span class="cx">     ${JAVASCRIPTCORE_DIR}/ForwardingHeaders
</span><ins>+    ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}
</ins><span class="cx">     ${WEBCORE_DIR}/editing
</span><span class="cx">     ${WEBCORE_DIR}/platform
</span><span class="cx">     ${WEBCORE_DIR}/platform/graphics
</span></span></pre></div>
<a id="trunkToolsWinCELauncherCMakeListstxt"></a>
<div class="modfile"><h4>Modified: trunk/Tools/WinCELauncher/CMakeLists.txt (163959 => 163960)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/WinCELauncher/CMakeLists.txt        2014-02-12 17:10:25 UTC (rev 163959)
+++ trunk/Tools/WinCELauncher/CMakeLists.txt        2014-02-12 17:14:23 UTC (rev 163960)
</span><span class="lines">@@ -6,6 +6,7 @@
</span><span class="cx">     &quot;${WEBCORE_DIR}/platform/network&quot;
</span><span class="cx">     &quot;${WEBCORE_DIR}/platform/text&quot;
</span><span class="cx">     &quot;${JAVASCRIPTCORE_DIR}&quot;
</span><ins>+    &quot;${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}&quot;
</ins><span class="cx">     &quot;${WTF_DIR}&quot;
</span><span class="cx">     &quot;${DERIVED_SOURCES_DIR}&quot;
</span><span class="cx">     &quot;${CMAKE_BINARY_DIR}&quot;
</span></span></pre>
</div>
</div>

</body>
</html>