Unreviewed, rolling out r221327.
authorryanhaddad@apple.com <ryanhaddad@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 30 Aug 2017 22:54:22 +0000 (22:54 +0000)
committerryanhaddad@apple.com <ryanhaddad@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 30 Aug 2017 22:54:22 +0000 (22:54 +0000)
This change caused test262 failures.

Reverted changeset:

"[JSC] Use reifying system for "name" property of builtin
JSFunction"
https://bugs.webkit.org/show_bug.cgi?id=175260
http://trac.webkit.org/changeset/221327

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@221404 268f45cc-cd09-0410-ab3c-d52691b4dbfc

58 files changed:
JSTests/ChangeLog
JSTests/stress/accessors-get-set-prefix.js
JSTests/stress/builtin-function-name.js [deleted file]
LayoutTests/ChangeLog
LayoutTests/js/dom/builtin-getter-name-expected.txt [deleted file]
LayoutTests/js/dom/builtin-getter-name.html [deleted file]
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/Scripts/builtins/builtins_generate_combined_header.py
Source/JavaScriptCore/Scripts/builtins/builtins_generate_combined_implementation.py
Source/JavaScriptCore/Scripts/builtins/builtins_generate_separate_header.py
Source/JavaScriptCore/Scripts/builtins/builtins_generate_separate_implementation.py
Source/JavaScriptCore/Scripts/builtins/builtins_model.py
Source/JavaScriptCore/Scripts/builtins/builtins_templates.py
Source/JavaScriptCore/Scripts/tests/builtins/JavaScriptCore-Builtin.prototype-Combined.js
Source/JavaScriptCore/Scripts/tests/builtins/JavaScriptCore-Builtin.prototype-Separate.js
Source/JavaScriptCore/Scripts/tests/builtins/expected/JavaScriptCore-Builtin.Promise-Combined.js-result
Source/JavaScriptCore/Scripts/tests/builtins/expected/JavaScriptCore-Builtin.Promise-Separate.js-result
Source/JavaScriptCore/Scripts/tests/builtins/expected/JavaScriptCore-Builtin.prototype-Combined.js-result
Source/JavaScriptCore/Scripts/tests/builtins/expected/JavaScriptCore-Builtin.prototype-Separate.js-result
Source/JavaScriptCore/Scripts/tests/builtins/expected/JavaScriptCore-BuiltinConstructor-Combined.js-result
Source/JavaScriptCore/Scripts/tests/builtins/expected/JavaScriptCore-BuiltinConstructor-Separate.js-result
Source/JavaScriptCore/Scripts/tests/builtins/expected/JavaScriptCore-InternalClashingNames-Combined.js-result
Source/JavaScriptCore/Scripts/tests/builtins/expected/WebCore-AnotherGuardedInternalBuiltin-Separate.js-result
Source/JavaScriptCore/Scripts/tests/builtins/expected/WebCore-ArbitraryConditionalGuard-Separate.js-result
Source/JavaScriptCore/Scripts/tests/builtins/expected/WebCore-GuardedBuiltin-Separate.js-result
Source/JavaScriptCore/Scripts/tests/builtins/expected/WebCore-GuardedInternalBuiltin-Separate.js-result
Source/JavaScriptCore/Scripts/tests/builtins/expected/WebCore-UnguardedBuiltin-Separate.js-result
Source/JavaScriptCore/Scripts/tests/builtins/expected/WebCore-xmlCasingTest-Separate.js-result
Source/JavaScriptCore/builtins/AsyncIteratorPrototype.js
Source/JavaScriptCore/builtins/BuiltinExecutables.cpp
Source/JavaScriptCore/builtins/BuiltinExecutables.h
Source/JavaScriptCore/builtins/FunctionPrototype.js
Source/JavaScriptCore/builtins/GlobalOperations.js
Source/JavaScriptCore/builtins/IteratorPrototype.js
Source/JavaScriptCore/builtins/RegExpPrototype.js
Source/JavaScriptCore/jsc.cpp
Source/JavaScriptCore/runtime/AsyncIteratorPrototype.cpp
Source/JavaScriptCore/runtime/FunctionPrototype.cpp
Source/JavaScriptCore/runtime/IteratorPrototype.cpp
Source/JavaScriptCore/runtime/JSFunction.cpp
Source/JavaScriptCore/runtime/JSFunction.h
Source/JavaScriptCore/runtime/JSGlobalObject.cpp
Source/JavaScriptCore/runtime/JSObject.cpp
Source/JavaScriptCore/runtime/JSTypedArrayViewPrototype.cpp
Source/JavaScriptCore/runtime/Lookup.cpp
Source/JavaScriptCore/runtime/MapPrototype.cpp
Source/JavaScriptCore/runtime/RegExpPrototype.cpp
Source/JavaScriptCore/runtime/SetPrototype.cpp
Source/WebCore/ChangeLog
Source/WebCore/Modules/fetch/FetchResponse.js
Source/WebCore/Modules/streams/ReadableByteStreamController.js
Source/WebCore/Modules/streams/ReadableStream.js
Source/WebCore/Modules/streams/ReadableStreamBYOBReader.js
Source/WebCore/Modules/streams/ReadableStreamBYOBRequest.js
Source/WebCore/Modules/streams/ReadableStreamDefaultController.js
Source/WebCore/Modules/streams/ReadableStreamDefaultReader.js
Source/WebCore/Modules/streams/WritableStream.js
Source/WebCore/bindings/js/JSDOMBuiltinConstructor.h

index f6eb676..0b0c89e 100644 (file)
@@ -1,3 +1,16 @@
+2017-08-30  Ryan Haddad  <ryanhaddad@apple.com>
+
+        Unreviewed, rolling out r221327.
+
+        This change caused test262 failures.
+
+        Reverted changeset:
+
+        "[JSC] Use reifying system for "name" property of builtin
+        JSFunction"
+        https://bugs.webkit.org/show_bug.cgi?id=175260
+        http://trac.webkit.org/changeset/221327
+
 2017-08-30  Saam Barati  <sbarati@apple.com>
 
         semicolon is being interpreted as an = in the LiteralParser
index 655bc6c..c2d3a5e 100644 (file)
@@ -14,15 +14,8 @@ function tryGetOwnPropertyDescriptorGetName(obj, property, expectedName)
 }
 
 tryGetOwnPropertyDescriptorGetName(Array, Symbol.species, "get [Symbol.species]");
-tryGetOwnPropertyDescriptorGetName(Map, Symbol.species, "get [Symbol.species]");
-tryGetOwnPropertyDescriptorGetName(Set, Symbol.species, "get [Symbol.species]");
-tryGetOwnPropertyDescriptorGetName(RegExp, Symbol.species, "get [Symbol.species]");
-tryGetOwnPropertyDescriptorGetName(Promise, Symbol.species, "get [Symbol.species]");
 tryGetOwnPropertyDescriptorGetName(Map.prototype, "size", "get size");
 tryGetOwnPropertyDescriptorGetName(Set.prototype, "size", "get size");
-tryGetOwnPropertyDescriptorGetName(RegExp.prototype, "flags", "get flags");
-tryGetOwnPropertyDescriptorGetName(RegExp.prototype, "sticky", "get sticky");
-tryGetOwnPropertyDescriptorGetName(RegExp.prototype, "source", "get source");
 
 if (Object.__lookupGetter__("__proto__").name !== "get __proto__")
     throw "Expected Object __proto__ getter to be named \"get __proto\"";
diff --git a/JSTests/stress/builtin-function-name.js b/JSTests/stress/builtin-function-name.js
deleted file mode 100644 (file)
index 989447d..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-function shouldBe(actual, expected) {
-    if (actual !== expected)
-        throw new Error('bad value: ' + actual);
-}
-
-function shouldThrow(func, errorMessage) {
-    var errorThrown = false;
-    var error = null;
-    try {
-        func();
-    } catch (e) {
-        errorThrown = true;
-        error = e;
-    }
-    if (!errorThrown)
-        throw new Error('not thrown');
-    if (String(error) !== errorMessage)
-        throw new Error(`bad error: ${String(error)}`);
-}
-
-{
-    shouldBe(JSON.stringify(Object.getOwnPropertyNames(Array.prototype.filter).sort()), `["length","name"]`);
-    shouldBe(Array.prototype.filter.name, "filter");
-    shouldBe(JSON.stringify(Object.getOwnPropertyDescriptor(Array.prototype.filter, 'name')), `{"value":"filter","writable":false,"enumerable":false,"configurable":true}`);
-    shouldBe(delete Array.prototype.filter.name, true);
-    shouldBe(JSON.stringify(Object.getOwnPropertyNames(Array.prototype.filter).sort()), `["length"]`);
-}
-
-{
-    shouldThrow(function () {
-        "use strict";
-        Array.prototype.forEach.name = 42;
-    }, `TypeError: Attempted to assign to readonly property.`);
-}
-
-{
-    var resolve = null;
-    var reject = null;
-    new Promise(function (arg0, arg1) {
-        resolve = arg0;
-        reject = arg1;
-    });
-    shouldBe(resolve.name, "resolve");
-    shouldBe(JSON.stringify(Object.getOwnPropertyDescriptor(resolve, 'name')), `{"value":"resolve","writable":false,"enumerable":false,"configurable":true}`);
-    shouldBe(reject.name, "reject");
-    shouldBe(JSON.stringify(Object.getOwnPropertyDescriptor(reject, 'name')), `{"value":"reject","writable":false,"enumerable":false,"configurable":true}`);
-}
index 6d7bfa3..e549975 100644 (file)
@@ -1,3 +1,16 @@
+2017-08-30  Ryan Haddad  <ryanhaddad@apple.com>
+
+        Unreviewed, rolling out r221327.
+
+        This change caused test262 failures.
+
+        Reverted changeset:
+
+        "[JSC] Use reifying system for "name" property of builtin
+        JSFunction"
+        https://bugs.webkit.org/show_bug.cgi?id=175260
+        http://trac.webkit.org/changeset/221327
+
 2017-08-30  Youenn Fablet  <youenn@apple.com>
 
         [Cache API] Support cache names persistency
diff --git a/LayoutTests/js/dom/builtin-getter-name-expected.txt b/LayoutTests/js/dom/builtin-getter-name-expected.txt
deleted file mode 100644 (file)
index 0d4ed17..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-
-PASS FetchResponse property names 
-PASS ReadableStream property names 
-PASS ReadableStreamDefaultReader property names 
-PASS ReadableStreamBYOBReader property names 
-PASS WritableStream property names 
-
diff --git a/LayoutTests/js/dom/builtin-getter-name.html b/LayoutTests/js/dom/builtin-getter-name.html
deleted file mode 100644 (file)
index 75cf3a0..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-<title>Builtin JS getter names</title>
-<script src="../../resources/testharness.js"></script>
-<script src="../../resources/testharnessreport.js"></script>
-</head>
-<body>
-<script>
-
-function tryGetOwnPropertyDescriptorGetName(obj, property, expectedName)
-{
-    let descriptor = Object.getOwnPropertyDescriptor(obj, property);
-    assert_true(!!descriptor, `Should find property descriptor for ${property}`);
-
-    let getter = descriptor.get;
-    assert_true(!!getter, `Should find getter for ${property}`);
-
-    let getterName = getter.name;
-    assert_equals(getterName, expectedName);
-}
-
-test(() => {
-    tryGetOwnPropertyDescriptorGetName(Response.prototype, 'body', 'get body');
-    tryGetOwnPropertyDescriptorGetName(Response.prototype, 'bodyUsed', 'get bodyUsed');
-}, 'FetchResponse property names');
-
-test(() => {
-    tryGetOwnPropertyDescriptorGetName(ReadableStream.prototype, 'locked', 'get locked');
-}, 'ReadableStream property names');
-
-test(() => {
-    let stream = new ReadableStream();
-    let reader = stream.getReader();
-    tryGetOwnPropertyDescriptorGetName(reader.__proto__, 'closed', 'get closed');
-}, 'ReadableStreamDefaultReader property names');
-
-test(() => {
-    let stream = new ReadableStream({
-        start: function(c) {
-            controller = c;
-        },
-        type: "bytes"
-    });
-    let reader = stream.getReader({ mode: 'byob' });
-    tryGetOwnPropertyDescriptorGetName(reader.__proto__, 'closed', 'get closed');
-}, 'ReadableStreamBYOBReader property names');
-
-test(() => {
-    tryGetOwnPropertyDescriptorGetName(WritableStream.prototype, 'closed', 'get closed');
-    tryGetOwnPropertyDescriptorGetName(WritableStream.prototype, 'ready', 'get ready');
-    tryGetOwnPropertyDescriptorGetName(WritableStream.prototype, 'state', 'get state');
-}, 'WritableStream property names');
-
-</script>
-</body>
-</html>
index a0d7302..969529e 100644 (file)
@@ -1,3 +1,16 @@
+2017-08-30  Ryan Haddad  <ryanhaddad@apple.com>
+
+        Unreviewed, rolling out r221327.
+
+        This change caused test262 failures.
+
+        Reverted changeset:
+
+        "[JSC] Use reifying system for "name" property of builtin
+        JSFunction"
+        https://bugs.webkit.org/show_bug.cgi?id=175260
+        http://trac.webkit.org/changeset/221327
+
 2017-08-30  Matt Lewis  <jlewis3@apple.com>
 
         Unreviewed, rolling out r221384.
index cde357c..42334ff 100755 (executable)
@@ -123,11 +123,10 @@ extern const JSC::ConstructAbility s_%(codeName)sConstructAbility;""" % function
         for function in self.model().all_functions():
             function_args = {
                 'funcName': function.function_name,
-                'overriddenName': function.overridden_name,
                 'codeName': BuiltinsGenerator.mangledNameForFunction(function) + 'Code',
             }
 
-            lines.append("    macro(%(codeName)s, %(funcName)s, %(overriddenName)s, s_%(codeName)sLength) \\" % function_args)
+            lines.append("    macro(%(codeName)s, %(funcName)s, s_%(codeName)sLength) \\" % function_args)
         return '\n'.join(lines)
 
     def generate_section_for_code_name_macro(self):
index 7874dca..728beba 100644 (file)
@@ -90,9 +90,6 @@ class BuiltinsCombinedImplementationGenerator(BuiltinsGenerator):
                 ("JavaScriptCore", "runtime/VM.h"),
             ),
             (["JavaScriptCore", "WebCore"],
-                ("JavaScriptCore", "runtime/IdentifierInlines.h"),
-            ),
-            (["JavaScriptCore", "WebCore"],
                 ("JavaScriptCore", "runtime/Intrinsic.h"),
             ),
         ]
index 58c8f2a..9058367 100755 (executable)
@@ -172,11 +172,10 @@ extern const JSC::ConstructAbility s_%(codeName)sConstructAbility;""" % function
         for function in self.object.functions:
             function_args = {
                 'funcName': function.function_name,
-                'overriddenName': function.overridden_name,
                 'codeName': BuiltinsGenerator.mangledNameForFunction(function) + 'Code',
             }
 
-            lines.append("    macro(%(codeName)s, %(funcName)s, %(overriddenName)s, s_%(codeName)sLength) \\" % function_args)
+            lines.append("    macro(%(codeName)s, %(funcName)s, s_%(codeName)sLength) \\" % function_args)
         return '\n'.join(lines)
 
     def generate_section_for_code_name_macro(self):
index ced9a53..d5362bd 100644 (file)
@@ -102,9 +102,6 @@ class BuiltinsSeparateImplementationGenerator(BuiltinsGenerator):
                 ("WebCore", "bindings/js/WebCoreJSClientData.h"),
             ),
             (["JavaScriptCore", "WebCore"],
-                ("JavaScriptCore", "runtime/IdentifierInlines.h"),
-            ),
-            (["JavaScriptCore", "WebCore"],
                 ("JavaScriptCore", "runtime/Intrinsic.h"),
             ),
         ]
index 02340b7..c35bd3e 100755 (executable)
@@ -42,13 +42,11 @@ _FRAMEWORK_CONFIG_MAP = {
     },
 }
 
-functionHeadRegExp = re.compile(r"(?:@[\w|=\[\] \"\.]+\s*\n)*function\s+\w+\s*\(.*?\)", re.MULTILINE | re.DOTALL)
+functionHeadRegExp = re.compile(r"(?:@[\w|=]+\s*\n)*function\s+\w+\s*\(.*?\)", re.MULTILINE | re.DOTALL)
 functionGlobalPrivateRegExp = re.compile(r".*^@globalPrivate", re.MULTILINE | re.DOTALL)
 functionIntrinsicRegExp = re.compile(r".*^@intrinsic=(\w+)", re.MULTILINE | re.DOTALL)
 functionIsConstructorRegExp = re.compile(r".*^@constructor", re.MULTILINE | re.DOTALL)
-functionIsGetterRegExp = re.compile(r".*^@getter", re.MULTILINE | re.DOTALL)
 functionNameRegExp = re.compile(r"function\s+(\w+)\s*\(", re.MULTILINE | re.DOTALL)
-functionOverriddenNameRegExp = re.compile(r".*^@overriddenName=(\".+\")$", re.MULTILINE | re.DOTALL)
 functionParameterFinder = re.compile(r"^function\s+(?:\w+)\s*\(((?:\s*\w+)?\s*(?:\s*,\s*\w+)*)?\s*\)", re.MULTILINE | re.DOTALL)
 
 multilineCommentRegExp = re.compile(r"\/\*.*?\*\/", re.MULTILINE | re.DOTALL)
@@ -99,14 +97,13 @@ class BuiltinObject:
 
 
 class BuiltinFunction:
-    def __init__(self, function_name, function_source, parameters, is_constructor, is_global_private, intrinsic, overridden_name):
+    def __init__(self, function_name, function_source, parameters, is_constructor, is_global_private, intrinsic):
         self.function_name = function_name
         self.function_source = function_source
         self.parameters = parameters
         self.is_constructor = is_constructor
         self.is_global_private = is_global_private
         self.intrinsic = intrinsic
-        self.overridden_name = overridden_name
         self.object = None  # Set by the owning BuiltinObject
 
     @staticmethod
@@ -119,12 +116,6 @@ class BuiltinFunction:
             intrinsic = intrinsicMatch.group(1)
             function_source = functionIntrinsicRegExp.sub("", function_source)
 
-        overridden_name = None
-        overriddenNameMatch = functionOverriddenNameRegExp.search(function_source)
-        if overriddenNameMatch:
-            overridden_name = overriddenNameMatch.group(1)
-            function_source = functionOverriddenNameRegExp.sub("", function_source)
-
         if os.getenv("CONFIGURATION", "Debug").startswith("Debug"):
             function_source = lineWithOnlySingleLineCommentRegExp.sub("", function_source)
             function_source = lineWithTrailingSingleLineCommentRegExp.sub("\n", function_source)
@@ -132,19 +123,12 @@ class BuiltinFunction:
 
         function_name = functionNameRegExp.findall(function_source)[0]
         is_constructor = functionIsConstructorRegExp.match(function_source) != None
-        is_getter = functionIsGetterRegExp.match(function_source) != None
         is_global_private = functionGlobalPrivateRegExp.match(function_source) != None
         parameters = [s.strip() for s in functionParameterFinder.findall(function_source)[0].split(',')]
         if len(parameters[0]) == 0:
             parameters = []
 
-        if is_getter and not overridden_name:
-            overridden_name = "\"get %s\"" % (function_name)
-
-        if not overridden_name:
-            overridden_name = "static_cast<const char*>(nullptr)"
-
-        return BuiltinFunction(function_name, function_source, parameters, is_constructor, is_global_private, intrinsic, overridden_name)
+        return BuiltinFunction(function_name, function_source, parameters, is_constructor, is_global_private, intrinsic)
 
     def __str__(self):
         interface = "%s(%s)" % (self.function_name, ', '.join(self.parameters))
index 907a6d7..f848680 100644 (file)
@@ -67,14 +67,14 @@ THE POSSIBILITY OF SUCH DAMAGE.
     """} // namespace ${namespace}""")
 
     CombinedHeaderStaticMacros = (
-    """#define DECLARE_BUILTIN_GENERATOR(codeName, functionName, overriddenName, argumentCount) \\
+    """#define DECLARE_BUILTIN_GENERATOR(codeName, functionName, argumentCount) \\
     JSC::FunctionExecutable* codeName##Generator(JSC::VM&);
 
 ${macroPrefix}_FOREACH_BUILTIN_CODE(DECLARE_BUILTIN_GENERATOR)
 #undef DECLARE_BUILTIN_GENERATOR""")
 
     SeparateHeaderStaticMacros = (
-    """#define DECLARE_BUILTIN_GENERATOR(codeName, functionName, overriddenName, argumentCount) \\
+    """#define DECLARE_BUILTIN_GENERATOR(codeName, functionName, argumentCount) \\
     JSC::FunctionExecutable* codeName##Generator(JSC::VM&);
 
 ${macroPrefix}_FOREACH_${objectMacro}_BUILTIN_CODE(DECLARE_BUILTIN_GENERATOR)
@@ -82,7 +82,7 @@ ${macroPrefix}_FOREACH_${objectMacro}_BUILTIN_CODE(DECLARE_BUILTIN_GENERATOR)
 
     CombinedJSCImplementationStaticMacros = (
     """
-#define DEFINE_BUILTIN_GENERATOR(codeName, functionName, overriddenName, argumentCount) \\
+#define DEFINE_BUILTIN_GENERATOR(codeName, functionName, argumentCount) \\
 JSC::FunctionExecutable* codeName##Generator(JSC::VM& vm) \\
 {\\
     return vm.builtinExecutables()->codeName##Executable()->link(vm, vm.builtinExecutables()->codeName##Source(), std::nullopt, s_##codeName##Intrinsic); \
@@ -93,7 +93,7 @@ ${macroPrefix}_FOREACH_BUILTIN_CODE(DEFINE_BUILTIN_GENERATOR)
 
     SeparateJSCImplementationStaticMacros = (
     """
-#define DEFINE_BUILTIN_GENERATOR(codeName, functionName, overriddenName, argumentCount) \\
+#define DEFINE_BUILTIN_GENERATOR(codeName, functionName, argumentCount) \\
 JSC::FunctionExecutable* codeName##Generator(JSC::VM& vm) \\
 {\\
     return vm.builtinExecutables()->codeName##Executable()->link(vm, vm.builtinExecutables()->codeName##Source(), std::nullopt, s_##codeName##Intrinsic); \
@@ -104,7 +104,7 @@ ${macroPrefix}_FOREACH_${objectMacro}_BUILTIN_CODE(DEFINE_BUILTIN_GENERATOR)
 
     CombinedWebCoreImplementationStaticMacros = (
         """
-#define DEFINE_BUILTIN_GENERATOR(codeName, functionName, overriddenName, argumentCount) \\
+#define DEFINE_BUILTIN_GENERATOR(codeName, functionName, argumentCount) \\
 JSC::FunctionExecutable* codeName##Generator(JSC::VM& vm) \\
 {\\
     JSVMClientData* clientData = static_cast<JSVMClientData*>(vm.clientData); \\
@@ -116,7 +116,7 @@ ${macroPrefix}_FOREACH_BUILTIN_CODE(DEFINE_BUILTIN_GENERATOR)
 
     SeparateWebCoreImplementationStaticMacros = (
         """
-#define DEFINE_BUILTIN_GENERATOR(codeName, functionName, overriddenName, argumentCount) \\
+#define DEFINE_BUILTIN_GENERATOR(codeName, functionName, argumentCount) \\
 JSC::FunctionExecutable* codeName##Generator(JSC::VM& vm) \\
 {\\
     JSVMClientData* clientData = static_cast<JSVMClientData*>(vm.clientData); \\
@@ -132,13 +132,13 @@ 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, overriddenName, length) , m_##name##Source(JSC::makeSource(StringImpl::createFromLiteral(s_##name, length), { }))
+#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, overriddenName, length) \\
+#define EXPOSE_BUILTIN_EXECUTABLES(name, functionName, length) \\
     JSC::UnlinkedFunctionExecutable* name##Executable(); \\
     const JSC::SourceCode& name##Source() const { return m_##name##Source; }
     ${macroPrefix}_FOREACH_${objectMacro}_BUILTIN_CODE(EXPOSE_BUILTIN_EXECUTABLES)
@@ -153,7 +153,7 @@ private:
 
     ${macroPrefix}_FOREACH_${objectMacro}_BUILTIN_FUNCTION_NAME(DECLARE_BUILTIN_NAMES)
 
-#define DECLARE_BUILTIN_SOURCE_MEMBERS(name, functionName, overriddenName, length) \\
+#define DECLARE_BUILTIN_SOURCE_MEMBERS(name, functionName, length) \\
     JSC::SourceCode m_##name##Source;\\
     JSC::Weak<JSC::UnlinkedFunctionExecutable> m_##name##Executable;
     ${macroPrefix}_FOREACH_${objectMacro}_BUILTIN_CODE(DECLARE_BUILTIN_SOURCE_MEMBERS)
@@ -161,15 +161,11 @@ private:
 
 };
 
-#define DEFINE_BUILTIN_EXECUTABLES(name, functionName, overriddenName, length) \\
+#define DEFINE_BUILTIN_EXECUTABLES(name, functionName, length) \\
 inline JSC::UnlinkedFunctionExecutable* ${objectName}BuiltinsWrapper::name##Executable() \\
 {\\
-    if (!m_##name##Executable) {\\
-        JSC::Identifier executableName = functionName##PublicName();\\
-        if (overriddenName)\\
-            executableName = JSC::Identifier::fromString(&m_vm, overriddenName);\\
-        m_##name##Executable = JSC::Weak<JSC::UnlinkedFunctionExecutable>(JSC::createBuiltinExecutable(m_vm, m_##name##Source, executableName, s_##name##ConstructAbility), this, &m_##name##Executable);\\
-    }\\
+    if (!m_##name##Executable)\\
+        m_##name##Executable = JSC::Weak<JSC::UnlinkedFunctionExecutable>(JSC::createBuiltinExecutable(m_vm, m_##name##Source, functionName##PublicName(), s_##name##ConstructAbility), this, &m_##name##Executable);\\
     return m_##name##Executable.get();\\
 }
 ${macroPrefix}_FOREACH_${objectMacro}_BUILTIN_CODE(DEFINE_BUILTIN_EXECUTABLES)
@@ -201,8 +197,8 @@ public:
 
 inline void ${objectName}BuiltinFunctions::init(JSC::JSGlobalObject& globalObject)
 {
-#define EXPORT_FUNCTION(codeName, functionName, overriddenName, length)\\
-    m_##functionName##Function.set(m_vm, &globalObject, JSC::JSFunction::create(m_vm, codeName##Generator(m_vm), &globalObject));
+#define EXPORT_FUNCTION(codeName, functionName, length)\\
+    m_##functionName##Function.set(m_vm, &globalObject, JSC::JSFunction::createBuiltinFunction(m_vm, codeName##Generator(m_vm), &globalObject));
     ${macroPrefix}_FOREACH_${objectMacro}_BUILTIN_CODE(EXPORT_FUNCTION)
 #undef EXPORT_FUNCTION
 }
index 0159c29..5448b98 100644 (file)
@@ -76,83 +76,3 @@ function forEach(callback /*, thisArg */)
             callback.@call(thisArg, array[i], i, array);
     }
 }
-
-@overriddenName="[Symbol.match]"
-function match(strArg)
-{
-    "use strict";
-
-    if (!@isObject(this))
-        @throwTypeError("RegExp.prototype.@@match requires that |this| be an Object");
-
-    let regexp = this;
-
-    // Check for observable side effects and call the fast path if there aren't any.
-    if (!@hasObservableSideEffectsForRegExpMatch(regexp))
-        return @regExpMatchFast.@call(regexp, strArg);
-
-    let str = @toString(strArg);
-
-    if (!regexp.global)
-        return @regExpExec(regexp, str);
-    
-    let unicode = regexp.unicode;
-    regexp.lastIndex = 0;
-    let resultList = [];
-
-    // FIXME: It would be great to implement a solution similar to what we do in
-    // RegExpObject::matchGlobal(). It's not clear if this is possible, since this loop has
-    // effects. https://bugs.webkit.org/show_bug.cgi?id=158145
-    const maximumReasonableMatchSize = 100000000;
-
-    while (true) {
-        let result = @regExpExec(regexp, str);
-        
-        if (result === null) {
-            if (resultList.length === 0)
-                return null;
-            return resultList;
-        }
-
-        if (resultList.length > maximumReasonableMatchSize)
-            @throwOutOfMemoryError();
-
-        if (!@isObject(result))
-            @throwTypeError("RegExp.prototype.@@match call to RegExp.exec didn't return null or an object");
-
-        let resultString = @toString(result[0]);
-
-        if (!resultString.length)
-            regexp.lastIndex = @advanceStringIndex(str, regexp.lastIndex, unicode);
-
-        resultList.@push(resultString);
-    }
-}
-
-@intrinsic=RegExpTestIntrinsic
-function test(strArg)
-{
-    "use strict";
-
-    let regexp = this;
-
-    // Check for observable side effects and call the fast path if there aren't any.
-    if (@isRegExpObject(regexp) && @tryGetById(regexp, "exec") === @regExpBuiltinExec)
-        return @regExpTestFast.@call(regexp, strArg);
-
-    // 1. Let R be the this value.
-    // 2. If Type(R) is not Object, throw a TypeError exception.
-    if (!@isObject(regexp))
-        @throwTypeError("RegExp.prototype.test requires that |this| be an Object");
-
-    // 3. Let string be ? ToString(S).
-    let str = @toString(strArg);
-
-    // 4. Let match be ? RegExpExec(R, string).
-    let match = @regExpExec(regexp, str);
-
-    // 5. If match is not null, return true; else return false.
-    if (match !== null)
-        return true;
-    return false;
-}
index 0159c29..5448b98 100644 (file)
@@ -76,83 +76,3 @@ function forEach(callback /*, thisArg */)
             callback.@call(thisArg, array[i], i, array);
     }
 }
-
-@overriddenName="[Symbol.match]"
-function match(strArg)
-{
-    "use strict";
-
-    if (!@isObject(this))
-        @throwTypeError("RegExp.prototype.@@match requires that |this| be an Object");
-
-    let regexp = this;
-
-    // Check for observable side effects and call the fast path if there aren't any.
-    if (!@hasObservableSideEffectsForRegExpMatch(regexp))
-        return @regExpMatchFast.@call(regexp, strArg);
-
-    let str = @toString(strArg);
-
-    if (!regexp.global)
-        return @regExpExec(regexp, str);
-    
-    let unicode = regexp.unicode;
-    regexp.lastIndex = 0;
-    let resultList = [];
-
-    // FIXME: It would be great to implement a solution similar to what we do in
-    // RegExpObject::matchGlobal(). It's not clear if this is possible, since this loop has
-    // effects. https://bugs.webkit.org/show_bug.cgi?id=158145
-    const maximumReasonableMatchSize = 100000000;
-
-    while (true) {
-        let result = @regExpExec(regexp, str);
-        
-        if (result === null) {
-            if (resultList.length === 0)
-                return null;
-            return resultList;
-        }
-
-        if (resultList.length > maximumReasonableMatchSize)
-            @throwOutOfMemoryError();
-
-        if (!@isObject(result))
-            @throwTypeError("RegExp.prototype.@@match call to RegExp.exec didn't return null or an object");
-
-        let resultString = @toString(result[0]);
-
-        if (!resultString.length)
-            regexp.lastIndex = @advanceStringIndex(str, regexp.lastIndex, unicode);
-
-        resultList.@push(resultString);
-    }
-}
-
-@intrinsic=RegExpTestIntrinsic
-function test(strArg)
-{
-    "use strict";
-
-    let regexp = this;
-
-    // Check for observable side effects and call the fast path if there aren't any.
-    if (@isRegExpObject(regexp) && @tryGetById(regexp, "exec") === @regExpBuiltinExec)
-        return @regExpTestFast.@call(regexp, strArg);
-
-    // 1. Let R be the this value.
-    // 2. If Type(R) is not Object, throw a TypeError exception.
-    if (!@isObject(regexp))
-        @throwTypeError("RegExp.prototype.test requires that |this| be an Object");
-
-    // 3. Let string be ? ToString(S).
-    let str = @toString(strArg);
-
-    // 4. Let match be ? RegExpExec(R, string).
-    let match = @regExpExec(regexp, str);
-
-    // 5. If match is not null, return true; else return false.
-    if (match !== null)
-        return true;
-    return false;
-}
index 9960129..9bb21d6 100644 (file)
@@ -53,8 +53,8 @@ extern const JSC::ConstructAbility s_builtinPromiseFulfillPromiseCodeConstructAb
     macro(fulfillPromise, builtinPromiseFulfillPromise, 2) \
 
 #define JSC_FOREACH_BUILTIN_CODE(macro) \
-    macro(builtinPromiseRejectPromiseCode, rejectPromise, static_cast<const char*>(nullptr), s_builtinPromiseRejectPromiseCodeLength) \
-    macro(builtinPromiseFulfillPromiseCode, fulfillPromise, static_cast<const char*>(nullptr), s_builtinPromiseFulfillPromiseCodeLength) \
+    macro(builtinPromiseRejectPromiseCode, rejectPromise, s_builtinPromiseRejectPromiseCodeLength) \
+    macro(builtinPromiseFulfillPromiseCode, fulfillPromise, s_builtinPromiseFulfillPromiseCodeLength) \
 
 #define JSC_FOREACH_BUILTIN_FUNCTION_NAME(macro) \
     macro(fulfillPromise) \
@@ -62,7 +62,7 @@ extern const JSC::ConstructAbility s_builtinPromiseFulfillPromiseCodeConstructAb
 
 #define JSC_FOREACH_BUILTIN_FUNCTION_PRIVATE_GLOBAL_NAME(macro) \
 
-#define DECLARE_BUILTIN_GENERATOR(codeName, functionName, overriddenName, argumentCount) \
+#define DECLARE_BUILTIN_GENERATOR(codeName, functionName, argumentCount) \
     JSC::FunctionExecutable* codeName##Generator(JSC::VM&);
 
 JSC_FOREACH_BUILTIN_CODE(DECLARE_BUILTIN_GENERATOR)
@@ -107,7 +107,6 @@ JSC_FOREACH_BUILTIN_CODE(DECLARE_BUILTIN_GENERATOR)
 
 #include "BuiltinExecutables.h"
 #include "HeapInlines.h"
-#include "IdentifierInlines.h"
 #include "Intrinsic.h"
 #include "JSCellInlines.h"
 #include "UnlinkedFunctionExecutable.h"
@@ -150,7 +149,7 @@ const char* s_builtinPromiseFulfillPromiseCode =
 ;
 
 
-#define DEFINE_BUILTIN_GENERATOR(codeName, functionName, overriddenName, argumentCount) \
+#define DEFINE_BUILTIN_GENERATOR(codeName, functionName, argumentCount) \
 JSC::FunctionExecutable* codeName##Generator(JSC::VM& vm) \
 {\
     return vm.builtinExecutables()->codeName##Executable()->link(vm, vm.builtinExecutables()->codeName##Source(), std::nullopt, s_##codeName##Intrinsic); }
index 1a4d83b..87fdaee 100644 (file)
@@ -55,14 +55,14 @@ extern const JSC::ConstructAbility s_builtinPromiseFulfillPromiseCodeConstructAb
 #define JSC_BUILTIN_BUILTIN_PROMISE_FULFILLPROMISE 1
 
 #define JSC_FOREACH_BUILTIN.PROMISE_BUILTIN_CODE(macro) \
-    macro(builtinPromiseRejectPromiseCode, rejectPromise, static_cast<const char*>(nullptr), s_builtinPromiseRejectPromiseCodeLength) \
-    macro(builtinPromiseFulfillPromiseCode, fulfillPromise, static_cast<const char*>(nullptr), s_builtinPromiseFulfillPromiseCodeLength) \
+    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, overriddenName, argumentCount) \
+#define DECLARE_BUILTIN_GENERATOR(codeName, functionName, argumentCount) \
     JSC::FunctionExecutable* codeName##Generator(JSC::VM&);
 
 JSC_FOREACH_BUILTIN.PROMISE_BUILTIN_CODE(DECLARE_BUILTIN_GENERATOR)
@@ -107,7 +107,6 @@ JSC_FOREACH_BUILTIN.PROMISE_BUILTIN_CODE(DECLARE_BUILTIN_GENERATOR)
 
 #include "BuiltinExecutables.h"
 #include "HeapInlines.h"
-#include "IdentifierInlines.h"
 #include "Intrinsic.h"
 #include "JSCellInlines.h"
 #include "VM.h"
@@ -149,7 +148,7 @@ const char* s_builtinPromiseFulfillPromiseCode =
 ;
 
 
-#define DEFINE_BUILTIN_GENERATOR(codeName, functionName, overriddenName, argumentCount) \
+#define DEFINE_BUILTIN_GENERATOR(codeName, functionName, argumentCount) \
 JSC::FunctionExecutable* codeName##Generator(JSC::VM& vm) \
 {\
     return vm.builtinExecutables()->codeName##Executable()->link(vm, vm.builtinExecutables()->codeName##Source(), std::nullopt, s_##codeName##Intrinsic); }
index e4b6c2a..6bf696f 100644 (file)
@@ -47,34 +47,22 @@ extern const JSC::ConstructAbility s_builtinPrototypeEveryCodeConstructAbility;
 extern const char* s_builtinPrototypeForEachCode;
 extern const int s_builtinPrototypeForEachCodeLength;
 extern const JSC::ConstructAbility s_builtinPrototypeForEachCodeConstructAbility;
-extern const char* s_builtinPrototypeMatchCode;
-extern const int s_builtinPrototypeMatchCodeLength;
-extern const JSC::ConstructAbility s_builtinPrototypeMatchCodeConstructAbility;
-extern const char* s_builtinPrototypeTestCode;
-extern const int s_builtinPrototypeTestCodeLength;
-extern const JSC::ConstructAbility s_builtinPrototypeTestCodeConstructAbility;
 
 #define JSC_FOREACH_BUILTINPROTOTYPE_BUILTIN_DATA(macro) \
     macro(every, builtinPrototypeEvery, 1) \
     macro(forEach, builtinPrototypeForEach, 1) \
-    macro(match, builtinPrototypeMatch, 1) \
-    macro(test, builtinPrototypeTest, 1) \
 
 #define JSC_FOREACH_BUILTIN_CODE(macro) \
-    macro(builtinPrototypeEveryCode, every, static_cast<const char*>(nullptr), s_builtinPrototypeEveryCodeLength) \
-    macro(builtinPrototypeForEachCode, forEach, static_cast<const char*>(nullptr), s_builtinPrototypeForEachCodeLength) \
-    macro(builtinPrototypeMatchCode, match, "[Symbol.match]", s_builtinPrototypeMatchCodeLength) \
-    macro(builtinPrototypeTestCode, test, static_cast<const char*>(nullptr), s_builtinPrototypeTestCodeLength) \
+    macro(builtinPrototypeEveryCode, every, s_builtinPrototypeEveryCodeLength) \
+    macro(builtinPrototypeForEachCode, forEach, s_builtinPrototypeForEachCodeLength) \
 
 #define JSC_FOREACH_BUILTIN_FUNCTION_NAME(macro) \
     macro(every) \
     macro(forEach) \
-    macro(match) \
-    macro(test) \
 
 #define JSC_FOREACH_BUILTIN_FUNCTION_PRIVATE_GLOBAL_NAME(macro) \
 
-#define DECLARE_BUILTIN_GENERATOR(codeName, functionName, overriddenName, argumentCount) \
+#define DECLARE_BUILTIN_GENERATOR(codeName, functionName, argumentCount) \
     JSC::FunctionExecutable* codeName##Generator(JSC::VM&);
 
 JSC_FOREACH_BUILTIN_CODE(DECLARE_BUILTIN_GENERATOR)
@@ -119,7 +107,6 @@ JSC_FOREACH_BUILTIN_CODE(DECLARE_BUILTIN_GENERATOR)
 
 #include "BuiltinExecutables.h"
 #include "HeapInlines.h"
-#include "IdentifierInlines.h"
 #include "Intrinsic.h"
 #include "JSCellInlines.h"
 #include "UnlinkedFunctionExecutable.h"
@@ -185,68 +172,8 @@ const char* s_builtinPrototypeForEachCode =
     "})\n" \
 ;
 
-const JSC::ConstructAbility s_builtinPrototypeMatchCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const int s_builtinPrototypeMatchCodeLength = 1198;
-static const JSC::Intrinsic s_builtinPrototypeMatchCodeIntrinsic = JSC::NoIntrinsic;
-const char* s_builtinPrototypeMatchCode =
-    "(function (strArg)\n" \
-    "{\n" \
-    "    \"use strict\";\n" \
-    "    if (!@isObject(this))\n" \
-    "        @throwTypeError(\"RegExp.prototype.@@match requires that |this| be an Object\");\n" \
-    "    let regexp = this;\n" \
-    "    if (!@hasObservableSideEffectsForRegExpMatch(regexp))\n" \
-    "        return @regExpMatchFast.@call(regexp, strArg);\n" \
-    "    let str = @toString(strArg);\n" \
-    "    if (!regexp.global)\n" \
-    "        return @regExpExec(regexp, str);\n" \
-    "    \n" \
-    "    let unicode = regexp.unicode;\n" \
-    "    regexp.lastIndex = 0;\n" \
-    "    let resultList = [];\n" \
-    "    const maximumReasonableMatchSize = 100000000;\n" \
-    "    while (true) {\n" \
-    "        let result = @regExpExec(regexp, str);\n" \
-    "        \n" \
-    "        if (result === null) {\n" \
-    "            if (resultList.length === 0)\n" \
-    "                return null;\n" \
-    "            return resultList;\n" \
-    "        }\n" \
-    "        if (resultList.length > maximumReasonableMatchSize)\n" \
-    "            @throwOutOfMemoryError();\n" \
-    "        if (!@isObject(result))\n" \
-    "            @throwTypeError(\"RegExp.prototype.@@match call to RegExp.exec didn't return null or an object\");\n" \
-    "        let resultString = @toString(result[0]);\n" \
-    "        if (!resultString.length)\n" \
-    "            regexp.lastIndex = @advanceStringIndex(str, regexp.lastIndex, unicode);\n" \
-    "        resultList.@push(resultString);\n" \
-    "    }\n" \
-    "})\n" \
-;
-
-const JSC::ConstructAbility s_builtinPrototypeTestCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const int s_builtinPrototypeTestCodeLength = 456;
-static const JSC::Intrinsic s_builtinPrototypeTestCodeIntrinsic = JSC::RegExpTestIntrinsic;
-const char* s_builtinPrototypeTestCode =
-    "(function (strArg)\n" \
-    "{\n" \
-    "    \"use strict\";\n" \
-    "    let regexp = this;\n" \
-    "    if (@isRegExpObject(regexp) && @tryGetById(regexp, \"exec\") === @regExpBuiltinExec)\n" \
-    "        return @regExpTestFast.@call(regexp, strArg);\n" \
-    "    if (!@isObject(regexp))\n" \
-    "        @throwTypeError(\"RegExp.prototype.test requires that |this| be an Object\");\n" \
-    "    let str = @toString(strArg);\n" \
-    "    let match = @regExpExec(regexp, str);\n" \
-    "    if (match !== null)\n" \
-    "        return true;\n" \
-    "    return false;\n" \
-    "})\n" \
-;
-
 
-#define DEFINE_BUILTIN_GENERATOR(codeName, functionName, overriddenName, argumentCount) \
+#define DEFINE_BUILTIN_GENERATOR(codeName, functionName, argumentCount) \
 JSC::FunctionExecutable* codeName##Generator(JSC::VM& vm) \
 {\
     return vm.builtinExecutables()->codeName##Executable()->link(vm, vm.builtinExecutables()->codeName##Source(), std::nullopt, s_##codeName##Intrinsic); }
index 7c875d7..d0c8f26 100644 (file)
@@ -46,37 +46,23 @@ extern const JSC::ConstructAbility s_builtinPrototypeEveryCodeConstructAbility;
 extern const char* s_builtinPrototypeForEachCode;
 extern const int s_builtinPrototypeForEachCodeLength;
 extern const JSC::ConstructAbility s_builtinPrototypeForEachCodeConstructAbility;
-extern const char* s_builtinPrototypeMatchCode;
-extern const int s_builtinPrototypeMatchCodeLength;
-extern const JSC::ConstructAbility s_builtinPrototypeMatchCodeConstructAbility;
-extern const char* s_builtinPrototypeTestCode;
-extern const int s_builtinPrototypeTestCodeLength;
-extern const JSC::ConstructAbility s_builtinPrototypeTestCodeConstructAbility;
 
 #define JSC_FOREACH_BUILTIN_PROTOTYPE_BUILTIN_DATA(macro) \
     macro(every, builtinPrototypeEvery, 1) \
     macro(forEach, builtinPrototypeForEach, 1) \
-    macro(match, builtinPrototypeMatch, 1) \
-    macro(test, builtinPrototypeTest, 1) \
 
 #define JSC_BUILTIN_BUILTIN_PROTOTYPE_EVERY 1
 #define JSC_BUILTIN_BUILTIN_PROTOTYPE_FOREACH 1
-#define JSC_BUILTIN_BUILTIN_PROTOTYPE_MATCH 1
-#define JSC_BUILTIN_BUILTIN_PROTOTYPE_TEST 1
 
 #define JSC_FOREACH_BUILTIN.PROTOTYPE_BUILTIN_CODE(macro) \
-    macro(builtinPrototypeEveryCode, every, static_cast<const char*>(nullptr), s_builtinPrototypeEveryCodeLength) \
-    macro(builtinPrototypeForEachCode, forEach, static_cast<const char*>(nullptr), s_builtinPrototypeForEachCodeLength) \
-    macro(builtinPrototypeMatchCode, match, "[Symbol.match]", s_builtinPrototypeMatchCodeLength) \
-    macro(builtinPrototypeTestCode, test, static_cast<const char*>(nullptr), s_builtinPrototypeTestCodeLength) \
+    macro(builtinPrototypeEveryCode, every, s_builtinPrototypeEveryCodeLength) \
+    macro(builtinPrototypeForEachCode, forEach, s_builtinPrototypeForEachCodeLength) \
 
 #define JSC_FOREACH_BUILTIN.PROTOTYPE_BUILTIN_FUNCTION_NAME(macro) \
     macro(every) \
     macro(forEach) \
-    macro(match) \
-    macro(test) \
 
-#define DECLARE_BUILTIN_GENERATOR(codeName, functionName, overriddenName, argumentCount) \
+#define DECLARE_BUILTIN_GENERATOR(codeName, functionName, argumentCount) \
     JSC::FunctionExecutable* codeName##Generator(JSC::VM&);
 
 JSC_FOREACH_BUILTIN.PROTOTYPE_BUILTIN_CODE(DECLARE_BUILTIN_GENERATOR)
@@ -121,7 +107,6 @@ JSC_FOREACH_BUILTIN.PROTOTYPE_BUILTIN_CODE(DECLARE_BUILTIN_GENERATOR)
 
 #include "BuiltinExecutables.h"
 #include "HeapInlines.h"
-#include "IdentifierInlines.h"
 #include "Intrinsic.h"
 #include "JSCellInlines.h"
 #include "VM.h"
@@ -186,68 +171,8 @@ const char* s_builtinPrototypeForEachCode =
     "})\n" \
 ;
 
-const JSC::ConstructAbility s_builtinPrototypeMatchCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const int s_builtinPrototypeMatchCodeLength = 1198;
-static const JSC::Intrinsic s_builtinPrototypeMatchCodeIntrinsic = JSC::NoIntrinsic;
-const char* s_builtinPrototypeMatchCode =
-    "(function (strArg)\n" \
-    "{\n" \
-    "    \"use strict\";\n" \
-    "    if (!@isObject(this))\n" \
-    "        @throwTypeError(\"RegExp.prototype.@@match requires that |this| be an Object\");\n" \
-    "    let regexp = this;\n" \
-    "    if (!@hasObservableSideEffectsForRegExpMatch(regexp))\n" \
-    "        return @regExpMatchFast.@call(regexp, strArg);\n" \
-    "    let str = @toString(strArg);\n" \
-    "    if (!regexp.global)\n" \
-    "        return @regExpExec(regexp, str);\n" \
-    "    \n" \
-    "    let unicode = regexp.unicode;\n" \
-    "    regexp.lastIndex = 0;\n" \
-    "    let resultList = [];\n" \
-    "    const maximumReasonableMatchSize = 100000000;\n" \
-    "    while (true) {\n" \
-    "        let result = @regExpExec(regexp, str);\n" \
-    "        \n" \
-    "        if (result === null) {\n" \
-    "            if (resultList.length === 0)\n" \
-    "                return null;\n" \
-    "            return resultList;\n" \
-    "        }\n" \
-    "        if (resultList.length > maximumReasonableMatchSize)\n" \
-    "            @throwOutOfMemoryError();\n" \
-    "        if (!@isObject(result))\n" \
-    "            @throwTypeError(\"RegExp.prototype.@@match call to RegExp.exec didn't return null or an object\");\n" \
-    "        let resultString = @toString(result[0]);\n" \
-    "        if (!resultString.length)\n" \
-    "            regexp.lastIndex = @advanceStringIndex(str, regexp.lastIndex, unicode);\n" \
-    "        resultList.@push(resultString);\n" \
-    "    }\n" \
-    "})\n" \
-;
-
-const JSC::ConstructAbility s_builtinPrototypeTestCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const int s_builtinPrototypeTestCodeLength = 456;
-static const JSC::Intrinsic s_builtinPrototypeTestCodeIntrinsic = JSC::RegExpTestIntrinsic;
-const char* s_builtinPrototypeTestCode =
-    "(function (strArg)\n" \
-    "{\n" \
-    "    \"use strict\";\n" \
-    "    let regexp = this;\n" \
-    "    if (@isRegExpObject(regexp) && @tryGetById(regexp, \"exec\") === @regExpBuiltinExec)\n" \
-    "        return @regExpTestFast.@call(regexp, strArg);\n" \
-    "    if (!@isObject(regexp))\n" \
-    "        @throwTypeError(\"RegExp.prototype.test requires that |this| be an Object\");\n" \
-    "    let str = @toString(strArg);\n" \
-    "    let match = @regExpExec(regexp, str);\n" \
-    "    if (match !== null)\n" \
-    "        return true;\n" \
-    "    return false;\n" \
-    "})\n" \
-;
-
 
-#define DEFINE_BUILTIN_GENERATOR(codeName, functionName, overriddenName, argumentCount) \
+#define DEFINE_BUILTIN_GENERATOR(codeName, functionName, argumentCount) \
 JSC::FunctionExecutable* codeName##Generator(JSC::VM& vm) \
 {\
     return vm.builtinExecutables()->codeName##Executable()->link(vm, vm.builtinExecutables()->codeName##Source(), std::nullopt, s_##codeName##Intrinsic); }
index 98b613f..023a829 100644 (file)
@@ -52,8 +52,8 @@ extern const JSC::ConstructAbility s_builtinConstructorFromCodeConstructAbility;
     macro(from, builtinConstructorFrom, 1) \
 
 #define JSC_FOREACH_BUILTIN_CODE(macro) \
-    macro(builtinConstructorOfCode, of, static_cast<const char*>(nullptr), s_builtinConstructorOfCodeLength) \
-    macro(builtinConstructorFromCode, from, static_cast<const char*>(nullptr), s_builtinConstructorFromCodeLength) \
+    macro(builtinConstructorOfCode, of, s_builtinConstructorOfCodeLength) \
+    macro(builtinConstructorFromCode, from, s_builtinConstructorFromCodeLength) \
 
 #define JSC_FOREACH_BUILTIN_FUNCTION_NAME(macro) \
     macro(from) \
@@ -61,7 +61,7 @@ extern const JSC::ConstructAbility s_builtinConstructorFromCodeConstructAbility;
 
 #define JSC_FOREACH_BUILTIN_FUNCTION_PRIVATE_GLOBAL_NAME(macro) \
 
-#define DECLARE_BUILTIN_GENERATOR(codeName, functionName, overriddenName, argumentCount) \
+#define DECLARE_BUILTIN_GENERATOR(codeName, functionName, argumentCount) \
     JSC::FunctionExecutable* codeName##Generator(JSC::VM&);
 
 JSC_FOREACH_BUILTIN_CODE(DECLARE_BUILTIN_GENERATOR)
@@ -105,7 +105,6 @@ JSC_FOREACH_BUILTIN_CODE(DECLARE_BUILTIN_GENERATOR)
 
 #include "BuiltinExecutables.h"
 #include "HeapInlines.h"
-#include "IdentifierInlines.h"
 #include "Intrinsic.h"
 #include "JSCellInlines.h"
 #include "UnlinkedFunctionExecutable.h"
@@ -187,7 +186,7 @@ const char* s_builtinConstructorFromCode =
 ;
 
 
-#define DEFINE_BUILTIN_GENERATOR(codeName, functionName, overriddenName, argumentCount) \
+#define DEFINE_BUILTIN_GENERATOR(codeName, functionName, argumentCount) \
 JSC::FunctionExecutable* codeName##Generator(JSC::VM& vm) \
 {\
     return vm.builtinExecutables()->codeName##Executable()->link(vm, vm.builtinExecutables()->codeName##Source(), std::nullopt, s_##codeName##Intrinsic); }
index 353ee6e..8000b69 100644 (file)
@@ -54,14 +54,14 @@ extern const JSC::ConstructAbility s_builtinConstructorFromCodeConstructAbility;
 #define JSC_BUILTIN_BUILTINCONSTRUCTOR_FROM 1
 
 #define JSC_FOREACH_BUILTINCONSTRUCTOR_BUILTIN_CODE(macro) \
-    macro(builtinConstructorOfCode, of, static_cast<const char*>(nullptr), s_builtinConstructorOfCodeLength) \
-    macro(builtinConstructorFromCode, from, static_cast<const char*>(nullptr), s_builtinConstructorFromCodeLength) \
+    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, overriddenName, argumentCount) \
+#define DECLARE_BUILTIN_GENERATOR(codeName, functionName, argumentCount) \
     JSC::FunctionExecutable* codeName##Generator(JSC::VM&);
 
 JSC_FOREACH_BUILTINCONSTRUCTOR_BUILTIN_CODE(DECLARE_BUILTIN_GENERATOR)
@@ -105,7 +105,6 @@ JSC_FOREACH_BUILTINCONSTRUCTOR_BUILTIN_CODE(DECLARE_BUILTIN_GENERATOR)
 
 #include "BuiltinExecutables.h"
 #include "HeapInlines.h"
-#include "IdentifierInlines.h"
 #include "Intrinsic.h"
 #include "JSCellInlines.h"
 #include "VM.h"
@@ -186,7 +185,7 @@ const char* s_builtinConstructorFromCode =
 ;
 
 
-#define DEFINE_BUILTIN_GENERATOR(codeName, functionName, overriddenName, argumentCount) \
+#define DEFINE_BUILTIN_GENERATOR(codeName, functionName, argumentCount) \
 JSC::FunctionExecutable* codeName##Generator(JSC::VM& vm) \
 {\
     return vm.builtinExecutables()->codeName##Executable()->link(vm, vm.builtinExecutables()->codeName##Source(), std::nullopt, s_##codeName##Intrinsic); }
index b3006b8..8cbb539 100644 (file)
@@ -53,15 +53,15 @@ extern const JSC::ConstructAbility s_internalClashingNamesIsReadableStreamLocked
     macro(isReadableStreamLocked, internalClashingNamesIsReadableStreamLocked, 1) \
 
 #define JSC_FOREACH_BUILTIN_CODE(macro) \
-    macro(internalClashingNamesIsReadableStreamLockedCode, isReadableStreamLocked, static_cast<const char*>(nullptr), s_internalClashingNamesIsReadableStreamLockedCodeLength) \
-    macro(internalClashingNamesIsReadableStreamLockedCode, isReadableStreamLocked, static_cast<const char*>(nullptr), s_internalClashingNamesIsReadableStreamLockedCodeLength) \
+    macro(internalClashingNamesIsReadableStreamLockedCode, isReadableStreamLocked, s_internalClashingNamesIsReadableStreamLockedCodeLength) \
+    macro(internalClashingNamesIsReadableStreamLockedCode, isReadableStreamLocked, s_internalClashingNamesIsReadableStreamLockedCodeLength) \
 
 #define JSC_FOREACH_BUILTIN_FUNCTION_NAME(macro) \
     macro(isReadableStreamLocked) \
 
 #define JSC_FOREACH_BUILTIN_FUNCTION_PRIVATE_GLOBAL_NAME(macro) \
 
-#define DECLARE_BUILTIN_GENERATOR(codeName, functionName, overriddenName, argumentCount) \
+#define DECLARE_BUILTIN_GENERATOR(codeName, functionName, argumentCount) \
     JSC::FunctionExecutable* codeName##Generator(JSC::VM&);
 
 JSC_FOREACH_BUILTIN_CODE(DECLARE_BUILTIN_GENERATOR)
@@ -106,7 +106,6 @@ JSC_FOREACH_BUILTIN_CODE(DECLARE_BUILTIN_GENERATOR)
 
 #include "BuiltinExecutables.h"
 #include "HeapInlines.h"
-#include "IdentifierInlines.h"
 #include "Intrinsic.h"
 #include "JSCellInlines.h"
 #include "UnlinkedFunctionExecutable.h"
@@ -137,7 +136,7 @@ const char* s_internalClashingNamesIsReadableStreamLockedCode =
 ;
 
 
-#define DEFINE_BUILTIN_GENERATOR(codeName, functionName, overriddenName, argumentCount) \
+#define DEFINE_BUILTIN_GENERATOR(codeName, functionName, argumentCount) \
 JSC::FunctionExecutable* codeName##Generator(JSC::VM& vm) \
 {\
     return vm.builtinExecutables()->codeName##Executable()->link(vm, vm.builtinExecutables()->codeName##Source(), std::nullopt, s_##codeName##Intrinsic); }
index 8d8fcab..4ccc65c 100644 (file)
@@ -54,12 +54,12 @@ extern const JSC::ConstructAbility s_anotherGuardedInternalBuiltinLetsFetchCodeC
 #define WEBCORE_BUILTIN_ANOTHERGUARDEDINTERNALBUILTIN_LETSFETCH 1
 
 #define WEBCORE_FOREACH_ANOTHERGUARDEDINTERNALBUILTIN_BUILTIN_CODE(macro) \
-    macro(anotherGuardedInternalBuiltinLetsFetchCode, letsFetch, static_cast<const char*>(nullptr), s_anotherGuardedInternalBuiltinLetsFetchCodeLength) \
+    macro(anotherGuardedInternalBuiltinLetsFetchCode, letsFetch, s_anotherGuardedInternalBuiltinLetsFetchCodeLength) \
 
 #define WEBCORE_FOREACH_ANOTHERGUARDEDINTERNALBUILTIN_BUILTIN_FUNCTION_NAME(macro) \
     macro(letsFetch) \
 
-#define DECLARE_BUILTIN_GENERATOR(codeName, functionName, overriddenName, argumentCount) \
+#define DECLARE_BUILTIN_GENERATOR(codeName, functionName, argumentCount) \
     JSC::FunctionExecutable* codeName##Generator(JSC::VM&);
 
 WEBCORE_FOREACH_ANOTHERGUARDEDINTERNALBUILTIN_BUILTIN_CODE(DECLARE_BUILTIN_GENERATOR)
@@ -70,13 +70,13 @@ public:
     explicit AnotherGuardedInternalBuiltinBuiltinsWrapper(JSC::VM* vm)
         : m_vm(*vm)
         WEBCORE_FOREACH_ANOTHERGUARDEDINTERNALBUILTIN_BUILTIN_FUNCTION_NAME(INITIALIZE_BUILTIN_NAMES)
-#define INITIALIZE_BUILTIN_SOURCE_MEMBERS(name, functionName, overriddenName, length) , m_##name##Source(JSC::makeSource(StringImpl::createFromLiteral(s_##name, length), { }))
+#define INITIALIZE_BUILTIN_SOURCE_MEMBERS(name, functionName, length) , m_##name##Source(JSC::makeSource(StringImpl::createFromLiteral(s_##name, length), { }))
         WEBCORE_FOREACH_ANOTHERGUARDEDINTERNALBUILTIN_BUILTIN_CODE(INITIALIZE_BUILTIN_SOURCE_MEMBERS)
 #undef INITIALIZE_BUILTIN_SOURCE_MEMBERS
     {
     }
 
-#define EXPOSE_BUILTIN_EXECUTABLES(name, functionName, overriddenName, length) \
+#define EXPOSE_BUILTIN_EXECUTABLES(name, functionName, length) \
     JSC::UnlinkedFunctionExecutable* name##Executable(); \
     const JSC::SourceCode& name##Source() const { return m_##name##Source; }
     WEBCORE_FOREACH_ANOTHERGUARDEDINTERNALBUILTIN_BUILTIN_CODE(EXPOSE_BUILTIN_EXECUTABLES)
@@ -91,7 +91,7 @@ private:
 
     WEBCORE_FOREACH_ANOTHERGUARDEDINTERNALBUILTIN_BUILTIN_FUNCTION_NAME(DECLARE_BUILTIN_NAMES)
 
-#define DECLARE_BUILTIN_SOURCE_MEMBERS(name, functionName, overriddenName, length) \
+#define DECLARE_BUILTIN_SOURCE_MEMBERS(name, functionName, length) \
     JSC::SourceCode m_##name##Source;\
     JSC::Weak<JSC::UnlinkedFunctionExecutable> m_##name##Executable;
     WEBCORE_FOREACH_ANOTHERGUARDEDINTERNALBUILTIN_BUILTIN_CODE(DECLARE_BUILTIN_SOURCE_MEMBERS)
@@ -99,15 +99,11 @@ private:
 
 };
 
-#define DEFINE_BUILTIN_EXECUTABLES(name, functionName, overriddenName, length) \
+#define DEFINE_BUILTIN_EXECUTABLES(name, functionName, length) \
 inline JSC::UnlinkedFunctionExecutable* AnotherGuardedInternalBuiltinBuiltinsWrapper::name##Executable() \
 {\
-    if (!m_##name##Executable) {\
-        JSC::Identifier executableName = functionName##PublicName();\
-        if (overriddenName)\
-            executableName = JSC::Identifier::fromString(&m_vm, overriddenName);\
-        m_##name##Executable = JSC::Weak<JSC::UnlinkedFunctionExecutable>(JSC::createBuiltinExecutable(m_vm, m_##name##Source, executableName, s_##name##ConstructAbility), this, &m_##name##Executable);\
-    }\
+    if (!m_##name##Executable)\
+        m_##name##Executable = JSC::Weak<JSC::UnlinkedFunctionExecutable>(JSC::createBuiltinExecutable(m_vm, m_##name##Source, functionName##PublicName(), s_##name##ConstructAbility), this, &m_##name##Executable);\
     return m_##name##Executable.get();\
 }
 WEBCORE_FOREACH_ANOTHERGUARDEDINTERNALBUILTIN_BUILTIN_CODE(DEFINE_BUILTIN_EXECUTABLES)
@@ -138,8 +134,8 @@ public:
 
 inline void AnotherGuardedInternalBuiltinBuiltinFunctions::init(JSC::JSGlobalObject& globalObject)
 {
-#define EXPORT_FUNCTION(codeName, functionName, overriddenName, length)\
-    m_##functionName##Function.set(m_vm, &globalObject, JSC::JSFunction::create(m_vm, codeName##Generator(m_vm), &globalObject));
+#define EXPORT_FUNCTION(codeName, functionName, length)\
+    m_##functionName##Function.set(m_vm, &globalObject, JSC::JSFunction::createBuiltinFunction(m_vm, codeName##Generator(m_vm), &globalObject));
     WEBCORE_FOREACH_ANOTHERGUARDEDINTERNALBUILTIN_BUILTIN_CODE(EXPORT_FUNCTION)
 #undef EXPORT_FUNCTION
 }
@@ -194,7 +190,6 @@ inline void AnotherGuardedInternalBuiltinBuiltinFunctions::visit(JSC::SlotVisito
 
 #include "WebCoreJSClientData.h"
 #include <heap/HeapInlines.h>
-#include <runtime/IdentifierInlines.h>
 #include <runtime/Intrinsic.h>
 #include <runtime/JSCJSValueInlines.h>
 #include <runtime/JSCellInlines.h>
@@ -215,7 +210,7 @@ const char* s_anotherGuardedInternalBuiltinLetsFetchCode =
 ;
 
 
-#define DEFINE_BUILTIN_GENERATOR(codeName, functionName, overriddenName, argumentCount) \
+#define DEFINE_BUILTIN_GENERATOR(codeName, functionName, argumentCount) \
 JSC::FunctionExecutable* codeName##Generator(JSC::VM& vm) \
 {\
     JSVMClientData* clientData = static_cast<JSVMClientData*>(vm.clientData); \
index eadd07a..e626d67 100644 (file)
@@ -55,12 +55,12 @@ extern const JSC::ConstructAbility s_arbitraryConditionalGuardIsReadableStreamLo
 #define WEBCORE_BUILTIN_ARBITRARYCONDITIONALGUARD_ISREADABLESTREAMLOCKED 1
 
 #define WEBCORE_FOREACH_ARBITRARYCONDITIONALGUARD_BUILTIN_CODE(macro) \
-    macro(arbitraryConditionalGuardIsReadableStreamLockedCode, isReadableStreamLocked, static_cast<const char*>(nullptr), s_arbitraryConditionalGuardIsReadableStreamLockedCodeLength) \
+    macro(arbitraryConditionalGuardIsReadableStreamLockedCode, isReadableStreamLocked, s_arbitraryConditionalGuardIsReadableStreamLockedCodeLength) \
 
 #define WEBCORE_FOREACH_ARBITRARYCONDITIONALGUARD_BUILTIN_FUNCTION_NAME(macro) \
     macro(isReadableStreamLocked) \
 
-#define DECLARE_BUILTIN_GENERATOR(codeName, functionName, overriddenName, argumentCount) \
+#define DECLARE_BUILTIN_GENERATOR(codeName, functionName, argumentCount) \
     JSC::FunctionExecutable* codeName##Generator(JSC::VM&);
 
 WEBCORE_FOREACH_ARBITRARYCONDITIONALGUARD_BUILTIN_CODE(DECLARE_BUILTIN_GENERATOR)
@@ -71,13 +71,13 @@ public:
     explicit ArbitraryConditionalGuardBuiltinsWrapper(JSC::VM* vm)
         : m_vm(*vm)
         WEBCORE_FOREACH_ARBITRARYCONDITIONALGUARD_BUILTIN_FUNCTION_NAME(INITIALIZE_BUILTIN_NAMES)
-#define INITIALIZE_BUILTIN_SOURCE_MEMBERS(name, functionName, overriddenName, length) , m_##name##Source(JSC::makeSource(StringImpl::createFromLiteral(s_##name, length), { }))
+#define INITIALIZE_BUILTIN_SOURCE_MEMBERS(name, functionName, length) , m_##name##Source(JSC::makeSource(StringImpl::createFromLiteral(s_##name, length), { }))
         WEBCORE_FOREACH_ARBITRARYCONDITIONALGUARD_BUILTIN_CODE(INITIALIZE_BUILTIN_SOURCE_MEMBERS)
 #undef INITIALIZE_BUILTIN_SOURCE_MEMBERS
     {
     }
 
-#define EXPOSE_BUILTIN_EXECUTABLES(name, functionName, overriddenName, length) \
+#define EXPOSE_BUILTIN_EXECUTABLES(name, functionName, length) \
     JSC::UnlinkedFunctionExecutable* name##Executable(); \
     const JSC::SourceCode& name##Source() const { return m_##name##Source; }
     WEBCORE_FOREACH_ARBITRARYCONDITIONALGUARD_BUILTIN_CODE(EXPOSE_BUILTIN_EXECUTABLES)
@@ -92,7 +92,7 @@ private:
 
     WEBCORE_FOREACH_ARBITRARYCONDITIONALGUARD_BUILTIN_FUNCTION_NAME(DECLARE_BUILTIN_NAMES)
 
-#define DECLARE_BUILTIN_SOURCE_MEMBERS(name, functionName, overriddenName, length) \
+#define DECLARE_BUILTIN_SOURCE_MEMBERS(name, functionName, length) \
     JSC::SourceCode m_##name##Source;\
     JSC::Weak<JSC::UnlinkedFunctionExecutable> m_##name##Executable;
     WEBCORE_FOREACH_ARBITRARYCONDITIONALGUARD_BUILTIN_CODE(DECLARE_BUILTIN_SOURCE_MEMBERS)
@@ -100,15 +100,11 @@ private:
 
 };
 
-#define DEFINE_BUILTIN_EXECUTABLES(name, functionName, overriddenName, length) \
+#define DEFINE_BUILTIN_EXECUTABLES(name, functionName, length) \
 inline JSC::UnlinkedFunctionExecutable* ArbitraryConditionalGuardBuiltinsWrapper::name##Executable() \
 {\
-    if (!m_##name##Executable) {\
-        JSC::Identifier executableName = functionName##PublicName();\
-        if (overriddenName)\
-            executableName = JSC::Identifier::fromString(&m_vm, overriddenName);\
-        m_##name##Executable = JSC::Weak<JSC::UnlinkedFunctionExecutable>(JSC::createBuiltinExecutable(m_vm, m_##name##Source, executableName, s_##name##ConstructAbility), this, &m_##name##Executable);\
-    }\
+    if (!m_##name##Executable)\
+        m_##name##Executable = JSC::Weak<JSC::UnlinkedFunctionExecutable>(JSC::createBuiltinExecutable(m_vm, m_##name##Source, functionName##PublicName(), s_##name##ConstructAbility), this, &m_##name##Executable);\
     return m_##name##Executable.get();\
 }
 WEBCORE_FOREACH_ARBITRARYCONDITIONALGUARD_BUILTIN_CODE(DEFINE_BUILTIN_EXECUTABLES)
@@ -164,7 +160,6 @@ inline void ArbitraryConditionalGuardBuiltinsWrapper::exportNames()
 
 #include "WebCoreJSClientData.h"
 #include <heap/HeapInlines.h>
-#include <runtime/IdentifierInlines.h>
 #include <runtime/Intrinsic.h>
 #include <runtime/JSCJSValueInlines.h>
 #include <runtime/JSCellInlines.h>
@@ -185,7 +180,7 @@ const char* s_arbitraryConditionalGuardIsReadableStreamLockedCode =
 ;
 
 
-#define DEFINE_BUILTIN_GENERATOR(codeName, functionName, overriddenName, argumentCount) \
+#define DEFINE_BUILTIN_GENERATOR(codeName, functionName, argumentCount) \
 JSC::FunctionExecutable* codeName##Generator(JSC::VM& vm) \
 {\
     JSVMClientData* clientData = static_cast<JSVMClientData*>(vm.clientData); \
index 435644a..0747487 100644 (file)
@@ -55,12 +55,12 @@ extern const JSC::ConstructAbility s_guardedBuiltinIsReadableStreamLockedCodeCon
 #define WEBCORE_BUILTIN_GUARDEDBUILTIN_ISREADABLESTREAMLOCKED 1
 
 #define WEBCORE_FOREACH_GUARDEDBUILTIN_BUILTIN_CODE(macro) \
-    macro(guardedBuiltinIsReadableStreamLockedCode, isReadableStreamLocked, static_cast<const char*>(nullptr), s_guardedBuiltinIsReadableStreamLockedCodeLength) \
+    macro(guardedBuiltinIsReadableStreamLockedCode, isReadableStreamLocked, s_guardedBuiltinIsReadableStreamLockedCodeLength) \
 
 #define WEBCORE_FOREACH_GUARDEDBUILTIN_BUILTIN_FUNCTION_NAME(macro) \
     macro(isReadableStreamLocked) \
 
-#define DECLARE_BUILTIN_GENERATOR(codeName, functionName, overriddenName, argumentCount) \
+#define DECLARE_BUILTIN_GENERATOR(codeName, functionName, argumentCount) \
     JSC::FunctionExecutable* codeName##Generator(JSC::VM&);
 
 WEBCORE_FOREACH_GUARDEDBUILTIN_BUILTIN_CODE(DECLARE_BUILTIN_GENERATOR)
@@ -71,13 +71,13 @@ 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, overriddenName, length) , m_##name##Source(JSC::makeSource(StringImpl::createFromLiteral(s_##name, length), { }))
+#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, overriddenName, length) \
+#define EXPOSE_BUILTIN_EXECUTABLES(name, functionName, length) \
     JSC::UnlinkedFunctionExecutable* name##Executable(); \
     const JSC::SourceCode& name##Source() const { return m_##name##Source; }
     WEBCORE_FOREACH_GUARDEDBUILTIN_BUILTIN_CODE(EXPOSE_BUILTIN_EXECUTABLES)
@@ -92,7 +92,7 @@ private:
 
     WEBCORE_FOREACH_GUARDEDBUILTIN_BUILTIN_FUNCTION_NAME(DECLARE_BUILTIN_NAMES)
 
-#define DECLARE_BUILTIN_SOURCE_MEMBERS(name, functionName, overriddenName, length) \
+#define DECLARE_BUILTIN_SOURCE_MEMBERS(name, functionName, length) \
     JSC::SourceCode m_##name##Source;\
     JSC::Weak<JSC::UnlinkedFunctionExecutable> m_##name##Executable;
     WEBCORE_FOREACH_GUARDEDBUILTIN_BUILTIN_CODE(DECLARE_BUILTIN_SOURCE_MEMBERS)
@@ -100,15 +100,11 @@ private:
 
 };
 
-#define DEFINE_BUILTIN_EXECUTABLES(name, functionName, overriddenName, length) \
+#define DEFINE_BUILTIN_EXECUTABLES(name, functionName, length) \
 inline JSC::UnlinkedFunctionExecutable* GuardedBuiltinBuiltinsWrapper::name##Executable() \
 {\
-    if (!m_##name##Executable) {\
-        JSC::Identifier executableName = functionName##PublicName();\
-        if (overriddenName)\
-            executableName = JSC::Identifier::fromString(&m_vm, overriddenName);\
-        m_##name##Executable = JSC::Weak<JSC::UnlinkedFunctionExecutable>(JSC::createBuiltinExecutable(m_vm, m_##name##Source, executableName, s_##name##ConstructAbility), this, &m_##name##Executable);\
-    }\
+    if (!m_##name##Executable)\
+        m_##name##Executable = JSC::Weak<JSC::UnlinkedFunctionExecutable>(JSC::createBuiltinExecutable(m_vm, m_##name##Source, functionName##PublicName(), s_##name##ConstructAbility), this, &m_##name##Executable);\
     return m_##name##Executable.get();\
 }
 WEBCORE_FOREACH_GUARDEDBUILTIN_BUILTIN_CODE(DEFINE_BUILTIN_EXECUTABLES)
@@ -164,7 +160,6 @@ inline void GuardedBuiltinBuiltinsWrapper::exportNames()
 
 #include "WebCoreJSClientData.h"
 #include <heap/HeapInlines.h>
-#include <runtime/IdentifierInlines.h>
 #include <runtime/Intrinsic.h>
 #include <runtime/JSCJSValueInlines.h>
 #include <runtime/JSCellInlines.h>
@@ -185,7 +180,7 @@ const char* s_guardedBuiltinIsReadableStreamLockedCode =
 ;
 
 
-#define DEFINE_BUILTIN_GENERATOR(codeName, functionName, overriddenName, argumentCount) \
+#define DEFINE_BUILTIN_GENERATOR(codeName, functionName, argumentCount) \
 JSC::FunctionExecutable* codeName##Generator(JSC::VM& vm) \
 {\
     JSVMClientData* clientData = static_cast<JSVMClientData*>(vm.clientData); \
index ec509e8..9d83dee 100644 (file)
@@ -55,12 +55,12 @@ extern const JSC::ConstructAbility s_guardedInternalBuiltinIsReadableStreamLocke
 #define WEBCORE_BUILTIN_GUARDEDINTERNALBUILTIN_ISREADABLESTREAMLOCKED 1
 
 #define WEBCORE_FOREACH_GUARDEDINTERNALBUILTIN_BUILTIN_CODE(macro) \
-    macro(guardedInternalBuiltinIsReadableStreamLockedCode, isReadableStreamLocked, static_cast<const char*>(nullptr), s_guardedInternalBuiltinIsReadableStreamLockedCodeLength) \
+    macro(guardedInternalBuiltinIsReadableStreamLockedCode, isReadableStreamLocked, s_guardedInternalBuiltinIsReadableStreamLockedCodeLength) \
 
 #define WEBCORE_FOREACH_GUARDEDINTERNALBUILTIN_BUILTIN_FUNCTION_NAME(macro) \
     macro(isReadableStreamLocked) \
 
-#define DECLARE_BUILTIN_GENERATOR(codeName, functionName, overriddenName, argumentCount) \
+#define DECLARE_BUILTIN_GENERATOR(codeName, functionName, argumentCount) \
     JSC::FunctionExecutable* codeName##Generator(JSC::VM&);
 
 WEBCORE_FOREACH_GUARDEDINTERNALBUILTIN_BUILTIN_CODE(DECLARE_BUILTIN_GENERATOR)
@@ -71,13 +71,13 @@ 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, overriddenName, length) , m_##name##Source(JSC::makeSource(StringImpl::createFromLiteral(s_##name, length), { }))
+#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, overriddenName, length) \
+#define EXPOSE_BUILTIN_EXECUTABLES(name, functionName, length) \
     JSC::UnlinkedFunctionExecutable* name##Executable(); \
     const JSC::SourceCode& name##Source() const { return m_##name##Source; }
     WEBCORE_FOREACH_GUARDEDINTERNALBUILTIN_BUILTIN_CODE(EXPOSE_BUILTIN_EXECUTABLES)
@@ -92,7 +92,7 @@ private:
 
     WEBCORE_FOREACH_GUARDEDINTERNALBUILTIN_BUILTIN_FUNCTION_NAME(DECLARE_BUILTIN_NAMES)
 
-#define DECLARE_BUILTIN_SOURCE_MEMBERS(name, functionName, overriddenName, length) \
+#define DECLARE_BUILTIN_SOURCE_MEMBERS(name, functionName, length) \
     JSC::SourceCode m_##name##Source;\
     JSC::Weak<JSC::UnlinkedFunctionExecutable> m_##name##Executable;
     WEBCORE_FOREACH_GUARDEDINTERNALBUILTIN_BUILTIN_CODE(DECLARE_BUILTIN_SOURCE_MEMBERS)
@@ -100,15 +100,11 @@ private:
 
 };
 
-#define DEFINE_BUILTIN_EXECUTABLES(name, functionName, overriddenName, length) \
+#define DEFINE_BUILTIN_EXECUTABLES(name, functionName, length) \
 inline JSC::UnlinkedFunctionExecutable* GuardedInternalBuiltinBuiltinsWrapper::name##Executable() \
 {\
-    if (!m_##name##Executable) {\
-        JSC::Identifier executableName = functionName##PublicName();\
-        if (overriddenName)\
-            executableName = JSC::Identifier::fromString(&m_vm, overriddenName);\
-        m_##name##Executable = JSC::Weak<JSC::UnlinkedFunctionExecutable>(JSC::createBuiltinExecutable(m_vm, m_##name##Source, executableName, s_##name##ConstructAbility), this, &m_##name##Executable);\
-    }\
+    if (!m_##name##Executable)\
+        m_##name##Executable = JSC::Weak<JSC::UnlinkedFunctionExecutable>(JSC::createBuiltinExecutable(m_vm, m_##name##Source, functionName##PublicName(), s_##name##ConstructAbility), this, &m_##name##Executable);\
     return m_##name##Executable.get();\
 }
 WEBCORE_FOREACH_GUARDEDINTERNALBUILTIN_BUILTIN_CODE(DEFINE_BUILTIN_EXECUTABLES)
@@ -139,8 +135,8 @@ public:
 
 inline void GuardedInternalBuiltinBuiltinFunctions::init(JSC::JSGlobalObject& globalObject)
 {
-#define EXPORT_FUNCTION(codeName, functionName, overriddenName, length)\
-    m_##functionName##Function.set(m_vm, &globalObject, JSC::JSFunction::create(m_vm, codeName##Generator(m_vm), &globalObject));
+#define EXPORT_FUNCTION(codeName, functionName, length)\
+    m_##functionName##Function.set(m_vm, &globalObject, JSC::JSFunction::createBuiltinFunction(m_vm, codeName##Generator(m_vm), &globalObject));
     WEBCORE_FOREACH_GUARDEDINTERNALBUILTIN_BUILTIN_CODE(EXPORT_FUNCTION)
 #undef EXPORT_FUNCTION
 }
@@ -196,7 +192,6 @@ inline void GuardedInternalBuiltinBuiltinFunctions::visit(JSC::SlotVisitor& visi
 
 #include "WebCoreJSClientData.h"
 #include <heap/HeapInlines.h>
-#include <runtime/IdentifierInlines.h>
 #include <runtime/Intrinsic.h>
 #include <runtime/JSCJSValueInlines.h>
 #include <runtime/JSCellInlines.h>
@@ -217,7 +212,7 @@ const char* s_guardedInternalBuiltinIsReadableStreamLockedCode =
 ;
 
 
-#define DEFINE_BUILTIN_GENERATOR(codeName, functionName, overriddenName, argumentCount) \
+#define DEFINE_BUILTIN_GENERATOR(codeName, functionName, argumentCount) \
 JSC::FunctionExecutable* codeName##Generator(JSC::VM& vm) \
 {\
     JSVMClientData* clientData = static_cast<JSVMClientData*>(vm.clientData); \
index 44fa4c0..0352b8c 100644 (file)
@@ -53,12 +53,12 @@ extern const JSC::ConstructAbility s_unguardedBuiltinIsReadableStreamLockedCodeC
 #define WEBCORE_BUILTIN_UNGUARDEDBUILTIN_ISREADABLESTREAMLOCKED 1
 
 #define WEBCORE_FOREACH_UNGUARDEDBUILTIN_BUILTIN_CODE(macro) \
-    macro(unguardedBuiltinIsReadableStreamLockedCode, isReadableStreamLocked, static_cast<const char*>(nullptr), s_unguardedBuiltinIsReadableStreamLockedCodeLength) \
+    macro(unguardedBuiltinIsReadableStreamLockedCode, isReadableStreamLocked, s_unguardedBuiltinIsReadableStreamLockedCodeLength) \
 
 #define WEBCORE_FOREACH_UNGUARDEDBUILTIN_BUILTIN_FUNCTION_NAME(macro) \
     macro(isReadableStreamLocked) \
 
-#define DECLARE_BUILTIN_GENERATOR(codeName, functionName, overriddenName, argumentCount) \
+#define DECLARE_BUILTIN_GENERATOR(codeName, functionName, argumentCount) \
     JSC::FunctionExecutable* codeName##Generator(JSC::VM&);
 
 WEBCORE_FOREACH_UNGUARDEDBUILTIN_BUILTIN_CODE(DECLARE_BUILTIN_GENERATOR)
@@ -69,13 +69,13 @@ 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, overriddenName, length) , m_##name##Source(JSC::makeSource(StringImpl::createFromLiteral(s_##name, length), { }))
+#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, overriddenName, length) \
+#define EXPOSE_BUILTIN_EXECUTABLES(name, functionName, length) \
     JSC::UnlinkedFunctionExecutable* name##Executable(); \
     const JSC::SourceCode& name##Source() const { return m_##name##Source; }
     WEBCORE_FOREACH_UNGUARDEDBUILTIN_BUILTIN_CODE(EXPOSE_BUILTIN_EXECUTABLES)
@@ -90,7 +90,7 @@ private:
 
     WEBCORE_FOREACH_UNGUARDEDBUILTIN_BUILTIN_FUNCTION_NAME(DECLARE_BUILTIN_NAMES)
 
-#define DECLARE_BUILTIN_SOURCE_MEMBERS(name, functionName, overriddenName, length) \
+#define DECLARE_BUILTIN_SOURCE_MEMBERS(name, functionName, length) \
     JSC::SourceCode m_##name##Source;\
     JSC::Weak<JSC::UnlinkedFunctionExecutable> m_##name##Executable;
     WEBCORE_FOREACH_UNGUARDEDBUILTIN_BUILTIN_CODE(DECLARE_BUILTIN_SOURCE_MEMBERS)
@@ -98,15 +98,11 @@ private:
 
 };
 
-#define DEFINE_BUILTIN_EXECUTABLES(name, functionName, overriddenName, length) \
+#define DEFINE_BUILTIN_EXECUTABLES(name, functionName, length) \
 inline JSC::UnlinkedFunctionExecutable* UnguardedBuiltinBuiltinsWrapper::name##Executable() \
 {\
-    if (!m_##name##Executable) {\
-        JSC::Identifier executableName = functionName##PublicName();\
-        if (overriddenName)\
-            executableName = JSC::Identifier::fromString(&m_vm, overriddenName);\
-        m_##name##Executable = JSC::Weak<JSC::UnlinkedFunctionExecutable>(JSC::createBuiltinExecutable(m_vm, m_##name##Source, executableName, s_##name##ConstructAbility), this, &m_##name##Executable);\
-    }\
+    if (!m_##name##Executable)\
+        m_##name##Executable = JSC::Weak<JSC::UnlinkedFunctionExecutable>(JSC::createBuiltinExecutable(m_vm, m_##name##Source, functionName##PublicName(), s_##name##ConstructAbility), this, &m_##name##Executable);\
     return m_##name##Executable.get();\
 }
 WEBCORE_FOREACH_UNGUARDEDBUILTIN_BUILTIN_CODE(DEFINE_BUILTIN_EXECUTABLES)
@@ -158,7 +154,6 @@ inline void UnguardedBuiltinBuiltinsWrapper::exportNames()
 
 #include "WebCoreJSClientData.h"
 #include <heap/HeapInlines.h>
-#include <runtime/IdentifierInlines.h>
 #include <runtime/Intrinsic.h>
 #include <runtime/JSCJSValueInlines.h>
 #include <runtime/JSCellInlines.h>
@@ -179,7 +174,7 @@ const char* s_unguardedBuiltinIsReadableStreamLockedCode =
 ;
 
 
-#define DEFINE_BUILTIN_GENERATOR(codeName, functionName, overriddenName, argumentCount) \
+#define DEFINE_BUILTIN_GENERATOR(codeName, functionName, argumentCount) \
 JSC::FunctionExecutable* codeName##Generator(JSC::VM& vm) \
 {\
     JSVMClientData* clientData = static_cast<JSVMClientData*>(vm.clientData); \
index 4da78b3..7846ee8 100644 (file)
@@ -65,16 +65,16 @@ extern const JSC::ConstructAbility s_xmlCasingTestUrlCasingTestCodeConstructAbil
 #define WEBCORE_BUILTIN_XMLCASINGTEST_URLCASINGTEST 1
 
 #define WEBCORE_FOREACH_XMLCASINGTEST_BUILTIN_CODE(macro) \
-    macro(xmlCasingTestXMLCasingTestCode, xmlCasingTest, static_cast<const char*>(nullptr), s_xmlCasingTestXMLCasingTestCodeLength) \
-    macro(xmlCasingTestCssCasingTestCode, cssCasingTest, static_cast<const char*>(nullptr), s_xmlCasingTestCssCasingTestCodeLength) \
-    macro(xmlCasingTestUrlCasingTestCode, urlCasingTest, static_cast<const char*>(nullptr), s_xmlCasingTestUrlCasingTestCodeLength) \
+    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, overriddenName, argumentCount) \
+#define DECLARE_BUILTIN_GENERATOR(codeName, functionName, argumentCount) \
     JSC::FunctionExecutable* codeName##Generator(JSC::VM&);
 
 WEBCORE_FOREACH_XMLCASINGTEST_BUILTIN_CODE(DECLARE_BUILTIN_GENERATOR)
@@ -85,13 +85,13 @@ 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, overriddenName, length) , m_##name##Source(JSC::makeSource(StringImpl::createFromLiteral(s_##name, length), { }))
+#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, overriddenName, length) \
+#define EXPOSE_BUILTIN_EXECUTABLES(name, functionName, length) \
     JSC::UnlinkedFunctionExecutable* name##Executable(); \
     const JSC::SourceCode& name##Source() const { return m_##name##Source; }
     WEBCORE_FOREACH_XMLCASINGTEST_BUILTIN_CODE(EXPOSE_BUILTIN_EXECUTABLES)
@@ -106,7 +106,7 @@ private:
 
     WEBCORE_FOREACH_XMLCASINGTEST_BUILTIN_FUNCTION_NAME(DECLARE_BUILTIN_NAMES)
 
-#define DECLARE_BUILTIN_SOURCE_MEMBERS(name, functionName, overriddenName, length) \
+#define DECLARE_BUILTIN_SOURCE_MEMBERS(name, functionName, length) \
     JSC::SourceCode m_##name##Source;\
     JSC::Weak<JSC::UnlinkedFunctionExecutable> m_##name##Executable;
     WEBCORE_FOREACH_XMLCASINGTEST_BUILTIN_CODE(DECLARE_BUILTIN_SOURCE_MEMBERS)
@@ -114,15 +114,11 @@ private:
 
 };
 
-#define DEFINE_BUILTIN_EXECUTABLES(name, functionName, overriddenName, length) \
+#define DEFINE_BUILTIN_EXECUTABLES(name, functionName, length) \
 inline JSC::UnlinkedFunctionExecutable* xmlCasingTestBuiltinsWrapper::name##Executable() \
 {\
-    if (!m_##name##Executable) {\
-        JSC::Identifier executableName = functionName##PublicName();\
-        if (overriddenName)\
-            executableName = JSC::Identifier::fromString(&m_vm, overriddenName);\
-        m_##name##Executable = JSC::Weak<JSC::UnlinkedFunctionExecutable>(JSC::createBuiltinExecutable(m_vm, m_##name##Source, executableName, s_##name##ConstructAbility), this, &m_##name##Executable);\
-    }\
+    if (!m_##name##Executable)\
+        m_##name##Executable = JSC::Weak<JSC::UnlinkedFunctionExecutable>(JSC::createBuiltinExecutable(m_vm, m_##name##Source, functionName##PublicName(), s_##name##ConstructAbility), this, &m_##name##Executable);\
     return m_##name##Executable.get();\
 }
 WEBCORE_FOREACH_XMLCASINGTEST_BUILTIN_CODE(DEFINE_BUILTIN_EXECUTABLES)
@@ -153,8 +149,8 @@ public:
 
 inline void xmlCasingTestBuiltinFunctions::init(JSC::JSGlobalObject& globalObject)
 {
-#define EXPORT_FUNCTION(codeName, functionName, overriddenName, length)\
-    m_##functionName##Function.set(m_vm, &globalObject, JSC::JSFunction::create(m_vm, codeName##Generator(m_vm), &globalObject));
+#define EXPORT_FUNCTION(codeName, functionName, length)\
+    m_##functionName##Function.set(m_vm, &globalObject, JSC::JSFunction::createBuiltinFunction(m_vm, codeName##Generator(m_vm), &globalObject));
     WEBCORE_FOREACH_XMLCASINGTEST_BUILTIN_CODE(EXPORT_FUNCTION)
 #undef EXPORT_FUNCTION
 }
@@ -210,7 +206,6 @@ inline void xmlCasingTestBuiltinFunctions::visit(JSC::SlotVisitor& visitor)
 
 #include "WebCoreJSClientData.h"
 #include <heap/HeapInlines.h>
-#include <runtime/IdentifierInlines.h>
 #include <runtime/Intrinsic.h>
 #include <runtime/JSCJSValueInlines.h>
 #include <runtime/JSCellInlines.h>
@@ -268,7 +263,7 @@ const char* s_xmlCasingTestUrlCasingTestCode =
 ;
 
 
-#define DEFINE_BUILTIN_GENERATOR(codeName, functionName, overriddenName, argumentCount) \
+#define DEFINE_BUILTIN_GENERATOR(codeName, functionName, argumentCount) \
 JSC::FunctionExecutable* codeName##Generator(JSC::VM& vm) \
 {\
     JSVMClientData* clientData = static_cast<JSVMClientData*>(vm.clientData); \
index 114fc74..12cca5d 100644 (file)
@@ -23,7 +23,6 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-@overriddenName="[Symbol.asyncIterator]"
 function symbolAsyncIteratorGetter()
 {
     "use strict";
index ad0d839..9e0d461 100644 (file)
@@ -36,7 +36,7 @@ namespace JSC {
 
 BuiltinExecutables::BuiltinExecutables(VM& vm)
     : m_vm(vm)
-#define INITIALIZE_BUILTIN_SOURCE_MEMBERS(name, functionName, overrideName, length) , m_##name##Source(makeSource(StringImpl::createFromLiteral(s_##name, length), { }))
+#define INITIALIZE_BUILTIN_SOURCE_MEMBERS(name, functionName, length) , m_##name##Source(makeSource(StringImpl::createFromLiteral(s_##name, length), { }))
     JSC_FOREACH_BUILTIN_CODE(INITIALIZE_BUILTIN_SOURCE_MEMBERS)
 #undef EXPOSE_BUILTIN_STRINGS
 {
@@ -114,15 +114,11 @@ void BuiltinExecutables::finalize(Handle<Unknown>, void* context)
     static_cast<Weak<UnlinkedFunctionExecutable>*>(context)->clear();
 }
 
-#define DEFINE_BUILTIN_EXECUTABLES(name, functionName, overrideName, length) \
+#define DEFINE_BUILTIN_EXECUTABLES(name, functionName, length) \
 UnlinkedFunctionExecutable* BuiltinExecutables::name##Executable() \
 {\
-    if (!m_##name##Executable) {\
-        Identifier executableName = m_vm.propertyNames->builtinNames().functionName##PublicName();\
-        if (overrideName)\
-            executableName = Identifier::fromString(&m_vm, overrideName);\
-        m_##name##Executable = Weak<UnlinkedFunctionExecutable>(createBuiltinExecutable(m_##name##Source, executableName, s_##name##ConstructAbility), this, &m_##name##Executable);\
-    }\
+    if (!m_##name##Executable)\
+        m_##name##Executable = Weak<UnlinkedFunctionExecutable>(createBuiltinExecutable(m_##name##Source, m_vm.propertyNames->builtinNames().functionName##PublicName(), s_##name##ConstructAbility), this, &m_##name##Executable);\
     return m_##name##Executable.get();\
 }
 JSC_FOREACH_BUILTIN_CODE(DEFINE_BUILTIN_EXECUTABLES)
index 368a31b..ee0eaad 100644 (file)
@@ -42,7 +42,7 @@ class BuiltinExecutables final: private WeakHandleOwner {
 public:
     explicit BuiltinExecutables(VM&);
 
-#define EXPOSE_BUILTIN_EXECUTABLES(name, functionName, overriddenName, length) \
+#define EXPOSE_BUILTIN_EXECUTABLES(name, functionName, length) \
 UnlinkedFunctionExecutable* name##Executable(); \
 const SourceCode& name##Source() { return m_##name##Source; }
     
@@ -59,7 +59,7 @@ private:
 
     UnlinkedFunctionExecutable* createBuiltinExecutable(const SourceCode&, const Identifier&, ConstructAbility);
 
-#define DECLARE_BUILTIN_SOURCE_MEMBERS(name, functionName, overriddenName, length)\
+#define DECLARE_BUILTIN_SOURCE_MEMBERS(name, functionName, length)\
     SourceCode m_##name##Source; \
     Weak<UnlinkedFunctionExecutable> m_##name##Executable;
     JSC_FOREACH_BUILTIN_CODE(DECLARE_BUILTIN_SOURCE_MEMBERS)
index e40a696..f1ee867 100644 (file)
@@ -42,7 +42,7 @@ function apply(thisValue, argumentValues)
     return this.@apply(thisValue, argumentValues);
 }
 
-@overriddenName="[Symbol.hasInstance]"
+// FIXME: this should have a different name: https://bugs.webkit.org/show_bug.cgi?id=151363
 function symbolHasInstance(value)
 {
     "use strict";
index 43c6fa1..72011f5 100644 (file)
@@ -57,9 +57,9 @@ function isDictionary(object)
     return object == null || typeof object === "object";
 }
 
+// FIXME: this needs to have it's name changed to "get [Symbol.species]".
+// see: https://bugs.webkit.org/show_bug.cgi?id=151363
 @globalPrivate
-@getter
-@overriddenName="get [Symbol.species]"
 function speciesGetter()
 {
     return this;
index f5f33ad..5c1691a 100644 (file)
@@ -23,7 +23,6 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-@overriddenName="[Symbol.iterator]"
 function symbolIteratorGetter()
 {
     "use strict";
index 604cce2..60a728b 100644 (file)
@@ -79,7 +79,6 @@ function hasObservableSideEffectsForRegExpMatch(regexp) {
     return !@isRegExpObject(regexp);
 }
 
-@overriddenName="[Symbol.match]"
 function match(strArg)
 {
     "use strict";
@@ -131,7 +130,6 @@ function match(strArg)
     }
 }
 
-@overriddenName="[Symbol.replace]"
 function replace(strArg, replace)
 {
     "use strict";
@@ -299,7 +297,6 @@ function replace(strArg, replace)
 }
 
 // 21.2.5.9 RegExp.prototype[@@search] (string)
-@overriddenName="[Symbol.search]"
 function search(strArg)
 {
     "use strict";
@@ -383,7 +380,6 @@ function hasObservableSideEffectsForRegExpSplit(regexp) {
 }
 
 // ES 21.2.5.11 RegExp.prototype[@@split](string, limit)
-@overriddenName="[Symbol.split]"
 function split(string, limit)
 {
     "use strict";
index 56fda57..52f1dc6 100644 (file)
@@ -3046,7 +3046,7 @@ EncodedJSValue JSC_HOST_CALL functionCreateBuiltin(ExecState* exec)
     RETURN_IF_EXCEPTION(scope, encodedJSValue());
 
     const SourceCode& source = makeSource(functionText, { });
-    JSFunction* func = JSFunction::create(vm, createBuiltinExecutable(vm, source, Identifier::fromString(&vm, "foo"), ConstructorKind::None, ConstructAbility::CannotConstruct)->link(vm, source), exec->lexicalGlobalObject());
+    JSFunction* func = JSFunction::createBuiltinFunction(vm, createBuiltinExecutable(vm, source, Identifier::fromString(&vm, "foo"), ConstructorKind::None, ConstructAbility::CannotConstruct)->link(vm, source), exec->lexicalGlobalObject());
 
     return JSValue::encode(func);
 }
index 3beda47..5427780 100644 (file)
@@ -41,7 +41,7 @@ void AsyncIteratorPrototype::finishCreation(VM& vm, JSGlobalObject* globalObject
     ASSERT(inherits(vm, info()));
     vm.prototypeMap.addPrototype(this);
 
-    JSFunction* asyncIteratorPrototypeFunction = JSFunction::create(vm, asyncIteratorPrototypeSymbolAsyncIteratorGetterCodeGenerator(vm), globalObject);
+    JSFunction* asyncIteratorPrototypeFunction = JSFunction::createBuiltinFunction(vm, asyncIteratorPrototypeSymbolAsyncIteratorGetterCodeGenerator(vm), globalObject, "[Symbol.asyncIterator]");
     putDirectWithoutTransition(vm, vm.propertyNames->asyncIteratorSymbol, asyncIteratorPrototypeFunction, DontEnum);
 }
 
index 37c0b47..42f194e 100644 (file)
@@ -65,7 +65,7 @@ void FunctionPrototype::addFunctionProperties(ExecState* exec, JSGlobalObject* g
     *callFunction = putDirectBuiltinFunctionWithoutTransition(vm, globalObject, vm.propertyNames->builtinNames().callPublicName(), functionPrototypeCallCodeGenerator(vm), DontEnum);
     putDirectBuiltinFunctionWithoutTransition(vm, globalObject, vm.propertyNames->bind, functionPrototypeBindCodeGenerator(vm), DontEnum);
 
-    *hasInstanceSymbolFunction = JSFunction::create(vm, functionPrototypeSymbolHasInstanceCodeGenerator(vm), globalObject);
+    *hasInstanceSymbolFunction = JSFunction::createBuiltinFunction(vm, functionPrototypeSymbolHasInstanceCodeGenerator(vm), globalObject, ASCIILiteral("[Symbol.hasInstance]"));
     putDirectWithoutTransition(vm, vm.propertyNames->hasInstanceSymbol, *hasInstanceSymbolFunction, DontDelete | ReadOnly | DontEnum);
 }
     
index 0ecebff..f2981ca 100644 (file)
@@ -41,7 +41,8 @@ void IteratorPrototype::finishCreation(VM& vm, JSGlobalObject* globalObject)
     ASSERT(inherits(vm, info()));
     vm.prototypeMap.addPrototype(this);
 
-    JSC_BUILTIN_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->iteratorSymbol, iteratorPrototypeSymbolIteratorGetterCodeGenerator, DontEnum);
+    JSFunction* iteratorPrototypeFunction = JSFunction::createBuiltinFunction(vm, iteratorPrototypeSymbolIteratorGetterCodeGenerator(vm), globalObject, "[Symbol.iterator]");
+    putDirectWithoutTransition(vm, vm.propertyNames->iteratorSymbol, iteratorPrototypeFunction, DontEnum);
 }
 
 } // namespace JSC
index 08150c2..8119cd6 100644 (file)
@@ -102,6 +102,20 @@ void JSFunction::finishCreation(VM& vm, NativeExecutable* executable, int length
     putDirect(vm, vm.propertyNames->length, jsNumber(length), ReadOnly | DontEnum);
 }
 
+JSFunction* JSFunction::createBuiltinFunction(VM& vm, FunctionExecutable* executable, JSGlobalObject* globalObject)
+{
+    JSFunction* function = create(vm, executable, globalObject);
+    function->putDirect(vm, vm.propertyNames->name, jsString(&vm, executable->name().string()), ReadOnly | DontEnum);
+    return function;
+}
+
+JSFunction* JSFunction::createBuiltinFunction(VM& vm, FunctionExecutable* executable, JSGlobalObject* globalObject, const String& name)
+{
+    JSFunction* function = create(vm, executable, globalObject);
+    function->putDirect(vm, vm.propertyNames->name, jsString(&vm, name), ReadOnly | DontEnum);
+    return function;
+}
+
 FunctionRareData* JSFunction::allocateRareData(VM& vm)
 {
     ASSERT(!m_rareData);
@@ -406,7 +420,7 @@ void JSFunction::getOwnNonIndexPropertyNames(JSObject* object, ExecState* exec,
         } else {
             if (thisObject->isBuiltinFunction() && !thisObject->hasReifiedLength())
                 propertyNames.add(vm.propertyNames->length);
-            if ((thisObject->isBuiltinFunction() || thisObject->inherits(vm, JSBoundFunction::info())) && !thisObject->hasReifiedName())
+            if (thisObject->inherits(vm, JSBoundFunction::info()) && !thisObject->hasReifiedName())
                 propertyNames.add(vm.propertyNames->name);
         }
     }
@@ -712,9 +726,7 @@ JSFunction::LazyPropertyType JSFunction::reifyLazyBoundNameIfNeeded(VM& vm, Exec
     if (hasReifiedName())
         return LazyPropertyType::IsLazyProperty;
 
-    if (isBuiltinFunction())
-        reifyName(vm, exec);
-    else if (this->inherits(vm, JSBoundFunction::info())) {
+    if (this->inherits(vm, JSBoundFunction::info())) {
         FunctionRareData* rareData = this->rareData(vm);
         String name = makeString("bound ", static_cast<NativeExecutable*>(m_executable.get())->name());
         unsigned initialAttributes = DontEnum | ReadOnly;
index 4423c30..8c85730 100644 (file)
@@ -74,9 +74,12 @@ public:
     
     static JSFunction* createWithInvalidatedReallocationWatchpoint(VM&, FunctionExecutable*, JSScope*);
 
-    JS_EXPORT_PRIVATE static JSFunction* create(VM&, FunctionExecutable*, JSScope*);
+    static JSFunction* create(VM&, FunctionExecutable*, JSScope*);
     static JSFunction* create(VM&, FunctionExecutable*, JSScope*, Structure*);
 
+    JS_EXPORT_PRIVATE static JSFunction* createBuiltinFunction(VM&, FunctionExecutable*, JSGlobalObject*);
+    static JSFunction* createBuiltinFunction(VM&, FunctionExecutable*, JSGlobalObject*, const String& name);
+
     JS_EXPORT_PRIVATE String name(VM&);
     JS_EXPORT_PRIVATE String displayName(VM&);
     const String calculatedDisplayName(VM&);
index f916a46..33097a9 100644 (file)
@@ -416,24 +416,24 @@ void JSGlobalObject::init(VM& vm)
         });
     m_arrayProtoValuesFunction.initLater(
         [] (const Initializer<JSFunction>& init) {
-            init.set(JSFunction::create(init.vm, arrayPrototypeValuesCodeGenerator(init.vm), init.owner));
+            init.set(JSFunction::createBuiltinFunction(init.vm, arrayPrototypeValuesCodeGenerator(init.vm), init.owner));
         });
     m_initializePromiseFunction.initLater(
         [] (const Initializer<JSFunction>& init) {
-            init.set(JSFunction::create(init.vm, promiseOperationsInitializePromiseCodeGenerator(init.vm), init.owner));
+            init.set(JSFunction::createBuiltinFunction(init.vm, promiseOperationsInitializePromiseCodeGenerator(init.vm), init.owner));
         });
 
     m_iteratorProtocolFunction.initLater(
         [] (const Initializer<JSFunction>& init) {
-            init.set(JSFunction::create(init.vm, iteratorHelpersPerformIterationCodeGenerator(init.vm), init.owner));
+            init.set(JSFunction::createBuiltinFunction(init.vm, iteratorHelpersPerformIterationCodeGenerator(init.vm), init.owner));
         });
 
     m_promiseResolveFunction.initLater(
         [] (const Initializer<JSFunction>& init) {
-            init.set(JSFunction::create(init.vm, promiseConstructorResolveCodeGenerator(init.vm), init.owner));
+            init.set(JSFunction::createBuiltinFunction(init.vm, promiseConstructorResolveCodeGenerator(init.vm), init.owner));
         });
 
-    m_newPromiseCapabilityFunction.set(vm, this, JSFunction::create(vm, promiseOperationsNewPromiseCapabilityCodeGenerator(vm), this));
+    m_newPromiseCapabilityFunction.set(vm, this, JSFunction::createBuiltinFunction(vm, promiseOperationsNewPromiseCapabilityCodeGenerator(vm), this));
     m_functionProtoHasInstanceSymbolFunction.set(vm, this, hasInstanceSymbolFunction);
     m_throwTypeErrorGetterSetter.initLater(
         [] (const Initializer<GetterSetter>& init) {
@@ -464,7 +464,7 @@ void JSGlobalObject::init(VM& vm)
     m_functionPrototype->initRestrictedProperties(exec, this);
 
     m_speciesGetterSetter.set(vm, this, GetterSetter::create(vm, this));
-    m_speciesGetterSetter->setGetter(vm, this, JSFunction::create(vm, globalOperationsSpeciesGetterCodeGenerator(vm), this));
+    m_speciesGetterSetter->setGetter(vm, this, JSFunction::createBuiltinFunction(vm, globalOperationsSpeciesGetterCodeGenerator(vm), this, "get [Symbol.species]"));
 
     m_typedArrayProto.initLater(
         [] (const Initializer<JSTypedArrayViewPrototype>& init) {
@@ -779,7 +779,7 @@ putDirectWithoutTransition(vm, vm.propertyNames-> jsName, lowerName ## Construct
     JSObject* regExpSymbolReplace = asObject(m_regExpPrototype->getDirect(vm, vm.propertyNames->replaceSymbol).asCell());
     m_regExpProtoSymbolReplace.set(vm, this, regExpSymbolReplace);
 
-#define CREATE_PRIVATE_GLOBAL_FUNCTION(name, code) JSFunction* name ## PrivateFunction = JSFunction::create(vm, code ## CodeGenerator(vm), this);
+#define CREATE_PRIVATE_GLOBAL_FUNCTION(name, code) JSFunction* name ## PrivateFunction = JSFunction::createBuiltinFunction(vm, code ## CodeGenerator(vm), this);
     JSC_FOREACH_BUILTIN_FUNCTION_PRIVATE_GLOBAL_NAME(CREATE_PRIVATE_GLOBAL_FUNCTION)
 #undef CREATE_PRIVATE_GLOBAL_FUNCTION
 
index 031c0c6..1a33e87 100644 (file)
@@ -2969,14 +2969,14 @@ JSFunction* JSObject::putDirectBuiltinFunction(VM& vm, JSGlobalObject* globalObj
     if (!name)
         name = vm.propertyNames->anonymous.impl();
     ASSERT(name);
-    JSFunction* function = JSFunction::create(vm, static_cast<FunctionExecutable*>(functionExecutable), globalObject);
+    JSFunction* function = JSFunction::createBuiltinFunction(vm, static_cast<FunctionExecutable*>(functionExecutable), globalObject);
     putDirect(vm, propertyName, function, attributes);
     return function;
 }
 
 JSFunction* JSObject::putDirectBuiltinFunctionWithoutTransition(VM& vm, JSGlobalObject* globalObject, const PropertyName& propertyName, FunctionExecutable* functionExecutable, unsigned attributes)
 {
-    JSFunction* function = JSFunction::create(vm, static_cast<FunctionExecutable*>(functionExecutable), globalObject);
+    JSFunction* function = JSFunction::createBuiltinFunction(vm, static_cast<FunctionExecutable*>(functionExecutable), globalObject);
     putDirectWithoutTransition(vm, propertyName, function, attributes);
     return function;
 }
index 59ea647..3d8970e 100644 (file)
@@ -330,7 +330,7 @@ void JSTypedArrayViewPrototype::finishCreation(VM& vm, JSGlobalObject* globalObj
     toStringTagAccessor->setGetter(vm, globalObject, toStringTagFunction);
     putDirectNonIndexAccessor(vm, vm.propertyNames->toStringTagSymbol, toStringTagAccessor, DontEnum | ReadOnly | Accessor);
 
-    JSFunction* valuesFunction = JSFunction::create(vm, typedArrayPrototypeValuesCodeGenerator(vm), globalObject);
+    JSFunction* valuesFunction = JSFunction::createBuiltinFunction(vm, typedArrayPrototypeValuesCodeGenerator(vm), globalObject);
 
     putDirectWithoutTransition(vm, vm.propertyNames->builtinNames().valuesPublicName(), valuesFunction, DontEnum);
     putDirectWithoutTransition(vm, vm.propertyNames->iteratorSymbol, valuesFunction, DontEnum);
index 862f63c..3005abb 100644 (file)
@@ -31,16 +31,12 @@ void reifyStaticAccessor(VM& vm, const HashTableValue& value, JSObject& thisObje
     JSGlobalObject* globalObject = thisObject.globalObject();
     GetterSetter* accessor = GetterSetter::create(vm, globalObject);
     if (value.accessorGetter()) {
-        JSFunction* function = nullptr;
-        if (value.attributes() & Builtin)
-            function = JSFunction::create(vm, value.builtinAccessorGetterGenerator()(vm), globalObject);
-        else {
-            String getterName = tryMakeString(ASCIILiteral("get "), String(*propertyName.publicName()));
-            if (!getterName)
-                return;
-            function = JSFunction::create(vm, globalObject, 0, getterName, value.accessorGetter());
-        }
-        accessor->setGetter(vm, globalObject, function);
+        String getterName = tryMakeString(ASCIILiteral("get "), String(*propertyName.publicName()));
+        if (!getterName)
+            return;
+        accessor->setGetter(vm, globalObject, value.attributes() & Builtin
+            ? JSFunction::createBuiltinFunction(vm, value.builtinAccessorGetterGenerator()(vm), globalObject, getterName)
+            : JSFunction::create(vm, globalObject, 0, getterName, value.accessorGetter()));
     }
     thisObject.putDirectNonIndexAccessor(vm, propertyName, accessor, attributesForStructure(value.attributes()));
 }
index 2dc104b..ec2d702 100644 (file)
@@ -71,7 +71,7 @@ void MapPrototype::finishCreation(VM& vm, JSGlobalObject* globalObject)
     JSC_NATIVE_INTRINSIC_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->builtinNames().getPrivateName(), mapProtoFuncGet, DontEnum, 1, JSMapGetIntrinsic);
     JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->builtinNames().setPrivateName(), mapProtoFuncSet, DontEnum, 2);
 
-    JSFunction* entries = JSFunction::create(vm, mapPrototypeEntriesCodeGenerator(vm), globalObject);
+    JSFunction* entries = JSFunction::createBuiltinFunction(vm, mapPrototypeEntriesCodeGenerator(vm), globalObject);
     putDirectWithoutTransition(vm, vm.propertyNames->builtinNames().entriesPublicName(), entries, DontEnum);
     putDirectWithoutTransition(vm, vm.propertyNames->iteratorSymbol, entries, DontEnum);
     putDirectWithoutTransition(vm, vm.propertyNames->toStringTagSymbol, jsString(&vm, "Map"), DontEnum | ReadOnly);
index 6c5d19b..146c255 100644 (file)
@@ -78,10 +78,16 @@ void RegExpPrototype::finishCreation(VM& vm, JSGlobalObject* globalObject)
     JSC_NATIVE_GETTER(vm.propertyNames->unicode, regExpProtoGetterUnicode, DontEnum | Accessor);
     JSC_NATIVE_GETTER(vm.propertyNames->source, regExpProtoGetterSource, DontEnum | Accessor);
     JSC_NATIVE_GETTER(vm.propertyNames->flags, regExpProtoGetterFlags, DontEnum | Accessor);
-    JSC_BUILTIN_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->matchSymbol, regExpPrototypeMatchCodeGenerator, DontEnum);
-    JSC_BUILTIN_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->replaceSymbol, regExpPrototypeReplaceCodeGenerator, DontEnum);
-    JSC_BUILTIN_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->searchSymbol, regExpPrototypeSearchCodeGenerator, DontEnum);
-    JSC_BUILTIN_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->splitSymbol, regExpPrototypeSplitCodeGenerator, DontEnum);
+
+    JSFunction* matchFunction = JSFunction::createBuiltinFunction(vm, regExpPrototypeMatchCodeGenerator(vm), globalObject, ASCIILiteral("[Symbol.match]"));
+    putDirectWithoutTransition(vm, vm.propertyNames->matchSymbol, matchFunction, DontEnum);
+    JSFunction* replaceFunction = JSFunction::createBuiltinFunction(vm, regExpPrototypeReplaceCodeGenerator(vm), globalObject, ASCIILiteral("[Symbol.replace]"));
+    putDirectWithoutTransition(vm, vm.propertyNames->replaceSymbol, replaceFunction, DontEnum);
+    JSFunction* searchFunction = JSFunction::createBuiltinFunction(vm, regExpPrototypeSearchCodeGenerator(vm), globalObject, ASCIILiteral("[Symbol.search]"));
+    putDirectWithoutTransition(vm, vm.propertyNames->searchSymbol, searchFunction, DontEnum);
+    JSFunction* splitFunction = JSFunction::createBuiltinFunction(vm, regExpPrototypeSplitCodeGenerator(vm), globalObject, ASCIILiteral("[Symbol.split]"));
+    putDirectWithoutTransition(vm, vm.propertyNames->splitSymbol, splitFunction, DontEnum);
+
     JSC_BUILTIN_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->test, regExpPrototypeTestCodeGenerator, DontEnum);
 
     m_emptyRegExp.set(vm, this, RegExp::create(vm, "", NoFlags));
index 3b20ed1..ace9adf 100644 (file)
@@ -68,7 +68,7 @@ void SetPrototype::finishCreation(VM& vm, JSGlobalObject* globalObject)
     JSC_NATIVE_INTRINSIC_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->builtinNames().hasPrivateName(), setProtoFuncHas, DontEnum, 1, JSSetHasIntrinsic);
     JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->builtinNames().addPrivateName(), setProtoFuncAdd, DontEnum, 1);
 
-    JSFunction* values = JSFunction::create(vm, setPrototypeValuesCodeGenerator(vm), globalObject);
+    JSFunction* values = JSFunction::createBuiltinFunction(vm, setPrototypeValuesCodeGenerator(vm), globalObject);
     putDirectWithoutTransition(vm, vm.propertyNames->builtinNames().valuesPublicName(), values, DontEnum);
     putDirectWithoutTransition(vm, vm.propertyNames->builtinNames().keysPublicName(), values, DontEnum);
     putDirectWithoutTransition(vm, vm.propertyNames->iteratorSymbol, values, DontEnum);
index 4f01cf1..54ef34a 100644 (file)
@@ -1,3 +1,16 @@
+2017-08-30  Ryan Haddad  <ryanhaddad@apple.com>
+
+        Unreviewed, rolling out r221327.
+
+        This change caused test262 failures.
+
+        Reverted changeset:
+
+        "[JSC] Use reifying system for "name" property of builtin
+        JSFunction"
+        https://bugs.webkit.org/show_bug.cgi?id=175260
+        http://trac.webkit.org/changeset/221327
+
 2017-08-30  Youenn Fablet  <youenn@apple.com>
 
         [Cache API] Support cache names persistency
index 2341f0e..f6711ed 100644 (file)
@@ -59,7 +59,6 @@ function initializeFetchResponse(body, init)
     return this;
 }
 
-@getter
 function bodyUsed()
 {
    if (!(this instanceof @Response))
@@ -71,7 +70,6 @@ function bodyUsed()
     return @Response.prototype.@isDisturbed.@call(this);
 }
 
-@getter
 function body()
 {
     if (!(this instanceof @Response))
index 4c3b25e..1b68a04 100644 (file)
@@ -76,7 +76,6 @@ function close()
     @readableByteStreamControllerClose(this);
 }
 
-@getter
 function byobRequest()
 {
     "use strict";
@@ -95,7 +94,6 @@ function byobRequest()
     return this.@byobRequest;
 }
 
-@getter
 function desiredSize()
 {
     "use strict";
index 23de7e0..4b2b282 100644 (file)
@@ -216,7 +216,6 @@ function tee()
     return @readableStreamTee(this, false);
 }
 
-@getter
 function locked()
 {
     "use strict";
index 3411002..777e576 100644 (file)
@@ -75,7 +75,6 @@ function releaseLock()
     @readableStreamReaderGenericRelease(this);
 }
 
-@getter
 function closed()
 {
     "use strict";
index 71099a0..7cf06fb 100644 (file)
@@ -57,7 +57,6 @@ function respondWithNewView(view)
     return @readableByteStreamControllerRespondWithNewView(this.@associatedReadableByteStreamController, view);
 }
 
-@getter
 function view()
 {
     "use strict";
index 0df0af1..38747e8 100644 (file)
@@ -70,7 +70,6 @@ function close()
     @readableStreamDefaultControllerClose(this);
 }
 
-@getter
 function desiredSize()
 {
     "use strict";
index 2d73045..abba088 100644 (file)
@@ -66,7 +66,6 @@ function releaseLock()
     @readableStreamReaderGenericRelease(this);
 }
 
-@getter
 function closed()
 {
     "use strict";
index 348da12..233eb7c 100644 (file)
@@ -145,7 +145,6 @@ function write(chunk)
     return promiseCapability.@promise;
 }
 
-@getter
 function closed()
 {
     "use strict";
@@ -156,7 +155,6 @@ function closed()
     return this.@closedPromiseCapability.@promise;
 }
 
-@getter
 function ready()
 {
     "use strict";
@@ -167,7 +165,6 @@ function ready()
     return this.@readyPromiseCapability.@promise;
 }
 
-@getter
 function state()
 {
     "use strict";
index 6ab5ec0..74ee3a5 100644 (file)
@@ -72,7 +72,7 @@ template<typename JSClass> inline void JSDOMBuiltinConstructor<JSClass>::finishC
 {
     Base::finishCreation(vm);
     ASSERT(inherits(vm, info()));
-    setInitializeFunction(vm, *JSC::JSFunction::create(vm, initializeExecutable(vm), &globalObject));
+    setInitializeFunction(vm, *JSC::JSFunction::createBuiltinFunction(vm, initializeExecutable(vm), &globalObject));
     initializeProperties(vm, globalObject);
 }