Unreviewed, rolling out r202248.
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 21 Jun 2016 00:26:59 +0000 (00:26 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 21 Jun 2016 00:26:59 +0000 (00:26 +0000)
https://bugs.webkit.org/show_bug.cgi?id=158960

breaks builds on the simulator (Requested by keith_mi_ on
#webkit).

Reverted changeset:

"It should be easy to add a private global helper function for
builtins"
https://bugs.webkit.org/show_bug.cgi?id=158893
http://trac.webkit.org/changeset/202248

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

60 files changed:
Source/JavaScriptCore/CMakeLists.txt
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj
Source/JavaScriptCore/Scripts/builtins/builtins_generate_combined_header.py
Source/JavaScriptCore/Scripts/builtins/builtins_model.py
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-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/ArrayIteratorPrototype.js
Source/JavaScriptCore/builtins/ArrayPrototype.js
Source/JavaScriptCore/builtins/BuiltinNames.h
Source/JavaScriptCore/builtins/GeneratorPrototype.js
Source/JavaScriptCore/builtins/GlobalObject.js
Source/JavaScriptCore/builtins/PromiseOperations.js
Source/JavaScriptCore/builtins/RegExpPrototype.js
Source/JavaScriptCore/builtins/StringPrototype.js
Source/JavaScriptCore/bytecode/BytecodeIntrinsicRegistry.cpp
Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp
Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp
Source/JavaScriptCore/dfg/DFGOperations.cpp
Source/JavaScriptCore/inspector/JSInjectedScriptHost.cpp
Source/JavaScriptCore/parser/Lexer.cpp
Source/JavaScriptCore/parser/Nodes.h
Source/JavaScriptCore/parser/Parser.cpp
Source/JavaScriptCore/runtime/ArrayIteratorPrototype.cpp
Source/JavaScriptCore/runtime/ArrayIteratorPrototype.h
Source/JavaScriptCore/runtime/ArrayPrototype.cpp
Source/JavaScriptCore/runtime/CommonIdentifiers.cpp
Source/JavaScriptCore/runtime/CommonIdentifiers.h
Source/JavaScriptCore/runtime/CommonSlowPaths.cpp
Source/JavaScriptCore/runtime/IntlDateTimeFormat.cpp
Source/JavaScriptCore/runtime/IntlDateTimeFormatPrototype.cpp
Source/JavaScriptCore/runtime/IntlNumberFormatPrototype.cpp
Source/JavaScriptCore/runtime/IntlObjectInlines.h
Source/JavaScriptCore/runtime/JSArrayIterator.cpp [new file with mode: 0644]
Source/JavaScriptCore/runtime/JSArrayIterator.h [new file with mode: 0644]
Source/JavaScriptCore/runtime/JSGenericTypedArrayViewConstructorInlines.h
Source/JavaScriptCore/runtime/JSGenericTypedArrayViewPrototypeFunctions.h
Source/JavaScriptCore/runtime/JSGlobalObject.cpp
Source/JavaScriptCore/runtime/JSInternalPromise.cpp
Source/JavaScriptCore/runtime/JSInternalPromiseDeferred.cpp
Source/JavaScriptCore/runtime/JSPromise.cpp
Source/JavaScriptCore/runtime/JSPromiseDeferred.cpp
Source/JavaScriptCore/runtime/JSStringIterator.cpp
Source/JavaScriptCore/runtime/MapPrototype.cpp
Source/JavaScriptCore/runtime/ObjectConstructor.cpp
Source/JavaScriptCore/runtime/ReflectObject.cpp
Source/JavaScriptCore/runtime/StringPrototype.cpp
Source/JavaScriptCore/runtime/TypedArrayInlines.h
Source/WebCore/ChangeLog
Source/WebCore/platform/mock/mediasource/MockBox.cpp

index 20751fd69c2e8dcfb54b68c65b75ab2be2dd6a48..63656d227e5378774f997faf46d1bae593cac8d2 100644 (file)
@@ -685,6 +685,7 @@ set(JavaScriptCore_SOURCES
     runtime/JSArrayBufferConstructor.cpp
     runtime/JSArrayBufferPrototype.cpp
     runtime/JSArrayBufferView.cpp
+    runtime/JSArrayIterator.cpp
     runtime/JSBoundFunction.cpp
     runtime/JSCJSValue.cpp
     runtime/JSCallee.cpp
index 651e4904d96369e8b219febbcfd0fe35e8f98334..7ab106d08b679bf526c5f27e46e18cb45d05381e 100644 (file)
@@ -1,3 +1,18 @@
+2016-06-20  Commit Queue  <commit-queue@webkit.org>
+
+        Unreviewed, rolling out r202248.
+        https://bugs.webkit.org/show_bug.cgi?id=158960
+
+        breaks builds on the simulator (Requested by keith_mi_ on
+        #webkit).
+
+        Reverted changeset:
+
+        "It should be easy to add a private global helper function for
+        builtins"
+        https://bugs.webkit.org/show_bug.cgi?id=158893
+        http://trac.webkit.org/changeset/202248
+
 2016-06-20  Keith Miller  <keith_miller@apple.com>
 
         It should be easy to add a private global helper function for builtins
index 91b7aa399744c0cddf98c5991f245fc3c505fe3e..65fffa843e8cee8c0376295a90c42062146fbb95 100644 (file)
                A74DEF95182D991400522C22 /* JSMapIterator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A74DEF8F182D991400522C22 /* JSMapIterator.cpp */; };
                A74DEF96182D991400522C22 /* JSMapIterator.h in Headers */ = {isa = PBXBuildFile; fileRef = A74DEF90182D991400522C22 /* JSMapIterator.h */; settings = {ATTRIBUTES = (Private, ); }; };
                A75706DE118A2BCF0057F88F /* JITArithmetic32_64.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A75706DD118A2BCF0057F88F /* JITArithmetic32_64.cpp */; };
-               A75EE9B218AAB7E200AAD043 /* BuiltinNames.h in Headers */ = {isa = PBXBuildFile; fileRef = A75EE9B018AAB7E200AAD043 /* BuiltinNames.h */; settings = {ATTRIBUTES = (Private, ); }; };
+               A75EE9B218AAB7E200AAD043 /* BuiltinNames.h in Headers */ = {isa = PBXBuildFile; fileRef = A75EE9B018AAB7E200AAD043 /* BuiltinNames.h */; };
                A766B44F0EE8DCD1009518CA /* ExecutableAllocator.h in Headers */ = {isa = PBXBuildFile; fileRef = A7B48DB50EE74CFC00DCBDB6 /* ExecutableAllocator.h */; settings = {ATTRIBUTES = (Private, ); }; };
                A767B5B517A0B9650063D940 /* DFGLoopPreHeaderCreationPhase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A767B5B317A0B9650063D940 /* DFGLoopPreHeaderCreationPhase.cpp */; };
                A767B5B617A0B9650063D940 /* DFGLoopPreHeaderCreationPhase.h in Headers */ = {isa = PBXBuildFile; fileRef = A767B5B417A0B9650063D940 /* DFGLoopPreHeaderCreationPhase.h */; };
                A7B601821639FD2A00372BA3 /* UnlinkedCodeBlock.h in Headers */ = {isa = PBXBuildFile; fileRef = A79E781F15EECBA80047C855 /* UnlinkedCodeBlock.h */; settings = {ATTRIBUTES = (Private, ); }; };
                A7BDAEC817F4EA1400F6140C /* ArrayIteratorPrototype.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A7BDAEC217F4EA1400F6140C /* ArrayIteratorPrototype.cpp */; };
                A7BDAEC917F4EA1400F6140C /* ArrayIteratorPrototype.h in Headers */ = {isa = PBXBuildFile; fileRef = A7BDAEC317F4EA1400F6140C /* ArrayIteratorPrototype.h */; };
+               A7BDAECA17F4EA1400F6140C /* JSArrayIterator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A7BDAEC417F4EA1400F6140C /* JSArrayIterator.cpp */; };
+               A7BDAECB17F4EA1400F6140C /* JSArrayIterator.h in Headers */ = {isa = PBXBuildFile; fileRef = A7BDAEC517F4EA1400F6140C /* JSArrayIterator.h */; };
                A7BFF3C0179868940002F462 /* DFGFiltrationResult.h in Headers */ = {isa = PBXBuildFile; fileRef = A7BFF3BF179868940002F462 /* DFGFiltrationResult.h */; };
                A7C0C4AC168103020017011D /* JSScriptRefPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = A7C0C4AB167C08CD0017011D /* JSScriptRefPrivate.h */; settings = {ATTRIBUTES = (Private, ); }; };
                A7C0C4AD1681067E0017011D /* JSScriptRef.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A7C0C4AA167C08CD0017011D /* JSScriptRef.cpp */; };
                A7B4ACAE1484C9CE00B38A36 /* JSExportMacros.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSExportMacros.h; sourceTree = "<group>"; };
                A7BDAEC217F4EA1400F6140C /* ArrayIteratorPrototype.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; lineEnding = 0; path = ArrayIteratorPrototype.cpp; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.cpp; };
                A7BDAEC317F4EA1400F6140C /* ArrayIteratorPrototype.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ArrayIteratorPrototype.h; sourceTree = "<group>"; };
+               A7BDAEC417F4EA1400F6140C /* JSArrayIterator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; lineEnding = 0; path = JSArrayIterator.cpp; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.cpp; };
+               A7BDAEC517F4EA1400F6140C /* JSArrayIterator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSArrayIterator.h; sourceTree = "<group>"; };
                A7BFF3BF179868940002F462 /* DFGFiltrationResult.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DFGFiltrationResult.h; path = dfg/DFGFiltrationResult.h; sourceTree = "<group>"; };
                A7C0C4AA167C08CD0017011D /* JSScriptRef.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSScriptRef.cpp; sourceTree = "<group>"; };
                A7C0C4AB167C08CD0017011D /* JSScriptRefPrivate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSScriptRefPrivate.h; sourceTree = "<group>"; };
                                0F2B66BA17B6B5AB00A7AE3F /* JSArrayBufferView.cpp */,
                                0F2B66BB17B6B5AB00A7AE3F /* JSArrayBufferView.h */,
                                0F2B66BC17B6B5AB00A7AE3F /* JSArrayBufferViewInlines.h */,
+                               A7BDAEC417F4EA1400F6140C /* JSArrayIterator.cpp */,
+                               A7BDAEC517F4EA1400F6140C /* JSArrayIterator.h */,
                                86FA9E8F142BBB2D001773B7 /* JSBoundFunction.cpp */,
                                86FA9E90142BBB2E001773B7 /* JSBoundFunction.h */,
                                657CF45619BF6662004ACBF2 /* JSCallee.cpp */,
                                0F2B66E717B6B5AB00A7AE3F /* JSArrayBufferPrototype.h in Headers */,
                                0F2B66E917B6B5AB00A7AE3F /* JSArrayBufferView.h in Headers */,
                                0F2B66EA17B6B5AB00A7AE3F /* JSArrayBufferViewInlines.h in Headers */,
+                               A7BDAECB17F4EA1400F6140C /* JSArrayIterator.h in Headers */,
                                BC18C4180E16F5CD00B34460 /* JSBase.h in Headers */,
                                140D17D70E8AD4A9000CD17D /* JSBasePrivate.h in Headers */,
                                86FA9E92142BBB2E001773B7 /* JSBoundFunction.h in Headers */,
                                0F2B66E617B6B5AB00A7AE3F /* JSArrayBufferPrototype.cpp in Sources */,
                                0F2B66E817B6B5AB00A7AE3F /* JSArrayBufferView.cpp in Sources */,
                                A5311C371C77CECA00E6B1B6 /* HeapSnapshotBuilder.cpp in Sources */,
+                               A7BDAECA17F4EA1400F6140C /* JSArrayIterator.cpp in Sources */,
                                1421359B0A677F4F00A8195E /* JSBase.cpp in Sources */,
                                86FA9E91142BBB2E001773B7 /* JSBoundFunction.cpp in Sources */,
                                1440F8AF0A508D200005F061 /* JSCallbackConstructor.cpp in Sources */,
index 60eebc77226355a0c149d2fa5022471c029b4599..891bd3cb4260a891ace52337ca607ec757b1d0e4 100644 (file)
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
 #
-# Copyright (c) 2014-2016 Apple Inc. All rights reserved.
+# Copyright (c) 2014, 2015 Apple Inc. All rights reserved.
 # Copyright (c) 2014 University of Washington. All rights reserved.
 #
 # Redistribution and use in source and binary forms, with or without
@@ -60,7 +60,6 @@ class BuiltinsCombinedHeaderGenerator(BuiltinsGenerator):
             sections.append(self.generate_section_for_object(object))
         sections.append(self.generate_section_for_code_table_macro())
         sections.append(self.generate_section_for_code_name_macro())
-        sections.append(self.generate_section_for_global_private_code_name_macro())
         sections.append(Template(Templates.CombinedHeaderStaticMacros).substitute(args))
         sections.append(Template(Templates.NamespaceBottom).substitute(args))
         sections.append(Template(Templates.HeaderIncludeGuardBottom).substitute(args))
@@ -151,22 +150,3 @@ extern const JSC::ConstructAbility s_%(codeName)sConstructAbility;""" % function
 
             lines.append("    macro(%(funcName)s) \\" % function_args)
         return '\n'.join(lines)
-
-    def generate_section_for_global_private_code_name_macro(self):
-        args = {
-            'macroPrefix': self.model().framework.setting('macro_prefix'),
-        }
-
-        lines = []
-        lines.append("#define %(macroPrefix)s_FOREACH_BUILTIN_FUNCTION_PRIVATE_GLOBAL_NAME(macro) \\" % args)
-        functions = filter(lambda function: function.is_global_private, self.model().all_functions())
-        functions.sort(key=lambda x: x.function_name)
-        for function in functions:
-            function_args = {
-                'funcName': function.function_name,
-                'codeName': BuiltinsGenerator.mangledNameForFunction(function),
-            }
-
-            lines.append("    macro(%(funcName)s, %(codeName)s) \\" % function_args)
-
-        return '\n'.join(lines)
index 77b2b885cdca21a9dfd372b335f1c93d0f49f568..022a98b2b21614d841ae5ca6dbd501395baf72c0 100755 (executable)
@@ -41,9 +41,8 @@ _FRAMEWORK_CONFIG_MAP = {
 }
 
 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)
+functionIntrinsicRegExp = re.compile(r"^@intrinsic=(\w+)\s*\n", re.MULTILINE | re.DOTALL)
+functionIsConstructorRegExp = re.compile(r"^@constructor", re.MULTILINE | re.DOTALL)
 functionNameRegExp = re.compile(r"function\s+(\w+)\s*\(", re.MULTILINE | re.DOTALL)
 functionParameterFinder = re.compile(r"^function\s+(?:\w+)\s*\(((?:\s*\w+)?\s*(?:\s*,\s*\w+)*)?\s*\)", re.MULTILINE | re.DOTALL)
 
@@ -95,12 +94,11 @@ class BuiltinObject:
 
 
 class BuiltinFunction:
-    def __init__(self, function_name, function_source, parameters, is_constructor, is_global_private, intrinsic):
+    def __init__(self, function_name, function_source, is_constructor, parameters, 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.parameters = parameters
         self.intrinsic = intrinsic
         self.object = None  # Set by the owning BuiltinObject
 
@@ -121,12 +119,11 @@ class BuiltinFunction:
 
         function_name = functionNameRegExp.findall(function_source)[0]
         is_constructor = functionIsConstructorRegExp.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 = []
 
-        return BuiltinFunction(function_name, function_source, parameters, is_constructor, is_global_private, intrinsic)
+        return BuiltinFunction(function_name, function_source, is_constructor, parameters, intrinsic)
 
     def __str__(self):
         interface = "%s(%s)" % (self.function_name, ', '.join(self.parameters))
index af3989336f65640cf6925612295a23981e8b0bbb..dbd3e12ca4a19c9dfd83bb8936f5b02b14a874e9 100644 (file)
@@ -60,8 +60,6 @@ extern const JSC::ConstructAbility s_builtinPromiseFulfillPromiseCodeConstructAb
     macro(fulfillPromise) \
     macro(rejectPromise) \
 
-#define JSC_FOREACH_BUILTIN_FUNCTION_PRIVATE_GLOBAL_NAME(macro) \
-
 #define DECLARE_BUILTIN_GENERATOR(codeName, functionName, argumentCount) \
     JSC::FunctionExecutable* codeName##Generator(JSC::VM&);
 
@@ -109,42 +107,45 @@ JSC_FOREACH_BUILTIN_CODE(DECLARE_BUILTIN_GENERATOR)
 
 #include "BuiltinExecutables.h"
 #include "Executable.h"
-#include "Intrinsic.h"
 #include "JSCellInlines.h"
 #include "VM.h"
 
 namespace JSC {
 
 const JSC::ConstructAbility s_builtinPromiseRejectPromiseCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const int s_builtinPromiseRejectPromiseCodeLength = 410;
-static const JSC::Intrinsic s_builtinPromiseRejectPromiseCodeIntrinsic = JSC::NoIntrinsic;
+const int s_builtinPromiseRejectPromiseCodeLength = 413;
 const char* s_builtinPromiseRejectPromiseCode =
     "(function (promise, reason)\n" \
     "{\n" \
     "    \"use strict\";\n" \
+    "\n" \
     "    var reactions = promise.@promiseRejectReactions;\n" \
     "    promise.@promiseResult = reason;\n" \
     "    promise.@promiseFulfillReactions = undefined;\n" \
     "    promise.@promiseRejectReactions = undefined;\n" \
     "    promise.@promiseState = @promiseRejected;\n" \
+    "\n" \
     "    @InspectorInstrumentation.promiseRejected(promise, reason, reactions);\n" \
+    "\n" \
     "    @triggerPromiseReactions(reactions, reason);\n" \
     "})\n" \
 ;
 
 const JSC::ConstructAbility s_builtinPromiseFulfillPromiseCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const int s_builtinPromiseFulfillPromiseCodeLength = 409;
-static const JSC::Intrinsic s_builtinPromiseFulfillPromiseCodeIntrinsic = JSC::NoIntrinsic;
+const int s_builtinPromiseFulfillPromiseCodeLength = 412;
 const char* s_builtinPromiseFulfillPromiseCode =
     "(function (promise, value)\n" \
     "{\n" \
     "    \"use strict\";\n" \
+    "\n" \
     "    var reactions = promise.@promiseFulfillReactions;\n" \
     "    promise.@promiseResult = value;\n" \
     "    promise.@promiseFulfillReactions = undefined;\n" \
     "    promise.@promiseRejectReactions = undefined;\n" \
     "    promise.@promiseState = @promiseFulfilled;\n" \
+    "\n" \
     "    @InspectorInstrumentation.promiseFulfilled(promise, value, reactions);\n" \
+    "\n" \
     "    @triggerPromiseReactions(reactions, value);\n" \
     "})\n" \
 ;
@@ -153,7 +154,7 @@ const char* s_builtinPromiseFulfillPromiseCode =
 #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(), Nullopt, s_##codeName##Intrinsic); }
+    return vm.builtinExecutables()->codeName##Executable()->link(vm, vm.builtinExecutables()->codeName##Source()); }
 JSC_FOREACH_BUILTIN_CODE(DEFINE_BUILTIN_GENERATOR)
 #undef DEFINE_BUILTIN_GENERATOR
 
index 0dfe4a362979fb7294225fa8823c5b02b67a3c27..1b1d5e1fbb43a3aae301d033933e16fc5fa03c8d 100644 (file)
@@ -109,42 +109,45 @@ JSC_FOREACH_BUILTIN.PROMISE_BUILTIN_CODE(DECLARE_BUILTIN_GENERATOR)
 
 #include "BuiltinExecutables.h"
 #include "Executable.h"
-#include "Intrinsic.h"
 #include "JSCellInlines.h"
 #include "VM.h"
 
 namespace JSC {
 
 const JSC::ConstructAbility s_builtinPromiseRejectPromiseCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const int s_builtinPromiseRejectPromiseCodeLength = 410;
-static const JSC::Intrinsic s_builtinPromiseRejectPromiseCodeIntrinsic = JSC::NoIntrinsic;
+const int s_builtinPromiseRejectPromiseCodeLength = 413;
 const char* s_builtinPromiseRejectPromiseCode =
     "(function (promise, reason)\n" \
     "{\n" \
     "    \"use strict\";\n" \
+    "\n" \
     "    var reactions = promise.@promiseRejectReactions;\n" \
     "    promise.@promiseResult = reason;\n" \
     "    promise.@promiseFulfillReactions = undefined;\n" \
     "    promise.@promiseRejectReactions = undefined;\n" \
     "    promise.@promiseState = @promiseRejected;\n" \
+    "\n" \
     "    @InspectorInstrumentation.promiseRejected(promise, reason, reactions);\n" \
+    "\n" \
     "    @triggerPromiseReactions(reactions, reason);\n" \
     "})\n" \
 ;
 
 const JSC::ConstructAbility s_builtinPromiseFulfillPromiseCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const int s_builtinPromiseFulfillPromiseCodeLength = 409;
-static const JSC::Intrinsic s_builtinPromiseFulfillPromiseCodeIntrinsic = JSC::NoIntrinsic;
+const int s_builtinPromiseFulfillPromiseCodeLength = 412;
 const char* s_builtinPromiseFulfillPromiseCode =
     "(function (promise, value)\n" \
     "{\n" \
     "    \"use strict\";\n" \
+    "\n" \
     "    var reactions = promise.@promiseFulfillReactions;\n" \
     "    promise.@promiseResult = value;\n" \
     "    promise.@promiseFulfillReactions = undefined;\n" \
     "    promise.@promiseRejectReactions = undefined;\n" \
     "    promise.@promiseState = @promiseFulfilled;\n" \
+    "\n" \
     "    @InspectorInstrumentation.promiseFulfilled(promise, value, reactions);\n" \
+    "\n" \
     "    @triggerPromiseReactions(reactions, value);\n" \
     "})\n" \
 ;
@@ -153,7 +156,7 @@ const char* s_builtinPromiseFulfillPromiseCode =
 #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(), Nullopt, s_##codeName##Intrinsic); }
+    return vm.builtinExecutables()->codeName##Executable()->link(vm, vm.builtinExecutables()->codeName##Source()); }
 JSC_FOREACH_BUILTIN.PROMISE_BUILTIN_CODE(DEFINE_BUILTIN_GENERATOR)
 #undef DEFINE_BUILTIN_GENERATOR
 
index 0ba1d0a535211a625b9f884f5da8673cf8136006..2bb4cbce7a87f8fd00c92f41c4248ffb9d0f369a 100644 (file)
@@ -61,8 +61,6 @@ extern const JSC::ConstructAbility s_builtinPrototypeForEachCodeConstructAbility
     macro(every) \
     macro(forEach) \
 
-#define JSC_FOREACH_BUILTIN_FUNCTION_PRIVATE_GLOBAL_NAME(macro) \
-
 #define DECLARE_BUILTIN_GENERATOR(codeName, functionName, argumentCount) \
     JSC::FunctionExecutable* codeName##Generator(JSC::VM&);
 
@@ -111,19 +109,18 @@ JSC_FOREACH_BUILTIN_CODE(DECLARE_BUILTIN_GENERATOR)
 
 #include "BuiltinExecutables.h"
 #include "Executable.h"
-#include "Intrinsic.h"
 #include "JSCellInlines.h"
 #include "VM.h"
 
 namespace JSC {
 
 const JSC::ConstructAbility s_builtinPrototypeEveryCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const int s_builtinPrototypeEveryCodeLength = 760;
-static const JSC::Intrinsic s_builtinPrototypeEveryCodeIntrinsic = JSC::NoIntrinsic;
+const int s_builtinPrototypeEveryCodeLength = 762;
 const char* s_builtinPrototypeEveryCode =
     "(function (callback )\n" \
     "{\n" \
     "    \"use strict\";\n" \
+    "\n" \
     "    if (this === null)\n" \
     "        throw new @TypeError(\"Array.prototype.every requires that |this| not be null\");\n" \
     "    \n" \
@@ -132,6 +129,7 @@ const char* s_builtinPrototypeEveryCode =
     "    \n" \
     "    var array = @Object(this);\n" \
     "    var length = @toLength(array.length);\n" \
+    "\n" \
     "    if (typeof callback !== \"function\")\n" \
     "        throw new @TypeError(\"Array.prototype.every callback must be a function\");\n" \
     "    \n" \
@@ -149,12 +147,12 @@ const char* s_builtinPrototypeEveryCode =
 ;
 
 const JSC::ConstructAbility s_builtinPrototypeForEachCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const int s_builtinPrototypeForEachCodeLength = 692;
-static const JSC::Intrinsic s_builtinPrototypeForEachCodeIntrinsic = JSC::NoIntrinsic;
+const int s_builtinPrototypeForEachCodeLength = 694;
 const char* s_builtinPrototypeForEachCode =
     "(function (callback )\n" \
     "{\n" \
     "    \"use strict\";\n" \
+    "\n" \
     "    if (this === null)\n" \
     "        throw new @TypeError(\"Array.prototype.forEach requires that |this| not be null\");\n" \
     "    \n" \
@@ -163,6 +161,7 @@ const char* s_builtinPrototypeForEachCode =
     "    \n" \
     "    var array = @Object(this);\n" \
     "    var length = @toLength(array.length);\n" \
+    "\n" \
     "    if (typeof callback !== \"function\")\n" \
     "        throw new @TypeError(\"Array.prototype.forEach callback must be a function\");\n" \
     "    \n" \
@@ -179,7 +178,7 @@ const char* s_builtinPrototypeForEachCode =
 #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(), Nullopt, s_##codeName##Intrinsic); }
+    return vm.builtinExecutables()->codeName##Executable()->link(vm, vm.builtinExecutables()->codeName##Source()); }
 JSC_FOREACH_BUILTIN_CODE(DEFINE_BUILTIN_GENERATOR)
 #undef DEFINE_BUILTIN_GENERATOR
 
index 3cce93ab8ea8725dd76438cfdbcb4a5e9dfe8609..315e00e8b998acd793b520a54ec6f9895447db2b 100644 (file)
@@ -111,19 +111,18 @@ JSC_FOREACH_BUILTIN.PROTOTYPE_BUILTIN_CODE(DECLARE_BUILTIN_GENERATOR)
 
 #include "BuiltinExecutables.h"
 #include "Executable.h"
-#include "Intrinsic.h"
 #include "JSCellInlines.h"
 #include "VM.h"
 
 namespace JSC {
 
 const JSC::ConstructAbility s_builtinPrototypeEveryCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const int s_builtinPrototypeEveryCodeLength = 760;
-static const JSC::Intrinsic s_builtinPrototypeEveryCodeIntrinsic = JSC::NoIntrinsic;
+const int s_builtinPrototypeEveryCodeLength = 762;
 const char* s_builtinPrototypeEveryCode =
     "(function (callback )\n" \
     "{\n" \
     "    \"use strict\";\n" \
+    "\n" \
     "    if (this === null)\n" \
     "        throw new @TypeError(\"Array.prototype.every requires that |this| not be null\");\n" \
     "    \n" \
@@ -132,6 +131,7 @@ const char* s_builtinPrototypeEveryCode =
     "    \n" \
     "    var array = @Object(this);\n" \
     "    var length = @toLength(array.length);\n" \
+    "\n" \
     "    if (typeof callback !== \"function\")\n" \
     "        throw new @TypeError(\"Array.prototype.every callback must be a function\");\n" \
     "    \n" \
@@ -149,12 +149,12 @@ const char* s_builtinPrototypeEveryCode =
 ;
 
 const JSC::ConstructAbility s_builtinPrototypeForEachCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const int s_builtinPrototypeForEachCodeLength = 692;
-static const JSC::Intrinsic s_builtinPrototypeForEachCodeIntrinsic = JSC::NoIntrinsic;
+const int s_builtinPrototypeForEachCodeLength = 694;
 const char* s_builtinPrototypeForEachCode =
     "(function (callback )\n" \
     "{\n" \
     "    \"use strict\";\n" \
+    "\n" \
     "    if (this === null)\n" \
     "        throw new @TypeError(\"Array.prototype.forEach requires that |this| not be null\");\n" \
     "    \n" \
@@ -163,6 +163,7 @@ const char* s_builtinPrototypeForEachCode =
     "    \n" \
     "    var array = @Object(this);\n" \
     "    var length = @toLength(array.length);\n" \
+    "\n" \
     "    if (typeof callback !== \"function\")\n" \
     "        throw new @TypeError(\"Array.prototype.forEach callback must be a function\");\n" \
     "    \n" \
@@ -179,7 +180,7 @@ const char* s_builtinPrototypeForEachCode =
 #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(), Nullopt, s_##codeName##Intrinsic); }
+    return vm.builtinExecutables()->codeName##Executable()->link(vm, vm.builtinExecutables()->codeName##Source()); }
 JSC_FOREACH_BUILTIN.PROTOTYPE_BUILTIN_CODE(DEFINE_BUILTIN_GENERATOR)
 #undef DEFINE_BUILTIN_GENERATOR
 
index dfe6a3dc2600b1b448af424636a902a4ddc6b387..0391de28d457686156c6d3518939feeec5dcea86 100644 (file)
@@ -60,8 +60,6 @@ extern const JSC::ConstructAbility s_builtinConstructorFromCodeConstructAbility;
     macro(from) \
     macro(of) \
 
-#define JSC_FOREACH_BUILTIN_FUNCTION_PRIVATE_GLOBAL_NAME(macro) \
-
 #define DECLARE_BUILTIN_GENERATOR(codeName, functionName, argumentCount) \
     JSC::FunctionExecutable* codeName##Generator(JSC::VM&);
 
@@ -109,20 +107,20 @@ JSC_FOREACH_BUILTIN_CODE(DECLARE_BUILTIN_GENERATOR)
 
 #include "BuiltinExecutables.h"
 #include "Executable.h"
-#include "Intrinsic.h"
 #include "JSCellInlines.h"
 #include "VM.h"
 
 namespace JSC {
 
 const JSC::ConstructAbility s_builtinConstructorOfCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const int s_builtinConstructorOfCodeLength = 286;
-static const JSC::Intrinsic s_builtinConstructorOfCodeIntrinsic = JSC::NoIntrinsic;
+const int s_builtinConstructorOfCodeLength = 294;
 const char* s_builtinConstructorOfCode =
     "(function ()\n" \
     "{\n" \
     "    \"use strict\";\n" \
+    "\n" \
     "    var length = arguments.length;\n" \
+    "    //\n" \
     "    var array = typeof this === 'function' ? new this(length) : new @Array(length);\n" \
     "    for (var k = 0; k < length; ++k)\n" \
     "        @putByValDirect(array, k, arguments[k]);\n" \
@@ -132,35 +130,49 @@ const char* s_builtinConstructorOfCode =
 ;
 
 const JSC::ConstructAbility s_builtinConstructorFromCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const int s_builtinConstructorFromCodeLength = 1979;
-static const JSC::Intrinsic s_builtinConstructorFromCodeIntrinsic = JSC::NoIntrinsic;
+const int s_builtinConstructorFromCodeLength = 2046;
 const char* s_builtinConstructorFromCode =
     "(function (items )\n" \
     "{\n" \
     "    \"use strict\";\n" \
+    "\n" \
     "    var thisObj = this;\n" \
+    "\n" \
     "    var mapFn = arguments.length > 1 ? arguments[1] : undefined;\n" \
+    "\n" \
     "    var thisArg;\n" \
+    "\n" \
     "    if (mapFn !== undefined) {\n" \
     "        if (typeof mapFn !== \"function\")\n" \
     "            throw new @TypeError(\"Array.from requires that the second argument, when provided, be a function\");\n" \
+    "\n" \
     "        if (arguments.length > 2)\n" \
     "            thisArg = arguments[2];\n" \
     "    }\n" \
+    "\n" \
     "    if (items == null)\n" \
     "        throw new @TypeError(\"Array.from requires an array-like object - not null or undefined\");\n" \
+    "\n" \
     "    var iteratorMethod = items[@symbolIterator];\n" \
     "    if (iteratorMethod != null) {\n" \
     "        if (typeof iteratorMethod !== \"function\")\n" \
     "            throw new @TypeError(\"Array.from requires that the property of the first argument, items[Symbol.iterator], when exists, be a function\");\n" \
+    "\n" \
+    "        //\n" \
     "        var result = (typeof thisObj === \"function\") ? @Object(new thisObj()) : [];\n" \
+    "\n" \
     "        var k = 0;\n" \
     "        var iterator = iteratorMethod.@call(items);\n" \
+    "\n" \
+    "        //\n" \
+    "        //\n" \
+    "        //\n" \
     "        var wrapper = {\n" \
     "            [@symbolIterator]() {\n" \
     "                return iterator;\n" \
     "            }\n" \
     "        };\n" \
+    "\n" \
     "        for (var value of wrapper) {\n" \
     "            if (mapFn)\n" \
     "                @putByValDirect(result, k, thisArg === undefined ? mapFn(value, k) : mapFn.@call(thisArg, value, k));\n" \
@@ -168,12 +180,17 @@ const char* s_builtinConstructorFromCode =
     "                @putByValDirect(result, k, value);\n" \
     "            k += 1;\n" \
     "        }\n" \
+    "\n" \
     "        result.length = k;\n" \
     "        return result;\n" \
     "    }\n" \
+    "\n" \
     "    var arrayLike = @Object(items);\n" \
     "    var arrayLikeLength = @toLength(arrayLike.length);\n" \
+    "\n" \
+    "    //\n" \
     "    var result = (typeof thisObj === \"function\") ? @Object(new thisObj(arrayLikeLength)) : new @Array(arrayLikeLength);\n" \
+    "\n" \
     "    var k = 0;\n" \
     "    while (k < arrayLikeLength) {\n" \
     "        var value = arrayLike[k];\n" \
@@ -183,6 +200,7 @@ const char* s_builtinConstructorFromCode =
     "            @putByValDirect(result, k, value);\n" \
     "        k += 1;\n" \
     "    }\n" \
+    "\n" \
     "    result.length = arrayLikeLength;\n" \
     "    return result;\n" \
     "})\n" \
@@ -192,7 +210,7 @@ const char* s_builtinConstructorFromCode =
 #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(), Nullopt, s_##codeName##Intrinsic); }
+    return vm.builtinExecutables()->codeName##Executable()->link(vm, vm.builtinExecutables()->codeName##Source()); }
 JSC_FOREACH_BUILTIN_CODE(DEFINE_BUILTIN_GENERATOR)
 #undef DEFINE_BUILTIN_GENERATOR
 
index ed1845eb8bc28193af5ec2fd3f9a4c85fb8860a6..2d26e4934082aed612267533a01b472f3e955e53 100644 (file)
@@ -109,20 +109,20 @@ JSC_FOREACH_BUILTINCONSTRUCTOR_BUILTIN_CODE(DECLARE_BUILTIN_GENERATOR)
 
 #include "BuiltinExecutables.h"
 #include "Executable.h"
-#include "Intrinsic.h"
 #include "JSCellInlines.h"
 #include "VM.h"
 
 namespace JSC {
 
 const JSC::ConstructAbility s_builtinConstructorOfCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const int s_builtinConstructorOfCodeLength = 286;
-static const JSC::Intrinsic s_builtinConstructorOfCodeIntrinsic = JSC::NoIntrinsic;
+const int s_builtinConstructorOfCodeLength = 294;
 const char* s_builtinConstructorOfCode =
     "(function ()\n" \
     "{\n" \
     "    \"use strict\";\n" \
+    "\n" \
     "    var length = arguments.length;\n" \
+    "    //\n" \
     "    var array = typeof this === 'function' ? new this(length) : new @Array(length);\n" \
     "    for (var k = 0; k < length; ++k)\n" \
     "        @putByValDirect(array, k, arguments[k]);\n" \
@@ -132,35 +132,49 @@ const char* s_builtinConstructorOfCode =
 ;
 
 const JSC::ConstructAbility s_builtinConstructorFromCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const int s_builtinConstructorFromCodeLength = 1979;
-static const JSC::Intrinsic s_builtinConstructorFromCodeIntrinsic = JSC::NoIntrinsic;
+const int s_builtinConstructorFromCodeLength = 2046;
 const char* s_builtinConstructorFromCode =
     "(function (items )\n" \
     "{\n" \
     "    \"use strict\";\n" \
+    "\n" \
     "    var thisObj = this;\n" \
+    "\n" \
     "    var mapFn = arguments.length > 1 ? arguments[1] : undefined;\n" \
+    "\n" \
     "    var thisArg;\n" \
+    "\n" \
     "    if (mapFn !== undefined) {\n" \
     "        if (typeof mapFn !== \"function\")\n" \
     "            throw new @TypeError(\"Array.from requires that the second argument, when provided, be a function\");\n" \
+    "\n" \
     "        if (arguments.length > 2)\n" \
     "            thisArg = arguments[2];\n" \
     "    }\n" \
+    "\n" \
     "    if (items == null)\n" \
     "        throw new @TypeError(\"Array.from requires an array-like object - not null or undefined\");\n" \
+    "\n" \
     "    var iteratorMethod = items[@symbolIterator];\n" \
     "    if (iteratorMethod != null) {\n" \
     "        if (typeof iteratorMethod !== \"function\")\n" \
     "            throw new @TypeError(\"Array.from requires that the property of the first argument, items[Symbol.iterator], when exists, be a function\");\n" \
+    "\n" \
+    "        //\n" \
     "        var result = (typeof thisObj === \"function\") ? @Object(new thisObj()) : [];\n" \
+    "\n" \
     "        var k = 0;\n" \
     "        var iterator = iteratorMethod.@call(items);\n" \
+    "\n" \
+    "        //\n" \
+    "        //\n" \
+    "        //\n" \
     "        var wrapper = {\n" \
     "            [@symbolIterator]() {\n" \
     "                return iterator;\n" \
     "            }\n" \
     "        };\n" \
+    "\n" \
     "        for (var value of wrapper) {\n" \
     "            if (mapFn)\n" \
     "                @putByValDirect(result, k, thisArg === undefined ? mapFn(value, k) : mapFn.@call(thisArg, value, k));\n" \
@@ -168,12 +182,17 @@ const char* s_builtinConstructorFromCode =
     "                @putByValDirect(result, k, value);\n" \
     "            k += 1;\n" \
     "        }\n" \
+    "\n" \
     "        result.length = k;\n" \
     "        return result;\n" \
     "    }\n" \
+    "\n" \
     "    var arrayLike = @Object(items);\n" \
     "    var arrayLikeLength = @toLength(arrayLike.length);\n" \
+    "\n" \
+    "    //\n" \
     "    var result = (typeof thisObj === \"function\") ? @Object(new thisObj(arrayLikeLength)) : new @Array(arrayLikeLength);\n" \
+    "\n" \
     "    var k = 0;\n" \
     "    while (k < arrayLikeLength) {\n" \
     "        var value = arrayLike[k];\n" \
@@ -183,6 +202,7 @@ const char* s_builtinConstructorFromCode =
     "            @putByValDirect(result, k, value);\n" \
     "        k += 1;\n" \
     "    }\n" \
+    "\n" \
     "    result.length = arrayLikeLength;\n" \
     "    return result;\n" \
     "})\n" \
@@ -192,7 +212,7 @@ const char* s_builtinConstructorFromCode =
 #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(), Nullopt, s_##codeName##Intrinsic); }
+    return vm.builtinExecutables()->codeName##Executable()->link(vm, vm.builtinExecutables()->codeName##Source()); }
 JSC_FOREACH_BUILTINCONSTRUCTOR_BUILTIN_CODE(DEFINE_BUILTIN_GENERATOR)
 #undef DEFINE_BUILTIN_GENERATOR
 
index 27072d3203898720dbaf62296c27ca47cb886063..d569ac528fed4c74ac5bba789739d3ce9eca2888 100644 (file)
@@ -59,8 +59,6 @@ extern const JSC::ConstructAbility s_internalClashingNamesIsReadableStreamLocked
 #define JSC_FOREACH_BUILTIN_FUNCTION_NAME(macro) \
     macro(isReadableStreamLocked) \
 
-#define JSC_FOREACH_BUILTIN_FUNCTION_PRIVATE_GLOBAL_NAME(macro) \
-
 #define DECLARE_BUILTIN_GENERATOR(codeName, functionName, argumentCount) \
     JSC::FunctionExecutable* codeName##Generator(JSC::VM&);
 
@@ -108,30 +106,29 @@ JSC_FOREACH_BUILTIN_CODE(DECLARE_BUILTIN_GENERATOR)
 
 #include "BuiltinExecutables.h"
 #include "Executable.h"
-#include "Intrinsic.h"
 #include "JSCellInlines.h"
 #include "VM.h"
 
 namespace JSC {
 
 const JSC::ConstructAbility s_internalClashingNamesIsReadableStreamLockedCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const int s_internalClashingNamesIsReadableStreamLockedCodeLength = 70;
-static const JSC::Intrinsic s_internalClashingNamesIsReadableStreamLockedCodeIntrinsic = JSC::NoIntrinsic;
+const int s_internalClashingNamesIsReadableStreamLockedCodeLength = 71;
 const char* s_internalClashingNamesIsReadableStreamLockedCode =
     "(function (stream)\n" \
     "{\n" \
     "   \"use strict\";\n" \
+    "\n" \
     "    return !!stream.@reader;\n" \
     "})\n" \
 ;
 
 const JSC::ConstructAbility s_internalClashingNamesIsReadableStreamLockedCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const int s_internalClashingNamesIsReadableStreamLockedCodeLength = 70;
-static const JSC::Intrinsic s_internalClashingNamesIsReadableStreamLockedCodeIntrinsic = JSC::NoIntrinsic;
+const int s_internalClashingNamesIsReadableStreamLockedCodeLength = 71;
 const char* s_internalClashingNamesIsReadableStreamLockedCode =
     "(function (stream)\n" \
     "{\n" \
     "   \"use strict\";\n" \
+    "\n" \
     "    return !!stream.@reader;\n" \
     "})\n" \
 ;
@@ -140,7 +137,7 @@ const char* s_internalClashingNamesIsReadableStreamLockedCode =
 #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(), Nullopt, s_##codeName##Intrinsic); }
+    return vm.builtinExecutables()->codeName##Executable()->link(vm, vm.builtinExecutables()->codeName##Source()); }
 JSC_FOREACH_BUILTIN_CODE(DEFINE_BUILTIN_GENERATOR)
 #undef DEFINE_BUILTIN_GENERATOR
 
index 4e255150be36bd32c4e406cc5d5cedcccadfe349..5b61d2f820e90b11288b97f6c922704f814b05df 100644 (file)
@@ -162,7 +162,6 @@ inline void ArbitraryConditionalGuardBuiltinsWrapper::exportNames()
 
 #include "WebCoreJSClientData.h"
 #include <runtime/Executable.h>
-#include <runtime/Intrinsic.h>
 #include <runtime/JSCJSValueInlines.h>
 #include <runtime/JSCellInlines.h>
 #include <runtime/StructureInlines.h>
@@ -171,12 +170,12 @@ inline void ArbitraryConditionalGuardBuiltinsWrapper::exportNames()
 namespace WebCore {
 
 const JSC::ConstructAbility s_arbitraryConditionalGuardIsReadableStreamLockedCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const int s_arbitraryConditionalGuardIsReadableStreamLockedCodeLength = 70;
-static const JSC::Intrinsic s_arbitraryConditionalGuardIsReadableStreamLockedCodeIntrinsic = JSC::NoIntrinsic;
+const int s_arbitraryConditionalGuardIsReadableStreamLockedCodeLength = 71;
 const char* s_arbitraryConditionalGuardIsReadableStreamLockedCode =
     "(function (stream)\n" \
     "{\n" \
     "   \"use strict\";\n" \
+    "\n" \
     "    return !!stream.@reader;\n" \
     "})\n" \
 ;
@@ -186,7 +185,7 @@ const char* s_arbitraryConditionalGuardIsReadableStreamLockedCode =
 JSC::FunctionExecutable* codeName##Generator(JSC::VM& vm) \
 {\
     JSVMClientData* clientData = static_cast<JSVMClientData*>(vm.clientData); \
-    return clientData->builtinFunctions().arbitraryConditionalGuardBuiltins().codeName##Executable()->link(vm, clientData->builtinFunctions().arbitraryConditionalGuardBuiltins().codeName##Source(), Nullopt, s_##codeName##Intrinsic); \
+    return clientData->builtinFunctions().arbitraryConditionalGuardBuiltins().codeName##Executable()->link(vm, clientData->builtinFunctions().arbitraryConditionalGuardBuiltins().codeName##Source()); \
 }
 WEBCORE_FOREACH_ARBITRARYCONDITIONALGUARD_BUILTIN_CODE(DEFINE_BUILTIN_GENERATOR)
 #undef DEFINE_BUILTIN_GENERATOR
index 83dec5788795f30e79799ed29ad453a92eee4386..5b1544cb59aae1a79ee4ecb2decd7d463fea423b 100644 (file)
@@ -162,7 +162,6 @@ inline void GuardedBuiltinBuiltinsWrapper::exportNames()
 
 #include "WebCoreJSClientData.h"
 #include <runtime/Executable.h>
-#include <runtime/Intrinsic.h>
 #include <runtime/JSCJSValueInlines.h>
 #include <runtime/JSCellInlines.h>
 #include <runtime/StructureInlines.h>
@@ -171,12 +170,12 @@ inline void GuardedBuiltinBuiltinsWrapper::exportNames()
 namespace WebCore {
 
 const JSC::ConstructAbility s_guardedBuiltinIsReadableStreamLockedCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const int s_guardedBuiltinIsReadableStreamLockedCodeLength = 70;
-static const JSC::Intrinsic s_guardedBuiltinIsReadableStreamLockedCodeIntrinsic = JSC::NoIntrinsic;
+const int s_guardedBuiltinIsReadableStreamLockedCodeLength = 71;
 const char* s_guardedBuiltinIsReadableStreamLockedCode =
     "(function (stream)\n" \
     "{\n" \
     "   \"use strict\";\n" \
+    "\n" \
     "    return !!stream.@reader;\n" \
     "})\n" \
 ;
@@ -186,7 +185,7 @@ const char* s_guardedBuiltinIsReadableStreamLockedCode =
 JSC::FunctionExecutable* codeName##Generator(JSC::VM& vm) \
 {\
     JSVMClientData* clientData = static_cast<JSVMClientData*>(vm.clientData); \
-    return clientData->builtinFunctions().guardedBuiltinBuiltins().codeName##Executable()->link(vm, clientData->builtinFunctions().guardedBuiltinBuiltins().codeName##Source(), Nullopt, s_##codeName##Intrinsic); \
+    return clientData->builtinFunctions().guardedBuiltinBuiltins().codeName##Executable()->link(vm, clientData->builtinFunctions().guardedBuiltinBuiltins().codeName##Source()); \
 }
 WEBCORE_FOREACH_GUARDEDBUILTIN_BUILTIN_CODE(DEFINE_BUILTIN_GENERATOR)
 #undef DEFINE_BUILTIN_GENERATOR
index 1c61aab0f2adbbd5a61f164e35ff158faccc33ce..53b5552e2cce566ca85fb2875ed595ef5b5ca2db 100644 (file)
@@ -194,7 +194,6 @@ inline void GuardedInternalBuiltinBuiltinFunctions::visit(JSC::SlotVisitor& visi
 
 #include "WebCoreJSClientData.h"
 #include <runtime/Executable.h>
-#include <runtime/Intrinsic.h>
 #include <runtime/JSCJSValueInlines.h>
 #include <runtime/JSCellInlines.h>
 #include <runtime/StructureInlines.h>
@@ -203,12 +202,12 @@ inline void GuardedInternalBuiltinBuiltinFunctions::visit(JSC::SlotVisitor& visi
 namespace WebCore {
 
 const JSC::ConstructAbility s_guardedInternalBuiltinIsReadableStreamLockedCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const int s_guardedInternalBuiltinIsReadableStreamLockedCodeLength = 70;
-static const JSC::Intrinsic s_guardedInternalBuiltinIsReadableStreamLockedCodeIntrinsic = JSC::NoIntrinsic;
+const int s_guardedInternalBuiltinIsReadableStreamLockedCodeLength = 71;
 const char* s_guardedInternalBuiltinIsReadableStreamLockedCode =
     "(function (stream)\n" \
     "{\n" \
     "   \"use strict\";\n" \
+    "\n" \
     "    return !!stream.@reader;\n" \
     "})\n" \
 ;
@@ -218,7 +217,7 @@ const char* s_guardedInternalBuiltinIsReadableStreamLockedCode =
 JSC::FunctionExecutable* codeName##Generator(JSC::VM& vm) \
 {\
     JSVMClientData* clientData = static_cast<JSVMClientData*>(vm.clientData); \
-    return clientData->builtinFunctions().guardedInternalBuiltinBuiltins().codeName##Executable()->link(vm, clientData->builtinFunctions().guardedInternalBuiltinBuiltins().codeName##Source(), Nullopt, s_##codeName##Intrinsic); \
+    return clientData->builtinFunctions().guardedInternalBuiltinBuiltins().codeName##Executable()->link(vm, clientData->builtinFunctions().guardedInternalBuiltinBuiltins().codeName##Source()); \
 }
 WEBCORE_FOREACH_GUARDEDINTERNALBUILTIN_BUILTIN_CODE(DEFINE_BUILTIN_GENERATOR)
 #undef DEFINE_BUILTIN_GENERATOR
index cedf8fb4beaaa33cffc31a9ab537077725503b31..7c96b9f145f1abb3739e1e0aa9e1d3898489df49 100644 (file)
@@ -156,7 +156,6 @@ inline void UnguardedBuiltinBuiltinsWrapper::exportNames()
 
 #include "WebCoreJSClientData.h"
 #include <runtime/Executable.h>
-#include <runtime/Intrinsic.h>
 #include <runtime/JSCJSValueInlines.h>
 #include <runtime/JSCellInlines.h>
 #include <runtime/StructureInlines.h>
@@ -165,12 +164,12 @@ inline void UnguardedBuiltinBuiltinsWrapper::exportNames()
 namespace WebCore {
 
 const JSC::ConstructAbility s_unguardedBuiltinIsReadableStreamLockedCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const int s_unguardedBuiltinIsReadableStreamLockedCodeLength = 70;
-static const JSC::Intrinsic s_unguardedBuiltinIsReadableStreamLockedCodeIntrinsic = JSC::NoIntrinsic;
+const int s_unguardedBuiltinIsReadableStreamLockedCodeLength = 71;
 const char* s_unguardedBuiltinIsReadableStreamLockedCode =
     "(function (stream)\n" \
     "{\n" \
     "   \"use strict\";\n" \
+    "\n" \
     "    return !!stream.@reader;\n" \
     "})\n" \
 ;
@@ -180,7 +179,7 @@ const char* s_unguardedBuiltinIsReadableStreamLockedCode =
 JSC::FunctionExecutable* codeName##Generator(JSC::VM& vm) \
 {\
     JSVMClientData* clientData = static_cast<JSVMClientData*>(vm.clientData); \
-    return clientData->builtinFunctions().unguardedBuiltinBuiltins().codeName##Executable()->link(vm, clientData->builtinFunctions().unguardedBuiltinBuiltins().codeName##Source(), Nullopt, s_##codeName##Intrinsic); \
+    return clientData->builtinFunctions().unguardedBuiltinBuiltins().codeName##Executable()->link(vm, clientData->builtinFunctions().unguardedBuiltinBuiltins().codeName##Source()); \
 }
 WEBCORE_FOREACH_UNGUARDEDBUILTIN_BUILTIN_CODE(DEFINE_BUILTIN_GENERATOR)
 #undef DEFINE_BUILTIN_GENERATOR
index 1544dfb45024c8ba1fb330b1a57625faa3507dc3..726b281a90f7ab242e2d7339b2c3a49897259d7b 100644 (file)
@@ -208,7 +208,6 @@ inline void xmlCasingTestBuiltinFunctions::visit(JSC::SlotVisitor& visitor)
 
 #include "WebCoreJSClientData.h"
 #include <runtime/Executable.h>
-#include <runtime/Intrinsic.h>
 #include <runtime/JSCJSValueInlines.h>
 #include <runtime/JSCellInlines.h>
 #include <runtime/StructureInlines.h>
@@ -217,23 +216,23 @@ inline void xmlCasingTestBuiltinFunctions::visit(JSC::SlotVisitor& visitor)
 namespace WebCore {
 
 const JSC::ConstructAbility s_xmlCasingTestXMLCasingTestCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const int s_xmlCasingTestXMLCasingTestCodeLength = 70;
-static const JSC::Intrinsic s_xmlCasingTestXMLCasingTestCodeIntrinsic = JSC::NoIntrinsic;
+const int s_xmlCasingTestXMLCasingTestCodeLength = 71;
 const char* s_xmlCasingTestXMLCasingTestCode =
     "(function (stream)\n" \
     "{\n" \
     "   \"use strict\";\n" \
+    "\n" \
     "    return !!stream.@reader;\n" \
     "})\n" \
 ;
 
 const JSC::ConstructAbility s_xmlCasingTestCssCasingTestCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const int s_xmlCasingTestCssCasingTestCodeLength = 401;
-static const JSC::Intrinsic s_xmlCasingTestCssCasingTestCodeIntrinsic = JSC::NoIntrinsic;
+const int s_xmlCasingTestCssCasingTestCodeLength = 402;
 const char* s_xmlCasingTestCssCasingTestCode =
     "(function (stream, reason)\n" \
     "{\n" \
     "    \"use strict\";\n" \
+    "\n" \
     "    if (stream.@state === @readableStreamClosed)\n" \
     "        return Promise.resolve();\n" \
     "    if (stream.@state === @readableStreamErrored)\n" \
@@ -245,12 +244,12 @@ const char* s_xmlCasingTestCssCasingTestCode =
 ;
 
 const JSC::ConstructAbility s_xmlCasingTestUrlCasingTestCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
-const int s_xmlCasingTestUrlCasingTestCodeLength = 337;
-static const JSC::Intrinsic s_xmlCasingTestUrlCasingTestCodeIntrinsic = JSC::NoIntrinsic;
+const int s_xmlCasingTestUrlCasingTestCodeLength = 338;
 const char* s_xmlCasingTestUrlCasingTestCode =
     "(function (object, key, args)\n" \
     "{\n" \
     "    \"use strict\";\n" \
+    "\n" \
     "    try {\n" \
     "        var method = object[key];\n" \
     "        if (typeof method === \"undefined\")\n" \
@@ -269,7 +268,7 @@ const char* s_xmlCasingTestUrlCasingTestCode =
 JSC::FunctionExecutable* codeName##Generator(JSC::VM& vm) \
 {\
     JSVMClientData* clientData = static_cast<JSVMClientData*>(vm.clientData); \
-    return clientData->builtinFunctions().xmlCasingTestBuiltins().codeName##Executable()->link(vm, clientData->builtinFunctions().xmlCasingTestBuiltins().codeName##Source(), Nullopt, s_##codeName##Intrinsic); \
+    return clientData->builtinFunctions().xmlCasingTestBuiltins().codeName##Executable()->link(vm, clientData->builtinFunctions().xmlCasingTestBuiltins().codeName##Source()); \
 }
 WEBCORE_FOREACH_XMLCASINGTEST_BUILTIN_CODE(DEFINE_BUILTIN_GENERATOR)
 #undef DEFINE_BUILTIN_GENERATOR
index cbafcb8ac34ed602545e047e7dbf84f99f9b077a..56595f7141e55f51f2e20095d67e58d8ad99215b 100644 (file)
@@ -41,7 +41,6 @@ function next()
     return next.@call(this);
 }
 
-@globalPrivate
 function arrayIteratorValueNext()
 {
     "use strict";
@@ -64,7 +63,6 @@ function arrayIteratorValueNext()
     return { done, value };
 }
 
-@globalPrivate
 function arrayIteratorKeyNext()
 {
     "use strict";
@@ -87,7 +85,6 @@ function arrayIteratorKeyNext()
     return { done, value };
 }
 
-@globalPrivate
 function arrayIteratorKeyValueNext()
 {
     "use strict";
index b5d3222bc2fb9eccc0c2ac20bba9327afb064e91..0333c71b97e2b9c74f27cf6e9aee6838e2394f99 100644 (file)
@@ -25,7 +25,6 @@
  */
 
 @constructor
-@globalPrivate
 function createArrayIterator(iteratedObject, kind, iterationFunction)
 {
     this.@iteratedObject = iteratedObject;
index 0bba10615632ba0d7db1e97754dc37861af66a3e..b6f4e3867f2bceab96d693808cb4677862a1645e 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2014, 2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
 #define BuiltinNames_h
 
 #include "BuiltinUtils.h"
-#include "BytecodeIntrinsicRegistry.h"
 #include "CommonIdentifiers.h"
 #include "JSCBuiltins.h"
 
 namespace JSC {
 
-#define JSC_COMMON_PRIVATE_IDENTIFIERS_EACH_PROPERTY_NAME(macro) \
-    JSC_COMMON_BYTECODE_INTRINSIC_FUNCTIONS_EACH_NAME(macro) \
-    JSC_COMMON_BYTECODE_INTRINSIC_CONSTANTS_EACH_NAME(macro) \
-    macro(iteratedObject) \
-    macro(arrayIteratorNextIndex) \
-    macro(arrayIterationKind) \
-    macro(arrayIteratorNext) \
-    macro(arrayIteratorIsDone) \
-    macro(arrayIteratorKind) \
-    macro(charCodeAt) \
-    macro(iteratedString) \
-    macro(stringIteratorNextIndex) \
-    macro(promise) \
-    macro(fulfillmentHandler) \
-    macro(rejectionHandler) \
-    macro(index) \
-    macro(deferred) \
-    macro(countdownHolder) \
-    macro(Object) \
-    macro(ownEnumerablePropertyKeys) \
-    macro(Number) \
-    macro(Array) \
-    macro(String) \
-    macro(RegExp) \
-    macro(Map) \
-    macro(Promise) \
-    macro(Reflect) \
-    macro(InternalPromise) \
-    macro(abs) \
-    macro(floor) \
-    macro(trunc) \
-    macro(isFinite) \
-    macro(isNaN) \
-    macro(create) \
-    macro(defineProperty) \
-    macro(getPrototypeOf) \
-    macro(getOwnPropertyDescriptor) \
-    macro(getOwnPropertyNames) \
-    macro(ownKeys) \
-    macro(Error) \
-    macro(RangeError) \
-    macro(TypeError) \
-    macro(typedArrayLength) \
-    macro(typedArraySort) \
-    macro(typedArrayGetOriginalConstructor) \
-    macro(BuiltinLog) \
-    macro(homeObject) \
-    macro(getTemplateObject) \
-    macro(enqueueJob) \
-    macro(handler) \
-    macro(promiseState) \
-    macro(promiseFulfillReactions) \
-    macro(promiseRejectReactions) \
-    macro(promiseResult) \
-    macro(push) \
-    macro(repeatCharacter) \
-    macro(capabilities) \
-    macro(starDefault) \
-    macro(InspectorInstrumentation) \
-    macro(get) \
-    macro(set) \
-    macro(shift) \
-    macro(allocateTypedArray) \
-    macro(Int8Array) \
-    macro(Int16Array) \
-    macro(Int32Array) \
-    macro(Uint8Array) \
-    macro(Uint8ClampedArray) \
-    macro(Uint16Array) \
-    macro(Uint32Array) \
-    macro(Float32Array) \
-    macro(Float64Array) \
-    macro(exec) \
-    macro(generator) \
-    macro(generatorNext) \
-    macro(generatorState) \
-    macro(generatorFrame) \
-    macro(generatorValue) \
-    macro(generatorThis) \
-    macro(generatorResumeMode) \
-    macro(Collator) \
-    macro(DateTimeFormat) \
-    macro(NumberFormat) \
-    macro(intlSubstituteValue) \
-    macro(thisTimeValue) \
-    macro(thisNumberValue) \
-    macro(newTargetLocal) \
-    macro(derivedConstructor) \
-    macro(isBoundFunction) \
-    macro(hasInstanceBoundFunction) \
-    macro(instanceOf) \
-    macro(isArray) \
-    macro(isArrayConstructor) \
-    macro(isConstructor) \
-    macro(isRegExpObject) \
-    macro(concatMemcpy) \
-    macro(appendMemcpy) \
-    macro(predictFinalLengthFromArgumunts) \
-    macro(print) \
-    macro(isSet) \
-    macro(isMap) \
-    macro(regExpCreate) \
-    macro(SetIterator) \
-    macro(setIteratorNext) \
-    macro(replaceUsingRegExp) \
-    macro(replaceUsingStringSearch) \
-    macro(MapIterator) \
-    macro(mapIteratorNext) \
-    macro(regExpBuiltinExec) \
-    macro(regExpMatchFast) \
-    macro(regExpProtoFlagsGetter) \
-    macro(regExpProtoGlobalGetter) \
-    macro(regExpProtoIgnoreCaseGetter) \
-    macro(regExpProtoMultilineGetter) \
-    macro(regExpProtoSourceGetter) \
-    macro(regExpProtoStickyGetter) \
-    macro(regExpProtoUnicodeGetter) \
-    macro(regExpPrototypeSymbolReplace) \
-    macro(regExpReplaceFast) \
-    macro(regExpSearchFast) \
-    macro(regExpSplitFast) \
-    macro(regExpTestFast) \
-    macro(stringIncludesInternal) \
-    macro(stringSplitFast) \
-    macro(stringSubstrInternal)
-
-
 #define INITIALIZE_PRIVATE_TO_PUBLIC_ENTRY(name) m_privateToPublicMap.add(m_##name##PrivateName.impl(), &m_##name);
 #define INITIALIZE_PUBLIC_TO_PRIVATE_ENTRY(name) m_publicToPrivateMap.add(m_##name.impl(), &m_##name##PrivateName);
 
index 3c140687dfc7e00efe91ae80b2ac676fa9bf48f4..69463c33602e28f7dd429ad2346db1a7e5eeddee 100644 (file)
@@ -1,6 +1,5 @@
 /*
  * Copyright (C) 2015-2016 Yusuke Suzuki <utatane.tea@gmail.com>.
- * Copyright (C) 2016 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -26,7 +25,6 @@
 
 // 25.3.3.3 GeneratorResume ( generator, value )
 // 25.3.3.4 GeneratorResumeAbrupt(generator, abruptCompletion)
-@globalPrivate
 function generatorResume(generator, sentValue, resumeMode)
 {
     "use strict";
index 5776a2296baac8c5412b4ce35df708980390c691..8ba34908afa79bc36222dc9e153e28f292c20910 100644 (file)
@@ -26,7 +26,6 @@
 
 // @internal
 
-@globalPrivate
 function toInteger(target)
 {
     "use strict";
@@ -39,7 +38,6 @@ function toInteger(target)
     return @trunc(numberValue);
 }
 
-@globalPrivate
 function toLength(target)
 {
     "use strict";
@@ -50,7 +48,6 @@ function toLength(target)
     return length > 0 ? (length < maxSafeInteger ? length : maxSafeInteger) : 0;
 }
 
-@globalPrivate
 function isDictionary(object)
 {
     "use strict";
@@ -60,13 +57,11 @@ function isDictionary(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
 function speciesGetter()
 {
     return this;
 }
 
-@globalPrivate
 function speciesConstructor(obj, defaultConstructor)
 {
     var constructor = obj.constructor;
index 191db3f6acf59c684ac326e27c3e3e92d63b0798..c4e59bb0793b9e00ae7d9a2515a3dd2d2b4b128b 100644 (file)
@@ -1,6 +1,5 @@
 /*
  * Copyright (C) 2015 Yusuke Suzuki <utatane.tea@gmail.com>.
- * Copyright (C) 2016 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -26,7 +25,6 @@
 
 // @internal
 
-@globalPrivate
 function isPromise(promise)
 {
     "use strict";
@@ -34,7 +32,6 @@ function isPromise(promise)
     return @isObject(promise) && !!promise.@promiseState;
 }
 
-@globalPrivate
 function newPromiseReaction(capability, handler)
 {
     "use strict";
@@ -45,7 +42,6 @@ function newPromiseReaction(capability, handler)
     };
 }
 
-@globalPrivate
 function newPromiseCapability(constructor)
 {
     "use strict";
@@ -84,7 +80,6 @@ function newPromiseCapability(constructor)
     return promiseCapability;
 }
 
-@globalPrivate
 function triggerPromiseReactions(reactions, argument)
 {
     "use strict";
@@ -93,7 +88,6 @@ function triggerPromiseReactions(reactions, argument)
         @enqueueJob(@promiseReactionJob, [reactions[index], argument]);
 }
 
-@globalPrivate
 function rejectPromise(promise, reason)
 {
     "use strict";
@@ -109,7 +103,6 @@ function rejectPromise(promise, reason)
     @triggerPromiseReactions(reactions, reason);
 }
 
-@globalPrivate
 function fulfillPromise(promise, value)
 {
     "use strict";
@@ -125,7 +118,6 @@ function fulfillPromise(promise, value)
     @triggerPromiseReactions(reactions, value);
 }
 
-@globalPrivate
 function createResolvingFunctions(promise)
 {
     "use strict";
@@ -172,7 +164,6 @@ function createResolvingFunctions(promise)
     };
 }
 
-@globalPrivate
 function promiseReactionJob(reaction, argument)
 {
     "use strict";
@@ -189,7 +180,6 @@ function promiseReactionJob(reaction, argument)
     return promiseCapability.@resolve.@call(@undefined, result);
 }
 
-@globalPrivate
 function promiseResolveThenableJob(promiseToResolve, thenable, then)
 {
     "use strict";
@@ -203,7 +193,6 @@ function promiseResolveThenableJob(promiseToResolve, thenable, then)
     }
 }
 
-@globalPrivate
 function initializePromise(executor)
 {
     "use strict";
index 9d945a4ce372cbb3c9f503f12dbff14ec1c55661..2957f14cb73980f245f6d1c746daff8127e492dc 100644 (file)
@@ -23,7 +23,6 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
 
-@globalPrivate
 function advanceStringIndex(string, index, unicode)
 {
     // This function implements AdvanceStringIndex described in ES6 21.2.5.2.3.
@@ -46,7 +45,6 @@ function advanceStringIndex(string, index, unicode)
     return index + 2;
 }
 
-@globalPrivate
 function regExpExec(regexp, str)
 {
     "use strict";
@@ -62,7 +60,6 @@ function regExpExec(regexp, str)
     return builtinExec.@call(regexp, str);
 }
 
-@globalPrivate
 function hasObservableSideEffectsForRegExpMatch(regexp) {
     // This is accessed by the RegExpExec internal function.
     let regexpExec = @tryGetById(regexp, "exec");
@@ -329,7 +326,6 @@ function search(strArg)
     return result.index;
 }
 
-@globalPrivate
 function hasObservableSideEffectsForRegExpSplit(regexp) {
     // This is accessed by the RegExpExec internal function.
     let regexpExec = @tryGetById(regexp, "exec");
index efb857b73b0dd26bf5f6c7eee49b672328642444..896510c044eee885290e55ab07fa9993fbbd06eb 100644 (file)
@@ -46,7 +46,6 @@ function match(regexp)
     return createdRegExp.@matchSymbol(thisString);
 }
 
-@globalPrivate
 function repeatSlowPath(string, count)
 {
     "use strict";
@@ -85,7 +84,7 @@ function repeatSlowPath(string, count)
     }
 }
 
-@globalPrivate
+
 function repeatCharactersSlowPath(string, count)
 {
     "use strict";
@@ -203,7 +202,6 @@ function padEnd(maxLength/*, fillString*/)
     return string + truncatedStringFiller;
 }
 
-@globalPrivate
 function hasObservableSideEffectsForStringReplace(regexp, replacer) {
     if (replacer !== @regExpPrototypeSymbolReplace)
         return true;
index 193d289ac7d74936730416989aeccf655330249a..49bff40ca7a672dd5d8eea86bdee80f99acb498f 100644 (file)
 
 #include "config.h"
 #include "BytecodeIntrinsicRegistry.h"
-
-#include "ArrayIteratorPrototype.h"
-#include "BuiltinNames.h"
 #include "BytecodeGenerator.h"
+#include "JSArrayIterator.h"
 #include "JSCJSValueInlines.h"
 #include "JSGeneratorFunction.h"
 #include "JSPromise.h"
@@ -38,7 +36,7 @@
 
 namespace JSC {
 
-#define INITIALIZE_BYTECODE_INTRINSIC_NAMES_TO_SET(name) m_bytecodeIntrinsicMap.add(vm.propertyNames->builtinNames().name##PrivateName().impl(), &BytecodeIntrinsicNode::emit_intrinsic_##name);
+#define INITIALIZE_BYTECODE_INTRINSIC_NAMES_TO_SET(name) m_bytecodeIntrinsicMap.add(vm.propertyNames->name##PrivateName.impl(), &BytecodeIntrinsicNode::emit_intrinsic_##name);
 
 BytecodeIntrinsicRegistry::BytecodeIntrinsicRegistry(VM& vm)
     : m_vm(vm)
index 91f5c7747ad650ba5fd03c249a3e5d50aca19a42..399c2e854b34e88a28d82d3251757d1a7c4e8db2 100644 (file)
@@ -910,12 +910,12 @@ void BytecodeGenerator::initializeArrowFunctionContextScopeIfNeeded(SymbolTable*
 
         if (m_codeType == FunctionCode && isNewTargetUsedInInnerArrowFunction()) {
             offset = functionSymbolTable->takeNextScopeOffset();
-            functionSymbolTable->set(NoLockingNecessary, propertyNames().builtinNames().newTargetLocalPrivateName().impl(), SymbolTableEntry(VarOffset(offset)));
+            functionSymbolTable->set(NoLockingNecessary, propertyNames().newTargetLocalPrivateName.impl(), SymbolTableEntry(VarOffset(offset)));
         }
         
         if (isConstructor() && constructorKind() == ConstructorKind::Derived && isSuperUsedInInnerArrowFunction()) {
             offset = functionSymbolTable->takeNextScopeOffset(NoLockingNecessary);
-            functionSymbolTable->set(NoLockingNecessary, propertyNames().builtinNames().derivedConstructorPrivateName().impl(), SymbolTableEntry(VarOffset(offset)));
+            functionSymbolTable->set(NoLockingNecessary, propertyNames().derivedConstructorPrivateName.impl(), SymbolTableEntry(VarOffset(offset)));
         }
 
         return;
@@ -930,13 +930,13 @@ void BytecodeGenerator::initializeArrowFunctionContextScopeIfNeeded(SymbolTable*
     }
     
     if (m_codeType == FunctionCode && isNewTargetUsedInInnerArrowFunction()) {
-        auto addTarget = environment.add(propertyNames().builtinNames().newTargetLocalPrivateName());
+        auto addTarget = environment.add(propertyNames().newTargetLocalPrivateName);
         addTarget.iterator->value.setIsCaptured();
         addTarget.iterator->value.setIsLet();
     }
 
     if (isConstructor() && constructorKind() == ConstructorKind::Derived && isSuperUsedInInnerArrowFunction()) {
-        auto derivedConstructor = environment.add(propertyNames().builtinNames().derivedConstructorPrivateName());
+        auto derivedConstructor = environment.add(propertyNames().derivedConstructorPrivateName);
         derivedConstructor.iterator->value.setIsCaptured();
         derivedConstructor.iterator->value.setIsLet();
     }
@@ -2977,9 +2977,9 @@ RegisterID* BytecodeGenerator::emitCallEval(RegisterID* dst, RegisterID* func, C
 
 ExpectedFunction BytecodeGenerator::expectedFunctionForIdentifier(const Identifier& identifier)
 {
-    if (identifier == propertyNames().Object || identifier == propertyNames().builtinNames().ObjectPrivateName())
+    if (identifier == m_vm->propertyNames->Object || identifier == m_vm->propertyNames->ObjectPrivateName)
         return ExpectObjectConstructor;
-    if (identifier == propertyNames().Array || identifier == propertyNames().builtinNames().ArrayPrivateName())
+    if (identifier == m_vm->propertyNames->Array || identifier == m_vm->propertyNames->ArrayPrivateName)
         return ExpectArrayConstructor;
     return NoExpectedFunction;
 }
@@ -4045,7 +4045,7 @@ RegisterID* BytecodeGenerator::emitGetTemplateObject(RegisterID* dst, TaggedTemp
     }
 
     RefPtr<RegisterID> getTemplateObject = nullptr;
-    Variable var = variable(propertyNames().builtinNames().getTemplateObjectPrivateName());
+    Variable var = variable(propertyNames().getTemplateObjectPrivateName);
     if (RegisterID* local = var.local())
         getTemplateObject = emitMove(newTemporary(), local);
     else {
@@ -4235,16 +4235,16 @@ void BytecodeGenerator::emitLoadThisFromArrowFunctionLexicalEnvironment()
     
 RegisterID* BytecodeGenerator::emitLoadNewTargetFromArrowFunctionLexicalEnvironment()
 {
-    Variable newTargetVar = variable(propertyNames().builtinNames().newTargetLocalPrivateName());
+    Variable newTargetVar = variable(propertyNames().newTargetLocalPrivateName);
 
-    return emitGetFromScope(m_newTargetRegister, emitLoadArrowFunctionLexicalEnvironment(propertyNames().builtinNames().newTargetLocalPrivateName()), newTargetVar, ThrowIfNotFound);
+    return emitGetFromScope(m_newTargetRegister, emitLoadArrowFunctionLexicalEnvironment(propertyNames().newTargetLocalPrivateName), newTargetVar, ThrowIfNotFound);
     
 }
 
 RegisterID* BytecodeGenerator::emitLoadDerivedConstructorFromArrowFunctionLexicalEnvironment()
 {
-    Variable protoScopeVar = variable(propertyNames().builtinNames().derivedConstructorPrivateName());
-    return emitGetFromScope(newTemporary(), emitLoadArrowFunctionLexicalEnvironment(propertyNames().builtinNames().derivedConstructorPrivateName()), protoScopeVar, ThrowIfNotFound);
+    Variable protoScopeVar = variable(propertyNames().derivedConstructorPrivateName);
+    return emitGetFromScope(newTemporary(), emitLoadArrowFunctionLexicalEnvironment(propertyNames().derivedConstructorPrivateName), protoScopeVar, ThrowIfNotFound);
 }
 
 RegisterID* BytecodeGenerator::ensureThis()
@@ -4288,7 +4288,7 @@ void BytecodeGenerator::emitPutNewTargetToArrowFunctionContextScope()
     if (isNewTargetUsedInInnerArrowFunction()) {
         ASSERT(m_arrowFunctionContextLexicalEnvironmentRegister);
         
-        Variable newTargetVar = variable(propertyNames().builtinNames().newTargetLocalPrivateName());
+        Variable newTargetVar = variable(propertyNames().newTargetLocalPrivateName);
         emitPutToScope(m_arrowFunctionContextLexicalEnvironmentRegister, newTargetVar, newTarget(), DoNotThrowIfNotFound, InitializationMode::Initialization);
     }
 }
@@ -4299,7 +4299,7 @@ void BytecodeGenerator::emitPutDerivedConstructorToArrowFunctionContextScope()
         if (isSuperUsedInInnerArrowFunction()) {
             ASSERT(m_arrowFunctionContextLexicalEnvironmentRegister);
             
-            Variable protoScope = variable(propertyNames().builtinNames().derivedConstructorPrivateName());
+            Variable protoScope = variable(propertyNames().derivedConstructorPrivateName);
             emitPutToScope(m_arrowFunctionContextLexicalEnvironmentRegister, protoScope, &m_calleeRegister, DoNotThrowIfNotFound, InitializationMode::Initialization);
         }
     }
@@ -4564,7 +4564,7 @@ RegisterID* BytecodeGenerator::emitDelegateYield(RegisterID* argument, Throwable
 void BytecodeGenerator::emitGeneratorStateChange(int32_t state)
 {
     RegisterID* completedState = emitLoad(nullptr, jsNumber(state));
-    emitPutById(generatorRegister(), propertyNames().builtinNames().generatorStatePrivateName(), completedState);
+    emitPutById(generatorRegister(), propertyNames().generatorStatePrivateName, completedState);
 }
 
 void BytecodeGenerator::emitGeneratorStateLabel()
index b6d0a372bb9b6cba5a28b6db2faad666270a6ba4..23c026bf2cc59beaf1a65502a7f7d9c5dfc18fb7 100644 (file)
@@ -161,12 +161,12 @@ static RegisterID* emitHomeObjectForCallee(BytecodeGenerator& generator)
 {
     if (generator.isDerivedClassContext() || generator.isDerivedConstructorContext()) {
         RegisterID* derivedConstructor = generator.emitLoadDerivedConstructorFromArrowFunctionLexicalEnvironment();
-        return generator.emitGetById(generator.newTemporary(), derivedConstructor, generator.propertyNames().builtinNames().homeObjectPrivateName());
+        return generator.emitGetById(generator.newTemporary(), derivedConstructor, generator.propertyNames().homeObjectPrivateName);
     }
 
     RegisterID callee;
     callee.setIndex(JSStack::Callee);
-    return generator.emitGetById(generator.newTemporary(), &callee, generator.propertyNames().builtinNames().homeObjectPrivateName());
+    return generator.emitGetById(generator.newTemporary(), &callee, generator.propertyNames().homeObjectPrivateName);
 }
 
 static RegisterID* emitSuperBaseForCallee(BytecodeGenerator& generator)
@@ -457,7 +457,7 @@ RegisterID* ObjectLiteralNode::emitBytecode(BytecodeGenerator& generator, Regist
 
 static inline void emitPutHomeObject(BytecodeGenerator& generator, RegisterID* function, RegisterID* homeObject)
 {
-    generator.emitPutById(function, generator.propertyNames().builtinNames().homeObjectPrivateName(), homeObject);
+    generator.emitPutById(function, generator.propertyNames().homeObjectPrivateName, homeObject);
 }
 
 RegisterID* PropertyListNode::emitBytecode(BytecodeGenerator& generator, RegisterID* dst)
@@ -3282,14 +3282,14 @@ void FunctionNode::emitBytecode(BytecodeGenerator& generator, RegisterID*)
         // But to make it efficient, we will introduce JSGenerator class, add opcode new_generator and use its C++ fields instead of these private properties.
         // https://bugs.webkit.org/show_bug.cgi?id=151545
 
-        generator.emitDirectPutById(generator.generatorRegister(), generator.propertyNames().builtinNames().generatorNextPrivateName(), next.get(), PropertyNode::KnownDirect);
+        generator.emitDirectPutById(generator.generatorRegister(), generator.propertyNames().generatorNextPrivateName, next.get(), PropertyNode::KnownDirect);
 
-        generator.emitDirectPutById(generator.generatorRegister(), generator.propertyNames().builtinNames().generatorThisPrivateName(), generator.thisRegister(), PropertyNode::KnownDirect);
+        generator.emitDirectPutById(generator.generatorRegister(), generator.propertyNames().generatorThisPrivateName, generator.thisRegister(), PropertyNode::KnownDirect);
 
         RegisterID* initialState = generator.emitLoad(nullptr, jsNumber(0));
-        generator.emitDirectPutById(generator.generatorRegister(), generator.propertyNames().builtinNames().generatorStatePrivateName(), initialState, PropertyNode::KnownDirect);
+        generator.emitDirectPutById(generator.generatorRegister(), generator.propertyNames().generatorStatePrivateName, initialState, PropertyNode::KnownDirect);
 
-        generator.emitDirectPutById(generator.generatorRegister(), generator.propertyNames().builtinNames().generatorFramePrivateName(), generator.emitLoad(nullptr, jsNull()), PropertyNode::KnownDirect);
+        generator.emitDirectPutById(generator.generatorRegister(), generator.propertyNames().generatorFramePrivateName, generator.emitLoad(nullptr, jsNull()), PropertyNode::KnownDirect);
 
         ASSERT(startOffset() >= lineStartOffset());
         generator.emitDebugHook(WillLeaveCallFrame, lastLine(), startOffset(), lineStartOffset());
index df2c962001b47978c2073ef0309b08349c01f13a..ccb019674e3003bfef74c338f6bc01c13c8e215a 100644 (file)
@@ -48,7 +48,6 @@
 #include "JIT.h"
 #include "JITExceptions.h"
 #include "JSCInlines.h"
-#include "JSGenericTypedArrayViewConstructorInlines.h"
 #include "JSLexicalEnvironment.h"
 #include "ObjectConstructor.h"
 #include "Repatch.h"
index 4a7d592445a3ba983360b2308eff1ab82498ca1f..0eef89a6474a073dfbe1bf46707125a99b4f29c6 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2013, 2015-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2013, 2015 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -34,6 +34,7 @@
 #include "InjectedScriptHost.h"
 #include "IteratorOperations.h"
 #include "JSArray.h"
+#include "JSArrayIterator.h"
 #include "JSBoundFunction.h"
 #include "JSCInlines.h"
 #include "JSFunction.h"
@@ -175,7 +176,8 @@ JSValue JSInjectedScriptHost::subtype(ExecState* exec)
     if (value.inherits(JSWeakSet::info()))
         return jsNontrivialString(exec, ASCIILiteral("weakset"));
 
-    if (value.inherits(JSMapIterator::info())
+    if (value.inherits(JSArrayIterator::info())
+        || value.inherits(JSMapIterator::info())
         || value.inherits(JSSetIterator::info())
         || value.inherits(JSStringIterator::info())
         || value.inherits(JSPropertyNameIterator::info()))
@@ -317,6 +319,28 @@ JSValue JSInjectedScriptHost::getInternalProperties(ExecState* exec)
         }
     }
 
+    if (JSArrayIterator* arrayIterator = jsDynamicCast<JSArrayIterator*>(value)) {
+        String kind;
+        switch (arrayIterator->kind(exec)) {
+        case ArrayIterateKey:
+            kind = ASCIILiteral("key");
+            break;
+        case ArrayIterateValue:
+            kind = ASCIILiteral("value");
+            break;
+        case ArrayIterateKeyValue:
+            kind = ASCIILiteral("key+value");
+            break;
+        }
+        unsigned index = 0;
+        JSArray* array = constructEmptyArray(exec, nullptr, 2);
+        if (UNLIKELY(vm.exception()))
+            return jsUndefined();
+        array->putDirectIndex(exec, index++, constructInternalProperty(exec, "array", arrayIterator->iteratedValue(exec)));
+        array->putDirectIndex(exec, index++, constructInternalProperty(exec, "kind", jsNontrivialString(exec, kind)));
+        return array;
+    }
+
     if (JSMapIterator* mapIterator = jsDynamicCast<JSMapIterator*>(value)) {
         String kind;
         switch (mapIterator->kind()) {
index 3c959e4fac05caa9f25b2a5c776c1f554967aa23..d67df9478132329d886d53c3728da6ced9468d65 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *  Copyright (C) 1999-2000 Harri Porten (porten@kde.org)
- *  Copyright (C) 2006-2009, 2011-2013, 2016 Apple Inc. All Rights Reserved.
+ *  Copyright (C) 2006, 2007, 2008, 2009, 2011, 2012, 2013 Apple Inc. All Rights Reserved.
  *  Copyright (C) 2007 Cameron Zwarich (cwzwarich@uwaterloo.ca)
  *  Copyright (C) 2010 Zoltan Herczeg (zherczeg@inf.u-szeged.hu)
  *  Copyright (C) 2012 Mathias Bynens (mathias@qiwi.be)
@@ -939,7 +939,7 @@ template <bool shouldCreateIdentifier> ALWAYS_INLINE JSTokenType Lexer<LChar>::p
             if (isPrivateName)
                 ident = m_vm->propertyNames->lookUpPrivateName(*ident);
             else if (*ident == m_vm->propertyNames->undefinedKeyword)
-                tokenData->ident = &m_vm->propertyNames->builtinNames().undefinedPrivateName();
+                tokenData->ident = &m_vm->propertyNames->undefinedPrivateName;
             if (!ident)
                 return INVALID_PRIVATE_NAME_ERRORTOK;
         }
@@ -1016,7 +1016,7 @@ template <bool shouldCreateIdentifier> ALWAYS_INLINE JSTokenType Lexer<UChar>::p
             if (isPrivateName)
                 ident = m_vm->propertyNames->lookUpPrivateName(*ident);
             else if (*ident == m_vm->propertyNames->undefinedKeyword)
-                tokenData->ident = &m_vm->propertyNames->builtinNames().undefinedPrivateName();
+                tokenData->ident = &m_vm->propertyNames->undefinedPrivateName;
             if (!ident)
                 return INVALID_PRIVATE_NAME_ERRORTOK;
         }
index c8116408b10b5f0cef25d55b9008bdd79291d310..7d851ceaca2eaad97dc641c241f4b5a0c723ab84 100644 (file)
@@ -26,7 +26,6 @@
 #ifndef Nodes_h
 #define Nodes_h
 
-#include "BuiltinNames.h"
 #include "Error.h"
 #include "JITCode.h"
 #include "Opcode.h"
index b6c87790f2501ce749fb84dc48eba9b2e70da403..45757417f95e965680d81d09d9f8aa0b9136afd8 100644 (file)
@@ -1897,23 +1897,23 @@ template <class TreeBuilder> typename TreeBuilder::FormalParameterList Parser<Le
     JSTextPosition position = tokenStartPosition();
 
     // @generator
-    declareParameter(&m_vm->propertyNames->builtinNames().generatorPrivateName());
-    auto generator = context.createBindingLocation(location, m_vm->propertyNames->builtinNames().generatorPrivateName(), position, position, AssignmentContext::DeclarationStatement);
+    declareParameter(&m_vm->propertyNames->generatorPrivateName);
+    auto generator = context.createBindingLocation(location, m_vm->propertyNames->generatorPrivateName, position, position, AssignmentContext::DeclarationStatement);
     context.appendParameter(parameters, generator, 0);
 
     // @generatorState
-    declareParameter(&m_vm->propertyNames->builtinNames().generatorStatePrivateName());
-    auto generatorState = context.createBindingLocation(location, m_vm->propertyNames->builtinNames().generatorStatePrivateName(), position, position, AssignmentContext::DeclarationStatement);
+    declareParameter(&m_vm->propertyNames->generatorStatePrivateName);
+    auto generatorState = context.createBindingLocation(location, m_vm->propertyNames->generatorStatePrivateName, position, position, AssignmentContext::DeclarationStatement);
     context.appendParameter(parameters, generatorState, 0);
 
     // @generatorValue
-    declareParameter(&m_vm->propertyNames->builtinNames().generatorValuePrivateName());
-    auto generatorValue = context.createBindingLocation(location, m_vm->propertyNames->builtinNames().generatorValuePrivateName(), position, position, AssignmentContext::DeclarationStatement);
+    declareParameter(&m_vm->propertyNames->generatorValuePrivateName);
+    auto generatorValue = context.createBindingLocation(location, m_vm->propertyNames->generatorValuePrivateName, position, position, AssignmentContext::DeclarationStatement);
     context.appendParameter(parameters, generatorValue, 0);
 
     // @generatorResumeMode
-    declareParameter(&m_vm->propertyNames->builtinNames().generatorResumeModePrivateName());
-    auto generatorResumeMode = context.createBindingLocation(location, m_vm->propertyNames->builtinNames().generatorResumeModePrivateName(), position, position, AssignmentContext::DeclarationStatement);
+    declareParameter(&m_vm->propertyNames->generatorResumeModePrivateName);
+    auto generatorResumeMode = context.createBindingLocation(location, m_vm->propertyNames->generatorResumeModePrivateName, position, position, AssignmentContext::DeclarationStatement);
     context.appendParameter(parameters, generatorResumeMode, 0);
 
     return parameters;
@@ -2871,15 +2871,15 @@ template <class TreeBuilder> TreeStatement Parser<LexerType>::parseExportDeclara
             TreeExpression expression = parseAssignmentExpression(context);
             failIfFalse(expression, "Cannot parse expression");
 
-            DeclarationResultMask declarationResult = declareVariable(&m_vm->propertyNames->builtinNames().starDefaultPrivateName(), DeclarationType::ConstDeclaration);
+            DeclarationResultMask declarationResult = declareVariable(&m_vm->propertyNames->starDefaultPrivateName, DeclarationType::ConstDeclaration);
             if (declarationResult & DeclarationResult::InvalidDuplicateDeclaration)
                 internalFailWithMessage(false, "Only one 'default' export is allowed");
 
-            TreeExpression assignment = context.createAssignResolve(location, m_vm->propertyNames->builtinNames().starDefaultPrivateName(), expression, start, start, tokenEndPosition(), AssignmentContext::ConstDeclarationStatement);
+            TreeExpression assignment = context.createAssignResolve(location, m_vm->propertyNames->starDefaultPrivateName, expression, start, start, tokenEndPosition(), AssignmentContext::ConstDeclarationStatement);
             result = context.createExprStatement(location, assignment, start, tokenEndPosition());
             if (!isFunctionOrClassDeclaration)
                 failIfFalse(autoSemiColon(), "Expected a ';' following a targeted export declaration");
-            localName = &m_vm->propertyNames->builtinNames().starDefaultPrivateName();
+            localName = &m_vm->propertyNames->starDefaultPrivateName;
         }
         failIfFalse(result, "Cannot parse the declaration");
 
index 88957e1c47f28de25101452e6a506c36353414c5..01b1004ff15a700aaaccc3d90701e313070b2684 100644 (file)
@@ -28,6 +28,7 @@
 
 #include "ArrayIteratorPrototype.lut.h"
 #include "IteratorOperations.h"
+#include "JSArrayIterator.h"
 #include "JSCInlines.h"
 #include "JSCJSValueInlines.h"
 #include "JSCellInlines.h"
@@ -37,6 +38,7 @@
 
 namespace JSC {
 
+
 const ClassInfo ArrayIteratorPrototype::s_info = { "Array Iterator", &Base::s_info, &arrayIteratorPrototypeTable, CREATE_METHOD_TABLE(ArrayIteratorPrototype) };
 
 /* Source for ArrayIteratorPrototype.lut.h
index b515c2bade39c70eb2b876cb32add49c331a2e23..b9707a16f21ee40dca4083aaadefdeda688f1b7f 100644 (file)
 
 namespace JSC {
 
-enum ArrayIterationKind : uint32_t {
-    ArrayIterateKey,
-    ArrayIterateValue,
-    ArrayIterateKeyValue
-};
-
 class ArrayIteratorPrototype : public JSNonFinalObject {
 public:
     typedef JSNonFinalObject Base;
index 8cc6ca060ad54713a9bae79a503a93dc86cdac7c..81d21f8ac3beb838b8735a08beab7228cb72575f 100644 (file)
@@ -36,6 +36,7 @@
 #include "Interpreter.h"
 #include "JIT.h"
 #include "JSArrayInlines.h"
+#include "JSArrayIterator.h"
 #include "JSCBuiltins.h"
 #include "JSCInlines.h"
 #include "JSStringBuilder.h"
index 926528e0fee942144bcb8548f6a1dad88d874fa9..475df25868311032010daf96f645a7d7676b541c 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *  Copyright (C) 2003, 2007, 2009, 2012, 2016 Apple Inc. All rights reserved.
+ *  Copyright (C) 2003, 2007, 2009, 2012 Apple Inc. All rights reserved.
  *
  *  This library is free software; you can redistribute it and/or
  *  modify it under the terms of the GNU Library General Public
@@ -43,6 +43,7 @@ CommonIdentifiers::CommonIdentifiers(VM* vm)
     , m_builtinNames(new BuiltinNames(vm, this))
     JSC_COMMON_IDENTIFIERS_EACH_KEYWORD(INITIALIZE_KEYWORD)
     JSC_COMMON_IDENTIFIERS_EACH_PROPERTY_NAME(INITIALIZE_PROPERTY_NAME)
+    JSC_COMMON_PRIVATE_IDENTIFIERS_EACH_PROPERTY_NAME(INITIALIZE_PRIVATE_NAME)
     JSC_COMMON_PRIVATE_IDENTIFIERS_EACH_WELL_KNOWN_SYMBOL(INITIALIZE_SYMBOL)
 {
 }
index 85cebbf38f9e521b3038a5fc4ac425f1e807bdb2..5bb0bae69251d003e31b72cb3cb547a78e236578 100644 (file)
@@ -21,6 +21,7 @@
 #ifndef CommonIdentifiers_h
 #define CommonIdentifiers_h
 
+#include "BytecodeIntrinsicRegistry.h"
 #include "Identifier.h"
 #include <wtf/Noncopyable.h>
 
     macro(toStringTag) \
     macro(unscopables)
 
+#define JSC_COMMON_PRIVATE_IDENTIFIERS_EACH_PROPERTY_NAME(macro) \
+    JSC_COMMON_BYTECODE_INTRINSIC_FUNCTIONS_EACH_NAME(macro) \
+    JSC_COMMON_BYTECODE_INTRINSIC_CONSTANTS_EACH_NAME(macro) \
+    macro(iteratedObject) \
+    macro(arrayIteratorNextIndex) \
+    macro(arrayIterationKind) \
+    macro(arrayIteratorNext) \
+    macro(arrayIteratorIsDone) \
+    macro(arrayIteratorKind) \
+    macro(charCodeAt) \
+    macro(iteratedString) \
+    macro(stringIteratorNextIndex) \
+    macro(promise) \
+    macro(fulfillmentHandler) \
+    macro(rejectionHandler) \
+    macro(index) \
+    macro(deferred) \
+    macro(countdownHolder) \
+    macro(Object) \
+    macro(ownEnumerablePropertyKeys) \
+    macro(Number) \
+    macro(Array) \
+    macro(String) \
+    macro(RegExp) \
+    macro(Map) \
+    macro(Promise) \
+    macro(Reflect) \
+    macro(InternalPromise) \
+    macro(abs) \
+    macro(floor) \
+    macro(trunc) \
+    macro(isFinite) \
+    macro(isNaN) \
+    macro(create) \
+    macro(defineProperty) \
+    macro(getPrototypeOf) \
+    macro(getOwnPropertyDescriptor) \
+    macro(getOwnPropertyNames) \
+    macro(ownKeys) \
+    macro(Error) \
+    macro(RangeError) \
+    macro(TypeError) \
+    macro(typedArrayLength) \
+    macro(typedArraySort) \
+    macro(typedArrayGetOriginalConstructor) \
+    macro(BuiltinLog) \
+    macro(homeObject) \
+    macro(getTemplateObject) \
+    macro(enqueueJob) \
+    macro(handler) \
+    macro(promiseState) \
+    macro(promiseFulfillReactions) \
+    macro(promiseRejectReactions) \
+    macro(promiseResult) \
+    macro(push) \
+    macro(repeatCharacter) \
+    macro(capabilities) \
+    macro(starDefault) \
+    macro(InspectorInstrumentation) \
+    macro(get) \
+    macro(set) \
+    macro(shift) \
+    macro(allocateTypedArray) \
+    macro(Int8Array) \
+    macro(Int16Array) \
+    macro(Int32Array) \
+    macro(Uint8Array) \
+    macro(Uint8ClampedArray) \
+    macro(Uint16Array) \
+    macro(Uint32Array) \
+    macro(Float32Array) \
+    macro(Float64Array) \
+    macro(exec) \
+    macro(generator) \
+    macro(generatorNext) \
+    macro(generatorState) \
+    macro(generatorFrame) \
+    macro(generatorValue) \
+    macro(generatorThis) \
+    macro(generatorResumeMode) \
+    macro(Collator) \
+    macro(DateTimeFormat) \
+    macro(NumberFormat) \
+    macro(intlSubstituteValue) \
+    macro(thisTimeValue) \
+    macro(thisNumberValue) \
+    macro(newTargetLocal) \
+    macro(derivedConstructor) \
+    macro(isBoundFunction) \
+    macro(hasInstanceBoundFunction) \
+    macro(instanceOf) \
+    macro(isArray) \
+    macro(isArrayConstructor) \
+    macro(isConstructor) \
+    macro(isRegExpObject) \
+    macro(concatMemcpy) \
+    macro(appendMemcpy) \
+    macro(predictFinalLengthFromArgumunts) \
+    macro(print) \
+    macro(isSet) \
+    macro(isMap) \
+    macro(regExpCreate) \
+    macro(SetIterator) \
+    macro(setIteratorNext) \
+    macro(replaceUsingRegExp) \
+    macro(replaceUsingStringSearch) \
+    macro(MapIterator) \
+    macro(mapIteratorNext) \
+    macro(regExpBuiltinExec) \
+    macro(regExpMatchFast) \
+    macro(regExpProtoFlagsGetter) \
+    macro(regExpProtoGlobalGetter) \
+    macro(regExpProtoIgnoreCaseGetter) \
+    macro(regExpProtoMultilineGetter) \
+    macro(regExpProtoSourceGetter) \
+    macro(regExpProtoStickyGetter) \
+    macro(regExpProtoUnicodeGetter) \
+    macro(regExpPrototypeSymbolReplace) \
+    macro(regExpReplaceFast) \
+    macro(regExpSearchFast) \
+    macro(regExpSplitFast) \
+    macro(regExpTestFast) \
+    macro(stringIncludesInternal) \
+    macro(stringSplitFast) \
+    macro(stringSubstrInternal) \
+
 namespace JSC {
     
     class BuiltinNames;
@@ -357,6 +484,10 @@ namespace JSC {
         JSC_COMMON_IDENTIFIERS_EACH_PROPERTY_NAME(JSC_IDENTIFIER_DECLARE_PROPERTY_NAME_GLOBAL)
 #undef JSC_IDENTIFIER_DECLARE_PROPERTY_NAME_GLOBAL
 
+#define JSC_IDENTIFIER_DECLARE_PRIVATE_PROPERTY_NAME_GLOBAL(name) const Identifier name##PrivateName;
+        JSC_COMMON_PRIVATE_IDENTIFIERS_EACH_PROPERTY_NAME(JSC_IDENTIFIER_DECLARE_PRIVATE_PROPERTY_NAME_GLOBAL)
+#undef JSC_IDENTIFIER_DECLARE_PRIVATE_PROPERTY_NAME_GLOBAL
+
 #define JSC_IDENTIFIER_DECLARE_PRIVATE_WELL_KNOWN_SYMBOL_GLOBAL(name) const Identifier name##Symbol;
         JSC_COMMON_PRIVATE_IDENTIFIERS_EACH_WELL_KNOWN_SYMBOL(JSC_IDENTIFIER_DECLARE_PRIVATE_WELL_KNOWN_SYMBOL_GLOBAL)
 #undef JSC_IDENTIFIER_DECLARE_PRIVATE_WELL_KNOWN_SYMBOL_GLOBAL
index a6ecfd284b101c3ac001f682f888ded197678438..e544310fb23de2e29689fd76ee7f7976d2441722 100644 (file)
@@ -25,9 +25,7 @@
 
 #include "config.h"
 #include "CommonSlowPaths.h"
-
 #include "ArrayConstructor.h"
-#include "BuiltinNames.h"
 #include "CallFrame.h"
 #include "ClonedArguments.h"
 #include "CodeProfiling.h"
@@ -719,7 +717,7 @@ SLOW_PATH_DECL(slow_path_save)
     BEGIN();
     JSValue generator = OP(1).jsValue();
     GeneratorFrame* frame = nullptr;
-    JSValue value = generator.get(exec, exec->propertyNames().builtinNames().generatorFramePrivateName());
+    JSValue value = generator.get(exec, exec->propertyNames().generatorFramePrivateName);
     if (!value.isNull())
         frame = jsCast<GeneratorFrame*>(value);
     else {
@@ -727,7 +725,7 @@ SLOW_PATH_DECL(slow_path_save)
         // https://bugs.webkit.org/show_bug.cgi?id=151545
         frame = GeneratorFrame::create(exec->vm(),  exec->codeBlock()->numCalleeLocals());
         PutPropertySlot slot(generator, true, PutPropertySlot::PutById);
-        asObject(generator)->methodTable(exec->vm())->put(asObject(generator), exec, exec->propertyNames().builtinNames().generatorFramePrivateName(), frame, slot);
+        asObject(generator)->methodTable(exec->vm())->put(asObject(generator), exec, exec->propertyNames().generatorFramePrivateName, frame, slot);
     }
     unsigned liveCalleeLocalsIndex = pc[2].u.unsignedValue;
     frame->save(exec, exec->codeBlock()->liveCalleeLocalsAtYield(liveCalleeLocalsIndex));
@@ -738,7 +736,7 @@ SLOW_PATH_DECL(slow_path_resume)
 {
     BEGIN();
     JSValue generator = OP(1).jsValue();
-    GeneratorFrame* frame = jsCast<GeneratorFrame*>(generator.get(exec, exec->propertyNames().builtinNames().generatorFramePrivateName()));
+    GeneratorFrame* frame = jsCast<GeneratorFrame*>(generator.get(exec, exec->propertyNames().generatorFramePrivateName));
     unsigned liveCalleeLocalsIndex = pc[2].u.unsignedValue;
     frame->resume(exec, exec->codeBlock()->liveCalleeLocalsAtYield(liveCalleeLocalsIndex));
     END();
index 3a80500f8fde1c4f750e870b9c0a268108be78a9..48389cd3b254b8a39ec1051851a9cc54eb79cce9 100644 (file)
@@ -1,6 +1,5 @@
 /*
  * Copyright (C) 2015 Andy VanWagoner (thetalecrafter@gmail.com)
- * Copyright (C) 2016 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
index de509f539c210d168a74121ebeb9c4421f750fd2..e1dd3e44df4a4e129d01b8dc999e8669f9266918 100644 (file)
@@ -28,7 +28,6 @@
 
 #if ENABLE(INTL)
 
-#include "BuiltinNames.h"
 #include "DateConstructor.h"
 #include "Error.h"
 #include "IntlDateTimeFormat.h"
@@ -117,7 +116,7 @@ EncodedJSValue JSC_HOST_CALL IntlDateTimeFormatPrototypeGetterFormat(ExecState*
     // FIXME: Workaround to provide compatibility with ECMA-402 1.0 call/apply patterns.
     // https://bugs.webkit.org/show_bug.cgi?id=153679
     if (!dtf)
-        dtf = jsDynamicCast<IntlDateTimeFormat*>(state->thisValue().get(state, state->vm().propertyNames->builtinNames().intlSubstituteValuePrivateName()));
+        dtf = jsDynamicCast<IntlDateTimeFormat*>(state->thisValue().get(state, state->vm().propertyNames->intlSubstituteValuePrivateName));
 
     // 2. ReturnIfAbrupt(dtf).
     if (!dtf)
@@ -154,7 +153,7 @@ EncodedJSValue JSC_HOST_CALL IntlDateTimeFormatPrototypeFuncResolvedOptions(Exec
     // FIXME: Workaround to provide compatibility with ECMA-402 1.0 call/apply patterns.
     // https://bugs.webkit.org/show_bug.cgi?id=153679
     if (!dateTimeFormat)
-        dateTimeFormat = jsDynamicCast<IntlDateTimeFormat*>(state->thisValue().get(state, state->vm().propertyNames->builtinNames().intlSubstituteValuePrivateName()));
+        dateTimeFormat = jsDynamicCast<IntlDateTimeFormat*>(state->thisValue().get(state, state->vm().propertyNames->intlSubstituteValuePrivateName));
 
     if (!dateTimeFormat)
         return JSValue::encode(throwTypeError(state, ASCIILiteral("Intl.DateTimeFormat.prototype.resolvedOptions called on value that's not an object initialized as a DateTimeFormat")));
index fe2c9dbf6fd942bca1b5a054768525bab76a294d..0a5d56316d56ab5a085e6485b5117867f9f9787a 100644 (file)
@@ -1,6 +1,5 @@
 /*
  * Copyright (C) 2015 Andy VanWagoner (thetalecrafter@gmail.com)
- * Copyright (C) 2016 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -29,7 +28,6 @@
 
 #if ENABLE(INTL)
 
-#include "BuiltinNames.h"
 #include "Error.h"
 #include "IntlNumberFormat.h"
 #include "JSBoundFunction.h"
@@ -107,7 +105,7 @@ EncodedJSValue JSC_HOST_CALL IntlNumberFormatPrototypeGetterFormat(ExecState* st
     // FIXME: Workaround to provide compatibility with ECMA-402 1.0 call/apply patterns.
     // https://bugs.webkit.org/show_bug.cgi?id=153679
     if (!nf)
-        nf = jsDynamicCast<IntlNumberFormat*>(state->thisValue().get(state, state->vm().propertyNames->builtinNames().intlSubstituteValuePrivateName()));
+        nf = jsDynamicCast<IntlNumberFormat*>(state->thisValue().get(state, state->vm().propertyNames->intlSubstituteValuePrivateName));
 
     if (!nf)
         return JSValue::encode(throwTypeError(state, ASCIILiteral("Intl.NumberFormat.prototype.format called on value that's not an object initialized as a NumberFormat")));
@@ -143,7 +141,7 @@ EncodedJSValue JSC_HOST_CALL IntlNumberFormatPrototypeFuncResolvedOptions(ExecSt
     // FIXME: Workaround to provide compatibility with ECMA-402 1.0 call/apply patterns.
     // https://bugs.webkit.org/show_bug.cgi?id=153679
     if (!numberFormat)
-        numberFormat = jsDynamicCast<IntlNumberFormat*>(state->thisValue().get(state, state->vm().propertyNames->builtinNames().intlSubstituteValuePrivateName()));
+        numberFormat = jsDynamicCast<IntlNumberFormat*>(state->thisValue().get(state, state->vm().propertyNames->intlSubstituteValuePrivateName));
 
     if (!numberFormat)
         return JSValue::encode(throwTypeError(state, ASCIILiteral("Intl.NumberFormat.prototype.resolvedOptions called on value that's not an object initialized as a NumberFormat")));
index e3bff3877b08f1d969c731ef4b1327dfe6494ba9..129d985538f5b882c00cd9dcf03473b07bec64c8 100644 (file)
@@ -1,6 +1,5 @@
 /*
  * Copyright (C) 2016 Yusuke Suzuki <yusuke.suzuki@sslab.ics.keio.ac.jp>
- * Copyright (C) 2016 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -28,7 +27,6 @@
 
 #if ENABLE(INTL)
 
-#include "BuiltinNames.h"
 #include "IntlObject.h"
 #include "JSObject.h"
 
@@ -51,7 +49,7 @@ JSValue constructIntlInstanceWithWorkaroundForLegacyIntlConstructor(ExecState& s
             if (state.hadException())
                 return jsUndefined();
 
-            thisObject->putDirect(vm, vm.propertyNames->builtinNames().intlSubstituteValuePrivateName(), instance);
+            thisObject->putDirect(vm, vm.propertyNames->intlSubstituteValuePrivateName, instance);
             return thisObject;
         }
     }
diff --git a/Source/JavaScriptCore/runtime/JSArrayIterator.cpp b/Source/JavaScriptCore/runtime/JSArrayIterator.cpp
new file mode 100644 (file)
index 0000000..10105b8
--- /dev/null
@@ -0,0 +1,60 @@
+/*
+ * Copyright (C) 2013 Apple, Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
+ */
+
+#include "config.h"
+#include "JSArrayIterator.h"
+
+#include "JSCJSValueInlines.h"
+#include "JSCellInlines.h"
+#include "SlotVisitorInlines.h"
+#include "StructureInlines.h"
+
+namespace JSC {
+
+const ClassInfo JSArrayIterator::s_info = { "Array Iterator", &Base::s_info, 0, CREATE_METHOD_TABLE(JSArrayIterator) };
+
+void JSArrayIterator::finishCreation(VM& vm, JSGlobalObject*, ArrayIterationKind kind, JSObject* iteratedObject)
+{
+    Base::finishCreation(vm);
+    ASSERT(inherits(info()));
+
+    putDirect(vm, vm.propertyNames->iteratedObjectPrivateName, iteratedObject);
+    putDirect(vm, vm.propertyNames->arrayIteratorNextIndexPrivateName, jsNumber(0));
+    putDirect(vm, vm.propertyNames->arrayIterationKindPrivateName, jsNumber(kind));
+}
+
+ArrayIterationKind JSArrayIterator::kind(ExecState* exec) const
+{
+    JSValue kindValue = getDirect(exec->vm(), exec->vm().propertyNames->arrayIterationKindPrivateName);
+    return static_cast<ArrayIterationKind>(kindValue.asInt32());
+}
+
+JSValue JSArrayIterator::iteratedValue(ExecState* exec) const
+{
+    return getDirect(exec->vm(), exec->vm().propertyNames->iteratedObjectPrivateName);
+}
+
+
+}
diff --git a/Source/JavaScriptCore/runtime/JSArrayIterator.h b/Source/JavaScriptCore/runtime/JSArrayIterator.h
new file mode 100644 (file)
index 0000000..0166bd2
--- /dev/null
@@ -0,0 +1,74 @@
+/*
+ * Copyright (C) 2013 Apple, Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
+ */
+
+#ifndef JSArrayIterator_h
+#define JSArrayIterator_h
+
+#include "JSObject.h"
+
+namespace JSC {
+
+enum ArrayIterationKind : uint32_t {
+    ArrayIterateKey,
+    ArrayIterateValue,
+    ArrayIterateKeyValue
+};
+
+class JSArrayIterator : public JSNonFinalObject {
+public:
+    typedef JSNonFinalObject Base;
+
+    DECLARE_EXPORT_INFO;
+
+    static Structure* createStructure(VM& vm, JSGlobalObject* globalObject, JSValue prototype)
+    {
+        return Structure::create(vm, globalObject, prototype, TypeInfo(ObjectType, StructureFlags), info());
+    }
+
+    static JSArrayIterator* create(ExecState* exec, Structure* structure, ArrayIterationKind kind, JSObject* iteratedObject)
+    {
+        VM& vm = exec->vm();
+        JSArrayIterator* instance = new (NotNull, allocateCell<JSArrayIterator>(vm.heap)) JSArrayIterator(vm, structure);
+        instance->finishCreation(vm, structure->globalObject(), kind, iteratedObject);
+        return instance;
+    }
+
+    ArrayIterationKind kind(ExecState*) const;
+    JSValue iteratedValue(ExecState*) const;
+    JSArrayIterator* clone(ExecState*);
+
+    using JSNonFinalObject::arrayStorageOrNull;
+private:
+    JSArrayIterator(VM& vm, Structure* structure)
+        : Base(vm, structure)
+    {
+    }
+
+    void finishCreation(VM&, JSGlobalObject*, ArrayIterationKind, JSObject* iteratedObject);
+};
+
+}
+
+#endif // !defined(JSArrayIterator_h)
index ccc3b05d779e0869d4b9702fbcc99dd8b8b33c93..6eb0892137fd83142bd60e811c45280d5070ce01 100644 (file)
@@ -26,7 +26,6 @@
 #ifndef JSGenericTypedArrayViewConstructorInlines_h
 #define JSGenericTypedArrayViewConstructorInlines_h
 
-#include "BuiltinNames.h"
 #include "Error.h"
 #include "IteratorOperations.h"
 #include "JSArrayBuffer.h"
@@ -53,7 +52,7 @@ void JSGenericTypedArrayViewConstructor<ViewClass>::finishCreation(VM& vm, JSGlo
     putDirectWithoutTransition(vm, vm.propertyNames->BYTES_PER_ELEMENT, jsNumber(ViewClass::elementSize), DontEnum | ReadOnly | DontDelete);
 
     if (privateAllocator)
-        putDirectBuiltinFunction(vm, globalObject, vm.propertyNames->builtinNames().allocateTypedArrayPrivateName(), privateAllocator, DontEnum | DontDelete | ReadOnly);
+        putDirectBuiltinFunction(vm, globalObject, vm.propertyNames->allocateTypedArrayPrivateName, privateAllocator, DontEnum | DontDelete | ReadOnly);
 }
 
 template<typename ViewClass>
index 0b023d82d9ca6426d9b7f085f4d82a8e24c7ca8f..4f3b8ec7b4912425e04236114be32e6f648aa490 100644 (file)
@@ -30,6 +30,7 @@
 #include "Error.h"
 #include "ExceptionHelpers.h"
 #include "JSArrayBufferViewInlines.h"
+#include "JSArrayIterator.h"
 #include "JSCBuiltins.h"
 #include "JSCJSValueInlines.h"
 #include "JSFunction.h"
index ab019ca87c2c21ba0567ff42fd35e7c0cdab269e..40a92fc5a11dcd44aea2934a534be89824c8965a 100644 (file)
@@ -63,6 +63,7 @@
 #include "JSArrayBuffer.h"
 #include "JSArrayBufferConstructor.h"
 #include "JSArrayBufferPrototype.h"
+#include "JSArrayIterator.h"
 #include "JSBoundFunction.h"
 #include "JSCInlines.h"
 #include "JSCallbackConstructor.h"
@@ -425,7 +426,7 @@ void JSGlobalObject::init(VM& vm)
             init.setPrototype(JS ## type ## ArrayPrototype::create(init.vm, init.global, JS ## type ## ArrayPrototype::createStructure(init.vm, init.global, init.global->m_typedArrayProto.get(init.global)))); \
             init.setStructure(JS ## type ## Array::createStructure(init.vm, init.global, init.prototype)); \
             init.setConstructor(JS ## type ## ArrayConstructor::create(init.vm, init.global, JS ## type ## ArrayConstructor::createStructure(init.vm, init.global, init.global->m_typedArraySuperConstructor.get(init.global)), init.prototype, ASCIILiteral(#type "Array"), typedArrayConstructorAllocate ## type ## ArrayCodeGenerator(init.vm))); \
-            init.global->putDirectWithoutTransition(init.vm, init.vm.propertyNames->builtinNames().type ## ArrayPrivateName(), init.constructor, DontEnum); \
+            init.global->putDirectWithoutTransition(init.vm, init.vm.propertyNames->type ## ArrayPrivateName, init.constructor, DontEnum); \
         });
     FOR_EACH_TYPED_ARRAY_TYPE_EXCLUDING_DATA_VIEW(INIT_TYPED_ARRAY_LATER)
 #undef INIT_TYPED_ARRAY_LATER
@@ -618,8 +619,8 @@ m_ ## lowerName ## Prototype->putDirectWithoutTransition(vm, vm.propertyNames->c
     putDirectWithoutTransition(vm, vm.propertyNames->RangeError, m_rangeErrorConstructor.get(), DontEnum);
     putDirectWithoutTransition(vm, vm.propertyNames->TypeError, m_typeErrorConstructor.get(), DontEnum);
 
-    putDirectWithoutTransition(vm, vm.propertyNames->builtinNames().ObjectPrivateName(), objectConstructor, DontEnum | DontDelete | ReadOnly);
-    putDirectWithoutTransition(vm, vm.propertyNames->builtinNames().ArrayPrivateName(), arrayConstructor, DontEnum | DontDelete | ReadOnly);
+    putDirectWithoutTransition(vm, vm.propertyNames->ObjectPrivateName, objectConstructor, DontEnum | DontDelete | ReadOnly);
+    putDirectWithoutTransition(vm, vm.propertyNames->ArrayPrivateName, arrayConstructor, DontEnum | DontDelete | ReadOnly);
 
 #define PUT_CONSTRUCTOR_FOR_SIMPLE_TYPE(capitalName, lowerName, properName, instanceType, jsName) \
 putDirectWithoutTransition(vm, vm.propertyNames-> jsName, lowerName ## Constructor, DontEnum); \
@@ -652,6 +653,8 @@ putDirectWithoutTransition(vm, vm.propertyNames-> jsName, lowerName ## Construct
     JSFunction* privateFuncTrunc = JSFunction::create(vm, this, 0, String(), mathProtoFuncTrunc, TruncIntrinsic);
 
     JSFunction* privateFuncGetTemplateObject = JSFunction::create(vm, this, 0, String(), getTemplateObject);
+    JSFunction* privateFuncToLength = JSFunction::createBuiltinFunction(vm, globalObjectToLengthCodeGenerator(vm), this);
+    JSFunction* privateFuncToInteger = JSFunction::createBuiltinFunction(vm, globalObjectToIntegerCodeGenerator(vm), this);
     JSFunction* privateFuncTypedArrayLength = JSFunction::create(vm, this, 0, String(), typedArrayViewPrivateFuncLength);
     JSFunction* privateFuncTypedArrayGetOriginalConstructor = JSFunction::create(vm, this, 0, String(), typedArrayViewPrivateFuncGetOriginalConstructor);
     JSFunction* privateFuncTypedArraySort = JSFunction::create(vm, this, 0, String(), typedArrayViewPrivateFuncSort);
@@ -665,6 +668,13 @@ putDirectWithoutTransition(vm, vm.propertyNames-> jsName, lowerName ## Construct
     JSFunction* privateFuncAppendMemcpy = JSFunction::create(vm, this, 0, String(), arrayProtoPrivateFuncAppendMemcpy);
     JSFunction* privateFuncConcatSlowPath = JSFunction::createBuiltinFunction(vm, arrayPrototypeConcatSlowPathCodeGenerator(vm), this);
 
+    JSObject* arrayIteratorPrototype = ArrayIteratorPrototype::create(vm, this, ArrayIteratorPrototype::createStructure(vm, this, m_iteratorPrototype.get()));
+    JSFunction* privateFuncCreateArrayIterator = JSFunction::createBuiltinFunction(vm, arrayPrototypeCreateArrayIteratorConstructorCodeGenerator(vm), this);
+    privateFuncCreateArrayIterator->putDirect(vm, vm.propertyNames->prototype, arrayIteratorPrototype);
+    JSFunction* privateFuncArrayIteratorValueNext = JSFunction::createBuiltinFunction(vm, arrayIteratorPrototypeArrayIteratorValueNextCodeGenerator(vm), this);
+    JSFunction* privateFuncArrayIteratorKeyNext = JSFunction::createBuiltinFunction(vm, arrayIteratorPrototypeArrayIteratorKeyNextCodeGenerator(vm), this);
+    JSFunction* privateFuncArrayIteratorKeyValueNext = JSFunction::createBuiltinFunction(vm, arrayIteratorPrototypeArrayIteratorKeyValueNextCodeGenerator(vm), this);
+
     JSObject* regExpProtoFlagsGetterObject = getGetterById(exec, m_regExpPrototype.get(), vm.propertyNames->flags);
     JSObject* regExpProtoGlobalGetterObject = getGetterById(exec, m_regExpPrototype.get(), vm.propertyNames->global);
     m_regExpProtoGlobalGetter.set(vm, this, regExpProtoGlobalGetterObject);
@@ -679,61 +689,70 @@ 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::createBuiltinFunction(vm, code ## CodeGenerator(vm), this);
-    JSC_FOREACH_BUILTIN_FUNCTION_PRIVATE_GLOBAL_NAME(CREATE_PRIVATE_GLOBAL_FUNCTION)
-#undef CREATE_PRIVATE_GLOBAL_FUNCTION
-
-    JSObject* arrayIteratorPrototype = ArrayIteratorPrototype::create(vm, this, ArrayIteratorPrototype::createStructure(vm, this, m_iteratorPrototype.get()));
-    createArrayIteratorPrivateFunction->putDirect(vm, vm.propertyNames->prototype, arrayIteratorPrototype);
-
-
     GlobalPropertyInfo staticGlobals[] = {
-#define INIT_PRIVATE_GLOBAL(name, code) GlobalPropertyInfo(vm.propertyNames->builtinNames().name ## PrivateName(), name ## PrivateFunction, DontEnum | DontDelete | ReadOnly),
-        JSC_FOREACH_BUILTIN_FUNCTION_PRIVATE_GLOBAL_NAME(INIT_PRIVATE_GLOBAL)
-#undef INIT_PRIVATE_GLOBAL
         GlobalPropertyInfo(vm.propertyNames->NaN, jsNaN(), DontEnum | DontDelete | ReadOnly),
         GlobalPropertyInfo(vm.propertyNames->Infinity, jsNumber(std::numeric_limits<double>::infinity()), DontEnum | DontDelete | ReadOnly),
         GlobalPropertyInfo(vm.propertyNames->undefinedKeyword, jsUndefined(), DontEnum | DontDelete | ReadOnly),
-        GlobalPropertyInfo(vm.propertyNames->builtinNames().ownEnumerablePropertyKeysPrivateName(), JSFunction::create(vm, this, 0, String(), ownEnumerablePropertyKeys), DontEnum | DontDelete | ReadOnly),
-        GlobalPropertyInfo(vm.propertyNames->builtinNames().getTemplateObjectPrivateName(), privateFuncGetTemplateObject, DontEnum | DontDelete | ReadOnly),
-        GlobalPropertyInfo(vm.propertyNames->builtinNames().enqueueJobPrivateName(), JSFunction::create(vm, this, 0, String(), enqueueJob), DontEnum | DontDelete | ReadOnly),
-        GlobalPropertyInfo(vm.propertyNames->builtinNames().ErrorPrivateName(), m_errorConstructor.get(), DontEnum | DontDelete | ReadOnly),
-        GlobalPropertyInfo(vm.propertyNames->builtinNames().RangeErrorPrivateName(), m_rangeErrorConstructor.get(), DontEnum | DontDelete | ReadOnly),
-        GlobalPropertyInfo(vm.propertyNames->builtinNames().TypeErrorPrivateName(), m_typeErrorConstructor.get(), DontEnum | DontDelete | ReadOnly),
-        GlobalPropertyInfo(vm.propertyNames->builtinNames().typedArrayLengthPrivateName(), privateFuncTypedArrayLength, DontEnum | DontDelete | ReadOnly),
-        GlobalPropertyInfo(vm.propertyNames->builtinNames().typedArrayGetOriginalConstructorPrivateName(), privateFuncTypedArrayGetOriginalConstructor, DontEnum | DontDelete | ReadOnly),
-        GlobalPropertyInfo(vm.propertyNames->builtinNames().typedArraySortPrivateName(), privateFuncTypedArraySort, DontEnum | DontDelete | ReadOnly),
-        GlobalPropertyInfo(vm.propertyNames->builtinNames().isBoundFunctionPrivateName(), privateFuncIsBoundFunction, DontEnum | DontDelete | ReadOnly),
-        GlobalPropertyInfo(vm.propertyNames->builtinNames().hasInstanceBoundFunctionPrivateName(), privateFuncHasInstanceBoundFunction, DontEnum | DontDelete | ReadOnly),
-        GlobalPropertyInfo(vm.propertyNames->builtinNames().instanceOfPrivateName(), privateFuncInstanceOf, DontEnum | DontDelete | ReadOnly),
-        GlobalPropertyInfo(vm.propertyNames->builtinNames().BuiltinLogPrivateName(), builtinLog, DontEnum | DontDelete | ReadOnly),
-        GlobalPropertyInfo(vm.propertyNames->builtinNames().NumberPrivateName(), numberConstructor, DontEnum | DontDelete | ReadOnly),
-        GlobalPropertyInfo(vm.propertyNames->builtinNames().RegExpPrivateName(), m_regExpConstructor.get(), DontEnum | DontDelete | ReadOnly),
-        GlobalPropertyInfo(vm.propertyNames->builtinNames().StringPrivateName(), stringConstructor, DontEnum | DontDelete | ReadOnly),
-        GlobalPropertyInfo(vm.propertyNames->builtinNames().absPrivateName(), privateFuncAbs, DontEnum | DontDelete | ReadOnly),
-        GlobalPropertyInfo(vm.propertyNames->builtinNames().floorPrivateName(), privateFuncFloor, DontEnum | DontDelete | ReadOnly),
-        GlobalPropertyInfo(vm.propertyNames->builtinNames().truncPrivateName(), privateFuncTrunc, DontEnum | DontDelete | ReadOnly),
-        GlobalPropertyInfo(vm.propertyNames->builtinNames().isFinitePrivateName(), privateFuncIsFinite, DontEnum | DontDelete | ReadOnly),
-        GlobalPropertyInfo(vm.propertyNames->builtinNames().isNaNPrivateName(), privateFuncIsNaN, DontEnum | DontDelete | ReadOnly),
-        GlobalPropertyInfo(vm.propertyNames->builtinNames().PromisePrivateName(), promiseConstructor, DontEnum | DontDelete | ReadOnly),
-        GlobalPropertyInfo(vm.propertyNames->builtinNames().ReflectPrivateName(), reflectObject, DontEnum | DontDelete | ReadOnly),
-        GlobalPropertyInfo(vm.propertyNames->builtinNames().InternalPromisePrivateName(), internalPromiseConstructor, DontEnum | DontDelete | ReadOnly),
-
-        GlobalPropertyInfo(vm.propertyNames->builtinNames().repeatCharacterPrivateName(), JSFunction::create(vm, this, 2, String(), stringProtoFuncRepeatCharacter), DontEnum | DontDelete | ReadOnly),
-        GlobalPropertyInfo(vm.propertyNames->builtinNames().isSetPrivateName(), JSFunction::create(vm, this, 1, String(), privateFuncIsSet), DontEnum | DontDelete | ReadOnly),
-        GlobalPropertyInfo(vm.propertyNames->builtinNames().SetIteratorPrivateName(), JSFunction::create(vm, this, 1, String(), privateFuncSetIterator), DontEnum | DontDelete | ReadOnly),
-        GlobalPropertyInfo(vm.propertyNames->builtinNames().setIteratorNextPrivateName(), JSFunction::create(vm, this, 0, String(), privateFuncSetIteratorNext), DontEnum | DontDelete | ReadOnly),
-        GlobalPropertyInfo(vm.propertyNames->builtinNames().isMapPrivateName(), JSFunction::create(vm, this, 1, String(), privateFuncIsMap), DontEnum | DontDelete | ReadOnly),
-        GlobalPropertyInfo(vm.propertyNames->builtinNames().isArrayPrivateName(), arrayConstructor->getDirect(vm, vm.propertyNames->isArray), DontEnum | DontDelete | ReadOnly),
-        GlobalPropertyInfo(vm.propertyNames->builtinNames().isArrayConstructorPrivateName(), privateFuncIsArrayConstructor, DontEnum | DontDelete | ReadOnly),
-        GlobalPropertyInfo(vm.propertyNames->builtinNames().concatMemcpyPrivateName(), privateFuncConcatMemcpy, DontEnum | DontDelete | ReadOnly),
-        GlobalPropertyInfo(vm.propertyNames->builtinNames().appendMemcpyPrivateName(), privateFuncAppendMemcpy, DontEnum | DontDelete | ReadOnly),
+        GlobalPropertyInfo(vm.propertyNames->ownEnumerablePropertyKeysPrivateName, JSFunction::create(vm, this, 0, String(), ownEnumerablePropertyKeys), DontEnum | DontDelete | ReadOnly),
+        GlobalPropertyInfo(vm.propertyNames->getTemplateObjectPrivateName, privateFuncGetTemplateObject, DontEnum | DontDelete | ReadOnly),
+        GlobalPropertyInfo(vm.propertyNames->enqueueJobPrivateName, JSFunction::create(vm, this, 0, String(), enqueueJob), DontEnum | DontDelete | ReadOnly),
+        GlobalPropertyInfo(vm.propertyNames->ErrorPrivateName, m_errorConstructor.get(), DontEnum | DontDelete | ReadOnly),
+        GlobalPropertyInfo(vm.propertyNames->RangeErrorPrivateName, m_rangeErrorConstructor.get(), DontEnum | DontDelete | ReadOnly),
+        GlobalPropertyInfo(vm.propertyNames->TypeErrorPrivateName, m_typeErrorConstructor.get(), DontEnum | DontDelete | ReadOnly),
+        GlobalPropertyInfo(vm.propertyNames->typedArrayLengthPrivateName, privateFuncTypedArrayLength, DontEnum | DontDelete | ReadOnly),
+        GlobalPropertyInfo(vm.propertyNames->typedArrayGetOriginalConstructorPrivateName, privateFuncTypedArrayGetOriginalConstructor, DontEnum | DontDelete | ReadOnly),
+        GlobalPropertyInfo(vm.propertyNames->typedArraySortPrivateName, privateFuncTypedArraySort, DontEnum | DontDelete | ReadOnly),
+        GlobalPropertyInfo(vm.propertyNames->isBoundFunctionPrivateName, privateFuncIsBoundFunction, DontEnum | DontDelete | ReadOnly),
+        GlobalPropertyInfo(vm.propertyNames->hasInstanceBoundFunctionPrivateName, privateFuncHasInstanceBoundFunction, DontEnum | DontDelete | ReadOnly),
+        GlobalPropertyInfo(vm.propertyNames->instanceOfPrivateName, privateFuncInstanceOf, DontEnum | DontDelete | ReadOnly),
+        GlobalPropertyInfo(vm.propertyNames->BuiltinLogPrivateName, builtinLog, DontEnum | DontDelete | ReadOnly),
+        GlobalPropertyInfo(vm.propertyNames->NumberPrivateName, numberConstructor, DontEnum | DontDelete | ReadOnly),
+        GlobalPropertyInfo(vm.propertyNames->RegExpPrivateName, m_regExpConstructor.get(), DontEnum | DontDelete | ReadOnly),
+        GlobalPropertyInfo(vm.propertyNames->StringPrivateName, stringConstructor, DontEnum | DontDelete | ReadOnly),
+        GlobalPropertyInfo(vm.propertyNames->absPrivateName, privateFuncAbs, DontEnum | DontDelete | ReadOnly),
+        GlobalPropertyInfo(vm.propertyNames->floorPrivateName, privateFuncFloor, DontEnum | DontDelete | ReadOnly),
+        GlobalPropertyInfo(vm.propertyNames->truncPrivateName, privateFuncTrunc, DontEnum | DontDelete | ReadOnly),
+        GlobalPropertyInfo(vm.propertyNames->isFinitePrivateName, privateFuncIsFinite, DontEnum | DontDelete | ReadOnly),
+        GlobalPropertyInfo(vm.propertyNames->isNaNPrivateName, privateFuncIsNaN, DontEnum | DontDelete | ReadOnly),
+        GlobalPropertyInfo(vm.propertyNames->PromisePrivateName, promiseConstructor, DontEnum | DontDelete | ReadOnly),
+        GlobalPropertyInfo(vm.propertyNames->ReflectPrivateName, reflectObject, DontEnum | DontDelete | ReadOnly),
+        GlobalPropertyInfo(vm.propertyNames->InternalPromisePrivateName, internalPromiseConstructor, DontEnum | DontDelete | ReadOnly),
+
+        GlobalPropertyInfo(vm.propertyNames->repeatCharacterPrivateName, JSFunction::create(vm, this, 2, String(), stringProtoFuncRepeatCharacter), DontEnum | DontDelete | ReadOnly),
+        GlobalPropertyInfo(vm.propertyNames->builtinNames().repeatSlowPathPrivateName(), JSFunction::createBuiltinFunction(vm, stringPrototypeRepeatSlowPathCodeGenerator(vm), this), DontEnum | DontDelete | ReadOnly),
+        GlobalPropertyInfo(vm.propertyNames->builtinNames().repeatCharactersSlowPathPrivateName(), JSFunction::createBuiltinFunction(vm, stringPrototypeRepeatCharactersSlowPathCodeGenerator(vm), this), DontEnum | DontDelete | ReadOnly),
+
+        GlobalPropertyInfo(vm.propertyNames->isSetPrivateName, JSFunction::create(vm, this, 1, String(), privateFuncIsSet), DontEnum | DontDelete | ReadOnly),
+        GlobalPropertyInfo(vm.propertyNames->SetIteratorPrivateName, JSFunction::create(vm, this, 1, String(), privateFuncSetIterator), DontEnum | DontDelete | ReadOnly),
+        GlobalPropertyInfo(vm.propertyNames->setIteratorNextPrivateName, JSFunction::create(vm, this, 0, String(), privateFuncSetIteratorNext), DontEnum | DontDelete | ReadOnly),
+        GlobalPropertyInfo(vm.propertyNames->isMapPrivateName, JSFunction::create(vm, this, 1, String(), privateFuncIsMap), DontEnum | DontDelete | ReadOnly),
+        GlobalPropertyInfo(vm.propertyNames->isArrayPrivateName, arrayConstructor->getDirect(vm, vm.propertyNames->isArray), DontEnum | DontDelete | ReadOnly),
+        GlobalPropertyInfo(vm.propertyNames->isArrayConstructorPrivateName, privateFuncIsArrayConstructor, DontEnum | DontDelete | ReadOnly),
+        GlobalPropertyInfo(vm.propertyNames->concatMemcpyPrivateName, privateFuncConcatMemcpy, DontEnum | DontDelete | ReadOnly),
+        GlobalPropertyInfo(vm.propertyNames->appendMemcpyPrivateName, privateFuncAppendMemcpy, DontEnum | DontDelete | ReadOnly),
         GlobalPropertyInfo(vm.propertyNames->builtinNames().concatSlowPathPrivateName(), privateFuncConcatSlowPath, DontEnum | DontDelete | ReadOnly),
-        GlobalPropertyInfo(vm.propertyNames->builtinNames().MapIteratorPrivateName(), JSFunction::create(vm, this, 1, String(), privateFuncMapIterator), DontEnum | DontDelete | ReadOnly),
-        GlobalPropertyInfo(vm.propertyNames->builtinNames().mapIteratorNextPrivateName(), JSFunction::create(vm, this, 0, String(), privateFuncMapIteratorNext), DontEnum | DontDelete | ReadOnly),
-
+        GlobalPropertyInfo(vm.propertyNames->MapIteratorPrivateName, JSFunction::create(vm, this, 1, String(), privateFuncMapIterator), DontEnum | DontDelete | ReadOnly),
+        GlobalPropertyInfo(vm.propertyNames->mapIteratorNextPrivateName, JSFunction::create(vm, this, 0, String(), privateFuncMapIteratorNext), DontEnum | DontDelete | ReadOnly),
+        GlobalPropertyInfo(vm.propertyNames->builtinNames().arrayIteratorValueNextPrivateName(), privateFuncArrayIteratorValueNext, DontEnum | DontDelete | ReadOnly),
+        GlobalPropertyInfo(vm.propertyNames->builtinNames().arrayIteratorKeyNextPrivateName(), privateFuncArrayIteratorKeyNext, DontEnum | DontDelete | ReadOnly),
+        GlobalPropertyInfo(vm.propertyNames->builtinNames().arrayIteratorKeyValueNextPrivateName(), privateFuncArrayIteratorKeyValueNext, DontEnum | DontDelete | ReadOnly),
+        GlobalPropertyInfo(vm.propertyNames->builtinNames().createArrayIteratorPrivateName(), privateFuncCreateArrayIterator, DontEnum | DontDelete | ReadOnly),
+
+        GlobalPropertyInfo(vm.propertyNames->builtinNames().toLengthPrivateName(), privateFuncToLength, DontEnum | DontDelete | ReadOnly),
+        GlobalPropertyInfo(vm.propertyNames->builtinNames().toIntegerPrivateName(), privateFuncToInteger, DontEnum | DontDelete | ReadOnly),
+        GlobalPropertyInfo(vm.propertyNames->builtinNames().isDictionaryPrivateName(), JSFunction::createBuiltinFunction(vm, globalObjectIsDictionaryCodeGenerator(vm), this), DontEnum | DontDelete | ReadOnly),
+        GlobalPropertyInfo(vm.propertyNames->builtinNames().isPromisePrivateName(), JSFunction::createBuiltinFunction(vm, promiseOperationsIsPromiseCodeGenerator(vm), this), DontEnum | DontDelete | ReadOnly),
+        GlobalPropertyInfo(vm.propertyNames->builtinNames().newPromiseReactionPrivateName(), JSFunction::createBuiltinFunction(vm, promiseOperationsNewPromiseReactionCodeGenerator(vm), this), DontEnum | DontDelete | ReadOnly),
+        GlobalPropertyInfo(vm.propertyNames->builtinNames().newPromiseCapabilityPrivateName(), m_newPromiseCapabilityFunction.get(), DontEnum | DontDelete | ReadOnly),
+        GlobalPropertyInfo(vm.propertyNames->builtinNames().triggerPromiseReactionsPrivateName(), JSFunction::createBuiltinFunction(vm, promiseOperationsTriggerPromiseReactionsCodeGenerator(vm), this), DontEnum | DontDelete | ReadOnly),
+        GlobalPropertyInfo(vm.propertyNames->builtinNames().rejectPromisePrivateName(), JSFunction::createBuiltinFunction(vm, promiseOperationsRejectPromiseCodeGenerator(vm), this), DontEnum | DontDelete | ReadOnly),
+        GlobalPropertyInfo(vm.propertyNames->builtinNames().fulfillPromisePrivateName(), JSFunction::createBuiltinFunction(vm, promiseOperationsFulfillPromiseCodeGenerator(vm), this), DontEnum | DontDelete | ReadOnly),
+        GlobalPropertyInfo(vm.propertyNames->builtinNames().createResolvingFunctionsPrivateName(), JSFunction::createBuiltinFunction(vm, promiseOperationsCreateResolvingFunctionsCodeGenerator(vm), this), DontEnum | DontDelete | ReadOnly),
+        GlobalPropertyInfo(vm.propertyNames->builtinNames().promiseReactionJobPrivateName(), JSFunction::createBuiltinFunction(vm, promiseOperationsPromiseReactionJobCodeGenerator(vm), this), DontEnum | DontDelete | ReadOnly),
+        GlobalPropertyInfo(vm.propertyNames->builtinNames().promiseResolveThenableJobPrivateName(), JSFunction::createBuiltinFunction(vm, promiseOperationsPromiseResolveThenableJobCodeGenerator(vm), this), DontEnum | DontDelete | ReadOnly),
         GlobalPropertyInfo(vm.propertyNames->builtinNames().InspectorInstrumentationPrivateName(), InspectorInstrumentationObject::create(vm, this, InspectorInstrumentationObject::createStructure(vm, this, m_objectPrototype.get())), DontEnum | DontDelete | ReadOnly),
-        GlobalPropertyInfo(vm.propertyNames->builtinNames().MapPrivateName(), mapConstructor, DontEnum | DontDelete | ReadOnly),
+        GlobalPropertyInfo(vm.propertyNames->MapPrivateName, mapConstructor, DontEnum | DontDelete | ReadOnly),
+        GlobalPropertyInfo(vm.propertyNames->builtinNames().generatorResumePrivateName(), JSFunction::createBuiltinFunction(vm, generatorPrototypeGeneratorResumeCodeGenerator(vm), this), DontEnum | DontDelete | ReadOnly),
         GlobalPropertyInfo(vm.propertyNames->builtinNames().thisTimeValuePrivateName(), privateFuncThisTimeValue, DontEnum | DontDelete | ReadOnly),
         GlobalPropertyInfo(vm.propertyNames->builtinNames().thisNumberValuePrivateName(), privateFuncThisNumberValue, DontEnum | DontDelete | ReadOnly),
 #if ENABLE(INTL)
@@ -742,30 +761,36 @@ putDirectWithoutTransition(vm, vm.propertyNames-> jsName, lowerName ## Construct
         GlobalPropertyInfo(vm.propertyNames->builtinNames().NumberFormatPrivateName(), intl->getDirect(vm, vm.propertyNames->NumberFormat), DontEnum | DontDelete | ReadOnly),
 #endif // ENABLE(INTL)
 
-        GlobalPropertyInfo(vm.propertyNames->builtinNames().isConstructorPrivateName(), JSFunction::create(vm, this, 1, String(), esSpecIsConstructor, NoIntrinsic), DontEnum | DontDelete | ReadOnly),
-        GlobalPropertyInfo(vm.propertyNames->builtinNames().isRegExpObjectPrivateName(), JSFunction::create(vm, this, 1, String(), esSpecIsRegExpObject, IsRegExpObjectIntrinsic), DontEnum | DontDelete | ReadOnly),
+        GlobalPropertyInfo(vm.propertyNames->isConstructorPrivateName, JSFunction::create(vm, this, 1, String(), esSpecIsConstructor, NoIntrinsic), DontEnum | DontDelete | ReadOnly),
+        GlobalPropertyInfo(vm.propertyNames->isRegExpObjectPrivateName, JSFunction::create(vm, this, 1, String(), esSpecIsRegExpObject, IsRegExpObjectIntrinsic), DontEnum | DontDelete | ReadOnly),
+        GlobalPropertyInfo(vm.propertyNames->builtinNames().speciesConstructorPrivateName(), JSFunction::createBuiltinFunction(vm, globalObjectSpeciesConstructorCodeGenerator(vm), this), DontEnum | DontDelete | ReadOnly),
 
-        GlobalPropertyInfo(vm.propertyNames->builtinNames().regExpProtoFlagsGetterPrivateName(), regExpProtoFlagsGetterObject, DontEnum | DontDelete | ReadOnly),
-        GlobalPropertyInfo(vm.propertyNames->builtinNames().regExpProtoGlobalGetterPrivateName(), regExpProtoGlobalGetterObject, DontEnum | DontDelete | ReadOnly),
-        GlobalPropertyInfo(vm.propertyNames->builtinNames().regExpProtoIgnoreCaseGetterPrivateName(), regExpProtoIgnoreCaseGetterObject, DontEnum | DontDelete | ReadOnly),
-        GlobalPropertyInfo(vm.propertyNames->builtinNames().regExpProtoMultilineGetterPrivateName(), regExpProtoMultilineGetterObject, DontEnum | DontDelete | ReadOnly),
-        GlobalPropertyInfo(vm.propertyNames->builtinNames().regExpProtoSourceGetterPrivateName(), regExpProtoSourceGetterObject, DontEnum | DontDelete | ReadOnly),
-        GlobalPropertyInfo(vm.propertyNames->builtinNames().regExpProtoStickyGetterPrivateName(), regExpProtoStickyGetterObject, DontEnum | DontDelete | ReadOnly),
-        GlobalPropertyInfo(vm.propertyNames->builtinNames().regExpProtoUnicodeGetterPrivateName(), regExpProtoUnicodeGetterObject, DontEnum | DontDelete | ReadOnly),
+        GlobalPropertyInfo(vm.propertyNames->regExpProtoFlagsGetterPrivateName, regExpProtoFlagsGetterObject, DontEnum | DontDelete | ReadOnly),
+        GlobalPropertyInfo(vm.propertyNames->regExpProtoGlobalGetterPrivateName, regExpProtoGlobalGetterObject, DontEnum | DontDelete | ReadOnly),
+        GlobalPropertyInfo(vm.propertyNames->regExpProtoIgnoreCaseGetterPrivateName, regExpProtoIgnoreCaseGetterObject, DontEnum | DontDelete | ReadOnly),
+        GlobalPropertyInfo(vm.propertyNames->regExpProtoMultilineGetterPrivateName, regExpProtoMultilineGetterObject, DontEnum | DontDelete | ReadOnly),
+        GlobalPropertyInfo(vm.propertyNames->regExpProtoSourceGetterPrivateName, regExpProtoSourceGetterObject, DontEnum | DontDelete | ReadOnly),
+        GlobalPropertyInfo(vm.propertyNames->regExpProtoStickyGetterPrivateName, regExpProtoStickyGetterObject, DontEnum | DontDelete | ReadOnly),
+        GlobalPropertyInfo(vm.propertyNames->regExpProtoUnicodeGetterPrivateName, regExpProtoUnicodeGetterObject, DontEnum | DontDelete | ReadOnly),
 
         // RegExp.prototype helpers.
-        GlobalPropertyInfo(vm.propertyNames->builtinNames().regExpBuiltinExecPrivateName(), builtinRegExpExec, DontEnum | DontDelete | ReadOnly),
-        GlobalPropertyInfo(vm.propertyNames->builtinNames().regExpCreatePrivateName(), JSFunction::create(vm, this, 2, String(), esSpecRegExpCreate, NoIntrinsic), DontEnum | DontDelete | ReadOnly),
-        GlobalPropertyInfo(vm.propertyNames->builtinNames().regExpMatchFastPrivateName(), JSFunction::create(vm, this, 1, String(), regExpProtoFuncMatchFast), DontEnum | DontDelete | ReadOnly),
-        GlobalPropertyInfo(vm.propertyNames->builtinNames().regExpSearchFastPrivateName(), JSFunction::create(vm, this, 1, String(), regExpProtoFuncSearchFast), DontEnum | DontDelete | ReadOnly),
-        GlobalPropertyInfo(vm.propertyNames->builtinNames().regExpSplitFastPrivateName(), JSFunction::create(vm, this, 2, String(), regExpProtoFuncSplitFast), DontEnum | DontDelete | ReadOnly),
-        GlobalPropertyInfo(vm.propertyNames->builtinNames().regExpPrototypeSymbolReplacePrivateName(), m_regExpPrototype->getDirect(vm, vm.propertyNames->replaceSymbol), DontEnum | DontDelete | ReadOnly),
-        GlobalPropertyInfo(vm.propertyNames->builtinNames().regExpTestFastPrivateName(), JSFunction::create(vm, this, 1, String(), regExpProtoFuncTestFast, RegExpTestFastIntrinsic), DontEnum | DontDelete | ReadOnly),
+        GlobalPropertyInfo(vm.propertyNames->regExpBuiltinExecPrivateName, builtinRegExpExec, DontEnum | DontDelete | ReadOnly),
+        GlobalPropertyInfo(vm.propertyNames->regExpCreatePrivateName, JSFunction::create(vm, this, 2, String(), esSpecRegExpCreate, NoIntrinsic), DontEnum | DontDelete | ReadOnly),
+        GlobalPropertyInfo(vm.propertyNames->builtinNames().hasObservableSideEffectsForRegExpMatchPrivateName(), JSFunction::createBuiltinFunction(vm, regExpPrototypeHasObservableSideEffectsForRegExpMatchCodeGenerator(vm), this), DontEnum | DontDelete | ReadOnly),
+        GlobalPropertyInfo(vm.propertyNames->builtinNames().hasObservableSideEffectsForRegExpSplitPrivateName(), JSFunction::createBuiltinFunction(vm, regExpPrototypeHasObservableSideEffectsForRegExpSplitCodeGenerator(vm), this), DontEnum | DontDelete | ReadOnly),
+        GlobalPropertyInfo(vm.propertyNames->builtinNames().advanceStringIndexPrivateName(), JSFunction::createBuiltinFunction(vm, regExpPrototypeAdvanceStringIndexCodeGenerator(vm), this), DontEnum | DontDelete | ReadOnly),
+        GlobalPropertyInfo(vm.propertyNames->builtinNames().regExpExecPrivateName(), JSFunction::createBuiltinFunction(vm, regExpPrototypeRegExpExecCodeGenerator(vm), this), DontEnum | DontDelete | ReadOnly),
+        GlobalPropertyInfo(vm.propertyNames->regExpMatchFastPrivateName, JSFunction::create(vm, this, 1, String(), regExpProtoFuncMatchFast), DontEnum | DontDelete | ReadOnly),
+        GlobalPropertyInfo(vm.propertyNames->regExpSearchFastPrivateName, JSFunction::create(vm, this, 1, String(), regExpProtoFuncSearchFast), DontEnum | DontDelete | ReadOnly),
+        GlobalPropertyInfo(vm.propertyNames->regExpSplitFastPrivateName, JSFunction::create(vm, this, 2, String(), regExpProtoFuncSplitFast), DontEnum | DontDelete | ReadOnly),
+        GlobalPropertyInfo(vm.propertyNames->regExpPrototypeSymbolReplacePrivateName, m_regExpPrototype->getDirect(vm, vm.propertyNames->replaceSymbol), DontEnum | DontDelete | ReadOnly),
+        GlobalPropertyInfo(vm.propertyNames->regExpTestFastPrivateName, JSFunction::create(vm, this, 1, String(), regExpProtoFuncTestFast, RegExpTestFastIntrinsic), DontEnum | DontDelete | ReadOnly),
 
         // String.prototype helpers.
-        GlobalPropertyInfo(vm.propertyNames->builtinNames().stringIncludesInternalPrivateName(), JSFunction::create(vm, this, 1, String(), builtinStringIncludesInternal), DontEnum | DontDelete | ReadOnly),
-        GlobalPropertyInfo(vm.propertyNames->builtinNames().stringSplitFastPrivateName(), JSFunction::create(vm, this, 2, String(), stringProtoFuncSplitFast), DontEnum | DontDelete | ReadOnly),
-        GlobalPropertyInfo(vm.propertyNames->builtinNames().stringSubstrInternalPrivateName(), JSFunction::create(vm, this, 2, String(), builtinStringSubstrInternal), DontEnum | DontDelete | ReadOnly),
+        GlobalPropertyInfo(vm.propertyNames->builtinNames().hasObservableSideEffectsForStringReplacePrivateName(), JSFunction::createBuiltinFunction(vm, stringPrototypeHasObservableSideEffectsForStringReplaceCodeGenerator(vm), this), DontEnum | DontDelete | ReadOnly),
+        GlobalPropertyInfo(vm.propertyNames->stringIncludesInternalPrivateName, JSFunction::create(vm, this, 1, String(), builtinStringIncludesInternal), DontEnum | DontDelete | ReadOnly),
+        GlobalPropertyInfo(vm.propertyNames->stringSplitFastPrivateName, JSFunction::create(vm, this, 2, String(), stringProtoFuncSplitFast), DontEnum | DontDelete | ReadOnly),
+        GlobalPropertyInfo(vm.propertyNames->stringSubstrInternalPrivateName, JSFunction::create(vm, this, 2, String(), builtinStringSubstrInternal), DontEnum | DontDelete | ReadOnly),
     };
     addStaticGlobals(staticGlobals, WTF_ARRAY_LENGTH(staticGlobals));
     
index aba75aa2583c4c3e5d30f93bf2aa604a679586db..a3240550c03a71190a9200d8b6ff5744fe9dcc52 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2015-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2015 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
index 8a27d91e7556998a7279ef83fe6608d434bc0e1e..fefdecdf03b64e6df3b4100d61b6a447cfaf2d8b 100644 (file)
@@ -46,7 +46,7 @@ JSInternalPromiseDeferred* JSInternalPromiseDeferred::create(ExecState* exec, JS
 
     JSValue deferred = newPromiseCapability(exec, globalObject, globalObject->internalPromiseConstructor());
 
-    JSValue promise = deferred.get(exec, vm.propertyNames->builtinNames().promisePrivateName());
+    JSValue promise = deferred.get(exec, vm.propertyNames->promisePrivateName);
     ASSERT(promise.inherits(JSInternalPromise::info()));
     JSValue resolve = deferred.get(exec, vm.propertyNames->builtinNames().resolvePrivateName());
     JSValue reject = deferred.get(exec, vm.propertyNames->builtinNames().rejectPrivateName());
index 0202e179cf473c87753416daeee4a7582ddadeab..56e2f5aef92013902fb2f716c72db456fbb601c6 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2013, 2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2013 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -26,7 +26,6 @@
 #include "config.h"
 #include "JSPromise.h"
 
-#include "BuiltinNames.h"
 #include "Error.h"
 #include "JSCJSValueInlines.h"
 #include "JSCellInlines.h"
@@ -59,10 +58,10 @@ JSPromise::JSPromise(VM& vm, Structure* structure)
 void JSPromise::finishCreation(VM& vm)
 {
     Base::finishCreation(vm);
-    putDirect(vm, vm.propertyNames->builtinNames().promiseStatePrivateName(), jsNumber(static_cast<unsigned>(Status::Pending)));
-    putDirect(vm, vm.propertyNames->builtinNames().promiseFulfillReactionsPrivateName(), jsUndefined());
-    putDirect(vm, vm.propertyNames->builtinNames().promiseRejectReactionsPrivateName(), jsUndefined());
-    putDirect(vm, vm.propertyNames->builtinNames().promiseResultPrivateName(), jsUndefined());
+    putDirect(vm, vm.propertyNames->promiseStatePrivateName, jsNumber(static_cast<unsigned>(Status::Pending)));
+    putDirect(vm, vm.propertyNames->promiseFulfillReactionsPrivateName, jsUndefined());
+    putDirect(vm, vm.propertyNames->promiseRejectReactionsPrivateName, jsUndefined());
+    putDirect(vm, vm.propertyNames->promiseResultPrivateName, jsUndefined());
 }
 
 void JSPromise::initialize(ExecState* exec, JSGlobalObject* globalObject, JSValue executor)
@@ -79,14 +78,14 @@ void JSPromise::initialize(ExecState* exec, JSGlobalObject* globalObject, JSValu
 
 auto JSPromise::status(VM& vm) const -> Status
 {
-    JSValue value = getDirect(vm, vm.propertyNames->builtinNames().promiseStatePrivateName());
+    JSValue value = getDirect(vm, vm.propertyNames->promiseStatePrivateName);
     ASSERT(value.isUInt32());
     return static_cast<Status>(value.asUInt32());
 }
 
 JSValue JSPromise::result(VM& vm) const
 {
-    return getDirect(vm, vm.propertyNames->builtinNames().promiseResultPrivateName());
+    return getDirect(vm, vm.propertyNames->promiseResultPrivateName);
 }
 
 } // namespace JSC
index 65d723876a07cb4161cb59ce624dbaf2ad0b637b..0aad3707161d44a5d5ab082cf5f32275bb097292 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2013, 2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2013 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -59,7 +59,7 @@ JSPromiseDeferred* JSPromiseDeferred::create(ExecState* exec, JSGlobalObject* gl
 
     JSValue deferred = newPromiseCapability(exec, globalObject, globalObject->promiseConstructor());
 
-    JSValue promise = deferred.get(exec, vm.propertyNames->builtinNames().promisePrivateName());
+    JSValue promise = deferred.get(exec, vm.propertyNames->promisePrivateName);
     ASSERT(promise.inherits(JSPromise::info()));
     JSValue resolve = deferred.get(exec, vm.propertyNames->builtinNames().resolvePrivateName());
     JSValue reject = deferred.get(exec, vm.propertyNames->builtinNames().rejectPrivateName());
index 7bfd8a9a47b15e687ce9c6a737b4fbbcae90f611..c6fede7adaf1005e16c1b744c227e06e63dfcbc4 100644 (file)
@@ -1,6 +1,5 @@
 /*
  * Copyright (C) 2015 Yusuke Suzuki <utatane.tea@gmail.com>.
- * Copyright (C) 2016 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -27,7 +26,6 @@
 #include "config.h"
 #include "JSStringIterator.h"
 
-#include "BuiltinNames.h"
 #include "JSCJSValueInlines.h"
 #include "JSCellInlines.h"
 #include "StructureInlines.h"
@@ -40,23 +38,23 @@ void JSStringIterator::finishCreation(VM& vm, JSGlobalObject*, JSString* iterate
 {
     Base::finishCreation(vm);
     ASSERT(inherits(info()));
-    putDirect(vm, vm.propertyNames->builtinNames().iteratedStringPrivateName(), iteratedString);
-    putDirect(vm, vm.propertyNames->builtinNames().stringIteratorNextIndexPrivateName(), jsNumber(0));
+    putDirect(vm, vm.propertyNames->iteratedStringPrivateName, iteratedString);
+    putDirect(vm, vm.propertyNames->stringIteratorNextIndexPrivateName, jsNumber(0));
 }
 
 JSValue JSStringIterator::iteratedValue(ExecState* exec) const
 {
-    return getDirect(exec->vm(), exec->vm().propertyNames->builtinNames().iteratedStringPrivateName());
+    return getDirect(exec->vm(), exec->vm().propertyNames->iteratedStringPrivateName);
 }
 
 JSStringIterator* JSStringIterator::clone(ExecState* exec)
 {
     VM& vm = exec->vm();
-    JSValue iteratedString = getDirect(vm, vm.propertyNames->builtinNames().iteratedStringPrivateName());
-    JSValue nextIndex = getDirect(vm, vm.propertyNames->builtinNames().stringIteratorNextIndexPrivateName());
+    JSValue iteratedString = getDirect(vm, vm.propertyNames->iteratedStringPrivateName);
+    JSValue nextIndex = getDirect(vm, vm.propertyNames->stringIteratorNextIndexPrivateName);
 
     auto clone = JSStringIterator::create(exec, exec->callee()->globalObject()->stringIteratorStructure(), asString(iteratedString));
-    clone->putDirect(vm, vm.propertyNames->builtinNames().stringIteratorNextIndexPrivateName(), nextIndex);
+    clone->putDirect(vm, vm.propertyNames->stringIteratorNextIndexPrivateName, nextIndex);
     return clone;
 }
 
index a7f510bab45fa12b7a67ec3ffddf5034cef551f6..4b630c2d7c9cd34afc6dda6fd6f42c243dc7aada 100644 (file)
@@ -78,8 +78,8 @@ void MapPrototype::finishCreation(VM& vm, JSGlobalObject* globalObject)
     JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->builtinNames().valuesPublicName(), mapProtoFuncValues, DontEnum, 0);
 
     // Private get / set operations.
-    JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->builtinNames().getPrivateName(), mapProtoFuncGet, DontEnum, 1);
-    JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->builtinNames().setPrivateName(), mapProtoFuncSet, DontEnum, 2);
+    JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->getPrivateName, mapProtoFuncGet, DontEnum, 1);
+    JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->setPrivateName, mapProtoFuncSet, DontEnum, 2);
 
     JSFunction* entries = JSFunction::create(vm, globalObject, 0, vm.propertyNames->builtinNames().entriesPublicName().string(), mapProtoFuncEntries);
     putDirectWithoutTransition(vm, vm.propertyNames->builtinNames().entriesPublicName(), entries, DontEnum);
index 3c293fbb664f566048fb88cc35df672eb9a03d41..08da1dbfad223f595d53d9215f196c13a52f193e 100644 (file)
@@ -21,7 +21,6 @@
 #include "config.h"
 #include "ObjectConstructor.h"
 
-#include "BuiltinNames.h"
 #include "ButterflyInlines.h"
 #include "CopiedSpaceInlines.h"
 #include "Error.h"
@@ -100,10 +99,10 @@ void ObjectConstructor::finishCreation(VM& vm, JSGlobalObject* globalObject, Obj
     // no. of arguments for constructor
     putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(1), ReadOnly | DontEnum | DontDelete);
 
-    JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->builtinNames().createPrivateName(), objectConstructorCreate, DontEnum, 2);
-    JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->builtinNames().definePropertyPrivateName(), objectConstructorDefineProperty, DontEnum, 3);
-    JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->builtinNames().getPrototypeOfPrivateName(), objectConstructorGetPrototypeOf, DontEnum, 1);
-    JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->builtinNames().getOwnPropertyNamesPrivateName(), objectConstructorGetOwnPropertyNames, DontEnum, 1);
+    JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->createPrivateName, objectConstructorCreate, DontEnum, 2);
+    JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->definePropertyPrivateName, objectConstructorDefineProperty, DontEnum, 3);
+    JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->getPrototypeOfPrivateName, objectConstructorGetPrototypeOf, DontEnum, 1);
+    JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->getOwnPropertyNamesPrivateName, objectConstructorGetOwnPropertyNames, DontEnum, 1);
 }
 
 JSFunction* ObjectConstructor::addDefineProperty(ExecState* exec, JSGlobalObject* globalObject)
index 175122f5a01f33c5fa266a968d53cf85452fef92..0ac320f2e88caddc995ddb2e70e2a662bdbadc16 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2015-2016 Apple Inc. All Rights Reserved.
+ * Copyright (C) 2015 Apple Inc. All Rights Reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -26,7 +26,6 @@
 #include "config.h"
 #include "ReflectObject.h"
 
-#include "BuiltinNames.h"
 #include "JSCInlines.h"
 #include "JSGlobalObjectFunctions.h"
 #include "JSPropertyNameIterator.h"
@@ -86,8 +85,8 @@ void ReflectObject::finishCreation(VM& vm, JSGlobalObject* globalObject)
     Base::finishCreation(vm);
     ASSERT(inherits(info()));
 
-    JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->builtinNames().ownKeysPrivateName(), reflectObjectOwnKeys, DontEnum | DontDelete | ReadOnly, 1);
-    JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->builtinNames().getOwnPropertyDescriptorPrivateName(), reflectObjectGetOwnPropertyDescriptor, DontEnum | DontDelete | ReadOnly, 2);
+    JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->ownKeysPrivateName, reflectObjectOwnKeys, DontEnum | DontDelete | ReadOnly, 1);
+    JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->getOwnPropertyDescriptorPrivateName, reflectObjectGetOwnPropertyDescriptor, DontEnum | DontDelete | ReadOnly, 2);
 }
 
 // ------------------------------ Functions --------------------------------
index a7ba7c931c308ce3840b7dbce0cfa535502e40ed..4699182468e93c9b305c3ba4c41d2442694b0b80 100644 (file)
@@ -23,7 +23,6 @@
 #include "config.h"
 #include "StringPrototype.h"
 
-#include "BuiltinNames.h"
 #include "ButterflyInlines.h"
 #include "CachedCall.h"
 #include "CopiedSpaceInlines.h"
@@ -138,8 +137,8 @@ void StringPrototype::finishCreation(VM& vm, JSGlobalObject* globalObject, JSStr
     JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("concat", stringProtoFuncConcat, DontEnum, 1);
     JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("indexOf", stringProtoFuncIndexOf, DontEnum, 1);
     JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("lastIndexOf", stringProtoFuncLastIndexOf, DontEnum, 1);
-    JSC_NATIVE_INTRINSIC_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->builtinNames().replaceUsingRegExpPrivateName(), stringProtoFuncReplaceUsingRegExp, DontEnum, 2, StringPrototypeReplaceRegExpIntrinsic);
-    JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->builtinNames().replaceUsingStringSearchPrivateName(), stringProtoFuncReplaceUsingStringSearch, DontEnum, 2);
+    JSC_NATIVE_INTRINSIC_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->replaceUsingRegExpPrivateName, stringProtoFuncReplaceUsingRegExp, DontEnum, 2, StringPrototypeReplaceRegExpIntrinsic);
+    JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->replaceUsingStringSearchPrivateName, stringProtoFuncReplaceUsingStringSearch, DontEnum, 2);
     JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("slice", stringProtoFuncSlice, DontEnum, 2);
     JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("substr", stringProtoFuncSubstr, DontEnum, 2);
     JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("substring", stringProtoFuncSubstring, DontEnum, 2);
@@ -176,7 +175,7 @@ void StringPrototype::finishCreation(VM& vm, JSGlobalObject* globalObject, JSStr
     JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("normalize", stringProtoFuncNormalize, DontEnum, 1);
     JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->iteratorSymbol, stringProtoFuncIterator, DontEnum, 0);
 
-    JSC_NATIVE_INTRINSIC_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->builtinNames().charCodeAtPrivateName(), stringProtoFuncCharCodeAt, DontEnum, 1, CharCodeAtIntrinsic);
+    JSC_NATIVE_INTRINSIC_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->charCodeAtPrivateName, stringProtoFuncCharCodeAt, DontEnum, 1, CharCodeAtIntrinsic);
 
     // The constructor will be added later, after StringConstructor has been built
     putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(0), DontDelete | ReadOnly | DontEnum);
index f3fc33346b3494936e5910c10cda8d6fd35665a1..7af1f9fb86885dc014d310100e0040492152534a 100644 (file)
@@ -29,6 +29,7 @@
 #include "GCIncomingRefCountedInlines.h"
 #include "GenericTypedArrayViewInlines.h"
 #include "JSArrayBufferViewInlines.h"
+#include "JSGenericTypedArrayViewConstructorInlines.h"
 #include "JSGenericTypedArrayViewInlines.h"
 #include "JSGenericTypedArrayViewPrototypeInlines.h"
 
index c45957104be3e4cde721d87dd3cc07ab51acee68..cc1c81884f02b9ec9187d01cb3c2386bccd65798 100644 (file)
@@ -1,3 +1,18 @@
+2016-06-20  Commit Queue  <commit-queue@webkit.org>
+
+        Unreviewed, rolling out r202248.
+        https://bugs.webkit.org/show_bug.cgi?id=158960
+
+        breaks builds on the simulator (Requested by keith_mi_ on
+        #webkit).
+
+        Reverted changeset:
+
+        "It should be easy to add a private global helper function for
+        builtins"
+        https://bugs.webkit.org/show_bug.cgi?id=158893
+        http://trac.webkit.org/changeset/202248
+
 2016-06-20  Jeremy Jones  <jeremyj@apple.com>
 
         Adopt commitPriority to get rid of the 2 AVPL solution for PiP
index 71e4e329b88b5e83c0ae3e30df23cd7208777ab4..c09ce023574c76727dc24450cbb2b99ba0ff98ca 100644 (file)
@@ -28,7 +28,6 @@
 
 #if ENABLE(MEDIA_SOURCE)
 
-#include <JavaScriptCore/JSCJSValueInlines.h>
 #include <JavaScriptCore/TypedArrayInlines.h>
 #include <runtime/ArrayBuffer.h>
 #include <runtime/DataView.h>