<!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>[191433] 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/191433">191433</a></dd>
<dt>Author</dt> <dd>bburg@apple.com</dd>
<dt>Date</dt> <dd>2015-10-21 21:39:01 -0700 (Wed, 21 Oct 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>Restructure generate-js-bindings script to be modular and testable
https://bugs.webkit.org/show_bug.cgi?id=149929

Reviewed by Alex Christensen.

Source/JavaScriptCore:

This is a new code generator, based on the replay inputs code generator and
the inspector protocol code generator, which produces various files for JS
builtins.

Relative to the generator it replaces, this one consolidates two scripts in
JavaScriptCore and WebCore into a single script with multiple files. Parsed
information about the builtins file is stored in backend-independent model
objects. Each output file has its own code generator that uses the model to
produce resulting code. Generators are additionally parameterized by the target
framework (to choose correct macros and includes) and output mode (one
header/implementation file per builtin or per framework).

It includes a few simple tests of the generator's functionality. These result-
based tests will become increasingly more important as we start to add support
for builtins annotation such as @optional, @internal, etc. to the code generator.

Some of these complexities, such as having two output modes, will be removed in
subsequent patches. This patch is intended to exactly replace the existing
functionality with a unified script that makes additional cleanups straightforward.

Additional cleanup and consolidation between inspector code generator scripts
and this script will be pursued in followup patches.

New tests:

Scripts/tests/builtins/JavaScriptCore-Builtin.Promise-Combined.js
Scripts/tests/builtins/JavaScriptCore-Builtin.Promise-Separate.js
Scripts/tests/builtins/JavaScriptCore-Builtin.prototype-Combined.js
Scripts/tests/builtins/JavaScriptCore-Builtin.prototype-Separate.js
Scripts/tests/builtins/JavaScriptCore-BuiltinConstructor-Combined.js
Scripts/tests/builtins/JavaScriptCore-BuiltinConstructor-Separate.js
Scripts/tests/builtins/WebCore-GuardedBuiltin-Separate.js
Scripts/tests/builtins/WebCore-GuardedInternalBuiltin-Separate.js
Scripts/tests/builtins/WebCore-UnguardedBuiltin-Separate.js
Scripts/tests/builtins/WebCore-xmlCasingTest-Separate.js

* CMakeLists.txt:

    Copy the scripts that are used by other targets to a staging directory inside
    ${DERIVED_SOURCES_DIR}/ForwardingHeaders/JavaScriptCore/Scripts.
    Define JavaScriptCore_SCRIPTS_DIR to point here so that the add_custom_command
    and shared file lists are identical between JavaScriptCore and WebCore. The staged
    scripts are a dependency of the main JavaScriptCore target so that they are
    always staged, even if JavaScriptCore itself does not use a particular script.

    The output files additionally depend on all builtin generator script files
    and input files that are combined into the single header/implementation file.

* DerivedSources.make:

    Define JavaScriptCore_SCRIPTS_DIR explicitly so the rule for code generation and
    shared file lists are identical between JavaScriptCore and WebCore.

    The output files additionally depend on all builtin generator script files
    and input files that are combined into the single header/implementation file.

* JavaScriptCore.xcodeproj/project.pbxproj:

    Mark the new builtins generator files as private headers so we can use them from
    WebCore.

* Scripts/UpdateContents.py: Renamed from Source/JavaScriptCore/UpdateContents.py.
* Scripts/builtins/__init__.py: Added.
* Scripts/builtins/builtins.py: Added.
* Scripts/builtins/builtins_generator.py: Added. This file contains the base generator.
(WK_lcfirst):
(WK_ucfirst):
(BuiltinsGenerator):
(BuiltinsGenerator.__init__):
(BuiltinsGenerator.model):
(BuiltinsGenerator.generate_license):
(BuiltinsGenerator.generate_includes_from_entries):
(BuiltinsGenerator.generate_output):
(BuiltinsGenerator.output_filename):
(BuiltinsGenerator.mangledNameForFunction):
(BuiltinsGenerator.mangledNameForFunction.toCamel):
(BuiltinsGenerator.generate_embedded_code_string_section_for_function):
* Scripts/builtins/builtins_model.py: Added. This file contains builtins model objects.
(ParseException):
(Framework):
(Framework.__init__):
(Framework.setting):
(Framework.fromString):
(Frameworks):
(BuiltinObject):
(BuiltinObject.__init__):
(BuiltinFunction):
(BuiltinFunction.__init__):
(BuiltinFunction.fromString):
(BuiltinFunction.__str__):
(BuiltinsCollection):
(BuiltinsCollection.__init__):
(BuiltinsCollection.parse_builtins_file):
(BuiltinsCollection.copyrights):
(BuiltinsCollection.all_functions):
(BuiltinsCollection._parse_copyright_lines):
(BuiltinsCollection._parse_functions):
* Scripts/builtins/builtins_templates.py: Added.
(BuiltinsGeneratorTemplates):
* Scripts/builtins/builtins_generate_combined_header.py: Added.
(BuiltinsCombinedHeaderGenerator):
(BuiltinsCombinedHeaderGenerator.__init__):
(BuiltinsCombinedHeaderGenerator.output_filename):
(BuiltinsCombinedHeaderGenerator.generate_output):
(BuiltinsCombinedHeaderGenerator.generate_forward_declarations):
(FunctionExecutable):
(VM):
(ConstructAbility):
(generate_section_for_object):
(generate_externs_for_object):
(generate_macros_for_object):
(generate_defines_for_object):
(generate_section_for_code_table_macro):
(generate_section_for_code_name_macro):
* Scripts/builtins/builtins_generate_combined_implementation.py: Added.
(BuiltinsCombinedImplementationGenerator):
(BuiltinsCombinedImplementationGenerator.__init__):
(BuiltinsCombinedImplementationGenerator.output_filename):
(BuiltinsCombinedImplementationGenerator.generate_output):
(BuiltinsCombinedImplementationGenerator.generate_header_includes):
* Scripts/builtins/builtins_generate_separate_header.py: Added.
(BuiltinsSeparateHeaderGenerator):
(BuiltinsSeparateHeaderGenerator.__init__):
(BuiltinsSeparateHeaderGenerator.output_filename):
(BuiltinsSeparateHeaderGenerator.macro_prefix):
(BuiltinsSeparateHeaderGenerator.generate_output):
(BuiltinsSeparateHeaderGenerator.generate_forward_declarations):
(FunctionExecutable):
(generate_header_includes):
(generate_section_for_object):
(generate_externs_for_object):
(generate_macros_for_object):
(generate_defines_for_object):
(generate_section_for_code_table_macro):
(generate_section_for_code_name_macro):
* Scripts/builtins/builtins_generate_separate_implementation.py: Added.
(BuiltinsSeparateImplementationGenerator):
(BuiltinsSeparateImplementationGenerator.__init__):
(BuiltinsSeparateImplementationGenerator.output_filename):
(BuiltinsSeparateImplementationGenerator.macro_prefix):
(BuiltinsSeparateImplementationGenerator.generate_output):
(BuiltinsSeparateImplementationGenerator.generate_header_includes):
* Scripts/builtins/builtins_generate_separate_wrapper.py: Added.
(BuiltinsSeparateWrapperGenerator):
(BuiltinsSeparateWrapperGenerator.__init__):
(BuiltinsSeparateWrapperGenerator.output_filename):
(BuiltinsSeparateWrapperGenerator.macro_prefix):
(BuiltinsSeparateWrapperGenerator.generate_output):
(BuiltinsSeparateWrapperGenerator.generate_header_includes):
* Scripts/generate-js-builtins.py: Added.

    Parse command line options, decide which generators and output modes to use.

(generate_bindings_for_builtins_files):
* Scripts/lazywriter.py: Copied from the inspector protocol generator.
(LazyFileWriter):
(LazyFileWriter.__init__):
(LazyFileWriter.write):
(LazyFileWriter.close):
* Scripts/tests/builtins/JavaScriptCore-Builtin.Promise-Combined.js: Added.
* Scripts/tests/builtins/JavaScriptCore-Builtin.Promise-Separate.js: Added.
* Scripts/tests/builtins/JavaScriptCore-Builtin.prototype-Combined.js: Added.
* Scripts/tests/builtins/JavaScriptCore-Builtin.prototype-Separate.js: Added.
* Scripts/tests/builtins/JavaScriptCore-BuiltinConstructor-Combined.js: Added.
* Scripts/tests/builtins/JavaScriptCore-BuiltinConstructor-Separate.js: Added.
* Scripts/tests/builtins/WebCore-GuardedBuiltin-Separate.js: Added.
* Scripts/tests/builtins/WebCore-GuardedInternalBuiltin-Separate.js: Added.
* Scripts/tests/builtins/WebCore-UnguardedBuiltin-Separate.js: Added.
* Scripts/tests/builtins/WebCore-xmlCasingTest-Separate.js: Added.
* Scripts/tests/builtins/expected/JavaScriptCore-Builtin.Promise-Combined.js-result: Added.
* Scripts/tests/builtins/expected/JavaScriptCore-Builtin.Promise-Separate.js-result: Added.
* Scripts/tests/builtins/expected/JavaScriptCore-Builtin.prototype-Combined.js-result: Added.
* Scripts/tests/builtins/expected/JavaScriptCore-Builtin.prototype-Separate.js-result: Added.
* Scripts/tests/builtins/expected/JavaScriptCore-BuiltinConstructor-Combined.js-result: Added.
* Scripts/tests/builtins/expected/JavaScriptCore-BuiltinConstructor-Separate.js-result: Added.
* Scripts/tests/builtins/expected/WebCore-GuardedBuiltin-Separate.js-result: Added.
* Scripts/tests/builtins/expected/WebCore-GuardedInternalBuiltin-Separate.js-result: Added.
* Scripts/tests/builtins/expected/WebCore-UnguardedBuiltin-Separate.js-result: Added.
* Scripts/tests/builtins/expected/WebCore-xmlCasingTest-Separate.js-result: Added.
* builtins/BuiltinExecutables.cpp:
(JSC::BuiltinExecutables::BuiltinExecutables):
* builtins/BuiltinExecutables.h:
* create_hash_table:

    Update the generated builtin macro names.

* generate-js-builtins: Removed.

Source/WebCore:

* CMakeLists.txt:

    Define JavaScriptCore_SCRIPTS_DIR explicitly so the add_custom_command and
    shared file lists are identical between JavaScriptCore and WebCore.

    The output files additionally depend on all builtin generator script files.

* DerivedSources.make:

    Use JavaScriptCore_SCRIPTS_DIR so that the rule for code generation and
    shared file lists are identical between JavaScriptCore and WebCore.

    The output files additionally depend on all builtin generator script files.

* WebCore.xcodeproj/project.pbxproj:

    Define JavaScriptCore_SCRIPTS_DIR before calling DerivedSources.make.
    This will eventually be merged with the other similar script paths.

* bindings/js/JSDOMWindowBase.cpp:
(WebCore::JSDOMWindowBase::finishCreation):

    Update the generated builtin macro names.

* generate-js-builtins: Removed.

Tools:

Add a stub shell script and basic webkitpy support for running builtins
generator tests.

* Scripts/run-builtins-generator-tests: Added.
(main):
* Scripts/webkitpy/codegen/__init__.py: Added.
* Scripts/webkitpy/codegen/main.py: Added.

    The only interesting difference here from the inspector protocol
    generator equivalent is that this implementation decodes the target
    framework and output mode (combined or separate) from the test's file name.

(BuiltinsGeneratorTests):
(BuiltinsGeneratorTests.__init__):
(BuiltinsGeneratorTests.generate_from_js_builtins):
(BuiltinsGeneratorTests.write_error_file):
(BuiltinsGeneratorTests.detect_changes):
(BuiltinsGeneratorTests.run_tests):
(BuiltinsGeneratorTests.main):</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceJavaScriptCoreCMakeListstxt">trunk/Source/JavaScriptCore/CMakeLists.txt</a></li>
<li><a href="#trunkSourceJavaScriptCoreChangeLog">trunk/Source/JavaScriptCore/ChangeLog</a></li>
<li><a href="#trunkSourceJavaScriptCoreDerivedSourcesmake">trunk/Source/JavaScriptCore/DerivedSources.make</a></li>
<li><a href="#trunkSourceJavaScriptCoreJavaScriptCorexcodeprojprojectpbxproj">trunk/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkSourceJavaScriptCorePlatformWincmake">trunk/Source/JavaScriptCore/PlatformWin.cmake</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="#trunkSourceJavaScriptCorecreate_hash_table">trunk/Source/JavaScriptCore/create_hash_table</a></li>
<li><a href="#trunkSourceWebCoreCMakeListstxt">trunk/Source/WebCore/CMakeLists.txt</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreDerivedSourcesmake">trunk/Source/WebCore/DerivedSources.make</a></li>
<li><a href="#trunkSourceWebCoreWebCorexcodeprojprojectpbxproj">trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSDOMWindowBasecpp">trunk/Source/WebCore/bindings/js/JSDOMWindowBase.cpp</a></li>
<li><a href="#trunkToolsChangeLog">trunk/Tools/ChangeLog</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkSourceJavaScriptCoreScriptsUpdateContentspy">trunk/Source/JavaScriptCore/Scripts/UpdateContents.py</a></li>
<li>trunk/Source/JavaScriptCore/Scripts/builtins/</li>
<li><a href="#trunkSourceJavaScriptCoreScriptsbuiltins__init__py">trunk/Source/JavaScriptCore/Scripts/builtins/__init__.py</a></li>
<li><a href="#trunkSourceJavaScriptCoreScriptsbuiltinsbuiltinspy">trunk/Source/JavaScriptCore/Scripts/builtins/builtins.py</a></li>
<li><a href="#trunkSourceJavaScriptCoreScriptsbuiltinsbuiltins_generate_combined_headerpy">trunk/Source/JavaScriptCore/Scripts/builtins/builtins_generate_combined_header.py</a></li>
<li><a href="#trunkSourceJavaScriptCoreScriptsbuiltinsbuiltins_generate_combined_implementationpy">trunk/Source/JavaScriptCore/Scripts/builtins/builtins_generate_combined_implementation.py</a></li>
<li><a href="#trunkSourceJavaScriptCoreScriptsbuiltinsbuiltins_generate_separate_headerpy">trunk/Source/JavaScriptCore/Scripts/builtins/builtins_generate_separate_header.py</a></li>
<li><a href="#trunkSourceJavaScriptCoreScriptsbuiltinsbuiltins_generate_separate_implementationpy">trunk/Source/JavaScriptCore/Scripts/builtins/builtins_generate_separate_implementation.py</a></li>
<li><a href="#trunkSourceJavaScriptCoreScriptsbuiltinsbuiltins_generate_separate_wrapperpy">trunk/Source/JavaScriptCore/Scripts/builtins/builtins_generate_separate_wrapper.py</a></li>
<li><a href="#trunkSourceJavaScriptCoreScriptsbuiltinsbuiltins_generatorpy">trunk/Source/JavaScriptCore/Scripts/builtins/builtins_generator.py</a></li>
<li><a href="#trunkSourceJavaScriptCoreScriptsbuiltinsbuiltins_modelpy">trunk/Source/JavaScriptCore/Scripts/builtins/builtins_model.py</a></li>
<li><a href="#trunkSourceJavaScriptCoreScriptsbuiltinsbuiltins_templatespy">trunk/Source/JavaScriptCore/Scripts/builtins/builtins_templates.py</a></li>
<li><a href="#trunkSourceJavaScriptCoreScriptsgeneratejsbuiltinspy">trunk/Source/JavaScriptCore/Scripts/generate-js-builtins.py</a></li>
<li><a href="#trunkSourceJavaScriptCoreScriptslazywriterpy">trunk/Source/JavaScriptCore/Scripts/lazywriter.py</a></li>
<li>trunk/Source/JavaScriptCore/Scripts/tests/</li>
<li>trunk/Source/JavaScriptCore/Scripts/tests/builtins/</li>
<li><a href="#trunkSourceJavaScriptCoreScriptstestsbuiltinsJavaScriptCoreBuiltinPromiseCombinedjs">trunk/Source/JavaScriptCore/Scripts/tests/builtins/JavaScriptCore-Builtin.Promise-Combined.js</a></li>
<li><a href="#trunkSourceJavaScriptCoreScriptstestsbuiltinsJavaScriptCoreBuiltinPromiseSeparatejs">trunk/Source/JavaScriptCore/Scripts/tests/builtins/JavaScriptCore-Builtin.Promise-Separate.js</a></li>
<li><a href="#trunkSourceJavaScriptCoreScriptstestsbuiltinsJavaScriptCoreBuiltinprototypeCombinedjs">trunk/Source/JavaScriptCore/Scripts/tests/builtins/JavaScriptCore-Builtin.prototype-Combined.js</a></li>
<li><a href="#trunkSourceJavaScriptCoreScriptstestsbuiltinsJavaScriptCoreBuiltinprototypeSeparatejs">trunk/Source/JavaScriptCore/Scripts/tests/builtins/JavaScriptCore-Builtin.prototype-Separate.js</a></li>
<li><a href="#trunkSourceJavaScriptCoreScriptstestsbuiltinsJavaScriptCoreBuiltinConstructorCombinedjs">trunk/Source/JavaScriptCore/Scripts/tests/builtins/JavaScriptCore-BuiltinConstructor-Combined.js</a></li>
<li><a href="#trunkSourceJavaScriptCoreScriptstestsbuiltinsJavaScriptCoreBuiltinConstructorSeparatejs">trunk/Source/JavaScriptCore/Scripts/tests/builtins/JavaScriptCore-BuiltinConstructor-Separate.js</a></li>
<li><a href="#trunkSourceJavaScriptCoreScriptstestsbuiltinsWebCoreGuardedBuiltinSeparatejs">trunk/Source/JavaScriptCore/Scripts/tests/builtins/WebCore-GuardedBuiltin-Separate.js</a></li>
<li><a href="#trunkSourceJavaScriptCoreScriptstestsbuiltinsWebCoreGuardedInternalBuiltinSeparatejs">trunk/Source/JavaScriptCore/Scripts/tests/builtins/WebCore-GuardedInternalBuiltin-Separate.js</a></li>
<li><a href="#trunkSourceJavaScriptCoreScriptstestsbuiltinsWebCoreUnguardedBuiltinSeparatejs">trunk/Source/JavaScriptCore/Scripts/tests/builtins/WebCore-UnguardedBuiltin-Separate.js</a></li>
<li><a href="#trunkSourceJavaScriptCoreScriptstestsbuiltinsWebCorexmlCasingTestSeparatejs">trunk/Source/JavaScriptCore/Scripts/tests/builtins/WebCore-xmlCasingTest-Separate.js</a></li>
<li>trunk/Source/JavaScriptCore/Scripts/tests/builtins/expected/</li>
<li><a href="#trunkSourceJavaScriptCoreScriptstestsbuiltinsexpectedJavaScriptCoreBuiltinPromiseCombinedjsresult">trunk/Source/JavaScriptCore/Scripts/tests/builtins/expected/JavaScriptCore-Builtin.Promise-Combined.js-result</a></li>
<li><a href="#trunkSourceJavaScriptCoreScriptstestsbuiltinsexpectedJavaScriptCoreBuiltinPromiseSeparatejsresult">trunk/Source/JavaScriptCore/Scripts/tests/builtins/expected/JavaScriptCore-Builtin.Promise-Separate.js-result</a></li>
<li><a href="#trunkSourceJavaScriptCoreScriptstestsbuiltinsexpectedJavaScriptCoreBuiltinprototypeCombinedjsresult">trunk/Source/JavaScriptCore/Scripts/tests/builtins/expected/JavaScriptCore-Builtin.prototype-Combined.js-result</a></li>
<li><a href="#trunkSourceJavaScriptCoreScriptstestsbuiltinsexpectedJavaScriptCoreBuiltinprototypeSeparatejsresult">trunk/Source/JavaScriptCore/Scripts/tests/builtins/expected/JavaScriptCore-Builtin.prototype-Separate.js-result</a></li>
<li><a href="#trunkSourceJavaScriptCoreScriptstestsbuiltinsexpectedJavaScriptCoreBuiltinConstructorCombinedjsresult">trunk/Source/JavaScriptCore/Scripts/tests/builtins/expected/JavaScriptCore-BuiltinConstructor-Combined.js-result</a></li>
<li><a href="#trunkSourceJavaScriptCoreScriptstestsbuiltinsexpectedJavaScriptCoreBuiltinConstructorSeparatejsresult">trunk/Source/JavaScriptCore/Scripts/tests/builtins/expected/JavaScriptCore-BuiltinConstructor-Separate.js-result</a></li>
<li><a href="#trunkSourceJavaScriptCoreScriptstestsbuiltinsexpectedJavaScriptCoreOperationsPromiseCombinedjsresult">trunk/Source/JavaScriptCore/Scripts/tests/builtins/expected/JavaScriptCore-Operations.Promise-Combined.js-result</a></li>
<li><a href="#trunkSourceJavaScriptCoreScriptstestsbuiltinsexpectedWebCoreGuardedBuiltinSeparatejsresult">trunk/Source/JavaScriptCore/Scripts/tests/builtins/expected/WebCore-GuardedBuiltin-Separate.js-result</a></li>
<li><a href="#trunkSourceJavaScriptCoreScriptstestsbuiltinsexpectedWebCoreGuardedInternalBuiltinSeparatejsresult">trunk/Source/JavaScriptCore/Scripts/tests/builtins/expected/WebCore-GuardedInternalBuiltin-Separate.js-result</a></li>
<li><a href="#trunkSourceJavaScriptCoreScriptstestsbuiltinsexpectedWebCoreUnguardedBuiltinSeparatejsresult">trunk/Source/JavaScriptCore/Scripts/tests/builtins/expected/WebCore-UnguardedBuiltin-Separate.js-result</a></li>
<li><a href="#trunkSourceJavaScriptCoreScriptstestsbuiltinsexpectedWebCorexmlCasingTestSeparatejsresult">trunk/Source/JavaScriptCore/Scripts/tests/builtins/expected/WebCore-xmlCasingTest-Separate.js-result</a></li>
<li><a href="#trunkToolsScriptsrunbuiltinsgeneratortests">trunk/Tools/Scripts/run-builtins-generator-tests</a></li>
<li>trunk/Tools/Scripts/webkitpy/codegen/</li>
<li><a href="#trunkToolsScriptswebkitpycodegen__init__py">trunk/Tools/Scripts/webkitpy/codegen/__init__.py</a></li>
<li><a href="#trunkToolsScriptswebkitpycodegenmainpy">trunk/Tools/Scripts/webkitpy/codegen/main.py</a></li>
</ul>

<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkSourceJavaScriptCoreScriptsgeneratejsbuiltins">trunk/Source/JavaScriptCore/Scripts/generate-js-builtins</a></li>
<li><a href="#trunkSourceJavaScriptCoreUpdateContentspy">trunk/Source/JavaScriptCore/UpdateContents.py</a></li>
<li><a href="#trunkSourceWebCoregeneratejsbuiltins">trunk/Source/WebCore/generate-js-builtins</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceJavaScriptCoreCMakeListstxt"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/CMakeLists.txt (191432 => 191433)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/CMakeLists.txt        2015-10-22 03:17:06 UTC (rev 191432)
+++ trunk/Source/JavaScriptCore/CMakeLists.txt        2015-10-22 04:39:01 UTC (rev 191433)
</span><span class="lines">@@ -699,13 +699,42 @@
</span><span class="cx">     runtime/SymbolPrototype.cpp
</span><span class="cx"> )
</span><span class="cx"> 
</span><del>-set(JavaScriptCore_SCRIPTS_DIR &quot;${JAVASCRIPTCORE_DIR}/Scripts&quot;)
-
</del><span class="cx"> set(JavaScriptCore_LIBRARIES
</span><span class="cx">     WTF${DEBUG_SUFFIX}
</span><span class="cx">     ${ICU_I18N_LIBRARIES}
</span><span class="cx"> )
</span><span class="cx"> 
</span><ins>+set(JavaScriptCore_SCRIPTS_SOURCES_DIR &quot;${JAVASCRIPTCORE_DIR}/Scripts&quot;)
+
+# Globbing relies on the fact that generator-specific file names are prefixed with their directory.
+# Top-level scripts should have a file extension, since they are invoked during the build.
+
+set(JavaScriptCore_SCRIPTS_SOURCES_PATHS
+    ${JavaScriptCore_SCRIPTS_SOURCES_DIR}/*.pl
+    ${JavaScriptCore_SCRIPTS_SOURCES_DIR}/*.py
+    ${JavaScriptCore_SCRIPTS_SOURCES_DIR}/builtins/builtins*.py
+)
+
+# Force JavaScriptCore to run scripts from the same staging path as WebCore.
+set(JavaScriptCore_SCRIPTS_DIR &quot;${DERIVED_SOURCES_DIR}/ForwardingHeaders/JavaScriptCore/Scripts&quot;)
+
+file(MAKE_DIRECTORY ${JavaScriptCore_SCRIPTS_DIR})
+
+# The directory flattening performed below mirrors what the Mac port does with private headers.
+
+file(GLOB JavaScriptCore_SCRIPTS_SOURCES ${JavaScriptCore_SCRIPTS_SOURCES_PATHS})
+
+foreach (_file ${JavaScriptCore_SCRIPTS_SOURCES})
+    get_filename_component(_script &quot;${_file}&quot; NAME)
+    add_custom_command(
+        OUTPUT ${JavaScriptCore_SCRIPTS_DIR}/${_script}
+        MAIN_DEPENDENCY ${_file}
+        WORKING_DIRECTORY ${DERIVED_SOURCES_DIR}
+        COMMAND ${CMAKE_COMMAND} -E copy_if_different ${_file} ${JavaScriptCore_SCRIPTS_DIR}/${_script}
+        VERBATIM)
+    list(APPEND JavaScriptCore_SCRIPTS ${JavaScriptCore_SCRIPTS_DIR}/${_script})
+endforeach ()
+
</ins><span class="cx"> if (USE_UDIS86)
</span><span class="cx">     set(UDIS_GEN_DEP
</span><span class="cx">         disassembler/udis86/ud_opcode.py
</span><span class="lines">@@ -940,7 +969,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} ${JavaScriptCore_SCRIPTS_DIR}/generate-js-builtins
</del><ins>+        DEPENDS ${HASH_LUT_GENERATOR} ${_input} ${JavaScriptCore_SCRIPTS_DIR}/generate-js-builtins.py
</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">@@ -1079,6 +1108,21 @@
</span><span class="cx">     VERBATIM)
</span><span class="cx"> 
</span><span class="cx"> # JSCBuiltins
</span><ins>+
+set(BUILTINS_GENERATOR_SCRIPTS
+    ${JavaScriptCore_SCRIPTS_DIR}/builtins.py
+    ${JavaScriptCore_SCRIPTS_DIR}/builtins_generator.py
+    ${JavaScriptCore_SCRIPTS_DIR}/builtins_model.py
+    ${JavaScriptCore_SCRIPTS_DIR}/builtins_templates.py
+    ${JavaScriptCore_SCRIPTS_DIR}/builtins_generate_combined_header.py
+    ${JavaScriptCore_SCRIPTS_DIR}/builtins_generate_combined_implementation.py
+    ${JavaScriptCore_SCRIPTS_DIR}/builtins_generate_separate_header.py
+    ${JavaScriptCore_SCRIPTS_DIR}/builtins_generate_separate_implementation.py
+    ${JavaScriptCore_SCRIPTS_DIR}/builtins_generate_separate_wrapper.py
+    ${JavaScriptCore_SCRIPTS_DIR}/generate-js-builtins.py
+    ${JavaScriptCore_SCRIPTS_DIR}/lazywriter.py
+)
+
</ins><span class="cx"> set(JavaScriptCore_BUILTINS_SOURCES
</span><span class="cx">     ${JAVASCRIPTCORE_DIR}/builtins/ArrayConstructor.js
</span><span class="cx">     ${JAVASCRIPTCORE_DIR}/builtins/ArrayIterator.prototype.js
</span><span class="lines">@@ -1101,10 +1145,11 @@
</span><span class="cx"> )
</span><span class="cx"> 
</span><span class="cx"> add_custom_command(
</span><del>-   OUTPUT ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/JSCBuiltins.cpp ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/JSCBuiltins.h
-   MAIN_DEPENDENCY ${JavaScriptCore_SCRIPTS_DIR}/generate-js-builtins
-   DEPENDS ${JavaScriptCore_BUILTINS_SOURCES}
-   COMMAND ${PYTHON_EXECUTABLE} ${JavaScriptCore_SCRIPTS_DIR}/generate-js-builtins --input-directory ${CMAKE_CURRENT_SOURCE_DIR}/builtins --output ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/JSCBuiltins.cpp
</del><ins>+   OUTPUT ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/JSCBuiltins.cpp
+          ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/JSCBuiltins.h
+   MAIN_DEPENDENCY ${JavaScriptCore_SCRIPTS_DIR}/generate-js-builtins.py
+   DEPENDS ${JavaScriptCore_BUILTINS_SOURCES} ${BUILTINS_GENERATOR_SCRIPTS}
+   COMMAND ${PYTHON_EXECUTABLE} ${JavaScriptCore_SCRIPTS_DIR}/generate-js-builtins.py --framework JavaScriptCore --output-directory ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR} --combined ${JavaScriptCore_BUILTINS_SOURCES}
</ins><span class="cx">    VERBATIM)
</span><span class="cx"> 
</span><span class="cx"> list(APPEND JavaScriptCore_SOURCES
</span><span class="lines">@@ -1208,4 +1253,7 @@
</span><span class="cx">     add_dependencies(JavaScriptCore llvmForJSC)
</span><span class="cx"> endif ()
</span><span class="cx"> 
</span><ins>+# Force staging of shared scripts, even if they aren't directly used to build JavaScriptCore.
</ins><span class="cx"> 
</span><ins>+add_custom_target(stageSharedScripts DEPENDS ${JavaScriptCore_SCRIPTS})
+add_dependencies(JavaScriptCore stageSharedScripts)
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/ChangeLog (191432 => 191433)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/ChangeLog        2015-10-22 03:17:06 UTC (rev 191432)
+++ trunk/Source/JavaScriptCore/ChangeLog        2015-10-22 04:39:01 UTC (rev 191433)
</span><span class="lines">@@ -1,3 +1,199 @@
</span><ins>+2015-10-21  Brian Burg  &lt;bburg@apple.com&gt;
+
+        Restructure generate-js-bindings script to be modular and testable
+        https://bugs.webkit.org/show_bug.cgi?id=149929
+
+        Reviewed by Alex Christensen.
+
+        This is a new code generator, based on the replay inputs code generator and
+        the inspector protocol code generator, which produces various files for JS
+        builtins.
+
+        Relative to the generator it replaces, this one consolidates two scripts in
+        JavaScriptCore and WebCore into a single script with multiple files. Parsed
+        information about the builtins file is stored in backend-independent model
+        objects. Each output file has its own code generator that uses the model to
+        produce resulting code. Generators are additionally parameterized by the target
+        framework (to choose correct macros and includes) and output mode (one
+        header/implementation file per builtin or per framework).
+
+        It includes a few simple tests of the generator's functionality. These result-
+        based tests will become increasingly more important as we start to add support
+        for builtins annotation such as @optional, @internal, etc. to the code generator.
+
+        Some of these complexities, such as having two output modes, will be removed in
+        subsequent patches. This patch is intended to exactly replace the existing
+        functionality with a unified script that makes additional cleanups straightforward.
+
+        Additional cleanup and consolidation between inspector code generator scripts
+        and this script will be pursued in followup patches.
+
+        New tests:
+
+        Scripts/tests/builtins/JavaScriptCore-Builtin.Promise-Combined.js
+        Scripts/tests/builtins/JavaScriptCore-Builtin.Promise-Separate.js
+        Scripts/tests/builtins/JavaScriptCore-Builtin.prototype-Combined.js
+        Scripts/tests/builtins/JavaScriptCore-Builtin.prototype-Separate.js
+        Scripts/tests/builtins/JavaScriptCore-BuiltinConstructor-Combined.js
+        Scripts/tests/builtins/JavaScriptCore-BuiltinConstructor-Separate.js
+        Scripts/tests/builtins/WebCore-GuardedBuiltin-Separate.js
+        Scripts/tests/builtins/WebCore-GuardedInternalBuiltin-Separate.js
+        Scripts/tests/builtins/WebCore-UnguardedBuiltin-Separate.js
+        Scripts/tests/builtins/WebCore-xmlCasingTest-Separate.js
+
+
+        * CMakeLists.txt:
+
+            Copy the scripts that are used by other targets to a staging directory inside
+            ${DERIVED_SOURCES_DIR}/ForwardingHeaders/JavaScriptCore/Scripts.
+            Define JavaScriptCore_SCRIPTS_DIR to point here so that the add_custom_command
+            and shared file lists are identical between JavaScriptCore and WebCore. The staged
+            scripts are a dependency of the main JavaScriptCore target so that they are
+            always staged, even if JavaScriptCore itself does not use a particular script.
+
+            The output files additionally depend on all builtin generator script files
+            and input files that are combined into the single header/implementation file.
+
+        * DerivedSources.make:
+
+            Define JavaScriptCore_SCRIPTS_DIR explicitly so the rule for code generation and
+            shared file lists are identical between JavaScriptCore and WebCore.
+
+            The output files additionally depend on all builtin generator script files
+            and input files that are combined into the single header/implementation file.
+
+        * JavaScriptCore.xcodeproj/project.pbxproj:
+
+            Mark the new builtins generator files as private headers so we can use them from
+            WebCore.
+
+        * Scripts/UpdateContents.py: Renamed from Source/JavaScriptCore/UpdateContents.py.
+        * Scripts/builtins/__init__.py: Added.
+        * Scripts/builtins/builtins.py: Added.
+        * Scripts/builtins/builtins_generator.py: Added. This file contains the base generator.
+        (WK_lcfirst):
+        (WK_ucfirst):
+        (BuiltinsGenerator):
+        (BuiltinsGenerator.__init__):
+        (BuiltinsGenerator.model):
+        (BuiltinsGenerator.generate_license):
+        (BuiltinsGenerator.generate_includes_from_entries):
+        (BuiltinsGenerator.generate_output):
+        (BuiltinsGenerator.output_filename):
+        (BuiltinsGenerator.mangledNameForFunction):
+        (BuiltinsGenerator.mangledNameForFunction.toCamel):
+        (BuiltinsGenerator.generate_embedded_code_string_section_for_function):
+        * Scripts/builtins/builtins_model.py: Added. This file contains builtins model objects.
+        (ParseException):
+        (Framework):
+        (Framework.__init__):
+        (Framework.setting):
+        (Framework.fromString):
+        (Frameworks):
+        (BuiltinObject):
+        (BuiltinObject.__init__):
+        (BuiltinFunction):
+        (BuiltinFunction.__init__):
+        (BuiltinFunction.fromString):
+        (BuiltinFunction.__str__):
+        (BuiltinsCollection):
+        (BuiltinsCollection.__init__):
+        (BuiltinsCollection.parse_builtins_file):
+        (BuiltinsCollection.copyrights):
+        (BuiltinsCollection.all_functions):
+        (BuiltinsCollection._parse_copyright_lines):
+        (BuiltinsCollection._parse_functions):
+        * Scripts/builtins/builtins_templates.py: Added.
+        (BuiltinsGeneratorTemplates):
+        * Scripts/builtins/builtins_generate_combined_header.py: Added.
+        (BuiltinsCombinedHeaderGenerator):
+        (BuiltinsCombinedHeaderGenerator.__init__):
+        (BuiltinsCombinedHeaderGenerator.output_filename):
+        (BuiltinsCombinedHeaderGenerator.generate_output):
+        (BuiltinsCombinedHeaderGenerator.generate_forward_declarations):
+        (FunctionExecutable):
+        (VM):
+        (ConstructAbility):
+        (generate_section_for_object):
+        (generate_externs_for_object):
+        (generate_macros_for_object):
+        (generate_defines_for_object):
+        (generate_section_for_code_table_macro):
+        (generate_section_for_code_name_macro):
+        * Scripts/builtins/builtins_generate_combined_implementation.py: Added.
+        (BuiltinsCombinedImplementationGenerator):
+        (BuiltinsCombinedImplementationGenerator.__init__):
+        (BuiltinsCombinedImplementationGenerator.output_filename):
+        (BuiltinsCombinedImplementationGenerator.generate_output):
+        (BuiltinsCombinedImplementationGenerator.generate_header_includes):
+        * Scripts/builtins/builtins_generate_separate_header.py: Added.
+        (BuiltinsSeparateHeaderGenerator):
+        (BuiltinsSeparateHeaderGenerator.__init__):
+        (BuiltinsSeparateHeaderGenerator.output_filename):
+        (BuiltinsSeparateHeaderGenerator.macro_prefix):
+        (BuiltinsSeparateHeaderGenerator.generate_output):
+        (BuiltinsSeparateHeaderGenerator.generate_forward_declarations):
+        (FunctionExecutable):
+        (generate_header_includes):
+        (generate_section_for_object):
+        (generate_externs_for_object):
+        (generate_macros_for_object):
+        (generate_defines_for_object):
+        (generate_section_for_code_table_macro):
+        (generate_section_for_code_name_macro):
+        * Scripts/builtins/builtins_generate_separate_implementation.py: Added.
+        (BuiltinsSeparateImplementationGenerator):
+        (BuiltinsSeparateImplementationGenerator.__init__):
+        (BuiltinsSeparateImplementationGenerator.output_filename):
+        (BuiltinsSeparateImplementationGenerator.macro_prefix):
+        (BuiltinsSeparateImplementationGenerator.generate_output):
+        (BuiltinsSeparateImplementationGenerator.generate_header_includes):
+        * Scripts/builtins/builtins_generate_separate_wrapper.py: Added.
+        (BuiltinsSeparateWrapperGenerator):
+        (BuiltinsSeparateWrapperGenerator.__init__):
+        (BuiltinsSeparateWrapperGenerator.output_filename):
+        (BuiltinsSeparateWrapperGenerator.macro_prefix):
+        (BuiltinsSeparateWrapperGenerator.generate_output):
+        (BuiltinsSeparateWrapperGenerator.generate_header_includes):
+        * Scripts/generate-js-builtins.py: Added.
+
+            Parse command line options, decide which generators and output modes to use.
+
+        (generate_bindings_for_builtins_files):
+        * Scripts/lazywriter.py: Copied from the inspector protocol generator.
+        (LazyFileWriter):
+        (LazyFileWriter.__init__):
+        (LazyFileWriter.write):
+        (LazyFileWriter.close):
+        * Scripts/tests/builtins/JavaScriptCore-Builtin.Promise-Combined.js: Added.
+        * Scripts/tests/builtins/JavaScriptCore-Builtin.Promise-Separate.js: Added.
+        * Scripts/tests/builtins/JavaScriptCore-Builtin.prototype-Combined.js: Added.
+        * Scripts/tests/builtins/JavaScriptCore-Builtin.prototype-Separate.js: Added.
+        * Scripts/tests/builtins/JavaScriptCore-BuiltinConstructor-Combined.js: Added.
+        * Scripts/tests/builtins/JavaScriptCore-BuiltinConstructor-Separate.js: Added.
+        * Scripts/tests/builtins/WebCore-GuardedBuiltin-Separate.js: Added.
+        * Scripts/tests/builtins/WebCore-GuardedInternalBuiltin-Separate.js: Added.
+        * Scripts/tests/builtins/WebCore-UnguardedBuiltin-Separate.js: Added.
+        * Scripts/tests/builtins/WebCore-xmlCasingTest-Separate.js: Added.
+        * Scripts/tests/builtins/expected/JavaScriptCore-Builtin.Promise-Combined.js-result: Added.
+        * Scripts/tests/builtins/expected/JavaScriptCore-Builtin.Promise-Separate.js-result: Added.
+        * Scripts/tests/builtins/expected/JavaScriptCore-Builtin.prototype-Combined.js-result: Added.
+        * Scripts/tests/builtins/expected/JavaScriptCore-Builtin.prototype-Separate.js-result: Added.
+        * Scripts/tests/builtins/expected/JavaScriptCore-BuiltinConstructor-Combined.js-result: Added.
+        * Scripts/tests/builtins/expected/JavaScriptCore-BuiltinConstructor-Separate.js-result: Added.
+        * Scripts/tests/builtins/expected/WebCore-GuardedBuiltin-Separate.js-result: Added.
+        * Scripts/tests/builtins/expected/WebCore-GuardedInternalBuiltin-Separate.js-result: Added.
+        * Scripts/tests/builtins/expected/WebCore-UnguardedBuiltin-Separate.js-result: Added.
+        * Scripts/tests/builtins/expected/WebCore-xmlCasingTest-Separate.js-result: Added.
+        * builtins/BuiltinExecutables.cpp:
+        (JSC::BuiltinExecutables::BuiltinExecutables):
+        * builtins/BuiltinExecutables.h:
+        * create_hash_table:
+
+            Update the generated builtin macro names.
+
+        * generate-js-builtins: Removed.
+
</ins><span class="cx"> 2015-10-21  Benjamin Poulain  &lt;bpoulain@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [JSC] Remove FTL Native Inlining, it is dead code
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreDerivedSourcesmake"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/DerivedSources.make (191432 => 191433)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/DerivedSources.make        2015-10-22 03:17:06 UTC (rev 191432)
+++ trunk/Source/JavaScriptCore/DerivedSources.make        2015-10-22 04:39:01 UTC (rev 191433)
</span><span class="lines">@@ -71,10 +71,9 @@
</span><span class="cx">     udis86_itab.h \
</span><span class="cx">     Bytecodes.h \
</span><span class="cx">     InitBytecodes.asm \
</span><del>-    JSCBuiltins \
</del><ins>+    JSCBuiltins.h \
</ins><span class="cx"> #
</span><span class="cx"> 
</span><del>-# builtin functions
</del><span class="cx"> PYTHON = python
</span><span class="cx"> PERL = perl
</span><span class="cx"> 
</span><span class="lines">@@ -87,15 +86,24 @@
</span><span class="cx"> endif
</span><span class="cx"> # --------
</span><span class="cx"> 
</span><del>-.PHONY: JSCBuiltins
-JSCBuiltins: $(JavaScriptCore_SCRIPTS_DIR)/generate-js-builtins JSCBuiltins.h JSCBuiltins.cpp
-JSCBuiltins.h: $(JavaScriptCore_SCRIPTS_DIR)/generate-js-builtins $(JavaScriptCore)/builtins JSCBuiltinsSources
-        $(PYTHON) $(JavaScriptCore_SCRIPTS_DIR)/generate-js-builtins --input-directory $(JavaScriptCore)/builtins --output $@
</del><ins>+# JavaScript builtins.
</ins><span class="cx"> 
</span><del>-JSCBuiltins.cpp: JSCBuiltins.h
</del><ins>+BUILTINS_GENERATOR_SCRIPTS = \
+    $(JavaScriptCore_SCRIPTS_DIR)/builtins/__init__.py \
+    $(JavaScriptCore_SCRIPTS_DIR)/builtins/builtins.py \
+    $(JavaScriptCore_SCRIPTS_DIR)/builtins/builtins_generator.py \
+    $(JavaScriptCore_SCRIPTS_DIR)/builtins/builtins_model.py \
+    $(JavaScriptCore_SCRIPTS_DIR)/builtins/builtins_templates.py \
+    $(JavaScriptCore_SCRIPTS_DIR)/builtins/builtins_generate_combined_header.py \
+    $(JavaScriptCore_SCRIPTS_DIR)/builtins/builtins_generate_combined_implementation.py \
+    $(JavaScriptCore_SCRIPTS_DIR)/builtins/builtins_generate_separate_header.py \
+    $(JavaScriptCore_SCRIPTS_DIR)/builtins/builtins_generate_separate_implementation.py \
+    $(JavaScriptCore_SCRIPTS_DIR)/builtins/builtins_generate_separate_wrapper.py \
+    $(JavaScriptCore_SCRIPTS_DIR)/generate-js-builtins.py \
+    $(JavaScriptCore_SCRIPTS_DIR)/lazywriter.py \
+#
</ins><span class="cx"> 
</span><del>-.PHONY: JSCBuiltinsSources
-JSCBuiltinsSources: \
</del><ins>+JavaScriptCore_BUILTINS_SOURCES = \
</ins><span class="cx">     $(JavaScriptCore)/builtins/ArrayConstructor.js \
</span><span class="cx">     $(JavaScriptCore)/builtins/ArrayIterator.prototype.js \
</span><span class="cx">     $(JavaScriptCore)/builtins/Array.prototype.js \
</span><span class="lines">@@ -112,8 +120,20 @@
</span><span class="cx">     $(JavaScriptCore)/builtins/ReflectObject.js \
</span><span class="cx">     $(JavaScriptCore)/builtins/StringConstructor.js \
</span><span class="cx">     $(JavaScriptCore)/builtins/StringIterator.prototype.js \
</span><ins>+    $(JavaScriptCore)/builtins/TypedArrayConstructor.js \
+    $(JavaScriptCore)/builtins/TypedArray.prototype.js \
</ins><span class="cx"> #
</span><span class="cx"> 
</span><ins>+# The combined output file depends on the contents of builtins and generator scripts, so
+# adding, modifying, or removing builtins or scripts will trigger regeneration of files.
+
+.PHONY: force
+JavaScriptCore_BUILTINS_DEPENDENCIES_LIST : $(JavaScriptCore_SCRIPTS_DIR)/UpdateContents.py force
+        $(PYTHON) $(JavaScriptCore_SCRIPTS_DIR)/UpdateContents.py '$(JavaScriptCore_BUILTINS_SOURCES) $(BUILTINS_GENERATOR_SCRIPTS)' $@
+
+JSCBuiltins.h: $(BUILTINS_GENERATOR_SCRIPTS) $(JavaScriptCore_BUILTINS_SOURCES) JavaScriptCore_BUILTINS_DEPENDENCIES_LIST
+        $(PYTHON) $(JavaScriptCore_SCRIPTS_DIR)/generate-js-builtins.py --combined --output-directory . --framework JavaScriptCore $(JavaScriptCore_BUILTINS_SOURCES)
+
</ins><span class="cx"> # lookup tables for classes
</span><span class="cx"> 
</span><span class="cx"> %.lut.h: create_hash_table %.cpp
</span><span class="lines">@@ -201,8 +221,8 @@
</span><span class="cx"> # adding, modifying, or removing domains will trigger regeneration of inspector files.
</span><span class="cx"> 
</span><span class="cx"> .PHONY: force
</span><del>-EnabledInspectorDomains : $(JavaScriptCore)/UpdateContents.py force
-        $(PYTHON) $(JavaScriptCore)/UpdateContents.py '$(INSPECTOR_DOMAINS)' $@
</del><ins>+EnabledInspectorDomains : $(JavaScriptCore_SCRIPTS_DIR)/UpdateContents.py force
+        $(PYTHON) $(JavaScriptCore_SCRIPTS_DIR)/UpdateContents.py '$(INSPECTOR_DOMAINS)' $@
</ins><span class="cx"> 
</span><span class="cx"> CombinedDomains.json : $(JavaScriptCore_SCRIPTS_DIR)/generate-combined-inspector-json.py $(INSPECTOR_DOMAINS) EnabledInspectorDomains
</span><span class="cx">         $(PYTHON) $(JavaScriptCore_SCRIPTS_DIR)/generate-combined-inspector-json.py $(INSPECTOR_DOMAINS) &gt; ./CombinedDomains.json
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreJavaScriptCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj (191432 => 191433)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj        2015-10-22 03:17:06 UTC (rev 191432)
+++ trunk/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj        2015-10-22 04:39:01 UTC (rev 191433)
</span><span class="lines">@@ -1213,7 +1213,6 @@
</span><span class="cx">                 9928FF3B18AC4AEC00B8CF12 /* JSReplayInputs.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9928FF3918AC4AEC00B8CF12 /* JSReplayInputs.cpp */; };
</span><span class="cx">                 9928FF3C18AC4AEC00B8CF12 /* JSReplayInputs.h in Headers */ = {isa = PBXBuildFile; fileRef = 9928FF3A18AC4AEC00B8CF12 /* JSReplayInputs.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 9959E92B1BD17FA4001AA413 /* cssmin.py in Headers */ = {isa = PBXBuildFile; fileRef = 9959E9271BD17FA0001AA413 /* cssmin.py */; settings = {ATTRIBUTES = (Private, ); }; };
</span><del>-                9959E92C1BD17FA4001AA413 /* generate-js-builtins in Headers */ = {isa = PBXBuildFile; fileRef = 9959E9281BD17FA0001AA413 /* generate-js-builtins */; settings = {ATTRIBUTES = (Private, ); }; };
</del><span class="cx">                 9959E92D1BD17FA4001AA413 /* jsmin.py in Headers */ = {isa = PBXBuildFile; fileRef = 9959E9291BD17FA0001AA413 /* jsmin.py */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 9959E92E1BD17FA4001AA413 /* xxd.pl in Headers */ = {isa = PBXBuildFile; fileRef = 9959E92A1BD17FA0001AA413 /* xxd.pl */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 9959E9311BD18272001AA413 /* generate-combined-inspector-json.py in Headers */ = {isa = PBXBuildFile; fileRef = 9959E92F1BD181F6001AA413 /* generate-combined-inspector-json.py */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="lines">@@ -1221,6 +1220,18 @@
</span><span class="cx">                 996231E918D1804200C03FDA /* InspectorBackendCommands.js in Headers */ = {isa = PBXBuildFile; fileRef = A53243961856A475002ED692 /* InspectorBackendCommands.js */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 99CC0B6218BE9946006CEBCC /* CodeGeneratorReplayInputsTemplates.py in Headers */ = {isa = PBXBuildFile; fileRef = 99E45A1E18A1B1E70026D88F /* CodeGeneratorReplayInputsTemplates.py */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 99CC0B6318BE9950006CEBCC /* CodeGeneratorReplayInputs.py in Headers */ = {isa = PBXBuildFile; fileRef = 99E45A1D18A1B1E70026D88F /* CodeGeneratorReplayInputs.py */; settings = {ATTRIBUTES = (Private, ); }; };
</span><ins>+                99DA00A31BD5993100F4575C /* builtins_generator.py in Headers */ = {isa = PBXBuildFile; fileRef = 99DA009A1BD5992700F4575C /* builtins_generator.py */; settings = {ATTRIBUTES = (Private, ); }; };
+                99DA00A41BD5993100F4575C /* builtins_model.py in Headers */ = {isa = PBXBuildFile; fileRef = 99DA009B1BD5992700F4575C /* builtins_model.py */; settings = {ATTRIBUTES = (Private, ); }; };
+                99DA00A51BD5993100F4575C /* builtins_templates.py in Headers */ = {isa = PBXBuildFile; fileRef = 99DA009C1BD5992700F4575C /* builtins_templates.py */; settings = {ATTRIBUTES = (Private, ); }; };
+                99DA00A61BD5993100F4575C /* builtins.py in Headers */ = {isa = PBXBuildFile; fileRef = 99DA009D1BD5992700F4575C /* builtins.py */; settings = {ATTRIBUTES = (Private, ); }; };
+                99DA00A71BD5993100F4575C /* builtins_generate_combined_header.py in Headers */ = {isa = PBXBuildFile; fileRef = 99DA009E1BD5992700F4575C /* builtins_generate_combined_header.py */; settings = {ATTRIBUTES = (Private, ); }; };
+                99DA00A81BD5993100F4575C /* builtins_generate_combined_implementation.py in Headers */ = {isa = PBXBuildFile; fileRef = 99DA009F1BD5992700F4575C /* builtins_generate_combined_implementation.py */; settings = {ATTRIBUTES = (Private, ); }; };
+                99DA00A91BD5993100F4575C /* builtins_generate_separate_header.py in Headers */ = {isa = PBXBuildFile; fileRef = 99DA00A01BD5992700F4575C /* builtins_generate_separate_header.py */; settings = {ATTRIBUTES = (Private, ); }; };
+                99DA00AA1BD5993100F4575C /* builtins_generate_separate_implementation.py in Headers */ = {isa = PBXBuildFile; fileRef = 99DA00A11BD5992700F4575C /* builtins_generate_separate_implementation.py */; settings = {ATTRIBUTES = (Private, ); }; };
+                99DA00AB1BD5993100F4575C /* builtins_generate_separate_wrapper.py in Headers */ = {isa = PBXBuildFile; fileRef = 99DA00A21BD5992700F4575C /* builtins_generate_separate_wrapper.py */; settings = {ATTRIBUTES = (Private, ); }; };
+                99DA00AF1BD5994E00F4575C /* generate-js-builtins.py in Headers */ = {isa = PBXBuildFile; fileRef = 99DA00AC1BD5993E00F4575C /* generate-js-builtins.py */; settings = {ATTRIBUTES = (Private, ); }; };
+                99DA00B01BD5994E00F4575C /* lazywriter.py in Headers */ = {isa = PBXBuildFile; fileRef = 99DA00AD1BD5993E00F4575C /* lazywriter.py */; settings = {ATTRIBUTES = (Private, ); }; };
+                99DA00B11BD5994E00F4575C /* UpdateContents.py in Headers */ = {isa = PBXBuildFile; fileRef = 99DA00AE1BD5993E00F4575C /* UpdateContents.py */; settings = {ATTRIBUTES = (Private, ); }; };
</ins><span class="cx">                 99E45A2418A1B2590026D88F /* EmptyInputCursor.h in Headers */ = {isa = PBXBuildFile; fileRef = 99E45A1F18A1B2590026D88F /* EmptyInputCursor.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 99E45A2518A1B2590026D88F /* EncodedValue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 99E45A2018A1B2590026D88F /* EncodedValue.cpp */; };
</span><span class="cx">                 99E45A2618A1B2590026D88F /* EncodedValue.h in Headers */ = {isa = PBXBuildFile; fileRef = 99E45A2118A1B2590026D88F /* EncodedValue.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="lines">@@ -1793,7 +1804,7 @@
</span><span class="cx">                 FE7C41961B97FC4B00F4D598 /* PingPongStackOverflowTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FEDA50D41B97F442009A3B4F /* PingPongStackOverflowTest.cpp */; };
</span><span class="cx">                 FEA08620182B7A0400F6D851 /* Breakpoint.h in Headers */ = {isa = PBXBuildFile; fileRef = FEA0861E182B7A0400F6D851 /* Breakpoint.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 FEA08621182B7A0400F6D851 /* DebuggerPrimitives.h in Headers */ = {isa = PBXBuildFile; fileRef = FEA0861F182B7A0400F6D851 /* DebuggerPrimitives.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><del>-                FEB137571BB11EF900CD5100 /* MacroAssemblerARM64.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FEB137561BB11EEE00CD5100 /* MacroAssemblerARM64.cpp */; settings = {ASSET_TAGS = (); }; };
</del><ins>+                FEB137571BB11EF900CD5100 /* MacroAssemblerARM64.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FEB137561BB11EEE00CD5100 /* MacroAssemblerARM64.cpp */; };
</ins><span class="cx">                 FEB51F6C1A97B688001F921C /* Regress141809.mm in Sources */ = {isa = PBXBuildFile; fileRef = FEB51F6B1A97B688001F921C /* Regress141809.mm */; };
</span><span class="cx">                 FEB58C14187B8B160098EF0B /* ErrorHandlingScope.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FEB58C12187B8B160098EF0B /* ErrorHandlingScope.cpp */; };
</span><span class="cx">                 FEB58C15187B8B160098EF0B /* ErrorHandlingScope.h in Headers */ = {isa = PBXBuildFile; fileRef = FEB58C13187B8B160098EF0B /* ErrorHandlingScope.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="lines">@@ -3116,11 +3127,23 @@
</span><span class="cx">                 9928FF3A18AC4AEC00B8CF12 /* JSReplayInputs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSReplayInputs.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 9928FF3D18AC4B1C00B8CF12 /* JSInputs.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = JSInputs.json; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 9959E9271BD17FA0001AA413 /* cssmin.py */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.python; path = cssmin.py; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><del>-                9959E9281BD17FA0001AA413 /* generate-js-builtins */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.python; path = &quot;generate-js-builtins&quot;; sourceTree = &quot;&lt;group&gt;&quot;; };
</del><span class="cx">                 9959E9291BD17FA0001AA413 /* jsmin.py */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.python; path = jsmin.py; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 9959E92A1BD17FA0001AA413 /* xxd.pl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.perl; path = xxd.pl; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 9959E92F1BD181F6001AA413 /* generate-combined-inspector-json.py */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.python; path = &quot;generate-combined-inspector-json.py&quot;; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 9959E9301BD181F6001AA413 /* inline-and-minify-stylesheets-and-scripts.py */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.python; path = &quot;inline-and-minify-stylesheets-and-scripts.py&quot;; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><ins>+                99DA00991BD5992700F4575C /* __init__.py */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.python; path = __init__.py; sourceTree = &quot;&lt;group&gt;&quot;; };
+                99DA009A1BD5992700F4575C /* builtins_generator.py */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.python; path = builtins_generator.py; sourceTree = &quot;&lt;group&gt;&quot;; };
+                99DA009B1BD5992700F4575C /* builtins_model.py */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.python; path = builtins_model.py; sourceTree = &quot;&lt;group&gt;&quot;; };
+                99DA009C1BD5992700F4575C /* builtins_templates.py */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.python; path = builtins_templates.py; sourceTree = &quot;&lt;group&gt;&quot;; };
+                99DA009D1BD5992700F4575C /* builtins.py */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.python; path = builtins.py; sourceTree = &quot;&lt;group&gt;&quot;; };
+                99DA009E1BD5992700F4575C /* builtins_generate_combined_header.py */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.python; path = builtins_generate_combined_header.py; sourceTree = &quot;&lt;group&gt;&quot;; };
+                99DA009F1BD5992700F4575C /* builtins_generate_combined_implementation.py */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.python; path = builtins_generate_combined_implementation.py; sourceTree = &quot;&lt;group&gt;&quot;; };
+                99DA00A01BD5992700F4575C /* builtins_generate_separate_header.py */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.python; path = builtins_generate_separate_header.py; sourceTree = &quot;&lt;group&gt;&quot;; };
+                99DA00A11BD5992700F4575C /* builtins_generate_separate_implementation.py */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.python; path = builtins_generate_separate_implementation.py; sourceTree = &quot;&lt;group&gt;&quot;; };
+                99DA00A21BD5992700F4575C /* builtins_generate_separate_wrapper.py */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.python; path = builtins_generate_separate_wrapper.py; sourceTree = &quot;&lt;group&gt;&quot;; };
+                99DA00AC1BD5993E00F4575C /* generate-js-builtins.py */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.python; path = &quot;generate-js-builtins.py&quot;; sourceTree = &quot;&lt;group&gt;&quot;; };
+                99DA00AD1BD5993E00F4575C /* lazywriter.py */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.python; path = lazywriter.py; sourceTree = &quot;&lt;group&gt;&quot;; };
+                99DA00AE1BD5993E00F4575C /* UpdateContents.py */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.python; path = UpdateContents.py; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx">                 99E45A1D18A1B1E70026D88F /* CodeGeneratorReplayInputs.py */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.python; path = CodeGeneratorReplayInputs.py; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 99E45A1E18A1B1E70026D88F /* CodeGeneratorReplayInputsTemplates.py */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.python; path = CodeGeneratorReplayInputsTemplates.py; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 99E45A1F18A1B2590026D88F /* EmptyInputCursor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EmptyInputCursor.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -3808,9 +3831,9 @@
</span><span class="cx">                 034768DFFF38A50411DB9C8B /* Products */ = {
</span><span class="cx">                         isa = PBXGroup;
</span><span class="cx">                         children = (
</span><ins>+                                0FF922CF14F46B130041A24E /* JSCLLIntOffsetsExtractor */,
</ins><span class="cx">                                 932F5BD90822A1C700736975 /* JavaScriptCore.framework */,
</span><span class="cx">                                 932F5BE10822A1C700736975 /* jsc */,
</span><del>-                                0FF922CF14F46B130041A24E /* JSCLLIntOffsetsExtractor */,
</del><span class="cx">                                 0FCEFAB61805D61600472CE4 /* libllvmForJSC.dylib */,
</span><span class="cx">                                 141211200A48793C00480255 /* minidom */,
</span><span class="cx">                                 14BD59BF0A3E8F9000BAF59C /* testapi */,
</span><span class="lines">@@ -5729,16 +5752,36 @@
</span><span class="cx">                 9959E9251BD17F1E001AA413 /* Scripts */ = {
</span><span class="cx">                         isa = PBXGroup;
</span><span class="cx">                         children = (
</span><del>-                                9959E9281BD17FA0001AA413 /* generate-js-builtins */,
</del><ins>+                                99DA00971BD598E000F4575C /* builtins */,
</ins><span class="cx">                                 9959E9271BD17FA0001AA413 /* cssmin.py */,
</span><span class="cx">                                 9959E92F1BD181F6001AA413 /* generate-combined-inspector-json.py */,
</span><ins>+                                99DA00AC1BD5993E00F4575C /* generate-js-builtins.py */,
</ins><span class="cx">                                 9959E9301BD181F6001AA413 /* inline-and-minify-stylesheets-and-scripts.py */,
</span><span class="cx">                                 9959E9291BD17FA0001AA413 /* jsmin.py */,
</span><ins>+                                99DA00AD1BD5993E00F4575C /* lazywriter.py */,
+                                99DA00AE1BD5993E00F4575C /* UpdateContents.py */,
</ins><span class="cx">                                 9959E92A1BD17FA0001AA413 /* xxd.pl */,
</span><span class="cx">                         );
</span><span class="cx">                         path = Scripts;
</span><span class="cx">                         sourceTree = &quot;&lt;group&gt;&quot;;
</span><span class="cx">                 };
</span><ins>+                99DA00971BD598E000F4575C /* builtins */ = {
+                        isa = PBXGroup;
+                        children = (
+                                99DA00991BD5992700F4575C /* __init__.py */,
+                                99DA009D1BD5992700F4575C /* builtins.py */,
+                                99DA009E1BD5992700F4575C /* builtins_generate_combined_header.py */,
+                                99DA009F1BD5992700F4575C /* builtins_generate_combined_implementation.py */,
+                                99DA00A01BD5992700F4575C /* builtins_generate_separate_header.py */,
+                                99DA00A11BD5992700F4575C /* builtins_generate_separate_implementation.py */,
+                                99DA00A21BD5992700F4575C /* builtins_generate_separate_wrapper.py */,
+                                99DA009A1BD5992700F4575C /* builtins_generator.py */,
+                                99DA009B1BD5992700F4575C /* builtins_model.py */,
+                                99DA009C1BD5992700F4575C /* builtins_templates.py */,
+                        );
+                        path = builtins;
+                        sourceTree = &quot;&lt;group&gt;&quot;;
+                };
</ins><span class="cx">                 99E45A0C18A01E930026D88F /* replay */ = {
</span><span class="cx">                         isa = PBXGroup;
</span><span class="cx">                         children = (
</span><span class="lines">@@ -6034,6 +6077,15 @@
</span><span class="cx">                                 FEA08620182B7A0400F6D851 /* Breakpoint.h in Headers */,
</span><span class="cx">                                 A7D801A51880D66E0026C39B /* BuiltinExecutables.h in Headers */,
</span><span class="cx">                                 A75EE9B218AAB7E200AAD043 /* BuiltinNames.h in Headers */,
</span><ins>+                                99DA00A61BD5993100F4575C /* builtins.py in Headers */,
+                                99DA00A71BD5993100F4575C /* builtins_generate_combined_header.py in Headers */,
+                                99DA00A81BD5993100F4575C /* builtins_generate_combined_implementation.py in Headers */,
+                                99DA00A91BD5993100F4575C /* builtins_generate_separate_header.py in Headers */,
+                                99DA00AA1BD5993100F4575C /* builtins_generate_separate_implementation.py in Headers */,
+                                99DA00AB1BD5993100F4575C /* builtins_generate_separate_wrapper.py in Headers */,
+                                99DA00A31BD5993100F4575C /* builtins_generator.py in Headers */,
+                                99DA00A41BD5993100F4575C /* builtins_model.py in Headers */,
+                                99DA00A51BD5993100F4575C /* builtins_templates.py in Headers */,
</ins><span class="cx">                                 41DEA1321B9F3163006D65DD /* BuiltinUtils.h in Headers */,
</span><span class="cx">                                 9E72940B190F0514001A91B5 /* BundlePath.h in Headers */,
</span><span class="cx">                                 0FB7F39715ED8E4600F167B2 /* Butterfly.h in Headers */,
</span><span class="lines">@@ -6101,6 +6153,7 @@
</span><span class="cx">                                 C2FC9BD316644DFB00810D33 /* CopiedBlockInlines.h in Headers */,
</span><span class="cx">                                 C2EAA3FA149A835E00FCE112 /* CopiedSpace.h in Headers */,
</span><span class="cx">                                 C2C8D02D14A3C6E000578E65 /* CopiedSpaceInlines.h in Headers */,
</span><ins>+                                0F7C11AD1BC3862C00C74CDB /* CopyBarrier.h in Headers */,
</ins><span class="cx">                                 0F5A52D017ADD717008ECB2D /* CopyToken.h in Headers */,
</span><span class="cx">                                 C2239D1816262BDD005AC5FD /* CopyVisitor.h in Headers */,
</span><span class="cx">                                 C2239D1916262BDD005AC5FD /* CopyVisitorInlines.h in Headers */,
</span><span class="lines">@@ -6171,6 +6224,7 @@
</span><span class="cx">                                 0F38B01A17CFE75500B144D3 /* DFGCompilationMode.h in Headers */,
</span><span class="cx">                                 0F3B3A1B153E68F4003ED0FF /* DFGConstantFoldingPhase.h in Headers */,
</span><span class="cx">                                 0FED67BA1B26256D0066CE15 /* DFGConstantHoistingPhase.h in Headers */,
</span><ins>+                                0F0981F81BC5E565004814F8 /* DFGCopyBarrierOptimizationPhase.h in Headers */,
</ins><span class="cx">                                 0FBE0F7316C1DB050082C5E8 /* DFGCPSRethreadingPhase.h in Headers */,
</span><span class="cx">                                 A7D89CF617A0B8CC00773AD8 /* DFGCriticalEdgeBreakingPhase.h in Headers */,
</span><span class="cx">                                 0FFFC95A14EF90A900C72532 /* DFGCSEPhase.h in Headers */,
</span><span class="lines">@@ -6407,7 +6461,7 @@
</span><span class="cx">                                 A54E8EB118BFFBBE00556D28 /* GCSegmentedArrayInlines.h in Headers */,
</span><span class="cx">                                 9959E9311BD18272001AA413 /* generate-combined-inspector-json.py in Headers */,
</span><span class="cx">                                 C4703CC0192844960013FBEA /* generate-inspector-protocol-bindings.py in Headers */,
</span><del>-                                9959E92C1BD17FA4001AA413 /* generate-js-builtins in Headers */,
</del><ins>+                                99DA00AF1BD5994E00F4575C /* generate-js-builtins.py in Headers */,
</ins><span class="cx">                                 A5EA70EC19F5B3EA0098F5EC /* generate_cpp_alternate_backend_dispatcher_header.py in Headers */,
</span><span class="cx">                                 A5EF9B141A1D43F600702E90 /* generate_cpp_backend_dispatcher_header.py in Headers */,
</span><span class="cx">                                 A5EF9B151A1D43FA00702E90 /* generate_cpp_backend_dispatcher_implementation.py in Headers */,
</span><span class="lines">@@ -6539,7 +6593,6 @@
</span><span class="cx">                                 0F766D2C15A8CC3A008F363E /* JITStubRoutineSet.h in Headers */,
</span><span class="cx">                                 0F5EF91F16878F7D003E5C25 /* JITThunks.h in Headers */,
</span><span class="cx">                                 0FC712E317CD8793008CC93C /* JITToDFGDeferredCompilationCallback.h in Headers */,
</span><del>-                                0F0981F81BC5E565004814F8 /* DFGCopyBarrierOptimizationPhase.h in Headers */,
</del><span class="cx">                                 A76F54A313B28AAB00EF2BCE /* JITWriteBarrier.h in Headers */,
</span><span class="cx">                                 840480131021A1D9008E7F01 /* JSAPIValueWrapper.h in Headers */,
</span><span class="cx">                                 C2CF39C216E15A8100DD69BE /* JSAPIWrapperObject.h in Headers */,
</span><span class="lines">@@ -6598,7 +6651,6 @@
</span><span class="cx">                                 797E07AA1B8FCFB9008400BA /* JSGlobalLexicalEnvironment.h in Headers */,
</span><span class="cx">                                 BC18C4210E16F5CD00B34460 /* JSGlobalObject.h in Headers */,
</span><span class="cx">                                 A5FD0086189B1B7E00633231 /* JSGlobalObjectConsoleAgent.h in Headers */,
</span><del>-                                534C457C1BC72411007476A7 /* JSTypedArrayViewConstructor.h in Headers */,
</del><span class="cx">                                 A5C3A1A618C0490200C9593A /* JSGlobalObjectConsoleClient.h in Headers */,
</span><span class="cx">                                 A59455931824744700CC3843 /* JSGlobalObjectDebuggable.h in Headers */,
</span><span class="cx">                                 A57D23EA1891B0770031C7FA /* JSGlobalObjectDebuggerAgent.h in Headers */,
</span><span class="lines">@@ -6667,6 +6719,7 @@
</span><span class="cx">                                 0F2B66FB17B6B5AB00A7AE3F /* JSTypedArrayConstructors.h in Headers */,
</span><span class="cx">                                 0F2B66FD17B6B5AB00A7AE3F /* JSTypedArrayPrototypes.h in Headers */,
</span><span class="cx">                                 0F2B66FF17B6B5AB00A7AE3F /* JSTypedArrays.h in Headers */,
</span><ins>+                                534C457C1BC72411007476A7 /* JSTypedArrayViewConstructor.h in Headers */,
</ins><span class="cx">                                 DEA7E2451BBC677F00D78440 /* JSTypedArrayViewPrototype.h in Headers */,
</span><span class="cx">                                 6507D29E0E871E5E00D7D896 /* JSTypeInfo.h in Headers */,
</span><span class="cx">                                 0F2B670217B6B5AB00A7AE3F /* JSUint16Array.h in Headers */,
</span><span class="lines">@@ -6691,6 +6744,7 @@
</span><span class="cx">                                 969A072A0ED1CE6900F1F681 /* Label.h in Headers */,
</span><span class="cx">                                 960097A60EBABB58007A7297 /* LabelScope.h in Headers */,
</span><span class="cx">                                 0FB5467714F59B5C002C2989 /* LazyOperandValueProfile.h in Headers */,
</span><ins>+                                99DA00B01BD5994E00F4575C /* lazywriter.py in Headers */,
</ins><span class="cx">                                 BC18C4520E16F5CD00B34460 /* LegacyProfiler.h in Headers */,
</span><span class="cx">                                 BC18C4310E16F5CD00B34460 /* Lexer.h in Headers */,
</span><span class="cx">                                 BC18C52E0E16FCE100B34460 /* Lexer.lut.h in Headers */,
</span><span class="lines">@@ -6787,7 +6841,6 @@
</span><span class="cx">                                 868916B0155F286300CB2B9A /* PrivateName.h in Headers */,
</span><span class="cx">                                 BC18C4500E16F5CD00B34460 /* Profile.h in Headers */,
</span><span class="cx">                                 95CD45770E1C4FDD0085358E /* ProfileGenerator.h in Headers */,
</span><del>-                                0F7C11AD1BC3862C00C74CDB /* CopyBarrier.h in Headers */,
</del><span class="cx">                                 BC18C4510E16F5CD00B34460 /* ProfileNode.h in Headers */,
</span><span class="cx">                                 0FF729A5166AD351000F5BA3 /* ProfilerBytecode.h in Headers */,
</span><span class="cx">                                 0FF729B9166AD360000F5BA3 /* ProfilerBytecodes.h in Headers */,
</span><span class="lines">@@ -6946,6 +6999,7 @@
</span><span class="cx">                                 A7B601821639FD2A00372BA3 /* UnlinkedCodeBlock.h in Headers */,
</span><span class="cx">                                 14142E511B796ECE00F4BF4B /* UnlinkedFunctionExecutable.h in Headers */,
</span><span class="cx">                                 0F2E892C16D028AD009E4FD2 /* UnusedPointer.h in Headers */,
</span><ins>+                                99DA00B11BD5994E00F4575C /* UpdateContents.py in Headers */,
</ins><span class="cx">                                 0F963B3813FC6FE90002D9B2 /* ValueProfile.h in Headers */,
</span><span class="cx">                                 0F426A481460CBB300131F8F /* ValueRecovery.h in Headers */,
</span><span class="cx">                                 79EE0C001B4AFB85000385C9 /* VariableEnvironment.h in Headers */,
</span><span class="lines">@@ -7485,7 +7539,6 @@
</span><span class="cx">                                 0F63945415D07055006A597C /* ArrayProfile.cpp in Sources */,
</span><span class="cx">                                 147F39C0107EC37600427A48 /* ArrayPrototype.cpp in Sources */,
</span><span class="cx">                                 0F24E54017EA9F5900ABB217 /* AssemblyHelpers.cpp in Sources */,
</span><del>-                                FEB137571BB11EF900CD5100 /* MacroAssemblerARM64.cpp in Sources */,
</del><span class="cx">                                 52678F8E1A031009006A306D /* BasicBlockLocation.cpp in Sources */,
</span><span class="cx">                                 0F64B2711A784BAF006E4E66 /* BinarySwitch.cpp in Sources */,
</span><span class="cx">                                 14280863107EC11A0013E7B2 /* BooleanConstructor.cpp in Sources */,
</span><span class="lines">@@ -7517,7 +7570,6 @@
</span><span class="cx">                                 A77F1821164088B200640A47 /* CodeCache.cpp in Sources */,
</span><span class="cx">                                 0F8F9446166764F100D61971 /* CodeOrigin.cpp in Sources */,
</span><span class="cx">                                 86B5826714D2796C00A9C306 /* CodeProfile.cpp in Sources */,
</span><del>-                                DE5A0A001BA3AC3E003D4424 /* IntrinsicEmitter.cpp in Sources */,
</del><span class="cx">                                 86B5826914D2797000A9C306 /* CodeProfiling.cpp in Sources */,
</span><span class="cx">                                 0F8F943C1667631300D61971 /* CodeSpecializationKind.cpp in Sources */,
</span><span class="cx">                                 0F8F94421667633500D61971 /* CodeType.cpp in Sources */,
</span><span class="lines">@@ -7535,6 +7587,7 @@
</span><span class="cx">                                 1428082E107EC0570013E7B2 /* ConstructData.cpp in Sources */,
</span><span class="cx">                                 A57D23F11891B5B40031C7FA /* ContentSearchUtilities.cpp in Sources */,
</span><span class="cx">                                 52B717B51A0597E1007AF4F3 /* ControlFlowProfiler.cpp in Sources */,
</span><ins>+                                0FBADF541BD1F4B800E073C1 /* CopiedBlock.cpp in Sources */,
</ins><span class="cx">                                 C240305514B404E60079EB64 /* CopiedSpace.cpp in Sources */,
</span><span class="cx">                                 C2239D1716262BDD005AC5FD /* CopyVisitor.cpp in Sources */,
</span><span class="cx">                                 2A111245192FCE79005EE18D /* CustomGetterSetter.cpp in Sources */,
</span><span class="lines">@@ -7580,6 +7633,7 @@
</span><span class="cx">                                 0F38B01917CFE75500B144D3 /* DFGCompilationMode.cpp in Sources */,
</span><span class="cx">                                 0F3B3A1A153E68F2003ED0FF /* DFGConstantFoldingPhase.cpp in Sources */,
</span><span class="cx">                                 0FED67B91B26256D0066CE15 /* DFGConstantHoistingPhase.cpp in Sources */,
</span><ins>+                                0F0981F71BC5E565004814F8 /* DFGCopyBarrierOptimizationPhase.cpp in Sources */,
</ins><span class="cx">                                 0FBE0F7216C1DB030082C5E8 /* DFGCPSRethreadingPhase.cpp in Sources */,
</span><span class="cx">                                 A7D89CF517A0B8CC00773AD8 /* DFGCriticalEdgeBreakingPhase.cpp in Sources */,
</span><span class="cx">                                 0FFFC95914EF90A600C72532 /* DFGCSEPhase.cpp in Sources */,
</span><span class="lines">@@ -7820,6 +7874,7 @@
</span><span class="cx">                                 A1D792FE1B43864B004516F5 /* IntlNumberFormatConstructor.cpp in Sources */,
</span><span class="cx">                                 A1D793001B43864B004516F5 /* IntlNumberFormatPrototype.cpp in Sources */,
</span><span class="cx">                                 A12BBFF41B044A9800664B69 /* IntlObject.cpp in Sources */,
</span><ins>+                                DE5A0A001BA3AC3E003D4424 /* IntrinsicEmitter.cpp in Sources */,
</ins><span class="cx">                                 70113D4B1A8DB093003848C4 /* IteratorOperations.cpp in Sources */,
</span><span class="cx">                                 70DC3E091B2DF2C700054299 /* IteratorPrototype.cpp in Sources */,
</span><span class="cx">                                 A503FA19188E0FB000110F14 /* JavaScriptCallFrame.cpp in Sources */,
</span><span class="lines">@@ -7837,7 +7892,6 @@
</span><span class="cx">                                 0F24E54C17EE274900ABB217 /* JITOperations.cpp in Sources */,
</span><span class="cx">                                 86CC85C40EE7A89400288682 /* JITPropertyAccess.cpp in Sources */,
</span><span class="cx">                                 A7C1E8E4112E72EF00A37F98 /* JITPropertyAccess32_64.cpp in Sources */,
</span><del>-                                0FBADF541BD1F4B800E073C1 /* CopiedBlock.cpp in Sources */,
</del><span class="cx">                                 0F766D2815A8CC1E008F363E /* JITStubRoutine.cpp in Sources */,
</span><span class="cx">                                 0F766D2B15A8CC38008F363E /* JITStubRoutineSet.cpp in Sources */,
</span><span class="cx">                                 0F5EF91E16878F7A003E5C25 /* JITThunks.cpp in Sources */,
</span><span class="lines">@@ -7930,6 +7984,7 @@
</span><span class="cx">                                 0F2B66FA17B6B5AB00A7AE3F /* JSTypedArrayConstructors.cpp in Sources */,
</span><span class="cx">                                 0F2B66FC17B6B5AB00A7AE3F /* JSTypedArrayPrototypes.cpp in Sources */,
</span><span class="cx">                                 0F2B66FE17B6B5AB00A7AE3F /* JSTypedArrays.cpp in Sources */,
</span><ins>+                                534C457E1BC72549007476A7 /* JSTypedArrayViewConstructor.cpp in Sources */,
</ins><span class="cx">                                 DEA7E2441BBC677200D78440 /* JSTypedArrayViewPrototype.cpp in Sources */,
</span><span class="cx">                                 86E3C61A167BABEE006D760A /* JSValue.mm in Sources */,
</span><span class="cx">                                 14BD5A320A3E91F600BAF59C /* JSValueRef.cpp in Sources */,
</span><span class="lines">@@ -7961,6 +8016,7 @@
</span><span class="cx">                                 14B723B212D7DA46003BD5ED /* MachineStackMarker.cpp in Sources */,
</span><span class="cx">                                 0FEB3ECF16237F6C00AB67AD /* MacroAssembler.cpp in Sources */,
</span><span class="cx">                                 86C568E011A213EE0007F7F0 /* MacroAssemblerARM.cpp in Sources */,
</span><ins>+                                FEB137571BB11EF900CD5100 /* MacroAssemblerARM64.cpp in Sources */,
</ins><span class="cx">                                 A729009C17976C6000317298 /* MacroAssemblerARMv7.cpp in Sources */,
</span><span class="cx">                                 FE68C6381B90DE0B0042BCB3 /* MacroAssemblerPrinter.cpp in Sources */,
</span><span class="cx">                                 A7A4AE0817973B26005612B1 /* MacroAssemblerX86Common.cpp in Sources */,
</span><span class="lines">@@ -8040,7 +8096,6 @@
</span><span class="cx">                                 6540C7A01B82E1C3000F6B79 /* RegisterAtOffset.cpp in Sources */,
</span><span class="cx">                                 6540C7A11B82E1C3000F6B79 /* RegisterAtOffsetList.cpp in Sources */,
</span><span class="cx">                                 0FC3141518146D7000033232 /* RegisterSet.cpp in Sources */,
</span><del>-                                534C457E1BC72549007476A7 /* JSTypedArrayViewConstructor.cpp in Sources */,
</del><span class="cx">                                 A57D23ED1891B5540031C7FA /* RegularExpression.cpp in Sources */,
</span><span class="cx">                                 A5BA15E9182340B300A82E69 /* RemoteInspector.mm in Sources */,
</span><span class="cx">                                 A594558F18245EFD00CC3843 /* RemoteInspectorDebuggable.cpp in Sources */,
</span><span class="lines">@@ -8141,7 +8196,6 @@
</span><span class="cx">                                 709FB86B1AE335C60039D069 /* WeakSetPrototype.cpp in Sources */,
</span><span class="cx">                                 2A4EC90B1860D6C20094F782 /* WriteBarrierBuffer.cpp in Sources */,
</span><span class="cx">                                 0FC8150B14043C0E00CFA603 /* WriteBarrierSupport.cpp in Sources */,
</span><del>-                                0F0981F71BC5E565004814F8 /* DFGCopyBarrierOptimizationPhase.cpp in Sources */,
</del><span class="cx">                                 A7E5AB3A1799E4B200D2833D /* X86Disassembler.cpp in Sources */,
</span><span class="cx">                                 863C6D9C1521111A00585E4E /* YarrCanonicalizeUCS2.cpp in Sources */,
</span><span class="cx">                                 86704B8412DBA33700A9FE7B /* YarrInterpreter.cpp in Sources */,
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorePlatformWincmake"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/PlatformWin.cmake (191432 => 191433)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/PlatformWin.cmake        2015-10-22 03:17:06 UTC (rev 191432)
+++ trunk/Source/JavaScriptCore/PlatformWin.cmake        2015-10-22 04:39:01 UTC (rev 191433)
</span><span class="lines">@@ -30,15 +30,10 @@
</span><span class="cx"> 
</span><span class="cx"> file(MAKE_DIRECTORY ${DERIVED_SOURCES_DIR}/ForwardingHeaders/JavaScriptCore)
</span><span class="cx"> 
</span><del>-file(GLOB _JavaScriptCore_Scripts &quot;${JavaScriptCore_SCRIPTS_DIR}/*&quot;)
-foreach (_script ${_JavaScriptCore_Scripts})
-    file(COPY ${_script} DESTINATION ${DERIVED_SOURCES_DIR}/ForwardingHeaders/JavaScriptCore/Scripts)
-endforeach()
-
</del><span class="cx"> set(JavaScriptCore_POST_BUILD_COMMAND &quot;${CMAKE_BINARY_DIR}/DerivedSources/JavaScriptCore/postBuild.cmd&quot;)
</span><span class="cx"> file(WRITE &quot;${JavaScriptCore_POST_BUILD_COMMAND}&quot; &quot;@xcopy /y /d /f \&quot;${DERIVED_SOURCES_DIR}/JavaScriptCore/*.h\&quot; \&quot;${DERIVED_SOURCES_DIR}/ForwardingHeaders/JavaScriptCore\&quot; &gt;nul 2&gt;nul\n&quot;)
</span><span class="cx"> file(APPEND &quot;${JavaScriptCore_POST_BUILD_COMMAND}&quot; &quot;@xcopy /y /d /f \&quot;${DERIVED_SOURCES_DIR}/JavaScriptCore/inspector/*.h\&quot; \&quot;${DERIVED_SOURCES_DIR}/ForwardingHeaders/JavaScriptCore\&quot; &gt;nul 2&gt;nul\n&quot;)
</span><del>-file(APPEND &quot;${JavaScriptCore_POST_BUILD_COMMAND}&quot; &quot;@xcopy /y /d /f \&quot;${JavaScriptCore_SCRIPTS_DIR}/*.*\&quot; \&quot;${DERIVED_SOURCES_DIR}/ForwardingHeaders/JavaScriptCore/Scripts\&quot; &gt;nul 2&gt;nul\n&quot;)
</del><ins>+
</ins><span class="cx"> foreach (_directory ${JavaScriptCore_FORWARDING_HEADERS_DIRECTORIES})
</span><span class="cx">     file(APPEND &quot;${JavaScriptCore_POST_BUILD_COMMAND}&quot; &quot;@xcopy /y /d /f \&quot;${JAVASCRIPTCORE_DIR}/${_directory}/*.h\&quot; \&quot;${DERIVED_SOURCES_DIR}/ForwardingHeaders/JavaScriptCore\&quot; &gt;nul 2&gt;nul\n&quot;)
</span><span class="cx"> endforeach ()
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreScriptsUpdateContentspyfromrev191432trunkSourceJavaScriptCoreUpdateContentspy"></a>
<div class="copfile"><h4>Copied: trunk/Source/JavaScriptCore/Scripts/UpdateContents.py (from rev 191432, trunk/Source/JavaScriptCore/UpdateContents.py) (0 => 191433)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/Scripts/UpdateContents.py                                (rev 0)
+++ trunk/Source/JavaScriptCore/Scripts/UpdateContents.py        2015-10-22 04:39:01 UTC (rev 191433)
</span><span class="lines">@@ -0,0 +1,48 @@
</span><ins>+#!/usr/bin/python
+
+# Copyright (C) 2015 Apple Inc.  All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# 1.  Redistributions of source code must retain the above copyright
+#     notice, this list of conditions and the following disclaimer.
+# 2.  Redistributions in binary form must reproduce the above copyright
+#     notice, this list of conditions and the following disclaimer in the
+#     documentation and/or other materials provided with the distribution.
+# 3.  Neither the name of Apple, Inc. (&quot;Apple&quot;) nor the names of
+#     its contributors may be used to endorse or promote products derived
+#     from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS &quot;AS IS&quot; 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 OR ITS 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 sys
+import os
+
+assert(len(sys.argv) == 3)
+
+comp = sys.argv[1]
+filename = sys.argv[2]
+
+t = False
+
+if os.path.isfile(filename):
+    f = open(filename, 'r')
+    comparator = f.read()
+    f.close()
+    t = True
+
+if (not t or comp != comparator):
+    f = open(filename, 'w')
+    f.write(comp)
+    f.close()
</ins></span></pre></div>
<a id="trunkSourceJavaScriptCoreScriptsbuiltins__init__py"></a>
<div class="addfile"><h4>Added: trunk/Source/JavaScriptCore/Scripts/builtins/__init__.py (0 => 191433)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/Scripts/builtins/__init__.py                                (rev 0)
+++ trunk/Source/JavaScriptCore/Scripts/builtins/__init__.py        2015-10-22 04:39:01 UTC (rev 191433)
</span><span class="lines">@@ -0,0 +1,3 @@
</span><ins>+# Required for Python to search this directory for module files
+
+from builtins import *
</ins></span></pre></div>
<a id="trunkSourceJavaScriptCoreScriptsbuiltinsbuiltinspy"></a>
<div class="addfile"><h4>Added: trunk/Source/JavaScriptCore/Scripts/builtins/builtins.py (0 => 191433)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/Scripts/builtins/builtins.py                                (rev 0)
+++ trunk/Source/JavaScriptCore/Scripts/builtins/builtins.py        2015-10-22 04:39:01 UTC (rev 191433)
</span><span class="lines">@@ -0,0 +1,12 @@
</span><ins>+# This file is used to simulate the builtins/ directory when generate-js-builtins.py
+# is run from JavaScriptCore framework's private headers directory, which is flattened.
+
+from builtins_model import *
+from builtins_templates import *
+
+from builtins_generator import *
+from builtins_generate_combined_header import *
+from builtins_generate_combined_implementation import *
+from builtins_generate_separate_header import *
+from builtins_generate_separate_implementation import *
+from builtins_generate_separate_wrapper import *
</ins></span></pre></div>
<a id="trunkSourceJavaScriptCoreScriptsbuiltinsbuiltins_generate_combined_headerpy"></a>
<div class="addfile"><h4>Added: trunk/Source/JavaScriptCore/Scripts/builtins/builtins_generate_combined_header.py (0 => 191433)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/Scripts/builtins/builtins_generate_combined_header.py                                (rev 0)
+++ trunk/Source/JavaScriptCore/Scripts/builtins/builtins_generate_combined_header.py        2015-10-22 04:39:01 UTC (rev 191433)
</span><span class="lines">@@ -0,0 +1,162 @@
</span><ins>+#!/usr/bin/env python
+#
+# Copyright (c) 2014, 2015 Apple Inc. All rights reserved.
+# Copyright (c) 2014 University of Washington. 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. AND ITS CONTRIBUTORS ``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 ITS 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 logging
+import re
+import string
+from string import Template
+
+from builtins_generator import BuiltinsGenerator
+from builtins_templates import BuiltinsGeneratorTemplates as Templates
+
+log = logging.getLogger('global')
+
+
+class BuiltinsCombinedHeaderGenerator(BuiltinsGenerator):
+    def __init__(self, model):
+        BuiltinsGenerator.__init__(self, model)
+
+    def output_filename(self):
+        return &quot;%sBuiltins.h&quot; % self.model().framework.setting('namespace')
+
+    def generate_output(self):
+        args = {
+            'namespace': self.model().framework.setting('namespace'),
+            'headerGuard': self.output_filename().replace('.', '_'),
+            'macroPrefix': self.model().framework.setting('macro_prefix'),
+        }
+
+        sections = []
+        sections.append(self.generate_license())
+        sections.append(Template(Templates.DoNotEditWarning).substitute(args))
+        sections.append(Template(Templates.HeaderIncludeGuardTop).substitute(args))
+        sections.append(self.generate_forward_declarations())
+        sections.append(Template(Templates.NamespaceTop).substitute(args))
+        for object in self.model().objects:
+            sections.append(self.generate_section_for_object(object))
+        sections.append(self.generate_section_for_code_table_macro())
+        sections.append(self.generate_section_for_code_name_macro())
+        sections.append(Template(Templates.CombinedHeaderStaticMacros).substitute(args))
+        sections.append(Template(Templates.NamespaceBottom).substitute(args))
+        sections.append(Template(Templates.HeaderIncludeGuardBottom).substitute(args))
+
+        return &quot;\n\n&quot;.join(sections)
+
+    def generate_forward_declarations(self):
+        return &quot;&quot;&quot;namespace JSC {
+class FunctionExecutable;
+class VM;
+
+enum class ConstructAbility : unsigned;
+}&quot;&quot;&quot;
+
+    def generate_section_for_object(self, object):
+        lines = []
+        lines.append('/* %s */' % object.object_name)
+        lines.extend(self.generate_externs_for_object(object))
+        lines.append(&quot;&quot;)
+        lines.extend(self.generate_macros_for_object(object))
+        lines.append(&quot;&quot;)
+        lines.extend(self.generate_defines_for_object(object))
+        return '\n'.join(lines)
+
+    def generate_externs_for_object(self, object):
+        lines = []
+
+        for function in object.functions:
+            function_args = {
+                'codeName': BuiltinsGenerator.mangledNameForFunction(function) + 'Code',
+            }
+
+            lines.append(&quot;&quot;&quot;extern const char* s_%(codeName)s;
+extern const int s_%(codeName)sLength;
+extern const JSC::ConstructAbility s_%(codeName)sConstructAbility;&quot;&quot;&quot; % function_args)
+
+        return lines
+
+    def generate_macros_for_object(self, object):
+        args = {
+            'macroPrefix': self.model().framework.setting('macro_prefix'),
+            'objectMacro': object.object_name.replace('.', '').upper(),
+        }
+
+        lines = []
+        lines.append(&quot;#define %(macroPrefix)s_FOREACH_%(objectMacro)s_BUILTIN_DATA(macro) \\&quot; % args)
+        for function in object.functions:
+            function_args = {
+                'funcName': function.function_name,
+                'mangledName': BuiltinsGenerator.mangledNameForFunction(function),
+                'paramCount': len(function.parameters),
+            }
+
+            lines.append(&quot;    macro(%(funcName)s, %(mangledName)s, %(paramCount)d) \\&quot; % function_args)
+        return lines
+
+    def generate_defines_for_object(self, object):
+        lines = []
+        for function in object.functions:
+            args = {
+                'macroPrefix': self.model().framework.setting('macro_prefix'),
+                'objectMacro': object.object_name.replace('.', '').upper(),
+                'functionMacro': function.function_name.upper(),
+            }
+            lines.append(&quot;#define %(macroPrefix)s_BUILTIN_%(objectMacro)s_%(functionMacro)s 1&quot; % args)
+
+        return lines
+
+    def generate_section_for_code_table_macro(self):
+        args = {
+            'macroPrefix': self.model().framework.setting('macro_prefix'),
+        }
+
+        lines = []
+        lines.append(&quot;#define %(macroPrefix)s_FOREACH_BUILTIN_CODE(macro) \\&quot; % args)
+        for function in self.model().all_functions():
+            function_args = {
+                'funcName': function.function_name,
+                'codeName': BuiltinsGenerator.mangledNameForFunction(function) + 'Code',
+            }
+
+            lines.append(&quot;    macro(%(codeName)s, %(funcName)s, s_%(codeName)sLength) \\&quot; % function_args)
+        return '\n'.join(lines)
+
+    def generate_section_for_code_name_macro(self):
+        args = {
+            'macroPrefix': self.model().framework.setting('macro_prefix'),
+        }
+
+        lines = []
+        lines.append(&quot;#define %(macroPrefix)s_FOREACH_BUILTIN_FUNCTION_NAME(macro) \\&quot; % args)
+        unique_names = list(set([function.function_name for function in self.model().all_functions()]))
+        unique_names.sort()
+        for function_name in unique_names:
+            function_args = {
+                'funcName': function_name,
+            }
+
+            lines.append(&quot;    macro(%(funcName)s) \\&quot; % function_args)
+        return '\n'.join(lines)
</ins></span></pre></div>
<a id="trunkSourceJavaScriptCoreScriptsbuiltinsbuiltins_generate_combined_implementationpy"></a>
<div class="addfile"><h4>Added: trunk/Source/JavaScriptCore/Scripts/builtins/builtins_generate_combined_implementation.py (0 => 191433)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/Scripts/builtins/builtins_generate_combined_implementation.py                                (rev 0)
+++ trunk/Source/JavaScriptCore/Scripts/builtins/builtins_generate_combined_implementation.py        2015-10-22 04:39:01 UTC (rev 191433)
</span><span class="lines">@@ -0,0 +1,90 @@
</span><ins>+#!/usr/bin/env python
+#
+# Copyright (c) 2014, 2015 Apple Inc. All rights reserved.
+# Copyright (c) 2014 University of Washington. 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. AND ITS CONTRIBUTORS ``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 ITS 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 logging
+import re
+import string
+from string import Template
+
+from builtins_generator import BuiltinsGenerator
+from builtins_model import Framework, Frameworks
+from builtins_templates import BuiltinsGeneratorTemplates as Templates
+
+log = logging.getLogger('global')
+
+
+class BuiltinsCombinedImplementationGenerator(BuiltinsGenerator):
+    def __init__(self, model):
+        BuiltinsGenerator.__init__(self, model)
+
+    def output_filename(self):
+        return &quot;%sBuiltins.cpp&quot; % self.model().framework.setting('namespace')
+
+    def generate_output(self):
+        args = {
+            'namespace': self.model().framework.setting('namespace'),
+            'macroPrefix': self.model().framework.setting('macro_prefix'),
+        }
+
+        sections = []
+        sections.append(self.generate_license())
+        sections.append(Template(Templates.DoNotEditWarning).substitute(args))
+        sections.append(self.generate_header_includes())
+        sections.append(Template(Templates.NamespaceTop).substitute(args))
+        for function in self.model().all_functions():
+            sections.append(self.generate_embedded_code_string_section_for_function(function))
+        if self.model().framework is Frameworks.JavaScriptCore:
+            sections.append(Template(Templates.CombinedJSCImplementationStaticMacros).substitute(args))
+        elif self.model().framework is Frameworks.WebCore:
+            sections.append(Template(Templates.CombinedWebCoreImplementationStaticMacros).substitute(args))
+        sections.append(Template(Templates.NamespaceBottom).substitute(args))
+
+        return &quot;\n\n&quot;.join(sections)
+
+    def generate_header_includes(self):
+        header_includes = [
+            ([&quot;JavaScriptCore&quot;],
+                (&quot;JavaScriptCore&quot;, &quot;builtins/BuiltinExecutables.h&quot;),
+            ),
+            ([&quot;JavaScriptCore&quot;, &quot;WebCore&quot;],
+                (&quot;JavaScriptCore&quot;, &quot;runtime/Executable.h&quot;),
+            ),
+            ([&quot;JavaScriptCore&quot;, &quot;WebCore&quot;],
+                (&quot;JavaScriptCore&quot;, &quot;runtime/JSCellInlines.h&quot;),
+            ),
+            ([&quot;WebCore&quot;],
+                (&quot;JavaScriptCore&quot;, &quot;runtime/StructureInlines.h&quot;),
+            ),
+            ([&quot;WebCore&quot;],
+                (&quot;JavaScriptCore&quot;, &quot;runtime/JSCJSValueInlines.h&quot;),
+            ),
+            ([&quot;JavaScriptCore&quot;, &quot;WebCore&quot;],
+                (&quot;JavaScriptCore&quot;, &quot;runtime/VM.h&quot;),
+            ),
+        ]
+
+        return '\n'.join(self.generate_includes_from_entries(header_includes))
</ins></span></pre></div>
<a id="trunkSourceJavaScriptCoreScriptsbuiltinsbuiltins_generate_separate_headerpy"></a>
<div class="addfile"><h4>Added: trunk/Source/JavaScriptCore/Scripts/builtins/builtins_generate_separate_header.py (0 => 191433)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/Scripts/builtins/builtins_generate_separate_header.py                                (rev 0)
+++ trunk/Source/JavaScriptCore/Scripts/builtins/builtins_generate_separate_header.py        2015-10-22 04:39:01 UTC (rev 191433)
</span><span class="lines">@@ -0,0 +1,175 @@
</span><ins>+#!/usr/bin/env python
+#
+# Copyright (c) 2014, 2015 Apple Inc. All rights reserved.
+# Copyright (c) 2014 University of Washington. 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. AND ITS CONTRIBUTORS ``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 ITS 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 logging
+import re
+import string
+from string import Template
+
+from builtins_generator import BuiltinsGenerator
+from builtins_templates import BuiltinsGeneratorTemplates as Templates
+
+log = logging.getLogger('global')
+
+
+class BuiltinsSeparateHeaderGenerator(BuiltinsGenerator):
+    def __init__(self, model, object):
+        BuiltinsGenerator.__init__(self, model)
+        self.object = object
+
+    def output_filename(self):
+        return &quot;%sBuiltins.h&quot; % BuiltinsGenerator.mangledNameForObject(self.object)
+
+    def macro_prefix(self):
+        return self.model().framework.setting('macro_prefix')
+
+    def generate_output(self):
+        args = {
+            'namespace': self.model().framework.setting('namespace'),
+            'headerGuard': self.output_filename().replace('.', '_'),
+            'macroPrefix': self.macro_prefix(),
+            'objectName': self.object.object_name.upper(),
+        }
+
+        sections = []
+        sections.append(self.generate_license())
+        sections.append(Template(Templates.DoNotEditWarning).substitute(args))
+        sections.append(Template(Templates.HeaderIncludeGuardTop).substitute(args))
+        sections.append(self.generate_header_includes())
+        sections.append(self.generate_forward_declarations())
+        sections.append(Template(Templates.NamespaceTop).substitute(args))
+        sections.append(self.generate_section_for_object(self.object))
+        sections.append(self.generate_section_for_code_table_macro())
+        sections.append(self.generate_section_for_code_name_macro())
+        sections.append(Template(Templates.SeparateHeaderStaticMacros).substitute(args))
+        sections.append(Template(Templates.NamespaceBottom).substitute(args))
+        sections.append(Template(Templates.HeaderIncludeGuardBottom).substitute(args))
+
+        return &quot;\n\n&quot;.join(sections)
+
+    def generate_forward_declarations(self):
+        return &quot;&quot;&quot;namespace JSC {
+class FunctionExecutable;
+}&quot;&quot;&quot;
+
+    def generate_header_includes(self):
+        header_includes = [
+            ([&quot;WebCore&quot;],
+                (&quot;JavaScriptCore&quot;, &quot;builtins/BuiltinUtils.h&quot;),
+            ),
+        ]
+
+        return '\n'.join(self.generate_includes_from_entries(header_includes))
+
+    def generate_section_for_object(self, object):
+        lines = []
+        lines.append('/* %s */' % object.object_name)
+        lines.extend(self.generate_externs_for_object(object))
+        lines.append(&quot;&quot;)
+        lines.extend(self.generate_macros_for_object(object))
+        lines.append(&quot;&quot;)
+        lines.extend(self.generate_defines_for_object(object))
+        return '\n'.join(lines)
+
+    def generate_externs_for_object(self, object):
+        lines = []
+
+        for function in object.functions:
+            function_args = {
+                'codeName': BuiltinsGenerator.mangledNameForFunction(function) + 'Code',
+            }
+
+            lines.append(&quot;&quot;&quot;extern const char* s_%(codeName)s;
+extern const int s_%(codeName)sLength;
+extern const JSC::ConstructAbility s_%(codeName)sConstructAbility;&quot;&quot;&quot; % function_args)
+
+        return lines
+
+    def generate_macros_for_object(self, object):
+        args = {
+            'macroPrefix': self.macro_prefix(),
+            'objectMacro': object.object_name.replace('.', '_').upper(),
+        }
+
+        lines = []
+        lines.append(&quot;#define %(macroPrefix)s_FOREACH_%(objectMacro)s_BUILTIN_DATA(macro) \\&quot; % args)
+        for function in object.functions:
+            function_args = {
+                'funcName': function.function_name,
+                'mangledName': BuiltinsGenerator.mangledNameForFunction(function),
+                'paramCount': len(function.parameters),
+            }
+
+            lines.append(&quot;    macro(%(funcName)s, %(mangledName)s, %(paramCount)d) \\&quot; % function_args)
+        return lines
+
+    def generate_defines_for_object(self, object):
+        lines = []
+        for function in object.functions:
+            args = {
+                'macroPrefix': self.macro_prefix(),
+                'objectMacro': object.object_name.replace('.', '_').upper(),
+                'functionMacro': function.function_name.upper(),
+            }
+            lines.append(&quot;#define %(macroPrefix)s_BUILTIN_%(objectMacro)s_%(functionMacro)s 1&quot; % args)
+
+        return lines
+
+    def generate_section_for_code_table_macro(self):
+        args = {
+            'macroPrefix': self.model().framework.setting('macro_prefix'),
+            'objectMacro': self.object.object_name.upper(),
+        }
+
+        lines = []
+        lines.append(&quot;#define %(macroPrefix)s_FOREACH_%(objectMacro)s_BUILTIN_CODE(macro) \\&quot; % args)
+        for function in self.object.functions:
+            function_args = {
+                'funcName': function.function_name,
+                'codeName': BuiltinsGenerator.mangledNameForFunction(function) + 'Code',
+            }
+
+            lines.append(&quot;    macro(%(codeName)s, %(funcName)s, s_%(codeName)sLength) \\&quot; % function_args)
+        return '\n'.join(lines)
+
+    def generate_section_for_code_name_macro(self):
+        args = {
+            'macroPrefix': self.macro_prefix(),
+            'objectMacro': self.object.object_name.upper(),
+        }
+
+        lines = []
+        lines.append(&quot;#define %(macroPrefix)s_FOREACH_%(objectMacro)s_BUILTIN_FUNCTION_NAME(macro) \\&quot; % args)
+        unique_names = list(set([function.function_name for function in self.object.functions]))
+        unique_names.sort()
+        for function_name in unique_names:
+            function_args = {
+                'funcName': function_name,
+            }
+
+            lines.append(&quot;    macro(%(funcName)s) \\&quot; % function_args)
+        return '\n'.join(lines)
</ins></span></pre></div>
<a id="trunkSourceJavaScriptCoreScriptsbuiltinsbuiltins_generate_separate_implementationpy"></a>
<div class="addfile"><h4>Added: trunk/Source/JavaScriptCore/Scripts/builtins/builtins_generate_separate_implementation.py (0 => 191433)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/Scripts/builtins/builtins_generate_separate_implementation.py                                (rev 0)
+++ trunk/Source/JavaScriptCore/Scripts/builtins/builtins_generate_separate_implementation.py        2015-10-22 04:39:01 UTC (rev 191433)
</span><span class="lines">@@ -0,0 +1,99 @@
</span><ins>+#!/usr/bin/env python
+#
+# Copyright (c) 2014, 2015 Apple Inc. All rights reserved.
+# Copyright (c) 2014 University of Washington. 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. AND ITS CONTRIBUTORS ``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 ITS 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 logging
+import re
+import string
+from string import Template
+
+from builtins_generator import BuiltinsGenerator, WK_lcfirst
+from builtins_model import Framework, Frameworks
+from builtins_templates import BuiltinsGeneratorTemplates as Templates
+
+log = logging.getLogger('global')
+
+
+class BuiltinsSeparateImplementationGenerator(BuiltinsGenerator):
+    def __init__(self, model, object):
+        BuiltinsGenerator.__init__(self, model)
+        self.object = object
+
+    def output_filename(self):
+        return &quot;%sBuiltins.cpp&quot; % BuiltinsGenerator.mangledNameForObject(self.object)
+
+    def macro_prefix(self):
+        return self.model().framework.setting('macro_prefix')
+
+    def generate_output(self):
+        args = {
+            'namespace': self.model().framework.setting('namespace'),
+            'macroPrefix': self.macro_prefix(),
+            'objectMacro': self.object.object_name.upper(),
+            'objectNameLC': WK_lcfirst(self.object.object_name),
+        }
+
+        sections = []
+        sections.append(self.generate_license())
+        sections.append(Template(Templates.DoNotEditWarning).substitute(args))
+        sections.append(self.generate_header_includes())
+        sections.append(Template(Templates.NamespaceTop).substitute(args))
+        for function in self.object.functions:
+            sections.append(self.generate_embedded_code_string_section_for_function(function))
+        if self.model().framework is Frameworks.JavaScriptCore:
+            sections.append(Template(Templates.SeparateJSCImplementationStaticMacros).substitute(args))
+        elif self.model().framework is Frameworks.WebCore:
+            sections.append(Template(Templates.SeparateWebCoreImplementationStaticMacros).substitute(args))
+        sections.append(Template(Templates.NamespaceBottom).substitute(args))
+
+        return &quot;\n\n&quot;.join(sections)
+
+    def generate_header_includes(self):
+        header_includes = [
+            ([&quot;JavaScriptCore&quot;],
+                (&quot;JavaScriptCore&quot;, &quot;builtins/BuiltinExecutables.h&quot;),
+            ),
+            ([&quot;JavaScriptCore&quot;, &quot;WebCore&quot;],
+                (&quot;JavaScriptCore&quot;, &quot;runtime/Executable.h&quot;),
+            ),
+            ([&quot;JavaScriptCore&quot;, &quot;WebCore&quot;],
+                (&quot;JavaScriptCore&quot;, &quot;runtime/JSCellInlines.h&quot;),
+            ),
+            ([&quot;WebCore&quot;],
+                (&quot;JavaScriptCore&quot;, &quot;runtime/StructureInlines.h&quot;),
+            ),
+            ([&quot;WebCore&quot;],
+                (&quot;JavaScriptCore&quot;, &quot;runtime/JSCJSValueInlines.h&quot;),
+            ),
+            ([&quot;JavaScriptCore&quot;, &quot;WebCore&quot;],
+                (&quot;JavaScriptCore&quot;, &quot;runtime/VM.h&quot;),
+            ),
+            ([&quot;WebCore&quot;],
+                (&quot;WebCore&quot;, &quot;bindings/js/WebCoreJSClientData.h&quot;),
+            ),
+        ]
+
+        return '\n'.join(self.generate_includes_from_entries(header_includes))
</ins></span></pre></div>
<a id="trunkSourceJavaScriptCoreScriptsbuiltinsbuiltins_generate_separate_wrapperpy"></a>
<div class="addfile"><h4>Added: trunk/Source/JavaScriptCore/Scripts/builtins/builtins_generate_separate_wrapper.py (0 => 191433)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/Scripts/builtins/builtins_generate_separate_wrapper.py                                (rev 0)
+++ trunk/Source/JavaScriptCore/Scripts/builtins/builtins_generate_separate_wrapper.py        2015-10-22 04:39:01 UTC (rev 191433)
</span><span class="lines">@@ -0,0 +1,94 @@
</span><ins>+#!/usr/bin/env python
+#
+# Copyright (c) 2014, 2015 Apple Inc. All rights reserved.
+# Copyright (c) 2014 University of Washington. 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. AND ITS CONTRIBUTORS ``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 ITS 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 logging
+import re
+import string
+from string import Template
+
+from builtins_generator import BuiltinsGenerator
+from builtins_templates import BuiltinsGeneratorTemplates as Templates
+
+log = logging.getLogger('global')
+
+
+class BuiltinsSeparateWrapperGenerator(BuiltinsGenerator):
+    def __init__(self, model, object):
+        BuiltinsGenerator.__init__(self, model)
+        self.object = object
+
+    def output_filename(self):
+        return &quot;%sBuiltinsWrapper.h&quot; % BuiltinsGenerator.mangledNameForObject(self.object)
+
+    def macro_prefix(self):
+        return self.model().framework.setting('macro_prefix')
+
+    def generate_output(self):
+        args = {
+            'namespace': self.model().framework.setting('namespace'),
+            'headerGuard': self.output_filename().replace('.', '_'),
+            'macroPrefix': self.macro_prefix(),
+            'objectName': self.object.object_name,
+            'objectMacro': self.object.object_name.upper(),
+        }
+
+        sections = []
+        sections.append(self.generate_license())
+        sections.append(Template(Templates.DoNotEditWarning).substitute(args))
+        sections.append(Template(Templates.HeaderIncludeGuardTop).substitute(args))
+        sections.append(self.generate_header_includes())
+        sections.append(Template(Templates.NamespaceTop).substitute(args))
+        sections.append(Template(Templates.SeparateWrapperHeaderBoilerplate).substitute(args))
+        sections.append(Template(Templates.NamespaceBottom).substitute(args))
+        sections.append(Template(Templates.HeaderIncludeGuardBottom).substitute(args))
+
+        return &quot;\n\n&quot;.join(sections)
+
+    def generate_header_includes(self):
+        header_includes = [
+            ([&quot;WebCore&quot;],
+                (&quot;WebCore&quot;, &quot;%sBuiltins.h&quot; % self.object.object_name),
+            ),
+
+            ([&quot;WebCore&quot;],
+                (&quot;JavaScriptCore&quot;, &quot;bytecode/UnlinkedFunctionExecutable.h&quot;),
+            ),
+
+            ([&quot;WebCore&quot;],
+                (&quot;JavaScriptCore&quot;, &quot;builtins/BuiltinUtils.h&quot;),
+            ),
+
+            ([&quot;WebCore&quot;],
+                (&quot;JavaScriptCore&quot;, &quot;runtime/Identifier.h&quot;),
+            ),
+
+            ([&quot;WebCore&quot;],
+                (&quot;JavaScriptCore&quot;, &quot;runtime/JSFunction.h&quot;),
+            ),
+        ]
+
+        return '\n'.join(self.generate_includes_from_entries(header_includes))
</ins></span></pre></div>
<a id="trunkSourceJavaScriptCoreScriptsbuiltinsbuiltins_generatorpy"></a>
<div class="addfile"><h4>Added: trunk/Source/JavaScriptCore/Scripts/builtins/builtins_generator.py (0 => 191433)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/Scripts/builtins/builtins_generator.py                                (rev 0)
+++ trunk/Source/JavaScriptCore/Scripts/builtins/builtins_generator.py        2015-10-22 04:39:01 UTC (rev 191433)
</span><span class="lines">@@ -0,0 +1,171 @@
</span><ins>+#!/usr/bin/env python
+#
+# Copyright (c) 2014, 2015 Apple Inc. All rights reserved.
+# Copyright (c) 2014 University of Washington. 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. AND ITS CONTRIBUTORS ``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 ITS 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 logging
+import os.path
+import re
+from string import Template
+import json
+
+from builtins_model import BuiltinFunction, BuiltinObject
+from builtins_templates import BuiltinsGeneratorTemplates as Templates
+
+log = logging.getLogger('global')
+
+# These match WK_lcfirst and WK_ucfirst defined in CodeGenerator.pm.
+def WK_lcfirst(str):
+    str = str[:1].lower() + str[1:]
+    str = str.replace('hTML', 'html')
+    str = str.replace('uRL', 'url')
+    str = str.replace('jS', 'js')
+    str = str.replace('xML', 'xml')
+    str = str.replace('xSLT', 'xslt')
+    str = str.replace('cSS', 'css')
+    return str
+
+def WK_ucfirst(str):
+    str = str[:1].upper() + str[1:]
+    str = str.replace('Xml', 'XML')
+    str = str.replace('Svg', 'SVG')
+    return str
+
+class BuiltinsGenerator:
+    def __init__(self, model):
+        self._model = model
+
+    def model(self):
+        return self._model
+
+    # These methods are overridden by subclasses.
+
+    def generate_output(self):
+        pass
+
+    def output_filename(self):
+        pass
+
+
+    # Shared code generation methods.
+    def generate_license(self):
+        raw_license = Template(Templates.LicenseText).substitute(None)
+        copyrights = self._model.copyrights()
+        copyrights.sort()
+
+        license_block = []
+        license_block.append(&quot;/*&quot;)
+        for copyright in copyrights:
+            license_block.append(&quot; * Copyright (c) %s&quot; % copyright)
+        if len(copyrights) &gt; 0:
+            license_block.append(&quot; * &quot;)
+
+        for line in raw_license.split('\n'):
+            license_block.append(&quot; * &quot; + line)
+
+        license_block.append(&quot; */&quot;)
+
+        return '\n'.join(license_block)
+
+    def generate_includes_from_entries(self, entries):
+        includes = set()
+        for entry in entries:
+            (allowed_framework_names, data) = entry
+            (framework_name, header_path) = data
+
+            if self.model().framework.name not in allowed_framework_names:
+                continue
+            if self.model().framework.name != framework_name:
+                includes.add(&quot;#include &lt;%s&gt;&quot; % header_path)
+            else:
+                includes.add(&quot;#include \&quot;%s\&quot;&quot; % os.path.basename(header_path))
+
+        sorted_includes = sorted(list(includes))
+        # Always include config.h and the counterpart header before other headers.
+        name, ext = os.path.splitext(self.output_filename())
+        if ext != '.h':
+            sorted_includes[:0] = [
+                &quot;#include \&quot;config.h\&quot;&quot;,
+                &quot;#include \&quot;%s.h\&quot;&quot; % name,
+                &quot;&quot;,
+            ]
+
+        return sorted_includes
+
+    def generate_embedded_code_string_section_for_function(self, function):
+        text = function.function_source
+        # Wrap it in parens to avoid adding to global scope.
+        text = &quot;(function &quot; + text[text.index(&quot;(&quot;):] + &quot;)&quot;
+        embeddedSourceLength = len(text) + 1  # For extra \n.
+        # Lazy way to escape quotes, I think?
+        textLines = json.dumps(text)[1:-1].split(&quot;\\n&quot;)
+        # This looks scary because we need the JS source itself to have newlines.
+        embeddedSource = '\n'.join(['    &quot;%s\\n&quot; \\' % line for line in textLines])
+
+        constructAbility = &quot;CannotConstruct&quot;
+        if function.is_constructor:
+            constructAbility = &quot;CanConstruct&quot;
+
+        args = {
+            'codeName': BuiltinsGenerator.mangledNameForFunction(function) + 'Code',
+            'embeddedSource': embeddedSource,
+            'embeddedSourceLength': embeddedSourceLength,
+            'canConstruct': constructAbility
+        }
+
+        lines = []
+        lines.append(&quot;const JSC::ConstructAbility s_%(codeName)sConstructAbility = JSC::ConstructAbility::%(canConstruct)s;&quot; % args);
+        lines.append(&quot;const int s_%(codeName)sLength = %(embeddedSourceLength)d;&quot; % args);
+        lines.append(&quot;const char* s_%(codeName)s =\n%(embeddedSource)s\n;&quot; % args);
+        return '\n'.join(lines)
+
+    # Helper methods.
+
+    @staticmethod
+    def mangledNameForObject(object):
+        if not isinstance(object, BuiltinObject):
+            raise Exception(&quot;Invalid argument passed to mangledNameForObject()&quot;)
+
+        def toCamel(match):
+            str = match.group(0)
+            return str[1].upper()
+        return re.sub(r'\.[a-z]', toCamel, object.object_name, flags=re.IGNORECASE)
+
+
+    @staticmethod
+    def mangledNameForFunction(function):
+        if not isinstance(function, BuiltinFunction):
+            raise Exception(&quot;Invalid argument passed to mangledNameForFunction()&quot;)
+
+        function_name = WK_ucfirst(function.function_name)
+
+        def toCamel(match):
+            str = match.group(0)
+            return str[1].upper()
+        function_name = re.sub(r'\.[a-z]', toCamel, function_name, flags=re.IGNORECASE)
+        if function.is_constructor:
+            function_name = function_name + &quot;Constructor&quot;
+
+        object_name = BuiltinsGenerator.mangledNameForObject(function.object)
+        return WK_lcfirst(object_name + function_name)
</ins></span></pre></div>
<a id="trunkSourceJavaScriptCoreScriptsbuiltinsbuiltins_modelpy"></a>
<div class="addfile"><h4>Added: trunk/Source/JavaScriptCore/Scripts/builtins/builtins_model.py (0 => 191433)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/Scripts/builtins/builtins_model.py                                (rev 0)
+++ trunk/Source/JavaScriptCore/Scripts/builtins/builtins_model.py        2015-10-22 04:39:01 UTC (rev 191433)
</span><span class="lines">@@ -0,0 +1,233 @@
</span><ins>+#!/usr/bin/env python
+#
+# Copyright (c) 2015 Apple Inc. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+#    notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#    notice, this list of conditions and the following disclaimer in the
+#    documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``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 ITS 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 logging
+import re
+import os
+
+log = logging.getLogger('global')
+
+_FRAMEWORK_CONFIG_MAP = {
+    &quot;JavaScriptCore&quot;: {
+        &quot;macro_prefix&quot;: &quot;JSC&quot;,
+        &quot;namespace&quot;: &quot;JSC&quot;,
+    },
+    &quot;WebCore&quot;: {
+        &quot;macro_prefix&quot;: &quot;WEBCORE&quot;,
+        &quot;namespace&quot;: &quot;WebCore&quot;,
+    },
+}
+
+functionHeadRegExp = re.compile(r&quot;(?:function|constructor)\s+\w+\s*\(.*?\)&quot;, re.MULTILINE | re.S)
+functionNameRegExp = re.compile(r&quot;(?:function|constructor)\s+(\w+)\s*\(&quot;, re.MULTILINE | re.S)
+functionIsConstructorRegExp = re.compile(r&quot;^constructor&quot;, re.MULTILINE | re.S)
+functionParameterFinder = re.compile(r&quot;^(?:function|constructor)\s+(?:\w+)\s*\(((?:\s*\w+)?\s*(?:\s*,\s*\w+)*)?\s*\)&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)
+
+
+class ParseException(Exception):
+    pass
+
+
+class Framework:
+    def __init__(self, name):
+        self._settings = _FRAMEWORK_CONFIG_MAP[name]
+        self.name = name
+
+    def setting(self, key, default=''):
+        return self._settings.get(key, default)
+
+    @staticmethod
+    def fromString(frameworkString):
+        if frameworkString == &quot;JavaScriptCore&quot;:
+            return Frameworks.JavaScriptCore
+
+        if frameworkString == &quot;WebCore&quot;:
+            return Frameworks.WebCore
+
+        raise ParseException(&quot;Unknown framework: %s&quot; % frameworkString)
+
+
+class Frameworks:
+    JavaScriptCore = Framework(&quot;JavaScriptCore&quot;)
+    WebCore = Framework(&quot;WebCore&quot;)
+
+
+class BuiltinObject:
+    def __init__(self, object_name, functions):
+        self.object_name = object_name
+        self.functions = functions
+        self.collection = None  # Set by the owning BuiltinsCollection
+
+        for function in self.functions:
+            function.object = self
+
+
+class BuiltinFunction:
+    def __init__(self, function_name, function_source, is_constructor, parameters):
+        self.function_name = function_name
+        self.function_source = function_source
+        self.is_constructor = is_constructor
+        self.parameters = parameters
+        self.object = None  # Set by the owning BuiltinObject
+
+    @staticmethod
+    def fromString(function_string):
+        function_source = multilineCommentRegExp.sub(&quot;&quot;, function_string)
+        function_name = functionNameRegExp.findall(function_source)[0]
+        is_constructor = functionIsConstructorRegExp.match(function_source) != None
+        parameters = [s.strip() for s in functionParameterFinder.findall(function_source)[0].split(',')]
+        if len(parameters[0]) == 0:
+            parameters = []
+
+        return BuiltinFunction(function_name, function_source, is_constructor, parameters)
+
+    def __str__(self):
+        interface = &quot;%s(%s)&quot; % (self.function_name, ', '.join(self.parameters))
+        if self.is_constructor:
+            interface = interface + &quot; [Constructor]&quot;
+
+        return interface
+
+
+class BuiltinsCollection:
+    def __init__(self, framework_name):
+        self._copyright_lines = set()
+        self.objects = []
+        self.framework = Framework.fromString(framework_name)
+        log.debug(&quot;Created new Builtins collection.&quot;)
+
+    def parse_builtins_file(self, filename, text):
+        log.debug(&quot;Parsing builtins file: %s&quot; % filename)
+
+        parsed_copyrights = set(self._parse_copyright_lines(text))
+        self._copyright_lines = self._copyright_lines.union(parsed_copyrights)
+
+        log.debug(&quot;Found copyright lines:&quot;)
+        for line in self._copyright_lines:
+            log.debug(line)
+        log.debug(&quot;&quot;)
+
+        object_name, ext = os.path.splitext(os.path.basename(filename))
+        log.debug(&quot;Parsing object: %s&quot; % object_name)
+
+        parsed_functions = self._parse_functions(text)
+        for function in parsed_functions:
+            function.object = object_name
+
+        log.debug(&quot;Parsed functions:&quot;)
+        for func in parsed_functions:
+            log.debug(func)
+        log.debug(&quot;&quot;)
+
+        new_object = BuiltinObject(object_name, parsed_functions)
+        new_object.collection = self
+        self.objects.append(new_object)
+
+    def copyrights(self):
+        owner_to_years = dict()
+        copyrightYearRegExp = re.compile(r&quot;(\d{4})[, ]{0,2}&quot;)
+        ownerStartRegExp = re.compile(r&quot;[^\d, ]&quot;)
+
+        # Returns deduplicated copyrights keyed on the owner.
+        for line in self._copyright_lines:
+            years = set(copyrightYearRegExp.findall(line))
+            ownerIndex = ownerStartRegExp.search(line).start()
+            owner = line[ownerIndex:]
+            log.debug(&quot;Found years: %s and owner: %s&quot; % (years, owner))
+            if owner not in owner_to_years:
+                owner_to_years[owner] = set()
+
+            owner_to_years[owner] = owner_to_years[owner].union(years)
+
+        result = []
+
+        for owner, years in owner_to_years.items():
+            sorted_years = list(years)
+            sorted_years.sort()
+            result.append(&quot;%s %s&quot; % (', '.join(sorted_years), owner))
+
+        return result
+
+    def all_functions(self):
+        result = []
+        for object in self.objects:
+            result.extend(object.functions)
+
+        result.sort()
+        return result
+
+    # Private methods.
+
+    def _parse_copyright_lines(self, text):
+        licenseBlock = multilineCommentRegExp.findall(text)[0]
+        licenseBlock = licenseBlock[:licenseBlock.index(&quot;Redistribution&quot;)]
+
+        copyrightLines = []
+        for line in licenseBlock.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 copyrightLines
+
+    def _parse_functions(self, text):
+        text = multilineCommentRegExp.sub(&quot;/**/&quot;, singleLineCommentRegExp.sub(&quot;//\n&quot;, text))
+
+        matches = [func for func in functionHeadRegExp.finditer(text)]
+        functionBounds = []
+        start = 0
+        end = 0
+        for match in matches:
+            start = match.start()
+            if start &lt; end:
+                continue
+            end = match.end()
+            while text[end] != '{':
+                end = end + 1
+            depth = 1
+            end = end + 1
+            while depth &gt; 0:
+                if text[end] == '{':
+                    depth = depth + 1
+                elif text[end] == '}':
+                    depth = depth - 1
+                end = end + 1
+            functionBounds.append((start, end))
+
+        functionStrings = [text[start:end].strip() for (start, end) in functionBounds]
+        return map(BuiltinFunction.fromString, functionStrings)
</ins></span></pre></div>
<a id="trunkSourceJavaScriptCoreScriptsbuiltinsbuiltins_templatespy"></a>
<div class="addfile"><h4>Added: trunk/Source/JavaScriptCore/Scripts/builtins/builtins_templates.py (0 => 191433)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/Scripts/builtins/builtins_templates.py                                (rev 0)
+++ trunk/Source/JavaScriptCore/Scripts/builtins/builtins_templates.py        2015-10-22 04:39:01 UTC (rev 191433)
</span><span class="lines">@@ -0,0 +1,219 @@
</span><ins>+#!/usr/bin/env python
+#
+# Copyright (c) 2014, 2015 Apple Inc. All rights reserved.
+# Copyright (C) 2015 Canon 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. AND ITS CONTRIBUTORS ``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 ITS 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.
+
+# Builtins generator templates, which can be filled with string.Template.
+
+
+class BuiltinsGeneratorTemplates:
+
+    LicenseText = (
+    &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. AND ITS CONTRIBUTORS ``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 ITS 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.
+&quot;&quot;&quot;)
+
+    DoNotEditWarning = (
+    &quot;&quot;&quot;// DO NOT EDIT THIS FILE. It is automatically generated from JavaScript files for
+// builtins by the script: Source/JavaScriptCore/Scripts/generate-js-builtins.py&quot;&quot;&quot;)
+
+    HeaderIncludeGuardTop = (
+    &quot;&quot;&quot;#ifndef ${headerGuard}
+#define ${headerGuard}&quot;&quot;&quot;)
+
+    HeaderIncludeGuardBottom = (
+    &quot;&quot;&quot;#endif // ${headerGuard}
+&quot;&quot;&quot;)
+
+    NamespaceTop = (
+    &quot;&quot;&quot;namespace ${namespace} {&quot;&quot;&quot;)
+
+    NamespaceBottom = (
+    &quot;&quot;&quot;} // namespace ${namespace}&quot;&quot;&quot;)
+
+    CombinedHeaderStaticMacros = (
+    &quot;&quot;&quot;#define DECLARE_BUILTIN_GENERATOR(codeName, functionName, argumentCount) \\
+    JSC::FunctionExecutable* codeName##Generator(JSC::VM&amp;);
+
+${macroPrefix}_FOREACH_BUILTIN_CODE(DECLARE_BUILTIN_GENERATOR)
+#undef DECLARE_BUILTIN_GENERATOR
+
+#define ${macroPrefix}_BUILTIN_EXISTS(object, func) defined ${macroPrefix}_BUILTIN_ ## object ## _ ## func&quot;&quot;&quot;)
+
+    SeparateHeaderStaticMacros = (
+    &quot;&quot;&quot;#define DECLARE_BUILTIN_GENERATOR(codeName, functionName, argumentCount) \\
+    JSC::FunctionExecutable* codeName##Generator(JSC::VM&amp;);
+
+${macroPrefix}_FOREACH_${objectName}_BUILTIN_CODE(DECLARE_BUILTIN_GENERATOR)
+#undef DECLARE_BUILTIN_GENERATOR
+
+#define ${macroPrefix}_BUILTIN_${objectName}_EXISTS(object, func) defined ${macroPrefix}_BUILTIN_ ## object ## _ ## func&quot;&quot;&quot;)
+
+    CombinedJSCImplementationStaticMacros = (
+    &quot;&quot;&quot;
+#define DEFINE_BUILTIN_GENERATOR(codeName, functionName, argumentCount) \\
+JSC::FunctionExecutable* codeName##Generator(JSC::VM&amp; vm) \\
+{\\
+    return vm.builtinExecutables()-&gt;codeName##Executable()-&gt;link(vm, vm.builtinExecutables()-&gt;codeName##Source()); \
+}
+${macroPrefix}_FOREACH_BUILTIN_CODE(DEFINE_BUILTIN_GENERATOR)
+#undef DEFINE_BUILTIN_GENERATOR
+&quot;&quot;&quot;)
+
+    SeparateJSCImplementationStaticMacros = (
+    &quot;&quot;&quot;
+#define DEFINE_BUILTIN_GENERATOR(codeName, functionName, argumentCount) \\
+JSC::FunctionExecutable* codeName##Generator(JSC::VM&amp; vm) \\
+{\\
+    return vm.builtinExecutables()-&gt;codeName##Executable()-&gt;link(vm, vm.builtinExecutables()-&gt;codeName##Source()); \
+}
+${macroPrefix}_FOREACH_${objectMacro}_BUILTIN_CODE(DEFINE_BUILTIN_GENERATOR)
+#undef DEFINE_BUILTIN_GENERATOR
+&quot;&quot;&quot;)
+
+    CombinedWebCoreImplementationStaticMacros = (
+        &quot;&quot;&quot;
+#define DEFINE_BUILTIN_GENERATOR(codeName, functionName, argumentCount) \\
+JSC::FunctionExecutable* codeName##Generator(JSC::VM&amp; vm) \\
+{\\
+    JSVMClientData* clientData = static_cast&lt;JSVMClientData*&gt;(vm.clientData); \\
+    return clientData-&gt;builtinFunctions().${objectNameLC}Builtins().codeName##Executable()-&gt;link(vm, clientData-&gt;builtinFunctions().${objectNameLC}Builtins().codeName##Source()); \\
+}
+${macroPrefix}_FOREACH_BUILTIN_CODE(DEFINE_BUILTIN_GENERATOR)
+#undef DEFINE_BUILTIN_GENERATOR
+&quot;&quot;&quot;)
+
+    SeparateWebCoreImplementationStaticMacros = (
+        &quot;&quot;&quot;
+#define DEFINE_BUILTIN_GENERATOR(codeName, functionName, argumentCount) \\
+JSC::FunctionExecutable* codeName##Generator(JSC::VM&amp; vm) \\
+{\\
+    JSVMClientData* clientData = static_cast&lt;JSVMClientData*&gt;(vm.clientData); \\
+    return clientData-&gt;builtinFunctions().${objectNameLC}Builtins().codeName##Executable()-&gt;link(vm, clientData-&gt;builtinFunctions().${objectNameLC}Builtins().codeName##Source()); \\
+}
+${macroPrefix}_FOREACH_${objectMacro}_BUILTIN_CODE(DEFINE_BUILTIN_GENERATOR)
+#undef DEFINE_BUILTIN_GENERATOR
+&quot;&quot;&quot;)
+
+    SeparateWrapperHeaderBoilerplate = (
+    &quot;&quot;&quot;class ${objectName}BuiltinsWrapper : private JSC::WeakHandleOwner {
+public:
+    explicit ${objectName}BuiltinsWrapper(JSC::VM* vm)
+        : m_vm(*vm)
+        ${macroPrefix}_FOREACH_${objectMacro}_BUILTIN_FUNCTION_NAME(INITIALIZE_BUILTIN_NAMES)
+#define INITIALIZE_BUILTIN_SOURCE_MEMBERS(name, functionName, length) , m_##name##Source(JSC::makeSource(StringImpl::createFromLiteral(s_##name, length)))
+        ${macroPrefix}_FOREACH_${objectMacro}_BUILTIN_CODE(INITIALIZE_BUILTIN_SOURCE_MEMBERS)
+#undef INITIALIZE_BUILTIN_SOURCE_MEMBERS
+    {
+    }
+
+#define EXPOSE_BUILTIN_EXECUTABLES(name, functionName, length) \\
+    JSC::UnlinkedFunctionExecutable* name##Executable(); \\
+    const JSC::SourceCode&amp; name##Source() const { return m_##name##Source; }
+    ${macroPrefix}_FOREACH_${objectMacro}_BUILTIN_CODE(EXPOSE_BUILTIN_EXECUTABLES)
+#undef EXPOSE_BUILTIN_EXECUTABLES
+
+    ${macroPrefix}_FOREACH_${objectMacro}_BUILTIN_FUNCTION_NAME(DECLARE_BUILTIN_IDENTIFIER_ACCESSOR)
+
+    void exportNames();
+
+private:
+    JSC::VM&amp; m_vm;
+
+    ${macroPrefix}_FOREACH_${objectMacro}_BUILTIN_FUNCTION_NAME(DECLARE_BUILTIN_NAMES)
+
+#define DECLARE_BUILTIN_SOURCE_MEMBERS(name, functionName, length) \\
+    JSC::SourceCode m_##name##Source;\\
+    JSC::Weak&lt;JSC::UnlinkedFunctionExecutable&gt; m_##name##Executable;
+    ${macroPrefix}_FOREACH_${objectMacro}_BUILTIN_CODE(DECLARE_BUILTIN_SOURCE_MEMBERS)
+#undef DECLARE_BUILTIN_SOURCE_MEMBERS
+
+};
+
+#define DEFINE_BUILTIN_EXECUTABLES(name, functionName, length) \\
+inline JSC::UnlinkedFunctionExecutable* ${objectName}BuiltinsWrapper::name##Executable() \\
+{\\
+    if (!m_##name##Executable)\\
+        m_##name##Executable = JSC::Weak&lt;JSC::UnlinkedFunctionExecutable&gt;(JSC::createBuiltinExecutable(m_vm, m_##name##Source, functionName##PublicName(), s_##name##ConstructAbility), this, &amp;m_##name##Executable);\\
+    return m_##name##Executable.get();\\
+}
+${macroPrefix}_FOREACH_${objectMacro}_BUILTIN_CODE(DEFINE_BUILTIN_EXECUTABLES)
+#undef DEFINE_BUILTIN_EXECUTABLES
+
+inline void ${objectName}BuiltinsWrapper::exportNames()
+{
+#define EXPORT_FUNCTION_NAME(name) m_vm.propertyNames-&gt;appendExternalName(name##PublicName(), name##PrivateName());
+    ${macroPrefix}_FOREACH_${objectMacro}_BUILTIN_FUNCTION_NAME(EXPORT_FUNCTION_NAME)
+#undef EXPORT_FUNCTION_NAME
+}
+
+class ${objectName}BuiltinFunctions {
+public:
+    explicit ${objectName}BuiltinFunctions(JSC::VM&amp; vm) : m_vm(vm) { }
+
+    void init(JSC::JSGlobalObject&amp;);
+    void visit(JSC::SlotVisitor&amp;);
+
+public:
+    JSC::VM&amp; m_vm;
+
+#define DECLARE_BUILTIN_SOURCE_MEMBERS(functionName) \\
+    JSC::WriteBarrier&lt;JSC::JSFunction&gt; m_##functionName##Function;
+    ${macroPrefix}_FOREACH_${objectMacro}_BUILTIN_FUNCTION_NAME(DECLARE_BUILTIN_SOURCE_MEMBERS)
+#undef DECLARE_BUILTIN_SOURCE_MEMBERS
+};
+
+inline void ${objectName}BuiltinFunctions::init(JSC::JSGlobalObject&amp; globalObject)
+{
+#define EXPORT_FUNCTION(codeName, functionName, length)\\
+    m_##functionName##Function.set(m_vm, &amp;globalObject, JSC::JSFunction::createBuiltinFunction(m_vm, codeName##Generator(m_vm), &amp;globalObject));
+    ${macroPrefix}_FOREACH_${objectMacro}_BUILTIN_CODE(EXPORT_FUNCTION)
+#undef EXPORT_FUNCTION
+}
+
+inline void ${objectName}BuiltinFunctions::visit(JSC::SlotVisitor&amp; visitor)
+{
+#define VISIT_FUNCTION(name) visitor.append(&amp;m_##name##Function);
+    ${macroPrefix}_FOREACH_${objectMacro}_BUILTIN_FUNCTION_NAME(VISIT_FUNCTION)
+#undef VISIT_FUNCTION
+}
+&quot;&quot;&quot;)
</ins></span></pre></div>
<a id="trunkSourceJavaScriptCoreScriptsgeneratejsbuiltins"></a>
<div class="delfile"><h4>Deleted: trunk/Source/JavaScriptCore/Scripts/generate-js-builtins (191432 => 191433)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/Scripts/generate-js-builtins        2015-10-22 03:17:06 UTC (rev 191432)
+++ trunk/Source/JavaScriptCore/Scripts/generate-js-builtins        2015-10-22 04:39:01 UTC (rev 191433)
</span><span class="lines">@@ -1,343 +0,0 @@
</span><del>-#!/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 argparse
-import filecmp
-import fnmatch
-import os
-import re
-import shutil
-import sys
-import datetime
-import json
-
-parser = argparse.ArgumentParser()
-parser.add_argument('input_file', nargs='*', help='Input JS files which builtins generated from')
-parser.add_argument('--input-directory', help='All JS files will be used as input from this directory.')
-parser.add_argument('--output', help='path to output cpp or h file')
-parser.add_argument('--prefix', default='JSC', help='prefix used for public macros')
-parser.add_argument('--namespace', default='JSC', help='C++ namespace')
-args = parser.parse_args()
-
-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|constructor)\s+\w+\s*\(.*?\)&quot;, re.MULTILINE | re.S)
-functionNameRegExp = re.compile(r&quot;(?:function|constructor)\s+(\w+)\s*\(&quot;, re.MULTILINE | re.S)
-functionIsConstructorRegExp = re.compile(r&quot;^constructor&quot;, re.MULTILINE | re.S)
-functionParameterFinder = re.compile(r&quot;^(?:function|constructor)\s+(?:\w+)\s*\(((?:\s*\w+)?\s*(?:\s*,\s*\w+)*)?\s*\)&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))
-
-class Function(object):
-    def __init__(self, name, source, isConstructor, parameters):
-        self.name = name
-        self.source = source
-        self.isConstructor = isConstructor
-        self.parameters = parameters
-
-    def mangleName(self, object):
-        qName = object + &quot;.&quot; + self.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
-        if self.isConstructor:
-            mangledName = mangledName + &quot;Constructor&quot;
-        return mangledName
-
-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]
-        functionIsConstructor = functionIsConstructorRegExp.match(function) != None
-        functionParameters = functionParameterFinder.findall(function)[0].split(',')
-        if len(functionParameters[0]) == 0:
-            functionParameters = []
-
-        result.append(Function(functionName, function, functionIsConstructor, functionParameters))
-    return result
-
-def writeIncludeDirectives(writer, headerNames):
-    for headerName in headerNames:
-        writer.write(&quot;#include &quot; + headerName + &quot;\n&quot;)
-
-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))
-
-builtins = []
-copyrights = []
-(output_base, _) = os.path.splitext(args.output)
-
-if args.input_directory:
-    for file in os.listdir(args.input_directory):
-        args.input_file.append(os.path.join(args.input_directory, file))
-
-for file in args.input_file:
-    if fnmatch.fnmatch(file, '*.js'):
-        (baseName, functions, objectCopyrights) = generateCode(file)
-        copyrights.extend(objectCopyrights)
-        builtins.append((baseName, functions))
-namespace = args.namespace
-macroPrefix = args.prefix
-scopeName = os.path.splitext(os.path.basename(args.output))[0]
-includeGuard = scopeName + &quot;_H&quot;
-headerName = scopeName + &quot;.h&quot;
-
-headerIncludes = [&quot;\&quot;BuiltinUtils.h\&quot;&quot;] if namespace == &quot;JSC&quot; else [&quot;&lt;builtins/BuiltinUtils.h&gt;&quot;]
-contentIncludes = [&quot;\&quot;BuiltinExecutables.h\&quot;&quot;, &quot;\&quot;Executable.h\&quot;&quot;, &quot;\&quot;JSCellInlines.h\&quot;&quot;, &quot;\&quot;VM.h\&quot;&quot;] if namespace == &quot;JSC&quot; else [&quot;&lt;runtime/Executable.h&gt;&quot;, &quot;&lt;runtime/StructureInlines.h&gt;&quot;, &quot;&lt;runtime/JSCJSValueInlines.h&gt;&quot;, &quot;&lt;runtime/JSCellInlines.h&gt;&quot;, &quot;&lt;runtime/VM.h&gt;&quot;, &quot;\&quot;WebCoreJSClientData.h\&quot;&quot;]
-
-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 %s
-#define %s
-
-&quot;&quot;&quot; % (generatorString, copyrightText, includeGuard, includeGuard))
-
-writeIncludeDirectives(builtinsHeader, headerIncludes)
-
-builtinsHeader.write(&quot;&quot;&quot;
-namespace JSC {
-    class FunctionExecutable;
-}
-
-namespace %s {
-
-&quot;&quot;&quot; % namespace)
-
-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 function in functions:
-        name = function.name
-        mangledName = function.mangleName(objectName)
-        mangledName = mangledName[0].lower() + mangledName[1:] + &quot;Code&quot;
-        codeReferences.append((mangledName, function))
-        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;extern const JSC::ConstructAbility s_%sConstructAbility;\n&quot; % mangledName)
-    builtinsHeader.write(&quot;\n&quot;)
-    builtinsHeader.write(&quot;#define %s_FOREACH_%s_BUILTIN(macro) \\\n&quot; % (macroPrefix, objectName.replace(&quot;.&quot;, &quot;_&quot;).upper()))
-    for function in functions:
-        mangledName = function.mangleName(objectName)
-        builtinsHeader.write(&quot;    macro(%s, %s, %d) \\\n&quot; % (function.name, mangledName, len(function.parameters)))
-    builtinsHeader.write(&quot;\n&quot;)
-    for function in functions:
-        builtinsHeader.write(&quot;#define %s_BUILTIN_%s 1\n&quot; % (macroPrefix, function.mangleName(objectName).upper()))
-    builtinsHeader.write(&quot;\n\n&quot;)
-names = []
-builtinsHeader.write(&quot;#define %s_FOREACH_BUILTIN(macro)\\\n&quot; % macroPrefix)
-for (codeReference, function) in codeReferences:
-    builtinsHeader.write(&quot;    macro(%s, %s, s_%sLength) \\\n&quot; % (codeReference, function.name, codeReference))
-    names.append(function.name)
-
-builtinsHeader.write(&quot;\n\n&quot;)
-builtinsHeader.write(&quot;#define %s_FOREACH_BUILTIN_FUNCTION_NAME(macro) \\\n&quot; % macroPrefix)
-for name in sorted(set(names)):
-    builtinsHeader.write(&quot;    macro(%s) \\\n&quot; % name)
-builtinsHeader.write(&quot;&quot;&quot;
-
-#define DECLARE_BUILTIN_GENERATOR(codeName, functionName, argumentCount) \\
-    JSC::FunctionExecutable* codeName##Generator(JSC::VM&amp;);
-
-%s_FOREACH_BUILTIN(DECLARE_BUILTIN_GENERATOR)
-#undef DECLARE_BUILTIN_GENERATOR
-
-#define %s_BUILTIN_EXISTS(name) defined %s_BUILTIN_ ## name
-
-}
-
-#endif // %s
-
-&quot;&quot;&quot; % (macroPrefix, macroPrefix, macroPrefix, includeGuard))
-
-builtinsImplementation.write(&quot;&quot;&quot;%s
-%s
-
-#include &quot;config.h&quot;
-
-#include &quot;%s&quot;
-
-&quot;&quot;&quot;  % (generatorString, copyrightText, headerName))
-
-writeIncludeDirectives(builtinsImplementation, contentIncludes)
-
-builtinsImplementation.write(&quot;&quot;&quot;
-namespace %s {
-
-&quot;&quot;&quot;  % (namespace))
-
-
-
-for (codeReference, function) in codeReferences:
-    source = function.source
-    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
-    constructAbility = &quot;JSC::ConstructAbility::CannotConstruct&quot;
-    if function.isConstructor:
-        constructAbility = &quot;JSC::ConstructAbility::CanConstruct&quot;
-    builtinsImplementation.write(&quot;const JSC::ConstructAbility s_%sConstructAbility = %s;\n\n&quot; % (codeReference, constructAbility)) # + 1 for \n
-
-builtinsImplementation.write(&quot;&quot;&quot;
-#define DEFINE_BUILTIN_GENERATOR(codeName, functionName, argumentCount) \\
-JSC::FunctionExecutable* codeName##Generator(JSC::VM&amp; vm) \\
-&quot;&quot;&quot;);
-
-if (namespace == &quot;JSC&quot;):
-    builtinsImplementation.write(&quot;&quot;&quot;{\\
-    return vm.builtinExecutables()-&gt;codeName##Executable()-&gt;link(vm, vm.builtinExecutables()-&gt;codeName##Source()); \\
-&quot;&quot;&quot;)
-else:
-    builtinName = scopeName[0].lower() + scopeName[1:]
-    builtinsImplementation.write(&quot;&quot;&quot;{\\
-    JSVMClientData* clientData = static_cast&lt;JSVMClientData*&gt;(vm.clientData); \\
-    return clientData-&gt;builtinFunctions().%s().codeName##Executable()-&gt;link(vm, clientData-&gt;builtinFunctions().%s().codeName##Source()); \\
-&quot;&quot;&quot;% (builtinName, builtinName))
-
-builtinsImplementation.write(&quot;&quot;&quot;}
-%s_FOREACH_BUILTIN(DEFINE_BUILTIN_GENERATOR)
-#undef DEFINE_BUILTIN_GENERATOR
-}
-
-&quot;&quot;&quot;% (macroPrefix))
-
-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)):
-    if (os.path.exists(output_base + &quot;.h&quot;)):
-        os.remove(output_base + &quot;.h&quot;)
-    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)):
-    if (os.path.exists(output_base + &quot;.cpp&quot;)):
-        os.remove(output_base + &quot;.cpp&quot;)
-    os.rename(output_base + &quot;.cpp.tmp&quot;, output_base + &quot;.cpp&quot;)
-else:
-    os.remove(output_base + &quot;.cpp.tmp&quot;)
</del></span></pre></div>
<a id="trunkSourceJavaScriptCoreScriptsgeneratejsbuiltinspy"></a>
<div class="addfile"><h4>Added: trunk/Source/JavaScriptCore/Scripts/generate-js-builtins.py (0 => 191433)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/Scripts/generate-js-builtins.py                                (rev 0)
+++ trunk/Source/JavaScriptCore/Scripts/generate-js-builtins.py        2015-10-22 04:39:01 UTC (rev 191433)
</span><span class="lines">@@ -0,0 +1,164 @@
</span><ins>+#!/usr/bin/env python
+#
+# Copyright (c) 2014, 2015 Apple Inc. All rights reserved.
+# Copyright (c) 2014 University of Washington. 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. AND ITS CONTRIBUTORS ``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 ITS 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.
+
+# This script generates C++ bindings for JavaScript builtins.
+# Generators for individual files are located in the builtins/ directory.
+
+import fnmatch
+import logging
+import optparse
+import os
+
+logging.basicConfig(format='%(levelname)s: %(message)s', level=logging.ERROR)
+log = logging.getLogger('global')
+
+from lazywriter import LazyFileWriter
+
+import builtins
+from builtins import *
+
+
+def generate_bindings_for_builtins_files(builtins_files=[],
+                                         output_path=None,
+                                         concatenate_output=False,
+                                         combined_output=False,
+                                         framework_name=&quot;&quot;,
+                                         force_output=False):
+
+    generators = []
+
+    model = BuiltinsCollection(framework_name=framework_name)
+
+    for filepath in builtins_files:
+        with open(filepath, &quot;r&quot;) as file:
+            file_text = file.read()
+            file_name = os.path.basename(filepath)
+
+            # If this is a test file, then rewrite the filename to remove the
+            # test running options encoded into the filename.
+            if file_name.startswith(framework_name):
+                (_, object_name, _) = file_name.split('-')
+                file_name = object_name + '.js'
+            model.parse_builtins_file(file_name, file_text)
+
+    if combined_output:
+        log.debug(&quot;Using generator style: combined files for all builtins.&quot;)
+        generators.append(BuiltinsCombinedHeaderGenerator(model))
+        generators.append(BuiltinsCombinedImplementationGenerator(model))
+    else:
+        log.debug(&quot;Using generator style: single files for each builtin.&quot;)
+        for object in model.objects:
+            generators.append(BuiltinsSeparateHeaderGenerator(model, object))
+            generators.append(BuiltinsSeparateImplementationGenerator(model, object))
+
+            if model.framework is Frameworks.WebCore:
+                generators.append(BuiltinsSeparateWrapperGenerator(model, object))
+
+    log.debug(&quot;&quot;)
+    log.debug(&quot;Generating bindings for builtins.&quot;)
+
+    test_result_file_contents = []
+
+    for generator in generators:
+        output_filepath = os.path.join(output_path, generator.output_filename())
+        log.debug(&quot;Generating output file: %s&quot; % generator.output_filename())
+        output = generator.generate_output()
+
+        log.debug(&quot;---&quot;)
+        log.debug(&quot;\n&quot; + output)
+        log.debug(&quot;---&quot;)
+        if concatenate_output:
+            test_result_file_contents.append('### Begin File: %s' % generator.output_filename())
+            test_result_file_contents.append(output)
+            test_result_file_contents.append('### End File: %s' % generator.output_filename())
+            test_result_file_contents.append('')
+        else:
+            log.debug(&quot;Writing file: %s&quot; % output_filepath)
+            output_file = LazyFileWriter(output_filepath, force_output)
+            output_file.write(output)
+            output_file.close()
+
+    if concatenate_output:
+        filename = os.path.join(os.path.basename(builtins_files[0]) + '-result')
+        output_filepath = os.path.join(output_path, filename)
+        log.debug(&quot;Writing file: %s&quot; % output_filepath) 
+        output_file = LazyFileWriter(output_filepath, force_output)
+        output_file.write('\n'.join(test_result_file_contents))
+        output_file.close()
+
+if __name__ == '__main__':
+    allowed_framework_names = ['JavaScriptCore', 'WebCore']
+    cli_parser = optparse.OptionParser(usage=&quot;usage: %prog [options] Builtin1.js [, Builtin2.js, ...]&quot;)
+    cli_parser.add_option(&quot;-i&quot;, &quot;--input-directory&quot;, help=&quot;If specified, generates builtins from all JavaScript files in the specified directory in addition to specific files passed as arguments.&quot;)
+    cli_parser.add_option(&quot;-o&quot;, &quot;--output-directory&quot;, help=&quot;Directory where generated files should be written.&quot;)
+    cli_parser.add_option(&quot;--framework&quot;, type=&quot;choice&quot;, choices=allowed_framework_names, help=&quot;Destination framework for generated files.&quot;)
+    cli_parser.add_option(&quot;--force&quot;, action=&quot;store_true&quot;, help=&quot;Force output of generated scripts, even if nothing changed.&quot;)
+    cli_parser.add_option(&quot;--combined&quot;, action=&quot;store_true&quot;, help=&quot;Produce one .h/.cpp file instead of producing one per builtin object.&quot;)
+    cli_parser.add_option(&quot;-v&quot;, &quot;--debug&quot;, action=&quot;store_true&quot;, help=&quot;Log extra output for debugging the generator itself.&quot;)
+    cli_parser.add_option(&quot;-t&quot;, &quot;--test&quot;, action=&quot;store_true&quot;, help=&quot;Enable test mode.&quot;)
+
+    arg_options, arg_values = cli_parser.parse_args()
+    if len(arg_values) is 0 and not arg_options.input_directory:
+        raise ParseException(&quot;At least one input file or directory expected.&quot;)
+
+    if not arg_options.output_directory:
+        raise ParseException(&quot;Missing output directory.&quot;)
+
+    if arg_options.debug:
+        log.setLevel(logging.DEBUG)
+
+    input_filepaths = arg_values[:]
+    if arg_options.input_directory:
+        for filepath in os.listdir(arg_options.input_directory):
+            input_filepaths.append(os.path.join(arg_options.input_directory, filepath))
+
+    input_filepaths = filter(lambda name: fnmatch.fnmatch(name, '*.js'), input_filepaths)
+
+    options = {
+        'output_path': arg_options.output_directory,
+        'framework_name': arg_options.framework,
+        'combined_output': arg_options.combined,
+        'force_output': arg_options.force,
+        'concatenate_output': arg_options.test,
+    }
+
+    log.debug(&quot;Generating code for builtins.&quot;)
+    log.debug(&quot;Parsed options:&quot;)
+    for option, value in options.items():
+        log.debug(&quot;    %s: %s&quot; % (option, value))
+    log.debug(&quot;&quot;)
+    log.debug(&quot;Input files:&quot;)
+    for filepath in input_filepaths:
+        log.debug(&quot;    %s&quot; % filepath)
+    log.debug(&quot;&quot;)
+
+    try:
+        generate_bindings_for_builtins_files(builtins_files=input_filepaths, **options)
+    except ParseException as e:
+        if arg_options.test:
+            log.error(e.message)
+        else:
+            raise  # Force the build to fail.
</ins></span></pre></div>
<a id="trunkSourceJavaScriptCoreScriptslazywriterpy"></a>
<div class="addfile"><h4>Added: trunk/Source/JavaScriptCore/Scripts/lazywriter.py (0 => 191433)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/Scripts/lazywriter.py                                (rev 0)
+++ trunk/Source/JavaScriptCore/Scripts/lazywriter.py        2015-10-22 04:39:01 UTC (rev 191433)
</span><span class="lines">@@ -0,0 +1,58 @@
</span><ins>+#!/usr/bin/env python
+#
+# Copyright (c) 2015 Apple Inc. All rights reserved.
+# Copyright (c) 2009 Google 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. AND ITS CONTRIBUTORS ``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 ITS 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.
+
+# A writer that only updates file if it actually changed.
+
+
+class LazyFileWriter:
+    def __init__(self, filepath, force_output):
+        self._filepath = filepath
+        self._output = &quot;&quot;
+        self.force_output = force_output
+
+    def write(self, text):
+        self._output += text
+
+    def close(self):
+        text_changed = True
+        self._output = self._output.rstrip() + &quot;\n&quot;
+
+        try:
+            if self.force_output:
+                raise
+
+            read_file = open(self._filepath, &quot;r&quot;)
+            old_text = read_file.read()
+            read_file.close()
+            text_changed = old_text != self._output
+        except:
+            # Ignore, just overwrite by default
+            pass
+
+        if text_changed or self.force_output:
+            out_file = open(self._filepath, &quot;w&quot;)
+            out_file.write(self._output)
+            out_file.close()
</ins></span></pre></div>
<a id="trunkSourceJavaScriptCoreScriptstestsbuiltinsJavaScriptCoreBuiltinPromiseCombinedjsfromrev191432trunkSourceJavaScriptCorebuiltinsBuiltinExecutablesh"></a>
<div class="copfile"><h4>Copied: trunk/Source/JavaScriptCore/Scripts/tests/builtins/JavaScriptCore-Builtin.Promise-Combined.js (from rev 191432, trunk/Source/JavaScriptCore/builtins/BuiltinExecutables.h) (0 => 191433)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/Scripts/tests/builtins/JavaScriptCore-Builtin.Promise-Combined.js                                (rev 0)
+++ trunk/Source/JavaScriptCore/Scripts/tests/builtins/JavaScriptCore-Builtin.Promise-Combined.js        2015-10-22 04:39:01 UTC (rev 191433)
</span><span class="lines">@@ -0,0 +1,54 @@
</span><ins>+/*
+ * Copyright (C) 2015 Yusuke Suzuki &lt;utatane.tea@gmail.com&gt;.
+ *
+ * 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 rejectPromise(promise, reason)
+{
+    &quot;use strict&quot;;
+
+    var reactions = promise.@promiseRejectReactions;
+    promise.@promiseResult = reason;
+    promise.@promiseFulfillReactions = undefined;
+    promise.@promiseRejectReactions = undefined;
+    promise.@promiseState = @promiseRejected;
+
+    @InspectorInstrumentation.promiseRejected(promise, reason, reactions);
+
+    @triggerPromiseReactions(reactions, reason);
+}
+
+function fulfillPromise(promise, value)
+{
+    &quot;use strict&quot;;
+
+    var reactions = promise.@promiseFulfillReactions;
+    promise.@promiseResult = value;
+    promise.@promiseFulfillReactions = undefined;
+    promise.@promiseRejectReactions = undefined;
+    promise.@promiseState = @promiseFulfilled;
+
+    @InspectorInstrumentation.promiseFulfilled(promise, value, reactions);
+
+    @triggerPromiseReactions(reactions, value);
+}
</ins></span></pre></div>
<a id="trunkSourceJavaScriptCoreScriptstestsbuiltinsJavaScriptCoreBuiltinPromiseSeparatejsfromrev191432trunkSourceJavaScriptCorebuiltinsBuiltinExecutablesh"></a>
<div class="copfile"><h4>Copied: trunk/Source/JavaScriptCore/Scripts/tests/builtins/JavaScriptCore-Builtin.Promise-Separate.js (from rev 191432, trunk/Source/JavaScriptCore/builtins/BuiltinExecutables.h) (0 => 191433)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/Scripts/tests/builtins/JavaScriptCore-Builtin.Promise-Separate.js                                (rev 0)
+++ trunk/Source/JavaScriptCore/Scripts/tests/builtins/JavaScriptCore-Builtin.Promise-Separate.js        2015-10-22 04:39:01 UTC (rev 191433)
</span><span class="lines">@@ -0,0 +1,54 @@
</span><ins>+/*
+ * Copyright (C) 2015 Yusuke Suzuki &lt;utatane.tea@gmail.com&gt;.
+ *
+ * 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 rejectPromise(promise, reason)
+{
+    &quot;use strict&quot;;
+
+    var reactions = promise.@promiseRejectReactions;
+    promise.@promiseResult = reason;
+    promise.@promiseFulfillReactions = undefined;
+    promise.@promiseRejectReactions = undefined;
+    promise.@promiseState = @promiseRejected;
+
+    @InspectorInstrumentation.promiseRejected(promise, reason, reactions);
+
+    @triggerPromiseReactions(reactions, reason);
+}
+
+function fulfillPromise(promise, value)
+{
+    &quot;use strict&quot;;
+
+    var reactions = promise.@promiseFulfillReactions;
+    promise.@promiseResult = value;
+    promise.@promiseFulfillReactions = undefined;
+    promise.@promiseRejectReactions = undefined;
+    promise.@promiseState = @promiseFulfilled;
+
+    @InspectorInstrumentation.promiseFulfilled(promise, value, reactions);
+
+    @triggerPromiseReactions(reactions, value);
+}
</ins></span></pre></div>
<a id="trunkSourceJavaScriptCoreScriptstestsbuiltinsJavaScriptCoreBuiltinprototypeCombinedjs"></a>
<div class="addfile"><h4>Added: trunk/Source/JavaScriptCore/Scripts/tests/builtins/JavaScriptCore-Builtin.prototype-Combined.js (0 => 191433)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/Scripts/tests/builtins/JavaScriptCore-Builtin.prototype-Combined.js                                (rev 0)
+++ trunk/Source/JavaScriptCore/Scripts/tests/builtins/JavaScriptCore-Builtin.prototype-Combined.js        2015-10-22 04:39:01 UTC (rev 191433)
</span><span class="lines">@@ -0,0 +1,78 @@
</span><ins>+/*
+ * Copyright (C) 2014, 2015 Apple Inc. All rights reserved.
+ * Copyright (C) 2015 Yusuke Suzuki &lt;utatane.tea@gmail.com&gt;.
+ *
+ * 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 = @toLength(array.length);
+
+    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;
+}
+
+function forEach(callback /*, thisArg */)
+{
+    &quot;use strict&quot;;
+
+    if (this === null)
+        throw new @TypeError(&quot;Array.prototype.forEach requires that |this| not be null&quot;);
+    
+    if (this === undefined)
+        throw new @TypeError(&quot;Array.prototype.forEach requires that |this| not be undefined&quot;);
+    
+    var array = @Object(this);
+    var length = @toLength(array.length);
+
+    if (typeof callback !== &quot;function&quot;)
+        throw new @TypeError(&quot;Array.prototype.forEach 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)
+            callback.@call(thisArg, array[i], i, array);
+    }
+}
</ins></span></pre></div>
<a id="trunkSourceJavaScriptCoreScriptstestsbuiltinsJavaScriptCoreBuiltinprototypeSeparatejs"></a>
<div class="addfile"><h4>Added: trunk/Source/JavaScriptCore/Scripts/tests/builtins/JavaScriptCore-Builtin.prototype-Separate.js (0 => 191433)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/Scripts/tests/builtins/JavaScriptCore-Builtin.prototype-Separate.js                                (rev 0)
+++ trunk/Source/JavaScriptCore/Scripts/tests/builtins/JavaScriptCore-Builtin.prototype-Separate.js        2015-10-22 04:39:01 UTC (rev 191433)
</span><span class="lines">@@ -0,0 +1,78 @@
</span><ins>+/*
+ * Copyright (C) 2014, 2015 Apple Inc. All rights reserved.
+ * Copyright (C) 2015 Yusuke Suzuki &lt;utatane.tea@gmail.com&gt;.
+ *
+ * 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 = @toLength(array.length);
+
+    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;
+}
+
+function forEach(callback /*, thisArg */)
+{
+    &quot;use strict&quot;;
+
+    if (this === null)
+        throw new @TypeError(&quot;Array.prototype.forEach requires that |this| not be null&quot;);
+    
+    if (this === undefined)
+        throw new @TypeError(&quot;Array.prototype.forEach requires that |this| not be undefined&quot;);
+    
+    var array = @Object(this);
+    var length = @toLength(array.length);
+
+    if (typeof callback !== &quot;function&quot;)
+        throw new @TypeError(&quot;Array.prototype.forEach 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)
+            callback.@call(thisArg, array[i], i, array);
+    }
+}
</ins></span></pre></div>
<a id="trunkSourceJavaScriptCoreScriptstestsbuiltinsJavaScriptCoreBuiltinConstructorCombinedjs"></a>
<div class="addfile"><h4>Added: trunk/Source/JavaScriptCore/Scripts/tests/builtins/JavaScriptCore-BuiltinConstructor-Combined.js (0 => 191433)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/Scripts/tests/builtins/JavaScriptCore-BuiltinConstructor-Combined.js                                (rev 0)
+++ trunk/Source/JavaScriptCore/Scripts/tests/builtins/JavaScriptCore-BuiltinConstructor-Combined.js        2015-10-22 04:39:01 UTC (rev 191433)
</span><span class="lines">@@ -0,0 +1,110 @@
</span><ins>+/*
+ * Copyright (C) 2015 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+function of(/* items... */)
+{
+    &quot;use strict&quot;;
+
+    var length = arguments.length;
+    // TODO: Need isConstructor(this) instead of typeof &quot;function&quot; check.
+    var array = typeof this === 'function' ? new this(length) : new @Array(length);
+    for (var k = 0; k &lt; length; ++k)
+        @putByValDirect(array, k, arguments[k]);
+    array.length = length;
+    return array;
+}
+
+function from(items /*, mapFn, thisArg */)
+{
+    &quot;use strict&quot;;
+
+    var thisObj = this;
+
+    var mapFn = arguments.length &gt; 1 ? arguments[1] : undefined;
+
+    var thisArg;
+
+    if (mapFn !== undefined) {
+        if (typeof mapFn !== &quot;function&quot;)
+            throw new @TypeError(&quot;Array.from requires that the second argument, when provided, be a function&quot;);
+
+        if (arguments.length &gt; 2)
+            thisArg = arguments[2];
+    }
+
+    if (items == null)
+        throw new @TypeError(&quot;Array.from requires an array-like object - not null or undefined&quot;);
+
+    var iteratorMethod = items[@symbolIterator];
+    if (iteratorMethod != null) {
+        if (typeof iteratorMethod !== &quot;function&quot;)
+            throw new @TypeError(&quot;Array.from requires that the property of the first argument, items[Symbol.iterator], when exists, be a function&quot;);
+
+        // TODO: Need isConstructor(thisObj) instead of typeof &quot;function&quot; check.
+        var result = (typeof thisObj === &quot;function&quot;) ? @Object(new thisObj()) : [];
+
+        var k = 0;
+        var iterator = iteratorMethod.@call(items);
+
+        // Since for-of loop once more looks up the @@iterator property of a given iterable,
+        // it could be observable if the user defines a getter for @@iterator.
+        // To avoid this situation, we define a wrapper object that @@iterator just returns a given iterator.
+        var wrapper = {
+            [@symbolIterator]() {
+                return iterator;
+            }
+        };
+
+        for (var value of wrapper) {
+            if (mapFn)
+                @putByValDirect(result, k, thisArg === undefined ? mapFn(value, k) : mapFn.@call(thisArg, value, k));
+            else
+                @putByValDirect(result, k, value);
+            k += 1;
+        }
+
+        result.length = k;
+        return result;
+    }
+
+    var arrayLike = @Object(items);
+    var arrayLikeLength = @toLength(arrayLike.length);
+
+    // TODO: Need isConstructor(thisObj) instead of typeof &quot;function&quot; check.
+    var result = (typeof thisObj === &quot;function&quot;) ? @Object(new thisObj(arrayLikeLength)) : new @Array(arrayLikeLength);
+
+    var k = 0;
+    while (k &lt; arrayLikeLength) {
+        var value = arrayLike[k];
+        if (mapFn)
+            @putByValDirect(result, k, thisArg === undefined ? mapFn(value, k) : mapFn.@call(thisArg, value, k));
+        else
+            @putByValDirect(result, k, value);
+        k += 1;
+    }
+
+    result.length = arrayLikeLength;
+    return result;
+}
</ins></span></pre></div>
<a id="trunkSourceJavaScriptCoreScriptstestsbuiltinsJavaScriptCoreBuiltinConstructorSeparatejs"></a>
<div class="addfile"><h4>Added: trunk/Source/JavaScriptCore/Scripts/tests/builtins/JavaScriptCore-BuiltinConstructor-Separate.js (0 => 191433)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/Scripts/tests/builtins/JavaScriptCore-BuiltinConstructor-Separate.js                                (rev 0)
+++ trunk/Source/JavaScriptCore/Scripts/tests/builtins/JavaScriptCore-BuiltinConstructor-Separate.js        2015-10-22 04:39:01 UTC (rev 191433)
</span><span class="lines">@@ -0,0 +1,110 @@
</span><ins>+/*
+ * Copyright (C) 2015 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+function of(/* items... */)
+{
+    &quot;use strict&quot;;
+
+    var length = arguments.length;
+    // TODO: Need isConstructor(this) instead of typeof &quot;function&quot; check.
+    var array = typeof this === 'function' ? new this(length) : new @Array(length);
+    for (var k = 0; k &lt; length; ++k)
+        @putByValDirect(array, k, arguments[k]);
+    array.length = length;
+    return array;
+}
+
+function from(items /*, mapFn, thisArg */)
+{
+    &quot;use strict&quot;;
+
+    var thisObj = this;
+
+    var mapFn = arguments.length &gt; 1 ? arguments[1] : undefined;
+
+    var thisArg;
+
+    if (mapFn !== undefined) {
+        if (typeof mapFn !== &quot;function&quot;)
+            throw new @TypeError(&quot;Array.from requires that the second argument, when provided, be a function&quot;);
+
+        if (arguments.length &gt; 2)
+            thisArg = arguments[2];
+    }
+
+    if (items == null)
+        throw new @TypeError(&quot;Array.from requires an array-like object - not null or undefined&quot;);
+
+    var iteratorMethod = items[@symbolIterator];
+    if (iteratorMethod != null) {
+        if (typeof iteratorMethod !== &quot;function&quot;)
+            throw new @TypeError(&quot;Array.from requires that the property of the first argument, items[Symbol.iterator], when exists, be a function&quot;);
+
+        // TODO: Need isConstructor(thisObj) instead of typeof &quot;function&quot; check.
+        var result = (typeof thisObj === &quot;function&quot;) ? @Object(new thisObj()) : [];
+
+        var k = 0;
+        var iterator = iteratorMethod.@call(items);
+
+        // Since for-of loop once more looks up the @@iterator property of a given iterable,
+        // it could be observable if the user defines a getter for @@iterator.
+        // To avoid this situation, we define a wrapper object that @@iterator just returns a given iterator.
+        var wrapper = {
+            [@symbolIterator]() {
+                return iterator;
+            }
+        };
+
+        for (var value of wrapper) {
+            if (mapFn)
+                @putByValDirect(result, k, thisArg === undefined ? mapFn(value, k) : mapFn.@call(thisArg, value, k));
+            else
+                @putByValDirect(result, k, value);
+            k += 1;
+        }
+
+        result.length = k;
+        return result;
+    }
+
+    var arrayLike = @Object(items);
+    var arrayLikeLength = @toLength(arrayLike.length);
+
+    // TODO: Need isConstructor(thisObj) instead of typeof &quot;function&quot; check.
+    var result = (typeof thisObj === &quot;function&quot;) ? @Object(new thisObj(arrayLikeLength)) : new @Array(arrayLikeLength);
+
+    var k = 0;
+    while (k &lt; arrayLikeLength) {
+        var value = arrayLike[k];
+        if (mapFn)
+            @putByValDirect(result, k, thisArg === undefined ? mapFn(value, k) : mapFn.@call(thisArg, value, k));
+        else
+            @putByValDirect(result, k, value);
+        k += 1;
+    }
+
+    result.length = arrayLikeLength;
+    return result;
+}
</ins></span></pre></div>
<a id="trunkSourceJavaScriptCoreScriptstestsbuiltinsWebCoreGuardedBuiltinSeparatejsfromrev191432trunkSourceJavaScriptCorebuiltinsBuiltinExecutablesh"></a>
<div class="copfile"><h4>Copied: trunk/Source/JavaScriptCore/Scripts/tests/builtins/WebCore-GuardedBuiltin-Separate.js (from rev 191432, trunk/Source/JavaScriptCore/builtins/BuiltinExecutables.h) (0 => 191433)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/Scripts/tests/builtins/WebCore-GuardedBuiltin-Separate.js                                (rev 0)
+++ trunk/Source/JavaScriptCore/Scripts/tests/builtins/WebCore-GuardedBuiltin-Separate.js        2015-10-22 04:39:01 UTC (rev 191433)
</span><span class="lines">@@ -0,0 +1,64 @@
</span><ins>+/*
+ * Copyright (C) 2015 Canon 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.
+ */
+
+// @optional=STREAMS_API
+
+function isReadableStreamLocked(stream)
+{
+   &quot;use strict&quot;;
+
+    return !!stream.@reader;
+}
+
+
+function cancelReadableStream(stream, reason)
+{
+    &quot;use strict&quot;;
+
+    if (stream.@state === @readableStreamClosed)
+        return Promise.resolve();
+    if (stream.@state === @readableStreamErrored)
+        return Promise.reject(stream.@storedError);
+    stream.@queue = [];
+    @finishClosingReadableStream(stream);
+    return @promiseInvokeOrNoop(stream.@underlyingSource, &quot;cancel&quot;, [reason]).then(function() { });
+}
+
+
+function promiseInvokeOrNoop(object, key, args)
+{
+    &quot;use strict&quot;;
+
+    try {
+        var method = object[key];
+        if (typeof method === &quot;undefined&quot;)
+            return Promise.resolve();
+        var result = method.@apply(object, args);
+        return Promise.resolve(result);
+    }
+    catch(error) {
+        return Promise.reject(error);
+    }
+}
</ins></span></pre></div>
<a id="trunkSourceJavaScriptCoreScriptstestsbuiltinsWebCoreGuardedInternalBuiltinSeparatejsfromrev191432trunkSourceJavaScriptCorebuiltinsBuiltinExecutablesh"></a>
<div class="copfile"><h4>Copied: trunk/Source/JavaScriptCore/Scripts/tests/builtins/WebCore-GuardedInternalBuiltin-Separate.js (from rev 191432, trunk/Source/JavaScriptCore/builtins/BuiltinExecutables.h) (0 => 191433)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/Scripts/tests/builtins/WebCore-GuardedInternalBuiltin-Separate.js                                (rev 0)
+++ trunk/Source/JavaScriptCore/Scripts/tests/builtins/WebCore-GuardedInternalBuiltin-Separate.js        2015-10-22 04:39:01 UTC (rev 191433)
</span><span class="lines">@@ -0,0 +1,65 @@
</span><ins>+/*
+ * Copyright (C) 2015 Canon 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.
+ */
+
+// @optional=STREAMS_API
+// @internal
+
+function isReadableStreamLocked(stream)
+{
+   &quot;use strict&quot;;
+
+    return !!stream.@reader;
+}
+
+
+function cancelReadableStream(stream, reason)
+{
+    &quot;use strict&quot;;
+
+    if (stream.@state === @readableStreamClosed)
+        return Promise.resolve();
+    if (stream.@state === @readableStreamErrored)
+        return Promise.reject(stream.@storedError);
+    stream.@queue = [];
+    @finishClosingReadableStream(stream);
+    return @promiseInvokeOrNoop(stream.@underlyingSource, &quot;cancel&quot;, [reason]).then(function() { });
+}
+
+
+function promiseInvokeOrNoop(object, key, args)
+{
+    &quot;use strict&quot;;
+
+    try {
+        var method = object[key];
+        if (typeof method === &quot;undefined&quot;)
+            return Promise.resolve();
+        var result = method.@apply(object, args);
+        return Promise.resolve(result);
+    }
+    catch(error) {
+        return Promise.reject(error);
+    }
+}
</ins></span></pre></div>
<a id="trunkSourceJavaScriptCoreScriptstestsbuiltinsWebCoreUnguardedBuiltinSeparatejsfromrev191432trunkSourceJavaScriptCorebuiltinsBuiltinExecutablesh"></a>
<div class="copfile"><h4>Copied: trunk/Source/JavaScriptCore/Scripts/tests/builtins/WebCore-UnguardedBuiltin-Separate.js (from rev 191432, trunk/Source/JavaScriptCore/builtins/BuiltinExecutables.h) (0 => 191433)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/Scripts/tests/builtins/WebCore-UnguardedBuiltin-Separate.js                                (rev 0)
+++ trunk/Source/JavaScriptCore/Scripts/tests/builtins/WebCore-UnguardedBuiltin-Separate.js        2015-10-22 04:39:01 UTC (rev 191433)
</span><span class="lines">@@ -0,0 +1,62 @@
</span><ins>+/*
+ * Copyright (C) 2015 Canon 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 isReadableStreamLocked(stream)
+{
+   &quot;use strict&quot;;
+
+    return !!stream.@reader;
+}
+
+
+function cancelReadableStream(stream, reason)
+{
+    &quot;use strict&quot;;
+
+    if (stream.@state === @readableStreamClosed)
+        return Promise.resolve();
+    if (stream.@state === @readableStreamErrored)
+        return Promise.reject(stream.@storedError);
+    stream.@queue = [];
+    @finishClosingReadableStream(stream);
+    return @promiseInvokeOrNoop(stream.@underlyingSource, &quot;cancel&quot;, [reason]).then(function() { });
+}
+
+
+function promiseInvokeOrNoop(object, key, args)
+{
+    &quot;use strict&quot;;
+
+    try {
+        var method = object[key];
+        if (typeof method === &quot;undefined&quot;)
+            return Promise.resolve();
+        var result = method.@apply(object, args);
+        return Promise.resolve(result);
+    }
+    catch(error) {
+        return Promise.reject(error);
+    }
+}
</ins></span></pre></div>
<a id="trunkSourceJavaScriptCoreScriptstestsbuiltinsWebCorexmlCasingTestSeparatejsfromrev191432trunkSourceJavaScriptCorebuiltinsBuiltinExecutablesh"></a>
<div class="copfile"><h4>Copied: trunk/Source/JavaScriptCore/Scripts/tests/builtins/WebCore-xmlCasingTest-Separate.js (from rev 191432, trunk/Source/JavaScriptCore/builtins/BuiltinExecutables.h) (0 => 191433)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/Scripts/tests/builtins/WebCore-xmlCasingTest-Separate.js                                (rev 0)
+++ trunk/Source/JavaScriptCore/Scripts/tests/builtins/WebCore-xmlCasingTest-Separate.js        2015-10-22 04:39:01 UTC (rev 191433)
</span><span class="lines">@@ -0,0 +1,65 @@
</span><ins>+/*
+ * Copyright (C) 2015 Canon 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.
+ */
+
+// @optional=STREAMS_API
+// @internal
+
+function xmlCasingTest(stream)
+{
+   &quot;use strict&quot;;
+
+    return !!stream.@reader;
+}
+
+
+function cssCasingTest(stream, reason)
+{
+    &quot;use strict&quot;;
+
+    if (stream.@state === @readableStreamClosed)
+        return Promise.resolve();
+    if (stream.@state === @readableStreamErrored)
+        return Promise.reject(stream.@storedError);
+    stream.@queue = [];
+    @finishClosingReadableStream(stream);
+    return @promiseInvokeOrNoop(stream.@underlyingSource, &quot;cancel&quot;, [reason]).then(function() { });
+}
+
+
+function urlCasingTest(object, key, args)
+{
+    &quot;use strict&quot;;
+
+    try {
+        var method = object[key];
+        if (typeof method === &quot;undefined&quot;)
+            return Promise.resolve();
+        var result = method.@apply(object, args);
+        return Promise.resolve(result);
+    }
+    catch(error) {
+        return Promise.reject(error);
+    }
+}
</ins></span></pre></div>
<a id="trunkSourceJavaScriptCoreScriptstestsbuiltinsexpectedJavaScriptCoreBuiltinPromiseCombinedjsresult"></a>
<div class="addfile"><h4>Added: trunk/Source/JavaScriptCore/Scripts/tests/builtins/expected/JavaScriptCore-Builtin.Promise-Combined.js-result (0 => 191433)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/Scripts/tests/builtins/expected/JavaScriptCore-Builtin.Promise-Combined.js-result                                (rev 0)
+++ trunk/Source/JavaScriptCore/Scripts/tests/builtins/expected/JavaScriptCore-Builtin.Promise-Combined.js-result        2015-10-22 04:39:01 UTC (rev 191433)
</span><span class="lines">@@ -0,0 +1,168 @@
</span><ins>+### Begin File: JSCBuiltins.h
+/*
+ * Copyright (c) 2015 Yusuke Suzuki &lt;utatane.tea@gmail.com&gt;.
+ * 
+ * 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. AND ITS CONTRIBUTORS ``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 ITS 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.
+ * 
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from JavaScript files for
+// builtins by the script: Source/JavaScriptCore/Scripts/generate-js-builtins.py
+
+#ifndef JSCBuiltins_h
+#define JSCBuiltins_h
+
+namespace JSC {
+class FunctionExecutable;
+class VM;
+
+enum class ConstructAbility : unsigned;
+}
+
+namespace JSC {
+
+/* Builtin.Promise */
+extern const char* s_builtinPromiseRejectPromiseCode;
+extern const int s_builtinPromiseRejectPromiseCodeLength;
+extern const JSC::ConstructAbility s_builtinPromiseRejectPromiseCodeConstructAbility;
+extern const char* s_builtinPromiseFulfillPromiseCode;
+extern const int s_builtinPromiseFulfillPromiseCodeLength;
+extern const JSC::ConstructAbility s_builtinPromiseFulfillPromiseCodeConstructAbility;
+
+#define JSC_FOREACH_BUILTINPROMISE_BUILTIN_DATA(macro) \
+    macro(rejectPromise, builtinPromiseRejectPromise, 2) \
+    macro(fulfillPromise, builtinPromiseFulfillPromise, 2) \
+
+#define JSC_BUILTIN_BUILTINPROMISE_REJECTPROMISE 1
+#define JSC_BUILTIN_BUILTINPROMISE_FULFILLPROMISE 1
+
+#define JSC_FOREACH_BUILTIN_CODE(macro) \
+    macro(builtinPromiseRejectPromiseCode, rejectPromise, s_builtinPromiseRejectPromiseCodeLength) \
+    macro(builtinPromiseFulfillPromiseCode, fulfillPromise, s_builtinPromiseFulfillPromiseCodeLength) \
+
+#define JSC_FOREACH_BUILTIN_FUNCTION_NAME(macro) \
+    macro(fulfillPromise) \
+    macro(rejectPromise) \
+
+#define DECLARE_BUILTIN_GENERATOR(codeName, functionName, argumentCount) \
+    JSC::FunctionExecutable* codeName##Generator(JSC::VM&amp;);
+
+JSC_FOREACH_BUILTIN_CODE(DECLARE_BUILTIN_GENERATOR)
+#undef DECLARE_BUILTIN_GENERATOR
+
+#define JSC_BUILTIN_EXISTS(object, func) defined JSC_BUILTIN_ ## object ## _ ## func
+
+} // namespace JSC
+
+#endif // JSCBuiltins_h
+
+### End File: JSCBuiltins.h
+
+### Begin File: JSCBuiltins.cpp
+/*
+ * Copyright (c) 2015 Yusuke Suzuki &lt;utatane.tea@gmail.com&gt;.
+ * 
+ * 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. AND ITS CONTRIBUTORS ``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 ITS 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.
+ * 
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from JavaScript files for
+// builtins by the script: Source/JavaScriptCore/Scripts/generate-js-builtins.py
+
+#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 {
+
+const JSC::ConstructAbility s_builtinPromiseRejectPromiseCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const int s_builtinPromiseRejectPromiseCodeLength = 413;
+const char* s_builtinPromiseRejectPromiseCode =
+    &quot;(function (promise, reason)\n&quot; \
+    &quot;{\n&quot; \
+    &quot;    \&quot;use strict\&quot;;\n&quot; \
+    &quot;\n&quot; \
+    &quot;    var reactions = promise.@promiseRejectReactions;\n&quot; \
+    &quot;    promise.@promiseResult = reason;\n&quot; \
+    &quot;    promise.@promiseFulfillReactions = undefined;\n&quot; \
+    &quot;    promise.@promiseRejectReactions = undefined;\n&quot; \
+    &quot;    promise.@promiseState = @promiseRejected;\n&quot; \
+    &quot;\n&quot; \
+    &quot;    @InspectorInstrumentation.promiseRejected(promise, reason, reactions);\n&quot; \
+    &quot;\n&quot; \
+    &quot;    @triggerPromiseReactions(reactions, reason);\n&quot; \
+    &quot;})\n&quot; \
+;
+
+const JSC::ConstructAbility s_builtinPromiseFulfillPromiseCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const int s_builtinPromiseFulfillPromiseCodeLength = 412;
+const char* s_builtinPromiseFulfillPromiseCode =
+    &quot;(function (promise, value)\n&quot; \
+    &quot;{\n&quot; \
+    &quot;    \&quot;use strict\&quot;;\n&quot; \
+    &quot;\n&quot; \
+    &quot;    var reactions = promise.@promiseFulfillReactions;\n&quot; \
+    &quot;    promise.@promiseResult = value;\n&quot; \
+    &quot;    promise.@promiseFulfillReactions = undefined;\n&quot; \
+    &quot;    promise.@promiseRejectReactions = undefined;\n&quot; \
+    &quot;    promise.@promiseState = @promiseFulfilled;\n&quot; \
+    &quot;\n&quot; \
+    &quot;    @InspectorInstrumentation.promiseFulfilled(promise, value, reactions);\n&quot; \
+    &quot;\n&quot; \
+    &quot;    @triggerPromiseReactions(reactions, value);\n&quot; \
+    &quot;})\n&quot; \
+;
+
+
+#define DEFINE_BUILTIN_GENERATOR(codeName, functionName, argumentCount) \
+JSC::FunctionExecutable* codeName##Generator(JSC::VM&amp; vm) \
+{\
+    return vm.builtinExecutables()-&gt;codeName##Executable()-&gt;link(vm, vm.builtinExecutables()-&gt;codeName##Source()); }
+JSC_FOREACH_BUILTIN_CODE(DEFINE_BUILTIN_GENERATOR)
+#undef DEFINE_BUILTIN_GENERATOR
+
+
+} // namespace JSC
+### End File: JSCBuiltins.cpp
</ins></span></pre></div>
<a id="trunkSourceJavaScriptCoreScriptstestsbuiltinsexpectedJavaScriptCoreBuiltinPromiseSeparatejsresult"></a>
<div class="addfile"><h4>Added: trunk/Source/JavaScriptCore/Scripts/tests/builtins/expected/JavaScriptCore-Builtin.Promise-Separate.js-result (0 => 191433)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/Scripts/tests/builtins/expected/JavaScriptCore-Builtin.Promise-Separate.js-result                                (rev 0)
+++ trunk/Source/JavaScriptCore/Scripts/tests/builtins/expected/JavaScriptCore-Builtin.Promise-Separate.js-result        2015-10-22 04:39:01 UTC (rev 191433)
</span><span class="lines">@@ -0,0 +1,167 @@
</span><ins>+### Begin File: BuiltinPromiseBuiltins.h
+/*
+ * Copyright (c) 2015 Yusuke Suzuki &lt;utatane.tea@gmail.com&gt;.
+ * 
+ * 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. AND ITS CONTRIBUTORS ``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 ITS 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.
+ * 
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from JavaScript files for
+// builtins by the script: Source/JavaScriptCore/Scripts/generate-js-builtins.py
+
+#ifndef BuiltinPromiseBuiltins_h
+#define BuiltinPromiseBuiltins_h
+
+
+
+namespace JSC {
+class FunctionExecutable;
+}
+
+namespace JSC {
+
+/* Builtin.Promise */
+extern const char* s_builtinPromiseRejectPromiseCode;
+extern const int s_builtinPromiseRejectPromiseCodeLength;
+extern const JSC::ConstructAbility s_builtinPromiseRejectPromiseCodeConstructAbility;
+extern const char* s_builtinPromiseFulfillPromiseCode;
+extern const int s_builtinPromiseFulfillPromiseCodeLength;
+extern const JSC::ConstructAbility s_builtinPromiseFulfillPromiseCodeConstructAbility;
+
+#define JSC_FOREACH_BUILTIN_PROMISE_BUILTIN_DATA(macro) \
+    macro(rejectPromise, builtinPromiseRejectPromise, 2) \
+    macro(fulfillPromise, builtinPromiseFulfillPromise, 2) \
+
+#define JSC_BUILTIN_BUILTIN_PROMISE_REJECTPROMISE 1
+#define JSC_BUILTIN_BUILTIN_PROMISE_FULFILLPROMISE 1
+
+#define JSC_FOREACH_BUILTIN.PROMISE_BUILTIN_CODE(macro) \
+    macro(builtinPromiseRejectPromiseCode, rejectPromise, s_builtinPromiseRejectPromiseCodeLength) \
+    macro(builtinPromiseFulfillPromiseCode, fulfillPromise, s_builtinPromiseFulfillPromiseCodeLength) \
+
+#define JSC_FOREACH_BUILTIN.PROMISE_BUILTIN_FUNCTION_NAME(macro) \
+    macro(fulfillPromise) \
+    macro(rejectPromise) \
+
+#define DECLARE_BUILTIN_GENERATOR(codeName, functionName, argumentCount) \
+    JSC::FunctionExecutable* codeName##Generator(JSC::VM&amp;);
+
+JSC_FOREACH_BUILTIN.PROMISE_BUILTIN_CODE(DECLARE_BUILTIN_GENERATOR)
+#undef DECLARE_BUILTIN_GENERATOR
+
+#define JSC_BUILTIN_BUILTIN.PROMISE_EXISTS(object, func) defined JSC_BUILTIN_ ## object ## _ ## func
+
+} // namespace JSC
+
+#endif // BuiltinPromiseBuiltins_h
+
+### End File: BuiltinPromiseBuiltins.h
+
+### Begin File: BuiltinPromiseBuiltins.cpp
+/*
+ * Copyright (c) 2015 Yusuke Suzuki &lt;utatane.tea@gmail.com&gt;.
+ * 
+ * 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. AND ITS CONTRIBUTORS ``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 ITS 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.
+ * 
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from JavaScript files for
+// builtins by the script: Source/JavaScriptCore/Scripts/generate-js-builtins.py
+
+#include &quot;config.h&quot;
+#include &quot;BuiltinPromiseBuiltins.h&quot;
+
+#include &quot;BuiltinExecutables.h&quot;
+#include &quot;Executable.h&quot;
+#include &quot;JSCellInlines.h&quot;
+#include &quot;VM.h&quot;
+
+namespace JSC {
+
+const JSC::ConstructAbility s_builtinPromiseRejectPromiseCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const int s_builtinPromiseRejectPromiseCodeLength = 413;
+const char* s_builtinPromiseRejectPromiseCode =
+    &quot;(function (promise, reason)\n&quot; \
+    &quot;{\n&quot; \
+    &quot;    \&quot;use strict\&quot;;\n&quot; \
+    &quot;\n&quot; \
+    &quot;    var reactions = promise.@promiseRejectReactions;\n&quot; \
+    &quot;    promise.@promiseResult = reason;\n&quot; \
+    &quot;    promise.@promiseFulfillReactions = undefined;\n&quot; \
+    &quot;    promise.@promiseRejectReactions = undefined;\n&quot; \
+    &quot;    promise.@promiseState = @promiseRejected;\n&quot; \
+    &quot;\n&quot; \
+    &quot;    @InspectorInstrumentation.promiseRejected(promise, reason, reactions);\n&quot; \
+    &quot;\n&quot; \
+    &quot;    @triggerPromiseReactions(reactions, reason);\n&quot; \
+    &quot;})\n&quot; \
+;
+
+const JSC::ConstructAbility s_builtinPromiseFulfillPromiseCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const int s_builtinPromiseFulfillPromiseCodeLength = 412;
+const char* s_builtinPromiseFulfillPromiseCode =
+    &quot;(function (promise, value)\n&quot; \
+    &quot;{\n&quot; \
+    &quot;    \&quot;use strict\&quot;;\n&quot; \
+    &quot;\n&quot; \
+    &quot;    var reactions = promise.@promiseFulfillReactions;\n&quot; \
+    &quot;    promise.@promiseResult = value;\n&quot; \
+    &quot;    promise.@promiseFulfillReactions = undefined;\n&quot; \
+    &quot;    promise.@promiseRejectReactions = undefined;\n&quot; \
+    &quot;    promise.@promiseState = @promiseFulfilled;\n&quot; \
+    &quot;\n&quot; \
+    &quot;    @InspectorInstrumentation.promiseFulfilled(promise, value, reactions);\n&quot; \
+    &quot;\n&quot; \
+    &quot;    @triggerPromiseReactions(reactions, value);\n&quot; \
+    &quot;})\n&quot; \
+;
+
+
+#define DEFINE_BUILTIN_GENERATOR(codeName, functionName, argumentCount) \
+JSC::FunctionExecutable* codeName##Generator(JSC::VM&amp; vm) \
+{\
+    return vm.builtinExecutables()-&gt;codeName##Executable()-&gt;link(vm, vm.builtinExecutables()-&gt;codeName##Source()); }
+JSC_FOREACH_BUILTIN.PROMISE_BUILTIN_CODE(DEFINE_BUILTIN_GENERATOR)
+#undef DEFINE_BUILTIN_GENERATOR
+
+
+} // namespace JSC
+### End File: BuiltinPromiseBuiltins.cpp
</ins></span></pre></div>
<a id="trunkSourceJavaScriptCoreScriptstestsbuiltinsexpectedJavaScriptCoreBuiltinprototypeCombinedjsresult"></a>
<div class="addfile"><h4>Added: trunk/Source/JavaScriptCore/Scripts/tests/builtins/expected/JavaScriptCore-Builtin.prototype-Combined.js-result (0 => 191433)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/Scripts/tests/builtins/expected/JavaScriptCore-Builtin.prototype-Combined.js-result                                (rev 0)
+++ trunk/Source/JavaScriptCore/Scripts/tests/builtins/expected/JavaScriptCore-Builtin.prototype-Combined.js-result        2015-10-22 04:39:01 UTC (rev 191433)
</span><span class="lines">@@ -0,0 +1,192 @@
</span><ins>+### Begin File: JSCBuiltins.h
+/*
+ * Copyright (c) 2014, 2015 Apple Inc. All rights reserved.
+ * Copyright (c) 2015 Yusuke Suzuki &lt;utatane.tea@gmail.com&gt;.
+ * 
+ * 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. AND ITS CONTRIBUTORS ``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 ITS 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.
+ * 
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from JavaScript files for
+// builtins by the script: Source/JavaScriptCore/Scripts/generate-js-builtins.py
+
+#ifndef JSCBuiltins_h
+#define JSCBuiltins_h
+
+namespace JSC {
+class FunctionExecutable;
+class VM;
+
+enum class ConstructAbility : unsigned;
+}
+
+namespace JSC {
+
+/* Builtin.prototype */
+extern const char* s_builtinPrototypeEveryCode;
+extern const int s_builtinPrototypeEveryCodeLength;
+extern const JSC::ConstructAbility s_builtinPrototypeEveryCodeConstructAbility;
+extern const char* s_builtinPrototypeForEachCode;
+extern const int s_builtinPrototypeForEachCodeLength;
+extern const JSC::ConstructAbility s_builtinPrototypeForEachCodeConstructAbility;
+
+#define JSC_FOREACH_BUILTINPROTOTYPE_BUILTIN_DATA(macro) \
+    macro(every, builtinPrototypeEvery, 1) \
+    macro(forEach, builtinPrototypeForEach, 1) \
+
+#define JSC_BUILTIN_BUILTINPROTOTYPE_EVERY 1
+#define JSC_BUILTIN_BUILTINPROTOTYPE_FOREACH 1
+
+#define JSC_FOREACH_BUILTIN_CODE(macro) \
+    macro(builtinPrototypeEveryCode, every, s_builtinPrototypeEveryCodeLength) \
+    macro(builtinPrototypeForEachCode, forEach, s_builtinPrototypeForEachCodeLength) \
+
+#define JSC_FOREACH_BUILTIN_FUNCTION_NAME(macro) \
+    macro(every) \
+    macro(forEach) \
+
+#define DECLARE_BUILTIN_GENERATOR(codeName, functionName, argumentCount) \
+    JSC::FunctionExecutable* codeName##Generator(JSC::VM&amp;);
+
+JSC_FOREACH_BUILTIN_CODE(DECLARE_BUILTIN_GENERATOR)
+#undef DECLARE_BUILTIN_GENERATOR
+
+#define JSC_BUILTIN_EXISTS(object, func) defined JSC_BUILTIN_ ## object ## _ ## func
+
+} // namespace JSC
+
+#endif // JSCBuiltins_h
+
+### End File: JSCBuiltins.h
+
+### Begin File: JSCBuiltins.cpp
+/*
+ * Copyright (c) 2014, 2015 Apple Inc. All rights reserved.
+ * Copyright (c) 2015 Yusuke Suzuki &lt;utatane.tea@gmail.com&gt;.
+ * 
+ * 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. AND ITS CONTRIBUTORS ``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 ITS 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.
+ * 
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from JavaScript files for
+// builtins by the script: Source/JavaScriptCore/Scripts/generate-js-builtins.py
+
+#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 {
+
+const JSC::ConstructAbility s_builtinPrototypeEveryCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const int s_builtinPrototypeEveryCodeLength = 762;
+const char* s_builtinPrototypeEveryCode =
+    &quot;(function (callback )\n&quot; \
+    &quot;{\n&quot; \
+    &quot;    \&quot;use strict\&quot;;\n&quot; \
+    &quot;\n&quot; \
+    &quot;    if (this === null)\n&quot; \
+    &quot;        throw new @TypeError(\&quot;Array.prototype.every requires that |this| not be null\&quot;);\n&quot; \
+    &quot;    \n&quot; \
+    &quot;    if (this === undefined)\n&quot; \
+    &quot;        throw new @TypeError(\&quot;Array.prototype.every requires that |this| not be undefined\&quot;);\n&quot; \
+    &quot;    \n&quot; \
+    &quot;    var array = @Object(this);\n&quot; \
+    &quot;    var length = @toLength(array.length);\n&quot; \
+    &quot;\n&quot; \
+    &quot;    if (typeof callback !== \&quot;function\&quot;)\n&quot; \
+    &quot;        throw new @TypeError(\&quot;Array.prototype.every callback must be a function\&quot;);\n&quot; \
+    &quot;    \n&quot; \
+    &quot;    var thisArg = arguments.length &gt; 1 ? arguments[1] : undefined;\n&quot; \
+    &quot;    \n&quot; \
+    &quot;    for (var i = 0; i &lt; length; i++) {\n&quot; \
+    &quot;        if (!(i in array))\n&quot; \
+    &quot;            continue;\n&quot; \
+    &quot;        if (!callback.@call(thisArg, array[i], i, array))\n&quot; \
+    &quot;            return false;\n&quot; \
+    &quot;    }\n&quot; \
+    &quot;    \n&quot; \
+    &quot;    return true;\n&quot; \
+    &quot;})\n&quot; \
+;
+
+const JSC::ConstructAbility s_builtinPrototypeForEachCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const int s_builtinPrototypeForEachCodeLength = 694;
+const char* s_builtinPrototypeForEachCode =
+    &quot;(function (callback )\n&quot; \
+    &quot;{\n&quot; \
+    &quot;    \&quot;use strict\&quot;;\n&quot; \
+    &quot;\n&quot; \
+    &quot;    if (this === null)\n&quot; \
+    &quot;        throw new @TypeError(\&quot;Array.prototype.forEach requires that |this| not be null\&quot;);\n&quot; \
+    &quot;    \n&quot; \
+    &quot;    if (this === undefined)\n&quot; \
+    &quot;        throw new @TypeError(\&quot;Array.prototype.forEach requires that |this| not be undefined\&quot;);\n&quot; \
+    &quot;    \n&quot; \
+    &quot;    var array = @Object(this);\n&quot; \
+    &quot;    var length = @toLength(array.length);\n&quot; \
+    &quot;\n&quot; \
+    &quot;    if (typeof callback !== \&quot;function\&quot;)\n&quot; \
+    &quot;        throw new @TypeError(\&quot;Array.prototype.forEach callback must be a function\&quot;);\n&quot; \
+    &quot;    \n&quot; \
+    &quot;    var thisArg = arguments.length &gt; 1 ? arguments[1] : undefined;\n&quot; \
+    &quot;    \n&quot; \
+    &quot;    for (var i = 0; i &lt; length; i++) {\n&quot; \
+    &quot;        if (i in array)\n&quot; \
+    &quot;            callback.@call(thisArg, array[i], i, array);\n&quot; \
+    &quot;    }\n&quot; \
+    &quot;})\n&quot; \
+;
+
+
+#define DEFINE_BUILTIN_GENERATOR(codeName, functionName, argumentCount) \
+JSC::FunctionExecutable* codeName##Generator(JSC::VM&amp; vm) \
+{\
+    return vm.builtinExecutables()-&gt;codeName##Executable()-&gt;link(vm, vm.builtinExecutables()-&gt;codeName##Source()); }
+JSC_FOREACH_BUILTIN_CODE(DEFINE_BUILTIN_GENERATOR)
+#undef DEFINE_BUILTIN_GENERATOR
+
+
+} // namespace JSC
+### End File: JSCBuiltins.cpp
</ins></span></pre></div>
<a id="trunkSourceJavaScriptCoreScriptstestsbuiltinsexpectedJavaScriptCoreBuiltinprototypeSeparatejsresult"></a>
<div class="addfile"><h4>Added: trunk/Source/JavaScriptCore/Scripts/tests/builtins/expected/JavaScriptCore-Builtin.prototype-Separate.js-result (0 => 191433)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/Scripts/tests/builtins/expected/JavaScriptCore-Builtin.prototype-Separate.js-result                                (rev 0)
+++ trunk/Source/JavaScriptCore/Scripts/tests/builtins/expected/JavaScriptCore-Builtin.prototype-Separate.js-result        2015-10-22 04:39:01 UTC (rev 191433)
</span><span class="lines">@@ -0,0 +1,191 @@
</span><ins>+### Begin File: BuiltinPrototypeBuiltins.h
+/*
+ * Copyright (c) 2014, 2015 Apple Inc. All rights reserved.
+ * Copyright (c) 2015 Yusuke Suzuki &lt;utatane.tea@gmail.com&gt;.
+ * 
+ * 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. AND ITS CONTRIBUTORS ``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 ITS 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.
+ * 
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from JavaScript files for
+// builtins by the script: Source/JavaScriptCore/Scripts/generate-js-builtins.py
+
+#ifndef BuiltinPrototypeBuiltins_h
+#define BuiltinPrototypeBuiltins_h
+
+
+
+namespace JSC {
+class FunctionExecutable;
+}
+
+namespace JSC {
+
+/* Builtin.prototype */
+extern const char* s_builtinPrototypeEveryCode;
+extern const int s_builtinPrototypeEveryCodeLength;
+extern const JSC::ConstructAbility s_builtinPrototypeEveryCodeConstructAbility;
+extern const char* s_builtinPrototypeForEachCode;
+extern const int s_builtinPrototypeForEachCodeLength;
+extern const JSC::ConstructAbility s_builtinPrototypeForEachCodeConstructAbility;
+
+#define JSC_FOREACH_BUILTIN_PROTOTYPE_BUILTIN_DATA(macro) \
+    macro(every, builtinPrototypeEvery, 1) \
+    macro(forEach, builtinPrototypeForEach, 1) \
+
+#define JSC_BUILTIN_BUILTIN_PROTOTYPE_EVERY 1
+#define JSC_BUILTIN_BUILTIN_PROTOTYPE_FOREACH 1
+
+#define JSC_FOREACH_BUILTIN.PROTOTYPE_BUILTIN_CODE(macro) \
+    macro(builtinPrototypeEveryCode, every, s_builtinPrototypeEveryCodeLength) \
+    macro(builtinPrototypeForEachCode, forEach, s_builtinPrototypeForEachCodeLength) \
+
+#define JSC_FOREACH_BUILTIN.PROTOTYPE_BUILTIN_FUNCTION_NAME(macro) \
+    macro(every) \
+    macro(forEach) \
+
+#define DECLARE_BUILTIN_GENERATOR(codeName, functionName, argumentCount) \
+    JSC::FunctionExecutable* codeName##Generator(JSC::VM&amp;);
+
+JSC_FOREACH_BUILTIN.PROTOTYPE_BUILTIN_CODE(DECLARE_BUILTIN_GENERATOR)
+#undef DECLARE_BUILTIN_GENERATOR
+
+#define JSC_BUILTIN_BUILTIN.PROTOTYPE_EXISTS(object, func) defined JSC_BUILTIN_ ## object ## _ ## func
+
+} // namespace JSC
+
+#endif // BuiltinPrototypeBuiltins_h
+
+### End File: BuiltinPrototypeBuiltins.h
+
+### Begin File: BuiltinPrototypeBuiltins.cpp
+/*
+ * Copyright (c) 2014, 2015 Apple Inc. All rights reserved.
+ * Copyright (c) 2015 Yusuke Suzuki &lt;utatane.tea@gmail.com&gt;.
+ * 
+ * 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. AND ITS CONTRIBUTORS ``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 ITS 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.
+ * 
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from JavaScript files for
+// builtins by the script: Source/JavaScriptCore/Scripts/generate-js-builtins.py
+
+#include &quot;config.h&quot;
+#include &quot;BuiltinPrototypeBuiltins.h&quot;
+
+#include &quot;BuiltinExecutables.h&quot;
+#include &quot;Executable.h&quot;
+#include &quot;JSCellInlines.h&quot;
+#include &quot;VM.h&quot;
+
+namespace JSC {
+
+const JSC::ConstructAbility s_builtinPrototypeEveryCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const int s_builtinPrototypeEveryCodeLength = 762;
+const char* s_builtinPrototypeEveryCode =
+    &quot;(function (callback )\n&quot; \
+    &quot;{\n&quot; \
+    &quot;    \&quot;use strict\&quot;;\n&quot; \
+    &quot;\n&quot; \
+    &quot;    if (this === null)\n&quot; \
+    &quot;        throw new @TypeError(\&quot;Array.prototype.every requires that |this| not be null\&quot;);\n&quot; \
+    &quot;    \n&quot; \
+    &quot;    if (this === undefined)\n&quot; \
+    &quot;        throw new @TypeError(\&quot;Array.prototype.every requires that |this| not be undefined\&quot;);\n&quot; \
+    &quot;    \n&quot; \
+    &quot;    var array = @Object(this);\n&quot; \
+    &quot;    var length = @toLength(array.length);\n&quot; \
+    &quot;\n&quot; \
+    &quot;    if (typeof callback !== \&quot;function\&quot;)\n&quot; \
+    &quot;        throw new @TypeError(\&quot;Array.prototype.every callback must be a function\&quot;);\n&quot; \
+    &quot;    \n&quot; \
+    &quot;    var thisArg = arguments.length &gt; 1 ? arguments[1] : undefined;\n&quot; \
+    &quot;    \n&quot; \
+    &quot;    for (var i = 0; i &lt; length; i++) {\n&quot; \
+    &quot;        if (!(i in array))\n&quot; \
+    &quot;            continue;\n&quot; \
+    &quot;        if (!callback.@call(thisArg, array[i], i, array))\n&quot; \
+    &quot;            return false;\n&quot; \
+    &quot;    }\n&quot; \
+    &quot;    \n&quot; \
+    &quot;    return true;\n&quot; \
+    &quot;})\n&quot; \
+;
+
+const JSC::ConstructAbility s_builtinPrototypeForEachCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const int s_builtinPrototypeForEachCodeLength = 694;
+const char* s_builtinPrototypeForEachCode =
+    &quot;(function (callback )\n&quot; \
+    &quot;{\n&quot; \
+    &quot;    \&quot;use strict\&quot;;\n&quot; \
+    &quot;\n&quot; \
+    &quot;    if (this === null)\n&quot; \
+    &quot;        throw new @TypeError(\&quot;Array.prototype.forEach requires that |this| not be null\&quot;);\n&quot; \
+    &quot;    \n&quot; \
+    &quot;    if (this === undefined)\n&quot; \
+    &quot;        throw new @TypeError(\&quot;Array.prototype.forEach requires that |this| not be undefined\&quot;);\n&quot; \
+    &quot;    \n&quot; \
+    &quot;    var array = @Object(this);\n&quot; \
+    &quot;    var length = @toLength(array.length);\n&quot; \
+    &quot;\n&quot; \
+    &quot;    if (typeof callback !== \&quot;function\&quot;)\n&quot; \
+    &quot;        throw new @TypeError(\&quot;Array.prototype.forEach callback must be a function\&quot;);\n&quot; \
+    &quot;    \n&quot; \
+    &quot;    var thisArg = arguments.length &gt; 1 ? arguments[1] : undefined;\n&quot; \
+    &quot;    \n&quot; \
+    &quot;    for (var i = 0; i &lt; length; i++) {\n&quot; \
+    &quot;        if (i in array)\n&quot; \
+    &quot;            callback.@call(thisArg, array[i], i, array);\n&quot; \
+    &quot;    }\n&quot; \
+    &quot;})\n&quot; \
+;
+
+
+#define DEFINE_BUILTIN_GENERATOR(codeName, functionName, argumentCount) \
+JSC::FunctionExecutable* codeName##Generator(JSC::VM&amp; vm) \
+{\
+    return vm.builtinExecutables()-&gt;codeName##Executable()-&gt;link(vm, vm.builtinExecutables()-&gt;codeName##Source()); }
+JSC_FOREACH_BUILTIN.PROTOTYPE_BUILTIN_CODE(DEFINE_BUILTIN_GENERATOR)
+#undef DEFINE_BUILTIN_GENERATOR
+
+
+} // namespace JSC
+### End File: BuiltinPrototypeBuiltins.cpp
</ins></span></pre></div>
<a id="trunkSourceJavaScriptCoreScriptstestsbuiltinsexpectedJavaScriptCoreBuiltinConstructorCombinedjsresult"></a>
<div class="addfile"><h4>Added: trunk/Source/JavaScriptCore/Scripts/tests/builtins/expected/JavaScriptCore-BuiltinConstructor-Combined.js-result (0 => 191433)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/Scripts/tests/builtins/expected/JavaScriptCore-BuiltinConstructor-Combined.js-result                                (rev 0)
+++ trunk/Source/JavaScriptCore/Scripts/tests/builtins/expected/JavaScriptCore-BuiltinConstructor-Combined.js-result        2015-10-22 04:39:01 UTC (rev 191433)
</span><span class="lines">@@ -0,0 +1,224 @@
</span><ins>+### Begin File: JSCBuiltins.h
+/*
+ * Copyright (c) 2015 Apple Inc. All rights reserved.
+ * 
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``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 ITS 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.
+ * 
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from JavaScript files for
+// builtins by the script: Source/JavaScriptCore/Scripts/generate-js-builtins.py
+
+#ifndef JSCBuiltins_h
+#define JSCBuiltins_h
+
+namespace JSC {
+class FunctionExecutable;
+class VM;
+
+enum class ConstructAbility : unsigned;
+}
+
+namespace JSC {
+
+/* BuiltinConstructor */
+extern const char* s_builtinConstructorOfCode;
+extern const int s_builtinConstructorOfCodeLength;
+extern const JSC::ConstructAbility s_builtinConstructorOfCodeConstructAbility;
+extern const char* s_builtinConstructorFromCode;
+extern const int s_builtinConstructorFromCodeLength;
+extern const JSC::ConstructAbility s_builtinConstructorFromCodeConstructAbility;
+
+#define JSC_FOREACH_BUILTINCONSTRUCTOR_BUILTIN_DATA(macro) \
+    macro(of, builtinConstructorOf, 0) \
+    macro(from, builtinConstructorFrom, 1) \
+
+#define JSC_BUILTIN_BUILTINCONSTRUCTOR_OF 1
+#define JSC_BUILTIN_BUILTINCONSTRUCTOR_FROM 1
+
+#define JSC_FOREACH_BUILTIN_CODE(macro) \
+    macro(builtinConstructorOfCode, of, s_builtinConstructorOfCodeLength) \
+    macro(builtinConstructorFromCode, from, s_builtinConstructorFromCodeLength) \
+
+#define JSC_FOREACH_BUILTIN_FUNCTION_NAME(macro) \
+    macro(from) \
+    macro(of) \
+
+#define DECLARE_BUILTIN_GENERATOR(codeName, functionName, argumentCount) \
+    JSC::FunctionExecutable* codeName##Generator(JSC::VM&amp;);
+
+JSC_FOREACH_BUILTIN_CODE(DECLARE_BUILTIN_GENERATOR)
+#undef DECLARE_BUILTIN_GENERATOR
+
+#define JSC_BUILTIN_EXISTS(object, func) defined JSC_BUILTIN_ ## object ## _ ## func
+
+} // namespace JSC
+
+#endif // JSCBuiltins_h
+
+### End File: JSCBuiltins.h
+
+### Begin File: JSCBuiltins.cpp
+/*
+ * Copyright (c) 2015 Apple Inc. All rights reserved.
+ * 
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``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 ITS 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.
+ * 
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from JavaScript files for
+// builtins by the script: Source/JavaScriptCore/Scripts/generate-js-builtins.py
+
+#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 {
+
+const JSC::ConstructAbility s_builtinConstructorOfCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const int s_builtinConstructorOfCodeLength = 294;
+const char* s_builtinConstructorOfCode =
+    &quot;(function ()\n&quot; \
+    &quot;{\n&quot; \
+    &quot;    \&quot;use strict\&quot;;\n&quot; \
+    &quot;\n&quot; \
+    &quot;    var length = arguments.length;\n&quot; \
+    &quot;    //\n&quot; \
+    &quot;    var array = typeof this === 'function' ? new this(length) : new @Array(length);\n&quot; \
+    &quot;    for (var k = 0; k &lt; length; ++k)\n&quot; \
+    &quot;        @putByValDirect(array, k, arguments[k]);\n&quot; \
+    &quot;    array.length = length;\n&quot; \
+    &quot;    return array;\n&quot; \
+    &quot;})\n&quot; \
+;
+
+const JSC::ConstructAbility s_builtinConstructorFromCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const int s_builtinConstructorFromCodeLength = 2046;
+const char* s_builtinConstructorFromCode =
+    &quot;(function (items )\n&quot; \
+    &quot;{\n&quot; \
+    &quot;    \&quot;use strict\&quot;;\n&quot; \
+    &quot;\n&quot; \
+    &quot;    var thisObj = this;\n&quot; \
+    &quot;\n&quot; \
+    &quot;    var mapFn = arguments.length &gt; 1 ? arguments[1] : undefined;\n&quot; \
+    &quot;\n&quot; \
+    &quot;    var thisArg;\n&quot; \
+    &quot;\n&quot; \
+    &quot;    if (mapFn !== undefined) {\n&quot; \
+    &quot;        if (typeof mapFn !== \&quot;function\&quot;)\n&quot; \
+    &quot;            throw new @TypeError(\&quot;Array.from requires that the second argument, when provided, be a function\&quot;);\n&quot; \
+    &quot;\n&quot; \
+    &quot;        if (arguments.length &gt; 2)\n&quot; \
+    &quot;            thisArg = arguments[2];\n&quot; \
+    &quot;    }\n&quot; \
+    &quot;\n&quot; \
+    &quot;    if (items == null)\n&quot; \
+    &quot;        throw new @TypeError(\&quot;Array.from requires an array-like object - not null or undefined\&quot;);\n&quot; \
+    &quot;\n&quot; \
+    &quot;    var iteratorMethod = items[@symbolIterator];\n&quot; \
+    &quot;    if (iteratorMethod != null) {\n&quot; \
+    &quot;        if (typeof iteratorMethod !== \&quot;function\&quot;)\n&quot; \
+    &quot;            throw new @TypeError(\&quot;Array.from requires that the property of the first argument, items[Symbol.iterator], when exists, be a function\&quot;);\n&quot; \
+    &quot;\n&quot; \
+    &quot;        //\n&quot; \
+    &quot;        var result = (typeof thisObj === \&quot;function\&quot;) ? @Object(new thisObj()) : [];\n&quot; \
+    &quot;\n&quot; \
+    &quot;        var k = 0;\n&quot; \
+    &quot;        var iterator = iteratorMethod.@call(items);\n&quot; \
+    &quot;\n&quot; \
+    &quot;        //\n&quot; \
+    &quot;        //\n&quot; \
+    &quot;        //\n&quot; \
+    &quot;        var wrapper = {\n&quot; \
+    &quot;            [@symbolIterator]() {\n&quot; \
+    &quot;                return iterator;\n&quot; \
+    &quot;            }\n&quot; \
+    &quot;        };\n&quot; \
+    &quot;\n&quot; \
+    &quot;        for (var value of wrapper) {\n&quot; \
+    &quot;            if (mapFn)\n&quot; \
+    &quot;                @putByValDirect(result, k, thisArg === undefined ? mapFn(value, k) : mapFn.@call(thisArg, value, k));\n&quot; \
+    &quot;            else\n&quot; \
+    &quot;                @putByValDirect(result, k, value);\n&quot; \
+    &quot;            k += 1;\n&quot; \
+    &quot;        }\n&quot; \
+    &quot;\n&quot; \
+    &quot;        result.length = k;\n&quot; \
+    &quot;        return result;\n&quot; \
+    &quot;    }\n&quot; \
+    &quot;\n&quot; \
+    &quot;    var arrayLike = @Object(items);\n&quot; \
+    &quot;    var arrayLikeLength = @toLength(arrayLike.length);\n&quot; \
+    &quot;\n&quot; \
+    &quot;    //\n&quot; \
+    &quot;    var result = (typeof thisObj === \&quot;function\&quot;) ? @Object(new thisObj(arrayLikeLength)) : new @Array(arrayLikeLength);\n&quot; \
+    &quot;\n&quot; \
+    &quot;    var k = 0;\n&quot; \
+    &quot;    while (k &lt; arrayLikeLength) {\n&quot; \
+    &quot;        var value = arrayLike[k];\n&quot; \
+    &quot;        if (mapFn)\n&quot; \
+    &quot;            @putByValDirect(result, k, thisArg === undefined ? mapFn(value, k) : mapFn.@call(thisArg, value, k));\n&quot; \
+    &quot;        else\n&quot; \
+    &quot;            @putByValDirect(result, k, value);\n&quot; \
+    &quot;        k += 1;\n&quot; \
+    &quot;    }\n&quot; \
+    &quot;\n&quot; \
+    &quot;    result.length = arrayLikeLength;\n&quot; \
+    &quot;    return result;\n&quot; \
+    &quot;})\n&quot; \
+;
+
+
+#define DEFINE_BUILTIN_GENERATOR(codeName, functionName, argumentCount) \
+JSC::FunctionExecutable* codeName##Generator(JSC::VM&amp; vm) \
+{\
+    return vm.builtinExecutables()-&gt;codeName##Executable()-&gt;link(vm, vm.builtinExecutables()-&gt;codeName##Source()); }
+JSC_FOREACH_BUILTIN_CODE(DEFINE_BUILTIN_GENERATOR)
+#undef DEFINE_BUILTIN_GENERATOR
+
+
+} // namespace JSC
+### End File: JSCBuiltins.cpp
</ins></span></pre></div>
<a id="trunkSourceJavaScriptCoreScriptstestsbuiltinsexpectedJavaScriptCoreBuiltinConstructorSeparatejsresult"></a>
<div class="addfile"><h4>Added: trunk/Source/JavaScriptCore/Scripts/tests/builtins/expected/JavaScriptCore-BuiltinConstructor-Separate.js-result (0 => 191433)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/Scripts/tests/builtins/expected/JavaScriptCore-BuiltinConstructor-Separate.js-result                                (rev 0)
+++ trunk/Source/JavaScriptCore/Scripts/tests/builtins/expected/JavaScriptCore-BuiltinConstructor-Separate.js-result        2015-10-22 04:39:01 UTC (rev 191433)
</span><span class="lines">@@ -0,0 +1,223 @@
</span><ins>+### Begin File: BuiltinConstructorBuiltins.h
+/*
+ * Copyright (c) 2015 Apple Inc. All rights reserved.
+ * 
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``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 ITS 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.
+ * 
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from JavaScript files for
+// builtins by the script: Source/JavaScriptCore/Scripts/generate-js-builtins.py
+
+#ifndef BuiltinConstructorBuiltins_h
+#define BuiltinConstructorBuiltins_h
+
+
+
+namespace JSC {
+class FunctionExecutable;
+}
+
+namespace JSC {
+
+/* BuiltinConstructor */
+extern const char* s_builtinConstructorOfCode;
+extern const int s_builtinConstructorOfCodeLength;
+extern const JSC::ConstructAbility s_builtinConstructorOfCodeConstructAbility;
+extern const char* s_builtinConstructorFromCode;
+extern const int s_builtinConstructorFromCodeLength;
+extern const JSC::ConstructAbility s_builtinConstructorFromCodeConstructAbility;
+
+#define JSC_FOREACH_BUILTINCONSTRUCTOR_BUILTIN_DATA(macro) \
+    macro(of, builtinConstructorOf, 0) \
+    macro(from, builtinConstructorFrom, 1) \
+
+#define JSC_BUILTIN_BUILTINCONSTRUCTOR_OF 1
+#define JSC_BUILTIN_BUILTINCONSTRUCTOR_FROM 1
+
+#define JSC_FOREACH_BUILTINCONSTRUCTOR_BUILTIN_CODE(macro) \
+    macro(builtinConstructorOfCode, of, s_builtinConstructorOfCodeLength) \
+    macro(builtinConstructorFromCode, from, s_builtinConstructorFromCodeLength) \
+
+#define JSC_FOREACH_BUILTINCONSTRUCTOR_BUILTIN_FUNCTION_NAME(macro) \
+    macro(from) \
+    macro(of) \
+
+#define DECLARE_BUILTIN_GENERATOR(codeName, functionName, argumentCount) \
+    JSC::FunctionExecutable* codeName##Generator(JSC::VM&amp;);
+
+JSC_FOREACH_BUILTINCONSTRUCTOR_BUILTIN_CODE(DECLARE_BUILTIN_GENERATOR)
+#undef DECLARE_BUILTIN_GENERATOR
+
+#define JSC_BUILTIN_BUILTINCONSTRUCTOR_EXISTS(object, func) defined JSC_BUILTIN_ ## object ## _ ## func
+
+} // namespace JSC
+
+#endif // BuiltinConstructorBuiltins_h
+
+### End File: BuiltinConstructorBuiltins.h
+
+### Begin File: BuiltinConstructorBuiltins.cpp
+/*
+ * Copyright (c) 2015 Apple Inc. All rights reserved.
+ * 
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``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 ITS 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.
+ * 
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from JavaScript files for
+// builtins by the script: Source/JavaScriptCore/Scripts/generate-js-builtins.py
+
+#include &quot;config.h&quot;
+#include &quot;BuiltinConstructorBuiltins.h&quot;
+
+#include &quot;BuiltinExecutables.h&quot;
+#include &quot;Executable.h&quot;
+#include &quot;JSCellInlines.h&quot;
+#include &quot;VM.h&quot;
+
+namespace JSC {
+
+const JSC::ConstructAbility s_builtinConstructorOfCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const int s_builtinConstructorOfCodeLength = 294;
+const char* s_builtinConstructorOfCode =
+    &quot;(function ()\n&quot; \
+    &quot;{\n&quot; \
+    &quot;    \&quot;use strict\&quot;;\n&quot; \
+    &quot;\n&quot; \
+    &quot;    var length = arguments.length;\n&quot; \
+    &quot;    //\n&quot; \
+    &quot;    var array = typeof this === 'function' ? new this(length) : new @Array(length);\n&quot; \
+    &quot;    for (var k = 0; k &lt; length; ++k)\n&quot; \
+    &quot;        @putByValDirect(array, k, arguments[k]);\n&quot; \
+    &quot;    array.length = length;\n&quot; \
+    &quot;    return array;\n&quot; \
+    &quot;})\n&quot; \
+;
+
+const JSC::ConstructAbility s_builtinConstructorFromCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const int s_builtinConstructorFromCodeLength = 2046;
+const char* s_builtinConstructorFromCode =
+    &quot;(function (items )\n&quot; \
+    &quot;{\n&quot; \
+    &quot;    \&quot;use strict\&quot;;\n&quot; \
+    &quot;\n&quot; \
+    &quot;    var thisObj = this;\n&quot; \
+    &quot;\n&quot; \
+    &quot;    var mapFn = arguments.length &gt; 1 ? arguments[1] : undefined;\n&quot; \
+    &quot;\n&quot; \
+    &quot;    var thisArg;\n&quot; \
+    &quot;\n&quot; \
+    &quot;    if (mapFn !== undefined) {\n&quot; \
+    &quot;        if (typeof mapFn !== \&quot;function\&quot;)\n&quot; \
+    &quot;            throw new @TypeError(\&quot;Array.from requires that the second argument, when provided, be a function\&quot;);\n&quot; \
+    &quot;\n&quot; \
+    &quot;        if (arguments.length &gt; 2)\n&quot; \
+    &quot;            thisArg = arguments[2];\n&quot; \
+    &quot;    }\n&quot; \
+    &quot;\n&quot; \
+    &quot;    if (items == null)\n&quot; \
+    &quot;        throw new @TypeError(\&quot;Array.from requires an array-like object - not null or undefined\&quot;);\n&quot; \
+    &quot;\n&quot; \
+    &quot;    var iteratorMethod = items[@symbolIterator];\n&quot; \
+    &quot;    if (iteratorMethod != null) {\n&quot; \
+    &quot;        if (typeof iteratorMethod !== \&quot;function\&quot;)\n&quot; \
+    &quot;            throw new @TypeError(\&quot;Array.from requires that the property of the first argument, items[Symbol.iterator], when exists, be a function\&quot;);\n&quot; \
+    &quot;\n&quot; \
+    &quot;        //\n&quot; \
+    &quot;        var result = (typeof thisObj === \&quot;function\&quot;) ? @Object(new thisObj()) : [];\n&quot; \
+    &quot;\n&quot; \
+    &quot;        var k = 0;\n&quot; \
+    &quot;        var iterator = iteratorMethod.@call(items);\n&quot; \
+    &quot;\n&quot; \
+    &quot;        //\n&quot; \
+    &quot;        //\n&quot; \
+    &quot;        //\n&quot; \
+    &quot;        var wrapper = {\n&quot; \
+    &quot;            [@symbolIterator]() {\n&quot; \
+    &quot;                return iterator;\n&quot; \
+    &quot;            }\n&quot; \
+    &quot;        };\n&quot; \
+    &quot;\n&quot; \
+    &quot;        for (var value of wrapper) {\n&quot; \
+    &quot;            if (mapFn)\n&quot; \
+    &quot;                @putByValDirect(result, k, thisArg === undefined ? mapFn(value, k) : mapFn.@call(thisArg, value, k));\n&quot; \
+    &quot;            else\n&quot; \
+    &quot;                @putByValDirect(result, k, value);\n&quot; \
+    &quot;            k += 1;\n&quot; \
+    &quot;        }\n&quot; \
+    &quot;\n&quot; \
+    &quot;        result.length = k;\n&quot; \
+    &quot;        return result;\n&quot; \
+    &quot;    }\n&quot; \
+    &quot;\n&quot; \
+    &quot;    var arrayLike = @Object(items);\n&quot; \
+    &quot;    var arrayLikeLength = @toLength(arrayLike.length);\n&quot; \
+    &quot;\n&quot; \
+    &quot;    //\n&quot; \
+    &quot;    var result = (typeof thisObj === \&quot;function\&quot;) ? @Object(new thisObj(arrayLikeLength)) : new @Array(arrayLikeLength);\n&quot; \
+    &quot;\n&quot; \
+    &quot;    var k = 0;\n&quot; \
+    &quot;    while (k &lt; arrayLikeLength) {\n&quot; \
+    &quot;        var value = arrayLike[k];\n&quot; \
+    &quot;        if (mapFn)\n&quot; \
+    &quot;            @putByValDirect(result, k, thisArg === undefined ? mapFn(value, k) : mapFn.@call(thisArg, value, k));\n&quot; \
+    &quot;        else\n&quot; \
+    &quot;            @putByValDirect(result, k, value);\n&quot; \
+    &quot;        k += 1;\n&quot; \
+    &quot;    }\n&quot; \
+    &quot;\n&quot; \
+    &quot;    result.length = arrayLikeLength;\n&quot; \
+    &quot;    return result;\n&quot; \
+    &quot;})\n&quot; \
+;
+
+
+#define DEFINE_BUILTIN_GENERATOR(codeName, functionName, argumentCount) \
+JSC::FunctionExecutable* codeName##Generator(JSC::VM&amp; vm) \
+{\
+    return vm.builtinExecutables()-&gt;codeName##Executable()-&gt;link(vm, vm.builtinExecutables()-&gt;codeName##Source()); }
+JSC_FOREACH_BUILTINCONSTRUCTOR_BUILTIN_CODE(DEFINE_BUILTIN_GENERATOR)
+#undef DEFINE_BUILTIN_GENERATOR
+
+
+} // namespace JSC
+### End File: BuiltinConstructorBuiltins.cpp
</ins></span></pre></div>
<a id="trunkSourceJavaScriptCoreScriptstestsbuiltinsexpectedJavaScriptCoreOperationsPromiseCombinedjsresult"></a>
<div class="addfile"><h4>Added: trunk/Source/JavaScriptCore/Scripts/tests/builtins/expected/JavaScriptCore-Operations.Promise-Combined.js-result (0 => 191433)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/Scripts/tests/builtins/expected/JavaScriptCore-Operations.Promise-Combined.js-result                                (rev 0)
+++ trunk/Source/JavaScriptCore/Scripts/tests/builtins/expected/JavaScriptCore-Operations.Promise-Combined.js-result        2015-10-22 04:39:01 UTC (rev 191433)
</span><span class="lines">@@ -0,0 +1,415 @@
</span><ins>+### Begin File: JSCBuiltins.h
+/*
+ * Copyright (c) 2015 Yusuke Suzuki &lt;utatane.tea@gmail.com&gt;.
+ * 
+ * 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. AND ITS CONTRIBUTORS ``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 ITS 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.
+ * 
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from JavaScript files for
+// builtins by the script: Source/JavaScriptCore/Scripts/generate-js-builtins.py
+
+#ifndef JSCBuiltins_h
+#define JSCBuiltins_h
+
+namespace JSC {
+class FunctionExecutable;
+class VM;
+
+enum class ConstructAbility : unsigned;
+}
+
+namespace JSC {
+
+/* Operations.Promise */
+extern const char* s_operationsPromiseIsPromiseCode;
+extern const int s_operationsPromiseIsPromiseCodeLength;
+extern const JSC::ConstructAbility s_operationsPromiseIsPromiseCodeConstructAbility;
+extern const char* s_operationsPromiseNewPromiseReactionCode;
+extern const int s_operationsPromiseNewPromiseReactionCodeLength;
+extern const JSC::ConstructAbility s_operationsPromiseNewPromiseReactionCodeConstructAbility;
+extern const char* s_operationsPromiseNewPromiseCapabilityCode;
+extern const int s_operationsPromiseNewPromiseCapabilityCodeLength;
+extern const JSC::ConstructAbility s_operationsPromiseNewPromiseCapabilityCodeConstructAbility;
+extern const char* s_operationsPromiseTriggerPromiseReactionsCode;
+extern const int s_operationsPromiseTriggerPromiseReactionsCodeLength;
+extern const JSC::ConstructAbility s_operationsPromiseTriggerPromiseReactionsCodeConstructAbility;
+extern const char* s_operationsPromiseRejectPromiseCode;
+extern const int s_operationsPromiseRejectPromiseCodeLength;
+extern const JSC::ConstructAbility s_operationsPromiseRejectPromiseCodeConstructAbility;
+extern const char* s_operationsPromiseFulfillPromiseCode;
+extern const int s_operationsPromiseFulfillPromiseCodeLength;
+extern const JSC::ConstructAbility s_operationsPromiseFulfillPromiseCodeConstructAbility;
+extern const char* s_operationsPromiseCreateResolvingFunctionsCode;
+extern const int s_operationsPromiseCreateResolvingFunctionsCodeLength;
+extern const JSC::ConstructAbility s_operationsPromiseCreateResolvingFunctionsCodeConstructAbility;
+extern const char* s_operationsPromisePromiseReactionJobCode;
+extern const int s_operationsPromisePromiseReactionJobCodeLength;
+extern const JSC::ConstructAbility s_operationsPromisePromiseReactionJobCodeConstructAbility;
+extern const char* s_operationsPromisePromiseResolveThenableJobCode;
+extern const int s_operationsPromisePromiseResolveThenableJobCodeLength;
+extern const JSC::ConstructAbility s_operationsPromisePromiseResolveThenableJobCodeConstructAbility;
+extern const char* s_operationsPromiseInitializePromiseCode;
+extern const int s_operationsPromiseInitializePromiseCodeLength;
+extern const JSC::ConstructAbility s_operationsPromiseInitializePromiseCodeConstructAbility;
+
+#define JSC_FOREACH_OPERATIONSPROMISE_BUILTIN_DATA(macro) \
+    macro(isPromise, operationsPromiseIsPromise, 1) \
+    macro(newPromiseReaction, operationsPromiseNewPromiseReaction, 2) \
+    macro(newPromiseCapability, operationsPromiseNewPromiseCapability, 1) \
+    macro(triggerPromiseReactions, operationsPromiseTriggerPromiseReactions, 2) \
+    macro(rejectPromise, operationsPromiseRejectPromise, 2) \
+    macro(fulfillPromise, operationsPromiseFulfillPromise, 2) \
+    macro(createResolvingFunctions, operationsPromiseCreateResolvingFunctions, 1) \
+    macro(promiseReactionJob, operationsPromisePromiseReactionJob, 2) \
+    macro(promiseResolveThenableJob, operationsPromisePromiseResolveThenableJob, 3) \
+    macro(initializePromise, operationsPromiseInitializePromise, 1) \
+
+#define JSC_BUILTIN_OPERATIONSPROMISE_ISPROMISE 1
+#define JSC_BUILTIN_OPERATIONSPROMISE_NEWPROMISEREACTION 1
+#define JSC_BUILTIN_OPERATIONSPROMISE_NEWPROMISECAPABILITY 1
+#define JSC_BUILTIN_OPERATIONSPROMISE_TRIGGERPROMISEREACTIONS 1
+#define JSC_BUILTIN_OPERATIONSPROMISE_REJECTPROMISE 1
+#define JSC_BUILTIN_OPERATIONSPROMISE_FULFILLPROMISE 1
+#define JSC_BUILTIN_OPERATIONSPROMISE_CREATERESOLVINGFUNCTIONS 1
+#define JSC_BUILTIN_OPERATIONSPROMISE_PROMISEREACTIONJOB 1
+#define JSC_BUILTIN_OPERATIONSPROMISE_PROMISERESOLVETHENABLEJOB 1
+#define JSC_BUILTIN_OPERATIONSPROMISE_INITIALIZEPROMISE 1
+
+#define JSC_FOREACH_BUILTIN_CODE(macro) \
+    macro(operationsPromiseIsPromiseCode, isPromise, s_operationsPromiseIsPromiseCodeLength) \
+    macro(operationsPromiseNewPromiseReactionCode, newPromiseReaction, s_operationsPromiseNewPromiseReactionCodeLength) \
+    macro(operationsPromiseNewPromiseCapabilityCode, newPromiseCapability, s_operationsPromiseNewPromiseCapabilityCodeLength) \
+    macro(operationsPromiseTriggerPromiseReactionsCode, triggerPromiseReactions, s_operationsPromiseTriggerPromiseReactionsCodeLength) \
+    macro(operationsPromiseRejectPromiseCode, rejectPromise, s_operationsPromiseRejectPromiseCodeLength) \
+    macro(operationsPromiseFulfillPromiseCode, fulfillPromise, s_operationsPromiseFulfillPromiseCodeLength) \
+    macro(operationsPromiseCreateResolvingFunctionsCode, createResolvingFunctions, s_operationsPromiseCreateResolvingFunctionsCodeLength) \
+    macro(operationsPromisePromiseReactionJobCode, promiseReactionJob, s_operationsPromisePromiseReactionJobCodeLength) \
+    macro(operationsPromisePromiseResolveThenableJobCode, promiseResolveThenableJob, s_operationsPromisePromiseResolveThenableJobCodeLength) \
+    macro(operationsPromiseInitializePromiseCode, initializePromise, s_operationsPromiseInitializePromiseCodeLength) \
+
+#define JSC_FOREACH_BUILTIN_FUNCTION_NAME(macro) \
+    macro(createResolvingFunctions) \
+    macro(fulfillPromise) \
+    macro(initializePromise) \
+    macro(isPromise) \
+    macro(newPromiseCapability) \
+    macro(newPromiseReaction) \
+    macro(promiseReactionJob) \
+    macro(promiseResolveThenableJob) \
+    macro(rejectPromise) \
+    macro(triggerPromiseReactions) \
+
+#define DECLARE_BUILTIN_GENERATOR(codeName, functionName, argumentCount) \
+    JSC::FunctionExecutable* codeName##Generator(JSC::VM&amp;);
+
+JSC_FOREACH_BUILTIN_CODE(DECLARE_BUILTIN_GENERATOR)
+#undef DECLARE_BUILTIN_GENERATOR
+
+#define JSC_BUILTIN_EXISTS(object, func) defined JSC_BUILTIN_ ## object ## _ ## func
+
+} // namespace JSC
+
+#endif // JSCBuiltins_h
+
+### End File: JSCBuiltins.h
+
+### Begin File: JSCBuiltins.cpp
+/*
+ * Copyright (c) 2015 Yusuke Suzuki &lt;utatane.tea@gmail.com&gt;.
+ * 
+ * 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. AND ITS CONTRIBUTORS ``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 ITS 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.
+ * 
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from JavaScript files for
+// builtins by the script: Source/JavaScriptCore/Scripts/generate-js-builtins.py
+
+#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 {
+
+const JSC::ConstructAbility s_operationsPromiseIsPromiseCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const int s_operationsPromiseIsPromiseCodeLength = 158;
+const char* s_operationsPromiseIsPromiseCode =
+   &quot;(function (promise)\n&quot; \
+   &quot;{\n&quot; \
+   &quot;    \&quot;use strict\&quot;;\n&quot; \
+   &quot;\n&quot; \
+   &quot;    return @isObject(promise) &amp;&amp; !!promise.@promiseState;\n&quot; \
+   &quot;})\n&quot; \
+;
+
+const JSC::ConstructAbility s_operationsPromiseNewPromiseReactionCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const int s_operationsPromiseNewPromiseReactionCodeLength = 220;
+const char* s_operationsPromiseNewPromiseReactionCode =
+   &quot;(function (capability, handler)\n&quot; \
+   &quot;{\n&quot; \
+   &quot;    \&quot;use strict\&quot;;\n&quot; \
+   &quot;\n&quot; \
+   &quot;    return {\n&quot; \
+   &quot;        @capabilities: capability,\n&quot; \
+   &quot;        @handler: handler\n&quot; \
+   &quot;    };\n&quot; \
+   &quot;})\n&quot; \
+;
+
+const JSC::ConstructAbility s_operationsPromiseNewPromiseCapabilityCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const int s_operationsPromiseNewPromiseCapabilityCodeLength = 1427;
+const char* s_operationsPromiseNewPromiseCapabilityCode =
+   &quot;(function (constructor)\n&quot; \
+   &quot;{\n&quot; \
+   &quot;    \&quot;use strict\&quot;;\n&quot; \
+   &quot;\n&quot; \
+   &quot;    //\n&quot; \
+   &quot;    if (typeof constructor !== \&quot;function\&quot;)\n&quot; \
+   &quot;        throw new @TypeError(\&quot;promise capability requires a constructor function\&quot;);\n&quot; \
+   &quot;\n&quot; \
+   &quot;    var promiseCapability = {\n&quot; \
+   &quot;        @promise: undefined,\n&quot; \
+   &quot;        @resolve: undefined,\n&quot; \
+   &quot;        @reject: undefined\n&quot; \
+   &quot;    };\n&quot; \
+   &quot;\n&quot; \
+   &quot;    function executor(resolve, reject)\n&quot; \
+   &quot;    {\n&quot; \
+   &quot;        if (promiseCapability.@resolve !== undefined)\n&quot; \
+   &quot;            throw new @TypeError(\&quot;resolve function is already set\&quot;);\n&quot; \
+   &quot;        if (promiseCapability.@reject !== undefined)\n&quot; \
+   &quot;            throw new @TypeError(\&quot;reject function is already set\&quot;);\n&quot; \
+   &quot;\n&quot; \
+   &quot;        promiseCapability.@resolve = resolve;\n&quot; \
+   &quot;        promiseCapability.@reject = reject;\n&quot; \
+   &quot;    }\n&quot; \
+   &quot;\n&quot; \
+   &quot;    var promise = new constructor(executor);\n&quot; \
+   &quot;\n&quot; \
+   &quot;    if (typeof promiseCapability.@resolve !== \&quot;function\&quot;)\n&quot; \
+   &quot;        throw new @TypeError(\&quot;executor did not take a resolve function\&quot;);\n&quot; \
+   &quot;\n&quot; \
+   &quot;    if (typeof promiseCapability.@reject !== \&quot;function\&quot;)\n&quot; \
+   &quot;        throw new @TypeError(\&quot;executor did not take a reject function\&quot;);\n&quot; \
+   &quot;\n&quot; \
+   &quot;    promiseCapability.@promise = promise;\n&quot; \
+   &quot;\n&quot; \
+   &quot;    return promiseCapability;\n&quot; \
+   &quot;})\n&quot; \
+;
+
+const JSC::ConstructAbility s_operationsPromiseTriggerPromiseReactionsCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const int s_operationsPromiseTriggerPromiseReactionsCodeLength = 269;
+const char* s_operationsPromiseTriggerPromiseReactionsCode =
+   &quot;(function (reactions, argument)\n&quot; \
+   &quot;{\n&quot; \
+   &quot;    \&quot;use strict\&quot;;\n&quot; \
+   &quot;\n&quot; \
+   &quot;    for (var index = 0, length = reactions.length; index &lt; length; ++index)\n&quot; \
+   &quot;        @enqueueJob(@promiseReactionJob, [reactions[index], argument]);\n&quot; \
+   &quot;})\n&quot; \
+;
+
+const JSC::ConstructAbility s_operationsPromiseRejectPromiseCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const int s_operationsPromiseRejectPromiseCodeLength = 541;
+const char* s_operationsPromiseRejectPromiseCode =
+   &quot;(function (promise, reason)\n&quot; \
+   &quot;{\n&quot; \
+   &quot;    \&quot;use strict\&quot;;\n&quot; \
+   &quot;\n&quot; \
+   &quot;    var reactions = promise.@promiseRejectReactions;\n&quot; \
+   &quot;    promise.@promiseResult = reason;\n&quot; \
+   &quot;    promise.@promiseFulfillReactions = undefined;\n&quot; \
+   &quot;    promise.@promiseRejectReactions = undefined;\n&quot; \
+   &quot;    promise.@promiseState = @promiseRejected;\n&quot; \
+   &quot;\n&quot; \
+   &quot;    @InspectorInstrumentation.promiseRejected(promise, reason, reactions);\n&quot; \
+   &quot;\n&quot; \
+   &quot;    @triggerPromiseReactions(reactions, reason);\n&quot; \
+   &quot;})\n&quot; \
+;
+
+const JSC::ConstructAbility s_operationsPromiseFulfillPromiseCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const int s_operationsPromiseFulfillPromiseCodeLength = 540;
+const char* s_operationsPromiseFulfillPromiseCode =
+   &quot;(function (promise, value)\n&quot; \
+   &quot;{\n&quot; \
+   &quot;    \&quot;use strict\&quot;;\n&quot; \
+   &quot;\n&quot; \
+   &quot;    var reactions = promise.@promiseFulfillReactions;\n&quot; \
+   &quot;    promise.@promiseResult = value;\n&quot; \
+   &quot;    promise.@promiseFulfillReactions = undefined;\n&quot; \
+   &quot;    promise.@promiseRejectReactions = undefined;\n&quot; \
+   &quot;    promise.@promiseState = @promiseFulfilled;\n&quot; \
+   &quot;\n&quot; \
+   &quot;    @InspectorInstrumentation.promiseFulfilled(promise, value, reactions);\n&quot; \
+   &quot;\n&quot; \
+   &quot;    @triggerPromiseReactions(reactions, value);\n&quot; \
+   &quot;})\n&quot; \
+;
+
+const JSC::ConstructAbility s_operationsPromiseCreateResolvingFunctionsCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const int s_operationsPromiseCreateResolvingFunctionsCodeLength = 1468;
+const char* s_operationsPromiseCreateResolvingFunctionsCode =
+   &quot;(function (promise)\n&quot; \
+   &quot;{\n&quot; \
+   &quot;    \&quot;use strict\&quot;;\n&quot; \
+   &quot;\n&quot; \
+   &quot;    var alreadyResolved = false;\n&quot; \
+   &quot;\n&quot; \
+   &quot;    var resolve = function (resolution) {\n&quot; \
+   &quot;        if (alreadyResolved)\n&quot; \
+   &quot;            return undefined;\n&quot; \
+   &quot;        alreadyResolved = true;\n&quot; \
+   &quot;\n&quot; \
+   &quot;        if (resolution === promise)\n&quot; \
+   &quot;            return @rejectPromise(promise, new @TypeError(\&quot;Resolve a promise with itself\&quot;));\n&quot; \
+   &quot;\n&quot; \
+   &quot;        if (!@isObject(resolution))\n&quot; \
+   &quot;            return @fulfillPromise(promise, resolution);\n&quot; \
+   &quot;\n&quot; \
+   &quot;        var then;\n&quot; \
+   &quot;        try {\n&quot; \
+   &quot;            then = resolution.then;\n&quot; \
+   &quot;        } catch (error) {\n&quot; \
+   &quot;            return @rejectPromise(promise, error);\n&quot; \
+   &quot;        }\n&quot; \
+   &quot;\n&quot; \
+   &quot;        if (typeof then !== 'function')\n&quot; \
+   &quot;            return @fulfillPromise(promise, resolution);\n&quot; \
+   &quot;\n&quot; \
+   &quot;        @enqueueJob(@promiseResolveThenableJob, [promise, resolution, then]);\n&quot; \
+   &quot;\n&quot; \
+   &quot;        return undefined;\n&quot; \
+   &quot;    };\n&quot; \
+   &quot;\n&quot; \
+   &quot;    var reject = function (reason) {\n&quot; \
+   &quot;        if (alreadyResolved)\n&quot; \
+   &quot;            return undefined;\n&quot; \
+   &quot;        alreadyResolved = true;\n&quot; \
+   &quot;\n&quot; \
+   &quot;        return @rejectPromise(promise, reason);\n&quot; \
+   &quot;    };\n&quot; \
+   &quot;\n&quot; \
+   &quot;    return {\n&quot; \
+   &quot;        @resolve: resolve,\n&quot; \
+   &quot;        @reject: reject\n&quot; \
+   &quot;    };\n&quot; \
+   &quot;})\n&quot; \
+;
+
+const JSC::ConstructAbility s_operationsPromisePromiseReactionJobCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const int s_operationsPromisePromiseReactionJobCodeLength = 493;
+const char* s_operationsPromisePromiseReactionJobCode =
+   &quot;(function (reaction, argument)\n&quot; \
+   &quot;{\n&quot; \
+   &quot;    \&quot;use strict\&quot;;\n&quot; \
+   &quot;\n&quot; \
+   &quot;    var promiseCapability = reaction.@capabilities;\n&quot; \
+   &quot;\n&quot; \
+   &quot;    var result;\n&quot; \
+   &quot;    try {\n&quot; \
+   &quot;        result = reaction.@handler.@call(undefined, argument);\n&quot; \
+   &quot;    } catch (error) {\n&quot; \
+   &quot;        return promiseCapability.@reject.@call(undefined, error);\n&quot; \
+   &quot;    }\n&quot; \
+   &quot;\n&quot; \
+   &quot;    return promiseCapability.@resolve.@call(undefined, result);\n&quot; \
+   &quot;})\n&quot; \
+;
+
+const JSC::ConstructAbility s_operationsPromisePromiseResolveThenableJobCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const int s_operationsPromisePromiseResolveThenableJobCodeLength = 453;
+const char* s_operationsPromisePromiseResolveThenableJobCode =
+   &quot;(function (promiseToResolve, thenable, then)\n&quot; \
+   &quot;{\n&quot; \
+   &quot;    \&quot;use strict\&quot;;\n&quot; \
+   &quot;\n&quot; \
+   &quot;    var resolvingFunctions = @createResolvingFunctions(promiseToResolve);\n&quot; \
+   &quot;\n&quot; \
+   &quot;    try {\n&quot; \
+   &quot;        return then.@call(thenable, resolvingFunctions.@resolve, resolvingFunctions.@reject);\n&quot; \
+   &quot;    } catch (error) {\n&quot; \
+   &quot;        return resolvingFunctions.@reject.@call(undefined, error);\n&quot; \
+   &quot;    }\n&quot; \
+   &quot;})\n&quot; \
+;
+
+const JSC::ConstructAbility s_operationsPromiseInitializePromiseCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const int s_operationsPromiseInitializePromiseCodeLength = 731;
+const char* s_operationsPromiseInitializePromiseCode =
+   &quot;(function (executor)\n&quot; \
+   &quot;{\n&quot; \
+   &quot;    \&quot;use strict\&quot;;\n&quot; \
+   &quot;\n&quot; \
+   &quot;    if (typeof executor !== 'function')\n&quot; \
+   &quot;        throw new @TypeError(\&quot;Promise constructor takes a function argument\&quot;);\n&quot; \
+   &quot;\n&quot; \
+   &quot;    this.@promiseState = @promisePending;\n&quot; \
+   &quot;    this.@promiseFulfillReactions = [];\n&quot; \
+   &quot;    this.@promiseRejectReactions = [];\n&quot; \
+   &quot;\n&quot; \
+   &quot;    var resolvingFunctions = @createResolvingFunctions(this);\n&quot; \
+   &quot;    try {\n&quot; \
+   &quot;        executor(resolvingFunctions.@resolve, resolvingFunctions.@reject);\n&quot; \
+   &quot;    } catch (error) {\n&quot; \
+   &quot;        return resolvingFunctions.@reject.@call(undefined, error);\n&quot; \
+   &quot;    }\n&quot; \
+   &quot;\n&quot; \
+   &quot;    return this;\n&quot; \
+   &quot;})\n&quot; \
+;
+
+
+#define DEFINE_BUILTIN_GENERATOR(codeName, functionName, argumentCount) \
+JSC::FunctionExecutable* codeName##Generator(JSC::VM&amp; vm) \
+{\
+    return vm.builtinExecutables()-&gt;codeName##Executable()-&gt;link(vm, vm.builtinExecutables()-&gt;codeName##Source()); }
+JSC_FOREACH_BUILTIN_CODE(DEFINE_BUILTIN_GENERATOR)
+#undef DEFINE_BUILTIN_GENERATOR
+
+
+} // namespace JSC
+### End File: JSCBuiltins.cpp
</ins></span></pre></div>
<a id="trunkSourceJavaScriptCoreScriptstestsbuiltinsexpectedWebCoreGuardedBuiltinSeparatejsresult"></a>
<div class="addfile"><h4>Added: trunk/Source/JavaScriptCore/Scripts/tests/builtins/expected/WebCore-GuardedBuiltin-Separate.js-result (0 => 191433)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/Scripts/tests/builtins/expected/WebCore-GuardedBuiltin-Separate.js-result                                (rev 0)
+++ trunk/Source/JavaScriptCore/Scripts/tests/builtins/expected/WebCore-GuardedBuiltin-Separate.js-result        2015-10-22 04:39:01 UTC (rev 191433)
</span><span class="lines">@@ -0,0 +1,318 @@
</span><ins>+### Begin File: GuardedBuiltinBuiltins.h
+/*
+ * Copyright (c) 2015 Canon 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. AND ITS CONTRIBUTORS ``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 ITS 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.
+ * 
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from JavaScript files for
+// builtins by the script: Source/JavaScriptCore/Scripts/generate-js-builtins.py
+
+#ifndef GuardedBuiltinBuiltins_h
+#define GuardedBuiltinBuiltins_h
+
+#include &lt;builtins/BuiltinUtils.h&gt;
+
+namespace JSC {
+class FunctionExecutable;
+}
+
+namespace WebCore {
+
+/* GuardedBuiltin */
+extern const char* s_guardedBuiltinIsReadableStreamLockedCode;
+extern const int s_guardedBuiltinIsReadableStreamLockedCodeLength;
+extern const JSC::ConstructAbility s_guardedBuiltinIsReadableStreamLockedCodeConstructAbility;
+extern const char* s_guardedBuiltinCancelReadableStreamCode;
+extern const int s_guardedBuiltinCancelReadableStreamCodeLength;
+extern const JSC::ConstructAbility s_guardedBuiltinCancelReadableStreamCodeConstructAbility;
+extern const char* s_guardedBuiltinPromiseInvokeOrNoopCode;
+extern const int s_guardedBuiltinPromiseInvokeOrNoopCodeLength;
+extern const JSC::ConstructAbility s_guardedBuiltinPromiseInvokeOrNoopCodeConstructAbility;
+
+#define WEBCORE_FOREACH_GUARDEDBUILTIN_BUILTIN_DATA(macro) \
+    macro(isReadableStreamLocked, guardedBuiltinIsReadableStreamLocked, 1) \
+    macro(cancelReadableStream, guardedBuiltinCancelReadableStream, 2) \
+    macro(promiseInvokeOrNoop, guardedBuiltinPromiseInvokeOrNoop, 3) \
+
+#define WEBCORE_BUILTIN_GUARDEDBUILTIN_ISREADABLESTREAMLOCKED 1
+#define WEBCORE_BUILTIN_GUARDEDBUILTIN_CANCELREADABLESTREAM 1
+#define WEBCORE_BUILTIN_GUARDEDBUILTIN_PROMISEINVOKEORNOOP 1
+
+#define WEBCORE_FOREACH_GUARDEDBUILTIN_BUILTIN_CODE(macro) \
+    macro(guardedBuiltinIsReadableStreamLockedCode, isReadableStreamLocked, s_guardedBuiltinIsReadableStreamLockedCodeLength) \
+    macro(guardedBuiltinCancelReadableStreamCode, cancelReadableStream, s_guardedBuiltinCancelReadableStreamCodeLength) \
+    macro(guardedBuiltinPromiseInvokeOrNoopCode, promiseInvokeOrNoop, s_guardedBuiltinPromiseInvokeOrNoopCodeLength) \
+
+#define WEBCORE_FOREACH_GUARDEDBUILTIN_BUILTIN_FUNCTION_NAME(macro) \
+    macro(cancelReadableStream) \
+    macro(isReadableStreamLocked) \
+    macro(promiseInvokeOrNoop) \
+
+#define DECLARE_BUILTIN_GENERATOR(codeName, functionName, argumentCount) \
+    JSC::FunctionExecutable* codeName##Generator(JSC::VM&amp;);
+
+WEBCORE_FOREACH_GUARDEDBUILTIN_BUILTIN_CODE(DECLARE_BUILTIN_GENERATOR)
+#undef DECLARE_BUILTIN_GENERATOR
+
+#define WEBCORE_BUILTIN_GUARDEDBUILTIN_EXISTS(object, func) defined WEBCORE_BUILTIN_ ## object ## _ ## func
+
+} // namespace WebCore
+
+#endif // GuardedBuiltinBuiltins_h
+
+### End File: GuardedBuiltinBuiltins.h
+
+### Begin File: GuardedBuiltinBuiltins.cpp
+/*
+ * Copyright (c) 2015 Canon 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. AND ITS CONTRIBUTORS ``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 ITS 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.
+ * 
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from JavaScript files for
+// builtins by the script: Source/JavaScriptCore/Scripts/generate-js-builtins.py
+
+#include &quot;config.h&quot;
+#include &quot;GuardedBuiltinBuiltins.h&quot;
+
+#include &quot;WebCoreJSClientData.h&quot;
+#include &lt;runtime/Executable.h&gt;
+#include &lt;runtime/JSCJSValueInlines.h&gt;
+#include &lt;runtime/JSCellInlines.h&gt;
+#include &lt;runtime/StructureInlines.h&gt;
+#include &lt;runtime/VM.h&gt;
+
+namespace WebCore {
+
+const JSC::ConstructAbility s_guardedBuiltinIsReadableStreamLockedCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const int s_guardedBuiltinIsReadableStreamLockedCodeLength = 71;
+const char* s_guardedBuiltinIsReadableStreamLockedCode =
+    &quot;(function (stream)\n&quot; \
+    &quot;{\n&quot; \
+    &quot;   \&quot;use strict\&quot;;\n&quot; \
+    &quot;\n&quot; \
+    &quot;    return !!stream.@reader;\n&quot; \
+    &quot;})\n&quot; \
+;
+
+const JSC::ConstructAbility s_guardedBuiltinCancelReadableStreamCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const int s_guardedBuiltinCancelReadableStreamCodeLength = 402;
+const char* s_guardedBuiltinCancelReadableStreamCode =
+    &quot;(function (stream, reason)\n&quot; \
+    &quot;{\n&quot; \
+    &quot;    \&quot;use strict\&quot;;\n&quot; \
+    &quot;\n&quot; \
+    &quot;    if (stream.@state === @readableStreamClosed)\n&quot; \
+    &quot;        return Promise.resolve();\n&quot; \
+    &quot;    if (stream.@state === @readableStreamErrored)\n&quot; \
+    &quot;        return Promise.reject(stream.@storedError);\n&quot; \
+    &quot;    stream.@queue = [];\n&quot; \
+    &quot;    @finishClosingReadableStream(stream);\n&quot; \
+    &quot;    return @promiseInvokeOrNoop(stream.@underlyingSource, \&quot;cancel\&quot;, [reason]).then(function() { });\n&quot; \
+    &quot;})\n&quot; \
+;
+
+const JSC::ConstructAbility s_guardedBuiltinPromiseInvokeOrNoopCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const int s_guardedBuiltinPromiseInvokeOrNoopCodeLength = 338;
+const char* s_guardedBuiltinPromiseInvokeOrNoopCode =
+    &quot;(function (object, key, args)\n&quot; \
+    &quot;{\n&quot; \
+    &quot;    \&quot;use strict\&quot;;\n&quot; \
+    &quot;\n&quot; \
+    &quot;    try {\n&quot; \
+    &quot;        var method = object[key];\n&quot; \
+    &quot;        if (typeof method === \&quot;undefined\&quot;)\n&quot; \
+    &quot;            return Promise.resolve();\n&quot; \
+    &quot;        var result = method.@apply(object, args);\n&quot; \
+    &quot;        return Promise.resolve(result);\n&quot; \
+    &quot;    }\n&quot; \
+    &quot;    catch(error) {\n&quot; \
+    &quot;        return Promise.reject(error);\n&quot; \
+    &quot;    }\n&quot; \
+    &quot;})\n&quot; \
+;
+
+
+#define DEFINE_BUILTIN_GENERATOR(codeName, functionName, argumentCount) \
+JSC::FunctionExecutable* codeName##Generator(JSC::VM&amp; vm) \
+{\
+    JSVMClientData* clientData = static_cast&lt;JSVMClientData*&gt;(vm.clientData); \
+    return clientData-&gt;builtinFunctions().guardedBuiltinBuiltins().codeName##Executable()-&gt;link(vm, clientData-&gt;builtinFunctions().guardedBuiltinBuiltins().codeName##Source()); \
+}
+WEBCORE_FOREACH_GUARDEDBUILTIN_BUILTIN_CODE(DEFINE_BUILTIN_GENERATOR)
+#undef DEFINE_BUILTIN_GENERATOR
+
+
+} // namespace WebCore
+### End File: GuardedBuiltinBuiltins.cpp
+
+### Begin File: GuardedBuiltinBuiltinsWrapper.h
+/*
+ * Copyright (c) 2015 Canon 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. AND ITS CONTRIBUTORS ``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 ITS 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.
+ * 
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from JavaScript files for
+// builtins by the script: Source/JavaScriptCore/Scripts/generate-js-builtins.py
+
+#ifndef GuardedBuiltinBuiltinsWrapper_h
+#define GuardedBuiltinBuiltinsWrapper_h
+
+#include &quot;GuardedBuiltinBuiltins.h&quot;
+#include &lt;builtins/BuiltinUtils.h&gt;
+#include &lt;bytecode/UnlinkedFunctionExecutable.h&gt;
+#include &lt;runtime/Identifier.h&gt;
+#include &lt;runtime/JSFunction.h&gt;
+
+namespace WebCore {
+
+class GuardedBuiltinBuiltinsWrapper : private JSC::WeakHandleOwner {
+public:
+    explicit GuardedBuiltinBuiltinsWrapper(JSC::VM* vm)
+        : m_vm(*vm)
+        WEBCORE_FOREACH_GUARDEDBUILTIN_BUILTIN_FUNCTION_NAME(INITIALIZE_BUILTIN_NAMES)
+#define INITIALIZE_BUILTIN_SOURCE_MEMBERS(name, functionName, length) , m_##name##Source(JSC::makeSource(StringImpl::createFromLiteral(s_##name, length)))
+        WEBCORE_FOREACH_GUARDEDBUILTIN_BUILTIN_CODE(INITIALIZE_BUILTIN_SOURCE_MEMBERS)
+#undef INITIALIZE_BUILTIN_SOURCE_MEMBERS
+    {
+    }
+
+#define EXPOSE_BUILTIN_EXECUTABLES(name, functionName, length) \
+    JSC::UnlinkedFunctionExecutable* name##Executable(); \
+    const JSC::SourceCode&amp; name##Source() const { return m_##name##Source; }
+    WEBCORE_FOREACH_GUARDEDBUILTIN_BUILTIN_CODE(EXPOSE_BUILTIN_EXECUTABLES)
+#undef EXPOSE_BUILTIN_EXECUTABLES
+
+    WEBCORE_FOREACH_GUARDEDBUILTIN_BUILTIN_FUNCTION_NAME(DECLARE_BUILTIN_IDENTIFIER_ACCESSOR)
+
+    void exportNames();
+
+private:
+    JSC::VM&amp; m_vm;
+
+    WEBCORE_FOREACH_GUARDEDBUILTIN_BUILTIN_FUNCTION_NAME(DECLARE_BUILTIN_NAMES)
+
+#define DECLARE_BUILTIN_SOURCE_MEMBERS(name, functionName, length) \
+    JSC::SourceCode m_##name##Source;\
+    JSC::Weak&lt;JSC::UnlinkedFunctionExecutable&gt; m_##name##Executable;
+    WEBCORE_FOREACH_GUARDEDBUILTIN_BUILTIN_CODE(DECLARE_BUILTIN_SOURCE_MEMBERS)
+#undef DECLARE_BUILTIN_SOURCE_MEMBERS
+
+};
+
+#define DEFINE_BUILTIN_EXECUTABLES(name, functionName, length) \
+inline JSC::UnlinkedFunctionExecutable* GuardedBuiltinBuiltinsWrapper::name##Executable() \
+{\
+    if (!m_##name##Executable)\
+        m_##name##Executable = JSC::Weak&lt;JSC::UnlinkedFunctionExecutable&gt;(JSC::createBuiltinExecutable(m_vm, m_##name##Source, functionName##PublicName(), s_##name##ConstructAbility), this, &amp;m_##name##Executable);\
+    return m_##name##Executable.get();\
+}
+WEBCORE_FOREACH_GUARDEDBUILTIN_BUILTIN_CODE(DEFINE_BUILTIN_EXECUTABLES)
+#undef DEFINE_BUILTIN_EXECUTABLES
+
+inline void GuardedBuiltinBuiltinsWrapper::exportNames()
+{
+#define EXPORT_FUNCTION_NAME(name) m_vm.propertyNames-&gt;appendExternalName(name##PublicName(), name##PrivateName());
+    WEBCORE_FOREACH_GUARDEDBUILTIN_BUILTIN_FUNCTION_NAME(EXPORT_FUNCTION_NAME)
+#undef EXPORT_FUNCTION_NAME
+}
+
+class GuardedBuiltinBuiltinFunctions {
+public:
+    explicit GuardedBuiltinBuiltinFunctions(JSC::VM&amp; vm) : m_vm(vm) { }
+
+    void init(JSC::JSGlobalObject&amp;);
+    void visit(JSC::SlotVisitor&amp;);
+
+public:
+    JSC::VM&amp; m_vm;
+
+#define DECLARE_BUILTIN_SOURCE_MEMBERS(functionName) \
+    JSC::WriteBarrier&lt;JSC::JSFunction&gt; m_##functionName##Function;
+    WEBCORE_FOREACH_GUARDEDBUILTIN_BUILTIN_FUNCTION_NAME(DECLARE_BUILTIN_SOURCE_MEMBERS)
+#undef DECLARE_BUILTIN_SOURCE_MEMBERS
+};
+
+inline void GuardedBuiltinBuiltinFunctions::init(JSC::JSGlobalObject&amp; globalObject)
+{
+#define EXPORT_FUNCTION(codeName, functionName, length)\
+    m_##functionName##Function.set(m_vm, &amp;globalObject, JSC::JSFunction::createBuiltinFunction(m_vm, codeName##Generator(m_vm), &amp;globalObject));
+    WEBCORE_FOREACH_GUARDEDBUILTIN_BUILTIN_CODE(EXPORT_FUNCTION)
+#undef EXPORT_FUNCTION
+}
+
+inline void GuardedBuiltinBuiltinFunctions::visit(JSC::SlotVisitor&amp; visitor)
+{
+#define VISIT_FUNCTION(name) visitor.append(&amp;m_##name##Function);
+    WEBCORE_FOREACH_GUARDEDBUILTIN_BUILTIN_FUNCTION_NAME(VISIT_FUNCTION)
+#undef VISIT_FUNCTION
+}
+
+
+} // namespace WebCore
+
+#endif // GuardedBuiltinBuiltinsWrapper_h
+
+### End File: GuardedBuiltinBuiltinsWrapper.h
</ins></span></pre></div>
<a id="trunkSourceJavaScriptCoreScriptstestsbuiltinsexpectedWebCoreGuardedInternalBuiltinSeparatejsresult"></a>
<div class="addfile"><h4>Added: trunk/Source/JavaScriptCore/Scripts/tests/builtins/expected/WebCore-GuardedInternalBuiltin-Separate.js-result (0 => 191433)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/Scripts/tests/builtins/expected/WebCore-GuardedInternalBuiltin-Separate.js-result                                (rev 0)
+++ trunk/Source/JavaScriptCore/Scripts/tests/builtins/expected/WebCore-GuardedInternalBuiltin-Separate.js-result        2015-10-22 04:39:01 UTC (rev 191433)
</span><span class="lines">@@ -0,0 +1,318 @@
</span><ins>+### Begin File: GuardedInternalBuiltinBuiltins.h
+/*
+ * Copyright (c) 2015 Canon 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. AND ITS CONTRIBUTORS ``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 ITS 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.
+ * 
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from JavaScript files for
+// builtins by the script: Source/JavaScriptCore/Scripts/generate-js-builtins.py
+
+#ifndef GuardedInternalBuiltinBuiltins_h
+#define GuardedInternalBuiltinBuiltins_h
+
+#include &lt;builtins/BuiltinUtils.h&gt;
+
+namespace JSC {
+class FunctionExecutable;
+}
+
+namespace WebCore {
+
+/* GuardedInternalBuiltin */
+extern const char* s_guardedInternalBuiltinIsReadableStreamLockedCode;
+extern const int s_guardedInternalBuiltinIsReadableStreamLockedCodeLength;
+extern const JSC::ConstructAbility s_guardedInternalBuiltinIsReadableStreamLockedCodeConstructAbility;
+extern const char* s_guardedInternalBuiltinCancelReadableStreamCode;
+extern const int s_guardedInternalBuiltinCancelReadableStreamCodeLength;
+extern const JSC::ConstructAbility s_guardedInternalBuiltinCancelReadableStreamCodeConstructAbility;
+extern const char* s_guardedInternalBuiltinPromiseInvokeOrNoopCode;
+extern const int s_guardedInternalBuiltinPromiseInvokeOrNoopCodeLength;
+extern const JSC::ConstructAbility s_guardedInternalBuiltinPromiseInvokeOrNoopCodeConstructAbility;
+
+#define WEBCORE_FOREACH_GUARDEDINTERNALBUILTIN_BUILTIN_DATA(macro) \
+    macro(isReadableStreamLocked, guardedInternalBuiltinIsReadableStreamLocked, 1) \
+    macro(cancelReadableStream, guardedInternalBuiltinCancelReadableStream, 2) \
+    macro(promiseInvokeOrNoop, guardedInternalBuiltinPromiseInvokeOrNoop, 3) \
+
+#define WEBCORE_BUILTIN_GUARDEDINTERNALBUILTIN_ISREADABLESTREAMLOCKED 1
+#define WEBCORE_BUILTIN_GUARDEDINTERNALBUILTIN_CANCELREADABLESTREAM 1
+#define WEBCORE_BUILTIN_GUARDEDINTERNALBUILTIN_PROMISEINVOKEORNOOP 1
+
+#define WEBCORE_FOREACH_GUARDEDINTERNALBUILTIN_BUILTIN_CODE(macro) \
+    macro(guardedInternalBuiltinIsReadableStreamLockedCode, isReadableStreamLocked, s_guardedInternalBuiltinIsReadableStreamLockedCodeLength) \
+    macro(guardedInternalBuiltinCancelReadableStreamCode, cancelReadableStream, s_guardedInternalBuiltinCancelReadableStreamCodeLength) \
+    macro(guardedInternalBuiltinPromiseInvokeOrNoopCode, promiseInvokeOrNoop, s_guardedInternalBuiltinPromiseInvokeOrNoopCodeLength) \
+
+#define WEBCORE_FOREACH_GUARDEDINTERNALBUILTIN_BUILTIN_FUNCTION_NAME(macro) \
+    macro(cancelReadableStream) \
+    macro(isReadableStreamLocked) \
+    macro(promiseInvokeOrNoop) \
+
+#define DECLARE_BUILTIN_GENERATOR(codeName, functionName, argumentCount) \
+    JSC::FunctionExecutable* codeName##Generator(JSC::VM&amp;);
+
+WEBCORE_FOREACH_GUARDEDINTERNALBUILTIN_BUILTIN_CODE(DECLARE_BUILTIN_GENERATOR)
+#undef DECLARE_BUILTIN_GENERATOR
+
+#define WEBCORE_BUILTIN_GUARDEDINTERNALBUILTIN_EXISTS(object, func) defined WEBCORE_BUILTIN_ ## object ## _ ## func
+
+} // namespace WebCore
+
+#endif // GuardedInternalBuiltinBuiltins_h
+
+### End File: GuardedInternalBuiltinBuiltins.h
+
+### Begin File: GuardedInternalBuiltinBuiltins.cpp
+/*
+ * Copyright (c) 2015 Canon 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. AND ITS CONTRIBUTORS ``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 ITS 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.
+ * 
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from JavaScript files for
+// builtins by the script: Source/JavaScriptCore/Scripts/generate-js-builtins.py
+
+#include &quot;config.h&quot;
+#include &quot;GuardedInternalBuiltinBuiltins.h&quot;
+
+#include &quot;WebCoreJSClientData.h&quot;
+#include &lt;runtime/Executable.h&gt;
+#include &lt;runtime/JSCJSValueInlines.h&gt;
+#include &lt;runtime/JSCellInlines.h&gt;
+#include &lt;runtime/StructureInlines.h&gt;
+#include &lt;runtime/VM.h&gt;
+
+namespace WebCore {
+
+const JSC::ConstructAbility s_guardedInternalBuiltinIsReadableStreamLockedCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const int s_guardedInternalBuiltinIsReadableStreamLockedCodeLength = 71;
+const char* s_guardedInternalBuiltinIsReadableStreamLockedCode =
+    &quot;(function (stream)\n&quot; \
+    &quot;{\n&quot; \
+    &quot;   \&quot;use strict\&quot;;\n&quot; \
+    &quot;\n&quot; \
+    &quot;    return !!stream.@reader;\n&quot; \
+    &quot;})\n&quot; \
+;
+
+const JSC::ConstructAbility s_guardedInternalBuiltinCancelReadableStreamCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const int s_guardedInternalBuiltinCancelReadableStreamCodeLength = 402;
+const char* s_guardedInternalBuiltinCancelReadableStreamCode =
+    &quot;(function (stream, reason)\n&quot; \
+    &quot;{\n&quot; \
+    &quot;    \&quot;use strict\&quot;;\n&quot; \
+    &quot;\n&quot; \
+    &quot;    if (stream.@state === @readableStreamClosed)\n&quot; \
+    &quot;        return Promise.resolve();\n&quot; \
+    &quot;    if (stream.@state === @readableStreamErrored)\n&quot; \
+    &quot;        return Promise.reject(stream.@storedError);\n&quot; \
+    &quot;    stream.@queue = [];\n&quot; \
+    &quot;    @finishClosingReadableStream(stream);\n&quot; \
+    &quot;    return @promiseInvokeOrNoop(stream.@underlyingSource, \&quot;cancel\&quot;, [reason]).then(function() { });\n&quot; \
+    &quot;})\n&quot; \
+;
+
+const JSC::ConstructAbility s_guardedInternalBuiltinPromiseInvokeOrNoopCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const int s_guardedInternalBuiltinPromiseInvokeOrNoopCodeLength = 338;
+const char* s_guardedInternalBuiltinPromiseInvokeOrNoopCode =
+    &quot;(function (object, key, args)\n&quot; \
+    &quot;{\n&quot; \
+    &quot;    \&quot;use strict\&quot;;\n&quot; \
+    &quot;\n&quot; \
+    &quot;    try {\n&quot; \
+    &quot;        var method = object[key];\n&quot; \
+    &quot;        if (typeof method === \&quot;undefined\&quot;)\n&quot; \
+    &quot;            return Promise.resolve();\n&quot; \
+    &quot;        var result = method.@apply(object, args);\n&quot; \
+    &quot;        return Promise.resolve(result);\n&quot; \
+    &quot;    }\n&quot; \
+    &quot;    catch(error) {\n&quot; \
+    &quot;        return Promise.reject(error);\n&quot; \
+    &quot;    }\n&quot; \
+    &quot;})\n&quot; \
+;
+
+
+#define DEFINE_BUILTIN_GENERATOR(codeName, functionName, argumentCount) \
+JSC::FunctionExecutable* codeName##Generator(JSC::VM&amp; vm) \
+{\
+    JSVMClientData* clientData = static_cast&lt;JSVMClientData*&gt;(vm.clientData); \
+    return clientData-&gt;builtinFunctions().guardedInternalBuiltinBuiltins().codeName##Executable()-&gt;link(vm, clientData-&gt;builtinFunctions().guardedInternalBuiltinBuiltins().codeName##Source()); \
+}
+WEBCORE_FOREACH_GUARDEDINTERNALBUILTIN_BUILTIN_CODE(DEFINE_BUILTIN_GENERATOR)
+#undef DEFINE_BUILTIN_GENERATOR
+
+
+} // namespace WebCore
+### End File: GuardedInternalBuiltinBuiltins.cpp
+
+### Begin File: GuardedInternalBuiltinBuiltinsWrapper.h
+/*
+ * Copyright (c) 2015 Canon 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. AND ITS CONTRIBUTORS ``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 ITS 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.
+ * 
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from JavaScript files for
+// builtins by the script: Source/JavaScriptCore/Scripts/generate-js-builtins.py
+
+#ifndef GuardedInternalBuiltinBuiltinsWrapper_h
+#define GuardedInternalBuiltinBuiltinsWrapper_h
+
+#include &quot;GuardedInternalBuiltinBuiltins.h&quot;
+#include &lt;builtins/BuiltinUtils.h&gt;
+#include &lt;bytecode/UnlinkedFunctionExecutable.h&gt;
+#include &lt;runtime/Identifier.h&gt;
+#include &lt;runtime/JSFunction.h&gt;
+
+namespace WebCore {
+
+class GuardedInternalBuiltinBuiltinsWrapper : private JSC::WeakHandleOwner {
+public:
+    explicit GuardedInternalBuiltinBuiltinsWrapper(JSC::VM* vm)
+        : m_vm(*vm)
+        WEBCORE_FOREACH_GUARDEDINTERNALBUILTIN_BUILTIN_FUNCTION_NAME(INITIALIZE_BUILTIN_NAMES)
+#define INITIALIZE_BUILTIN_SOURCE_MEMBERS(name, functionName, length) , m_##name##Source(JSC::makeSource(StringImpl::createFromLiteral(s_##name, length)))
+        WEBCORE_FOREACH_GUARDEDINTERNALBUILTIN_BUILTIN_CODE(INITIALIZE_BUILTIN_SOURCE_MEMBERS)
+#undef INITIALIZE_BUILTIN_SOURCE_MEMBERS
+    {
+    }
+
+#define EXPOSE_BUILTIN_EXECUTABLES(name, functionName, length) \
+    JSC::UnlinkedFunctionExecutable* name##Executable(); \
+    const JSC::SourceCode&amp; name##Source() const { return m_##name##Source; }
+    WEBCORE_FOREACH_GUARDEDINTERNALBUILTIN_BUILTIN_CODE(EXPOSE_BUILTIN_EXECUTABLES)
+#undef EXPOSE_BUILTIN_EXECUTABLES
+
+    WEBCORE_FOREACH_GUARDEDINTERNALBUILTIN_BUILTIN_FUNCTION_NAME(DECLARE_BUILTIN_IDENTIFIER_ACCESSOR)
+
+    void exportNames();
+
+private:
+    JSC::VM&amp; m_vm;
+
+    WEBCORE_FOREACH_GUARDEDINTERNALBUILTIN_BUILTIN_FUNCTION_NAME(DECLARE_BUILTIN_NAMES)
+
+#define DECLARE_BUILTIN_SOURCE_MEMBERS(name, functionName, length) \
+    JSC::SourceCode m_##name##Source;\
+    JSC::Weak&lt;JSC::UnlinkedFunctionExecutable&gt; m_##name##Executable;
+    WEBCORE_FOREACH_GUARDEDINTERNALBUILTIN_BUILTIN_CODE(DECLARE_BUILTIN_SOURCE_MEMBERS)
+#undef DECLARE_BUILTIN_SOURCE_MEMBERS
+
+};
+
+#define DEFINE_BUILTIN_EXECUTABLES(name, functionName, length) \
+inline JSC::UnlinkedFunctionExecutable* GuardedInternalBuiltinBuiltinsWrapper::name##Executable() \
+{\
+    if (!m_##name##Executable)\
+        m_##name##Executable = JSC::Weak&lt;JSC::UnlinkedFunctionExecutable&gt;(JSC::createBuiltinExecutable(m_vm, m_##name##Source, functionName##PublicName(), s_##name##ConstructAbility), this, &amp;m_##name##Executable);\
+    return m_##name##Executable.get();\
+}
+WEBCORE_FOREACH_GUARDEDINTERNALBUILTIN_BUILTIN_CODE(DEFINE_BUILTIN_EXECUTABLES)
+#undef DEFINE_BUILTIN_EXECUTABLES
+
+inline void GuardedInternalBuiltinBuiltinsWrapper::exportNames()
+{
+#define EXPORT_FUNCTION_NAME(name) m_vm.propertyNames-&gt;appendExternalName(name##PublicName(), name##PrivateName());
+    WEBCORE_FOREACH_GUARDEDINTERNALBUILTIN_BUILTIN_FUNCTION_NAME(EXPORT_FUNCTION_NAME)
+#undef EXPORT_FUNCTION_NAME
+}
+
+class GuardedInternalBuiltinBuiltinFunctions {
+public:
+    explicit GuardedInternalBuiltinBuiltinFunctions(JSC::VM&amp; vm) : m_vm(vm) { }
+
+    void init(JSC::JSGlobalObject&amp;);
+    void visit(JSC::SlotVisitor&amp;);
+
+public:
+    JSC::VM&amp; m_vm;
+
+#define DECLARE_BUILTIN_SOURCE_MEMBERS(functionName) \
+    JSC::WriteBarrier&lt;JSC::JSFunction&gt; m_##functionName##Function;
+    WEBCORE_FOREACH_GUARDEDINTERNALBUILTIN_BUILTIN_FUNCTION_NAME(DECLARE_BUILTIN_SOURCE_MEMBERS)
+#undef DECLARE_BUILTIN_SOURCE_MEMBERS
+};
+
+inline void GuardedInternalBuiltinBuiltinFunctions::init(JSC::JSGlobalObject&amp; globalObject)
+{
+#define EXPORT_FUNCTION(codeName, functionName, length)\
+    m_##functionName##Function.set(m_vm, &amp;globalObject, JSC::JSFunction::createBuiltinFunction(m_vm, codeName##Generator(m_vm), &amp;globalObject));
+    WEBCORE_FOREACH_GUARDEDINTERNALBUILTIN_BUILTIN_CODE(EXPORT_FUNCTION)
+#undef EXPORT_FUNCTION
+}
+
+inline void GuardedInternalBuiltinBuiltinFunctions::visit(JSC::SlotVisitor&amp; visitor)
+{
+#define VISIT_FUNCTION(name) visitor.append(&amp;m_##name##Function);
+    WEBCORE_FOREACH_GUARDEDINTERNALBUILTIN_BUILTIN_FUNCTION_NAME(VISIT_FUNCTION)
+#undef VISIT_FUNCTION
+}
+
+
+} // namespace WebCore
+
+#endif // GuardedInternalBuiltinBuiltinsWrapper_h
+
+### End File: GuardedInternalBuiltinBuiltinsWrapper.h
</ins></span></pre></div>
<a id="trunkSourceJavaScriptCoreScriptstestsbuiltinsexpectedWebCoreUnguardedBuiltinSeparatejsresult"></a>
<div class="addfile"><h4>Added: trunk/Source/JavaScriptCore/Scripts/tests/builtins/expected/WebCore-UnguardedBuiltin-Separate.js-result (0 => 191433)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/Scripts/tests/builtins/expected/WebCore-UnguardedBuiltin-Separate.js-result                                (rev 0)
+++ trunk/Source/JavaScriptCore/Scripts/tests/builtins/expected/WebCore-UnguardedBuiltin-Separate.js-result        2015-10-22 04:39:01 UTC (rev 191433)
</span><span class="lines">@@ -0,0 +1,318 @@
</span><ins>+### Begin File: UnguardedBuiltinBuiltins.h
+/*
+ * Copyright (c) 2015 Canon 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. AND ITS CONTRIBUTORS ``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 ITS 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.
+ * 
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from JavaScript files for
+// builtins by the script: Source/JavaScriptCore/Scripts/generate-js-builtins.py
+
+#ifndef UnguardedBuiltinBuiltins_h
+#define UnguardedBuiltinBuiltins_h
+
+#include &lt;builtins/BuiltinUtils.h&gt;
+
+namespace JSC {
+class FunctionExecutable;
+}
+
+namespace WebCore {
+
+/* UnguardedBuiltin */
+extern const char* s_unguardedBuiltinIsReadableStreamLockedCode;
+extern const int s_unguardedBuiltinIsReadableStreamLockedCodeLength;
+extern const JSC::ConstructAbility s_unguardedBuiltinIsReadableStreamLockedCodeConstructAbility;
+extern const char* s_unguardedBuiltinCancelReadableStreamCode;
+extern const int s_unguardedBuiltinCancelReadableStreamCodeLength;
+extern const JSC::ConstructAbility s_unguardedBuiltinCancelReadableStreamCodeConstructAbility;
+extern const char* s_unguardedBuiltinPromiseInvokeOrNoopCode;
+extern const int s_unguardedBuiltinPromiseInvokeOrNoopCodeLength;
+extern const JSC::ConstructAbility s_unguardedBuiltinPromiseInvokeOrNoopCodeConstructAbility;
+
+#define WEBCORE_FOREACH_UNGUARDEDBUILTIN_BUILTIN_DATA(macro) \
+    macro(isReadableStreamLocked, unguardedBuiltinIsReadableStreamLocked, 1) \
+    macro(cancelReadableStream, unguardedBuiltinCancelReadableStream, 2) \
+    macro(promiseInvokeOrNoop, unguardedBuiltinPromiseInvokeOrNoop, 3) \
+
+#define WEBCORE_BUILTIN_UNGUARDEDBUILTIN_ISREADABLESTREAMLOCKED 1
+#define WEBCORE_BUILTIN_UNGUARDEDBUILTIN_CANCELREADABLESTREAM 1
+#define WEBCORE_BUILTIN_UNGUARDEDBUILTIN_PROMISEINVOKEORNOOP 1
+
+#define WEBCORE_FOREACH_UNGUARDEDBUILTIN_BUILTIN_CODE(macro) \
+    macro(unguardedBuiltinIsReadableStreamLockedCode, isReadableStreamLocked, s_unguardedBuiltinIsReadableStreamLockedCodeLength) \
+    macro(unguardedBuiltinCancelReadableStreamCode, cancelReadableStream, s_unguardedBuiltinCancelReadableStreamCodeLength) \
+    macro(unguardedBuiltinPromiseInvokeOrNoopCode, promiseInvokeOrNoop, s_unguardedBuiltinPromiseInvokeOrNoopCodeLength) \
+
+#define WEBCORE_FOREACH_UNGUARDEDBUILTIN_BUILTIN_FUNCTION_NAME(macro) \
+    macro(cancelReadableStream) \
+    macro(isReadableStreamLocked) \
+    macro(promiseInvokeOrNoop) \
+
+#define DECLARE_BUILTIN_GENERATOR(codeName, functionName, argumentCount) \
+    JSC::FunctionExecutable* codeName##Generator(JSC::VM&amp;);
+
+WEBCORE_FOREACH_UNGUARDEDBUILTIN_BUILTIN_CODE(DECLARE_BUILTIN_GENERATOR)
+#undef DECLARE_BUILTIN_GENERATOR
+
+#define WEBCORE_BUILTIN_UNGUARDEDBUILTIN_EXISTS(object, func) defined WEBCORE_BUILTIN_ ## object ## _ ## func
+
+} // namespace WebCore
+
+#endif // UnguardedBuiltinBuiltins_h
+
+### End File: UnguardedBuiltinBuiltins.h
+
+### Begin File: UnguardedBuiltinBuiltins.cpp
+/*
+ * Copyright (c) 2015 Canon 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. AND ITS CONTRIBUTORS ``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 ITS 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.
+ * 
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from JavaScript files for
+// builtins by the script: Source/JavaScriptCore/Scripts/generate-js-builtins.py
+
+#include &quot;config.h&quot;
+#include &quot;UnguardedBuiltinBuiltins.h&quot;
+
+#include &quot;WebCoreJSClientData.h&quot;
+#include &lt;runtime/Executable.h&gt;
+#include &lt;runtime/JSCJSValueInlines.h&gt;
+#include &lt;runtime/JSCellInlines.h&gt;
+#include &lt;runtime/StructureInlines.h&gt;
+#include &lt;runtime/VM.h&gt;
+
+namespace WebCore {
+
+const JSC::ConstructAbility s_unguardedBuiltinIsReadableStreamLockedCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const int s_unguardedBuiltinIsReadableStreamLockedCodeLength = 71;
+const char* s_unguardedBuiltinIsReadableStreamLockedCode =
+    &quot;(function (stream)\n&quot; \
+    &quot;{\n&quot; \
+    &quot;   \&quot;use strict\&quot;;\n&quot; \
+    &quot;\n&quot; \
+    &quot;    return !!stream.@reader;\n&quot; \
+    &quot;})\n&quot; \
+;
+
+const JSC::ConstructAbility s_unguardedBuiltinCancelReadableStreamCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const int s_unguardedBuiltinCancelReadableStreamCodeLength = 402;
+const char* s_unguardedBuiltinCancelReadableStreamCode =
+    &quot;(function (stream, reason)\n&quot; \
+    &quot;{\n&quot; \
+    &quot;    \&quot;use strict\&quot;;\n&quot; \
+    &quot;\n&quot; \
+    &quot;    if (stream.@state === @readableStreamClosed)\n&quot; \
+    &quot;        return Promise.resolve();\n&quot; \
+    &quot;    if (stream.@state === @readableStreamErrored)\n&quot; \
+    &quot;        return Promise.reject(stream.@storedError);\n&quot; \
+    &quot;    stream.@queue = [];\n&quot; \
+    &quot;    @finishClosingReadableStream(stream);\n&quot; \
+    &quot;    return @promiseInvokeOrNoop(stream.@underlyingSource, \&quot;cancel\&quot;, [reason]).then(function() { });\n&quot; \
+    &quot;})\n&quot; \
+;
+
+const JSC::ConstructAbility s_unguardedBuiltinPromiseInvokeOrNoopCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const int s_unguardedBuiltinPromiseInvokeOrNoopCodeLength = 338;
+const char* s_unguardedBuiltinPromiseInvokeOrNoopCode =
+    &quot;(function (object, key, args)\n&quot; \
+    &quot;{\n&quot; \
+    &quot;    \&quot;use strict\&quot;;\n&quot; \
+    &quot;\n&quot; \
+    &quot;    try {\n&quot; \
+    &quot;        var method = object[key];\n&quot; \
+    &quot;        if (typeof method === \&quot;undefined\&quot;)\n&quot; \
+    &quot;            return Promise.resolve();\n&quot; \
+    &quot;        var result = method.@apply(object, args);\n&quot; \
+    &quot;        return Promise.resolve(result);\n&quot; \
+    &quot;    }\n&quot; \
+    &quot;    catch(error) {\n&quot; \
+    &quot;        return Promise.reject(error);\n&quot; \
+    &quot;    }\n&quot; \
+    &quot;})\n&quot; \
+;
+
+
+#define DEFINE_BUILTIN_GENERATOR(codeName, functionName, argumentCount) \
+JSC::FunctionExecutable* codeName##Generator(JSC::VM&amp; vm) \
+{\
+    JSVMClientData* clientData = static_cast&lt;JSVMClientData*&gt;(vm.clientData); \
+    return clientData-&gt;builtinFunctions().unguardedBuiltinBuiltins().codeName##Executable()-&gt;link(vm, clientData-&gt;builtinFunctions().unguardedBuiltinBuiltins().codeName##Source()); \
+}
+WEBCORE_FOREACH_UNGUARDEDBUILTIN_BUILTIN_CODE(DEFINE_BUILTIN_GENERATOR)
+#undef DEFINE_BUILTIN_GENERATOR
+
+
+} // namespace WebCore
+### End File: UnguardedBuiltinBuiltins.cpp
+
+### Begin File: UnguardedBuiltinBuiltinsWrapper.h
+/*
+ * Copyright (c) 2015 Canon 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. AND ITS CONTRIBUTORS ``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 ITS 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.
+ * 
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from JavaScript files for
+// builtins by the script: Source/JavaScriptCore/Scripts/generate-js-builtins.py
+
+#ifndef UnguardedBuiltinBuiltinsWrapper_h
+#define UnguardedBuiltinBuiltinsWrapper_h
+
+#include &quot;UnguardedBuiltinBuiltins.h&quot;
+#include &lt;builtins/BuiltinUtils.h&gt;
+#include &lt;bytecode/UnlinkedFunctionExecutable.h&gt;
+#include &lt;runtime/Identifier.h&gt;
+#include &lt;runtime/JSFunction.h&gt;
+
+namespace WebCore {
+
+class UnguardedBuiltinBuiltinsWrapper : private JSC::WeakHandleOwner {
+public:
+    explicit UnguardedBuiltinBuiltinsWrapper(JSC::VM* vm)
+        : m_vm(*vm)
+        WEBCORE_FOREACH_UNGUARDEDBUILTIN_BUILTIN_FUNCTION_NAME(INITIALIZE_BUILTIN_NAMES)
+#define INITIALIZE_BUILTIN_SOURCE_MEMBERS(name, functionName, length) , m_##name##Source(JSC::makeSource(StringImpl::createFromLiteral(s_##name, length)))
+        WEBCORE_FOREACH_UNGUARDEDBUILTIN_BUILTIN_CODE(INITIALIZE_BUILTIN_SOURCE_MEMBERS)
+#undef INITIALIZE_BUILTIN_SOURCE_MEMBERS
+    {
+    }
+
+#define EXPOSE_BUILTIN_EXECUTABLES(name, functionName, length) \
+    JSC::UnlinkedFunctionExecutable* name##Executable(); \
+    const JSC::SourceCode&amp; name##Source() const { return m_##name##Source; }
+    WEBCORE_FOREACH_UNGUARDEDBUILTIN_BUILTIN_CODE(EXPOSE_BUILTIN_EXECUTABLES)
+#undef EXPOSE_BUILTIN_EXECUTABLES
+
+    WEBCORE_FOREACH_UNGUARDEDBUILTIN_BUILTIN_FUNCTION_NAME(DECLARE_BUILTIN_IDENTIFIER_ACCESSOR)
+
+    void exportNames();
+
+private:
+    JSC::VM&amp; m_vm;
+
+    WEBCORE_FOREACH_UNGUARDEDBUILTIN_BUILTIN_FUNCTION_NAME(DECLARE_BUILTIN_NAMES)
+
+#define DECLARE_BUILTIN_SOURCE_MEMBERS(name, functionName, length) \
+    JSC::SourceCode m_##name##Source;\
+    JSC::Weak&lt;JSC::UnlinkedFunctionExecutable&gt; m_##name##Executable;
+    WEBCORE_FOREACH_UNGUARDEDBUILTIN_BUILTIN_CODE(DECLARE_BUILTIN_SOURCE_MEMBERS)
+#undef DECLARE_BUILTIN_SOURCE_MEMBERS
+
+};
+
+#define DEFINE_BUILTIN_EXECUTABLES(name, functionName, length) \
+inline JSC::UnlinkedFunctionExecutable* UnguardedBuiltinBuiltinsWrapper::name##Executable() \
+{\
+    if (!m_##name##Executable)\
+        m_##name##Executable = JSC::Weak&lt;JSC::UnlinkedFunctionExecutable&gt;(JSC::createBuiltinExecutable(m_vm, m_##name##Source, functionName##PublicName(), s_##name##ConstructAbility), this, &amp;m_##name##Executable);\
+    return m_##name##Executable.get();\
+}
+WEBCORE_FOREACH_UNGUARDEDBUILTIN_BUILTIN_CODE(DEFINE_BUILTIN_EXECUTABLES)
+#undef DEFINE_BUILTIN_EXECUTABLES
+
+inline void UnguardedBuiltinBuiltinsWrapper::exportNames()
+{
+#define EXPORT_FUNCTION_NAME(name) m_vm.propertyNames-&gt;appendExternalName(name##PublicName(), name##PrivateName());
+    WEBCORE_FOREACH_UNGUARDEDBUILTIN_BUILTIN_FUNCTION_NAME(EXPORT_FUNCTION_NAME)
+#undef EXPORT_FUNCTION_NAME
+}
+
+class UnguardedBuiltinBuiltinFunctions {
+public:
+    explicit UnguardedBuiltinBuiltinFunctions(JSC::VM&amp; vm) : m_vm(vm) { }
+
+    void init(JSC::JSGlobalObject&amp;);
+    void visit(JSC::SlotVisitor&amp;);
+
+public:
+    JSC::VM&amp; m_vm;
+
+#define DECLARE_BUILTIN_SOURCE_MEMBERS(functionName) \
+    JSC::WriteBarrier&lt;JSC::JSFunction&gt; m_##functionName##Function;
+    WEBCORE_FOREACH_UNGUARDEDBUILTIN_BUILTIN_FUNCTION_NAME(DECLARE_BUILTIN_SOURCE_MEMBERS)
+#undef DECLARE_BUILTIN_SOURCE_MEMBERS
+};
+
+inline void UnguardedBuiltinBuiltinFunctions::init(JSC::JSGlobalObject&amp; globalObject)
+{
+#define EXPORT_FUNCTION(codeName, functionName, length)\
+    m_##functionName##Function.set(m_vm, &amp;globalObject, JSC::JSFunction::createBuiltinFunction(m_vm, codeName##Generator(m_vm), &amp;globalObject));
+    WEBCORE_FOREACH_UNGUARDEDBUILTIN_BUILTIN_CODE(EXPORT_FUNCTION)
+#undef EXPORT_FUNCTION
+}
+
+inline void UnguardedBuiltinBuiltinFunctions::visit(JSC::SlotVisitor&amp; visitor)
+{
+#define VISIT_FUNCTION(name) visitor.append(&amp;m_##name##Function);
+    WEBCORE_FOREACH_UNGUARDEDBUILTIN_BUILTIN_FUNCTION_NAME(VISIT_FUNCTION)
+#undef VISIT_FUNCTION
+}
+
+
+} // namespace WebCore
+
+#endif // UnguardedBuiltinBuiltinsWrapper_h
+
+### End File: UnguardedBuiltinBuiltinsWrapper.h
</ins></span></pre></div>
<a id="trunkSourceJavaScriptCoreScriptstestsbuiltinsexpectedWebCorexmlCasingTestSeparatejsresult"></a>
<div class="addfile"><h4>Added: trunk/Source/JavaScriptCore/Scripts/tests/builtins/expected/WebCore-xmlCasingTest-Separate.js-result (0 => 191433)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/Scripts/tests/builtins/expected/WebCore-xmlCasingTest-Separate.js-result                                (rev 0)
+++ trunk/Source/JavaScriptCore/Scripts/tests/builtins/expected/WebCore-xmlCasingTest-Separate.js-result        2015-10-22 04:39:01 UTC (rev 191433)
</span><span class="lines">@@ -0,0 +1,318 @@
</span><ins>+### Begin File: xmlCasingTestBuiltins.h
+/*
+ * Copyright (c) 2015 Canon 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. AND ITS CONTRIBUTORS ``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 ITS 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.
+ * 
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from JavaScript files for
+// builtins by the script: Source/JavaScriptCore/Scripts/generate-js-builtins.py
+
+#ifndef xmlCasingTestBuiltins_h
+#define xmlCasingTestBuiltins_h
+
+#include &lt;builtins/BuiltinUtils.h&gt;
+
+namespace JSC {
+class FunctionExecutable;
+}
+
+namespace WebCore {
+
+/* xmlCasingTest */
+extern const char* s_xmlCasingTestXMLCasingTestCode;
+extern const int s_xmlCasingTestXMLCasingTestCodeLength;
+extern const JSC::ConstructAbility s_xmlCasingTestXMLCasingTestCodeConstructAbility;
+extern const char* s_xmlCasingTestCssCasingTestCode;
+extern const int s_xmlCasingTestCssCasingTestCodeLength;
+extern const JSC::ConstructAbility s_xmlCasingTestCssCasingTestCodeConstructAbility;
+extern const char* s_xmlCasingTestUrlCasingTestCode;
+extern const int s_xmlCasingTestUrlCasingTestCodeLength;
+extern const JSC::ConstructAbility s_xmlCasingTestUrlCasingTestCodeConstructAbility;
+
+#define WEBCORE_FOREACH_XMLCASINGTEST_BUILTIN_DATA(macro) \
+    macro(xmlCasingTest, xmlCasingTestXMLCasingTest, 1) \
+    macro(cssCasingTest, xmlCasingTestCssCasingTest, 2) \
+    macro(urlCasingTest, xmlCasingTestUrlCasingTest, 3) \
+
+#define WEBCORE_BUILTIN_XMLCASINGTEST_XMLCASINGTEST 1
+#define WEBCORE_BUILTIN_XMLCASINGTEST_CSSCASINGTEST 1
+#define WEBCORE_BUILTIN_XMLCASINGTEST_URLCASINGTEST 1
+
+#define WEBCORE_FOREACH_XMLCASINGTEST_BUILTIN_CODE(macro) \
+    macro(xmlCasingTestXMLCasingTestCode, xmlCasingTest, s_xmlCasingTestXMLCasingTestCodeLength) \
+    macro(xmlCasingTestCssCasingTestCode, cssCasingTest, s_xmlCasingTestCssCasingTestCodeLength) \
+    macro(xmlCasingTestUrlCasingTestCode, urlCasingTest, s_xmlCasingTestUrlCasingTestCodeLength) \
+
+#define WEBCORE_FOREACH_XMLCASINGTEST_BUILTIN_FUNCTION_NAME(macro) \
+    macro(cssCasingTest) \
+    macro(urlCasingTest) \
+    macro(xmlCasingTest) \
+
+#define DECLARE_BUILTIN_GENERATOR(codeName, functionName, argumentCount) \
+    JSC::FunctionExecutable* codeName##Generator(JSC::VM&amp;);
+
+WEBCORE_FOREACH_XMLCASINGTEST_BUILTIN_CODE(DECLARE_BUILTIN_GENERATOR)
+#undef DECLARE_BUILTIN_GENERATOR
+
+#define WEBCORE_BUILTIN_XMLCASINGTEST_EXISTS(object, func) defined WEBCORE_BUILTIN_ ## object ## _ ## func
+
+} // namespace WebCore
+
+#endif // xmlCasingTestBuiltins_h
+
+### End File: xmlCasingTestBuiltins.h
+
+### Begin File: xmlCasingTestBuiltins.cpp
+/*
+ * Copyright (c) 2015 Canon 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. AND ITS CONTRIBUTORS ``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 ITS 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.
+ * 
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from JavaScript files for
+// builtins by the script: Source/JavaScriptCore/Scripts/generate-js-builtins.py
+
+#include &quot;config.h&quot;
+#include &quot;xmlCasingTestBuiltins.h&quot;
+
+#include &quot;WebCoreJSClientData.h&quot;
+#include &lt;runtime/Executable.h&gt;
+#include &lt;runtime/JSCJSValueInlines.h&gt;
+#include &lt;runtime/JSCellInlines.h&gt;
+#include &lt;runtime/StructureInlines.h&gt;
+#include &lt;runtime/VM.h&gt;
+
+namespace WebCore {
+
+const JSC::ConstructAbility s_xmlCasingTestXMLCasingTestCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const int s_xmlCasingTestXMLCasingTestCodeLength = 71;
+const char* s_xmlCasingTestXMLCasingTestCode =
+    &quot;(function (stream)\n&quot; \
+    &quot;{\n&quot; \
+    &quot;   \&quot;use strict\&quot;;\n&quot; \
+    &quot;\n&quot; \
+    &quot;    return !!stream.@reader;\n&quot; \
+    &quot;})\n&quot; \
+;
+
+const JSC::ConstructAbility s_xmlCasingTestCssCasingTestCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const int s_xmlCasingTestCssCasingTestCodeLength = 402;
+const char* s_xmlCasingTestCssCasingTestCode =
+    &quot;(function (stream, reason)\n&quot; \
+    &quot;{\n&quot; \
+    &quot;    \&quot;use strict\&quot;;\n&quot; \
+    &quot;\n&quot; \
+    &quot;    if (stream.@state === @readableStreamClosed)\n&quot; \
+    &quot;        return Promise.resolve();\n&quot; \
+    &quot;    if (stream.@state === @readableStreamErrored)\n&quot; \
+    &quot;        return Promise.reject(stream.@storedError);\n&quot; \
+    &quot;    stream.@queue = [];\n&quot; \
+    &quot;    @finishClosingReadableStream(stream);\n&quot; \
+    &quot;    return @promiseInvokeOrNoop(stream.@underlyingSource, \&quot;cancel\&quot;, [reason]).then(function() { });\n&quot; \
+    &quot;})\n&quot; \
+;
+
+const JSC::ConstructAbility s_xmlCasingTestUrlCasingTestCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
+const int s_xmlCasingTestUrlCasingTestCodeLength = 338;
+const char* s_xmlCasingTestUrlCasingTestCode =
+    &quot;(function (object, key, args)\n&quot; \
+    &quot;{\n&quot; \
+    &quot;    \&quot;use strict\&quot;;\n&quot; \
+    &quot;\n&quot; \
+    &quot;    try {\n&quot; \
+    &quot;        var method = object[key];\n&quot; \
+    &quot;        if (typeof method === \&quot;undefined\&quot;)\n&quot; \
+    &quot;            return Promise.resolve();\n&quot; \
+    &quot;        var result = method.@apply(object, args);\n&quot; \
+    &quot;        return Promise.resolve(result);\n&quot; \
+    &quot;    }\n&quot; \
+    &quot;    catch(error) {\n&quot; \
+    &quot;        return Promise.reject(error);\n&quot; \
+    &quot;    }\n&quot; \
+    &quot;})\n&quot; \
+;
+
+
+#define DEFINE_BUILTIN_GENERATOR(codeName, functionName, argumentCount) \
+JSC::FunctionExecutable* codeName##Generator(JSC::VM&amp; vm) \
+{\
+    JSVMClientData* clientData = static_cast&lt;JSVMClientData*&gt;(vm.clientData); \
+    return clientData-&gt;builtinFunctions().xmlCasingTestBuiltins().codeName##Executable()-&gt;link(vm, clientData-&gt;builtinFunctions().xmlCasingTestBuiltins().codeName##Source()); \
+}
+WEBCORE_FOREACH_XMLCASINGTEST_BUILTIN_CODE(DEFINE_BUILTIN_GENERATOR)
+#undef DEFINE_BUILTIN_GENERATOR
+
+
+} // namespace WebCore
+### End File: xmlCasingTestBuiltins.cpp
+
+### Begin File: xmlCasingTestBuiltinsWrapper.h
+/*
+ * Copyright (c) 2015 Canon 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. AND ITS CONTRIBUTORS ``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 ITS 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.
+ * 
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from JavaScript files for
+// builtins by the script: Source/JavaScriptCore/Scripts/generate-js-builtins.py
+
+#ifndef xmlCasingTestBuiltinsWrapper_h
+#define xmlCasingTestBuiltinsWrapper_h
+
+#include &quot;xmlCasingTestBuiltins.h&quot;
+#include &lt;builtins/BuiltinUtils.h&gt;
+#include &lt;bytecode/UnlinkedFunctionExecutable.h&gt;
+#include &lt;runtime/Identifier.h&gt;
+#include &lt;runtime/JSFunction.h&gt;
+
+namespace WebCore {
+
+class xmlCasingTestBuiltinsWrapper : private JSC::WeakHandleOwner {
+public:
+    explicit xmlCasingTestBuiltinsWrapper(JSC::VM* vm)
+        : m_vm(*vm)
+        WEBCORE_FOREACH_XMLCASINGTEST_BUILTIN_FUNCTION_NAME(INITIALIZE_BUILTIN_NAMES)
+#define INITIALIZE_BUILTIN_SOURCE_MEMBERS(name, functionName, length) , m_##name##Source(JSC::makeSource(StringImpl::createFromLiteral(s_##name, length)))
+        WEBCORE_FOREACH_XMLCASINGTEST_BUILTIN_CODE(INITIALIZE_BUILTIN_SOURCE_MEMBERS)
+#undef INITIALIZE_BUILTIN_SOURCE_MEMBERS
+    {
+    }
+
+#define EXPOSE_BUILTIN_EXECUTABLES(name, functionName, length) \
+    JSC::UnlinkedFunctionExecutable* name##Executable(); \
+    const JSC::SourceCode&amp; name##Source() const { return m_##name##Source; }
+    WEBCORE_FOREACH_XMLCASINGTEST_BUILTIN_CODE(EXPOSE_BUILTIN_EXECUTABLES)
+#undef EXPOSE_BUILTIN_EXECUTABLES
+
+    WEBCORE_FOREACH_XMLCASINGTEST_BUILTIN_FUNCTION_NAME(DECLARE_BUILTIN_IDENTIFIER_ACCESSOR)
+
+    void exportNames();
+
+private:
+    JSC::VM&amp; m_vm;
+
+    WEBCORE_FOREACH_XMLCASINGTEST_BUILTIN_FUNCTION_NAME(DECLARE_BUILTIN_NAMES)
+
+#define DECLARE_BUILTIN_SOURCE_MEMBERS(name, functionName, length) \
+    JSC::SourceCode m_##name##Source;\
+    JSC::Weak&lt;JSC::UnlinkedFunctionExecutable&gt; m_##name##Executable;
+    WEBCORE_FOREACH_XMLCASINGTEST_BUILTIN_CODE(DECLARE_BUILTIN_SOURCE_MEMBERS)
+#undef DECLARE_BUILTIN_SOURCE_MEMBERS
+
+};
+
+#define DEFINE_BUILTIN_EXECUTABLES(name, functionName, length) \
+inline JSC::UnlinkedFunctionExecutable* xmlCasingTestBuiltinsWrapper::name##Executable() \
+{\
+    if (!m_##name##Executable)\
+        m_##name##Executable = JSC::Weak&lt;JSC::UnlinkedFunctionExecutable&gt;(JSC::createBuiltinExecutable(m_vm, m_##name##Source, functionName##PublicName(), s_##name##ConstructAbility), this, &amp;m_##name##Executable);\
+    return m_##name##Executable.get();\
+}
+WEBCORE_FOREACH_XMLCASINGTEST_BUILTIN_CODE(DEFINE_BUILTIN_EXECUTABLES)
+#undef DEFINE_BUILTIN_EXECUTABLES
+
+inline void xmlCasingTestBuiltinsWrapper::exportNames()
+{
+#define EXPORT_FUNCTION_NAME(name) m_vm.propertyNames-&gt;appendExternalName(name##PublicName(), name##PrivateName());
+    WEBCORE_FOREACH_XMLCASINGTEST_BUILTIN_FUNCTION_NAME(EXPORT_FUNCTION_NAME)
+#undef EXPORT_FUNCTION_NAME
+}
+
+class xmlCasingTestBuiltinFunctions {
+public:
+    explicit xmlCasingTestBuiltinFunctions(JSC::VM&amp; vm) : m_vm(vm) { }
+
+    void init(JSC::JSGlobalObject&amp;);
+    void visit(JSC::SlotVisitor&amp;);
+
+public:
+    JSC::VM&amp; m_vm;
+
+#define DECLARE_BUILTIN_SOURCE_MEMBERS(functionName) \
+    JSC::WriteBarrier&lt;JSC::JSFunction&gt; m_##functionName##Function;
+    WEBCORE_FOREACH_XMLCASINGTEST_BUILTIN_FUNCTION_NAME(DECLARE_BUILTIN_SOURCE_MEMBERS)
+#undef DECLARE_BUILTIN_SOURCE_MEMBERS
+};
+
+inline void xmlCasingTestBuiltinFunctions::init(JSC::JSGlobalObject&amp; globalObject)
+{
+#define EXPORT_FUNCTION(codeName, functionName, length)\
+    m_##functionName##Function.set(m_vm, &amp;globalObject, JSC::JSFunction::createBuiltinFunction(m_vm, codeName##Generator(m_vm), &amp;globalObject));
+    WEBCORE_FOREACH_XMLCASINGTEST_BUILTIN_CODE(EXPORT_FUNCTION)
+#undef EXPORT_FUNCTION
+}
+
+inline void xmlCasingTestBuiltinFunctions::visit(JSC::SlotVisitor&amp; visitor)
+{
+#define VISIT_FUNCTION(name) visitor.append(&amp;m_##name##Function);
+    WEBCORE_FOREACH_XMLCASINGTEST_BUILTIN_FUNCTION_NAME(VISIT_FUNCTION)
+#undef VISIT_FUNCTION
+}
+
+
+} // namespace WebCore
+
+#endif // xmlCasingTestBuiltinsWrapper_h
+
+### End File: xmlCasingTestBuiltinsWrapper.h
</ins></span></pre></div>
<a id="trunkSourceJavaScriptCoreUpdateContentspy"></a>
<div class="delfile"><h4>Deleted: trunk/Source/JavaScriptCore/UpdateContents.py (191432 => 191433)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/UpdateContents.py        2015-10-22 03:17:06 UTC (rev 191432)
+++ trunk/Source/JavaScriptCore/UpdateContents.py        2015-10-22 04:39:01 UTC (rev 191433)
</span><span class="lines">@@ -1,48 +0,0 @@
</span><del>-#!/usr/bin/python
-
-# Copyright (C) 2015 Apple Inc.  All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-#
-# 1.  Redistributions of source code must retain the above copyright
-#     notice, this list of conditions and the following disclaimer.
-# 2.  Redistributions in binary form must reproduce the above copyright
-#     notice, this list of conditions and the following disclaimer in the
-#     documentation and/or other materials provided with the distribution.
-# 3.  Neither the name of Apple puter, Inc. (&quot;Apple&quot;) nor the names of
-#     its contributors may be used to endorse or promote products derived
-#     from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS &quot;AS IS&quot; 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 OR ITS 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 sys
-import os
-
-assert(len(sys.argv) == 3)
-
-comp = sys.argv[1]
-filename = sys.argv[2]
-
-t = False
-
-if os.path.isfile(filename):
-    f = open(filename, 'r')
-    comparator = f.read()
-    f.close()
-    t = True
-
-if (not t or comp != comparator):
-    f = open(filename, 'w')
-    f.write(comp)
-    f.close()
</del></span></pre></div>
<a id="trunkSourceJavaScriptCorebuiltinsBuiltinExecutablescpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/builtins/BuiltinExecutables.cpp (191432 => 191433)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/builtins/BuiltinExecutables.cpp        2015-10-22 03:17:06 UTC (rev 191432)
+++ trunk/Source/JavaScriptCore/builtins/BuiltinExecutables.cpp        2015-10-22 04:39:01 UTC (rev 191433)
</span><span class="lines">@@ -40,7 +40,7 @@
</span><span class="cx"> BuiltinExecutables::BuiltinExecutables(VM&amp; vm)
</span><span class="cx">     : m_vm(vm)
</span><span class="cx"> #define INITIALIZE_BUILTIN_SOURCE_MEMBERS(name, functionName, length) , m_##name##Source(makeSource(StringImpl::createFromLiteral(s_##name, length)))
</span><del>-    JSC_FOREACH_BUILTIN(INITIALIZE_BUILTIN_SOURCE_MEMBERS)
</del><ins>+    JSC_FOREACH_BUILTIN_CODE(INITIALIZE_BUILTIN_SOURCE_MEMBERS)
</ins><span class="cx"> #undef EXPOSE_BUILTIN_STRINGS
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="lines">@@ -132,7 +132,7 @@
</span><span class="cx">         m_##name##Executable = Weak&lt;UnlinkedFunctionExecutable&gt;(createBuiltinExecutable(m_##name##Source, m_vm.propertyNames-&gt;builtinNames().functionName##PublicName(), s_##name##ConstructAbility), this, &amp;m_##name##Executable);\
</span><span class="cx">     return m_##name##Executable.get();\
</span><span class="cx"> }
</span><del>-JSC_FOREACH_BUILTIN(DEFINE_BUILTIN_EXECUTABLES)
</del><ins>+JSC_FOREACH_BUILTIN_CODE(DEFINE_BUILTIN_EXECUTABLES)
</ins><span class="cx"> #undef EXPOSE_BUILTIN_SOURCES
</span><span class="cx"> 
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorebuiltinsBuiltinExecutablesh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/builtins/BuiltinExecutables.h (191432 => 191433)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/builtins/BuiltinExecutables.h        2015-10-22 03:17:06 UTC (rev 191432)
+++ trunk/Source/JavaScriptCore/builtins/BuiltinExecutables.h        2015-10-22 04:39:01 UTC (rev 191433)
</span><span class="lines">@@ -47,7 +47,7 @@
</span><span class="cx"> UnlinkedFunctionExecutable* name##Executable(); \
</span><span class="cx"> const SourceCode&amp; name##Source() { return m_##name##Source; }
</span><span class="cx">     
</span><del>-    JSC_FOREACH_BUILTIN(EXPOSE_BUILTIN_EXECUTABLES)
</del><ins>+    JSC_FOREACH_BUILTIN_CODE(EXPOSE_BUILTIN_EXECUTABLES)
</ins><span class="cx"> #undef EXPOSE_BUILTIN_SOURCES
</span><span class="cx"> 
</span><span class="cx">     UnlinkedFunctionExecutable* createDefaultConstructor(ConstructorKind, const Identifier&amp; name);
</span><span class="lines">@@ -62,7 +62,7 @@
</span><span class="cx"> #define DECLARE_BUILTIN_SOURCE_MEMBERS(name, functionName, length)\
</span><span class="cx">     SourceCode m_##name##Source; \
</span><span class="cx">     Weak&lt;UnlinkedFunctionExecutable&gt; m_##name##Executable;
</span><del>-    JSC_FOREACH_BUILTIN(DECLARE_BUILTIN_SOURCE_MEMBERS)
</del><ins>+    JSC_FOREACH_BUILTIN_CODE(DECLARE_BUILTIN_SOURCE_MEMBERS)
</ins><span class="cx"> #undef DECLARE_BUILTIN_SOURCE_MEMBERS
</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 (191432 => 191433)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/create_hash_table        2015-10-22 03:17:06 UTC (rev 191432)
+++ trunk/Source/JavaScriptCore/create_hash_table        2015-10-22 04:39:01 UTC (rev 191433)
</span><span class="lines">@@ -319,7 +319,7 @@
</span><span class="cx">         if ($values[$i]{&quot;type&quot;} eq &quot;Function&quot;)  {
</span><span class="cx">             my $tableHead = $name;
</span><span class="cx">             $tableHead =~ s/Table$//;
</span><del>-            print &quot; #if JSC_BUILTIN_EXISTS(&quot; . uc($tableHead . $key) .&quot;)\n&quot;;
</del><ins>+            print &quot; #if JSC_BUILTIN_EXISTS(&quot; . uc($tableHead) . &quot;, &quot; . uc($key) .&quot;)\n&quot;;
</ins><span class="cx">             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;;
</span><span class="cx">             print &quot; #else\n&quot;
</span><span class="cx">         }
</span></span></pre></div>
<a id="trunkSourceWebCoreCMakeListstxt"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/CMakeLists.txt (191432 => 191433)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/CMakeLists.txt        2015-10-22 03:17:06 UTC (rev 191432)
+++ trunk/Source/WebCore/CMakeLists.txt        2015-10-22 04:39:01 UTC (rev 191433)
</span><span class="lines">@@ -821,14 +821,10 @@
</span><span class="cx">     ${WebCore_SVG_IDL_FILES}
</span><span class="cx"> )
</span><span class="cx"> 
</span><del>-if (WIN32)
-    if (INTERNAL_BUILD)
-        set(JavaScriptCore_SCRIPTS_DIR &quot;${CMAKE_BINARY_DIR}/../include/private/JavaScriptCore/Scripts&quot;)
-    else ()
-        set(JavaScriptCore_SCRIPTS_DIR &quot;${DERIVED_SOURCES_DIR}/ForwardingHeaders/JavaScriptCore/Scripts&quot;)
-    endif ()
</del><ins>+if (WIN32 AND INTERNAL_BUILD)
+    set(JavaScriptCore_SCRIPTS_DIR &quot;${CMAKE_BINARY_DIR}/../include/private/JavaScriptCore/Scripts&quot;)
</ins><span class="cx"> else ()
</span><del>-    set(JavaScriptCore_SCRIPTS_DIR &quot;${JAVASCRIPTCORE_DIR}/Scripts&quot;)
</del><ins>+    set(JavaScriptCore_SCRIPTS_DIR &quot;${DERIVED_SOURCES_DIR}/ForwardingHeaders/JavaScriptCore/Scripts&quot;)
</ins><span class="cx"> endif ()
</span><span class="cx"> 
</span><span class="cx"> set(WebCore_SOURCES
</span><span class="lines">@@ -3362,19 +3358,6 @@
</span><span class="cx"> set(DEDICATEDWORKERGLOBALSCOPE_CONSTRUCTORS_FILE ${DERIVED_SOURCES_WEBCORE_DIR}/DedicatedWorkerGlobalScopeConstructors.idl)
</span><span class="cx"> set(IDL_ATTRIBUTES_FILE ${WEBCORE_DIR}/bindings/scripts/IDLAttributes.txt)
</span><span class="cx"> 
</span><del>-set(WEBCORE_JS_BUILTINS
-    ${WEBCORE_DIR}/Modules/mediastream/MediaDevices.js
-    ${WEBCORE_DIR}/Modules/streams/ByteLengthQueuingStrategy.js
-    ${WEBCORE_DIR}/Modules/streams/CountQueuingStrategy.js
-    ${WEBCORE_DIR}/Modules/streams/ReadableStream.js
-    ${WEBCORE_DIR}/Modules/streams/ReadableStreamController.js
-    ${WEBCORE_DIR}/Modules/streams/ReadableStreamInternals.js
-    ${WEBCORE_DIR}/Modules/streams/ReadableStreamReader.js
-    ${WEBCORE_DIR}/Modules/streams/StreamInternals.js
-    ${WEBCORE_DIR}/Modules/streams/WritableStream.js
-    ${WEBCORE_DIR}/Modules/streams/WritableStreamInternals.js
-)
-
</del><span class="cx"> WEBKIT_INCLUDE_CONFIG_FILES_IF_EXISTS()
</span><span class="cx"> 
</span><span class="cx"> # Generate InspectorOverlayPage.h
</span><span class="lines">@@ -3599,22 +3582,51 @@
</span><span class="cx">     ${ADDITIONAL_BINDINGS_DEPENDENCIES})
</span><span class="cx"> 
</span><span class="cx"> # WebCore JS Builtins
</span><del>-foreach (_builtinjs ${WEBCORE_JS_BUILTINS})
-    get_filename_component(_name ${_builtinjs} NAME_WE)
</del><ins>+
+set(WebCore_BUILTINS_SOURCES
+    ${WEBCORE_DIR}/Modules/mediastream/MediaDevices.js
+    ${WEBCORE_DIR}/Modules/streams/ByteLengthQueuingStrategy.js
+    ${WEBCORE_DIR}/Modules/streams/CountQueuingStrategy.js
+    ${WEBCORE_DIR}/Modules/streams/ReadableStream.js
+    ${WEBCORE_DIR}/Modules/streams/ReadableStreamController.js
+    ${WEBCORE_DIR}/Modules/streams/ReadableStreamInternals.js
+    ${WEBCORE_DIR}/Modules/streams/ReadableStreamReader.js
+    ${WEBCORE_DIR}/Modules/streams/StreamInternals.js
+    ${WEBCORE_DIR}/Modules/streams/WritableStream.js
+)
+
+set(BUILTINS_GENERATOR_SCRIPTS
+    ${JavaScriptCore_SCRIPTS_DIR}/builtins.py
+    ${JavaScriptCore_SCRIPTS_DIR}/builtins_generator.py
+    ${JavaScriptCore_SCRIPTS_DIR}/builtins_model.py
+    ${JavaScriptCore_SCRIPTS_DIR}/builtins_templates.py
+    ${JavaScriptCore_SCRIPTS_DIR}/builtins_generate_combined_header.py
+    ${JavaScriptCore_SCRIPTS_DIR}/builtins_generate_combined_implementation.py
+    ${JavaScriptCore_SCRIPTS_DIR}/builtins_generate_separate_header.py
+    ${JavaScriptCore_SCRIPTS_DIR}/builtins_generate_separate_implementation.py
+    ${JavaScriptCore_SCRIPTS_DIR}/builtins_generate_separate_wrapper.py
+    ${JavaScriptCore_SCRIPTS_DIR}/generate-js-builtins.py
+    ${JavaScriptCore_SCRIPTS_DIR}/lazywriter.py
+)
+
+foreach (_builtinSource ${WebCore_BUILTINS_SOURCES})
+    get_filename_component(_objectName ${_builtinSource} NAME_WE)
</ins><span class="cx">     add_custom_command(
</span><del>-        OUTPUT ${DERIVED_SOURCES_WEBCORE_DIR}/${_name}BuiltinsWrapper.h ${DERIVED_SOURCES_WEBCORE_DIR}/${_name}Builtins.h ${DERIVED_SOURCES_WEBCORE_DIR}/${_name}Builtins.cpp
-        MAIN_DEPENDENCY ${WEBCORE_DIR}/generate-js-builtins
-        DEPENDS ${JavaScriptCore_SCRIPTS_DIR}/generate-js-builtins
-        DEPENDS ${_builtinjs}
-        COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/generate-js-builtins --input ${_builtinjs} --output_dir ${DERIVED_SOURCES_WEBCORE_DIR} --generate_js_builtins_path ${JavaScriptCore_SCRIPTS_DIR}
</del><ins>+        OUTPUT ${DERIVED_SOURCES_WEBCORE_DIR}/${_objectName}Builtins.cpp
+               ${DERIVED_SOURCES_WEBCORE_DIR}/${_objectName}Builtins.h
+               ${DERIVED_SOURCES_WEBCORE_DIR}/${_objectName}BuiltinsWrapper.h 
+        MAIN_DEPENDENCY ${_builtinSource}
+        DEPENDS ${BUILTINS_GENERATOR_SCRIPTS}
+        COMMAND ${PYTHON_EXECUTABLE} ${JavaScriptCore_SCRIPTS_DIR}/generate-js-builtins.py --framework WebCore --output-directory ${DERIVED_SOURCES_WEBCORE_DIR} ${_builtinSource}
</ins><span class="cx">         VERBATIM)
</span><span class="cx">     list(APPEND WebCore_SOURCES
</span><del>-        ${DERIVED_SOURCES_WEBCORE_DIR}/${_name}Builtins.h
-        ${DERIVED_SOURCES_WEBCORE_DIR}/${_name}BuiltinsWrapper.h
</del><ins>+        ${DERIVED_SOURCES_WEBCORE_DIR}/${_objectName}Builtins.h
+        ${DERIVED_SOURCES_WEBCORE_DIR}/${_objectName}BuiltinsWrapper.h
</ins><span class="cx">     )
</span><del>-    ADD_SOURCE_WEBCORE_DERIVED_DEPENDENCIES(${WEBCORE_DIR}/bindings/js/WebCoreJSBuiltins.cpp ${_name}Builtins.cpp)
</del><ins>+    ADD_SOURCE_WEBCORE_DERIVED_DEPENDENCIES(${WEBCORE_DIR}/bindings/js/WebCoreJSBuiltins.cpp ${_objectName}Builtins.cpp)
</ins><span class="cx"> endforeach ()
</span><span class="cx"> 
</span><ins>+
</ins><span class="cx"> ADD_SOURCE_WEBCORE_DERIVED_DEPENDENCIES(${WEBCORE_DIR}/html/HTMLTreeBuilder.cpp MathMLNames.cpp)
</span><span class="cx"> 
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (191432 => 191433)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2015-10-22 03:17:06 UTC (rev 191432)
+++ trunk/Source/WebCore/ChangeLog        2015-10-22 04:39:01 UTC (rev 191433)
</span><span class="lines">@@ -1,3 +1,36 @@
</span><ins>+2015-10-21  Brian Burg  &lt;bburg@apple.com&gt;
+
+        Restructure generate-js-bindings script to be modular and testable
+        https://bugs.webkit.org/show_bug.cgi?id=149929
+
+        Reviewed by Alex Christensen.
+
+        * CMakeLists.txt:
+
+            Define JavaScriptCore_SCRIPTS_DIR explicitly so the add_custom_command and
+            shared file lists are identical between JavaScriptCore and WebCore.
+
+            The output files additionally depend on all builtin generator script files.
+
+        * DerivedSources.make:
+
+            Use JavaScriptCore_SCRIPTS_DIR so that the rule for code generation and
+            shared file lists are identical between JavaScriptCore and WebCore.
+
+            The output files additionally depend on all builtin generator script files.
+
+        * WebCore.xcodeproj/project.pbxproj:
+
+            Define JavaScriptCore_SCRIPTS_DIR before calling DerivedSources.make.
+            This will eventually be merged with the other similar script paths.
+
+        * bindings/js/JSDOMWindowBase.cpp:
+        (WebCore::JSDOMWindowBase::finishCreation):
+
+            Update the generated builtin macro names.
+
+        * generate-js-builtins: Removed.
+
</ins><span class="cx"> 2015-10-21  Alex Christensen  &lt;achristensen@webkit.org&gt;
</span><span class="cx"> 
</span><span class="cx">         Recommit r191428.
</span></span></pre></div>
<a id="trunkSourceWebCoreDerivedSourcesmake"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/DerivedSources.make (191432 => 191433)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/DerivedSources.make        2015-10-22 03:17:06 UTC (rev 191432)
+++ trunk/Source/WebCore/DerivedSources.make        2015-10-22 04:39:01 UTC (rev 191433)
</span><span class="lines">@@ -797,7 +797,6 @@
</span><span class="cx">     $(WORKERGLOBALSCOPE_CONSTRUCTORS_FILE) \
</span><span class="cx">     $(JS_DOM_HEADERS) \
</span><span class="cx">     $(WEB_DOM_HEADERS) \
</span><del>-    $(WEBCORE_JS_BUILTINS) \
</del><span class="cx">     \
</span><span class="cx">     CSSGrammar.cpp \
</span><span class="cx">     CSSPropertyNames.cpp \
</span><span class="lines">@@ -1256,7 +1255,7 @@
</span><span class="cx"> 
</span><span class="cx"> # WebCore JS Builtins
</span><span class="cx"> 
</span><del>-WEBCORE_JS_BUILTINS = \
</del><ins>+WebCore_BUILTINS_SOURCES = \
</ins><span class="cx">     $(WebCore)/Modules/mediastream/MediaDevices.js \
</span><span class="cx">     $(WebCore)/Modules/streams/ByteLengthQueuingStrategy.js \
</span><span class="cx">     $(WebCore)/Modules/streams/CountQueuingStrategy.js \
</span><span class="lines">@@ -1269,11 +1268,32 @@
</span><span class="cx">     $(WebCore)/Modules/streams/WritableStreamInternals.js \
</span><span class="cx"> #
</span><span class="cx"> 
</span><del>-all : $(WEBCORE_JS_BUILTINS:%.js=%Builtins.cpp)
</del><ins>+BUILTINS_GENERATOR_SCRIPTS = \
+    $(JavaScriptCore_SCRIPTS_DIR)/builtins.py \
+    $(JavaScriptCore_SCRIPTS_DIR)/builtins_generator.py \
+    $(JavaScriptCore_SCRIPTS_DIR)/builtins_model.py \
+    $(JavaScriptCore_SCRIPTS_DIR)/builtins_templates.py \
+    $(JavaScriptCore_SCRIPTS_DIR)/builtins_generate_combined_header.py \
+    $(JavaScriptCore_SCRIPTS_DIR)/builtins_generate_combined_implementation.py \
+    $(JavaScriptCore_SCRIPTS_DIR)/builtins_generate_separate_header.py \
+    $(JavaScriptCore_SCRIPTS_DIR)/builtins_generate_separate_implementation.py \
+    $(JavaScriptCore_SCRIPTS_DIR)/builtins_generate_separate_wrapper.py \
+    $(JavaScriptCore_SCRIPTS_DIR)/generate-js-builtins.py \
+    $(JavaScriptCore_SCRIPTS_DIR)/lazywriter.py \
+#
</ins><span class="cx"> 
</span><del>-%Builtins.cpp: %.js
-        $(PYTHON) $(WebCore)/generate-js-builtins --input $&lt; --generate_js_builtins_path $(JavaScriptCore_SCRIPTS_DIR)
</del><ins>+# Adding/removing scripts should trigger regeneration, but changing which builtins are
+# generated should not affect other builtins when not passing '--combined' to the generator.
</ins><span class="cx"> 
</span><ins>+.PHONY: force
+WebCore_BUILTINS_DEPENDENCIES_LIST : $(JavaScriptCore_SCRIPTS_DIR)/UpdateContents.py force
+        $(PYTHON) $(JavaScriptCore_SCRIPTS_DIR)/UpdateContents.py '$(BUILTINS_GENERATOR_SCRIPTS)' $@
+
+%Builtins.h: %.js $(BUILTINS_GENERATOR_SCRIPTS) WebCore_BUILTINS_DEPENDENCIES_LIST
+        $(PYTHON) $(JavaScriptCore_SCRIPTS_DIR)/generate-js-builtins.py --output-directory . --framework WebCore $&lt;
+
+all : $(notdir $(WebCore_BUILTINS_SOURCES:%.js=%Builtins.h))
+
</ins><span class="cx"> # ------------------------
</span><span class="cx"> 
</span><span class="cx"> # Mac-specific rules
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (191432 => 191433)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2015-10-22 03:17:06 UTC (rev 191432)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2015-10-22 04:39:01 UTC (rev 191433)
</span><span class="lines">@@ -1147,7 +1147,7 @@
</span><span class="cx">                 2D5002F81B56D7810020AAF7 /* DOMPath.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2D5002F71B56D7810020AAF7 /* DOMPath.cpp */; };
</span><span class="cx">                 2D5002FB1B56D7990020AAF7 /* PathUtilities.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2D5002F91B56D7990020AAF7 /* PathUtilities.cpp */; };
</span><span class="cx">                 2D5002FC1B56D7990020AAF7 /* PathUtilities.h in Headers */ = {isa = PBXBuildFile; fileRef = 2D5002FA1B56D7990020AAF7 /* PathUtilities.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><del>-                2D5036681BCDDDC400E20BB3 /* GestureEvents.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2D5036671BCDDDC400E20BB3 /* GestureEvents.cpp */; settings = {ASSET_TAGS = (); }; };
</del><ins>+                2D5036681BCDDDC400E20BB3 /* GestureEvents.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2D5036671BCDDDC400E20BB3 /* GestureEvents.cpp */; };
</ins><span class="cx">                 2D5646B01B8F8493003C4994 /* DictionaryPopupInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = 2D5646AF1B8F8493003C4994 /* DictionaryPopupInfo.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 2D58D8551A15F65F00A5F726 /* DataDetection.h in Headers */ = {isa = PBXBuildFile; fileRef = 2D58D8531A15F65F00A5F726 /* DataDetection.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 2D58D8561A15F65F00A5F726 /* DataDetection.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2D58D8541A15F65F00A5F726 /* DataDetection.mm */; };
</span><span class="lines">@@ -5510,8 +5510,8 @@
</span><span class="cx">                 BC779E171BB227CA00CAA8BF /* StyleCustomPropertyData.h in Headers */ = {isa = PBXBuildFile; fileRef = BC779E151BB226A200CAA8BF /* StyleCustomPropertyData.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 BC7D8FEF1BD03B6400FFE540 /* CSSUnsetValue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC7D8FED1BD03B6400FFE540 /* CSSUnsetValue.cpp */; };
</span><span class="cx">                 BC7D8FF01BD03B6400FFE540 /* CSSUnsetValue.h in Headers */ = {isa = PBXBuildFile; fileRef = BC7D8FEE1BD03B6400FFE540 /* CSSUnsetValue.h */; };
</span><del>-                BC7D8FF31BD1A47900FFE540 /* CSSRevertValue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC7D8FF11BD1A47900FFE540 /* CSSRevertValue.cpp */; settings = {ASSET_TAGS = (); }; };
-                BC7D8FF41BD1A47900FFE540 /* CSSRevertValue.h in Headers */ = {isa = PBXBuildFile; fileRef = BC7D8FF21BD1A47900FFE540 /* CSSRevertValue.h */; settings = {ASSET_TAGS = (); }; };
</del><ins>+                BC7D8FF31BD1A47900FFE540 /* CSSRevertValue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC7D8FF11BD1A47900FFE540 /* CSSRevertValue.cpp */; };
+                BC7D8FF41BD1A47900FFE540 /* CSSRevertValue.h in Headers */ = {isa = PBXBuildFile; fileRef = BC7D8FF21BD1A47900FFE540 /* CSSRevertValue.h */; };
</ins><span class="cx">                 BC7F44A80B9E324E00A9D081 /* ImageObserver.h in Headers */ = {isa = PBXBuildFile; fileRef = BC7F44A70B9E324E00A9D081 /* ImageObserver.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 BC7FA6200D1F0CBD00DB22A9 /* LiveNodeList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC7FA61E0D1F0CBD00DB22A9 /* LiveNodeList.cpp */; };
</span><span class="cx">                 BC7FA6210D1F0CBD00DB22A9 /* LiveNodeList.h in Headers */ = {isa = PBXBuildFile; fileRef = BC7FA61F0D1F0CBD00DB22A9 /* LiveNodeList.h */; };
</span><span class="lines">@@ -11361,7 +11361,6 @@
</span><span class="cx">                 98CE4325129E00BD005821DC /* LinkLoader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LinkLoader.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 98CE4329129E00E5005821DC /* LinkLoader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LinkLoader.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 98EB1F941313FE0500D0E1EA /* NotImplemented.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NotImplemented.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><del>-                9908B0EC1BCACF1F00ED0F65 /* generate-js-builtins */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.python; path = &quot;generate-js-builtins&quot;; sourceTree = &quot;&lt;group&gt;&quot;; };
</del><span class="cx">                 9908B0ED1BCACF9100ED0F65 /* ByteLengthQueuingStrategy.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = ByteLengthQueuingStrategy.js; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 9908B0EE1BCACF9100ED0F65 /* CountQueuingStrategy.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = CountQueuingStrategy.js; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 9908B0EF1BCACF9100ED0F65 /* ReadableStream.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = ReadableStream.js; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -11390,6 +11389,7 @@
</span><span class="cx">                 9908B1001BCAD07D00ED0F65 /* ReadableStreamReaderBuiltinsWrapper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ReadableStreamReaderBuiltinsWrapper.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 9920398018B95BC600B39AF9 /* UserInputBridge.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UserInputBridge.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 9920398118B95BC600B39AF9 /* UserInputBridge.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UserInputBridge.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><ins>+                9994E5D81BD843A300F2D835 /* MediaDevices.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = MediaDevices.js; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx">                 99C7CCB218C663E40032E413 /* MemoizedDOMResult.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MemoizedDOMResult.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 99C7CCB418C6B8990032E413 /* MemoizedDOMResult.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MemoizedDOMResult.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 99CC0B3818BE9849006CEBCC /* AllReplayInputs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AllReplayInputs.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -15039,6 +15039,7 @@
</span><span class="cx">                                 5EA725CD1ACABCD900EAD17B /* MediaDevices.cpp */,
</span><span class="cx">                                 5EA725CE1ACABCD900EAD17B /* MediaDevices.h */,
</span><span class="cx">                                 5EA725CF1ACABCD900EAD17B /* MediaDevices.idl */,
</span><ins>+                                9994E5D81BD843A300F2D835 /* MediaDevices.js */,
</ins><span class="cx">                                 07394EC71BAB2CCD00BE99CD /* MediaDevicesRequest.cpp */,
</span><span class="cx">                                 07394EC91BAB2CD700BE99CD /* MediaDevicesRequest.h */,
</span><span class="cx">                                 07C59B6517F784BA000FBCBB /* MediaSourceStates.cpp */,
</span><span class="lines">@@ -15357,7 +15358,6 @@
</span><span class="cx">                 0867D691FE84028FC02AAC07 /* WebKit */ = {
</span><span class="cx">                         isa = PBXGroup;
</span><span class="cx">                         children = (
</span><del>-                                9908B0EC1BCACF1F00ED0F65 /* generate-js-builtins */,
</del><span class="cx">                                 65C97AF208EA908800ACD273 /* config.h */,
</span><span class="cx">                                 EDEC98020AED7E170059137F /* WebCorePrefix.h */,
</span><span class="cx">                                 9307061309E0CA8200B17FE4 /* DerivedSources.make */,
</span><span class="lines">@@ -17265,9 +17265,9 @@
</span><span class="cx">                                 1A1414B413A0F0500019996C /* WebKitFontFamilyNames.h */,
</span><span class="cx">                                 99CC0B6818BEA1FF006CEBCC /* WebReplayInputs.cpp */,
</span><span class="cx">                                 99CC0B6918BEA1FF006CEBCC /* WebReplayInputs.h */,
</span><ins>+                                9908B0F91BCAD07D00ED0F75 /* WritableStreamBuiltins.cpp */,
</ins><span class="cx">                                 9B03D8061BB3110D00B764E8 /* WritableStreamBuiltins.h */,
</span><span class="cx">                                 9B03D8071BB3110D00B764E8 /* WritableStreamBuiltinsWrapper.h */,
</span><del>-                                9908B0F91BCAD07D00ED0F75 /* WritableStreamBuiltins.cpp */,
</del><span class="cx">                                 9908B0FD1BCAD07D00ED0F75 /* WritableStreamInternalsBuiltins.cpp */,
</span><span class="cx">                                 9B03D8061BB3110D00B764E9 /* WritableStreamInternalsBuiltins.h */,
</span><span class="cx">                                 9B03D8071BB3110D00B764EA /* WritableStreamInternalsBuiltinsWrapper.h */,
</span><span class="lines">@@ -29134,6 +29134,7 @@
</span><span class="cx">                                 9746AF2614F4DDE6003E7A70 /* GeolocationController.cpp in Sources */,
</span><span class="cx">                                 0FB6252E18DE1B1500A07C05 /* GeometryUtilities.cpp in Sources */,
</span><span class="cx">                                 46C83EFD1A9BBE2900A79A41 /* GeoNotifier.cpp in Sources */,
</span><ins>+                                2D5036681BCDDDC400E20BB3 /* GestureEvents.cpp in Sources */,
</ins><span class="cx">                                 B2AFFC830D00A5C10030074D /* GlyphPageMac.cpp in Sources */,
</span><span class="cx">                                 BC53C6080DA56C570021EB5D /* Gradient.cpp in Sources */,
</span><span class="cx">                                 BC53C60B0DA56CF10021EB5D /* GradientCG.cpp in Sources */,
</span><span class="lines">@@ -29761,7 +29762,6 @@
</span><span class="cx">                                 0705853317FDE6D9005F2BCB /* JSMediaTrackConstraints.cpp in Sources */,
</span><span class="cx">                                 0705853517FDE6D9005F2BCB /* JSMediaTrackConstraintSet.cpp in Sources */,
</span><span class="cx">                                 E107400D0E77BDC00033AF24 /* JSMessageChannel.cpp in Sources */,
</span><del>-                                0FEF20CE1BD4A24100128E5D /* LengthSize.cpp in Sources */,
</del><span class="cx">                                 E1A5F99B0E7EAA2500AF85EA /* JSMessageChannelCustom.cpp in Sources */,
</span><span class="cx">                                 75793EC80D0CE72D007FC0AC /* JSMessageEvent.cpp in Sources */,
</span><span class="cx">                                 410B7E721045FAB000D8224F /* JSMessageEventCustom.cpp in Sources */,
</span><span class="lines">@@ -30174,6 +30174,7 @@
</span><span class="cx">                                 51B2417B0D931F3F00E83F5C /* LegacyWebArchiveMac.mm in Sources */,
</span><span class="cx">                                 BCE65BEA0EACDF16007E4533 /* Length.cpp in Sources */,
</span><span class="cx">                                 E55F497A151B888000BB67DB /* LengthFunctions.cpp in Sources */,
</span><ins>+                                0FEF20CE1BD4A24100128E5D /* LengthSize.cpp in Sources */,
</ins><span class="cx">                                 FFB698CC1833EE0D00158A31 /* LineBreaker.cpp in Sources */,
</span><span class="cx">                                 89B5EAA111E8003D00F2367E /* LineEnding.cpp in Sources */,
</span><span class="cx">                                 FFB698CF183402BB00158A31 /* LineInfo.cpp in Sources */,
</span><span class="lines">@@ -30505,7 +30506,6 @@
</span><span class="cx">                                 D302754912A5FE84004BD828 /* RenderDetailsMarker.cpp in Sources */,
</span><span class="cx">                                 9B32CDAA13DF7FA900F34D13 /* RenderedPosition.cpp in Sources */,
</span><span class="cx">                                 E43A023D17EB3713004CDD25 /* RenderElement.cpp in Sources */,
</span><del>-                                0FEF20D01BD4A64F00128E5D /* RenderStyleConstants.cpp in Sources */,
</del><span class="cx">                                 0F5B7A5410F65D7A00376302 /* RenderEmbeddedObject.cpp in Sources */,
</span><span class="cx">                                 A8EA73C30A1900E300A8EF5F /* RenderFieldset.cpp in Sources */,
</span><span class="cx">                                 066C77300AB603FD00238CC4 /* RenderFileUploadControl.cpp in Sources */,
</span><span class="lines">@@ -30577,6 +30577,7 @@
</span><span class="cx">                                 AB247A6C0AFD6383003FA5FD /* RenderSlider.cpp in Sources */,
</span><span class="cx">                                 31955A86160D199000858025 /* RenderSnapshottedPlugIn.cpp in Sources */,
</span><span class="cx">                                 BC8C8FAD0DDCD31B00B592F4 /* RenderStyle.cpp in Sources */,
</span><ins>+                                0FEF20D01BD4A64F00128E5D /* RenderStyleConstants.cpp in Sources */,
</ins><span class="cx">                                 0F4E57171313276200CF85AF /* RenderSVGAllInOne.cpp in Sources */,
</span><span class="cx">                                 A8DF4AEC0980C42C0052981B /* RenderTable.cpp in Sources */,
</span><span class="cx">                                 6ED878C4147493F4004C3597 /* RenderTableCaption.cpp in Sources */,
</span><span class="lines">@@ -30892,7 +30893,6 @@
</span><span class="cx">                                 24D912B713CA9A6900D21915 /* SVGAltGlyphItemElement.cpp in Sources */,
</span><span class="cx">                                 B22279760D00BF220071B782 /* SVGAngle.cpp in Sources */,
</span><span class="cx">                                 B22279790D00BF220071B782 /* SVGAnimateColorElement.cpp in Sources */,
</span><del>-                                2D5036681BCDDDC400E20BB3 /* GestureEvents.cpp in Sources */,
</del><span class="cx">                                 4362C7B913AC6F1A00344BEB /* SVGAnimatedAngle.cpp in Sources */,
</span><span class="cx">                                 431A308813B8F978007791E4 /* SVGAnimatedBoolean.cpp in Sources */,
</span><span class="cx">                                 43A625F913B3304000AC94B8 /* SVGAnimatedColor.cpp in Sources */,
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSDOMWindowBasecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSDOMWindowBase.cpp (191432 => 191433)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSDOMWindowBase.cpp        2015-10-22 03:17:06 UTC (rev 191432)
+++ trunk/Source/WebCore/bindings/js/JSDOMWindowBase.cpp        2015-10-22 04:39:01 UTC (rev 191433)
</span><span class="lines">@@ -96,19 +96,19 @@
</span><span class="cx">         GlobalPropertyInfo(\
</span><span class="cx">             static_cast&lt;JSVMClientData*&gt;(vm.clientData)-&gt;builtinFunctions().readableStreamInternalsBuiltins().name##PrivateName(), \
</span><span class="cx">             m_privateFunctions.readableStreamInternals().m_##name##Function.get() , DontDelete | ReadOnly),
</span><del>-        WEBCOREREADABLESTREAMINTERNALS_FOREACH_BUILTIN_FUNCTION_NAME(DECLARE_GLOBAL_STATIC)
</del><ins>+        WEBCORE_FOREACH_READABLESTREAMINTERNALS_BUILTIN_FUNCTION_NAME(DECLARE_GLOBAL_STATIC)
</ins><span class="cx"> #undef DECLARE_GLOBAL_STATIC
</span><span class="cx"> #define DECLARE_GLOBAL_STATIC(name)\
</span><span class="cx">         GlobalPropertyInfo(\
</span><span class="cx">             static_cast&lt;JSVMClientData*&gt;(vm.clientData)-&gt;builtinFunctions().streamInternalsBuiltins().name##PrivateName(), \
</span><span class="cx">             m_privateFunctions.streamInternals().m_##name##Function.get() , DontDelete | ReadOnly),
</span><del>-        WEBCORESTREAMINTERNALS_FOREACH_BUILTIN_FUNCTION_NAME(DECLARE_GLOBAL_STATIC)
</del><ins>+        WEBCORE_FOREACH_STREAMINTERNALS_BUILTIN_FUNCTION_NAME(DECLARE_GLOBAL_STATIC)
</ins><span class="cx"> #undef DECLARE_GLOBAL_STATIC
</span><span class="cx"> #define DECLARE_GLOBAL_STATIC(name)\
</span><span class="cx">         GlobalPropertyInfo(\
</span><span class="cx">             static_cast&lt;JSVMClientData*&gt;(vm.clientData)-&gt;builtinFunctions().writableStreamInternalsBuiltins().name##PrivateName(), \
</span><span class="cx">             m_privateFunctions.writableStreamInternals().m_##name##Function.get() , DontDelete | ReadOnly),
</span><del>-        WEBCOREWRITABLESTREAMINTERNALS_FOREACH_BUILTIN_FUNCTION_NAME(DECLARE_GLOBAL_STATIC)
</del><ins>+        WEBCORE_FOREACH_WRITABLESTREAMINTERNALS_BUILTIN_FUNCTION_NAME(DECLARE_GLOBAL_STATIC)
</ins><span class="cx"> #undef DECLARE_GLOBAL_STATIC
</span><span class="cx"> #endif
</span><span class="cx">     };
</span></span></pre></div>
<a id="trunkSourceWebCoregeneratejsbuiltins"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/generate-js-builtins (191432 => 191433)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/generate-js-builtins        2015-10-22 03:17:06 UTC (rev 191432)
+++ trunk/Source/WebCore/generate-js-builtins        2015-10-22 04:39:01 UTC (rev 191433)
</span><span class="lines">@@ -1,181 +0,0 @@
</span><del>-#!/usr/bin/python
-# Copyright (C) 2015 Canon 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 argparse
-import filecmp
-import os
-import subprocess
-
-from string import Template
-
-
-parser = argparse.ArgumentParser()
-parser.add_argument('--output_dir', default='', help='output directory')
-parser.add_argument('--input', help='path to input JS file')
-parser.add_argument('--generate_js_builtins_path', help='path to directory containing JavaScriptCore\'s generate-js-builtins')
-
-args = parser.parse_args()
-filename = os.path.splitext(os.path.basename(args.input))[0]
-
-# generate JS builtins
-namespace = &quot;WebCore&quot;
-prefix = &quot;WEBCORE&quot; + filename.upper()
-output = os.path.join(args.output_dir, filename + &quot;Builtins&quot;)
-jsc_generate_builtin_script = os.path.join(args.generate_js_builtins_path, &quot;generate-js-builtins&quot;)
-
-subprocess.call([&quot;python&quot;, jsc_generate_builtin_script, &quot;--output&quot;, output, &quot;--namespace&quot;, namespace, &quot;--prefix&quot;, prefix, args.input], stderr=subprocess.STDOUT)
-
-# generate JS builtins wrapper
-output_base = output + &quot;Wrapper&quot;
-
-builtinsWrapperHeader = open(output_base + &quot;.h.tmp&quot;, &quot;w&quot;)
-
-builtinsWrapperHeader.write(Template(
-&quot;&quot;&quot;
-/* Generated by generate-js-builtins do not hand edit. */
-
-/*
- *
- *  This library is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public
- *  License as published by the Free Software Foundation; either
- *  version 2 of the License, or (at your option) any later version.
- *
- *  This library is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- *  Lesser General Public License for more details.
- *
- *  You should have received a copy of the GNU Lesser General Public
- *  License along with this library; if not, write to the Free Software
- *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
- */
-
-#ifndef ${Filename}BuiltinsWrapper_h
-#define ${Filename}BuiltinsWrapper_h
-
-#include &quot;${Filename}Builtins.h&quot;
-#include &lt;bytecode/UnlinkedFunctionExecutable.h&gt;
-#include &lt;builtins/BuiltinUtils.h&gt;
-#include &lt;runtime/Identifier.h&gt;
-#include &lt;runtime/JSFunction.h&gt;
-
-namespace WebCore {
-
-class ${Filename}BuiltinsWrapper : private JSC::WeakHandleOwner {
-public:
-    explicit ${Filename}BuiltinsWrapper(JSC::VM* vm)
-        : m_vm(*vm)
-        ${Prefix}_FOREACH_BUILTIN_FUNCTION_NAME(INITIALIZE_BUILTIN_NAMES)
-#define INITIALIZE_BUILTIN_SOURCE_MEMBERS(name, functionName, length) , m_##name##Source(JSC::makeSource(StringImpl::createFromLiteral(s_##name, length)))
-        ${Prefix}_FOREACH_BUILTIN(INITIALIZE_BUILTIN_SOURCE_MEMBERS)
-#undef INITIALIZE_BUILTIN_SOURCE_MEMBERS
-    {
-    }
-
-#define EXPOSE_BUILTIN_EXECUTABLES(name, functionName, length) \\
-    JSC::UnlinkedFunctionExecutable* name##Executable(); \\
-    const JSC::SourceCode&amp; name##Source() const { return m_##name##Source; }
-    ${Prefix}_FOREACH_BUILTIN(EXPOSE_BUILTIN_EXECUTABLES)
-#undef EXPOSE_BUILTIN_EXECUTABLES
-
-    ${Prefix}_FOREACH_BUILTIN_FUNCTION_NAME(DECLARE_BUILTIN_IDENTIFIER_ACCESSOR)
-
-    void exportNames();
-
-private:
-    JSC::VM&amp; m_vm;
-
-    ${Prefix}_FOREACH_BUILTIN_FUNCTION_NAME(DECLARE_BUILTIN_NAMES)
-
-#define DECLARE_BUILTIN_SOURCE_MEMBERS(name, functionName, length) \\
-    JSC::SourceCode m_##name##Source;\\
-    JSC::Weak&lt;JSC::UnlinkedFunctionExecutable&gt; m_##name##Executable;
-    ${Prefix}_FOREACH_BUILTIN(DECLARE_BUILTIN_SOURCE_MEMBERS)
-#undef DECLARE_BUILTIN_SOURCE_MEMBERS
-
-};
-
-#define DEFINE_BUILTIN_EXECUTABLES(name, functionName, length) \\
-inline JSC::UnlinkedFunctionExecutable* ${Filename}BuiltinsWrapper::name##Executable() \\
-{\\
-    if (!m_##name##Executable)\\
-        m_##name##Executable = JSC::Weak&lt;JSC::UnlinkedFunctionExecutable&gt;(JSC::createBuiltinExecutable(m_vm, m_##name##Source, functionName##PublicName(), s_##name##ConstructAbility), this, &amp;m_##name##Executable);\\
-    return m_##name##Executable.get();\\
-}
-${Prefix}_FOREACH_BUILTIN(DEFINE_BUILTIN_EXECUTABLES)
-#undef DEFINE_BUILTIN_EXECUTABLES
-
-inline void ${Filename}BuiltinsWrapper::exportNames()
-{
-#define EXPORT_FUNCTION_NAME(name) m_vm.propertyNames-&gt;appendExternalName(name##PublicName(), name##PrivateName());
-    ${Prefix}_FOREACH_BUILTIN_FUNCTION_NAME(EXPORT_FUNCTION_NAME)
-#undef EXPORT_FUNCTION_NAME
-}
-
-class ${Filename}BuiltinFunctions {
-public:
-    explicit ${Filename}BuiltinFunctions(JSC::VM&amp; vm) : m_vm(vm) { }
-
-    void init(JSC::JSGlobalObject&amp;);
-    void visit(JSC::SlotVisitor&amp;);
-
-public:
-    JSC::VM&amp; m_vm;
-
-#define DECLARE_BUILTIN_SOURCE_MEMBERS(functionName) \\
-    JSC::WriteBarrier&lt;JSC::JSFunction&gt; m_##functionName##Function;
-    ${Prefix}_FOREACH_BUILTIN_FUNCTION_NAME(DECLARE_BUILTIN_SOURCE_MEMBERS)
-#undef DECLARE_BUILTIN_SOURCE_MEMBERS
-};
-
-inline void ${Filename}BuiltinFunctions::init(JSC::JSGlobalObject&amp; globalObject)
-{
-#define EXPORT_FUNCTION(codeName, functionName, length)\\
-    m_##functionName##Function.set(m_vm, &amp;globalObject, JSC::JSFunction::createBuiltinFunction(m_vm, codeName##Generator(m_vm), &amp;globalObject));
-    ${Prefix}_FOREACH_BUILTIN(EXPORT_FUNCTION)
-#undef EXPORT_FUNCTION
-}
-
-inline void ${Filename}BuiltinFunctions::visit(JSC::SlotVisitor&amp; visitor)
-{
-#define VISIT_FUNCTION(name) visitor.append(&amp;m_##name##Function);
-    ${Prefix}_FOREACH_BUILTIN_FUNCTION_NAME(VISIT_FUNCTION)
-#undef VISIT_FUNCTION
-}
-
-} // namespace WebCore
-
-#endif // ${Filename}BuiltinsWrapper_h
-&quot;&quot;&quot;).substitute(dict(Filename=filename, Prefix=prefix)))
-
-builtinsWrapperHeader.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)):
-    if (os.path.exists(output_base + &quot;.h&quot;)):
-        os.remove(output_base + &quot;.h&quot;)
-    os.rename(output_base + &quot;.h.tmp&quot;, output_base + &quot;.h&quot;)
-else:
-    os.remove(output_base + &quot;.h.tmp&quot;)
</del></span></pre></div>
<a id="trunkToolsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Tools/ChangeLog (191432 => 191433)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/ChangeLog        2015-10-22 03:17:06 UTC (rev 191432)
+++ trunk/Tools/ChangeLog        2015-10-22 04:39:01 UTC (rev 191433)
</span><span class="lines">@@ -1,3 +1,30 @@
</span><ins>+2015-10-21  Brian Burg  &lt;bburg@apple.com&gt;
+
+        Restructure generate-js-bindings script to be modular and testable
+        https://bugs.webkit.org/show_bug.cgi?id=149929
+
+        Reviewed by Alex Christensen.
+
+        Add a stub shell script and basic webkitpy support for running builtins
+        generator tests.
+
+        * Scripts/run-builtins-generator-tests: Added.
+        (main):
+        * Scripts/webkitpy/codegen/__init__.py: Added.
+        * Scripts/webkitpy/codegen/main.py: Added.
+
+            The only interesting difference here from the inspector protocol
+            generator equivalent is that this implementation decodes the target
+            framework and output mode (combined or separate) from the test's file name.
+
+        (BuiltinsGeneratorTests):
+        (BuiltinsGeneratorTests.__init__):
+        (BuiltinsGeneratorTests.generate_from_js_builtins):
+        (BuiltinsGeneratorTests.write_error_file):
+        (BuiltinsGeneratorTests.detect_changes):
+        (BuiltinsGeneratorTests.run_tests):
+        (BuiltinsGeneratorTests.main):
+
</ins><span class="cx"> 2015-10-21  Aakash Jain  &lt;aakash_jain@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         run-webkit-tests does not copy all crash logs for layout test failures on Mac
</span></span></pre></div>
<a id="trunkToolsScriptsrunbuiltinsgeneratortests"></a>
<div class="addfile"><h4>Added: trunk/Tools/Scripts/run-builtins-generator-tests (0 => 191433)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/Scripts/run-builtins-generator-tests                                (rev 0)
+++ trunk/Tools/Scripts/run-builtins-generator-tests        2015-10-22 04:39:01 UTC (rev 191433)
</span><span class="lines">@@ -0,0 +1,42 @@
</span><ins>+#!/usr/bin/env python
+# Copyright (C) 2015 Apple Inc. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+#    notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#    notice, this list of conditions and the following disclaimer in the
+#    documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``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 ITS 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 sys
+from webkitpy.common.system import executive
+
+def main(argv):
+    &quot;&quot;&quot;Runs the JS builtins code generator on test input files and compares
+    the results with reference files.
+
+    Options:
+       --reset-results: Overwrites the reference files with the generated results.
+
+    &quot;&quot;&quot;
+    reset_results = &quot;--reset-results&quot; in argv
+
+    from webkitpy.codegen.main import BuiltinsGeneratorTests
+    return BuiltinsGeneratorTests(reset_results, executive.Executive()).main()
+
+if __name__ == '__main__':
+    sys.exit(main(sys.argv))
</ins><span class="cx">Property changes on: trunk/Tools/Scripts/run-builtins-generator-tests
</span><span class="cx">___________________________________________________________________
</span></span></pre></div>
<a id="svnexecutable"></a>
<div class="addfile"><h4>Added: svn:executable</h4></div>
<a id="trunkToolsScriptswebkitpycodegen__init__py"></a>
<div class="addfile"><h4>Added: trunk/Tools/Scripts/webkitpy/codegen/__init__.py (0 => 191433)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/Scripts/webkitpy/codegen/__init__.py                                (rev 0)
+++ trunk/Tools/Scripts/webkitpy/codegen/__init__.py        2015-10-22 04:39:01 UTC (rev 191433)
</span><span class="lines">@@ -0,0 +1 @@
</span><ins>+# Required for Python to search this directory for module files
</ins></span></pre></div>
<a id="trunkToolsScriptswebkitpycodegenmainpy"></a>
<div class="addfile"><h4>Added: trunk/Tools/Scripts/webkitpy/codegen/main.py (0 => 191433)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/Scripts/webkitpy/codegen/main.py                                (rev 0)
+++ trunk/Tools/Scripts/webkitpy/codegen/main.py        2015-10-22 04:39:01 UTC (rev 191433)
</span><span class="lines">@@ -0,0 +1,144 @@
</span><ins>+# Copyright (C) 2011 Google Inc. All rights reserved.
+# 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 THE COPYRIGHT HOLDERS AND CONTRIBUTORS &quot;AS
+# IS&quot; 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 THE COPYRIGHT
+# HOLDER 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 os
+import os.path
+import shutil
+import sys
+import tempfile
+from webkitpy.common.checkout.scm.detection import detect_scm_system
+from webkitpy.common.system.executive import ScriptError
+
+
+class BuiltinsGeneratorTests:
+
+    def __init__(self, reset_results, executive):
+        self.reset_results = reset_results
+        self.executive = executive
+
+    def generate_from_js_builtins(self, builtins_file, output_directory, framework_name=&quot;&quot;, combined_outputs=False):
+        cmd = ['python',
+               'JavaScriptCore/Scripts/generate-js-builtins.py',
+               '--output-directory', output_directory,
+               '--force',
+               '--framework', framework_name,
+               '--test']
+
+        if combined_outputs:
+            cmd.append('--combined')
+
+        cmd.append(builtins_file)
+
+        exit_code = 0
+        try:
+            stderr_output = self.executive.run_command(cmd)
+            if stderr_output:
+                self.write_error_file(builtins_file, output_directory, stderr_output)
+        except ScriptError, e:
+            print e.output
+            exit_code = e.exit_code
+        return exit_code
+
+    def write_error_file(self, input_filepath, output_directory, error_output):
+        output_filepath = os.path.join(output_directory, os.path.basename(input_filepath) + '-error')
+
+        with open(output_filepath, &quot;w&quot;) as output_file:
+            output_file.write(error_output)
+
+    def detect_changes(self, work_directory, reference_directory):
+        changes_found = False
+        for output_file in os.listdir(work_directory):
+            cmd = ['diff',
+                   '-u',
+                   '-N',
+                   os.path.join(reference_directory, output_file),
+                   os.path.join(work_directory, output_file)]
+
+            exit_code = 0
+            try:
+                output = self.executive.run_command(cmd)
+            except ScriptError, e:
+                output = e.output
+                exit_code = e.exit_code
+
+            if exit_code or output:
+                print 'FAIL: %s' % output_file
+                print output
+                changes_found = True
+            else:
+                print 'PASS: %s' % output_file
+        return changes_found
+
+    def run_tests(self, input_directory, reference_directory):
+        work_directory = reference_directory
+
+        passed = True
+        for input_file in os.listdir(input_directory):
+            (test_name, extension) = os.path.splitext(input_file)
+            if extension != '.js':
+                continue
+            # Generate output into the work directory (either the given one or a
+            # temp one if not reset_results is performed)
+            if not self.reset_results:
+                work_directory = tempfile.mkdtemp()
+
+            (framework_name, test_case, output_mode) = test_name.split('-')
+            if not framework_name or not output_mode or not test_case:
+                print &quot;Invalid test case name: should be Framework-TestCaseName-OutputMode.js&quot;
+                continue
+
+            combined_outputs = output_mode == &quot;Combined&quot;
+            if self.generate_from_js_builtins(os.path.join(input_directory, input_file), work_directory, framework_name=framework_name, combined_outputs=combined_outputs):
+                passed = False
+
+            if self.reset_results:
+                print &quot;Reset results for test: %s&quot; % (input_file)
+                continue
+
+            # Detect changes
+            if self.detect_changes(work_directory, reference_directory):
+                passed = False
+            shutil.rmtree(work_directory)
+
+        return passed
+
+    def main(self):
+        current_scm = detect_scm_system(os.curdir)
+        os.chdir(os.path.join(current_scm.checkout_root, 'Source'))
+
+        all_tests_passed = True
+
+        input_directory = os.path.join('JavaScriptCore', 'Scripts', 'tests', 'builtins')
+        reference_directory = os.path.join('JavaScriptCore', 'Scripts', 'tests', 'builtins', 'expected')
+        if not self.run_tests(input_directory, reference_directory):
+            all_tests_passed = False
+
+        print ''
+        if all_tests_passed:
+            print 'All tests PASS!'
+            return 0
+        else:
+            print 'Some tests FAIL! (To update the reference files, execute &quot;run-builtins-generator-tests --reset-results&quot;)'
+            return -1
</ins></span></pre>
</div>
</div>

</body>
</html>