2018-01-05 13:07:20 -08:00

4771 lines
186 KiB
C++

/*
* Copyright (c) 2014, 2015, 2016 Apple Inc. All rights reserved.
* Copyright (c) 2014, 2017 -2017 Apple Inc. All rights reserved.
* Copyright (c) 2015 Andy VanWagoner <thetalecrafter@gmail.com>.
* Copyright (c) 2015 Jordan Harband. All rights reserved.
* Copyright (c) 2015, 2016 -2016 Apple Inc. All rights reserved.
* Copyright (c) 2015, 2016 -2016 Yusuke Suzuki <utatane.tea@gmail.com>.
* Copyright (c) 2015, 2016 Yusuke Suzuki <utatane.tea@gmail.com>.
* Copyright (c) 2016 Caitlin Potter <caitp@igalia.com>.
* Copyright (c) 2016 Oleksandr Skachkov <gskachkov@gmail.com>.
* Copyright (c) 2016 Yusuke Suzuki <utatane.tea@gmail.com>
* Copyright (c) 2017 Caio Lima <ticaiolima@gmail.com>.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*
*/
// DO NOT EDIT THIS FILE. It is automatically generated from JavaScript files for
// builtins by the script: Source/JavaScriptCore/Scripts/generate-js-builtins.py
#include "config.h"
#include "JSCBuiltins.h"
#include "BuiltinExecutables.h"
#include "HeapInlines.h"
#include "Intrinsic.h"
#include "JSCellInlines.h"
#include "UnlinkedFunctionExecutable.h"
#include "VM.h"
namespace JSC {
const JSC::ConstructAbility s_arrayConstructorFromCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const int s_arrayConstructorFromCodeLength = 1891;
static const JSC::Intrinsic s_arrayConstructorFromCodeIntrinsic = JSC::NoIntrinsic;
const char* s_arrayConstructorFromCode =
"(function (items )\n" \
"{\n" \
" \"use strict\";\n" \
"\n" \
" var thisObj = this;\n" \
"\n" \
" var mapFn = @argument(1);\n" \
"\n" \
" var thisArg;\n" \
"\n" \
" if (mapFn !== @undefined) {\n" \
" if (typeof mapFn !== \"function\")\n" \
" @throwTypeError(\"Array.from requires that the second argument, when provided, be a function\");\n" \
"\n" \
" thisArg = @argument(2);\n" \
" }\n" \
"\n" \
" if (items == null)\n" \
" @throwTypeError(\"Array.from requires an array-like object - not null or undefined\");\n" \
"\n" \
" var iteratorMethod = items.@iteratorSymbol;\n" \
" if (iteratorMethod != null) {\n" \
" if (typeof iteratorMethod !== \"function\")\n" \
" @throwTypeError(\"Array.from requires that the property of the first argument, items[Symbol.iterator], when exists, be a function\");\n" \
"\n" \
" var result = @isConstructor(thisObj) ? new thisObj() : [];\n" \
"\n" \
" var k = 0;\n" \
" var iterator = iteratorMethod.@call(items);\n" \
"\n" \
" //\n" \
" //\n" \
" //\n" \
" var wrapper = {}\n" \
" wrapper.@iteratorSymbol = function() { return iterator; };\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" \
" else\n" \
" @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" \
" var result = @isConstructor(thisObj) ? new thisObj(arrayLikeLength) : @newArrayWithSize(arrayLikeLength);\n" \
"\n" \
" var k = 0;\n" \
" while (k < arrayLikeLength) {\n" \
" var value = arrayLike[k];\n" \
" if (mapFn)\n" \
" @putByValDirect(result, k, thisArg === @undefined ? mapFn(value, k) : mapFn.@call(thisArg, value, k));\n" \
" else\n" \
" @putByValDirect(result, k, value);\n" \
" k += 1;\n" \
" }\n" \
"\n" \
" result.length = arrayLikeLength;\n" \
" return result;\n" \
"})\n" \
;
const JSC::ConstructAbility s_arrayConstructorIsArrayCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const int s_arrayConstructorIsArrayCodeLength = 202;
static const JSC::Intrinsic s_arrayConstructorIsArrayCodeIntrinsic = JSC::NoIntrinsic;
const char* s_arrayConstructorIsArrayCode =
"(function (array)\n" \
"{\n" \
" \"use strict\";\n" \
"\n" \
" if (@isJSArray(array) || @isDerivedArray(array))\n" \
" return true;\n" \
" if (!@isProxyObject(array))\n" \
" return false;\n" \
" return @isArraySlow(array);\n" \
"})\n" \
;
const JSC::ConstructAbility s_arrayIteratorPrototypeArrayIteratorValueNextCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const int s_arrayIteratorPrototypeArrayIteratorValueNextCodeLength = 493;
static const JSC::Intrinsic s_arrayIteratorPrototypeArrayIteratorValueNextCodeIntrinsic = JSC::NoIntrinsic;
const char* s_arrayIteratorPrototypeArrayIteratorValueNextCode =
"(function ()\n" \
"{\n" \
" \"use strict\";\n" \
" var done = true;\n" \
" var value;\n" \
"\n" \
" var array = this.@iteratedObject;\n" \
" if (!this.@arrayIteratorIsDone) {\n" \
" var index = this.@arrayIteratorNextIndex;\n" \
" var length = array.length >>> 0;\n" \
" if (index >= length) {\n" \
" this.@arrayIteratorIsDone = true;\n" \
" } else {\n" \
" this.@arrayIteratorNextIndex = index + 1;\n" \
" done = false;\n" \
" value = array[index];\n" \
" }\n" \
" }\n" \
"\n" \
" return { done, value };\n" \
"})\n" \
;
const JSC::ConstructAbility s_arrayIteratorPrototypeNextCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const int s_arrayIteratorPrototypeNextCodeLength = 372;
static const JSC::Intrinsic s_arrayIteratorPrototypeNextCodeIntrinsic = JSC::NoIntrinsic;
const char* s_arrayIteratorPrototypeNextCode =
"(function ()\n" \
"{\n" \
" \"use strict\";\n" \
"\n" \
" if (this == null)\n" \
" @throwTypeError(\"%ArrayIteratorPrototype%.next requires that |this| not be null or undefined\");\n" \
"\n" \
" let next = this.@arrayIteratorNext;\n" \
" if (next === @undefined)\n" \
" @throwTypeError(\"%ArrayIteratorPrototype%.next requires that |this| be an Array Iterator instance\");\n" \
"\n" \
" return next.@call(this);\n" \
"})\n" \
;
const JSC::ConstructAbility s_arrayIteratorPrototypeArrayIteratorKeyNextCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const int s_arrayIteratorPrototypeArrayIteratorKeyNextCodeLength = 486;
static const JSC::Intrinsic s_arrayIteratorPrototypeArrayIteratorKeyNextCodeIntrinsic = JSC::NoIntrinsic;
const char* s_arrayIteratorPrototypeArrayIteratorKeyNextCode =
"(function ()\n" \
"{\n" \
" \"use strict\";\n" \
" var done = true;\n" \
" var value;\n" \
"\n" \
" var array = this.@iteratedObject;\n" \
" if (!this.@arrayIteratorIsDone) {\n" \
" var index = this.@arrayIteratorNextIndex;\n" \
" var length = array.length >>> 0;\n" \
" if (index >= length) {\n" \
" this.@arrayIteratorIsDone = true;\n" \
" } else {\n" \
" this.@arrayIteratorNextIndex = index + 1;\n" \
" done = false;\n" \
" value = index;\n" \
" }\n" \
" }\n" \
"\n" \
" return { done, value };\n" \
"})\n" \
;
const JSC::ConstructAbility s_arrayIteratorPrototypeArrayIteratorKeyValueNextCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const int s_arrayIteratorPrototypeArrayIteratorKeyValueNextCodeLength = 504;
static const JSC::Intrinsic s_arrayIteratorPrototypeArrayIteratorKeyValueNextCodeIntrinsic = JSC::NoIntrinsic;
const char* s_arrayIteratorPrototypeArrayIteratorKeyValueNextCode =
"(function ()\n" \
"{\n" \
" \"use strict\";\n" \
" var done = true;\n" \
" var value;\n" \
"\n" \
" var array = this.@iteratedObject;\n" \
" if (!this.@arrayIteratorIsDone) {\n" \
" var index = this.@arrayIteratorNextIndex;\n" \
" var length = array.length >>> 0;\n" \
" if (index >= length) {\n" \
" this.@arrayIteratorIsDone = true;\n" \
" } else {\n" \
" this.@arrayIteratorNextIndex = index + 1;\n" \
" done = false;\n" \
" value = [ index, array[index] ];\n" \
" }\n" \
" }\n" \
"\n" \
" return { done, value };\n" \
"})\n" \
;
const JSC::ConstructAbility s_arrayPrototypeCreateArrayIteratorConstructorCodeConstructAbility = JSC::ConstructAbility::CanConstruct;
const int s_arrayPrototypeCreateArrayIteratorConstructorCodeLength = 262;
static const JSC::Intrinsic s_arrayPrototypeCreateArrayIteratorConstructorCodeIntrinsic = JSC::NoIntrinsic;
const char* s_arrayPrototypeCreateArrayIteratorConstructorCode =
"(function (iteratedObject, kind, iterationFunction)\n" \
"{\n" \
" this.@iteratedObject = iteratedObject;\n" \
" this.@arrayIteratorKind = kind;\n" \
" this.@arrayIteratorNextIndex = 0;\n" \
" this.@arrayIteratorNext = iterationFunction;\n" \
" this.@arrayIteratorIsDone = false;\n" \
"})\n" \
;
const JSC::ConstructAbility s_arrayPrototypeValuesCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const int s_arrayPrototypeValuesCodeLength = 267;
static const JSC::Intrinsic s_arrayPrototypeValuesCodeIntrinsic = JSC::NoIntrinsic;
const char* s_arrayPrototypeValuesCode =
"(function ()\n" \
"{\n" \
" \"use strict\";\n" \
"\n" \
" if (this === null || this === @undefined)\n" \
" @throwTypeError(\"Array.prototype.values requires that |this| not be null or undefined\");\n" \
"\n" \
" return new @createArrayIterator(@Object(this), \"value\", @arrayIteratorValueNext);\n" \
"})\n" \
;
const JSC::ConstructAbility s_arrayPrototypeKeysCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const int s_arrayPrototypeKeysCodeLength = 261;
static const JSC::Intrinsic s_arrayPrototypeKeysCodeIntrinsic = JSC::NoIntrinsic;
const char* s_arrayPrototypeKeysCode =
"(function ()\n" \
"{\n" \
" \"use strict\";\n" \
"\n" \
" if (this === null || this === @undefined)\n" \
" @throwTypeError(\"Array.prototype.keys requires that |this| not be null or undefined\");\n" \
"\n" \
" return new @createArrayIterator(@Object(this), \"key\", @arrayIteratorKeyNext);\n" \
"})\n" \
;
const JSC::ConstructAbility s_arrayPrototypeEntriesCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const int s_arrayPrototypeEntriesCodeLength = 275;
static const JSC::Intrinsic s_arrayPrototypeEntriesCodeIntrinsic = JSC::NoIntrinsic;
const char* s_arrayPrototypeEntriesCode =
"(function ()\n" \
"{\n" \
" \"use strict\";\n" \
"\n" \
" if (this === null || this === @undefined)\n" \
" @throwTypeError(\"Array.prototype.entries requires that |this| not be null or undefined\");\n" \
"\n" \
" return new @createArrayIterator(@Object(this), \"key+value\", @arrayIteratorKeyValueNext);\n" \
"})\n" \
;
const JSC::ConstructAbility s_arrayPrototypeReduceCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const int s_arrayPrototypeReduceCodeLength = 1032;
static const JSC::Intrinsic s_arrayPrototypeReduceCodeIntrinsic = JSC::NoIntrinsic;
const char* s_arrayPrototypeReduceCode =
"(function (callback )\n" \
"{\n" \
" \"use strict\";\n" \
"\n" \
" if (this === null || this === @undefined)\n" \
" @throwTypeError(\"Array.prototype.reduce requires that |this| not be null or undefined\");\n" \
"\n" \
" var array = @Object(this);\n" \
" var length = @toLength(array.length);\n" \
"\n" \
" if (typeof callback !== \"function\")\n" \
" @throwTypeError(\"Array.prototype.reduce callback must be a function\");\n" \
"\n" \
" var argumentCount = @argumentCount();\n" \
" if (length === 0 && argumentCount < 2)\n" \
" @throwTypeError(\"reduce of empty array with no initial value\");\n" \
"\n" \
" var accumulator, k = 0;\n" \
" if (argumentCount > 1)\n" \
" accumulator = @argument(1);\n" \
" else {\n" \
" while (k < length && !(k in array))\n" \
" k += 1;\n" \
" if (k >= length)\n" \
" @throwTypeError(\"reduce of empty array with no initial value\");\n" \
" accumulator = array[k++];\n" \
" }\n" \
"\n" \
" while (k < length) {\n" \
" if (k in array)\n" \
" accumulator = callback.@call(@undefined, accumulator, array[k], k, array);\n" \
" k += 1;\n" \
" }\n" \
" return accumulator;\n" \
"})\n" \
;
const JSC::ConstructAbility s_arrayPrototypeReduceRightCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const int s_arrayPrototypeReduceRightCodeLength = 1047;
static const JSC::Intrinsic s_arrayPrototypeReduceRightCodeIntrinsic = JSC::NoIntrinsic;
const char* s_arrayPrototypeReduceRightCode =
"(function (callback )\n" \
"{\n" \
" \"use strict\";\n" \
"\n" \
" if (this === null || this === @undefined)\n" \
" @throwTypeError(\"Array.prototype.reduceRight requires that |this| not be null or undefined\");\n" \
"\n" \
" var array = @Object(this);\n" \
" var length = @toLength(array.length);\n" \
"\n" \
" if (typeof callback !== \"function\")\n" \
" @throwTypeError(\"Array.prototype.reduceRight callback must be a function\");\n" \
"\n" \
" var argumentCount = @argumentCount();\n" \
" if (length === 0 && argumentCount < 2)\n" \
" @throwTypeError(\"reduceRight of empty array with no initial value\");\n" \
"\n" \
" var accumulator, k = length - 1;\n" \
" if (argumentCount > 1)\n" \
" accumulator = @argument(1);\n" \
" else {\n" \
" while (k >= 0 && !(k in array))\n" \
" k -= 1;\n" \
" if (k < 0)\n" \
" @throwTypeError(\"reduceRight of empty array with no initial value\");\n" \
" accumulator = array[k--];\n" \
" }\n" \
"\n" \
" while (k >= 0) {\n" \
" if (k in array)\n" \
" accumulator = callback.@call(@undefined, accumulator, array[k], k, array);\n" \
" k -= 1;\n" \
" }\n" \
" return accumulator;\n" \
"})\n" \
;
const JSC::ConstructAbility s_arrayPrototypeEveryCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const int s_arrayPrototypeEveryCodeLength = 627;
static const JSC::Intrinsic s_arrayPrototypeEveryCodeIntrinsic = JSC::NoIntrinsic;
const char* s_arrayPrototypeEveryCode =
"(function (callback )\n" \
"{\n" \
" \"use strict\";\n" \
"\n" \
" if (this === null || this === @undefined)\n" \
" @throwTypeError(\"Array.prototype.every requires that |this| not be null or undefined\");\n" \
" \n" \
" var array = @Object(this);\n" \
" var length = @toLength(array.length);\n" \
"\n" \
" if (typeof callback !== \"function\")\n" \
" @throwTypeError(\"Array.prototype.every callback must be a function\");\n" \
" \n" \
" var thisArg = @argument(1);\n" \
" \n" \
" for (var i = 0; i < length; i++) {\n" \
" if (!(i in array))\n" \
" continue;\n" \
" if (!callback.@call(thisArg, array[i], i, array))\n" \
" return false;\n" \
" }\n" \
" \n" \
" return true;\n" \
"})\n" \
;
const JSC::ConstructAbility s_arrayPrototypeForEachCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const int s_arrayPrototypeForEachCodeLength = 557;
static const JSC::Intrinsic s_arrayPrototypeForEachCodeIntrinsic = JSC::NoIntrinsic;
const char* s_arrayPrototypeForEachCode =
"(function (callback )\n" \
"{\n" \
" \"use strict\";\n" \
"\n" \
" if (this === null || this === @undefined)\n" \
" @throwTypeError(\"Array.prototype.forEach requires that |this| not be null or undefined\");\n" \
" \n" \
" var array = @Object(this);\n" \
" var length = @toLength(array.length);\n" \
"\n" \
" if (typeof callback !== \"function\")\n" \
" @throwTypeError(\"Array.prototype.forEach callback must be a function\");\n" \
" \n" \
" var thisArg = @argument(1);\n" \
" \n" \
" for (var i = 0; i < length; i++) {\n" \
" if (i in array)\n" \
" callback.@call(thisArg, array[i], i, array);\n" \
" }\n" \
"})\n" \
;
const JSC::ConstructAbility s_arrayPrototypeFilterCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const int s_arrayPrototypeFilterCodeLength = 1333;
static const JSC::Intrinsic s_arrayPrototypeFilterCodeIntrinsic = JSC::NoIntrinsic;
const char* s_arrayPrototypeFilterCode =
"(function (callback )\n" \
"{\n" \
" \"use strict\";\n" \
"\n" \
" if (this === null || this === @undefined)\n" \
" @throwTypeError(\"Array.prototype.filter requires that |this| not be null or undefined\");\n" \
" \n" \
" var array = @Object(this);\n" \
" var length = @toLength(array.length);\n" \
"\n" \
" if (typeof callback !== \"function\")\n" \
" @throwTypeError(\"Array.prototype.filter callback must be a function\");\n" \
" \n" \
" var thisArg = @argument(1);\n" \
"\n" \
" //\n" \
" var result;\n" \
" var constructor;\n" \
" if (@isArray(array)) {\n" \
" constructor = array.constructor;\n" \
" //\n" \
" //\n" \
" //\n" \
" if (@isArrayConstructor(constructor) && @Array !== constructor)\n" \
" constructor = @undefined;\n" \
" if (@isObject(constructor)) {\n" \
" constructor = constructor.@speciesSymbol;\n" \
" if (constructor === null)\n" \
" constructor = @undefined;\n" \
" }\n" \
" }\n" \
" if (constructor === @Array || constructor === @undefined)\n" \
" result = @newArrayWithSize(0);\n" \
" else\n" \
" result = new constructor(0);\n" \
"\n" \
" var nextIndex = 0;\n" \
" for (var i = 0; i < length; i++) {\n" \
" if (!(i in array))\n" \
" continue;\n" \
" var current = array[i]\n" \
" if (callback.@call(thisArg, current, i, array)) {\n" \
" @putByValDirect(result, nextIndex, current);\n" \
" ++nextIndex;\n" \
" }\n" \
" }\n" \
" return result;\n" \
"})\n" \
;
const JSC::ConstructAbility s_arrayPrototypeMapCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const int s_arrayPrototypeMapCodeLength = 1253;
static const JSC::Intrinsic s_arrayPrototypeMapCodeIntrinsic = JSC::NoIntrinsic;
const char* s_arrayPrototypeMapCode =
"(function (callback )\n" \
"{\n" \
" \"use strict\";\n" \
"\n" \
" if (this === null || this === @undefined)\n" \
" @throwTypeError(\"Array.prototype.map requires that |this| not be null or undefined\");\n" \
" \n" \
" var array = @Object(this);\n" \
" var length = @toLength(array.length);\n" \
"\n" \
" if (typeof callback !== \"function\")\n" \
" @throwTypeError(\"Array.prototype.map callback must be a function\");\n" \
" \n" \
" var thisArg = @argument(1);\n" \
"\n" \
" //\n" \
" var result;\n" \
" var constructor;\n" \
" if (@isArray(array)) {\n" \
" constructor = array.constructor;\n" \
" //\n" \
" //\n" \
" //\n" \
" if (@isArrayConstructor(constructor) && @Array !== constructor)\n" \
" constructor = @undefined;\n" \
" if (@isObject(constructor)) {\n" \
" constructor = constructor.@speciesSymbol;\n" \
" if (constructor === null)\n" \
" constructor = @undefined;\n" \
" }\n" \
" }\n" \
" if (constructor === @Array || constructor === @undefined)\n" \
" result = @newArrayWithSize(length);\n" \
" else\n" \
" result = new constructor(length);\n" \
"\n" \
" for (var i = 0; i < length; i++) {\n" \
" if (!(i in array))\n" \
" continue;\n" \
" var mappedValue = callback.@call(thisArg, array[i], i, array);\n" \
" @putByValDirect(result, i, mappedValue);\n" \
" }\n" \
" return result;\n" \
"})\n" \
;
const JSC::ConstructAbility s_arrayPrototypeSomeCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const int s_arrayPrototypeSomeCodeLength = 614;
static const JSC::Intrinsic s_arrayPrototypeSomeCodeIntrinsic = JSC::NoIntrinsic;
const char* s_arrayPrototypeSomeCode =
"(function (callback )\n" \
"{\n" \
" \"use strict\";\n" \
"\n" \
" if (this === null || this === @undefined)\n" \
" @throwTypeError(\"Array.prototype.some requires that |this| not be null or undefined\");\n" \
" \n" \
" var array = @Object(this);\n" \
" var length = @toLength(array.length);\n" \
"\n" \
" if (typeof callback !== \"function\")\n" \
" @throwTypeError(\"Array.prototype.some callback must be a function\");\n" \
" \n" \
" var thisArg = @argument(1);\n" \
" for (var i = 0; i < length; i++) {\n" \
" if (!(i in array))\n" \
" continue;\n" \
" if (callback.@call(thisArg, array[i], i, array))\n" \
" return true;\n" \
" }\n" \
" return false;\n" \
"})\n" \
;
const JSC::ConstructAbility s_arrayPrototypeFillCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const int s_arrayPrototypeFillCodeLength = 951;
static const JSC::Intrinsic s_arrayPrototypeFillCodeIntrinsic = JSC::NoIntrinsic;
const char* s_arrayPrototypeFillCode =
"(function (value )\n" \
"{\n" \
" \"use strict\";\n" \
"\n" \
" if (this === null || this === @undefined)\n" \
" @throwTypeError(\"Array.prototype.fill requires that |this| not be null or undefined\");\n" \
"\n" \
" var array = @Object(this);\n" \
" var length = @toLength(array.length);\n" \
"\n" \
" var relativeStart = @toInteger(@argument(1));\n" \
" var k = 0;\n" \
" if (relativeStart < 0) {\n" \
" k = length + relativeStart;\n" \
" if (k < 0)\n" \
" k = 0;\n" \
" } else {\n" \
" k = relativeStart;\n" \
" if (k > length)\n" \
" k = length;\n" \
" }\n" \
" var relativeEnd = length;\n" \
" var end = @argument(2);\n" \
" if (end !== @undefined)\n" \
" relativeEnd = @toInteger(end);\n" \
" var final = 0;\n" \
" if (relativeEnd < 0) {\n" \
" final = length + relativeEnd;\n" \
" if (final < 0)\n" \
" final = 0;\n" \
" } else {\n" \
" final = relativeEnd;\n" \
" if (final > length)\n" \
" final = length;\n" \
" }\n" \
" for (; k < final; k++)\n" \
" array[k] = value;\n" \
" return array;\n" \
"})\n" \
;
const JSC::ConstructAbility s_arrayPrototypeFindCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const int s_arrayPrototypeFindCodeLength = 601;
static const JSC::Intrinsic s_arrayPrototypeFindCodeIntrinsic = JSC::NoIntrinsic;
const char* s_arrayPrototypeFindCode =
"(function (callback )\n" \
"{\n" \
" \"use strict\";\n" \
"\n" \
" if (this === null || this === @undefined)\n" \
" @throwTypeError(\"Array.prototype.find requires that |this| not be null or undefined\");\n" \
" \n" \
" var array = @Object(this);\n" \
" var length = @toLength(array.length);\n" \
"\n" \
" if (typeof callback !== \"function\")\n" \
" @throwTypeError(\"Array.prototype.find callback must be a function\");\n" \
" \n" \
" var thisArg = @argument(1);\n" \
" for (var i = 0; i < length; i++) {\n" \
" var kValue = array[i];\n" \
" if (callback.@call(thisArg, kValue, i, array))\n" \
" return kValue;\n" \
" }\n" \
" return @undefined;\n" \
"})\n" \
;
const JSC::ConstructAbility s_arrayPrototypeFindIndexCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const int s_arrayPrototypeFindIndexCodeLength = 569;
static const JSC::Intrinsic s_arrayPrototypeFindIndexCodeIntrinsic = JSC::NoIntrinsic;
const char* s_arrayPrototypeFindIndexCode =
"(function (callback )\n" \
"{\n" \
" \"use strict\";\n" \
"\n" \
" if (this === null || this === @undefined)\n" \
" @throwTypeError(\"Array.prototype.findIndex requires that |this| not be null or undefined\");\n" \
" \n" \
" var array = @Object(this);\n" \
" var length = @toLength(array.length);\n" \
"\n" \
" if (typeof callback !== \"function\")\n" \
" @throwTypeError(\"Array.prototype.findIndex callback must be a function\");\n" \
" \n" \
" var thisArg = @argument(1);\n" \
" for (var i = 0; i < length; i++) {\n" \
" if (callback.@call(thisArg, array[i], i, array))\n" \
" return i;\n" \
" }\n" \
" return -1;\n" \
"})\n" \
;
const JSC::ConstructAbility s_arrayPrototypeIncludesCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const int s_arrayPrototypeIncludesCodeLength = 868;
static const JSC::Intrinsic s_arrayPrototypeIncludesCodeIntrinsic = JSC::NoIntrinsic;
const char* s_arrayPrototypeIncludesCode =
"(function (searchElement )\n" \
"{\n" \
" \"use strict\";\n" \
"\n" \
" if (this === null || this === @undefined)\n" \
" @throwTypeError(\"Array.prototype.includes requires that |this| not be null or undefined\");\n" \
"\n" \
" var array = @Object(this);\n" \
" var length = @toLength(array.length);\n" \
"\n" \
" if (length === 0)\n" \
" return false;\n" \
"\n" \
" var fromIndex = 0;\n" \
" var from = @argument(1);\n" \
" if (from !== @undefined)\n" \
" fromIndex = @toInteger(from);\n" \
"\n" \
" var index;\n" \
" if (fromIndex >= 0)\n" \
" index = fromIndex;\n" \
" else\n" \
" index = length + fromIndex;\n" \
"\n" \
" if (index < 0)\n" \
" index = 0;\n" \
"\n" \
" var currentElement;\n" \
" for (; index < length; ++index) {\n" \
" currentElement = array[index];\n" \
" //\n" \
" if (searchElement === currentElement || (searchElement !== searchElement && currentElement !== currentElement))\n" \
" return true;\n" \
" }\n" \
" return false;\n" \
"})\n" \
;
const JSC::ConstructAbility s_arrayPrototypeSortCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const int s_arrayPrototypeSortCodeLength = 6315;
static const JSC::Intrinsic s_arrayPrototypeSortCodeIntrinsic = JSC::NoIntrinsic;
const char* s_arrayPrototypeSortCode =
"(function (comparator)\n" \
"{\n" \
" \"use strict\";\n" \
"\n" \
" function min(a, b)\n" \
" {\n" \
" return a < b ? a : b;\n" \
" }\n" \
"\n" \
" function stringComparator(a, b)\n" \
" {\n" \
" var aString = a.string;\n" \
" var bString = b.string;\n" \
"\n" \
" var aLength = aString.length;\n" \
" var bLength = bString.length;\n" \
" var length = min(aLength, bLength);\n" \
"\n" \
" for (var i = 0; i < length; ++i) {\n" \
" var aCharCode = aString.@charCodeAt(i);\n" \
" var bCharCode = bString.@charCodeAt(i);\n" \
"\n" \
" if (aCharCode == bCharCode)\n" \
" continue;\n" \
"\n" \
" return aCharCode - bCharCode;\n" \
" }\n" \
"\n" \
" return aLength - bLength;\n" \
" }\n" \
"\n" \
" //\n" \
" function compactSparse(array, dst, src, length)\n" \
" {\n" \
" var values = [ ];\n" \
" var seen = { };\n" \
" var valueCount = 0;\n" \
" var undefinedCount = 0;\n" \
"\n" \
" //\n" \
" for (var i = dst; i < src; ++i)\n" \
" delete array[i];\n" \
"\n" \
" for (var object = array; object; object = @Object.@getPrototypeOf(object)) {\n" \
" var propertyNames = @Object.@getOwnPropertyNames(object);\n" \
" for (var i = 0; i < propertyNames.length; ++i) {\n" \
" var index = propertyNames[i];\n" \
" if (index < length) { //\n" \
" if (seen[index]) //\n" \
" continue;\n" \
" seen[index] = 1;\n" \
"\n" \
" var value = array[index];\n" \
" delete array[index];\n" \
"\n" \
" if (value === @undefined) {\n" \
" ++undefinedCount;\n" \
" continue;\n" \
" }\n" \
"\n" \
" array[valueCount++] = value;\n" \
" }\n" \
" }\n" \
" }\n" \
"\n" \
" for (var i = valueCount; i < valueCount + undefinedCount; ++i)\n" \
" array[i] = @undefined;\n" \
"\n" \
" return valueCount;\n" \
" }\n" \
"\n" \
" function compactSlow(array, length)\n" \
" {\n" \
" var holeCount = 0;\n" \
"\n" \
" for (var dst = 0, src = 0; src < length; ++src) {\n" \
" if (!(src in array)) {\n" \
" ++holeCount;\n" \
" if (holeCount < 256)\n" \
" continue;\n" \
" return compactSparse(array, dst, src, length);\n" \
" }\n" \
"\n" \
" var value = array[src];\n" \
" if (value === @undefined)\n" \
" continue;\n" \
"\n" \
" array[dst++] = value;\n" \
" }\n" \
"\n" \
" var valueCount = dst;\n" \
" var undefinedCount = length - valueCount - holeCount;\n" \
"\n" \
" for (var i = valueCount; i < valueCount + undefinedCount; ++i)\n" \
" array[i] = @undefined;\n" \
"\n" \
" for (var i = valueCount + undefinedCount; i < length; ++i)\n" \
" delete array[i];\n" \
"\n" \
" return valueCount;\n" \
" }\n" \
"\n" \
" //\n" \
" function compact(array, length)\n" \
" {\n" \
" for (var i = 0; i < array.length; ++i) {\n" \
" if (array[i] === @undefined)\n" \
" return compactSlow(array, length);\n" \
" }\n" \
"\n" \
" return length;\n" \
" }\n" \
"\n" \
" function merge(dst, src, srcIndex, srcEnd, width, comparator)\n" \
" {\n" \
" var left = srcIndex;\n" \
" var leftEnd = min(left + width, srcEnd);\n" \
" var right = leftEnd;\n" \
" var rightEnd = min(right + width, srcEnd);\n" \
"\n" \
" for (var dstIndex = left; dstIndex < rightEnd; ++dstIndex) {\n" \
" if (right < rightEnd) {\n" \
" if (left >= leftEnd) {\n" \
" dst[dstIndex] = src[right++];\n" \
" continue;\n" \
" }\n" \
"\n" \
" let comparisonResult = comparator(src[right], src[left]);\n" \
" if ((typeof comparisonResult === \"boolean\" && !comparisonResult) || comparisonResult < 0) {\n" \
" dst[dstIndex] = src[right++];\n" \
" continue;\n" \
" }\n" \
"\n" \
" }\n" \
"\n" \
" dst[dstIndex] = src[left++];\n" \
" }\n" \
" }\n" \
"\n" \
" function mergeSort(array, valueCount, comparator)\n" \
" {\n" \
" var buffer = [ ];\n" \
" buffer.length = valueCount;\n" \
"\n" \
" var dst = buffer;\n" \
" var src = array;\n" \
" for (var width = 1; width < valueCount; width *= 2) {\n" \
" for (var srcIndex = 0; srcIndex < valueCount; srcIndex += 2 * width)\n" \
" merge(dst, src, srcIndex, valueCount, width, comparator);\n" \
"\n" \
" var tmp = src;\n" \
" src = dst;\n" \
" dst = tmp;\n" \
" }\n" \
"\n" \
" if (src != array) {\n" \
" for(var i = 0; i < valueCount; i++)\n" \
" array[i] = src[i];\n" \
" }\n" \
" }\n" \
"\n" \
" function bucketSort(array, dst, bucket, depth)\n" \
" {\n" \
" if (bucket.length < 32 || depth > 32) {\n" \
" mergeSort(bucket, bucket.length, stringComparator);\n" \
" for (var i = 0; i < bucket.length; ++i)\n" \
" array[dst++] = bucket[i].value;\n" \
" return dst;\n" \
" }\n" \
"\n" \
" var buckets = [ ];\n" \
" for (var i = 0; i < bucket.length; ++i) {\n" \
" var entry = bucket[i];\n" \
" var string = entry.string;\n" \
" if (string.length == depth) {\n" \
" array[dst++] = entry.value;\n" \
" continue;\n" \
" }\n" \
"\n" \
" var c = string.@charCodeAt(depth);\n" \
" if (!buckets[c])\n" \
" buckets[c] = [ ];\n" \
" buckets[c][buckets[c].length] = entry;\n" \
" }\n" \
"\n" \
" for (var i = 0; i < buckets.length; ++i) {\n" \
" if (!buckets[i])\n" \
" continue;\n" \
" dst = bucketSort(array, dst, buckets[i], depth + 1);\n" \
" }\n" \
"\n" \
" return dst;\n" \
" }\n" \
"\n" \
" function comparatorSort(array, length, comparator)\n" \
" {\n" \
" var valueCount = compact(array, length);\n" \
" mergeSort(array, valueCount, comparator);\n" \
" }\n" \
"\n" \
" function stringSort(array, length)\n" \
" {\n" \
" var valueCount = compact(array, length);\n" \
"\n" \
" var strings = @newArrayWithSize(valueCount);\n" \
" for (var i = 0; i < valueCount; ++i)\n" \
" strings[i] = { string: @toString(array[i]), value: array[i] };\n" \
"\n" \
" bucketSort(array, 0, strings, 0);\n" \
" }\n" \
"\n" \
" if (this === null || this === @undefined)\n" \
" @throwTypeError(\"Array.prototype.sort requires that |this| not be null or undefined\");\n" \
"\n" \
" var array = @Object(this);\n" \
"\n" \
" var length = array.length >>> 0;\n" \
"\n" \
" //\n" \
" //\n" \
" if (length < 2)\n" \
" return array;\n" \
"\n" \
" if (typeof comparator == \"function\")\n" \
" comparatorSort(array, length, comparator);\n" \
" else if (comparator === null || comparator === @undefined)\n" \
" stringSort(array, length);\n" \
" else\n" \
" @throwTypeError(\"Array.prototype.sort requires the comparsion function be a function or undefined\");\n" \
"\n" \
" return array;\n" \
"})\n" \
;
const JSC::ConstructAbility s_arrayPrototypeConcatSlowPathCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const int s_arrayPrototypeConcatSlowPathCodeLength = 2132;
static const JSC::Intrinsic s_arrayPrototypeConcatSlowPathCodeIntrinsic = JSC::NoIntrinsic;
const char* s_arrayPrototypeConcatSlowPathCode =
"(function ()\n" \
"{\n" \
" \"use strict\";\n" \
"\n" \
" if (this === null || this === @undefined)\n" \
" @throwTypeError(\"Array.prototype.concat requires that |this| not be null or undefined\");\n" \
"\n" \
" var currentElement = @Object(this);\n" \
"\n" \
" var constructor;\n" \
" if (@isArray(currentElement)) {\n" \
" constructor = currentElement.constructor;\n" \
" //\n" \
" //\n" \
" //\n" \
" if (@isArrayConstructor(constructor) && @Array !== constructor)\n" \
" constructor = @undefined;\n" \
" else if (@isObject(constructor)) {\n" \
" constructor = constructor.@speciesSymbol;\n" \
" if (constructor === null)\n" \
" constructor = @Array;\n" \
" }\n" \
" }\n" \
"\n" \
" var argCount = arguments.length;\n" \
" var result;\n" \
" if (constructor === @Array || constructor === @undefined)\n" \
" result = @newArrayWithSize(0);\n" \
" else\n" \
" result = new constructor(0);\n" \
" var resultIsArray = @isJSArray(result);\n" \
"\n" \
" var resultIndex = 0;\n" \
" var argIndex = 0;\n" \
"\n" \
" do {\n" \
" let spreadable = @isObject(currentElement) && currentElement.@isConcatSpreadableSymbol;\n" \
" if ((spreadable === @undefined && @isArray(currentElement)) || spreadable) {\n" \
" let length = @toLength(currentElement.length);\n" \
" if (length + resultIndex > @MAX_ARRAY_INDEX)\n" \
" @throwRangeError(\"Length exceeded the maximum array length\");\n" \
" if (resultIsArray && @isJSArray(currentElement)) {\n" \
" @appendMemcpy(result, currentElement, resultIndex);\n" \
" resultIndex += length;\n" \
" } else {\n" \
" for (var i = 0; i < length; i++) {\n" \
" if (i in currentElement)\n" \
" @putByValDirect(result, resultIndex, currentElement[i]);\n" \
" resultIndex++;\n" \
" }\n" \
" }\n" \
" } else {\n" \
" if (resultIndex >= @MAX_ARRAY_INDEX)\n" \
" @throwRangeError(\"Length exceeded the maximum array length\");\n" \
" @putByValDirect(result, resultIndex++, currentElement);\n" \
" }\n" \
" currentElement = arguments[argIndex];\n" \
" } while (argIndex++ < argCount);\n" \
"\n" \
" result.length = resultIndex;\n" \
" return result;\n" \
"})\n" \
;
const JSC::ConstructAbility s_arrayPrototypeConcatCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const int s_arrayPrototypeConcatCodeLength = 416;
static const JSC::Intrinsic s_arrayPrototypeConcatCodeIntrinsic = JSC::NoIntrinsic;
const char* s_arrayPrototypeConcatCode =
"(function (first)\n" \
"{\n" \
" \"use strict\";\n" \
"\n" \
" if (@argumentCount() === 1\n" \
" && @isJSArray(this)\n" \
" && this.@isConcatSpreadableSymbol === @undefined\n" \
" && (!@isObject(first) || first.@isConcatSpreadableSymbol === @undefined)) {\n" \
"\n" \
" let result = @concatMemcpy(this, first);\n" \
" if (result !== null)\n" \
" return result;\n" \
" }\n" \
"\n" \
" return @tailCallForwardArguments(@concatSlowPath, this);\n" \
"})\n" \
;
const JSC::ConstructAbility s_arrayPrototypeCopyWithinCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const int s_arrayPrototypeCopyWithinCodeLength = 1640;
static const JSC::Intrinsic s_arrayPrototypeCopyWithinCodeIntrinsic = JSC::NoIntrinsic;
const char* s_arrayPrototypeCopyWithinCode =
"(function (target, start )\n" \
"{\n" \
" \"use strict\";\n" \
"\n" \
" function maxWithPositives(a, b)\n" \
" {\n" \
" return (a < b) ? b : a;\n" \
" }\n" \
"\n" \
" function minWithMaybeNegativeZeroAndPositive(maybeNegativeZero, positive)\n" \
" {\n" \
" return (maybeNegativeZero < positive) ? maybeNegativeZero : positive;\n" \
" }\n" \
"\n" \
" if (this === null || this === @undefined)\n" \
" @throwTypeError(\"Array.copyWithin requires that |this| not be null or undefined\");\n" \
"\n" \
" var array = @Object(this);\n" \
" var length = @toLength(array.length);\n" \
"\n" \
" var relativeTarget = @toInteger(target);\n" \
" var to = (relativeTarget < 0) ? maxWithPositives(length + relativeTarget, 0) : minWithMaybeNegativeZeroAndPositive(relativeTarget, length);\n" \
"\n" \
" var relativeStart = @toInteger(start);\n" \
" var from = (relativeStart < 0) ? maxWithPositives(length + relativeStart, 0) : minWithMaybeNegativeZeroAndPositive(relativeStart, length);\n" \
"\n" \
" var relativeEnd;\n" \
" var end = @argument(2);\n" \
" if (end === @undefined)\n" \
" relativeEnd = length;\n" \
" else\n" \
" relativeEnd = @toInteger(end);\n" \
"\n" \
" var finalValue = (relativeEnd < 0) ? maxWithPositives(length + relativeEnd, 0) : minWithMaybeNegativeZeroAndPositive(relativeEnd, length);\n" \
"\n" \
" var count = minWithMaybeNegativeZeroAndPositive(finalValue - from, length - to);\n" \
"\n" \
" var direction = 1;\n" \
" if (from < to && to < from + count) {\n" \
" direction = -1;\n" \
" from = from + count - 1;\n" \
" to = to + count - 1;\n" \
" }\n" \
"\n" \
" for (var i = 0; i < count; ++i, from += direction, to += direction) {\n" \
" if (from in array)\n" \
" array[to] = array[from];\n" \
" else\n" \
" delete array[to];\n" \
" }\n" \
"\n" \
" return array;\n" \
"})\n" \
;
const JSC::ConstructAbility s_asyncFunctionPrototypeAsyncFunctionResumeCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const int s_asyncFunctionPrototypeAsyncFunctionResumeCodeLength = 1400;
static const JSC::Intrinsic s_asyncFunctionPrototypeAsyncFunctionResumeCodeIntrinsic = JSC::NoIntrinsic;
const char* s_asyncFunctionPrototypeAsyncFunctionResumeCode =
"(function (generator, promiseCapability, sentValue, resumeMode)\n" \
"{\n" \
" \"use strict\";\n" \
" let state = generator.@generatorState;\n" \
" let value = @undefined;\n" \
"\n" \
" if (state === @GeneratorStateCompleted || (resumeMode !== @GeneratorResumeModeNormal && resumeMode !== @GeneratorResumeModeThrow))\n" \
" @throwTypeError(\"Async function illegally resumed\");\n" \
"\n" \
" try {\n" \
" generator.@generatorState = @GeneratorStateExecuting;\n" \
" value = generator.@generatorNext.@call(generator.@generatorThis, generator, state, sentValue, resumeMode, generator.@generatorFrame);\n" \
" if (generator.@generatorState === @GeneratorStateExecuting) {\n" \
" generator.@generatorState = @GeneratorStateCompleted;\n" \
" promiseCapability.@resolve(value);\n" \
" return promiseCapability.@promise;\n" \
" }\n" \
" } catch (error) {\n" \
" generator.@generatorState = @GeneratorStateCompleted;\n" \
" promiseCapability.@reject(error);\n" \
" return promiseCapability.@promise;\n" \
" }\n" \
"\n" \
" let wrappedValue = @newPromiseCapability(@Promise);\n" \
" wrappedValue.@resolve.@call(@undefined, value);\n" \
"\n" \
" wrappedValue.@promise.@then(\n" \
" function(value) { @asyncFunctionResume(generator, promiseCapability, value, @GeneratorResumeModeNormal); },\n" \
" function(error) { @asyncFunctionResume(generator, promiseCapability, error, @GeneratorResumeModeThrow); });\n" \
"\n" \
" return promiseCapability.@promise;\n" \
"})\n" \
;
const JSC::ConstructAbility s_datePrototypeToLocaleStringCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const int s_datePrototypeToLocaleStringCodeLength = 1372;
static const JSC::Intrinsic s_datePrototypeToLocaleStringCodeIntrinsic = JSC::NoIntrinsic;
const char* s_datePrototypeToLocaleStringCode =
"(function ()\n" \
"{\n" \
" \"use strict\";\n" \
"\n" \
" function toDateTimeOptionsAnyAll(opts)\n" \
" {\n" \
" //\n" \
" //\n" \
"\n" \
" var options;\n" \
" if (opts === @undefined)\n" \
" options = null;\n" \
" else if (opts === null)\n" \
" @throwTypeError(\"null is not an object\");\n" \
" else\n" \
" options = @Object(opts);\n" \
"\n" \
" //\n" \
" var needsDefaults = !options || (\n" \
" options.weekday === @undefined &&\n" \
" options.year === @undefined &&\n" \
" options.month === @undefined &&\n" \
" options.day === @undefined &&\n" \
" options.hour === @undefined &&\n" \
" options.minute === @undefined &&\n" \
" options.second === @undefined\n" \
" );\n" \
"\n" \
" //\n" \
" if (needsDefaults) {\n" \
" options = @Object.@create(options);\n" \
" options.year = \"numeric\";\n" \
" options.month = \"numeric\";\n" \
" options.day = \"numeric\";\n" \
" options.hour = \"numeric\";\n" \
" options.minute = \"numeric\";\n" \
" options.second = \"numeric\";\n" \
" }\n" \
"\n" \
" //\n" \
" return options;\n" \
" }\n" \
"\n" \
" //\n" \
" //\n" \
"\n" \
" var value = @thisTimeValue.@call(this);\n" \
" if (@isNaN(value))\n" \
" return \"Invalid Date\";\n" \
"\n" \
" var options = toDateTimeOptionsAnyAll(@argument(1));\n" \
" var locales = @argument(0);\n" \
"\n" \
" var dateFormat = new @DateTimeFormat(locales, options);\n" \
" return dateFormat.format(value);\n" \
"})\n" \
;
const JSC::ConstructAbility s_datePrototypeToLocaleDateStringCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const int s_datePrototypeToLocaleDateStringCodeLength = 1114;
static const JSC::Intrinsic s_datePrototypeToLocaleDateStringCodeIntrinsic = JSC::NoIntrinsic;
const char* s_datePrototypeToLocaleDateStringCode =
"(function ()\n" \
"{\n" \
" \"use strict\";\n" \
"\n" \
" function toDateTimeOptionsDateDate(opts)\n" \
" {\n" \
" //\n" \
" //\n" \
"\n" \
" var options;\n" \
" if (opts === @undefined)\n" \
" options = null;\n" \
" else if (opts === null)\n" \
" @throwTypeError(\"null is not an object\");\n" \
" else\n" \
" options = @Object(opts);\n" \
"\n" \
" //\n" \
" var needsDefaults = !options || (\n" \
" options.weekday === @undefined &&\n" \
" options.year === @undefined &&\n" \
" options.month === @undefined &&\n" \
" options.day === @undefined\n" \
" );\n" \
"\n" \
" //\n" \
" if (needsDefaults) {\n" \
" options = @Object.@create(options);\n" \
" options.year = \"numeric\";\n" \
" options.month = \"numeric\";\n" \
" options.day = \"numeric\";\n" \
" }\n" \
"\n" \
" return options;\n" \
" }\n" \
"\n" \
" //\n" \
" //\n" \
"\n" \
" var value = @thisTimeValue.@call(this);\n" \
" if (@isNaN(value))\n" \
" return \"Invalid Date\";\n" \
"\n" \
" var options = toDateTimeOptionsDateDate(@argument(1));\n" \
" var locales = @argument(0);\n" \
"\n" \
" var dateFormat = new @DateTimeFormat(locales, options);\n" \
" return dateFormat.format(value);\n" \
"})\n" \
;
const JSC::ConstructAbility s_datePrototypeToLocaleTimeStringCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const int s_datePrototypeToLocaleTimeStringCodeLength = 1076;
static const JSC::Intrinsic s_datePrototypeToLocaleTimeStringCodeIntrinsic = JSC::NoIntrinsic;
const char* s_datePrototypeToLocaleTimeStringCode =
"(function ()\n" \
"{\n" \
" \"use strict\";\n" \
"\n" \
" function toDateTimeOptionsTimeTime(opts)\n" \
" {\n" \
" //\n" \
" //\n" \
"\n" \
" var options;\n" \
" if (opts === @undefined)\n" \
" options = null;\n" \
" else if (opts === null)\n" \
" @throwTypeError(\"null is not an object\");\n" \
" else\n" \
" options = @Object(opts);\n" \
"\n" \
" //\n" \
" var needsDefaults = !options || (\n" \
" options.hour === @undefined &&\n" \
" options.minute === @undefined &&\n" \
" options.second === @undefined\n" \
" );\n" \
"\n" \
" //\n" \
" if (needsDefaults) {\n" \
" options = @Object.@create(options);\n" \
" options.hour = \"numeric\";\n" \
" options.minute = \"numeric\";\n" \
" options.second = \"numeric\";\n" \
" }\n" \
"\n" \
" return options;\n" \
" }\n" \
"\n" \
" //\n" \
" //\n" \
"\n" \
" var value = @thisTimeValue.@call(this);\n" \
" if (@isNaN(value))\n" \
" return \"Invalid Date\";\n" \
"\n" \
" var options = toDateTimeOptionsTimeTime(@argument(1));\n" \
" var locales = @argument(0);\n" \
"\n" \
" var dateFormat = new @DateTimeFormat(locales, options);\n" \
" return dateFormat.format(value);\n" \
"})\n" \
;
const JSC::ConstructAbility s_functionPrototypeCallCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const int s_functionPrototypeCallCodeLength = 247;
static const JSC::Intrinsic s_functionPrototypeCallCodeIntrinsic = JSC::NoIntrinsic;
const char* s_functionPrototypeCallCode =
"(function (thisArgument)\n" \
"{\n" \
" \"use strict\";\n" \
"\n" \
" let argumentValues = [];\n" \
" //\n" \
" for (let i = 1; i < arguments.length; i++)\n" \
" @putByValDirect(argumentValues, i-1, arguments[i]);\n" \
"\n" \
" return this.@apply(thisArgument, argumentValues);\n" \
"})\n" \
;
const JSC::ConstructAbility s_functionPrototypeApplyCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const int s_functionPrototypeApplyCodeLength = 113;
static const JSC::Intrinsic s_functionPrototypeApplyCodeIntrinsic = JSC::NoIntrinsic;
const char* s_functionPrototypeApplyCode =
"(function (thisValue, argumentValues)\n" \
"{\n" \
" \"use strict\";\n" \
"\n" \
" return this.@apply(thisValue, argumentValues);\n" \
"})\n" \
;
const JSC::ConstructAbility s_functionPrototypeSymbolHasInstanceCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const int s_functionPrototypeSymbolHasInstanceCodeLength = 261;
static const JSC::Intrinsic s_functionPrototypeSymbolHasInstanceCodeIntrinsic = JSC::NoIntrinsic;
const char* s_functionPrototypeSymbolHasInstanceCode =
"(function (value)\n" \
"{\n" \
" \"use strict\";\n" \
"\n" \
" if (typeof this !== \"function\")\n" \
" return false;\n" \
"\n" \
" if (@isBoundFunction(this))\n" \
" return @hasInstanceBoundFunction(this, value);\n" \
"\n" \
" let target = this.prototype;\n" \
" return @instanceOf(value, target);\n" \
"})\n" \
;
const JSC::ConstructAbility s_functionPrototypeBindCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const int s_functionPrototypeBindCodeLength = 1021;
static const JSC::Intrinsic s_functionPrototypeBindCodeIntrinsic = JSC::NoIntrinsic;
const char* s_functionPrototypeBindCode =
"(function (thisValue)\n" \
"{\n" \
" \"use strict\";\n" \
"\n" \
" let target = this;\n" \
" if (typeof target !== \"function\")\n" \
" @throwTypeError(\"|this| is not a function inside Function.prototype.bind\");\n" \
"\n" \
" let argumentCount = arguments.length;\n" \
" let boundArgs = null;\n" \
" let numBoundArgs = 0;\n" \
" if (argumentCount > 1) {\n" \
" numBoundArgs = argumentCount - 1;\n" \
" boundArgs = @newArrayWithSize(numBoundArgs);\n" \
" for (let i = 0; i < numBoundArgs; i++)\n" \
" @putByValDirect(boundArgs, i, arguments[i + 1]);\n" \
" }\n" \
"\n" \
" let length = 0;\n" \
" if (@hasOwnLengthProperty(target)) {\n" \
" let lengthValue = target.length;\n" \
" if (typeof lengthValue === \"number\") {\n" \
" lengthValue = lengthValue | 0;\n" \
" //\n" \
" //\n" \
" if (lengthValue > numBoundArgs)\n" \
" length = lengthValue - numBoundArgs;\n" \
" }\n" \
" }\n" \
"\n" \
" let name = target.name;\n" \
" if (typeof name !== \"string\")\n" \
" name = \"\";\n" \
"\n" \
" return @makeBoundFunction(target, arguments[0], boundArgs, length, name);\n" \
"})\n" \
;
const JSC::ConstructAbility s_generatorPrototypeGeneratorResumeCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const int s_generatorPrototypeGeneratorResumeCodeLength = 1176;
static const JSC::Intrinsic s_generatorPrototypeGeneratorResumeCodeIntrinsic = JSC::NoIntrinsic;
const char* s_generatorPrototypeGeneratorResumeCode =
"(function (generator, sentValue, resumeMode)\n" \
"{\n" \
" \"use strict\";\n" \
"\n" \
" let state = generator.@generatorState;\n" \
" let done = false;\n" \
" let value = @undefined;\n" \
"\n" \
" if (typeof state !== 'number')\n" \
" @throwTypeError(\"|this| should be a generator\");\n" \
"\n" \
" if (state === @GeneratorStateExecuting)\n" \
" @throwTypeError(\"Generator is executing\");\n" \
"\n" \
" if (state === @GeneratorStateCompleted) {\n" \
" if (resumeMode === @GeneratorResumeModeThrow)\n" \
" throw sentValue;\n" \
"\n" \
" done = true;\n" \
" if (resumeMode === @GeneratorResumeModeReturn)\n" \
" value = sentValue;\n" \
" } else {\n" \
" try {\n" \
" generator.@generatorState = @GeneratorStateExecuting;\n" \
" value = generator.@generatorNext.@call(generator.@generatorThis, generator, state, sentValue, resumeMode, generator.@generatorFrame);\n" \
" if (generator.@generatorState === @GeneratorStateExecuting) {\n" \
" generator.@generatorState = @GeneratorStateCompleted;\n" \
" done = true;\n" \
" }\n" \
" } catch (error) {\n" \
" generator.@generatorState = @GeneratorStateCompleted;\n" \
" throw error;\n" \
" }\n" \
" }\n" \
" return { done, value };\n" \
"})\n" \
;
const JSC::ConstructAbility s_generatorPrototypeNextCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const int s_generatorPrototypeNextCodeLength = 112;
static const JSC::Intrinsic s_generatorPrototypeNextCodeIntrinsic = JSC::NoIntrinsic;
const char* s_generatorPrototypeNextCode =
"(function (value)\n" \
"{\n" \
" \"use strict\";\n" \
"\n" \
" return @generatorResume(this, value, @GeneratorResumeModeNormal);\n" \
"})\n" \
;
const JSC::ConstructAbility s_generatorPrototypeReturnCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const int s_generatorPrototypeReturnCodeLength = 112;
static const JSC::Intrinsic s_generatorPrototypeReturnCodeIntrinsic = JSC::NoIntrinsic;
const char* s_generatorPrototypeReturnCode =
"(function (value)\n" \
"{\n" \
" \"use strict\";\n" \
"\n" \
" return @generatorResume(this, value, @GeneratorResumeModeReturn);\n" \
"})\n" \
;
const JSC::ConstructAbility s_generatorPrototypeThrowCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const int s_generatorPrototypeThrowCodeLength = 119;
static const JSC::Intrinsic s_generatorPrototypeThrowCodeIntrinsic = JSC::NoIntrinsic;
const char* s_generatorPrototypeThrowCode =
"(function (exception)\n" \
"{\n" \
" \"use strict\";\n" \
"\n" \
" return @generatorResume(this, exception, @GeneratorResumeModeThrow);\n" \
"})\n" \
;
const JSC::ConstructAbility s_globalObjectIsFiniteCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const int s_globalObjectIsFiniteCodeLength = 216;
static const JSC::Intrinsic s_globalObjectIsFiniteCodeIntrinsic = JSC::NoIntrinsic;
const char* s_globalObjectIsFiniteCode =
"(function (value)\n" \
"{\n" \
" \"use strict\";\n" \
"\n" \
" var numberValue = @toNumber(value);\n" \
" //\n" \
" if (numberValue !== numberValue)\n" \
" return false;\n" \
" return numberValue !== @Infinity && numberValue !== -@Infinity;\n" \
"})\n" \
;
const JSC::ConstructAbility s_globalObjectIsNaNCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const int s_globalObjectIsNaNCodeLength = 122;
static const JSC::Intrinsic s_globalObjectIsNaNCodeIntrinsic = JSC::NoIntrinsic;
const char* s_globalObjectIsNaNCode =
"(function (value)\n" \
"{\n" \
" \"use strict\";\n" \
"\n" \
" var numberValue = @toNumber(value);\n" \
" return numberValue !== numberValue;\n" \
"})\n" \
;
const JSC::ConstructAbility s_globalOperationsToIntegerCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const int s_globalOperationsToIntegerCodeLength = 169;
static const JSC::Intrinsic s_globalOperationsToIntegerCodeIntrinsic = JSC::NoIntrinsic;
const char* s_globalOperationsToIntegerCode =
"(function (target)\n" \
"{\n" \
" \"use strict\";\n" \
"\n" \
" var numberValue = +target;\n" \
"\n" \
" //\n" \
" if (numberValue !== numberValue)\n" \
" return 0;\n" \
" return @trunc(numberValue);\n" \
"})\n" \
;
const JSC::ConstructAbility s_globalOperationsToLengthCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const int s_globalOperationsToLengthCodeLength = 177;
static const JSC::Intrinsic s_globalOperationsToLengthCodeIntrinsic = JSC::NoIntrinsic;
const char* s_globalOperationsToLengthCode =
"(function (target)\n" \
"{\n" \
" \"use strict\";\n" \
"\n" \
" var length = @toInteger(target);\n" \
" //\n" \
" return +(length > 0 ? (length < @MAX_SAFE_INTEGER ? length : @MAX_SAFE_INTEGER) : 0);\n" \
"})\n" \
;
const JSC::ConstructAbility s_globalOperationsIsDictionaryCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const int s_globalOperationsIsDictionaryCodeLength = 100;
static const JSC::Intrinsic s_globalOperationsIsDictionaryCodeIntrinsic = JSC::NoIntrinsic;
const char* s_globalOperationsIsDictionaryCode =
"(function (object)\n" \
"{\n" \
" \"use strict\";\n" \
"\n" \
" return object == null || typeof object === \"object\";\n" \
"})\n" \
;
const JSC::ConstructAbility s_globalOperationsSpeciesGetterCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const int s_globalOperationsSpeciesGetterCodeLength = 35;
static const JSC::Intrinsic s_globalOperationsSpeciesGetterCodeIntrinsic = JSC::NoIntrinsic;
const char* s_globalOperationsSpeciesGetterCode =
"(function ()\n" \
"{\n" \
" return this;\n" \
"})\n" \
;
const JSC::ConstructAbility s_globalOperationsSpeciesConstructorCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const int s_globalOperationsSpeciesConstructorCodeLength = 516;
static const JSC::Intrinsic s_globalOperationsSpeciesConstructorCodeIntrinsic = JSC::NoIntrinsic;
const char* s_globalOperationsSpeciesConstructorCode =
"(function (obj, defaultConstructor)\n" \
"{\n" \
" var constructor = obj.constructor;\n" \
" if (constructor === @undefined)\n" \
" return defaultConstructor;\n" \
" if (!@isObject(constructor))\n" \
" @throwTypeError(\"|this|.constructor is not an Object or undefined\");\n" \
" constructor = constructor.@speciesSymbol;\n" \
" if (constructor == null)\n" \
" return defaultConstructor;\n" \
" if (@isConstructor(constructor))\n" \
" return constructor;\n" \
" @throwTypeError(\"|this|.constructor[Symbol.species] is not a constructor\");\n" \
"})\n" \
;
const JSC::ConstructAbility s_globalOperationsCopyDataPropertiesCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const int s_globalOperationsCopyDataPropertiesCodeLength = 652;
static const JSC::Intrinsic s_globalOperationsCopyDataPropertiesCodeIntrinsic = JSC::NoIntrinsic;
const char* s_globalOperationsCopyDataPropertiesCode =
"(function (target, source, excludedSet)\n" \
"{\n" \
" if (!@isObject(target))\n" \
" @throwTypeError(\"target needs to be an object\");\n" \
"\n" \
" if (source == null) \n" \
" return target;\n" \
"\n" \
" let from = @Object(source); \n" \
" let keys = @Reflect.@ownKeys(from); \n" \
" let keysLength = keys.length;\n" \
" for (let i = 0; i < keysLength; i++) {\n" \
" let nextKey = keys[i];\n" \
" if (!excludedSet.@has(nextKey)) {\n" \
" if (@propertyIsEnumerable(from, nextKey)) {\n" \
" let propValue = from[nextKey];\n" \
" @defineEnumerableWritableConfigurableDataProperty(target, nextKey, propValue);\n" \
" }\n" \
" }\n" \
" }\n" \
"\n" \
" return target;\n" \
"})\n" \
;
const JSC::ConstructAbility s_globalOperationsCopyDataPropertiesNoExclusionsCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const int s_globalOperationsCopyDataPropertiesNoExclusionsCodeLength = 571;
static const JSC::Intrinsic s_globalOperationsCopyDataPropertiesNoExclusionsCodeIntrinsic = JSC::NoIntrinsic;
const char* s_globalOperationsCopyDataPropertiesNoExclusionsCode =
"(function (target, source)\n" \
"{\n" \
" if (!@isObject(target))\n" \
" @throwTypeError(\"target needs to be an object\");\n" \
"\n" \
" if (source == null) \n" \
" return target;\n" \
"\n" \
" let from = @Object(source); \n" \
" let keys = @Reflect.@ownKeys(from); \n" \
" let keysLength = keys.length;\n" \
" for (let i = 0; i < keysLength; i++) {\n" \
" let nextKey = keys[i];\n" \
" if (@propertyIsEnumerable(from, nextKey)) {\n" \
" let propValue = from[nextKey];\n" \
" @defineEnumerableWritableConfigurableDataProperty(target, nextKey, propValue);\n" \
" }\n" \
" }\n" \
"\n" \
" return target;\n" \
"})\n" \
;
const JSC::ConstructAbility s_inspectorInstrumentationObjectPromiseFulfilledCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const int s_inspectorInstrumentationObjectPromiseFulfilledCodeLength = 103;
static const JSC::Intrinsic s_inspectorInstrumentationObjectPromiseFulfilledCodeIntrinsic = JSC::NoIntrinsic;
const char* s_inspectorInstrumentationObjectPromiseFulfilledCode =
"(function (promise, value, reactions)\n" \
"{\n" \
" \"use strict\";\n" \
"\n" \
" if (!this.isEnabled)\n" \
" return;\n" \
"})\n" \
;
const JSC::ConstructAbility s_inspectorInstrumentationObjectPromiseRejectedCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const int s_inspectorInstrumentationObjectPromiseRejectedCodeLength = 104;
static const JSC::Intrinsic s_inspectorInstrumentationObjectPromiseRejectedCodeIntrinsic = JSC::NoIntrinsic;
const char* s_inspectorInstrumentationObjectPromiseRejectedCode =
"(function (promise, reason, reactions)\n" \
"{\n" \
" \"use strict\";\n" \
"\n" \
" if (!this.isEnabled)\n" \
" return;\n" \
"})\n" \
;
const JSC::ConstructAbility s_internalPromiseConstructorInternalAllCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const int s_internalPromiseConstructorInternalAllCodeLength = 1603;
static const JSC::Intrinsic s_internalPromiseConstructorInternalAllCodeIntrinsic = JSC::NoIntrinsic;
const char* s_internalPromiseConstructorInternalAllCode =
"(function (array)\n" \
"{\n" \
" //\n" \
" //\n" \
" //\n" \
" //\n" \
" //\n" \
" //\n" \
" //\n" \
" //\n" \
"\n" \
" \"use strict\";\n" \
"\n" \
" var promiseCapability = @newPromiseCapability(@InternalPromise);\n" \
"\n" \
" var values = [];\n" \
" var index = 0;\n" \
" var remainingElementsCount = 0;\n" \
"\n" \
" function newResolveElement(index)\n" \
" {\n" \
" var alreadyCalled = false;\n" \
" return function (argument)\n" \
" {\n" \
" if (alreadyCalled)\n" \
" return @undefined;\n" \
" alreadyCalled = true;\n" \
"\n" \
" @putByValDirect(values, index, argument);\n" \
"\n" \
" --remainingElementsCount;\n" \
" if (remainingElementsCount === 0)\n" \
" return promiseCapability.@resolve.@call(@undefined, values);\n" \
"\n" \
" return @undefined;\n" \
" }\n" \
" }\n" \
"\n" \
" try {\n" \
" if (array.length === 0)\n" \
" promiseCapability.@resolve.@call(@undefined, values);\n" \
" else {\n" \
" for (var index = 0, length = array.length; index < length; ++index) {\n" \
" var value = array[index];\n" \
" @putByValDirect(values, index, @undefined);\n" \
"\n" \
" var nextPromiseCapability = @newPromiseCapability(@InternalPromise);\n" \
" nextPromiseCapability.@resolve.@call(@undefined, value);\n" \
" var nextPromise = nextPromiseCapability.@promise;\n" \
"\n" \
" var resolveElement = newResolveElement(index);\n" \
" ++remainingElementsCount;\n" \
" nextPromise.then(resolveElement, promiseCapability.@reject);\n" \
" }\n" \
" }\n" \
" } catch (error) {\n" \
" promiseCapability.@reject.@call(@undefined, error);\n" \
" }\n" \
"\n" \
" return promiseCapability.@promise;\n" \
"})\n" \
;
const JSC::ConstructAbility s_iteratorHelpersPerformIterationCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const int s_iteratorHelpersPerformIterationCodeLength = 434;
static const JSC::Intrinsic s_iteratorHelpersPerformIterationCodeIntrinsic = JSC::NoIntrinsic;
const char* s_iteratorHelpersPerformIterationCode =
"(function (iterable)\n" \
"{\n" \
" \"use strict\";\n" \
" //\n" \
" //\n" \
" //\n" \
"\n" \
" let result = [];\n" \
"\n" \
" let iterator = iterable.@iteratorSymbol();\n" \
" let item;\n" \
" let index = 0;\n" \
" while (true) {\n" \
" item = iterator.next();\n" \
" if (!@isObject(item))\n" \
" @throwTypeError(\"Iterator result interface is not an object\");\n" \
" if (item.done)\n" \
" return result;\n" \
" @putByValDirect(result, index++, item.value);\n" \
" }\n" \
"})\n" \
;
const JSC::ConstructAbility s_iteratorPrototypeSymbolIteratorGetterCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const int s_iteratorPrototypeSymbolIteratorGetterCodeLength = 54;
static const JSC::Intrinsic s_iteratorPrototypeSymbolIteratorGetterCodeIntrinsic = JSC::NoIntrinsic;
const char* s_iteratorPrototypeSymbolIteratorGetterCode =
"(function ()\n" \
"{\n" \
" \"use strict\";\n" \
"\n" \
" return this;\n" \
"})\n" \
;
const JSC::ConstructAbility s_mapPrototypeForEachCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const int s_mapPrototypeForEachCodeLength = 531;
static const JSC::Intrinsic s_mapPrototypeForEachCodeIntrinsic = JSC::NoIntrinsic;
const char* s_mapPrototypeForEachCode =
"(function (callback )\n" \
"{\n" \
" \"use strict\";\n" \
"\n" \
" if (!@isMap(this))\n" \
" @throwTypeError(\"Map operation called on non-Map object\");\n" \
"\n" \
" if (typeof callback !== 'function')\n" \
" @throwTypeError(\"Map.prototype.forEach callback must be a function\");\n" \
"\n" \
" var thisArg = @argument(1);\n" \
" var iterator = @MapIterator(this);\n" \
"\n" \
" //\n" \
" var value = [ @undefined, @undefined ];\n" \
" for (;;) {\n" \
" if (@mapIteratorNext.@call(iterator, value))\n" \
" break;\n" \
" callback.@call(thisArg, value[1], value[0], this);\n" \
" }\n" \
"})\n" \
;
const JSC::ConstructAbility s_moduleLoaderPrototypeSetStateToMaxCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const int s_moduleLoaderPrototypeSetStateToMaxCodeLength = 124;
static const JSC::Intrinsic s_moduleLoaderPrototypeSetStateToMaxCodeIntrinsic = JSC::NoIntrinsic;
const char* s_moduleLoaderPrototypeSetStateToMaxCode =
"(function (entry, newState)\n" \
"{\n" \
" //\n" \
"\n" \
" \"use strict\";\n" \
"\n" \
" if (entry.state < newState)\n" \
" entry.state = newState;\n" \
"})\n" \
;
const JSC::ConstructAbility s_moduleLoaderPrototypeNewRegistryEntryCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const int s_moduleLoaderPrototypeNewRegistryEntryCodeLength = 634;
static const JSC::Intrinsic s_moduleLoaderPrototypeNewRegistryEntryCodeIntrinsic = JSC::NoIntrinsic;
const char* s_moduleLoaderPrototypeNewRegistryEntryCode =
"(function (key)\n" \
"{\n" \
" //\n" \
" //\n" \
" //\n" \
" //\n" \
" //\n" \
" //\n" \
" //\n" \
" //\n" \
" //\n" \
" //\n" \
" //\n" \
" //\n" \
" //\n" \
" //\n" \
" //\n" \
" //\n" \
" //\n" \
" //\n" \
" //\n" \
" //\n" \
" //\n" \
" //\n" \
" //\n" \
" //\n" \
" //\n" \
" //\n" \
" //\n" \
" //\n" \
" //\n" \
" //\n" \
" //\n" \
" //\n" \
" //\n" \
" //\n" \
" //\n" \
" //\n" \
" //\n" \
" //\n" \
" //\n" \
" //\n" \
"\n" \
" \"use strict\";\n" \
"\n" \
" return {\n" \
" key: key,\n" \
" state: @ModuleFetch,\n" \
" fetch: @undefined,\n" \
" instantiate: @undefined,\n" \
" satisfy: @undefined,\n" \
" dependencies: [], //\n" \
" dependenciesMap: @undefined,\n" \
" module: @undefined, //\n" \
" linkError: @undefined,\n" \
" linkSucceeded: true,\n" \
" };\n" \
"})\n" \
;
const JSC::ConstructAbility s_moduleLoaderPrototypeEnsureRegisteredCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const int s_moduleLoaderPrototypeEnsureRegisteredCodeLength = 218;
static const JSC::Intrinsic s_moduleLoaderPrototypeEnsureRegisteredCodeIntrinsic = JSC::NoIntrinsic;
const char* s_moduleLoaderPrototypeEnsureRegisteredCode =
"(function (key)\n" \
"{\n" \
" //\n" \
"\n" \
" \"use strict\";\n" \
"\n" \
" var entry = this.registry.@get(key);\n" \
" if (entry)\n" \
" return entry;\n" \
"\n" \
" entry = @newRegistryEntry(key);\n" \
" this.registry.@set(key, entry);\n" \
"\n" \
" return entry;\n" \
"})\n" \
;
const JSC::ConstructAbility s_moduleLoaderPrototypeForceFulfillPromiseCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const int s_moduleLoaderPrototypeForceFulfillPromiseCodeLength = 148;
static const JSC::Intrinsic s_moduleLoaderPrototypeForceFulfillPromiseCodeIntrinsic = JSC::NoIntrinsic;
const char* s_moduleLoaderPrototypeForceFulfillPromiseCode =
"(function (promise, value)\n" \
"{\n" \
" \"use strict\";\n" \
"\n" \
" if (promise.@promiseState === @promiseStatePending)\n" \
" @fulfillPromise(promise, value);\n" \
"})\n" \
;
const JSC::ConstructAbility s_moduleLoaderPrototypeFulfillFetchCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const int s_moduleLoaderPrototypeFulfillFetchCodeLength = 250;
static const JSC::Intrinsic s_moduleLoaderPrototypeFulfillFetchCodeIntrinsic = JSC::NoIntrinsic;
const char* s_moduleLoaderPrototypeFulfillFetchCode =
"(function (entry, source)\n" \
"{\n" \
" //\n" \
"\n" \
" \"use strict\";\n" \
"\n" \
" if (!entry.fetch)\n" \
" entry.fetch = @newPromiseCapability(@InternalPromise).@promise;\n" \
" this.forceFulfillPromise(entry.fetch, source);\n" \
" @setStateToMax(entry, @ModuleInstantiate);\n" \
"})\n" \
;
const JSC::ConstructAbility s_moduleLoaderPrototypeFulfillInstantiateCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const int s_moduleLoaderPrototypeFulfillInstantiateCodeLength = 336;
static const JSC::Intrinsic s_moduleLoaderPrototypeFulfillInstantiateCodeIntrinsic = JSC::NoIntrinsic;
const char* s_moduleLoaderPrototypeFulfillInstantiateCode =
"(function (entry, optionalInstance, source)\n" \
"{\n" \
" //\n" \
"\n" \
" \"use strict\";\n" \
"\n" \
" if (!entry.instantiate)\n" \
" entry.instantiate = @newPromiseCapability(@InternalPromise).@promise;\n" \
" this.commitInstantiated(entry, optionalInstance, source);\n" \
"\n" \
" //\n" \
" //\n" \
" //\n" \
" //\n" \
" //\n" \
" this.forceFulfillPromise(entry.instantiate, entry);\n" \
"})\n" \
;
const JSC::ConstructAbility s_moduleLoaderPrototypeCommitInstantiatedCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const int s_moduleLoaderPrototypeCommitInstantiatedCodeLength = 861;
static const JSC::Intrinsic s_moduleLoaderPrototypeCommitInstantiatedCodeIntrinsic = JSC::NoIntrinsic;
const char* s_moduleLoaderPrototypeCommitInstantiatedCode =
"(function (entry, optionalInstance, source)\n" \
"{\n" \
" //\n" \
"\n" \
" \"use strict\";\n" \
"\n" \
" var moduleRecord = this.instantiation(optionalInstance, source, entry);\n" \
"\n" \
" //\n" \
" //\n" \
" //\n" \
" //\n" \
" //\n" \
" //\n" \
"\n" \
" var dependencies = [];\n" \
" var dependenciesMap = moduleRecord.dependenciesMap;\n" \
" moduleRecord.registryEntry = entry;\n" \
" var requestedModules = this.requestedModules(moduleRecord);\n" \
" for (var i = 0, length = requestedModules.length; i < length; ++i) {\n" \
" var depKey = requestedModules[i];\n" \
" var pair = {\n" \
" key: depKey,\n" \
" value: @undefined\n" \
" };\n" \
" @putByValDirect(dependencies, dependencies.length, pair);\n" \
" dependenciesMap.@set(depKey, pair);\n" \
" }\n" \
" entry.dependencies = dependencies;\n" \
" entry.dependenciesMap = dependenciesMap;\n" \
" entry.module = moduleRecord;\n" \
" @setStateToMax(entry, @ModuleSatisfy);\n" \
"})\n" \
;
const JSC::ConstructAbility s_moduleLoaderPrototypeInstantiationCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const int s_moduleLoaderPrototypeInstantiationCodeLength = 128;
static const JSC::Intrinsic s_moduleLoaderPrototypeInstantiationCodeIntrinsic = JSC::NoIntrinsic;
const char* s_moduleLoaderPrototypeInstantiationCode =
"(function (result, source, entry)\n" \
"{\n" \
" //\n" \
" //\n" \
" //\n" \
"\n" \
" \"use strict\";\n" \
"\n" \
" return this.parseModule(entry.key, source);\n" \
"})\n" \
;
const JSC::ConstructAbility s_moduleLoaderPrototypeRequestFetchCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const int s_moduleLoaderPrototypeRequestFetchCodeLength = 399;
static const JSC::Intrinsic s_moduleLoaderPrototypeRequestFetchCodeIntrinsic = JSC::NoIntrinsic;
const char* s_moduleLoaderPrototypeRequestFetchCode =
"(function (key, fetcher)\n" \
"{\n" \
" //\n" \
"\n" \
" \"use strict\";\n" \
"\n" \
" var entry = this.ensureRegistered(key);\n" \
" if (entry.fetch)\n" \
" return entry.fetch;\n" \
"\n" \
" //\n" \
" //\n" \
" //\n" \
" //\n" \
" //\n" \
" //\n" \
" var fetchPromise = this.fetch(key, fetcher).then((source) => {\n" \
" @setStateToMax(entry, @ModuleInstantiate);\n" \
" return source;\n" \
" });\n" \
" entry.fetch = fetchPromise;\n" \
" return fetchPromise;\n" \
"})\n" \
;
const JSC::ConstructAbility s_moduleLoaderPrototypeRequestInstantiateCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const int s_moduleLoaderPrototypeRequestInstantiateCodeLength = 594;
static const JSC::Intrinsic s_moduleLoaderPrototypeRequestInstantiateCodeIntrinsic = JSC::NoIntrinsic;
const char* s_moduleLoaderPrototypeRequestInstantiateCode =
"(function (key, fetcher)\n" \
"{\n" \
" //\n" \
"\n" \
" \"use strict\";\n" \
"\n" \
" var entry = this.ensureRegistered(key);\n" \
" if (entry.instantiate)\n" \
" return entry.instantiate;\n" \
"\n" \
" var instantiatePromise = this.requestFetch(key, fetcher).then((source) => {\n" \
" //\n" \
" //\n" \
" //\n" \
" //\n" \
" //\n" \
" //\n" \
" //\n" \
" return this.instantiate(key, source, fetcher).then((optionalInstance) => {\n" \
" this.commitInstantiated(entry, optionalInstance, source);\n" \
" return entry;\n" \
" });\n" \
" });\n" \
" entry.instantiate = instantiatePromise;\n" \
" return instantiatePromise;\n" \
"})\n" \
;
const JSC::ConstructAbility s_moduleLoaderPrototypeRequestSatisfyCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const int s_moduleLoaderPrototypeRequestSatisfyCodeLength = 1521;
static const JSC::Intrinsic s_moduleLoaderPrototypeRequestSatisfyCodeIntrinsic = JSC::NoIntrinsic;
const char* s_moduleLoaderPrototypeRequestSatisfyCode =
"(function (key, fetcher)\n" \
"{\n" \
" //\n" \
"\n" \
" \"use strict\";\n" \
"\n" \
" var entry = this.ensureRegistered(key);\n" \
" if (entry.satisfy)\n" \
" return entry.satisfy;\n" \
"\n" \
" var satisfyPromise = this.requestInstantiate(key, fetcher).then((entry) => {\n" \
" var depLoads = [];\n" \
" for (var i = 0, length = entry.dependencies.length; i < length; ++i) {\n" \
" let pair = entry.dependencies[i];\n" \
"\n" \
" //\n" \
" //\n" \
" //\n" \
" //\n" \
" //\n" \
" var promise = this.resolve(pair.key, key, fetcher).then((depKey) => {\n" \
" var depEntry = this.ensureRegistered(depKey);\n" \
"\n" \
" //\n" \
" //\n" \
" //\n" \
" //\n" \
" //\n" \
" //\n" \
" //\n" \
" //\n" \
" //\n" \
" if (depEntry.satisfy) {\n" \
" return depEntry.instantiate.then((entry) => {\n" \
" pair.value = entry.module;\n" \
" return entry;\n" \
" });\n" \
" }\n" \
"\n" \
" return this.requestSatisfy(depKey, fetcher).then((entry) => {\n" \
" pair.value = entry.module;\n" \
" return entry;\n" \
" });\n" \
" });\n" \
" @putByValDirect(depLoads, depLoads.length, promise);\n" \
" }\n" \
"\n" \
" return @InternalPromise.internalAll(depLoads).then((modules) => {\n" \
" @setStateToMax(entry, @ModuleLink);\n" \
" return entry;\n" \
" });\n" \
" });\n" \
"\n" \
" entry.satisfy = satisfyPromise;\n" \
" return satisfyPromise;\n" \
"})\n" \
;
const JSC::ConstructAbility s_moduleLoaderPrototypeRequestLinkCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const int s_moduleLoaderPrototypeRequestLinkCodeLength = 423;
static const JSC::Intrinsic s_moduleLoaderPrototypeRequestLinkCodeIntrinsic = JSC::NoIntrinsic;
const char* s_moduleLoaderPrototypeRequestLinkCode =
"(function (key, fetcher)\n" \
"{\n" \
" //\n" \
"\n" \
" \"use strict\";\n" \
"\n" \
" var entry = this.ensureRegistered(key);\n" \
" if (entry.state > @ModuleLink) {\n" \
" var deferred = @newPromiseCapability(@InternalPromise);\n" \
" deferred.@resolve.@call(@undefined, entry);\n" \
" return deferred.@promise;\n" \
" }\n" \
"\n" \
" return this.requestSatisfy(key, fetcher).then((entry) => {\n" \
" this.link(entry, fetcher);\n" \
" return entry;\n" \
" });\n" \
"})\n" \
;
const JSC::ConstructAbility s_moduleLoaderPrototypeRequestReadyCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const int s_moduleLoaderPrototypeRequestReadyCodeLength = 179;
static const JSC::Intrinsic s_moduleLoaderPrototypeRequestReadyCodeIntrinsic = JSC::NoIntrinsic;
const char* s_moduleLoaderPrototypeRequestReadyCode =
"(function (key, fetcher)\n" \
"{\n" \
" //\n" \
"\n" \
" \"use strict\";\n" \
"\n" \
" return this.requestLink(key, fetcher).then((entry) => {\n" \
" this.moduleEvaluation(entry.module, fetcher);\n" \
" });\n" \
"})\n" \
;
const JSC::ConstructAbility s_moduleLoaderPrototypeLinkCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const int s_moduleLoaderPrototypeLinkCodeLength = 675;
static const JSC::Intrinsic s_moduleLoaderPrototypeLinkCodeIntrinsic = JSC::NoIntrinsic;
const char* s_moduleLoaderPrototypeLinkCode =
"(function (entry, fetcher)\n" \
"{\n" \
" //\n" \
"\n" \
" \"use strict\";\n" \
"\n" \
" if (!entry.linkSucceeded)\n" \
" throw entry.linkError;\n" \
" if (entry.state === @ModuleReady)\n" \
" return;\n" \
" @setStateToMax(entry, @ModuleReady);\n" \
"\n" \
" try {\n" \
" //\n" \
" //\n" \
" //\n" \
" var dependencies = entry.dependencies;\n" \
" for (var i = 0, length = dependencies.length; i < length; ++i) {\n" \
" var pair = dependencies[i];\n" \
" this.link(pair.value.registryEntry, fetcher);\n" \
" }\n" \
"\n" \
" this.moduleDeclarationInstantiation(entry.module, fetcher);\n" \
" } catch (error) {\n" \
" entry.linkSucceeded = false;\n" \
" entry.linkError = error;\n" \
" throw error;\n" \
" }\n" \
"})\n" \
;
const JSC::ConstructAbility s_moduleLoaderPrototypeModuleEvaluationCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const int s_moduleLoaderPrototypeModuleEvaluationCodeLength = 518;
static const JSC::Intrinsic s_moduleLoaderPrototypeModuleEvaluationCodeIntrinsic = JSC::NoIntrinsic;
const char* s_moduleLoaderPrototypeModuleEvaluationCode =
"(function (moduleRecord, fetcher)\n" \
"{\n" \
" //\n" \
"\n" \
" \"use strict\";\n" \
"\n" \
" if (moduleRecord.evaluated)\n" \
" return;\n" \
" moduleRecord.evaluated = true;\n" \
"\n" \
" var entry = moduleRecord.registryEntry;\n" \
"\n" \
" //\n" \
" var dependencies = entry.dependencies;\n" \
" for (var i = 0, length = dependencies.length; i < length; ++i) {\n" \
" var pair = dependencies[i];\n" \
" var requiredModuleRecord = pair.value;\n" \
" this.moduleEvaluation(requiredModuleRecord, fetcher);\n" \
" }\n" \
" this.evaluate(entry.key, moduleRecord, fetcher);\n" \
"})\n" \
;
const JSC::ConstructAbility s_moduleLoaderPrototypeProvideCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const int s_moduleLoaderPrototypeProvideCodeLength = 719;
static const JSC::Intrinsic s_moduleLoaderPrototypeProvideCodeIntrinsic = JSC::NoIntrinsic;
const char* s_moduleLoaderPrototypeProvideCode =
"(function (key, stage, value)\n" \
"{\n" \
" \"use strict\";\n" \
"\n" \
" var entry = this.ensureRegistered(key);\n" \
"\n" \
" if (stage === @ModuleFetch) {\n" \
" if (entry.state > @ModuleFetch)\n" \
" @throwTypeError(\"Requested module is already fetched.\");\n" \
" this.fulfillFetch(entry, value);\n" \
" return;\n" \
" }\n" \
"\n" \
" if (stage === @ModuleInstantiate) {\n" \
" if (entry.state > @ModuleInstantiate)\n" \
" @throwTypeError(\"Requested module is already instantiated.\");\n" \
" this.fulfillFetch(entry, @undefined);\n" \
" entry.fetch.then((source) => {\n" \
" this.fulfillInstantiate(entry, value, source);\n" \
" });\n" \
" return;\n" \
" }\n" \
"\n" \
" @throwTypeError(\"Requested module is already ready to be executed.\");\n" \
"})\n" \
;
const JSC::ConstructAbility s_moduleLoaderPrototypeLoadAndEvaluateModuleCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const int s_moduleLoaderPrototypeLoadAndEvaluateModuleCodeLength = 221;
static const JSC::Intrinsic s_moduleLoaderPrototypeLoadAndEvaluateModuleCodeIntrinsic = JSC::NoIntrinsic;
const char* s_moduleLoaderPrototypeLoadAndEvaluateModuleCode =
"(function (moduleName, referrer, fetcher)\n" \
"{\n" \
" \"use strict\";\n" \
"\n" \
" //\n" \
" //\n" \
" //\n" \
" //\n" \
" return this.resolve(moduleName, referrer, fetcher).then((key) => {\n" \
" return this.requestReady(key, fetcher);\n" \
" });\n" \
"})\n" \
;
const JSC::ConstructAbility s_moduleLoaderPrototypeLoadModuleCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const int s_moduleLoaderPrototypeLoadModuleCodeLength = 274;
static const JSC::Intrinsic s_moduleLoaderPrototypeLoadModuleCodeIntrinsic = JSC::NoIntrinsic;
const char* s_moduleLoaderPrototypeLoadModuleCode =
"(function (moduleName, referrer, fetcher)\n" \
"{\n" \
" \"use strict\";\n" \
"\n" \
" //\n" \
" //\n" \
" //\n" \
" //\n" \
" return this.resolve(moduleName, referrer, fetcher).then((key) => {\n" \
" return this.requestSatisfy(key, fetcher);\n" \
" }).then((entry) => {\n" \
" return entry.key;\n" \
" });\n" \
"})\n" \
;
const JSC::ConstructAbility s_promisePrototypeThenCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const int s_promisePrototypeThenCodeLength = 1045;
static const JSC::Intrinsic s_promisePrototypeThenCodeIntrinsic = JSC::NoIntrinsic;
const char* s_promisePrototypeThenCode =
"(function (onFulfilled, onRejected)\n" \
"{\n" \
" \"use strict\";\n" \
"\n" \
" if (!@isPromise(this))\n" \
" @throwTypeError(\"|this| is not a object\");\n" \
"\n" \
" var constructor = @speciesConstructor(this, @Promise);\n" \
"\n" \
" var resultCapability = @newPromiseCapability(constructor);\n" \
"\n" \
" if (typeof onFulfilled !== \"function\")\n" \
" onFulfilled = function (argument) { return argument; };\n" \
"\n" \
" if (typeof onRejected !== \"function\")\n" \
" onRejected = function (argument) { throw argument; };\n" \
"\n" \
" var reaction = @newPromiseReaction(resultCapability, onFulfilled, onRejected);\n" \
"\n" \
" var state = this.@promiseState;\n" \
" if (state === @promiseStatePending)\n" \
" @putByValDirect(this.@promiseReactions, this.@promiseReactions.length, reaction);\n" \
" else {\n" \
" if (state === @promiseStateRejected && !this.@promiseIsHandled)\n" \
" @hostPromiseRejectionTracker(this, @promiseRejectionHandle);\n" \
" @enqueueJob(@promiseReactionJob, [state, reaction, this.@promiseResult]);\n" \
" }\n" \
"\n" \
" this.@promiseIsHandled = true;\n" \
"\n" \
" return resultCapability.@promise;\n" \
"})\n" \
;
const JSC::ConstructAbility s_reflectObjectApplyCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const int s_reflectObjectApplyCodeLength = 369;
static const JSC::Intrinsic s_reflectObjectApplyCodeIntrinsic = JSC::NoIntrinsic;
const char* s_reflectObjectApplyCode =
"(function (target, thisArgument, argumentsList)\n" \
"{\n" \
" \"use strict\";\n" \
"\n" \
" if (typeof target !== \"function\")\n" \
" @throwTypeError(\"Reflect.apply requires the first argument be a function\");\n" \
"\n" \
" if (!@isObject(argumentsList))\n" \
" @throwTypeError(\"Reflect.apply requires the third argument be an object\");\n" \
"\n" \
" return target.@apply(thisArgument, argumentsList);\n" \
"})\n" \
;
const JSC::ConstructAbility s_reflectObjectDeletePropertyCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const int s_reflectObjectDeletePropertyCodeLength = 212;
static const JSC::Intrinsic s_reflectObjectDeletePropertyCodeIntrinsic = JSC::NoIntrinsic;
const char* s_reflectObjectDeletePropertyCode =
"(function (target, propertyKey)\n" \
"{\n" \
" //\n" \
" //\n" \
"\n" \
" if (!@isObject(target))\n" \
" @throwTypeError(\"Reflect.deleteProperty requires the first argument be an object\");\n" \
"\n" \
" return delete target[propertyKey];\n" \
"})\n" \
;
const JSC::ConstructAbility s_reflectObjectHasCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const int s_reflectObjectHasCodeLength = 200;
static const JSC::Intrinsic s_reflectObjectHasCodeIntrinsic = JSC::NoIntrinsic;
const char* s_reflectObjectHasCode =
"(function (target, propertyKey)\n" \
"{\n" \
" \"use strict\";\n" \
"\n" \
" if (!@isObject(target))\n" \
" @throwTypeError(\"Reflect.has requires the first argument be an object\");\n" \
"\n" \
" return propertyKey in target;\n" \
"})\n" \
;
const JSC::ConstructAbility s_regExpPrototypeAdvanceStringIndexCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const int s_regExpPrototypeAdvanceStringIndexCodeLength = 427;
static const JSC::Intrinsic s_regExpPrototypeAdvanceStringIndexCodeIntrinsic = JSC::NoIntrinsic;
const char* s_regExpPrototypeAdvanceStringIndexCode =
"(function (string, index, unicode)\n" \
"{\n" \
" //\n" \
" \"use strict\";\n" \
"\n" \
" if (!unicode)\n" \
" return index + 1;\n" \
"\n" \
" if (index + 1 >= string.length)\n" \
" return index + 1;\n" \
"\n" \
" let first = string.@charCodeAt(index);\n" \
" if (first < 0xD800 || first > 0xDBFF)\n" \
" return index + 1;\n" \
"\n" \
" let second = string.@charCodeAt(index + 1);\n" \
" if (second < 0xDC00 || second > 0xDFFF)\n" \
" return index + 1;\n" \
"\n" \
" return index + 2;\n" \
"})\n" \
;
const JSC::ConstructAbility s_regExpPrototypeRegExpExecCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const int s_regExpPrototypeRegExpExecCodeLength = 435;
static const JSC::Intrinsic s_regExpPrototypeRegExpExecCodeIntrinsic = JSC::NoIntrinsic;
const char* s_regExpPrototypeRegExpExecCode =
"(function (regexp, str)\n" \
"{\n" \
" \"use strict\";\n" \
"\n" \
" let exec = regexp.exec;\n" \
" let builtinExec = @regExpBuiltinExec;\n" \
" if (exec !== builtinExec && typeof exec === \"function\") {\n" \
" let result = exec.@call(regexp, str);\n" \
" if (result !== null && !@isObject(result))\n" \
" @throwTypeError(\"The result of a RegExp exec must be null or an object\");\n" \
" return result;\n" \
" }\n" \
" return builtinExec.@call(regexp, str);\n" \
"})\n" \
;
const JSC::ConstructAbility s_regExpPrototypeHasObservableSideEffectsForRegExpMatchCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const int s_regExpPrototypeHasObservableSideEffectsForRegExpMatchCodeLength = 440;
static const JSC::Intrinsic s_regExpPrototypeHasObservableSideEffectsForRegExpMatchCodeIntrinsic = JSC::NoIntrinsic;
const char* s_regExpPrototypeHasObservableSideEffectsForRegExpMatchCode =
"(function (regexp) {\n" \
" //\n" \
" let regexpExec = @tryGetById(regexp, \"exec\");\n" \
" if (regexpExec !== @regExpBuiltinExec)\n" \
" return true;\n" \
"\n" \
" let regexpGlobal = @tryGetById(regexp, \"global\");\n" \
" if (regexpGlobal !== @regExpProtoGlobalGetter)\n" \
" return true;\n" \
" let regexpUnicode = @tryGetById(regexp, \"unicode\");\n" \
" if (regexpUnicode !== @regExpProtoUnicodeGetter)\n" \
" return true;\n" \
"\n" \
" return !@isRegExpObject(regexp);\n" \
"})\n" \
;
const JSC::ConstructAbility s_regExpPrototypeMatchCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const int s_regExpPrototypeMatchCodeLength = 1238;
static const JSC::Intrinsic s_regExpPrototypeMatchCodeIntrinsic = JSC::NoIntrinsic;
const char* s_regExpPrototypeMatchCode =
"(function (strArg)\n" \
"{\n" \
" \"use strict\";\n" \
"\n" \
" if (!@isObject(this))\n" \
" @throwTypeError(\"RegExp.prototype.@@match requires that |this| be an Object\");\n" \
"\n" \
" let regexp = this;\n" \
"\n" \
" //\n" \
" if (!@hasObservableSideEffectsForRegExpMatch(regexp))\n" \
" return @regExpMatchFast.@call(regexp, strArg);\n" \
"\n" \
" let str = @toString(strArg);\n" \
"\n" \
" if (!regexp.global)\n" \
" return @regExpExec(regexp, str);\n" \
" \n" \
" let unicode = regexp.unicode;\n" \
" regexp.lastIndex = 0;\n" \
" let resultList = [];\n" \
"\n" \
" //\n" \
" //\n" \
" //\n" \
" const maximumReasonableMatchSize = 100000000;\n" \
"\n" \
" while (true) {\n" \
" let result = @regExpExec(regexp, str);\n" \
" \n" \
" if (result === null) {\n" \
" if (resultList.length === 0)\n" \
" return null;\n" \
" return resultList;\n" \
" }\n" \
"\n" \
" if (resultList.length > maximumReasonableMatchSize)\n" \
" @throwOutOfMemoryError();\n" \
"\n" \
" if (!@isObject(result))\n" \
" @throwTypeError(\"RegExp.prototype.@@match call to RegExp.exec didn't return null or an object\");\n" \
"\n" \
" let resultString = @toString(result[0]);\n" \
"\n" \
" if (!resultString.length)\n" \
" regexp.lastIndex = @advanceStringIndex(str, regexp.lastIndex, unicode);\n" \
"\n" \
" resultList.@push(resultString);\n" \
" }\n" \
"})\n" \
;
const JSC::ConstructAbility s_regExpPrototypeReplaceCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const int s_regExpPrototypeReplaceCodeLength = 5330;
static const JSC::Intrinsic s_regExpPrototypeReplaceCodeIntrinsic = JSC::NoIntrinsic;
const char* s_regExpPrototypeReplaceCode =
"(function (strArg, replace)\n" \
"{\n" \
" \"use strict\";\n" \
"\n" \
" function getSubstitution(matched, str, position, captures, replacement)\n" \
" {\n" \
" \"use strict\";\n" \
"\n" \
" let matchLength = matched.length;\n" \
" let stringLength = str.length;\n" \
" let tailPos = position + matchLength;\n" \
" let m = captures.length;\n" \
" let replacementLength = replacement.length;\n" \
" let result = \"\";\n" \
" let lastStart = 0;\n" \
"\n" \
" for (let start = 0; start = replacement.indexOf(\"$\", lastStart), start !== -1; lastStart = start) {\n" \
" if (start - lastStart > 0)\n" \
" result = result + replacement.substring(lastStart, start);\n" \
" start++;\n" \
" let ch = replacement.charAt(start);\n" \
" if (ch === \"\")\n" \
" result = result + \"$\";\n" \
" else {\n" \
" switch (ch)\n" \
" {\n" \
" case \"$\":\n" \
" result = result + \"$\";\n" \
" start++;\n" \
" break;\n" \
" case \"&\":\n" \
" result = result + matched;\n" \
" start++;\n" \
" break;\n" \
" case \"`\":\n" \
" if (position > 0)\n" \
" result = result + str.substring(0, position);\n" \
" start++;\n" \
" break;\n" \
" case \"'\":\n" \
" if (tailPos < stringLength)\n" \
" result = result + str.substring(tailPos);\n" \
" start++;\n" \
" break;\n" \
" default:\n" \
" let chCode = ch.charCodeAt(0);\n" \
" if (chCode >= 0x30 && chCode <= 0x39) {\n" \
" start++;\n" \
" let n = chCode - 0x30;\n" \
" if (n > m)\n" \
" break;\n" \
" if (start < replacementLength) {\n" \
" let nextChCode = replacement.charCodeAt(start);\n" \
" if (nextChCode >= 0x30 && nextChCode <= 0x39) {\n" \
" let nn = 10 * n + nextChCode - 0x30;\n" \
" if (nn <= m) {\n" \
" n = nn;\n" \
" start++;\n" \
" }\n" \
" }\n" \
" }\n" \
"\n" \
" if (n == 0)\n" \
" break;\n" \
"\n" \
" if (captures[n] != @undefined)\n" \
" result = result + captures[n];\n" \
" } else\n" \
" result = result + \"$\";\n" \
" break;\n" \
" }\n" \
" }\n" \
" }\n" \
"\n" \
" return result + replacement.substring(lastStart);\n" \
" }\n" \
"\n" \
" if (!@isObject(this))\n" \
" @throwTypeError(\"RegExp.prototype.@@replace requires that |this| be an Object\");\n" \
"\n" \
" let regexp = this;\n" \
"\n" \
" let str = @toString(strArg);\n" \
" let stringLength = str.length;\n" \
" let functionalReplace = typeof replace === 'function';\n" \
"\n" \
" if (!functionalReplace)\n" \
" replace = @toString(replace);\n" \
"\n" \
" let global = regexp.global;\n" \
" let unicode = false;\n" \
"\n" \
" if (global) {\n" \
" unicode = regexp.unicode;\n" \
" regexp.lastIndex = 0;\n" \
" }\n" \
"\n" \
" let resultList = [];\n" \
" let result;\n" \
" let done = false;\n" \
" while (!done) {\n" \
" result = @regExpExec(regexp, str);\n" \
"\n" \
" if (result === null)\n" \
" done = true;\n" \
" else {\n" \
" resultList.@push(result);\n" \
" if (!global)\n" \
" done = true;\n" \
" else {\n" \
" let matchStr = @toString(result[0]);\n" \
"\n" \
" if (!matchStr.length)\n" \
" regexp.lastIndex = @advanceStringIndex(str, regexp.lastIndex, unicode);\n" \
" }\n" \
" }\n" \
" }\n" \
"\n" \
" let accumulatedResult = \"\";\n" \
" let nextSourcePosition = 0;\n" \
" let lastPosition = 0;\n" \
"\n" \
" for (let i = 0, resultListLength = resultList.length; i < resultListLength; ++i) {\n" \
" let result = resultList[i];\n" \
" let nCaptures = result.length - 1;\n" \
" if (nCaptures < 0)\n" \
" nCaptures = 0;\n" \
" let matched = @toString(result[0]);\n" \
" let matchLength = matched.length;\n" \
" let position = result.index;\n" \
" position = (position > stringLength) ? stringLength : position;\n" \
" position = (position < 0) ? 0 : position;\n" \
"\n" \
" let captures = [];\n" \
" for (let n = 1; n <= nCaptures; n++) {\n" \
" let capN = result[n];\n" \
" if (capN !== @undefined)\n" \
" capN = @toString(capN);\n" \
" captures[n] = capN;\n" \
" }\n" \
"\n" \
" let replacement;\n" \
"\n" \
" if (functionalReplace) {\n" \
" let replacerArgs = [ matched ].concat(captures.slice(1));\n" \
" replacerArgs.@push(position);\n" \
" replacerArgs.@push(str);\n" \
"\n" \
" let replValue = replace.@apply(@undefined, replacerArgs);\n" \
" replacement = @toString(replValue);\n" \
" } else\n" \
" replacement = getSubstitution(matched, str, position, captures, replace);\n" \
"\n" \
" if (position >= nextSourcePosition && position >= lastPosition) {\n" \
" accumulatedResult = accumulatedResult + str.substring(nextSourcePosition, position) + replacement;\n" \
" nextSourcePosition = position + matchLength;\n" \
" lastPosition = position;\n" \
" }\n" \
" }\n" \
"\n" \
" if (nextSourcePosition >= stringLength)\n" \
" return accumulatedResult;\n" \
"\n" \
" return accumulatedResult + str.substring(nextSourcePosition);\n" \
"})\n" \
;
const JSC::ConstructAbility s_regExpPrototypeSearchCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const int s_regExpPrototypeSearchCodeLength = 784;
static const JSC::Intrinsic s_regExpPrototypeSearchCodeIntrinsic = JSC::NoIntrinsic;
const char* s_regExpPrototypeSearchCode =
"(function (strArg)\n" \
"{\n" \
" \"use strict\";\n" \
"\n" \
" let regexp = this;\n" \
"\n" \
" //\n" \
" if (@isRegExpObject(regexp) && @tryGetById(regexp, \"exec\") === @regExpBuiltinExec)\n" \
" return @regExpSearchFast.@call(regexp, strArg);\n" \
"\n" \
" //\n" \
" //\n" \
" if (!@isObject(this))\n" \
" @throwTypeError(\"RegExp.prototype.@@search requires that |this| be an Object\");\n" \
"\n" \
" //\n" \
" let str = @toString(strArg)\n" \
"\n" \
" //\n" \
" let previousLastIndex = regexp.lastIndex;\n" \
"\n" \
" //\n" \
" //\n" \
" //\n" \
" if (previousLastIndex !== 0)\n" \
" regexp.lastIndex = 0;\n" \
"\n" \
" //\n" \
" let result = @regExpExec(regexp, str);\n" \
"\n" \
" //\n" \
" //\n" \
" //\n" \
" //\n" \
" if (regexp.lastIndex !== previousLastIndex)\n" \
" regexp.lastIndex = previousLastIndex;\n" \
"\n" \
" //\n" \
" if (result === null)\n" \
" return -1;\n" \
"\n" \
" //\n" \
" return result.index;\n" \
"})\n" \
;
const JSC::ConstructAbility s_regExpPrototypeHasObservableSideEffectsForRegExpSplitCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const int s_regExpPrototypeHasObservableSideEffectsForRegExpSplitCodeLength = 1133;
static const JSC::Intrinsic s_regExpPrototypeHasObservableSideEffectsForRegExpSplitCodeIntrinsic = JSC::NoIntrinsic;
const char* s_regExpPrototypeHasObservableSideEffectsForRegExpSplitCode =
"(function (regexp) {\n" \
" //\n" \
" let regexpExec = @tryGetById(regexp, \"exec\");\n" \
" if (regexpExec !== @regExpBuiltinExec)\n" \
" return true;\n" \
" \n" \
" //\n" \
" let regexpFlags = @tryGetById(regexp, \"flags\");\n" \
" if (regexpFlags !== @regExpProtoFlagsGetter)\n" \
" return true;\n" \
" \n" \
" //\n" \
" let regexpGlobal = @tryGetById(regexp, \"global\");\n" \
" if (regexpGlobal !== @regExpProtoGlobalGetter)\n" \
" return true;\n" \
" let regexpIgnoreCase = @tryGetById(regexp, \"ignoreCase\");\n" \
" if (regexpIgnoreCase !== @regExpProtoIgnoreCaseGetter)\n" \
" return true;\n" \
" let regexpMultiline = @tryGetById(regexp, \"multiline\");\n" \
" if (regexpMultiline !== @regExpProtoMultilineGetter)\n" \
" return true;\n" \
" let regexpSticky = @tryGetById(regexp, \"sticky\");\n" \
" if (regexpSticky !== @regExpProtoStickyGetter)\n" \
" return true;\n" \
" let regexpUnicode = @tryGetById(regexp, \"unicode\");\n" \
" if (regexpUnicode !== @regExpProtoUnicodeGetter)\n" \
" return true;\n" \
" \n" \
" //\n" \
" let regexpSource = @tryGetById(regexp, \"source\");\n" \
" if (regexpSource !== @regExpProtoSourceGetter)\n" \
" return true;\n" \
" \n" \
" return !@isRegExpObject(regexp);\n" \
"})\n" \
;
const JSC::ConstructAbility s_regExpPrototypeSplitCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const int s_regExpPrototypeSplitCodeLength = 3288;
static const JSC::Intrinsic s_regExpPrototypeSplitCodeIntrinsic = JSC::NoIntrinsic;
const char* s_regExpPrototypeSplitCode =
"(function (string, limit)\n" \
"{\n" \
" \"use strict\";\n" \
"\n" \
" //\n" \
" //\n" \
" if (!@isObject(this))\n" \
" @throwTypeError(\"RegExp.prototype.@@split requires that |this| be an Object\");\n" \
" let regexp = this;\n" \
"\n" \
" //\n" \
" let str = @toString(string);\n" \
"\n" \
" //\n" \
" let speciesConstructor = @speciesConstructor(regexp, @RegExp);\n" \
"\n" \
" if (speciesConstructor === @RegExp && !@hasObservableSideEffectsForRegExpSplit(regexp))\n" \
" return @regExpSplitFast.@call(regexp, str, limit);\n" \
"\n" \
" //\n" \
" let flags = @toString(regexp.flags);\n" \
"\n" \
" //\n" \
" //\n" \
" let unicodeMatching = @stringIncludesInternal.@call(flags, \"u\");\n" \
" //\n" \
" //\n" \
" let newFlags = @stringIncludesInternal.@call(flags, \"y\") ? flags : flags + \"y\";\n" \
"\n" \
" //\n" \
" let splitter = new speciesConstructor(regexp, newFlags);\n" \
"\n" \
" //\n" \
" //\n" \
" if (!@hasObservableSideEffectsForRegExpSplit(splitter))\n" \
" return @regExpSplitFast.@call(splitter, str, limit);\n" \
"\n" \
" //\n" \
" //\n" \
" let result = [];\n" \
"\n" \
" //\n" \
" limit = (limit === @undefined) ? 0xffffffff : limit >>> 0;\n" \
"\n" \
" //\n" \
" if (!limit)\n" \
" return result;\n" \
"\n" \
" //\n" \
" let size = str.length;\n" \
"\n" \
" //\n" \
" if (!size) {\n" \
" //\n" \
" let z = @regExpExec(splitter, str);\n" \
" //\n" \
" if (z != null)\n" \
" return result;\n" \
" //\n" \
" @putByValDirect(result, 0, str);\n" \
" //\n" \
" return result;\n" \
" }\n" \
"\n" \
" //\n" \
" let position = 0;\n" \
" //\n" \
" let matchPosition = 0;\n" \
"\n" \
" //\n" \
" while (matchPosition < size) {\n" \
" //\n" \
" splitter.lastIndex = matchPosition;\n" \
" //\n" \
" let matches = @regExpExec(splitter, str);\n" \
" //\n" \
" if (matches === null)\n" \
" matchPosition = @advanceStringIndex(str, matchPosition, unicodeMatching);\n" \
" //\n" \
" else {\n" \
" //\n" \
" let endPosition = @toLength(splitter.lastIndex);\n" \
" //\n" \
" endPosition = (endPosition <= size) ? endPosition : size;\n" \
" //\n" \
" if (endPosition === position)\n" \
" matchPosition = @advanceStringIndex(str, matchPosition, unicodeMatching);\n" \
" //\n" \
" else {\n" \
" //\n" \
" let subStr = @stringSubstrInternal.@call(str, position, matchPosition - position);\n" \
" //\n" \
" //\n" \
" @putByValDirect(result, result.length, subStr);\n" \
" //\n" \
" if (result.length == limit)\n" \
" return result;\n" \
"\n" \
" //\n" \
" position = endPosition;\n" \
" //\n" \
" //\n" \
" let numberOfCaptures = matches.length > 1 ? matches.length - 1 : 0;\n" \
"\n" \
" //\n" \
" let i = 1;\n" \
" //\n" \
" while (i <= numberOfCaptures) {\n" \
" //\n" \
" let nextCapture = matches[i];\n" \
" //\n" \
" //\n" \
" @putByValDirect(result, result.length, nextCapture);\n" \
" //\n" \
" if (result.length == limit)\n" \
" return result;\n" \
" //\n" \
" i++;\n" \
" }\n" \
" //\n" \
" matchPosition = position;\n" \
" }\n" \
" }\n" \
" }\n" \
" //\n" \
" let remainingStr = @stringSubstrInternal.@call(str, position, size);\n" \
" //\n" \
" @putByValDirect(result, result.length, remainingStr);\n" \
" //\n" \
" return result;\n" \
"})\n" \
;
const JSC::ConstructAbility s_regExpPrototypeTestCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const int s_regExpPrototypeTestCodeLength = 504;
static const JSC::Intrinsic s_regExpPrototypeTestCodeIntrinsic = JSC::RegExpTestIntrinsic;
const char* s_regExpPrototypeTestCode =
"(function (strArg)\n" \
"{\n" \
" \"use strict\";\n" \
"\n" \
" let regexp = this;\n" \
"\n" \
" //\n" \
" if (@isRegExpObject(regexp) && @tryGetById(regexp, \"exec\") === @regExpBuiltinExec)\n" \
" return @regExpTestFast.@call(regexp, strArg);\n" \
"\n" \
" //\n" \
" //\n" \
" if (!@isObject(regexp))\n" \
" @throwTypeError(\"RegExp.prototype.test requires that |this| be an Object\");\n" \
"\n" \
" //\n" \
" let str = @toString(strArg);\n" \
"\n" \
" //\n" \
" let match = @regExpExec(regexp, str);\n" \
"\n" \
" //\n" \
" if (match !== null)\n" \
" return true;\n" \
" return false;\n" \
"})\n" \
;
const JSC::ConstructAbility s_setPrototypeForEachCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const int s_setPrototypeForEachCodeLength = 519;
static const JSC::Intrinsic s_setPrototypeForEachCodeIntrinsic = JSC::NoIntrinsic;
const char* s_setPrototypeForEachCode =
"(function (callback )\n" \
"{\n" \
" \"use strict\";\n" \
"\n" \
" if (!@isSet(this))\n" \
" @throwTypeError(\"Set operation called on non-Set object\");\n" \
"\n" \
" if (typeof callback !== 'function')\n" \
" @throwTypeError(\"Set.prototype.forEach callback must be a function\");\n" \
"\n" \
" var thisArg = @argument(1);\n" \
" var iterator = @SetIterator(this);\n" \
"\n" \
" //\n" \
" var value = [ @undefined ];\n" \
" for (;;) {\n" \
" if (@setIteratorNext.@call(iterator, value))\n" \
" break;\n" \
" callback.@call(thisArg, value[0], value[0], this);\n" \
" }\n" \
"})\n" \
;
const JSC::ConstructAbility s_stringConstructorRawCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const int s_stringConstructorRawCodeLength = 1043;
static const JSC::Intrinsic s_stringConstructorRawCodeIntrinsic = JSC::NoIntrinsic;
const char* s_stringConstructorRawCode =
"(function (template)\n" \
"{\n" \
" \"use strict\";\n" \
"\n" \
" if (template === null || template === @undefined)\n" \
" @throwTypeError(\"String.raw requires template not be null or undefined\");\n" \
" var cookedSegments = @Object(template);\n" \
"\n" \
" var rawValue = cookedSegments.raw;\n" \
" if (rawValue === null || rawValue === @undefined)\n" \
" @throwTypeError(\"String.raw requires template.raw not be null or undefined\");\n" \
" var rawSegments = @Object(rawValue);\n" \
"\n" \
" var numberOfSubstitutions = arguments.length - 1;\n" \
"\n" \
" var segmentCount = @toLength(rawSegments.length);\n" \
"\n" \
" if (segmentCount <= 0)\n" \
" return '';\n" \
"\n" \
" var stringElements = '';\n" \
" for (var i = 0; ; ++i) {\n" \
" var segment = @toString(rawSegments[i]);\n" \
" stringElements += segment;\n" \
"\n" \
" if ((i + 1) === segmentCount)\n" \
" return stringElements;\n" \
"\n" \
" if (i < numberOfSubstitutions) {\n" \
" var substitutionIndexInArguments = i + 1;\n" \
" var next = @toString(arguments[substitutionIndexInArguments]);\n" \
" stringElements += next;\n" \
" }\n" \
" }\n" \
"})\n" \
;
const JSC::ConstructAbility s_stringIteratorPrototypeNextCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const int s_stringIteratorPrototypeNextCodeLength = 1222;
static const JSC::Intrinsic s_stringIteratorPrototypeNextCodeIntrinsic = JSC::NoIntrinsic;
const char* s_stringIteratorPrototypeNextCode =
"(function ()\n" \
"{\n" \
" \"use strict\";\n" \
"\n" \
" if (this == null)\n" \
" @throwTypeError(\"%StringIteratorPrototype%.next requires that |this| not be null or undefined\");\n" \
"\n" \
" var position = this.@stringIteratorNextIndex;\n" \
" if (position === @undefined)\n" \
" @throwTypeError(\"%StringIteratorPrototype%.next requires that |this| be a String Iterator instance\");\n" \
"\n" \
" var done = true;\n" \
" var value = @undefined;\n" \
"\n" \
" var string = this.@iteratedString;\n" \
" if (string !== @undefined) {\n" \
" var length = string.length >>> 0;\n" \
" if (position >= length) {\n" \
" this.@iteratedString = @undefined;\n" \
" } else {\n" \
" done = false;\n" \
"\n" \
" var first = string.@charCodeAt(position);\n" \
" if (first < 0xD800 || first > 0xDBFF || position + 1 === length)\n" \
" value = string[position];\n" \
" else {\n" \
" var second = string.@charCodeAt(position + 1);\n" \
" if (second < 0xDC00 || second > 0xDFFF)\n" \
" value = string[position];\n" \
" else\n" \
" value = string[position] + string[position + 1];\n" \
" }\n" \
"\n" \
" this.@stringIteratorNextIndex = position + value.length;\n" \
" }\n" \
" }\n" \
"\n" \
" return {done, value};\n" \
"})\n" \
;
const JSC::ConstructAbility s_stringPrototypeMatchCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const int s_stringPrototypeMatchCodeLength = 470;
static const JSC::Intrinsic s_stringPrototypeMatchCodeIntrinsic = JSC::NoIntrinsic;
const char* s_stringPrototypeMatchCode =
"(function (regexp)\n" \
"{\n" \
" \"use strict\";\n" \
"\n" \
" if (this == null)\n" \
" @throwTypeError(\"String.prototype.match requires that |this| not be null or undefined\");\n" \
"\n" \
" if (regexp != null) {\n" \
" var matcher = regexp.@matchSymbol;\n" \
" if (matcher != @undefined)\n" \
" return matcher.@call(regexp, this);\n" \
" }\n" \
"\n" \
" let thisString = @toString(this);\n" \
" let createdRegExp = @regExpCreate(regexp, @undefined);\n" \
" return createdRegExp.@matchSymbol(thisString);\n" \
"})\n" \
;
const JSC::ConstructAbility s_stringPrototypeRepeatSlowPathCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const int s_stringPrototypeRepeatSlowPathCodeLength = 496;
static const JSC::Intrinsic s_stringPrototypeRepeatSlowPathCodeIntrinsic = JSC::NoIntrinsic;
const char* s_stringPrototypeRepeatSlowPathCode =
"(function (string, count)\n" \
"{\n" \
" \"use strict\";\n" \
"\n" \
" //\n" \
" if (count === 0 || string.length === 0)\n" \
" return \"\";\n" \
"\n" \
" //\n" \
" if (count === 1)\n" \
" return string;\n" \
"\n" \
" if (string.length * count > @MAX_STRING_LENGTH)\n" \
" @throwOutOfMemoryError();\n" \
"\n" \
" //\n" \
" //\n" \
" var result = \"\";\n" \
" var operand = string;\n" \
" while (true) {\n" \
" if (count & 1)\n" \
" result += operand;\n" \
" count >>= 1;\n" \
" if (!count)\n" \
" return result;\n" \
" operand += operand;\n" \
" }\n" \
"})\n" \
;
const JSC::ConstructAbility s_stringPrototypeRepeatCharactersSlowPathCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const int s_stringPrototypeRepeatCharactersSlowPathCodeLength = 540;
static const JSC::Intrinsic s_stringPrototypeRepeatCharactersSlowPathCodeIntrinsic = JSC::NoIntrinsic;
const char* s_stringPrototypeRepeatCharactersSlowPathCode =
"(function (string, count)\n" \
"{\n" \
" \"use strict\";\n" \
" var repeatCount = (count / string.length) | 0;\n" \
" var remainingCharacters = count - repeatCount * string.length;\n" \
" var result = \"\";\n" \
" var operand = string;\n" \
" //\n" \
" //\n" \
" while (true) {\n" \
" if (repeatCount & 1)\n" \
" result += operand;\n" \
" repeatCount >>= 1;\n" \
" if (!repeatCount)\n" \
" break;\n" \
" operand += operand;\n" \
" }\n" \
" if (remainingCharacters)\n" \
" result += @stringSubstrInternal.@call(string, 0, remainingCharacters);\n" \
" return result;\n" \
"})\n" \
;
const JSC::ConstructAbility s_stringPrototypeRepeatCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const int s_stringPrototypeRepeatCodeLength = 510;
static const JSC::Intrinsic s_stringPrototypeRepeatCodeIntrinsic = JSC::NoIntrinsic;
const char* s_stringPrototypeRepeatCode =
"(function (count)\n" \
"{\n" \
" \"use strict\";\n" \
"\n" \
" if (this == null)\n" \
" @throwTypeError(\"String.prototype.repeat requires that |this| not be null or undefined\");\n" \
"\n" \
" var string = @toString(this);\n" \
" count = @toInteger(count);\n" \
"\n" \
" if (count < 0 || count === @Infinity)\n" \
" @throwRangeError(\"String.prototype.repeat argument must be greater than or equal to 0 and not be Infinity\");\n" \
"\n" \
" if (string.length === 1)\n" \
" return @repeatCharacter(string, count);\n" \
"\n" \
" return @repeatSlowPath(string, count);\n" \
"})\n" \
;
const JSC::ConstructAbility s_stringPrototypePadStartCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const int s_stringPrototypePadStartCodeLength = 943;
static const JSC::Intrinsic s_stringPrototypePadStartCodeIntrinsic = JSC::NoIntrinsic;
const char* s_stringPrototypePadStartCode =
"(function (maxLength)\n" \
"{\n" \
" \"use strict\";\n" \
"\n" \
" if (this == null)\n" \
" @throwTypeError(\"String.prototype.padStart requires that |this| not be null or undefined\");\n" \
"\n" \
" var string = @toString(this);\n" \
" maxLength = @toLength(maxLength);\n" \
"\n" \
" var stringLength = string.length;\n" \
" if (maxLength <= stringLength)\n" \
" return string;\n" \
"\n" \
" var filler;\n" \
" var fillString = @argument(1);\n" \
" if (fillString === @undefined)\n" \
" filler = \" \";\n" \
" else {\n" \
" filler = @toString(fillString);\n" \
" if (filler === \"\")\n" \
" return string;\n" \
" }\n" \
"\n" \
" if (maxLength > @MAX_STRING_LENGTH)\n" \
" @throwOutOfMemoryError();\n" \
"\n" \
" var fillLength = maxLength - stringLength;\n" \
" var truncatedStringFiller;\n" \
"\n" \
" if (filler.length === 1)\n" \
" truncatedStringFiller = @repeatCharacter(filler, fillLength);\n" \
" else\n" \
" truncatedStringFiller = @repeatCharactersSlowPath(filler, fillLength);\n" \
" return truncatedStringFiller + string;\n" \
"})\n" \
;
const JSC::ConstructAbility s_stringPrototypePadEndCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const int s_stringPrototypePadEndCodeLength = 941;
static const JSC::Intrinsic s_stringPrototypePadEndCodeIntrinsic = JSC::NoIntrinsic;
const char* s_stringPrototypePadEndCode =
"(function (maxLength)\n" \
"{\n" \
" \"use strict\";\n" \
"\n" \
" if (this == null)\n" \
" @throwTypeError(\"String.prototype.padEnd requires that |this| not be null or undefined\");\n" \
"\n" \
" var string = @toString(this);\n" \
" maxLength = @toLength(maxLength);\n" \
"\n" \
" var stringLength = string.length;\n" \
" if (maxLength <= stringLength)\n" \
" return string;\n" \
"\n" \
" var filler;\n" \
" var fillString = @argument(1);\n" \
" if (fillString === @undefined)\n" \
" filler = \" \";\n" \
" else {\n" \
" filler = @toString(fillString);\n" \
" if (filler === \"\")\n" \
" return string;\n" \
" }\n" \
"\n" \
" if (maxLength > @MAX_STRING_LENGTH)\n" \
" @throwOutOfMemoryError();\n" \
"\n" \
" var fillLength = maxLength - stringLength;\n" \
" var truncatedStringFiller;\n" \
"\n" \
" if (filler.length === 1)\n" \
" truncatedStringFiller = @repeatCharacter(filler, fillLength);\n" \
" else\n" \
" truncatedStringFiller = @repeatCharactersSlowPath(filler, fillLength);\n" \
" return string + truncatedStringFiller;\n" \
"})\n" \
;
const JSC::ConstructAbility s_moduleLoaderPrototypeLinkAndEvaluateModuleCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const int s_moduleLoaderPrototypeLinkAndEvaluateModuleCodeLength = 287;
static const JSC::Intrinsic s_moduleLoaderPrototypeLinkAndEvaluateModuleCodeIntrinsic = JSC::NoIntrinsic;
const char* s_moduleLoaderPrototypeLinkAndEvaluateModuleCode =
"(function (key, fetcher)\n" \
"{\n" \
" \"use strict\";\n" \
"\n" \
" var entry = this.ensureRegistered(key);\n" \
" if (entry.state < @ModuleLink)\n" \
" @throwTypeError(\"Requested module is not instantiated yet.\");\n" \
"\n" \
" this.link(entry, fetcher);\n" \
" return this.moduleEvaluation(entry.module, fetcher);\n" \
"})\n" \
;
const JSC::ConstructAbility s_moduleLoaderPrototypeRequestImportModuleCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const int s_moduleLoaderPrototypeRequestImportModuleCodeLength = 236;
static const JSC::Intrinsic s_moduleLoaderPrototypeRequestImportModuleCodeIntrinsic = JSC::NoIntrinsic;
const char* s_moduleLoaderPrototypeRequestImportModuleCode =
"(function (key, fetcher)\n" \
"{\n" \
" \"use strict\";\n" \
"\n" \
" return this.requestSatisfy(key, fetcher).then((entry) => {\n" \
" this.linkAndEvaluateModule(entry.key, fetcher);\n" \
" return this.getModuleNamespaceObject(entry.module);\n" \
" });\n" \
"})\n" \
;
const JSC::ConstructAbility s_numberConstructorIsFiniteCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const int s_numberConstructorIsFiniteCodeLength = 211;
static const JSC::Intrinsic s_numberConstructorIsFiniteCodeIntrinsic = JSC::NoIntrinsic;
const char* s_numberConstructorIsFiniteCode =
"(function (value)\n" \
"{\n" \
" \"use strict\";\n" \
"\n" \
" if (typeof value !== \"number\")\n" \
" return false;\n" \
"\n" \
" //\n" \
" if (value !== value)\n" \
" return false;\n" \
"\n" \
" return value !== @Infinity && value !== -@Infinity;\n" \
"})\n" \
;
const JSC::ConstructAbility s_numberConstructorIsNaNCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const int s_numberConstructorIsNaNCodeLength = 70;
static const JSC::Intrinsic s_numberConstructorIsNaNCodeIntrinsic = JSC::NoIntrinsic;
const char* s_numberConstructorIsNaNCode =
"(function (value)\n" \
"{\n" \
" \"use strict\";\n" \
"\n" \
" return value !== value;\n" \
"})\n" \
;
const JSC::ConstructAbility s_numberPrototypeToLocaleStringCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const int s_numberPrototypeToLocaleStringCodeLength = 246;
static const JSC::Intrinsic s_numberPrototypeToLocaleStringCodeIntrinsic = JSC::NoIntrinsic;
const char* s_numberPrototypeToLocaleStringCode =
"(function ()\n" \
"{\n" \
" \"use strict\";\n" \
"\n" \
" //\n" \
" //\n" \
"\n" \
" //\n" \
" //\n" \
" var number = @thisNumberValue.@call(this);\n" \
"\n" \
" //\n" \
" //\n" \
" var numberFormat = new @NumberFormat(@argument(0), @argument(1));\n" \
"\n" \
" //\n" \
" return numberFormat.format(number);\n" \
"})\n" \
;
const JSC::ConstructAbility s_objectConstructorEntriesCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const int s_objectConstructorEntriesCodeLength = 481;
static const JSC::Intrinsic s_objectConstructorEntriesCodeIntrinsic = JSC::NoIntrinsic;
const char* s_objectConstructorEntriesCode =
"(function (object)\n" \
"{\n" \
" \"use strict\";\n" \
"\n" \
" if (object == null)\n" \
" @throwTypeError(\"Object.entries requires that input parameter not be null or undefined\");\n" \
"\n" \
" var obj = @Object(object);\n" \
" var names = @getOwnPropertyNames(obj);\n" \
" var properties = [];\n" \
" for (var i = 0, length = names.length; i < length; ++i) {\n" \
" var name = names[i];\n" \
" if (@propertyIsEnumerable(obj, name))\n" \
" properties.@push([name, obj[name]]);\n" \
" }\n" \
"\n" \
" return properties;\n" \
"})\n" \
;
const JSC::ConstructAbility s_promiseConstructorAllCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const int s_promiseConstructorAllCodeLength = 1375;
static const JSC::Intrinsic s_promiseConstructorAllCodeIntrinsic = JSC::NoIntrinsic;
const char* s_promiseConstructorAllCode =
"(function (iterable)\n" \
"{\n" \
" \"use strict\";\n" \
"\n" \
" if (!@isObject(this))\n" \
" @throwTypeError(\"|this| is not a object\");\n" \
"\n" \
" var promiseCapability = @newPromiseCapability(this);\n" \
"\n" \
" var values = [];\n" \
" var index = 0;\n" \
" var remainingElementsCount = 1;\n" \
"\n" \
" function newResolveElement(index)\n" \
" {\n" \
" var alreadyCalled = false;\n" \
" return function (argument)\n" \
" {\n" \
" if (alreadyCalled)\n" \
" return @undefined;\n" \
" alreadyCalled = true;\n" \
"\n" \
" @putByValDirect(values, index, argument);\n" \
"\n" \
" --remainingElementsCount;\n" \
" if (remainingElementsCount === 0)\n" \
" return promiseCapability.@resolve.@call(@undefined, values);\n" \
"\n" \
" return @undefined;\n" \
" }\n" \
" }\n" \
"\n" \
" try {\n" \
" for (var value of iterable) {\n" \
" @putByValDirect(values, index, @undefined);\n" \
" var nextPromise = this.resolve(value);\n" \
" var resolveElement = newResolveElement(index);\n" \
" ++remainingElementsCount;\n" \
" nextPromise.then(resolveElement, promiseCapability.@reject);\n" \
" ++index;\n" \
" }\n" \
"\n" \
" --remainingElementsCount;\n" \
" if (remainingElementsCount === 0)\n" \
" promiseCapability.@resolve.@call(@undefined, values);\n" \
" } catch (error) {\n" \
" promiseCapability.@reject.@call(@undefined, error);\n" \
" }\n" \
"\n" \
" return promiseCapability.@promise;\n" \
"})\n" \
;
const JSC::ConstructAbility s_promiseConstructorRaceCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const int s_promiseConstructorRaceCodeLength = 503;
static const JSC::Intrinsic s_promiseConstructorRaceCodeIntrinsic = JSC::NoIntrinsic;
const char* s_promiseConstructorRaceCode =
"(function (iterable)\n" \
"{\n" \
" \"use strict\";\n" \
"\n" \
" if (!@isObject(this))\n" \
" @throwTypeError(\"|this| is not a object\");\n" \
"\n" \
" var promiseCapability = @newPromiseCapability(this);\n" \
"\n" \
" try {\n" \
" for (var value of iterable) {\n" \
" var nextPromise = this.resolve(value);\n" \
" nextPromise.then(promiseCapability.@resolve, promiseCapability.@reject);\n" \
" }\n" \
" } catch (error) {\n" \
" promiseCapability.@reject.@call(@undefined, error);\n" \
" }\n" \
"\n" \
" return promiseCapability.@promise;\n" \
"})\n" \
;
const JSC::ConstructAbility s_promiseConstructorRejectCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const int s_promiseConstructorRejectCodeLength = 276;
static const JSC::Intrinsic s_promiseConstructorRejectCodeIntrinsic = JSC::NoIntrinsic;
const char* s_promiseConstructorRejectCode =
"(function (reason)\n" \
"{\n" \
" \"use strict\";\n" \
"\n" \
" if (!@isObject(this))\n" \
" @throwTypeError(\"|this| is not a object\");\n" \
"\n" \
" var promiseCapability = @newPromiseCapability(this);\n" \
"\n" \
" promiseCapability.@reject.@call(@undefined, reason);\n" \
"\n" \
" return promiseCapability.@promise;\n" \
"})\n" \
;
const JSC::ConstructAbility s_promiseConstructorResolveCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const int s_promiseConstructorResolveCodeLength = 426;
static const JSC::Intrinsic s_promiseConstructorResolveCodeIntrinsic = JSC::NoIntrinsic;
const char* s_promiseConstructorResolveCode =
"(function (value)\n" \
"{\n" \
" \"use strict\";\n" \
"\n" \
" if (!@isObject(this))\n" \
" @throwTypeError(\"|this| is not a object\");\n" \
"\n" \
" if (@isPromise(value)) {\n" \
" var valueConstructor = value.constructor;\n" \
" if (valueConstructor === this)\n" \
" return value;\n" \
" }\n" \
"\n" \
" var promiseCapability = @newPromiseCapability(this);\n" \
"\n" \
" promiseCapability.@resolve.@call(@undefined, value);\n" \
"\n" \
" return promiseCapability.@promise;\n" \
"})\n" \
;
const JSC::ConstructAbility s_promiseOperationsIsPromiseCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const int s_promiseOperationsIsPromiseCodeLength = 102;
static const JSC::Intrinsic s_promiseOperationsIsPromiseCodeIntrinsic = JSC::NoIntrinsic;
const char* s_promiseOperationsIsPromiseCode =
"(function (promise)\n" \
"{\n" \
" \"use strict\";\n" \
"\n" \
" return @isObject(promise) && !!promise.@promiseState;\n" \
"})\n" \
;
const JSC::ConstructAbility s_promiseOperationsNewPromiseReactionCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const int s_promiseOperationsNewPromiseReactionCodeLength = 195;
static const JSC::Intrinsic s_promiseOperationsNewPromiseReactionCodeIntrinsic = JSC::NoIntrinsic;
const char* s_promiseOperationsNewPromiseReactionCode =
"(function (capability, onFulfilled, onRejected)\n" \
"{\n" \
" \"use strict\";\n" \
"\n" \
" return {\n" \
" @capabilities: capability,\n" \
" @onFulfilled: onFulfilled,\n" \
" @onRejected: onRejected,\n" \
" };\n" \
"})\n" \
;
const JSC::ConstructAbility s_promiseOperationsNewPromiseCapabilityCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const int s_promiseOperationsNewPromiseCapabilityCodeLength = 1044;
static const JSC::Intrinsic s_promiseOperationsNewPromiseCapabilityCodeIntrinsic = JSC::NoIntrinsic;
const char* s_promiseOperationsNewPromiseCapabilityCode =
"(function (constructor)\n" \
"{\n" \
" \"use strict\";\n" \
"\n" \
" if (!@isConstructor(constructor))\n" \
" @throwTypeError(\"promise capability requires a constructor function\");\n" \
"\n" \
" var promiseCapability = {\n" \
" @promise: @undefined,\n" \
" @resolve: @undefined,\n" \
" @reject: @undefined\n" \
" };\n" \
"\n" \
" function executor(resolve, reject)\n" \
" {\n" \
" if (promiseCapability.@resolve !== @undefined)\n" \
" @throwTypeError(\"resolve function is already set\");\n" \
" if (promiseCapability.@reject !== @undefined)\n" \
" @throwTypeError(\"reject function is already set\");\n" \
"\n" \
" promiseCapability.@resolve = resolve;\n" \
" promiseCapability.@reject = reject;\n" \
" }\n" \
"\n" \
" var promise = new constructor(executor);\n" \
"\n" \
" if (typeof promiseCapability.@resolve !== \"function\")\n" \
" @throwTypeError(\"executor did not take a resolve function\");\n" \
"\n" \
" if (typeof promiseCapability.@reject !== \"function\")\n" \
" @throwTypeError(\"executor did not take a reject function\");\n" \
"\n" \
" promiseCapability.@promise = promise;\n" \
"\n" \
" return promiseCapability;\n" \
"})\n" \
;
const JSC::ConstructAbility s_promiseOperationsNewHandledRejectedPromiseCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const int s_promiseOperationsNewHandledRejectedPromiseCodeLength = 124;
static const JSC::Intrinsic s_promiseOperationsNewHandledRejectedPromiseCodeIntrinsic = JSC::NoIntrinsic;
const char* s_promiseOperationsNewHandledRejectedPromiseCode =
"(function (error)\n" \
"{\n" \
" let promise = @Promise.@reject(error);\n" \
" promise.@promiseIsHandled = true;\n" \
" return promise;\n" \
"})\n" \
;
const JSC::ConstructAbility s_promiseOperationsTriggerPromiseReactionsCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const int s_promiseOperationsTriggerPromiseReactionsCodeLength = 218;
static const JSC::Intrinsic s_promiseOperationsTriggerPromiseReactionsCodeIntrinsic = JSC::NoIntrinsic;
const char* s_promiseOperationsTriggerPromiseReactionsCode =
"(function (state, reactions, argument)\n" \
"{\n" \
" \"use strict\";\n" \
"\n" \
" for (var index = 0, length = reactions.length; index < length; ++index)\n" \
" @enqueueJob(@promiseReactionJob, [state, reactions[index], argument]);\n" \
"})\n" \
;
const JSC::ConstructAbility s_promiseOperationsRejectPromiseCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const int s_promiseOperationsRejectPromiseCodeLength = 489;
static const JSC::Intrinsic s_promiseOperationsRejectPromiseCodeIntrinsic = JSC::NoIntrinsic;
const char* s_promiseOperationsRejectPromiseCode =
"(function (promise, reason)\n" \
"{\n" \
" \"use strict\";\n" \
"\n" \
" var reactions = promise.@promiseReactions;\n" \
" promise.@promiseResult = reason;\n" \
" promise.@promiseReactions = @undefined;\n" \
" promise.@promiseState = @promiseStateRejected;\n" \
"\n" \
" @InspectorInstrumentation.promiseRejected(promise, reason, reactions);\n" \
"\n" \
" if (!promise.@promiseIsHandled)\n" \
" @hostPromiseRejectionTracker(promise, @promiseRejectionReject);\n" \
"\n" \
" @triggerPromiseReactions(@promiseStateRejected, reactions, reason);\n" \
"})\n" \
;
const JSC::ConstructAbility s_promiseOperationsFulfillPromiseCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const int s_promiseOperationsFulfillPromiseCodeLength = 379;
static const JSC::Intrinsic s_promiseOperationsFulfillPromiseCodeIntrinsic = JSC::NoIntrinsic;
const char* s_promiseOperationsFulfillPromiseCode =
"(function (promise, value)\n" \
"{\n" \
" \"use strict\";\n" \
"\n" \
" var reactions = promise.@promiseReactions;\n" \
" promise.@promiseResult = value;\n" \
" promise.@promiseReactions = @undefined;\n" \
" promise.@promiseState = @promiseStateFulfilled;\n" \
"\n" \
" @InspectorInstrumentation.promiseFulfilled(promise, value, reactions);\n" \
"\n" \
" @triggerPromiseReactions(@promiseStateFulfilled, reactions, value);\n" \
"})\n" \
;
const JSC::ConstructAbility s_promiseOperationsCreateResolvingFunctionsCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const int s_promiseOperationsCreateResolvingFunctionsCodeLength = 1062;
static const JSC::Intrinsic s_promiseOperationsCreateResolvingFunctionsCodeIntrinsic = JSC::NoIntrinsic;
const char* s_promiseOperationsCreateResolvingFunctionsCode =
"(function (promise)\n" \
"{\n" \
" \"use strict\";\n" \
"\n" \
" var alreadyResolved = false;\n" \
"\n" \
" var resolve = function (resolution) {\n" \
" if (alreadyResolved)\n" \
" return @undefined;\n" \
" alreadyResolved = true;\n" \
"\n" \
" if (resolution === promise)\n" \
" return @rejectPromise(promise, new @TypeError(\"Resolve a promise with itself\"));\n" \
"\n" \
" if (!@isObject(resolution))\n" \
" return @fulfillPromise(promise, resolution);\n" \
"\n" \
" var then;\n" \
" try {\n" \
" then = resolution.then;\n" \
" } catch (error) {\n" \
" return @rejectPromise(promise, error);\n" \
" }\n" \
"\n" \
" if (typeof then !== 'function')\n" \
" return @fulfillPromise(promise, resolution);\n" \
"\n" \
" @enqueueJob(@promiseResolveThenableJob, [promise, resolution, then]);\n" \
"\n" \
" return @undefined;\n" \
" };\n" \
"\n" \
" var reject = function (reason) {\n" \
" if (alreadyResolved)\n" \
" return @undefined;\n" \
" alreadyResolved = true;\n" \
"\n" \
" return @rejectPromise(promise, reason);\n" \
" };\n" \
"\n" \
" return {\n" \
" @resolve: resolve,\n" \
" @reject: reject\n" \
" };\n" \
"})\n" \
;
const JSC::ConstructAbility s_promiseOperationsPromiseReactionJobCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const int s_promiseOperationsPromiseReactionJobCodeLength = 438;
static const JSC::Intrinsic s_promiseOperationsPromiseReactionJobCodeIntrinsic = JSC::NoIntrinsic;
const char* s_promiseOperationsPromiseReactionJobCode =
"(function (state, reaction, argument)\n" \
"{\n" \
" \"use strict\";\n" \
"\n" \
" var promiseCapability = reaction.@capabilities;\n" \
"\n" \
" var result;\n" \
" var handler = (state === @promiseStateFulfilled) ? reaction.@onFulfilled: reaction.@onRejected;\n" \
" try {\n" \
" result = handler(argument);\n" \
" } catch (error) {\n" \
" return promiseCapability.@reject.@call(@undefined, error);\n" \
" }\n" \
"\n" \
" return promiseCapability.@resolve.@call(@undefined, result);\n" \
"})\n" \
;
const JSC::ConstructAbility s_promiseOperationsPromiseResolveThenableJobCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const int s_promiseOperationsPromiseResolveThenableJobCodeLength = 344;
static const JSC::Intrinsic s_promiseOperationsPromiseResolveThenableJobCodeIntrinsic = JSC::NoIntrinsic;
const char* s_promiseOperationsPromiseResolveThenableJobCode =
"(function (promiseToResolve, thenable, then)\n" \
"{\n" \
" \"use strict\";\n" \
"\n" \
" var resolvingFunctions = @createResolvingFunctions(promiseToResolve);\n" \
"\n" \
" try {\n" \
" return then.@call(thenable, resolvingFunctions.@resolve, resolvingFunctions.@reject);\n" \
" } catch (error) {\n" \
" return resolvingFunctions.@reject.@call(@undefined, error);\n" \
" }\n" \
"})\n" \
;
const JSC::ConstructAbility s_promiseOperationsInitializePromiseCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const int s_promiseOperationsInitializePromiseCodeLength = 538;
static const JSC::Intrinsic s_promiseOperationsInitializePromiseCodeIntrinsic = JSC::NoIntrinsic;
const char* s_promiseOperationsInitializePromiseCode =
"(function (executor)\n" \
"{\n" \
" \"use strict\";\n" \
"\n" \
" if (typeof executor !== 'function')\n" \
" @throwTypeError(\"Promise constructor takes a function argument\");\n" \
"\n" \
" this.@promiseState = @promiseStatePending;\n" \
" this.@promiseReactions = [];\n" \
" this.@promiseIsHandled = false;\n" \
"\n" \
" var resolvingFunctions = @createResolvingFunctions(this);\n" \
" try {\n" \
" executor(resolvingFunctions.@resolve, resolvingFunctions.@reject);\n" \
" } catch (error) {\n" \
" return resolvingFunctions.@reject.@call(@undefined, error);\n" \
" }\n" \
"\n" \
" return this;\n" \
"})\n" \
;
const JSC::ConstructAbility s_promisePrototypeCatchCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const int s_promisePrototypeCatchCodeLength = 93;
static const JSC::Intrinsic s_promisePrototypeCatchCodeIntrinsic = JSC::NoIntrinsic;
const char* s_promisePrototypeCatchCode =
"(function (onRejected)\n" \
"{\n" \
" \"use strict\";\n" \
"\n" \
" return this.then(@undefined, onRejected);\n" \
"})\n" \
;
const JSC::ConstructAbility s_arrayConstructorOfCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const int s_arrayConstructorOfCodeLength = 288;
static const JSC::Intrinsic s_arrayConstructorOfCodeIntrinsic = JSC::NoIntrinsic;
const char* s_arrayConstructorOfCode =
"(function ()\n" \
"{\n" \
" \"use strict\";\n" \
"\n" \
" var length = arguments.length;\n" \
" var array = @isConstructor(this) ? new this(length) : @newArrayWithSize(length);\n" \
" for (var k = 0; k < length; ++k)\n" \
" @putByValDirect(array, k, arguments[k]);\n" \
" array.length = length;\n" \
" return array;\n" \
"})\n" \
;
const JSC::ConstructAbility s_stringPrototypeHasObservableSideEffectsForStringReplaceCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const int s_stringPrototypeHasObservableSideEffectsForStringReplaceCodeLength = 522;
static const JSC::Intrinsic s_stringPrototypeHasObservableSideEffectsForStringReplaceCodeIntrinsic = JSC::NoIntrinsic;
const char* s_stringPrototypeHasObservableSideEffectsForStringReplaceCode =
"(function (regexp, replacer) {\n" \
" if (replacer !== @regExpPrototypeSymbolReplace)\n" \
" return true;\n" \
" \n" \
" let regexpExec = @tryGetById(regexp, \"exec\");\n" \
" if (regexpExec !== @regExpBuiltinExec)\n" \
" return true;\n" \
"\n" \
" let regexpGlobal = @tryGetById(regexp, \"global\");\n" \
" if (regexpGlobal !== @regExpProtoGlobalGetter)\n" \
" return true;\n" \
"\n" \
" let regexpUnicode = @tryGetById(regexp, \"unicode\");\n" \
" if (regexpUnicode !== @regExpProtoUnicodeGetter)\n" \
" return true;\n" \
"\n" \
" return !@isRegExpObject(regexp);\n" \
"})\n" \
;
const JSC::ConstructAbility s_stringPrototypeReplaceCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const int s_stringPrototypeReplaceCodeLength = 667;
static const JSC::Intrinsic s_stringPrototypeReplaceCodeIntrinsic = JSC::StringPrototypeReplaceIntrinsic;
const char* s_stringPrototypeReplaceCode =
"(function (search, replace)\n" \
"{\n" \
" \"use strict\";\n" \
"\n" \
" if (this == null)\n" \
" @throwTypeError(\"String.prototype.replace requires that |this| not be null or undefined\");\n" \
"\n" \
" if (search != null) {\n" \
" let replacer = search.@replaceSymbol;\n" \
" if (replacer !== @undefined) {\n" \
" if (!@hasObservableSideEffectsForStringReplace(search, replacer))\n" \
" return @toString(this).@replaceUsingRegExp(search, replace);\n" \
" return replacer.@call(search, this, replace);\n" \
" }\n" \
" }\n" \
"\n" \
" let thisString = @toString(this);\n" \
" let searchString = @toString(search);\n" \
" return thisString.@replaceUsingStringSearch(searchString, replace);\n" \
"})\n" \
;
const JSC::ConstructAbility s_stringPrototypeGetDefaultCollatorCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const int s_stringPrototypeGetDefaultCollatorCodeLength = 111;
static const JSC::Intrinsic s_stringPrototypeGetDefaultCollatorCodeIntrinsic = JSC::NoIntrinsic;
const char* s_stringPrototypeGetDefaultCollatorCode =
"(function ()\n" \
"{\n" \
" return @getDefaultCollator.collator || (@getDefaultCollator.collator = new @Collator());\n" \
"})\n" \
;
const JSC::ConstructAbility s_stringPrototypeLocaleCompareCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const int s_stringPrototypeLocaleCompareCodeLength = 624;
static const JSC::Intrinsic s_stringPrototypeLocaleCompareCodeIntrinsic = JSC::NoIntrinsic;
const char* s_stringPrototypeLocaleCompareCode =
"(function (that)\n" \
"{\n" \
" \"use strict\";\n" \
"\n" \
" //\n" \
" //\n" \
"\n" \
" //\n" \
" if (this == null)\n" \
" @throwTypeError(\"String.prototype.localeCompare requires that |this| not be null or undefined\");\n" \
"\n" \
" //\n" \
" //\n" \
" var thisString = @toString(this);\n" \
"\n" \
" //\n" \
" //\n" \
" var thatString = @toString(that);\n" \
"\n" \
" //\n" \
" var locales = @argument(1);\n" \
" var options = @argument(2);\n" \
" if (locales === @undefined && options === @undefined)\n" \
" return @getDefaultCollator().compare(thisString, thatString);\n" \
"\n" \
" //\n" \
" //\n" \
" var collator = new @Collator(locales, options);\n" \
"\n" \
" //\n" \
" return collator.compare(thisString, thatString);\n" \
"})\n" \
;
const JSC::ConstructAbility s_stringPrototypeSearchCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const int s_stringPrototypeSearchCodeLength = 476;
static const JSC::Intrinsic s_stringPrototypeSearchCodeIntrinsic = JSC::NoIntrinsic;
const char* s_stringPrototypeSearchCode =
"(function (regexp)\n" \
"{\n" \
" \"use strict\";\n" \
"\n" \
" if (this == null)\n" \
" @throwTypeError(\"String.prototype.search requires that |this| not be null or undefined\");\n" \
"\n" \
" if (regexp != null) {\n" \
" var searcher = regexp.@searchSymbol;\n" \
" if (searcher != @undefined)\n" \
" return searcher.@call(regexp, this);\n" \
" }\n" \
"\n" \
" var thisString = @toString(this);\n" \
" var createdRegExp = @regExpCreate(regexp, @undefined);\n" \
" return createdRegExp.@searchSymbol(thisString);\n" \
"})\n" \
;
const JSC::ConstructAbility s_stringPrototypeSplitCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const int s_stringPrototypeSplitCodeLength = 422;
static const JSC::Intrinsic s_stringPrototypeSplitCodeIntrinsic = JSC::NoIntrinsic;
const char* s_stringPrototypeSplitCode =
"(function (separator, limit)\n" \
"{\n" \
" \"use strict\";\n" \
" \n" \
" if (this == null)\n" \
" @throwTypeError(\"String.prototype.split requires that |this| not be null or undefined\");\n" \
" \n" \
" if (separator != null) {\n" \
" var splitter = separator.@splitSymbol;\n" \
" if (splitter != @undefined)\n" \
" return splitter.@call(separator, this, limit);\n" \
" }\n" \
" \n" \
" return @stringSplitFast.@call(this, separator, limit);\n" \
"})\n" \
;
const JSC::ConstructAbility s_stringPrototypeStringConcatSlowPathCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const int s_stringPrototypeStringConcatSlowPathCodeLength = 197;
static const JSC::Intrinsic s_stringPrototypeStringConcatSlowPathCodeIntrinsic = JSC::NoIntrinsic;
const char* s_stringPrototypeStringConcatSlowPathCode =
"(function ()\n" \
"{\n" \
" \"use strict\";\n" \
"\n" \
" var result = @toString(this);\n" \
" for (var i = 0, length = arguments.length; i < length; ++i)\n" \
" result += @toString(arguments[i]);\n" \
" return result;\n" \
"})\n" \
;
const JSC::ConstructAbility s_stringPrototypeConcatCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const int s_stringPrototypeConcatCodeLength = 310;
static const JSC::Intrinsic s_stringPrototypeConcatCodeIntrinsic = JSC::NoIntrinsic;
const char* s_stringPrototypeConcatCode =
"(function (arg )\n" \
"{\n" \
" \"use strict\";\n" \
"\n" \
" if (this == null)\n" \
" @throwTypeError(\"String.prototype.concat requires that |this| not be null or undefined\");\n" \
"\n" \
" if (@argumentCount() === 1)\n" \
" return @toString(this) + @toString(arg);\n" \
" return @tailCallForwardArguments(@stringConcatSlowPath, this);\n" \
"})\n" \
;
const JSC::ConstructAbility s_stringPrototypeCreateHTMLCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const int s_stringPrototypeCreateHTMLCodeLength = 518;
static const JSC::Intrinsic s_stringPrototypeCreateHTMLCodeIntrinsic = JSC::NoIntrinsic;
const char* s_stringPrototypeCreateHTMLCode =
"(function (func, string, tag, attribute, value)\n" \
"{\n" \
" \"use strict\";\n" \
" if (string == null)\n" \
" @throwTypeError(`${func} requires that |this| not be null or undefined`);\n" \
" let S = @toString(string);\n" \
" let p1 = \"<\" + tag;\n" \
" if (attribute) {\n" \
" let V = @toString(value);\n" \
" let escapedV = V.@replaceUsingRegExp(/\"/g, '&quot;');\n" \
" p1 = p1 + \" \" + @toString(attribute) + '=\"' + escapedV + '\"'\n" \
" }\n" \
" let p2 = p1 + \">\"\n" \
" let p3 = p2 + S;\n" \
" let p4 = p3 + \"</\" + tag + \">\";\n" \
" return p4;\n" \
"})\n" \
;
const JSC::ConstructAbility s_stringPrototypeAnchorCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const int s_stringPrototypeAnchorCodeLength = 111;
static const JSC::Intrinsic s_stringPrototypeAnchorCodeIntrinsic = JSC::NoIntrinsic;
const char* s_stringPrototypeAnchorCode =
"(function (url)\n" \
"{\n" \
" \"use strict\";\n" \
" return @createHTML(\"String.prototype.link\", this, \"a\", \"name\", url)\n" \
"})\n" \
;
const JSC::ConstructAbility s_stringPrototypeBigCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const int s_stringPrototypeBigCodeLength = 105;
static const JSC::Intrinsic s_stringPrototypeBigCodeIntrinsic = JSC::NoIntrinsic;
const char* s_stringPrototypeBigCode =
"(function ()\n" \
"{\n" \
" \"use strict\";\n" \
" return @createHTML(\"String.prototype.big\", this, \"big\", \"\", \"\");\n" \
"})\n" \
;
const JSC::ConstructAbility s_stringPrototypeBlinkCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const int s_stringPrototypeBlinkCodeLength = 109;
static const JSC::Intrinsic s_stringPrototypeBlinkCodeIntrinsic = JSC::NoIntrinsic;
const char* s_stringPrototypeBlinkCode =
"(function ()\n" \
"{\n" \
" \"use strict\";\n" \
" return @createHTML(\"String.prototype.blink\", this, \"blink\", \"\", \"\");\n" \
"})\n" \
;
const JSC::ConstructAbility s_stringPrototypeBoldCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const int s_stringPrototypeBoldCodeLength = 104;
static const JSC::Intrinsic s_stringPrototypeBoldCodeIntrinsic = JSC::NoIntrinsic;
const char* s_stringPrototypeBoldCode =
"(function ()\n" \
"{\n" \
" \"use strict\";\n" \
" return @createHTML(\"String.prototype.bold\", this, \"b\", \"\", \"\");\n" \
"})\n" \
;
const JSC::ConstructAbility s_stringPrototypeFixedCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const int s_stringPrototypeFixedCodeLength = 106;
static const JSC::Intrinsic s_stringPrototypeFixedCodeIntrinsic = JSC::NoIntrinsic;
const char* s_stringPrototypeFixedCode =
"(function ()\n" \
"{\n" \
" \"use strict\";\n" \
" return @createHTML(\"String.prototype.fixed\", this, \"tt\", \"\", \"\");\n" \
"})\n" \
;
const JSC::ConstructAbility s_stringPrototypeFontcolorCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const int s_stringPrototypeFontcolorCodeLength = 125;
static const JSC::Intrinsic s_stringPrototypeFontcolorCodeIntrinsic = JSC::NoIntrinsic;
const char* s_stringPrototypeFontcolorCode =
"(function (color)\n" \
"{\n" \
" \"use strict\";\n" \
" return @createHTML(\"String.prototype.fontcolor\", this, \"font\", \"color\", color);\n" \
"})\n" \
;
const JSC::ConstructAbility s_stringPrototypeFontsizeCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const int s_stringPrototypeFontsizeCodeLength = 121;
static const JSC::Intrinsic s_stringPrototypeFontsizeCodeIntrinsic = JSC::NoIntrinsic;
const char* s_stringPrototypeFontsizeCode =
"(function (size)\n" \
"{\n" \
" \"use strict\";\n" \
" return @createHTML(\"String.prototype.fontsize\", this, \"font\", \"size\", size);\n" \
"})\n" \
;
const JSC::ConstructAbility s_stringPrototypeItalicsCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const int s_stringPrototypeItalicsCodeLength = 107;
static const JSC::Intrinsic s_stringPrototypeItalicsCodeIntrinsic = JSC::NoIntrinsic;
const char* s_stringPrototypeItalicsCode =
"(function ()\n" \
"{\n" \
" \"use strict\";\n" \
" return @createHTML(\"String.prototype.italics\", this, \"i\", \"\", \"\");\n" \
"})\n" \
;
const JSC::ConstructAbility s_stringPrototypeLinkCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const int s_stringPrototypeLinkCodeLength = 111;
static const JSC::Intrinsic s_stringPrototypeLinkCodeIntrinsic = JSC::NoIntrinsic;
const char* s_stringPrototypeLinkCode =
"(function (url)\n" \
"{\n" \
" \"use strict\";\n" \
" return @createHTML(\"String.prototype.link\", this, \"a\", \"href\", url)\n" \
"})\n" \
;
const JSC::ConstructAbility s_stringPrototypeSmallCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const int s_stringPrototypeSmallCodeLength = 109;
static const JSC::Intrinsic s_stringPrototypeSmallCodeIntrinsic = JSC::NoIntrinsic;
const char* s_stringPrototypeSmallCode =
"(function ()\n" \
"{\n" \
" \"use strict\";\n" \
" return @createHTML(\"String.prototype.small\", this, \"small\", \"\", \"\");\n" \
"})\n" \
;
const JSC::ConstructAbility s_stringPrototypeStrikeCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const int s_stringPrototypeStrikeCodeLength = 111;
static const JSC::Intrinsic s_stringPrototypeStrikeCodeIntrinsic = JSC::NoIntrinsic;
const char* s_stringPrototypeStrikeCode =
"(function ()\n" \
"{\n" \
" \"use strict\";\n" \
" return @createHTML(\"String.prototype.strike\", this, \"strike\", \"\", \"\");\n" \
"})\n" \
;
const JSC::ConstructAbility s_stringPrototypeSubCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const int s_stringPrototypeSubCodeLength = 105;
static const JSC::Intrinsic s_stringPrototypeSubCodeIntrinsic = JSC::NoIntrinsic;
const char* s_stringPrototypeSubCode =
"(function ()\n" \
"{\n" \
" \"use strict\";\n" \
" return @createHTML(\"String.prototype.sub\", this, \"sub\", \"\", \"\");\n" \
"})\n" \
;
const JSC::ConstructAbility s_stringPrototypeSupCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const int s_stringPrototypeSupCodeLength = 105;
static const JSC::Intrinsic s_stringPrototypeSupCodeIntrinsic = JSC::NoIntrinsic;
const char* s_stringPrototypeSupCode =
"(function ()\n" \
"{\n" \
" \"use strict\";\n" \
" return @createHTML(\"String.prototype.sup\", this, \"sup\", \"\", \"\");\n" \
"})\n" \
;
const JSC::ConstructAbility s_typedArrayConstructorOfCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const int s_typedArrayConstructorOfCodeLength = 401;
static const JSC::Intrinsic s_typedArrayConstructorOfCodeIntrinsic = JSC::NoIntrinsic;
const char* s_typedArrayConstructorOfCode =
"(function ()\n" \
"{\n" \
" \"use strict\";\n" \
" let len = arguments.length;\n" \
" let constructFunction = this.@allocateTypedArray;\n" \
" if (constructFunction === @undefined)\n" \
" @throwTypeError(\"TypedArray.of requires its this argument to subclass a TypedArray constructor\");\n" \
"\n" \
" let result = constructFunction(len);\n" \
"\n" \
" for (let i = 0; i < len; i++)\n" \
" result[i] = arguments[i];\n" \
"\n" \
" return result;\n" \
"})\n" \
;
const JSC::ConstructAbility s_typedArrayConstructorFromCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const int s_typedArrayConstructorFromCodeLength = 2205;
static const JSC::Intrinsic s_typedArrayConstructorFromCodeIntrinsic = JSC::NoIntrinsic;
const char* s_typedArrayConstructorFromCode =
"(function (items )\n" \
"{\n" \
" \"use strict\";\n" \
"\n" \
" let mapFn = @argument(1);\n" \
"\n" \
" let thisArg;\n" \
"\n" \
" if (mapFn !== @undefined) {\n" \
" if (typeof mapFn !== \"function\")\n" \
" @throwTypeError(\"TypedArray.from requires that the second argument, when provided, be a function\");\n" \
"\n" \
" thisArg = @argument(2);\n" \
" }\n" \
"\n" \
" if (items == null)\n" \
" @throwTypeError(\"TypedArray.from requires an array-like object - not null or undefined\");\n" \
"\n" \
" let iteratorMethod = items.@iteratorSymbol;\n" \
" if (iteratorMethod != null) {\n" \
" if (typeof iteratorMethod !== \"function\")\n" \
" @throwTypeError(\"TypedArray.from requires that the property of the first argument, items[Symbol.iterator], when exists, be a function\");\n" \
"\n" \
" let accumulator = [];\n" \
"\n" \
" let k = 0;\n" \
" let iterator = iteratorMethod.@call(items);\n" \
"\n" \
" //\n" \
" //\n" \
" //\n" \
" let wrapper = {};\n" \
" wrapper.@iteratorSymbol = function() { return iterator; }\n" \
"\n" \
" for (let value of wrapper) {\n" \
" if (mapFn)\n" \
" @putByValDirect(accumulator, k, thisArg === @undefined ? mapFn(value, k) : mapFn.@call(thisArg, value, k));\n" \
" else\n" \
" @putByValDirect(accumulator, k, value);\n" \
" k++;\n" \
" }\n" \
"\n" \
" let constructFunction = this.@allocateTypedArray;\n" \
" if (constructFunction === @undefined)\n" \
" @throwTypeError(\"TypedArray.from requires its this argument subclass a TypedArray constructor\");\n" \
"\n" \
" let result = constructFunction(k);\n" \
"\n" \
" for (let i = 0; i < k; i++) \n" \
" result[i] = accumulator[i];\n" \
"\n" \
"\n" \
" return result;\n" \
" }\n" \
"\n" \
" let arrayLike = @Object(items);\n" \
" let arrayLikeLength = @toLength(arrayLike.length);\n" \
"\n" \
" let constructFunction = this.@allocateTypedArray;\n" \
" if (constructFunction === @undefined)\n" \
" @throwTypeError(\"this does not subclass a TypedArray constructor\");\n" \
"\n" \
" let result = constructFunction(arrayLikeLength);\n" \
"\n" \
" let k = 0;\n" \
" while (k < arrayLikeLength) {\n" \
" let value = arrayLike[k];\n" \
" if (mapFn)\n" \
" result[k] = thisArg === @undefined ? mapFn(value, k) : mapFn.@call(thisArg, value, k);\n" \
" else\n" \
" result[k] = value;\n" \
" k++;\n" \
" }\n" \
"\n" \
" return result;\n" \
"})\n" \
;
const JSC::ConstructAbility s_typedArrayConstructorAllocateInt8ArrayCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const int s_typedArrayConstructorAllocateInt8ArrayCodeLength = 59;
static const JSC::Intrinsic s_typedArrayConstructorAllocateInt8ArrayCodeIntrinsic = JSC::NoIntrinsic;
const char* s_typedArrayConstructorAllocateInt8ArrayCode =
"(function (length)\n" \
"{\n" \
" return new @Int8Array(length);\n" \
"})\n" \
;
const JSC::ConstructAbility s_typedArrayConstructorAllocateInt16ArrayCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const int s_typedArrayConstructorAllocateInt16ArrayCodeLength = 64;
static const JSC::Intrinsic s_typedArrayConstructorAllocateInt16ArrayCodeIntrinsic = JSC::NoIntrinsic;
const char* s_typedArrayConstructorAllocateInt16ArrayCode =
"(function (length)\n" \
"{\n" \
" return new @Int16Array(length); \n" \
"})\n" \
;
const JSC::ConstructAbility s_typedArrayConstructorAllocateInt32ArrayCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const int s_typedArrayConstructorAllocateInt32ArrayCodeLength = 63;
static const JSC::Intrinsic s_typedArrayConstructorAllocateInt32ArrayCodeIntrinsic = JSC::NoIntrinsic;
const char* s_typedArrayConstructorAllocateInt32ArrayCode =
"(function (length)\n" \
"{\n" \
" return new @Int32Array(length); \n" \
"})\n" \
;
const JSC::ConstructAbility s_typedArrayConstructorAllocateUint32ArrayCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const int s_typedArrayConstructorAllocateUint32ArrayCodeLength = 61;
static const JSC::Intrinsic s_typedArrayConstructorAllocateUint32ArrayCodeIntrinsic = JSC::NoIntrinsic;
const char* s_typedArrayConstructorAllocateUint32ArrayCode =
"(function (length)\n" \
"{\n" \
" return new @Uint32Array(length);\n" \
"})\n" \
;
const JSC::ConstructAbility s_typedArrayConstructorAllocateUint16ArrayCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const int s_typedArrayConstructorAllocateUint16ArrayCodeLength = 64;
static const JSC::Intrinsic s_typedArrayConstructorAllocateUint16ArrayCodeIntrinsic = JSC::NoIntrinsic;
const char* s_typedArrayConstructorAllocateUint16ArrayCode =
"(function (length)\n" \
"{\n" \
" return new @Uint16Array(length); \n" \
"})\n" \
;
const JSC::ConstructAbility s_typedArrayConstructorAllocateUint8ArrayCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const int s_typedArrayConstructorAllocateUint8ArrayCodeLength = 63;
static const JSC::Intrinsic s_typedArrayConstructorAllocateUint8ArrayCodeIntrinsic = JSC::NoIntrinsic;
const char* s_typedArrayConstructorAllocateUint8ArrayCode =
"(function (length)\n" \
"{\n" \
" return new @Uint8Array(length); \n" \
"})\n" \
;
const JSC::ConstructAbility s_typedArrayConstructorAllocateUint8ClampedArrayCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const int s_typedArrayConstructorAllocateUint8ClampedArrayCodeLength = 67;
static const JSC::Intrinsic s_typedArrayConstructorAllocateUint8ClampedArrayCodeIntrinsic = JSC::NoIntrinsic;
const char* s_typedArrayConstructorAllocateUint8ClampedArrayCode =
"(function (length)\n" \
"{\n" \
" return new @Uint8ClampedArray(length);\n" \
"})\n" \
;
const JSC::ConstructAbility s_typedArrayConstructorAllocateFloat32ArrayCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const int s_typedArrayConstructorAllocateFloat32ArrayCodeLength = 62;
static const JSC::Intrinsic s_typedArrayConstructorAllocateFloat32ArrayCodeIntrinsic = JSC::NoIntrinsic;
const char* s_typedArrayConstructorAllocateFloat32ArrayCode =
"(function (length)\n" \
"{\n" \
" return new @Float32Array(length);\n" \
"})\n" \
;
const JSC::ConstructAbility s_typedArrayConstructorAllocateFloat64ArrayCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const int s_typedArrayConstructorAllocateFloat64ArrayCodeLength = 62;
static const JSC::Intrinsic s_typedArrayConstructorAllocateFloat64ArrayCodeIntrinsic = JSC::NoIntrinsic;
const char* s_typedArrayConstructorAllocateFloat64ArrayCode =
"(function (length)\n" \
"{\n" \
" return new @Float64Array(length);\n" \
"})\n" \
;
const JSC::ConstructAbility s_typedArrayPrototypeTypedArraySpeciesConstructorCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const int s_typedArrayPrototypeTypedArraySpeciesConstructorCodeLength = 471;
static const JSC::Intrinsic s_typedArrayPrototypeTypedArraySpeciesConstructorCodeIntrinsic = JSC::NoIntrinsic;
const char* s_typedArrayPrototypeTypedArraySpeciesConstructorCode =
"(function (value)\n" \
"{\n" \
" \"use strict\";\n" \
" let constructor = value.constructor;\n" \
" if (constructor === @undefined)\n" \
" return @typedArrayGetOriginalConstructor(value);\n" \
"\n" \
" if (!@isObject(constructor))\n" \
" @throwTypeError(\"|this|.constructor is not an Object or undefined\");\n" \
"\n" \
" constructor = constructor.@speciesSymbol;\n" \
" if (constructor == null)\n" \
" return @typedArrayGetOriginalConstructor(value);\n" \
" //\n" \
" //\n" \
" //\n" \
" //\n" \
" return constructor;\n" \
"})\n" \
;
const JSC::ConstructAbility s_typedArrayPrototypeTypedArrayClampArgumentToStartOrEndCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const int s_typedArrayPrototypeTypedArrayClampArgumentToStartOrEndCodeLength = 283;
static const JSC::Intrinsic s_typedArrayPrototypeTypedArrayClampArgumentToStartOrEndCodeIntrinsic = JSC::NoIntrinsic;
const char* s_typedArrayPrototypeTypedArrayClampArgumentToStartOrEndCode =
"(function (value, length, undefinedValue)\n" \
"{\n" \
" \"use strict\";\n" \
"\n" \
" if (value === @undefined)\n" \
" return undefinedValue;\n" \
"\n" \
" let int = @toInteger(value);\n" \
" if (int < 0) {\n" \
" int += length;\n" \
" return int < 0 ? 0 : int;\n" \
" }\n" \
" return int > length ? length : int;\n" \
"})\n" \
;
const JSC::ConstructAbility s_typedArrayPrototypeValuesCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const int s_typedArrayPrototypeValuesCodeLength = 142;
static const JSC::Intrinsic s_typedArrayPrototypeValuesCodeIntrinsic = JSC::NoIntrinsic;
const char* s_typedArrayPrototypeValuesCode =
"(function ()\n" \
"{\n" \
" \"use strict\";\n" \
" @typedArrayLength(this);\n" \
" return new @createArrayIterator(this, \"value\", @arrayIteratorValueNext);\n" \
"})\n" \
;
const JSC::ConstructAbility s_typedArrayPrototypeKeysCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const int s_typedArrayPrototypeKeysCodeLength = 138;
static const JSC::Intrinsic s_typedArrayPrototypeKeysCodeIntrinsic = JSC::NoIntrinsic;
const char* s_typedArrayPrototypeKeysCode =
"(function ()\n" \
"{\n" \
" \"use strict\";\n" \
" @typedArrayLength(this);\n" \
" return new @createArrayIterator(this, \"key\", @arrayIteratorKeyNext);\n" \
"})\n" \
;
const JSC::ConstructAbility s_typedArrayPrototypeEntriesCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const int s_typedArrayPrototypeEntriesCodeLength = 149;
static const JSC::Intrinsic s_typedArrayPrototypeEntriesCodeIntrinsic = JSC::NoIntrinsic;
const char* s_typedArrayPrototypeEntriesCode =
"(function ()\n" \
"{\n" \
" \"use strict\";\n" \
" @typedArrayLength(this);\n" \
" return new @createArrayIterator(this, \"key+value\", @arrayIteratorKeyValueNext);\n" \
"})\n" \
;
const JSC::ConstructAbility s_typedArrayPrototypeEveryCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const int s_typedArrayPrototypeEveryCodeLength = 389;
static const JSC::Intrinsic s_typedArrayPrototypeEveryCodeIntrinsic = JSC::NoIntrinsic;
const char* s_typedArrayPrototypeEveryCode =
"(function (callback )\n" \
"{\n" \
" \"use strict\";\n" \
" var length = @typedArrayLength(this);\n" \
" var thisArg = @argument(1);\n" \
"\n" \
" if (typeof callback !== \"function\")\n" \
" @throwTypeError(\"TypedArray.prototype.every callback must be a function\");\n" \
"\n" \
" for (var i = 0; i < length; i++) {\n" \
" if (!callback.@call(thisArg, this[i], i, this))\n" \
" return false;\n" \
" }\n" \
"\n" \
" return true;\n" \
"})\n" \
;
const JSC::ConstructAbility s_typedArrayPrototypeFillCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const int s_typedArrayPrototypeFillCodeLength = 363;
static const JSC::Intrinsic s_typedArrayPrototypeFillCodeIntrinsic = JSC::NoIntrinsic;
const char* s_typedArrayPrototypeFillCode =
"(function (value )\n" \
"{\n" \
" \"use strict\";\n" \
"\n" \
" let length = @typedArrayLength(this);\n" \
"\n" \
" let start = @argument(1);\n" \
" let end = @argument(2);\n" \
"\n" \
" start = @typedArrayClampArgumentToStartOrEnd(start, length, 0);\n" \
" end = @typedArrayClampArgumentToStartOrEnd(end, length, length);\n" \
"\n" \
" for (let i = start; i < end; i++)\n" \
" this[i] = value;\n" \
" return this;\n" \
"})\n" \
;
const JSC::ConstructAbility s_typedArrayPrototypeFindCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const int s_typedArrayPrototypeFindCodeLength = 416;
static const JSC::Intrinsic s_typedArrayPrototypeFindCodeIntrinsic = JSC::NoIntrinsic;
const char* s_typedArrayPrototypeFindCode =
"(function (callback )\n" \
"{\n" \
" \"use strict\";\n" \
" var length = @typedArrayLength(this);\n" \
" var thisArg = @argument(1);\n" \
"\n" \
" if (typeof callback !== \"function\")\n" \
" @throwTypeError(\"TypedArray.prototype.find callback must be a function\");\n" \
"\n" \
" for (var i = 0; i < length; i++) {\n" \
" let elem = this[i];\n" \
" if (callback.@call(thisArg, elem, i, this))\n" \
" return elem;\n" \
" }\n" \
" return @undefined;\n" \
"})\n" \
;
const JSC::ConstructAbility s_typedArrayPrototypeFindIndexCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const int s_typedArrayPrototypeFindIndexCodeLength = 385;
static const JSC::Intrinsic s_typedArrayPrototypeFindIndexCodeIntrinsic = JSC::NoIntrinsic;
const char* s_typedArrayPrototypeFindIndexCode =
"(function (callback )\n" \
"{\n" \
" \"use strict\";\n" \
" var length = @typedArrayLength(this);\n" \
" var thisArg = @argument(1);\n" \
"\n" \
" if (typeof callback !== \"function\")\n" \
" @throwTypeError(\"TypedArray.prototype.findIndex callback must be a function\");\n" \
"\n" \
" for (var i = 0; i < length; i++) {\n" \
" if (callback.@call(thisArg, this[i], i, this))\n" \
" return i;\n" \
" }\n" \
" return -1;\n" \
"})\n" \
;
const JSC::ConstructAbility s_typedArrayPrototypeForEachCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const int s_typedArrayPrototypeForEachCodeLength = 334;
static const JSC::Intrinsic s_typedArrayPrototypeForEachCodeIntrinsic = JSC::NoIntrinsic;
const char* s_typedArrayPrototypeForEachCode =
"(function (callback )\n" \
"{\n" \
" \"use strict\";\n" \
" var length = @typedArrayLength(this);\n" \
" var thisArg = @argument(1);\n" \
"\n" \
" if (typeof callback !== \"function\")\n" \
" @throwTypeError(\"TypedArray.prototype.forEach callback must be a function\");\n" \
"\n" \
" for (var i = 0; i < length; i++)\n" \
" callback.@call(thisArg, this[i], i, this);\n" \
"})\n" \
;
const JSC::ConstructAbility s_typedArrayPrototypeSomeCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const int s_typedArrayPrototypeSomeCodeLength = 394;
static const JSC::Intrinsic s_typedArrayPrototypeSomeCodeIntrinsic = JSC::NoIntrinsic;
const char* s_typedArrayPrototypeSomeCode =
"(function (callback )\n" \
"{\n" \
" //\n" \
" \"use strict\";\n" \
" var length = @typedArrayLength(this);\n" \
" var thisArg = @argument(1);\n" \
"\n" \
" if (typeof callback !== \"function\")\n" \
" @throwTypeError(\"TypedArray.prototype.some callback must be a function\");\n" \
"\n" \
" for (var i = 0; i < length; i++) {\n" \
" if (callback.@call(thisArg, this[i], i, this))\n" \
" return true;\n" \
" }\n" \
"\n" \
" return false;\n" \
"})\n" \
;
const JSC::ConstructAbility s_typedArrayPrototypeSortCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const int s_typedArrayPrototypeSortCodeLength = 1540;
static const JSC::Intrinsic s_typedArrayPrototypeSortCodeIntrinsic = JSC::NoIntrinsic;
const char* s_typedArrayPrototypeSortCode =
"(function (comparator)\n" \
"{\n" \
" //\n" \
" \"use strict\";\n" \
"\n" \
" function min(a, b)\n" \
" {\n" \
" return a < b ? a : b;\n" \
" }\n" \
"\n" \
" function merge(dst, src, srcIndex, srcEnd, width, comparator)\n" \
" {\n" \
" var left = srcIndex;\n" \
" var leftEnd = min(left + width, srcEnd);\n" \
" var right = leftEnd;\n" \
" var rightEnd = min(right + width, srcEnd);\n" \
"\n" \
" for (var dstIndex = left; dstIndex < rightEnd; ++dstIndex) {\n" \
" if (right < rightEnd) {\n" \
" if (left >= leftEnd || comparator(src[right], src[left]) < 0) {\n" \
" dst[dstIndex] = src[right++];\n" \
" continue;\n" \
" }\n" \
" }\n" \
"\n" \
" dst[dstIndex] = src[left++];\n" \
" }\n" \
" }\n" \
"\n" \
" function mergeSort(array, valueCount, comparator)\n" \
" {\n" \
" var buffer = [ ];\n" \
" buffer.length = valueCount;\n" \
"\n" \
" var dst = buffer;\n" \
" var src = array;\n" \
"\n" \
" for (var width = 1; width < valueCount; width *= 2) {\n" \
" for (var srcIndex = 0; srcIndex < valueCount; srcIndex += 2 * width)\n" \
" merge(dst, src, srcIndex, valueCount, width, comparator);\n" \
"\n" \
" var tmp = src;\n" \
" src = dst;\n" \
" dst = tmp;\n" \
" }\n" \
"\n" \
" if (src != array) {\n" \
" for(var i = 0; i < valueCount; i++)\n" \
" array[i] = src[i];\n" \
" }\n" \
" }\n" \
"\n" \
" var length = @typedArrayLength(this);\n" \
"\n" \
" if (length < 2)\n" \
" return;\n" \
"\n" \
" if (typeof comparator == \"function\")\n" \
" mergeSort(this, length, comparator);\n" \
" else\n" \
" @typedArraySort(this);\n" \
" \n" \
" return this;\n" \
"})\n" \
;
const JSC::ConstructAbility s_typedArrayPrototypeSubarrayCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const int s_typedArrayPrototypeSubarrayCodeLength = 398;
static const JSC::Intrinsic s_typedArrayPrototypeSubarrayCodeIntrinsic = JSC::NoIntrinsic;
const char* s_typedArrayPrototypeSubarrayCode =
"(function (begin, end)\n" \
"{\n" \
" \"use strict\";\n" \
"\n" \
" if (!@isTypedArrayView(this))\n" \
" @throwTypeError(\"|this| should be a typed array view\");\n" \
"\n" \
" let start = @toInteger(begin);\n" \
" let finish;\n" \
" if (end !== @undefined)\n" \
" finish = @toInteger(end);\n" \
"\n" \
" let constructor = @typedArraySpeciesConstructor(this);\n" \
"\n" \
" return @typedArraySubarrayCreate.@call(this, start, finish, constructor);\n" \
"})\n" \
;
const JSC::ConstructAbility s_typedArrayPrototypeReduceCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const int s_typedArrayPrototypeReduceCodeLength = 668;
static const JSC::Intrinsic s_typedArrayPrototypeReduceCodeIntrinsic = JSC::NoIntrinsic;
const char* s_typedArrayPrototypeReduceCode =
"(function (callback )\n" \
"{\n" \
" //\n" \
" \"use strict\";\n" \
"\n" \
" var length = @typedArrayLength(this);\n" \
"\n" \
" if (typeof callback !== \"function\")\n" \
" @throwTypeError(\"TypedArray.prototype.reduce callback must be a function\");\n" \
"\n" \
" var argumentCount = @argumentCount();\n" \
" if (length === 0 && argumentCount < 2)\n" \
" @throwTypeError(\"TypedArray.prototype.reduce of empty array with no initial value\");\n" \
"\n" \
" var accumulator, k = 0;\n" \
" if (argumentCount > 1)\n" \
" accumulator = @argument(1);\n" \
" else\n" \
" accumulator = this[k++];\n" \
"\n" \
" for (; k < length; k++)\n" \
" accumulator = callback.@call(@undefined, accumulator, this[k], k, this);\n" \
"\n" \
" return accumulator;\n" \
"})\n" \
;
const JSC::ConstructAbility s_typedArrayPrototypeReduceRightCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const int s_typedArrayPrototypeReduceRightCodeLength = 683;
static const JSC::Intrinsic s_typedArrayPrototypeReduceRightCodeIntrinsic = JSC::NoIntrinsic;
const char* s_typedArrayPrototypeReduceRightCode =
"(function (callback )\n" \
"{\n" \
" //\n" \
" \"use strict\";\n" \
"\n" \
" var length = @typedArrayLength(this);\n" \
"\n" \
" if (typeof callback !== \"function\")\n" \
" @throwTypeError(\"TypedArray.prototype.reduceRight callback must be a function\");\n" \
"\n" \
" var argumentCount = @argumentCount();\n" \
" if (length === 0 && argumentCount < 2)\n" \
" @throwTypeError(\"TypedArray.prototype.reduceRight of empty array with no initial value\");\n" \
"\n" \
" var accumulator, k = length - 1;\n" \
" if (argumentCount > 1)\n" \
" accumulator = @argument(1);\n" \
" else\n" \
" accumulator = this[k--];\n" \
"\n" \
" for (; k >= 0; k--)\n" \
" accumulator = callback.@call(@undefined, accumulator, this[k], k, this);\n" \
"\n" \
" return accumulator;\n" \
"})\n" \
;
const JSC::ConstructAbility s_typedArrayPrototypeMapCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const int s_typedArrayPrototypeMapCodeLength = 962;
static const JSC::Intrinsic s_typedArrayPrototypeMapCodeIntrinsic = JSC::NoIntrinsic;
const char* s_typedArrayPrototypeMapCode =
"(function (callback )\n" \
"{\n" \
" //\n" \
" \"use strict\";\n" \
"\n" \
" var length = @typedArrayLength(this);\n" \
"\n" \
" if (typeof callback !== \"function\")\n" \
" @throwTypeError(\"TypedArray.prototype.map callback must be a function\");\n" \
"\n" \
" var thisArg = @argument(1);\n" \
"\n" \
" //\n" \
" var constructor = this.constructor;\n" \
" var result;\n" \
" if (constructor === @undefined)\n" \
" result = new (@typedArrayGetOriginalConstructor(this))(length);\n" \
" else {\n" \
" var speciesConstructor = @Object(constructor).@speciesSymbol;\n" \
" if (speciesConstructor === null || speciesConstructor === @undefined)\n" \
" result = new (@typedArrayGetOriginalConstructor(this))(length);\n" \
" else {\n" \
" result = new speciesConstructor(length);\n" \
" //\n" \
" @typedArrayLength(result);\n" \
" }\n" \
" }\n" \
"\n" \
" for (var i = 0; i < length; i++) {\n" \
" var mappedValue = callback.@call(thisArg, this[i], i, this);\n" \
" result[i] = mappedValue;\n" \
" }\n" \
" return result;\n" \
"})\n" \
;
const JSC::ConstructAbility s_typedArrayPrototypeFilterCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const int s_typedArrayPrototypeFilterCodeLength = 1108;
static const JSC::Intrinsic s_typedArrayPrototypeFilterCodeIntrinsic = JSC::NoIntrinsic;
const char* s_typedArrayPrototypeFilterCode =
"(function (callback )\n" \
"{\n" \
" \"use strict\";\n" \
"\n" \
" var length = @typedArrayLength(this);\n" \
"\n" \
" if (typeof callback !== \"function\")\n" \
" @throwTypeError(\"TypedArray.prototype.filter callback must be a function\");\n" \
"\n" \
" var thisArg = @argument(1);\n" \
" var kept = [];\n" \
"\n" \
" for (var i = 0; i < length; i++) {\n" \
" var value = this[i];\n" \
" if (callback.@call(thisArg, value, i, this))\n" \
" kept.@push(value);\n" \
" }\n" \
"\n" \
" var constructor = this.constructor;\n" \
" var result;\n" \
" var resultLength = kept.length;\n" \
" if (constructor === @undefined)\n" \
" result = new (@typedArrayGetOriginalConstructor(this))(resultLength);\n" \
" else {\n" \
" var speciesConstructor = @Object(constructor).@speciesSymbol;\n" \
" if (speciesConstructor === null || speciesConstructor === @undefined)\n" \
" result = new (@typedArrayGetOriginalConstructor(this))(resultLength);\n" \
" else {\n" \
" result = new speciesConstructor(resultLength);\n" \
" //\n" \
" @typedArrayLength(result);\n" \
" }\n" \
" }\n" \
"\n" \
" for (var i = 0; i < kept.length; i++)\n" \
" result[i] = kept[i];\n" \
"\n" \
" return result;\n" \
"})\n" \
;
const JSC::ConstructAbility s_typedArrayPrototypeToLocaleStringCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const int s_typedArrayPrototypeToLocaleStringCodeLength = 271;
static const JSC::Intrinsic s_typedArrayPrototypeToLocaleStringCodeIntrinsic = JSC::NoIntrinsic;
const char* s_typedArrayPrototypeToLocaleStringCode =
"(function ()\n" \
"{\n" \
" \"use strict\";\n" \
"\n" \
" var length = @typedArrayLength(this);\n" \
"\n" \
" if (length == 0)\n" \
" return \"\";\n" \
"\n" \
" var string = this[0].toLocaleString();\n" \
" for (var i = 1; i < length; i++)\n" \
" string += \",\" + this[i].toLocaleString();\n" \
"\n" \
" return string;\n" \
"})\n" \
;
#define DEFINE_BUILTIN_GENERATOR(codeName, functionName, argumentCount) \
JSC::FunctionExecutable* codeName##Generator(JSC::VM& vm) \
{\
return vm.builtinExecutables()->codeName##Executable()->link(vm, vm.builtinExecutables()->codeName##Source(), std::nullopt, s_##codeName##Intrinsic); }
JSC_FOREACH_BUILTIN_CODE(DEFINE_BUILTIN_GENERATOR)
#undef DEFINE_BUILTIN_GENERATOR
} // namespace JSC