Bug Summary

File:Volumes/Data/worker/macOS-Safer-CPP-Checks-EWS/build/WebKitBuild/Release/DerivedSources/WebCore/StreamInternalsBuiltins.h
Warning:line 317, column 5
Call argument uses a forward declared type 'FunctionExecutable *'

Annotated Source Code

Press '?' to see keyboard shortcuts

clang -cc1 -cc1 -triple arm64-apple-macosx15.5.0 -O2 -Wundef-prefix=TARGET_OS_ -Werror=undef-prefix -Wdeprecated-objc-isa-usage -Werror=deprecated-objc-isa-usage -analyze -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name UnifiedSource482.cpp -analyzer-checker=core -analyzer-checker=apiModeling -analyzer-checker=unix -analyzer-checker=osx -analyzer-checker=security.insecureAPI.decodeValueOfObjCType -analyzer-checker=deadcode -analyzer-checker=cplusplus -analyzer-checker=security.insecureAPI.UncheckedReturn -analyzer-checker=security.insecureAPI.getpw -analyzer-checker=security.insecureAPI.gets -analyzer-checker=security.insecureAPI.mktemp -analyzer-checker=security.insecureAPI.mkstemp -analyzer-checker=security.insecureAPI.vfork -analyzer-checker=nullability.NullPassedToNonnull -analyzer-checker=nullability.NullReturnedFromNonnull -analyzer-output plist -w -setup-static-analyzer -analyzer-config-compatibility-mode=true -mrelocation-model pic -pic-level 2 -mframe-pointer=non-leaf -ffp-contract=on -fno-rounding-math -target-sdk-version=15.5 -fcompatibility-qualified-id-block-type-checking -fvisibility-inlines-hidden-static-local-var -fno-modulemap-allow-subdirectory-search -fdefine-target-os-macros -enable-tlsdesc -target-cpu apple-m1 -target-feature +v8.4a -target-feature +aes -target-feature +altnzcv -target-feature +ccdp -target-feature +ccpp -target-feature +complxnum -target-feature +crc -target-feature +dotprod -target-feature +flagm -target-feature +fp-armv8 -target-feature +fp16fml -target-feature +fptoint -target-feature +fullfp16 -target-feature +jsconv -target-feature +lse -target-feature +neon -target-feature +pauth -target-feature +perfmon -target-feature +predres -target-feature +ras -target-feature +rcpc -target-feature +rdm -target-feature +sb -target-feature +sha2 -target-feature +sha3 -target-feature +specrestrict -target-feature +ssbs -target-abi darwinpcs -dwarf-ext-refs -fmodule-format=obj -debug-info-kind=standalone -dwarf-version=5 -debugger-tuning=lldb -fdebug-compilation-dir=/Volumes/Data/worker/macOS-Safer-CPP-Checks-EWS/build/Source/WebCore -target-linker-version 1167.5 -fcoverage-compilation-dir=/Volumes/Data/worker/macOS-Safer-CPP-Checks-EWS/build/Source/WebCore -resource-dir /Volumes/Data/worker/macOS-Safer-CPP-Checks-EWS/llvm-project/build/lib/clang/21 -dependency-file /Volumes/Data/worker/macOS-Safer-CPP-Checks-EWS/build/scan-build-output/StaticAnalyzer/WebCore/WebCore/normal/arm64/UnifiedSource482.d -skip-unused-modulemap-deps -MT dependencies -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.5.sdk -iquote /Volumes/Data/worker/macOS-Safer-CPP-Checks-EWS/build/WebKitBuild/WebCore.build/Release/WebCore.build/WebCore-generated-files.hmap -iquote /Volumes/Data/worker/macOS-Safer-CPP-Checks-EWS/build/WebKitBuild/WebCore.build/Release/WebCore.build/WebCore-project-headers.hmap -isystem /Volumes/Data/worker/macOS-Safer-CPP-Checks-EWS/build/Source/WebCore/PAL/ThirdParty/dav1d/include -iframework /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.5.sdk/System/Library/PrivateFrameworks -iframework /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.5.sdk/System/Library/Frameworks -include-pch /Volumes/Data/worker/macOS-Safer-CPP-Checks-EWS/build/WebKitBuild/PrecompiledHeaders/SharedPrecompiledHeaders/12902642326230122134/WebCorePrefix.h.gch -D _LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_EXTENSIVE -D CLANG_WEBKIT_BRANCH=1 -D NDEBUG -D BUILDING_WEBKIT -D GL_SILENCE_DEPRECATION=1 -D GLES_SILENCE_DEPRECATION=1 -D __clang_analyzer__ -I /Volumes/Data/worker/macOS-Safer-CPP-Checks-EWS/build/WebKitBuild/WebCore.build/Release/WebCore.build/WebCore-own-target-headers.hmap -I /Volumes/Data/worker/macOS-Safer-CPP-Checks-EWS/build/WebKitBuild/WebCore.build/Release/WebCore.build/WebCore-all-target-headers.hmap -I /Volumes/Data/worker/macOS-Safer-CPP-Checks-EWS/build/WebKitBuild/Release/include -I PAL -I ForwardingHeaders -I /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.5.sdk/usr/include/libxslt -I /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.5.sdk/usr/include/libxml2 -I /Volumes/Data/worker/macOS-Safer-CPP-Checks-EWS/build/WebKitBuild/Release/DerivedSources/WebCore -I /Volumes/Data/worker/macOS-Safer-CPP-Checks-EWS/build/WebKitBuild/Release/usr/local/include -I /Volumes/Data/worker/macOS-Safer-CPP-Checks-EWS/build/WebKitBuild/Release/usr/local/include/WebKitAdditions -I /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.5.sdk/usr/local/include/WebKitAdditions -I /Volumes/Data/worker/macOS-Safer-CPP-Checks-EWS/build/WebKitBuild/Release/usr/local/include -I /Volumes/Data/worker/macOS-Safer-CPP-Checks-EWS/build/WebKitLibraries/SDKs/macosx15.0-additions.sdk/usr/local/include -I /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.5.sdk/usr/local/include -I /Volumes/Data/worker/macOS-Safer-CPP-Checks-EWS/build/WebKitBuild/Release/usr/local/include/webrtc -I /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.5.sdk/usr/local/include/webrtc -I /Volumes/Data/worker/macOS-Safer-CPP-Checks-EWS/build/WebKitBuild/Release/usr/local/include/webm -I /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.5.sdk/usr/local/include/webm -I /Volumes/Data/worker/macOS-Safer-CPP-Checks-EWS/build/WebKitBuild/PAL.build/PAL.build/DerivedSources -I /Volumes/Data/worker/macOS-Safer-CPP-Checks-EWS/build/WebKitBuild/PAL.build/Release/PAL.build/DerivedSources -I /Volumes/Data/worker/macOS-Safer-CPP-Checks-EWS/build/Source/WebCore -I /Volumes/Data/worker/macOS-Safer-CPP-Checks-EWS/build/WebKitBuild/WebCore.build/Release/WebCore.build/DerivedSources-normal/arm64 -I /Volumes/Data/worker/macOS-Safer-CPP-Checks-EWS/build/WebKitBuild/WebCore.build/Release/WebCore.build/DerivedSources/arm64 -I /Volumes/Data/worker/macOS-Safer-CPP-Checks-EWS/build/WebKitBuild/WebCore.build/Release/WebCore.build/DerivedSources -F/Volumes/Data/worker/macOS-Safer-CPP-Checks-EWS/build/WebKitBuild/Release -I/usr/local/include -stdlib=libc++ -internal-isystem /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.5.sdk/usr/include/c++/v1 -internal-isystem /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.5.sdk/usr/local/include -internal-isystem /Volumes/Data/worker/macOS-Safer-CPP-Checks-EWS/llvm-project/build/lib/clang/21/include -internal-externc-isystem /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.5.sdk/usr/include -internal-iframework /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.5.sdk/System/Library/Frameworks -internal-iframework /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.5.sdk/System/Library/SubFrameworks -internal-iframework /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.5.sdk/Library/Frameworks -Wno-trigraphs -Werror -Wno-missing-field-initializers -Wmissing-prototypes -Wunreachable-code -Wnon-virtual-dtor -Wno-overloaded-virtual -Wno-exit-time-destructors -Wno-missing-braces -Wparentheses -Wswitch -Wunused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wempty-body -Wuninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wconstant-conversion -Wint-conversion -Wbool-conversion -Wenum-conversion -Wno-float-conversion -Wnon-literal-null-conversion -Wobjc-literal-conversion -Wsign-compare -Wno-shorten-64-to-32 -Wnewline-eof -Wno-c++11-extensions -Wno-implicit-fallthrough -Wdeprecated-declarations -Winvalid-offsetof -Wno-sign-conversion -Winfinite-recursion -Wmove -Wcomma -Wblock-capture-autoreleasing -Wstrict-prototypes -Wrange-loop-analysis -Wno-semicolon-before-method-body -Wall -Wc99-designator -Wconditional-uninitialized -Wextra -Wdeprecated-enum-enum-conversion -Wdeprecated-enum-float-conversion -Wenum-float-conversion -Wfinal-dtor-non-final-class -Wformat=2 -Wmisleading-indentation -Wpointer-to-int-cast -Wreorder-init-list -Wundef -Wunused-but-set-variable -Wvla -Werror=unguarded-availability -Wno-elaborated-enum-base -Wcast-qual -Wchar-subscripts -Wextra-tokens -Winit-self -Wmissing-noreturn -Wpacked -Wpointer-arith -Wredundant-decls -Wwrite-strings -Wexit-time-destructors -Wglobal-constructors -Wtautological-compare -Wimplicit-fallthrough -Wvla -Wno-unknown-warning-option -Wliteral-conversion -Wthread-safety -Wno-profile-instr-out-of-date -Wno-profile-instr-unprofiled -Wno-backend-plugin -Wunsafe-buffer-usage -std=c++2b -fdeprecated-macro -ferror-limit 19 -fmacro-backtrace-limit=0 -fvisibility=hidden -fvisibility-inlines-hidden -stack-protector 1 -fblocks -fencode-extended-block-signature -fno-rtti -fregister-global-dtors-with-atexit -fgnuc-version=4.2.1 -fno-cxx-modules -fno-implicit-modules -fskip-odr-check-in-gmf -fpascal-strings -fmax-type-align=16 -fdiagnostics-show-note-include-stack -vectorize-loops -vectorize-slp -fsafe-buffer-usage-suggestions -analyzer-output=html -analyzer-config report-in-main-source-file=true -analyzer-config nullability:NoDiagnoseCallsToSystemHeaders=true -analyzer-checker optin.osx.cocoa.localizability.NonLocalizedStringChecker -analyzer-checker security.insecureAPI.UncheckedReturn -analyzer-checker security.insecureAPI.getpw -analyzer-checker security.insecureAPI.gets -analyzer-checker security.insecureAPI.mkstemp -analyzer-checker security.insecureAPI.mktemp -analyzer-disable-checker security.insecureAPI.rand -analyzer-disable-checker security.insecureAPI.strcpy -analyzer-checker security.insecureAPI.vfork -analyzer-disable-checker alpha,apiModeling,core,cplusplus,deadcode,debug,fuchsia,nullability,optin,osx,security,unix,webkit -analyzer-checker alpha.webkit.ForwardDeclChecker,alpha.webkit.MemoryUnsafeCastChecker,alpha.webkit.NoDeleteChecker,alpha.webkit.NoUncheckedPtrMemberChecker,alpha.webkit.NoUnretainedMemberChecker,alpha.webkit.RetainPtrCtorAdoptChecker,alpha.webkit.UncheckedCallArgsChecker,alpha.webkit.UncheckedLocalVarsChecker,alpha.webkit.UncountedCallArgsChecker,alpha.webkit.UncountedLocalVarsChecker,alpha.webkit.UnretainedCallArgsChecker,alpha.webkit.UnretainedLambdaCapturesChecker,alpha.webkit.UnretainedLocalVarsChecker,webkit.NoUncountedMemberChecker,webkit.RefCntblBaseVirtualDtor,webkit.UncountedLambdaCapturesChecker -analyzer-config max-nodes=10000000 -analyzer-config verbose-report-filename=true -fdwarf2-cfi-asm -o /Volumes/Data/worker/macOS-Safer-CPP-Checks-EWS/build/scan-build-output/StaticAnalyzer/WebCore/WebCore/normal/arm64/UnifiedSource482.plist -x c++ /Volumes/Data/worker/macOS-Safer-CPP-Checks-EWS/build/WebKitBuild/Release/DerivedSources/WebCore/unified-sources/UnifiedSource482.cpp
1/*
2 * Copyright (c) 2015 Canon Inc.
3 * Copyright (c) 2015 Igalia.
4 * Copyright (c) 2016 Apple Inc. All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:
9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer.
11 * 2. Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
14 *
15 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
16 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
17 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
18 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
19 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
20 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
21 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
22 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
23 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
24 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
25 * THE POSSIBILITY OF SUCH DAMAGE.
26 *
27 */
28
29// DO NOT EDIT THIS FILE. It is automatically generated from JavaScript files for
30// builtins by the script: Source/JavaScriptCore/Scripts/generate-js-builtins.py
31
32#pragma once
33
34#include <cstdint>
35
36#include <JavaScriptCore/BuiltinUtils.h>
37#include <JavaScriptCore/Identifier.h>
38#include <JavaScriptCore/JSFunction.h>
39#include <JavaScriptCore/UnlinkedFunctionExecutable.h>
40
41namespace JSC {
42class FunctionExecutable;
43}
44
45namespace WebCore {
46
47/* StreamInternals */
48extern const char* const s_streamInternalsMarkPromiseAsHandledCode;
49extern const int s_streamInternalsMarkPromiseAsHandledCodeLength;
50extern const JSC::ConstructAbility s_streamInternalsMarkPromiseAsHandledCodeConstructAbility;
51extern const JSC::ConstructorKind s_streamInternalsMarkPromiseAsHandledCodeConstructorKind;
52extern const JSC::ImplementationVisibility s_streamInternalsMarkPromiseAsHandledCodeImplementationVisibility;
53extern const JSC::InlineAttribute s_streamInternalsMarkPromiseAsHandledCodeInlineAttribute;
54extern const char* const s_streamInternalsShieldingPromiseResolveCode;
55extern const int s_streamInternalsShieldingPromiseResolveCodeLength;
56extern const JSC::ConstructAbility s_streamInternalsShieldingPromiseResolveCodeConstructAbility;
57extern const JSC::ConstructorKind s_streamInternalsShieldingPromiseResolveCodeConstructorKind;
58extern const JSC::ImplementationVisibility s_streamInternalsShieldingPromiseResolveCodeImplementationVisibility;
59extern const JSC::InlineAttribute s_streamInternalsShieldingPromiseResolveCodeInlineAttribute;
60extern const char* const s_streamInternalsPromiseInvokeOrNoopMethodNoCatchCode;
61extern const int s_streamInternalsPromiseInvokeOrNoopMethodNoCatchCodeLength;
62extern const JSC::ConstructAbility s_streamInternalsPromiseInvokeOrNoopMethodNoCatchCodeConstructAbility;
63extern const JSC::ConstructorKind s_streamInternalsPromiseInvokeOrNoopMethodNoCatchCodeConstructorKind;
64extern const JSC::ImplementationVisibility s_streamInternalsPromiseInvokeOrNoopMethodNoCatchCodeImplementationVisibility;
65extern const JSC::InlineAttribute s_streamInternalsPromiseInvokeOrNoopMethodNoCatchCodeInlineAttribute;
66extern const char* const s_streamInternalsPromiseInvokeOrNoopNoCatchCode;
67extern const int s_streamInternalsPromiseInvokeOrNoopNoCatchCodeLength;
68extern const JSC::ConstructAbility s_streamInternalsPromiseInvokeOrNoopNoCatchCodeConstructAbility;
69extern const JSC::ConstructorKind s_streamInternalsPromiseInvokeOrNoopNoCatchCodeConstructorKind;
70extern const JSC::ImplementationVisibility s_streamInternalsPromiseInvokeOrNoopNoCatchCodeImplementationVisibility;
71extern const JSC::InlineAttribute s_streamInternalsPromiseInvokeOrNoopNoCatchCodeInlineAttribute;
72extern const char* const s_streamInternalsPromiseInvokeOrNoopMethodCode;
73extern const int s_streamInternalsPromiseInvokeOrNoopMethodCodeLength;
74extern const JSC::ConstructAbility s_streamInternalsPromiseInvokeOrNoopMethodCodeConstructAbility;
75extern const JSC::ConstructorKind s_streamInternalsPromiseInvokeOrNoopMethodCodeConstructorKind;
76extern const JSC::ImplementationVisibility s_streamInternalsPromiseInvokeOrNoopMethodCodeImplementationVisibility;
77extern const JSC::InlineAttribute s_streamInternalsPromiseInvokeOrNoopMethodCodeInlineAttribute;
78extern const char* const s_streamInternalsPromiseInvokeOrNoopCode;
79extern const int s_streamInternalsPromiseInvokeOrNoopCodeLength;
80extern const JSC::ConstructAbility s_streamInternalsPromiseInvokeOrNoopCodeConstructAbility;
81extern const JSC::ConstructorKind s_streamInternalsPromiseInvokeOrNoopCodeConstructorKind;
82extern const JSC::ImplementationVisibility s_streamInternalsPromiseInvokeOrNoopCodeImplementationVisibility;
83extern const JSC::InlineAttribute s_streamInternalsPromiseInvokeOrNoopCodeInlineAttribute;
84extern const char* const s_streamInternalsPromiseInvokeOrFallbackOrNoopCode;
85extern const int s_streamInternalsPromiseInvokeOrFallbackOrNoopCodeLength;
86extern const JSC::ConstructAbility s_streamInternalsPromiseInvokeOrFallbackOrNoopCodeConstructAbility;
87extern const JSC::ConstructorKind s_streamInternalsPromiseInvokeOrFallbackOrNoopCodeConstructorKind;
88extern const JSC::ImplementationVisibility s_streamInternalsPromiseInvokeOrFallbackOrNoopCodeImplementationVisibility;
89extern const JSC::InlineAttribute s_streamInternalsPromiseInvokeOrFallbackOrNoopCodeInlineAttribute;
90extern const char* const s_streamInternalsValidateAndNormalizeQueuingStrategyCode;
91extern const int s_streamInternalsValidateAndNormalizeQueuingStrategyCodeLength;
92extern const JSC::ConstructAbility s_streamInternalsValidateAndNormalizeQueuingStrategyCodeConstructAbility;
93extern const JSC::ConstructorKind s_streamInternalsValidateAndNormalizeQueuingStrategyCodeConstructorKind;
94extern const JSC::ImplementationVisibility s_streamInternalsValidateAndNormalizeQueuingStrategyCodeImplementationVisibility;
95extern const JSC::InlineAttribute s_streamInternalsValidateAndNormalizeQueuingStrategyCodeInlineAttribute;
96extern const char* const s_streamInternalsNewQueueCode;
97extern const int s_streamInternalsNewQueueCodeLength;
98extern const JSC::ConstructAbility s_streamInternalsNewQueueCodeConstructAbility;
99extern const JSC::ConstructorKind s_streamInternalsNewQueueCodeConstructorKind;
100extern const JSC::ImplementationVisibility s_streamInternalsNewQueueCodeImplementationVisibility;
101extern const JSC::InlineAttribute s_streamInternalsNewQueueCodeInlineAttribute;
102extern const char* const s_streamInternalsDequeueValueCode;
103extern const int s_streamInternalsDequeueValueCodeLength;
104extern const JSC::ConstructAbility s_streamInternalsDequeueValueCodeConstructAbility;
105extern const JSC::ConstructorKind s_streamInternalsDequeueValueCodeConstructorKind;
106extern const JSC::ImplementationVisibility s_streamInternalsDequeueValueCodeImplementationVisibility;
107extern const JSC::InlineAttribute s_streamInternalsDequeueValueCodeInlineAttribute;
108extern const char* const s_streamInternalsEnqueueValueWithSizeCode;
109extern const int s_streamInternalsEnqueueValueWithSizeCodeLength;
110extern const JSC::ConstructAbility s_streamInternalsEnqueueValueWithSizeCodeConstructAbility;
111extern const JSC::ConstructorKind s_streamInternalsEnqueueValueWithSizeCodeConstructorKind;
112extern const JSC::ImplementationVisibility s_streamInternalsEnqueueValueWithSizeCodeImplementationVisibility;
113extern const JSC::InlineAttribute s_streamInternalsEnqueueValueWithSizeCodeInlineAttribute;
114extern const char* const s_streamInternalsPeekQueueValueCode;
115extern const int s_streamInternalsPeekQueueValueCodeLength;
116extern const JSC::ConstructAbility s_streamInternalsPeekQueueValueCodeConstructAbility;
117extern const JSC::ConstructorKind s_streamInternalsPeekQueueValueCodeConstructorKind;
118extern const JSC::ImplementationVisibility s_streamInternalsPeekQueueValueCodeImplementationVisibility;
119extern const JSC::InlineAttribute s_streamInternalsPeekQueueValueCodeInlineAttribute;
120extern const char* const s_streamInternalsResetQueueCode;
121extern const int s_streamInternalsResetQueueCodeLength;
122extern const JSC::ConstructAbility s_streamInternalsResetQueueCodeConstructAbility;
123extern const JSC::ConstructorKind s_streamInternalsResetQueueCodeConstructorKind;
124extern const JSC::ImplementationVisibility s_streamInternalsResetQueueCodeImplementationVisibility;
125extern const JSC::InlineAttribute s_streamInternalsResetQueueCodeInlineAttribute;
126extern const char* const s_streamInternalsExtractSizeAlgorithmCode;
127extern const int s_streamInternalsExtractSizeAlgorithmCodeLength;
128extern const JSC::ConstructAbility s_streamInternalsExtractSizeAlgorithmCodeConstructAbility;
129extern const JSC::ConstructorKind s_streamInternalsExtractSizeAlgorithmCodeConstructorKind;
130extern const JSC::ImplementationVisibility s_streamInternalsExtractSizeAlgorithmCodeImplementationVisibility;
131extern const JSC::InlineAttribute s_streamInternalsExtractSizeAlgorithmCodeInlineAttribute;
132extern const char* const s_streamInternalsExtractHighWaterMarkCode;
133extern const int s_streamInternalsExtractHighWaterMarkCodeLength;
134extern const JSC::ConstructAbility s_streamInternalsExtractHighWaterMarkCodeConstructAbility;
135extern const JSC::ConstructorKind s_streamInternalsExtractHighWaterMarkCodeConstructorKind;
136extern const JSC::ImplementationVisibility s_streamInternalsExtractHighWaterMarkCodeImplementationVisibility;
137extern const JSC::InlineAttribute s_streamInternalsExtractHighWaterMarkCodeInlineAttribute;
138extern const char* const s_streamInternalsExtractHighWaterMarkFromQueuingStrategyInitCode;
139extern const int s_streamInternalsExtractHighWaterMarkFromQueuingStrategyInitCodeLength;
140extern const JSC::ConstructAbility s_streamInternalsExtractHighWaterMarkFromQueuingStrategyInitCodeConstructAbility;
141extern const JSC::ConstructorKind s_streamInternalsExtractHighWaterMarkFromQueuingStrategyInitCodeConstructorKind;
142extern const JSC::ImplementationVisibility s_streamInternalsExtractHighWaterMarkFromQueuingStrategyInitCodeImplementationVisibility;
143extern const JSC::InlineAttribute s_streamInternalsExtractHighWaterMarkFromQueuingStrategyInitCodeInlineAttribute;
144extern const char* const s_streamInternalsCreateFulfilledPromiseCode;
145extern const int s_streamInternalsCreateFulfilledPromiseCodeLength;
146extern const JSC::ConstructAbility s_streamInternalsCreateFulfilledPromiseCodeConstructAbility;
147extern const JSC::ConstructorKind s_streamInternalsCreateFulfilledPromiseCodeConstructorKind;
148extern const JSC::ImplementationVisibility s_streamInternalsCreateFulfilledPromiseCodeImplementationVisibility;
149extern const JSC::InlineAttribute s_streamInternalsCreateFulfilledPromiseCodeInlineAttribute;
150extern const char* const s_streamInternalsToDictionaryCode;
151extern const int s_streamInternalsToDictionaryCodeLength;
152extern const JSC::ConstructAbility s_streamInternalsToDictionaryCodeConstructAbility;
153extern const JSC::ConstructorKind s_streamInternalsToDictionaryCodeConstructorKind;
154extern const JSC::ImplementationVisibility s_streamInternalsToDictionaryCodeImplementationVisibility;
155extern const JSC::InlineAttribute s_streamInternalsToDictionaryCodeInlineAttribute;
156
157#define WEBCORE_FOREACH_STREAMINTERNALS_BUILTIN_DATA(macro)macro(markPromiseAsHandled, streamInternalsMarkPromiseAsHandled
, 1) macro(shieldingPromiseResolve, streamInternalsShieldingPromiseResolve
, 1) macro(promiseInvokeOrNoopMethodNoCatch, streamInternalsPromiseInvokeOrNoopMethodNoCatch
, 3) macro(promiseInvokeOrNoopNoCatch, streamInternalsPromiseInvokeOrNoopNoCatch
, 3) macro(promiseInvokeOrNoopMethod, streamInternalsPromiseInvokeOrNoopMethod
, 3) macro(promiseInvokeOrNoop, streamInternalsPromiseInvokeOrNoop
, 3) macro(promiseInvokeOrFallbackOrNoop, streamInternalsPromiseInvokeOrFallbackOrNoop
, 5) macro(validateAndNormalizeQueuingStrategy, streamInternalsValidateAndNormalizeQueuingStrategy
, 2) macro(newQueue, streamInternalsNewQueue, 0) macro(dequeueValue
, streamInternalsDequeueValue, 1) macro(enqueueValueWithSize,
streamInternalsEnqueueValueWithSize, 3) macro(peekQueueValue
, streamInternalsPeekQueueValue, 1) macro(resetQueue, streamInternalsResetQueue
, 1) macro(extractSizeAlgorithm, streamInternalsExtractSizeAlgorithm
, 1) macro(extractHighWaterMark, streamInternalsExtractHighWaterMark
, 2) macro(extractHighWaterMarkFromQueuingStrategyInit, streamInternalsExtractHighWaterMarkFromQueuingStrategyInit
, 1) macro(createFulfilledPromise, streamInternalsCreateFulfilledPromise
, 1) macro(toDictionary, streamInternalsToDictionary, 3)
\
158 macro(markPromiseAsHandled, streamInternalsMarkPromiseAsHandled, 1) \
159 macro(shieldingPromiseResolve, streamInternalsShieldingPromiseResolve, 1) \
160 macro(promiseInvokeOrNoopMethodNoCatch, streamInternalsPromiseInvokeOrNoopMethodNoCatch, 3) \
161 macro(promiseInvokeOrNoopNoCatch, streamInternalsPromiseInvokeOrNoopNoCatch, 3) \
162 macro(promiseInvokeOrNoopMethod, streamInternalsPromiseInvokeOrNoopMethod, 3) \
163 macro(promiseInvokeOrNoop, streamInternalsPromiseInvokeOrNoop, 3) \
164 macro(promiseInvokeOrFallbackOrNoop, streamInternalsPromiseInvokeOrFallbackOrNoop, 5) \
165 macro(validateAndNormalizeQueuingStrategy, streamInternalsValidateAndNormalizeQueuingStrategy, 2) \
166 macro(newQueue, streamInternalsNewQueue, 0) \
167 macro(dequeueValue, streamInternalsDequeueValue, 1) \
168 macro(enqueueValueWithSize, streamInternalsEnqueueValueWithSize, 3) \
169 macro(peekQueueValue, streamInternalsPeekQueueValue, 1) \
170 macro(resetQueue, streamInternalsResetQueue, 1) \
171 macro(extractSizeAlgorithm, streamInternalsExtractSizeAlgorithm, 1) \
172 macro(extractHighWaterMark, streamInternalsExtractHighWaterMark, 2) \
173 macro(extractHighWaterMarkFromQueuingStrategyInit, streamInternalsExtractHighWaterMarkFromQueuingStrategyInit, 1) \
174 macro(createFulfilledPromise, streamInternalsCreateFulfilledPromise, 1) \
175 macro(toDictionary, streamInternalsToDictionary, 3) \
176
177#define WEBCORE_BUILTIN_STREAMINTERNALS_MARKPROMISEASHANDLED1 1
178#define WEBCORE_BUILTIN_STREAMINTERNALS_SHIELDINGPROMISERESOLVE1 1
179#define WEBCORE_BUILTIN_STREAMINTERNALS_PROMISEINVOKEORNOOPMETHODNOCATCH1 1
180#define WEBCORE_BUILTIN_STREAMINTERNALS_PROMISEINVOKEORNOOPNOCATCH1 1
181#define WEBCORE_BUILTIN_STREAMINTERNALS_PROMISEINVOKEORNOOPMETHOD1 1
182#define WEBCORE_BUILTIN_STREAMINTERNALS_PROMISEINVOKEORNOOP1 1
183#define WEBCORE_BUILTIN_STREAMINTERNALS_PROMISEINVOKEORFALLBACKORNOOP1 1
184#define WEBCORE_BUILTIN_STREAMINTERNALS_VALIDATEANDNORMALIZEQUEUINGSTRATEGY1 1
185#define WEBCORE_BUILTIN_STREAMINTERNALS_NEWQUEUE1 1
186#define WEBCORE_BUILTIN_STREAMINTERNALS_DEQUEUEVALUE1 1
187#define WEBCORE_BUILTIN_STREAMINTERNALS_ENQUEUEVALUEWITHSIZE1 1
188#define WEBCORE_BUILTIN_STREAMINTERNALS_PEEKQUEUEVALUE1 1
189#define WEBCORE_BUILTIN_STREAMINTERNALS_RESETQUEUE1 1
190#define WEBCORE_BUILTIN_STREAMINTERNALS_EXTRACTSIZEALGORITHM1 1
191#define WEBCORE_BUILTIN_STREAMINTERNALS_EXTRACTHIGHWATERMARK1 1
192#define WEBCORE_BUILTIN_STREAMINTERNALS_EXTRACTHIGHWATERMARKFROMQUEUINGSTRATEGYINIT1 1
193#define WEBCORE_BUILTIN_STREAMINTERNALS_CREATEFULFILLEDPROMISE1 1
194#define WEBCORE_BUILTIN_STREAMINTERNALS_TODICTIONARY1 1
195
196#define WEBCORE_FOREACH_STREAMINTERNALS_BUILTIN_CODE(macro)macro(streamInternalsMarkPromiseAsHandledCode, markPromiseAsHandled
, ASCIILiteral(), s_streamInternalsMarkPromiseAsHandledCodeLength
) macro(streamInternalsShieldingPromiseResolveCode, shieldingPromiseResolve
, ASCIILiteral(), s_streamInternalsShieldingPromiseResolveCodeLength
) macro(streamInternalsPromiseInvokeOrNoopMethodNoCatchCode, promiseInvokeOrNoopMethodNoCatch
, ASCIILiteral(), s_streamInternalsPromiseInvokeOrNoopMethodNoCatchCodeLength
) macro(streamInternalsPromiseInvokeOrNoopNoCatchCode, promiseInvokeOrNoopNoCatch
, ASCIILiteral(), s_streamInternalsPromiseInvokeOrNoopNoCatchCodeLength
) macro(streamInternalsPromiseInvokeOrNoopMethodCode, promiseInvokeOrNoopMethod
, ASCIILiteral(), s_streamInternalsPromiseInvokeOrNoopMethodCodeLength
) macro(streamInternalsPromiseInvokeOrNoopCode, promiseInvokeOrNoop
, ASCIILiteral(), s_streamInternalsPromiseInvokeOrNoopCodeLength
) macro(streamInternalsPromiseInvokeOrFallbackOrNoopCode, promiseInvokeOrFallbackOrNoop
, ASCIILiteral(), s_streamInternalsPromiseInvokeOrFallbackOrNoopCodeLength
) macro(streamInternalsValidateAndNormalizeQueuingStrategyCode
, validateAndNormalizeQueuingStrategy, ASCIILiteral(), s_streamInternalsValidateAndNormalizeQueuingStrategyCodeLength
) macro(streamInternalsNewQueueCode, newQueue, ASCIILiteral()
, s_streamInternalsNewQueueCodeLength) macro(streamInternalsDequeueValueCode
, dequeueValue, ASCIILiteral(), s_streamInternalsDequeueValueCodeLength
) macro(streamInternalsEnqueueValueWithSizeCode, enqueueValueWithSize
, ASCIILiteral(), s_streamInternalsEnqueueValueWithSizeCodeLength
) macro(streamInternalsPeekQueueValueCode, peekQueueValue, ASCIILiteral
(), s_streamInternalsPeekQueueValueCodeLength) macro(streamInternalsResetQueueCode
, resetQueue, ASCIILiteral(), s_streamInternalsResetQueueCodeLength
) macro(streamInternalsExtractSizeAlgorithmCode, extractSizeAlgorithm
, ASCIILiteral(), s_streamInternalsExtractSizeAlgorithmCodeLength
) macro(streamInternalsExtractHighWaterMarkCode, extractHighWaterMark
, ASCIILiteral(), s_streamInternalsExtractHighWaterMarkCodeLength
) macro(streamInternalsExtractHighWaterMarkFromQueuingStrategyInitCode
, extractHighWaterMarkFromQueuingStrategyInit, ASCIILiteral()
, s_streamInternalsExtractHighWaterMarkFromQueuingStrategyInitCodeLength
) macro(streamInternalsCreateFulfilledPromiseCode, createFulfilledPromise
, ASCIILiteral(), s_streamInternalsCreateFulfilledPromiseCodeLength
) macro(streamInternalsToDictionaryCode, toDictionary, ASCIILiteral
(), s_streamInternalsToDictionaryCodeLength)
\
197 macro(streamInternalsMarkPromiseAsHandledCode, markPromiseAsHandled, ASCIILiteral(), s_streamInternalsMarkPromiseAsHandledCodeLength) \
198 macro(streamInternalsShieldingPromiseResolveCode, shieldingPromiseResolve, ASCIILiteral(), s_streamInternalsShieldingPromiseResolveCodeLength) \
199 macro(streamInternalsPromiseInvokeOrNoopMethodNoCatchCode, promiseInvokeOrNoopMethodNoCatch, ASCIILiteral(), s_streamInternalsPromiseInvokeOrNoopMethodNoCatchCodeLength) \
200 macro(streamInternalsPromiseInvokeOrNoopNoCatchCode, promiseInvokeOrNoopNoCatch, ASCIILiteral(), s_streamInternalsPromiseInvokeOrNoopNoCatchCodeLength) \
201 macro(streamInternalsPromiseInvokeOrNoopMethodCode, promiseInvokeOrNoopMethod, ASCIILiteral(), s_streamInternalsPromiseInvokeOrNoopMethodCodeLength) \
202 macro(streamInternalsPromiseInvokeOrNoopCode, promiseInvokeOrNoop, ASCIILiteral(), s_streamInternalsPromiseInvokeOrNoopCodeLength) \
203 macro(streamInternalsPromiseInvokeOrFallbackOrNoopCode, promiseInvokeOrFallbackOrNoop, ASCIILiteral(), s_streamInternalsPromiseInvokeOrFallbackOrNoopCodeLength) \
204 macro(streamInternalsValidateAndNormalizeQueuingStrategyCode, validateAndNormalizeQueuingStrategy, ASCIILiteral(), s_streamInternalsValidateAndNormalizeQueuingStrategyCodeLength) \
205 macro(streamInternalsNewQueueCode, newQueue, ASCIILiteral(), s_streamInternalsNewQueueCodeLength) \
206 macro(streamInternalsDequeueValueCode, dequeueValue, ASCIILiteral(), s_streamInternalsDequeueValueCodeLength) \
207 macro(streamInternalsEnqueueValueWithSizeCode, enqueueValueWithSize, ASCIILiteral(), s_streamInternalsEnqueueValueWithSizeCodeLength) \
208 macro(streamInternalsPeekQueueValueCode, peekQueueValue, ASCIILiteral(), s_streamInternalsPeekQueueValueCodeLength) \
209 macro(streamInternalsResetQueueCode, resetQueue, ASCIILiteral(), s_streamInternalsResetQueueCodeLength) \
210 macro(streamInternalsExtractSizeAlgorithmCode, extractSizeAlgorithm, ASCIILiteral(), s_streamInternalsExtractSizeAlgorithmCodeLength) \
211 macro(streamInternalsExtractHighWaterMarkCode, extractHighWaterMark, ASCIILiteral(), s_streamInternalsExtractHighWaterMarkCodeLength) \
212 macro(streamInternalsExtractHighWaterMarkFromQueuingStrategyInitCode, extractHighWaterMarkFromQueuingStrategyInit, ASCIILiteral(), s_streamInternalsExtractHighWaterMarkFromQueuingStrategyInitCodeLength) \
213 macro(streamInternalsCreateFulfilledPromiseCode, createFulfilledPromise, ASCIILiteral(), s_streamInternalsCreateFulfilledPromiseCodeLength) \
214 macro(streamInternalsToDictionaryCode, toDictionary, ASCIILiteral(), s_streamInternalsToDictionaryCodeLength) \
215
216#define WEBCORE_FOREACH_STREAMINTERNALS_BUILTIN_FUNCTION_NAME(macro)macro(createFulfilledPromise) macro(dequeueValue) macro(enqueueValueWithSize
) macro(extractHighWaterMark) macro(extractHighWaterMarkFromQueuingStrategyInit
) macro(extractSizeAlgorithm) macro(markPromiseAsHandled) macro
(newQueue) macro(peekQueueValue) macro(promiseInvokeOrFallbackOrNoop
) macro(promiseInvokeOrNoop) macro(promiseInvokeOrNoopMethod)
macro(promiseInvokeOrNoopMethodNoCatch) macro(promiseInvokeOrNoopNoCatch
) macro(resetQueue) macro(shieldingPromiseResolve) macro(toDictionary
) macro(validateAndNormalizeQueuingStrategy)
\
217 macro(createFulfilledPromise) \
218 macro(dequeueValue) \
219 macro(enqueueValueWithSize) \
220 macro(extractHighWaterMark) \
221 macro(extractHighWaterMarkFromQueuingStrategyInit) \
222 macro(extractSizeAlgorithm) \
223 macro(markPromiseAsHandled) \
224 macro(newQueue) \
225 macro(peekQueueValue) \
226 macro(promiseInvokeOrFallbackOrNoop) \
227 macro(promiseInvokeOrNoop) \
228 macro(promiseInvokeOrNoopMethod) \
229 macro(promiseInvokeOrNoopMethodNoCatch) \
230 macro(promiseInvokeOrNoopNoCatch) \
231 macro(resetQueue) \
232 macro(shieldingPromiseResolve) \
233 macro(toDictionary) \
234 macro(validateAndNormalizeQueuingStrategy) \
235
236#define DECLARE_BUILTIN_GENERATOR(codeName, functionName, overriddenName, argumentCount) \
237 JSC::FunctionExecutable* codeName##Generator(JSC::VM&);
238
239WEBCORE_FOREACH_STREAMINTERNALS_BUILTIN_CODE(DECLARE_BUILTIN_GENERATOR)DECLARE_BUILTIN_GENERATOR(streamInternalsMarkPromiseAsHandledCode
, markPromiseAsHandled, ASCIILiteral(), s_streamInternalsMarkPromiseAsHandledCodeLength
) DECLARE_BUILTIN_GENERATOR(streamInternalsShieldingPromiseResolveCode
, shieldingPromiseResolve, ASCIILiteral(), s_streamInternalsShieldingPromiseResolveCodeLength
) DECLARE_BUILTIN_GENERATOR(streamInternalsPromiseInvokeOrNoopMethodNoCatchCode
, promiseInvokeOrNoopMethodNoCatch, ASCIILiteral(), s_streamInternalsPromiseInvokeOrNoopMethodNoCatchCodeLength
) DECLARE_BUILTIN_GENERATOR(streamInternalsPromiseInvokeOrNoopNoCatchCode
, promiseInvokeOrNoopNoCatch, ASCIILiteral(), s_streamInternalsPromiseInvokeOrNoopNoCatchCodeLength
) DECLARE_BUILTIN_GENERATOR(streamInternalsPromiseInvokeOrNoopMethodCode
, promiseInvokeOrNoopMethod, ASCIILiteral(), s_streamInternalsPromiseInvokeOrNoopMethodCodeLength
) DECLARE_BUILTIN_GENERATOR(streamInternalsPromiseInvokeOrNoopCode
, promiseInvokeOrNoop, ASCIILiteral(), s_streamInternalsPromiseInvokeOrNoopCodeLength
) DECLARE_BUILTIN_GENERATOR(streamInternalsPromiseInvokeOrFallbackOrNoopCode
, promiseInvokeOrFallbackOrNoop, ASCIILiteral(), s_streamInternalsPromiseInvokeOrFallbackOrNoopCodeLength
) DECLARE_BUILTIN_GENERATOR(streamInternalsValidateAndNormalizeQueuingStrategyCode
, validateAndNormalizeQueuingStrategy, ASCIILiteral(), s_streamInternalsValidateAndNormalizeQueuingStrategyCodeLength
) DECLARE_BUILTIN_GENERATOR(streamInternalsNewQueueCode, newQueue
, ASCIILiteral(), s_streamInternalsNewQueueCodeLength) DECLARE_BUILTIN_GENERATOR
(streamInternalsDequeueValueCode, dequeueValue, ASCIILiteral(
), s_streamInternalsDequeueValueCodeLength) DECLARE_BUILTIN_GENERATOR
(streamInternalsEnqueueValueWithSizeCode, enqueueValueWithSize
, ASCIILiteral(), s_streamInternalsEnqueueValueWithSizeCodeLength
) DECLARE_BUILTIN_GENERATOR(streamInternalsPeekQueueValueCode
, peekQueueValue, ASCIILiteral(), s_streamInternalsPeekQueueValueCodeLength
) DECLARE_BUILTIN_GENERATOR(streamInternalsResetQueueCode, resetQueue
, ASCIILiteral(), s_streamInternalsResetQueueCodeLength) DECLARE_BUILTIN_GENERATOR
(streamInternalsExtractSizeAlgorithmCode, extractSizeAlgorithm
, ASCIILiteral(), s_streamInternalsExtractSizeAlgorithmCodeLength
) DECLARE_BUILTIN_GENERATOR(streamInternalsExtractHighWaterMarkCode
, extractHighWaterMark, ASCIILiteral(), s_streamInternalsExtractHighWaterMarkCodeLength
) DECLARE_BUILTIN_GENERATOR(streamInternalsExtractHighWaterMarkFromQueuingStrategyInitCode
, extractHighWaterMarkFromQueuingStrategyInit, ASCIILiteral()
, s_streamInternalsExtractHighWaterMarkFromQueuingStrategyInitCodeLength
) DECLARE_BUILTIN_GENERATOR(streamInternalsCreateFulfilledPromiseCode
, createFulfilledPromise, ASCIILiteral(), s_streamInternalsCreateFulfilledPromiseCodeLength
) DECLARE_BUILTIN_GENERATOR(streamInternalsToDictionaryCode, toDictionary
, ASCIILiteral(), s_streamInternalsToDictionaryCodeLength)
240#undef DECLARE_BUILTIN_GENERATOR
241
242class StreamInternalsBuiltinsWrapper : private JSC::WeakHandleOwner {
243public:
244 explicit StreamInternalsBuiltinsWrapper(JSC::VM& vm)
245 : m_vm(vm)
246 WEBCORE_FOREACH_STREAMINTERNALS_BUILTIN_FUNCTION_NAME(INITIALIZE_BUILTIN_NAMES), m_createFulfilledPromise(JSC::Identifier::fromString(vm, "createFulfilledPromise"
""_s)), m_createFulfilledPromisePrivateName(JSC::Identifier::
fromUid(JSC::PrivateName(JSC::PrivateName::PrivateSymbol, "createFulfilledPromise"
""_s))) , m_dequeueValue(JSC::Identifier::fromString(vm, "dequeueValue"
""_s)), m_dequeueValuePrivateName(JSC::Identifier::fromUid(JSC
::PrivateName(JSC::PrivateName::PrivateSymbol, "dequeueValue"
""_s))) , m_enqueueValueWithSize(JSC::Identifier::fromString
(vm, "enqueueValueWithSize" ""_s)), m_enqueueValueWithSizePrivateName
(JSC::Identifier::fromUid(JSC::PrivateName(JSC::PrivateName::
PrivateSymbol, "enqueueValueWithSize" ""_s))) , m_extractHighWaterMark
(JSC::Identifier::fromString(vm, "extractHighWaterMark" ""_s)
), m_extractHighWaterMarkPrivateName(JSC::Identifier::fromUid
(JSC::PrivateName(JSC::PrivateName::PrivateSymbol, "extractHighWaterMark"
""_s))) , m_extractHighWaterMarkFromQueuingStrategyInit(JSC::
Identifier::fromString(vm, "extractHighWaterMarkFromQueuingStrategyInit"
""_s)), m_extractHighWaterMarkFromQueuingStrategyInitPrivateName
(JSC::Identifier::fromUid(JSC::PrivateName(JSC::PrivateName::
PrivateSymbol, "extractHighWaterMarkFromQueuingStrategyInit" ""_s
))) , m_extractSizeAlgorithm(JSC::Identifier::fromString(vm, "extractSizeAlgorithm"
""_s)), m_extractSizeAlgorithmPrivateName(JSC::Identifier::fromUid
(JSC::PrivateName(JSC::PrivateName::PrivateSymbol, "extractSizeAlgorithm"
""_s))) , m_markPromiseAsHandled(JSC::Identifier::fromString
(vm, "markPromiseAsHandled" ""_s)), m_markPromiseAsHandledPrivateName
(JSC::Identifier::fromUid(JSC::PrivateName(JSC::PrivateName::
PrivateSymbol, "markPromiseAsHandled" ""_s))) , m_newQueue(JSC
::Identifier::fromString(vm, "newQueue" ""_s)), m_newQueuePrivateName
(JSC::Identifier::fromUid(JSC::PrivateName(JSC::PrivateName::
PrivateSymbol, "newQueue" ""_s))) , m_peekQueueValue(JSC::Identifier
::fromString(vm, "peekQueueValue" ""_s)), m_peekQueueValuePrivateName
(JSC::Identifier::fromUid(JSC::PrivateName(JSC::PrivateName::
PrivateSymbol, "peekQueueValue" ""_s))) , m_promiseInvokeOrFallbackOrNoop
(JSC::Identifier::fromString(vm, "promiseInvokeOrFallbackOrNoop"
""_s)), m_promiseInvokeOrFallbackOrNoopPrivateName(JSC::Identifier
::fromUid(JSC::PrivateName(JSC::PrivateName::PrivateSymbol, "promiseInvokeOrFallbackOrNoop"
""_s))) , m_promiseInvokeOrNoop(JSC::Identifier::fromString(
vm, "promiseInvokeOrNoop" ""_s)), m_promiseInvokeOrNoopPrivateName
(JSC::Identifier::fromUid(JSC::PrivateName(JSC::PrivateName::
PrivateSymbol, "promiseInvokeOrNoop" ""_s))) , m_promiseInvokeOrNoopMethod
(JSC::Identifier::fromString(vm, "promiseInvokeOrNoopMethod" ""_s
)), m_promiseInvokeOrNoopMethodPrivateName(JSC::Identifier::fromUid
(JSC::PrivateName(JSC::PrivateName::PrivateSymbol, "promiseInvokeOrNoopMethod"
""_s))) , m_promiseInvokeOrNoopMethodNoCatch(JSC::Identifier
::fromString(vm, "promiseInvokeOrNoopMethodNoCatch" ""_s)), m_promiseInvokeOrNoopMethodNoCatchPrivateName
(JSC::Identifier::fromUid(JSC::PrivateName(JSC::PrivateName::
PrivateSymbol, "promiseInvokeOrNoopMethodNoCatch" ""_s))) , m_promiseInvokeOrNoopNoCatch
(JSC::Identifier::fromString(vm, "promiseInvokeOrNoopNoCatch"
""_s)), m_promiseInvokeOrNoopNoCatchPrivateName(JSC::Identifier
::fromUid(JSC::PrivateName(JSC::PrivateName::PrivateSymbol, "promiseInvokeOrNoopNoCatch"
""_s))) , m_resetQueue(JSC::Identifier::fromString(vm, "resetQueue"
""_s)), m_resetQueuePrivateName(JSC::Identifier::fromUid(JSC
::PrivateName(JSC::PrivateName::PrivateSymbol, "resetQueue" ""_s
))) , m_shieldingPromiseResolve(JSC::Identifier::fromString(vm
, "shieldingPromiseResolve" ""_s)), m_shieldingPromiseResolvePrivateName
(JSC::Identifier::fromUid(JSC::PrivateName(JSC::PrivateName::
PrivateSymbol, "shieldingPromiseResolve" ""_s))) , m_toDictionary
(JSC::Identifier::fromString(vm, "toDictionary" ""_s)), m_toDictionaryPrivateName
(JSC::Identifier::fromUid(JSC::PrivateName(JSC::PrivateName::
PrivateSymbol, "toDictionary" ""_s))) , m_validateAndNormalizeQueuingStrategy
(JSC::Identifier::fromString(vm, "validateAndNormalizeQueuingStrategy"
""_s)), m_validateAndNormalizeQueuingStrategyPrivateName(JSC
::Identifier::fromUid(JSC::PrivateName(JSC::PrivateName::PrivateSymbol
, "validateAndNormalizeQueuingStrategy" ""_s)))
247#define INITIALIZE_BUILTIN_SOURCE_MEMBERS(name, functionName, overriddenName, length) , m_##name##Source(JSC::makeSource(StringImpl::createWithoutCopying(unsafeMakeSpan(s_##name, static_cast<size_t>(length))), { }, JSC::SourceTaintedOrigin::Untainted))
248 WEBCORE_FOREACH_STREAMINTERNALS_BUILTIN_CODE(INITIALIZE_BUILTIN_SOURCE_MEMBERS)INITIALIZE_BUILTIN_SOURCE_MEMBERS(streamInternalsMarkPromiseAsHandledCode
, markPromiseAsHandled, ASCIILiteral(), s_streamInternalsMarkPromiseAsHandledCodeLength
) INITIALIZE_BUILTIN_SOURCE_MEMBERS(streamInternalsShieldingPromiseResolveCode
, shieldingPromiseResolve, ASCIILiteral(), s_streamInternalsShieldingPromiseResolveCodeLength
) INITIALIZE_BUILTIN_SOURCE_MEMBERS(streamInternalsPromiseInvokeOrNoopMethodNoCatchCode
, promiseInvokeOrNoopMethodNoCatch, ASCIILiteral(), s_streamInternalsPromiseInvokeOrNoopMethodNoCatchCodeLength
) INITIALIZE_BUILTIN_SOURCE_MEMBERS(streamInternalsPromiseInvokeOrNoopNoCatchCode
, promiseInvokeOrNoopNoCatch, ASCIILiteral(), s_streamInternalsPromiseInvokeOrNoopNoCatchCodeLength
) INITIALIZE_BUILTIN_SOURCE_MEMBERS(streamInternalsPromiseInvokeOrNoopMethodCode
, promiseInvokeOrNoopMethod, ASCIILiteral(), s_streamInternalsPromiseInvokeOrNoopMethodCodeLength
) INITIALIZE_BUILTIN_SOURCE_MEMBERS(streamInternalsPromiseInvokeOrNoopCode
, promiseInvokeOrNoop, ASCIILiteral(), s_streamInternalsPromiseInvokeOrNoopCodeLength
) INITIALIZE_BUILTIN_SOURCE_MEMBERS(streamInternalsPromiseInvokeOrFallbackOrNoopCode
, promiseInvokeOrFallbackOrNoop, ASCIILiteral(), s_streamInternalsPromiseInvokeOrFallbackOrNoopCodeLength
) INITIALIZE_BUILTIN_SOURCE_MEMBERS(streamInternalsValidateAndNormalizeQueuingStrategyCode
, validateAndNormalizeQueuingStrategy, ASCIILiteral(), s_streamInternalsValidateAndNormalizeQueuingStrategyCodeLength
) INITIALIZE_BUILTIN_SOURCE_MEMBERS(streamInternalsNewQueueCode
, newQueue, ASCIILiteral(), s_streamInternalsNewQueueCodeLength
) INITIALIZE_BUILTIN_SOURCE_MEMBERS(streamInternalsDequeueValueCode
, dequeueValue, ASCIILiteral(), s_streamInternalsDequeueValueCodeLength
) INITIALIZE_BUILTIN_SOURCE_MEMBERS(streamInternalsEnqueueValueWithSizeCode
, enqueueValueWithSize, ASCIILiteral(), s_streamInternalsEnqueueValueWithSizeCodeLength
) INITIALIZE_BUILTIN_SOURCE_MEMBERS(streamInternalsPeekQueueValueCode
, peekQueueValue, ASCIILiteral(), s_streamInternalsPeekQueueValueCodeLength
) INITIALIZE_BUILTIN_SOURCE_MEMBERS(streamInternalsResetQueueCode
, resetQueue, ASCIILiteral(), s_streamInternalsResetQueueCodeLength
) INITIALIZE_BUILTIN_SOURCE_MEMBERS(streamInternalsExtractSizeAlgorithmCode
, extractSizeAlgorithm, ASCIILiteral(), s_streamInternalsExtractSizeAlgorithmCodeLength
) INITIALIZE_BUILTIN_SOURCE_MEMBERS(streamInternalsExtractHighWaterMarkCode
, extractHighWaterMark, ASCIILiteral(), s_streamInternalsExtractHighWaterMarkCodeLength
) INITIALIZE_BUILTIN_SOURCE_MEMBERS(streamInternalsExtractHighWaterMarkFromQueuingStrategyInitCode
, extractHighWaterMarkFromQueuingStrategyInit, ASCIILiteral()
, s_streamInternalsExtractHighWaterMarkFromQueuingStrategyInitCodeLength
) INITIALIZE_BUILTIN_SOURCE_MEMBERS(streamInternalsCreateFulfilledPromiseCode
, createFulfilledPromise, ASCIILiteral(), s_streamInternalsCreateFulfilledPromiseCodeLength
) INITIALIZE_BUILTIN_SOURCE_MEMBERS(streamInternalsToDictionaryCode
, toDictionary, ASCIILiteral(), s_streamInternalsToDictionaryCodeLength
)
249#undef INITIALIZE_BUILTIN_SOURCE_MEMBERS
250 {
251 }
252
253#define EXPOSE_BUILTIN_EXECUTABLES(name, functionName, overriddenName, length) \
254 JSC::UnlinkedFunctionExecutable* name##Executable(); \
255 const JSC::SourceCode& name##Source() const { return m_##name##Source; }
256 WEBCORE_FOREACH_STREAMINTERNALS_BUILTIN_CODE(EXPOSE_BUILTIN_EXECUTABLES)EXPOSE_BUILTIN_EXECUTABLES(streamInternalsMarkPromiseAsHandledCode
, markPromiseAsHandled, ASCIILiteral(), s_streamInternalsMarkPromiseAsHandledCodeLength
) EXPOSE_BUILTIN_EXECUTABLES(streamInternalsShieldingPromiseResolveCode
, shieldingPromiseResolve, ASCIILiteral(), s_streamInternalsShieldingPromiseResolveCodeLength
) EXPOSE_BUILTIN_EXECUTABLES(streamInternalsPromiseInvokeOrNoopMethodNoCatchCode
, promiseInvokeOrNoopMethodNoCatch, ASCIILiteral(), s_streamInternalsPromiseInvokeOrNoopMethodNoCatchCodeLength
) EXPOSE_BUILTIN_EXECUTABLES(streamInternalsPromiseInvokeOrNoopNoCatchCode
, promiseInvokeOrNoopNoCatch, ASCIILiteral(), s_streamInternalsPromiseInvokeOrNoopNoCatchCodeLength
) EXPOSE_BUILTIN_EXECUTABLES(streamInternalsPromiseInvokeOrNoopMethodCode
, promiseInvokeOrNoopMethod, ASCIILiteral(), s_streamInternalsPromiseInvokeOrNoopMethodCodeLength
) EXPOSE_BUILTIN_EXECUTABLES(streamInternalsPromiseInvokeOrNoopCode
, promiseInvokeOrNoop, ASCIILiteral(), s_streamInternalsPromiseInvokeOrNoopCodeLength
) EXPOSE_BUILTIN_EXECUTABLES(streamInternalsPromiseInvokeOrFallbackOrNoopCode
, promiseInvokeOrFallbackOrNoop, ASCIILiteral(), s_streamInternalsPromiseInvokeOrFallbackOrNoopCodeLength
) EXPOSE_BUILTIN_EXECUTABLES(streamInternalsValidateAndNormalizeQueuingStrategyCode
, validateAndNormalizeQueuingStrategy, ASCIILiteral(), s_streamInternalsValidateAndNormalizeQueuingStrategyCodeLength
) EXPOSE_BUILTIN_EXECUTABLES(streamInternalsNewQueueCode, newQueue
, ASCIILiteral(), s_streamInternalsNewQueueCodeLength) EXPOSE_BUILTIN_EXECUTABLES
(streamInternalsDequeueValueCode, dequeueValue, ASCIILiteral(
), s_streamInternalsDequeueValueCodeLength) EXPOSE_BUILTIN_EXECUTABLES
(streamInternalsEnqueueValueWithSizeCode, enqueueValueWithSize
, ASCIILiteral(), s_streamInternalsEnqueueValueWithSizeCodeLength
) EXPOSE_BUILTIN_EXECUTABLES(streamInternalsPeekQueueValueCode
, peekQueueValue, ASCIILiteral(), s_streamInternalsPeekQueueValueCodeLength
) EXPOSE_BUILTIN_EXECUTABLES(streamInternalsResetQueueCode, resetQueue
, ASCIILiteral(), s_streamInternalsResetQueueCodeLength) EXPOSE_BUILTIN_EXECUTABLES
(streamInternalsExtractSizeAlgorithmCode, extractSizeAlgorithm
, ASCIILiteral(), s_streamInternalsExtractSizeAlgorithmCodeLength
) EXPOSE_BUILTIN_EXECUTABLES(streamInternalsExtractHighWaterMarkCode
, extractHighWaterMark, ASCIILiteral(), s_streamInternalsExtractHighWaterMarkCodeLength
) EXPOSE_BUILTIN_EXECUTABLES(streamInternalsExtractHighWaterMarkFromQueuingStrategyInitCode
, extractHighWaterMarkFromQueuingStrategyInit, ASCIILiteral()
, s_streamInternalsExtractHighWaterMarkFromQueuingStrategyInitCodeLength
) EXPOSE_BUILTIN_EXECUTABLES(streamInternalsCreateFulfilledPromiseCode
, createFulfilledPromise, ASCIILiteral(), s_streamInternalsCreateFulfilledPromiseCodeLength
) EXPOSE_BUILTIN_EXECUTABLES(streamInternalsToDictionaryCode,
toDictionary, ASCIILiteral(), s_streamInternalsToDictionaryCodeLength
)
257#undef EXPOSE_BUILTIN_EXECUTABLES
258
259 WEBCORE_FOREACH_STREAMINTERNALS_BUILTIN_FUNCTION_NAME(DECLARE_BUILTIN_IDENTIFIER_ACCESSOR)const JSC::Identifier& createFulfilledPromisePublicName()
const { return m_createFulfilledPromise; } const JSC::Identifier
& createFulfilledPromisePrivateName() const { return m_createFulfilledPromisePrivateName
; } const JSC::Identifier& dequeueValuePublicName() const
{ return m_dequeueValue; } const JSC::Identifier& dequeueValuePrivateName
() const { return m_dequeueValuePrivateName; } const JSC::Identifier
& enqueueValueWithSizePublicName() const { return m_enqueueValueWithSize
; } const JSC::Identifier& enqueueValueWithSizePrivateName
() const { return m_enqueueValueWithSizePrivateName; } const JSC
::Identifier& extractHighWaterMarkPublicName() const { return
m_extractHighWaterMark; } const JSC::Identifier& extractHighWaterMarkPrivateName
() const { return m_extractHighWaterMarkPrivateName; } const JSC
::Identifier& extractHighWaterMarkFromQueuingStrategyInitPublicName
() const { return m_extractHighWaterMarkFromQueuingStrategyInit
; } const JSC::Identifier& extractHighWaterMarkFromQueuingStrategyInitPrivateName
() const { return m_extractHighWaterMarkFromQueuingStrategyInitPrivateName
; } const JSC::Identifier& extractSizeAlgorithmPublicName
() const { return m_extractSizeAlgorithm; } const JSC::Identifier
& extractSizeAlgorithmPrivateName() const { return m_extractSizeAlgorithmPrivateName
; } const JSC::Identifier& markPromiseAsHandledPublicName
() const { return m_markPromiseAsHandled; } const JSC::Identifier
& markPromiseAsHandledPrivateName() const { return m_markPromiseAsHandledPrivateName
; } const JSC::Identifier& newQueuePublicName() const { return
m_newQueue; } const JSC::Identifier& newQueuePrivateName
() const { return m_newQueuePrivateName; } const JSC::Identifier
& peekQueueValuePublicName() const { return m_peekQueueValue
; } const JSC::Identifier& peekQueueValuePrivateName() const
{ return m_peekQueueValuePrivateName; } const JSC::Identifier
& promiseInvokeOrFallbackOrNoopPublicName() const { return
m_promiseInvokeOrFallbackOrNoop; } const JSC::Identifier&
promiseInvokeOrFallbackOrNoopPrivateName() const { return m_promiseInvokeOrFallbackOrNoopPrivateName
; } const JSC::Identifier& promiseInvokeOrNoopPublicName(
) const { return m_promiseInvokeOrNoop; } const JSC::Identifier
& promiseInvokeOrNoopPrivateName() const { return m_promiseInvokeOrNoopPrivateName
; } const JSC::Identifier& promiseInvokeOrNoopMethodPublicName
() const { return m_promiseInvokeOrNoopMethod; } const JSC::Identifier
& promiseInvokeOrNoopMethodPrivateName() const { return m_promiseInvokeOrNoopMethodPrivateName
; } const JSC::Identifier& promiseInvokeOrNoopMethodNoCatchPublicName
() const { return m_promiseInvokeOrNoopMethodNoCatch; } const
JSC::Identifier& promiseInvokeOrNoopMethodNoCatchPrivateName
() const { return m_promiseInvokeOrNoopMethodNoCatchPrivateName
; } const JSC::Identifier& promiseInvokeOrNoopNoCatchPublicName
() const { return m_promiseInvokeOrNoopNoCatch; } const JSC::
Identifier& promiseInvokeOrNoopNoCatchPrivateName() const
{ return m_promiseInvokeOrNoopNoCatchPrivateName; } const JSC
::Identifier& resetQueuePublicName() const { return m_resetQueue
; } const JSC::Identifier& resetQueuePrivateName() const {
return m_resetQueuePrivateName; } const JSC::Identifier&
shieldingPromiseResolvePublicName() const { return m_shieldingPromiseResolve
; } const JSC::Identifier& shieldingPromiseResolvePrivateName
() const { return m_shieldingPromiseResolvePrivateName; } const
JSC::Identifier& toDictionaryPublicName() const { return
m_toDictionary; } const JSC::Identifier& toDictionaryPrivateName
() const { return m_toDictionaryPrivateName; } const JSC::Identifier
& validateAndNormalizeQueuingStrategyPublicName() const {
return m_validateAndNormalizeQueuingStrategy; } const JSC::Identifier
& validateAndNormalizeQueuingStrategyPrivateName() const {
return m_validateAndNormalizeQueuingStrategyPrivateName; }
260
261 void exportNames();
262
263private:
264 JSC::VM& m_vm;
265
266 WEBCORE_FOREACH_STREAMINTERNALS_BUILTIN_FUNCTION_NAME(DECLARE_BUILTIN_NAMES)const JSC::Identifier m_createFulfilledPromise; const JSC::Identifier
m_createFulfilledPromisePrivateName; const JSC::Identifier m_dequeueValue
; const JSC::Identifier m_dequeueValuePrivateName; const JSC::
Identifier m_enqueueValueWithSize; const JSC::Identifier m_enqueueValueWithSizePrivateName
; const JSC::Identifier m_extractHighWaterMark; const JSC::Identifier
m_extractHighWaterMarkPrivateName; const JSC::Identifier m_extractHighWaterMarkFromQueuingStrategyInit
; const JSC::Identifier m_extractHighWaterMarkFromQueuingStrategyInitPrivateName
; const JSC::Identifier m_extractSizeAlgorithm; const JSC::Identifier
m_extractSizeAlgorithmPrivateName; const JSC::Identifier m_markPromiseAsHandled
; const JSC::Identifier m_markPromiseAsHandledPrivateName; const
JSC::Identifier m_newQueue; const JSC::Identifier m_newQueuePrivateName
; const JSC::Identifier m_peekQueueValue; const JSC::Identifier
m_peekQueueValuePrivateName; const JSC::Identifier m_promiseInvokeOrFallbackOrNoop
; const JSC::Identifier m_promiseInvokeOrFallbackOrNoopPrivateName
; const JSC::Identifier m_promiseInvokeOrNoop; const JSC::Identifier
m_promiseInvokeOrNoopPrivateName; const JSC::Identifier m_promiseInvokeOrNoopMethod
; const JSC::Identifier m_promiseInvokeOrNoopMethodPrivateName
; const JSC::Identifier m_promiseInvokeOrNoopMethodNoCatch; const
JSC::Identifier m_promiseInvokeOrNoopMethodNoCatchPrivateName
; const JSC::Identifier m_promiseInvokeOrNoopNoCatch; const JSC
::Identifier m_promiseInvokeOrNoopNoCatchPrivateName; const JSC
::Identifier m_resetQueue; const JSC::Identifier m_resetQueuePrivateName
; const JSC::Identifier m_shieldingPromiseResolve; const JSC::
Identifier m_shieldingPromiseResolvePrivateName; const JSC::Identifier
m_toDictionary; const JSC::Identifier m_toDictionaryPrivateName
; const JSC::Identifier m_validateAndNormalizeQueuingStrategy
; const JSC::Identifier m_validateAndNormalizeQueuingStrategyPrivateName
;
267
268#define DECLARE_BUILTIN_SOURCE_MEMBERS(name, functionName, overriddenName, length) \
269 JSC::SourceCode m_##name##Source;\
270 JSC::Weak<JSC::UnlinkedFunctionExecutable> m_##name##Executable;
271 WEBCORE_FOREACH_STREAMINTERNALS_BUILTIN_CODE(DECLARE_BUILTIN_SOURCE_MEMBERS)DECLARE_BUILTIN_SOURCE_MEMBERS(streamInternalsMarkPromiseAsHandledCode
, markPromiseAsHandled, ASCIILiteral(), s_streamInternalsMarkPromiseAsHandledCodeLength
) DECLARE_BUILTIN_SOURCE_MEMBERS(streamInternalsShieldingPromiseResolveCode
, shieldingPromiseResolve, ASCIILiteral(), s_streamInternalsShieldingPromiseResolveCodeLength
) DECLARE_BUILTIN_SOURCE_MEMBERS(streamInternalsPromiseInvokeOrNoopMethodNoCatchCode
, promiseInvokeOrNoopMethodNoCatch, ASCIILiteral(), s_streamInternalsPromiseInvokeOrNoopMethodNoCatchCodeLength
) DECLARE_BUILTIN_SOURCE_MEMBERS(streamInternalsPromiseInvokeOrNoopNoCatchCode
, promiseInvokeOrNoopNoCatch, ASCIILiteral(), s_streamInternalsPromiseInvokeOrNoopNoCatchCodeLength
) DECLARE_BUILTIN_SOURCE_MEMBERS(streamInternalsPromiseInvokeOrNoopMethodCode
, promiseInvokeOrNoopMethod, ASCIILiteral(), s_streamInternalsPromiseInvokeOrNoopMethodCodeLength
) DECLARE_BUILTIN_SOURCE_MEMBERS(streamInternalsPromiseInvokeOrNoopCode
, promiseInvokeOrNoop, ASCIILiteral(), s_streamInternalsPromiseInvokeOrNoopCodeLength
) DECLARE_BUILTIN_SOURCE_MEMBERS(streamInternalsPromiseInvokeOrFallbackOrNoopCode
, promiseInvokeOrFallbackOrNoop, ASCIILiteral(), s_streamInternalsPromiseInvokeOrFallbackOrNoopCodeLength
) DECLARE_BUILTIN_SOURCE_MEMBERS(streamInternalsValidateAndNormalizeQueuingStrategyCode
, validateAndNormalizeQueuingStrategy, ASCIILiteral(), s_streamInternalsValidateAndNormalizeQueuingStrategyCodeLength
) DECLARE_BUILTIN_SOURCE_MEMBERS(streamInternalsNewQueueCode,
newQueue, ASCIILiteral(), s_streamInternalsNewQueueCodeLength
) DECLARE_BUILTIN_SOURCE_MEMBERS(streamInternalsDequeueValueCode
, dequeueValue, ASCIILiteral(), s_streamInternalsDequeueValueCodeLength
) DECLARE_BUILTIN_SOURCE_MEMBERS(streamInternalsEnqueueValueWithSizeCode
, enqueueValueWithSize, ASCIILiteral(), s_streamInternalsEnqueueValueWithSizeCodeLength
) DECLARE_BUILTIN_SOURCE_MEMBERS(streamInternalsPeekQueueValueCode
, peekQueueValue, ASCIILiteral(), s_streamInternalsPeekQueueValueCodeLength
) DECLARE_BUILTIN_SOURCE_MEMBERS(streamInternalsResetQueueCode
, resetQueue, ASCIILiteral(), s_streamInternalsResetQueueCodeLength
) DECLARE_BUILTIN_SOURCE_MEMBERS(streamInternalsExtractSizeAlgorithmCode
, extractSizeAlgorithm, ASCIILiteral(), s_streamInternalsExtractSizeAlgorithmCodeLength
) DECLARE_BUILTIN_SOURCE_MEMBERS(streamInternalsExtractHighWaterMarkCode
, extractHighWaterMark, ASCIILiteral(), s_streamInternalsExtractHighWaterMarkCodeLength
) DECLARE_BUILTIN_SOURCE_MEMBERS(streamInternalsExtractHighWaterMarkFromQueuingStrategyInitCode
, extractHighWaterMarkFromQueuingStrategyInit, ASCIILiteral()
, s_streamInternalsExtractHighWaterMarkFromQueuingStrategyInitCodeLength
) DECLARE_BUILTIN_SOURCE_MEMBERS(streamInternalsCreateFulfilledPromiseCode
, createFulfilledPromise, ASCIILiteral(), s_streamInternalsCreateFulfilledPromiseCodeLength
) DECLARE_BUILTIN_SOURCE_MEMBERS(streamInternalsToDictionaryCode
, toDictionary, ASCIILiteral(), s_streamInternalsToDictionaryCodeLength
)
272#undef DECLARE_BUILTIN_SOURCE_MEMBERS
273
274};
275
276#define DEFINE_BUILTIN_EXECUTABLES(name, functionName, overriddenName, length) \
277inline JSC::UnlinkedFunctionExecutable* StreamInternalsBuiltinsWrapper::name##Executable() \
278{\
279 if (!m_##name##Executable) {\
280 JSC::Identifier executableName = functionName##PublicName();\
281 if (overriddenName)\
282 executableName = JSC::Identifier::fromString(m_vm, overriddenName);\
283 m_##name##Executable = JSC::Weak<JSC::UnlinkedFunctionExecutable>(JSC::createBuiltinExecutable(m_vm, m_##name##Source, executableName, s_##name##ImplementationVisibility, s_##name##ConstructorKind, s_##name##ConstructAbility, s_##name##InlineAttribute), this, &m_##name##Executable);\
284 }\
285 return m_##name##Executable.get();\
286}
287WEBCORE_FOREACH_STREAMINTERNALS_BUILTIN_CODE(DEFINE_BUILTIN_EXECUTABLES)DEFINE_BUILTIN_EXECUTABLES(streamInternalsMarkPromiseAsHandledCode
, markPromiseAsHandled, ASCIILiteral(), s_streamInternalsMarkPromiseAsHandledCodeLength
) DEFINE_BUILTIN_EXECUTABLES(streamInternalsShieldingPromiseResolveCode
, shieldingPromiseResolve, ASCIILiteral(), s_streamInternalsShieldingPromiseResolveCodeLength
) DEFINE_BUILTIN_EXECUTABLES(streamInternalsPromiseInvokeOrNoopMethodNoCatchCode
, promiseInvokeOrNoopMethodNoCatch, ASCIILiteral(), s_streamInternalsPromiseInvokeOrNoopMethodNoCatchCodeLength
) DEFINE_BUILTIN_EXECUTABLES(streamInternalsPromiseInvokeOrNoopNoCatchCode
, promiseInvokeOrNoopNoCatch, ASCIILiteral(), s_streamInternalsPromiseInvokeOrNoopNoCatchCodeLength
) DEFINE_BUILTIN_EXECUTABLES(streamInternalsPromiseInvokeOrNoopMethodCode
, promiseInvokeOrNoopMethod, ASCIILiteral(), s_streamInternalsPromiseInvokeOrNoopMethodCodeLength
) DEFINE_BUILTIN_EXECUTABLES(streamInternalsPromiseInvokeOrNoopCode
, promiseInvokeOrNoop, ASCIILiteral(), s_streamInternalsPromiseInvokeOrNoopCodeLength
) DEFINE_BUILTIN_EXECUTABLES(streamInternalsPromiseInvokeOrFallbackOrNoopCode
, promiseInvokeOrFallbackOrNoop, ASCIILiteral(), s_streamInternalsPromiseInvokeOrFallbackOrNoopCodeLength
) DEFINE_BUILTIN_EXECUTABLES(streamInternalsValidateAndNormalizeQueuingStrategyCode
, validateAndNormalizeQueuingStrategy, ASCIILiteral(), s_streamInternalsValidateAndNormalizeQueuingStrategyCodeLength
) DEFINE_BUILTIN_EXECUTABLES(streamInternalsNewQueueCode, newQueue
, ASCIILiteral(), s_streamInternalsNewQueueCodeLength) DEFINE_BUILTIN_EXECUTABLES
(streamInternalsDequeueValueCode, dequeueValue, ASCIILiteral(
), s_streamInternalsDequeueValueCodeLength) DEFINE_BUILTIN_EXECUTABLES
(streamInternalsEnqueueValueWithSizeCode, enqueueValueWithSize
, ASCIILiteral(), s_streamInternalsEnqueueValueWithSizeCodeLength
) DEFINE_BUILTIN_EXECUTABLES(streamInternalsPeekQueueValueCode
, peekQueueValue, ASCIILiteral(), s_streamInternalsPeekQueueValueCodeLength
) DEFINE_BUILTIN_EXECUTABLES(streamInternalsResetQueueCode, resetQueue
, ASCIILiteral(), s_streamInternalsResetQueueCodeLength) DEFINE_BUILTIN_EXECUTABLES
(streamInternalsExtractSizeAlgorithmCode, extractSizeAlgorithm
, ASCIILiteral(), s_streamInternalsExtractSizeAlgorithmCodeLength
) DEFINE_BUILTIN_EXECUTABLES(streamInternalsExtractHighWaterMarkCode
, extractHighWaterMark, ASCIILiteral(), s_streamInternalsExtractHighWaterMarkCodeLength
) DEFINE_BUILTIN_EXECUTABLES(streamInternalsExtractHighWaterMarkFromQueuingStrategyInitCode
, extractHighWaterMarkFromQueuingStrategyInit, ASCIILiteral()
, s_streamInternalsExtractHighWaterMarkFromQueuingStrategyInitCodeLength
) DEFINE_BUILTIN_EXECUTABLES(streamInternalsCreateFulfilledPromiseCode
, createFulfilledPromise, ASCIILiteral(), s_streamInternalsCreateFulfilledPromiseCodeLength
) DEFINE_BUILTIN_EXECUTABLES(streamInternalsToDictionaryCode,
toDictionary, ASCIILiteral(), s_streamInternalsToDictionaryCodeLength
)
288#undef DEFINE_BUILTIN_EXECUTABLES
289
290inline void StreamInternalsBuiltinsWrapper::exportNames()
291{
292#define EXPORT_FUNCTION_NAME(name) m_vm.propertyNames->appendExternalName(name##PublicName(), name##PrivateName());
293 WEBCORE_FOREACH_STREAMINTERNALS_BUILTIN_FUNCTION_NAME(EXPORT_FUNCTION_NAME)EXPORT_FUNCTION_NAME(createFulfilledPromise) EXPORT_FUNCTION_NAME
(dequeueValue) EXPORT_FUNCTION_NAME(enqueueValueWithSize) EXPORT_FUNCTION_NAME
(extractHighWaterMark) EXPORT_FUNCTION_NAME(extractHighWaterMarkFromQueuingStrategyInit
) EXPORT_FUNCTION_NAME(extractSizeAlgorithm) EXPORT_FUNCTION_NAME
(markPromiseAsHandled) EXPORT_FUNCTION_NAME(newQueue) EXPORT_FUNCTION_NAME
(peekQueueValue) EXPORT_FUNCTION_NAME(promiseInvokeOrFallbackOrNoop
) EXPORT_FUNCTION_NAME(promiseInvokeOrNoop) EXPORT_FUNCTION_NAME
(promiseInvokeOrNoopMethod) EXPORT_FUNCTION_NAME(promiseInvokeOrNoopMethodNoCatch
) EXPORT_FUNCTION_NAME(promiseInvokeOrNoopNoCatch) EXPORT_FUNCTION_NAME
(resetQueue) EXPORT_FUNCTION_NAME(shieldingPromiseResolve) EXPORT_FUNCTION_NAME
(toDictionary) EXPORT_FUNCTION_NAME(validateAndNormalizeQueuingStrategy
)
294#undef EXPORT_FUNCTION_NAME
295}
296
297class StreamInternalsBuiltinFunctions {
298public:
299 explicit StreamInternalsBuiltinFunctions(JSC::VM& vm) : m_vm(vm) { }
300
301 void init(JSC::JSGlobalObject&);
302 template<typename Visitor> void visit(Visitor&);
303
304public:
305 JSC::VM& m_vm;
306
307#define DECLARE_BUILTIN_SOURCE_MEMBERS(functionName) \
308 JSC::WriteBarrier<JSC::JSFunction> m_##functionName##Function;
309 WEBCORE_FOREACH_STREAMINTERNALS_BUILTIN_FUNCTION_NAME(DECLARE_BUILTIN_SOURCE_MEMBERS)DECLARE_BUILTIN_SOURCE_MEMBERS(createFulfilledPromise) DECLARE_BUILTIN_SOURCE_MEMBERS
(dequeueValue) DECLARE_BUILTIN_SOURCE_MEMBERS(enqueueValueWithSize
) DECLARE_BUILTIN_SOURCE_MEMBERS(extractHighWaterMark) DECLARE_BUILTIN_SOURCE_MEMBERS
(extractHighWaterMarkFromQueuingStrategyInit) DECLARE_BUILTIN_SOURCE_MEMBERS
(extractSizeAlgorithm) DECLARE_BUILTIN_SOURCE_MEMBERS(markPromiseAsHandled
) DECLARE_BUILTIN_SOURCE_MEMBERS(newQueue) DECLARE_BUILTIN_SOURCE_MEMBERS
(peekQueueValue) DECLARE_BUILTIN_SOURCE_MEMBERS(promiseInvokeOrFallbackOrNoop
) DECLARE_BUILTIN_SOURCE_MEMBERS(promiseInvokeOrNoop) DECLARE_BUILTIN_SOURCE_MEMBERS
(promiseInvokeOrNoopMethod) DECLARE_BUILTIN_SOURCE_MEMBERS(promiseInvokeOrNoopMethodNoCatch
) DECLARE_BUILTIN_SOURCE_MEMBERS(promiseInvokeOrNoopNoCatch) DECLARE_BUILTIN_SOURCE_MEMBERS
(resetQueue) DECLARE_BUILTIN_SOURCE_MEMBERS(shieldingPromiseResolve
) DECLARE_BUILTIN_SOURCE_MEMBERS(toDictionary) DECLARE_BUILTIN_SOURCE_MEMBERS
(validateAndNormalizeQueuingStrategy)
310#undef DECLARE_BUILTIN_SOURCE_MEMBERS
311};
312
313inline void StreamInternalsBuiltinFunctions::init(JSC::JSGlobalObject& globalObject)
314{
315#define EXPORT_FUNCTION(codeName, functionName, overriddenName, length)\
316 m_##functionName##Function.set(m_vm, &globalObject, JSC::JSFunction::create(m_vm, &globalObject, codeName##Generator(m_vm), &globalObject));
317 WEBCORE_FOREACH_STREAMINTERNALS_BUILTIN_CODE(EXPORT_FUNCTION)EXPORT_FUNCTION(streamInternalsMarkPromiseAsHandledCode, markPromiseAsHandled
, ASCIILiteral(), s_streamInternalsMarkPromiseAsHandledCodeLength
) EXPORT_FUNCTION(streamInternalsShieldingPromiseResolveCode,
shieldingPromiseResolve, ASCIILiteral(), s_streamInternalsShieldingPromiseResolveCodeLength
) EXPORT_FUNCTION(streamInternalsPromiseInvokeOrNoopMethodNoCatchCode
, promiseInvokeOrNoopMethodNoCatch, ASCIILiteral(), s_streamInternalsPromiseInvokeOrNoopMethodNoCatchCodeLength
) EXPORT_FUNCTION(streamInternalsPromiseInvokeOrNoopNoCatchCode
, promiseInvokeOrNoopNoCatch, ASCIILiteral(), s_streamInternalsPromiseInvokeOrNoopNoCatchCodeLength
) EXPORT_FUNCTION(streamInternalsPromiseInvokeOrNoopMethodCode
, promiseInvokeOrNoopMethod, ASCIILiteral(), s_streamInternalsPromiseInvokeOrNoopMethodCodeLength
) EXPORT_FUNCTION(streamInternalsPromiseInvokeOrNoopCode, promiseInvokeOrNoop
, ASCIILiteral(), s_streamInternalsPromiseInvokeOrNoopCodeLength
) EXPORT_FUNCTION(streamInternalsPromiseInvokeOrFallbackOrNoopCode
, promiseInvokeOrFallbackOrNoop, ASCIILiteral(), s_streamInternalsPromiseInvokeOrFallbackOrNoopCodeLength
) EXPORT_FUNCTION(streamInternalsValidateAndNormalizeQueuingStrategyCode
, validateAndNormalizeQueuingStrategy, ASCIILiteral(), s_streamInternalsValidateAndNormalizeQueuingStrategyCodeLength
) EXPORT_FUNCTION(streamInternalsNewQueueCode, newQueue, ASCIILiteral
(), s_streamInternalsNewQueueCodeLength) EXPORT_FUNCTION(streamInternalsDequeueValueCode
, dequeueValue, ASCIILiteral(), s_streamInternalsDequeueValueCodeLength
) EXPORT_FUNCTION(streamInternalsEnqueueValueWithSizeCode, enqueueValueWithSize
, ASCIILiteral(), s_streamInternalsEnqueueValueWithSizeCodeLength
) EXPORT_FUNCTION(streamInternalsPeekQueueValueCode, peekQueueValue
, ASCIILiteral(), s_streamInternalsPeekQueueValueCodeLength) EXPORT_FUNCTION
(streamInternalsResetQueueCode, resetQueue, ASCIILiteral(), s_streamInternalsResetQueueCodeLength
) EXPORT_FUNCTION(streamInternalsExtractSizeAlgorithmCode, extractSizeAlgorithm
, ASCIILiteral(), s_streamInternalsExtractSizeAlgorithmCodeLength
) EXPORT_FUNCTION(streamInternalsExtractHighWaterMarkCode, extractHighWaterMark
, ASCIILiteral(), s_streamInternalsExtractHighWaterMarkCodeLength
) EXPORT_FUNCTION(streamInternalsExtractHighWaterMarkFromQueuingStrategyInitCode
, extractHighWaterMarkFromQueuingStrategyInit, ASCIILiteral()
, s_streamInternalsExtractHighWaterMarkFromQueuingStrategyInitCodeLength
) EXPORT_FUNCTION(streamInternalsCreateFulfilledPromiseCode, createFulfilledPromise
, ASCIILiteral(), s_streamInternalsCreateFulfilledPromiseCodeLength
) EXPORT_FUNCTION(streamInternalsToDictionaryCode, toDictionary
, ASCIILiteral(), s_streamInternalsToDictionaryCodeLength)
Call argument uses a forward declared type 'FunctionExecutable *'
318#undef EXPORT_FUNCTION
319}
320
321template<typename Visitor>
322inline void StreamInternalsBuiltinFunctions::visit(Visitor& visitor)
323{
324#define VISIT_FUNCTION(name) visitor.append(m_##name##Function);
325 WEBCORE_FOREACH_STREAMINTERNALS_BUILTIN_FUNCTION_NAME(VISIT_FUNCTION)VISIT_FUNCTION(createFulfilledPromise) VISIT_FUNCTION(dequeueValue
) VISIT_FUNCTION(enqueueValueWithSize) VISIT_FUNCTION(extractHighWaterMark
) VISIT_FUNCTION(extractHighWaterMarkFromQueuingStrategyInit)
VISIT_FUNCTION(extractSizeAlgorithm) VISIT_FUNCTION(markPromiseAsHandled
) VISIT_FUNCTION(newQueue) VISIT_FUNCTION(peekQueueValue) VISIT_FUNCTION
(promiseInvokeOrFallbackOrNoop) VISIT_FUNCTION(promiseInvokeOrNoop
) VISIT_FUNCTION(promiseInvokeOrNoopMethod) VISIT_FUNCTION(promiseInvokeOrNoopMethodNoCatch
) VISIT_FUNCTION(promiseInvokeOrNoopNoCatch) VISIT_FUNCTION(resetQueue
) VISIT_FUNCTION(shieldingPromiseResolve) VISIT_FUNCTION(toDictionary
) VISIT_FUNCTION(validateAndNormalizeQueuingStrategy)
326#undef VISIT_FUNCTION
327}
328
329template void StreamInternalsBuiltinFunctions::visit(JSC::AbstractSlotVisitor&);
330template void StreamInternalsBuiltinFunctions::visit(JSC::SlotVisitor&);
331
332
333
334} // namespace WebCore