-
-
Save Jarred-Sumner/bd84a315802a0bea248ef0089d515f8f to your computer and use it in GitHub Desktop.
This file has been truncated, but you can view the full file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// GENERATED CODE - DO NOT MODIFY BY HAND | |
// Generated by make codegen | |
#include "root.h" | |
#include "headers.h" | |
#include "BunClientData.h" | |
#include "ZigGlobalObject.h" | |
#include <JavaScriptCore/JSFunction.h> | |
#include <JavaScriptCore/InternalFunction.h> | |
#include <JavaScriptCore/LazyClassStructure.h> | |
#include <JavaScriptCore/LazyClassStructureInlines.h> | |
#include <JavaScriptCore/FunctionPrototype.h> | |
#include <JavaScriptCore/DOMJITAbstractHeap.h> | |
#include "DOMJITIDLConvert.h" | |
#include "DOMJITIDLType.h" | |
#include "DOMJITIDLTypeFilter.h" | |
#include "DOMJITHelpers.h" | |
#include <JavaScriptCore/DFGAbstractHeap.h> | |
#include "JSDOMConvertBufferSource.h" | |
#include "ZigGeneratedClasses.h" | |
#if !OS(WINDOWS) | |
#define JSC_CALLCONV "C" | |
#else | |
#define JSC_CALLCONV "C" SYSV_ABI | |
#endif | |
extern JSC_CALLCONV void* JSC_HOST_CALL_ATTRIBUTES AttributeIteratorClass__construct(JSC::JSGlobalObject*, JSC::CallFrame*); | |
JSC_DECLARE_CUSTOM_GETTER(jsAttributeIteratorConstructor); | |
extern JSC_CALLCONV void JSC_HOST_CALL_ATTRIBUTES AttributeIteratorClass__finalize(void*); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES AttributeIteratorPrototype__getThis(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES AttributeIteratorPrototype__next(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV void* JSC_HOST_CALL_ATTRIBUTES BigIntStatsClass__construct(JSC::JSGlobalObject*, JSC::CallFrame*); | |
JSC_DECLARE_CUSTOM_GETTER(jsBigIntStatsConstructor); | |
extern JSC_CALLCONV void JSC_HOST_CALL_ATTRIBUTES BigIntStatsClass__finalize(void*); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES BigIntStatsPrototype__atime(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES BigIntStatsPrototype__atimeMs(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES BigIntStatsPrototype__atimeNs(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES BigIntStatsPrototype__birthtime(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES BigIntStatsPrototype__birthtimeMs(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES BigIntStatsPrototype__birthtimeNs(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES BigIntStatsPrototype__blksize(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES BigIntStatsPrototype__blocks(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES BigIntStatsPrototype__ctime(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES BigIntStatsPrototype__ctimeMs(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES BigIntStatsPrototype__ctimeNs(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES BigIntStatsPrototype__dev(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES BigIntStatsPrototype__gid(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES BigIntStatsPrototype__ino(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES BigIntStatsPrototype__isBlockDevice_(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES BigIntStatsPrototype__isBlockDevice_WithoutTypeChecks(void* ptr, JSC::JSGlobalObject * lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES BigIntStatsPrototype__isCharacterDevice_(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES BigIntStatsPrototype__isCharacterDevice_WithoutTypeChecks(void* ptr, JSC::JSGlobalObject * lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES BigIntStatsPrototype__isDirectory_(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES BigIntStatsPrototype__isDirectory_WithoutTypeChecks(void* ptr, JSC::JSGlobalObject * lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES BigIntStatsPrototype__isFIFO_(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES BigIntStatsPrototype__isFIFO_WithoutTypeChecks(void* ptr, JSC::JSGlobalObject * lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES BigIntStatsPrototype__isFile_(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES BigIntStatsPrototype__isFile_WithoutTypeChecks(void* ptr, JSC::JSGlobalObject * lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES BigIntStatsPrototype__isSocket_(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES BigIntStatsPrototype__isSocket_WithoutTypeChecks(void* ptr, JSC::JSGlobalObject * lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES BigIntStatsPrototype__isSymbolicLink_(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES BigIntStatsPrototype__isSymbolicLink_WithoutTypeChecks(void* ptr, JSC::JSGlobalObject * lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES BigIntStatsPrototype__mode(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES BigIntStatsPrototype__mtime(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES BigIntStatsPrototype__mtimeMs(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES BigIntStatsPrototype__mtimeNs(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES BigIntStatsPrototype__nlink(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES BigIntStatsPrototype__rdev(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES BigIntStatsPrototype__size(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES BigIntStatsPrototype__uid(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV void* JSC_HOST_CALL_ATTRIBUTES BlobClass__construct(JSC::JSGlobalObject*, JSC::CallFrame*); | |
JSC_DECLARE_CUSTOM_GETTER(jsBlobConstructor); | |
extern JSC_CALLCONV void JSC_HOST_CALL_ATTRIBUTES Blob__onStructuredCloneSerialize(void*, JSC::JSGlobalObject*, WebCore::CloneSerializer*, SYSV_ABI void (*) (WebCore::CloneSerializer*, const uint8_t*, uint32_t)); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES Blob__onStructuredCloneDeserialize(JSC::JSGlobalObject*, const uint8_t*, const uint8_t*); | |
extern JSC_CALLCONV void JSC_HOST_CALL_ATTRIBUTES BlobClass__finalize(void*); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES BlobPrototype__getArrayBuffer(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES BlobPrototype__getBytes(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES BlobPrototype__getExists(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES BlobPrototype__getFormData(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES BlobPrototype__getJSON(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES BlobPrototype__getLastModified(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES BlobPrototype__getName(void* ptr, JSC::EncodedJSValue thisValue, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV bool JSC_HOST_CALL_ATTRIBUTES BlobPrototype__setName(void* ptr, JSC::EncodedJSValue thisValue, JSC::JSGlobalObject* lexicalGlobalObject, JSC::EncodedJSValue value); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES BlobPrototype__getSize(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES BlobPrototype__getSlice(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES BlobPrototype__getStream(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES BlobPrototype__getText(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES BlobPrototype__getType(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES BlobPrototype__getWriter(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV size_t Blob__estimatedSize(void* ptr); | |
extern JSC_CALLCONV void JSC_HOST_CALL_ATTRIBUTES BlobInternalReadableStreamSourceClass__finalize(void*); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES BlobInternalReadableStreamSourcePrototype__cancelFromJS(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES BlobInternalReadableStreamSourcePrototype__drainFromJS(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES BlobInternalReadableStreamSourcePrototype__getIsClosedFromJS(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES BlobInternalReadableStreamSourcePrototype__getOnCloseFromJS(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV bool JSC_HOST_CALL_ATTRIBUTES BlobInternalReadableStreamSourcePrototype__setOnCloseFromJS(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::EncodedJSValue value); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES BlobInternalReadableStreamSourcePrototype__getOnDrainFromJS(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV bool JSC_HOST_CALL_ATTRIBUTES BlobInternalReadableStreamSourcePrototype__setOnDrainFromJS(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::EncodedJSValue value); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES BlobInternalReadableStreamSourcePrototype__pullFromJS(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES BlobInternalReadableStreamSourcePrototype__startFromJS(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES BlobInternalReadableStreamSourcePrototype__updateRefFromJS(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV void* JSC_HOST_CALL_ATTRIBUTES BrotliDecoderClass__construct(JSC::JSGlobalObject*, JSC::CallFrame*); | |
JSC_DECLARE_CUSTOM_GETTER(jsBrotliDecoderConstructor); | |
extern JSC_CALLCONV void JSC_HOST_CALL_ATTRIBUTES BrotliDecoderClass__finalize(void*); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES BrotliDecoderPrototype__decode(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES BrotliDecoderPrototype__decodeSync(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES BrotliDecoderPrototype__end(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES BrotliDecoderPrototype__endSync(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV bool JSC_HOST_CALL_ATTRIBUTES BrotliDecoder__hasPendingActivity(void* ptr); | |
extern JSC_CALLCONV void* JSC_HOST_CALL_ATTRIBUTES BrotliEncoderClass__construct(JSC::JSGlobalObject*, JSC::CallFrame*); | |
JSC_DECLARE_CUSTOM_GETTER(jsBrotliEncoderConstructor); | |
extern JSC_CALLCONV void JSC_HOST_CALL_ATTRIBUTES BrotliEncoderClass__finalize(void*); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES BrotliEncoderPrototype__encode(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES BrotliEncoderPrototype__encodeSync(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES BrotliEncoderPrototype__end(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES BrotliEncoderPrototype__endSync(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV bool JSC_HOST_CALL_ATTRIBUTES BrotliEncoder__hasPendingActivity(void* ptr); | |
extern JSC_CALLCONV void JSC_HOST_CALL_ATTRIBUTES BuildArtifactClass__finalize(void*); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES BuildArtifactPrototype__getArrayBuffer(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES BuildArtifactPrototype__getHash(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES BuildArtifactPrototype__getJSON(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES BuildArtifactPrototype__getOutputKind(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES BuildArtifactPrototype__getLoader(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES BuildArtifactPrototype__getPath(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES BuildArtifactPrototype__getSize(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES BuildArtifactPrototype__getSlice(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES BuildArtifactPrototype__getSourceMap(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES BuildArtifactPrototype__getStream(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES BuildArtifactPrototype__getText(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES BuildArtifactPrototype__getMimeType(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV void* JSC_HOST_CALL_ATTRIBUTES BuildMessageClass__construct(JSC::JSGlobalObject*, JSC::CallFrame*); | |
JSC_DECLARE_CUSTOM_GETTER(jsBuildMessageConstructor); | |
extern JSC_CALLCONV void JSC_HOST_CALL_ATTRIBUTES BuildMessageClass__finalize(void*); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES BuildMessagePrototype__toPrimitive(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES BuildMessagePrototype__getColumn(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES BuildMessagePrototype__getLevel(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES BuildMessagePrototype__getLine(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES BuildMessagePrototype__getMessage(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES BuildMessagePrototype__getNotes(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES BuildMessagePrototype__getPosition(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES BuildMessagePrototype__toJSON(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES BuildMessagePrototype__toString(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV void JSC_HOST_CALL_ATTRIBUTES BytesInternalReadableStreamSourceClass__finalize(void*); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES BytesInternalReadableStreamSourcePrototype__cancelFromJS(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES BytesInternalReadableStreamSourcePrototype__drainFromJS(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES BytesInternalReadableStreamSourcePrototype__getIsClosedFromJS(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES BytesInternalReadableStreamSourcePrototype__getOnCloseFromJS(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV bool JSC_HOST_CALL_ATTRIBUTES BytesInternalReadableStreamSourcePrototype__setOnCloseFromJS(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::EncodedJSValue value); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES BytesInternalReadableStreamSourcePrototype__getOnDrainFromJS(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV bool JSC_HOST_CALL_ATTRIBUTES BytesInternalReadableStreamSourcePrototype__setOnDrainFromJS(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::EncodedJSValue value); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES BytesInternalReadableStreamSourcePrototype__pullFromJS(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES BytesInternalReadableStreamSourcePrototype__startFromJS(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES BytesInternalReadableStreamSourcePrototype__updateRefFromJS(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV void* JSC_HOST_CALL_ATTRIBUTES CommentClass__construct(JSC::JSGlobalObject*, JSC::CallFrame*); | |
JSC_DECLARE_CUSTOM_GETTER(jsCommentConstructor); | |
extern JSC_CALLCONV void JSC_HOST_CALL_ATTRIBUTES CommentClass__finalize(void*); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES CommentPrototype__after(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES CommentPrototype__before(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES CommentPrototype__remove(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES CommentPrototype__removed(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES CommentPrototype__replace(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES CommentPrototype__getText(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV bool JSC_HOST_CALL_ATTRIBUTES CommentPrototype__setText(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::EncodedJSValue value); | |
extern JSC_CALLCONV void* JSC_HOST_CALL_ATTRIBUTES CryptoClass__construct(JSC::JSGlobalObject*, JSC::CallFrame*); | |
JSC_DECLARE_CUSTOM_GETTER(jsCryptoConstructor); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES CryptoPrototype__getRandomValues(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES CryptoPrototype__getRandomValuesWithoutTypeChecks(void* ptr, JSC::JSGlobalObject * lexicalGlobalObject, JSC::JSUint8Array* arg0); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES CryptoPrototype__randomUUID(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES CryptoPrototype__randomUUIDWithoutTypeChecks(void* ptr, JSC::JSGlobalObject * lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES CryptoPrototype__doScryptSync(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES CryptoPrototype__timingSafeEqual(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES CryptoPrototype__timingSafeEqualWithoutTypeChecks(void* ptr, JSC::JSGlobalObject * lexicalGlobalObject, JSC::JSUint8Array* arg0, JSC::JSUint8Array* arg1); | |
extern JSC_CALLCONV void* JSC_HOST_CALL_ATTRIBUTES CryptoHasherClass__construct(JSC::JSGlobalObject*, JSC::CallFrame*); | |
JSC_DECLARE_CUSTOM_GETTER(jsCryptoHasherConstructor); | |
extern JSC_CALLCONV void JSC_HOST_CALL_ATTRIBUTES CryptoHasherClass__finalize(void*); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES CryptoHasherPrototype__getAlgorithm(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES CryptoHasherPrototype__getByteLength(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES CryptoHasherPrototype__copy(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES CryptoHasherPrototype__digest(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES CryptoHasherPrototype__update(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC_DECLARE_CUSTOM_GETTER(CryptoHasherClass__getAlgorithms); | |
extern JSC_CALLCONV JSC_DECLARE_HOST_FUNCTION(CryptoHasherClass__hash) SYSV_ABI; | |
extern JSC_CALLCONV void* JSC_HOST_CALL_ATTRIBUTES DebugHTTPSServerClass__construct(JSC::JSGlobalObject*, JSC::CallFrame*); | |
JSC_DECLARE_CUSTOM_GETTER(jsDebugHTTPSServerConstructor); | |
extern JSC_CALLCONV void JSC_HOST_CALL_ATTRIBUTES DebugHTTPSServerClass__finalize(void*); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES DebugHTTPSServerPrototype__dispose(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES DebugHTTPSServerPrototype__getAddress(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES DebugHTTPSServerPrototype__getDevelopment(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES DebugHTTPSServerPrototype__doFetch(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES DebugHTTPSServerPrototype__getHostname(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES DebugHTTPSServerPrototype__getId(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES DebugHTTPSServerPrototype__getPendingRequests(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES DebugHTTPSServerPrototype__getPendingWebSockets(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES DebugHTTPSServerPrototype__getPort(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES DebugHTTPSServerPrototype__getProtocol(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES DebugHTTPSServerPrototype__doPublish(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES DebugHTTPSServerPrototype__doRef(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES DebugHTTPSServerPrototype__doReload(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES DebugHTTPSServerPrototype__doRequestIP(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES DebugHTTPSServerPrototype__doStop(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES DebugHTTPSServerPrototype__doUnref(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES DebugHTTPSServerPrototype__doUpgrade(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES DebugHTTPSServerPrototype__getURL(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV void* JSC_HOST_CALL_ATTRIBUTES DebugHTTPServerClass__construct(JSC::JSGlobalObject*, JSC::CallFrame*); | |
JSC_DECLARE_CUSTOM_GETTER(jsDebugHTTPServerConstructor); | |
extern JSC_CALLCONV void JSC_HOST_CALL_ATTRIBUTES DebugHTTPServerClass__finalize(void*); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES DebugHTTPServerPrototype__dispose(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES DebugHTTPServerPrototype__getAddress(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES DebugHTTPServerPrototype__getDevelopment(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES DebugHTTPServerPrototype__doFetch(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES DebugHTTPServerPrototype__getHostname(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES DebugHTTPServerPrototype__getId(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES DebugHTTPServerPrototype__getPendingRequests(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES DebugHTTPServerPrototype__getPendingWebSockets(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES DebugHTTPServerPrototype__getPort(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES DebugHTTPServerPrototype__getProtocol(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES DebugHTTPServerPrototype__doPublish(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES DebugHTTPServerPrototype__doRef(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES DebugHTTPServerPrototype__doReload(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES DebugHTTPServerPrototype__doRequestIP(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES DebugHTTPServerPrototype__doStop(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES DebugHTTPServerPrototype__doUnref(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES DebugHTTPServerPrototype__doUpgrade(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES DebugHTTPServerPrototype__getURL(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV void* JSC_HOST_CALL_ATTRIBUTES DirentClass__construct(JSC::JSGlobalObject*, JSC::CallFrame*); | |
JSC_DECLARE_CUSTOM_GETTER(jsDirentConstructor); | |
extern JSC_CALLCONV void JSC_HOST_CALL_ATTRIBUTES DirentClass__finalize(void*); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES DirentPrototype__isBlockDevice(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES DirentPrototype__isCharacterDevice(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES DirentPrototype__isDirectory(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES DirentPrototype__isFIFO(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES DirentPrototype__isFile(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES DirentPrototype__isSocket(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES DirentPrototype__isSymbolicLink(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES DirentPrototype__getName(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES DirentPrototype__getPath(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES DirentPrototype__getPath(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV void* JSC_HOST_CALL_ATTRIBUTES DocEndClass__construct(JSC::JSGlobalObject*, JSC::CallFrame*); | |
JSC_DECLARE_CUSTOM_GETTER(jsDocEndConstructor); | |
extern JSC_CALLCONV void JSC_HOST_CALL_ATTRIBUTES DocEndClass__finalize(void*); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES DocEndPrototype__append(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV void* JSC_HOST_CALL_ATTRIBUTES DocTypeClass__construct(JSC::JSGlobalObject*, JSC::CallFrame*); | |
JSC_DECLARE_CUSTOM_GETTER(jsDocTypeConstructor); | |
extern JSC_CALLCONV void JSC_HOST_CALL_ATTRIBUTES DocTypeClass__finalize(void*); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES DocTypePrototype__name(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES DocTypePrototype__publicId(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES DocTypePrototype__systemId(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV void* JSC_HOST_CALL_ATTRIBUTES ElementClass__construct(JSC::JSGlobalObject*, JSC::CallFrame*); | |
JSC_DECLARE_CUSTOM_GETTER(jsElementConstructor); | |
extern JSC_CALLCONV void JSC_HOST_CALL_ATTRIBUTES ElementClass__finalize(void*); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ElementPrototype__after(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ElementPrototype__append(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ElementPrototype__getAttributes(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ElementPrototype__before(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ElementPrototype__getCanHaveContent(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ElementPrototype__getAttribute(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ElementPrototype__hasAttribute(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ElementPrototype__getNamespaceURI(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ElementPrototype__onEndTag(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ElementPrototype__prepend(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ElementPrototype__remove(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ElementPrototype__removeAndKeepContent(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ElementPrototype__removeAttribute(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ElementPrototype__getRemoved(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ElementPrototype__replace(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ElementPrototype__getSelfClosing(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ElementPrototype__setAttribute(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ElementPrototype__setInnerContent(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ElementPrototype__getTagName(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV bool JSC_HOST_CALL_ATTRIBUTES ElementPrototype__setTagName(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::EncodedJSValue value); | |
extern JSC_CALLCONV void* JSC_HOST_CALL_ATTRIBUTES EndTagClass__construct(JSC::JSGlobalObject*, JSC::CallFrame*); | |
JSC_DECLARE_CUSTOM_GETTER(jsEndTagConstructor); | |
extern JSC_CALLCONV void JSC_HOST_CALL_ATTRIBUTES EndTagClass__finalize(void*); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES EndTagPrototype__after(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES EndTagPrototype__before(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES EndTagPrototype__getName(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV bool JSC_HOST_CALL_ATTRIBUTES EndTagPrototype__setName(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::EncodedJSValue value); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES EndTagPrototype__remove(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV void* JSC_HOST_CALL_ATTRIBUTES ExpectClass__construct(JSC::JSGlobalObject*, JSC::CallFrame*); | |
JSC_DECLARE_CUSTOM_GETTER(jsExpectConstructor); | |
extern JSC_CALLCONV void JSC_HOST_CALL_ATTRIBUTES ExpectClass__finalize(void*); | |
extern JSC_CALLCONV JSC_DECLARE_HOST_FUNCTION(ExpectClass__call) SYSV_ABI; | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ExpectPrototype__fail(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ExpectPrototype__toHaveBeenLastCalledWith(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ExpectPrototype__toHaveLastReturnedWith(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ExpectPrototype__getNot(void* ptr, JSC::EncodedJSValue thisValue, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ExpectPrototype__toHaveBeenNthCalledWith(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ExpectPrototype__toHaveNthReturnedWith(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ExpectPrototype___pass(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ExpectPrototype__getRejects(void* ptr, JSC::EncodedJSValue thisValue, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ExpectPrototype__getResolves(void* ptr, JSC::EncodedJSValue thisValue, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ExpectPrototype__toBe(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ExpectPrototype__toBeArray(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ExpectPrototype__toBeArrayOfSize(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ExpectPrototype__toBeBoolean(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ExpectPrototype__toHaveBeenCalled(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ExpectPrototype__toHaveBeenCalledTimes(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ExpectPrototype__toHaveBeenCalledWith(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ExpectPrototype__toBeCloseTo(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ExpectPrototype__toBeDate(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ExpectPrototype__toBeDefined(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ExpectPrototype__toBeEmpty(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ExpectPrototype__toBeEmptyObject(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ExpectPrototype__toBeEven(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ExpectPrototype__toBeFalse(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ExpectPrototype__toBeFalsy(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ExpectPrototype__toBeFinite(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ExpectPrototype__toBeFunction(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ExpectPrototype__toBeGreaterThan(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ExpectPrototype__toBeGreaterThanOrEqual(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ExpectPrototype__toBeInstanceOf(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ExpectPrototype__toBeInteger(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ExpectPrototype__toBeLessThan(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ExpectPrototype__toBeLessThanOrEqual(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ExpectPrototype__toBeNaN(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ExpectPrototype__toBeNegative(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ExpectPrototype__toBeNil(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ExpectPrototype__toBeNull(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ExpectPrototype__toBeNumber(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ExpectPrototype__toBeObject(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ExpectPrototype__toBeOdd(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ExpectPrototype__toBeOneOf(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ExpectPrototype__toBePositive(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ExpectPrototype__toBeString(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ExpectPrototype__toBeSymbol(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ExpectPrototype__toBeTrue(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ExpectPrototype__toBeTruthy(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ExpectPrototype__toBeTypeOf(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ExpectPrototype__toBeUndefined(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ExpectPrototype__toBeValidDate(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ExpectPrototype__toBeWithin(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ExpectPrototype__toContain(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ExpectPrototype__toContainAllKeys(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ExpectPrototype__toContainAllValues(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ExpectPrototype__toContainAnyKeys(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ExpectPrototype__toContainAnyValues(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ExpectPrototype__toContainEqual(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ExpectPrototype__toContainKey(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ExpectPrototype__toContainKeys(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ExpectPrototype__toContainValue(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ExpectPrototype__toContainValues(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ExpectPrototype__toEndWith(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ExpectPrototype__toEqual(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ExpectPrototype__toEqualIgnoringWhitespace(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ExpectPrototype__toHaveBeenCalled(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ExpectPrototype__toHaveBeenCalledTimes(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ExpectPrototype__toHaveBeenCalledWith(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ExpectPrototype__toHaveBeenLastCalledWith(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ExpectPrototype__toHaveBeenNthCalledWith(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ExpectPrototype__toHaveLastReturnedWith(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ExpectPrototype__toHaveLength(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ExpectPrototype__toHaveNthReturnedWith(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ExpectPrototype__toHaveProperty(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ExpectPrototype__toHaveReturned(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ExpectPrototype__toHaveReturnedTimes(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ExpectPrototype__toHaveReturnedWith(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ExpectPrototype__toInclude(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ExpectPrototype__toIncludeRepeated(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ExpectPrototype__toMatch(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ExpectPrototype__toMatchInlineSnapshot(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ExpectPrototype__toMatchObject(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ExpectPrototype__toMatchSnapshot(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ExpectPrototype__toHaveReturned(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ExpectPrototype__toSatisfy(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ExpectPrototype__toStartWith(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ExpectPrototype__toStrictEqual(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ExpectPrototype__toThrow(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ExpectPrototype__toThrow(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ExpectPrototype__toThrowErrorMatchingInlineSnapshot(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ExpectPrototype__toThrowErrorMatchingSnapshot(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC_DECLARE_HOST_FUNCTION(ExpectClass__addSnapshotSerializer) SYSV_ABI; | |
extern JSC_CALLCONV JSC_DECLARE_HOST_FUNCTION(ExpectClass__any) SYSV_ABI; | |
extern JSC_CALLCONV JSC_DECLARE_HOST_FUNCTION(ExpectClass__anything) SYSV_ABI; | |
extern JSC_CALLCONV JSC_DECLARE_HOST_FUNCTION(ExpectClass__arrayContaining) SYSV_ABI; | |
extern JSC_CALLCONV JSC_DECLARE_HOST_FUNCTION(ExpectClass__assertions) SYSV_ABI; | |
extern JSC_CALLCONV JSC_DECLARE_HOST_FUNCTION(ExpectClass__closeTo) SYSV_ABI; | |
extern JSC_CALLCONV JSC_DECLARE_HOST_FUNCTION(ExpectClass__extend) SYSV_ABI; | |
extern JSC_CALLCONV JSC_DECLARE_HOST_FUNCTION(ExpectClass__hasAssertions) SYSV_ABI; | |
extern JSC_CALLCONV JSC_DECLARE_CUSTOM_GETTER(ExpectClass__getStaticNot); | |
extern JSC_CALLCONV JSC_DECLARE_HOST_FUNCTION(ExpectClass__objectContaining) SYSV_ABI; | |
extern JSC_CALLCONV JSC_DECLARE_CUSTOM_GETTER(ExpectClass__getStaticRejectsTo); | |
extern JSC_CALLCONV JSC_DECLARE_CUSTOM_GETTER(ExpectClass__getStaticResolvesTo); | |
extern JSC_CALLCONV JSC_DECLARE_HOST_FUNCTION(ExpectClass__stringContaining) SYSV_ABI; | |
extern JSC_CALLCONV JSC_DECLARE_HOST_FUNCTION(ExpectClass__stringMatching) SYSV_ABI; | |
extern JSC_CALLCONV JSC_DECLARE_HOST_FUNCTION(ExpectClass__doUnreachable) SYSV_ABI; | |
extern JSC_CALLCONV void JSC_HOST_CALL_ATTRIBUTES ExpectAnyClass__finalize(void*); | |
extern JSC_CALLCONV JSC_DECLARE_HOST_FUNCTION(ExpectAnyClass__call) SYSV_ABI; | |
extern JSC_CALLCONV void JSC_HOST_CALL_ATTRIBUTES ExpectAnythingClass__finalize(void*); | |
extern JSC_CALLCONV JSC_DECLARE_HOST_FUNCTION(ExpectAnythingClass__call) SYSV_ABI; | |
extern JSC_CALLCONV void JSC_HOST_CALL_ATTRIBUTES ExpectArrayContainingClass__finalize(void*); | |
extern JSC_CALLCONV JSC_DECLARE_HOST_FUNCTION(ExpectArrayContainingClass__call) SYSV_ABI; | |
extern JSC_CALLCONV void JSC_HOST_CALL_ATTRIBUTES ExpectCloseToClass__finalize(void*); | |
extern JSC_CALLCONV JSC_DECLARE_HOST_FUNCTION(ExpectCloseToClass__call) SYSV_ABI; | |
extern JSC_CALLCONV void JSC_HOST_CALL_ATTRIBUTES ExpectCustomAsymmetricMatcherClass__finalize(void*); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ExpectCustomAsymmetricMatcherPrototype__asymmetricMatch(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV void JSC_HOST_CALL_ATTRIBUTES ExpectMatcherContextClass__finalize(void*); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ExpectMatcherContextPrototype__equals(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ExpectMatcherContextPrototype__getExpand(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ExpectMatcherContextPrototype__getIsNot(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ExpectMatcherContextPrototype__getPromise(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ExpectMatcherContextPrototype__getUtils(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV void JSC_HOST_CALL_ATTRIBUTES ExpectMatcherUtilsClass__finalize(void*); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ExpectMatcherUtilsPrototype__matcherHint(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ExpectMatcherUtilsPrototype__printExpected(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ExpectMatcherUtilsPrototype__printReceived(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ExpectMatcherUtilsPrototype__stringify(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV void JSC_HOST_CALL_ATTRIBUTES ExpectObjectContainingClass__finalize(void*); | |
extern JSC_CALLCONV JSC_DECLARE_HOST_FUNCTION(ExpectObjectContainingClass__call) SYSV_ABI; | |
extern JSC_CALLCONV void JSC_HOST_CALL_ATTRIBUTES ExpectStaticClass__finalize(void*); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ExpectStaticPrototype__any(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ExpectStaticPrototype__anything(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ExpectStaticPrototype__arrayContaining(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ExpectStaticPrototype__closeTo(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ExpectStaticPrototype__getNot(void* ptr, JSC::EncodedJSValue thisValue, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ExpectStaticPrototype__objectContaining(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ExpectStaticPrototype__getRejectsTo(void* ptr, JSC::EncodedJSValue thisValue, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ExpectStaticPrototype__getResolvesTo(void* ptr, JSC::EncodedJSValue thisValue, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ExpectStaticPrototype__stringContaining(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ExpectStaticPrototype__stringMatching(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV void JSC_HOST_CALL_ATTRIBUTES ExpectStringContainingClass__finalize(void*); | |
extern JSC_CALLCONV JSC_DECLARE_HOST_FUNCTION(ExpectStringContainingClass__call) SYSV_ABI; | |
extern JSC_CALLCONV void JSC_HOST_CALL_ATTRIBUTES ExpectStringMatchingClass__finalize(void*); | |
extern JSC_CALLCONV JSC_DECLARE_HOST_FUNCTION(ExpectStringMatchingClass__call) SYSV_ABI; | |
extern JSC_CALLCONV void* JSC_HOST_CALL_ATTRIBUTES FFIClass__construct(JSC::JSGlobalObject*, JSC::CallFrame*); | |
JSC_DECLARE_CUSTOM_GETTER(jsFFIConstructor); | |
extern JSC_CALLCONV void JSC_HOST_CALL_ATTRIBUTES FFIClass__finalize(void*); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES FFIPrototype__close(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES FFIPrototype__getSymbols(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV void JSC_HOST_CALL_ATTRIBUTES FSWatcherClass__finalize(void*); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES FSWatcherPrototype__doClose(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES FSWatcherPrototype__hasRef(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES FSWatcherPrototype__doRef(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES FSWatcherPrototype__doUnref(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV bool JSC_HOST_CALL_ATTRIBUTES FSWatcher__hasPendingActivity(void* ptr); | |
extern JSC_CALLCONV void JSC_HOST_CALL_ATTRIBUTES FileInternalReadableStreamSourceClass__finalize(void*); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES FileInternalReadableStreamSourcePrototype__cancelFromJS(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES FileInternalReadableStreamSourcePrototype__drainFromJS(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES FileInternalReadableStreamSourcePrototype__getIsClosedFromJS(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES FileInternalReadableStreamSourcePrototype__getOnCloseFromJS(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV bool JSC_HOST_CALL_ATTRIBUTES FileInternalReadableStreamSourcePrototype__setOnCloseFromJS(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::EncodedJSValue value); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES FileInternalReadableStreamSourcePrototype__getOnDrainFromJS(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV bool JSC_HOST_CALL_ATTRIBUTES FileInternalReadableStreamSourcePrototype__setOnDrainFromJS(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::EncodedJSValue value); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES FileInternalReadableStreamSourcePrototype__pullFromJS(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES FileInternalReadableStreamSourcePrototype__setRawModeFromJS(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES FileInternalReadableStreamSourcePrototype__startFromJS(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES FileInternalReadableStreamSourcePrototype__updateRefFromJS(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV void* JSC_HOST_CALL_ATTRIBUTES FileSystemRouterClass__construct(JSC::JSGlobalObject*, JSC::CallFrame*); | |
JSC_DECLARE_CUSTOM_GETTER(jsFileSystemRouterConstructor); | |
extern JSC_CALLCONV void JSC_HOST_CALL_ATTRIBUTES FileSystemRouterClass__finalize(void*); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES FileSystemRouterPrototype__match(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES FileSystemRouterPrototype__getOrigin(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES FileSystemRouterPrototype__reload(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES FileSystemRouterPrototype__getRoutes(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES FileSystemRouterPrototype__getStyle(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV void* JSC_HOST_CALL_ATTRIBUTES GlobClass__construct(JSC::JSGlobalObject*, JSC::CallFrame*); | |
JSC_DECLARE_CUSTOM_GETTER(jsGlobConstructor); | |
extern JSC_CALLCONV void JSC_HOST_CALL_ATTRIBUTES GlobClass__finalize(void*); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES GlobPrototype____scan(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES GlobPrototype____scanSync(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES GlobPrototype__match(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV bool JSC_HOST_CALL_ATTRIBUTES Glob__hasPendingActivity(void* ptr); | |
extern JSC_CALLCONV void* JSC_HOST_CALL_ATTRIBUTES H2FrameParserClass__construct(JSC::JSGlobalObject*, JSC::CallFrame*); | |
JSC_DECLARE_CUSTOM_GETTER(jsH2FrameParserConstructor); | |
extern JSC_CALLCONV void JSC_HOST_CALL_ATTRIBUTES H2FrameParserClass__finalize(void*); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES H2FrameParserPrototype__getCurrentState(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES H2FrameParserPrototype__getEndAfterHeaders(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES H2FrameParserPrototype__getStreamState(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES H2FrameParserPrototype__goaway(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES H2FrameParserPrototype__isStreamAborted(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES H2FrameParserPrototype__ping(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES H2FrameParserPrototype__read(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES H2FrameParserPrototype__request(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES H2FrameParserPrototype__rstStream(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES H2FrameParserPrototype__sendTrailers(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES H2FrameParserPrototype__setEndAfterHeaders(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES H2FrameParserPrototype__setStreamPriority(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES H2FrameParserPrototype__updateSettings(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES H2FrameParserPrototype__writeStream(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV void* JSC_HOST_CALL_ATTRIBUTES HTMLRewriterClass__construct(JSC::JSGlobalObject*, JSC::CallFrame*); | |
JSC_DECLARE_CUSTOM_GETTER(jsHTMLRewriterConstructor); | |
extern JSC_CALLCONV void JSC_HOST_CALL_ATTRIBUTES HTMLRewriterClass__finalize(void*); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES HTMLRewriterPrototype__on(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES HTMLRewriterPrototype__onDocument(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES HTMLRewriterPrototype__transform(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV void* JSC_HOST_CALL_ATTRIBUTES HTTPSServerClass__construct(JSC::JSGlobalObject*, JSC::CallFrame*); | |
JSC_DECLARE_CUSTOM_GETTER(jsHTTPSServerConstructor); | |
extern JSC_CALLCONV void JSC_HOST_CALL_ATTRIBUTES HTTPSServerClass__finalize(void*); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES HTTPSServerPrototype__dispose(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES HTTPSServerPrototype__getAddress(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES HTTPSServerPrototype__getDevelopment(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES HTTPSServerPrototype__doFetch(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES HTTPSServerPrototype__getHostname(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES HTTPSServerPrototype__getId(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES HTTPSServerPrototype__getPendingRequests(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES HTTPSServerPrototype__getPendingWebSockets(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES HTTPSServerPrototype__getPort(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES HTTPSServerPrototype__getProtocol(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES HTTPSServerPrototype__doPublish(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES HTTPSServerPrototype__doRef(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES HTTPSServerPrototype__doReload(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES HTTPSServerPrototype__doRequestIP(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES HTTPSServerPrototype__doStop(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES HTTPSServerPrototype__doUnref(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES HTTPSServerPrototype__doUpgrade(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES HTTPSServerPrototype__getURL(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV void* JSC_HOST_CALL_ATTRIBUTES HTTPServerClass__construct(JSC::JSGlobalObject*, JSC::CallFrame*); | |
JSC_DECLARE_CUSTOM_GETTER(jsHTTPServerConstructor); | |
extern JSC_CALLCONV void JSC_HOST_CALL_ATTRIBUTES HTTPServerClass__finalize(void*); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES HTTPServerPrototype__dispose(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES HTTPServerPrototype__getAddress(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES HTTPServerPrototype__getDevelopment(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES HTTPServerPrototype__doFetch(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES HTTPServerPrototype__getHostname(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES HTTPServerPrototype__getId(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES HTTPServerPrototype__getPendingRequests(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES HTTPServerPrototype__getPendingWebSockets(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES HTTPServerPrototype__getPort(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES HTTPServerPrototype__getProtocol(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES HTTPServerPrototype__doPublish(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES HTTPServerPrototype__doRef(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES HTTPServerPrototype__doReload(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES HTTPServerPrototype__doRequestIP(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES HTTPServerPrototype__doStop(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES HTTPServerPrototype__doUnref(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES HTTPServerPrototype__doUpgrade(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES HTTPServerPrototype__getURL(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV void* JSC_HOST_CALL_ATTRIBUTES ListenerClass__construct(JSC::JSGlobalObject*, JSC::CallFrame*); | |
JSC_DECLARE_CUSTOM_GETTER(jsListenerConstructor); | |
extern JSC_CALLCONV void JSC_HOST_CALL_ATTRIBUTES ListenerClass__finalize(void*); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ListenerPrototype__stop(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ListenerPrototype__getData(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV bool JSC_HOST_CALL_ATTRIBUTES ListenerPrototype__setData(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::EncodedJSValue value); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ListenerPrototype__getHostname(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ListenerPrototype__getPort(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ListenerPrototype__ref(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ListenerPrototype__reload(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ListenerPrototype__stop(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ListenerPrototype__getUnix(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ListenerPrototype__unref(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV void* JSC_HOST_CALL_ATTRIBUTES MD4Class__construct(JSC::JSGlobalObject*, JSC::CallFrame*); | |
JSC_DECLARE_CUSTOM_GETTER(jsMD4Constructor); | |
extern JSC_CALLCONV void JSC_HOST_CALL_ATTRIBUTES MD4Class__finalize(void*); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES MD4Prototype__getByteLength(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES MD4Prototype__digest(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES MD4Prototype__update(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC_DECLARE_CUSTOM_GETTER(MD4Class__getByteLengthStatic); | |
extern JSC_CALLCONV JSC_DECLARE_HOST_FUNCTION(MD4Class__hash) SYSV_ABI; | |
extern JSC_CALLCONV void* JSC_HOST_CALL_ATTRIBUTES MD5Class__construct(JSC::JSGlobalObject*, JSC::CallFrame*); | |
JSC_DECLARE_CUSTOM_GETTER(jsMD5Constructor); | |
extern JSC_CALLCONV void JSC_HOST_CALL_ATTRIBUTES MD5Class__finalize(void*); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES MD5Prototype__getByteLength(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES MD5Prototype__digest(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES MD5Prototype__update(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC_DECLARE_CUSTOM_GETTER(MD5Class__getByteLengthStatic); | |
extern JSC_CALLCONV JSC_DECLARE_HOST_FUNCTION(MD5Class__hash) SYSV_ABI; | |
extern JSC_CALLCONV void* JSC_HOST_CALL_ATTRIBUTES MatchedRouteClass__construct(JSC::JSGlobalObject*, JSC::CallFrame*); | |
JSC_DECLARE_CUSTOM_GETTER(jsMatchedRouteConstructor); | |
extern JSC_CALLCONV void JSC_HOST_CALL_ATTRIBUTES MatchedRouteClass__finalize(void*); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES MatchedRoutePrototype__getFilePath(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES MatchedRoutePrototype__getKind(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES MatchedRoutePrototype__getName(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES MatchedRoutePrototype__getParams(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES MatchedRoutePrototype__getPathname(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES MatchedRoutePrototype__getQuery(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES MatchedRoutePrototype__getScriptSrc(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES MatchedRoutePrototype__getScriptSrc(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV void* JSC_HOST_CALL_ATTRIBUTES NodeJSFSClass__construct(JSC::JSGlobalObject*, JSC::CallFrame*); | |
JSC_DECLARE_CUSTOM_GETTER(jsNodeJSFSConstructor); | |
extern JSC_CALLCONV void JSC_HOST_CALL_ATTRIBUTES NodeJSFSClass__finalize(void*); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES NodeJSFSPrototype__access(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES NodeJSFSPrototype__accessSync(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES NodeJSFSPrototype__appendFile(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES NodeJSFSPrototype__appendFileSync(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES NodeJSFSPrototype__chmod(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES NodeJSFSPrototype__chmodSync(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES NodeJSFSPrototype__chown(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES NodeJSFSPrototype__chownSync(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES NodeJSFSPrototype__close(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES NodeJSFSPrototype__closeSync(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES NodeJSFSPrototype__copyFile(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES NodeJSFSPrototype__copyFileSync(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES NodeJSFSPrototype__cp(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES NodeJSFSPrototype__cpSync(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES NodeJSFSPrototype__getDirent(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES NodeJSFSPrototype__exists(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES NodeJSFSPrototype__existsSync(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES NodeJSFSPrototype__fchmod(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES NodeJSFSPrototype__fchmodSync(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES NodeJSFSPrototype__fchown(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES NodeJSFSPrototype__fchownSync(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES NodeJSFSPrototype__fdatasync(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES NodeJSFSPrototype__fdatasyncSync(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES NodeJSFSPrototype__fstat(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES NodeJSFSPrototype__fstatSync(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES NodeJSFSPrototype__fsync(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES NodeJSFSPrototype__fsyncSync(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES NodeJSFSPrototype__ftruncate(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES NodeJSFSPrototype__ftruncateSync(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES NodeJSFSPrototype__futimes(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES NodeJSFSPrototype__futimesSync(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES NodeJSFSPrototype__lchmod(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES NodeJSFSPrototype__lchmodSync(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES NodeJSFSPrototype__lchown(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES NodeJSFSPrototype__lchownSync(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES NodeJSFSPrototype__link(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES NodeJSFSPrototype__linkSync(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES NodeJSFSPrototype__lstat(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES NodeJSFSPrototype__lstatSync(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES NodeJSFSPrototype__lutimes(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES NodeJSFSPrototype__lutimesSync(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES NodeJSFSPrototype__mkdir(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES NodeJSFSPrototype__mkdirSync(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES NodeJSFSPrototype__mkdtemp(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES NodeJSFSPrototype__mkdtempSync(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES NodeJSFSPrototype__open(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES NodeJSFSPrototype__opendir(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES NodeJSFSPrototype__opendirSync(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES NodeJSFSPrototype__openSync(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES NodeJSFSPrototype__read(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES NodeJSFSPrototype__readdir(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES NodeJSFSPrototype__readdirSync(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES NodeJSFSPrototype__readFile(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES NodeJSFSPrototype__readFileSync(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES NodeJSFSPrototype__readlink(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES NodeJSFSPrototype__readlinkSync(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES NodeJSFSPrototype__readSync(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES NodeJSFSPrototype__readv(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES NodeJSFSPrototype__readvSync(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES NodeJSFSPrototype__realpath(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES NodeJSFSPrototype__realpathSync(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES NodeJSFSPrototype__rename(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES NodeJSFSPrototype__renameSync(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES NodeJSFSPrototype__rm(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES NodeJSFSPrototype__rmdir(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES NodeJSFSPrototype__rmdirSync(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES NodeJSFSPrototype__rmSync(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES NodeJSFSPrototype__stat(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES NodeJSFSPrototype__getStats(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES NodeJSFSPrototype__statSync(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES NodeJSFSPrototype__symlink(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES NodeJSFSPrototype__symlinkSync(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES NodeJSFSPrototype__truncate(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES NodeJSFSPrototype__truncateSync(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES NodeJSFSPrototype__unlink(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES NodeJSFSPrototype__unlinkSync(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES NodeJSFSPrototype__unwatchFile(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES NodeJSFSPrototype__utimes(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES NodeJSFSPrototype__utimesSync(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES NodeJSFSPrototype__watch(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES NodeJSFSPrototype__watchFile(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES NodeJSFSPrototype__write(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES NodeJSFSPrototype__writeFile(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES NodeJSFSPrototype__writeFileSync(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES NodeJSFSPrototype__writeSync(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES NodeJSFSPrototype__writev(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES NodeJSFSPrototype__writevSync(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV void* JSC_HOST_CALL_ATTRIBUTES ParsedShellScriptClass__construct(JSC::JSGlobalObject*, JSC::CallFrame*); | |
JSC_DECLARE_CUSTOM_GETTER(jsParsedShellScriptConstructor); | |
extern JSC_CALLCONV void JSC_HOST_CALL_ATTRIBUTES ParsedShellScriptClass__finalize(void*); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ParsedShellScriptPrototype__setCwd(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ParsedShellScriptPrototype__setEnv(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ParsedShellScriptPrototype__setQuiet(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV void* JSC_HOST_CALL_ATTRIBUTES PostgresSQLConnectionClass__construct(JSC::JSGlobalObject*, JSC::CallFrame*); | |
JSC_DECLARE_CUSTOM_GETTER(jsPostgresSQLConnectionConstructor); | |
extern JSC_CALLCONV void JSC_HOST_CALL_ATTRIBUTES PostgresSQLConnectionClass__finalize(void*); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES PostgresSQLConnectionPrototype__doClose(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES PostgresSQLConnectionPrototype__getConnected(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES PostgresSQLConnectionPrototype__doFlush(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES PostgresSQLConnectionPrototype__createQuery(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES PostgresSQLConnectionPrototype__doRef(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES PostgresSQLConnectionPrototype__doUnref(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV bool JSC_HOST_CALL_ATTRIBUTES PostgresSQLConnection__hasPendingActivity(void* ptr); | |
extern JSC_CALLCONV void* JSC_HOST_CALL_ATTRIBUTES PostgresSQLQueryClass__construct(JSC::JSGlobalObject*, JSC::CallFrame*); | |
JSC_DECLARE_CUSTOM_GETTER(jsPostgresSQLQueryConstructor); | |
extern JSC_CALLCONV void JSC_HOST_CALL_ATTRIBUTES PostgresSQLQueryClass__finalize(void*); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES PostgresSQLQueryPrototype__doCancel(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES PostgresSQLQueryPrototype__doDone(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES PostgresSQLQueryPrototype__doRun(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV size_t PostgresSQLQuery__estimatedSize(void* ptr); | |
extern JSC_CALLCONV bool JSC_HOST_CALL_ATTRIBUTES PostgresSQLQuery__hasPendingActivity(void* ptr); | |
extern JSC_CALLCONV void* JSC_HOST_CALL_ATTRIBUTES RequestClass__construct(JSC::JSGlobalObject*, JSC::CallFrame*); | |
JSC_DECLARE_CUSTOM_GETTER(jsRequestConstructor); | |
extern JSC_CALLCONV void JSC_HOST_CALL_ATTRIBUTES RequestClass__finalize(void*); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES RequestPrototype__getArrayBuffer(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES RequestPrototype__getBlob(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES RequestPrototype__getBody(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES RequestPrototype__getBodyUsed(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES RequestPrototype__getBytes(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES RequestPrototype__getCache(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES RequestPrototype__doClone(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES RequestPrototype__getCredentials(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES RequestPrototype__getDestination(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES RequestPrototype__getFormData(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES RequestPrototype__getHeaders(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES RequestPrototype__getIntegrity(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES RequestPrototype__getJSON(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES RequestPrototype__getMethod(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES RequestPrototype__getMode(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES RequestPrototype__getRedirect(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES RequestPrototype__getReferrer(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES RequestPrototype__getReferrerPolicy(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES RequestPrototype__getSignal(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES RequestPrototype__getText(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES RequestPrototype__getUrl(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV size_t Request__estimatedSize(void* ptr); | |
extern JSC_CALLCONV void* JSC_HOST_CALL_ATTRIBUTES ResolveMessageClass__construct(JSC::JSGlobalObject*, JSC::CallFrame*); | |
JSC_DECLARE_CUSTOM_GETTER(jsResolveMessageConstructor); | |
extern JSC_CALLCONV void JSC_HOST_CALL_ATTRIBUTES ResolveMessageClass__finalize(void*); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ResolveMessagePrototype__toPrimitive(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ResolveMessagePrototype__getCode(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ResolveMessagePrototype__getColumn(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ResolveMessagePrototype__getImportKind(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ResolveMessagePrototype__getLevel(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ResolveMessagePrototype__getLine(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ResolveMessagePrototype__getMessage(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ResolveMessagePrototype__getPosition(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ResolveMessagePrototype__getReferrer(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ResolveMessagePrototype__getSpecifier(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ResolveMessagePrototype__toJSON(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ResolveMessagePrototype__toString(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV void* JSC_HOST_CALL_ATTRIBUTES ResourceUsageClass__construct(JSC::JSGlobalObject*, JSC::CallFrame*); | |
JSC_DECLARE_CUSTOM_GETTER(jsResourceUsageConstructor); | |
extern JSC_CALLCONV void JSC_HOST_CALL_ATTRIBUTES ResourceUsageClass__finalize(void*); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ResourceUsagePrototype__getContextSwitches(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ResourceUsagePrototype__getCPUTime(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ResourceUsagePrototype__getMaxRSS(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ResourceUsagePrototype__getMessages(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ResourceUsagePrototype__getOps(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ResourceUsagePrototype__getSharedMemorySize(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ResourceUsagePrototype__getSignalCount(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ResourceUsagePrototype__getSwapCount(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV void* JSC_HOST_CALL_ATTRIBUTES ResponseClass__construct(JSC::JSGlobalObject*, JSC::CallFrame*); | |
JSC_DECLARE_CUSTOM_GETTER(jsResponseConstructor); | |
extern JSC_CALLCONV void JSC_HOST_CALL_ATTRIBUTES ResponseClass__finalize(void*); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ResponsePrototype__getArrayBuffer(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ResponsePrototype__getBlob(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ResponsePrototype__getBody(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ResponsePrototype__getBodyUsed(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ResponsePrototype__getBytes(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ResponsePrototype__doClone(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ResponsePrototype__getFormData(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ResponsePrototype__getHeaders(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ResponsePrototype__getJSON(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ResponsePrototype__getOK(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ResponsePrototype__getRedirected(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ResponsePrototype__getStatus(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ResponsePrototype__getStatusText(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ResponsePrototype__getText(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ResponsePrototype__getResponseType(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ResponsePrototype__getURL(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV size_t Response__estimatedSize(void* ptr); | |
extern JSC_CALLCONV JSC_DECLARE_HOST_FUNCTION(ResponseClass__constructError) SYSV_ABI; | |
extern JSC_CALLCONV JSC_DECLARE_HOST_FUNCTION(ResponseClass__constructJSON) SYSV_ABI; | |
extern JSC_CALLCONV JSC_DECLARE_HOST_FUNCTION(ResponseClass__constructRedirect) SYSV_ABI; | |
extern JSC_CALLCONV void* JSC_HOST_CALL_ATTRIBUTES SHA1Class__construct(JSC::JSGlobalObject*, JSC::CallFrame*); | |
JSC_DECLARE_CUSTOM_GETTER(jsSHA1Constructor); | |
extern JSC_CALLCONV void JSC_HOST_CALL_ATTRIBUTES SHA1Class__finalize(void*); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES SHA1Prototype__getByteLength(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES SHA1Prototype__digest(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES SHA1Prototype__update(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC_DECLARE_CUSTOM_GETTER(SHA1Class__getByteLengthStatic); | |
extern JSC_CALLCONV JSC_DECLARE_HOST_FUNCTION(SHA1Class__hash) SYSV_ABI; | |
extern JSC_CALLCONV void* JSC_HOST_CALL_ATTRIBUTES SHA224Class__construct(JSC::JSGlobalObject*, JSC::CallFrame*); | |
JSC_DECLARE_CUSTOM_GETTER(jsSHA224Constructor); | |
extern JSC_CALLCONV void JSC_HOST_CALL_ATTRIBUTES SHA224Class__finalize(void*); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES SHA224Prototype__getByteLength(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES SHA224Prototype__digest(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES SHA224Prototype__update(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC_DECLARE_CUSTOM_GETTER(SHA224Class__getByteLengthStatic); | |
extern JSC_CALLCONV JSC_DECLARE_HOST_FUNCTION(SHA224Class__hash) SYSV_ABI; | |
extern JSC_CALLCONV void* JSC_HOST_CALL_ATTRIBUTES SHA256Class__construct(JSC::JSGlobalObject*, JSC::CallFrame*); | |
JSC_DECLARE_CUSTOM_GETTER(jsSHA256Constructor); | |
extern JSC_CALLCONV void JSC_HOST_CALL_ATTRIBUTES SHA256Class__finalize(void*); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES SHA256Prototype__getByteLength(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES SHA256Prototype__digest(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES SHA256Prototype__update(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC_DECLARE_CUSTOM_GETTER(SHA256Class__getByteLengthStatic); | |
extern JSC_CALLCONV JSC_DECLARE_HOST_FUNCTION(SHA256Class__hash) SYSV_ABI; | |
extern JSC_CALLCONV void* JSC_HOST_CALL_ATTRIBUTES SHA384Class__construct(JSC::JSGlobalObject*, JSC::CallFrame*); | |
JSC_DECLARE_CUSTOM_GETTER(jsSHA384Constructor); | |
extern JSC_CALLCONV void JSC_HOST_CALL_ATTRIBUTES SHA384Class__finalize(void*); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES SHA384Prototype__getByteLength(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES SHA384Prototype__digest(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES SHA384Prototype__update(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC_DECLARE_CUSTOM_GETTER(SHA384Class__getByteLengthStatic); | |
extern JSC_CALLCONV JSC_DECLARE_HOST_FUNCTION(SHA384Class__hash) SYSV_ABI; | |
extern JSC_CALLCONV void* JSC_HOST_CALL_ATTRIBUTES SHA512Class__construct(JSC::JSGlobalObject*, JSC::CallFrame*); | |
JSC_DECLARE_CUSTOM_GETTER(jsSHA512Constructor); | |
extern JSC_CALLCONV void JSC_HOST_CALL_ATTRIBUTES SHA512Class__finalize(void*); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES SHA512Prototype__getByteLength(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES SHA512Prototype__digest(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES SHA512Prototype__update(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC_DECLARE_CUSTOM_GETTER(SHA512Class__getByteLengthStatic); | |
extern JSC_CALLCONV JSC_DECLARE_HOST_FUNCTION(SHA512Class__hash) SYSV_ABI; | |
extern JSC_CALLCONV void* JSC_HOST_CALL_ATTRIBUTES SHA512_256Class__construct(JSC::JSGlobalObject*, JSC::CallFrame*); | |
JSC_DECLARE_CUSTOM_GETTER(jsSHA512_256Constructor); | |
extern JSC_CALLCONV void JSC_HOST_CALL_ATTRIBUTES SHA512_256Class__finalize(void*); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES SHA512_256Prototype__getByteLength(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES SHA512_256Prototype__digest(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES SHA512_256Prototype__update(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC_DECLARE_CUSTOM_GETTER(SHA512_256Class__getByteLengthStatic); | |
extern JSC_CALLCONV JSC_DECLARE_HOST_FUNCTION(SHA512_256Class__hash) SYSV_ABI; | |
extern JSC_CALLCONV void* JSC_HOST_CALL_ATTRIBUTES ServerWebSocketClass__construct(JSC::JSGlobalObject*, JSC::CallFrame*); | |
JSC_DECLARE_CUSTOM_GETTER(jsServerWebSocketConstructor); | |
extern JSC_CALLCONV void JSC_HOST_CALL_ATTRIBUTES ServerWebSocketClass__finalize(void*); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ServerWebSocketPrototype__getBinaryType(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV bool JSC_HOST_CALL_ATTRIBUTES ServerWebSocketPrototype__setBinaryType(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::EncodedJSValue value); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ServerWebSocketPrototype__close(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ServerWebSocketPrototype__cork(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ServerWebSocketPrototype__getData(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV bool JSC_HOST_CALL_ATTRIBUTES ServerWebSocketPrototype__setData(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::EncodedJSValue value); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ServerWebSocketPrototype__getBufferedAmount(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ServerWebSocketPrototype__isSubscribed(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ServerWebSocketPrototype__ping(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ServerWebSocketPrototype__pong(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ServerWebSocketPrototype__publish(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ServerWebSocketPrototype__publishBinary(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ServerWebSocketPrototype__publishBinaryWithoutTypeChecks(void* ptr, JSC::JSGlobalObject * lexicalGlobalObject, JSC::JSString* arg0, JSC::JSUint8Array* arg1); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ServerWebSocketPrototype__publishText(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ServerWebSocketPrototype__publishTextWithoutTypeChecks(void* ptr, JSC::JSGlobalObject * lexicalGlobalObject, JSC::JSString* arg0, JSC::JSString* arg1); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ServerWebSocketPrototype__getReadyState(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ServerWebSocketPrototype__getRemoteAddress(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ServerWebSocketPrototype__send(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ServerWebSocketPrototype__sendBinary(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ServerWebSocketPrototype__sendText(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ServerWebSocketPrototype__subscribe(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ServerWebSocketPrototype__terminate(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ServerWebSocketPrototype__unsubscribe(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV void* JSC_HOST_CALL_ATTRIBUTES ShellInterpreterClass__construct(JSC::JSGlobalObject*, JSC::CallFrame*); | |
JSC_DECLARE_CUSTOM_GETTER(jsShellInterpreterConstructor); | |
extern JSC_CALLCONV void JSC_HOST_CALL_ATTRIBUTES ShellInterpreterClass__finalize(void*); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ShellInterpreterPrototype__isRunning(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ShellInterpreterPrototype__runFromJS(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ShellInterpreterPrototype__getStarted(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV bool JSC_HOST_CALL_ATTRIBUTES ShellInterpreter__hasPendingActivity(void* ptr); | |
extern JSC_CALLCONV void JSC_HOST_CALL_ATTRIBUTES StatWatcherClass__finalize(void*); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES StatWatcherPrototype__doClose(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES StatWatcherPrototype__doRef(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES StatWatcherPrototype__doUnref(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV bool JSC_HOST_CALL_ATTRIBUTES StatWatcher__hasPendingActivity(void* ptr); | |
extern JSC_CALLCONV void* JSC_HOST_CALL_ATTRIBUTES StatsClass__construct(JSC::JSGlobalObject*, JSC::CallFrame*); | |
JSC_DECLARE_CUSTOM_GETTER(jsStatsConstructor); | |
extern JSC_CALLCONV void JSC_HOST_CALL_ATTRIBUTES StatsClass__finalize(void*); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES StatsPrototype__atime(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES StatsPrototype__atimeMs(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES StatsPrototype__birthtime(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES StatsPrototype__birthtimeMs(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES StatsPrototype__blksize(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES StatsPrototype__blocks(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES StatsPrototype__ctime(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES StatsPrototype__ctimeMs(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES StatsPrototype__dev(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES StatsPrototype__gid(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES StatsPrototype__ino(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES StatsPrototype__isBlockDevice_(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES StatsPrototype__isBlockDevice_WithoutTypeChecks(void* ptr, JSC::JSGlobalObject * lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES StatsPrototype__isCharacterDevice_(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES StatsPrototype__isCharacterDevice_WithoutTypeChecks(void* ptr, JSC::JSGlobalObject * lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES StatsPrototype__isDirectory_(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES StatsPrototype__isDirectory_WithoutTypeChecks(void* ptr, JSC::JSGlobalObject * lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES StatsPrototype__isFIFO_(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES StatsPrototype__isFIFO_WithoutTypeChecks(void* ptr, JSC::JSGlobalObject * lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES StatsPrototype__isFile_(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES StatsPrototype__isFile_WithoutTypeChecks(void* ptr, JSC::JSGlobalObject * lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES StatsPrototype__isSocket_(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES StatsPrototype__isSocket_WithoutTypeChecks(void* ptr, JSC::JSGlobalObject * lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES StatsPrototype__isSymbolicLink_(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES StatsPrototype__isSymbolicLink_WithoutTypeChecks(void* ptr, JSC::JSGlobalObject * lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES StatsPrototype__mode(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES StatsPrototype__mtime(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES StatsPrototype__mtimeMs(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES StatsPrototype__nlink(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES StatsPrototype__rdev(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES StatsPrototype__size(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES StatsPrototype__uid(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV void* JSC_HOST_CALL_ATTRIBUTES SubprocessClass__construct(JSC::JSGlobalObject*, JSC::CallFrame*); | |
JSC_DECLARE_CUSTOM_GETTER(jsSubprocessConstructor); | |
extern JSC_CALLCONV void JSC_HOST_CALL_ATTRIBUTES SubprocessClass__finalize(void*); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES SubprocessPrototype__asyncDispose(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES SubprocessPrototype__getExitCode(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES SubprocessPrototype__getExited(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES SubprocessPrototype__kill(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES SubprocessPrototype__getKilled(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES SubprocessPrototype__getPid(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES SubprocessPrototype__getStdout(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES SubprocessPrototype__doRef(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES SubprocessPrototype__resourceUsage(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES SubprocessPrototype__doSend(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES SubprocessPrototype__getSignalCode(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES SubprocessPrototype__getStderr(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES SubprocessPrototype__getStdin(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES SubprocessPrototype__getStdio(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES SubprocessPrototype__getStdout(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES SubprocessPrototype__doUnref(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES SubprocessPrototype__getStdin(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV bool JSC_HOST_CALL_ATTRIBUTES Subprocess__hasPendingActivity(void* ptr); | |
extern JSC_CALLCONV void* JSC_HOST_CALL_ATTRIBUTES TCPSocketClass__construct(JSC::JSGlobalObject*, JSC::CallFrame*); | |
JSC_DECLARE_CUSTOM_GETTER(jsTCPSocketConstructor); | |
extern JSC_CALLCONV void JSC_HOST_CALL_ATTRIBUTES TCPSocketClass__finalize(void*); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES TCPSocketPrototype__shutdown(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES TCPSocketPrototype__getALPNProtocol(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES TCPSocketPrototype__getAuthorized(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES TCPSocketPrototype__getData(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV bool JSC_HOST_CALL_ATTRIBUTES TCPSocketPrototype__setData(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::EncodedJSValue value); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES TCPSocketPrototype__disableRenegotiation(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES TCPSocketPrototype__end(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES TCPSocketPrototype__exportKeyingMaterial(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES TCPSocketPrototype__flush(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES TCPSocketPrototype__getAuthorizationError(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES TCPSocketPrototype__getCertificate(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES TCPSocketPrototype__getCipher(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES TCPSocketPrototype__getEphemeralKeyInfo(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES TCPSocketPrototype__getPeerCertificate(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES TCPSocketPrototype__getServername(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES TCPSocketPrototype__getSession(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES TCPSocketPrototype__getSharedSigalgs(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES TCPSocketPrototype__getTLSFinishedMessage(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES TCPSocketPrototype__getTLSPeerFinishedMessage(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES TCPSocketPrototype__getTLSTicket(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES TCPSocketPrototype__getTLSVersion(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES TCPSocketPrototype__getListener(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES TCPSocketPrototype__getLocalPort(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES TCPSocketPrototype__getReadyState(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES TCPSocketPrototype__ref(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES TCPSocketPrototype__reload(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES TCPSocketPrototype__getRemoteAddress(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES TCPSocketPrototype__renegotiate(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES TCPSocketPrototype__setMaxSendFragment(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES TCPSocketPrototype__setServername(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES TCPSocketPrototype__setSession(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES TCPSocketPrototype__setVerifyMode(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES TCPSocketPrototype__shutdown(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES TCPSocketPrototype__terminate(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES TCPSocketPrototype__timeout(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES TCPSocketPrototype__unref(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES TCPSocketPrototype__upgradeTLS(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES TCPSocketPrototype__write(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV bool JSC_HOST_CALL_ATTRIBUTES TCPSocket__hasPendingActivity(void* ptr); | |
extern JSC_CALLCONV void* JSC_HOST_CALL_ATTRIBUTES TLSSocketClass__construct(JSC::JSGlobalObject*, JSC::CallFrame*); | |
JSC_DECLARE_CUSTOM_GETTER(jsTLSSocketConstructor); | |
extern JSC_CALLCONV void JSC_HOST_CALL_ATTRIBUTES TLSSocketClass__finalize(void*); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES TLSSocketPrototype__shutdown(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES TLSSocketPrototype__getALPNProtocol(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES TLSSocketPrototype__getAuthorized(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES TLSSocketPrototype__getData(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV bool JSC_HOST_CALL_ATTRIBUTES TLSSocketPrototype__setData(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::EncodedJSValue value); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES TLSSocketPrototype__disableRenegotiation(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES TLSSocketPrototype__end(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES TLSSocketPrototype__exportKeyingMaterial(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES TLSSocketPrototype__flush(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES TLSSocketPrototype__getAuthorizationError(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES TLSSocketPrototype__getCertificate(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES TLSSocketPrototype__getCipher(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES TLSSocketPrototype__getEphemeralKeyInfo(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES TLSSocketPrototype__getPeerCertificate(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES TLSSocketPrototype__getServername(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES TLSSocketPrototype__getSession(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES TLSSocketPrototype__getSharedSigalgs(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES TLSSocketPrototype__getTLSFinishedMessage(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES TLSSocketPrototype__getTLSPeerFinishedMessage(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES TLSSocketPrototype__getTLSTicket(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES TLSSocketPrototype__getTLSVersion(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES TLSSocketPrototype__getListener(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES TLSSocketPrototype__getLocalPort(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES TLSSocketPrototype__getReadyState(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES TLSSocketPrototype__ref(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES TLSSocketPrototype__reload(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES TLSSocketPrototype__getRemoteAddress(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES TLSSocketPrototype__renegotiate(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES TLSSocketPrototype__setMaxSendFragment(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES TLSSocketPrototype__setServername(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES TLSSocketPrototype__setSession(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES TLSSocketPrototype__setVerifyMode(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES TLSSocketPrototype__shutdown(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES TLSSocketPrototype__terminate(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES TLSSocketPrototype__timeout(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES TLSSocketPrototype__unref(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES TLSSocketPrototype__upgradeTLS(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES TLSSocketPrototype__write(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV bool JSC_HOST_CALL_ATTRIBUTES TLSSocket__hasPendingActivity(void* ptr); | |
extern JSC_CALLCONV void* JSC_HOST_CALL_ATTRIBUTES TextChunkClass__construct(JSC::JSGlobalObject*, JSC::CallFrame*); | |
JSC_DECLARE_CUSTOM_GETTER(jsTextChunkConstructor); | |
extern JSC_CALLCONV void JSC_HOST_CALL_ATTRIBUTES TextChunkClass__finalize(void*); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES TextChunkPrototype__after(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES TextChunkPrototype__before(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES TextChunkPrototype__lastInTextNode(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES TextChunkPrototype__remove(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES TextChunkPrototype__removed(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES TextChunkPrototype__replace(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES TextChunkPrototype__getText(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV void* JSC_HOST_CALL_ATTRIBUTES TextDecoderClass__construct(JSC::JSGlobalObject*, JSC::CallFrame*); | |
JSC_DECLARE_CUSTOM_GETTER(jsTextDecoderConstructor); | |
extern JSC_CALLCONV void JSC_HOST_CALL_ATTRIBUTES TextDecoderClass__finalize(void*); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES TextDecoderPrototype__decode(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES TextDecoderPrototype__decodeWithoutTypeChecks(void* ptr, JSC::JSGlobalObject * lexicalGlobalObject, JSC::JSUint8Array* arg0); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES TextDecoderPrototype__getEncoding(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES TextDecoderPrototype__getFatal(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES TextDecoderPrototype__getIgnoreBOM(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV void JSC_HOST_CALL_ATTRIBUTES TimeoutClass__finalize(void*); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES TimeoutPrototype__toPrimitive(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES TimeoutPrototype__hasRef(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES TimeoutPrototype__doRef(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES TimeoutPrototype__doRefresh(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES TimeoutPrototype__doUnref(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV void* JSC_HOST_CALL_ATTRIBUTES TranspilerClass__construct(JSC::JSGlobalObject*, JSC::CallFrame*); | |
JSC_DECLARE_CUSTOM_GETTER(jsTranspilerConstructor); | |
extern JSC_CALLCONV void JSC_HOST_CALL_ATTRIBUTES TranspilerClass__finalize(void*); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES TranspilerPrototype__scan(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES TranspilerPrototype__scanImports(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES TranspilerPrototype__transform(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES TranspilerPrototype__transformSync(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV void* JSC_HOST_CALL_ATTRIBUTES UDPSocketClass__construct(JSC::JSGlobalObject*, JSC::CallFrame*); | |
JSC_DECLARE_CUSTOM_GETTER(jsUDPSocketConstructor); | |
extern JSC_CALLCONV void JSC_HOST_CALL_ATTRIBUTES UDPSocketClass__finalize(void*); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES UDPSocketPrototype__close(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES UDPSocketPrototype__getAddress(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES UDPSocketPrototype__getBinaryType(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES UDPSocketPrototype__close(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES UDPSocketPrototype__getClosed(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES UDPSocketPrototype__getHostname(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES UDPSocketPrototype__getPort(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES UDPSocketPrototype__ref(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES UDPSocketPrototype__reload(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES UDPSocketPrototype__getRemoteAddress(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES UDPSocketPrototype__send(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES UDPSocketPrototype__sendMany(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES UDPSocketPrototype__unref(void* ptr, JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame); | |
extern JSC_CALLCONV bool JSC_HOST_CALL_ATTRIBUTES UDPSocket__hasPendingActivity(void* ptr); | |
namespace WebCore { | |
using namespace JSC; | |
using namespace Zig; | |
class JSAttributeIteratorPrototype final : public JSC::JSNonFinalObject { | |
public: | |
using Base = JSC::JSNonFinalObject; | |
static JSAttributeIteratorPrototype* create(JSC::VM& vm, JSGlobalObject* globalObject, JSC::Structure* structure) | |
{ | |
JSAttributeIteratorPrototype* ptr = new (NotNull, JSC::allocateCell<JSAttributeIteratorPrototype>(vm)) JSAttributeIteratorPrototype(vm, globalObject, structure); | |
ptr->finishCreation(vm, globalObject); | |
return ptr; | |
} | |
DECLARE_INFO; | |
template<typename CellType, JSC::SubspaceAccess> | |
static JSC::GCClient::IsoSubspace* subspaceFor(JSC::VM& vm) | |
{ | |
STATIC_ASSERT_ISO_SUBSPACE_SHARABLE(JSAttributeIteratorPrototype, Base); | |
return &vm.plainObjectSpace(); | |
} | |
static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype) | |
{ | |
return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info()); | |
} | |
private: | |
JSAttributeIteratorPrototype(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure) | |
: Base(vm, structure) | |
{ | |
} | |
void finishCreation(JSC::VM&, JSC::JSGlobalObject*); | |
}; | |
JSC_DECLARE_HOST_FUNCTION(AttributeIteratorPrototype__iteratorCallback); | |
JSC_DECLARE_HOST_FUNCTION(AttributeIteratorPrototype__nextCallback); | |
STATIC_ASSERT_ISO_SUBSPACE_SHARABLE(JSAttributeIteratorPrototype, JSAttributeIteratorPrototype::Base); | |
static const HashTableValue JSAttributeIteratorPrototypeTableValues[1] = { | |
{ "next"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, AttributeIteratorPrototype__nextCallback, 0 } } | |
}; | |
const ClassInfo JSAttributeIteratorPrototype::s_info = { "AttributeIterator"_s, &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSAttributeIteratorPrototype) }; | |
JSC_DEFINE_CUSTOM_GETTER(jsAttributeIteratorConstructor, (JSGlobalObject * lexicalGlobalObject, EncodedJSValue thisValue, PropertyName)) | |
{ | |
VM& vm = JSC::getVM(lexicalGlobalObject); | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
auto* globalObject = reinterpret_cast<Zig::GlobalObject*>(lexicalGlobalObject); | |
auto* prototype = jsDynamicCast<JSAttributeIteratorPrototype*>(JSValue::decode(thisValue)); | |
if (UNLIKELY(!prototype)) | |
return throwVMTypeError(lexicalGlobalObject, throwScope, "Cannot get constructor for AttributeIterator"_s); | |
return JSValue::encode(globalObject->JSAttributeIteratorConstructor()); | |
} | |
JSC_DEFINE_HOST_FUNCTION(AttributeIteratorPrototype__iteratorCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSAttributeIterator* thisObject = jsDynamicCast<JSAttributeIterator*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof AttributeIterator"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = AttributeIteratorPrototype__getThis(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "AttributeIterator.getThis returned an empty value without an exception"); | |
return result; | |
#endif | |
return AttributeIteratorPrototype__getThis(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_HOST_FUNCTION(AttributeIteratorPrototype__nextCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSAttributeIterator* thisObject = jsDynamicCast<JSAttributeIterator*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof AttributeIterator"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = AttributeIteratorPrototype__next(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "AttributeIterator.next returned an empty value without an exception"); | |
return result; | |
#endif | |
return AttributeIteratorPrototype__next(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
void JSAttributeIteratorPrototype::finishCreation(JSC::VM& vm, JSC::JSGlobalObject* globalObject) | |
{ | |
Base::finishCreation(vm); | |
reifyStaticProperties(vm, JSAttributeIterator::info(), JSAttributeIteratorPrototypeTableValues, *this); | |
this->putDirect(vm, vm.propertyNames->iteratorSymbol, JSFunction::create(vm, globalObject, 1, String("iterator"_s), AttributeIteratorPrototype__iteratorCallback, ImplementationVisibility::Public), PropertyAttribute::ReadOnly | PropertyAttribute::DontEnum | 0); | |
JSC_TO_STRING_TAG_WITHOUT_TRANSITION(); | |
} | |
JSAttributeIterator::~JSAttributeIterator() | |
{ | |
if (LIKELY(m_ctx)) { | |
AttributeIteratorClass__finalize(m_ctx); | |
} | |
} | |
void JSAttributeIterator::destroy(JSCell* cell) | |
{ | |
static_cast<JSAttributeIterator*>(cell)->JSAttributeIterator::~JSAttributeIterator(); | |
} | |
const ClassInfo JSAttributeIterator::s_info = { "AttributeIterator"_s, &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSAttributeIterator) }; | |
void JSAttributeIterator::finishCreation(VM& vm) | |
{ | |
Base::finishCreation(vm); | |
ASSERT(inherits(info())); | |
} | |
JSAttributeIterator* JSAttributeIterator::create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure, void* ctx) { | |
JSAttributeIterator* ptr = new (NotNull, JSC::allocateCell<JSAttributeIterator>(vm)) JSAttributeIterator(vm, structure, ctx); | |
ptr->finishCreation(vm); | |
return ptr; | |
} | |
extern JSC_CALLCONV void* JSC_HOST_CALL_ATTRIBUTES AttributeIterator__fromJS(JSC::EncodedJSValue value) { | |
JSC::JSValue decodedValue = JSC::JSValue::decode(value); | |
if (decodedValue.isEmpty() || !decodedValue.isCell()) | |
return nullptr; | |
JSC::JSCell* cell = decodedValue.asCell(); | |
JSAttributeIterator* object = JSC::jsDynamicCast<JSAttributeIterator*>(cell); | |
if (!object) | |
return nullptr; | |
return object->wrapped(); | |
} | |
extern JSC_CALLCONV void* JSC_HOST_CALL_ATTRIBUTES AttributeIterator__fromJSDirect(JSC::EncodedJSValue value) { | |
JSC::JSValue decodedValue = JSC::JSValue::decode(value); | |
ASSERT(decodedValue.isCell()); | |
JSC::JSCell* cell = decodedValue.asCell(); | |
JSAttributeIterator* object = JSC::jsDynamicCast<JSAttributeIterator*>(cell); | |
if (!object) | |
return nullptr; | |
Zig::GlobalObject* globalObject = jsDynamicCast<Zig::GlobalObject*>(object->globalObject()); | |
if (UNLIKELY(globalObject == nullptr || cell->structureID() != globalObject->JSAttributeIteratorStructure()->id())) { | |
return nullptr; | |
} | |
return object->wrapped(); | |
} | |
extern JSC_CALLCONV bool JSC_HOST_CALL_ATTRIBUTES AttributeIterator__dangerouslySetPtr(JSC::EncodedJSValue value, void* ptr) { | |
JSAttributeIterator* object = JSC::jsDynamicCast<JSAttributeIterator*>(JSValue::decode(value)); | |
if (!object) | |
return false; | |
object->m_ctx = ptr; | |
return true; | |
} | |
extern "C" const size_t AttributeIterator__ptrOffset = JSAttributeIterator::offsetOfWrapped(); | |
void JSAttributeIterator::analyzeHeap(JSCell* cell, HeapAnalyzer& analyzer) | |
{ | |
auto* thisObject = jsCast<JSAttributeIterator*>(cell); | |
if (void* wrapped = thisObject->wrapped()) { | |
// if (thisObject->scriptExecutionContext()) | |
// analyzer.setLabelForCell(cell, makeString("url ", thisObject->scriptExecutionContext()->url().string())); | |
} | |
Base::analyzeHeap(cell, analyzer); | |
} | |
JSObject* JSAttributeIterator::createPrototype(VM& vm, JSDOMGlobalObject* globalObject) | |
{ | |
auto *structure = JSAttributeIteratorPrototype::createStructure(vm, globalObject, globalObject->objectPrototype()); | |
structure->setMayBePrototype(true); | |
return JSAttributeIteratorPrototype::create(vm, globalObject, structure); | |
} | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES AttributeIterator__create(Zig::GlobalObject* globalObject, void* ptr) { | |
auto &vm = globalObject->vm(); | |
JSC::Structure* structure = globalObject->JSAttributeIteratorStructure(); | |
JSAttributeIterator* instance = JSAttributeIterator::create(vm, globalObject, structure, ptr); | |
return JSValue::encode(instance); | |
} | |
class JSBigIntStatsPrototype final : public JSC::JSNonFinalObject { | |
public: | |
using Base = JSC::JSNonFinalObject; | |
static JSBigIntStatsPrototype* create(JSC::VM& vm, JSGlobalObject* globalObject, JSC::Structure* structure) | |
{ | |
JSBigIntStatsPrototype* ptr = new (NotNull, JSC::allocateCell<JSBigIntStatsPrototype>(vm)) JSBigIntStatsPrototype(vm, globalObject, structure); | |
ptr->finishCreation(vm, globalObject); | |
return ptr; | |
} | |
DECLARE_INFO; | |
template<typename CellType, JSC::SubspaceAccess> | |
static JSC::GCClient::IsoSubspace* subspaceFor(JSC::VM& vm) | |
{ | |
STATIC_ASSERT_ISO_SUBSPACE_SHARABLE(JSBigIntStatsPrototype, Base); | |
return &vm.plainObjectSpace(); | |
} | |
static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype) | |
{ | |
return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info()); | |
} | |
private: | |
JSBigIntStatsPrototype(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure) | |
: Base(vm, structure) | |
{ | |
} | |
void finishCreation(JSC::VM&, JSC::JSGlobalObject*); | |
}; | |
class JSBigIntStatsConstructor final : public JSC::InternalFunction { | |
public: | |
using Base = JSC::InternalFunction; | |
static JSBigIntStatsConstructor* create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure, JSBigIntStatsPrototype* prototype); | |
static constexpr unsigned StructureFlags = Base::StructureFlags; | |
static constexpr bool needsDestruction = false; | |
static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype) | |
{ | |
return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::InternalFunctionType, StructureFlags), info()); | |
} | |
template<typename, JSC::SubspaceAccess mode> static JSC::GCClient::IsoSubspace* subspaceFor(JSC::VM& vm) | |
{ | |
if constexpr (mode == JSC::SubspaceAccess::Concurrently) | |
return nullptr; | |
return WebCore::subspaceForImpl<JSBigIntStatsConstructor, WebCore::UseCustomHeapCellType::No>( | |
vm, | |
[](auto& spaces) { return spaces.m_clientSubspaceForBunClassConstructor.get(); }, | |
[](auto& spaces, auto&& space) { spaces.m_clientSubspaceForBunClassConstructor = std::forward<decltype(space)>(space); }, | |
[](auto& spaces) { return spaces.m_subspaceForBunClassConstructor.get(); }, | |
[](auto& spaces, auto&& space) { spaces.m_subspaceForBunClassConstructor = std::forward<decltype(space)>(space); }); | |
} | |
void initializeProperties(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSBigIntStatsPrototype* prototype); | |
// Must be defined for each specialization class. | |
static JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES construct(JSC::JSGlobalObject*, JSC::CallFrame*); | |
static JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES call(JSC::JSGlobalObject*, JSC::CallFrame*); | |
DECLARE_EXPORT_INFO; | |
private: | |
JSBigIntStatsConstructor(JSC::VM& vm, JSC::Structure* structure); | |
void finishCreation(JSC::VM&, JSC::JSGlobalObject* globalObject, JSBigIntStatsPrototype* prototype); | |
}; | |
JSC_DECLARE_CUSTOM_GETTER(BigIntStatsPrototype__atimeGetterWrap); | |
static JSC_DECLARE_CUSTOM_SETTER(BigIntStatsPrototype__atimeSetterWrap); | |
JSC_DECLARE_CUSTOM_GETTER(BigIntStatsPrototype__atimeMsGetterWrap); | |
static JSC_DECLARE_CUSTOM_SETTER(BigIntStatsPrototype__atimeMsSetterWrap); | |
JSC_DECLARE_CUSTOM_GETTER(BigIntStatsPrototype__atimeNsGetterWrap); | |
static JSC_DECLARE_CUSTOM_SETTER(BigIntStatsPrototype__atimeNsSetterWrap); | |
JSC_DECLARE_CUSTOM_GETTER(BigIntStatsPrototype__birthtimeGetterWrap); | |
static JSC_DECLARE_CUSTOM_SETTER(BigIntStatsPrototype__birthtimeSetterWrap); | |
JSC_DECLARE_CUSTOM_GETTER(BigIntStatsPrototype__birthtimeMsGetterWrap); | |
static JSC_DECLARE_CUSTOM_SETTER(BigIntStatsPrototype__birthtimeMsSetterWrap); | |
JSC_DECLARE_CUSTOM_GETTER(BigIntStatsPrototype__birthtimeNsGetterWrap); | |
static JSC_DECLARE_CUSTOM_SETTER(BigIntStatsPrototype__birthtimeNsSetterWrap); | |
JSC_DECLARE_CUSTOM_GETTER(BigIntStatsPrototype__blksizeGetterWrap); | |
static JSC_DECLARE_CUSTOM_SETTER(BigIntStatsPrototype__blksizeSetterWrap); | |
JSC_DECLARE_CUSTOM_GETTER(BigIntStatsPrototype__blocksGetterWrap); | |
static JSC_DECLARE_CUSTOM_SETTER(BigIntStatsPrototype__blocksSetterWrap); | |
JSC_DECLARE_CUSTOM_GETTER(BigIntStatsPrototype__ctimeGetterWrap); | |
static JSC_DECLARE_CUSTOM_SETTER(BigIntStatsPrototype__ctimeSetterWrap); | |
JSC_DECLARE_CUSTOM_GETTER(BigIntStatsPrototype__ctimeMsGetterWrap); | |
static JSC_DECLARE_CUSTOM_SETTER(BigIntStatsPrototype__ctimeMsSetterWrap); | |
JSC_DECLARE_CUSTOM_GETTER(BigIntStatsPrototype__ctimeNsGetterWrap); | |
static JSC_DECLARE_CUSTOM_SETTER(BigIntStatsPrototype__ctimeNsSetterWrap); | |
JSC_DECLARE_CUSTOM_GETTER(BigIntStatsPrototype__devGetterWrap); | |
static JSC_DECLARE_CUSTOM_SETTER(BigIntStatsPrototype__devSetterWrap); | |
JSC_DECLARE_CUSTOM_GETTER(BigIntStatsPrototype__gidGetterWrap); | |
static JSC_DECLARE_CUSTOM_SETTER(BigIntStatsPrototype__gidSetterWrap); | |
JSC_DECLARE_CUSTOM_GETTER(BigIntStatsPrototype__inoGetterWrap); | |
static JSC_DECLARE_CUSTOM_SETTER(BigIntStatsPrototype__inoSetterWrap); | |
JSC_DECLARE_HOST_FUNCTION(BigIntStatsPrototype__isBlockDeviceCallback); | |
extern JSC_CALLCONV JSC_DECLARE_JIT_OPERATION_WITHOUT_WTF_INTERNAL(BigIntStatsPrototype__isBlockDeviceWithoutTypeChecksWrapper, JSC::EncodedJSValue, (JSC::JSGlobalObject * lexicalGlobalObject, void* thisValue)); | |
static const JSC::DOMJIT::Signature DOMJITSignatureForBigIntStatsPrototype__isBlockDevice(BigIntStatsPrototype__isBlockDeviceWithoutTypeChecksWrapper, | |
JSBigIntStats::info(), | |
JSC::DOMJIT::Effect::forPure(), | |
JSC::SpecHeapTop); | |
JSC_DEFINE_JIT_OPERATION(BigIntStatsPrototype__isBlockDeviceWithoutTypeChecksWrapper, JSC::EncodedJSValue, (JSC::JSGlobalObject * lexicalGlobalObject, void* thisValue)) | |
{ | |
VM& vm = JSC::getVM(lexicalGlobalObject); | |
IGNORE_WARNINGS_BEGIN("frame-address") | |
CallFrame* callFrame = DECLARE_CALL_FRAME(vm); | |
IGNORE_WARNINGS_END | |
JSC::JITOperationPrologueCallFrameTracer tracer(vm, callFrame); | |
return {BigIntStatsPrototype__isBlockDevice_WithoutTypeChecks(reinterpret_cast<JSBigIntStats*>(thisValue)->wrapped(), lexicalGlobalObject)}; | |
} | |
JSC_DECLARE_HOST_FUNCTION(BigIntStatsPrototype__isCharacterDeviceCallback); | |
extern JSC_CALLCONV JSC_DECLARE_JIT_OPERATION_WITHOUT_WTF_INTERNAL(BigIntStatsPrototype__isCharacterDeviceWithoutTypeChecksWrapper, JSC::EncodedJSValue, (JSC::JSGlobalObject * lexicalGlobalObject, void* thisValue)); | |
static const JSC::DOMJIT::Signature DOMJITSignatureForBigIntStatsPrototype__isCharacterDevice(BigIntStatsPrototype__isCharacterDeviceWithoutTypeChecksWrapper, | |
JSBigIntStats::info(), | |
JSC::DOMJIT::Effect::forPure(), | |
JSC::SpecHeapTop); | |
JSC_DEFINE_JIT_OPERATION(BigIntStatsPrototype__isCharacterDeviceWithoutTypeChecksWrapper, JSC::EncodedJSValue, (JSC::JSGlobalObject * lexicalGlobalObject, void* thisValue)) | |
{ | |
VM& vm = JSC::getVM(lexicalGlobalObject); | |
IGNORE_WARNINGS_BEGIN("frame-address") | |
CallFrame* callFrame = DECLARE_CALL_FRAME(vm); | |
IGNORE_WARNINGS_END | |
JSC::JITOperationPrologueCallFrameTracer tracer(vm, callFrame); | |
return {BigIntStatsPrototype__isCharacterDevice_WithoutTypeChecks(reinterpret_cast<JSBigIntStats*>(thisValue)->wrapped(), lexicalGlobalObject)}; | |
} | |
JSC_DECLARE_HOST_FUNCTION(BigIntStatsPrototype__isDirectoryCallback); | |
extern JSC_CALLCONV JSC_DECLARE_JIT_OPERATION_WITHOUT_WTF_INTERNAL(BigIntStatsPrototype__isDirectoryWithoutTypeChecksWrapper, JSC::EncodedJSValue, (JSC::JSGlobalObject * lexicalGlobalObject, void* thisValue)); | |
static const JSC::DOMJIT::Signature DOMJITSignatureForBigIntStatsPrototype__isDirectory(BigIntStatsPrototype__isDirectoryWithoutTypeChecksWrapper, | |
JSBigIntStats::info(), | |
JSC::DOMJIT::Effect::forPure(), | |
JSC::SpecHeapTop); | |
JSC_DEFINE_JIT_OPERATION(BigIntStatsPrototype__isDirectoryWithoutTypeChecksWrapper, JSC::EncodedJSValue, (JSC::JSGlobalObject * lexicalGlobalObject, void* thisValue)) | |
{ | |
VM& vm = JSC::getVM(lexicalGlobalObject); | |
IGNORE_WARNINGS_BEGIN("frame-address") | |
CallFrame* callFrame = DECLARE_CALL_FRAME(vm); | |
IGNORE_WARNINGS_END | |
JSC::JITOperationPrologueCallFrameTracer tracer(vm, callFrame); | |
return {BigIntStatsPrototype__isDirectory_WithoutTypeChecks(reinterpret_cast<JSBigIntStats*>(thisValue)->wrapped(), lexicalGlobalObject)}; | |
} | |
JSC_DECLARE_HOST_FUNCTION(BigIntStatsPrototype__isFIFOCallback); | |
extern JSC_CALLCONV JSC_DECLARE_JIT_OPERATION_WITHOUT_WTF_INTERNAL(BigIntStatsPrototype__isFIFOWithoutTypeChecksWrapper, JSC::EncodedJSValue, (JSC::JSGlobalObject * lexicalGlobalObject, void* thisValue)); | |
static const JSC::DOMJIT::Signature DOMJITSignatureForBigIntStatsPrototype__isFIFO(BigIntStatsPrototype__isFIFOWithoutTypeChecksWrapper, | |
JSBigIntStats::info(), | |
JSC::DOMJIT::Effect::forPure(), | |
JSC::SpecHeapTop); | |
JSC_DEFINE_JIT_OPERATION(BigIntStatsPrototype__isFIFOWithoutTypeChecksWrapper, JSC::EncodedJSValue, (JSC::JSGlobalObject * lexicalGlobalObject, void* thisValue)) | |
{ | |
VM& vm = JSC::getVM(lexicalGlobalObject); | |
IGNORE_WARNINGS_BEGIN("frame-address") | |
CallFrame* callFrame = DECLARE_CALL_FRAME(vm); | |
IGNORE_WARNINGS_END | |
JSC::JITOperationPrologueCallFrameTracer tracer(vm, callFrame); | |
return {BigIntStatsPrototype__isFIFO_WithoutTypeChecks(reinterpret_cast<JSBigIntStats*>(thisValue)->wrapped(), lexicalGlobalObject)}; | |
} | |
JSC_DECLARE_HOST_FUNCTION(BigIntStatsPrototype__isFileCallback); | |
extern JSC_CALLCONV JSC_DECLARE_JIT_OPERATION_WITHOUT_WTF_INTERNAL(BigIntStatsPrototype__isFileWithoutTypeChecksWrapper, JSC::EncodedJSValue, (JSC::JSGlobalObject * lexicalGlobalObject, void* thisValue)); | |
static const JSC::DOMJIT::Signature DOMJITSignatureForBigIntStatsPrototype__isFile(BigIntStatsPrototype__isFileWithoutTypeChecksWrapper, | |
JSBigIntStats::info(), | |
JSC::DOMJIT::Effect::forPure(), | |
JSC::SpecHeapTop); | |
JSC_DEFINE_JIT_OPERATION(BigIntStatsPrototype__isFileWithoutTypeChecksWrapper, JSC::EncodedJSValue, (JSC::JSGlobalObject * lexicalGlobalObject, void* thisValue)) | |
{ | |
VM& vm = JSC::getVM(lexicalGlobalObject); | |
IGNORE_WARNINGS_BEGIN("frame-address") | |
CallFrame* callFrame = DECLARE_CALL_FRAME(vm); | |
IGNORE_WARNINGS_END | |
JSC::JITOperationPrologueCallFrameTracer tracer(vm, callFrame); | |
return {BigIntStatsPrototype__isFile_WithoutTypeChecks(reinterpret_cast<JSBigIntStats*>(thisValue)->wrapped(), lexicalGlobalObject)}; | |
} | |
JSC_DECLARE_HOST_FUNCTION(BigIntStatsPrototype__isSocketCallback); | |
extern JSC_CALLCONV JSC_DECLARE_JIT_OPERATION_WITHOUT_WTF_INTERNAL(BigIntStatsPrototype__isSocketWithoutTypeChecksWrapper, JSC::EncodedJSValue, (JSC::JSGlobalObject * lexicalGlobalObject, void* thisValue)); | |
static const JSC::DOMJIT::Signature DOMJITSignatureForBigIntStatsPrototype__isSocket(BigIntStatsPrototype__isSocketWithoutTypeChecksWrapper, | |
JSBigIntStats::info(), | |
JSC::DOMJIT::Effect::forPure(), | |
JSC::SpecHeapTop); | |
JSC_DEFINE_JIT_OPERATION(BigIntStatsPrototype__isSocketWithoutTypeChecksWrapper, JSC::EncodedJSValue, (JSC::JSGlobalObject * lexicalGlobalObject, void* thisValue)) | |
{ | |
VM& vm = JSC::getVM(lexicalGlobalObject); | |
IGNORE_WARNINGS_BEGIN("frame-address") | |
CallFrame* callFrame = DECLARE_CALL_FRAME(vm); | |
IGNORE_WARNINGS_END | |
JSC::JITOperationPrologueCallFrameTracer tracer(vm, callFrame); | |
return {BigIntStatsPrototype__isSocket_WithoutTypeChecks(reinterpret_cast<JSBigIntStats*>(thisValue)->wrapped(), lexicalGlobalObject)}; | |
} | |
JSC_DECLARE_HOST_FUNCTION(BigIntStatsPrototype__isSymbolicLinkCallback); | |
extern JSC_CALLCONV JSC_DECLARE_JIT_OPERATION_WITHOUT_WTF_INTERNAL(BigIntStatsPrototype__isSymbolicLinkWithoutTypeChecksWrapper, JSC::EncodedJSValue, (JSC::JSGlobalObject * lexicalGlobalObject, void* thisValue)); | |
static const JSC::DOMJIT::Signature DOMJITSignatureForBigIntStatsPrototype__isSymbolicLink(BigIntStatsPrototype__isSymbolicLinkWithoutTypeChecksWrapper, | |
JSBigIntStats::info(), | |
JSC::DOMJIT::Effect::forPure(), | |
JSC::SpecHeapTop); | |
JSC_DEFINE_JIT_OPERATION(BigIntStatsPrototype__isSymbolicLinkWithoutTypeChecksWrapper, JSC::EncodedJSValue, (JSC::JSGlobalObject * lexicalGlobalObject, void* thisValue)) | |
{ | |
VM& vm = JSC::getVM(lexicalGlobalObject); | |
IGNORE_WARNINGS_BEGIN("frame-address") | |
CallFrame* callFrame = DECLARE_CALL_FRAME(vm); | |
IGNORE_WARNINGS_END | |
JSC::JITOperationPrologueCallFrameTracer tracer(vm, callFrame); | |
return {BigIntStatsPrototype__isSymbolicLink_WithoutTypeChecks(reinterpret_cast<JSBigIntStats*>(thisValue)->wrapped(), lexicalGlobalObject)}; | |
} | |
JSC_DECLARE_CUSTOM_GETTER(BigIntStatsPrototype__modeGetterWrap); | |
static JSC_DECLARE_CUSTOM_SETTER(BigIntStatsPrototype__modeSetterWrap); | |
JSC_DECLARE_CUSTOM_GETTER(BigIntStatsPrototype__mtimeGetterWrap); | |
static JSC_DECLARE_CUSTOM_SETTER(BigIntStatsPrototype__mtimeSetterWrap); | |
JSC_DECLARE_CUSTOM_GETTER(BigIntStatsPrototype__mtimeMsGetterWrap); | |
static JSC_DECLARE_CUSTOM_SETTER(BigIntStatsPrototype__mtimeMsSetterWrap); | |
JSC_DECLARE_CUSTOM_GETTER(BigIntStatsPrototype__mtimeNsGetterWrap); | |
static JSC_DECLARE_CUSTOM_SETTER(BigIntStatsPrototype__mtimeNsSetterWrap); | |
JSC_DECLARE_CUSTOM_GETTER(BigIntStatsPrototype__nlinkGetterWrap); | |
static JSC_DECLARE_CUSTOM_SETTER(BigIntStatsPrototype__nlinkSetterWrap); | |
JSC_DECLARE_CUSTOM_GETTER(BigIntStatsPrototype__rdevGetterWrap); | |
static JSC_DECLARE_CUSTOM_SETTER(BigIntStatsPrototype__rdevSetterWrap); | |
JSC_DECLARE_CUSTOM_GETTER(BigIntStatsPrototype__sizeGetterWrap); | |
static JSC_DECLARE_CUSTOM_SETTER(BigIntStatsPrototype__sizeSetterWrap); | |
JSC_DECLARE_CUSTOM_GETTER(BigIntStatsPrototype__uidGetterWrap); | |
static JSC_DECLARE_CUSTOM_SETTER(BigIntStatsPrototype__uidSetterWrap); | |
STATIC_ASSERT_ISO_SUBSPACE_SHARABLE(JSBigIntStatsPrototype, JSBigIntStatsPrototype::Base); | |
static const HashTableValue JSBigIntStatsPrototypeTableValues[29] = { | |
{ "atime"_s, static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::GetterSetterType, &BigIntStatsPrototype__atimeGetterWrap, &BigIntStatsPrototype__atimeSetterWrap } } , | |
{ "atimeMs"_s, static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::GetterSetterType, &BigIntStatsPrototype__atimeMsGetterWrap, &BigIntStatsPrototype__atimeMsSetterWrap } } , | |
{ "atimeNs"_s, static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::GetterSetterType, &BigIntStatsPrototype__atimeNsGetterWrap, &BigIntStatsPrototype__atimeNsSetterWrap } } , | |
{ "birthtime"_s, static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::GetterSetterType, &BigIntStatsPrototype__birthtimeGetterWrap, &BigIntStatsPrototype__birthtimeSetterWrap } } , | |
{ "birthtimeMs"_s, static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::GetterSetterType, &BigIntStatsPrototype__birthtimeMsGetterWrap, &BigIntStatsPrototype__birthtimeMsSetterWrap } } , | |
{ "birthtimeNs"_s, static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::GetterSetterType, &BigIntStatsPrototype__birthtimeNsGetterWrap, &BigIntStatsPrototype__birthtimeNsSetterWrap } } , | |
{ "blksize"_s, static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::GetterSetterType, &BigIntStatsPrototype__blksizeGetterWrap, &BigIntStatsPrototype__blksizeSetterWrap } } , | |
{ "blocks"_s, static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::GetterSetterType, &BigIntStatsPrototype__blocksGetterWrap, &BigIntStatsPrototype__blocksSetterWrap } } , | |
{ "ctime"_s, static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::GetterSetterType, &BigIntStatsPrototype__ctimeGetterWrap, &BigIntStatsPrototype__ctimeSetterWrap } } , | |
{ "ctimeMs"_s, static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::GetterSetterType, &BigIntStatsPrototype__ctimeMsGetterWrap, &BigIntStatsPrototype__ctimeMsSetterWrap } } , | |
{ "ctimeNs"_s, static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::GetterSetterType, &BigIntStatsPrototype__ctimeNsGetterWrap, &BigIntStatsPrototype__ctimeNsSetterWrap } } , | |
{ "dev"_s, static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::GetterSetterType, &BigIntStatsPrototype__devGetterWrap, &BigIntStatsPrototype__devSetterWrap } } , | |
{ "gid"_s, static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::GetterSetterType, &BigIntStatsPrototype__gidGetterWrap, &BigIntStatsPrototype__gidSetterWrap } } , | |
{ "ino"_s, static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::GetterSetterType, &BigIntStatsPrototype__inoGetterWrap, &BigIntStatsPrototype__inoSetterWrap } } , | |
{ "isBlockDevice"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | JSC::PropertyAttribute::DOMJITFunction | PropertyAttribute::DontEnum | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::DOMJITFunctionType, BigIntStatsPrototype__isBlockDeviceCallback, &DOMJITSignatureForBigIntStatsPrototype__isBlockDevice } } , | |
{ "isCharacterDevice"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | JSC::PropertyAttribute::DOMJITFunction | PropertyAttribute::DontEnum | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::DOMJITFunctionType, BigIntStatsPrototype__isCharacterDeviceCallback, &DOMJITSignatureForBigIntStatsPrototype__isCharacterDevice } } , | |
{ "isDirectory"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | JSC::PropertyAttribute::DOMJITFunction | PropertyAttribute::DontEnum | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::DOMJITFunctionType, BigIntStatsPrototype__isDirectoryCallback, &DOMJITSignatureForBigIntStatsPrototype__isDirectory } } , | |
{ "isFIFO"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | JSC::PropertyAttribute::DOMJITFunction | PropertyAttribute::DontEnum | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::DOMJITFunctionType, BigIntStatsPrototype__isFIFOCallback, &DOMJITSignatureForBigIntStatsPrototype__isFIFO } } , | |
{ "isFile"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | JSC::PropertyAttribute::DOMJITFunction | PropertyAttribute::DontEnum | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::DOMJITFunctionType, BigIntStatsPrototype__isFileCallback, &DOMJITSignatureForBigIntStatsPrototype__isFile } } , | |
{ "isSocket"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | JSC::PropertyAttribute::DOMJITFunction | PropertyAttribute::DontEnum | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::DOMJITFunctionType, BigIntStatsPrototype__isSocketCallback, &DOMJITSignatureForBigIntStatsPrototype__isSocket } } , | |
{ "isSymbolicLink"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | JSC::PropertyAttribute::DOMJITFunction | PropertyAttribute::DontEnum | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::DOMJITFunctionType, BigIntStatsPrototype__isSymbolicLinkCallback, &DOMJITSignatureForBigIntStatsPrototype__isSymbolicLink } } , | |
{ "mode"_s, static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::GetterSetterType, &BigIntStatsPrototype__modeGetterWrap, &BigIntStatsPrototype__modeSetterWrap } } , | |
{ "mtime"_s, static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::GetterSetterType, &BigIntStatsPrototype__mtimeGetterWrap, &BigIntStatsPrototype__mtimeSetterWrap } } , | |
{ "mtimeMs"_s, static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::GetterSetterType, &BigIntStatsPrototype__mtimeMsGetterWrap, &BigIntStatsPrototype__mtimeMsSetterWrap } } , | |
{ "mtimeNs"_s, static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::GetterSetterType, &BigIntStatsPrototype__mtimeNsGetterWrap, &BigIntStatsPrototype__mtimeNsSetterWrap } } , | |
{ "nlink"_s, static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::GetterSetterType, &BigIntStatsPrototype__nlinkGetterWrap, &BigIntStatsPrototype__nlinkSetterWrap } } , | |
{ "rdev"_s, static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::GetterSetterType, &BigIntStatsPrototype__rdevGetterWrap, &BigIntStatsPrototype__rdevSetterWrap } } , | |
{ "size"_s, static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::GetterSetterType, &BigIntStatsPrototype__sizeGetterWrap, &BigIntStatsPrototype__sizeSetterWrap } } , | |
{ "uid"_s, static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::GetterSetterType, &BigIntStatsPrototype__uidGetterWrap, &BigIntStatsPrototype__uidSetterWrap } } | |
}; | |
const ClassInfo JSBigIntStatsPrototype::s_info = { "BigIntStats"_s, &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSBigIntStatsPrototype) }; | |
JSC_DEFINE_CUSTOM_GETTER(jsBigIntStatsConstructor, (JSGlobalObject * lexicalGlobalObject, EncodedJSValue thisValue, PropertyName)) | |
{ | |
VM& vm = JSC::getVM(lexicalGlobalObject); | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
auto* globalObject = reinterpret_cast<Zig::GlobalObject*>(lexicalGlobalObject); | |
auto* prototype = jsDynamicCast<JSBigIntStatsPrototype*>(JSValue::decode(thisValue)); | |
if (UNLIKELY(!prototype)) | |
return throwVMTypeError(lexicalGlobalObject, throwScope, "Cannot get constructor for BigIntStats"_s); | |
return JSValue::encode(globalObject->JSBigIntStatsConstructor()); | |
} | |
JSC_DEFINE_CUSTOM_GETTER(BigIntStatsPrototype__atimeGetterWrap, (JSGlobalObject * globalObject, EncodedJSValue encodedThisValue, PropertyName attributeName)) | |
{ | |
auto& vm = globalObject->vm(); | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
JSBigIntStats* thisObject = jsDynamicCast<JSBigIntStats*>(JSValue::decode(encodedThisValue)); | |
if (UNLIKELY(!thisObject)) { | |
return JSValue::encode(jsUndefined()); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
if (JSValue cachedValue = thisObject->m_atime.get()) | |
return JSValue::encode(cachedValue); | |
JSC::JSValue result = JSC::JSValue::decode( | |
BigIntStatsPrototype__atime(thisObject->wrapped(), globalObject) | |
); | |
RETURN_IF_EXCEPTION(throwScope, {}); | |
thisObject->m_atime.set(vm, thisObject, result); | |
RELEASE_AND_RETURN(throwScope, JSValue::encode(result)); | |
} | |
extern JSC_CALLCONV void BigIntStatsPrototype__atimeSetCachedValue(JSC::EncodedJSValue thisValue, JSC::JSGlobalObject *globalObject, JSC::EncodedJSValue value) | |
{ | |
auto& vm = globalObject->vm(); | |
auto* thisObject = jsCast<JSBigIntStats*>(JSValue::decode(thisValue)); | |
thisObject->m_atime.set(vm, thisObject, JSValue::decode(value)); | |
} | |
extern JSC_CALLCONV JSC::EncodedJSValue BigIntStatsPrototype__atimeGetCachedValue(JSC::EncodedJSValue thisValue) | |
{ | |
auto* thisObject = jsCast<JSBigIntStats*>(JSValue::decode(thisValue)); | |
return JSValue::encode(thisObject->m_atime.get()); | |
} | |
JSC_DEFINE_CUSTOM_SETTER(BigIntStatsPrototype__atimeSetterWrap, (JSGlobalObject * lexicalGlobalObject, EncodedJSValue encodedThisValue, EncodedJSValue encodedValue, PropertyName attributeName)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
JSValue thisValue = JSValue::decode(encodedThisValue); | |
if (!thisValue.isObject()) { | |
return false; | |
} | |
JSObject *thisObject = asObject(thisValue); | |
thisObject->putDirect(vm, attributeName, JSValue::decode(encodedValue), 0); | |
return true; | |
} | |
JSC_DEFINE_CUSTOM_GETTER(BigIntStatsPrototype__atimeMsGetterWrap, (JSGlobalObject * lexicalGlobalObject, EncodedJSValue encodedThisValue, PropertyName attributeName)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
Zig::GlobalObject *globalObject = reinterpret_cast<Zig::GlobalObject*>(lexicalGlobalObject); | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
JSBigIntStats* thisObject = jsDynamicCast<JSBigIntStats*>(JSValue::decode(encodedThisValue)); | |
if (UNLIKELY(!thisObject)) { | |
return JSValue::encode(jsUndefined()); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
JSC::EncodedJSValue result = BigIntStatsPrototype__atimeMs(thisObject->wrapped(), globalObject); | |
RETURN_IF_EXCEPTION(throwScope, {}); | |
RELEASE_AND_RETURN(throwScope, result); | |
} | |
JSC_DEFINE_CUSTOM_SETTER(BigIntStatsPrototype__atimeMsSetterWrap, (JSGlobalObject * lexicalGlobalObject, EncodedJSValue encodedThisValue, EncodedJSValue encodedValue, PropertyName attributeName)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
JSValue thisValue = JSValue::decode(encodedThisValue); | |
if (!thisValue.isObject()) { | |
return false; | |
} | |
JSObject *thisObject = asObject(thisValue); | |
thisObject->putDirect(vm, attributeName, JSValue::decode(encodedValue), 0); | |
return true; | |
} | |
JSC_DEFINE_CUSTOM_GETTER(BigIntStatsPrototype__atimeNsGetterWrap, (JSGlobalObject * lexicalGlobalObject, EncodedJSValue encodedThisValue, PropertyName attributeName)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
Zig::GlobalObject *globalObject = reinterpret_cast<Zig::GlobalObject*>(lexicalGlobalObject); | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
JSBigIntStats* thisObject = jsDynamicCast<JSBigIntStats*>(JSValue::decode(encodedThisValue)); | |
if (UNLIKELY(!thisObject)) { | |
return JSValue::encode(jsUndefined()); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
JSC::EncodedJSValue result = BigIntStatsPrototype__atimeNs(thisObject->wrapped(), globalObject); | |
RETURN_IF_EXCEPTION(throwScope, {}); | |
RELEASE_AND_RETURN(throwScope, result); | |
} | |
JSC_DEFINE_CUSTOM_SETTER(BigIntStatsPrototype__atimeNsSetterWrap, (JSGlobalObject * lexicalGlobalObject, EncodedJSValue encodedThisValue, EncodedJSValue encodedValue, PropertyName attributeName)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
JSValue thisValue = JSValue::decode(encodedThisValue); | |
if (!thisValue.isObject()) { | |
return false; | |
} | |
JSObject *thisObject = asObject(thisValue); | |
thisObject->putDirect(vm, attributeName, JSValue::decode(encodedValue), 0); | |
return true; | |
} | |
JSC_DEFINE_CUSTOM_GETTER(BigIntStatsPrototype__birthtimeGetterWrap, (JSGlobalObject * globalObject, EncodedJSValue encodedThisValue, PropertyName attributeName)) | |
{ | |
auto& vm = globalObject->vm(); | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
JSBigIntStats* thisObject = jsDynamicCast<JSBigIntStats*>(JSValue::decode(encodedThisValue)); | |
if (UNLIKELY(!thisObject)) { | |
return JSValue::encode(jsUndefined()); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
if (JSValue cachedValue = thisObject->m_birthtime.get()) | |
return JSValue::encode(cachedValue); | |
JSC::JSValue result = JSC::JSValue::decode( | |
BigIntStatsPrototype__birthtime(thisObject->wrapped(), globalObject) | |
); | |
RETURN_IF_EXCEPTION(throwScope, {}); | |
thisObject->m_birthtime.set(vm, thisObject, result); | |
RELEASE_AND_RETURN(throwScope, JSValue::encode(result)); | |
} | |
extern JSC_CALLCONV void BigIntStatsPrototype__birthtimeSetCachedValue(JSC::EncodedJSValue thisValue, JSC::JSGlobalObject *globalObject, JSC::EncodedJSValue value) | |
{ | |
auto& vm = globalObject->vm(); | |
auto* thisObject = jsCast<JSBigIntStats*>(JSValue::decode(thisValue)); | |
thisObject->m_birthtime.set(vm, thisObject, JSValue::decode(value)); | |
} | |
extern JSC_CALLCONV JSC::EncodedJSValue BigIntStatsPrototype__birthtimeGetCachedValue(JSC::EncodedJSValue thisValue) | |
{ | |
auto* thisObject = jsCast<JSBigIntStats*>(JSValue::decode(thisValue)); | |
return JSValue::encode(thisObject->m_birthtime.get()); | |
} | |
JSC_DEFINE_CUSTOM_SETTER(BigIntStatsPrototype__birthtimeSetterWrap, (JSGlobalObject * lexicalGlobalObject, EncodedJSValue encodedThisValue, EncodedJSValue encodedValue, PropertyName attributeName)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
JSValue thisValue = JSValue::decode(encodedThisValue); | |
if (!thisValue.isObject()) { | |
return false; | |
} | |
JSObject *thisObject = asObject(thisValue); | |
thisObject->putDirect(vm, attributeName, JSValue::decode(encodedValue), 0); | |
return true; | |
} | |
JSC_DEFINE_CUSTOM_GETTER(BigIntStatsPrototype__birthtimeMsGetterWrap, (JSGlobalObject * lexicalGlobalObject, EncodedJSValue encodedThisValue, PropertyName attributeName)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
Zig::GlobalObject *globalObject = reinterpret_cast<Zig::GlobalObject*>(lexicalGlobalObject); | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
JSBigIntStats* thisObject = jsDynamicCast<JSBigIntStats*>(JSValue::decode(encodedThisValue)); | |
if (UNLIKELY(!thisObject)) { | |
return JSValue::encode(jsUndefined()); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
JSC::EncodedJSValue result = BigIntStatsPrototype__birthtimeMs(thisObject->wrapped(), globalObject); | |
RETURN_IF_EXCEPTION(throwScope, {}); | |
RELEASE_AND_RETURN(throwScope, result); | |
} | |
JSC_DEFINE_CUSTOM_SETTER(BigIntStatsPrototype__birthtimeMsSetterWrap, (JSGlobalObject * lexicalGlobalObject, EncodedJSValue encodedThisValue, EncodedJSValue encodedValue, PropertyName attributeName)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
JSValue thisValue = JSValue::decode(encodedThisValue); | |
if (!thisValue.isObject()) { | |
return false; | |
} | |
JSObject *thisObject = asObject(thisValue); | |
thisObject->putDirect(vm, attributeName, JSValue::decode(encodedValue), 0); | |
return true; | |
} | |
JSC_DEFINE_CUSTOM_GETTER(BigIntStatsPrototype__birthtimeNsGetterWrap, (JSGlobalObject * lexicalGlobalObject, EncodedJSValue encodedThisValue, PropertyName attributeName)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
Zig::GlobalObject *globalObject = reinterpret_cast<Zig::GlobalObject*>(lexicalGlobalObject); | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
JSBigIntStats* thisObject = jsDynamicCast<JSBigIntStats*>(JSValue::decode(encodedThisValue)); | |
if (UNLIKELY(!thisObject)) { | |
return JSValue::encode(jsUndefined()); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
JSC::EncodedJSValue result = BigIntStatsPrototype__birthtimeNs(thisObject->wrapped(), globalObject); | |
RETURN_IF_EXCEPTION(throwScope, {}); | |
RELEASE_AND_RETURN(throwScope, result); | |
} | |
JSC_DEFINE_CUSTOM_SETTER(BigIntStatsPrototype__birthtimeNsSetterWrap, (JSGlobalObject * lexicalGlobalObject, EncodedJSValue encodedThisValue, EncodedJSValue encodedValue, PropertyName attributeName)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
JSValue thisValue = JSValue::decode(encodedThisValue); | |
if (!thisValue.isObject()) { | |
return false; | |
} | |
JSObject *thisObject = asObject(thisValue); | |
thisObject->putDirect(vm, attributeName, JSValue::decode(encodedValue), 0); | |
return true; | |
} | |
JSC_DEFINE_CUSTOM_GETTER(BigIntStatsPrototype__blksizeGetterWrap, (JSGlobalObject * lexicalGlobalObject, EncodedJSValue encodedThisValue, PropertyName attributeName)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
Zig::GlobalObject *globalObject = reinterpret_cast<Zig::GlobalObject*>(lexicalGlobalObject); | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
JSBigIntStats* thisObject = jsDynamicCast<JSBigIntStats*>(JSValue::decode(encodedThisValue)); | |
if (UNLIKELY(!thisObject)) { | |
return JSValue::encode(jsUndefined()); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
JSC::EncodedJSValue result = BigIntStatsPrototype__blksize(thisObject->wrapped(), globalObject); | |
RETURN_IF_EXCEPTION(throwScope, {}); | |
RELEASE_AND_RETURN(throwScope, result); | |
} | |
JSC_DEFINE_CUSTOM_SETTER(BigIntStatsPrototype__blksizeSetterWrap, (JSGlobalObject * lexicalGlobalObject, EncodedJSValue encodedThisValue, EncodedJSValue encodedValue, PropertyName attributeName)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
JSValue thisValue = JSValue::decode(encodedThisValue); | |
if (!thisValue.isObject()) { | |
return false; | |
} | |
JSObject *thisObject = asObject(thisValue); | |
thisObject->putDirect(vm, attributeName, JSValue::decode(encodedValue), 0); | |
return true; | |
} | |
JSC_DEFINE_CUSTOM_GETTER(BigIntStatsPrototype__blocksGetterWrap, (JSGlobalObject * lexicalGlobalObject, EncodedJSValue encodedThisValue, PropertyName attributeName)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
Zig::GlobalObject *globalObject = reinterpret_cast<Zig::GlobalObject*>(lexicalGlobalObject); | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
JSBigIntStats* thisObject = jsDynamicCast<JSBigIntStats*>(JSValue::decode(encodedThisValue)); | |
if (UNLIKELY(!thisObject)) { | |
return JSValue::encode(jsUndefined()); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
JSC::EncodedJSValue result = BigIntStatsPrototype__blocks(thisObject->wrapped(), globalObject); | |
RETURN_IF_EXCEPTION(throwScope, {}); | |
RELEASE_AND_RETURN(throwScope, result); | |
} | |
JSC_DEFINE_CUSTOM_SETTER(BigIntStatsPrototype__blocksSetterWrap, (JSGlobalObject * lexicalGlobalObject, EncodedJSValue encodedThisValue, EncodedJSValue encodedValue, PropertyName attributeName)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
JSValue thisValue = JSValue::decode(encodedThisValue); | |
if (!thisValue.isObject()) { | |
return false; | |
} | |
JSObject *thisObject = asObject(thisValue); | |
thisObject->putDirect(vm, attributeName, JSValue::decode(encodedValue), 0); | |
return true; | |
} | |
JSC_DEFINE_CUSTOM_GETTER(BigIntStatsPrototype__ctimeGetterWrap, (JSGlobalObject * globalObject, EncodedJSValue encodedThisValue, PropertyName attributeName)) | |
{ | |
auto& vm = globalObject->vm(); | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
JSBigIntStats* thisObject = jsDynamicCast<JSBigIntStats*>(JSValue::decode(encodedThisValue)); | |
if (UNLIKELY(!thisObject)) { | |
return JSValue::encode(jsUndefined()); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
if (JSValue cachedValue = thisObject->m_ctime.get()) | |
return JSValue::encode(cachedValue); | |
JSC::JSValue result = JSC::JSValue::decode( | |
BigIntStatsPrototype__ctime(thisObject->wrapped(), globalObject) | |
); | |
RETURN_IF_EXCEPTION(throwScope, {}); | |
thisObject->m_ctime.set(vm, thisObject, result); | |
RELEASE_AND_RETURN(throwScope, JSValue::encode(result)); | |
} | |
extern JSC_CALLCONV void BigIntStatsPrototype__ctimeSetCachedValue(JSC::EncodedJSValue thisValue, JSC::JSGlobalObject *globalObject, JSC::EncodedJSValue value) | |
{ | |
auto& vm = globalObject->vm(); | |
auto* thisObject = jsCast<JSBigIntStats*>(JSValue::decode(thisValue)); | |
thisObject->m_ctime.set(vm, thisObject, JSValue::decode(value)); | |
} | |
extern JSC_CALLCONV JSC::EncodedJSValue BigIntStatsPrototype__ctimeGetCachedValue(JSC::EncodedJSValue thisValue) | |
{ | |
auto* thisObject = jsCast<JSBigIntStats*>(JSValue::decode(thisValue)); | |
return JSValue::encode(thisObject->m_ctime.get()); | |
} | |
JSC_DEFINE_CUSTOM_SETTER(BigIntStatsPrototype__ctimeSetterWrap, (JSGlobalObject * lexicalGlobalObject, EncodedJSValue encodedThisValue, EncodedJSValue encodedValue, PropertyName attributeName)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
JSValue thisValue = JSValue::decode(encodedThisValue); | |
if (!thisValue.isObject()) { | |
return false; | |
} | |
JSObject *thisObject = asObject(thisValue); | |
thisObject->putDirect(vm, attributeName, JSValue::decode(encodedValue), 0); | |
return true; | |
} | |
JSC_DEFINE_CUSTOM_GETTER(BigIntStatsPrototype__ctimeMsGetterWrap, (JSGlobalObject * lexicalGlobalObject, EncodedJSValue encodedThisValue, PropertyName attributeName)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
Zig::GlobalObject *globalObject = reinterpret_cast<Zig::GlobalObject*>(lexicalGlobalObject); | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
JSBigIntStats* thisObject = jsDynamicCast<JSBigIntStats*>(JSValue::decode(encodedThisValue)); | |
if (UNLIKELY(!thisObject)) { | |
return JSValue::encode(jsUndefined()); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
JSC::EncodedJSValue result = BigIntStatsPrototype__ctimeMs(thisObject->wrapped(), globalObject); | |
RETURN_IF_EXCEPTION(throwScope, {}); | |
RELEASE_AND_RETURN(throwScope, result); | |
} | |
JSC_DEFINE_CUSTOM_SETTER(BigIntStatsPrototype__ctimeMsSetterWrap, (JSGlobalObject * lexicalGlobalObject, EncodedJSValue encodedThisValue, EncodedJSValue encodedValue, PropertyName attributeName)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
JSValue thisValue = JSValue::decode(encodedThisValue); | |
if (!thisValue.isObject()) { | |
return false; | |
} | |
JSObject *thisObject = asObject(thisValue); | |
thisObject->putDirect(vm, attributeName, JSValue::decode(encodedValue), 0); | |
return true; | |
} | |
JSC_DEFINE_CUSTOM_GETTER(BigIntStatsPrototype__ctimeNsGetterWrap, (JSGlobalObject * lexicalGlobalObject, EncodedJSValue encodedThisValue, PropertyName attributeName)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
Zig::GlobalObject *globalObject = reinterpret_cast<Zig::GlobalObject*>(lexicalGlobalObject); | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
JSBigIntStats* thisObject = jsDynamicCast<JSBigIntStats*>(JSValue::decode(encodedThisValue)); | |
if (UNLIKELY(!thisObject)) { | |
return JSValue::encode(jsUndefined()); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
JSC::EncodedJSValue result = BigIntStatsPrototype__ctimeNs(thisObject->wrapped(), globalObject); | |
RETURN_IF_EXCEPTION(throwScope, {}); | |
RELEASE_AND_RETURN(throwScope, result); | |
} | |
JSC_DEFINE_CUSTOM_SETTER(BigIntStatsPrototype__ctimeNsSetterWrap, (JSGlobalObject * lexicalGlobalObject, EncodedJSValue encodedThisValue, EncodedJSValue encodedValue, PropertyName attributeName)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
JSValue thisValue = JSValue::decode(encodedThisValue); | |
if (!thisValue.isObject()) { | |
return false; | |
} | |
JSObject *thisObject = asObject(thisValue); | |
thisObject->putDirect(vm, attributeName, JSValue::decode(encodedValue), 0); | |
return true; | |
} | |
JSC_DEFINE_CUSTOM_GETTER(BigIntStatsPrototype__devGetterWrap, (JSGlobalObject * lexicalGlobalObject, EncodedJSValue encodedThisValue, PropertyName attributeName)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
Zig::GlobalObject *globalObject = reinterpret_cast<Zig::GlobalObject*>(lexicalGlobalObject); | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
JSBigIntStats* thisObject = jsDynamicCast<JSBigIntStats*>(JSValue::decode(encodedThisValue)); | |
if (UNLIKELY(!thisObject)) { | |
return JSValue::encode(jsUndefined()); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
JSC::EncodedJSValue result = BigIntStatsPrototype__dev(thisObject->wrapped(), globalObject); | |
RETURN_IF_EXCEPTION(throwScope, {}); | |
RELEASE_AND_RETURN(throwScope, result); | |
} | |
JSC_DEFINE_CUSTOM_SETTER(BigIntStatsPrototype__devSetterWrap, (JSGlobalObject * lexicalGlobalObject, EncodedJSValue encodedThisValue, EncodedJSValue encodedValue, PropertyName attributeName)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
JSValue thisValue = JSValue::decode(encodedThisValue); | |
if (!thisValue.isObject()) { | |
return false; | |
} | |
JSObject *thisObject = asObject(thisValue); | |
thisObject->putDirect(vm, attributeName, JSValue::decode(encodedValue), 0); | |
return true; | |
} | |
JSC_DEFINE_CUSTOM_GETTER(BigIntStatsPrototype__gidGetterWrap, (JSGlobalObject * lexicalGlobalObject, EncodedJSValue encodedThisValue, PropertyName attributeName)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
Zig::GlobalObject *globalObject = reinterpret_cast<Zig::GlobalObject*>(lexicalGlobalObject); | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
JSBigIntStats* thisObject = jsDynamicCast<JSBigIntStats*>(JSValue::decode(encodedThisValue)); | |
if (UNLIKELY(!thisObject)) { | |
return JSValue::encode(jsUndefined()); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
JSC::EncodedJSValue result = BigIntStatsPrototype__gid(thisObject->wrapped(), globalObject); | |
RETURN_IF_EXCEPTION(throwScope, {}); | |
RELEASE_AND_RETURN(throwScope, result); | |
} | |
JSC_DEFINE_CUSTOM_SETTER(BigIntStatsPrototype__gidSetterWrap, (JSGlobalObject * lexicalGlobalObject, EncodedJSValue encodedThisValue, EncodedJSValue encodedValue, PropertyName attributeName)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
JSValue thisValue = JSValue::decode(encodedThisValue); | |
if (!thisValue.isObject()) { | |
return false; | |
} | |
JSObject *thisObject = asObject(thisValue); | |
thisObject->putDirect(vm, attributeName, JSValue::decode(encodedValue), 0); | |
return true; | |
} | |
JSC_DEFINE_CUSTOM_GETTER(BigIntStatsPrototype__inoGetterWrap, (JSGlobalObject * lexicalGlobalObject, EncodedJSValue encodedThisValue, PropertyName attributeName)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
Zig::GlobalObject *globalObject = reinterpret_cast<Zig::GlobalObject*>(lexicalGlobalObject); | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
JSBigIntStats* thisObject = jsDynamicCast<JSBigIntStats*>(JSValue::decode(encodedThisValue)); | |
if (UNLIKELY(!thisObject)) { | |
return JSValue::encode(jsUndefined()); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
JSC::EncodedJSValue result = BigIntStatsPrototype__ino(thisObject->wrapped(), globalObject); | |
RETURN_IF_EXCEPTION(throwScope, {}); | |
RELEASE_AND_RETURN(throwScope, result); | |
} | |
JSC_DEFINE_CUSTOM_SETTER(BigIntStatsPrototype__inoSetterWrap, (JSGlobalObject * lexicalGlobalObject, EncodedJSValue encodedThisValue, EncodedJSValue encodedValue, PropertyName attributeName)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
JSValue thisValue = JSValue::decode(encodedThisValue); | |
if (!thisValue.isObject()) { | |
return false; | |
} | |
JSObject *thisObject = asObject(thisValue); | |
thisObject->putDirect(vm, attributeName, JSValue::decode(encodedValue), 0); | |
return true; | |
} | |
JSC_DEFINE_CUSTOM_SETTER(BigIntStatsPrototype__isBlockDeviceSetterWrap, (JSGlobalObject * lexicalGlobalObject, EncodedJSValue encodedThisValue, EncodedJSValue encodedValue, PropertyName attributeName)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
JSValue thisValue = JSValue::decode(encodedThisValue); | |
if (!thisValue.isObject()) { | |
return false; | |
} | |
JSObject *thisObject = asObject(thisValue); | |
thisObject->putDirect(vm, attributeName, JSValue::decode(encodedValue), 0); | |
return true; | |
} | |
JSC_DEFINE_HOST_FUNCTION(BigIntStatsPrototype__isBlockDeviceCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSBigIntStats* thisObject = jsDynamicCast<JSBigIntStats*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof BigIntStats"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = BigIntStatsPrototype__isBlockDevice_(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "BigIntStats.isBlockDevice_ returned an empty value without an exception"); | |
return result; | |
#endif | |
return BigIntStatsPrototype__isBlockDevice_(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_CUSTOM_SETTER(BigIntStatsPrototype__isCharacterDeviceSetterWrap, (JSGlobalObject * lexicalGlobalObject, EncodedJSValue encodedThisValue, EncodedJSValue encodedValue, PropertyName attributeName)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
JSValue thisValue = JSValue::decode(encodedThisValue); | |
if (!thisValue.isObject()) { | |
return false; | |
} | |
JSObject *thisObject = asObject(thisValue); | |
thisObject->putDirect(vm, attributeName, JSValue::decode(encodedValue), 0); | |
return true; | |
} | |
JSC_DEFINE_HOST_FUNCTION(BigIntStatsPrototype__isCharacterDeviceCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSBigIntStats* thisObject = jsDynamicCast<JSBigIntStats*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof BigIntStats"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = BigIntStatsPrototype__isCharacterDevice_(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "BigIntStats.isCharacterDevice_ returned an empty value without an exception"); | |
return result; | |
#endif | |
return BigIntStatsPrototype__isCharacterDevice_(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_CUSTOM_SETTER(BigIntStatsPrototype__isDirectorySetterWrap, (JSGlobalObject * lexicalGlobalObject, EncodedJSValue encodedThisValue, EncodedJSValue encodedValue, PropertyName attributeName)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
JSValue thisValue = JSValue::decode(encodedThisValue); | |
if (!thisValue.isObject()) { | |
return false; | |
} | |
JSObject *thisObject = asObject(thisValue); | |
thisObject->putDirect(vm, attributeName, JSValue::decode(encodedValue), 0); | |
return true; | |
} | |
JSC_DEFINE_HOST_FUNCTION(BigIntStatsPrototype__isDirectoryCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSBigIntStats* thisObject = jsDynamicCast<JSBigIntStats*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof BigIntStats"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = BigIntStatsPrototype__isDirectory_(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "BigIntStats.isDirectory_ returned an empty value without an exception"); | |
return result; | |
#endif | |
return BigIntStatsPrototype__isDirectory_(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_CUSTOM_SETTER(BigIntStatsPrototype__isFIFOSetterWrap, (JSGlobalObject * lexicalGlobalObject, EncodedJSValue encodedThisValue, EncodedJSValue encodedValue, PropertyName attributeName)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
JSValue thisValue = JSValue::decode(encodedThisValue); | |
if (!thisValue.isObject()) { | |
return false; | |
} | |
JSObject *thisObject = asObject(thisValue); | |
thisObject->putDirect(vm, attributeName, JSValue::decode(encodedValue), 0); | |
return true; | |
} | |
JSC_DEFINE_HOST_FUNCTION(BigIntStatsPrototype__isFIFOCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSBigIntStats* thisObject = jsDynamicCast<JSBigIntStats*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof BigIntStats"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = BigIntStatsPrototype__isFIFO_(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "BigIntStats.isFIFO_ returned an empty value without an exception"); | |
return result; | |
#endif | |
return BigIntStatsPrototype__isFIFO_(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_CUSTOM_SETTER(BigIntStatsPrototype__isFileSetterWrap, (JSGlobalObject * lexicalGlobalObject, EncodedJSValue encodedThisValue, EncodedJSValue encodedValue, PropertyName attributeName)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
JSValue thisValue = JSValue::decode(encodedThisValue); | |
if (!thisValue.isObject()) { | |
return false; | |
} | |
JSObject *thisObject = asObject(thisValue); | |
thisObject->putDirect(vm, attributeName, JSValue::decode(encodedValue), 0); | |
return true; | |
} | |
JSC_DEFINE_HOST_FUNCTION(BigIntStatsPrototype__isFileCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSBigIntStats* thisObject = jsDynamicCast<JSBigIntStats*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof BigIntStats"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = BigIntStatsPrototype__isFile_(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "BigIntStats.isFile_ returned an empty value without an exception"); | |
return result; | |
#endif | |
return BigIntStatsPrototype__isFile_(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_CUSTOM_SETTER(BigIntStatsPrototype__isSocketSetterWrap, (JSGlobalObject * lexicalGlobalObject, EncodedJSValue encodedThisValue, EncodedJSValue encodedValue, PropertyName attributeName)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
JSValue thisValue = JSValue::decode(encodedThisValue); | |
if (!thisValue.isObject()) { | |
return false; | |
} | |
JSObject *thisObject = asObject(thisValue); | |
thisObject->putDirect(vm, attributeName, JSValue::decode(encodedValue), 0); | |
return true; | |
} | |
JSC_DEFINE_HOST_FUNCTION(BigIntStatsPrototype__isSocketCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSBigIntStats* thisObject = jsDynamicCast<JSBigIntStats*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof BigIntStats"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = BigIntStatsPrototype__isSocket_(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "BigIntStats.isSocket_ returned an empty value without an exception"); | |
return result; | |
#endif | |
return BigIntStatsPrototype__isSocket_(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_CUSTOM_SETTER(BigIntStatsPrototype__isSymbolicLinkSetterWrap, (JSGlobalObject * lexicalGlobalObject, EncodedJSValue encodedThisValue, EncodedJSValue encodedValue, PropertyName attributeName)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
JSValue thisValue = JSValue::decode(encodedThisValue); | |
if (!thisValue.isObject()) { | |
return false; | |
} | |
JSObject *thisObject = asObject(thisValue); | |
thisObject->putDirect(vm, attributeName, JSValue::decode(encodedValue), 0); | |
return true; | |
} | |
JSC_DEFINE_HOST_FUNCTION(BigIntStatsPrototype__isSymbolicLinkCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSBigIntStats* thisObject = jsDynamicCast<JSBigIntStats*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof BigIntStats"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = BigIntStatsPrototype__isSymbolicLink_(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "BigIntStats.isSymbolicLink_ returned an empty value without an exception"); | |
return result; | |
#endif | |
return BigIntStatsPrototype__isSymbolicLink_(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_CUSTOM_GETTER(BigIntStatsPrototype__modeGetterWrap, (JSGlobalObject * lexicalGlobalObject, EncodedJSValue encodedThisValue, PropertyName attributeName)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
Zig::GlobalObject *globalObject = reinterpret_cast<Zig::GlobalObject*>(lexicalGlobalObject); | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
JSBigIntStats* thisObject = jsDynamicCast<JSBigIntStats*>(JSValue::decode(encodedThisValue)); | |
if (UNLIKELY(!thisObject)) { | |
return JSValue::encode(jsUndefined()); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
JSC::EncodedJSValue result = BigIntStatsPrototype__mode(thisObject->wrapped(), globalObject); | |
RETURN_IF_EXCEPTION(throwScope, {}); | |
RELEASE_AND_RETURN(throwScope, result); | |
} | |
JSC_DEFINE_CUSTOM_SETTER(BigIntStatsPrototype__modeSetterWrap, (JSGlobalObject * lexicalGlobalObject, EncodedJSValue encodedThisValue, EncodedJSValue encodedValue, PropertyName attributeName)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
JSValue thisValue = JSValue::decode(encodedThisValue); | |
if (!thisValue.isObject()) { | |
return false; | |
} | |
JSObject *thisObject = asObject(thisValue); | |
thisObject->putDirect(vm, attributeName, JSValue::decode(encodedValue), 0); | |
return true; | |
} | |
JSC_DEFINE_CUSTOM_GETTER(BigIntStatsPrototype__mtimeGetterWrap, (JSGlobalObject * globalObject, EncodedJSValue encodedThisValue, PropertyName attributeName)) | |
{ | |
auto& vm = globalObject->vm(); | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
JSBigIntStats* thisObject = jsDynamicCast<JSBigIntStats*>(JSValue::decode(encodedThisValue)); | |
if (UNLIKELY(!thisObject)) { | |
return JSValue::encode(jsUndefined()); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
if (JSValue cachedValue = thisObject->m_mtime.get()) | |
return JSValue::encode(cachedValue); | |
JSC::JSValue result = JSC::JSValue::decode( | |
BigIntStatsPrototype__mtime(thisObject->wrapped(), globalObject) | |
); | |
RETURN_IF_EXCEPTION(throwScope, {}); | |
thisObject->m_mtime.set(vm, thisObject, result); | |
RELEASE_AND_RETURN(throwScope, JSValue::encode(result)); | |
} | |
extern JSC_CALLCONV void BigIntStatsPrototype__mtimeSetCachedValue(JSC::EncodedJSValue thisValue, JSC::JSGlobalObject *globalObject, JSC::EncodedJSValue value) | |
{ | |
auto& vm = globalObject->vm(); | |
auto* thisObject = jsCast<JSBigIntStats*>(JSValue::decode(thisValue)); | |
thisObject->m_mtime.set(vm, thisObject, JSValue::decode(value)); | |
} | |
extern JSC_CALLCONV JSC::EncodedJSValue BigIntStatsPrototype__mtimeGetCachedValue(JSC::EncodedJSValue thisValue) | |
{ | |
auto* thisObject = jsCast<JSBigIntStats*>(JSValue::decode(thisValue)); | |
return JSValue::encode(thisObject->m_mtime.get()); | |
} | |
JSC_DEFINE_CUSTOM_SETTER(BigIntStatsPrototype__mtimeSetterWrap, (JSGlobalObject * lexicalGlobalObject, EncodedJSValue encodedThisValue, EncodedJSValue encodedValue, PropertyName attributeName)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
JSValue thisValue = JSValue::decode(encodedThisValue); | |
if (!thisValue.isObject()) { | |
return false; | |
} | |
JSObject *thisObject = asObject(thisValue); | |
thisObject->putDirect(vm, attributeName, JSValue::decode(encodedValue), 0); | |
return true; | |
} | |
JSC_DEFINE_CUSTOM_GETTER(BigIntStatsPrototype__mtimeMsGetterWrap, (JSGlobalObject * lexicalGlobalObject, EncodedJSValue encodedThisValue, PropertyName attributeName)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
Zig::GlobalObject *globalObject = reinterpret_cast<Zig::GlobalObject*>(lexicalGlobalObject); | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
JSBigIntStats* thisObject = jsDynamicCast<JSBigIntStats*>(JSValue::decode(encodedThisValue)); | |
if (UNLIKELY(!thisObject)) { | |
return JSValue::encode(jsUndefined()); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
JSC::EncodedJSValue result = BigIntStatsPrototype__mtimeMs(thisObject->wrapped(), globalObject); | |
RETURN_IF_EXCEPTION(throwScope, {}); | |
RELEASE_AND_RETURN(throwScope, result); | |
} | |
JSC_DEFINE_CUSTOM_SETTER(BigIntStatsPrototype__mtimeMsSetterWrap, (JSGlobalObject * lexicalGlobalObject, EncodedJSValue encodedThisValue, EncodedJSValue encodedValue, PropertyName attributeName)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
JSValue thisValue = JSValue::decode(encodedThisValue); | |
if (!thisValue.isObject()) { | |
return false; | |
} | |
JSObject *thisObject = asObject(thisValue); | |
thisObject->putDirect(vm, attributeName, JSValue::decode(encodedValue), 0); | |
return true; | |
} | |
JSC_DEFINE_CUSTOM_GETTER(BigIntStatsPrototype__mtimeNsGetterWrap, (JSGlobalObject * lexicalGlobalObject, EncodedJSValue encodedThisValue, PropertyName attributeName)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
Zig::GlobalObject *globalObject = reinterpret_cast<Zig::GlobalObject*>(lexicalGlobalObject); | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
JSBigIntStats* thisObject = jsDynamicCast<JSBigIntStats*>(JSValue::decode(encodedThisValue)); | |
if (UNLIKELY(!thisObject)) { | |
return JSValue::encode(jsUndefined()); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
JSC::EncodedJSValue result = BigIntStatsPrototype__mtimeNs(thisObject->wrapped(), globalObject); | |
RETURN_IF_EXCEPTION(throwScope, {}); | |
RELEASE_AND_RETURN(throwScope, result); | |
} | |
JSC_DEFINE_CUSTOM_SETTER(BigIntStatsPrototype__mtimeNsSetterWrap, (JSGlobalObject * lexicalGlobalObject, EncodedJSValue encodedThisValue, EncodedJSValue encodedValue, PropertyName attributeName)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
JSValue thisValue = JSValue::decode(encodedThisValue); | |
if (!thisValue.isObject()) { | |
return false; | |
} | |
JSObject *thisObject = asObject(thisValue); | |
thisObject->putDirect(vm, attributeName, JSValue::decode(encodedValue), 0); | |
return true; | |
} | |
JSC_DEFINE_CUSTOM_GETTER(BigIntStatsPrototype__nlinkGetterWrap, (JSGlobalObject * lexicalGlobalObject, EncodedJSValue encodedThisValue, PropertyName attributeName)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
Zig::GlobalObject *globalObject = reinterpret_cast<Zig::GlobalObject*>(lexicalGlobalObject); | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
JSBigIntStats* thisObject = jsDynamicCast<JSBigIntStats*>(JSValue::decode(encodedThisValue)); | |
if (UNLIKELY(!thisObject)) { | |
return JSValue::encode(jsUndefined()); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
JSC::EncodedJSValue result = BigIntStatsPrototype__nlink(thisObject->wrapped(), globalObject); | |
RETURN_IF_EXCEPTION(throwScope, {}); | |
RELEASE_AND_RETURN(throwScope, result); | |
} | |
JSC_DEFINE_CUSTOM_SETTER(BigIntStatsPrototype__nlinkSetterWrap, (JSGlobalObject * lexicalGlobalObject, EncodedJSValue encodedThisValue, EncodedJSValue encodedValue, PropertyName attributeName)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
JSValue thisValue = JSValue::decode(encodedThisValue); | |
if (!thisValue.isObject()) { | |
return false; | |
} | |
JSObject *thisObject = asObject(thisValue); | |
thisObject->putDirect(vm, attributeName, JSValue::decode(encodedValue), 0); | |
return true; | |
} | |
JSC_DEFINE_CUSTOM_GETTER(BigIntStatsPrototype__rdevGetterWrap, (JSGlobalObject * lexicalGlobalObject, EncodedJSValue encodedThisValue, PropertyName attributeName)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
Zig::GlobalObject *globalObject = reinterpret_cast<Zig::GlobalObject*>(lexicalGlobalObject); | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
JSBigIntStats* thisObject = jsDynamicCast<JSBigIntStats*>(JSValue::decode(encodedThisValue)); | |
if (UNLIKELY(!thisObject)) { | |
return JSValue::encode(jsUndefined()); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
JSC::EncodedJSValue result = BigIntStatsPrototype__rdev(thisObject->wrapped(), globalObject); | |
RETURN_IF_EXCEPTION(throwScope, {}); | |
RELEASE_AND_RETURN(throwScope, result); | |
} | |
JSC_DEFINE_CUSTOM_SETTER(BigIntStatsPrototype__rdevSetterWrap, (JSGlobalObject * lexicalGlobalObject, EncodedJSValue encodedThisValue, EncodedJSValue encodedValue, PropertyName attributeName)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
JSValue thisValue = JSValue::decode(encodedThisValue); | |
if (!thisValue.isObject()) { | |
return false; | |
} | |
JSObject *thisObject = asObject(thisValue); | |
thisObject->putDirect(vm, attributeName, JSValue::decode(encodedValue), 0); | |
return true; | |
} | |
JSC_DEFINE_CUSTOM_GETTER(BigIntStatsPrototype__sizeGetterWrap, (JSGlobalObject * lexicalGlobalObject, EncodedJSValue encodedThisValue, PropertyName attributeName)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
Zig::GlobalObject *globalObject = reinterpret_cast<Zig::GlobalObject*>(lexicalGlobalObject); | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
JSBigIntStats* thisObject = jsDynamicCast<JSBigIntStats*>(JSValue::decode(encodedThisValue)); | |
if (UNLIKELY(!thisObject)) { | |
return JSValue::encode(jsUndefined()); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
JSC::EncodedJSValue result = BigIntStatsPrototype__size(thisObject->wrapped(), globalObject); | |
RETURN_IF_EXCEPTION(throwScope, {}); | |
RELEASE_AND_RETURN(throwScope, result); | |
} | |
JSC_DEFINE_CUSTOM_SETTER(BigIntStatsPrototype__sizeSetterWrap, (JSGlobalObject * lexicalGlobalObject, EncodedJSValue encodedThisValue, EncodedJSValue encodedValue, PropertyName attributeName)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
JSValue thisValue = JSValue::decode(encodedThisValue); | |
if (!thisValue.isObject()) { | |
return false; | |
} | |
JSObject *thisObject = asObject(thisValue); | |
thisObject->putDirect(vm, attributeName, JSValue::decode(encodedValue), 0); | |
return true; | |
} | |
JSC_DEFINE_CUSTOM_GETTER(BigIntStatsPrototype__uidGetterWrap, (JSGlobalObject * lexicalGlobalObject, EncodedJSValue encodedThisValue, PropertyName attributeName)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
Zig::GlobalObject *globalObject = reinterpret_cast<Zig::GlobalObject*>(lexicalGlobalObject); | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
JSBigIntStats* thisObject = jsDynamicCast<JSBigIntStats*>(JSValue::decode(encodedThisValue)); | |
if (UNLIKELY(!thisObject)) { | |
return JSValue::encode(jsUndefined()); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
JSC::EncodedJSValue result = BigIntStatsPrototype__uid(thisObject->wrapped(), globalObject); | |
RETURN_IF_EXCEPTION(throwScope, {}); | |
RELEASE_AND_RETURN(throwScope, result); | |
} | |
JSC_DEFINE_CUSTOM_SETTER(BigIntStatsPrototype__uidSetterWrap, (JSGlobalObject * lexicalGlobalObject, EncodedJSValue encodedThisValue, EncodedJSValue encodedValue, PropertyName attributeName)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
JSValue thisValue = JSValue::decode(encodedThisValue); | |
if (!thisValue.isObject()) { | |
return false; | |
} | |
JSObject *thisObject = asObject(thisValue); | |
thisObject->putDirect(vm, attributeName, JSValue::decode(encodedValue), 0); | |
return true; | |
} | |
void JSBigIntStatsPrototype::finishCreation(JSC::VM& vm, JSC::JSGlobalObject* globalObject) | |
{ | |
Base::finishCreation(vm); | |
reifyStaticProperties(vm, JSBigIntStats::info(), JSBigIntStatsPrototypeTableValues, *this); | |
JSC_TO_STRING_TAG_WITHOUT_TRANSITION(); | |
} | |
void JSBigIntStatsConstructor::finishCreation(VM& vm, JSC::JSGlobalObject* globalObject, JSBigIntStatsPrototype* prototype) | |
{ | |
Base::finishCreation(vm, 0, "BigIntStats"_s, PropertyAdditionMode::WithoutStructureTransition); | |
putDirectWithoutTransition(vm, vm.propertyNames->prototype, prototype, PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly); | |
ASSERT(inherits(info())); | |
} | |
JSBigIntStatsConstructor::JSBigIntStatsConstructor(JSC::VM& vm, JSC::Structure* structure) : Base(vm, structure, call, construct) { | |
} | |
JSBigIntStatsConstructor* JSBigIntStatsConstructor::create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure, JSBigIntStatsPrototype* prototype) { | |
JSBigIntStatsConstructor* ptr = new (NotNull, JSC::allocateCell<JSBigIntStatsConstructor>(vm)) JSBigIntStatsConstructor(vm, structure); | |
ptr->finishCreation(vm, globalObject, prototype); | |
return ptr; | |
} | |
JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES JSBigIntStatsConstructor::call(JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame) | |
{ | |
Zig::GlobalObject *globalObject = reinterpret_cast<Zig::GlobalObject*>(lexicalGlobalObject); | |
JSC::VM &vm = globalObject->vm(); | |
auto scope = DECLARE_THROW_SCOPE(vm); | |
void* ptr = BigIntStatsClass__construct(globalObject, callFrame); | |
if (UNLIKELY(!ptr || scope.exception())) { | |
return JSValue::encode(JSC::jsUndefined()); | |
} | |
Structure* structure = globalObject->JSBigIntStatsStructure(); | |
JSBigIntStats* instance = JSBigIntStats::create(vm, globalObject, structure, ptr); | |
RETURN_IF_EXCEPTION(scope, {}); | |
RELEASE_AND_RETURN(scope, JSValue::encode(instance)); | |
} | |
JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES JSBigIntStatsConstructor::construct(JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame) | |
{ | |
Zig::GlobalObject *globalObject = reinterpret_cast<Zig::GlobalObject*>(lexicalGlobalObject); | |
JSC::VM &vm = globalObject->vm(); | |
auto scope = DECLARE_THROW_SCOPE(vm); | |
JSObject* newTarget = asObject(callFrame->newTarget()); | |
auto* constructor = globalObject->JSBigIntStatsConstructor(); | |
Structure* structure = globalObject->JSBigIntStatsStructure(); | |
if (UNLIKELY(constructor != newTarget)) { | |
auto* functionGlobalObject = reinterpret_cast<Zig::GlobalObject*>( | |
// ShadowRealm functions belong to a different global object. | |
getFunctionRealm(globalObject, newTarget) | |
); | |
RETURN_IF_EXCEPTION(scope, {}); | |
structure = InternalFunction::createSubclassStructure( | |
globalObject, | |
newTarget, | |
functionGlobalObject->JSBigIntStatsStructure() | |
); | |
} | |
void* ptr = BigIntStatsClass__construct(globalObject, callFrame); | |
if (UNLIKELY(!ptr || scope.exception())) { | |
return JSValue::encode(JSC::jsUndefined()); | |
} | |
JSBigIntStats* instance = JSBigIntStats::create(vm, globalObject, structure, ptr); | |
RELEASE_AND_RETURN(scope, JSValue::encode(instance)); | |
} | |
void JSBigIntStatsConstructor::initializeProperties(VM& vm, JSC::JSGlobalObject* globalObject, JSBigIntStatsPrototype* prototype) | |
{ | |
} | |
const ClassInfo JSBigIntStatsConstructor::s_info = { "Function"_s, &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSBigIntStatsConstructor) }; | |
extern JSC_CALLCONV JSC::EncodedJSValue BigIntStats__getConstructor(Zig::GlobalObject* globalObject) { | |
return JSValue::encode(globalObject->JSBigIntStatsConstructor()); | |
} | |
JSBigIntStats::~JSBigIntStats() | |
{ | |
if (LIKELY(m_ctx)) { | |
BigIntStatsClass__finalize(m_ctx); | |
} | |
} | |
void JSBigIntStats::destroy(JSCell* cell) | |
{ | |
static_cast<JSBigIntStats*>(cell)->JSBigIntStats::~JSBigIntStats(); | |
} | |
const ClassInfo JSBigIntStats::s_info = { "BigIntStats"_s, &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSBigIntStats) }; | |
void JSBigIntStats::finishCreation(VM& vm) | |
{ | |
Base::finishCreation(vm); | |
ASSERT(inherits(info())); | |
} | |
JSBigIntStats* JSBigIntStats::create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure, void* ctx) { | |
JSBigIntStats* ptr = new (NotNull, JSC::allocateCell<JSBigIntStats>(vm)) JSBigIntStats(vm, structure, ctx); | |
ptr->finishCreation(vm); | |
return ptr; | |
} | |
extern JSC_CALLCONV void* JSC_HOST_CALL_ATTRIBUTES BigIntStats__fromJS(JSC::EncodedJSValue value) { | |
JSC::JSValue decodedValue = JSC::JSValue::decode(value); | |
if (decodedValue.isEmpty() || !decodedValue.isCell()) | |
return nullptr; | |
JSC::JSCell* cell = decodedValue.asCell(); | |
JSBigIntStats* object = JSC::jsDynamicCast<JSBigIntStats*>(cell); | |
if (!object) | |
return nullptr; | |
return object->wrapped(); | |
} | |
extern JSC_CALLCONV void* JSC_HOST_CALL_ATTRIBUTES BigIntStats__fromJSDirect(JSC::EncodedJSValue value) { | |
JSC::JSValue decodedValue = JSC::JSValue::decode(value); | |
ASSERT(decodedValue.isCell()); | |
JSC::JSCell* cell = decodedValue.asCell(); | |
JSBigIntStats* object = JSC::jsDynamicCast<JSBigIntStats*>(cell); | |
if (!object) | |
return nullptr; | |
Zig::GlobalObject* globalObject = jsDynamicCast<Zig::GlobalObject*>(object->globalObject()); | |
if (UNLIKELY(globalObject == nullptr || cell->structureID() != globalObject->JSBigIntStatsStructure()->id())) { | |
return nullptr; | |
} | |
return object->wrapped(); | |
} | |
extern JSC_CALLCONV bool JSC_HOST_CALL_ATTRIBUTES BigIntStats__dangerouslySetPtr(JSC::EncodedJSValue value, void* ptr) { | |
JSBigIntStats* object = JSC::jsDynamicCast<JSBigIntStats*>(JSValue::decode(value)); | |
if (!object) | |
return false; | |
object->m_ctx = ptr; | |
return true; | |
} | |
extern "C" const size_t BigIntStats__ptrOffset = JSBigIntStats::offsetOfWrapped(); | |
void JSBigIntStats::analyzeHeap(JSCell* cell, HeapAnalyzer& analyzer) | |
{ | |
auto* thisObject = jsCast<JSBigIntStats*>(cell); | |
if (void* wrapped = thisObject->wrapped()) { | |
// if (thisObject->scriptExecutionContext()) | |
// analyzer.setLabelForCell(cell, makeString("url ", thisObject->scriptExecutionContext()->url().string())); | |
} | |
Base::analyzeHeap(cell, analyzer); | |
} | |
JSObject* JSBigIntStats::createConstructor(VM& vm, JSGlobalObject* globalObject, JSValue prototype) | |
{ | |
return WebCore::JSBigIntStatsConstructor::create(vm, globalObject, WebCore::JSBigIntStatsConstructor::createStructure(vm, globalObject, globalObject->functionPrototype()), jsCast<WebCore::JSBigIntStatsPrototype*>(prototype)); | |
} | |
JSObject* JSBigIntStats::getConstructor(Zig::GlobalObject* globalObject) | |
{ | |
return globalObject->JSBigIntStatsConstructor(); | |
} | |
JSObject* JSBigIntStats::createPrototype(VM& vm, JSDOMGlobalObject* globalObject) | |
{ | |
auto *structure = JSBigIntStatsPrototype::createStructure(vm, globalObject, globalObject->objectPrototype()); | |
structure->setMayBePrototype(true); | |
return JSBigIntStatsPrototype::create(vm, globalObject, structure); | |
} | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES BigIntStats__create(Zig::GlobalObject* globalObject, void* ptr) { | |
auto &vm = globalObject->vm(); | |
JSC::Structure* structure = globalObject->JSBigIntStatsStructure(); | |
JSBigIntStats* instance = JSBigIntStats::create(vm, globalObject, structure, ptr); | |
return JSValue::encode(instance); | |
} | |
template<typename Visitor> | |
void JSBigIntStats::visitChildrenImpl(JSCell* cell, Visitor& visitor) | |
{ | |
JSBigIntStats* thisObject = jsCast<JSBigIntStats*>(cell); | |
ASSERT_GC_OBJECT_INHERITS(thisObject, info()); | |
Base::visitChildren(thisObject, visitor); | |
thisObject->visitAdditionalChildren<Visitor>(visitor); | |
} | |
DEFINE_VISIT_CHILDREN(JSBigIntStats); | |
template<typename Visitor> | |
void JSBigIntStats::visitAdditionalChildren(Visitor& visitor) | |
{ | |
JSBigIntStats* thisObject = this; | |
ASSERT_GC_OBJECT_INHERITS(thisObject, info()); | |
visitor.append(thisObject->m_atime); | |
visitor.append(thisObject->m_birthtime); | |
visitor.append(thisObject->m_ctime); | |
visitor.append(thisObject->m_mtime); | |
} | |
DEFINE_VISIT_ADDITIONAL_CHILDREN(JSBigIntStats); | |
template<typename Visitor> | |
void JSBigIntStats::visitOutputConstraintsImpl(JSCell *cell, Visitor& visitor) | |
{ | |
JSBigIntStats* thisObject = jsCast<JSBigIntStats*>(cell); | |
ASSERT_GC_OBJECT_INHERITS(thisObject, info()); | |
thisObject->visitAdditionalChildren<Visitor>(visitor); | |
} | |
DEFINE_VISIT_OUTPUT_CONSTRAINTS(JSBigIntStats); | |
class JSBlobPrototype final : public JSC::JSNonFinalObject { | |
public: | |
using Base = JSC::JSNonFinalObject; | |
static JSBlobPrototype* create(JSC::VM& vm, JSGlobalObject* globalObject, JSC::Structure* structure) | |
{ | |
JSBlobPrototype* ptr = new (NotNull, JSC::allocateCell<JSBlobPrototype>(vm)) JSBlobPrototype(vm, globalObject, structure); | |
ptr->finishCreation(vm, globalObject); | |
return ptr; | |
} | |
DECLARE_INFO; | |
template<typename CellType, JSC::SubspaceAccess> | |
static JSC::GCClient::IsoSubspace* subspaceFor(JSC::VM& vm) | |
{ | |
STATIC_ASSERT_ISO_SUBSPACE_SHARABLE(JSBlobPrototype, Base); | |
return &vm.plainObjectSpace(); | |
} | |
static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype) | |
{ | |
return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info()); | |
} | |
private: | |
JSBlobPrototype(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure) | |
: Base(vm, structure) | |
{ | |
} | |
void finishCreation(JSC::VM&, JSC::JSGlobalObject*); | |
}; | |
class JSBlobConstructor final : public JSC::InternalFunction { | |
public: | |
using Base = JSC::InternalFunction; | |
static JSBlobConstructor* create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure, JSBlobPrototype* prototype); | |
static constexpr unsigned StructureFlags = Base::StructureFlags; | |
static constexpr bool needsDestruction = false; | |
static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype) | |
{ | |
return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::InternalFunctionType, StructureFlags), info()); | |
} | |
template<typename, JSC::SubspaceAccess mode> static JSC::GCClient::IsoSubspace* subspaceFor(JSC::VM& vm) | |
{ | |
if constexpr (mode == JSC::SubspaceAccess::Concurrently) | |
return nullptr; | |
return WebCore::subspaceForImpl<JSBlobConstructor, WebCore::UseCustomHeapCellType::No>( | |
vm, | |
[](auto& spaces) { return spaces.m_clientSubspaceForBunClassConstructor.get(); }, | |
[](auto& spaces, auto&& space) { spaces.m_clientSubspaceForBunClassConstructor = std::forward<decltype(space)>(space); }, | |
[](auto& spaces) { return spaces.m_subspaceForBunClassConstructor.get(); }, | |
[](auto& spaces, auto&& space) { spaces.m_subspaceForBunClassConstructor = std::forward<decltype(space)>(space); }); | |
} | |
void initializeProperties(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSBlobPrototype* prototype); | |
// Must be defined for each specialization class. | |
static JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES construct(JSC::JSGlobalObject*, JSC::CallFrame*); | |
static JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES call(JSC::JSGlobalObject*, JSC::CallFrame*); | |
DECLARE_EXPORT_INFO; | |
private: | |
JSBlobConstructor(JSC::VM& vm, JSC::Structure* structure); | |
void finishCreation(JSC::VM&, JSC::JSGlobalObject* globalObject, JSBlobPrototype* prototype); | |
}; | |
JSC_DECLARE_HOST_FUNCTION(BlobPrototype__arrayBufferCallback); | |
JSC_DECLARE_HOST_FUNCTION(BlobPrototype__bytesCallback); | |
JSC_DECLARE_HOST_FUNCTION(BlobPrototype__existsCallback); | |
JSC_DECLARE_HOST_FUNCTION(BlobPrototype__formDataCallback); | |
JSC_DECLARE_HOST_FUNCTION(BlobPrototype__jsonCallback); | |
JSC_DECLARE_CUSTOM_GETTER(BlobPrototype__lastModifiedGetterWrap); | |
JSC_DECLARE_CUSTOM_GETTER(BlobPrototype__nameGetterWrap); | |
static JSC_DECLARE_CUSTOM_SETTER(BlobPrototype__nameSetterWrap); | |
JSC_DECLARE_CUSTOM_GETTER(BlobPrototype__sizeGetterWrap); | |
JSC_DECLARE_HOST_FUNCTION(BlobPrototype__sliceCallback); | |
JSC_DECLARE_HOST_FUNCTION(BlobPrototype__streamCallback); | |
JSC_DECLARE_HOST_FUNCTION(BlobPrototype__textCallback); | |
JSC_DECLARE_CUSTOM_GETTER(BlobPrototype__typeGetterWrap); | |
JSC_DECLARE_HOST_FUNCTION(BlobPrototype__writerCallback); | |
STATIC_ASSERT_ISO_SUBSPACE_SHARABLE(JSBlobPrototype, JSBlobPrototype::Base); | |
static const HashTableValue JSBlobPrototypeTableValues[13] = { | |
{ "arrayBuffer"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, BlobPrototype__arrayBufferCallback, 0 } } , | |
{ "bytes"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, BlobPrototype__bytesCallback, 0 } } , | |
{ "exists"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, BlobPrototype__existsCallback, 0 } } , | |
{ "formData"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, BlobPrototype__formDataCallback, 0 } } , | |
{ "json"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, BlobPrototype__jsonCallback, 0 } } , | |
{ "lastModified"_s, static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::GetterSetterType, BlobPrototype__lastModifiedGetterWrap, 0 } } , | |
{ "name"_s, static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::GetterSetterType, BlobPrototype__nameGetterWrap, BlobPrototype__nameSetterWrap } } , | |
{ "size"_s, static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::GetterSetterType, BlobPrototype__sizeGetterWrap, 0 } } , | |
{ "slice"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, BlobPrototype__sliceCallback, 2 } } , | |
{ "stream"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, BlobPrototype__streamCallback, 1 } } , | |
{ "text"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, BlobPrototype__textCallback, 0 } } , | |
{ "type"_s, static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::GetterSetterType, BlobPrototype__typeGetterWrap, 0 } } , | |
{ "writer"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, BlobPrototype__writerCallback, 1 } } | |
}; | |
const ClassInfo JSBlobPrototype::s_info = { "Blob"_s, &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSBlobPrototype) }; | |
JSC_DEFINE_CUSTOM_GETTER(jsBlobConstructor, (JSGlobalObject * lexicalGlobalObject, EncodedJSValue thisValue, PropertyName)) | |
{ | |
VM& vm = JSC::getVM(lexicalGlobalObject); | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
auto* globalObject = reinterpret_cast<Zig::GlobalObject*>(lexicalGlobalObject); | |
auto* prototype = jsDynamicCast<JSBlobPrototype*>(JSValue::decode(thisValue)); | |
if (UNLIKELY(!prototype)) | |
return throwVMTypeError(lexicalGlobalObject, throwScope, "Cannot get constructor for Blob"_s); | |
return JSValue::encode(globalObject->JSBlobConstructor()); | |
} | |
JSC_DEFINE_HOST_FUNCTION(BlobPrototype__arrayBufferCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSBlob* thisObject = jsDynamicCast<JSBlob*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof Blob"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = BlobPrototype__getArrayBuffer(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "Blob.getArrayBuffer returned an empty value without an exception"); | |
return result; | |
#endif | |
return BlobPrototype__getArrayBuffer(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_HOST_FUNCTION(BlobPrototype__bytesCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSBlob* thisObject = jsDynamicCast<JSBlob*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof Blob"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = BlobPrototype__getBytes(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "Blob.getBytes returned an empty value without an exception"); | |
return result; | |
#endif | |
return BlobPrototype__getBytes(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_HOST_FUNCTION(BlobPrototype__existsCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSBlob* thisObject = jsDynamicCast<JSBlob*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof Blob"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = BlobPrototype__getExists(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "Blob.getExists returned an empty value without an exception"); | |
return result; | |
#endif | |
return BlobPrototype__getExists(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_HOST_FUNCTION(BlobPrototype__formDataCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSBlob* thisObject = jsDynamicCast<JSBlob*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof Blob"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = BlobPrototype__getFormData(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "Blob.getFormData returned an empty value without an exception"); | |
return result; | |
#endif | |
return BlobPrototype__getFormData(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_HOST_FUNCTION(BlobPrototype__jsonCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSBlob* thisObject = jsDynamicCast<JSBlob*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof Blob"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = BlobPrototype__getJSON(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "Blob.getJSON returned an empty value without an exception"); | |
return result; | |
#endif | |
return BlobPrototype__getJSON(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_CUSTOM_GETTER(BlobPrototype__lastModifiedGetterWrap, (JSGlobalObject * lexicalGlobalObject, EncodedJSValue encodedThisValue, PropertyName attributeName)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
Zig::GlobalObject *globalObject = reinterpret_cast<Zig::GlobalObject*>(lexicalGlobalObject); | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
JSBlob* thisObject = jsCast<JSBlob*>(JSValue::decode(encodedThisValue)); | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
JSC::EncodedJSValue result = BlobPrototype__getLastModified(thisObject->wrapped(), globalObject); | |
RETURN_IF_EXCEPTION(throwScope, {}); | |
RELEASE_AND_RETURN(throwScope, result); | |
} | |
JSC_DEFINE_CUSTOM_GETTER(BlobPrototype__nameGetterWrap, (JSGlobalObject * lexicalGlobalObject, EncodedJSValue encodedThisValue, PropertyName attributeName)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
Zig::GlobalObject *globalObject = reinterpret_cast<Zig::GlobalObject*>(lexicalGlobalObject); | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
JSBlob* thisObject = jsCast<JSBlob*>(JSValue::decode(encodedThisValue)); | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
if (JSValue cachedValue = thisObject->m_name.get()) | |
return JSValue::encode(cachedValue); | |
JSC::JSValue result = JSC::JSValue::decode( | |
BlobPrototype__getName(thisObject->wrapped(), encodedThisValue, globalObject) | |
); | |
RETURN_IF_EXCEPTION(throwScope, {}); | |
thisObject->m_name.set(vm, thisObject, result); | |
RELEASE_AND_RETURN(throwScope, JSValue::encode(result)); | |
} | |
extern JSC_CALLCONV void BlobPrototype__nameSetCachedValue(JSC::EncodedJSValue thisValue, JSC::JSGlobalObject *globalObject, JSC::EncodedJSValue value) | |
{ | |
auto& vm = globalObject->vm(); | |
auto* thisObject = jsCast<JSBlob*>(JSValue::decode(thisValue)); | |
thisObject->m_name.set(vm, thisObject, JSValue::decode(value)); | |
} | |
extern JSC_CALLCONV JSC::EncodedJSValue BlobPrototype__nameGetCachedValue(JSC::EncodedJSValue thisValue) | |
{ | |
auto* thisObject = jsCast<JSBlob*>(JSValue::decode(thisValue)); | |
return JSValue::encode(thisObject->m_name.get()); | |
} | |
JSC_DEFINE_CUSTOM_SETTER(BlobPrototype__nameSetterWrap, (JSGlobalObject * lexicalGlobalObject, EncodedJSValue encodedThisValue, EncodedJSValue encodedValue, PropertyName attributeName)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
JSBlob* thisObject = jsCast<JSBlob*>(JSValue::decode(encodedThisValue)); | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
auto result = BlobPrototype__setName(thisObject->wrapped(), encodedThisValue, lexicalGlobalObject, encodedValue); | |
RELEASE_AND_RETURN(throwScope, result); | |
} | |
JSC_DEFINE_CUSTOM_GETTER(BlobPrototype__sizeGetterWrap, (JSGlobalObject * lexicalGlobalObject, EncodedJSValue encodedThisValue, PropertyName attributeName)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
Zig::GlobalObject *globalObject = reinterpret_cast<Zig::GlobalObject*>(lexicalGlobalObject); | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
JSBlob* thisObject = jsCast<JSBlob*>(JSValue::decode(encodedThisValue)); | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
JSC::EncodedJSValue result = BlobPrototype__getSize(thisObject->wrapped(), globalObject); | |
RETURN_IF_EXCEPTION(throwScope, {}); | |
RELEASE_AND_RETURN(throwScope, result); | |
} | |
JSC_DEFINE_HOST_FUNCTION(BlobPrototype__sliceCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSBlob* thisObject = jsDynamicCast<JSBlob*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof Blob"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = BlobPrototype__getSlice(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "Blob.getSlice returned an empty value without an exception"); | |
return result; | |
#endif | |
return BlobPrototype__getSlice(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_HOST_FUNCTION(BlobPrototype__streamCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSBlob* thisObject = jsDynamicCast<JSBlob*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof Blob"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = BlobPrototype__getStream(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "Blob.getStream returned an empty value without an exception"); | |
return result; | |
#endif | |
return BlobPrototype__getStream(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_HOST_FUNCTION(BlobPrototype__textCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSBlob* thisObject = jsDynamicCast<JSBlob*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof Blob"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = BlobPrototype__getText(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "Blob.getText returned an empty value without an exception"); | |
return result; | |
#endif | |
return BlobPrototype__getText(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_CUSTOM_GETTER(BlobPrototype__typeGetterWrap, (JSGlobalObject * lexicalGlobalObject, EncodedJSValue encodedThisValue, PropertyName attributeName)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
Zig::GlobalObject *globalObject = reinterpret_cast<Zig::GlobalObject*>(lexicalGlobalObject); | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
JSBlob* thisObject = jsCast<JSBlob*>(JSValue::decode(encodedThisValue)); | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
JSC::EncodedJSValue result = BlobPrototype__getType(thisObject->wrapped(), globalObject); | |
RETURN_IF_EXCEPTION(throwScope, {}); | |
RELEASE_AND_RETURN(throwScope, result); | |
} | |
JSC_DEFINE_HOST_FUNCTION(BlobPrototype__writerCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSBlob* thisObject = jsDynamicCast<JSBlob*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof Blob"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = BlobPrototype__getWriter(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "Blob.getWriter returned an empty value without an exception"); | |
return result; | |
#endif | |
return BlobPrototype__getWriter(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
extern JSC_CALLCONV void BlobPrototype__streamSetCachedValue(JSC::EncodedJSValue thisValue, JSC::JSGlobalObject *globalObject, JSC::EncodedJSValue value) | |
{ | |
auto& vm = globalObject->vm(); | |
auto* thisObject = jsCast<JSBlob*>(JSValue::decode(thisValue)); | |
thisObject->m_stream.set(vm, thisObject, JSValue::decode(value)); | |
} | |
extern JSC_CALLCONV JSC::EncodedJSValue BlobPrototype__streamGetCachedValue(JSC::EncodedJSValue thisValue) | |
{ | |
auto* thisObject = jsCast<JSBlob*>(JSValue::decode(thisValue)); | |
return JSValue::encode(thisObject->m_stream.get()); | |
} | |
void JSBlobPrototype::finishCreation(JSC::VM& vm, JSC::JSGlobalObject* globalObject) | |
{ | |
Base::finishCreation(vm); | |
reifyStaticProperties(vm, JSBlob::info(), JSBlobPrototypeTableValues, *this); | |
JSC_TO_STRING_TAG_WITHOUT_TRANSITION(); | |
} | |
void JSBlobConstructor::finishCreation(VM& vm, JSC::JSGlobalObject* globalObject, JSBlobPrototype* prototype) | |
{ | |
Base::finishCreation(vm, 0, "Blob"_s, PropertyAdditionMode::WithoutStructureTransition); | |
putDirectWithoutTransition(vm, vm.propertyNames->prototype, prototype, PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly); | |
ASSERT(inherits(info())); | |
} | |
JSBlobConstructor::JSBlobConstructor(JSC::VM& vm, JSC::Structure* structure) : Base(vm, structure, call, construct) { | |
} | |
JSBlobConstructor* JSBlobConstructor::create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure, JSBlobPrototype* prototype) { | |
JSBlobConstructor* ptr = new (NotNull, JSC::allocateCell<JSBlobConstructor>(vm)) JSBlobConstructor(vm, structure); | |
ptr->finishCreation(vm, globalObject, prototype); | |
return ptr; | |
} | |
JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES JSBlobConstructor::call(JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame) | |
{ | |
Zig::GlobalObject *globalObject = reinterpret_cast<Zig::GlobalObject*>(lexicalGlobalObject); | |
JSC::VM &vm = globalObject->vm(); | |
auto scope = DECLARE_THROW_SCOPE(vm); | |
void* ptr = BlobClass__construct(globalObject, callFrame); | |
if (UNLIKELY(!ptr || scope.exception())) { | |
return JSValue::encode(JSC::jsUndefined()); | |
} | |
Structure* structure = globalObject->JSBlobStructure(); | |
JSBlob* instance = JSBlob::create(vm, globalObject, structure, ptr); | |
RETURN_IF_EXCEPTION(scope, {}); | |
auto size = Blob__estimatedSize(ptr); | |
vm.heap.reportExtraMemoryAllocated(instance, size); | |
RELEASE_AND_RETURN(scope, JSValue::encode(instance)); | |
} | |
JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES JSBlobConstructor::construct(JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame) | |
{ | |
Zig::GlobalObject *globalObject = reinterpret_cast<Zig::GlobalObject*>(lexicalGlobalObject); | |
JSC::VM &vm = globalObject->vm(); | |
auto scope = DECLARE_THROW_SCOPE(vm); | |
JSObject* newTarget = asObject(callFrame->newTarget()); | |
auto* constructor = globalObject->JSBlobConstructor(); | |
Structure* structure = globalObject->JSBlobStructure(); | |
if (UNLIKELY(constructor != newTarget)) { | |
auto* functionGlobalObject = reinterpret_cast<Zig::GlobalObject*>( | |
// ShadowRealm functions belong to a different global object. | |
getFunctionRealm(globalObject, newTarget) | |
); | |
RETURN_IF_EXCEPTION(scope, {}); | |
structure = InternalFunction::createSubclassStructure( | |
globalObject, | |
newTarget, | |
functionGlobalObject->JSBlobStructure() | |
); | |
} | |
void* ptr = BlobClass__construct(globalObject, callFrame); | |
if (UNLIKELY(!ptr || scope.exception())) { | |
return JSValue::encode(JSC::jsUndefined()); | |
} | |
JSBlob* instance = JSBlob::create(vm, globalObject, structure, ptr); | |
auto size = Blob__estimatedSize(ptr); | |
vm.heap.reportExtraMemoryAllocated(instance, size); | |
RELEASE_AND_RETURN(scope, JSValue::encode(instance)); | |
} | |
void JSBlobConstructor::initializeProperties(VM& vm, JSC::JSGlobalObject* globalObject, JSBlobPrototype* prototype) | |
{ | |
} | |
const ClassInfo JSBlobConstructor::s_info = { "Function"_s, &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSBlobConstructor) }; | |
extern JSC_CALLCONV JSC::EncodedJSValue Blob__getConstructor(Zig::GlobalObject* globalObject) { | |
return JSValue::encode(globalObject->JSBlobConstructor()); | |
} | |
JSBlob::~JSBlob() | |
{ | |
if (LIKELY(m_ctx)) { | |
BlobClass__finalize(m_ctx); | |
} | |
} | |
void JSBlob::destroy(JSCell* cell) | |
{ | |
static_cast<JSBlob*>(cell)->JSBlob::~JSBlob(); | |
} | |
const ClassInfo JSBlob::s_info = { "Blob"_s, &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSBlob) }; | |
void JSBlob::finishCreation(VM& vm) | |
{ | |
Base::finishCreation(vm); | |
ASSERT(inherits(info())); | |
} | |
JSBlob* JSBlob::create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure, void* ctx) { | |
JSBlob* ptr = new (NotNull, JSC::allocateCell<JSBlob>(vm)) JSBlob(vm, structure, ctx); | |
ptr->finishCreation(vm); | |
return ptr; | |
} | |
extern JSC_CALLCONV void* JSC_HOST_CALL_ATTRIBUTES Blob__fromJS(JSC::EncodedJSValue value) { | |
JSC::JSValue decodedValue = JSC::JSValue::decode(value); | |
if (decodedValue.isEmpty() || !decodedValue.isCell()) | |
return nullptr; | |
JSC::JSCell* cell = decodedValue.asCell(); | |
JSBlob* object = JSC::jsDynamicCast<JSBlob*>(cell); | |
if (!object) | |
return nullptr; | |
return object->wrapped(); | |
} | |
extern JSC_CALLCONV void* JSC_HOST_CALL_ATTRIBUTES Blob__fromJSDirect(JSC::EncodedJSValue value) { | |
JSC::JSValue decodedValue = JSC::JSValue::decode(value); | |
ASSERT(decodedValue.isCell()); | |
JSC::JSCell* cell = decodedValue.asCell(); | |
JSBlob* object = JSC::jsDynamicCast<JSBlob*>(cell); | |
if (!object) | |
return nullptr; | |
Zig::GlobalObject* globalObject = jsDynamicCast<Zig::GlobalObject*>(object->globalObject()); | |
if (UNLIKELY(globalObject == nullptr || cell->structureID() != globalObject->JSBlobStructure()->id())) { | |
return nullptr; | |
} | |
return object->wrapped(); | |
} | |
extern JSC_CALLCONV bool JSC_HOST_CALL_ATTRIBUTES Blob__dangerouslySetPtr(JSC::EncodedJSValue value, void* ptr) { | |
JSBlob* object = JSC::jsDynamicCast<JSBlob*>(JSValue::decode(value)); | |
if (!object) | |
return false; | |
object->m_ctx = ptr; | |
return true; | |
} | |
extern "C" const size_t Blob__ptrOffset = JSBlob::offsetOfWrapped(); | |
void JSBlob::analyzeHeap(JSCell* cell, HeapAnalyzer& analyzer) | |
{ | |
auto* thisObject = jsCast<JSBlob*>(cell); | |
if (void* wrapped = thisObject->wrapped()) { | |
// if (thisObject->scriptExecutionContext()) | |
// analyzer.setLabelForCell(cell, makeString("url ", thisObject->scriptExecutionContext()->url().string())); | |
} | |
Base::analyzeHeap(cell, analyzer); | |
} | |
JSObject* JSBlob::createConstructor(VM& vm, JSGlobalObject* globalObject, JSValue prototype) | |
{ | |
return WebCore::JSBlobConstructor::create(vm, globalObject, WebCore::JSBlobConstructor::createStructure(vm, globalObject, globalObject->functionPrototype()), jsCast<WebCore::JSBlobPrototype*>(prototype)); | |
} | |
JSObject* JSBlob::getConstructor(Zig::GlobalObject* globalObject) | |
{ | |
return globalObject->JSBlobConstructor(); | |
} | |
JSObject* JSBlob::createPrototype(VM& vm, JSDOMGlobalObject* globalObject) | |
{ | |
auto *structure = JSBlobPrototype::createStructure(vm, globalObject, globalObject->objectPrototype()); | |
structure->setMayBePrototype(true); | |
return JSBlobPrototype::create(vm, globalObject, structure); | |
} | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES Blob__create(Zig::GlobalObject* globalObject, void* ptr) { | |
auto &vm = globalObject->vm(); | |
JSC::Structure* structure = globalObject->JSBlobStructure(); | |
JSBlob* instance = JSBlob::create(vm, globalObject, structure, ptr); | |
auto size = Blob__estimatedSize(ptr); | |
vm.heap.reportExtraMemoryAllocated(instance, size); | |
return JSValue::encode(instance); | |
} | |
template<typename Visitor> | |
void JSBlob::visitChildrenImpl(JSCell* cell, Visitor& visitor) | |
{ | |
JSBlob* thisObject = jsCast<JSBlob*>(cell); | |
ASSERT_GC_OBJECT_INHERITS(thisObject, info()); | |
Base::visitChildren(thisObject, visitor); | |
if (auto* ptr = thisObject->wrapped()) { | |
auto size = Blob__estimatedSize(ptr); | |
visitor.reportExtraMemoryVisited(size); | |
} | |
thisObject->visitAdditionalChildren<Visitor>(visitor); | |
} | |
DEFINE_VISIT_CHILDREN(JSBlob); | |
template<typename Visitor> | |
void JSBlob::visitAdditionalChildren(Visitor& visitor) | |
{ | |
JSBlob* thisObject = this; | |
ASSERT_GC_OBJECT_INHERITS(thisObject, info()); | |
visitor.append(thisObject->m_stream); | |
visitor.append(thisObject->m_name); | |
} | |
DEFINE_VISIT_ADDITIONAL_CHILDREN(JSBlob); | |
template<typename Visitor> | |
void JSBlob::visitOutputConstraintsImpl(JSCell *cell, Visitor& visitor) | |
{ | |
JSBlob* thisObject = jsCast<JSBlob*>(cell); | |
ASSERT_GC_OBJECT_INHERITS(thisObject, info()); | |
thisObject->visitAdditionalChildren<Visitor>(visitor); | |
} | |
DEFINE_VISIT_OUTPUT_CONSTRAINTS(JSBlob); | |
class JSBlobInternalReadableStreamSourcePrototype final : public JSC::JSNonFinalObject { | |
public: | |
using Base = JSC::JSNonFinalObject; | |
static JSBlobInternalReadableStreamSourcePrototype* create(JSC::VM& vm, JSGlobalObject* globalObject, JSC::Structure* structure) | |
{ | |
JSBlobInternalReadableStreamSourcePrototype* ptr = new (NotNull, JSC::allocateCell<JSBlobInternalReadableStreamSourcePrototype>(vm)) JSBlobInternalReadableStreamSourcePrototype(vm, globalObject, structure); | |
ptr->finishCreation(vm, globalObject); | |
return ptr; | |
} | |
DECLARE_INFO; | |
template<typename CellType, JSC::SubspaceAccess> | |
static JSC::GCClient::IsoSubspace* subspaceFor(JSC::VM& vm) | |
{ | |
STATIC_ASSERT_ISO_SUBSPACE_SHARABLE(JSBlobInternalReadableStreamSourcePrototype, Base); | |
return &vm.plainObjectSpace(); | |
} | |
static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype) | |
{ | |
return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info()); | |
} | |
private: | |
JSBlobInternalReadableStreamSourcePrototype(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure) | |
: Base(vm, structure) | |
{ | |
} | |
void finishCreation(JSC::VM&, JSC::JSGlobalObject*); | |
}; | |
JSC_DECLARE_HOST_FUNCTION(BlobInternalReadableStreamSourcePrototype__cancelCallback); | |
JSC_DECLARE_HOST_FUNCTION(BlobInternalReadableStreamSourcePrototype__drainCallback); | |
JSC_DECLARE_CUSTOM_GETTER(BlobInternalReadableStreamSourcePrototype__isClosedGetterWrap); | |
JSC_DECLARE_CUSTOM_GETTER(BlobInternalReadableStreamSourcePrototype__onCloseGetterWrap); | |
static JSC_DECLARE_CUSTOM_SETTER(BlobInternalReadableStreamSourcePrototype__onCloseSetterWrap); | |
JSC_DECLARE_CUSTOM_GETTER(BlobInternalReadableStreamSourcePrototype__onDrainGetterWrap); | |
static JSC_DECLARE_CUSTOM_SETTER(BlobInternalReadableStreamSourcePrototype__onDrainSetterWrap); | |
JSC_DECLARE_HOST_FUNCTION(BlobInternalReadableStreamSourcePrototype__pullCallback); | |
JSC_DECLARE_HOST_FUNCTION(BlobInternalReadableStreamSourcePrototype__startCallback); | |
JSC_DECLARE_HOST_FUNCTION(BlobInternalReadableStreamSourcePrototype__updateRefCallback); | |
STATIC_ASSERT_ISO_SUBSPACE_SHARABLE(JSBlobInternalReadableStreamSourcePrototype, JSBlobInternalReadableStreamSourcePrototype::Base); | |
static const HashTableValue JSBlobInternalReadableStreamSourcePrototypeTableValues[8] = { | |
{ "cancel"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, BlobInternalReadableStreamSourcePrototype__cancelCallback, 1 } } , | |
{ "drain"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, BlobInternalReadableStreamSourcePrototype__drainCallback, 1 } } , | |
{ "isClosed"_s, static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::GetterSetterType, BlobInternalReadableStreamSourcePrototype__isClosedGetterWrap, 0 } } , | |
{ "onClose"_s, static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::GetterSetterType, BlobInternalReadableStreamSourcePrototype__onCloseGetterWrap, BlobInternalReadableStreamSourcePrototype__onCloseSetterWrap } } , | |
{ "onDrain"_s, static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::GetterSetterType, BlobInternalReadableStreamSourcePrototype__onDrainGetterWrap, BlobInternalReadableStreamSourcePrototype__onDrainSetterWrap } } , | |
{ "pull"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, BlobInternalReadableStreamSourcePrototype__pullCallback, 1 } } , | |
{ "start"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, BlobInternalReadableStreamSourcePrototype__startCallback, 1 } } , | |
{ "updateRef"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, BlobInternalReadableStreamSourcePrototype__updateRefCallback, 1 } } | |
}; | |
const ClassInfo JSBlobInternalReadableStreamSourcePrototype::s_info = { "BlobInternalReadableStreamSource"_s, &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSBlobInternalReadableStreamSourcePrototype) }; | |
JSC_DEFINE_HOST_FUNCTION(BlobInternalReadableStreamSourcePrototype__cancelCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSBlobInternalReadableStreamSource* thisObject = jsDynamicCast<JSBlobInternalReadableStreamSource*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof BlobInternalReadableStreamSource"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = BlobInternalReadableStreamSourcePrototype__cancelFromJS(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "BlobInternalReadableStreamSource.cancelFromJS returned an empty value without an exception"); | |
return result; | |
#endif | |
return BlobInternalReadableStreamSourcePrototype__cancelFromJS(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_HOST_FUNCTION(BlobInternalReadableStreamSourcePrototype__drainCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSBlobInternalReadableStreamSource* thisObject = jsDynamicCast<JSBlobInternalReadableStreamSource*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof BlobInternalReadableStreamSource"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = BlobInternalReadableStreamSourcePrototype__drainFromJS(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "BlobInternalReadableStreamSource.drainFromJS returned an empty value without an exception"); | |
return result; | |
#endif | |
return BlobInternalReadableStreamSourcePrototype__drainFromJS(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_CUSTOM_GETTER(BlobInternalReadableStreamSourcePrototype__isClosedGetterWrap, (JSGlobalObject * lexicalGlobalObject, EncodedJSValue encodedThisValue, PropertyName attributeName)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
Zig::GlobalObject *globalObject = reinterpret_cast<Zig::GlobalObject*>(lexicalGlobalObject); | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
JSBlobInternalReadableStreamSource* thisObject = jsCast<JSBlobInternalReadableStreamSource*>(JSValue::decode(encodedThisValue)); | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
JSC::EncodedJSValue result = BlobInternalReadableStreamSourcePrototype__getIsClosedFromJS(thisObject->wrapped(), globalObject); | |
RETURN_IF_EXCEPTION(throwScope, {}); | |
RELEASE_AND_RETURN(throwScope, result); | |
} | |
JSC_DEFINE_CUSTOM_GETTER(BlobInternalReadableStreamSourcePrototype__onCloseGetterWrap, (JSGlobalObject * lexicalGlobalObject, EncodedJSValue encodedThisValue, PropertyName attributeName)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
Zig::GlobalObject *globalObject = reinterpret_cast<Zig::GlobalObject*>(lexicalGlobalObject); | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
JSBlobInternalReadableStreamSource* thisObject = jsCast<JSBlobInternalReadableStreamSource*>(JSValue::decode(encodedThisValue)); | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
JSC::EncodedJSValue result = BlobInternalReadableStreamSourcePrototype__getOnCloseFromJS(thisObject->wrapped(), globalObject); | |
RETURN_IF_EXCEPTION(throwScope, {}); | |
RELEASE_AND_RETURN(throwScope, result); | |
} | |
JSC_DEFINE_CUSTOM_SETTER(BlobInternalReadableStreamSourcePrototype__onCloseSetterWrap, (JSGlobalObject * lexicalGlobalObject, EncodedJSValue encodedThisValue, EncodedJSValue encodedValue, PropertyName attributeName)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
JSBlobInternalReadableStreamSource* thisObject = jsCast<JSBlobInternalReadableStreamSource*>(JSValue::decode(encodedThisValue)); | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
auto result = BlobInternalReadableStreamSourcePrototype__setOnCloseFromJS(thisObject->wrapped(), lexicalGlobalObject, encodedValue); | |
RELEASE_AND_RETURN(throwScope, result); | |
} | |
JSC_DEFINE_CUSTOM_GETTER(BlobInternalReadableStreamSourcePrototype__onDrainGetterWrap, (JSGlobalObject * lexicalGlobalObject, EncodedJSValue encodedThisValue, PropertyName attributeName)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
Zig::GlobalObject *globalObject = reinterpret_cast<Zig::GlobalObject*>(lexicalGlobalObject); | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
JSBlobInternalReadableStreamSource* thisObject = jsCast<JSBlobInternalReadableStreamSource*>(JSValue::decode(encodedThisValue)); | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
JSC::EncodedJSValue result = BlobInternalReadableStreamSourcePrototype__getOnDrainFromJS(thisObject->wrapped(), globalObject); | |
RETURN_IF_EXCEPTION(throwScope, {}); | |
RELEASE_AND_RETURN(throwScope, result); | |
} | |
JSC_DEFINE_CUSTOM_SETTER(BlobInternalReadableStreamSourcePrototype__onDrainSetterWrap, (JSGlobalObject * lexicalGlobalObject, EncodedJSValue encodedThisValue, EncodedJSValue encodedValue, PropertyName attributeName)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
JSBlobInternalReadableStreamSource* thisObject = jsCast<JSBlobInternalReadableStreamSource*>(JSValue::decode(encodedThisValue)); | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
auto result = BlobInternalReadableStreamSourcePrototype__setOnDrainFromJS(thisObject->wrapped(), lexicalGlobalObject, encodedValue); | |
RELEASE_AND_RETURN(throwScope, result); | |
} | |
JSC_DEFINE_HOST_FUNCTION(BlobInternalReadableStreamSourcePrototype__pullCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSBlobInternalReadableStreamSource* thisObject = jsDynamicCast<JSBlobInternalReadableStreamSource*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof BlobInternalReadableStreamSource"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = BlobInternalReadableStreamSourcePrototype__pullFromJS(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "BlobInternalReadableStreamSource.pullFromJS returned an empty value without an exception"); | |
return result; | |
#endif | |
return BlobInternalReadableStreamSourcePrototype__pullFromJS(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_HOST_FUNCTION(BlobInternalReadableStreamSourcePrototype__startCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSBlobInternalReadableStreamSource* thisObject = jsDynamicCast<JSBlobInternalReadableStreamSource*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof BlobInternalReadableStreamSource"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = BlobInternalReadableStreamSourcePrototype__startFromJS(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "BlobInternalReadableStreamSource.startFromJS returned an empty value without an exception"); | |
return result; | |
#endif | |
return BlobInternalReadableStreamSourcePrototype__startFromJS(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_HOST_FUNCTION(BlobInternalReadableStreamSourcePrototype__updateRefCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSBlobInternalReadableStreamSource* thisObject = jsDynamicCast<JSBlobInternalReadableStreamSource*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof BlobInternalReadableStreamSource"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = BlobInternalReadableStreamSourcePrototype__updateRefFromJS(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "BlobInternalReadableStreamSource.updateRefFromJS returned an empty value without an exception"); | |
return result; | |
#endif | |
return BlobInternalReadableStreamSourcePrototype__updateRefFromJS(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
extern JSC_CALLCONV void BlobInternalReadableStreamSourcePrototype__pendingPromiseSetCachedValue(JSC::EncodedJSValue thisValue, JSC::JSGlobalObject *globalObject, JSC::EncodedJSValue value) | |
{ | |
auto& vm = globalObject->vm(); | |
auto* thisObject = jsCast<JSBlobInternalReadableStreamSource*>(JSValue::decode(thisValue)); | |
thisObject->m_pendingPromise.set(vm, thisObject, JSValue::decode(value)); | |
} | |
extern JSC_CALLCONV JSC::EncodedJSValue BlobInternalReadableStreamSourcePrototype__pendingPromiseGetCachedValue(JSC::EncodedJSValue thisValue) | |
{ | |
auto* thisObject = jsCast<JSBlobInternalReadableStreamSource*>(JSValue::decode(thisValue)); | |
return JSValue::encode(thisObject->m_pendingPromise.get()); | |
} | |
extern JSC_CALLCONV void BlobInternalReadableStreamSourcePrototype__onCloseCallbackSetCachedValue(JSC::EncodedJSValue thisValue, JSC::JSGlobalObject *globalObject, JSC::EncodedJSValue value) | |
{ | |
auto& vm = globalObject->vm(); | |
auto* thisObject = jsCast<JSBlobInternalReadableStreamSource*>(JSValue::decode(thisValue)); | |
thisObject->m_onCloseCallback.set(vm, thisObject, JSValue::decode(value)); | |
} | |
extern JSC_CALLCONV JSC::EncodedJSValue BlobInternalReadableStreamSourcePrototype__onCloseCallbackGetCachedValue(JSC::EncodedJSValue thisValue) | |
{ | |
auto* thisObject = jsCast<JSBlobInternalReadableStreamSource*>(JSValue::decode(thisValue)); | |
return JSValue::encode(thisObject->m_onCloseCallback.get()); | |
} | |
extern JSC_CALLCONV void BlobInternalReadableStreamSourcePrototype__onDrainCallbackSetCachedValue(JSC::EncodedJSValue thisValue, JSC::JSGlobalObject *globalObject, JSC::EncodedJSValue value) | |
{ | |
auto& vm = globalObject->vm(); | |
auto* thisObject = jsCast<JSBlobInternalReadableStreamSource*>(JSValue::decode(thisValue)); | |
thisObject->m_onDrainCallback.set(vm, thisObject, JSValue::decode(value)); | |
} | |
extern JSC_CALLCONV JSC::EncodedJSValue BlobInternalReadableStreamSourcePrototype__onDrainCallbackGetCachedValue(JSC::EncodedJSValue thisValue) | |
{ | |
auto* thisObject = jsCast<JSBlobInternalReadableStreamSource*>(JSValue::decode(thisValue)); | |
return JSValue::encode(thisObject->m_onDrainCallback.get()); | |
} | |
void JSBlobInternalReadableStreamSourcePrototype::finishCreation(JSC::VM& vm, JSC::JSGlobalObject* globalObject) | |
{ | |
Base::finishCreation(vm); | |
reifyStaticProperties(vm, JSBlobInternalReadableStreamSource::info(), JSBlobInternalReadableStreamSourcePrototypeTableValues, *this); | |
JSC_TO_STRING_TAG_WITHOUT_TRANSITION(); | |
} | |
JSBlobInternalReadableStreamSource::~JSBlobInternalReadableStreamSource() | |
{ | |
if (LIKELY(m_ctx)) { | |
BlobInternalReadableStreamSourceClass__finalize(m_ctx); | |
} | |
} | |
void JSBlobInternalReadableStreamSource::destroy(JSCell* cell) | |
{ | |
static_cast<JSBlobInternalReadableStreamSource*>(cell)->JSBlobInternalReadableStreamSource::~JSBlobInternalReadableStreamSource(); | |
} | |
const ClassInfo JSBlobInternalReadableStreamSource::s_info = { "BlobInternalReadableStreamSource"_s, &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSBlobInternalReadableStreamSource) }; | |
void JSBlobInternalReadableStreamSource::finishCreation(VM& vm) | |
{ | |
Base::finishCreation(vm); | |
ASSERT(inherits(info())); | |
} | |
JSBlobInternalReadableStreamSource* JSBlobInternalReadableStreamSource::create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure, void* ctx) { | |
JSBlobInternalReadableStreamSource* ptr = new (NotNull, JSC::allocateCell<JSBlobInternalReadableStreamSource>(vm)) JSBlobInternalReadableStreamSource(vm, structure, ctx); | |
ptr->finishCreation(vm); | |
return ptr; | |
} | |
extern JSC_CALLCONV void* JSC_HOST_CALL_ATTRIBUTES BlobInternalReadableStreamSource__fromJS(JSC::EncodedJSValue value) { | |
JSC::JSValue decodedValue = JSC::JSValue::decode(value); | |
if (decodedValue.isEmpty() || !decodedValue.isCell()) | |
return nullptr; | |
JSC::JSCell* cell = decodedValue.asCell(); | |
JSBlobInternalReadableStreamSource* object = JSC::jsDynamicCast<JSBlobInternalReadableStreamSource*>(cell); | |
if (!object) | |
return nullptr; | |
return object->wrapped(); | |
} | |
extern JSC_CALLCONV void* JSC_HOST_CALL_ATTRIBUTES BlobInternalReadableStreamSource__fromJSDirect(JSC::EncodedJSValue value) { | |
JSC::JSValue decodedValue = JSC::JSValue::decode(value); | |
ASSERT(decodedValue.isCell()); | |
JSC::JSCell* cell = decodedValue.asCell(); | |
JSBlobInternalReadableStreamSource* object = JSC::jsDynamicCast<JSBlobInternalReadableStreamSource*>(cell); | |
if (!object) | |
return nullptr; | |
Zig::GlobalObject* globalObject = jsDynamicCast<Zig::GlobalObject*>(object->globalObject()); | |
if (UNLIKELY(globalObject == nullptr || cell->structureID() != globalObject->JSBlobInternalReadableStreamSourceStructure()->id())) { | |
return nullptr; | |
} | |
return object->wrapped(); | |
} | |
extern JSC_CALLCONV bool JSC_HOST_CALL_ATTRIBUTES BlobInternalReadableStreamSource__dangerouslySetPtr(JSC::EncodedJSValue value, void* ptr) { | |
JSBlobInternalReadableStreamSource* object = JSC::jsDynamicCast<JSBlobInternalReadableStreamSource*>(JSValue::decode(value)); | |
if (!object) | |
return false; | |
object->m_ctx = ptr; | |
return true; | |
} | |
extern "C" const size_t BlobInternalReadableStreamSource__ptrOffset = JSBlobInternalReadableStreamSource::offsetOfWrapped(); | |
void JSBlobInternalReadableStreamSource::analyzeHeap(JSCell* cell, HeapAnalyzer& analyzer) | |
{ | |
auto* thisObject = jsCast<JSBlobInternalReadableStreamSource*>(cell); | |
if (void* wrapped = thisObject->wrapped()) { | |
// if (thisObject->scriptExecutionContext()) | |
// analyzer.setLabelForCell(cell, makeString("url ", thisObject->scriptExecutionContext()->url().string())); | |
} | |
Base::analyzeHeap(cell, analyzer); | |
} | |
JSObject* JSBlobInternalReadableStreamSource::createPrototype(VM& vm, JSDOMGlobalObject* globalObject) | |
{ | |
auto *structure = JSBlobInternalReadableStreamSourcePrototype::createStructure(vm, globalObject, globalObject->objectPrototype()); | |
structure->setMayBePrototype(true); | |
return JSBlobInternalReadableStreamSourcePrototype::create(vm, globalObject, structure); | |
} | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES BlobInternalReadableStreamSource__create(Zig::GlobalObject* globalObject, void* ptr) { | |
auto &vm = globalObject->vm(); | |
JSC::Structure* structure = globalObject->JSBlobInternalReadableStreamSourceStructure(); | |
JSBlobInternalReadableStreamSource* instance = JSBlobInternalReadableStreamSource::create(vm, globalObject, structure, ptr); | |
return JSValue::encode(instance); | |
} | |
template<typename Visitor> | |
void JSBlobInternalReadableStreamSource::visitChildrenImpl(JSCell* cell, Visitor& visitor) | |
{ | |
JSBlobInternalReadableStreamSource* thisObject = jsCast<JSBlobInternalReadableStreamSource*>(cell); | |
ASSERT_GC_OBJECT_INHERITS(thisObject, info()); | |
Base::visitChildren(thisObject, visitor); | |
thisObject->visitAdditionalChildren<Visitor>(visitor); | |
} | |
DEFINE_VISIT_CHILDREN(JSBlobInternalReadableStreamSource); | |
template<typename Visitor> | |
void JSBlobInternalReadableStreamSource::visitAdditionalChildren(Visitor& visitor) | |
{ | |
JSBlobInternalReadableStreamSource* thisObject = this; | |
ASSERT_GC_OBJECT_INHERITS(thisObject, info()); | |
visitor.append(thisObject->m_pendingPromise); | |
visitor.append(thisObject->m_onCloseCallback); | |
visitor.append(thisObject->m_onDrainCallback); | |
} | |
DEFINE_VISIT_ADDITIONAL_CHILDREN(JSBlobInternalReadableStreamSource); | |
template<typename Visitor> | |
void JSBlobInternalReadableStreamSource::visitOutputConstraintsImpl(JSCell *cell, Visitor& visitor) | |
{ | |
JSBlobInternalReadableStreamSource* thisObject = jsCast<JSBlobInternalReadableStreamSource*>(cell); | |
ASSERT_GC_OBJECT_INHERITS(thisObject, info()); | |
thisObject->visitAdditionalChildren<Visitor>(visitor); | |
} | |
DEFINE_VISIT_OUTPUT_CONSTRAINTS(JSBlobInternalReadableStreamSource); | |
class JSBrotliDecoderPrototype final : public JSC::JSNonFinalObject { | |
public: | |
using Base = JSC::JSNonFinalObject; | |
static JSBrotliDecoderPrototype* create(JSC::VM& vm, JSGlobalObject* globalObject, JSC::Structure* structure) | |
{ | |
JSBrotliDecoderPrototype* ptr = new (NotNull, JSC::allocateCell<JSBrotliDecoderPrototype>(vm)) JSBrotliDecoderPrototype(vm, globalObject, structure); | |
ptr->finishCreation(vm, globalObject); | |
return ptr; | |
} | |
DECLARE_INFO; | |
template<typename CellType, JSC::SubspaceAccess> | |
static JSC::GCClient::IsoSubspace* subspaceFor(JSC::VM& vm) | |
{ | |
STATIC_ASSERT_ISO_SUBSPACE_SHARABLE(JSBrotliDecoderPrototype, Base); | |
return &vm.plainObjectSpace(); | |
} | |
static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype) | |
{ | |
return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info()); | |
} | |
private: | |
JSBrotliDecoderPrototype(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure) | |
: Base(vm, structure) | |
{ | |
} | |
void finishCreation(JSC::VM&, JSC::JSGlobalObject*); | |
}; | |
JSC_DECLARE_HOST_FUNCTION(BrotliDecoderPrototype__decodeCallback); | |
JSC_DECLARE_HOST_FUNCTION(BrotliDecoderPrototype__decodeSyncCallback); | |
JSC_DECLARE_HOST_FUNCTION(BrotliDecoderPrototype__endCallback); | |
JSC_DECLARE_HOST_FUNCTION(BrotliDecoderPrototype__endSyncCallback); | |
STATIC_ASSERT_ISO_SUBSPACE_SHARABLE(JSBrotliDecoderPrototype, JSBrotliDecoderPrototype::Base); | |
static const HashTableValue JSBrotliDecoderPrototypeTableValues[4] = { | |
{ "decode"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, BrotliDecoderPrototype__decodeCallback, 2 } } , | |
{ "decodeSync"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, BrotliDecoderPrototype__decodeSyncCallback, 2 } } , | |
{ "end"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, BrotliDecoderPrototype__endCallback, 2 } } , | |
{ "endSync"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, BrotliDecoderPrototype__endSyncCallback, 2 } } | |
}; | |
const ClassInfo JSBrotliDecoderPrototype::s_info = { "BrotliDecoder"_s, &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSBrotliDecoderPrototype) }; | |
JSC_DEFINE_CUSTOM_GETTER(jsBrotliDecoderConstructor, (JSGlobalObject * lexicalGlobalObject, EncodedJSValue thisValue, PropertyName)) | |
{ | |
VM& vm = JSC::getVM(lexicalGlobalObject); | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
auto* globalObject = reinterpret_cast<Zig::GlobalObject*>(lexicalGlobalObject); | |
auto* prototype = jsDynamicCast<JSBrotliDecoderPrototype*>(JSValue::decode(thisValue)); | |
if (UNLIKELY(!prototype)) | |
return throwVMTypeError(lexicalGlobalObject, throwScope, "Cannot get constructor for BrotliDecoder"_s); | |
return JSValue::encode(globalObject->JSBrotliDecoderConstructor()); | |
} | |
JSC_DEFINE_HOST_FUNCTION(BrotliDecoderPrototype__decodeCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSBrotliDecoder* thisObject = jsDynamicCast<JSBrotliDecoder*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof BrotliDecoder"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = BrotliDecoderPrototype__decode(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "BrotliDecoder.decode returned an empty value without an exception"); | |
return result; | |
#endif | |
return BrotliDecoderPrototype__decode(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_HOST_FUNCTION(BrotliDecoderPrototype__decodeSyncCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSBrotliDecoder* thisObject = jsDynamicCast<JSBrotliDecoder*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof BrotliDecoder"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = BrotliDecoderPrototype__decodeSync(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "BrotliDecoder.decodeSync returned an empty value without an exception"); | |
return result; | |
#endif | |
return BrotliDecoderPrototype__decodeSync(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_HOST_FUNCTION(BrotliDecoderPrototype__endCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSBrotliDecoder* thisObject = jsDynamicCast<JSBrotliDecoder*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof BrotliDecoder"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = BrotliDecoderPrototype__end(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "BrotliDecoder.end returned an empty value without an exception"); | |
return result; | |
#endif | |
return BrotliDecoderPrototype__end(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_HOST_FUNCTION(BrotliDecoderPrototype__endSyncCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSBrotliDecoder* thisObject = jsDynamicCast<JSBrotliDecoder*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof BrotliDecoder"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = BrotliDecoderPrototype__endSync(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "BrotliDecoder.endSync returned an empty value without an exception"); | |
return result; | |
#endif | |
return BrotliDecoderPrototype__endSync(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
extern JSC_CALLCONV void BrotliDecoderPrototype__callbackSetCachedValue(JSC::EncodedJSValue thisValue, JSC::JSGlobalObject *globalObject, JSC::EncodedJSValue value) | |
{ | |
auto& vm = globalObject->vm(); | |
auto* thisObject = jsCast<JSBrotliDecoder*>(JSValue::decode(thisValue)); | |
thisObject->m_callback.set(vm, thisObject, JSValue::decode(value)); | |
} | |
extern JSC_CALLCONV JSC::EncodedJSValue BrotliDecoderPrototype__callbackGetCachedValue(JSC::EncodedJSValue thisValue) | |
{ | |
auto* thisObject = jsCast<JSBrotliDecoder*>(JSValue::decode(thisValue)); | |
return JSValue::encode(thisObject->m_callback.get()); | |
} | |
void JSBrotliDecoderPrototype::finishCreation(JSC::VM& vm, JSC::JSGlobalObject* globalObject) | |
{ | |
Base::finishCreation(vm); | |
reifyStaticProperties(vm, JSBrotliDecoder::info(), JSBrotliDecoderPrototypeTableValues, *this); | |
JSC_TO_STRING_TAG_WITHOUT_TRANSITION(); | |
} | |
bool JSBrotliDecoder::hasPendingActivity(void* ctx) { | |
return BrotliDecoder__hasPendingActivity(ctx); | |
} | |
JSBrotliDecoder::~JSBrotliDecoder() | |
{ | |
if (LIKELY(m_ctx)) { | |
BrotliDecoderClass__finalize(m_ctx); | |
} | |
} | |
void JSBrotliDecoder::destroy(JSCell* cell) | |
{ | |
static_cast<JSBrotliDecoder*>(cell)->JSBrotliDecoder::~JSBrotliDecoder(); | |
} | |
const ClassInfo JSBrotliDecoder::s_info = { "BrotliDecoder"_s, &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSBrotliDecoder) }; | |
void JSBrotliDecoder::finishCreation(VM& vm) | |
{ | |
Base::finishCreation(vm); | |
ASSERT(inherits(info())); | |
} | |
JSBrotliDecoder* JSBrotliDecoder::create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure, void* ctx) { | |
JSBrotliDecoder* ptr = new (NotNull, JSC::allocateCell<JSBrotliDecoder>(vm)) JSBrotliDecoder(vm, structure, ctx); | |
ptr->finishCreation(vm); | |
return ptr; | |
} | |
extern JSC_CALLCONV void* JSC_HOST_CALL_ATTRIBUTES BrotliDecoder__fromJS(JSC::EncodedJSValue value) { | |
JSC::JSValue decodedValue = JSC::JSValue::decode(value); | |
if (decodedValue.isEmpty() || !decodedValue.isCell()) | |
return nullptr; | |
JSC::JSCell* cell = decodedValue.asCell(); | |
JSBrotliDecoder* object = JSC::jsDynamicCast<JSBrotliDecoder*>(cell); | |
if (!object) | |
return nullptr; | |
return object->wrapped(); | |
} | |
extern JSC_CALLCONV void* JSC_HOST_CALL_ATTRIBUTES BrotliDecoder__fromJSDirect(JSC::EncodedJSValue value) { | |
JSC::JSValue decodedValue = JSC::JSValue::decode(value); | |
ASSERT(decodedValue.isCell()); | |
JSC::JSCell* cell = decodedValue.asCell(); | |
JSBrotliDecoder* object = JSC::jsDynamicCast<JSBrotliDecoder*>(cell); | |
if (!object) | |
return nullptr; | |
Zig::GlobalObject* globalObject = jsDynamicCast<Zig::GlobalObject*>(object->globalObject()); | |
if (UNLIKELY(globalObject == nullptr || cell->structureID() != globalObject->JSBrotliDecoderStructure()->id())) { | |
return nullptr; | |
} | |
return object->wrapped(); | |
} | |
extern JSC_CALLCONV bool JSC_HOST_CALL_ATTRIBUTES BrotliDecoder__dangerouslySetPtr(JSC::EncodedJSValue value, void* ptr) { | |
JSBrotliDecoder* object = JSC::jsDynamicCast<JSBrotliDecoder*>(JSValue::decode(value)); | |
if (!object) | |
return false; | |
object->m_ctx = ptr; | |
return true; | |
} | |
extern "C" const size_t BrotliDecoder__ptrOffset = JSBrotliDecoder::offsetOfWrapped(); | |
void JSBrotliDecoder::analyzeHeap(JSCell* cell, HeapAnalyzer& analyzer) | |
{ | |
auto* thisObject = jsCast<JSBrotliDecoder*>(cell); | |
if (void* wrapped = thisObject->wrapped()) { | |
// if (thisObject->scriptExecutionContext()) | |
// analyzer.setLabelForCell(cell, makeString("url ", thisObject->scriptExecutionContext()->url().string())); | |
} | |
Base::analyzeHeap(cell, analyzer); | |
} | |
JSObject* JSBrotliDecoder::createPrototype(VM& vm, JSDOMGlobalObject* globalObject) | |
{ | |
auto *structure = JSBrotliDecoderPrototype::createStructure(vm, globalObject, globalObject->objectPrototype()); | |
structure->setMayBePrototype(true); | |
return JSBrotliDecoderPrototype::create(vm, globalObject, structure); | |
} | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES BrotliDecoder__create(Zig::GlobalObject* globalObject, void* ptr) { | |
auto &vm = globalObject->vm(); | |
JSC::Structure* structure = globalObject->JSBrotliDecoderStructure(); | |
JSBrotliDecoder* instance = JSBrotliDecoder::create(vm, globalObject, structure, ptr); | |
return JSValue::encode(instance); | |
} | |
template<typename Visitor> | |
void JSBrotliDecoder::visitChildrenImpl(JSCell* cell, Visitor& visitor) | |
{ | |
JSBrotliDecoder* thisObject = jsCast<JSBrotliDecoder*>(cell); | |
ASSERT_GC_OBJECT_INHERITS(thisObject, info()); | |
Base::visitChildren(thisObject, visitor); | |
thisObject->visitAdditionalChildren<Visitor>(visitor); | |
} | |
DEFINE_VISIT_CHILDREN(JSBrotliDecoder); | |
template<typename Visitor> | |
void JSBrotliDecoder::visitAdditionalChildren(Visitor& visitor) | |
{ | |
JSBrotliDecoder* thisObject = this; | |
ASSERT_GC_OBJECT_INHERITS(thisObject, info()); | |
visitor.append(thisObject->m_callback); | |
visitor.addOpaqueRoot(this->wrapped()); | |
} | |
DEFINE_VISIT_ADDITIONAL_CHILDREN(JSBrotliDecoder); | |
template<typename Visitor> | |
void JSBrotliDecoder::visitOutputConstraintsImpl(JSCell *cell, Visitor& visitor) | |
{ | |
JSBrotliDecoder* thisObject = jsCast<JSBrotliDecoder*>(cell); | |
ASSERT_GC_OBJECT_INHERITS(thisObject, info()); | |
thisObject->visitAdditionalChildren<Visitor>(visitor); | |
} | |
DEFINE_VISIT_OUTPUT_CONSTRAINTS(JSBrotliDecoder); | |
class JSBrotliEncoderPrototype final : public JSC::JSNonFinalObject { | |
public: | |
using Base = JSC::JSNonFinalObject; | |
static JSBrotliEncoderPrototype* create(JSC::VM& vm, JSGlobalObject* globalObject, JSC::Structure* structure) | |
{ | |
JSBrotliEncoderPrototype* ptr = new (NotNull, JSC::allocateCell<JSBrotliEncoderPrototype>(vm)) JSBrotliEncoderPrototype(vm, globalObject, structure); | |
ptr->finishCreation(vm, globalObject); | |
return ptr; | |
} | |
DECLARE_INFO; | |
template<typename CellType, JSC::SubspaceAccess> | |
static JSC::GCClient::IsoSubspace* subspaceFor(JSC::VM& vm) | |
{ | |
STATIC_ASSERT_ISO_SUBSPACE_SHARABLE(JSBrotliEncoderPrototype, Base); | |
return &vm.plainObjectSpace(); | |
} | |
static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype) | |
{ | |
return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info()); | |
} | |
private: | |
JSBrotliEncoderPrototype(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure) | |
: Base(vm, structure) | |
{ | |
} | |
void finishCreation(JSC::VM&, JSC::JSGlobalObject*); | |
}; | |
JSC_DECLARE_HOST_FUNCTION(BrotliEncoderPrototype__encodeCallback); | |
JSC_DECLARE_HOST_FUNCTION(BrotliEncoderPrototype__encodeSyncCallback); | |
JSC_DECLARE_HOST_FUNCTION(BrotliEncoderPrototype__endCallback); | |
JSC_DECLARE_HOST_FUNCTION(BrotliEncoderPrototype__endSyncCallback); | |
STATIC_ASSERT_ISO_SUBSPACE_SHARABLE(JSBrotliEncoderPrototype, JSBrotliEncoderPrototype::Base); | |
static const HashTableValue JSBrotliEncoderPrototypeTableValues[4] = { | |
{ "encode"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, BrotliEncoderPrototype__encodeCallback, 2 } } , | |
{ "encodeSync"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, BrotliEncoderPrototype__encodeSyncCallback, 2 } } , | |
{ "end"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, BrotliEncoderPrototype__endCallback, 2 } } , | |
{ "endSync"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, BrotliEncoderPrototype__endSyncCallback, 2 } } | |
}; | |
const ClassInfo JSBrotliEncoderPrototype::s_info = { "BrotliEncoder"_s, &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSBrotliEncoderPrototype) }; | |
JSC_DEFINE_CUSTOM_GETTER(jsBrotliEncoderConstructor, (JSGlobalObject * lexicalGlobalObject, EncodedJSValue thisValue, PropertyName)) | |
{ | |
VM& vm = JSC::getVM(lexicalGlobalObject); | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
auto* globalObject = reinterpret_cast<Zig::GlobalObject*>(lexicalGlobalObject); | |
auto* prototype = jsDynamicCast<JSBrotliEncoderPrototype*>(JSValue::decode(thisValue)); | |
if (UNLIKELY(!prototype)) | |
return throwVMTypeError(lexicalGlobalObject, throwScope, "Cannot get constructor for BrotliEncoder"_s); | |
return JSValue::encode(globalObject->JSBrotliEncoderConstructor()); | |
} | |
JSC_DEFINE_HOST_FUNCTION(BrotliEncoderPrototype__encodeCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSBrotliEncoder* thisObject = jsDynamicCast<JSBrotliEncoder*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof BrotliEncoder"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = BrotliEncoderPrototype__encode(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "BrotliEncoder.encode returned an empty value without an exception"); | |
return result; | |
#endif | |
return BrotliEncoderPrototype__encode(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_HOST_FUNCTION(BrotliEncoderPrototype__encodeSyncCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSBrotliEncoder* thisObject = jsDynamicCast<JSBrotliEncoder*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof BrotliEncoder"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = BrotliEncoderPrototype__encodeSync(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "BrotliEncoder.encodeSync returned an empty value without an exception"); | |
return result; | |
#endif | |
return BrotliEncoderPrototype__encodeSync(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_HOST_FUNCTION(BrotliEncoderPrototype__endCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSBrotliEncoder* thisObject = jsDynamicCast<JSBrotliEncoder*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof BrotliEncoder"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = BrotliEncoderPrototype__end(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "BrotliEncoder.end returned an empty value without an exception"); | |
return result; | |
#endif | |
return BrotliEncoderPrototype__end(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_HOST_FUNCTION(BrotliEncoderPrototype__endSyncCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSBrotliEncoder* thisObject = jsDynamicCast<JSBrotliEncoder*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof BrotliEncoder"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = BrotliEncoderPrototype__endSync(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "BrotliEncoder.endSync returned an empty value without an exception"); | |
return result; | |
#endif | |
return BrotliEncoderPrototype__endSync(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
extern JSC_CALLCONV void BrotliEncoderPrototype__callbackSetCachedValue(JSC::EncodedJSValue thisValue, JSC::JSGlobalObject *globalObject, JSC::EncodedJSValue value) | |
{ | |
auto& vm = globalObject->vm(); | |
auto* thisObject = jsCast<JSBrotliEncoder*>(JSValue::decode(thisValue)); | |
thisObject->m_callback.set(vm, thisObject, JSValue::decode(value)); | |
} | |
extern JSC_CALLCONV JSC::EncodedJSValue BrotliEncoderPrototype__callbackGetCachedValue(JSC::EncodedJSValue thisValue) | |
{ | |
auto* thisObject = jsCast<JSBrotliEncoder*>(JSValue::decode(thisValue)); | |
return JSValue::encode(thisObject->m_callback.get()); | |
} | |
void JSBrotliEncoderPrototype::finishCreation(JSC::VM& vm, JSC::JSGlobalObject* globalObject) | |
{ | |
Base::finishCreation(vm); | |
reifyStaticProperties(vm, JSBrotliEncoder::info(), JSBrotliEncoderPrototypeTableValues, *this); | |
JSC_TO_STRING_TAG_WITHOUT_TRANSITION(); | |
} | |
bool JSBrotliEncoder::hasPendingActivity(void* ctx) { | |
return BrotliEncoder__hasPendingActivity(ctx); | |
} | |
JSBrotliEncoder::~JSBrotliEncoder() | |
{ | |
if (LIKELY(m_ctx)) { | |
BrotliEncoderClass__finalize(m_ctx); | |
} | |
} | |
void JSBrotliEncoder::destroy(JSCell* cell) | |
{ | |
static_cast<JSBrotliEncoder*>(cell)->JSBrotliEncoder::~JSBrotliEncoder(); | |
} | |
const ClassInfo JSBrotliEncoder::s_info = { "BrotliEncoder"_s, &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSBrotliEncoder) }; | |
void JSBrotliEncoder::finishCreation(VM& vm) | |
{ | |
Base::finishCreation(vm); | |
ASSERT(inherits(info())); | |
} | |
JSBrotliEncoder* JSBrotliEncoder::create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure, void* ctx) { | |
JSBrotliEncoder* ptr = new (NotNull, JSC::allocateCell<JSBrotliEncoder>(vm)) JSBrotliEncoder(vm, structure, ctx); | |
ptr->finishCreation(vm); | |
return ptr; | |
} | |
extern JSC_CALLCONV void* JSC_HOST_CALL_ATTRIBUTES BrotliEncoder__fromJS(JSC::EncodedJSValue value) { | |
JSC::JSValue decodedValue = JSC::JSValue::decode(value); | |
if (decodedValue.isEmpty() || !decodedValue.isCell()) | |
return nullptr; | |
JSC::JSCell* cell = decodedValue.asCell(); | |
JSBrotliEncoder* object = JSC::jsDynamicCast<JSBrotliEncoder*>(cell); | |
if (!object) | |
return nullptr; | |
return object->wrapped(); | |
} | |
extern JSC_CALLCONV void* JSC_HOST_CALL_ATTRIBUTES BrotliEncoder__fromJSDirect(JSC::EncodedJSValue value) { | |
JSC::JSValue decodedValue = JSC::JSValue::decode(value); | |
ASSERT(decodedValue.isCell()); | |
JSC::JSCell* cell = decodedValue.asCell(); | |
JSBrotliEncoder* object = JSC::jsDynamicCast<JSBrotliEncoder*>(cell); | |
if (!object) | |
return nullptr; | |
Zig::GlobalObject* globalObject = jsDynamicCast<Zig::GlobalObject*>(object->globalObject()); | |
if (UNLIKELY(globalObject == nullptr || cell->structureID() != globalObject->JSBrotliEncoderStructure()->id())) { | |
return nullptr; | |
} | |
return object->wrapped(); | |
} | |
extern JSC_CALLCONV bool JSC_HOST_CALL_ATTRIBUTES BrotliEncoder__dangerouslySetPtr(JSC::EncodedJSValue value, void* ptr) { | |
JSBrotliEncoder* object = JSC::jsDynamicCast<JSBrotliEncoder*>(JSValue::decode(value)); | |
if (!object) | |
return false; | |
object->m_ctx = ptr; | |
return true; | |
} | |
extern "C" const size_t BrotliEncoder__ptrOffset = JSBrotliEncoder::offsetOfWrapped(); | |
void JSBrotliEncoder::analyzeHeap(JSCell* cell, HeapAnalyzer& analyzer) | |
{ | |
auto* thisObject = jsCast<JSBrotliEncoder*>(cell); | |
if (void* wrapped = thisObject->wrapped()) { | |
// if (thisObject->scriptExecutionContext()) | |
// analyzer.setLabelForCell(cell, makeString("url ", thisObject->scriptExecutionContext()->url().string())); | |
} | |
Base::analyzeHeap(cell, analyzer); | |
} | |
JSObject* JSBrotliEncoder::createPrototype(VM& vm, JSDOMGlobalObject* globalObject) | |
{ | |
auto *structure = JSBrotliEncoderPrototype::createStructure(vm, globalObject, globalObject->objectPrototype()); | |
structure->setMayBePrototype(true); | |
return JSBrotliEncoderPrototype::create(vm, globalObject, structure); | |
} | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES BrotliEncoder__create(Zig::GlobalObject* globalObject, void* ptr) { | |
auto &vm = globalObject->vm(); | |
JSC::Structure* structure = globalObject->JSBrotliEncoderStructure(); | |
JSBrotliEncoder* instance = JSBrotliEncoder::create(vm, globalObject, structure, ptr); | |
return JSValue::encode(instance); | |
} | |
template<typename Visitor> | |
void JSBrotliEncoder::visitChildrenImpl(JSCell* cell, Visitor& visitor) | |
{ | |
JSBrotliEncoder* thisObject = jsCast<JSBrotliEncoder*>(cell); | |
ASSERT_GC_OBJECT_INHERITS(thisObject, info()); | |
Base::visitChildren(thisObject, visitor); | |
thisObject->visitAdditionalChildren<Visitor>(visitor); | |
} | |
DEFINE_VISIT_CHILDREN(JSBrotliEncoder); | |
template<typename Visitor> | |
void JSBrotliEncoder::visitAdditionalChildren(Visitor& visitor) | |
{ | |
JSBrotliEncoder* thisObject = this; | |
ASSERT_GC_OBJECT_INHERITS(thisObject, info()); | |
visitor.append(thisObject->m_callback); | |
visitor.addOpaqueRoot(this->wrapped()); | |
} | |
DEFINE_VISIT_ADDITIONAL_CHILDREN(JSBrotliEncoder); | |
template<typename Visitor> | |
void JSBrotliEncoder::visitOutputConstraintsImpl(JSCell *cell, Visitor& visitor) | |
{ | |
JSBrotliEncoder* thisObject = jsCast<JSBrotliEncoder*>(cell); | |
ASSERT_GC_OBJECT_INHERITS(thisObject, info()); | |
thisObject->visitAdditionalChildren<Visitor>(visitor); | |
} | |
DEFINE_VISIT_OUTPUT_CONSTRAINTS(JSBrotliEncoder); | |
class JSBuildArtifactPrototype final : public JSC::JSNonFinalObject { | |
public: | |
using Base = JSC::JSNonFinalObject; | |
static JSBuildArtifactPrototype* create(JSC::VM& vm, JSGlobalObject* globalObject, JSC::Structure* structure) | |
{ | |
JSBuildArtifactPrototype* ptr = new (NotNull, JSC::allocateCell<JSBuildArtifactPrototype>(vm)) JSBuildArtifactPrototype(vm, globalObject, structure); | |
ptr->finishCreation(vm, globalObject); | |
return ptr; | |
} | |
DECLARE_INFO; | |
template<typename CellType, JSC::SubspaceAccess> | |
static JSC::GCClient::IsoSubspace* subspaceFor(JSC::VM& vm) | |
{ | |
STATIC_ASSERT_ISO_SUBSPACE_SHARABLE(JSBuildArtifactPrototype, Base); | |
return &vm.plainObjectSpace(); | |
} | |
static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype) | |
{ | |
return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info()); | |
} | |
private: | |
JSBuildArtifactPrototype(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure) | |
: Base(vm, structure) | |
{ | |
} | |
void finishCreation(JSC::VM&, JSC::JSGlobalObject*); | |
}; | |
JSC_DECLARE_HOST_FUNCTION(BuildArtifactPrototype__arrayBufferCallback); | |
JSC_DECLARE_CUSTOM_GETTER(BuildArtifactPrototype__hashGetterWrap); | |
JSC_DECLARE_HOST_FUNCTION(BuildArtifactPrototype__jsonCallback); | |
JSC_DECLARE_CUSTOM_GETTER(BuildArtifactPrototype__kindGetterWrap); | |
JSC_DECLARE_CUSTOM_GETTER(BuildArtifactPrototype__loaderGetterWrap); | |
JSC_DECLARE_CUSTOM_GETTER(BuildArtifactPrototype__pathGetterWrap); | |
JSC_DECLARE_CUSTOM_GETTER(BuildArtifactPrototype__sizeGetterWrap); | |
JSC_DECLARE_HOST_FUNCTION(BuildArtifactPrototype__sliceCallback); | |
JSC_DECLARE_CUSTOM_GETTER(BuildArtifactPrototype__sourcemapGetterWrap); | |
JSC_DECLARE_HOST_FUNCTION(BuildArtifactPrototype__streamCallback); | |
JSC_DECLARE_HOST_FUNCTION(BuildArtifactPrototype__textCallback); | |
JSC_DECLARE_CUSTOM_GETTER(BuildArtifactPrototype__typeGetterWrap); | |
STATIC_ASSERT_ISO_SUBSPACE_SHARABLE(JSBuildArtifactPrototype, JSBuildArtifactPrototype::Base); | |
static const HashTableValue JSBuildArtifactPrototypeTableValues[12] = { | |
{ "arrayBuffer"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, BuildArtifactPrototype__arrayBufferCallback, 0 } } , | |
{ "hash"_s, static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::GetterSetterType, BuildArtifactPrototype__hashGetterWrap, 0 } } , | |
{ "json"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, BuildArtifactPrototype__jsonCallback, 0 } } , | |
{ "kind"_s, static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::GetterSetterType, BuildArtifactPrototype__kindGetterWrap, 0 } } , | |
{ "loader"_s, static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::GetterSetterType, BuildArtifactPrototype__loaderGetterWrap, 0 } } , | |
{ "path"_s, static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::GetterSetterType, BuildArtifactPrototype__pathGetterWrap, 0 } } , | |
{ "size"_s, static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::GetterSetterType, BuildArtifactPrototype__sizeGetterWrap, 0 } } , | |
{ "slice"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, BuildArtifactPrototype__sliceCallback, 2 } } , | |
{ "sourcemap"_s, static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::GetterSetterType, BuildArtifactPrototype__sourcemapGetterWrap, 0 } } , | |
{ "stream"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, BuildArtifactPrototype__streamCallback, 1 } } , | |
{ "text"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, BuildArtifactPrototype__textCallback, 0 } } , | |
{ "type"_s, static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::GetterSetterType, BuildArtifactPrototype__typeGetterWrap, 0 } } | |
}; | |
const ClassInfo JSBuildArtifactPrototype::s_info = { "BuildArtifact"_s, &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSBuildArtifactPrototype) }; | |
JSC_DEFINE_HOST_FUNCTION(BuildArtifactPrototype__arrayBufferCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSBuildArtifact* thisObject = jsDynamicCast<JSBuildArtifact*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof BuildArtifact"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = BuildArtifactPrototype__getArrayBuffer(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "BuildArtifact.getArrayBuffer returned an empty value without an exception"); | |
return result; | |
#endif | |
return BuildArtifactPrototype__getArrayBuffer(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_CUSTOM_GETTER(BuildArtifactPrototype__hashGetterWrap, (JSGlobalObject * lexicalGlobalObject, EncodedJSValue encodedThisValue, PropertyName attributeName)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
Zig::GlobalObject *globalObject = reinterpret_cast<Zig::GlobalObject*>(lexicalGlobalObject); | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
JSBuildArtifact* thisObject = jsCast<JSBuildArtifact*>(JSValue::decode(encodedThisValue)); | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
if (JSValue cachedValue = thisObject->m_hash.get()) | |
return JSValue::encode(cachedValue); | |
JSC::JSValue result = JSC::JSValue::decode( | |
BuildArtifactPrototype__getHash(thisObject->wrapped(), globalObject) | |
); | |
RETURN_IF_EXCEPTION(throwScope, {}); | |
thisObject->m_hash.set(vm, thisObject, result); | |
RELEASE_AND_RETURN(throwScope, JSValue::encode(result)); | |
} | |
extern JSC_CALLCONV void BuildArtifactPrototype__hashSetCachedValue(JSC::EncodedJSValue thisValue, JSC::JSGlobalObject *globalObject, JSC::EncodedJSValue value) | |
{ | |
auto& vm = globalObject->vm(); | |
auto* thisObject = jsCast<JSBuildArtifact*>(JSValue::decode(thisValue)); | |
thisObject->m_hash.set(vm, thisObject, JSValue::decode(value)); | |
} | |
extern JSC_CALLCONV JSC::EncodedJSValue BuildArtifactPrototype__hashGetCachedValue(JSC::EncodedJSValue thisValue) | |
{ | |
auto* thisObject = jsCast<JSBuildArtifact*>(JSValue::decode(thisValue)); | |
return JSValue::encode(thisObject->m_hash.get()); | |
} | |
JSC_DEFINE_HOST_FUNCTION(BuildArtifactPrototype__jsonCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSBuildArtifact* thisObject = jsDynamicCast<JSBuildArtifact*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof BuildArtifact"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = BuildArtifactPrototype__getJSON(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "BuildArtifact.getJSON returned an empty value without an exception"); | |
return result; | |
#endif | |
return BuildArtifactPrototype__getJSON(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_CUSTOM_GETTER(BuildArtifactPrototype__kindGetterWrap, (JSGlobalObject * lexicalGlobalObject, EncodedJSValue encodedThisValue, PropertyName attributeName)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
Zig::GlobalObject *globalObject = reinterpret_cast<Zig::GlobalObject*>(lexicalGlobalObject); | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
JSBuildArtifact* thisObject = jsCast<JSBuildArtifact*>(JSValue::decode(encodedThisValue)); | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
if (JSValue cachedValue = thisObject->m_kind.get()) | |
return JSValue::encode(cachedValue); | |
JSC::JSValue result = JSC::JSValue::decode( | |
BuildArtifactPrototype__getOutputKind(thisObject->wrapped(), globalObject) | |
); | |
RETURN_IF_EXCEPTION(throwScope, {}); | |
thisObject->m_kind.set(vm, thisObject, result); | |
RELEASE_AND_RETURN(throwScope, JSValue::encode(result)); | |
} | |
extern JSC_CALLCONV void BuildArtifactPrototype__kindSetCachedValue(JSC::EncodedJSValue thisValue, JSC::JSGlobalObject *globalObject, JSC::EncodedJSValue value) | |
{ | |
auto& vm = globalObject->vm(); | |
auto* thisObject = jsCast<JSBuildArtifact*>(JSValue::decode(thisValue)); | |
thisObject->m_kind.set(vm, thisObject, JSValue::decode(value)); | |
} | |
extern JSC_CALLCONV JSC::EncodedJSValue BuildArtifactPrototype__kindGetCachedValue(JSC::EncodedJSValue thisValue) | |
{ | |
auto* thisObject = jsCast<JSBuildArtifact*>(JSValue::decode(thisValue)); | |
return JSValue::encode(thisObject->m_kind.get()); | |
} | |
JSC_DEFINE_CUSTOM_GETTER(BuildArtifactPrototype__loaderGetterWrap, (JSGlobalObject * lexicalGlobalObject, EncodedJSValue encodedThisValue, PropertyName attributeName)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
Zig::GlobalObject *globalObject = reinterpret_cast<Zig::GlobalObject*>(lexicalGlobalObject); | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
JSBuildArtifact* thisObject = jsCast<JSBuildArtifact*>(JSValue::decode(encodedThisValue)); | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
if (JSValue cachedValue = thisObject->m_loader.get()) | |
return JSValue::encode(cachedValue); | |
JSC::JSValue result = JSC::JSValue::decode( | |
BuildArtifactPrototype__getLoader(thisObject->wrapped(), globalObject) | |
); | |
RETURN_IF_EXCEPTION(throwScope, {}); | |
thisObject->m_loader.set(vm, thisObject, result); | |
RELEASE_AND_RETURN(throwScope, JSValue::encode(result)); | |
} | |
extern JSC_CALLCONV void BuildArtifactPrototype__loaderSetCachedValue(JSC::EncodedJSValue thisValue, JSC::JSGlobalObject *globalObject, JSC::EncodedJSValue value) | |
{ | |
auto& vm = globalObject->vm(); | |
auto* thisObject = jsCast<JSBuildArtifact*>(JSValue::decode(thisValue)); | |
thisObject->m_loader.set(vm, thisObject, JSValue::decode(value)); | |
} | |
extern JSC_CALLCONV JSC::EncodedJSValue BuildArtifactPrototype__loaderGetCachedValue(JSC::EncodedJSValue thisValue) | |
{ | |
auto* thisObject = jsCast<JSBuildArtifact*>(JSValue::decode(thisValue)); | |
return JSValue::encode(thisObject->m_loader.get()); | |
} | |
JSC_DEFINE_CUSTOM_GETTER(BuildArtifactPrototype__pathGetterWrap, (JSGlobalObject * lexicalGlobalObject, EncodedJSValue encodedThisValue, PropertyName attributeName)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
Zig::GlobalObject *globalObject = reinterpret_cast<Zig::GlobalObject*>(lexicalGlobalObject); | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
JSBuildArtifact* thisObject = jsCast<JSBuildArtifact*>(JSValue::decode(encodedThisValue)); | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
if (JSValue cachedValue = thisObject->m_path.get()) | |
return JSValue::encode(cachedValue); | |
JSC::JSValue result = JSC::JSValue::decode( | |
BuildArtifactPrototype__getPath(thisObject->wrapped(), globalObject) | |
); | |
RETURN_IF_EXCEPTION(throwScope, {}); | |
thisObject->m_path.set(vm, thisObject, result); | |
RELEASE_AND_RETURN(throwScope, JSValue::encode(result)); | |
} | |
extern JSC_CALLCONV void BuildArtifactPrototype__pathSetCachedValue(JSC::EncodedJSValue thisValue, JSC::JSGlobalObject *globalObject, JSC::EncodedJSValue value) | |
{ | |
auto& vm = globalObject->vm(); | |
auto* thisObject = jsCast<JSBuildArtifact*>(JSValue::decode(thisValue)); | |
thisObject->m_path.set(vm, thisObject, JSValue::decode(value)); | |
} | |
extern JSC_CALLCONV JSC::EncodedJSValue BuildArtifactPrototype__pathGetCachedValue(JSC::EncodedJSValue thisValue) | |
{ | |
auto* thisObject = jsCast<JSBuildArtifact*>(JSValue::decode(thisValue)); | |
return JSValue::encode(thisObject->m_path.get()); | |
} | |
JSC_DEFINE_CUSTOM_GETTER(BuildArtifactPrototype__sizeGetterWrap, (JSGlobalObject * lexicalGlobalObject, EncodedJSValue encodedThisValue, PropertyName attributeName)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
Zig::GlobalObject *globalObject = reinterpret_cast<Zig::GlobalObject*>(lexicalGlobalObject); | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
JSBuildArtifact* thisObject = jsCast<JSBuildArtifact*>(JSValue::decode(encodedThisValue)); | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
JSC::EncodedJSValue result = BuildArtifactPrototype__getSize(thisObject->wrapped(), globalObject); | |
RETURN_IF_EXCEPTION(throwScope, {}); | |
RELEASE_AND_RETURN(throwScope, result); | |
} | |
JSC_DEFINE_HOST_FUNCTION(BuildArtifactPrototype__sliceCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSBuildArtifact* thisObject = jsDynamicCast<JSBuildArtifact*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof BuildArtifact"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = BuildArtifactPrototype__getSlice(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "BuildArtifact.getSlice returned an empty value without an exception"); | |
return result; | |
#endif | |
return BuildArtifactPrototype__getSlice(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_CUSTOM_GETTER(BuildArtifactPrototype__sourcemapGetterWrap, (JSGlobalObject * lexicalGlobalObject, EncodedJSValue encodedThisValue, PropertyName attributeName)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
Zig::GlobalObject *globalObject = reinterpret_cast<Zig::GlobalObject*>(lexicalGlobalObject); | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
JSBuildArtifact* thisObject = jsCast<JSBuildArtifact*>(JSValue::decode(encodedThisValue)); | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
if (JSValue cachedValue = thisObject->m_sourcemap.get()) | |
return JSValue::encode(cachedValue); | |
JSC::JSValue result = JSC::JSValue::decode( | |
BuildArtifactPrototype__getSourceMap(thisObject->wrapped(), globalObject) | |
); | |
RETURN_IF_EXCEPTION(throwScope, {}); | |
thisObject->m_sourcemap.set(vm, thisObject, result); | |
RELEASE_AND_RETURN(throwScope, JSValue::encode(result)); | |
} | |
extern JSC_CALLCONV void BuildArtifactPrototype__sourcemapSetCachedValue(JSC::EncodedJSValue thisValue, JSC::JSGlobalObject *globalObject, JSC::EncodedJSValue value) | |
{ | |
auto& vm = globalObject->vm(); | |
auto* thisObject = jsCast<JSBuildArtifact*>(JSValue::decode(thisValue)); | |
thisObject->m_sourcemap.set(vm, thisObject, JSValue::decode(value)); | |
} | |
extern JSC_CALLCONV JSC::EncodedJSValue BuildArtifactPrototype__sourcemapGetCachedValue(JSC::EncodedJSValue thisValue) | |
{ | |
auto* thisObject = jsCast<JSBuildArtifact*>(JSValue::decode(thisValue)); | |
return JSValue::encode(thisObject->m_sourcemap.get()); | |
} | |
JSC_DEFINE_HOST_FUNCTION(BuildArtifactPrototype__streamCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSBuildArtifact* thisObject = jsDynamicCast<JSBuildArtifact*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof BuildArtifact"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = BuildArtifactPrototype__getStream(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "BuildArtifact.getStream returned an empty value without an exception"); | |
return result; | |
#endif | |
return BuildArtifactPrototype__getStream(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_HOST_FUNCTION(BuildArtifactPrototype__textCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSBuildArtifact* thisObject = jsDynamicCast<JSBuildArtifact*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof BuildArtifact"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = BuildArtifactPrototype__getText(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "BuildArtifact.getText returned an empty value without an exception"); | |
return result; | |
#endif | |
return BuildArtifactPrototype__getText(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_CUSTOM_GETTER(BuildArtifactPrototype__typeGetterWrap, (JSGlobalObject * lexicalGlobalObject, EncodedJSValue encodedThisValue, PropertyName attributeName)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
Zig::GlobalObject *globalObject = reinterpret_cast<Zig::GlobalObject*>(lexicalGlobalObject); | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
JSBuildArtifact* thisObject = jsCast<JSBuildArtifact*>(JSValue::decode(encodedThisValue)); | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
if (JSValue cachedValue = thisObject->m_type.get()) | |
return JSValue::encode(cachedValue); | |
JSC::JSValue result = JSC::JSValue::decode( | |
BuildArtifactPrototype__getMimeType(thisObject->wrapped(), globalObject) | |
); | |
RETURN_IF_EXCEPTION(throwScope, {}); | |
thisObject->m_type.set(vm, thisObject, result); | |
RELEASE_AND_RETURN(throwScope, JSValue::encode(result)); | |
} | |
extern JSC_CALLCONV void BuildArtifactPrototype__typeSetCachedValue(JSC::EncodedJSValue thisValue, JSC::JSGlobalObject *globalObject, JSC::EncodedJSValue value) | |
{ | |
auto& vm = globalObject->vm(); | |
auto* thisObject = jsCast<JSBuildArtifact*>(JSValue::decode(thisValue)); | |
thisObject->m_type.set(vm, thisObject, JSValue::decode(value)); | |
} | |
extern JSC_CALLCONV JSC::EncodedJSValue BuildArtifactPrototype__typeGetCachedValue(JSC::EncodedJSValue thisValue) | |
{ | |
auto* thisObject = jsCast<JSBuildArtifact*>(JSValue::decode(thisValue)); | |
return JSValue::encode(thisObject->m_type.get()); | |
} | |
void JSBuildArtifactPrototype::finishCreation(JSC::VM& vm, JSC::JSGlobalObject* globalObject) | |
{ | |
Base::finishCreation(vm); | |
reifyStaticProperties(vm, JSBuildArtifact::info(), JSBuildArtifactPrototypeTableValues, *this); | |
JSC_TO_STRING_TAG_WITHOUT_TRANSITION(); | |
} | |
JSBuildArtifact::~JSBuildArtifact() | |
{ | |
if (LIKELY(m_ctx)) { | |
BuildArtifactClass__finalize(m_ctx); | |
} | |
} | |
void JSBuildArtifact::destroy(JSCell* cell) | |
{ | |
static_cast<JSBuildArtifact*>(cell)->JSBuildArtifact::~JSBuildArtifact(); | |
} | |
const ClassInfo JSBuildArtifact::s_info = { "BuildArtifact"_s, &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSBuildArtifact) }; | |
void JSBuildArtifact::finishCreation(VM& vm) | |
{ | |
Base::finishCreation(vm); | |
ASSERT(inherits(info())); | |
} | |
JSBuildArtifact* JSBuildArtifact::create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure, void* ctx) { | |
JSBuildArtifact* ptr = new (NotNull, JSC::allocateCell<JSBuildArtifact>(vm)) JSBuildArtifact(vm, structure, ctx); | |
ptr->finishCreation(vm); | |
return ptr; | |
} | |
extern JSC_CALLCONV void* JSC_HOST_CALL_ATTRIBUTES BuildArtifact__fromJS(JSC::EncodedJSValue value) { | |
JSC::JSValue decodedValue = JSC::JSValue::decode(value); | |
if (decodedValue.isEmpty() || !decodedValue.isCell()) | |
return nullptr; | |
JSC::JSCell* cell = decodedValue.asCell(); | |
JSBuildArtifact* object = JSC::jsDynamicCast<JSBuildArtifact*>(cell); | |
if (!object) | |
return nullptr; | |
return object->wrapped(); | |
} | |
extern JSC_CALLCONV void* JSC_HOST_CALL_ATTRIBUTES BuildArtifact__fromJSDirect(JSC::EncodedJSValue value) { | |
JSC::JSValue decodedValue = JSC::JSValue::decode(value); | |
ASSERT(decodedValue.isCell()); | |
JSC::JSCell* cell = decodedValue.asCell(); | |
JSBuildArtifact* object = JSC::jsDynamicCast<JSBuildArtifact*>(cell); | |
if (!object) | |
return nullptr; | |
Zig::GlobalObject* globalObject = jsDynamicCast<Zig::GlobalObject*>(object->globalObject()); | |
if (UNLIKELY(globalObject == nullptr || cell->structureID() != globalObject->JSBuildArtifactStructure()->id())) { | |
return nullptr; | |
} | |
return object->wrapped(); | |
} | |
extern JSC_CALLCONV bool JSC_HOST_CALL_ATTRIBUTES BuildArtifact__dangerouslySetPtr(JSC::EncodedJSValue value, void* ptr) { | |
JSBuildArtifact* object = JSC::jsDynamicCast<JSBuildArtifact*>(JSValue::decode(value)); | |
if (!object) | |
return false; | |
object->m_ctx = ptr; | |
return true; | |
} | |
extern "C" const size_t BuildArtifact__ptrOffset = JSBuildArtifact::offsetOfWrapped(); | |
void JSBuildArtifact::analyzeHeap(JSCell* cell, HeapAnalyzer& analyzer) | |
{ | |
auto* thisObject = jsCast<JSBuildArtifact*>(cell); | |
if (void* wrapped = thisObject->wrapped()) { | |
// if (thisObject->scriptExecutionContext()) | |
// analyzer.setLabelForCell(cell, makeString("url ", thisObject->scriptExecutionContext()->url().string())); | |
} | |
Base::analyzeHeap(cell, analyzer); | |
} | |
JSObject* JSBuildArtifact::createPrototype(VM& vm, JSDOMGlobalObject* globalObject) | |
{ | |
auto *structure = JSBuildArtifactPrototype::createStructure(vm, globalObject, globalObject->objectPrototype()); | |
structure->setMayBePrototype(true); | |
return JSBuildArtifactPrototype::create(vm, globalObject, structure); | |
} | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES BuildArtifact__create(Zig::GlobalObject* globalObject, void* ptr) { | |
auto &vm = globalObject->vm(); | |
JSC::Structure* structure = globalObject->JSBuildArtifactStructure(); | |
JSBuildArtifact* instance = JSBuildArtifact::create(vm, globalObject, structure, ptr); | |
return JSValue::encode(instance); | |
} | |
template<typename Visitor> | |
void JSBuildArtifact::visitChildrenImpl(JSCell* cell, Visitor& visitor) | |
{ | |
JSBuildArtifact* thisObject = jsCast<JSBuildArtifact*>(cell); | |
ASSERT_GC_OBJECT_INHERITS(thisObject, info()); | |
Base::visitChildren(thisObject, visitor); | |
thisObject->visitAdditionalChildren<Visitor>(visitor); | |
} | |
DEFINE_VISIT_CHILDREN(JSBuildArtifact); | |
template<typename Visitor> | |
void JSBuildArtifact::visitAdditionalChildren(Visitor& visitor) | |
{ | |
JSBuildArtifact* thisObject = this; | |
ASSERT_GC_OBJECT_INHERITS(thisObject, info()); | |
visitor.append(thisObject->m_hash); | |
visitor.append(thisObject->m_kind); | |
visitor.append(thisObject->m_loader); | |
visitor.append(thisObject->m_path); | |
visitor.append(thisObject->m_sourcemap); | |
visitor.append(thisObject->m_type); | |
} | |
DEFINE_VISIT_ADDITIONAL_CHILDREN(JSBuildArtifact); | |
template<typename Visitor> | |
void JSBuildArtifact::visitOutputConstraintsImpl(JSCell *cell, Visitor& visitor) | |
{ | |
JSBuildArtifact* thisObject = jsCast<JSBuildArtifact*>(cell); | |
ASSERT_GC_OBJECT_INHERITS(thisObject, info()); | |
thisObject->visitAdditionalChildren<Visitor>(visitor); | |
} | |
DEFINE_VISIT_OUTPUT_CONSTRAINTS(JSBuildArtifact); | |
class JSBuildMessagePrototype final : public JSC::JSNonFinalObject { | |
public: | |
using Base = JSC::JSNonFinalObject; | |
static JSBuildMessagePrototype* create(JSC::VM& vm, JSGlobalObject* globalObject, JSC::Structure* structure) | |
{ | |
JSBuildMessagePrototype* ptr = new (NotNull, JSC::allocateCell<JSBuildMessagePrototype>(vm)) JSBuildMessagePrototype(vm, globalObject, structure); | |
ptr->finishCreation(vm, globalObject); | |
return ptr; | |
} | |
DECLARE_INFO; | |
template<typename CellType, JSC::SubspaceAccess> | |
static JSC::GCClient::IsoSubspace* subspaceFor(JSC::VM& vm) | |
{ | |
STATIC_ASSERT_ISO_SUBSPACE_SHARABLE(JSBuildMessagePrototype, Base); | |
return &vm.plainObjectSpace(); | |
} | |
static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype) | |
{ | |
return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info()); | |
} | |
private: | |
JSBuildMessagePrototype(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure) | |
: Base(vm, structure) | |
{ | |
} | |
void finishCreation(JSC::VM&, JSC::JSGlobalObject*); | |
}; | |
class JSBuildMessageConstructor final : public JSC::InternalFunction { | |
public: | |
using Base = JSC::InternalFunction; | |
static JSBuildMessageConstructor* create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure, JSBuildMessagePrototype* prototype); | |
static constexpr unsigned StructureFlags = Base::StructureFlags; | |
static constexpr bool needsDestruction = false; | |
static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype) | |
{ | |
return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::InternalFunctionType, StructureFlags), info()); | |
} | |
template<typename, JSC::SubspaceAccess mode> static JSC::GCClient::IsoSubspace* subspaceFor(JSC::VM& vm) | |
{ | |
if constexpr (mode == JSC::SubspaceAccess::Concurrently) | |
return nullptr; | |
return WebCore::subspaceForImpl<JSBuildMessageConstructor, WebCore::UseCustomHeapCellType::No>( | |
vm, | |
[](auto& spaces) { return spaces.m_clientSubspaceForBunClassConstructor.get(); }, | |
[](auto& spaces, auto&& space) { spaces.m_clientSubspaceForBunClassConstructor = std::forward<decltype(space)>(space); }, | |
[](auto& spaces) { return spaces.m_subspaceForBunClassConstructor.get(); }, | |
[](auto& spaces, auto&& space) { spaces.m_subspaceForBunClassConstructor = std::forward<decltype(space)>(space); }); | |
} | |
void initializeProperties(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSBuildMessagePrototype* prototype); | |
// Must be defined for each specialization class. | |
static JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES construct(JSC::JSGlobalObject*, JSC::CallFrame*); | |
static JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES call(JSC::JSGlobalObject*, JSC::CallFrame*); | |
DECLARE_EXPORT_INFO; | |
private: | |
JSBuildMessageConstructor(JSC::VM& vm, JSC::Structure* structure); | |
void finishCreation(JSC::VM&, JSC::JSGlobalObject* globalObject, JSBuildMessagePrototype* prototype); | |
}; | |
JSC_DECLARE_HOST_FUNCTION(BuildMessagePrototype__toPrimitiveCallback); | |
JSC_DECLARE_CUSTOM_GETTER(BuildMessagePrototype__columnGetterWrap); | |
JSC_DECLARE_CUSTOM_GETTER(BuildMessagePrototype__levelGetterWrap); | |
JSC_DECLARE_CUSTOM_GETTER(BuildMessagePrototype__lineGetterWrap); | |
JSC_DECLARE_CUSTOM_GETTER(BuildMessagePrototype__messageGetterWrap); | |
JSC_DECLARE_CUSTOM_SETTER(BuildMessagePrototype__messageSetterWrap); | |
JSC_DECLARE_CUSTOM_GETTER(BuildMessagePrototype__notesGetterWrap); | |
JSC_DECLARE_CUSTOM_GETTER(BuildMessagePrototype__positionGetterWrap); | |
JSC_DECLARE_HOST_FUNCTION(BuildMessagePrototype__toJSONCallback); | |
JSC_DECLARE_HOST_FUNCTION(BuildMessagePrototype__toStringCallback); | |
STATIC_ASSERT_ISO_SUBSPACE_SHARABLE(JSBuildMessagePrototype, JSBuildMessagePrototype::Base); | |
static const HashTableValue JSBuildMessagePrototypeTableValues[8] = { | |
{ "column"_s, static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::GetterSetterType, BuildMessagePrototype__columnGetterWrap, 0 } } , | |
{ "level"_s, static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::GetterSetterType, BuildMessagePrototype__levelGetterWrap, 0 } } , | |
{ "line"_s, static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::GetterSetterType, BuildMessagePrototype__lineGetterWrap, 0 } } , | |
{ "message"_s, static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::GetterSetterType, BuildMessagePrototype__messageGetterWrap, BuildMessagePrototype__messageSetterWrap } } , | |
{ "notes"_s, static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::GetterSetterType, BuildMessagePrototype__notesGetterWrap, 0 } } , | |
{ "position"_s, static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::GetterSetterType, BuildMessagePrototype__positionGetterWrap, 0 } } , | |
{ "toJSON"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, BuildMessagePrototype__toJSONCallback, 0 } } , | |
{ "toString"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, BuildMessagePrototype__toStringCallback, 0 } } | |
}; | |
const ClassInfo JSBuildMessagePrototype::s_info = { "BuildMessage"_s, &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSBuildMessagePrototype) }; | |
JSC_DEFINE_CUSTOM_GETTER(jsBuildMessageConstructor, (JSGlobalObject * lexicalGlobalObject, EncodedJSValue thisValue, PropertyName)) | |
{ | |
VM& vm = JSC::getVM(lexicalGlobalObject); | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
auto* globalObject = reinterpret_cast<Zig::GlobalObject*>(lexicalGlobalObject); | |
auto* prototype = jsDynamicCast<JSBuildMessagePrototype*>(JSValue::decode(thisValue)); | |
if (UNLIKELY(!prototype)) | |
return throwVMTypeError(lexicalGlobalObject, throwScope, "Cannot get constructor for BuildMessage"_s); | |
return JSValue::encode(globalObject->JSBuildMessageConstructor()); | |
} | |
JSC_DEFINE_HOST_FUNCTION(BuildMessagePrototype__toPrimitiveCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSBuildMessage* thisObject = jsDynamicCast<JSBuildMessage*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof BuildMessage"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = BuildMessagePrototype__toPrimitive(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "BuildMessage.toPrimitive returned an empty value without an exception"); | |
return result; | |
#endif | |
return BuildMessagePrototype__toPrimitive(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_CUSTOM_GETTER(BuildMessagePrototype__columnGetterWrap, (JSGlobalObject * lexicalGlobalObject, EncodedJSValue encodedThisValue, PropertyName attributeName)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
Zig::GlobalObject *globalObject = reinterpret_cast<Zig::GlobalObject*>(lexicalGlobalObject); | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
JSBuildMessage* thisObject = jsCast<JSBuildMessage*>(JSValue::decode(encodedThisValue)); | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
JSC::EncodedJSValue result = BuildMessagePrototype__getColumn(thisObject->wrapped(), globalObject); | |
RETURN_IF_EXCEPTION(throwScope, {}); | |
RELEASE_AND_RETURN(throwScope, result); | |
} | |
JSC_DEFINE_CUSTOM_GETTER(BuildMessagePrototype__levelGetterWrap, (JSGlobalObject * lexicalGlobalObject, EncodedJSValue encodedThisValue, PropertyName attributeName)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
Zig::GlobalObject *globalObject = reinterpret_cast<Zig::GlobalObject*>(lexicalGlobalObject); | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
JSBuildMessage* thisObject = jsCast<JSBuildMessage*>(JSValue::decode(encodedThisValue)); | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
if (JSValue cachedValue = thisObject->m_level.get()) | |
return JSValue::encode(cachedValue); | |
JSC::JSValue result = JSC::JSValue::decode( | |
BuildMessagePrototype__getLevel(thisObject->wrapped(), globalObject) | |
); | |
RETURN_IF_EXCEPTION(throwScope, {}); | |
thisObject->m_level.set(vm, thisObject, result); | |
RELEASE_AND_RETURN(throwScope, JSValue::encode(result)); | |
} | |
extern JSC_CALLCONV void BuildMessagePrototype__levelSetCachedValue(JSC::EncodedJSValue thisValue, JSC::JSGlobalObject *globalObject, JSC::EncodedJSValue value) | |
{ | |
auto& vm = globalObject->vm(); | |
auto* thisObject = jsCast<JSBuildMessage*>(JSValue::decode(thisValue)); | |
thisObject->m_level.set(vm, thisObject, JSValue::decode(value)); | |
} | |
extern JSC_CALLCONV JSC::EncodedJSValue BuildMessagePrototype__levelGetCachedValue(JSC::EncodedJSValue thisValue) | |
{ | |
auto* thisObject = jsCast<JSBuildMessage*>(JSValue::decode(thisValue)); | |
return JSValue::encode(thisObject->m_level.get()); | |
} | |
JSC_DEFINE_CUSTOM_GETTER(BuildMessagePrototype__lineGetterWrap, (JSGlobalObject * lexicalGlobalObject, EncodedJSValue encodedThisValue, PropertyName attributeName)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
Zig::GlobalObject *globalObject = reinterpret_cast<Zig::GlobalObject*>(lexicalGlobalObject); | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
JSBuildMessage* thisObject = jsCast<JSBuildMessage*>(JSValue::decode(encodedThisValue)); | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
JSC::EncodedJSValue result = BuildMessagePrototype__getLine(thisObject->wrapped(), globalObject); | |
RETURN_IF_EXCEPTION(throwScope, {}); | |
RELEASE_AND_RETURN(throwScope, result); | |
} | |
JSC_DEFINE_CUSTOM_GETTER(BuildMessagePrototype__messageGetterWrap, (JSGlobalObject * lexicalGlobalObject, EncodedJSValue encodedThisValue, PropertyName attributeName)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
Zig::GlobalObject *globalObject = reinterpret_cast<Zig::GlobalObject*>(lexicalGlobalObject); | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
JSBuildMessage* thisObject = jsCast<JSBuildMessage*>(JSValue::decode(encodedThisValue)); | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
if (JSValue cachedValue = thisObject->m_message.get()) | |
return JSValue::encode(cachedValue); | |
JSC::JSValue result = JSC::JSValue::decode( | |
BuildMessagePrototype__getMessage(thisObject->wrapped(), globalObject) | |
); | |
RETURN_IF_EXCEPTION(throwScope, {}); | |
thisObject->m_message.set(vm, thisObject, result); | |
RELEASE_AND_RETURN(throwScope, JSValue::encode(result)); | |
} | |
JSC_DEFINE_CUSTOM_SETTER(BuildMessagePrototype__messageSetterWrap, (JSGlobalObject * lexicalGlobalObject, EncodedJSValue encodedThisValue, EncodedJSValue encodedValue, PropertyName attributeName)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
JSBuildMessage* thisObject = jsCast<JSBuildMessage*>(JSValue::decode(encodedThisValue)); | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
thisObject->m_message.set(vm, thisObject, JSValue::decode(encodedValue)); | |
RELEASE_AND_RETURN(throwScope, true); | |
} | |
extern JSC_CALLCONV void BuildMessagePrototype__messageSetCachedValue(JSC::EncodedJSValue thisValue, JSC::JSGlobalObject *globalObject, JSC::EncodedJSValue value) | |
{ | |
auto& vm = globalObject->vm(); | |
auto* thisObject = jsCast<JSBuildMessage*>(JSValue::decode(thisValue)); | |
thisObject->m_message.set(vm, thisObject, JSValue::decode(value)); | |
} | |
extern JSC_CALLCONV JSC::EncodedJSValue BuildMessagePrototype__messageGetCachedValue(JSC::EncodedJSValue thisValue) | |
{ | |
auto* thisObject = jsCast<JSBuildMessage*>(JSValue::decode(thisValue)); | |
return JSValue::encode(thisObject->m_message.get()); | |
} | |
JSC_DEFINE_CUSTOM_GETTER(BuildMessagePrototype__notesGetterWrap, (JSGlobalObject * lexicalGlobalObject, EncodedJSValue encodedThisValue, PropertyName attributeName)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
Zig::GlobalObject *globalObject = reinterpret_cast<Zig::GlobalObject*>(lexicalGlobalObject); | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
JSBuildMessage* thisObject = jsCast<JSBuildMessage*>(JSValue::decode(encodedThisValue)); | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
if (JSValue cachedValue = thisObject->m_notes.get()) | |
return JSValue::encode(cachedValue); | |
JSC::JSValue result = JSC::JSValue::decode( | |
BuildMessagePrototype__getNotes(thisObject->wrapped(), globalObject) | |
); | |
RETURN_IF_EXCEPTION(throwScope, {}); | |
thisObject->m_notes.set(vm, thisObject, result); | |
RELEASE_AND_RETURN(throwScope, JSValue::encode(result)); | |
} | |
extern JSC_CALLCONV void BuildMessagePrototype__notesSetCachedValue(JSC::EncodedJSValue thisValue, JSC::JSGlobalObject *globalObject, JSC::EncodedJSValue value) | |
{ | |
auto& vm = globalObject->vm(); | |
auto* thisObject = jsCast<JSBuildMessage*>(JSValue::decode(thisValue)); | |
thisObject->m_notes.set(vm, thisObject, JSValue::decode(value)); | |
} | |
extern JSC_CALLCONV JSC::EncodedJSValue BuildMessagePrototype__notesGetCachedValue(JSC::EncodedJSValue thisValue) | |
{ | |
auto* thisObject = jsCast<JSBuildMessage*>(JSValue::decode(thisValue)); | |
return JSValue::encode(thisObject->m_notes.get()); | |
} | |
JSC_DEFINE_CUSTOM_GETTER(BuildMessagePrototype__positionGetterWrap, (JSGlobalObject * lexicalGlobalObject, EncodedJSValue encodedThisValue, PropertyName attributeName)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
Zig::GlobalObject *globalObject = reinterpret_cast<Zig::GlobalObject*>(lexicalGlobalObject); | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
JSBuildMessage* thisObject = jsCast<JSBuildMessage*>(JSValue::decode(encodedThisValue)); | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
if (JSValue cachedValue = thisObject->m_position.get()) | |
return JSValue::encode(cachedValue); | |
JSC::JSValue result = JSC::JSValue::decode( | |
BuildMessagePrototype__getPosition(thisObject->wrapped(), globalObject) | |
); | |
RETURN_IF_EXCEPTION(throwScope, {}); | |
thisObject->m_position.set(vm, thisObject, result); | |
RELEASE_AND_RETURN(throwScope, JSValue::encode(result)); | |
} | |
extern JSC_CALLCONV void BuildMessagePrototype__positionSetCachedValue(JSC::EncodedJSValue thisValue, JSC::JSGlobalObject *globalObject, JSC::EncodedJSValue value) | |
{ | |
auto& vm = globalObject->vm(); | |
auto* thisObject = jsCast<JSBuildMessage*>(JSValue::decode(thisValue)); | |
thisObject->m_position.set(vm, thisObject, JSValue::decode(value)); | |
} | |
extern JSC_CALLCONV JSC::EncodedJSValue BuildMessagePrototype__positionGetCachedValue(JSC::EncodedJSValue thisValue) | |
{ | |
auto* thisObject = jsCast<JSBuildMessage*>(JSValue::decode(thisValue)); | |
return JSValue::encode(thisObject->m_position.get()); | |
} | |
JSC_DEFINE_HOST_FUNCTION(BuildMessagePrototype__toJSONCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSBuildMessage* thisObject = jsDynamicCast<JSBuildMessage*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof BuildMessage"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = BuildMessagePrototype__toJSON(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "BuildMessage.toJSON returned an empty value without an exception"); | |
return result; | |
#endif | |
return BuildMessagePrototype__toJSON(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_HOST_FUNCTION(BuildMessagePrototype__toStringCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSBuildMessage* thisObject = jsDynamicCast<JSBuildMessage*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof BuildMessage"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = BuildMessagePrototype__toString(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "BuildMessage.toString returned an empty value without an exception"); | |
return result; | |
#endif | |
return BuildMessagePrototype__toString(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
void JSBuildMessagePrototype::finishCreation(JSC::VM& vm, JSC::JSGlobalObject* globalObject) | |
{ | |
Base::finishCreation(vm); | |
reifyStaticProperties(vm, JSBuildMessage::info(), JSBuildMessagePrototypeTableValues, *this); | |
this->putDirect(vm, vm.propertyNames->toPrimitiveSymbol, JSFunction::create(vm, globalObject, 1, String("toPrimitive"_s), BuildMessagePrototype__toPrimitiveCallback, ImplementationVisibility::Public), PropertyAttribute::ReadOnly | PropertyAttribute::DontEnum | 0); | |
this->putDirect(vm, vm.propertyNames->name, jsString(vm, String("BuildMessage"_s)), PropertyAttribute::ReadOnly | 0); | |
JSC_TO_STRING_TAG_WITHOUT_TRANSITION(); | |
} | |
void JSBuildMessageConstructor::finishCreation(VM& vm, JSC::JSGlobalObject* globalObject, JSBuildMessagePrototype* prototype) | |
{ | |
Base::finishCreation(vm, 0, "BuildMessage"_s, PropertyAdditionMode::WithoutStructureTransition); | |
putDirectWithoutTransition(vm, vm.propertyNames->prototype, prototype, PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly); | |
ASSERT(inherits(info())); | |
} | |
JSBuildMessageConstructor::JSBuildMessageConstructor(JSC::VM& vm, JSC::Structure* structure) : Base(vm, structure, call, construct) { | |
} | |
JSBuildMessageConstructor* JSBuildMessageConstructor::create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure, JSBuildMessagePrototype* prototype) { | |
JSBuildMessageConstructor* ptr = new (NotNull, JSC::allocateCell<JSBuildMessageConstructor>(vm)) JSBuildMessageConstructor(vm, structure); | |
ptr->finishCreation(vm, globalObject, prototype); | |
return ptr; | |
} | |
JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES JSBuildMessageConstructor::call(JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame) | |
{ | |
Zig::GlobalObject *globalObject = reinterpret_cast<Zig::GlobalObject*>(lexicalGlobalObject); | |
JSC::VM &vm = globalObject->vm(); | |
auto scope = DECLARE_THROW_SCOPE(vm); | |
void* ptr = BuildMessageClass__construct(globalObject, callFrame); | |
if (UNLIKELY(!ptr || scope.exception())) { | |
return JSValue::encode(JSC::jsUndefined()); | |
} | |
Structure* structure = globalObject->JSBuildMessageStructure(); | |
JSBuildMessage* instance = JSBuildMessage::create(vm, globalObject, structure, ptr); | |
RETURN_IF_EXCEPTION(scope, {}); | |
RELEASE_AND_RETURN(scope, JSValue::encode(instance)); | |
} | |
JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES JSBuildMessageConstructor::construct(JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame) | |
{ | |
Zig::GlobalObject *globalObject = reinterpret_cast<Zig::GlobalObject*>(lexicalGlobalObject); | |
JSC::VM &vm = globalObject->vm(); | |
auto scope = DECLARE_THROW_SCOPE(vm); | |
JSObject* newTarget = asObject(callFrame->newTarget()); | |
auto* constructor = globalObject->JSBuildMessageConstructor(); | |
Structure* structure = globalObject->JSBuildMessageStructure(); | |
if (UNLIKELY(constructor != newTarget)) { | |
auto* functionGlobalObject = reinterpret_cast<Zig::GlobalObject*>( | |
// ShadowRealm functions belong to a different global object. | |
getFunctionRealm(globalObject, newTarget) | |
); | |
RETURN_IF_EXCEPTION(scope, {}); | |
structure = InternalFunction::createSubclassStructure( | |
globalObject, | |
newTarget, | |
functionGlobalObject->JSBuildMessageStructure() | |
); | |
} | |
void* ptr = BuildMessageClass__construct(globalObject, callFrame); | |
if (UNLIKELY(!ptr || scope.exception())) { | |
return JSValue::encode(JSC::jsUndefined()); | |
} | |
JSBuildMessage* instance = JSBuildMessage::create(vm, globalObject, structure, ptr); | |
RELEASE_AND_RETURN(scope, JSValue::encode(instance)); | |
} | |
void JSBuildMessageConstructor::initializeProperties(VM& vm, JSC::JSGlobalObject* globalObject, JSBuildMessagePrototype* prototype) | |
{ | |
} | |
const ClassInfo JSBuildMessageConstructor::s_info = { "Function"_s, &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSBuildMessageConstructor) }; | |
extern JSC_CALLCONV JSC::EncodedJSValue BuildMessage__getConstructor(Zig::GlobalObject* globalObject) { | |
return JSValue::encode(globalObject->JSBuildMessageConstructor()); | |
} | |
JSBuildMessage::~JSBuildMessage() | |
{ | |
if (LIKELY(m_ctx)) { | |
BuildMessageClass__finalize(m_ctx); | |
} | |
} | |
void JSBuildMessage::destroy(JSCell* cell) | |
{ | |
static_cast<JSBuildMessage*>(cell)->JSBuildMessage::~JSBuildMessage(); | |
} | |
const ClassInfo JSBuildMessage::s_info = { "BuildMessage"_s, &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSBuildMessage) }; | |
void JSBuildMessage::finishCreation(VM& vm) | |
{ | |
Base::finishCreation(vm); | |
ASSERT(inherits(info())); | |
} | |
JSBuildMessage* JSBuildMessage::create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure, void* ctx) { | |
JSBuildMessage* ptr = new (NotNull, JSC::allocateCell<JSBuildMessage>(vm)) JSBuildMessage(vm, structure, ctx); | |
ptr->finishCreation(vm); | |
return ptr; | |
} | |
extern JSC_CALLCONV void* JSC_HOST_CALL_ATTRIBUTES BuildMessage__fromJS(JSC::EncodedJSValue value) { | |
JSC::JSValue decodedValue = JSC::JSValue::decode(value); | |
if (decodedValue.isEmpty() || !decodedValue.isCell()) | |
return nullptr; | |
JSC::JSCell* cell = decodedValue.asCell(); | |
JSBuildMessage* object = JSC::jsDynamicCast<JSBuildMessage*>(cell); | |
if (!object) | |
return nullptr; | |
return object->wrapped(); | |
} | |
extern JSC_CALLCONV void* JSC_HOST_CALL_ATTRIBUTES BuildMessage__fromJSDirect(JSC::EncodedJSValue value) { | |
JSC::JSValue decodedValue = JSC::JSValue::decode(value); | |
ASSERT(decodedValue.isCell()); | |
JSC::JSCell* cell = decodedValue.asCell(); | |
JSBuildMessage* object = JSC::jsDynamicCast<JSBuildMessage*>(cell); | |
if (!object) | |
return nullptr; | |
Zig::GlobalObject* globalObject = jsDynamicCast<Zig::GlobalObject*>(object->globalObject()); | |
if (UNLIKELY(globalObject == nullptr || cell->structureID() != globalObject->JSBuildMessageStructure()->id())) { | |
return nullptr; | |
} | |
return object->wrapped(); | |
} | |
extern JSC_CALLCONV bool JSC_HOST_CALL_ATTRIBUTES BuildMessage__dangerouslySetPtr(JSC::EncodedJSValue value, void* ptr) { | |
JSBuildMessage* object = JSC::jsDynamicCast<JSBuildMessage*>(JSValue::decode(value)); | |
if (!object) | |
return false; | |
object->m_ctx = ptr; | |
return true; | |
} | |
extern "C" const size_t BuildMessage__ptrOffset = JSBuildMessage::offsetOfWrapped(); | |
void JSBuildMessage::analyzeHeap(JSCell* cell, HeapAnalyzer& analyzer) | |
{ | |
auto* thisObject = jsCast<JSBuildMessage*>(cell); | |
if (void* wrapped = thisObject->wrapped()) { | |
// if (thisObject->scriptExecutionContext()) | |
// analyzer.setLabelForCell(cell, makeString("url ", thisObject->scriptExecutionContext()->url().string())); | |
} | |
Base::analyzeHeap(cell, analyzer); | |
} | |
JSObject* JSBuildMessage::createConstructor(VM& vm, JSGlobalObject* globalObject, JSValue prototype) | |
{ | |
return WebCore::JSBuildMessageConstructor::create(vm, globalObject, WebCore::JSBuildMessageConstructor::createStructure(vm, globalObject, globalObject->functionPrototype()), jsCast<WebCore::JSBuildMessagePrototype*>(prototype)); | |
} | |
JSObject* JSBuildMessage::getConstructor(Zig::GlobalObject* globalObject) | |
{ | |
return globalObject->JSBuildMessageConstructor(); | |
} | |
JSObject* JSBuildMessage::createPrototype(VM& vm, JSDOMGlobalObject* globalObject) | |
{ | |
auto *structure = JSBuildMessagePrototype::createStructure(vm, globalObject, globalObject->objectPrototype()); | |
structure->setMayBePrototype(true); | |
return JSBuildMessagePrototype::create(vm, globalObject, structure); | |
} | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES BuildMessage__create(Zig::GlobalObject* globalObject, void* ptr) { | |
auto &vm = globalObject->vm(); | |
JSC::Structure* structure = globalObject->JSBuildMessageStructure(); | |
JSBuildMessage* instance = JSBuildMessage::create(vm, globalObject, structure, ptr); | |
return JSValue::encode(instance); | |
} | |
template<typename Visitor> | |
void JSBuildMessage::visitChildrenImpl(JSCell* cell, Visitor& visitor) | |
{ | |
JSBuildMessage* thisObject = jsCast<JSBuildMessage*>(cell); | |
ASSERT_GC_OBJECT_INHERITS(thisObject, info()); | |
Base::visitChildren(thisObject, visitor); | |
thisObject->visitAdditionalChildren<Visitor>(visitor); | |
} | |
DEFINE_VISIT_CHILDREN(JSBuildMessage); | |
template<typename Visitor> | |
void JSBuildMessage::visitAdditionalChildren(Visitor& visitor) | |
{ | |
JSBuildMessage* thisObject = this; | |
ASSERT_GC_OBJECT_INHERITS(thisObject, info()); | |
visitor.append(thisObject->m_level); | |
visitor.append(thisObject->m_message); | |
visitor.append(thisObject->m_notes); | |
visitor.append(thisObject->m_position); | |
} | |
DEFINE_VISIT_ADDITIONAL_CHILDREN(JSBuildMessage); | |
template<typename Visitor> | |
void JSBuildMessage::visitOutputConstraintsImpl(JSCell *cell, Visitor& visitor) | |
{ | |
JSBuildMessage* thisObject = jsCast<JSBuildMessage*>(cell); | |
ASSERT_GC_OBJECT_INHERITS(thisObject, info()); | |
thisObject->visitAdditionalChildren<Visitor>(visitor); | |
} | |
DEFINE_VISIT_OUTPUT_CONSTRAINTS(JSBuildMessage); | |
class JSBytesInternalReadableStreamSourcePrototype final : public JSC::JSNonFinalObject { | |
public: | |
using Base = JSC::JSNonFinalObject; | |
static JSBytesInternalReadableStreamSourcePrototype* create(JSC::VM& vm, JSGlobalObject* globalObject, JSC::Structure* structure) | |
{ | |
JSBytesInternalReadableStreamSourcePrototype* ptr = new (NotNull, JSC::allocateCell<JSBytesInternalReadableStreamSourcePrototype>(vm)) JSBytesInternalReadableStreamSourcePrototype(vm, globalObject, structure); | |
ptr->finishCreation(vm, globalObject); | |
return ptr; | |
} | |
DECLARE_INFO; | |
template<typename CellType, JSC::SubspaceAccess> | |
static JSC::GCClient::IsoSubspace* subspaceFor(JSC::VM& vm) | |
{ | |
STATIC_ASSERT_ISO_SUBSPACE_SHARABLE(JSBytesInternalReadableStreamSourcePrototype, Base); | |
return &vm.plainObjectSpace(); | |
} | |
static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype) | |
{ | |
return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info()); | |
} | |
private: | |
JSBytesInternalReadableStreamSourcePrototype(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure) | |
: Base(vm, structure) | |
{ | |
} | |
void finishCreation(JSC::VM&, JSC::JSGlobalObject*); | |
}; | |
JSC_DECLARE_HOST_FUNCTION(BytesInternalReadableStreamSourcePrototype__cancelCallback); | |
JSC_DECLARE_HOST_FUNCTION(BytesInternalReadableStreamSourcePrototype__drainCallback); | |
JSC_DECLARE_CUSTOM_GETTER(BytesInternalReadableStreamSourcePrototype__isClosedGetterWrap); | |
JSC_DECLARE_CUSTOM_GETTER(BytesInternalReadableStreamSourcePrototype__onCloseGetterWrap); | |
static JSC_DECLARE_CUSTOM_SETTER(BytesInternalReadableStreamSourcePrototype__onCloseSetterWrap); | |
JSC_DECLARE_CUSTOM_GETTER(BytesInternalReadableStreamSourcePrototype__onDrainGetterWrap); | |
static JSC_DECLARE_CUSTOM_SETTER(BytesInternalReadableStreamSourcePrototype__onDrainSetterWrap); | |
JSC_DECLARE_HOST_FUNCTION(BytesInternalReadableStreamSourcePrototype__pullCallback); | |
JSC_DECLARE_HOST_FUNCTION(BytesInternalReadableStreamSourcePrototype__startCallback); | |
JSC_DECLARE_HOST_FUNCTION(BytesInternalReadableStreamSourcePrototype__updateRefCallback); | |
STATIC_ASSERT_ISO_SUBSPACE_SHARABLE(JSBytesInternalReadableStreamSourcePrototype, JSBytesInternalReadableStreamSourcePrototype::Base); | |
static const HashTableValue JSBytesInternalReadableStreamSourcePrototypeTableValues[8] = { | |
{ "cancel"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, BytesInternalReadableStreamSourcePrototype__cancelCallback, 1 } } , | |
{ "drain"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, BytesInternalReadableStreamSourcePrototype__drainCallback, 1 } } , | |
{ "isClosed"_s, static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::GetterSetterType, BytesInternalReadableStreamSourcePrototype__isClosedGetterWrap, 0 } } , | |
{ "onClose"_s, static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::GetterSetterType, BytesInternalReadableStreamSourcePrototype__onCloseGetterWrap, BytesInternalReadableStreamSourcePrototype__onCloseSetterWrap } } , | |
{ "onDrain"_s, static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::GetterSetterType, BytesInternalReadableStreamSourcePrototype__onDrainGetterWrap, BytesInternalReadableStreamSourcePrototype__onDrainSetterWrap } } , | |
{ "pull"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, BytesInternalReadableStreamSourcePrototype__pullCallback, 1 } } , | |
{ "start"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, BytesInternalReadableStreamSourcePrototype__startCallback, 1 } } , | |
{ "updateRef"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, BytesInternalReadableStreamSourcePrototype__updateRefCallback, 1 } } | |
}; | |
const ClassInfo JSBytesInternalReadableStreamSourcePrototype::s_info = { "BytesInternalReadableStreamSource"_s, &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSBytesInternalReadableStreamSourcePrototype) }; | |
JSC_DEFINE_HOST_FUNCTION(BytesInternalReadableStreamSourcePrototype__cancelCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSBytesInternalReadableStreamSource* thisObject = jsDynamicCast<JSBytesInternalReadableStreamSource*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof BytesInternalReadableStreamSource"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = BytesInternalReadableStreamSourcePrototype__cancelFromJS(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "BytesInternalReadableStreamSource.cancelFromJS returned an empty value without an exception"); | |
return result; | |
#endif | |
return BytesInternalReadableStreamSourcePrototype__cancelFromJS(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_HOST_FUNCTION(BytesInternalReadableStreamSourcePrototype__drainCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSBytesInternalReadableStreamSource* thisObject = jsDynamicCast<JSBytesInternalReadableStreamSource*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof BytesInternalReadableStreamSource"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = BytesInternalReadableStreamSourcePrototype__drainFromJS(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "BytesInternalReadableStreamSource.drainFromJS returned an empty value without an exception"); | |
return result; | |
#endif | |
return BytesInternalReadableStreamSourcePrototype__drainFromJS(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_CUSTOM_GETTER(BytesInternalReadableStreamSourcePrototype__isClosedGetterWrap, (JSGlobalObject * lexicalGlobalObject, EncodedJSValue encodedThisValue, PropertyName attributeName)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
Zig::GlobalObject *globalObject = reinterpret_cast<Zig::GlobalObject*>(lexicalGlobalObject); | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
JSBytesInternalReadableStreamSource* thisObject = jsCast<JSBytesInternalReadableStreamSource*>(JSValue::decode(encodedThisValue)); | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
JSC::EncodedJSValue result = BytesInternalReadableStreamSourcePrototype__getIsClosedFromJS(thisObject->wrapped(), globalObject); | |
RETURN_IF_EXCEPTION(throwScope, {}); | |
RELEASE_AND_RETURN(throwScope, result); | |
} | |
JSC_DEFINE_CUSTOM_GETTER(BytesInternalReadableStreamSourcePrototype__onCloseGetterWrap, (JSGlobalObject * lexicalGlobalObject, EncodedJSValue encodedThisValue, PropertyName attributeName)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
Zig::GlobalObject *globalObject = reinterpret_cast<Zig::GlobalObject*>(lexicalGlobalObject); | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
JSBytesInternalReadableStreamSource* thisObject = jsCast<JSBytesInternalReadableStreamSource*>(JSValue::decode(encodedThisValue)); | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
JSC::EncodedJSValue result = BytesInternalReadableStreamSourcePrototype__getOnCloseFromJS(thisObject->wrapped(), globalObject); | |
RETURN_IF_EXCEPTION(throwScope, {}); | |
RELEASE_AND_RETURN(throwScope, result); | |
} | |
JSC_DEFINE_CUSTOM_SETTER(BytesInternalReadableStreamSourcePrototype__onCloseSetterWrap, (JSGlobalObject * lexicalGlobalObject, EncodedJSValue encodedThisValue, EncodedJSValue encodedValue, PropertyName attributeName)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
JSBytesInternalReadableStreamSource* thisObject = jsCast<JSBytesInternalReadableStreamSource*>(JSValue::decode(encodedThisValue)); | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
auto result = BytesInternalReadableStreamSourcePrototype__setOnCloseFromJS(thisObject->wrapped(), lexicalGlobalObject, encodedValue); | |
RELEASE_AND_RETURN(throwScope, result); | |
} | |
JSC_DEFINE_CUSTOM_GETTER(BytesInternalReadableStreamSourcePrototype__onDrainGetterWrap, (JSGlobalObject * lexicalGlobalObject, EncodedJSValue encodedThisValue, PropertyName attributeName)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
Zig::GlobalObject *globalObject = reinterpret_cast<Zig::GlobalObject*>(lexicalGlobalObject); | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
JSBytesInternalReadableStreamSource* thisObject = jsCast<JSBytesInternalReadableStreamSource*>(JSValue::decode(encodedThisValue)); | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
JSC::EncodedJSValue result = BytesInternalReadableStreamSourcePrototype__getOnDrainFromJS(thisObject->wrapped(), globalObject); | |
RETURN_IF_EXCEPTION(throwScope, {}); | |
RELEASE_AND_RETURN(throwScope, result); | |
} | |
JSC_DEFINE_CUSTOM_SETTER(BytesInternalReadableStreamSourcePrototype__onDrainSetterWrap, (JSGlobalObject * lexicalGlobalObject, EncodedJSValue encodedThisValue, EncodedJSValue encodedValue, PropertyName attributeName)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
JSBytesInternalReadableStreamSource* thisObject = jsCast<JSBytesInternalReadableStreamSource*>(JSValue::decode(encodedThisValue)); | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
auto result = BytesInternalReadableStreamSourcePrototype__setOnDrainFromJS(thisObject->wrapped(), lexicalGlobalObject, encodedValue); | |
RELEASE_AND_RETURN(throwScope, result); | |
} | |
JSC_DEFINE_HOST_FUNCTION(BytesInternalReadableStreamSourcePrototype__pullCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSBytesInternalReadableStreamSource* thisObject = jsDynamicCast<JSBytesInternalReadableStreamSource*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof BytesInternalReadableStreamSource"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = BytesInternalReadableStreamSourcePrototype__pullFromJS(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "BytesInternalReadableStreamSource.pullFromJS returned an empty value without an exception"); | |
return result; | |
#endif | |
return BytesInternalReadableStreamSourcePrototype__pullFromJS(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_HOST_FUNCTION(BytesInternalReadableStreamSourcePrototype__startCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSBytesInternalReadableStreamSource* thisObject = jsDynamicCast<JSBytesInternalReadableStreamSource*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof BytesInternalReadableStreamSource"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = BytesInternalReadableStreamSourcePrototype__startFromJS(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "BytesInternalReadableStreamSource.startFromJS returned an empty value without an exception"); | |
return result; | |
#endif | |
return BytesInternalReadableStreamSourcePrototype__startFromJS(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_HOST_FUNCTION(BytesInternalReadableStreamSourcePrototype__updateRefCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSBytesInternalReadableStreamSource* thisObject = jsDynamicCast<JSBytesInternalReadableStreamSource*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof BytesInternalReadableStreamSource"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = BytesInternalReadableStreamSourcePrototype__updateRefFromJS(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "BytesInternalReadableStreamSource.updateRefFromJS returned an empty value without an exception"); | |
return result; | |
#endif | |
return BytesInternalReadableStreamSourcePrototype__updateRefFromJS(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
extern JSC_CALLCONV void BytesInternalReadableStreamSourcePrototype__pendingPromiseSetCachedValue(JSC::EncodedJSValue thisValue, JSC::JSGlobalObject *globalObject, JSC::EncodedJSValue value) | |
{ | |
auto& vm = globalObject->vm(); | |
auto* thisObject = jsCast<JSBytesInternalReadableStreamSource*>(JSValue::decode(thisValue)); | |
thisObject->m_pendingPromise.set(vm, thisObject, JSValue::decode(value)); | |
} | |
extern JSC_CALLCONV JSC::EncodedJSValue BytesInternalReadableStreamSourcePrototype__pendingPromiseGetCachedValue(JSC::EncodedJSValue thisValue) | |
{ | |
auto* thisObject = jsCast<JSBytesInternalReadableStreamSource*>(JSValue::decode(thisValue)); | |
return JSValue::encode(thisObject->m_pendingPromise.get()); | |
} | |
extern JSC_CALLCONV void BytesInternalReadableStreamSourcePrototype__onCloseCallbackSetCachedValue(JSC::EncodedJSValue thisValue, JSC::JSGlobalObject *globalObject, JSC::EncodedJSValue value) | |
{ | |
auto& vm = globalObject->vm(); | |
auto* thisObject = jsCast<JSBytesInternalReadableStreamSource*>(JSValue::decode(thisValue)); | |
thisObject->m_onCloseCallback.set(vm, thisObject, JSValue::decode(value)); | |
} | |
extern JSC_CALLCONV JSC::EncodedJSValue BytesInternalReadableStreamSourcePrototype__onCloseCallbackGetCachedValue(JSC::EncodedJSValue thisValue) | |
{ | |
auto* thisObject = jsCast<JSBytesInternalReadableStreamSource*>(JSValue::decode(thisValue)); | |
return JSValue::encode(thisObject->m_onCloseCallback.get()); | |
} | |
extern JSC_CALLCONV void BytesInternalReadableStreamSourcePrototype__onDrainCallbackSetCachedValue(JSC::EncodedJSValue thisValue, JSC::JSGlobalObject *globalObject, JSC::EncodedJSValue value) | |
{ | |
auto& vm = globalObject->vm(); | |
auto* thisObject = jsCast<JSBytesInternalReadableStreamSource*>(JSValue::decode(thisValue)); | |
thisObject->m_onDrainCallback.set(vm, thisObject, JSValue::decode(value)); | |
} | |
extern JSC_CALLCONV JSC::EncodedJSValue BytesInternalReadableStreamSourcePrototype__onDrainCallbackGetCachedValue(JSC::EncodedJSValue thisValue) | |
{ | |
auto* thisObject = jsCast<JSBytesInternalReadableStreamSource*>(JSValue::decode(thisValue)); | |
return JSValue::encode(thisObject->m_onDrainCallback.get()); | |
} | |
void JSBytesInternalReadableStreamSourcePrototype::finishCreation(JSC::VM& vm, JSC::JSGlobalObject* globalObject) | |
{ | |
Base::finishCreation(vm); | |
reifyStaticProperties(vm, JSBytesInternalReadableStreamSource::info(), JSBytesInternalReadableStreamSourcePrototypeTableValues, *this); | |
JSC_TO_STRING_TAG_WITHOUT_TRANSITION(); | |
} | |
JSBytesInternalReadableStreamSource::~JSBytesInternalReadableStreamSource() | |
{ | |
if (LIKELY(m_ctx)) { | |
BytesInternalReadableStreamSourceClass__finalize(m_ctx); | |
} | |
} | |
void JSBytesInternalReadableStreamSource::destroy(JSCell* cell) | |
{ | |
static_cast<JSBytesInternalReadableStreamSource*>(cell)->JSBytesInternalReadableStreamSource::~JSBytesInternalReadableStreamSource(); | |
} | |
const ClassInfo JSBytesInternalReadableStreamSource::s_info = { "BytesInternalReadableStreamSource"_s, &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSBytesInternalReadableStreamSource) }; | |
void JSBytesInternalReadableStreamSource::finishCreation(VM& vm) | |
{ | |
Base::finishCreation(vm); | |
ASSERT(inherits(info())); | |
} | |
JSBytesInternalReadableStreamSource* JSBytesInternalReadableStreamSource::create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure, void* ctx) { | |
JSBytesInternalReadableStreamSource* ptr = new (NotNull, JSC::allocateCell<JSBytesInternalReadableStreamSource>(vm)) JSBytesInternalReadableStreamSource(vm, structure, ctx); | |
ptr->finishCreation(vm); | |
return ptr; | |
} | |
extern JSC_CALLCONV void* JSC_HOST_CALL_ATTRIBUTES BytesInternalReadableStreamSource__fromJS(JSC::EncodedJSValue value) { | |
JSC::JSValue decodedValue = JSC::JSValue::decode(value); | |
if (decodedValue.isEmpty() || !decodedValue.isCell()) | |
return nullptr; | |
JSC::JSCell* cell = decodedValue.asCell(); | |
JSBytesInternalReadableStreamSource* object = JSC::jsDynamicCast<JSBytesInternalReadableStreamSource*>(cell); | |
if (!object) | |
return nullptr; | |
return object->wrapped(); | |
} | |
extern JSC_CALLCONV void* JSC_HOST_CALL_ATTRIBUTES BytesInternalReadableStreamSource__fromJSDirect(JSC::EncodedJSValue value) { | |
JSC::JSValue decodedValue = JSC::JSValue::decode(value); | |
ASSERT(decodedValue.isCell()); | |
JSC::JSCell* cell = decodedValue.asCell(); | |
JSBytesInternalReadableStreamSource* object = JSC::jsDynamicCast<JSBytesInternalReadableStreamSource*>(cell); | |
if (!object) | |
return nullptr; | |
Zig::GlobalObject* globalObject = jsDynamicCast<Zig::GlobalObject*>(object->globalObject()); | |
if (UNLIKELY(globalObject == nullptr || cell->structureID() != globalObject->JSBytesInternalReadableStreamSourceStructure()->id())) { | |
return nullptr; | |
} | |
return object->wrapped(); | |
} | |
extern JSC_CALLCONV bool JSC_HOST_CALL_ATTRIBUTES BytesInternalReadableStreamSource__dangerouslySetPtr(JSC::EncodedJSValue value, void* ptr) { | |
JSBytesInternalReadableStreamSource* object = JSC::jsDynamicCast<JSBytesInternalReadableStreamSource*>(JSValue::decode(value)); | |
if (!object) | |
return false; | |
object->m_ctx = ptr; | |
return true; | |
} | |
extern "C" const size_t BytesInternalReadableStreamSource__ptrOffset = JSBytesInternalReadableStreamSource::offsetOfWrapped(); | |
void JSBytesInternalReadableStreamSource::analyzeHeap(JSCell* cell, HeapAnalyzer& analyzer) | |
{ | |
auto* thisObject = jsCast<JSBytesInternalReadableStreamSource*>(cell); | |
if (void* wrapped = thisObject->wrapped()) { | |
// if (thisObject->scriptExecutionContext()) | |
// analyzer.setLabelForCell(cell, makeString("url ", thisObject->scriptExecutionContext()->url().string())); | |
} | |
Base::analyzeHeap(cell, analyzer); | |
} | |
JSObject* JSBytesInternalReadableStreamSource::createPrototype(VM& vm, JSDOMGlobalObject* globalObject) | |
{ | |
auto *structure = JSBytesInternalReadableStreamSourcePrototype::createStructure(vm, globalObject, globalObject->objectPrototype()); | |
structure->setMayBePrototype(true); | |
return JSBytesInternalReadableStreamSourcePrototype::create(vm, globalObject, structure); | |
} | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES BytesInternalReadableStreamSource__create(Zig::GlobalObject* globalObject, void* ptr) { | |
auto &vm = globalObject->vm(); | |
JSC::Structure* structure = globalObject->JSBytesInternalReadableStreamSourceStructure(); | |
JSBytesInternalReadableStreamSource* instance = JSBytesInternalReadableStreamSource::create(vm, globalObject, structure, ptr); | |
return JSValue::encode(instance); | |
} | |
template<typename Visitor> | |
void JSBytesInternalReadableStreamSource::visitChildrenImpl(JSCell* cell, Visitor& visitor) | |
{ | |
JSBytesInternalReadableStreamSource* thisObject = jsCast<JSBytesInternalReadableStreamSource*>(cell); | |
ASSERT_GC_OBJECT_INHERITS(thisObject, info()); | |
Base::visitChildren(thisObject, visitor); | |
thisObject->visitAdditionalChildren<Visitor>(visitor); | |
} | |
DEFINE_VISIT_CHILDREN(JSBytesInternalReadableStreamSource); | |
template<typename Visitor> | |
void JSBytesInternalReadableStreamSource::visitAdditionalChildren(Visitor& visitor) | |
{ | |
JSBytesInternalReadableStreamSource* thisObject = this; | |
ASSERT_GC_OBJECT_INHERITS(thisObject, info()); | |
visitor.append(thisObject->m_pendingPromise); | |
visitor.append(thisObject->m_onCloseCallback); | |
visitor.append(thisObject->m_onDrainCallback); | |
} | |
DEFINE_VISIT_ADDITIONAL_CHILDREN(JSBytesInternalReadableStreamSource); | |
template<typename Visitor> | |
void JSBytesInternalReadableStreamSource::visitOutputConstraintsImpl(JSCell *cell, Visitor& visitor) | |
{ | |
JSBytesInternalReadableStreamSource* thisObject = jsCast<JSBytesInternalReadableStreamSource*>(cell); | |
ASSERT_GC_OBJECT_INHERITS(thisObject, info()); | |
thisObject->visitAdditionalChildren<Visitor>(visitor); | |
} | |
DEFINE_VISIT_OUTPUT_CONSTRAINTS(JSBytesInternalReadableStreamSource); | |
class JSCommentPrototype final : public JSC::JSNonFinalObject { | |
public: | |
using Base = JSC::JSNonFinalObject; | |
static JSCommentPrototype* create(JSC::VM& vm, JSGlobalObject* globalObject, JSC::Structure* structure) | |
{ | |
JSCommentPrototype* ptr = new (NotNull, JSC::allocateCell<JSCommentPrototype>(vm)) JSCommentPrototype(vm, globalObject, structure); | |
ptr->finishCreation(vm, globalObject); | |
return ptr; | |
} | |
DECLARE_INFO; | |
template<typename CellType, JSC::SubspaceAccess> | |
static JSC::GCClient::IsoSubspace* subspaceFor(JSC::VM& vm) | |
{ | |
STATIC_ASSERT_ISO_SUBSPACE_SHARABLE(JSCommentPrototype, Base); | |
return &vm.plainObjectSpace(); | |
} | |
static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype) | |
{ | |
return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info()); | |
} | |
private: | |
JSCommentPrototype(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure) | |
: Base(vm, structure) | |
{ | |
} | |
void finishCreation(JSC::VM&, JSC::JSGlobalObject*); | |
}; | |
JSC_DECLARE_HOST_FUNCTION(CommentPrototype__afterCallback); | |
JSC_DECLARE_HOST_FUNCTION(CommentPrototype__beforeCallback); | |
JSC_DECLARE_HOST_FUNCTION(CommentPrototype__removeCallback); | |
JSC_DECLARE_CUSTOM_GETTER(CommentPrototype__removedGetterWrap); | |
JSC_DECLARE_HOST_FUNCTION(CommentPrototype__replaceCallback); | |
JSC_DECLARE_CUSTOM_GETTER(CommentPrototype__textGetterWrap); | |
static JSC_DECLARE_CUSTOM_SETTER(CommentPrototype__textSetterWrap); | |
STATIC_ASSERT_ISO_SUBSPACE_SHARABLE(JSCommentPrototype, JSCommentPrototype::Base); | |
static const HashTableValue JSCommentPrototypeTableValues[6] = { | |
{ "after"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, CommentPrototype__afterCallback, 1 } } , | |
{ "before"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, CommentPrototype__beforeCallback, 1 } } , | |
{ "remove"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, CommentPrototype__removeCallback, 0 } } , | |
{ "removed"_s, static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::GetterSetterType, CommentPrototype__removedGetterWrap, 0 } } , | |
{ "replace"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, CommentPrototype__replaceCallback, 1 } } , | |
{ "text"_s, static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::GetterSetterType, CommentPrototype__textGetterWrap, CommentPrototype__textSetterWrap } } | |
}; | |
const ClassInfo JSCommentPrototype::s_info = { "Comment"_s, &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSCommentPrototype) }; | |
JSC_DEFINE_CUSTOM_GETTER(jsCommentConstructor, (JSGlobalObject * lexicalGlobalObject, EncodedJSValue thisValue, PropertyName)) | |
{ | |
VM& vm = JSC::getVM(lexicalGlobalObject); | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
auto* globalObject = reinterpret_cast<Zig::GlobalObject*>(lexicalGlobalObject); | |
auto* prototype = jsDynamicCast<JSCommentPrototype*>(JSValue::decode(thisValue)); | |
if (UNLIKELY(!prototype)) | |
return throwVMTypeError(lexicalGlobalObject, throwScope, "Cannot get constructor for Comment"_s); | |
return JSValue::encode(globalObject->JSCommentConstructor()); | |
} | |
JSC_DEFINE_HOST_FUNCTION(CommentPrototype__afterCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSComment* thisObject = jsDynamicCast<JSComment*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof Comment"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = CommentPrototype__after(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "Comment.after returned an empty value without an exception"); | |
return result; | |
#endif | |
return CommentPrototype__after(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_HOST_FUNCTION(CommentPrototype__beforeCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSComment* thisObject = jsDynamicCast<JSComment*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof Comment"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = CommentPrototype__before(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "Comment.before returned an empty value without an exception"); | |
return result; | |
#endif | |
return CommentPrototype__before(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_HOST_FUNCTION(CommentPrototype__removeCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSComment* thisObject = jsDynamicCast<JSComment*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof Comment"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = CommentPrototype__remove(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "Comment.remove returned an empty value without an exception"); | |
return result; | |
#endif | |
return CommentPrototype__remove(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_CUSTOM_GETTER(CommentPrototype__removedGetterWrap, (JSGlobalObject * lexicalGlobalObject, EncodedJSValue encodedThisValue, PropertyName attributeName)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
Zig::GlobalObject *globalObject = reinterpret_cast<Zig::GlobalObject*>(lexicalGlobalObject); | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
JSComment* thisObject = jsCast<JSComment*>(JSValue::decode(encodedThisValue)); | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
JSC::EncodedJSValue result = CommentPrototype__removed(thisObject->wrapped(), globalObject); | |
RETURN_IF_EXCEPTION(throwScope, {}); | |
RELEASE_AND_RETURN(throwScope, result); | |
} | |
JSC_DEFINE_HOST_FUNCTION(CommentPrototype__replaceCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSComment* thisObject = jsDynamicCast<JSComment*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof Comment"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = CommentPrototype__replace(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "Comment.replace returned an empty value without an exception"); | |
return result; | |
#endif | |
return CommentPrototype__replace(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_CUSTOM_GETTER(CommentPrototype__textGetterWrap, (JSGlobalObject * lexicalGlobalObject, EncodedJSValue encodedThisValue, PropertyName attributeName)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
Zig::GlobalObject *globalObject = reinterpret_cast<Zig::GlobalObject*>(lexicalGlobalObject); | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
JSComment* thisObject = jsCast<JSComment*>(JSValue::decode(encodedThisValue)); | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
JSC::EncodedJSValue result = CommentPrototype__getText(thisObject->wrapped(), globalObject); | |
RETURN_IF_EXCEPTION(throwScope, {}); | |
RELEASE_AND_RETURN(throwScope, result); | |
} | |
JSC_DEFINE_CUSTOM_SETTER(CommentPrototype__textSetterWrap, (JSGlobalObject * lexicalGlobalObject, EncodedJSValue encodedThisValue, EncodedJSValue encodedValue, PropertyName attributeName)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
JSComment* thisObject = jsCast<JSComment*>(JSValue::decode(encodedThisValue)); | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
auto result = CommentPrototype__setText(thisObject->wrapped(), lexicalGlobalObject, encodedValue); | |
RELEASE_AND_RETURN(throwScope, result); | |
} | |
void JSCommentPrototype::finishCreation(JSC::VM& vm, JSC::JSGlobalObject* globalObject) | |
{ | |
Base::finishCreation(vm); | |
reifyStaticProperties(vm, JSComment::info(), JSCommentPrototypeTableValues, *this); | |
JSC_TO_STRING_TAG_WITHOUT_TRANSITION(); | |
} | |
JSComment::~JSComment() | |
{ | |
if (LIKELY(m_ctx)) { | |
CommentClass__finalize(m_ctx); | |
} | |
} | |
void JSComment::destroy(JSCell* cell) | |
{ | |
static_cast<JSComment*>(cell)->JSComment::~JSComment(); | |
} | |
const ClassInfo JSComment::s_info = { "Comment"_s, &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSComment) }; | |
void JSComment::finishCreation(VM& vm) | |
{ | |
Base::finishCreation(vm); | |
ASSERT(inherits(info())); | |
} | |
JSComment* JSComment::create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure, void* ctx) { | |
JSComment* ptr = new (NotNull, JSC::allocateCell<JSComment>(vm)) JSComment(vm, structure, ctx); | |
ptr->finishCreation(vm); | |
return ptr; | |
} | |
extern JSC_CALLCONV void* JSC_HOST_CALL_ATTRIBUTES Comment__fromJS(JSC::EncodedJSValue value) { | |
JSC::JSValue decodedValue = JSC::JSValue::decode(value); | |
if (decodedValue.isEmpty() || !decodedValue.isCell()) | |
return nullptr; | |
JSC::JSCell* cell = decodedValue.asCell(); | |
JSComment* object = JSC::jsDynamicCast<JSComment*>(cell); | |
if (!object) | |
return nullptr; | |
return object->wrapped(); | |
} | |
extern JSC_CALLCONV void* JSC_HOST_CALL_ATTRIBUTES Comment__fromJSDirect(JSC::EncodedJSValue value) { | |
JSC::JSValue decodedValue = JSC::JSValue::decode(value); | |
ASSERT(decodedValue.isCell()); | |
JSC::JSCell* cell = decodedValue.asCell(); | |
JSComment* object = JSC::jsDynamicCast<JSComment*>(cell); | |
if (!object) | |
return nullptr; | |
Zig::GlobalObject* globalObject = jsDynamicCast<Zig::GlobalObject*>(object->globalObject()); | |
if (UNLIKELY(globalObject == nullptr || cell->structureID() != globalObject->JSCommentStructure()->id())) { | |
return nullptr; | |
} | |
return object->wrapped(); | |
} | |
extern JSC_CALLCONV bool JSC_HOST_CALL_ATTRIBUTES Comment__dangerouslySetPtr(JSC::EncodedJSValue value, void* ptr) { | |
JSComment* object = JSC::jsDynamicCast<JSComment*>(JSValue::decode(value)); | |
if (!object) | |
return false; | |
object->m_ctx = ptr; | |
return true; | |
} | |
extern "C" const size_t Comment__ptrOffset = JSComment::offsetOfWrapped(); | |
void JSComment::analyzeHeap(JSCell* cell, HeapAnalyzer& analyzer) | |
{ | |
auto* thisObject = jsCast<JSComment*>(cell); | |
if (void* wrapped = thisObject->wrapped()) { | |
// if (thisObject->scriptExecutionContext()) | |
// analyzer.setLabelForCell(cell, makeString("url ", thisObject->scriptExecutionContext()->url().string())); | |
} | |
Base::analyzeHeap(cell, analyzer); | |
} | |
JSObject* JSComment::createPrototype(VM& vm, JSDOMGlobalObject* globalObject) | |
{ | |
auto *structure = JSCommentPrototype::createStructure(vm, globalObject, globalObject->objectPrototype()); | |
structure->setMayBePrototype(true); | |
return JSCommentPrototype::create(vm, globalObject, structure); | |
} | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES Comment__create(Zig::GlobalObject* globalObject, void* ptr) { | |
auto &vm = globalObject->vm(); | |
JSC::Structure* structure = globalObject->JSCommentStructure(); | |
JSComment* instance = JSComment::create(vm, globalObject, structure, ptr); | |
return JSValue::encode(instance); | |
} | |
class JSCryptoPrototype final : public JSC::JSNonFinalObject { | |
public: | |
using Base = JSC::JSNonFinalObject; | |
static JSCryptoPrototype* create(JSC::VM& vm, JSGlobalObject* globalObject, JSC::Structure* structure) | |
{ | |
JSCryptoPrototype* ptr = new (NotNull, JSC::allocateCell<JSCryptoPrototype>(vm)) JSCryptoPrototype(vm, globalObject, structure); | |
ptr->finishCreation(vm, globalObject); | |
return ptr; | |
} | |
DECLARE_INFO; | |
template<typename CellType, JSC::SubspaceAccess> | |
static JSC::GCClient::IsoSubspace* subspaceFor(JSC::VM& vm) | |
{ | |
STATIC_ASSERT_ISO_SUBSPACE_SHARABLE(JSCryptoPrototype, Base); | |
return &vm.plainObjectSpace(); | |
} | |
static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype) | |
{ | |
return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info()); | |
} | |
private: | |
JSCryptoPrototype(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure) | |
: Base(vm, structure) | |
{ | |
} | |
void finishCreation(JSC::VM&, JSC::JSGlobalObject*); | |
}; | |
class JSCryptoConstructor final : public JSC::InternalFunction { | |
public: | |
using Base = JSC::InternalFunction; | |
static JSCryptoConstructor* create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure, JSCryptoPrototype* prototype); | |
static constexpr unsigned StructureFlags = Base::StructureFlags; | |
static constexpr bool needsDestruction = false; | |
static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype) | |
{ | |
return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::InternalFunctionType, StructureFlags), info()); | |
} | |
template<typename, JSC::SubspaceAccess mode> static JSC::GCClient::IsoSubspace* subspaceFor(JSC::VM& vm) | |
{ | |
if constexpr (mode == JSC::SubspaceAccess::Concurrently) | |
return nullptr; | |
return WebCore::subspaceForImpl<JSCryptoConstructor, WebCore::UseCustomHeapCellType::No>( | |
vm, | |
[](auto& spaces) { return spaces.m_clientSubspaceForBunClassConstructor.get(); }, | |
[](auto& spaces, auto&& space) { spaces.m_clientSubspaceForBunClassConstructor = std::forward<decltype(space)>(space); }, | |
[](auto& spaces) { return spaces.m_subspaceForBunClassConstructor.get(); }, | |
[](auto& spaces, auto&& space) { spaces.m_subspaceForBunClassConstructor = std::forward<decltype(space)>(space); }); | |
} | |
void initializeProperties(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSCryptoPrototype* prototype); | |
// Must be defined for each specialization class. | |
static JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES construct(JSC::JSGlobalObject*, JSC::CallFrame*); | |
static JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES call(JSC::JSGlobalObject*, JSC::CallFrame*); | |
DECLARE_EXPORT_INFO; | |
private: | |
JSCryptoConstructor(JSC::VM& vm, JSC::Structure* structure); | |
void finishCreation(JSC::VM&, JSC::JSGlobalObject* globalObject, JSCryptoPrototype* prototype); | |
}; | |
JSC_DECLARE_HOST_FUNCTION(CryptoPrototype__getRandomValuesCallback); | |
extern JSC_CALLCONV JSC_DECLARE_JIT_OPERATION_WITHOUT_WTF_INTERNAL(CryptoPrototype__getRandomValuesWithoutTypeChecksWrapper, JSC::EncodedJSValue, (JSC::JSGlobalObject * lexicalGlobalObject, void* thisValue, JSC::JSUint8Array* arg0)); | |
static const JSC::DOMJIT::Signature DOMJITSignatureForCryptoPrototype__getRandomValues(CryptoPrototype__getRandomValuesWithoutTypeChecksWrapper, | |
JSCrypto::info(), | |
JSC::DOMJIT::Effect::forReadWrite(JSC::DOMJIT::HeapRange::top(), JSC::DOMJIT::HeapRange::top()), | |
JSC::SpecHeapTop, JSC::SpecUint8Array); | |
JSC_DEFINE_JIT_OPERATION(CryptoPrototype__getRandomValuesWithoutTypeChecksWrapper, JSC::EncodedJSValue, (JSC::JSGlobalObject * lexicalGlobalObject, void* thisValue, JSC::JSUint8Array* arg0)) | |
{ | |
VM& vm = JSC::getVM(lexicalGlobalObject); | |
IGNORE_WARNINGS_BEGIN("frame-address") | |
CallFrame* callFrame = DECLARE_CALL_FRAME(vm); | |
IGNORE_WARNINGS_END | |
JSC::JITOperationPrologueCallFrameTracer tracer(vm, callFrame); | |
return {CryptoPrototype__getRandomValuesWithoutTypeChecks(reinterpret_cast<JSCrypto*>(thisValue)->wrapped(), lexicalGlobalObject, arg0)}; | |
} | |
JSC_DECLARE_HOST_FUNCTION(CryptoPrototype__randomUUIDCallback); | |
extern JSC_CALLCONV JSC_DECLARE_JIT_OPERATION_WITHOUT_WTF_INTERNAL(CryptoPrototype__randomUUIDWithoutTypeChecksWrapper, JSC::EncodedJSValue, (JSC::JSGlobalObject * lexicalGlobalObject, void* thisValue)); | |
static const JSC::DOMJIT::Signature DOMJITSignatureForCryptoPrototype__randomUUID(CryptoPrototype__randomUUIDWithoutTypeChecksWrapper, | |
JSCrypto::info(), | |
JSC::DOMJIT::Effect::forReadWrite(JSC::DOMJIT::HeapRange::top(), JSC::DOMJIT::HeapRange::top()), | |
JSC::SpecString); | |
JSC_DEFINE_JIT_OPERATION(CryptoPrototype__randomUUIDWithoutTypeChecksWrapper, JSC::EncodedJSValue, (JSC::JSGlobalObject * lexicalGlobalObject, void* thisValue)) | |
{ | |
VM& vm = JSC::getVM(lexicalGlobalObject); | |
IGNORE_WARNINGS_BEGIN("frame-address") | |
CallFrame* callFrame = DECLARE_CALL_FRAME(vm); | |
IGNORE_WARNINGS_END | |
JSC::JITOperationPrologueCallFrameTracer tracer(vm, callFrame); | |
return {CryptoPrototype__randomUUIDWithoutTypeChecks(reinterpret_cast<JSCrypto*>(thisValue)->wrapped(), lexicalGlobalObject)}; | |
} | |
JSC_DECLARE_HOST_FUNCTION(CryptoPrototype__scryptSyncCallback); | |
JSC_DECLARE_HOST_FUNCTION(CryptoPrototype__timingSafeEqualCallback); | |
extern JSC_CALLCONV JSC_DECLARE_JIT_OPERATION_WITHOUT_WTF_INTERNAL(CryptoPrototype__timingSafeEqualWithoutTypeChecksWrapper, JSC::EncodedJSValue, (JSC::JSGlobalObject * lexicalGlobalObject, void* thisValue, JSC::JSUint8Array* arg0, JSC::JSUint8Array* arg1)); | |
static const JSC::DOMJIT::Signature DOMJITSignatureForCryptoPrototype__timingSafeEqual(CryptoPrototype__timingSafeEqualWithoutTypeChecksWrapper, | |
JSCrypto::info(), | |
JSC::DOMJIT::Effect::forReadWrite(JSC::DOMJIT::HeapRange::top(), JSC::DOMJIT::HeapRange::top()), | |
JSC::SpecHeapTop, JSC::SpecUint8Array, JSC::SpecUint8Array); | |
JSC_DEFINE_JIT_OPERATION(CryptoPrototype__timingSafeEqualWithoutTypeChecksWrapper, JSC::EncodedJSValue, (JSC::JSGlobalObject * lexicalGlobalObject, void* thisValue, JSC::JSUint8Array* arg0, JSC::JSUint8Array* arg1)) | |
{ | |
VM& vm = JSC::getVM(lexicalGlobalObject); | |
IGNORE_WARNINGS_BEGIN("frame-address") | |
CallFrame* callFrame = DECLARE_CALL_FRAME(vm); | |
IGNORE_WARNINGS_END | |
JSC::JITOperationPrologueCallFrameTracer tracer(vm, callFrame); | |
return {CryptoPrototype__timingSafeEqualWithoutTypeChecks(reinterpret_cast<JSCrypto*>(thisValue)->wrapped(), lexicalGlobalObject, arg0, arg1)}; | |
} | |
STATIC_ASSERT_ISO_SUBSPACE_SHARABLE(JSCryptoPrototype, JSCryptoPrototype::Base); | |
static const HashTableValue JSCryptoPrototypeTableValues[4] = { | |
{ "getRandomValues"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | JSC::PropertyAttribute::DOMJITFunction | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::DOMJITFunctionType, CryptoPrototype__getRandomValuesCallback, &DOMJITSignatureForCryptoPrototype__getRandomValues } } , | |
{ "randomUUID"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | JSC::PropertyAttribute::DOMJITFunction | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::DOMJITFunctionType, CryptoPrototype__randomUUIDCallback, &DOMJITSignatureForCryptoPrototype__randomUUID } } , | |
{ "scryptSync"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, CryptoPrototype__scryptSyncCallback, 2 } } , | |
{ "timingSafeEqual"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | JSC::PropertyAttribute::DOMJITFunction | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::DOMJITFunctionType, CryptoPrototype__timingSafeEqualCallback, &DOMJITSignatureForCryptoPrototype__timingSafeEqual } } | |
}; | |
const ClassInfo JSCryptoPrototype::s_info = { "Crypto"_s, &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSCryptoPrototype) }; | |
JSC_DEFINE_CUSTOM_GETTER(jsCryptoConstructor, (JSGlobalObject * lexicalGlobalObject, EncodedJSValue thisValue, PropertyName)) | |
{ | |
VM& vm = JSC::getVM(lexicalGlobalObject); | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
auto* globalObject = reinterpret_cast<Zig::GlobalObject*>(lexicalGlobalObject); | |
auto* prototype = jsDynamicCast<JSCryptoPrototype*>(JSValue::decode(thisValue)); | |
if (UNLIKELY(!prototype)) | |
return throwVMTypeError(lexicalGlobalObject, throwScope, "Cannot get constructor for Crypto"_s); | |
return JSValue::encode(globalObject->JSCryptoConstructor()); | |
} | |
JSC_DEFINE_HOST_FUNCTION(CryptoPrototype__getRandomValuesCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSCrypto* thisObject = jsDynamicCast<JSCrypto*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof Crypto"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = CryptoPrototype__getRandomValues(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "Crypto.getRandomValues returned an empty value without an exception"); | |
return result; | |
#endif | |
return CryptoPrototype__getRandomValues(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_HOST_FUNCTION(CryptoPrototype__randomUUIDCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSCrypto* thisObject = jsDynamicCast<JSCrypto*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof Crypto"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = CryptoPrototype__randomUUID(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "Crypto.randomUUID returned an empty value without an exception"); | |
return result; | |
#endif | |
return CryptoPrototype__randomUUID(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_HOST_FUNCTION(CryptoPrototype__scryptSyncCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSCrypto* thisObject = jsDynamicCast<JSCrypto*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof Crypto"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = CryptoPrototype__doScryptSync(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "Crypto.doScryptSync returned an empty value without an exception"); | |
return result; | |
#endif | |
return CryptoPrototype__doScryptSync(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_HOST_FUNCTION(CryptoPrototype__timingSafeEqualCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSCrypto* thisObject = jsDynamicCast<JSCrypto*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof Crypto"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = CryptoPrototype__timingSafeEqual(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "Crypto.timingSafeEqual returned an empty value without an exception"); | |
return result; | |
#endif | |
return CryptoPrototype__timingSafeEqual(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
void JSCryptoPrototype::finishCreation(JSC::VM& vm, JSC::JSGlobalObject* globalObject) | |
{ | |
Base::finishCreation(vm); | |
reifyStaticProperties(vm, JSCrypto::info(), JSCryptoPrototypeTableValues, *this); | |
JSC_TO_STRING_TAG_WITHOUT_TRANSITION(); | |
} | |
void JSCryptoConstructor::finishCreation(VM& vm, JSC::JSGlobalObject* globalObject, JSCryptoPrototype* prototype) | |
{ | |
Base::finishCreation(vm, 0, "Crypto"_s, PropertyAdditionMode::WithoutStructureTransition); | |
putDirectWithoutTransition(vm, vm.propertyNames->prototype, prototype, PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly); | |
ASSERT(inherits(info())); | |
} | |
JSCryptoConstructor::JSCryptoConstructor(JSC::VM& vm, JSC::Structure* structure) : Base(vm, structure, call, construct) { | |
} | |
JSCryptoConstructor* JSCryptoConstructor::create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure, JSCryptoPrototype* prototype) { | |
JSCryptoConstructor* ptr = new (NotNull, JSC::allocateCell<JSCryptoConstructor>(vm)) JSCryptoConstructor(vm, structure); | |
ptr->finishCreation(vm, globalObject, prototype); | |
return ptr; | |
} | |
JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES JSCryptoConstructor::call(JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame) | |
{ | |
Zig::GlobalObject *globalObject = reinterpret_cast<Zig::GlobalObject*>(lexicalGlobalObject); | |
JSC::VM &vm = globalObject->vm(); | |
auto scope = DECLARE_THROW_SCOPE(vm); | |
void* ptr = CryptoClass__construct(globalObject, callFrame); | |
if (UNLIKELY(!ptr || scope.exception())) { | |
return JSValue::encode(JSC::jsUndefined()); | |
} | |
Structure* structure = globalObject->JSCryptoStructure(); | |
JSCrypto* instance = JSCrypto::create(vm, globalObject, structure, ptr); | |
RETURN_IF_EXCEPTION(scope, {}); | |
RELEASE_AND_RETURN(scope, JSValue::encode(instance)); | |
} | |
JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES JSCryptoConstructor::construct(JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame) | |
{ | |
Zig::GlobalObject *globalObject = reinterpret_cast<Zig::GlobalObject*>(lexicalGlobalObject); | |
JSC::VM &vm = globalObject->vm(); | |
auto scope = DECLARE_THROW_SCOPE(vm); | |
JSObject* newTarget = asObject(callFrame->newTarget()); | |
auto* constructor = globalObject->JSCryptoConstructor(); | |
Structure* structure = globalObject->JSCryptoStructure(); | |
if (UNLIKELY(constructor != newTarget)) { | |
auto* functionGlobalObject = reinterpret_cast<Zig::GlobalObject*>( | |
// ShadowRealm functions belong to a different global object. | |
getFunctionRealm(globalObject, newTarget) | |
); | |
RETURN_IF_EXCEPTION(scope, {}); | |
structure = InternalFunction::createSubclassStructure( | |
globalObject, | |
newTarget, | |
functionGlobalObject->JSCryptoStructure() | |
); | |
} | |
void* ptr = CryptoClass__construct(globalObject, callFrame); | |
if (UNLIKELY(!ptr || scope.exception())) { | |
return JSValue::encode(JSC::jsUndefined()); | |
} | |
JSCrypto* instance = JSCrypto::create(vm, globalObject, structure, ptr); | |
RELEASE_AND_RETURN(scope, JSValue::encode(instance)); | |
} | |
void JSCryptoConstructor::initializeProperties(VM& vm, JSC::JSGlobalObject* globalObject, JSCryptoPrototype* prototype) | |
{ | |
} | |
const ClassInfo JSCryptoConstructor::s_info = { "Function"_s, &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSCryptoConstructor) }; | |
extern JSC_CALLCONV JSC::EncodedJSValue Crypto__getConstructor(Zig::GlobalObject* globalObject) { | |
return JSValue::encode(globalObject->JSCryptoConstructor()); | |
} | |
JSCrypto::~JSCrypto() | |
{ | |
} | |
void JSCrypto::destroy(JSCell* cell) | |
{ | |
static_cast<JSCrypto*>(cell)->JSCrypto::~JSCrypto(); | |
} | |
const ClassInfo JSCrypto::s_info = { "Crypto"_s, &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSCrypto) }; | |
void JSCrypto::finishCreation(VM& vm) | |
{ | |
Base::finishCreation(vm); | |
ASSERT(inherits(info())); | |
} | |
JSCrypto* JSCrypto::create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure, void* ctx) { | |
JSCrypto* ptr = new (NotNull, JSC::allocateCell<JSCrypto>(vm)) JSCrypto(vm, structure, ctx); | |
ptr->finishCreation(vm); | |
return ptr; | |
} | |
extern JSC_CALLCONV void* JSC_HOST_CALL_ATTRIBUTES Crypto__fromJS(JSC::EncodedJSValue value) { | |
JSC::JSValue decodedValue = JSC::JSValue::decode(value); | |
if (decodedValue.isEmpty() || !decodedValue.isCell()) | |
return nullptr; | |
JSC::JSCell* cell = decodedValue.asCell(); | |
JSCrypto* object = JSC::jsDynamicCast<JSCrypto*>(cell); | |
if (!object) | |
return nullptr; | |
return object->wrapped(); | |
} | |
extern JSC_CALLCONV void* JSC_HOST_CALL_ATTRIBUTES Crypto__fromJSDirect(JSC::EncodedJSValue value) { | |
JSC::JSValue decodedValue = JSC::JSValue::decode(value); | |
ASSERT(decodedValue.isCell()); | |
JSC::JSCell* cell = decodedValue.asCell(); | |
JSCrypto* object = JSC::jsDynamicCast<JSCrypto*>(cell); | |
if (!object) | |
return nullptr; | |
Zig::GlobalObject* globalObject = jsDynamicCast<Zig::GlobalObject*>(object->globalObject()); | |
if (UNLIKELY(globalObject == nullptr || cell->structureID() != globalObject->JSCryptoStructure()->id())) { | |
return nullptr; | |
} | |
return object->wrapped(); | |
} | |
extern JSC_CALLCONV bool JSC_HOST_CALL_ATTRIBUTES Crypto__dangerouslySetPtr(JSC::EncodedJSValue value, void* ptr) { | |
JSCrypto* object = JSC::jsDynamicCast<JSCrypto*>(JSValue::decode(value)); | |
if (!object) | |
return false; | |
object->m_ctx = ptr; | |
return true; | |
} | |
extern "C" const size_t Crypto__ptrOffset = JSCrypto::offsetOfWrapped(); | |
void JSCrypto::analyzeHeap(JSCell* cell, HeapAnalyzer& analyzer) | |
{ | |
auto* thisObject = jsCast<JSCrypto*>(cell); | |
if (void* wrapped = thisObject->wrapped()) { | |
// if (thisObject->scriptExecutionContext()) | |
// analyzer.setLabelForCell(cell, makeString("url ", thisObject->scriptExecutionContext()->url().string())); | |
} | |
Base::analyzeHeap(cell, analyzer); | |
} | |
JSObject* JSCrypto::createConstructor(VM& vm, JSGlobalObject* globalObject, JSValue prototype) | |
{ | |
return WebCore::JSCryptoConstructor::create(vm, globalObject, WebCore::JSCryptoConstructor::createStructure(vm, globalObject, globalObject->functionPrototype()), jsCast<WebCore::JSCryptoPrototype*>(prototype)); | |
} | |
JSObject* JSCrypto::getConstructor(Zig::GlobalObject* globalObject) | |
{ | |
return globalObject->JSCryptoConstructor(); | |
} | |
JSObject* JSCrypto::createPrototype(VM& vm, JSDOMGlobalObject* globalObject) | |
{ | |
auto *structure = JSCryptoPrototype::createStructure(vm, globalObject, globalObject->objectPrototype()); | |
structure->setMayBePrototype(true); | |
return JSCryptoPrototype::create(vm, globalObject, structure); | |
} | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES Crypto__create(Zig::GlobalObject* globalObject, void* ptr) { | |
auto &vm = globalObject->vm(); | |
JSC::Structure* structure = globalObject->JSCryptoStructure(); | |
JSCrypto* instance = JSCrypto::create(vm, globalObject, structure, ptr); | |
return JSValue::encode(instance); | |
} | |
class JSCryptoHasherPrototype final : public JSC::JSNonFinalObject { | |
public: | |
using Base = JSC::JSNonFinalObject; | |
static JSCryptoHasherPrototype* create(JSC::VM& vm, JSGlobalObject* globalObject, JSC::Structure* structure) | |
{ | |
JSCryptoHasherPrototype* ptr = new (NotNull, JSC::allocateCell<JSCryptoHasherPrototype>(vm)) JSCryptoHasherPrototype(vm, globalObject, structure); | |
ptr->finishCreation(vm, globalObject); | |
return ptr; | |
} | |
DECLARE_INFO; | |
template<typename CellType, JSC::SubspaceAccess> | |
static JSC::GCClient::IsoSubspace* subspaceFor(JSC::VM& vm) | |
{ | |
STATIC_ASSERT_ISO_SUBSPACE_SHARABLE(JSCryptoHasherPrototype, Base); | |
return &vm.plainObjectSpace(); | |
} | |
static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype) | |
{ | |
return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info()); | |
} | |
private: | |
JSCryptoHasherPrototype(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure) | |
: Base(vm, structure) | |
{ | |
} | |
void finishCreation(JSC::VM&, JSC::JSGlobalObject*); | |
}; | |
class JSCryptoHasherConstructor final : public JSC::InternalFunction { | |
public: | |
using Base = JSC::InternalFunction; | |
static JSCryptoHasherConstructor* create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure, JSCryptoHasherPrototype* prototype); | |
static constexpr unsigned StructureFlags = Base::StructureFlags; | |
static constexpr bool needsDestruction = false; | |
static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype) | |
{ | |
return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::InternalFunctionType, StructureFlags), info()); | |
} | |
template<typename, JSC::SubspaceAccess mode> static JSC::GCClient::IsoSubspace* subspaceFor(JSC::VM& vm) | |
{ | |
if constexpr (mode == JSC::SubspaceAccess::Concurrently) | |
return nullptr; | |
return WebCore::subspaceForImpl<JSCryptoHasherConstructor, WebCore::UseCustomHeapCellType::No>( | |
vm, | |
[](auto& spaces) { return spaces.m_clientSubspaceForBunClassConstructor.get(); }, | |
[](auto& spaces, auto&& space) { spaces.m_clientSubspaceForBunClassConstructor = std::forward<decltype(space)>(space); }, | |
[](auto& spaces) { return spaces.m_subspaceForBunClassConstructor.get(); }, | |
[](auto& spaces, auto&& space) { spaces.m_subspaceForBunClassConstructor = std::forward<decltype(space)>(space); }); | |
} | |
void initializeProperties(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSCryptoHasherPrototype* prototype); | |
// Must be defined for each specialization class. | |
static JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES construct(JSC::JSGlobalObject*, JSC::CallFrame*); | |
static JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES call(JSC::JSGlobalObject*, JSC::CallFrame*); | |
DECLARE_EXPORT_INFO; | |
private: | |
JSCryptoHasherConstructor(JSC::VM& vm, JSC::Structure* structure); | |
void finishCreation(JSC::VM&, JSC::JSGlobalObject* globalObject, JSCryptoHasherPrototype* prototype); | |
}; | |
JSC_DECLARE_CUSTOM_GETTER(CryptoHasherPrototype__algorithmGetterWrap); | |
JSC_DECLARE_CUSTOM_GETTER(CryptoHasherPrototype__byteLengthGetterWrap); | |
JSC_DECLARE_HOST_FUNCTION(CryptoHasherPrototype__copyCallback); | |
JSC_DECLARE_HOST_FUNCTION(CryptoHasherPrototype__digestCallback); | |
JSC_DECLARE_HOST_FUNCTION(CryptoHasherPrototype__updateCallback); | |
STATIC_ASSERT_ISO_SUBSPACE_SHARABLE(JSCryptoHasherPrototype, JSCryptoHasherPrototype::Base); | |
static const HashTableValue JSCryptoHasherPrototypeTableValues[5] = { | |
{ "algorithm"_s, static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::GetterSetterType, CryptoHasherPrototype__algorithmGetterWrap, 0 } } , | |
{ "byteLength"_s, static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::GetterSetterType, CryptoHasherPrototype__byteLengthGetterWrap, 0 } } , | |
{ "copy"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, CryptoHasherPrototype__copyCallback, 0 } } , | |
{ "digest"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, CryptoHasherPrototype__digestCallback, 0 } } , | |
{ "update"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, CryptoHasherPrototype__updateCallback, 2 } } | |
}; | |
const ClassInfo JSCryptoHasherPrototype::s_info = { "CryptoHasher"_s, &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSCryptoHasherPrototype) }; | |
JSC_DEFINE_CUSTOM_GETTER(jsCryptoHasherConstructor, (JSGlobalObject * lexicalGlobalObject, EncodedJSValue thisValue, PropertyName)) | |
{ | |
VM& vm = JSC::getVM(lexicalGlobalObject); | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
auto* globalObject = reinterpret_cast<Zig::GlobalObject*>(lexicalGlobalObject); | |
auto* prototype = jsDynamicCast<JSCryptoHasherPrototype*>(JSValue::decode(thisValue)); | |
if (UNLIKELY(!prototype)) | |
return throwVMTypeError(lexicalGlobalObject, throwScope, "Cannot get constructor for CryptoHasher"_s); | |
return JSValue::encode(globalObject->JSCryptoHasherConstructor()); | |
} | |
JSC_DEFINE_CUSTOM_GETTER(CryptoHasherPrototype__algorithmGetterWrap, (JSGlobalObject * lexicalGlobalObject, EncodedJSValue encodedThisValue, PropertyName attributeName)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
Zig::GlobalObject *globalObject = reinterpret_cast<Zig::GlobalObject*>(lexicalGlobalObject); | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
JSCryptoHasher* thisObject = jsCast<JSCryptoHasher*>(JSValue::decode(encodedThisValue)); | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
if (JSValue cachedValue = thisObject->m_algorithm.get()) | |
return JSValue::encode(cachedValue); | |
JSC::JSValue result = JSC::JSValue::decode( | |
CryptoHasherPrototype__getAlgorithm(thisObject->wrapped(), globalObject) | |
); | |
RETURN_IF_EXCEPTION(throwScope, {}); | |
thisObject->m_algorithm.set(vm, thisObject, result); | |
RELEASE_AND_RETURN(throwScope, JSValue::encode(result)); | |
} | |
extern JSC_CALLCONV void CryptoHasherPrototype__algorithmSetCachedValue(JSC::EncodedJSValue thisValue, JSC::JSGlobalObject *globalObject, JSC::EncodedJSValue value) | |
{ | |
auto& vm = globalObject->vm(); | |
auto* thisObject = jsCast<JSCryptoHasher*>(JSValue::decode(thisValue)); | |
thisObject->m_algorithm.set(vm, thisObject, JSValue::decode(value)); | |
} | |
extern JSC_CALLCONV JSC::EncodedJSValue CryptoHasherPrototype__algorithmGetCachedValue(JSC::EncodedJSValue thisValue) | |
{ | |
auto* thisObject = jsCast<JSCryptoHasher*>(JSValue::decode(thisValue)); | |
return JSValue::encode(thisObject->m_algorithm.get()); | |
} | |
JSC_DEFINE_CUSTOM_GETTER(CryptoHasherPrototype__byteLengthGetterWrap, (JSGlobalObject * lexicalGlobalObject, EncodedJSValue encodedThisValue, PropertyName attributeName)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
Zig::GlobalObject *globalObject = reinterpret_cast<Zig::GlobalObject*>(lexicalGlobalObject); | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
JSCryptoHasher* thisObject = jsCast<JSCryptoHasher*>(JSValue::decode(encodedThisValue)); | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
JSC::EncodedJSValue result = CryptoHasherPrototype__getByteLength(thisObject->wrapped(), globalObject); | |
RETURN_IF_EXCEPTION(throwScope, {}); | |
RELEASE_AND_RETURN(throwScope, result); | |
} | |
JSC_DEFINE_HOST_FUNCTION(CryptoHasherPrototype__copyCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSCryptoHasher* thisObject = jsDynamicCast<JSCryptoHasher*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof CryptoHasher"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = CryptoHasherPrototype__copy(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "CryptoHasher.copy returned an empty value without an exception"); | |
return result; | |
#endif | |
return CryptoHasherPrototype__copy(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_HOST_FUNCTION(CryptoHasherPrototype__digestCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSCryptoHasher* thisObject = jsDynamicCast<JSCryptoHasher*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof CryptoHasher"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = CryptoHasherPrototype__digest(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "CryptoHasher.digest returned an empty value without an exception"); | |
return result; | |
#endif | |
return CryptoHasherPrototype__digest(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_HOST_FUNCTION(CryptoHasherPrototype__updateCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSCryptoHasher* thisObject = jsDynamicCast<JSCryptoHasher*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof CryptoHasher"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = CryptoHasherPrototype__update(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "CryptoHasher.update returned an empty value without an exception"); | |
return result; | |
#endif | |
return CryptoHasherPrototype__update(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
void JSCryptoHasherPrototype::finishCreation(JSC::VM& vm, JSC::JSGlobalObject* globalObject) | |
{ | |
Base::finishCreation(vm); | |
reifyStaticProperties(vm, JSCryptoHasher::info(), JSCryptoHasherPrototypeTableValues, *this); | |
JSC_TO_STRING_TAG_WITHOUT_TRANSITION(); | |
} | |
static const HashTableValue JSCryptoHasherConstructorTableValues[2] = { | |
{ "algorithms"_s, static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::GetterSetterType, CryptoHasherClass__getAlgorithms, 0 } } , | |
{ "hash"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, CryptoHasherClass__hash, 2 } } | |
}; | |
void JSCryptoHasherConstructor::finishCreation(VM& vm, JSC::JSGlobalObject* globalObject, JSCryptoHasherPrototype* prototype) | |
{ | |
Base::finishCreation(vm, 0, "CryptoHasher"_s, PropertyAdditionMode::WithoutStructureTransition); | |
reifyStaticProperties(vm, &JSCryptoHasherConstructor::s_info, JSCryptoHasherConstructorTableValues, *this); | |
putDirectWithoutTransition(vm, vm.propertyNames->prototype, prototype, PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly); | |
ASSERT(inherits(info())); | |
} | |
JSCryptoHasherConstructor::JSCryptoHasherConstructor(JSC::VM& vm, JSC::Structure* structure) : Base(vm, structure, call, construct) { | |
} | |
JSCryptoHasherConstructor* JSCryptoHasherConstructor::create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure, JSCryptoHasherPrototype* prototype) { | |
JSCryptoHasherConstructor* ptr = new (NotNull, JSC::allocateCell<JSCryptoHasherConstructor>(vm)) JSCryptoHasherConstructor(vm, structure); | |
ptr->finishCreation(vm, globalObject, prototype); | |
return ptr; | |
} | |
JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES JSCryptoHasherConstructor::call(JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame) | |
{ | |
Zig::GlobalObject *globalObject = reinterpret_cast<Zig::GlobalObject*>(lexicalGlobalObject); | |
JSC::VM &vm = globalObject->vm(); | |
auto scope = DECLARE_THROW_SCOPE(vm); | |
void* ptr = CryptoHasherClass__construct(globalObject, callFrame); | |
if (UNLIKELY(!ptr || scope.exception())) { | |
return JSValue::encode(JSC::jsUndefined()); | |
} | |
Structure* structure = globalObject->JSCryptoHasherStructure(); | |
JSCryptoHasher* instance = JSCryptoHasher::create(vm, globalObject, structure, ptr); | |
RETURN_IF_EXCEPTION(scope, {}); | |
RELEASE_AND_RETURN(scope, JSValue::encode(instance)); | |
} | |
JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES JSCryptoHasherConstructor::construct(JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame) | |
{ | |
Zig::GlobalObject *globalObject = reinterpret_cast<Zig::GlobalObject*>(lexicalGlobalObject); | |
JSC::VM &vm = globalObject->vm(); | |
auto scope = DECLARE_THROW_SCOPE(vm); | |
JSObject* newTarget = asObject(callFrame->newTarget()); | |
auto* constructor = globalObject->JSCryptoHasherConstructor(); | |
Structure* structure = globalObject->JSCryptoHasherStructure(); | |
if (UNLIKELY(constructor != newTarget)) { | |
auto* functionGlobalObject = reinterpret_cast<Zig::GlobalObject*>( | |
// ShadowRealm functions belong to a different global object. | |
getFunctionRealm(globalObject, newTarget) | |
); | |
RETURN_IF_EXCEPTION(scope, {}); | |
structure = InternalFunction::createSubclassStructure( | |
globalObject, | |
newTarget, | |
functionGlobalObject->JSCryptoHasherStructure() | |
); | |
} | |
void* ptr = CryptoHasherClass__construct(globalObject, callFrame); | |
if (UNLIKELY(!ptr || scope.exception())) { | |
return JSValue::encode(JSC::jsUndefined()); | |
} | |
JSCryptoHasher* instance = JSCryptoHasher::create(vm, globalObject, structure, ptr); | |
RELEASE_AND_RETURN(scope, JSValue::encode(instance)); | |
} | |
void JSCryptoHasherConstructor::initializeProperties(VM& vm, JSC::JSGlobalObject* globalObject, JSCryptoHasherPrototype* prototype) | |
{ | |
} | |
const ClassInfo JSCryptoHasherConstructor::s_info = { "Function"_s, &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSCryptoHasherConstructor) }; | |
extern JSC_CALLCONV JSC::EncodedJSValue CryptoHasher__getConstructor(Zig::GlobalObject* globalObject) { | |
return JSValue::encode(globalObject->JSCryptoHasherConstructor()); | |
} | |
JSCryptoHasher::~JSCryptoHasher() | |
{ | |
if (LIKELY(m_ctx)) { | |
CryptoHasherClass__finalize(m_ctx); | |
} | |
} | |
void JSCryptoHasher::destroy(JSCell* cell) | |
{ | |
static_cast<JSCryptoHasher*>(cell)->JSCryptoHasher::~JSCryptoHasher(); | |
} | |
const ClassInfo JSCryptoHasher::s_info = { "CryptoHasher"_s, &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSCryptoHasher) }; | |
void JSCryptoHasher::finishCreation(VM& vm) | |
{ | |
Base::finishCreation(vm); | |
ASSERT(inherits(info())); | |
} | |
JSCryptoHasher* JSCryptoHasher::create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure, void* ctx) { | |
JSCryptoHasher* ptr = new (NotNull, JSC::allocateCell<JSCryptoHasher>(vm)) JSCryptoHasher(vm, structure, ctx); | |
ptr->finishCreation(vm); | |
return ptr; | |
} | |
extern JSC_CALLCONV void* JSC_HOST_CALL_ATTRIBUTES CryptoHasher__fromJS(JSC::EncodedJSValue value) { | |
JSC::JSValue decodedValue = JSC::JSValue::decode(value); | |
if (decodedValue.isEmpty() || !decodedValue.isCell()) | |
return nullptr; | |
JSC::JSCell* cell = decodedValue.asCell(); | |
JSCryptoHasher* object = JSC::jsDynamicCast<JSCryptoHasher*>(cell); | |
if (!object) | |
return nullptr; | |
return object->wrapped(); | |
} | |
extern JSC_CALLCONV void* JSC_HOST_CALL_ATTRIBUTES CryptoHasher__fromJSDirect(JSC::EncodedJSValue value) { | |
JSC::JSValue decodedValue = JSC::JSValue::decode(value); | |
ASSERT(decodedValue.isCell()); | |
JSC::JSCell* cell = decodedValue.asCell(); | |
JSCryptoHasher* object = JSC::jsDynamicCast<JSCryptoHasher*>(cell); | |
if (!object) | |
return nullptr; | |
Zig::GlobalObject* globalObject = jsDynamicCast<Zig::GlobalObject*>(object->globalObject()); | |
if (UNLIKELY(globalObject == nullptr || cell->structureID() != globalObject->JSCryptoHasherStructure()->id())) { | |
return nullptr; | |
} | |
return object->wrapped(); | |
} | |
extern JSC_CALLCONV bool JSC_HOST_CALL_ATTRIBUTES CryptoHasher__dangerouslySetPtr(JSC::EncodedJSValue value, void* ptr) { | |
JSCryptoHasher* object = JSC::jsDynamicCast<JSCryptoHasher*>(JSValue::decode(value)); | |
if (!object) | |
return false; | |
object->m_ctx = ptr; | |
return true; | |
} | |
extern "C" const size_t CryptoHasher__ptrOffset = JSCryptoHasher::offsetOfWrapped(); | |
void JSCryptoHasher::analyzeHeap(JSCell* cell, HeapAnalyzer& analyzer) | |
{ | |
auto* thisObject = jsCast<JSCryptoHasher*>(cell); | |
if (void* wrapped = thisObject->wrapped()) { | |
// if (thisObject->scriptExecutionContext()) | |
// analyzer.setLabelForCell(cell, makeString("url ", thisObject->scriptExecutionContext()->url().string())); | |
} | |
Base::analyzeHeap(cell, analyzer); | |
} | |
JSObject* JSCryptoHasher::createConstructor(VM& vm, JSGlobalObject* globalObject, JSValue prototype) | |
{ | |
return WebCore::JSCryptoHasherConstructor::create(vm, globalObject, WebCore::JSCryptoHasherConstructor::createStructure(vm, globalObject, globalObject->functionPrototype()), jsCast<WebCore::JSCryptoHasherPrototype*>(prototype)); | |
} | |
JSObject* JSCryptoHasher::getConstructor(Zig::GlobalObject* globalObject) | |
{ | |
return globalObject->JSCryptoHasherConstructor(); | |
} | |
JSObject* JSCryptoHasher::createPrototype(VM& vm, JSDOMGlobalObject* globalObject) | |
{ | |
auto *structure = JSCryptoHasherPrototype::createStructure(vm, globalObject, globalObject->objectPrototype()); | |
structure->setMayBePrototype(true); | |
return JSCryptoHasherPrototype::create(vm, globalObject, structure); | |
} | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES CryptoHasher__create(Zig::GlobalObject* globalObject, void* ptr) { | |
auto &vm = globalObject->vm(); | |
JSC::Structure* structure = globalObject->JSCryptoHasherStructure(); | |
JSCryptoHasher* instance = JSCryptoHasher::create(vm, globalObject, structure, ptr); | |
return JSValue::encode(instance); | |
} | |
template<typename Visitor> | |
void JSCryptoHasher::visitChildrenImpl(JSCell* cell, Visitor& visitor) | |
{ | |
JSCryptoHasher* thisObject = jsCast<JSCryptoHasher*>(cell); | |
ASSERT_GC_OBJECT_INHERITS(thisObject, info()); | |
Base::visitChildren(thisObject, visitor); | |
thisObject->visitAdditionalChildren<Visitor>(visitor); | |
} | |
DEFINE_VISIT_CHILDREN(JSCryptoHasher); | |
template<typename Visitor> | |
void JSCryptoHasher::visitAdditionalChildren(Visitor& visitor) | |
{ | |
JSCryptoHasher* thisObject = this; | |
ASSERT_GC_OBJECT_INHERITS(thisObject, info()); | |
visitor.append(thisObject->m_algorithms); | |
visitor.append(thisObject->m_algorithm); | |
} | |
DEFINE_VISIT_ADDITIONAL_CHILDREN(JSCryptoHasher); | |
template<typename Visitor> | |
void JSCryptoHasher::visitOutputConstraintsImpl(JSCell *cell, Visitor& visitor) | |
{ | |
JSCryptoHasher* thisObject = jsCast<JSCryptoHasher*>(cell); | |
ASSERT_GC_OBJECT_INHERITS(thisObject, info()); | |
thisObject->visitAdditionalChildren<Visitor>(visitor); | |
} | |
DEFINE_VISIT_OUTPUT_CONSTRAINTS(JSCryptoHasher); | |
class JSDebugHTTPSServerPrototype final : public JSC::JSNonFinalObject { | |
public: | |
using Base = JSC::JSNonFinalObject; | |
static JSDebugHTTPSServerPrototype* create(JSC::VM& vm, JSGlobalObject* globalObject, JSC::Structure* structure) | |
{ | |
JSDebugHTTPSServerPrototype* ptr = new (NotNull, JSC::allocateCell<JSDebugHTTPSServerPrototype>(vm)) JSDebugHTTPSServerPrototype(vm, globalObject, structure); | |
ptr->finishCreation(vm, globalObject); | |
return ptr; | |
} | |
DECLARE_INFO; | |
template<typename CellType, JSC::SubspaceAccess> | |
static JSC::GCClient::IsoSubspace* subspaceFor(JSC::VM& vm) | |
{ | |
STATIC_ASSERT_ISO_SUBSPACE_SHARABLE(JSDebugHTTPSServerPrototype, Base); | |
return &vm.plainObjectSpace(); | |
} | |
static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype) | |
{ | |
return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info()); | |
} | |
private: | |
JSDebugHTTPSServerPrototype(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure) | |
: Base(vm, structure) | |
{ | |
} | |
void finishCreation(JSC::VM&, JSC::JSGlobalObject*); | |
}; | |
JSC_DECLARE_HOST_FUNCTION(DebugHTTPSServerPrototype__disposeCallback); | |
JSC_DECLARE_CUSTOM_GETTER(DebugHTTPSServerPrototype__addressGetterWrap); | |
JSC_DECLARE_CUSTOM_GETTER(DebugHTTPSServerPrototype__developmentGetterWrap); | |
JSC_DECLARE_HOST_FUNCTION(DebugHTTPSServerPrototype__fetchCallback); | |
JSC_DECLARE_CUSTOM_GETTER(DebugHTTPSServerPrototype__hostnameGetterWrap); | |
JSC_DECLARE_CUSTOM_GETTER(DebugHTTPSServerPrototype__idGetterWrap); | |
JSC_DECLARE_CUSTOM_GETTER(DebugHTTPSServerPrototype__pendingRequestsGetterWrap); | |
JSC_DECLARE_CUSTOM_GETTER(DebugHTTPSServerPrototype__pendingWebSocketsGetterWrap); | |
JSC_DECLARE_CUSTOM_GETTER(DebugHTTPSServerPrototype__portGetterWrap); | |
JSC_DECLARE_CUSTOM_GETTER(DebugHTTPSServerPrototype__protocolGetterWrap); | |
JSC_DECLARE_HOST_FUNCTION(DebugHTTPSServerPrototype__publishCallback); | |
JSC_DECLARE_HOST_FUNCTION(DebugHTTPSServerPrototype__refCallback); | |
JSC_DECLARE_HOST_FUNCTION(DebugHTTPSServerPrototype__reloadCallback); | |
JSC_DECLARE_HOST_FUNCTION(DebugHTTPSServerPrototype__requestIPCallback); | |
JSC_DECLARE_HOST_FUNCTION(DebugHTTPSServerPrototype__stopCallback); | |
JSC_DECLARE_HOST_FUNCTION(DebugHTTPSServerPrototype__unrefCallback); | |
JSC_DECLARE_HOST_FUNCTION(DebugHTTPSServerPrototype__upgradeCallback); | |
JSC_DECLARE_CUSTOM_GETTER(DebugHTTPSServerPrototype__urlGetterWrap); | |
STATIC_ASSERT_ISO_SUBSPACE_SHARABLE(JSDebugHTTPSServerPrototype, JSDebugHTTPSServerPrototype::Base); | |
static const HashTableValue JSDebugHTTPSServerPrototypeTableValues[17] = { | |
{ "address"_s, static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::GetterSetterType, DebugHTTPSServerPrototype__addressGetterWrap, 0 } } , | |
{ "development"_s, static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::GetterSetterType, DebugHTTPSServerPrototype__developmentGetterWrap, 0 } } , | |
{ "fetch"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, DebugHTTPSServerPrototype__fetchCallback, 1 } } , | |
{ "hostname"_s, static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::GetterSetterType, DebugHTTPSServerPrototype__hostnameGetterWrap, 0 } } , | |
{ "id"_s, static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::GetterSetterType, DebugHTTPSServerPrototype__idGetterWrap, 0 } } , | |
{ "pendingRequests"_s, static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::GetterSetterType, DebugHTTPSServerPrototype__pendingRequestsGetterWrap, 0 } } , | |
{ "pendingWebSockets"_s, static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::GetterSetterType, DebugHTTPSServerPrototype__pendingWebSocketsGetterWrap, 0 } } , | |
{ "port"_s, static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::GetterSetterType, DebugHTTPSServerPrototype__portGetterWrap, 0 } } , | |
{ "protocol"_s, static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::GetterSetterType, DebugHTTPSServerPrototype__protocolGetterWrap, 0 } } , | |
{ "publish"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, DebugHTTPSServerPrototype__publishCallback, 3 } } , | |
{ "ref"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, DebugHTTPSServerPrototype__refCallback, 0 } } , | |
{ "reload"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, DebugHTTPSServerPrototype__reloadCallback, 2 } } , | |
{ "requestIP"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, DebugHTTPSServerPrototype__requestIPCallback, 1 } } , | |
{ "stop"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, DebugHTTPSServerPrototype__stopCallback, 1 } } , | |
{ "unref"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, DebugHTTPSServerPrototype__unrefCallback, 0 } } , | |
{ "upgrade"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, DebugHTTPSServerPrototype__upgradeCallback, 1 } } , | |
{ "url"_s, static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::GetterSetterType, DebugHTTPSServerPrototype__urlGetterWrap, 0 } } | |
}; | |
const ClassInfo JSDebugHTTPSServerPrototype::s_info = { "DebugHTTPSServer"_s, &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSDebugHTTPSServerPrototype) }; | |
JSC_DEFINE_CUSTOM_GETTER(jsDebugHTTPSServerConstructor, (JSGlobalObject * lexicalGlobalObject, EncodedJSValue thisValue, PropertyName)) | |
{ | |
VM& vm = JSC::getVM(lexicalGlobalObject); | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
auto* globalObject = reinterpret_cast<Zig::GlobalObject*>(lexicalGlobalObject); | |
auto* prototype = jsDynamicCast<JSDebugHTTPSServerPrototype*>(JSValue::decode(thisValue)); | |
if (UNLIKELY(!prototype)) | |
return throwVMTypeError(lexicalGlobalObject, throwScope, "Cannot get constructor for DebugHTTPSServer"_s); | |
return JSValue::encode(globalObject->JSDebugHTTPSServerConstructor()); | |
} | |
JSC_DEFINE_HOST_FUNCTION(DebugHTTPSServerPrototype__disposeCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSDebugHTTPSServer* thisObject = jsDynamicCast<JSDebugHTTPSServer*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof DebugHTTPSServer"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = DebugHTTPSServerPrototype__dispose(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "DebugHTTPSServer.dispose returned an empty value without an exception"); | |
return result; | |
#endif | |
return DebugHTTPSServerPrototype__dispose(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_CUSTOM_GETTER(DebugHTTPSServerPrototype__addressGetterWrap, (JSGlobalObject * lexicalGlobalObject, EncodedJSValue encodedThisValue, PropertyName attributeName)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
Zig::GlobalObject *globalObject = reinterpret_cast<Zig::GlobalObject*>(lexicalGlobalObject); | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
JSDebugHTTPSServer* thisObject = jsCast<JSDebugHTTPSServer*>(JSValue::decode(encodedThisValue)); | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
if (JSValue cachedValue = thisObject->m_address.get()) | |
return JSValue::encode(cachedValue); | |
JSC::JSValue result = JSC::JSValue::decode( | |
DebugHTTPSServerPrototype__getAddress(thisObject->wrapped(), globalObject) | |
); | |
RETURN_IF_EXCEPTION(throwScope, {}); | |
thisObject->m_address.set(vm, thisObject, result); | |
RELEASE_AND_RETURN(throwScope, JSValue::encode(result)); | |
} | |
extern JSC_CALLCONV void DebugHTTPSServerPrototype__addressSetCachedValue(JSC::EncodedJSValue thisValue, JSC::JSGlobalObject *globalObject, JSC::EncodedJSValue value) | |
{ | |
auto& vm = globalObject->vm(); | |
auto* thisObject = jsCast<JSDebugHTTPSServer*>(JSValue::decode(thisValue)); | |
thisObject->m_address.set(vm, thisObject, JSValue::decode(value)); | |
} | |
extern JSC_CALLCONV JSC::EncodedJSValue DebugHTTPSServerPrototype__addressGetCachedValue(JSC::EncodedJSValue thisValue) | |
{ | |
auto* thisObject = jsCast<JSDebugHTTPSServer*>(JSValue::decode(thisValue)); | |
return JSValue::encode(thisObject->m_address.get()); | |
} | |
JSC_DEFINE_CUSTOM_GETTER(DebugHTTPSServerPrototype__developmentGetterWrap, (JSGlobalObject * lexicalGlobalObject, EncodedJSValue encodedThisValue, PropertyName attributeName)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
Zig::GlobalObject *globalObject = reinterpret_cast<Zig::GlobalObject*>(lexicalGlobalObject); | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
JSDebugHTTPSServer* thisObject = jsCast<JSDebugHTTPSServer*>(JSValue::decode(encodedThisValue)); | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
JSC::EncodedJSValue result = DebugHTTPSServerPrototype__getDevelopment(thisObject->wrapped(), globalObject); | |
RETURN_IF_EXCEPTION(throwScope, {}); | |
RELEASE_AND_RETURN(throwScope, result); | |
} | |
JSC_DEFINE_HOST_FUNCTION(DebugHTTPSServerPrototype__fetchCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSDebugHTTPSServer* thisObject = jsDynamicCast<JSDebugHTTPSServer*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof DebugHTTPSServer"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = DebugHTTPSServerPrototype__doFetch(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "DebugHTTPSServer.doFetch returned an empty value without an exception"); | |
return result; | |
#endif | |
return DebugHTTPSServerPrototype__doFetch(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_CUSTOM_GETTER(DebugHTTPSServerPrototype__hostnameGetterWrap, (JSGlobalObject * lexicalGlobalObject, EncodedJSValue encodedThisValue, PropertyName attributeName)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
Zig::GlobalObject *globalObject = reinterpret_cast<Zig::GlobalObject*>(lexicalGlobalObject); | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
JSDebugHTTPSServer* thisObject = jsCast<JSDebugHTTPSServer*>(JSValue::decode(encodedThisValue)); | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
if (JSValue cachedValue = thisObject->m_hostname.get()) | |
return JSValue::encode(cachedValue); | |
JSC::JSValue result = JSC::JSValue::decode( | |
DebugHTTPSServerPrototype__getHostname(thisObject->wrapped(), globalObject) | |
); | |
RETURN_IF_EXCEPTION(throwScope, {}); | |
thisObject->m_hostname.set(vm, thisObject, result); | |
RELEASE_AND_RETURN(throwScope, JSValue::encode(result)); | |
} | |
extern JSC_CALLCONV void DebugHTTPSServerPrototype__hostnameSetCachedValue(JSC::EncodedJSValue thisValue, JSC::JSGlobalObject *globalObject, JSC::EncodedJSValue value) | |
{ | |
auto& vm = globalObject->vm(); | |
auto* thisObject = jsCast<JSDebugHTTPSServer*>(JSValue::decode(thisValue)); | |
thisObject->m_hostname.set(vm, thisObject, JSValue::decode(value)); | |
} | |
extern JSC_CALLCONV JSC::EncodedJSValue DebugHTTPSServerPrototype__hostnameGetCachedValue(JSC::EncodedJSValue thisValue) | |
{ | |
auto* thisObject = jsCast<JSDebugHTTPSServer*>(JSValue::decode(thisValue)); | |
return JSValue::encode(thisObject->m_hostname.get()); | |
} | |
JSC_DEFINE_CUSTOM_GETTER(DebugHTTPSServerPrototype__idGetterWrap, (JSGlobalObject * lexicalGlobalObject, EncodedJSValue encodedThisValue, PropertyName attributeName)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
Zig::GlobalObject *globalObject = reinterpret_cast<Zig::GlobalObject*>(lexicalGlobalObject); | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
JSDebugHTTPSServer* thisObject = jsCast<JSDebugHTTPSServer*>(JSValue::decode(encodedThisValue)); | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
if (JSValue cachedValue = thisObject->m_id.get()) | |
return JSValue::encode(cachedValue); | |
JSC::JSValue result = JSC::JSValue::decode( | |
DebugHTTPSServerPrototype__getId(thisObject->wrapped(), globalObject) | |
); | |
RETURN_IF_EXCEPTION(throwScope, {}); | |
thisObject->m_id.set(vm, thisObject, result); | |
RELEASE_AND_RETURN(throwScope, JSValue::encode(result)); | |
} | |
extern JSC_CALLCONV void DebugHTTPSServerPrototype__idSetCachedValue(JSC::EncodedJSValue thisValue, JSC::JSGlobalObject *globalObject, JSC::EncodedJSValue value) | |
{ | |
auto& vm = globalObject->vm(); | |
auto* thisObject = jsCast<JSDebugHTTPSServer*>(JSValue::decode(thisValue)); | |
thisObject->m_id.set(vm, thisObject, JSValue::decode(value)); | |
} | |
extern JSC_CALLCONV JSC::EncodedJSValue DebugHTTPSServerPrototype__idGetCachedValue(JSC::EncodedJSValue thisValue) | |
{ | |
auto* thisObject = jsCast<JSDebugHTTPSServer*>(JSValue::decode(thisValue)); | |
return JSValue::encode(thisObject->m_id.get()); | |
} | |
JSC_DEFINE_CUSTOM_GETTER(DebugHTTPSServerPrototype__pendingRequestsGetterWrap, (JSGlobalObject * lexicalGlobalObject, EncodedJSValue encodedThisValue, PropertyName attributeName)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
Zig::GlobalObject *globalObject = reinterpret_cast<Zig::GlobalObject*>(lexicalGlobalObject); | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
JSDebugHTTPSServer* thisObject = jsCast<JSDebugHTTPSServer*>(JSValue::decode(encodedThisValue)); | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
JSC::EncodedJSValue result = DebugHTTPSServerPrototype__getPendingRequests(thisObject->wrapped(), globalObject); | |
RETURN_IF_EXCEPTION(throwScope, {}); | |
RELEASE_AND_RETURN(throwScope, result); | |
} | |
JSC_DEFINE_CUSTOM_GETTER(DebugHTTPSServerPrototype__pendingWebSocketsGetterWrap, (JSGlobalObject * lexicalGlobalObject, EncodedJSValue encodedThisValue, PropertyName attributeName)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
Zig::GlobalObject *globalObject = reinterpret_cast<Zig::GlobalObject*>(lexicalGlobalObject); | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
JSDebugHTTPSServer* thisObject = jsCast<JSDebugHTTPSServer*>(JSValue::decode(encodedThisValue)); | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
JSC::EncodedJSValue result = DebugHTTPSServerPrototype__getPendingWebSockets(thisObject->wrapped(), globalObject); | |
RETURN_IF_EXCEPTION(throwScope, {}); | |
RELEASE_AND_RETURN(throwScope, result); | |
} | |
JSC_DEFINE_CUSTOM_GETTER(DebugHTTPSServerPrototype__portGetterWrap, (JSGlobalObject * lexicalGlobalObject, EncodedJSValue encodedThisValue, PropertyName attributeName)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
Zig::GlobalObject *globalObject = reinterpret_cast<Zig::GlobalObject*>(lexicalGlobalObject); | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
JSDebugHTTPSServer* thisObject = jsCast<JSDebugHTTPSServer*>(JSValue::decode(encodedThisValue)); | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
JSC::EncodedJSValue result = DebugHTTPSServerPrototype__getPort(thisObject->wrapped(), globalObject); | |
RETURN_IF_EXCEPTION(throwScope, {}); | |
RELEASE_AND_RETURN(throwScope, result); | |
} | |
JSC_DEFINE_CUSTOM_GETTER(DebugHTTPSServerPrototype__protocolGetterWrap, (JSGlobalObject * lexicalGlobalObject, EncodedJSValue encodedThisValue, PropertyName attributeName)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
Zig::GlobalObject *globalObject = reinterpret_cast<Zig::GlobalObject*>(lexicalGlobalObject); | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
JSDebugHTTPSServer* thisObject = jsCast<JSDebugHTTPSServer*>(JSValue::decode(encodedThisValue)); | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
JSC::EncodedJSValue result = DebugHTTPSServerPrototype__getProtocol(thisObject->wrapped(), globalObject); | |
RETURN_IF_EXCEPTION(throwScope, {}); | |
RELEASE_AND_RETURN(throwScope, result); | |
} | |
JSC_DEFINE_HOST_FUNCTION(DebugHTTPSServerPrototype__publishCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSDebugHTTPSServer* thisObject = jsDynamicCast<JSDebugHTTPSServer*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof DebugHTTPSServer"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = DebugHTTPSServerPrototype__doPublish(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "DebugHTTPSServer.doPublish returned an empty value without an exception"); | |
return result; | |
#endif | |
return DebugHTTPSServerPrototype__doPublish(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_HOST_FUNCTION(DebugHTTPSServerPrototype__refCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSDebugHTTPSServer* thisObject = jsDynamicCast<JSDebugHTTPSServer*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof DebugHTTPSServer"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = DebugHTTPSServerPrototype__doRef(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "DebugHTTPSServer.doRef returned an empty value without an exception"); | |
return result; | |
#endif | |
return DebugHTTPSServerPrototype__doRef(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_HOST_FUNCTION(DebugHTTPSServerPrototype__reloadCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSDebugHTTPSServer* thisObject = jsDynamicCast<JSDebugHTTPSServer*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof DebugHTTPSServer"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = DebugHTTPSServerPrototype__doReload(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "DebugHTTPSServer.doReload returned an empty value without an exception"); | |
return result; | |
#endif | |
return DebugHTTPSServerPrototype__doReload(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_HOST_FUNCTION(DebugHTTPSServerPrototype__requestIPCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSDebugHTTPSServer* thisObject = jsDynamicCast<JSDebugHTTPSServer*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof DebugHTTPSServer"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = DebugHTTPSServerPrototype__doRequestIP(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "DebugHTTPSServer.doRequestIP returned an empty value without an exception"); | |
return result; | |
#endif | |
return DebugHTTPSServerPrototype__doRequestIP(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_HOST_FUNCTION(DebugHTTPSServerPrototype__stopCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSDebugHTTPSServer* thisObject = jsDynamicCast<JSDebugHTTPSServer*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof DebugHTTPSServer"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = DebugHTTPSServerPrototype__doStop(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "DebugHTTPSServer.doStop returned an empty value without an exception"); | |
return result; | |
#endif | |
return DebugHTTPSServerPrototype__doStop(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_HOST_FUNCTION(DebugHTTPSServerPrototype__unrefCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSDebugHTTPSServer* thisObject = jsDynamicCast<JSDebugHTTPSServer*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof DebugHTTPSServer"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = DebugHTTPSServerPrototype__doUnref(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "DebugHTTPSServer.doUnref returned an empty value without an exception"); | |
return result; | |
#endif | |
return DebugHTTPSServerPrototype__doUnref(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_HOST_FUNCTION(DebugHTTPSServerPrototype__upgradeCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSDebugHTTPSServer* thisObject = jsDynamicCast<JSDebugHTTPSServer*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof DebugHTTPSServer"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = DebugHTTPSServerPrototype__doUpgrade(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "DebugHTTPSServer.doUpgrade returned an empty value without an exception"); | |
return result; | |
#endif | |
return DebugHTTPSServerPrototype__doUpgrade(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_CUSTOM_GETTER(DebugHTTPSServerPrototype__urlGetterWrap, (JSGlobalObject * lexicalGlobalObject, EncodedJSValue encodedThisValue, PropertyName attributeName)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
Zig::GlobalObject *globalObject = reinterpret_cast<Zig::GlobalObject*>(lexicalGlobalObject); | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
JSDebugHTTPSServer* thisObject = jsCast<JSDebugHTTPSServer*>(JSValue::decode(encodedThisValue)); | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
if (JSValue cachedValue = thisObject->m_url.get()) | |
return JSValue::encode(cachedValue); | |
JSC::JSValue result = JSC::JSValue::decode( | |
DebugHTTPSServerPrototype__getURL(thisObject->wrapped(), globalObject) | |
); | |
RETURN_IF_EXCEPTION(throwScope, {}); | |
thisObject->m_url.set(vm, thisObject, result); | |
RELEASE_AND_RETURN(throwScope, JSValue::encode(result)); | |
} | |
extern JSC_CALLCONV void DebugHTTPSServerPrototype__urlSetCachedValue(JSC::EncodedJSValue thisValue, JSC::JSGlobalObject *globalObject, JSC::EncodedJSValue value) | |
{ | |
auto& vm = globalObject->vm(); | |
auto* thisObject = jsCast<JSDebugHTTPSServer*>(JSValue::decode(thisValue)); | |
thisObject->m_url.set(vm, thisObject, JSValue::decode(value)); | |
} | |
extern JSC_CALLCONV JSC::EncodedJSValue DebugHTTPSServerPrototype__urlGetCachedValue(JSC::EncodedJSValue thisValue) | |
{ | |
auto* thisObject = jsCast<JSDebugHTTPSServer*>(JSValue::decode(thisValue)); | |
return JSValue::encode(thisObject->m_url.get()); | |
} | |
void JSDebugHTTPSServerPrototype::finishCreation(JSC::VM& vm, JSC::JSGlobalObject* globalObject) | |
{ | |
Base::finishCreation(vm); | |
reifyStaticProperties(vm, JSDebugHTTPSServer::info(), JSDebugHTTPSServerPrototypeTableValues, *this); | |
this->putDirect(vm, vm.propertyNames->disposeSymbol, JSFunction::create(vm, globalObject, 1, String("dispose"_s), DebugHTTPSServerPrototype__disposeCallback, ImplementationVisibility::Public), PropertyAttribute::ReadOnly | PropertyAttribute::DontEnum | 0); | |
JSC_TO_STRING_TAG_WITHOUT_TRANSITION(); | |
} | |
JSDebugHTTPSServer::~JSDebugHTTPSServer() | |
{ | |
if (LIKELY(m_ctx)) { | |
DebugHTTPSServerClass__finalize(m_ctx); | |
} | |
} | |
void JSDebugHTTPSServer::destroy(JSCell* cell) | |
{ | |
static_cast<JSDebugHTTPSServer*>(cell)->JSDebugHTTPSServer::~JSDebugHTTPSServer(); | |
} | |
const ClassInfo JSDebugHTTPSServer::s_info = { "DebugHTTPSServer"_s, &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSDebugHTTPSServer) }; | |
void JSDebugHTTPSServer::finishCreation(VM& vm) | |
{ | |
Base::finishCreation(vm); | |
ASSERT(inherits(info())); | |
} | |
JSDebugHTTPSServer* JSDebugHTTPSServer::create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure, void* ctx) { | |
JSDebugHTTPSServer* ptr = new (NotNull, JSC::allocateCell<JSDebugHTTPSServer>(vm)) JSDebugHTTPSServer(vm, structure, ctx); | |
ptr->finishCreation(vm); | |
return ptr; | |
} | |
extern JSC_CALLCONV void* JSC_HOST_CALL_ATTRIBUTES DebugHTTPSServer__fromJS(JSC::EncodedJSValue value) { | |
JSC::JSValue decodedValue = JSC::JSValue::decode(value); | |
if (decodedValue.isEmpty() || !decodedValue.isCell()) | |
return nullptr; | |
JSC::JSCell* cell = decodedValue.asCell(); | |
JSDebugHTTPSServer* object = JSC::jsDynamicCast<JSDebugHTTPSServer*>(cell); | |
if (!object) | |
return nullptr; | |
return object->wrapped(); | |
} | |
extern JSC_CALLCONV void* JSC_HOST_CALL_ATTRIBUTES DebugHTTPSServer__fromJSDirect(JSC::EncodedJSValue value) { | |
JSC::JSValue decodedValue = JSC::JSValue::decode(value); | |
ASSERT(decodedValue.isCell()); | |
JSC::JSCell* cell = decodedValue.asCell(); | |
JSDebugHTTPSServer* object = JSC::jsDynamicCast<JSDebugHTTPSServer*>(cell); | |
if (!object) | |
return nullptr; | |
Zig::GlobalObject* globalObject = jsDynamicCast<Zig::GlobalObject*>(object->globalObject()); | |
if (UNLIKELY(globalObject == nullptr || cell->structureID() != globalObject->JSDebugHTTPSServerStructure()->id())) { | |
return nullptr; | |
} | |
return object->wrapped(); | |
} | |
extern JSC_CALLCONV bool JSC_HOST_CALL_ATTRIBUTES DebugHTTPSServer__dangerouslySetPtr(JSC::EncodedJSValue value, void* ptr) { | |
JSDebugHTTPSServer* object = JSC::jsDynamicCast<JSDebugHTTPSServer*>(JSValue::decode(value)); | |
if (!object) | |
return false; | |
object->m_ctx = ptr; | |
return true; | |
} | |
extern "C" const size_t DebugHTTPSServer__ptrOffset = JSDebugHTTPSServer::offsetOfWrapped(); | |
void JSDebugHTTPSServer::analyzeHeap(JSCell* cell, HeapAnalyzer& analyzer) | |
{ | |
auto* thisObject = jsCast<JSDebugHTTPSServer*>(cell); | |
if (void* wrapped = thisObject->wrapped()) { | |
// if (thisObject->scriptExecutionContext()) | |
// analyzer.setLabelForCell(cell, makeString("url ", thisObject->scriptExecutionContext()->url().string())); | |
} | |
Base::analyzeHeap(cell, analyzer); | |
} | |
JSObject* JSDebugHTTPSServer::createPrototype(VM& vm, JSDOMGlobalObject* globalObject) | |
{ | |
auto *structure = JSDebugHTTPSServerPrototype::createStructure(vm, globalObject, globalObject->objectPrototype()); | |
structure->setMayBePrototype(true); | |
return JSDebugHTTPSServerPrototype::create(vm, globalObject, structure); | |
} | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES DebugHTTPSServer__create(Zig::GlobalObject* globalObject, void* ptr) { | |
auto &vm = globalObject->vm(); | |
JSC::Structure* structure = globalObject->JSDebugHTTPSServerStructure(); | |
JSDebugHTTPSServer* instance = JSDebugHTTPSServer::create(vm, globalObject, structure, ptr); | |
return JSValue::encode(instance); | |
} | |
template<typename Visitor> | |
void JSDebugHTTPSServer::visitChildrenImpl(JSCell* cell, Visitor& visitor) | |
{ | |
JSDebugHTTPSServer* thisObject = jsCast<JSDebugHTTPSServer*>(cell); | |
ASSERT_GC_OBJECT_INHERITS(thisObject, info()); | |
Base::visitChildren(thisObject, visitor); | |
thisObject->visitAdditionalChildren<Visitor>(visitor); | |
} | |
DEFINE_VISIT_CHILDREN(JSDebugHTTPSServer); | |
template<typename Visitor> | |
void JSDebugHTTPSServer::visitAdditionalChildren(Visitor& visitor) | |
{ | |
JSDebugHTTPSServer* thisObject = this; | |
ASSERT_GC_OBJECT_INHERITS(thisObject, info()); | |
visitor.append(thisObject->m_address); | |
visitor.append(thisObject->m_hostname); | |
visitor.append(thisObject->m_id); | |
visitor.append(thisObject->m_url); | |
} | |
DEFINE_VISIT_ADDITIONAL_CHILDREN(JSDebugHTTPSServer); | |
template<typename Visitor> | |
void JSDebugHTTPSServer::visitOutputConstraintsImpl(JSCell *cell, Visitor& visitor) | |
{ | |
JSDebugHTTPSServer* thisObject = jsCast<JSDebugHTTPSServer*>(cell); | |
ASSERT_GC_OBJECT_INHERITS(thisObject, info()); | |
thisObject->visitAdditionalChildren<Visitor>(visitor); | |
} | |
DEFINE_VISIT_OUTPUT_CONSTRAINTS(JSDebugHTTPSServer); | |
class JSDebugHTTPServerPrototype final : public JSC::JSNonFinalObject { | |
public: | |
using Base = JSC::JSNonFinalObject; | |
static JSDebugHTTPServerPrototype* create(JSC::VM& vm, JSGlobalObject* globalObject, JSC::Structure* structure) | |
{ | |
JSDebugHTTPServerPrototype* ptr = new (NotNull, JSC::allocateCell<JSDebugHTTPServerPrototype>(vm)) JSDebugHTTPServerPrototype(vm, globalObject, structure); | |
ptr->finishCreation(vm, globalObject); | |
return ptr; | |
} | |
DECLARE_INFO; | |
template<typename CellType, JSC::SubspaceAccess> | |
static JSC::GCClient::IsoSubspace* subspaceFor(JSC::VM& vm) | |
{ | |
STATIC_ASSERT_ISO_SUBSPACE_SHARABLE(JSDebugHTTPServerPrototype, Base); | |
return &vm.plainObjectSpace(); | |
} | |
static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype) | |
{ | |
return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info()); | |
} | |
private: | |
JSDebugHTTPServerPrototype(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure) | |
: Base(vm, structure) | |
{ | |
} | |
void finishCreation(JSC::VM&, JSC::JSGlobalObject*); | |
}; | |
JSC_DECLARE_HOST_FUNCTION(DebugHTTPServerPrototype__disposeCallback); | |
JSC_DECLARE_CUSTOM_GETTER(DebugHTTPServerPrototype__addressGetterWrap); | |
JSC_DECLARE_CUSTOM_GETTER(DebugHTTPServerPrototype__developmentGetterWrap); | |
JSC_DECLARE_HOST_FUNCTION(DebugHTTPServerPrototype__fetchCallback); | |
JSC_DECLARE_CUSTOM_GETTER(DebugHTTPServerPrototype__hostnameGetterWrap); | |
JSC_DECLARE_CUSTOM_GETTER(DebugHTTPServerPrototype__idGetterWrap); | |
JSC_DECLARE_CUSTOM_GETTER(DebugHTTPServerPrototype__pendingRequestsGetterWrap); | |
JSC_DECLARE_CUSTOM_GETTER(DebugHTTPServerPrototype__pendingWebSocketsGetterWrap); | |
JSC_DECLARE_CUSTOM_GETTER(DebugHTTPServerPrototype__portGetterWrap); | |
JSC_DECLARE_CUSTOM_GETTER(DebugHTTPServerPrototype__protocolGetterWrap); | |
JSC_DECLARE_HOST_FUNCTION(DebugHTTPServerPrototype__publishCallback); | |
JSC_DECLARE_HOST_FUNCTION(DebugHTTPServerPrototype__refCallback); | |
JSC_DECLARE_HOST_FUNCTION(DebugHTTPServerPrototype__reloadCallback); | |
JSC_DECLARE_HOST_FUNCTION(DebugHTTPServerPrototype__requestIPCallback); | |
JSC_DECLARE_HOST_FUNCTION(DebugHTTPServerPrototype__stopCallback); | |
JSC_DECLARE_HOST_FUNCTION(DebugHTTPServerPrototype__unrefCallback); | |
JSC_DECLARE_HOST_FUNCTION(DebugHTTPServerPrototype__upgradeCallback); | |
JSC_DECLARE_CUSTOM_GETTER(DebugHTTPServerPrototype__urlGetterWrap); | |
STATIC_ASSERT_ISO_SUBSPACE_SHARABLE(JSDebugHTTPServerPrototype, JSDebugHTTPServerPrototype::Base); | |
static const HashTableValue JSDebugHTTPServerPrototypeTableValues[17] = { | |
{ "address"_s, static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::GetterSetterType, DebugHTTPServerPrototype__addressGetterWrap, 0 } } , | |
{ "development"_s, static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::GetterSetterType, DebugHTTPServerPrototype__developmentGetterWrap, 0 } } , | |
{ "fetch"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, DebugHTTPServerPrototype__fetchCallback, 1 } } , | |
{ "hostname"_s, static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::GetterSetterType, DebugHTTPServerPrototype__hostnameGetterWrap, 0 } } , | |
{ "id"_s, static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::GetterSetterType, DebugHTTPServerPrototype__idGetterWrap, 0 } } , | |
{ "pendingRequests"_s, static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::GetterSetterType, DebugHTTPServerPrototype__pendingRequestsGetterWrap, 0 } } , | |
{ "pendingWebSockets"_s, static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::GetterSetterType, DebugHTTPServerPrototype__pendingWebSocketsGetterWrap, 0 } } , | |
{ "port"_s, static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::GetterSetterType, DebugHTTPServerPrototype__portGetterWrap, 0 } } , | |
{ "protocol"_s, static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::GetterSetterType, DebugHTTPServerPrototype__protocolGetterWrap, 0 } } , | |
{ "publish"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, DebugHTTPServerPrototype__publishCallback, 3 } } , | |
{ "ref"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, DebugHTTPServerPrototype__refCallback, 0 } } , | |
{ "reload"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, DebugHTTPServerPrototype__reloadCallback, 2 } } , | |
{ "requestIP"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, DebugHTTPServerPrototype__requestIPCallback, 1 } } , | |
{ "stop"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, DebugHTTPServerPrototype__stopCallback, 1 } } , | |
{ "unref"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, DebugHTTPServerPrototype__unrefCallback, 0 } } , | |
{ "upgrade"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, DebugHTTPServerPrototype__upgradeCallback, 1 } } , | |
{ "url"_s, static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::GetterSetterType, DebugHTTPServerPrototype__urlGetterWrap, 0 } } | |
}; | |
const ClassInfo JSDebugHTTPServerPrototype::s_info = { "DebugHTTPServer"_s, &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSDebugHTTPServerPrototype) }; | |
JSC_DEFINE_CUSTOM_GETTER(jsDebugHTTPServerConstructor, (JSGlobalObject * lexicalGlobalObject, EncodedJSValue thisValue, PropertyName)) | |
{ | |
VM& vm = JSC::getVM(lexicalGlobalObject); | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
auto* globalObject = reinterpret_cast<Zig::GlobalObject*>(lexicalGlobalObject); | |
auto* prototype = jsDynamicCast<JSDebugHTTPServerPrototype*>(JSValue::decode(thisValue)); | |
if (UNLIKELY(!prototype)) | |
return throwVMTypeError(lexicalGlobalObject, throwScope, "Cannot get constructor for DebugHTTPServer"_s); | |
return JSValue::encode(globalObject->JSDebugHTTPServerConstructor()); | |
} | |
JSC_DEFINE_HOST_FUNCTION(DebugHTTPServerPrototype__disposeCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSDebugHTTPServer* thisObject = jsDynamicCast<JSDebugHTTPServer*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof DebugHTTPServer"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = DebugHTTPServerPrototype__dispose(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "DebugHTTPServer.dispose returned an empty value without an exception"); | |
return result; | |
#endif | |
return DebugHTTPServerPrototype__dispose(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_CUSTOM_GETTER(DebugHTTPServerPrototype__addressGetterWrap, (JSGlobalObject * lexicalGlobalObject, EncodedJSValue encodedThisValue, PropertyName attributeName)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
Zig::GlobalObject *globalObject = reinterpret_cast<Zig::GlobalObject*>(lexicalGlobalObject); | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
JSDebugHTTPServer* thisObject = jsCast<JSDebugHTTPServer*>(JSValue::decode(encodedThisValue)); | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
if (JSValue cachedValue = thisObject->m_address.get()) | |
return JSValue::encode(cachedValue); | |
JSC::JSValue result = JSC::JSValue::decode( | |
DebugHTTPServerPrototype__getAddress(thisObject->wrapped(), globalObject) | |
); | |
RETURN_IF_EXCEPTION(throwScope, {}); | |
thisObject->m_address.set(vm, thisObject, result); | |
RELEASE_AND_RETURN(throwScope, JSValue::encode(result)); | |
} | |
extern JSC_CALLCONV void DebugHTTPServerPrototype__addressSetCachedValue(JSC::EncodedJSValue thisValue, JSC::JSGlobalObject *globalObject, JSC::EncodedJSValue value) | |
{ | |
auto& vm = globalObject->vm(); | |
auto* thisObject = jsCast<JSDebugHTTPServer*>(JSValue::decode(thisValue)); | |
thisObject->m_address.set(vm, thisObject, JSValue::decode(value)); | |
} | |
extern JSC_CALLCONV JSC::EncodedJSValue DebugHTTPServerPrototype__addressGetCachedValue(JSC::EncodedJSValue thisValue) | |
{ | |
auto* thisObject = jsCast<JSDebugHTTPServer*>(JSValue::decode(thisValue)); | |
return JSValue::encode(thisObject->m_address.get()); | |
} | |
JSC_DEFINE_CUSTOM_GETTER(DebugHTTPServerPrototype__developmentGetterWrap, (JSGlobalObject * lexicalGlobalObject, EncodedJSValue encodedThisValue, PropertyName attributeName)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
Zig::GlobalObject *globalObject = reinterpret_cast<Zig::GlobalObject*>(lexicalGlobalObject); | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
JSDebugHTTPServer* thisObject = jsCast<JSDebugHTTPServer*>(JSValue::decode(encodedThisValue)); | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
JSC::EncodedJSValue result = DebugHTTPServerPrototype__getDevelopment(thisObject->wrapped(), globalObject); | |
RETURN_IF_EXCEPTION(throwScope, {}); | |
RELEASE_AND_RETURN(throwScope, result); | |
} | |
JSC_DEFINE_HOST_FUNCTION(DebugHTTPServerPrototype__fetchCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSDebugHTTPServer* thisObject = jsDynamicCast<JSDebugHTTPServer*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof DebugHTTPServer"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = DebugHTTPServerPrototype__doFetch(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "DebugHTTPServer.doFetch returned an empty value without an exception"); | |
return result; | |
#endif | |
return DebugHTTPServerPrototype__doFetch(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_CUSTOM_GETTER(DebugHTTPServerPrototype__hostnameGetterWrap, (JSGlobalObject * lexicalGlobalObject, EncodedJSValue encodedThisValue, PropertyName attributeName)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
Zig::GlobalObject *globalObject = reinterpret_cast<Zig::GlobalObject*>(lexicalGlobalObject); | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
JSDebugHTTPServer* thisObject = jsCast<JSDebugHTTPServer*>(JSValue::decode(encodedThisValue)); | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
if (JSValue cachedValue = thisObject->m_hostname.get()) | |
return JSValue::encode(cachedValue); | |
JSC::JSValue result = JSC::JSValue::decode( | |
DebugHTTPServerPrototype__getHostname(thisObject->wrapped(), globalObject) | |
); | |
RETURN_IF_EXCEPTION(throwScope, {}); | |
thisObject->m_hostname.set(vm, thisObject, result); | |
RELEASE_AND_RETURN(throwScope, JSValue::encode(result)); | |
} | |
extern JSC_CALLCONV void DebugHTTPServerPrototype__hostnameSetCachedValue(JSC::EncodedJSValue thisValue, JSC::JSGlobalObject *globalObject, JSC::EncodedJSValue value) | |
{ | |
auto& vm = globalObject->vm(); | |
auto* thisObject = jsCast<JSDebugHTTPServer*>(JSValue::decode(thisValue)); | |
thisObject->m_hostname.set(vm, thisObject, JSValue::decode(value)); | |
} | |
extern JSC_CALLCONV JSC::EncodedJSValue DebugHTTPServerPrototype__hostnameGetCachedValue(JSC::EncodedJSValue thisValue) | |
{ | |
auto* thisObject = jsCast<JSDebugHTTPServer*>(JSValue::decode(thisValue)); | |
return JSValue::encode(thisObject->m_hostname.get()); | |
} | |
JSC_DEFINE_CUSTOM_GETTER(DebugHTTPServerPrototype__idGetterWrap, (JSGlobalObject * lexicalGlobalObject, EncodedJSValue encodedThisValue, PropertyName attributeName)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
Zig::GlobalObject *globalObject = reinterpret_cast<Zig::GlobalObject*>(lexicalGlobalObject); | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
JSDebugHTTPServer* thisObject = jsCast<JSDebugHTTPServer*>(JSValue::decode(encodedThisValue)); | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
if (JSValue cachedValue = thisObject->m_id.get()) | |
return JSValue::encode(cachedValue); | |
JSC::JSValue result = JSC::JSValue::decode( | |
DebugHTTPServerPrototype__getId(thisObject->wrapped(), globalObject) | |
); | |
RETURN_IF_EXCEPTION(throwScope, {}); | |
thisObject->m_id.set(vm, thisObject, result); | |
RELEASE_AND_RETURN(throwScope, JSValue::encode(result)); | |
} | |
extern JSC_CALLCONV void DebugHTTPServerPrototype__idSetCachedValue(JSC::EncodedJSValue thisValue, JSC::JSGlobalObject *globalObject, JSC::EncodedJSValue value) | |
{ | |
auto& vm = globalObject->vm(); | |
auto* thisObject = jsCast<JSDebugHTTPServer*>(JSValue::decode(thisValue)); | |
thisObject->m_id.set(vm, thisObject, JSValue::decode(value)); | |
} | |
extern JSC_CALLCONV JSC::EncodedJSValue DebugHTTPServerPrototype__idGetCachedValue(JSC::EncodedJSValue thisValue) | |
{ | |
auto* thisObject = jsCast<JSDebugHTTPServer*>(JSValue::decode(thisValue)); | |
return JSValue::encode(thisObject->m_id.get()); | |
} | |
JSC_DEFINE_CUSTOM_GETTER(DebugHTTPServerPrototype__pendingRequestsGetterWrap, (JSGlobalObject * lexicalGlobalObject, EncodedJSValue encodedThisValue, PropertyName attributeName)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
Zig::GlobalObject *globalObject = reinterpret_cast<Zig::GlobalObject*>(lexicalGlobalObject); | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
JSDebugHTTPServer* thisObject = jsCast<JSDebugHTTPServer*>(JSValue::decode(encodedThisValue)); | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
JSC::EncodedJSValue result = DebugHTTPServerPrototype__getPendingRequests(thisObject->wrapped(), globalObject); | |
RETURN_IF_EXCEPTION(throwScope, {}); | |
RELEASE_AND_RETURN(throwScope, result); | |
} | |
JSC_DEFINE_CUSTOM_GETTER(DebugHTTPServerPrototype__pendingWebSocketsGetterWrap, (JSGlobalObject * lexicalGlobalObject, EncodedJSValue encodedThisValue, PropertyName attributeName)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
Zig::GlobalObject *globalObject = reinterpret_cast<Zig::GlobalObject*>(lexicalGlobalObject); | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
JSDebugHTTPServer* thisObject = jsCast<JSDebugHTTPServer*>(JSValue::decode(encodedThisValue)); | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
JSC::EncodedJSValue result = DebugHTTPServerPrototype__getPendingWebSockets(thisObject->wrapped(), globalObject); | |
RETURN_IF_EXCEPTION(throwScope, {}); | |
RELEASE_AND_RETURN(throwScope, result); | |
} | |
JSC_DEFINE_CUSTOM_GETTER(DebugHTTPServerPrototype__portGetterWrap, (JSGlobalObject * lexicalGlobalObject, EncodedJSValue encodedThisValue, PropertyName attributeName)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
Zig::GlobalObject *globalObject = reinterpret_cast<Zig::GlobalObject*>(lexicalGlobalObject); | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
JSDebugHTTPServer* thisObject = jsCast<JSDebugHTTPServer*>(JSValue::decode(encodedThisValue)); | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
JSC::EncodedJSValue result = DebugHTTPServerPrototype__getPort(thisObject->wrapped(), globalObject); | |
RETURN_IF_EXCEPTION(throwScope, {}); | |
RELEASE_AND_RETURN(throwScope, result); | |
} | |
JSC_DEFINE_CUSTOM_GETTER(DebugHTTPServerPrototype__protocolGetterWrap, (JSGlobalObject * lexicalGlobalObject, EncodedJSValue encodedThisValue, PropertyName attributeName)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
Zig::GlobalObject *globalObject = reinterpret_cast<Zig::GlobalObject*>(lexicalGlobalObject); | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
JSDebugHTTPServer* thisObject = jsCast<JSDebugHTTPServer*>(JSValue::decode(encodedThisValue)); | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
JSC::EncodedJSValue result = DebugHTTPServerPrototype__getProtocol(thisObject->wrapped(), globalObject); | |
RETURN_IF_EXCEPTION(throwScope, {}); | |
RELEASE_AND_RETURN(throwScope, result); | |
} | |
JSC_DEFINE_HOST_FUNCTION(DebugHTTPServerPrototype__publishCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSDebugHTTPServer* thisObject = jsDynamicCast<JSDebugHTTPServer*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof DebugHTTPServer"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = DebugHTTPServerPrototype__doPublish(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "DebugHTTPServer.doPublish returned an empty value without an exception"); | |
return result; | |
#endif | |
return DebugHTTPServerPrototype__doPublish(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_HOST_FUNCTION(DebugHTTPServerPrototype__refCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSDebugHTTPServer* thisObject = jsDynamicCast<JSDebugHTTPServer*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof DebugHTTPServer"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = DebugHTTPServerPrototype__doRef(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "DebugHTTPServer.doRef returned an empty value without an exception"); | |
return result; | |
#endif | |
return DebugHTTPServerPrototype__doRef(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_HOST_FUNCTION(DebugHTTPServerPrototype__reloadCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSDebugHTTPServer* thisObject = jsDynamicCast<JSDebugHTTPServer*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof DebugHTTPServer"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = DebugHTTPServerPrototype__doReload(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "DebugHTTPServer.doReload returned an empty value without an exception"); | |
return result; | |
#endif | |
return DebugHTTPServerPrototype__doReload(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_HOST_FUNCTION(DebugHTTPServerPrototype__requestIPCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSDebugHTTPServer* thisObject = jsDynamicCast<JSDebugHTTPServer*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof DebugHTTPServer"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = DebugHTTPServerPrototype__doRequestIP(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "DebugHTTPServer.doRequestIP returned an empty value without an exception"); | |
return result; | |
#endif | |
return DebugHTTPServerPrototype__doRequestIP(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_HOST_FUNCTION(DebugHTTPServerPrototype__stopCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSDebugHTTPServer* thisObject = jsDynamicCast<JSDebugHTTPServer*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof DebugHTTPServer"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = DebugHTTPServerPrototype__doStop(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "DebugHTTPServer.doStop returned an empty value without an exception"); | |
return result; | |
#endif | |
return DebugHTTPServerPrototype__doStop(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_HOST_FUNCTION(DebugHTTPServerPrototype__unrefCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSDebugHTTPServer* thisObject = jsDynamicCast<JSDebugHTTPServer*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof DebugHTTPServer"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = DebugHTTPServerPrototype__doUnref(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "DebugHTTPServer.doUnref returned an empty value without an exception"); | |
return result; | |
#endif | |
return DebugHTTPServerPrototype__doUnref(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_HOST_FUNCTION(DebugHTTPServerPrototype__upgradeCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSDebugHTTPServer* thisObject = jsDynamicCast<JSDebugHTTPServer*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof DebugHTTPServer"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = DebugHTTPServerPrototype__doUpgrade(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "DebugHTTPServer.doUpgrade returned an empty value without an exception"); | |
return result; | |
#endif | |
return DebugHTTPServerPrototype__doUpgrade(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_CUSTOM_GETTER(DebugHTTPServerPrototype__urlGetterWrap, (JSGlobalObject * lexicalGlobalObject, EncodedJSValue encodedThisValue, PropertyName attributeName)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
Zig::GlobalObject *globalObject = reinterpret_cast<Zig::GlobalObject*>(lexicalGlobalObject); | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
JSDebugHTTPServer* thisObject = jsCast<JSDebugHTTPServer*>(JSValue::decode(encodedThisValue)); | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
if (JSValue cachedValue = thisObject->m_url.get()) | |
return JSValue::encode(cachedValue); | |
JSC::JSValue result = JSC::JSValue::decode( | |
DebugHTTPServerPrototype__getURL(thisObject->wrapped(), globalObject) | |
); | |
RETURN_IF_EXCEPTION(throwScope, {}); | |
thisObject->m_url.set(vm, thisObject, result); | |
RELEASE_AND_RETURN(throwScope, JSValue::encode(result)); | |
} | |
extern JSC_CALLCONV void DebugHTTPServerPrototype__urlSetCachedValue(JSC::EncodedJSValue thisValue, JSC::JSGlobalObject *globalObject, JSC::EncodedJSValue value) | |
{ | |
auto& vm = globalObject->vm(); | |
auto* thisObject = jsCast<JSDebugHTTPServer*>(JSValue::decode(thisValue)); | |
thisObject->m_url.set(vm, thisObject, JSValue::decode(value)); | |
} | |
extern JSC_CALLCONV JSC::EncodedJSValue DebugHTTPServerPrototype__urlGetCachedValue(JSC::EncodedJSValue thisValue) | |
{ | |
auto* thisObject = jsCast<JSDebugHTTPServer*>(JSValue::decode(thisValue)); | |
return JSValue::encode(thisObject->m_url.get()); | |
} | |
void JSDebugHTTPServerPrototype::finishCreation(JSC::VM& vm, JSC::JSGlobalObject* globalObject) | |
{ | |
Base::finishCreation(vm); | |
reifyStaticProperties(vm, JSDebugHTTPServer::info(), JSDebugHTTPServerPrototypeTableValues, *this); | |
this->putDirect(vm, vm.propertyNames->disposeSymbol, JSFunction::create(vm, globalObject, 1, String("dispose"_s), DebugHTTPServerPrototype__disposeCallback, ImplementationVisibility::Public), PropertyAttribute::ReadOnly | PropertyAttribute::DontEnum | 0); | |
JSC_TO_STRING_TAG_WITHOUT_TRANSITION(); | |
} | |
JSDebugHTTPServer::~JSDebugHTTPServer() | |
{ | |
if (LIKELY(m_ctx)) { | |
DebugHTTPServerClass__finalize(m_ctx); | |
} | |
} | |
void JSDebugHTTPServer::destroy(JSCell* cell) | |
{ | |
static_cast<JSDebugHTTPServer*>(cell)->JSDebugHTTPServer::~JSDebugHTTPServer(); | |
} | |
const ClassInfo JSDebugHTTPServer::s_info = { "DebugHTTPServer"_s, &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSDebugHTTPServer) }; | |
void JSDebugHTTPServer::finishCreation(VM& vm) | |
{ | |
Base::finishCreation(vm); | |
ASSERT(inherits(info())); | |
} | |
JSDebugHTTPServer* JSDebugHTTPServer::create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure, void* ctx) { | |
JSDebugHTTPServer* ptr = new (NotNull, JSC::allocateCell<JSDebugHTTPServer>(vm)) JSDebugHTTPServer(vm, structure, ctx); | |
ptr->finishCreation(vm); | |
return ptr; | |
} | |
extern JSC_CALLCONV void* JSC_HOST_CALL_ATTRIBUTES DebugHTTPServer__fromJS(JSC::EncodedJSValue value) { | |
JSC::JSValue decodedValue = JSC::JSValue::decode(value); | |
if (decodedValue.isEmpty() || !decodedValue.isCell()) | |
return nullptr; | |
JSC::JSCell* cell = decodedValue.asCell(); | |
JSDebugHTTPServer* object = JSC::jsDynamicCast<JSDebugHTTPServer*>(cell); | |
if (!object) | |
return nullptr; | |
return object->wrapped(); | |
} | |
extern JSC_CALLCONV void* JSC_HOST_CALL_ATTRIBUTES DebugHTTPServer__fromJSDirect(JSC::EncodedJSValue value) { | |
JSC::JSValue decodedValue = JSC::JSValue::decode(value); | |
ASSERT(decodedValue.isCell()); | |
JSC::JSCell* cell = decodedValue.asCell(); | |
JSDebugHTTPServer* object = JSC::jsDynamicCast<JSDebugHTTPServer*>(cell); | |
if (!object) | |
return nullptr; | |
Zig::GlobalObject* globalObject = jsDynamicCast<Zig::GlobalObject*>(object->globalObject()); | |
if (UNLIKELY(globalObject == nullptr || cell->structureID() != globalObject->JSDebugHTTPServerStructure()->id())) { | |
return nullptr; | |
} | |
return object->wrapped(); | |
} | |
extern JSC_CALLCONV bool JSC_HOST_CALL_ATTRIBUTES DebugHTTPServer__dangerouslySetPtr(JSC::EncodedJSValue value, void* ptr) { | |
JSDebugHTTPServer* object = JSC::jsDynamicCast<JSDebugHTTPServer*>(JSValue::decode(value)); | |
if (!object) | |
return false; | |
object->m_ctx = ptr; | |
return true; | |
} | |
extern "C" const size_t DebugHTTPServer__ptrOffset = JSDebugHTTPServer::offsetOfWrapped(); | |
void JSDebugHTTPServer::analyzeHeap(JSCell* cell, HeapAnalyzer& analyzer) | |
{ | |
auto* thisObject = jsCast<JSDebugHTTPServer*>(cell); | |
if (void* wrapped = thisObject->wrapped()) { | |
// if (thisObject->scriptExecutionContext()) | |
// analyzer.setLabelForCell(cell, makeString("url ", thisObject->scriptExecutionContext()->url().string())); | |
} | |
Base::analyzeHeap(cell, analyzer); | |
} | |
JSObject* JSDebugHTTPServer::createPrototype(VM& vm, JSDOMGlobalObject* globalObject) | |
{ | |
auto *structure = JSDebugHTTPServerPrototype::createStructure(vm, globalObject, globalObject->objectPrototype()); | |
structure->setMayBePrototype(true); | |
return JSDebugHTTPServerPrototype::create(vm, globalObject, structure); | |
} | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES DebugHTTPServer__create(Zig::GlobalObject* globalObject, void* ptr) { | |
auto &vm = globalObject->vm(); | |
JSC::Structure* structure = globalObject->JSDebugHTTPServerStructure(); | |
JSDebugHTTPServer* instance = JSDebugHTTPServer::create(vm, globalObject, structure, ptr); | |
return JSValue::encode(instance); | |
} | |
template<typename Visitor> | |
void JSDebugHTTPServer::visitChildrenImpl(JSCell* cell, Visitor& visitor) | |
{ | |
JSDebugHTTPServer* thisObject = jsCast<JSDebugHTTPServer*>(cell); | |
ASSERT_GC_OBJECT_INHERITS(thisObject, info()); | |
Base::visitChildren(thisObject, visitor); | |
thisObject->visitAdditionalChildren<Visitor>(visitor); | |
} | |
DEFINE_VISIT_CHILDREN(JSDebugHTTPServer); | |
template<typename Visitor> | |
void JSDebugHTTPServer::visitAdditionalChildren(Visitor& visitor) | |
{ | |
JSDebugHTTPServer* thisObject = this; | |
ASSERT_GC_OBJECT_INHERITS(thisObject, info()); | |
visitor.append(thisObject->m_address); | |
visitor.append(thisObject->m_hostname); | |
visitor.append(thisObject->m_id); | |
visitor.append(thisObject->m_url); | |
} | |
DEFINE_VISIT_ADDITIONAL_CHILDREN(JSDebugHTTPServer); | |
template<typename Visitor> | |
void JSDebugHTTPServer::visitOutputConstraintsImpl(JSCell *cell, Visitor& visitor) | |
{ | |
JSDebugHTTPServer* thisObject = jsCast<JSDebugHTTPServer*>(cell); | |
ASSERT_GC_OBJECT_INHERITS(thisObject, info()); | |
thisObject->visitAdditionalChildren<Visitor>(visitor); | |
} | |
DEFINE_VISIT_OUTPUT_CONSTRAINTS(JSDebugHTTPServer); | |
class JSDirentPrototype final : public JSC::JSNonFinalObject { | |
public: | |
using Base = JSC::JSNonFinalObject; | |
static JSDirentPrototype* create(JSC::VM& vm, JSGlobalObject* globalObject, JSC::Structure* structure) | |
{ | |
JSDirentPrototype* ptr = new (NotNull, JSC::allocateCell<JSDirentPrototype>(vm)) JSDirentPrototype(vm, globalObject, structure); | |
ptr->finishCreation(vm, globalObject); | |
return ptr; | |
} | |
DECLARE_INFO; | |
template<typename CellType, JSC::SubspaceAccess> | |
static JSC::GCClient::IsoSubspace* subspaceFor(JSC::VM& vm) | |
{ | |
STATIC_ASSERT_ISO_SUBSPACE_SHARABLE(JSDirentPrototype, Base); | |
return &vm.plainObjectSpace(); | |
} | |
static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype) | |
{ | |
return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info()); | |
} | |
private: | |
JSDirentPrototype(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure) | |
: Base(vm, structure) | |
{ | |
} | |
void finishCreation(JSC::VM&, JSC::JSGlobalObject*); | |
}; | |
class JSDirentConstructor final : public JSC::InternalFunction { | |
public: | |
using Base = JSC::InternalFunction; | |
static JSDirentConstructor* create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure, JSDirentPrototype* prototype); | |
static constexpr unsigned StructureFlags = Base::StructureFlags; | |
static constexpr bool needsDestruction = false; | |
static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype) | |
{ | |
return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::InternalFunctionType, StructureFlags), info()); | |
} | |
template<typename, JSC::SubspaceAccess mode> static JSC::GCClient::IsoSubspace* subspaceFor(JSC::VM& vm) | |
{ | |
if constexpr (mode == JSC::SubspaceAccess::Concurrently) | |
return nullptr; | |
return WebCore::subspaceForImpl<JSDirentConstructor, WebCore::UseCustomHeapCellType::No>( | |
vm, | |
[](auto& spaces) { return spaces.m_clientSubspaceForBunClassConstructor.get(); }, | |
[](auto& spaces, auto&& space) { spaces.m_clientSubspaceForBunClassConstructor = std::forward<decltype(space)>(space); }, | |
[](auto& spaces) { return spaces.m_subspaceForBunClassConstructor.get(); }, | |
[](auto& spaces, auto&& space) { spaces.m_subspaceForBunClassConstructor = std::forward<decltype(space)>(space); }); | |
} | |
void initializeProperties(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSDirentPrototype* prototype); | |
// Must be defined for each specialization class. | |
static JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES construct(JSC::JSGlobalObject*, JSC::CallFrame*); | |
static JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES call(JSC::JSGlobalObject*, JSC::CallFrame*); | |
DECLARE_EXPORT_INFO; | |
private: | |
JSDirentConstructor(JSC::VM& vm, JSC::Structure* structure); | |
void finishCreation(JSC::VM&, JSC::JSGlobalObject* globalObject, JSDirentPrototype* prototype); | |
}; | |
JSC_DECLARE_HOST_FUNCTION(DirentPrototype__isBlockDeviceCallback); | |
JSC_DECLARE_HOST_FUNCTION(DirentPrototype__isCharacterDeviceCallback); | |
JSC_DECLARE_HOST_FUNCTION(DirentPrototype__isDirectoryCallback); | |
JSC_DECLARE_HOST_FUNCTION(DirentPrototype__isFIFOCallback); | |
JSC_DECLARE_HOST_FUNCTION(DirentPrototype__isFileCallback); | |
JSC_DECLARE_HOST_FUNCTION(DirentPrototype__isSocketCallback); | |
JSC_DECLARE_HOST_FUNCTION(DirentPrototype__isSymbolicLinkCallback); | |
JSC_DECLARE_CUSTOM_GETTER(DirentPrototype__nameGetterWrap); | |
static JSC_DECLARE_CUSTOM_SETTER(DirentPrototype__nameSetterWrap); | |
JSC_DECLARE_CUSTOM_GETTER(DirentPrototype__parentPathGetterWrap); | |
static JSC_DECLARE_CUSTOM_SETTER(DirentPrototype__parentPathSetterWrap); | |
JSC_DECLARE_CUSTOM_GETTER(DirentPrototype__pathGetterWrap); | |
static JSC_DECLARE_CUSTOM_SETTER(DirentPrototype__pathSetterWrap); | |
STATIC_ASSERT_ISO_SUBSPACE_SHARABLE(JSDirentPrototype, JSDirentPrototype::Base); | |
static const HashTableValue JSDirentPrototypeTableValues[10] = { | |
{ "isBlockDevice"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, DirentPrototype__isBlockDeviceCallback, 0 } } , | |
{ "isCharacterDevice"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, DirentPrototype__isCharacterDeviceCallback, 0 } } , | |
{ "isDirectory"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, DirentPrototype__isDirectoryCallback, 0 } } , | |
{ "isFIFO"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, DirentPrototype__isFIFOCallback, 0 } } , | |
{ "isFile"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, DirentPrototype__isFileCallback, 0 } } , | |
{ "isSocket"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, DirentPrototype__isSocketCallback, 0 } } , | |
{ "isSymbolicLink"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, DirentPrototype__isSymbolicLinkCallback, 0 } } , | |
{ "name"_s, static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::GetterSetterType, &DirentPrototype__nameGetterWrap, &DirentPrototype__nameSetterWrap } } , | |
{ "parentPath"_s, static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::GetterSetterType, &DirentPrototype__parentPathGetterWrap, &DirentPrototype__parentPathSetterWrap } } , | |
{ "path"_s, static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::GetterSetterType, &DirentPrototype__pathGetterWrap, &DirentPrototype__pathSetterWrap } } | |
}; | |
const ClassInfo JSDirentPrototype::s_info = { "Dirent"_s, &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSDirentPrototype) }; | |
JSC_DEFINE_CUSTOM_GETTER(jsDirentConstructor, (JSGlobalObject * lexicalGlobalObject, EncodedJSValue thisValue, PropertyName)) | |
{ | |
VM& vm = JSC::getVM(lexicalGlobalObject); | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
auto* globalObject = reinterpret_cast<Zig::GlobalObject*>(lexicalGlobalObject); | |
auto* prototype = jsDynamicCast<JSDirentPrototype*>(JSValue::decode(thisValue)); | |
if (UNLIKELY(!prototype)) | |
return throwVMTypeError(lexicalGlobalObject, throwScope, "Cannot get constructor for Dirent"_s); | |
return JSValue::encode(globalObject->JSDirentConstructor()); | |
} | |
JSC_DEFINE_CUSTOM_SETTER(DirentPrototype__isBlockDeviceSetterWrap, (JSGlobalObject * lexicalGlobalObject, EncodedJSValue encodedThisValue, EncodedJSValue encodedValue, PropertyName attributeName)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
JSValue thisValue = JSValue::decode(encodedThisValue); | |
if (!thisValue.isObject()) { | |
return false; | |
} | |
JSObject *thisObject = asObject(thisValue); | |
thisObject->putDirect(vm, attributeName, JSValue::decode(encodedValue), 0); | |
return true; | |
} | |
JSC_DEFINE_HOST_FUNCTION(DirentPrototype__isBlockDeviceCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSDirent* thisObject = jsDynamicCast<JSDirent*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof Dirent"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = DirentPrototype__isBlockDevice(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "Dirent.isBlockDevice returned an empty value without an exception"); | |
return result; | |
#endif | |
return DirentPrototype__isBlockDevice(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_CUSTOM_SETTER(DirentPrototype__isCharacterDeviceSetterWrap, (JSGlobalObject * lexicalGlobalObject, EncodedJSValue encodedThisValue, EncodedJSValue encodedValue, PropertyName attributeName)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
JSValue thisValue = JSValue::decode(encodedThisValue); | |
if (!thisValue.isObject()) { | |
return false; | |
} | |
JSObject *thisObject = asObject(thisValue); | |
thisObject->putDirect(vm, attributeName, JSValue::decode(encodedValue), 0); | |
return true; | |
} | |
JSC_DEFINE_HOST_FUNCTION(DirentPrototype__isCharacterDeviceCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSDirent* thisObject = jsDynamicCast<JSDirent*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof Dirent"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = DirentPrototype__isCharacterDevice(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "Dirent.isCharacterDevice returned an empty value without an exception"); | |
return result; | |
#endif | |
return DirentPrototype__isCharacterDevice(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_CUSTOM_SETTER(DirentPrototype__isDirectorySetterWrap, (JSGlobalObject * lexicalGlobalObject, EncodedJSValue encodedThisValue, EncodedJSValue encodedValue, PropertyName attributeName)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
JSValue thisValue = JSValue::decode(encodedThisValue); | |
if (!thisValue.isObject()) { | |
return false; | |
} | |
JSObject *thisObject = asObject(thisValue); | |
thisObject->putDirect(vm, attributeName, JSValue::decode(encodedValue), 0); | |
return true; | |
} | |
JSC_DEFINE_HOST_FUNCTION(DirentPrototype__isDirectoryCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSDirent* thisObject = jsDynamicCast<JSDirent*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof Dirent"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = DirentPrototype__isDirectory(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "Dirent.isDirectory returned an empty value without an exception"); | |
return result; | |
#endif | |
return DirentPrototype__isDirectory(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_CUSTOM_SETTER(DirentPrototype__isFIFOSetterWrap, (JSGlobalObject * lexicalGlobalObject, EncodedJSValue encodedThisValue, EncodedJSValue encodedValue, PropertyName attributeName)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
JSValue thisValue = JSValue::decode(encodedThisValue); | |
if (!thisValue.isObject()) { | |
return false; | |
} | |
JSObject *thisObject = asObject(thisValue); | |
thisObject->putDirect(vm, attributeName, JSValue::decode(encodedValue), 0); | |
return true; | |
} | |
JSC_DEFINE_HOST_FUNCTION(DirentPrototype__isFIFOCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSDirent* thisObject = jsDynamicCast<JSDirent*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof Dirent"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = DirentPrototype__isFIFO(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "Dirent.isFIFO returned an empty value without an exception"); | |
return result; | |
#endif | |
return DirentPrototype__isFIFO(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_CUSTOM_SETTER(DirentPrototype__isFileSetterWrap, (JSGlobalObject * lexicalGlobalObject, EncodedJSValue encodedThisValue, EncodedJSValue encodedValue, PropertyName attributeName)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
JSValue thisValue = JSValue::decode(encodedThisValue); | |
if (!thisValue.isObject()) { | |
return false; | |
} | |
JSObject *thisObject = asObject(thisValue); | |
thisObject->putDirect(vm, attributeName, JSValue::decode(encodedValue), 0); | |
return true; | |
} | |
JSC_DEFINE_HOST_FUNCTION(DirentPrototype__isFileCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSDirent* thisObject = jsDynamicCast<JSDirent*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof Dirent"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = DirentPrototype__isFile(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "Dirent.isFile returned an empty value without an exception"); | |
return result; | |
#endif | |
return DirentPrototype__isFile(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_CUSTOM_SETTER(DirentPrototype__isSocketSetterWrap, (JSGlobalObject * lexicalGlobalObject, EncodedJSValue encodedThisValue, EncodedJSValue encodedValue, PropertyName attributeName)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
JSValue thisValue = JSValue::decode(encodedThisValue); | |
if (!thisValue.isObject()) { | |
return false; | |
} | |
JSObject *thisObject = asObject(thisValue); | |
thisObject->putDirect(vm, attributeName, JSValue::decode(encodedValue), 0); | |
return true; | |
} | |
JSC_DEFINE_HOST_FUNCTION(DirentPrototype__isSocketCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSDirent* thisObject = jsDynamicCast<JSDirent*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof Dirent"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = DirentPrototype__isSocket(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "Dirent.isSocket returned an empty value without an exception"); | |
return result; | |
#endif | |
return DirentPrototype__isSocket(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_CUSTOM_SETTER(DirentPrototype__isSymbolicLinkSetterWrap, (JSGlobalObject * lexicalGlobalObject, EncodedJSValue encodedThisValue, EncodedJSValue encodedValue, PropertyName attributeName)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
JSValue thisValue = JSValue::decode(encodedThisValue); | |
if (!thisValue.isObject()) { | |
return false; | |
} | |
JSObject *thisObject = asObject(thisValue); | |
thisObject->putDirect(vm, attributeName, JSValue::decode(encodedValue), 0); | |
return true; | |
} | |
JSC_DEFINE_HOST_FUNCTION(DirentPrototype__isSymbolicLinkCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSDirent* thisObject = jsDynamicCast<JSDirent*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof Dirent"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = DirentPrototype__isSymbolicLink(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "Dirent.isSymbolicLink returned an empty value without an exception"); | |
return result; | |
#endif | |
return DirentPrototype__isSymbolicLink(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_CUSTOM_GETTER(DirentPrototype__nameGetterWrap, (JSGlobalObject * globalObject, EncodedJSValue encodedThisValue, PropertyName attributeName)) | |
{ | |
auto& vm = globalObject->vm(); | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
JSDirent* thisObject = jsDynamicCast<JSDirent*>(JSValue::decode(encodedThisValue)); | |
if (UNLIKELY(!thisObject)) { | |
return JSValue::encode(jsUndefined()); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
if (JSValue cachedValue = thisObject->m_name.get()) | |
return JSValue::encode(cachedValue); | |
JSC::JSValue result = JSC::JSValue::decode( | |
DirentPrototype__getName(thisObject->wrapped(), globalObject) | |
); | |
RETURN_IF_EXCEPTION(throwScope, {}); | |
thisObject->m_name.set(vm, thisObject, result); | |
RELEASE_AND_RETURN(throwScope, JSValue::encode(result)); | |
} | |
extern JSC_CALLCONV void DirentPrototype__nameSetCachedValue(JSC::EncodedJSValue thisValue, JSC::JSGlobalObject *globalObject, JSC::EncodedJSValue value) | |
{ | |
auto& vm = globalObject->vm(); | |
auto* thisObject = jsCast<JSDirent*>(JSValue::decode(thisValue)); | |
thisObject->m_name.set(vm, thisObject, JSValue::decode(value)); | |
} | |
extern JSC_CALLCONV JSC::EncodedJSValue DirentPrototype__nameGetCachedValue(JSC::EncodedJSValue thisValue) | |
{ | |
auto* thisObject = jsCast<JSDirent*>(JSValue::decode(thisValue)); | |
return JSValue::encode(thisObject->m_name.get()); | |
} | |
JSC_DEFINE_CUSTOM_SETTER(DirentPrototype__nameSetterWrap, (JSGlobalObject * lexicalGlobalObject, EncodedJSValue encodedThisValue, EncodedJSValue encodedValue, PropertyName attributeName)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
JSValue thisValue = JSValue::decode(encodedThisValue); | |
if (!thisValue.isObject()) { | |
return false; | |
} | |
JSObject *thisObject = asObject(thisValue); | |
thisObject->putDirect(vm, attributeName, JSValue::decode(encodedValue), 0); | |
return true; | |
} | |
JSC_DEFINE_CUSTOM_GETTER(DirentPrototype__parentPathGetterWrap, (JSGlobalObject * globalObject, EncodedJSValue encodedThisValue, PropertyName attributeName)) | |
{ | |
auto& vm = globalObject->vm(); | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
JSDirent* thisObject = jsDynamicCast<JSDirent*>(JSValue::decode(encodedThisValue)); | |
if (UNLIKELY(!thisObject)) { | |
return JSValue::encode(jsUndefined()); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
if (JSValue cachedValue = thisObject->m_parentPath.get()) | |
return JSValue::encode(cachedValue); | |
JSC::JSValue result = JSC::JSValue::decode( | |
DirentPrototype__getPath(thisObject->wrapped(), globalObject) | |
); | |
RETURN_IF_EXCEPTION(throwScope, {}); | |
thisObject->m_parentPath.set(vm, thisObject, result); | |
RELEASE_AND_RETURN(throwScope, JSValue::encode(result)); | |
} | |
extern JSC_CALLCONV void DirentPrototype__parentPathSetCachedValue(JSC::EncodedJSValue thisValue, JSC::JSGlobalObject *globalObject, JSC::EncodedJSValue value) | |
{ | |
auto& vm = globalObject->vm(); | |
auto* thisObject = jsCast<JSDirent*>(JSValue::decode(thisValue)); | |
thisObject->m_parentPath.set(vm, thisObject, JSValue::decode(value)); | |
} | |
extern JSC_CALLCONV JSC::EncodedJSValue DirentPrototype__parentPathGetCachedValue(JSC::EncodedJSValue thisValue) | |
{ | |
auto* thisObject = jsCast<JSDirent*>(JSValue::decode(thisValue)); | |
return JSValue::encode(thisObject->m_parentPath.get()); | |
} | |
JSC_DEFINE_CUSTOM_SETTER(DirentPrototype__parentPathSetterWrap, (JSGlobalObject * lexicalGlobalObject, EncodedJSValue encodedThisValue, EncodedJSValue encodedValue, PropertyName attributeName)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
JSValue thisValue = JSValue::decode(encodedThisValue); | |
if (!thisValue.isObject()) { | |
return false; | |
} | |
JSObject *thisObject = asObject(thisValue); | |
thisObject->putDirect(vm, attributeName, JSValue::decode(encodedValue), 0); | |
return true; | |
} | |
JSC_DEFINE_CUSTOM_GETTER(DirentPrototype__pathGetterWrap, (JSGlobalObject * globalObject, EncodedJSValue encodedThisValue, PropertyName attributeName)) | |
{ | |
auto& vm = globalObject->vm(); | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
JSDirent* thisObject = jsDynamicCast<JSDirent*>(JSValue::decode(encodedThisValue)); | |
if (UNLIKELY(!thisObject)) { | |
return JSValue::encode(jsUndefined()); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
if (JSValue cachedValue = thisObject->m_path.get()) | |
return JSValue::encode(cachedValue); | |
JSC::JSValue result = JSC::JSValue::decode( | |
DirentPrototype__getPath(thisObject->wrapped(), globalObject) | |
); | |
RETURN_IF_EXCEPTION(throwScope, {}); | |
thisObject->m_path.set(vm, thisObject, result); | |
RELEASE_AND_RETURN(throwScope, JSValue::encode(result)); | |
} | |
extern JSC_CALLCONV void DirentPrototype__pathSetCachedValue(JSC::EncodedJSValue thisValue, JSC::JSGlobalObject *globalObject, JSC::EncodedJSValue value) | |
{ | |
auto& vm = globalObject->vm(); | |
auto* thisObject = jsCast<JSDirent*>(JSValue::decode(thisValue)); | |
thisObject->m_path.set(vm, thisObject, JSValue::decode(value)); | |
} | |
extern JSC_CALLCONV JSC::EncodedJSValue DirentPrototype__pathGetCachedValue(JSC::EncodedJSValue thisValue) | |
{ | |
auto* thisObject = jsCast<JSDirent*>(JSValue::decode(thisValue)); | |
return JSValue::encode(thisObject->m_path.get()); | |
} | |
JSC_DEFINE_CUSTOM_SETTER(DirentPrototype__pathSetterWrap, (JSGlobalObject * lexicalGlobalObject, EncodedJSValue encodedThisValue, EncodedJSValue encodedValue, PropertyName attributeName)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
JSValue thisValue = JSValue::decode(encodedThisValue); | |
if (!thisValue.isObject()) { | |
return false; | |
} | |
JSObject *thisObject = asObject(thisValue); | |
thisObject->putDirect(vm, attributeName, JSValue::decode(encodedValue), 0); | |
return true; | |
} | |
void JSDirentPrototype::finishCreation(JSC::VM& vm, JSC::JSGlobalObject* globalObject) | |
{ | |
Base::finishCreation(vm); | |
reifyStaticProperties(vm, JSDirent::info(), JSDirentPrototypeTableValues, *this); | |
JSC_TO_STRING_TAG_WITHOUT_TRANSITION(); | |
} | |
void JSDirentConstructor::finishCreation(VM& vm, JSC::JSGlobalObject* globalObject, JSDirentPrototype* prototype) | |
{ | |
Base::finishCreation(vm, 0, "Dirent"_s, PropertyAdditionMode::WithoutStructureTransition); | |
putDirectWithoutTransition(vm, vm.propertyNames->prototype, prototype, PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly); | |
ASSERT(inherits(info())); | |
} | |
JSDirentConstructor::JSDirentConstructor(JSC::VM& vm, JSC::Structure* structure) : Base(vm, structure, call, construct) { | |
} | |
JSDirentConstructor* JSDirentConstructor::create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure, JSDirentPrototype* prototype) { | |
JSDirentConstructor* ptr = new (NotNull, JSC::allocateCell<JSDirentConstructor>(vm)) JSDirentConstructor(vm, structure); | |
ptr->finishCreation(vm, globalObject, prototype); | |
return ptr; | |
} | |
JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES JSDirentConstructor::call(JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame) | |
{ | |
Zig::GlobalObject *globalObject = reinterpret_cast<Zig::GlobalObject*>(lexicalGlobalObject); | |
JSC::VM &vm = globalObject->vm(); | |
auto scope = DECLARE_THROW_SCOPE(vm); | |
void* ptr = DirentClass__construct(globalObject, callFrame); | |
if (UNLIKELY(!ptr || scope.exception())) { | |
return JSValue::encode(JSC::jsUndefined()); | |
} | |
Structure* structure = globalObject->JSDirentStructure(); | |
JSDirent* instance = JSDirent::create(vm, globalObject, structure, ptr); | |
RETURN_IF_EXCEPTION(scope, {}); | |
RELEASE_AND_RETURN(scope, JSValue::encode(instance)); | |
} | |
JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES JSDirentConstructor::construct(JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame) | |
{ | |
Zig::GlobalObject *globalObject = reinterpret_cast<Zig::GlobalObject*>(lexicalGlobalObject); | |
JSC::VM &vm = globalObject->vm(); | |
auto scope = DECLARE_THROW_SCOPE(vm); | |
JSObject* newTarget = asObject(callFrame->newTarget()); | |
auto* constructor = globalObject->JSDirentConstructor(); | |
Structure* structure = globalObject->JSDirentStructure(); | |
if (UNLIKELY(constructor != newTarget)) { | |
auto* functionGlobalObject = reinterpret_cast<Zig::GlobalObject*>( | |
// ShadowRealm functions belong to a different global object. | |
getFunctionRealm(globalObject, newTarget) | |
); | |
RETURN_IF_EXCEPTION(scope, {}); | |
structure = InternalFunction::createSubclassStructure( | |
globalObject, | |
newTarget, | |
functionGlobalObject->JSDirentStructure() | |
); | |
} | |
void* ptr = DirentClass__construct(globalObject, callFrame); | |
if (UNLIKELY(!ptr || scope.exception())) { | |
return JSValue::encode(JSC::jsUndefined()); | |
} | |
JSDirent* instance = JSDirent::create(vm, globalObject, structure, ptr); | |
RELEASE_AND_RETURN(scope, JSValue::encode(instance)); | |
} | |
void JSDirentConstructor::initializeProperties(VM& vm, JSC::JSGlobalObject* globalObject, JSDirentPrototype* prototype) | |
{ | |
} | |
const ClassInfo JSDirentConstructor::s_info = { "Function"_s, &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSDirentConstructor) }; | |
extern JSC_CALLCONV JSC::EncodedJSValue Dirent__getConstructor(Zig::GlobalObject* globalObject) { | |
return JSValue::encode(globalObject->JSDirentConstructor()); | |
} | |
JSDirent::~JSDirent() | |
{ | |
if (LIKELY(m_ctx)) { | |
DirentClass__finalize(m_ctx); | |
} | |
} | |
void JSDirent::destroy(JSCell* cell) | |
{ | |
static_cast<JSDirent*>(cell)->JSDirent::~JSDirent(); | |
} | |
const ClassInfo JSDirent::s_info = { "Dirent"_s, &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSDirent) }; | |
void JSDirent::finishCreation(VM& vm) | |
{ | |
Base::finishCreation(vm); | |
ASSERT(inherits(info())); | |
} | |
JSDirent* JSDirent::create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure, void* ctx) { | |
JSDirent* ptr = new (NotNull, JSC::allocateCell<JSDirent>(vm)) JSDirent(vm, structure, ctx); | |
ptr->finishCreation(vm); | |
return ptr; | |
} | |
extern JSC_CALLCONV void* JSC_HOST_CALL_ATTRIBUTES Dirent__fromJS(JSC::EncodedJSValue value) { | |
JSC::JSValue decodedValue = JSC::JSValue::decode(value); | |
if (decodedValue.isEmpty() || !decodedValue.isCell()) | |
return nullptr; | |
JSC::JSCell* cell = decodedValue.asCell(); | |
JSDirent* object = JSC::jsDynamicCast<JSDirent*>(cell); | |
if (!object) | |
return nullptr; | |
return object->wrapped(); | |
} | |
extern JSC_CALLCONV void* JSC_HOST_CALL_ATTRIBUTES Dirent__fromJSDirect(JSC::EncodedJSValue value) { | |
JSC::JSValue decodedValue = JSC::JSValue::decode(value); | |
ASSERT(decodedValue.isCell()); | |
JSC::JSCell* cell = decodedValue.asCell(); | |
JSDirent* object = JSC::jsDynamicCast<JSDirent*>(cell); | |
if (!object) | |
return nullptr; | |
Zig::GlobalObject* globalObject = jsDynamicCast<Zig::GlobalObject*>(object->globalObject()); | |
if (UNLIKELY(globalObject == nullptr || cell->structureID() != globalObject->JSDirentStructure()->id())) { | |
return nullptr; | |
} | |
return object->wrapped(); | |
} | |
extern JSC_CALLCONV bool JSC_HOST_CALL_ATTRIBUTES Dirent__dangerouslySetPtr(JSC::EncodedJSValue value, void* ptr) { | |
JSDirent* object = JSC::jsDynamicCast<JSDirent*>(JSValue::decode(value)); | |
if (!object) | |
return false; | |
object->m_ctx = ptr; | |
return true; | |
} | |
extern "C" const size_t Dirent__ptrOffset = JSDirent::offsetOfWrapped(); | |
void JSDirent::analyzeHeap(JSCell* cell, HeapAnalyzer& analyzer) | |
{ | |
auto* thisObject = jsCast<JSDirent*>(cell); | |
if (void* wrapped = thisObject->wrapped()) { | |
// if (thisObject->scriptExecutionContext()) | |
// analyzer.setLabelForCell(cell, makeString("url ", thisObject->scriptExecutionContext()->url().string())); | |
} | |
Base::analyzeHeap(cell, analyzer); | |
} | |
JSObject* JSDirent::createConstructor(VM& vm, JSGlobalObject* globalObject, JSValue prototype) | |
{ | |
return WebCore::JSDirentConstructor::create(vm, globalObject, WebCore::JSDirentConstructor::createStructure(vm, globalObject, globalObject->functionPrototype()), jsCast<WebCore::JSDirentPrototype*>(prototype)); | |
} | |
JSObject* JSDirent::getConstructor(Zig::GlobalObject* globalObject) | |
{ | |
return globalObject->JSDirentConstructor(); | |
} | |
JSObject* JSDirent::createPrototype(VM& vm, JSDOMGlobalObject* globalObject) | |
{ | |
auto *structure = JSDirentPrototype::createStructure(vm, globalObject, globalObject->objectPrototype()); | |
structure->setMayBePrototype(true); | |
return JSDirentPrototype::create(vm, globalObject, structure); | |
} | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES Dirent__create(Zig::GlobalObject* globalObject, void* ptr) { | |
auto &vm = globalObject->vm(); | |
JSC::Structure* structure = globalObject->JSDirentStructure(); | |
JSDirent* instance = JSDirent::create(vm, globalObject, structure, ptr); | |
return JSValue::encode(instance); | |
} | |
template<typename Visitor> | |
void JSDirent::visitChildrenImpl(JSCell* cell, Visitor& visitor) | |
{ | |
JSDirent* thisObject = jsCast<JSDirent*>(cell); | |
ASSERT_GC_OBJECT_INHERITS(thisObject, info()); | |
Base::visitChildren(thisObject, visitor); | |
thisObject->visitAdditionalChildren<Visitor>(visitor); | |
} | |
DEFINE_VISIT_CHILDREN(JSDirent); | |
template<typename Visitor> | |
void JSDirent::visitAdditionalChildren(Visitor& visitor) | |
{ | |
JSDirent* thisObject = this; | |
ASSERT_GC_OBJECT_INHERITS(thisObject, info()); | |
visitor.append(thisObject->m_name); | |
visitor.append(thisObject->m_parentPath); | |
visitor.append(thisObject->m_path); | |
} | |
DEFINE_VISIT_ADDITIONAL_CHILDREN(JSDirent); | |
template<typename Visitor> | |
void JSDirent::visitOutputConstraintsImpl(JSCell *cell, Visitor& visitor) | |
{ | |
JSDirent* thisObject = jsCast<JSDirent*>(cell); | |
ASSERT_GC_OBJECT_INHERITS(thisObject, info()); | |
thisObject->visitAdditionalChildren<Visitor>(visitor); | |
} | |
DEFINE_VISIT_OUTPUT_CONSTRAINTS(JSDirent); | |
class JSDocEndPrototype final : public JSC::JSNonFinalObject { | |
public: | |
using Base = JSC::JSNonFinalObject; | |
static JSDocEndPrototype* create(JSC::VM& vm, JSGlobalObject* globalObject, JSC::Structure* structure) | |
{ | |
JSDocEndPrototype* ptr = new (NotNull, JSC::allocateCell<JSDocEndPrototype>(vm)) JSDocEndPrototype(vm, globalObject, structure); | |
ptr->finishCreation(vm, globalObject); | |
return ptr; | |
} | |
DECLARE_INFO; | |
template<typename CellType, JSC::SubspaceAccess> | |
static JSC::GCClient::IsoSubspace* subspaceFor(JSC::VM& vm) | |
{ | |
STATIC_ASSERT_ISO_SUBSPACE_SHARABLE(JSDocEndPrototype, Base); | |
return &vm.plainObjectSpace(); | |
} | |
static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype) | |
{ | |
return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info()); | |
} | |
private: | |
JSDocEndPrototype(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure) | |
: Base(vm, structure) | |
{ | |
} | |
void finishCreation(JSC::VM&, JSC::JSGlobalObject*); | |
}; | |
JSC_DECLARE_HOST_FUNCTION(DocEndPrototype__appendCallback); | |
STATIC_ASSERT_ISO_SUBSPACE_SHARABLE(JSDocEndPrototype, JSDocEndPrototype::Base); | |
static const HashTableValue JSDocEndPrototypeTableValues[1] = { | |
{ "append"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, DocEndPrototype__appendCallback, 1 } } | |
}; | |
const ClassInfo JSDocEndPrototype::s_info = { "DocEnd"_s, &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSDocEndPrototype) }; | |
JSC_DEFINE_CUSTOM_GETTER(jsDocEndConstructor, (JSGlobalObject * lexicalGlobalObject, EncodedJSValue thisValue, PropertyName)) | |
{ | |
VM& vm = JSC::getVM(lexicalGlobalObject); | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
auto* globalObject = reinterpret_cast<Zig::GlobalObject*>(lexicalGlobalObject); | |
auto* prototype = jsDynamicCast<JSDocEndPrototype*>(JSValue::decode(thisValue)); | |
if (UNLIKELY(!prototype)) | |
return throwVMTypeError(lexicalGlobalObject, throwScope, "Cannot get constructor for DocEnd"_s); | |
return JSValue::encode(globalObject->JSDocEndConstructor()); | |
} | |
JSC_DEFINE_HOST_FUNCTION(DocEndPrototype__appendCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSDocEnd* thisObject = jsDynamicCast<JSDocEnd*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof DocEnd"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = DocEndPrototype__append(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "DocEnd.append returned an empty value without an exception"); | |
return result; | |
#endif | |
return DocEndPrototype__append(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
void JSDocEndPrototype::finishCreation(JSC::VM& vm, JSC::JSGlobalObject* globalObject) | |
{ | |
Base::finishCreation(vm); | |
reifyStaticProperties(vm, JSDocEnd::info(), JSDocEndPrototypeTableValues, *this); | |
JSC_TO_STRING_TAG_WITHOUT_TRANSITION(); | |
} | |
JSDocEnd::~JSDocEnd() | |
{ | |
if (LIKELY(m_ctx)) { | |
DocEndClass__finalize(m_ctx); | |
} | |
} | |
void JSDocEnd::destroy(JSCell* cell) | |
{ | |
static_cast<JSDocEnd*>(cell)->JSDocEnd::~JSDocEnd(); | |
} | |
const ClassInfo JSDocEnd::s_info = { "DocEnd"_s, &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSDocEnd) }; | |
void JSDocEnd::finishCreation(VM& vm) | |
{ | |
Base::finishCreation(vm); | |
ASSERT(inherits(info())); | |
} | |
JSDocEnd* JSDocEnd::create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure, void* ctx) { | |
JSDocEnd* ptr = new (NotNull, JSC::allocateCell<JSDocEnd>(vm)) JSDocEnd(vm, structure, ctx); | |
ptr->finishCreation(vm); | |
return ptr; | |
} | |
extern JSC_CALLCONV void* JSC_HOST_CALL_ATTRIBUTES DocEnd__fromJS(JSC::EncodedJSValue value) { | |
JSC::JSValue decodedValue = JSC::JSValue::decode(value); | |
if (decodedValue.isEmpty() || !decodedValue.isCell()) | |
return nullptr; | |
JSC::JSCell* cell = decodedValue.asCell(); | |
JSDocEnd* object = JSC::jsDynamicCast<JSDocEnd*>(cell); | |
if (!object) | |
return nullptr; | |
return object->wrapped(); | |
} | |
extern JSC_CALLCONV void* JSC_HOST_CALL_ATTRIBUTES DocEnd__fromJSDirect(JSC::EncodedJSValue value) { | |
JSC::JSValue decodedValue = JSC::JSValue::decode(value); | |
ASSERT(decodedValue.isCell()); | |
JSC::JSCell* cell = decodedValue.asCell(); | |
JSDocEnd* object = JSC::jsDynamicCast<JSDocEnd*>(cell); | |
if (!object) | |
return nullptr; | |
Zig::GlobalObject* globalObject = jsDynamicCast<Zig::GlobalObject*>(object->globalObject()); | |
if (UNLIKELY(globalObject == nullptr || cell->structureID() != globalObject->JSDocEndStructure()->id())) { | |
return nullptr; | |
} | |
return object->wrapped(); | |
} | |
extern JSC_CALLCONV bool JSC_HOST_CALL_ATTRIBUTES DocEnd__dangerouslySetPtr(JSC::EncodedJSValue value, void* ptr) { | |
JSDocEnd* object = JSC::jsDynamicCast<JSDocEnd*>(JSValue::decode(value)); | |
if (!object) | |
return false; | |
object->m_ctx = ptr; | |
return true; | |
} | |
extern "C" const size_t DocEnd__ptrOffset = JSDocEnd::offsetOfWrapped(); | |
void JSDocEnd::analyzeHeap(JSCell* cell, HeapAnalyzer& analyzer) | |
{ | |
auto* thisObject = jsCast<JSDocEnd*>(cell); | |
if (void* wrapped = thisObject->wrapped()) { | |
// if (thisObject->scriptExecutionContext()) | |
// analyzer.setLabelForCell(cell, makeString("url ", thisObject->scriptExecutionContext()->url().string())); | |
} | |
Base::analyzeHeap(cell, analyzer); | |
} | |
JSObject* JSDocEnd::createPrototype(VM& vm, JSDOMGlobalObject* globalObject) | |
{ | |
auto *structure = JSDocEndPrototype::createStructure(vm, globalObject, globalObject->objectPrototype()); | |
structure->setMayBePrototype(true); | |
return JSDocEndPrototype::create(vm, globalObject, structure); | |
} | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES DocEnd__create(Zig::GlobalObject* globalObject, void* ptr) { | |
auto &vm = globalObject->vm(); | |
JSC::Structure* structure = globalObject->JSDocEndStructure(); | |
JSDocEnd* instance = JSDocEnd::create(vm, globalObject, structure, ptr); | |
return JSValue::encode(instance); | |
} | |
class JSDocTypePrototype final : public JSC::JSNonFinalObject { | |
public: | |
using Base = JSC::JSNonFinalObject; | |
static JSDocTypePrototype* create(JSC::VM& vm, JSGlobalObject* globalObject, JSC::Structure* structure) | |
{ | |
JSDocTypePrototype* ptr = new (NotNull, JSC::allocateCell<JSDocTypePrototype>(vm)) JSDocTypePrototype(vm, globalObject, structure); | |
ptr->finishCreation(vm, globalObject); | |
return ptr; | |
} | |
DECLARE_INFO; | |
template<typename CellType, JSC::SubspaceAccess> | |
static JSC::GCClient::IsoSubspace* subspaceFor(JSC::VM& vm) | |
{ | |
STATIC_ASSERT_ISO_SUBSPACE_SHARABLE(JSDocTypePrototype, Base); | |
return &vm.plainObjectSpace(); | |
} | |
static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype) | |
{ | |
return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info()); | |
} | |
private: | |
JSDocTypePrototype(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure) | |
: Base(vm, structure) | |
{ | |
} | |
void finishCreation(JSC::VM&, JSC::JSGlobalObject*); | |
}; | |
JSC_DECLARE_CUSTOM_GETTER(DocTypePrototype__nameGetterWrap); | |
JSC_DECLARE_CUSTOM_GETTER(DocTypePrototype__publicIdGetterWrap); | |
JSC_DECLARE_CUSTOM_GETTER(DocTypePrototype__systemIdGetterWrap); | |
STATIC_ASSERT_ISO_SUBSPACE_SHARABLE(JSDocTypePrototype, JSDocTypePrototype::Base); | |
static const HashTableValue JSDocTypePrototypeTableValues[3] = { | |
{ "name"_s, static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::GetterSetterType, DocTypePrototype__nameGetterWrap, 0 } } , | |
{ "publicId"_s, static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::GetterSetterType, DocTypePrototype__publicIdGetterWrap, 0 } } , | |
{ "systemId"_s, static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::GetterSetterType, DocTypePrototype__systemIdGetterWrap, 0 } } | |
}; | |
const ClassInfo JSDocTypePrototype::s_info = { "DocType"_s, &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSDocTypePrototype) }; | |
JSC_DEFINE_CUSTOM_GETTER(jsDocTypeConstructor, (JSGlobalObject * lexicalGlobalObject, EncodedJSValue thisValue, PropertyName)) | |
{ | |
VM& vm = JSC::getVM(lexicalGlobalObject); | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
auto* globalObject = reinterpret_cast<Zig::GlobalObject*>(lexicalGlobalObject); | |
auto* prototype = jsDynamicCast<JSDocTypePrototype*>(JSValue::decode(thisValue)); | |
if (UNLIKELY(!prototype)) | |
return throwVMTypeError(lexicalGlobalObject, throwScope, "Cannot get constructor for DocType"_s); | |
return JSValue::encode(globalObject->JSDocTypeConstructor()); | |
} | |
JSC_DEFINE_CUSTOM_GETTER(DocTypePrototype__nameGetterWrap, (JSGlobalObject * lexicalGlobalObject, EncodedJSValue encodedThisValue, PropertyName attributeName)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
Zig::GlobalObject *globalObject = reinterpret_cast<Zig::GlobalObject*>(lexicalGlobalObject); | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
JSDocType* thisObject = jsCast<JSDocType*>(JSValue::decode(encodedThisValue)); | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
if (JSValue cachedValue = thisObject->m_name.get()) | |
return JSValue::encode(cachedValue); | |
JSC::JSValue result = JSC::JSValue::decode( | |
DocTypePrototype__name(thisObject->wrapped(), globalObject) | |
); | |
RETURN_IF_EXCEPTION(throwScope, {}); | |
thisObject->m_name.set(vm, thisObject, result); | |
RELEASE_AND_RETURN(throwScope, JSValue::encode(result)); | |
} | |
extern JSC_CALLCONV void DocTypePrototype__nameSetCachedValue(JSC::EncodedJSValue thisValue, JSC::JSGlobalObject *globalObject, JSC::EncodedJSValue value) | |
{ | |
auto& vm = globalObject->vm(); | |
auto* thisObject = jsCast<JSDocType*>(JSValue::decode(thisValue)); | |
thisObject->m_name.set(vm, thisObject, JSValue::decode(value)); | |
} | |
extern JSC_CALLCONV JSC::EncodedJSValue DocTypePrototype__nameGetCachedValue(JSC::EncodedJSValue thisValue) | |
{ | |
auto* thisObject = jsCast<JSDocType*>(JSValue::decode(thisValue)); | |
return JSValue::encode(thisObject->m_name.get()); | |
} | |
JSC_DEFINE_CUSTOM_GETTER(DocTypePrototype__publicIdGetterWrap, (JSGlobalObject * lexicalGlobalObject, EncodedJSValue encodedThisValue, PropertyName attributeName)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
Zig::GlobalObject *globalObject = reinterpret_cast<Zig::GlobalObject*>(lexicalGlobalObject); | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
JSDocType* thisObject = jsCast<JSDocType*>(JSValue::decode(encodedThisValue)); | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
if (JSValue cachedValue = thisObject->m_publicId.get()) | |
return JSValue::encode(cachedValue); | |
JSC::JSValue result = JSC::JSValue::decode( | |
DocTypePrototype__publicId(thisObject->wrapped(), globalObject) | |
); | |
RETURN_IF_EXCEPTION(throwScope, {}); | |
thisObject->m_publicId.set(vm, thisObject, result); | |
RELEASE_AND_RETURN(throwScope, JSValue::encode(result)); | |
} | |
extern JSC_CALLCONV void DocTypePrototype__publicIdSetCachedValue(JSC::EncodedJSValue thisValue, JSC::JSGlobalObject *globalObject, JSC::EncodedJSValue value) | |
{ | |
auto& vm = globalObject->vm(); | |
auto* thisObject = jsCast<JSDocType*>(JSValue::decode(thisValue)); | |
thisObject->m_publicId.set(vm, thisObject, JSValue::decode(value)); | |
} | |
extern JSC_CALLCONV JSC::EncodedJSValue DocTypePrototype__publicIdGetCachedValue(JSC::EncodedJSValue thisValue) | |
{ | |
auto* thisObject = jsCast<JSDocType*>(JSValue::decode(thisValue)); | |
return JSValue::encode(thisObject->m_publicId.get()); | |
} | |
JSC_DEFINE_CUSTOM_GETTER(DocTypePrototype__systemIdGetterWrap, (JSGlobalObject * lexicalGlobalObject, EncodedJSValue encodedThisValue, PropertyName attributeName)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
Zig::GlobalObject *globalObject = reinterpret_cast<Zig::GlobalObject*>(lexicalGlobalObject); | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
JSDocType* thisObject = jsCast<JSDocType*>(JSValue::decode(encodedThisValue)); | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
if (JSValue cachedValue = thisObject->m_systemId.get()) | |
return JSValue::encode(cachedValue); | |
JSC::JSValue result = JSC::JSValue::decode( | |
DocTypePrototype__systemId(thisObject->wrapped(), globalObject) | |
); | |
RETURN_IF_EXCEPTION(throwScope, {}); | |
thisObject->m_systemId.set(vm, thisObject, result); | |
RELEASE_AND_RETURN(throwScope, JSValue::encode(result)); | |
} | |
extern JSC_CALLCONV void DocTypePrototype__systemIdSetCachedValue(JSC::EncodedJSValue thisValue, JSC::JSGlobalObject *globalObject, JSC::EncodedJSValue value) | |
{ | |
auto& vm = globalObject->vm(); | |
auto* thisObject = jsCast<JSDocType*>(JSValue::decode(thisValue)); | |
thisObject->m_systemId.set(vm, thisObject, JSValue::decode(value)); | |
} | |
extern JSC_CALLCONV JSC::EncodedJSValue DocTypePrototype__systemIdGetCachedValue(JSC::EncodedJSValue thisValue) | |
{ | |
auto* thisObject = jsCast<JSDocType*>(JSValue::decode(thisValue)); | |
return JSValue::encode(thisObject->m_systemId.get()); | |
} | |
void JSDocTypePrototype::finishCreation(JSC::VM& vm, JSC::JSGlobalObject* globalObject) | |
{ | |
Base::finishCreation(vm); | |
reifyStaticProperties(vm, JSDocType::info(), JSDocTypePrototypeTableValues, *this); | |
JSC_TO_STRING_TAG_WITHOUT_TRANSITION(); | |
} | |
JSDocType::~JSDocType() | |
{ | |
if (LIKELY(m_ctx)) { | |
DocTypeClass__finalize(m_ctx); | |
} | |
} | |
void JSDocType::destroy(JSCell* cell) | |
{ | |
static_cast<JSDocType*>(cell)->JSDocType::~JSDocType(); | |
} | |
const ClassInfo JSDocType::s_info = { "DocType"_s, &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSDocType) }; | |
void JSDocType::finishCreation(VM& vm) | |
{ | |
Base::finishCreation(vm); | |
ASSERT(inherits(info())); | |
} | |
JSDocType* JSDocType::create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure, void* ctx) { | |
JSDocType* ptr = new (NotNull, JSC::allocateCell<JSDocType>(vm)) JSDocType(vm, structure, ctx); | |
ptr->finishCreation(vm); | |
return ptr; | |
} | |
extern JSC_CALLCONV void* JSC_HOST_CALL_ATTRIBUTES DocType__fromJS(JSC::EncodedJSValue value) { | |
JSC::JSValue decodedValue = JSC::JSValue::decode(value); | |
if (decodedValue.isEmpty() || !decodedValue.isCell()) | |
return nullptr; | |
JSC::JSCell* cell = decodedValue.asCell(); | |
JSDocType* object = JSC::jsDynamicCast<JSDocType*>(cell); | |
if (!object) | |
return nullptr; | |
return object->wrapped(); | |
} | |
extern JSC_CALLCONV void* JSC_HOST_CALL_ATTRIBUTES DocType__fromJSDirect(JSC::EncodedJSValue value) { | |
JSC::JSValue decodedValue = JSC::JSValue::decode(value); | |
ASSERT(decodedValue.isCell()); | |
JSC::JSCell* cell = decodedValue.asCell(); | |
JSDocType* object = JSC::jsDynamicCast<JSDocType*>(cell); | |
if (!object) | |
return nullptr; | |
Zig::GlobalObject* globalObject = jsDynamicCast<Zig::GlobalObject*>(object->globalObject()); | |
if (UNLIKELY(globalObject == nullptr || cell->structureID() != globalObject->JSDocTypeStructure()->id())) { | |
return nullptr; | |
} | |
return object->wrapped(); | |
} | |
extern JSC_CALLCONV bool JSC_HOST_CALL_ATTRIBUTES DocType__dangerouslySetPtr(JSC::EncodedJSValue value, void* ptr) { | |
JSDocType* object = JSC::jsDynamicCast<JSDocType*>(JSValue::decode(value)); | |
if (!object) | |
return false; | |
object->m_ctx = ptr; | |
return true; | |
} | |
extern "C" const size_t DocType__ptrOffset = JSDocType::offsetOfWrapped(); | |
void JSDocType::analyzeHeap(JSCell* cell, HeapAnalyzer& analyzer) | |
{ | |
auto* thisObject = jsCast<JSDocType*>(cell); | |
if (void* wrapped = thisObject->wrapped()) { | |
// if (thisObject->scriptExecutionContext()) | |
// analyzer.setLabelForCell(cell, makeString("url ", thisObject->scriptExecutionContext()->url().string())); | |
} | |
Base::analyzeHeap(cell, analyzer); | |
} | |
JSObject* JSDocType::createPrototype(VM& vm, JSDOMGlobalObject* globalObject) | |
{ | |
auto *structure = JSDocTypePrototype::createStructure(vm, globalObject, globalObject->objectPrototype()); | |
structure->setMayBePrototype(true); | |
return JSDocTypePrototype::create(vm, globalObject, structure); | |
} | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES DocType__create(Zig::GlobalObject* globalObject, void* ptr) { | |
auto &vm = globalObject->vm(); | |
JSC::Structure* structure = globalObject->JSDocTypeStructure(); | |
JSDocType* instance = JSDocType::create(vm, globalObject, structure, ptr); | |
return JSValue::encode(instance); | |
} | |
template<typename Visitor> | |
void JSDocType::visitChildrenImpl(JSCell* cell, Visitor& visitor) | |
{ | |
JSDocType* thisObject = jsCast<JSDocType*>(cell); | |
ASSERT_GC_OBJECT_INHERITS(thisObject, info()); | |
Base::visitChildren(thisObject, visitor); | |
thisObject->visitAdditionalChildren<Visitor>(visitor); | |
} | |
DEFINE_VISIT_CHILDREN(JSDocType); | |
template<typename Visitor> | |
void JSDocType::visitAdditionalChildren(Visitor& visitor) | |
{ | |
JSDocType* thisObject = this; | |
ASSERT_GC_OBJECT_INHERITS(thisObject, info()); | |
visitor.append(thisObject->m_name); | |
visitor.append(thisObject->m_publicId); | |
visitor.append(thisObject->m_systemId); | |
} | |
DEFINE_VISIT_ADDITIONAL_CHILDREN(JSDocType); | |
template<typename Visitor> | |
void JSDocType::visitOutputConstraintsImpl(JSCell *cell, Visitor& visitor) | |
{ | |
JSDocType* thisObject = jsCast<JSDocType*>(cell); | |
ASSERT_GC_OBJECT_INHERITS(thisObject, info()); | |
thisObject->visitAdditionalChildren<Visitor>(visitor); | |
} | |
DEFINE_VISIT_OUTPUT_CONSTRAINTS(JSDocType); | |
class JSElementPrototype final : public JSC::JSNonFinalObject { | |
public: | |
using Base = JSC::JSNonFinalObject; | |
static JSElementPrototype* create(JSC::VM& vm, JSGlobalObject* globalObject, JSC::Structure* structure) | |
{ | |
JSElementPrototype* ptr = new (NotNull, JSC::allocateCell<JSElementPrototype>(vm)) JSElementPrototype(vm, globalObject, structure); | |
ptr->finishCreation(vm, globalObject); | |
return ptr; | |
} | |
DECLARE_INFO; | |
template<typename CellType, JSC::SubspaceAccess> | |
static JSC::GCClient::IsoSubspace* subspaceFor(JSC::VM& vm) | |
{ | |
STATIC_ASSERT_ISO_SUBSPACE_SHARABLE(JSElementPrototype, Base); | |
return &vm.plainObjectSpace(); | |
} | |
static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype) | |
{ | |
return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info()); | |
} | |
private: | |
JSElementPrototype(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure) | |
: Base(vm, structure) | |
{ | |
} | |
void finishCreation(JSC::VM&, JSC::JSGlobalObject*); | |
}; | |
JSC_DECLARE_HOST_FUNCTION(ElementPrototype__afterCallback); | |
JSC_DECLARE_HOST_FUNCTION(ElementPrototype__appendCallback); | |
JSC_DECLARE_CUSTOM_GETTER(ElementPrototype__attributesGetterWrap); | |
JSC_DECLARE_HOST_FUNCTION(ElementPrototype__beforeCallback); | |
JSC_DECLARE_CUSTOM_GETTER(ElementPrototype__canHaveContentGetterWrap); | |
JSC_DECLARE_HOST_FUNCTION(ElementPrototype__getAttributeCallback); | |
JSC_DECLARE_HOST_FUNCTION(ElementPrototype__hasAttributeCallback); | |
JSC_DECLARE_CUSTOM_GETTER(ElementPrototype__namespaceURIGetterWrap); | |
JSC_DECLARE_HOST_FUNCTION(ElementPrototype__onEndTagCallback); | |
JSC_DECLARE_HOST_FUNCTION(ElementPrototype__prependCallback); | |
JSC_DECLARE_HOST_FUNCTION(ElementPrototype__removeCallback); | |
JSC_DECLARE_HOST_FUNCTION(ElementPrototype__removeAndKeepContentCallback); | |
JSC_DECLARE_HOST_FUNCTION(ElementPrototype__removeAttributeCallback); | |
JSC_DECLARE_CUSTOM_GETTER(ElementPrototype__removedGetterWrap); | |
JSC_DECLARE_HOST_FUNCTION(ElementPrototype__replaceCallback); | |
JSC_DECLARE_CUSTOM_GETTER(ElementPrototype__selfClosingGetterWrap); | |
JSC_DECLARE_HOST_FUNCTION(ElementPrototype__setAttributeCallback); | |
JSC_DECLARE_HOST_FUNCTION(ElementPrototype__setInnerContentCallback); | |
JSC_DECLARE_CUSTOM_GETTER(ElementPrototype__tagNameGetterWrap); | |
static JSC_DECLARE_CUSTOM_SETTER(ElementPrototype__tagNameSetterWrap); | |
STATIC_ASSERT_ISO_SUBSPACE_SHARABLE(JSElementPrototype, JSElementPrototype::Base); | |
static const HashTableValue JSElementPrototypeTableValues[19] = { | |
{ "after"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, ElementPrototype__afterCallback, 1 } } , | |
{ "append"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, ElementPrototype__appendCallback, 1 } } , | |
{ "attributes"_s, static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::GetterSetterType, ElementPrototype__attributesGetterWrap, 0 } } , | |
{ "before"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, ElementPrototype__beforeCallback, 1 } } , | |
{ "canHaveContent"_s, static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::GetterSetterType, ElementPrototype__canHaveContentGetterWrap, 0 } } , | |
{ "getAttribute"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, ElementPrototype__getAttributeCallback, 1 } } , | |
{ "hasAttribute"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, ElementPrototype__hasAttributeCallback, 1 } } , | |
{ "namespaceURI"_s, static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::GetterSetterType, ElementPrototype__namespaceURIGetterWrap, 0 } } , | |
{ "onEndTag"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, ElementPrototype__onEndTagCallback, 1 } } , | |
{ "prepend"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, ElementPrototype__prependCallback, 1 } } , | |
{ "remove"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, ElementPrototype__removeCallback, 0 } } , | |
{ "removeAndKeepContent"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, ElementPrototype__removeAndKeepContentCallback, 0 } } , | |
{ "removeAttribute"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, ElementPrototype__removeAttributeCallback, 1 } } , | |
{ "removed"_s, static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::GetterSetterType, ElementPrototype__removedGetterWrap, 0 } } , | |
{ "replace"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, ElementPrototype__replaceCallback, 1 } } , | |
{ "selfClosing"_s, static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::GetterSetterType, ElementPrototype__selfClosingGetterWrap, 0 } } , | |
{ "setAttribute"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, ElementPrototype__setAttributeCallback, 2 } } , | |
{ "setInnerContent"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, ElementPrototype__setInnerContentCallback, 1 } } , | |
{ "tagName"_s, static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::GetterSetterType, ElementPrototype__tagNameGetterWrap, ElementPrototype__tagNameSetterWrap } } | |
}; | |
const ClassInfo JSElementPrototype::s_info = { "Element"_s, &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSElementPrototype) }; | |
JSC_DEFINE_CUSTOM_GETTER(jsElementConstructor, (JSGlobalObject * lexicalGlobalObject, EncodedJSValue thisValue, PropertyName)) | |
{ | |
VM& vm = JSC::getVM(lexicalGlobalObject); | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
auto* globalObject = reinterpret_cast<Zig::GlobalObject*>(lexicalGlobalObject); | |
auto* prototype = jsDynamicCast<JSElementPrototype*>(JSValue::decode(thisValue)); | |
if (UNLIKELY(!prototype)) | |
return throwVMTypeError(lexicalGlobalObject, throwScope, "Cannot get constructor for Element"_s); | |
return JSValue::encode(globalObject->JSElementConstructor()); | |
} | |
JSC_DEFINE_HOST_FUNCTION(ElementPrototype__afterCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSElement* thisObject = jsDynamicCast<JSElement*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof Element"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = ElementPrototype__after(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "Element.after returned an empty value without an exception"); | |
return result; | |
#endif | |
return ElementPrototype__after(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_HOST_FUNCTION(ElementPrototype__appendCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSElement* thisObject = jsDynamicCast<JSElement*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof Element"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = ElementPrototype__append(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "Element.append returned an empty value without an exception"); | |
return result; | |
#endif | |
return ElementPrototype__append(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_CUSTOM_GETTER(ElementPrototype__attributesGetterWrap, (JSGlobalObject * lexicalGlobalObject, EncodedJSValue encodedThisValue, PropertyName attributeName)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
Zig::GlobalObject *globalObject = reinterpret_cast<Zig::GlobalObject*>(lexicalGlobalObject); | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
JSElement* thisObject = jsCast<JSElement*>(JSValue::decode(encodedThisValue)); | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
JSC::EncodedJSValue result = ElementPrototype__getAttributes(thisObject->wrapped(), globalObject); | |
RETURN_IF_EXCEPTION(throwScope, {}); | |
RELEASE_AND_RETURN(throwScope, result); | |
} | |
JSC_DEFINE_HOST_FUNCTION(ElementPrototype__beforeCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSElement* thisObject = jsDynamicCast<JSElement*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof Element"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = ElementPrototype__before(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "Element.before returned an empty value without an exception"); | |
return result; | |
#endif | |
return ElementPrototype__before(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_CUSTOM_GETTER(ElementPrototype__canHaveContentGetterWrap, (JSGlobalObject * lexicalGlobalObject, EncodedJSValue encodedThisValue, PropertyName attributeName)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
Zig::GlobalObject *globalObject = reinterpret_cast<Zig::GlobalObject*>(lexicalGlobalObject); | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
JSElement* thisObject = jsCast<JSElement*>(JSValue::decode(encodedThisValue)); | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
JSC::EncodedJSValue result = ElementPrototype__getCanHaveContent(thisObject->wrapped(), globalObject); | |
RETURN_IF_EXCEPTION(throwScope, {}); | |
RELEASE_AND_RETURN(throwScope, result); | |
} | |
JSC_DEFINE_HOST_FUNCTION(ElementPrototype__getAttributeCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSElement* thisObject = jsDynamicCast<JSElement*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof Element"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = ElementPrototype__getAttribute(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "Element.getAttribute returned an empty value without an exception"); | |
return result; | |
#endif | |
return ElementPrototype__getAttribute(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_HOST_FUNCTION(ElementPrototype__hasAttributeCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSElement* thisObject = jsDynamicCast<JSElement*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof Element"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = ElementPrototype__hasAttribute(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "Element.hasAttribute returned an empty value without an exception"); | |
return result; | |
#endif | |
return ElementPrototype__hasAttribute(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_CUSTOM_GETTER(ElementPrototype__namespaceURIGetterWrap, (JSGlobalObject * lexicalGlobalObject, EncodedJSValue encodedThisValue, PropertyName attributeName)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
Zig::GlobalObject *globalObject = reinterpret_cast<Zig::GlobalObject*>(lexicalGlobalObject); | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
JSElement* thisObject = jsCast<JSElement*>(JSValue::decode(encodedThisValue)); | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
if (JSValue cachedValue = thisObject->m_namespaceURI.get()) | |
return JSValue::encode(cachedValue); | |
JSC::JSValue result = JSC::JSValue::decode( | |
ElementPrototype__getNamespaceURI(thisObject->wrapped(), globalObject) | |
); | |
RETURN_IF_EXCEPTION(throwScope, {}); | |
thisObject->m_namespaceURI.set(vm, thisObject, result); | |
RELEASE_AND_RETURN(throwScope, JSValue::encode(result)); | |
} | |
extern JSC_CALLCONV void ElementPrototype__namespaceURISetCachedValue(JSC::EncodedJSValue thisValue, JSC::JSGlobalObject *globalObject, JSC::EncodedJSValue value) | |
{ | |
auto& vm = globalObject->vm(); | |
auto* thisObject = jsCast<JSElement*>(JSValue::decode(thisValue)); | |
thisObject->m_namespaceURI.set(vm, thisObject, JSValue::decode(value)); | |
} | |
extern JSC_CALLCONV JSC::EncodedJSValue ElementPrototype__namespaceURIGetCachedValue(JSC::EncodedJSValue thisValue) | |
{ | |
auto* thisObject = jsCast<JSElement*>(JSValue::decode(thisValue)); | |
return JSValue::encode(thisObject->m_namespaceURI.get()); | |
} | |
JSC_DEFINE_HOST_FUNCTION(ElementPrototype__onEndTagCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSElement* thisObject = jsDynamicCast<JSElement*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof Element"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = ElementPrototype__onEndTag(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "Element.onEndTag returned an empty value without an exception"); | |
return result; | |
#endif | |
return ElementPrototype__onEndTag(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_HOST_FUNCTION(ElementPrototype__prependCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSElement* thisObject = jsDynamicCast<JSElement*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof Element"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = ElementPrototype__prepend(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "Element.prepend returned an empty value without an exception"); | |
return result; | |
#endif | |
return ElementPrototype__prepend(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_HOST_FUNCTION(ElementPrototype__removeCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSElement* thisObject = jsDynamicCast<JSElement*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof Element"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = ElementPrototype__remove(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "Element.remove returned an empty value without an exception"); | |
return result; | |
#endif | |
return ElementPrototype__remove(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_HOST_FUNCTION(ElementPrototype__removeAndKeepContentCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSElement* thisObject = jsDynamicCast<JSElement*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof Element"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = ElementPrototype__removeAndKeepContent(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "Element.removeAndKeepContent returned an empty value without an exception"); | |
return result; | |
#endif | |
return ElementPrototype__removeAndKeepContent(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_HOST_FUNCTION(ElementPrototype__removeAttributeCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSElement* thisObject = jsDynamicCast<JSElement*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof Element"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = ElementPrototype__removeAttribute(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "Element.removeAttribute returned an empty value without an exception"); | |
return result; | |
#endif | |
return ElementPrototype__removeAttribute(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_CUSTOM_GETTER(ElementPrototype__removedGetterWrap, (JSGlobalObject * lexicalGlobalObject, EncodedJSValue encodedThisValue, PropertyName attributeName)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
Zig::GlobalObject *globalObject = reinterpret_cast<Zig::GlobalObject*>(lexicalGlobalObject); | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
JSElement* thisObject = jsCast<JSElement*>(JSValue::decode(encodedThisValue)); | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
JSC::EncodedJSValue result = ElementPrototype__getRemoved(thisObject->wrapped(), globalObject); | |
RETURN_IF_EXCEPTION(throwScope, {}); | |
RELEASE_AND_RETURN(throwScope, result); | |
} | |
JSC_DEFINE_HOST_FUNCTION(ElementPrototype__replaceCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSElement* thisObject = jsDynamicCast<JSElement*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof Element"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = ElementPrototype__replace(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "Element.replace returned an empty value without an exception"); | |
return result; | |
#endif | |
return ElementPrototype__replace(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_CUSTOM_GETTER(ElementPrototype__selfClosingGetterWrap, (JSGlobalObject * lexicalGlobalObject, EncodedJSValue encodedThisValue, PropertyName attributeName)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
Zig::GlobalObject *globalObject = reinterpret_cast<Zig::GlobalObject*>(lexicalGlobalObject); | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
JSElement* thisObject = jsCast<JSElement*>(JSValue::decode(encodedThisValue)); | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
JSC::EncodedJSValue result = ElementPrototype__getSelfClosing(thisObject->wrapped(), globalObject); | |
RETURN_IF_EXCEPTION(throwScope, {}); | |
RELEASE_AND_RETURN(throwScope, result); | |
} | |
JSC_DEFINE_HOST_FUNCTION(ElementPrototype__setAttributeCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSElement* thisObject = jsDynamicCast<JSElement*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof Element"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = ElementPrototype__setAttribute(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "Element.setAttribute returned an empty value without an exception"); | |
return result; | |
#endif | |
return ElementPrototype__setAttribute(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_HOST_FUNCTION(ElementPrototype__setInnerContentCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSElement* thisObject = jsDynamicCast<JSElement*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof Element"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = ElementPrototype__setInnerContent(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "Element.setInnerContent returned an empty value without an exception"); | |
return result; | |
#endif | |
return ElementPrototype__setInnerContent(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_CUSTOM_GETTER(ElementPrototype__tagNameGetterWrap, (JSGlobalObject * lexicalGlobalObject, EncodedJSValue encodedThisValue, PropertyName attributeName)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
Zig::GlobalObject *globalObject = reinterpret_cast<Zig::GlobalObject*>(lexicalGlobalObject); | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
JSElement* thisObject = jsCast<JSElement*>(JSValue::decode(encodedThisValue)); | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
JSC::EncodedJSValue result = ElementPrototype__getTagName(thisObject->wrapped(), globalObject); | |
RETURN_IF_EXCEPTION(throwScope, {}); | |
RELEASE_AND_RETURN(throwScope, result); | |
} | |
JSC_DEFINE_CUSTOM_SETTER(ElementPrototype__tagNameSetterWrap, (JSGlobalObject * lexicalGlobalObject, EncodedJSValue encodedThisValue, EncodedJSValue encodedValue, PropertyName attributeName)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
JSElement* thisObject = jsCast<JSElement*>(JSValue::decode(encodedThisValue)); | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
auto result = ElementPrototype__setTagName(thisObject->wrapped(), lexicalGlobalObject, encodedValue); | |
RELEASE_AND_RETURN(throwScope, result); | |
} | |
void JSElementPrototype::finishCreation(JSC::VM& vm, JSC::JSGlobalObject* globalObject) | |
{ | |
Base::finishCreation(vm); | |
reifyStaticProperties(vm, JSElement::info(), JSElementPrototypeTableValues, *this); | |
JSC_TO_STRING_TAG_WITHOUT_TRANSITION(); | |
} | |
JSElement::~JSElement() | |
{ | |
if (LIKELY(m_ctx)) { | |
ElementClass__finalize(m_ctx); | |
} | |
} | |
void JSElement::destroy(JSCell* cell) | |
{ | |
static_cast<JSElement*>(cell)->JSElement::~JSElement(); | |
} | |
const ClassInfo JSElement::s_info = { "Element"_s, &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSElement) }; | |
void JSElement::finishCreation(VM& vm) | |
{ | |
Base::finishCreation(vm); | |
ASSERT(inherits(info())); | |
} | |
JSElement* JSElement::create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure, void* ctx) { | |
JSElement* ptr = new (NotNull, JSC::allocateCell<JSElement>(vm)) JSElement(vm, structure, ctx); | |
ptr->finishCreation(vm); | |
return ptr; | |
} | |
extern JSC_CALLCONV void* JSC_HOST_CALL_ATTRIBUTES Element__fromJS(JSC::EncodedJSValue value) { | |
JSC::JSValue decodedValue = JSC::JSValue::decode(value); | |
if (decodedValue.isEmpty() || !decodedValue.isCell()) | |
return nullptr; | |
JSC::JSCell* cell = decodedValue.asCell(); | |
JSElement* object = JSC::jsDynamicCast<JSElement*>(cell); | |
if (!object) | |
return nullptr; | |
return object->wrapped(); | |
} | |
extern JSC_CALLCONV void* JSC_HOST_CALL_ATTRIBUTES Element__fromJSDirect(JSC::EncodedJSValue value) { | |
JSC::JSValue decodedValue = JSC::JSValue::decode(value); | |
ASSERT(decodedValue.isCell()); | |
JSC::JSCell* cell = decodedValue.asCell(); | |
JSElement* object = JSC::jsDynamicCast<JSElement*>(cell); | |
if (!object) | |
return nullptr; | |
Zig::GlobalObject* globalObject = jsDynamicCast<Zig::GlobalObject*>(object->globalObject()); | |
if (UNLIKELY(globalObject == nullptr || cell->structureID() != globalObject->JSElementStructure()->id())) { | |
return nullptr; | |
} | |
return object->wrapped(); | |
} | |
extern JSC_CALLCONV bool JSC_HOST_CALL_ATTRIBUTES Element__dangerouslySetPtr(JSC::EncodedJSValue value, void* ptr) { | |
JSElement* object = JSC::jsDynamicCast<JSElement*>(JSValue::decode(value)); | |
if (!object) | |
return false; | |
object->m_ctx = ptr; | |
return true; | |
} | |
extern "C" const size_t Element__ptrOffset = JSElement::offsetOfWrapped(); | |
void JSElement::analyzeHeap(JSCell* cell, HeapAnalyzer& analyzer) | |
{ | |
auto* thisObject = jsCast<JSElement*>(cell); | |
if (void* wrapped = thisObject->wrapped()) { | |
// if (thisObject->scriptExecutionContext()) | |
// analyzer.setLabelForCell(cell, makeString("url ", thisObject->scriptExecutionContext()->url().string())); | |
} | |
Base::analyzeHeap(cell, analyzer); | |
} | |
JSObject* JSElement::createPrototype(VM& vm, JSDOMGlobalObject* globalObject) | |
{ | |
auto *structure = JSElementPrototype::createStructure(vm, globalObject, globalObject->objectPrototype()); | |
structure->setMayBePrototype(true); | |
return JSElementPrototype::create(vm, globalObject, structure); | |
} | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES Element__create(Zig::GlobalObject* globalObject, void* ptr) { | |
auto &vm = globalObject->vm(); | |
JSC::Structure* structure = globalObject->JSElementStructure(); | |
JSElement* instance = JSElement::create(vm, globalObject, structure, ptr); | |
return JSValue::encode(instance); | |
} | |
template<typename Visitor> | |
void JSElement::visitChildrenImpl(JSCell* cell, Visitor& visitor) | |
{ | |
JSElement* thisObject = jsCast<JSElement*>(cell); | |
ASSERT_GC_OBJECT_INHERITS(thisObject, info()); | |
Base::visitChildren(thisObject, visitor); | |
thisObject->visitAdditionalChildren<Visitor>(visitor); | |
} | |
DEFINE_VISIT_CHILDREN(JSElement); | |
template<typename Visitor> | |
void JSElement::visitAdditionalChildren(Visitor& visitor) | |
{ | |
JSElement* thisObject = this; | |
ASSERT_GC_OBJECT_INHERITS(thisObject, info()); | |
visitor.append(thisObject->m_namespaceURI); | |
} | |
DEFINE_VISIT_ADDITIONAL_CHILDREN(JSElement); | |
template<typename Visitor> | |
void JSElement::visitOutputConstraintsImpl(JSCell *cell, Visitor& visitor) | |
{ | |
JSElement* thisObject = jsCast<JSElement*>(cell); | |
ASSERT_GC_OBJECT_INHERITS(thisObject, info()); | |
thisObject->visitAdditionalChildren<Visitor>(visitor); | |
} | |
DEFINE_VISIT_OUTPUT_CONSTRAINTS(JSElement); | |
class JSEndTagPrototype final : public JSC::JSNonFinalObject { | |
public: | |
using Base = JSC::JSNonFinalObject; | |
static JSEndTagPrototype* create(JSC::VM& vm, JSGlobalObject* globalObject, JSC::Structure* structure) | |
{ | |
JSEndTagPrototype* ptr = new (NotNull, JSC::allocateCell<JSEndTagPrototype>(vm)) JSEndTagPrototype(vm, globalObject, structure); | |
ptr->finishCreation(vm, globalObject); | |
return ptr; | |
} | |
DECLARE_INFO; | |
template<typename CellType, JSC::SubspaceAccess> | |
static JSC::GCClient::IsoSubspace* subspaceFor(JSC::VM& vm) | |
{ | |
STATIC_ASSERT_ISO_SUBSPACE_SHARABLE(JSEndTagPrototype, Base); | |
return &vm.plainObjectSpace(); | |
} | |
static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype) | |
{ | |
return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info()); | |
} | |
private: | |
JSEndTagPrototype(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure) | |
: Base(vm, structure) | |
{ | |
} | |
void finishCreation(JSC::VM&, JSC::JSGlobalObject*); | |
}; | |
JSC_DECLARE_HOST_FUNCTION(EndTagPrototype__afterCallback); | |
JSC_DECLARE_HOST_FUNCTION(EndTagPrototype__beforeCallback); | |
JSC_DECLARE_CUSTOM_GETTER(EndTagPrototype__nameGetterWrap); | |
static JSC_DECLARE_CUSTOM_SETTER(EndTagPrototype__nameSetterWrap); | |
JSC_DECLARE_HOST_FUNCTION(EndTagPrototype__removeCallback); | |
STATIC_ASSERT_ISO_SUBSPACE_SHARABLE(JSEndTagPrototype, JSEndTagPrototype::Base); | |
static const HashTableValue JSEndTagPrototypeTableValues[4] = { | |
{ "after"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, EndTagPrototype__afterCallback, 1 } } , | |
{ "before"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, EndTagPrototype__beforeCallback, 1 } } , | |
{ "name"_s, static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::GetterSetterType, EndTagPrototype__nameGetterWrap, EndTagPrototype__nameSetterWrap } } , | |
{ "remove"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, EndTagPrototype__removeCallback, 0 } } | |
}; | |
const ClassInfo JSEndTagPrototype::s_info = { "EndTag"_s, &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSEndTagPrototype) }; | |
JSC_DEFINE_CUSTOM_GETTER(jsEndTagConstructor, (JSGlobalObject * lexicalGlobalObject, EncodedJSValue thisValue, PropertyName)) | |
{ | |
VM& vm = JSC::getVM(lexicalGlobalObject); | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
auto* globalObject = reinterpret_cast<Zig::GlobalObject*>(lexicalGlobalObject); | |
auto* prototype = jsDynamicCast<JSEndTagPrototype*>(JSValue::decode(thisValue)); | |
if (UNLIKELY(!prototype)) | |
return throwVMTypeError(lexicalGlobalObject, throwScope, "Cannot get constructor for EndTag"_s); | |
return JSValue::encode(globalObject->JSEndTagConstructor()); | |
} | |
JSC_DEFINE_HOST_FUNCTION(EndTagPrototype__afterCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSEndTag* thisObject = jsDynamicCast<JSEndTag*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof EndTag"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = EndTagPrototype__after(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "EndTag.after returned an empty value without an exception"); | |
return result; | |
#endif | |
return EndTagPrototype__after(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_HOST_FUNCTION(EndTagPrototype__beforeCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSEndTag* thisObject = jsDynamicCast<JSEndTag*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof EndTag"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = EndTagPrototype__before(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "EndTag.before returned an empty value without an exception"); | |
return result; | |
#endif | |
return EndTagPrototype__before(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_CUSTOM_GETTER(EndTagPrototype__nameGetterWrap, (JSGlobalObject * lexicalGlobalObject, EncodedJSValue encodedThisValue, PropertyName attributeName)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
Zig::GlobalObject *globalObject = reinterpret_cast<Zig::GlobalObject*>(lexicalGlobalObject); | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
JSEndTag* thisObject = jsCast<JSEndTag*>(JSValue::decode(encodedThisValue)); | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
JSC::EncodedJSValue result = EndTagPrototype__getName(thisObject->wrapped(), globalObject); | |
RETURN_IF_EXCEPTION(throwScope, {}); | |
RELEASE_AND_RETURN(throwScope, result); | |
} | |
JSC_DEFINE_CUSTOM_SETTER(EndTagPrototype__nameSetterWrap, (JSGlobalObject * lexicalGlobalObject, EncodedJSValue encodedThisValue, EncodedJSValue encodedValue, PropertyName attributeName)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
JSEndTag* thisObject = jsCast<JSEndTag*>(JSValue::decode(encodedThisValue)); | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
auto result = EndTagPrototype__setName(thisObject->wrapped(), lexicalGlobalObject, encodedValue); | |
RELEASE_AND_RETURN(throwScope, result); | |
} | |
JSC_DEFINE_HOST_FUNCTION(EndTagPrototype__removeCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSEndTag* thisObject = jsDynamicCast<JSEndTag*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof EndTag"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = EndTagPrototype__remove(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "EndTag.remove returned an empty value without an exception"); | |
return result; | |
#endif | |
return EndTagPrototype__remove(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
void JSEndTagPrototype::finishCreation(JSC::VM& vm, JSC::JSGlobalObject* globalObject) | |
{ | |
Base::finishCreation(vm); | |
reifyStaticProperties(vm, JSEndTag::info(), JSEndTagPrototypeTableValues, *this); | |
JSC_TO_STRING_TAG_WITHOUT_TRANSITION(); | |
} | |
JSEndTag::~JSEndTag() | |
{ | |
if (LIKELY(m_ctx)) { | |
EndTagClass__finalize(m_ctx); | |
} | |
} | |
void JSEndTag::destroy(JSCell* cell) | |
{ | |
static_cast<JSEndTag*>(cell)->JSEndTag::~JSEndTag(); | |
} | |
const ClassInfo JSEndTag::s_info = { "EndTag"_s, &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSEndTag) }; | |
void JSEndTag::finishCreation(VM& vm) | |
{ | |
Base::finishCreation(vm); | |
ASSERT(inherits(info())); | |
} | |
JSEndTag* JSEndTag::create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure, void* ctx) { | |
JSEndTag* ptr = new (NotNull, JSC::allocateCell<JSEndTag>(vm)) JSEndTag(vm, structure, ctx); | |
ptr->finishCreation(vm); | |
return ptr; | |
} | |
extern JSC_CALLCONV void* JSC_HOST_CALL_ATTRIBUTES EndTag__fromJS(JSC::EncodedJSValue value) { | |
JSC::JSValue decodedValue = JSC::JSValue::decode(value); | |
if (decodedValue.isEmpty() || !decodedValue.isCell()) | |
return nullptr; | |
JSC::JSCell* cell = decodedValue.asCell(); | |
JSEndTag* object = JSC::jsDynamicCast<JSEndTag*>(cell); | |
if (!object) | |
return nullptr; | |
return object->wrapped(); | |
} | |
extern JSC_CALLCONV void* JSC_HOST_CALL_ATTRIBUTES EndTag__fromJSDirect(JSC::EncodedJSValue value) { | |
JSC::JSValue decodedValue = JSC::JSValue::decode(value); | |
ASSERT(decodedValue.isCell()); | |
JSC::JSCell* cell = decodedValue.asCell(); | |
JSEndTag* object = JSC::jsDynamicCast<JSEndTag*>(cell); | |
if (!object) | |
return nullptr; | |
Zig::GlobalObject* globalObject = jsDynamicCast<Zig::GlobalObject*>(object->globalObject()); | |
if (UNLIKELY(globalObject == nullptr || cell->structureID() != globalObject->JSEndTagStructure()->id())) { | |
return nullptr; | |
} | |
return object->wrapped(); | |
} | |
extern JSC_CALLCONV bool JSC_HOST_CALL_ATTRIBUTES EndTag__dangerouslySetPtr(JSC::EncodedJSValue value, void* ptr) { | |
JSEndTag* object = JSC::jsDynamicCast<JSEndTag*>(JSValue::decode(value)); | |
if (!object) | |
return false; | |
object->m_ctx = ptr; | |
return true; | |
} | |
extern "C" const size_t EndTag__ptrOffset = JSEndTag::offsetOfWrapped(); | |
void JSEndTag::analyzeHeap(JSCell* cell, HeapAnalyzer& analyzer) | |
{ | |
auto* thisObject = jsCast<JSEndTag*>(cell); | |
if (void* wrapped = thisObject->wrapped()) { | |
// if (thisObject->scriptExecutionContext()) | |
// analyzer.setLabelForCell(cell, makeString("url ", thisObject->scriptExecutionContext()->url().string())); | |
} | |
Base::analyzeHeap(cell, analyzer); | |
} | |
JSObject* JSEndTag::createPrototype(VM& vm, JSDOMGlobalObject* globalObject) | |
{ | |
auto *structure = JSEndTagPrototype::createStructure(vm, globalObject, globalObject->objectPrototype()); | |
structure->setMayBePrototype(true); | |
return JSEndTagPrototype::create(vm, globalObject, structure); | |
} | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES EndTag__create(Zig::GlobalObject* globalObject, void* ptr) { | |
auto &vm = globalObject->vm(); | |
JSC::Structure* structure = globalObject->JSEndTagStructure(); | |
JSEndTag* instance = JSEndTag::create(vm, globalObject, structure, ptr); | |
return JSValue::encode(instance); | |
} | |
class JSExpectPrototype final : public JSC::JSNonFinalObject { | |
public: | |
using Base = JSC::JSNonFinalObject; | |
static JSExpectPrototype* create(JSC::VM& vm, JSGlobalObject* globalObject, JSC::Structure* structure) | |
{ | |
JSExpectPrototype* ptr = new (NotNull, JSC::allocateCell<JSExpectPrototype>(vm)) JSExpectPrototype(vm, globalObject, structure); | |
ptr->finishCreation(vm, globalObject); | |
return ptr; | |
} | |
DECLARE_INFO; | |
template<typename CellType, JSC::SubspaceAccess> | |
static JSC::GCClient::IsoSubspace* subspaceFor(JSC::VM& vm) | |
{ | |
STATIC_ASSERT_ISO_SUBSPACE_SHARABLE(JSExpectPrototype, Base); | |
return &vm.plainObjectSpace(); | |
} | |
static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype) | |
{ | |
return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info()); | |
} | |
private: | |
JSExpectPrototype(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure) | |
: Base(vm, structure) | |
{ | |
} | |
void finishCreation(JSC::VM&, JSC::JSGlobalObject*); | |
}; | |
class JSExpectConstructor final : public JSC::InternalFunction { | |
public: | |
using Base = JSC::InternalFunction; | |
static JSExpectConstructor* create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure, JSExpectPrototype* prototype); | |
static constexpr unsigned StructureFlags = Base::StructureFlags; | |
static constexpr bool needsDestruction = false; | |
static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype) | |
{ | |
return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::InternalFunctionType, StructureFlags), info()); | |
} | |
template<typename, JSC::SubspaceAccess mode> static JSC::GCClient::IsoSubspace* subspaceFor(JSC::VM& vm) | |
{ | |
if constexpr (mode == JSC::SubspaceAccess::Concurrently) | |
return nullptr; | |
return WebCore::subspaceForImpl<JSExpectConstructor, WebCore::UseCustomHeapCellType::No>( | |
vm, | |
[](auto& spaces) { return spaces.m_clientSubspaceForBunClassConstructor.get(); }, | |
[](auto& spaces, auto&& space) { spaces.m_clientSubspaceForBunClassConstructor = std::forward<decltype(space)>(space); }, | |
[](auto& spaces) { return spaces.m_subspaceForBunClassConstructor.get(); }, | |
[](auto& spaces, auto&& space) { spaces.m_subspaceForBunClassConstructor = std::forward<decltype(space)>(space); }); | |
} | |
void initializeProperties(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSExpectPrototype* prototype); | |
// Must be defined for each specialization class. | |
static JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES construct(JSC::JSGlobalObject*, JSC::CallFrame*); | |
static JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES call(JSC::JSGlobalObject*, JSC::CallFrame*); | |
DECLARE_EXPORT_INFO; | |
private: | |
JSExpectConstructor(JSC::VM& vm, JSC::Structure* structure); | |
void finishCreation(JSC::VM&, JSC::JSGlobalObject* globalObject, JSExpectPrototype* prototype); | |
}; | |
JSC_DECLARE_HOST_FUNCTION(ExpectPrototype__failCallback); | |
JSC_DECLARE_HOST_FUNCTION(ExpectPrototype__lastCalledWithCallback); | |
JSC_DECLARE_HOST_FUNCTION(ExpectPrototype__lastReturnedWithCallback); | |
JSC_DECLARE_CUSTOM_GETTER(ExpectPrototype__notGetterWrap); | |
JSC_DECLARE_HOST_FUNCTION(ExpectPrototype__nthCalledWithCallback); | |
JSC_DECLARE_HOST_FUNCTION(ExpectPrototype__nthReturnedWithCallback); | |
JSC_DECLARE_HOST_FUNCTION(ExpectPrototype__passCallback); | |
JSC_DECLARE_CUSTOM_GETTER(ExpectPrototype__rejectsGetterWrap); | |
JSC_DECLARE_CUSTOM_GETTER(ExpectPrototype__resolvesGetterWrap); | |
JSC_DECLARE_HOST_FUNCTION(ExpectPrototype__toBeCallback); | |
JSC_DECLARE_HOST_FUNCTION(ExpectPrototype__toBeArrayCallback); | |
JSC_DECLARE_HOST_FUNCTION(ExpectPrototype__toBeArrayOfSizeCallback); | |
JSC_DECLARE_HOST_FUNCTION(ExpectPrototype__toBeBooleanCallback); | |
JSC_DECLARE_HOST_FUNCTION(ExpectPrototype__toBeCalledCallback); | |
JSC_DECLARE_HOST_FUNCTION(ExpectPrototype__toBeCalledTimesCallback); | |
JSC_DECLARE_HOST_FUNCTION(ExpectPrototype__toBeCalledWithCallback); | |
JSC_DECLARE_HOST_FUNCTION(ExpectPrototype__toBeCloseToCallback); | |
JSC_DECLARE_HOST_FUNCTION(ExpectPrototype__toBeDateCallback); | |
JSC_DECLARE_HOST_FUNCTION(ExpectPrototype__toBeDefinedCallback); | |
JSC_DECLARE_HOST_FUNCTION(ExpectPrototype__toBeEmptyCallback); | |
JSC_DECLARE_HOST_FUNCTION(ExpectPrototype__toBeEmptyObjectCallback); | |
JSC_DECLARE_HOST_FUNCTION(ExpectPrototype__toBeEvenCallback); | |
JSC_DECLARE_HOST_FUNCTION(ExpectPrototype__toBeFalseCallback); | |
JSC_DECLARE_HOST_FUNCTION(ExpectPrototype__toBeFalsyCallback); | |
JSC_DECLARE_HOST_FUNCTION(ExpectPrototype__toBeFiniteCallback); | |
JSC_DECLARE_HOST_FUNCTION(ExpectPrototype__toBeFunctionCallback); | |
JSC_DECLARE_HOST_FUNCTION(ExpectPrototype__toBeGreaterThanCallback); | |
JSC_DECLARE_HOST_FUNCTION(ExpectPrototype__toBeGreaterThanOrEqualCallback); | |
JSC_DECLARE_HOST_FUNCTION(ExpectPrototype__toBeInstanceOfCallback); | |
JSC_DECLARE_HOST_FUNCTION(ExpectPrototype__toBeIntegerCallback); | |
JSC_DECLARE_HOST_FUNCTION(ExpectPrototype__toBeLessThanCallback); | |
JSC_DECLARE_HOST_FUNCTION(ExpectPrototype__toBeLessThanOrEqualCallback); | |
JSC_DECLARE_HOST_FUNCTION(ExpectPrototype__toBeNaNCallback); | |
JSC_DECLARE_HOST_FUNCTION(ExpectPrototype__toBeNegativeCallback); | |
JSC_DECLARE_HOST_FUNCTION(ExpectPrototype__toBeNilCallback); | |
JSC_DECLARE_HOST_FUNCTION(ExpectPrototype__toBeNullCallback); | |
JSC_DECLARE_HOST_FUNCTION(ExpectPrototype__toBeNumberCallback); | |
JSC_DECLARE_HOST_FUNCTION(ExpectPrototype__toBeObjectCallback); | |
JSC_DECLARE_HOST_FUNCTION(ExpectPrototype__toBeOddCallback); | |
JSC_DECLARE_HOST_FUNCTION(ExpectPrototype__toBeOneOfCallback); | |
JSC_DECLARE_HOST_FUNCTION(ExpectPrototype__toBePositiveCallback); | |
JSC_DECLARE_HOST_FUNCTION(ExpectPrototype__toBeStringCallback); | |
JSC_DECLARE_HOST_FUNCTION(ExpectPrototype__toBeSymbolCallback); | |
JSC_DECLARE_HOST_FUNCTION(ExpectPrototype__toBeTrueCallback); | |
JSC_DECLARE_HOST_FUNCTION(ExpectPrototype__toBeTruthyCallback); | |
JSC_DECLARE_HOST_FUNCTION(ExpectPrototype__toBeTypeOfCallback); | |
JSC_DECLARE_HOST_FUNCTION(ExpectPrototype__toBeUndefinedCallback); | |
JSC_DECLARE_HOST_FUNCTION(ExpectPrototype__toBeValidDateCallback); | |
JSC_DECLARE_HOST_FUNCTION(ExpectPrototype__toBeWithinCallback); | |
JSC_DECLARE_HOST_FUNCTION(ExpectPrototype__toContainCallback); | |
JSC_DECLARE_HOST_FUNCTION(ExpectPrototype__toContainAllKeysCallback); | |
JSC_DECLARE_HOST_FUNCTION(ExpectPrototype__toContainAllValuesCallback); | |
JSC_DECLARE_HOST_FUNCTION(ExpectPrototype__toContainAnyKeysCallback); | |
JSC_DECLARE_HOST_FUNCTION(ExpectPrototype__toContainAnyValuesCallback); | |
JSC_DECLARE_HOST_FUNCTION(ExpectPrototype__toContainEqualCallback); | |
JSC_DECLARE_HOST_FUNCTION(ExpectPrototype__toContainKeyCallback); | |
JSC_DECLARE_HOST_FUNCTION(ExpectPrototype__toContainKeysCallback); | |
JSC_DECLARE_HOST_FUNCTION(ExpectPrototype__toContainValueCallback); | |
JSC_DECLARE_HOST_FUNCTION(ExpectPrototype__toContainValuesCallback); | |
JSC_DECLARE_HOST_FUNCTION(ExpectPrototype__toEndWithCallback); | |
JSC_DECLARE_HOST_FUNCTION(ExpectPrototype__toEqualCallback); | |
JSC_DECLARE_HOST_FUNCTION(ExpectPrototype__toEqualIgnoringWhitespaceCallback); | |
JSC_DECLARE_HOST_FUNCTION(ExpectPrototype__toHaveBeenCalledCallback); | |
JSC_DECLARE_HOST_FUNCTION(ExpectPrototype__toHaveBeenCalledTimesCallback); | |
JSC_DECLARE_HOST_FUNCTION(ExpectPrototype__toHaveBeenCalledWithCallback); | |
JSC_DECLARE_HOST_FUNCTION(ExpectPrototype__toHaveBeenLastCalledWithCallback); | |
JSC_DECLARE_HOST_FUNCTION(ExpectPrototype__toHaveBeenNthCalledWithCallback); | |
JSC_DECLARE_HOST_FUNCTION(ExpectPrototype__toHaveLastReturnedWithCallback); | |
JSC_DECLARE_HOST_FUNCTION(ExpectPrototype__toHaveLengthCallback); | |
JSC_DECLARE_HOST_FUNCTION(ExpectPrototype__toHaveNthReturnedWithCallback); | |
JSC_DECLARE_HOST_FUNCTION(ExpectPrototype__toHavePropertyCallback); | |
JSC_DECLARE_HOST_FUNCTION(ExpectPrototype__toHaveReturnedCallback); | |
JSC_DECLARE_HOST_FUNCTION(ExpectPrototype__toHaveReturnedTimesCallback); | |
JSC_DECLARE_HOST_FUNCTION(ExpectPrototype__toHaveReturnedWithCallback); | |
JSC_DECLARE_HOST_FUNCTION(ExpectPrototype__toIncludeCallback); | |
JSC_DECLARE_HOST_FUNCTION(ExpectPrototype__toIncludeRepeatedCallback); | |
JSC_DECLARE_HOST_FUNCTION(ExpectPrototype__toMatchCallback); | |
JSC_DECLARE_HOST_FUNCTION(ExpectPrototype__toMatchInlineSnapshotCallback); | |
JSC_DECLARE_HOST_FUNCTION(ExpectPrototype__toMatchObjectCallback); | |
JSC_DECLARE_HOST_FUNCTION(ExpectPrototype__toMatchSnapshotCallback); | |
JSC_DECLARE_HOST_FUNCTION(ExpectPrototype__toReturnCallback); | |
JSC_DECLARE_HOST_FUNCTION(ExpectPrototype__toSatisfyCallback); | |
JSC_DECLARE_HOST_FUNCTION(ExpectPrototype__toStartWithCallback); | |
JSC_DECLARE_HOST_FUNCTION(ExpectPrototype__toStrictEqualCallback); | |
JSC_DECLARE_HOST_FUNCTION(ExpectPrototype__toThrowCallback); | |
JSC_DECLARE_HOST_FUNCTION(ExpectPrototype__toThrowErrorCallback); | |
JSC_DECLARE_HOST_FUNCTION(ExpectPrototype__toThrowErrorMatchingInlineSnapshotCallback); | |
JSC_DECLARE_HOST_FUNCTION(ExpectPrototype__toThrowErrorMatchingSnapshotCallback); | |
STATIC_ASSERT_ISO_SUBSPACE_SHARABLE(JSExpectPrototype, JSExpectPrototype::Base); | |
static const HashTableValue JSExpectPrototypeTableValues[88] = { | |
{ "fail"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, ExpectPrototype__failCallback, 1 } } , | |
{ "lastCalledWith"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, ExpectPrototype__lastCalledWithCallback, 0 } } , | |
{ "lastReturnedWith"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, ExpectPrototype__lastReturnedWithCallback, 1 } } , | |
{ "not"_s, static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::GetterSetterType, ExpectPrototype__notGetterWrap, 0 } } , | |
{ "nthCalledWith"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, ExpectPrototype__nthCalledWithCallback, 0 } } , | |
{ "nthReturnedWith"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, ExpectPrototype__nthReturnedWithCallback, 1 } } , | |
{ "pass"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, ExpectPrototype__passCallback, 1 } } , | |
{ "rejects"_s, static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::GetterSetterType, ExpectPrototype__rejectsGetterWrap, 0 } } , | |
{ "resolves"_s, static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::GetterSetterType, ExpectPrototype__resolvesGetterWrap, 0 } } , | |
{ "toBe"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, ExpectPrototype__toBeCallback, 1 } } , | |
{ "toBeArray"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, ExpectPrototype__toBeArrayCallback, 0 } } , | |
{ "toBeArrayOfSize"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, ExpectPrototype__toBeArrayOfSizeCallback, 1 } } , | |
{ "toBeBoolean"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, ExpectPrototype__toBeBooleanCallback, 0 } } , | |
{ "toBeCalled"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, ExpectPrototype__toBeCalledCallback, 0 } } , | |
{ "toBeCalledTimes"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, ExpectPrototype__toBeCalledTimesCallback, 1 } } , | |
{ "toBeCalledWith"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, ExpectPrototype__toBeCalledWithCallback, 0 } } , | |
{ "toBeCloseTo"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, ExpectPrototype__toBeCloseToCallback, 1 } } , | |
{ "toBeDate"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, ExpectPrototype__toBeDateCallback, 0 } } , | |
{ "toBeDefined"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, ExpectPrototype__toBeDefinedCallback, 0 } } , | |
{ "toBeEmpty"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, ExpectPrototype__toBeEmptyCallback, 0 } } , | |
{ "toBeEmptyObject"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, ExpectPrototype__toBeEmptyObjectCallback, 0 } } , | |
{ "toBeEven"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, ExpectPrototype__toBeEvenCallback, 0 } } , | |
{ "toBeFalse"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, ExpectPrototype__toBeFalseCallback, 0 } } , | |
{ "toBeFalsy"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, ExpectPrototype__toBeFalsyCallback, 0 } } , | |
{ "toBeFinite"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, ExpectPrototype__toBeFiniteCallback, 0 } } , | |
{ "toBeFunction"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, ExpectPrototype__toBeFunctionCallback, 0 } } , | |
{ "toBeGreaterThan"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, ExpectPrototype__toBeGreaterThanCallback, 1 } } , | |
{ "toBeGreaterThanOrEqual"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, ExpectPrototype__toBeGreaterThanOrEqualCallback, 1 } } , | |
{ "toBeInstanceOf"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, ExpectPrototype__toBeInstanceOfCallback, 1 } } , | |
{ "toBeInteger"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, ExpectPrototype__toBeIntegerCallback, 0 } } , | |
{ "toBeLessThan"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, ExpectPrototype__toBeLessThanCallback, 1 } } , | |
{ "toBeLessThanOrEqual"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, ExpectPrototype__toBeLessThanOrEqualCallback, 1 } } , | |
{ "toBeNaN"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, ExpectPrototype__toBeNaNCallback, 0 } } , | |
{ "toBeNegative"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, ExpectPrototype__toBeNegativeCallback, 0 } } , | |
{ "toBeNil"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, ExpectPrototype__toBeNilCallback, 0 } } , | |
{ "toBeNull"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, ExpectPrototype__toBeNullCallback, 0 } } , | |
{ "toBeNumber"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, ExpectPrototype__toBeNumberCallback, 0 } } , | |
{ "toBeObject"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, ExpectPrototype__toBeObjectCallback, 0 } } , | |
{ "toBeOdd"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, ExpectPrototype__toBeOddCallback, 0 } } , | |
{ "toBeOneOf"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, ExpectPrototype__toBeOneOfCallback, 1 } } , | |
{ "toBePositive"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, ExpectPrototype__toBePositiveCallback, 0 } } , | |
{ "toBeString"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, ExpectPrototype__toBeStringCallback, 0 } } , | |
{ "toBeSymbol"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, ExpectPrototype__toBeSymbolCallback, 0 } } , | |
{ "toBeTrue"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, ExpectPrototype__toBeTrueCallback, 0 } } , | |
{ "toBeTruthy"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, ExpectPrototype__toBeTruthyCallback, 0 } } , | |
{ "toBeTypeOf"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, ExpectPrototype__toBeTypeOfCallback, 1 } } , | |
{ "toBeUndefined"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, ExpectPrototype__toBeUndefinedCallback, 0 } } , | |
{ "toBeValidDate"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, ExpectPrototype__toBeValidDateCallback, 0 } } , | |
{ "toBeWithin"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, ExpectPrototype__toBeWithinCallback, 2 } } , | |
{ "toContain"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, ExpectPrototype__toContainCallback, 1 } } , | |
{ "toContainAllKeys"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, ExpectPrototype__toContainAllKeysCallback, 1 } } , | |
{ "toContainAllValues"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, ExpectPrototype__toContainAllValuesCallback, 1 } } , | |
{ "toContainAnyKeys"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, ExpectPrototype__toContainAnyKeysCallback, 1 } } , | |
{ "toContainAnyValues"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, ExpectPrototype__toContainAnyValuesCallback, 1 } } , | |
{ "toContainEqual"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, ExpectPrototype__toContainEqualCallback, 1 } } , | |
{ "toContainKey"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, ExpectPrototype__toContainKeyCallback, 1 } } , | |
{ "toContainKeys"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, ExpectPrototype__toContainKeysCallback, 1 } } , | |
{ "toContainValue"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, ExpectPrototype__toContainValueCallback, 1 } } , | |
{ "toContainValues"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, ExpectPrototype__toContainValuesCallback, 1 } } , | |
{ "toEndWith"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, ExpectPrototype__toEndWithCallback, 1 } } , | |
{ "toEqual"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, ExpectPrototype__toEqualCallback, 1 } } , | |
{ "toEqualIgnoringWhitespace"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, ExpectPrototype__toEqualIgnoringWhitespaceCallback, 1 } } , | |
{ "toHaveBeenCalled"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, ExpectPrototype__toHaveBeenCalledCallback, 0 } } , | |
{ "toHaveBeenCalledTimes"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, ExpectPrototype__toHaveBeenCalledTimesCallback, 1 } } , | |
{ "toHaveBeenCalledWith"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, ExpectPrototype__toHaveBeenCalledWithCallback, 0 } } , | |
{ "toHaveBeenLastCalledWith"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, ExpectPrototype__toHaveBeenLastCalledWithCallback, 0 } } , | |
{ "toHaveBeenNthCalledWith"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, ExpectPrototype__toHaveBeenNthCalledWithCallback, 0 } } , | |
{ "toHaveLastReturnedWith"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, ExpectPrototype__toHaveLastReturnedWithCallback, 1 } } , | |
{ "toHaveLength"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, ExpectPrototype__toHaveLengthCallback, 1 } } , | |
{ "toHaveNthReturnedWith"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, ExpectPrototype__toHaveNthReturnedWithCallback, 1 } } , | |
{ "toHaveProperty"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, ExpectPrototype__toHavePropertyCallback, 2 } } , | |
{ "toHaveReturned"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, ExpectPrototype__toHaveReturnedCallback, 1 } } , | |
{ "toHaveReturnedTimes"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, ExpectPrototype__toHaveReturnedTimesCallback, 1 } } , | |
{ "toHaveReturnedWith"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, ExpectPrototype__toHaveReturnedWithCallback, 1 } } , | |
{ "toInclude"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, ExpectPrototype__toIncludeCallback, 1 } } , | |
{ "toIncludeRepeated"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, ExpectPrototype__toIncludeRepeatedCallback, 2 } } , | |
{ "toMatch"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, ExpectPrototype__toMatchCallback, 1 } } , | |
{ "toMatchInlineSnapshot"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, ExpectPrototype__toMatchInlineSnapshotCallback, 1 } } , | |
{ "toMatchObject"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, ExpectPrototype__toMatchObjectCallback, 1 } } , | |
{ "toMatchSnapshot"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, ExpectPrototype__toMatchSnapshotCallback, 1 } } , | |
{ "toReturn"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, ExpectPrototype__toReturnCallback, 1 } } , | |
{ "toSatisfy"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, ExpectPrototype__toSatisfyCallback, 1 } } , | |
{ "toStartWith"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, ExpectPrototype__toStartWithCallback, 1 } } , | |
{ "toStrictEqual"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, ExpectPrototype__toStrictEqualCallback, 1 } } , | |
{ "toThrow"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, ExpectPrototype__toThrowCallback, 1 } } , | |
{ "toThrowError"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, ExpectPrototype__toThrowErrorCallback, 1 } } , | |
{ "toThrowErrorMatchingInlineSnapshot"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, ExpectPrototype__toThrowErrorMatchingInlineSnapshotCallback, 1 } } , | |
{ "toThrowErrorMatchingSnapshot"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, ExpectPrototype__toThrowErrorMatchingSnapshotCallback, 1 } } | |
}; | |
const ClassInfo JSExpectPrototype::s_info = { "Expect"_s, &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSExpectPrototype) }; | |
JSC_DEFINE_CUSTOM_GETTER(jsExpectConstructor, (JSGlobalObject * lexicalGlobalObject, EncodedJSValue thisValue, PropertyName)) | |
{ | |
VM& vm = JSC::getVM(lexicalGlobalObject); | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
auto* globalObject = reinterpret_cast<Zig::GlobalObject*>(lexicalGlobalObject); | |
auto* prototype = jsDynamicCast<JSExpectPrototype*>(JSValue::decode(thisValue)); | |
if (UNLIKELY(!prototype)) | |
return throwVMTypeError(lexicalGlobalObject, throwScope, "Cannot get constructor for Expect"_s); | |
return JSValue::encode(globalObject->JSExpectConstructor()); | |
} | |
JSC_DEFINE_HOST_FUNCTION(ExpectPrototype__failCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSExpect* thisObject = jsDynamicCast<JSExpect*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof Expect"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = ExpectPrototype__fail(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "Expect.fail returned an empty value without an exception"); | |
return result; | |
#endif | |
return ExpectPrototype__fail(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_HOST_FUNCTION(ExpectPrototype__lastCalledWithCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSExpect* thisObject = jsDynamicCast<JSExpect*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof Expect"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = ExpectPrototype__toHaveBeenLastCalledWith(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "Expect.toHaveBeenLastCalledWith returned an empty value without an exception"); | |
return result; | |
#endif | |
return ExpectPrototype__toHaveBeenLastCalledWith(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_HOST_FUNCTION(ExpectPrototype__lastReturnedWithCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSExpect* thisObject = jsDynamicCast<JSExpect*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof Expect"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = ExpectPrototype__toHaveLastReturnedWith(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "Expect.toHaveLastReturnedWith returned an empty value without an exception"); | |
return result; | |
#endif | |
return ExpectPrototype__toHaveLastReturnedWith(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_CUSTOM_GETTER(ExpectPrototype__notGetterWrap, (JSGlobalObject * lexicalGlobalObject, EncodedJSValue encodedThisValue, PropertyName attributeName)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
Zig::GlobalObject *globalObject = reinterpret_cast<Zig::GlobalObject*>(lexicalGlobalObject); | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
JSExpect* thisObject = jsCast<JSExpect*>(JSValue::decode(encodedThisValue)); | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
JSC::EncodedJSValue result = ExpectPrototype__getNot(thisObject->wrapped(), encodedThisValue, globalObject); | |
RETURN_IF_EXCEPTION(throwScope, {}); | |
RELEASE_AND_RETURN(throwScope, result); | |
} | |
JSC_DEFINE_HOST_FUNCTION(ExpectPrototype__nthCalledWithCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSExpect* thisObject = jsDynamicCast<JSExpect*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof Expect"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = ExpectPrototype__toHaveBeenNthCalledWith(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "Expect.toHaveBeenNthCalledWith returned an empty value without an exception"); | |
return result; | |
#endif | |
return ExpectPrototype__toHaveBeenNthCalledWith(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_HOST_FUNCTION(ExpectPrototype__nthReturnedWithCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSExpect* thisObject = jsDynamicCast<JSExpect*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof Expect"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = ExpectPrototype__toHaveNthReturnedWith(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "Expect.toHaveNthReturnedWith returned an empty value without an exception"); | |
return result; | |
#endif | |
return ExpectPrototype__toHaveNthReturnedWith(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_HOST_FUNCTION(ExpectPrototype__passCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSExpect* thisObject = jsDynamicCast<JSExpect*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof Expect"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = ExpectPrototype___pass(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "Expect._pass returned an empty value without an exception"); | |
return result; | |
#endif | |
return ExpectPrototype___pass(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_CUSTOM_GETTER(ExpectPrototype__rejectsGetterWrap, (JSGlobalObject * lexicalGlobalObject, EncodedJSValue encodedThisValue, PropertyName attributeName)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
Zig::GlobalObject *globalObject = reinterpret_cast<Zig::GlobalObject*>(lexicalGlobalObject); | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
JSExpect* thisObject = jsCast<JSExpect*>(JSValue::decode(encodedThisValue)); | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
JSC::EncodedJSValue result = ExpectPrototype__getRejects(thisObject->wrapped(), encodedThisValue, globalObject); | |
RETURN_IF_EXCEPTION(throwScope, {}); | |
RELEASE_AND_RETURN(throwScope, result); | |
} | |
JSC_DEFINE_CUSTOM_GETTER(ExpectPrototype__resolvesGetterWrap, (JSGlobalObject * lexicalGlobalObject, EncodedJSValue encodedThisValue, PropertyName attributeName)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
Zig::GlobalObject *globalObject = reinterpret_cast<Zig::GlobalObject*>(lexicalGlobalObject); | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
JSExpect* thisObject = jsCast<JSExpect*>(JSValue::decode(encodedThisValue)); | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
JSC::EncodedJSValue result = ExpectPrototype__getResolves(thisObject->wrapped(), encodedThisValue, globalObject); | |
RETURN_IF_EXCEPTION(throwScope, {}); | |
RELEASE_AND_RETURN(throwScope, result); | |
} | |
JSC_DEFINE_HOST_FUNCTION(ExpectPrototype__toBeCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSExpect* thisObject = jsDynamicCast<JSExpect*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof Expect"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = ExpectPrototype__toBe(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "Expect.toBe returned an empty value without an exception"); | |
return result; | |
#endif | |
return ExpectPrototype__toBe(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_HOST_FUNCTION(ExpectPrototype__toBeArrayCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSExpect* thisObject = jsDynamicCast<JSExpect*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof Expect"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = ExpectPrototype__toBeArray(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "Expect.toBeArray returned an empty value without an exception"); | |
return result; | |
#endif | |
return ExpectPrototype__toBeArray(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_HOST_FUNCTION(ExpectPrototype__toBeArrayOfSizeCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSExpect* thisObject = jsDynamicCast<JSExpect*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof Expect"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = ExpectPrototype__toBeArrayOfSize(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "Expect.toBeArrayOfSize returned an empty value without an exception"); | |
return result; | |
#endif | |
return ExpectPrototype__toBeArrayOfSize(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_HOST_FUNCTION(ExpectPrototype__toBeBooleanCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSExpect* thisObject = jsDynamicCast<JSExpect*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof Expect"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = ExpectPrototype__toBeBoolean(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "Expect.toBeBoolean returned an empty value without an exception"); | |
return result; | |
#endif | |
return ExpectPrototype__toBeBoolean(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_HOST_FUNCTION(ExpectPrototype__toBeCalledCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSExpect* thisObject = jsDynamicCast<JSExpect*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof Expect"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = ExpectPrototype__toHaveBeenCalled(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "Expect.toHaveBeenCalled returned an empty value without an exception"); | |
return result; | |
#endif | |
return ExpectPrototype__toHaveBeenCalled(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_HOST_FUNCTION(ExpectPrototype__toBeCalledTimesCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSExpect* thisObject = jsDynamicCast<JSExpect*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof Expect"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = ExpectPrototype__toHaveBeenCalledTimes(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "Expect.toHaveBeenCalledTimes returned an empty value without an exception"); | |
return result; | |
#endif | |
return ExpectPrototype__toHaveBeenCalledTimes(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_HOST_FUNCTION(ExpectPrototype__toBeCalledWithCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSExpect* thisObject = jsDynamicCast<JSExpect*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof Expect"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = ExpectPrototype__toHaveBeenCalledWith(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "Expect.toHaveBeenCalledWith returned an empty value without an exception"); | |
return result; | |
#endif | |
return ExpectPrototype__toHaveBeenCalledWith(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_HOST_FUNCTION(ExpectPrototype__toBeCloseToCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSExpect* thisObject = jsDynamicCast<JSExpect*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof Expect"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = ExpectPrototype__toBeCloseTo(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "Expect.toBeCloseTo returned an empty value without an exception"); | |
return result; | |
#endif | |
return ExpectPrototype__toBeCloseTo(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_HOST_FUNCTION(ExpectPrototype__toBeDateCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSExpect* thisObject = jsDynamicCast<JSExpect*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof Expect"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = ExpectPrototype__toBeDate(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "Expect.toBeDate returned an empty value without an exception"); | |
return result; | |
#endif | |
return ExpectPrototype__toBeDate(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_HOST_FUNCTION(ExpectPrototype__toBeDefinedCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSExpect* thisObject = jsDynamicCast<JSExpect*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof Expect"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = ExpectPrototype__toBeDefined(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "Expect.toBeDefined returned an empty value without an exception"); | |
return result; | |
#endif | |
return ExpectPrototype__toBeDefined(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_HOST_FUNCTION(ExpectPrototype__toBeEmptyCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSExpect* thisObject = jsDynamicCast<JSExpect*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof Expect"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = ExpectPrototype__toBeEmpty(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "Expect.toBeEmpty returned an empty value without an exception"); | |
return result; | |
#endif | |
return ExpectPrototype__toBeEmpty(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_HOST_FUNCTION(ExpectPrototype__toBeEmptyObjectCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSExpect* thisObject = jsDynamicCast<JSExpect*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof Expect"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = ExpectPrototype__toBeEmptyObject(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "Expect.toBeEmptyObject returned an empty value without an exception"); | |
return result; | |
#endif | |
return ExpectPrototype__toBeEmptyObject(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_HOST_FUNCTION(ExpectPrototype__toBeEvenCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSExpect* thisObject = jsDynamicCast<JSExpect*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof Expect"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = ExpectPrototype__toBeEven(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "Expect.toBeEven returned an empty value without an exception"); | |
return result; | |
#endif | |
return ExpectPrototype__toBeEven(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_HOST_FUNCTION(ExpectPrototype__toBeFalseCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSExpect* thisObject = jsDynamicCast<JSExpect*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof Expect"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = ExpectPrototype__toBeFalse(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "Expect.toBeFalse returned an empty value without an exception"); | |
return result; | |
#endif | |
return ExpectPrototype__toBeFalse(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_HOST_FUNCTION(ExpectPrototype__toBeFalsyCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSExpect* thisObject = jsDynamicCast<JSExpect*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof Expect"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = ExpectPrototype__toBeFalsy(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "Expect.toBeFalsy returned an empty value without an exception"); | |
return result; | |
#endif | |
return ExpectPrototype__toBeFalsy(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_HOST_FUNCTION(ExpectPrototype__toBeFiniteCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSExpect* thisObject = jsDynamicCast<JSExpect*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof Expect"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = ExpectPrototype__toBeFinite(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "Expect.toBeFinite returned an empty value without an exception"); | |
return result; | |
#endif | |
return ExpectPrototype__toBeFinite(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_HOST_FUNCTION(ExpectPrototype__toBeFunctionCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSExpect* thisObject = jsDynamicCast<JSExpect*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof Expect"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = ExpectPrototype__toBeFunction(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "Expect.toBeFunction returned an empty value without an exception"); | |
return result; | |
#endif | |
return ExpectPrototype__toBeFunction(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_HOST_FUNCTION(ExpectPrototype__toBeGreaterThanCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSExpect* thisObject = jsDynamicCast<JSExpect*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof Expect"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = ExpectPrototype__toBeGreaterThan(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "Expect.toBeGreaterThan returned an empty value without an exception"); | |
return result; | |
#endif | |
return ExpectPrototype__toBeGreaterThan(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_HOST_FUNCTION(ExpectPrototype__toBeGreaterThanOrEqualCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSExpect* thisObject = jsDynamicCast<JSExpect*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof Expect"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = ExpectPrototype__toBeGreaterThanOrEqual(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "Expect.toBeGreaterThanOrEqual returned an empty value without an exception"); | |
return result; | |
#endif | |
return ExpectPrototype__toBeGreaterThanOrEqual(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_HOST_FUNCTION(ExpectPrototype__toBeInstanceOfCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSExpect* thisObject = jsDynamicCast<JSExpect*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof Expect"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = ExpectPrototype__toBeInstanceOf(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "Expect.toBeInstanceOf returned an empty value without an exception"); | |
return result; | |
#endif | |
return ExpectPrototype__toBeInstanceOf(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_HOST_FUNCTION(ExpectPrototype__toBeIntegerCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSExpect* thisObject = jsDynamicCast<JSExpect*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof Expect"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = ExpectPrototype__toBeInteger(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "Expect.toBeInteger returned an empty value without an exception"); | |
return result; | |
#endif | |
return ExpectPrototype__toBeInteger(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_HOST_FUNCTION(ExpectPrototype__toBeLessThanCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSExpect* thisObject = jsDynamicCast<JSExpect*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof Expect"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = ExpectPrototype__toBeLessThan(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "Expect.toBeLessThan returned an empty value without an exception"); | |
return result; | |
#endif | |
return ExpectPrototype__toBeLessThan(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_HOST_FUNCTION(ExpectPrototype__toBeLessThanOrEqualCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSExpect* thisObject = jsDynamicCast<JSExpect*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof Expect"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = ExpectPrototype__toBeLessThanOrEqual(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "Expect.toBeLessThanOrEqual returned an empty value without an exception"); | |
return result; | |
#endif | |
return ExpectPrototype__toBeLessThanOrEqual(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_HOST_FUNCTION(ExpectPrototype__toBeNaNCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSExpect* thisObject = jsDynamicCast<JSExpect*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof Expect"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = ExpectPrototype__toBeNaN(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "Expect.toBeNaN returned an empty value without an exception"); | |
return result; | |
#endif | |
return ExpectPrototype__toBeNaN(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_HOST_FUNCTION(ExpectPrototype__toBeNegativeCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSExpect* thisObject = jsDynamicCast<JSExpect*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof Expect"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = ExpectPrototype__toBeNegative(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "Expect.toBeNegative returned an empty value without an exception"); | |
return result; | |
#endif | |
return ExpectPrototype__toBeNegative(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_HOST_FUNCTION(ExpectPrototype__toBeNilCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSExpect* thisObject = jsDynamicCast<JSExpect*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof Expect"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = ExpectPrototype__toBeNil(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "Expect.toBeNil returned an empty value without an exception"); | |
return result; | |
#endif | |
return ExpectPrototype__toBeNil(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_HOST_FUNCTION(ExpectPrototype__toBeNullCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSExpect* thisObject = jsDynamicCast<JSExpect*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof Expect"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = ExpectPrototype__toBeNull(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "Expect.toBeNull returned an empty value without an exception"); | |
return result; | |
#endif | |
return ExpectPrototype__toBeNull(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_HOST_FUNCTION(ExpectPrototype__toBeNumberCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSExpect* thisObject = jsDynamicCast<JSExpect*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof Expect"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = ExpectPrototype__toBeNumber(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "Expect.toBeNumber returned an empty value without an exception"); | |
return result; | |
#endif | |
return ExpectPrototype__toBeNumber(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_HOST_FUNCTION(ExpectPrototype__toBeObjectCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSExpect* thisObject = jsDynamicCast<JSExpect*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof Expect"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = ExpectPrototype__toBeObject(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "Expect.toBeObject returned an empty value without an exception"); | |
return result; | |
#endif | |
return ExpectPrototype__toBeObject(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_HOST_FUNCTION(ExpectPrototype__toBeOddCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSExpect* thisObject = jsDynamicCast<JSExpect*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof Expect"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = ExpectPrototype__toBeOdd(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "Expect.toBeOdd returned an empty value without an exception"); | |
return result; | |
#endif | |
return ExpectPrototype__toBeOdd(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_HOST_FUNCTION(ExpectPrototype__toBeOneOfCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSExpect* thisObject = jsDynamicCast<JSExpect*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof Expect"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = ExpectPrototype__toBeOneOf(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "Expect.toBeOneOf returned an empty value without an exception"); | |
return result; | |
#endif | |
return ExpectPrototype__toBeOneOf(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_HOST_FUNCTION(ExpectPrototype__toBePositiveCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSExpect* thisObject = jsDynamicCast<JSExpect*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof Expect"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = ExpectPrototype__toBePositive(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "Expect.toBePositive returned an empty value without an exception"); | |
return result; | |
#endif | |
return ExpectPrototype__toBePositive(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_HOST_FUNCTION(ExpectPrototype__toBeStringCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSExpect* thisObject = jsDynamicCast<JSExpect*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof Expect"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = ExpectPrototype__toBeString(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "Expect.toBeString returned an empty value without an exception"); | |
return result; | |
#endif | |
return ExpectPrototype__toBeString(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_HOST_FUNCTION(ExpectPrototype__toBeSymbolCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSExpect* thisObject = jsDynamicCast<JSExpect*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof Expect"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = ExpectPrototype__toBeSymbol(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "Expect.toBeSymbol returned an empty value without an exception"); | |
return result; | |
#endif | |
return ExpectPrototype__toBeSymbol(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_HOST_FUNCTION(ExpectPrototype__toBeTrueCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSExpect* thisObject = jsDynamicCast<JSExpect*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof Expect"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = ExpectPrototype__toBeTrue(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "Expect.toBeTrue returned an empty value without an exception"); | |
return result; | |
#endif | |
return ExpectPrototype__toBeTrue(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_HOST_FUNCTION(ExpectPrototype__toBeTruthyCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSExpect* thisObject = jsDynamicCast<JSExpect*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof Expect"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = ExpectPrototype__toBeTruthy(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "Expect.toBeTruthy returned an empty value without an exception"); | |
return result; | |
#endif | |
return ExpectPrototype__toBeTruthy(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_HOST_FUNCTION(ExpectPrototype__toBeTypeOfCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSExpect* thisObject = jsDynamicCast<JSExpect*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof Expect"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = ExpectPrototype__toBeTypeOf(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "Expect.toBeTypeOf returned an empty value without an exception"); | |
return result; | |
#endif | |
return ExpectPrototype__toBeTypeOf(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_HOST_FUNCTION(ExpectPrototype__toBeUndefinedCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSExpect* thisObject = jsDynamicCast<JSExpect*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof Expect"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = ExpectPrototype__toBeUndefined(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "Expect.toBeUndefined returned an empty value without an exception"); | |
return result; | |
#endif | |
return ExpectPrototype__toBeUndefined(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_HOST_FUNCTION(ExpectPrototype__toBeValidDateCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSExpect* thisObject = jsDynamicCast<JSExpect*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof Expect"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = ExpectPrototype__toBeValidDate(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "Expect.toBeValidDate returned an empty value without an exception"); | |
return result; | |
#endif | |
return ExpectPrototype__toBeValidDate(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_HOST_FUNCTION(ExpectPrototype__toBeWithinCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSExpect* thisObject = jsDynamicCast<JSExpect*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof Expect"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = ExpectPrototype__toBeWithin(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "Expect.toBeWithin returned an empty value without an exception"); | |
return result; | |
#endif | |
return ExpectPrototype__toBeWithin(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_HOST_FUNCTION(ExpectPrototype__toContainCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSExpect* thisObject = jsDynamicCast<JSExpect*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof Expect"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = ExpectPrototype__toContain(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "Expect.toContain returned an empty value without an exception"); | |
return result; | |
#endif | |
return ExpectPrototype__toContain(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_HOST_FUNCTION(ExpectPrototype__toContainAllKeysCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSExpect* thisObject = jsDynamicCast<JSExpect*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof Expect"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = ExpectPrototype__toContainAllKeys(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "Expect.toContainAllKeys returned an empty value without an exception"); | |
return result; | |
#endif | |
return ExpectPrototype__toContainAllKeys(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_HOST_FUNCTION(ExpectPrototype__toContainAllValuesCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSExpect* thisObject = jsDynamicCast<JSExpect*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof Expect"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = ExpectPrototype__toContainAllValues(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "Expect.toContainAllValues returned an empty value without an exception"); | |
return result; | |
#endif | |
return ExpectPrototype__toContainAllValues(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_HOST_FUNCTION(ExpectPrototype__toContainAnyKeysCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSExpect* thisObject = jsDynamicCast<JSExpect*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof Expect"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = ExpectPrototype__toContainAnyKeys(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "Expect.toContainAnyKeys returned an empty value without an exception"); | |
return result; | |
#endif | |
return ExpectPrototype__toContainAnyKeys(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_HOST_FUNCTION(ExpectPrototype__toContainAnyValuesCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSExpect* thisObject = jsDynamicCast<JSExpect*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof Expect"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = ExpectPrototype__toContainAnyValues(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "Expect.toContainAnyValues returned an empty value without an exception"); | |
return result; | |
#endif | |
return ExpectPrototype__toContainAnyValues(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_HOST_FUNCTION(ExpectPrototype__toContainEqualCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSExpect* thisObject = jsDynamicCast<JSExpect*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof Expect"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = ExpectPrototype__toContainEqual(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "Expect.toContainEqual returned an empty value without an exception"); | |
return result; | |
#endif | |
return ExpectPrototype__toContainEqual(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_HOST_FUNCTION(ExpectPrototype__toContainKeyCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSExpect* thisObject = jsDynamicCast<JSExpect*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof Expect"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = ExpectPrototype__toContainKey(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "Expect.toContainKey returned an empty value without an exception"); | |
return result; | |
#endif | |
return ExpectPrototype__toContainKey(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_HOST_FUNCTION(ExpectPrototype__toContainKeysCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSExpect* thisObject = jsDynamicCast<JSExpect*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof Expect"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = ExpectPrototype__toContainKeys(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "Expect.toContainKeys returned an empty value without an exception"); | |
return result; | |
#endif | |
return ExpectPrototype__toContainKeys(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_HOST_FUNCTION(ExpectPrototype__toContainValueCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSExpect* thisObject = jsDynamicCast<JSExpect*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof Expect"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = ExpectPrototype__toContainValue(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "Expect.toContainValue returned an empty value without an exception"); | |
return result; | |
#endif | |
return ExpectPrototype__toContainValue(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_HOST_FUNCTION(ExpectPrototype__toContainValuesCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSExpect* thisObject = jsDynamicCast<JSExpect*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof Expect"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = ExpectPrototype__toContainValues(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "Expect.toContainValues returned an empty value without an exception"); | |
return result; | |
#endif | |
return ExpectPrototype__toContainValues(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_HOST_FUNCTION(ExpectPrototype__toEndWithCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSExpect* thisObject = jsDynamicCast<JSExpect*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof Expect"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = ExpectPrototype__toEndWith(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "Expect.toEndWith returned an empty value without an exception"); | |
return result; | |
#endif | |
return ExpectPrototype__toEndWith(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_HOST_FUNCTION(ExpectPrototype__toEqualCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSExpect* thisObject = jsDynamicCast<JSExpect*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof Expect"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = ExpectPrototype__toEqual(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "Expect.toEqual returned an empty value without an exception"); | |
return result; | |
#endif | |
return ExpectPrototype__toEqual(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_HOST_FUNCTION(ExpectPrototype__toEqualIgnoringWhitespaceCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSExpect* thisObject = jsDynamicCast<JSExpect*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof Expect"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = ExpectPrototype__toEqualIgnoringWhitespace(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "Expect.toEqualIgnoringWhitespace returned an empty value without an exception"); | |
return result; | |
#endif | |
return ExpectPrototype__toEqualIgnoringWhitespace(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_HOST_FUNCTION(ExpectPrototype__toHaveBeenCalledCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSExpect* thisObject = jsDynamicCast<JSExpect*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof Expect"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = ExpectPrototype__toHaveBeenCalled(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "Expect.toHaveBeenCalled returned an empty value without an exception"); | |
return result; | |
#endif | |
return ExpectPrototype__toHaveBeenCalled(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_HOST_FUNCTION(ExpectPrototype__toHaveBeenCalledTimesCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSExpect* thisObject = jsDynamicCast<JSExpect*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof Expect"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = ExpectPrototype__toHaveBeenCalledTimes(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "Expect.toHaveBeenCalledTimes returned an empty value without an exception"); | |
return result; | |
#endif | |
return ExpectPrototype__toHaveBeenCalledTimes(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_HOST_FUNCTION(ExpectPrototype__toHaveBeenCalledWithCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSExpect* thisObject = jsDynamicCast<JSExpect*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof Expect"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = ExpectPrototype__toHaveBeenCalledWith(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "Expect.toHaveBeenCalledWith returned an empty value without an exception"); | |
return result; | |
#endif | |
return ExpectPrototype__toHaveBeenCalledWith(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_HOST_FUNCTION(ExpectPrototype__toHaveBeenLastCalledWithCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSExpect* thisObject = jsDynamicCast<JSExpect*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof Expect"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = ExpectPrototype__toHaveBeenLastCalledWith(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "Expect.toHaveBeenLastCalledWith returned an empty value without an exception"); | |
return result; | |
#endif | |
return ExpectPrototype__toHaveBeenLastCalledWith(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_HOST_FUNCTION(ExpectPrototype__toHaveBeenNthCalledWithCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSExpect* thisObject = jsDynamicCast<JSExpect*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof Expect"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = ExpectPrototype__toHaveBeenNthCalledWith(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "Expect.toHaveBeenNthCalledWith returned an empty value without an exception"); | |
return result; | |
#endif | |
return ExpectPrototype__toHaveBeenNthCalledWith(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_HOST_FUNCTION(ExpectPrototype__toHaveLastReturnedWithCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSExpect* thisObject = jsDynamicCast<JSExpect*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof Expect"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = ExpectPrototype__toHaveLastReturnedWith(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "Expect.toHaveLastReturnedWith returned an empty value without an exception"); | |
return result; | |
#endif | |
return ExpectPrototype__toHaveLastReturnedWith(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_HOST_FUNCTION(ExpectPrototype__toHaveLengthCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSExpect* thisObject = jsDynamicCast<JSExpect*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof Expect"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = ExpectPrototype__toHaveLength(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "Expect.toHaveLength returned an empty value without an exception"); | |
return result; | |
#endif | |
return ExpectPrototype__toHaveLength(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_HOST_FUNCTION(ExpectPrototype__toHaveNthReturnedWithCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSExpect* thisObject = jsDynamicCast<JSExpect*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof Expect"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = ExpectPrototype__toHaveNthReturnedWith(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "Expect.toHaveNthReturnedWith returned an empty value without an exception"); | |
return result; | |
#endif | |
return ExpectPrototype__toHaveNthReturnedWith(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_HOST_FUNCTION(ExpectPrototype__toHavePropertyCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSExpect* thisObject = jsDynamicCast<JSExpect*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof Expect"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = ExpectPrototype__toHaveProperty(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "Expect.toHaveProperty returned an empty value without an exception"); | |
return result; | |
#endif | |
return ExpectPrototype__toHaveProperty(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_HOST_FUNCTION(ExpectPrototype__toHaveReturnedCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSExpect* thisObject = jsDynamicCast<JSExpect*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof Expect"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = ExpectPrototype__toHaveReturned(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "Expect.toHaveReturned returned an empty value without an exception"); | |
return result; | |
#endif | |
return ExpectPrototype__toHaveReturned(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_HOST_FUNCTION(ExpectPrototype__toHaveReturnedTimesCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSExpect* thisObject = jsDynamicCast<JSExpect*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof Expect"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = ExpectPrototype__toHaveReturnedTimes(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "Expect.toHaveReturnedTimes returned an empty value without an exception"); | |
return result; | |
#endif | |
return ExpectPrototype__toHaveReturnedTimes(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_HOST_FUNCTION(ExpectPrototype__toHaveReturnedWithCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSExpect* thisObject = jsDynamicCast<JSExpect*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof Expect"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = ExpectPrototype__toHaveReturnedWith(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "Expect.toHaveReturnedWith returned an empty value without an exception"); | |
return result; | |
#endif | |
return ExpectPrototype__toHaveReturnedWith(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_HOST_FUNCTION(ExpectPrototype__toIncludeCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSExpect* thisObject = jsDynamicCast<JSExpect*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof Expect"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = ExpectPrototype__toInclude(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "Expect.toInclude returned an empty value without an exception"); | |
return result; | |
#endif | |
return ExpectPrototype__toInclude(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_HOST_FUNCTION(ExpectPrototype__toIncludeRepeatedCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSExpect* thisObject = jsDynamicCast<JSExpect*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof Expect"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = ExpectPrototype__toIncludeRepeated(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "Expect.toIncludeRepeated returned an empty value without an exception"); | |
return result; | |
#endif | |
return ExpectPrototype__toIncludeRepeated(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_HOST_FUNCTION(ExpectPrototype__toMatchCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSExpect* thisObject = jsDynamicCast<JSExpect*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof Expect"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = ExpectPrototype__toMatch(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "Expect.toMatch returned an empty value without an exception"); | |
return result; | |
#endif | |
return ExpectPrototype__toMatch(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_HOST_FUNCTION(ExpectPrototype__toMatchInlineSnapshotCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSExpect* thisObject = jsDynamicCast<JSExpect*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof Expect"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = ExpectPrototype__toMatchInlineSnapshot(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "Expect.toMatchInlineSnapshot returned an empty value without an exception"); | |
return result; | |
#endif | |
return ExpectPrototype__toMatchInlineSnapshot(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_HOST_FUNCTION(ExpectPrototype__toMatchObjectCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSExpect* thisObject = jsDynamicCast<JSExpect*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof Expect"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = ExpectPrototype__toMatchObject(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "Expect.toMatchObject returned an empty value without an exception"); | |
return result; | |
#endif | |
return ExpectPrototype__toMatchObject(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_HOST_FUNCTION(ExpectPrototype__toMatchSnapshotCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSExpect* thisObject = jsDynamicCast<JSExpect*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof Expect"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = ExpectPrototype__toMatchSnapshot(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "Expect.toMatchSnapshot returned an empty value without an exception"); | |
return result; | |
#endif | |
return ExpectPrototype__toMatchSnapshot(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_HOST_FUNCTION(ExpectPrototype__toReturnCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSExpect* thisObject = jsDynamicCast<JSExpect*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof Expect"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = ExpectPrototype__toHaveReturned(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "Expect.toHaveReturned returned an empty value without an exception"); | |
return result; | |
#endif | |
return ExpectPrototype__toHaveReturned(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_HOST_FUNCTION(ExpectPrototype__toSatisfyCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSExpect* thisObject = jsDynamicCast<JSExpect*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof Expect"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = ExpectPrototype__toSatisfy(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "Expect.toSatisfy returned an empty value without an exception"); | |
return result; | |
#endif | |
return ExpectPrototype__toSatisfy(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_HOST_FUNCTION(ExpectPrototype__toStartWithCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSExpect* thisObject = jsDynamicCast<JSExpect*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof Expect"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = ExpectPrototype__toStartWith(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "Expect.toStartWith returned an empty value without an exception"); | |
return result; | |
#endif | |
return ExpectPrototype__toStartWith(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_HOST_FUNCTION(ExpectPrototype__toStrictEqualCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSExpect* thisObject = jsDynamicCast<JSExpect*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof Expect"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = ExpectPrototype__toStrictEqual(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "Expect.toStrictEqual returned an empty value without an exception"); | |
return result; | |
#endif | |
return ExpectPrototype__toStrictEqual(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_HOST_FUNCTION(ExpectPrototype__toThrowCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSExpect* thisObject = jsDynamicCast<JSExpect*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof Expect"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = ExpectPrototype__toThrow(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "Expect.toThrow returned an empty value without an exception"); | |
return result; | |
#endif | |
return ExpectPrototype__toThrow(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_HOST_FUNCTION(ExpectPrototype__toThrowErrorCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSExpect* thisObject = jsDynamicCast<JSExpect*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof Expect"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = ExpectPrototype__toThrow(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "Expect.toThrow returned an empty value without an exception"); | |
return result; | |
#endif | |
return ExpectPrototype__toThrow(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_HOST_FUNCTION(ExpectPrototype__toThrowErrorMatchingInlineSnapshotCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSExpect* thisObject = jsDynamicCast<JSExpect*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof Expect"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = ExpectPrototype__toThrowErrorMatchingInlineSnapshot(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "Expect.toThrowErrorMatchingInlineSnapshot returned an empty value without an exception"); | |
return result; | |
#endif | |
return ExpectPrototype__toThrowErrorMatchingInlineSnapshot(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_HOST_FUNCTION(ExpectPrototype__toThrowErrorMatchingSnapshotCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSExpect* thisObject = jsDynamicCast<JSExpect*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof Expect"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = ExpectPrototype__toThrowErrorMatchingSnapshot(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "Expect.toThrowErrorMatchingSnapshot returned an empty value without an exception"); | |
return result; | |
#endif | |
return ExpectPrototype__toThrowErrorMatchingSnapshot(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
extern JSC_CALLCONV void ExpectPrototype__capturedValueSetCachedValue(JSC::EncodedJSValue thisValue, JSC::JSGlobalObject *globalObject, JSC::EncodedJSValue value) | |
{ | |
auto& vm = globalObject->vm(); | |
auto* thisObject = jsCast<JSExpect*>(JSValue::decode(thisValue)); | |
thisObject->m_capturedValue.set(vm, thisObject, JSValue::decode(value)); | |
} | |
extern JSC_CALLCONV JSC::EncodedJSValue ExpectPrototype__capturedValueGetCachedValue(JSC::EncodedJSValue thisValue) | |
{ | |
auto* thisObject = jsCast<JSExpect*>(JSValue::decode(thisValue)); | |
return JSValue::encode(thisObject->m_capturedValue.get()); | |
} | |
extern JSC_CALLCONV void ExpectPrototype__resultValueSetCachedValue(JSC::EncodedJSValue thisValue, JSC::JSGlobalObject *globalObject, JSC::EncodedJSValue value) | |
{ | |
auto& vm = globalObject->vm(); | |
auto* thisObject = jsCast<JSExpect*>(JSValue::decode(thisValue)); | |
thisObject->m_resultValue.set(vm, thisObject, JSValue::decode(value)); | |
} | |
extern JSC_CALLCONV JSC::EncodedJSValue ExpectPrototype__resultValueGetCachedValue(JSC::EncodedJSValue thisValue) | |
{ | |
auto* thisObject = jsCast<JSExpect*>(JSValue::decode(thisValue)); | |
return JSValue::encode(thisObject->m_resultValue.get()); | |
} | |
void JSExpectPrototype::finishCreation(JSC::VM& vm, JSC::JSGlobalObject* globalObject) | |
{ | |
Base::finishCreation(vm); | |
reifyStaticProperties(vm, JSExpect::info(), JSExpectPrototypeTableValues, *this); | |
JSC_TO_STRING_TAG_WITHOUT_TRANSITION(); | |
} | |
static const HashTableValue JSExpectConstructorTableValues[15] = { | |
{ "addSnapshotSerializer"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, ExpectClass__addSnapshotSerializer, 1 } } , | |
{ "any"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, ExpectClass__any, 1 } } , | |
{ "anything"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, ExpectClass__anything, 1 } } , | |
{ "arrayContaining"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, ExpectClass__arrayContaining, 1 } } , | |
{ "assertions"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, ExpectClass__assertions, 1 } } , | |
{ "closeTo"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, ExpectClass__closeTo, 1 } } , | |
{ "extend"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, ExpectClass__extend, 1 } } , | |
{ "hasAssertions"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, ExpectClass__hasAssertions, 1 } } , | |
{ "not"_s, static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::GetterSetterType, ExpectClass__getStaticNot, 0 } } , | |
{ "objectContaining"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, ExpectClass__objectContaining, 1 } } , | |
{ "rejectsTo"_s, static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::GetterSetterType, ExpectClass__getStaticRejectsTo, 0 } } , | |
{ "resolvesTo"_s, static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::GetterSetterType, ExpectClass__getStaticResolvesTo, 0 } } , | |
{ "stringContaining"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, ExpectClass__stringContaining, 1 } } , | |
{ "stringMatching"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, ExpectClass__stringMatching, 1 } } , | |
{ "unreachable"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, ExpectClass__doUnreachable, 1 } } | |
}; | |
void JSExpectConstructor::finishCreation(VM& vm, JSC::JSGlobalObject* globalObject, JSExpectPrototype* prototype) | |
{ | |
Base::finishCreation(vm, 0, "Expect"_s, PropertyAdditionMode::WithoutStructureTransition); | |
reifyStaticProperties(vm, &JSExpectConstructor::s_info, JSExpectConstructorTableValues, *this); | |
putDirectWithoutTransition(vm, vm.propertyNames->prototype, prototype, PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly); | |
ASSERT(inherits(info())); | |
} | |
JSExpectConstructor::JSExpectConstructor(JSC::VM& vm, JSC::Structure* structure) : Base(vm, structure, ExpectClass__call, construct) { | |
} | |
JSExpectConstructor* JSExpectConstructor::create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure, JSExpectPrototype* prototype) { | |
JSExpectConstructor* ptr = new (NotNull, JSC::allocateCell<JSExpectConstructor>(vm)) JSExpectConstructor(vm, structure); | |
ptr->finishCreation(vm, globalObject, prototype); | |
return ptr; | |
} | |
JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES JSExpectConstructor::call(JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame) | |
{ | |
Zig::GlobalObject *globalObject = reinterpret_cast<Zig::GlobalObject*>(lexicalGlobalObject); | |
JSC::VM &vm = globalObject->vm(); | |
auto scope = DECLARE_THROW_SCOPE(vm); | |
void* ptr = ExpectClass__construct(globalObject, callFrame); | |
if (UNLIKELY(!ptr || scope.exception())) { | |
return JSValue::encode(JSC::jsUndefined()); | |
} | |
Structure* structure = globalObject->JSExpectStructure(); | |
JSExpect* instance = JSExpect::create(vm, globalObject, structure, ptr); | |
RETURN_IF_EXCEPTION(scope, {}); | |
RELEASE_AND_RETURN(scope, JSValue::encode(instance)); | |
} | |
JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES JSExpectConstructor::construct(JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame) | |
{ | |
Zig::GlobalObject *globalObject = reinterpret_cast<Zig::GlobalObject*>(lexicalGlobalObject); | |
JSC::VM &vm = globalObject->vm(); | |
auto scope = DECLARE_THROW_SCOPE(vm); | |
JSObject* newTarget = asObject(callFrame->newTarget()); | |
auto* constructor = globalObject->JSExpectConstructor(); | |
Structure* structure = globalObject->JSExpectStructure(); | |
if (UNLIKELY(constructor != newTarget)) { | |
auto* functionGlobalObject = reinterpret_cast<Zig::GlobalObject*>( | |
// ShadowRealm functions belong to a different global object. | |
getFunctionRealm(globalObject, newTarget) | |
); | |
RETURN_IF_EXCEPTION(scope, {}); | |
structure = InternalFunction::createSubclassStructure( | |
globalObject, | |
newTarget, | |
functionGlobalObject->JSExpectStructure() | |
); | |
} | |
void* ptr = ExpectClass__construct(globalObject, callFrame); | |
if (UNLIKELY(!ptr || scope.exception())) { | |
return JSValue::encode(JSC::jsUndefined()); | |
} | |
JSExpect* instance = JSExpect::create(vm, globalObject, structure, ptr); | |
RELEASE_AND_RETURN(scope, JSValue::encode(instance)); | |
} | |
void JSExpectConstructor::initializeProperties(VM& vm, JSC::JSGlobalObject* globalObject, JSExpectPrototype* prototype) | |
{ | |
} | |
const ClassInfo JSExpectConstructor::s_info = { "Function"_s, &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSExpectConstructor) }; | |
extern JSC_CALLCONV JSC::EncodedJSValue Expect__getConstructor(Zig::GlobalObject* globalObject) { | |
return JSValue::encode(globalObject->JSExpectConstructor()); | |
} | |
JSExpect::~JSExpect() | |
{ | |
if (LIKELY(m_ctx)) { | |
ExpectClass__finalize(m_ctx); | |
} | |
} | |
void JSExpect::destroy(JSCell* cell) | |
{ | |
static_cast<JSExpect*>(cell)->JSExpect::~JSExpect(); | |
} | |
const ClassInfo JSExpect::s_info = { "Expect"_s, &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSExpect) }; | |
void JSExpect::finishCreation(VM& vm) | |
{ | |
Base::finishCreation(vm); | |
ASSERT(inherits(info())); | |
} | |
JSExpect* JSExpect::create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure, void* ctx) { | |
JSExpect* ptr = new (NotNull, JSC::allocateCell<JSExpect>(vm)) JSExpect(vm, structure, ctx); | |
ptr->finishCreation(vm); | |
return ptr; | |
} | |
extern JSC_CALLCONV void* JSC_HOST_CALL_ATTRIBUTES Expect__fromJS(JSC::EncodedJSValue value) { | |
JSC::JSValue decodedValue = JSC::JSValue::decode(value); | |
if (decodedValue.isEmpty() || !decodedValue.isCell()) | |
return nullptr; | |
JSC::JSCell* cell = decodedValue.asCell(); | |
JSExpect* object = JSC::jsDynamicCast<JSExpect*>(cell); | |
if (!object) | |
return nullptr; | |
return object->wrapped(); | |
} | |
extern JSC_CALLCONV void* JSC_HOST_CALL_ATTRIBUTES Expect__fromJSDirect(JSC::EncodedJSValue value) { | |
JSC::JSValue decodedValue = JSC::JSValue::decode(value); | |
ASSERT(decodedValue.isCell()); | |
JSC::JSCell* cell = decodedValue.asCell(); | |
JSExpect* object = JSC::jsDynamicCast<JSExpect*>(cell); | |
if (!object) | |
return nullptr; | |
Zig::GlobalObject* globalObject = jsDynamicCast<Zig::GlobalObject*>(object->globalObject()); | |
if (UNLIKELY(globalObject == nullptr || cell->structureID() != globalObject->JSExpectStructure()->id())) { | |
return nullptr; | |
} | |
return object->wrapped(); | |
} | |
extern JSC_CALLCONV bool JSC_HOST_CALL_ATTRIBUTES Expect__dangerouslySetPtr(JSC::EncodedJSValue value, void* ptr) { | |
JSExpect* object = JSC::jsDynamicCast<JSExpect*>(JSValue::decode(value)); | |
if (!object) | |
return false; | |
object->m_ctx = ptr; | |
return true; | |
} | |
extern "C" const size_t Expect__ptrOffset = JSExpect::offsetOfWrapped(); | |
void JSExpect::analyzeHeap(JSCell* cell, HeapAnalyzer& analyzer) | |
{ | |
auto* thisObject = jsCast<JSExpect*>(cell); | |
if (void* wrapped = thisObject->wrapped()) { | |
// if (thisObject->scriptExecutionContext()) | |
// analyzer.setLabelForCell(cell, makeString("url ", thisObject->scriptExecutionContext()->url().string())); | |
} | |
Base::analyzeHeap(cell, analyzer); | |
} | |
JSObject* JSExpect::createConstructor(VM& vm, JSGlobalObject* globalObject, JSValue prototype) | |
{ | |
return WebCore::JSExpectConstructor::create(vm, globalObject, WebCore::JSExpectConstructor::createStructure(vm, globalObject, globalObject->functionPrototype()), jsCast<WebCore::JSExpectPrototype*>(prototype)); | |
} | |
JSObject* JSExpect::getConstructor(Zig::GlobalObject* globalObject) | |
{ | |
return globalObject->JSExpectConstructor(); | |
} | |
JSObject* JSExpect::createPrototype(VM& vm, JSDOMGlobalObject* globalObject) | |
{ | |
auto *structure = JSExpectPrototype::createStructure(vm, globalObject, globalObject->objectPrototype()); | |
structure->setMayBePrototype(true); | |
return JSExpectPrototype::create(vm, globalObject, structure); | |
} | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES Expect__create(Zig::GlobalObject* globalObject, void* ptr) { | |
auto &vm = globalObject->vm(); | |
JSC::Structure* structure = globalObject->JSExpectStructure(); | |
JSExpect* instance = JSExpect::create(vm, globalObject, structure, ptr); | |
return JSValue::encode(instance); | |
} | |
template<typename Visitor> | |
void JSExpect::visitChildrenImpl(JSCell* cell, Visitor& visitor) | |
{ | |
JSExpect* thisObject = jsCast<JSExpect*>(cell); | |
ASSERT_GC_OBJECT_INHERITS(thisObject, info()); | |
Base::visitChildren(thisObject, visitor); | |
thisObject->visitAdditionalChildren<Visitor>(visitor); | |
} | |
DEFINE_VISIT_CHILDREN(JSExpect); | |
template<typename Visitor> | |
void JSExpect::visitAdditionalChildren(Visitor& visitor) | |
{ | |
JSExpect* thisObject = this; | |
ASSERT_GC_OBJECT_INHERITS(thisObject, info()); | |
visitor.append(thisObject->m_capturedValue); | |
visitor.append(thisObject->m_resultValue); | |
} | |
DEFINE_VISIT_ADDITIONAL_CHILDREN(JSExpect); | |
template<typename Visitor> | |
void JSExpect::visitOutputConstraintsImpl(JSCell *cell, Visitor& visitor) | |
{ | |
JSExpect* thisObject = jsCast<JSExpect*>(cell); | |
ASSERT_GC_OBJECT_INHERITS(thisObject, info()); | |
thisObject->visitAdditionalChildren<Visitor>(visitor); | |
} | |
DEFINE_VISIT_OUTPUT_CONSTRAINTS(JSExpect); | |
class JSExpectAnyPrototype final : public JSC::JSNonFinalObject { | |
public: | |
using Base = JSC::JSNonFinalObject; | |
static JSExpectAnyPrototype* create(JSC::VM& vm, JSGlobalObject* globalObject, JSC::Structure* structure) | |
{ | |
JSExpectAnyPrototype* ptr = new (NotNull, JSC::allocateCell<JSExpectAnyPrototype>(vm)) JSExpectAnyPrototype(vm, globalObject, structure); | |
ptr->finishCreation(vm, globalObject); | |
return ptr; | |
} | |
DECLARE_INFO; | |
template<typename CellType, JSC::SubspaceAccess> | |
static JSC::GCClient::IsoSubspace* subspaceFor(JSC::VM& vm) | |
{ | |
STATIC_ASSERT_ISO_SUBSPACE_SHARABLE(JSExpectAnyPrototype, Base); | |
return &vm.plainObjectSpace(); | |
} | |
static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype) | |
{ | |
return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info()); | |
} | |
private: | |
JSExpectAnyPrototype(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure) | |
: Base(vm, structure) | |
{ | |
} | |
void finishCreation(JSC::VM&, JSC::JSGlobalObject*); | |
}; | |
STATIC_ASSERT_ISO_SUBSPACE_SHARABLE(JSExpectAnyPrototype, JSExpectAnyPrototype::Base); | |
const ClassInfo JSExpectAnyPrototype::s_info = { "ExpectAny"_s, &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSExpectAnyPrototype) }; | |
extern JSC_CALLCONV void ExpectAnyPrototype__constructorValueSetCachedValue(JSC::EncodedJSValue thisValue, JSC::JSGlobalObject *globalObject, JSC::EncodedJSValue value) | |
{ | |
auto& vm = globalObject->vm(); | |
auto* thisObject = jsCast<JSExpectAny*>(JSValue::decode(thisValue)); | |
thisObject->m_constructorValue.set(vm, thisObject, JSValue::decode(value)); | |
} | |
extern JSC_CALLCONV JSC::EncodedJSValue ExpectAnyPrototype__constructorValueGetCachedValue(JSC::EncodedJSValue thisValue) | |
{ | |
auto* thisObject = jsCast<JSExpectAny*>(JSValue::decode(thisValue)); | |
return JSValue::encode(thisObject->m_constructorValue.get()); | |
} | |
void JSExpectAnyPrototype::finishCreation(JSC::VM& vm, JSC::JSGlobalObject* globalObject) | |
{ | |
Base::finishCreation(vm); | |
JSC_TO_STRING_TAG_WITHOUT_TRANSITION(); | |
} | |
JSExpectAny::~JSExpectAny() | |
{ | |
if (LIKELY(m_ctx)) { | |
ExpectAnyClass__finalize(m_ctx); | |
} | |
} | |
void JSExpectAny::destroy(JSCell* cell) | |
{ | |
static_cast<JSExpectAny*>(cell)->JSExpectAny::~JSExpectAny(); | |
} | |
const ClassInfo JSExpectAny::s_info = { "ExpectAny"_s, &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSExpectAny) }; | |
void JSExpectAny::finishCreation(VM& vm) | |
{ | |
Base::finishCreation(vm); | |
ASSERT(inherits(info())); | |
} | |
JSExpectAny* JSExpectAny::create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure, void* ctx) { | |
JSExpectAny* ptr = new (NotNull, JSC::allocateCell<JSExpectAny>(vm)) JSExpectAny(vm, structure, ctx); | |
ptr->finishCreation(vm); | |
return ptr; | |
} | |
extern JSC_CALLCONV void* JSC_HOST_CALL_ATTRIBUTES ExpectAny__fromJS(JSC::EncodedJSValue value) { | |
JSC::JSValue decodedValue = JSC::JSValue::decode(value); | |
if (decodedValue.isEmpty() || !decodedValue.isCell()) | |
return nullptr; | |
JSC::JSCell* cell = decodedValue.asCell(); | |
JSExpectAny* object = JSC::jsDynamicCast<JSExpectAny*>(cell); | |
if (!object) | |
return nullptr; | |
return object->wrapped(); | |
} | |
extern JSC_CALLCONV void* JSC_HOST_CALL_ATTRIBUTES ExpectAny__fromJSDirect(JSC::EncodedJSValue value) { | |
JSC::JSValue decodedValue = JSC::JSValue::decode(value); | |
ASSERT(decodedValue.isCell()); | |
JSC::JSCell* cell = decodedValue.asCell(); | |
JSExpectAny* object = JSC::jsDynamicCast<JSExpectAny*>(cell); | |
if (!object) | |
return nullptr; | |
Zig::GlobalObject* globalObject = jsDynamicCast<Zig::GlobalObject*>(object->globalObject()); | |
if (UNLIKELY(globalObject == nullptr || cell->structureID() != globalObject->JSExpectAnyStructure()->id())) { | |
return nullptr; | |
} | |
return object->wrapped(); | |
} | |
extern JSC_CALLCONV bool JSC_HOST_CALL_ATTRIBUTES ExpectAny__dangerouslySetPtr(JSC::EncodedJSValue value, void* ptr) { | |
JSExpectAny* object = JSC::jsDynamicCast<JSExpectAny*>(JSValue::decode(value)); | |
if (!object) | |
return false; | |
object->m_ctx = ptr; | |
return true; | |
} | |
extern "C" const size_t ExpectAny__ptrOffset = JSExpectAny::offsetOfWrapped(); | |
void JSExpectAny::analyzeHeap(JSCell* cell, HeapAnalyzer& analyzer) | |
{ | |
auto* thisObject = jsCast<JSExpectAny*>(cell); | |
if (void* wrapped = thisObject->wrapped()) { | |
// if (thisObject->scriptExecutionContext()) | |
// analyzer.setLabelForCell(cell, makeString("url ", thisObject->scriptExecutionContext()->url().string())); | |
} | |
Base::analyzeHeap(cell, analyzer); | |
} | |
JSObject* JSExpectAny::createPrototype(VM& vm, JSDOMGlobalObject* globalObject) | |
{ | |
auto *structure = JSExpectAnyPrototype::createStructure(vm, globalObject, globalObject->objectPrototype()); | |
structure->setMayBePrototype(true); | |
return JSExpectAnyPrototype::create(vm, globalObject, structure); | |
} | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ExpectAny__create(Zig::GlobalObject* globalObject, void* ptr) { | |
auto &vm = globalObject->vm(); | |
JSC::Structure* structure = globalObject->JSExpectAnyStructure(); | |
JSExpectAny* instance = JSExpectAny::create(vm, globalObject, structure, ptr); | |
return JSValue::encode(instance); | |
} | |
template<typename Visitor> | |
void JSExpectAny::visitChildrenImpl(JSCell* cell, Visitor& visitor) | |
{ | |
JSExpectAny* thisObject = jsCast<JSExpectAny*>(cell); | |
ASSERT_GC_OBJECT_INHERITS(thisObject, info()); | |
Base::visitChildren(thisObject, visitor); | |
thisObject->visitAdditionalChildren<Visitor>(visitor); | |
} | |
DEFINE_VISIT_CHILDREN(JSExpectAny); | |
template<typename Visitor> | |
void JSExpectAny::visitAdditionalChildren(Visitor& visitor) | |
{ | |
JSExpectAny* thisObject = this; | |
ASSERT_GC_OBJECT_INHERITS(thisObject, info()); | |
visitor.append(thisObject->m_constructorValue); | |
} | |
DEFINE_VISIT_ADDITIONAL_CHILDREN(JSExpectAny); | |
template<typename Visitor> | |
void JSExpectAny::visitOutputConstraintsImpl(JSCell *cell, Visitor& visitor) | |
{ | |
JSExpectAny* thisObject = jsCast<JSExpectAny*>(cell); | |
ASSERT_GC_OBJECT_INHERITS(thisObject, info()); | |
thisObject->visitAdditionalChildren<Visitor>(visitor); | |
} | |
DEFINE_VISIT_OUTPUT_CONSTRAINTS(JSExpectAny); | |
class JSExpectAnythingPrototype final : public JSC::JSNonFinalObject { | |
public: | |
using Base = JSC::JSNonFinalObject; | |
static JSExpectAnythingPrototype* create(JSC::VM& vm, JSGlobalObject* globalObject, JSC::Structure* structure) | |
{ | |
JSExpectAnythingPrototype* ptr = new (NotNull, JSC::allocateCell<JSExpectAnythingPrototype>(vm)) JSExpectAnythingPrototype(vm, globalObject, structure); | |
ptr->finishCreation(vm, globalObject); | |
return ptr; | |
} | |
DECLARE_INFO; | |
template<typename CellType, JSC::SubspaceAccess> | |
static JSC::GCClient::IsoSubspace* subspaceFor(JSC::VM& vm) | |
{ | |
STATIC_ASSERT_ISO_SUBSPACE_SHARABLE(JSExpectAnythingPrototype, Base); | |
return &vm.plainObjectSpace(); | |
} | |
static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype) | |
{ | |
return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info()); | |
} | |
private: | |
JSExpectAnythingPrototype(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure) | |
: Base(vm, structure) | |
{ | |
} | |
void finishCreation(JSC::VM&, JSC::JSGlobalObject*); | |
}; | |
STATIC_ASSERT_ISO_SUBSPACE_SHARABLE(JSExpectAnythingPrototype, JSExpectAnythingPrototype::Base); | |
const ClassInfo JSExpectAnythingPrototype::s_info = { "ExpectAnything"_s, &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSExpectAnythingPrototype) }; | |
void JSExpectAnythingPrototype::finishCreation(JSC::VM& vm, JSC::JSGlobalObject* globalObject) | |
{ | |
Base::finishCreation(vm); | |
JSC_TO_STRING_TAG_WITHOUT_TRANSITION(); | |
} | |
JSExpectAnything::~JSExpectAnything() | |
{ | |
if (LIKELY(m_ctx)) { | |
ExpectAnythingClass__finalize(m_ctx); | |
} | |
} | |
void JSExpectAnything::destroy(JSCell* cell) | |
{ | |
static_cast<JSExpectAnything*>(cell)->JSExpectAnything::~JSExpectAnything(); | |
} | |
const ClassInfo JSExpectAnything::s_info = { "ExpectAnything"_s, &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSExpectAnything) }; | |
void JSExpectAnything::finishCreation(VM& vm) | |
{ | |
Base::finishCreation(vm); | |
ASSERT(inherits(info())); | |
} | |
JSExpectAnything* JSExpectAnything::create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure, void* ctx) { | |
JSExpectAnything* ptr = new (NotNull, JSC::allocateCell<JSExpectAnything>(vm)) JSExpectAnything(vm, structure, ctx); | |
ptr->finishCreation(vm); | |
return ptr; | |
} | |
extern JSC_CALLCONV void* JSC_HOST_CALL_ATTRIBUTES ExpectAnything__fromJS(JSC::EncodedJSValue value) { | |
JSC::JSValue decodedValue = JSC::JSValue::decode(value); | |
if (decodedValue.isEmpty() || !decodedValue.isCell()) | |
return nullptr; | |
JSC::JSCell* cell = decodedValue.asCell(); | |
JSExpectAnything* object = JSC::jsDynamicCast<JSExpectAnything*>(cell); | |
if (!object) | |
return nullptr; | |
return object->wrapped(); | |
} | |
extern JSC_CALLCONV void* JSC_HOST_CALL_ATTRIBUTES ExpectAnything__fromJSDirect(JSC::EncodedJSValue value) { | |
JSC::JSValue decodedValue = JSC::JSValue::decode(value); | |
ASSERT(decodedValue.isCell()); | |
JSC::JSCell* cell = decodedValue.asCell(); | |
JSExpectAnything* object = JSC::jsDynamicCast<JSExpectAnything*>(cell); | |
if (!object) | |
return nullptr; | |
Zig::GlobalObject* globalObject = jsDynamicCast<Zig::GlobalObject*>(object->globalObject()); | |
if (UNLIKELY(globalObject == nullptr || cell->structureID() != globalObject->JSExpectAnythingStructure()->id())) { | |
return nullptr; | |
} | |
return object->wrapped(); | |
} | |
extern JSC_CALLCONV bool JSC_HOST_CALL_ATTRIBUTES ExpectAnything__dangerouslySetPtr(JSC::EncodedJSValue value, void* ptr) { | |
JSExpectAnything* object = JSC::jsDynamicCast<JSExpectAnything*>(JSValue::decode(value)); | |
if (!object) | |
return false; | |
object->m_ctx = ptr; | |
return true; | |
} | |
extern "C" const size_t ExpectAnything__ptrOffset = JSExpectAnything::offsetOfWrapped(); | |
void JSExpectAnything::analyzeHeap(JSCell* cell, HeapAnalyzer& analyzer) | |
{ | |
auto* thisObject = jsCast<JSExpectAnything*>(cell); | |
if (void* wrapped = thisObject->wrapped()) { | |
// if (thisObject->scriptExecutionContext()) | |
// analyzer.setLabelForCell(cell, makeString("url ", thisObject->scriptExecutionContext()->url().string())); | |
} | |
Base::analyzeHeap(cell, analyzer); | |
} | |
JSObject* JSExpectAnything::createPrototype(VM& vm, JSDOMGlobalObject* globalObject) | |
{ | |
auto *structure = JSExpectAnythingPrototype::createStructure(vm, globalObject, globalObject->objectPrototype()); | |
structure->setMayBePrototype(true); | |
return JSExpectAnythingPrototype::create(vm, globalObject, structure); | |
} | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ExpectAnything__create(Zig::GlobalObject* globalObject, void* ptr) { | |
auto &vm = globalObject->vm(); | |
JSC::Structure* structure = globalObject->JSExpectAnythingStructure(); | |
JSExpectAnything* instance = JSExpectAnything::create(vm, globalObject, structure, ptr); | |
return JSValue::encode(instance); | |
} | |
class JSExpectArrayContainingPrototype final : public JSC::JSNonFinalObject { | |
public: | |
using Base = JSC::JSNonFinalObject; | |
static JSExpectArrayContainingPrototype* create(JSC::VM& vm, JSGlobalObject* globalObject, JSC::Structure* structure) | |
{ | |
JSExpectArrayContainingPrototype* ptr = new (NotNull, JSC::allocateCell<JSExpectArrayContainingPrototype>(vm)) JSExpectArrayContainingPrototype(vm, globalObject, structure); | |
ptr->finishCreation(vm, globalObject); | |
return ptr; | |
} | |
DECLARE_INFO; | |
template<typename CellType, JSC::SubspaceAccess> | |
static JSC::GCClient::IsoSubspace* subspaceFor(JSC::VM& vm) | |
{ | |
STATIC_ASSERT_ISO_SUBSPACE_SHARABLE(JSExpectArrayContainingPrototype, Base); | |
return &vm.plainObjectSpace(); | |
} | |
static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype) | |
{ | |
return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info()); | |
} | |
private: | |
JSExpectArrayContainingPrototype(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure) | |
: Base(vm, structure) | |
{ | |
} | |
void finishCreation(JSC::VM&, JSC::JSGlobalObject*); | |
}; | |
STATIC_ASSERT_ISO_SUBSPACE_SHARABLE(JSExpectArrayContainingPrototype, JSExpectArrayContainingPrototype::Base); | |
const ClassInfo JSExpectArrayContainingPrototype::s_info = { "ExpectArrayContaining"_s, &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSExpectArrayContainingPrototype) }; | |
extern JSC_CALLCONV void ExpectArrayContainingPrototype__arrayValueSetCachedValue(JSC::EncodedJSValue thisValue, JSC::JSGlobalObject *globalObject, JSC::EncodedJSValue value) | |
{ | |
auto& vm = globalObject->vm(); | |
auto* thisObject = jsCast<JSExpectArrayContaining*>(JSValue::decode(thisValue)); | |
thisObject->m_arrayValue.set(vm, thisObject, JSValue::decode(value)); | |
} | |
extern JSC_CALLCONV JSC::EncodedJSValue ExpectArrayContainingPrototype__arrayValueGetCachedValue(JSC::EncodedJSValue thisValue) | |
{ | |
auto* thisObject = jsCast<JSExpectArrayContaining*>(JSValue::decode(thisValue)); | |
return JSValue::encode(thisObject->m_arrayValue.get()); | |
} | |
void JSExpectArrayContainingPrototype::finishCreation(JSC::VM& vm, JSC::JSGlobalObject* globalObject) | |
{ | |
Base::finishCreation(vm); | |
JSC_TO_STRING_TAG_WITHOUT_TRANSITION(); | |
} | |
JSExpectArrayContaining::~JSExpectArrayContaining() | |
{ | |
if (LIKELY(m_ctx)) { | |
ExpectArrayContainingClass__finalize(m_ctx); | |
} | |
} | |
void JSExpectArrayContaining::destroy(JSCell* cell) | |
{ | |
static_cast<JSExpectArrayContaining*>(cell)->JSExpectArrayContaining::~JSExpectArrayContaining(); | |
} | |
const ClassInfo JSExpectArrayContaining::s_info = { "ExpectArrayContaining"_s, &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSExpectArrayContaining) }; | |
void JSExpectArrayContaining::finishCreation(VM& vm) | |
{ | |
Base::finishCreation(vm); | |
ASSERT(inherits(info())); | |
} | |
JSExpectArrayContaining* JSExpectArrayContaining::create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure, void* ctx) { | |
JSExpectArrayContaining* ptr = new (NotNull, JSC::allocateCell<JSExpectArrayContaining>(vm)) JSExpectArrayContaining(vm, structure, ctx); | |
ptr->finishCreation(vm); | |
return ptr; | |
} | |
extern JSC_CALLCONV void* JSC_HOST_CALL_ATTRIBUTES ExpectArrayContaining__fromJS(JSC::EncodedJSValue value) { | |
JSC::JSValue decodedValue = JSC::JSValue::decode(value); | |
if (decodedValue.isEmpty() || !decodedValue.isCell()) | |
return nullptr; | |
JSC::JSCell* cell = decodedValue.asCell(); | |
JSExpectArrayContaining* object = JSC::jsDynamicCast<JSExpectArrayContaining*>(cell); | |
if (!object) | |
return nullptr; | |
return object->wrapped(); | |
} | |
extern JSC_CALLCONV void* JSC_HOST_CALL_ATTRIBUTES ExpectArrayContaining__fromJSDirect(JSC::EncodedJSValue value) { | |
JSC::JSValue decodedValue = JSC::JSValue::decode(value); | |
ASSERT(decodedValue.isCell()); | |
JSC::JSCell* cell = decodedValue.asCell(); | |
JSExpectArrayContaining* object = JSC::jsDynamicCast<JSExpectArrayContaining*>(cell); | |
if (!object) | |
return nullptr; | |
Zig::GlobalObject* globalObject = jsDynamicCast<Zig::GlobalObject*>(object->globalObject()); | |
if (UNLIKELY(globalObject == nullptr || cell->structureID() != globalObject->JSExpectArrayContainingStructure()->id())) { | |
return nullptr; | |
} | |
return object->wrapped(); | |
} | |
extern JSC_CALLCONV bool JSC_HOST_CALL_ATTRIBUTES ExpectArrayContaining__dangerouslySetPtr(JSC::EncodedJSValue value, void* ptr) { | |
JSExpectArrayContaining* object = JSC::jsDynamicCast<JSExpectArrayContaining*>(JSValue::decode(value)); | |
if (!object) | |
return false; | |
object->m_ctx = ptr; | |
return true; | |
} | |
extern "C" const size_t ExpectArrayContaining__ptrOffset = JSExpectArrayContaining::offsetOfWrapped(); | |
void JSExpectArrayContaining::analyzeHeap(JSCell* cell, HeapAnalyzer& analyzer) | |
{ | |
auto* thisObject = jsCast<JSExpectArrayContaining*>(cell); | |
if (void* wrapped = thisObject->wrapped()) { | |
// if (thisObject->scriptExecutionContext()) | |
// analyzer.setLabelForCell(cell, makeString("url ", thisObject->scriptExecutionContext()->url().string())); | |
} | |
Base::analyzeHeap(cell, analyzer); | |
} | |
JSObject* JSExpectArrayContaining::createPrototype(VM& vm, JSDOMGlobalObject* globalObject) | |
{ | |
auto *structure = JSExpectArrayContainingPrototype::createStructure(vm, globalObject, globalObject->objectPrototype()); | |
structure->setMayBePrototype(true); | |
return JSExpectArrayContainingPrototype::create(vm, globalObject, structure); | |
} | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ExpectArrayContaining__create(Zig::GlobalObject* globalObject, void* ptr) { | |
auto &vm = globalObject->vm(); | |
JSC::Structure* structure = globalObject->JSExpectArrayContainingStructure(); | |
JSExpectArrayContaining* instance = JSExpectArrayContaining::create(vm, globalObject, structure, ptr); | |
return JSValue::encode(instance); | |
} | |
template<typename Visitor> | |
void JSExpectArrayContaining::visitChildrenImpl(JSCell* cell, Visitor& visitor) | |
{ | |
JSExpectArrayContaining* thisObject = jsCast<JSExpectArrayContaining*>(cell); | |
ASSERT_GC_OBJECT_INHERITS(thisObject, info()); | |
Base::visitChildren(thisObject, visitor); | |
thisObject->visitAdditionalChildren<Visitor>(visitor); | |
} | |
DEFINE_VISIT_CHILDREN(JSExpectArrayContaining); | |
template<typename Visitor> | |
void JSExpectArrayContaining::visitAdditionalChildren(Visitor& visitor) | |
{ | |
JSExpectArrayContaining* thisObject = this; | |
ASSERT_GC_OBJECT_INHERITS(thisObject, info()); | |
visitor.append(thisObject->m_arrayValue); | |
} | |
DEFINE_VISIT_ADDITIONAL_CHILDREN(JSExpectArrayContaining); | |
template<typename Visitor> | |
void JSExpectArrayContaining::visitOutputConstraintsImpl(JSCell *cell, Visitor& visitor) | |
{ | |
JSExpectArrayContaining* thisObject = jsCast<JSExpectArrayContaining*>(cell); | |
ASSERT_GC_OBJECT_INHERITS(thisObject, info()); | |
thisObject->visitAdditionalChildren<Visitor>(visitor); | |
} | |
DEFINE_VISIT_OUTPUT_CONSTRAINTS(JSExpectArrayContaining); | |
class JSExpectCloseToPrototype final : public JSC::JSNonFinalObject { | |
public: | |
using Base = JSC::JSNonFinalObject; | |
static JSExpectCloseToPrototype* create(JSC::VM& vm, JSGlobalObject* globalObject, JSC::Structure* structure) | |
{ | |
JSExpectCloseToPrototype* ptr = new (NotNull, JSC::allocateCell<JSExpectCloseToPrototype>(vm)) JSExpectCloseToPrototype(vm, globalObject, structure); | |
ptr->finishCreation(vm, globalObject); | |
return ptr; | |
} | |
DECLARE_INFO; | |
template<typename CellType, JSC::SubspaceAccess> | |
static JSC::GCClient::IsoSubspace* subspaceFor(JSC::VM& vm) | |
{ | |
STATIC_ASSERT_ISO_SUBSPACE_SHARABLE(JSExpectCloseToPrototype, Base); | |
return &vm.plainObjectSpace(); | |
} | |
static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype) | |
{ | |
return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info()); | |
} | |
private: | |
JSExpectCloseToPrototype(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure) | |
: Base(vm, structure) | |
{ | |
} | |
void finishCreation(JSC::VM&, JSC::JSGlobalObject*); | |
}; | |
STATIC_ASSERT_ISO_SUBSPACE_SHARABLE(JSExpectCloseToPrototype, JSExpectCloseToPrototype::Base); | |
const ClassInfo JSExpectCloseToPrototype::s_info = { "ExpectCloseTo"_s, &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSExpectCloseToPrototype) }; | |
extern JSC_CALLCONV void ExpectCloseToPrototype__numberValueSetCachedValue(JSC::EncodedJSValue thisValue, JSC::JSGlobalObject *globalObject, JSC::EncodedJSValue value) | |
{ | |
auto& vm = globalObject->vm(); | |
auto* thisObject = jsCast<JSExpectCloseTo*>(JSValue::decode(thisValue)); | |
thisObject->m_numberValue.set(vm, thisObject, JSValue::decode(value)); | |
} | |
extern JSC_CALLCONV JSC::EncodedJSValue ExpectCloseToPrototype__numberValueGetCachedValue(JSC::EncodedJSValue thisValue) | |
{ | |
auto* thisObject = jsCast<JSExpectCloseTo*>(JSValue::decode(thisValue)); | |
return JSValue::encode(thisObject->m_numberValue.get()); | |
} | |
extern JSC_CALLCONV void ExpectCloseToPrototype__digitsValueSetCachedValue(JSC::EncodedJSValue thisValue, JSC::JSGlobalObject *globalObject, JSC::EncodedJSValue value) | |
{ | |
auto& vm = globalObject->vm(); | |
auto* thisObject = jsCast<JSExpectCloseTo*>(JSValue::decode(thisValue)); | |
thisObject->m_digitsValue.set(vm, thisObject, JSValue::decode(value)); | |
} | |
extern JSC_CALLCONV JSC::EncodedJSValue ExpectCloseToPrototype__digitsValueGetCachedValue(JSC::EncodedJSValue thisValue) | |
{ | |
auto* thisObject = jsCast<JSExpectCloseTo*>(JSValue::decode(thisValue)); | |
return JSValue::encode(thisObject->m_digitsValue.get()); | |
} | |
void JSExpectCloseToPrototype::finishCreation(JSC::VM& vm, JSC::JSGlobalObject* globalObject) | |
{ | |
Base::finishCreation(vm); | |
JSC_TO_STRING_TAG_WITHOUT_TRANSITION(); | |
} | |
JSExpectCloseTo::~JSExpectCloseTo() | |
{ | |
if (LIKELY(m_ctx)) { | |
ExpectCloseToClass__finalize(m_ctx); | |
} | |
} | |
void JSExpectCloseTo::destroy(JSCell* cell) | |
{ | |
static_cast<JSExpectCloseTo*>(cell)->JSExpectCloseTo::~JSExpectCloseTo(); | |
} | |
const ClassInfo JSExpectCloseTo::s_info = { "ExpectCloseTo"_s, &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSExpectCloseTo) }; | |
void JSExpectCloseTo::finishCreation(VM& vm) | |
{ | |
Base::finishCreation(vm); | |
ASSERT(inherits(info())); | |
} | |
JSExpectCloseTo* JSExpectCloseTo::create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure, void* ctx) { | |
JSExpectCloseTo* ptr = new (NotNull, JSC::allocateCell<JSExpectCloseTo>(vm)) JSExpectCloseTo(vm, structure, ctx); | |
ptr->finishCreation(vm); | |
return ptr; | |
} | |
extern JSC_CALLCONV void* JSC_HOST_CALL_ATTRIBUTES ExpectCloseTo__fromJS(JSC::EncodedJSValue value) { | |
JSC::JSValue decodedValue = JSC::JSValue::decode(value); | |
if (decodedValue.isEmpty() || !decodedValue.isCell()) | |
return nullptr; | |
JSC::JSCell* cell = decodedValue.asCell(); | |
JSExpectCloseTo* object = JSC::jsDynamicCast<JSExpectCloseTo*>(cell); | |
if (!object) | |
return nullptr; | |
return object->wrapped(); | |
} | |
extern JSC_CALLCONV void* JSC_HOST_CALL_ATTRIBUTES ExpectCloseTo__fromJSDirect(JSC::EncodedJSValue value) { | |
JSC::JSValue decodedValue = JSC::JSValue::decode(value); | |
ASSERT(decodedValue.isCell()); | |
JSC::JSCell* cell = decodedValue.asCell(); | |
JSExpectCloseTo* object = JSC::jsDynamicCast<JSExpectCloseTo*>(cell); | |
if (!object) | |
return nullptr; | |
Zig::GlobalObject* globalObject = jsDynamicCast<Zig::GlobalObject*>(object->globalObject()); | |
if (UNLIKELY(globalObject == nullptr || cell->structureID() != globalObject->JSExpectCloseToStructure()->id())) { | |
return nullptr; | |
} | |
return object->wrapped(); | |
} | |
extern JSC_CALLCONV bool JSC_HOST_CALL_ATTRIBUTES ExpectCloseTo__dangerouslySetPtr(JSC::EncodedJSValue value, void* ptr) { | |
JSExpectCloseTo* object = JSC::jsDynamicCast<JSExpectCloseTo*>(JSValue::decode(value)); | |
if (!object) | |
return false; | |
object->m_ctx = ptr; | |
return true; | |
} | |
extern "C" const size_t ExpectCloseTo__ptrOffset = JSExpectCloseTo::offsetOfWrapped(); | |
void JSExpectCloseTo::analyzeHeap(JSCell* cell, HeapAnalyzer& analyzer) | |
{ | |
auto* thisObject = jsCast<JSExpectCloseTo*>(cell); | |
if (void* wrapped = thisObject->wrapped()) { | |
// if (thisObject->scriptExecutionContext()) | |
// analyzer.setLabelForCell(cell, makeString("url ", thisObject->scriptExecutionContext()->url().string())); | |
} | |
Base::analyzeHeap(cell, analyzer); | |
} | |
JSObject* JSExpectCloseTo::createPrototype(VM& vm, JSDOMGlobalObject* globalObject) | |
{ | |
auto *structure = JSExpectCloseToPrototype::createStructure(vm, globalObject, globalObject->objectPrototype()); | |
structure->setMayBePrototype(true); | |
return JSExpectCloseToPrototype::create(vm, globalObject, structure); | |
} | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ExpectCloseTo__create(Zig::GlobalObject* globalObject, void* ptr) { | |
auto &vm = globalObject->vm(); | |
JSC::Structure* structure = globalObject->JSExpectCloseToStructure(); | |
JSExpectCloseTo* instance = JSExpectCloseTo::create(vm, globalObject, structure, ptr); | |
return JSValue::encode(instance); | |
} | |
template<typename Visitor> | |
void JSExpectCloseTo::visitChildrenImpl(JSCell* cell, Visitor& visitor) | |
{ | |
JSExpectCloseTo* thisObject = jsCast<JSExpectCloseTo*>(cell); | |
ASSERT_GC_OBJECT_INHERITS(thisObject, info()); | |
Base::visitChildren(thisObject, visitor); | |
thisObject->visitAdditionalChildren<Visitor>(visitor); | |
} | |
DEFINE_VISIT_CHILDREN(JSExpectCloseTo); | |
template<typename Visitor> | |
void JSExpectCloseTo::visitAdditionalChildren(Visitor& visitor) | |
{ | |
JSExpectCloseTo* thisObject = this; | |
ASSERT_GC_OBJECT_INHERITS(thisObject, info()); | |
visitor.append(thisObject->m_numberValue); | |
visitor.append(thisObject->m_digitsValue); | |
} | |
DEFINE_VISIT_ADDITIONAL_CHILDREN(JSExpectCloseTo); | |
template<typename Visitor> | |
void JSExpectCloseTo::visitOutputConstraintsImpl(JSCell *cell, Visitor& visitor) | |
{ | |
JSExpectCloseTo* thisObject = jsCast<JSExpectCloseTo*>(cell); | |
ASSERT_GC_OBJECT_INHERITS(thisObject, info()); | |
thisObject->visitAdditionalChildren<Visitor>(visitor); | |
} | |
DEFINE_VISIT_OUTPUT_CONSTRAINTS(JSExpectCloseTo); | |
class JSExpectCustomAsymmetricMatcherPrototype final : public JSC::JSNonFinalObject { | |
public: | |
using Base = JSC::JSNonFinalObject; | |
static JSExpectCustomAsymmetricMatcherPrototype* create(JSC::VM& vm, JSGlobalObject* globalObject, JSC::Structure* structure) | |
{ | |
JSExpectCustomAsymmetricMatcherPrototype* ptr = new (NotNull, JSC::allocateCell<JSExpectCustomAsymmetricMatcherPrototype>(vm)) JSExpectCustomAsymmetricMatcherPrototype(vm, globalObject, structure); | |
ptr->finishCreation(vm, globalObject); | |
return ptr; | |
} | |
DECLARE_INFO; | |
template<typename CellType, JSC::SubspaceAccess> | |
static JSC::GCClient::IsoSubspace* subspaceFor(JSC::VM& vm) | |
{ | |
STATIC_ASSERT_ISO_SUBSPACE_SHARABLE(JSExpectCustomAsymmetricMatcherPrototype, Base); | |
return &vm.plainObjectSpace(); | |
} | |
static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype) | |
{ | |
return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info()); | |
} | |
private: | |
JSExpectCustomAsymmetricMatcherPrototype(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure) | |
: Base(vm, structure) | |
{ | |
} | |
void finishCreation(JSC::VM&, JSC::JSGlobalObject*); | |
}; | |
JSC_DECLARE_HOST_FUNCTION(ExpectCustomAsymmetricMatcherPrototype__asymmetricMatchCallback); | |
STATIC_ASSERT_ISO_SUBSPACE_SHARABLE(JSExpectCustomAsymmetricMatcherPrototype, JSExpectCustomAsymmetricMatcherPrototype::Base); | |
static const HashTableValue JSExpectCustomAsymmetricMatcherPrototypeTableValues[1] = { | |
{ "asymmetricMatch"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, ExpectCustomAsymmetricMatcherPrototype__asymmetricMatchCallback, 1 } } | |
}; | |
const ClassInfo JSExpectCustomAsymmetricMatcherPrototype::s_info = { "ExpectCustomAsymmetricMatcher"_s, &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSExpectCustomAsymmetricMatcherPrototype) }; | |
JSC_DEFINE_HOST_FUNCTION(ExpectCustomAsymmetricMatcherPrototype__asymmetricMatchCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSExpectCustomAsymmetricMatcher* thisObject = jsDynamicCast<JSExpectCustomAsymmetricMatcher*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof ExpectCustomAsymmetricMatcher"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = ExpectCustomAsymmetricMatcherPrototype__asymmetricMatch(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "ExpectCustomAsymmetricMatcher.asymmetricMatch returned an empty value without an exception"); | |
return result; | |
#endif | |
return ExpectCustomAsymmetricMatcherPrototype__asymmetricMatch(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
extern JSC_CALLCONV void ExpectCustomAsymmetricMatcherPrototype__matcherFnSetCachedValue(JSC::EncodedJSValue thisValue, JSC::JSGlobalObject *globalObject, JSC::EncodedJSValue value) | |
{ | |
auto& vm = globalObject->vm(); | |
auto* thisObject = jsCast<JSExpectCustomAsymmetricMatcher*>(JSValue::decode(thisValue)); | |
thisObject->m_matcherFn.set(vm, thisObject, JSValue::decode(value)); | |
} | |
extern JSC_CALLCONV JSC::EncodedJSValue ExpectCustomAsymmetricMatcherPrototype__matcherFnGetCachedValue(JSC::EncodedJSValue thisValue) | |
{ | |
auto* thisObject = jsCast<JSExpectCustomAsymmetricMatcher*>(JSValue::decode(thisValue)); | |
return JSValue::encode(thisObject->m_matcherFn.get()); | |
} | |
extern JSC_CALLCONV void ExpectCustomAsymmetricMatcherPrototype__capturedArgsSetCachedValue(JSC::EncodedJSValue thisValue, JSC::JSGlobalObject *globalObject, JSC::EncodedJSValue value) | |
{ | |
auto& vm = globalObject->vm(); | |
auto* thisObject = jsCast<JSExpectCustomAsymmetricMatcher*>(JSValue::decode(thisValue)); | |
thisObject->m_capturedArgs.set(vm, thisObject, JSValue::decode(value)); | |
} | |
extern JSC_CALLCONV JSC::EncodedJSValue ExpectCustomAsymmetricMatcherPrototype__capturedArgsGetCachedValue(JSC::EncodedJSValue thisValue) | |
{ | |
auto* thisObject = jsCast<JSExpectCustomAsymmetricMatcher*>(JSValue::decode(thisValue)); | |
return JSValue::encode(thisObject->m_capturedArgs.get()); | |
} | |
void JSExpectCustomAsymmetricMatcherPrototype::finishCreation(JSC::VM& vm, JSC::JSGlobalObject* globalObject) | |
{ | |
Base::finishCreation(vm); | |
reifyStaticProperties(vm, JSExpectCustomAsymmetricMatcher::info(), JSExpectCustomAsymmetricMatcherPrototypeTableValues, *this); | |
JSC_TO_STRING_TAG_WITHOUT_TRANSITION(); | |
} | |
JSExpectCustomAsymmetricMatcher::~JSExpectCustomAsymmetricMatcher() | |
{ | |
if (LIKELY(m_ctx)) { | |
ExpectCustomAsymmetricMatcherClass__finalize(m_ctx); | |
} | |
} | |
void JSExpectCustomAsymmetricMatcher::destroy(JSCell* cell) | |
{ | |
static_cast<JSExpectCustomAsymmetricMatcher*>(cell)->JSExpectCustomAsymmetricMatcher::~JSExpectCustomAsymmetricMatcher(); | |
} | |
const ClassInfo JSExpectCustomAsymmetricMatcher::s_info = { "ExpectCustomAsymmetricMatcher"_s, &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSExpectCustomAsymmetricMatcher) }; | |
void JSExpectCustomAsymmetricMatcher::finishCreation(VM& vm) | |
{ | |
Base::finishCreation(vm); | |
ASSERT(inherits(info())); | |
} | |
JSExpectCustomAsymmetricMatcher* JSExpectCustomAsymmetricMatcher::create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure, void* ctx) { | |
JSExpectCustomAsymmetricMatcher* ptr = new (NotNull, JSC::allocateCell<JSExpectCustomAsymmetricMatcher>(vm)) JSExpectCustomAsymmetricMatcher(vm, structure, ctx); | |
ptr->finishCreation(vm); | |
return ptr; | |
} | |
extern JSC_CALLCONV void* JSC_HOST_CALL_ATTRIBUTES ExpectCustomAsymmetricMatcher__fromJS(JSC::EncodedJSValue value) { | |
JSC::JSValue decodedValue = JSC::JSValue::decode(value); | |
if (decodedValue.isEmpty() || !decodedValue.isCell()) | |
return nullptr; | |
JSC::JSCell* cell = decodedValue.asCell(); | |
JSExpectCustomAsymmetricMatcher* object = JSC::jsDynamicCast<JSExpectCustomAsymmetricMatcher*>(cell); | |
if (!object) | |
return nullptr; | |
return object->wrapped(); | |
} | |
extern JSC_CALLCONV void* JSC_HOST_CALL_ATTRIBUTES ExpectCustomAsymmetricMatcher__fromJSDirect(JSC::EncodedJSValue value) { | |
JSC::JSValue decodedValue = JSC::JSValue::decode(value); | |
ASSERT(decodedValue.isCell()); | |
JSC::JSCell* cell = decodedValue.asCell(); | |
JSExpectCustomAsymmetricMatcher* object = JSC::jsDynamicCast<JSExpectCustomAsymmetricMatcher*>(cell); | |
if (!object) | |
return nullptr; | |
Zig::GlobalObject* globalObject = jsDynamicCast<Zig::GlobalObject*>(object->globalObject()); | |
if (UNLIKELY(globalObject == nullptr || cell->structureID() != globalObject->JSExpectCustomAsymmetricMatcherStructure()->id())) { | |
return nullptr; | |
} | |
return object->wrapped(); | |
} | |
extern JSC_CALLCONV bool JSC_HOST_CALL_ATTRIBUTES ExpectCustomAsymmetricMatcher__dangerouslySetPtr(JSC::EncodedJSValue value, void* ptr) { | |
JSExpectCustomAsymmetricMatcher* object = JSC::jsDynamicCast<JSExpectCustomAsymmetricMatcher*>(JSValue::decode(value)); | |
if (!object) | |
return false; | |
object->m_ctx = ptr; | |
return true; | |
} | |
extern "C" const size_t ExpectCustomAsymmetricMatcher__ptrOffset = JSExpectCustomAsymmetricMatcher::offsetOfWrapped(); | |
void JSExpectCustomAsymmetricMatcher::analyzeHeap(JSCell* cell, HeapAnalyzer& analyzer) | |
{ | |
auto* thisObject = jsCast<JSExpectCustomAsymmetricMatcher*>(cell); | |
if (void* wrapped = thisObject->wrapped()) { | |
// if (thisObject->scriptExecutionContext()) | |
// analyzer.setLabelForCell(cell, makeString("url ", thisObject->scriptExecutionContext()->url().string())); | |
} | |
Base::analyzeHeap(cell, analyzer); | |
} | |
JSObject* JSExpectCustomAsymmetricMatcher::createPrototype(VM& vm, JSDOMGlobalObject* globalObject) | |
{ | |
auto *structure = JSExpectCustomAsymmetricMatcherPrototype::createStructure(vm, globalObject, globalObject->objectPrototype()); | |
structure->setMayBePrototype(true); | |
return JSExpectCustomAsymmetricMatcherPrototype::create(vm, globalObject, structure); | |
} | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ExpectCustomAsymmetricMatcher__create(Zig::GlobalObject* globalObject, void* ptr) { | |
auto &vm = globalObject->vm(); | |
JSC::Structure* structure = globalObject->JSExpectCustomAsymmetricMatcherStructure(); | |
JSExpectCustomAsymmetricMatcher* instance = JSExpectCustomAsymmetricMatcher::create(vm, globalObject, structure, ptr); | |
return JSValue::encode(instance); | |
} | |
template<typename Visitor> | |
void JSExpectCustomAsymmetricMatcher::visitChildrenImpl(JSCell* cell, Visitor& visitor) | |
{ | |
JSExpectCustomAsymmetricMatcher* thisObject = jsCast<JSExpectCustomAsymmetricMatcher*>(cell); | |
ASSERT_GC_OBJECT_INHERITS(thisObject, info()); | |
Base::visitChildren(thisObject, visitor); | |
thisObject->visitAdditionalChildren<Visitor>(visitor); | |
} | |
DEFINE_VISIT_CHILDREN(JSExpectCustomAsymmetricMatcher); | |
template<typename Visitor> | |
void JSExpectCustomAsymmetricMatcher::visitAdditionalChildren(Visitor& visitor) | |
{ | |
JSExpectCustomAsymmetricMatcher* thisObject = this; | |
ASSERT_GC_OBJECT_INHERITS(thisObject, info()); | |
visitor.append(thisObject->m_matcherFn); | |
visitor.append(thisObject->m_capturedArgs); | |
} | |
DEFINE_VISIT_ADDITIONAL_CHILDREN(JSExpectCustomAsymmetricMatcher); | |
template<typename Visitor> | |
void JSExpectCustomAsymmetricMatcher::visitOutputConstraintsImpl(JSCell *cell, Visitor& visitor) | |
{ | |
JSExpectCustomAsymmetricMatcher* thisObject = jsCast<JSExpectCustomAsymmetricMatcher*>(cell); | |
ASSERT_GC_OBJECT_INHERITS(thisObject, info()); | |
thisObject->visitAdditionalChildren<Visitor>(visitor); | |
} | |
DEFINE_VISIT_OUTPUT_CONSTRAINTS(JSExpectCustomAsymmetricMatcher); | |
class JSExpectMatcherContextPrototype final : public JSC::JSNonFinalObject { | |
public: | |
using Base = JSC::JSNonFinalObject; | |
static JSExpectMatcherContextPrototype* create(JSC::VM& vm, JSGlobalObject* globalObject, JSC::Structure* structure) | |
{ | |
JSExpectMatcherContextPrototype* ptr = new (NotNull, JSC::allocateCell<JSExpectMatcherContextPrototype>(vm)) JSExpectMatcherContextPrototype(vm, globalObject, structure); | |
ptr->finishCreation(vm, globalObject); | |
return ptr; | |
} | |
DECLARE_INFO; | |
template<typename CellType, JSC::SubspaceAccess> | |
static JSC::GCClient::IsoSubspace* subspaceFor(JSC::VM& vm) | |
{ | |
STATIC_ASSERT_ISO_SUBSPACE_SHARABLE(JSExpectMatcherContextPrototype, Base); | |
return &vm.plainObjectSpace(); | |
} | |
static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype) | |
{ | |
return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info()); | |
} | |
private: | |
JSExpectMatcherContextPrototype(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure) | |
: Base(vm, structure) | |
{ | |
} | |
void finishCreation(JSC::VM&, JSC::JSGlobalObject*); | |
}; | |
JSC_DECLARE_HOST_FUNCTION(ExpectMatcherContextPrototype__equalsCallback); | |
JSC_DECLARE_CUSTOM_GETTER(ExpectMatcherContextPrototype__expandGetterWrap); | |
JSC_DECLARE_CUSTOM_GETTER(ExpectMatcherContextPrototype__isNotGetterWrap); | |
JSC_DECLARE_CUSTOM_GETTER(ExpectMatcherContextPrototype__promiseGetterWrap); | |
JSC_DECLARE_CUSTOM_GETTER(ExpectMatcherContextPrototype__utilsGetterWrap); | |
STATIC_ASSERT_ISO_SUBSPACE_SHARABLE(JSExpectMatcherContextPrototype, JSExpectMatcherContextPrototype::Base); | |
static const HashTableValue JSExpectMatcherContextPrototypeTableValues[5] = { | |
{ "equals"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, ExpectMatcherContextPrototype__equalsCallback, 3 } } , | |
{ "expand"_s, static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::GetterSetterType, ExpectMatcherContextPrototype__expandGetterWrap, 0 } } , | |
{ "isNot"_s, static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::GetterSetterType, ExpectMatcherContextPrototype__isNotGetterWrap, 0 } } , | |
{ "promise"_s, static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::GetterSetterType, ExpectMatcherContextPrototype__promiseGetterWrap, 0 } } , | |
{ "utils"_s, static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::GetterSetterType, ExpectMatcherContextPrototype__utilsGetterWrap, 0 } } | |
}; | |
const ClassInfo JSExpectMatcherContextPrototype::s_info = { "ExpectMatcherContext"_s, &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSExpectMatcherContextPrototype) }; | |
JSC_DEFINE_HOST_FUNCTION(ExpectMatcherContextPrototype__equalsCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSExpectMatcherContext* thisObject = jsDynamicCast<JSExpectMatcherContext*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof ExpectMatcherContext"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = ExpectMatcherContextPrototype__equals(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "ExpectMatcherContext.equals returned an empty value without an exception"); | |
return result; | |
#endif | |
return ExpectMatcherContextPrototype__equals(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_CUSTOM_GETTER(ExpectMatcherContextPrototype__expandGetterWrap, (JSGlobalObject * lexicalGlobalObject, EncodedJSValue encodedThisValue, PropertyName attributeName)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
Zig::GlobalObject *globalObject = reinterpret_cast<Zig::GlobalObject*>(lexicalGlobalObject); | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
JSExpectMatcherContext* thisObject = jsCast<JSExpectMatcherContext*>(JSValue::decode(encodedThisValue)); | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
JSC::EncodedJSValue result = ExpectMatcherContextPrototype__getExpand(thisObject->wrapped(), globalObject); | |
RETURN_IF_EXCEPTION(throwScope, {}); | |
RELEASE_AND_RETURN(throwScope, result); | |
} | |
JSC_DEFINE_CUSTOM_GETTER(ExpectMatcherContextPrototype__isNotGetterWrap, (JSGlobalObject * lexicalGlobalObject, EncodedJSValue encodedThisValue, PropertyName attributeName)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
Zig::GlobalObject *globalObject = reinterpret_cast<Zig::GlobalObject*>(lexicalGlobalObject); | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
JSExpectMatcherContext* thisObject = jsCast<JSExpectMatcherContext*>(JSValue::decode(encodedThisValue)); | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
JSC::EncodedJSValue result = ExpectMatcherContextPrototype__getIsNot(thisObject->wrapped(), globalObject); | |
RETURN_IF_EXCEPTION(throwScope, {}); | |
RELEASE_AND_RETURN(throwScope, result); | |
} | |
JSC_DEFINE_CUSTOM_GETTER(ExpectMatcherContextPrototype__promiseGetterWrap, (JSGlobalObject * lexicalGlobalObject, EncodedJSValue encodedThisValue, PropertyName attributeName)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
Zig::GlobalObject *globalObject = reinterpret_cast<Zig::GlobalObject*>(lexicalGlobalObject); | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
JSExpectMatcherContext* thisObject = jsCast<JSExpectMatcherContext*>(JSValue::decode(encodedThisValue)); | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
JSC::EncodedJSValue result = ExpectMatcherContextPrototype__getPromise(thisObject->wrapped(), globalObject); | |
RETURN_IF_EXCEPTION(throwScope, {}); | |
RELEASE_AND_RETURN(throwScope, result); | |
} | |
JSC_DEFINE_CUSTOM_GETTER(ExpectMatcherContextPrototype__utilsGetterWrap, (JSGlobalObject * lexicalGlobalObject, EncodedJSValue encodedThisValue, PropertyName attributeName)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
Zig::GlobalObject *globalObject = reinterpret_cast<Zig::GlobalObject*>(lexicalGlobalObject); | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
JSExpectMatcherContext* thisObject = jsCast<JSExpectMatcherContext*>(JSValue::decode(encodedThisValue)); | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
JSC::EncodedJSValue result = ExpectMatcherContextPrototype__getUtils(thisObject->wrapped(), globalObject); | |
RETURN_IF_EXCEPTION(throwScope, {}); | |
RELEASE_AND_RETURN(throwScope, result); | |
} | |
void JSExpectMatcherContextPrototype::finishCreation(JSC::VM& vm, JSC::JSGlobalObject* globalObject) | |
{ | |
Base::finishCreation(vm); | |
reifyStaticProperties(vm, JSExpectMatcherContext::info(), JSExpectMatcherContextPrototypeTableValues, *this); | |
JSC_TO_STRING_TAG_WITHOUT_TRANSITION(); | |
} | |
JSExpectMatcherContext::~JSExpectMatcherContext() | |
{ | |
if (LIKELY(m_ctx)) { | |
ExpectMatcherContextClass__finalize(m_ctx); | |
} | |
} | |
void JSExpectMatcherContext::destroy(JSCell* cell) | |
{ | |
static_cast<JSExpectMatcherContext*>(cell)->JSExpectMatcherContext::~JSExpectMatcherContext(); | |
} | |
const ClassInfo JSExpectMatcherContext::s_info = { "ExpectMatcherContext"_s, &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSExpectMatcherContext) }; | |
void JSExpectMatcherContext::finishCreation(VM& vm) | |
{ | |
Base::finishCreation(vm); | |
ASSERT(inherits(info())); | |
} | |
JSExpectMatcherContext* JSExpectMatcherContext::create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure, void* ctx) { | |
JSExpectMatcherContext* ptr = new (NotNull, JSC::allocateCell<JSExpectMatcherContext>(vm)) JSExpectMatcherContext(vm, structure, ctx); | |
ptr->finishCreation(vm); | |
return ptr; | |
} | |
extern JSC_CALLCONV void* JSC_HOST_CALL_ATTRIBUTES ExpectMatcherContext__fromJS(JSC::EncodedJSValue value) { | |
JSC::JSValue decodedValue = JSC::JSValue::decode(value); | |
if (decodedValue.isEmpty() || !decodedValue.isCell()) | |
return nullptr; | |
JSC::JSCell* cell = decodedValue.asCell(); | |
JSExpectMatcherContext* object = JSC::jsDynamicCast<JSExpectMatcherContext*>(cell); | |
if (!object) | |
return nullptr; | |
return object->wrapped(); | |
} | |
extern JSC_CALLCONV void* JSC_HOST_CALL_ATTRIBUTES ExpectMatcherContext__fromJSDirect(JSC::EncodedJSValue value) { | |
JSC::JSValue decodedValue = JSC::JSValue::decode(value); | |
ASSERT(decodedValue.isCell()); | |
JSC::JSCell* cell = decodedValue.asCell(); | |
JSExpectMatcherContext* object = JSC::jsDynamicCast<JSExpectMatcherContext*>(cell); | |
if (!object) | |
return nullptr; | |
Zig::GlobalObject* globalObject = jsDynamicCast<Zig::GlobalObject*>(object->globalObject()); | |
if (UNLIKELY(globalObject == nullptr || cell->structureID() != globalObject->JSExpectMatcherContextStructure()->id())) { | |
return nullptr; | |
} | |
return object->wrapped(); | |
} | |
extern JSC_CALLCONV bool JSC_HOST_CALL_ATTRIBUTES ExpectMatcherContext__dangerouslySetPtr(JSC::EncodedJSValue value, void* ptr) { | |
JSExpectMatcherContext* object = JSC::jsDynamicCast<JSExpectMatcherContext*>(JSValue::decode(value)); | |
if (!object) | |
return false; | |
object->m_ctx = ptr; | |
return true; | |
} | |
extern "C" const size_t ExpectMatcherContext__ptrOffset = JSExpectMatcherContext::offsetOfWrapped(); | |
void JSExpectMatcherContext::analyzeHeap(JSCell* cell, HeapAnalyzer& analyzer) | |
{ | |
auto* thisObject = jsCast<JSExpectMatcherContext*>(cell); | |
if (void* wrapped = thisObject->wrapped()) { | |
// if (thisObject->scriptExecutionContext()) | |
// analyzer.setLabelForCell(cell, makeString("url ", thisObject->scriptExecutionContext()->url().string())); | |
} | |
Base::analyzeHeap(cell, analyzer); | |
} | |
JSObject* JSExpectMatcherContext::createPrototype(VM& vm, JSDOMGlobalObject* globalObject) | |
{ | |
auto *structure = JSExpectMatcherContextPrototype::createStructure(vm, globalObject, globalObject->objectPrototype()); | |
structure->setMayBePrototype(true); | |
return JSExpectMatcherContextPrototype::create(vm, globalObject, structure); | |
} | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ExpectMatcherContext__create(Zig::GlobalObject* globalObject, void* ptr) { | |
auto &vm = globalObject->vm(); | |
JSC::Structure* structure = globalObject->JSExpectMatcherContextStructure(); | |
JSExpectMatcherContext* instance = JSExpectMatcherContext::create(vm, globalObject, structure, ptr); | |
return JSValue::encode(instance); | |
} | |
class JSExpectMatcherUtilsPrototype final : public JSC::JSNonFinalObject { | |
public: | |
using Base = JSC::JSNonFinalObject; | |
static JSExpectMatcherUtilsPrototype* create(JSC::VM& vm, JSGlobalObject* globalObject, JSC::Structure* structure) | |
{ | |
JSExpectMatcherUtilsPrototype* ptr = new (NotNull, JSC::allocateCell<JSExpectMatcherUtilsPrototype>(vm)) JSExpectMatcherUtilsPrototype(vm, globalObject, structure); | |
ptr->finishCreation(vm, globalObject); | |
return ptr; | |
} | |
DECLARE_INFO; | |
template<typename CellType, JSC::SubspaceAccess> | |
static JSC::GCClient::IsoSubspace* subspaceFor(JSC::VM& vm) | |
{ | |
STATIC_ASSERT_ISO_SUBSPACE_SHARABLE(JSExpectMatcherUtilsPrototype, Base); | |
return &vm.plainObjectSpace(); | |
} | |
static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype) | |
{ | |
return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info()); | |
} | |
private: | |
JSExpectMatcherUtilsPrototype(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure) | |
: Base(vm, structure) | |
{ | |
} | |
void finishCreation(JSC::VM&, JSC::JSGlobalObject*); | |
}; | |
JSC_DECLARE_HOST_FUNCTION(ExpectMatcherUtilsPrototype__matcherHintCallback); | |
JSC_DECLARE_HOST_FUNCTION(ExpectMatcherUtilsPrototype__printExpectedCallback); | |
JSC_DECLARE_HOST_FUNCTION(ExpectMatcherUtilsPrototype__printReceivedCallback); | |
JSC_DECLARE_HOST_FUNCTION(ExpectMatcherUtilsPrototype__stringifyCallback); | |
STATIC_ASSERT_ISO_SUBSPACE_SHARABLE(JSExpectMatcherUtilsPrototype, JSExpectMatcherUtilsPrototype::Base); | |
static const HashTableValue JSExpectMatcherUtilsPrototypeTableValues[4] = { | |
{ "matcherHint"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, ExpectMatcherUtilsPrototype__matcherHintCallback, 1 } } , | |
{ "printExpected"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, ExpectMatcherUtilsPrototype__printExpectedCallback, 1 } } , | |
{ "printReceived"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, ExpectMatcherUtilsPrototype__printReceivedCallback, 1 } } , | |
{ "stringify"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, ExpectMatcherUtilsPrototype__stringifyCallback, 1 } } | |
}; | |
const ClassInfo JSExpectMatcherUtilsPrototype::s_info = { "ExpectMatcherUtils"_s, &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSExpectMatcherUtilsPrototype) }; | |
JSC_DEFINE_HOST_FUNCTION(ExpectMatcherUtilsPrototype__matcherHintCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSExpectMatcherUtils* thisObject = jsDynamicCast<JSExpectMatcherUtils*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof ExpectMatcherUtils"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = ExpectMatcherUtilsPrototype__matcherHint(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "ExpectMatcherUtils.matcherHint returned an empty value without an exception"); | |
return result; | |
#endif | |
return ExpectMatcherUtilsPrototype__matcherHint(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_HOST_FUNCTION(ExpectMatcherUtilsPrototype__printExpectedCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSExpectMatcherUtils* thisObject = jsDynamicCast<JSExpectMatcherUtils*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof ExpectMatcherUtils"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = ExpectMatcherUtilsPrototype__printExpected(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "ExpectMatcherUtils.printExpected returned an empty value without an exception"); | |
return result; | |
#endif | |
return ExpectMatcherUtilsPrototype__printExpected(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_HOST_FUNCTION(ExpectMatcherUtilsPrototype__printReceivedCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSExpectMatcherUtils* thisObject = jsDynamicCast<JSExpectMatcherUtils*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof ExpectMatcherUtils"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = ExpectMatcherUtilsPrototype__printReceived(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "ExpectMatcherUtils.printReceived returned an empty value without an exception"); | |
return result; | |
#endif | |
return ExpectMatcherUtilsPrototype__printReceived(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_HOST_FUNCTION(ExpectMatcherUtilsPrototype__stringifyCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSExpectMatcherUtils* thisObject = jsDynamicCast<JSExpectMatcherUtils*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof ExpectMatcherUtils"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = ExpectMatcherUtilsPrototype__stringify(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "ExpectMatcherUtils.stringify returned an empty value without an exception"); | |
return result; | |
#endif | |
return ExpectMatcherUtilsPrototype__stringify(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
void JSExpectMatcherUtilsPrototype::finishCreation(JSC::VM& vm, JSC::JSGlobalObject* globalObject) | |
{ | |
Base::finishCreation(vm); | |
reifyStaticProperties(vm, JSExpectMatcherUtils::info(), JSExpectMatcherUtilsPrototypeTableValues, *this); | |
JSC_TO_STRING_TAG_WITHOUT_TRANSITION(); | |
} | |
JSExpectMatcherUtils::~JSExpectMatcherUtils() | |
{ | |
if (LIKELY(m_ctx)) { | |
ExpectMatcherUtilsClass__finalize(m_ctx); | |
} | |
} | |
void JSExpectMatcherUtils::destroy(JSCell* cell) | |
{ | |
static_cast<JSExpectMatcherUtils*>(cell)->JSExpectMatcherUtils::~JSExpectMatcherUtils(); | |
} | |
const ClassInfo JSExpectMatcherUtils::s_info = { "ExpectMatcherUtils"_s, &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSExpectMatcherUtils) }; | |
void JSExpectMatcherUtils::finishCreation(VM& vm) | |
{ | |
Base::finishCreation(vm); | |
ASSERT(inherits(info())); | |
} | |
JSExpectMatcherUtils* JSExpectMatcherUtils::create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure, void* ctx) { | |
JSExpectMatcherUtils* ptr = new (NotNull, JSC::allocateCell<JSExpectMatcherUtils>(vm)) JSExpectMatcherUtils(vm, structure, ctx); | |
ptr->finishCreation(vm); | |
return ptr; | |
} | |
extern JSC_CALLCONV void* JSC_HOST_CALL_ATTRIBUTES ExpectMatcherUtils__fromJS(JSC::EncodedJSValue value) { | |
JSC::JSValue decodedValue = JSC::JSValue::decode(value); | |
if (decodedValue.isEmpty() || !decodedValue.isCell()) | |
return nullptr; | |
JSC::JSCell* cell = decodedValue.asCell(); | |
JSExpectMatcherUtils* object = JSC::jsDynamicCast<JSExpectMatcherUtils*>(cell); | |
if (!object) | |
return nullptr; | |
return object->wrapped(); | |
} | |
extern JSC_CALLCONV void* JSC_HOST_CALL_ATTRIBUTES ExpectMatcherUtils__fromJSDirect(JSC::EncodedJSValue value) { | |
JSC::JSValue decodedValue = JSC::JSValue::decode(value); | |
ASSERT(decodedValue.isCell()); | |
JSC::JSCell* cell = decodedValue.asCell(); | |
JSExpectMatcherUtils* object = JSC::jsDynamicCast<JSExpectMatcherUtils*>(cell); | |
if (!object) | |
return nullptr; | |
Zig::GlobalObject* globalObject = jsDynamicCast<Zig::GlobalObject*>(object->globalObject()); | |
if (UNLIKELY(globalObject == nullptr || cell->structureID() != globalObject->JSExpectMatcherUtilsStructure()->id())) { | |
return nullptr; | |
} | |
return object->wrapped(); | |
} | |
extern JSC_CALLCONV bool JSC_HOST_CALL_ATTRIBUTES ExpectMatcherUtils__dangerouslySetPtr(JSC::EncodedJSValue value, void* ptr) { | |
JSExpectMatcherUtils* object = JSC::jsDynamicCast<JSExpectMatcherUtils*>(JSValue::decode(value)); | |
if (!object) | |
return false; | |
object->m_ctx = ptr; | |
return true; | |
} | |
extern "C" const size_t ExpectMatcherUtils__ptrOffset = JSExpectMatcherUtils::offsetOfWrapped(); | |
void JSExpectMatcherUtils::analyzeHeap(JSCell* cell, HeapAnalyzer& analyzer) | |
{ | |
auto* thisObject = jsCast<JSExpectMatcherUtils*>(cell); | |
if (void* wrapped = thisObject->wrapped()) { | |
// if (thisObject->scriptExecutionContext()) | |
// analyzer.setLabelForCell(cell, makeString("url ", thisObject->scriptExecutionContext()->url().string())); | |
} | |
Base::analyzeHeap(cell, analyzer); | |
} | |
JSObject* JSExpectMatcherUtils::createPrototype(VM& vm, JSDOMGlobalObject* globalObject) | |
{ | |
auto *structure = JSExpectMatcherUtilsPrototype::createStructure(vm, globalObject, globalObject->objectPrototype()); | |
structure->setMayBePrototype(true); | |
return JSExpectMatcherUtilsPrototype::create(vm, globalObject, structure); | |
} | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ExpectMatcherUtils__create(Zig::GlobalObject* globalObject, void* ptr) { | |
auto &vm = globalObject->vm(); | |
JSC::Structure* structure = globalObject->JSExpectMatcherUtilsStructure(); | |
JSExpectMatcherUtils* instance = JSExpectMatcherUtils::create(vm, globalObject, structure, ptr); | |
return JSValue::encode(instance); | |
} | |
class JSExpectObjectContainingPrototype final : public JSC::JSNonFinalObject { | |
public: | |
using Base = JSC::JSNonFinalObject; | |
static JSExpectObjectContainingPrototype* create(JSC::VM& vm, JSGlobalObject* globalObject, JSC::Structure* structure) | |
{ | |
JSExpectObjectContainingPrototype* ptr = new (NotNull, JSC::allocateCell<JSExpectObjectContainingPrototype>(vm)) JSExpectObjectContainingPrototype(vm, globalObject, structure); | |
ptr->finishCreation(vm, globalObject); | |
return ptr; | |
} | |
DECLARE_INFO; | |
template<typename CellType, JSC::SubspaceAccess> | |
static JSC::GCClient::IsoSubspace* subspaceFor(JSC::VM& vm) | |
{ | |
STATIC_ASSERT_ISO_SUBSPACE_SHARABLE(JSExpectObjectContainingPrototype, Base); | |
return &vm.plainObjectSpace(); | |
} | |
static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype) | |
{ | |
return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info()); | |
} | |
private: | |
JSExpectObjectContainingPrototype(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure) | |
: Base(vm, structure) | |
{ | |
} | |
void finishCreation(JSC::VM&, JSC::JSGlobalObject*); | |
}; | |
STATIC_ASSERT_ISO_SUBSPACE_SHARABLE(JSExpectObjectContainingPrototype, JSExpectObjectContainingPrototype::Base); | |
const ClassInfo JSExpectObjectContainingPrototype::s_info = { "ExpectObjectContaining"_s, &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSExpectObjectContainingPrototype) }; | |
extern JSC_CALLCONV void ExpectObjectContainingPrototype__objectValueSetCachedValue(JSC::EncodedJSValue thisValue, JSC::JSGlobalObject *globalObject, JSC::EncodedJSValue value) | |
{ | |
auto& vm = globalObject->vm(); | |
auto* thisObject = jsCast<JSExpectObjectContaining*>(JSValue::decode(thisValue)); | |
thisObject->m_objectValue.set(vm, thisObject, JSValue::decode(value)); | |
} | |
extern JSC_CALLCONV JSC::EncodedJSValue ExpectObjectContainingPrototype__objectValueGetCachedValue(JSC::EncodedJSValue thisValue) | |
{ | |
auto* thisObject = jsCast<JSExpectObjectContaining*>(JSValue::decode(thisValue)); | |
return JSValue::encode(thisObject->m_objectValue.get()); | |
} | |
void JSExpectObjectContainingPrototype::finishCreation(JSC::VM& vm, JSC::JSGlobalObject* globalObject) | |
{ | |
Base::finishCreation(vm); | |
JSC_TO_STRING_TAG_WITHOUT_TRANSITION(); | |
} | |
JSExpectObjectContaining::~JSExpectObjectContaining() | |
{ | |
if (LIKELY(m_ctx)) { | |
ExpectObjectContainingClass__finalize(m_ctx); | |
} | |
} | |
void JSExpectObjectContaining::destroy(JSCell* cell) | |
{ | |
static_cast<JSExpectObjectContaining*>(cell)->JSExpectObjectContaining::~JSExpectObjectContaining(); | |
} | |
const ClassInfo JSExpectObjectContaining::s_info = { "ExpectObjectContaining"_s, &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSExpectObjectContaining) }; | |
void JSExpectObjectContaining::finishCreation(VM& vm) | |
{ | |
Base::finishCreation(vm); | |
ASSERT(inherits(info())); | |
} | |
JSExpectObjectContaining* JSExpectObjectContaining::create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure, void* ctx) { | |
JSExpectObjectContaining* ptr = new (NotNull, JSC::allocateCell<JSExpectObjectContaining>(vm)) JSExpectObjectContaining(vm, structure, ctx); | |
ptr->finishCreation(vm); | |
return ptr; | |
} | |
extern JSC_CALLCONV void* JSC_HOST_CALL_ATTRIBUTES ExpectObjectContaining__fromJS(JSC::EncodedJSValue value) { | |
JSC::JSValue decodedValue = JSC::JSValue::decode(value); | |
if (decodedValue.isEmpty() || !decodedValue.isCell()) | |
return nullptr; | |
JSC::JSCell* cell = decodedValue.asCell(); | |
JSExpectObjectContaining* object = JSC::jsDynamicCast<JSExpectObjectContaining*>(cell); | |
if (!object) | |
return nullptr; | |
return object->wrapped(); | |
} | |
extern JSC_CALLCONV void* JSC_HOST_CALL_ATTRIBUTES ExpectObjectContaining__fromJSDirect(JSC::EncodedJSValue value) { | |
JSC::JSValue decodedValue = JSC::JSValue::decode(value); | |
ASSERT(decodedValue.isCell()); | |
JSC::JSCell* cell = decodedValue.asCell(); | |
JSExpectObjectContaining* object = JSC::jsDynamicCast<JSExpectObjectContaining*>(cell); | |
if (!object) | |
return nullptr; | |
Zig::GlobalObject* globalObject = jsDynamicCast<Zig::GlobalObject*>(object->globalObject()); | |
if (UNLIKELY(globalObject == nullptr || cell->structureID() != globalObject->JSExpectObjectContainingStructure()->id())) { | |
return nullptr; | |
} | |
return object->wrapped(); | |
} | |
extern JSC_CALLCONV bool JSC_HOST_CALL_ATTRIBUTES ExpectObjectContaining__dangerouslySetPtr(JSC::EncodedJSValue value, void* ptr) { | |
JSExpectObjectContaining* object = JSC::jsDynamicCast<JSExpectObjectContaining*>(JSValue::decode(value)); | |
if (!object) | |
return false; | |
object->m_ctx = ptr; | |
return true; | |
} | |
extern "C" const size_t ExpectObjectContaining__ptrOffset = JSExpectObjectContaining::offsetOfWrapped(); | |
void JSExpectObjectContaining::analyzeHeap(JSCell* cell, HeapAnalyzer& analyzer) | |
{ | |
auto* thisObject = jsCast<JSExpectObjectContaining*>(cell); | |
if (void* wrapped = thisObject->wrapped()) { | |
// if (thisObject->scriptExecutionContext()) | |
// analyzer.setLabelForCell(cell, makeString("url ", thisObject->scriptExecutionContext()->url().string())); | |
} | |
Base::analyzeHeap(cell, analyzer); | |
} | |
JSObject* JSExpectObjectContaining::createPrototype(VM& vm, JSDOMGlobalObject* globalObject) | |
{ | |
auto *structure = JSExpectObjectContainingPrototype::createStructure(vm, globalObject, globalObject->objectPrototype()); | |
structure->setMayBePrototype(true); | |
return JSExpectObjectContainingPrototype::create(vm, globalObject, structure); | |
} | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ExpectObjectContaining__create(Zig::GlobalObject* globalObject, void* ptr) { | |
auto &vm = globalObject->vm(); | |
JSC::Structure* structure = globalObject->JSExpectObjectContainingStructure(); | |
JSExpectObjectContaining* instance = JSExpectObjectContaining::create(vm, globalObject, structure, ptr); | |
return JSValue::encode(instance); | |
} | |
template<typename Visitor> | |
void JSExpectObjectContaining::visitChildrenImpl(JSCell* cell, Visitor& visitor) | |
{ | |
JSExpectObjectContaining* thisObject = jsCast<JSExpectObjectContaining*>(cell); | |
ASSERT_GC_OBJECT_INHERITS(thisObject, info()); | |
Base::visitChildren(thisObject, visitor); | |
thisObject->visitAdditionalChildren<Visitor>(visitor); | |
} | |
DEFINE_VISIT_CHILDREN(JSExpectObjectContaining); | |
template<typename Visitor> | |
void JSExpectObjectContaining::visitAdditionalChildren(Visitor& visitor) | |
{ | |
JSExpectObjectContaining* thisObject = this; | |
ASSERT_GC_OBJECT_INHERITS(thisObject, info()); | |
visitor.append(thisObject->m_objectValue); | |
} | |
DEFINE_VISIT_ADDITIONAL_CHILDREN(JSExpectObjectContaining); | |
template<typename Visitor> | |
void JSExpectObjectContaining::visitOutputConstraintsImpl(JSCell *cell, Visitor& visitor) | |
{ | |
JSExpectObjectContaining* thisObject = jsCast<JSExpectObjectContaining*>(cell); | |
ASSERT_GC_OBJECT_INHERITS(thisObject, info()); | |
thisObject->visitAdditionalChildren<Visitor>(visitor); | |
} | |
DEFINE_VISIT_OUTPUT_CONSTRAINTS(JSExpectObjectContaining); | |
class JSExpectStaticPrototype final : public JSC::JSNonFinalObject { | |
public: | |
using Base = JSC::JSNonFinalObject; | |
static JSExpectStaticPrototype* create(JSC::VM& vm, JSGlobalObject* globalObject, JSC::Structure* structure) | |
{ | |
JSExpectStaticPrototype* ptr = new (NotNull, JSC::allocateCell<JSExpectStaticPrototype>(vm)) JSExpectStaticPrototype(vm, globalObject, structure); | |
ptr->finishCreation(vm, globalObject); | |
return ptr; | |
} | |
DECLARE_INFO; | |
template<typename CellType, JSC::SubspaceAccess> | |
static JSC::GCClient::IsoSubspace* subspaceFor(JSC::VM& vm) | |
{ | |
STATIC_ASSERT_ISO_SUBSPACE_SHARABLE(JSExpectStaticPrototype, Base); | |
return &vm.plainObjectSpace(); | |
} | |
static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype) | |
{ | |
return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info()); | |
} | |
private: | |
JSExpectStaticPrototype(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure) | |
: Base(vm, structure) | |
{ | |
} | |
void finishCreation(JSC::VM&, JSC::JSGlobalObject*); | |
}; | |
JSC_DECLARE_HOST_FUNCTION(ExpectStaticPrototype__anyCallback); | |
JSC_DECLARE_HOST_FUNCTION(ExpectStaticPrototype__anythingCallback); | |
JSC_DECLARE_HOST_FUNCTION(ExpectStaticPrototype__arrayContainingCallback); | |
JSC_DECLARE_HOST_FUNCTION(ExpectStaticPrototype__closeToCallback); | |
JSC_DECLARE_CUSTOM_GETTER(ExpectStaticPrototype__notGetterWrap); | |
JSC_DECLARE_HOST_FUNCTION(ExpectStaticPrototype__objectContainingCallback); | |
JSC_DECLARE_CUSTOM_GETTER(ExpectStaticPrototype__rejectsToGetterWrap); | |
JSC_DECLARE_CUSTOM_GETTER(ExpectStaticPrototype__resolvesToGetterWrap); | |
JSC_DECLARE_HOST_FUNCTION(ExpectStaticPrototype__stringContainingCallback); | |
JSC_DECLARE_HOST_FUNCTION(ExpectStaticPrototype__stringMatchingCallback); | |
STATIC_ASSERT_ISO_SUBSPACE_SHARABLE(JSExpectStaticPrototype, JSExpectStaticPrototype::Base); | |
static const HashTableValue JSExpectStaticPrototypeTableValues[10] = { | |
{ "any"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, ExpectStaticPrototype__anyCallback, 1 } } , | |
{ "anything"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, ExpectStaticPrototype__anythingCallback, 1 } } , | |
{ "arrayContaining"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, ExpectStaticPrototype__arrayContainingCallback, 1 } } , | |
{ "closeTo"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, ExpectStaticPrototype__closeToCallback, 1 } } , | |
{ "not"_s, static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::GetterSetterType, ExpectStaticPrototype__notGetterWrap, 0 } } , | |
{ "objectContaining"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, ExpectStaticPrototype__objectContainingCallback, 1 } } , | |
{ "rejectsTo"_s, static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::GetterSetterType, ExpectStaticPrototype__rejectsToGetterWrap, 0 } } , | |
{ "resolvesTo"_s, static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::GetterSetterType, ExpectStaticPrototype__resolvesToGetterWrap, 0 } } , | |
{ "stringContaining"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, ExpectStaticPrototype__stringContainingCallback, 1 } } , | |
{ "stringMatching"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, ExpectStaticPrototype__stringMatchingCallback, 1 } } | |
}; | |
const ClassInfo JSExpectStaticPrototype::s_info = { "ExpectStatic"_s, &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSExpectStaticPrototype) }; | |
JSC_DEFINE_HOST_FUNCTION(ExpectStaticPrototype__anyCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSExpectStatic* thisObject = jsDynamicCast<JSExpectStatic*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof ExpectStatic"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = ExpectStaticPrototype__any(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "ExpectStatic.any returned an empty value without an exception"); | |
return result; | |
#endif | |
return ExpectStaticPrototype__any(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_HOST_FUNCTION(ExpectStaticPrototype__anythingCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSExpectStatic* thisObject = jsDynamicCast<JSExpectStatic*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof ExpectStatic"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = ExpectStaticPrototype__anything(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "ExpectStatic.anything returned an empty value without an exception"); | |
return result; | |
#endif | |
return ExpectStaticPrototype__anything(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_HOST_FUNCTION(ExpectStaticPrototype__arrayContainingCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSExpectStatic* thisObject = jsDynamicCast<JSExpectStatic*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof ExpectStatic"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = ExpectStaticPrototype__arrayContaining(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "ExpectStatic.arrayContaining returned an empty value without an exception"); | |
return result; | |
#endif | |
return ExpectStaticPrototype__arrayContaining(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_HOST_FUNCTION(ExpectStaticPrototype__closeToCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSExpectStatic* thisObject = jsDynamicCast<JSExpectStatic*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof ExpectStatic"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = ExpectStaticPrototype__closeTo(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "ExpectStatic.closeTo returned an empty value without an exception"); | |
return result; | |
#endif | |
return ExpectStaticPrototype__closeTo(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_CUSTOM_GETTER(ExpectStaticPrototype__notGetterWrap, (JSGlobalObject * lexicalGlobalObject, EncodedJSValue encodedThisValue, PropertyName attributeName)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
Zig::GlobalObject *globalObject = reinterpret_cast<Zig::GlobalObject*>(lexicalGlobalObject); | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
JSExpectStatic* thisObject = jsCast<JSExpectStatic*>(JSValue::decode(encodedThisValue)); | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
JSC::EncodedJSValue result = ExpectStaticPrototype__getNot(thisObject->wrapped(), encodedThisValue, globalObject); | |
RETURN_IF_EXCEPTION(throwScope, {}); | |
RELEASE_AND_RETURN(throwScope, result); | |
} | |
JSC_DEFINE_HOST_FUNCTION(ExpectStaticPrototype__objectContainingCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSExpectStatic* thisObject = jsDynamicCast<JSExpectStatic*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof ExpectStatic"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = ExpectStaticPrototype__objectContaining(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "ExpectStatic.objectContaining returned an empty value without an exception"); | |
return result; | |
#endif | |
return ExpectStaticPrototype__objectContaining(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_CUSTOM_GETTER(ExpectStaticPrototype__rejectsToGetterWrap, (JSGlobalObject * lexicalGlobalObject, EncodedJSValue encodedThisValue, PropertyName attributeName)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
Zig::GlobalObject *globalObject = reinterpret_cast<Zig::GlobalObject*>(lexicalGlobalObject); | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
JSExpectStatic* thisObject = jsCast<JSExpectStatic*>(JSValue::decode(encodedThisValue)); | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
JSC::EncodedJSValue result = ExpectStaticPrototype__getRejectsTo(thisObject->wrapped(), encodedThisValue, globalObject); | |
RETURN_IF_EXCEPTION(throwScope, {}); | |
RELEASE_AND_RETURN(throwScope, result); | |
} | |
JSC_DEFINE_CUSTOM_GETTER(ExpectStaticPrototype__resolvesToGetterWrap, (JSGlobalObject * lexicalGlobalObject, EncodedJSValue encodedThisValue, PropertyName attributeName)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
Zig::GlobalObject *globalObject = reinterpret_cast<Zig::GlobalObject*>(lexicalGlobalObject); | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
JSExpectStatic* thisObject = jsCast<JSExpectStatic*>(JSValue::decode(encodedThisValue)); | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
JSC::EncodedJSValue result = ExpectStaticPrototype__getResolvesTo(thisObject->wrapped(), encodedThisValue, globalObject); | |
RETURN_IF_EXCEPTION(throwScope, {}); | |
RELEASE_AND_RETURN(throwScope, result); | |
} | |
JSC_DEFINE_HOST_FUNCTION(ExpectStaticPrototype__stringContainingCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSExpectStatic* thisObject = jsDynamicCast<JSExpectStatic*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof ExpectStatic"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = ExpectStaticPrototype__stringContaining(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "ExpectStatic.stringContaining returned an empty value without an exception"); | |
return result; | |
#endif | |
return ExpectStaticPrototype__stringContaining(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_HOST_FUNCTION(ExpectStaticPrototype__stringMatchingCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSExpectStatic* thisObject = jsDynamicCast<JSExpectStatic*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof ExpectStatic"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = ExpectStaticPrototype__stringMatching(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "ExpectStatic.stringMatching returned an empty value without an exception"); | |
return result; | |
#endif | |
return ExpectStaticPrototype__stringMatching(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
void JSExpectStaticPrototype::finishCreation(JSC::VM& vm, JSC::JSGlobalObject* globalObject) | |
{ | |
Base::finishCreation(vm); | |
reifyStaticProperties(vm, JSExpectStatic::info(), JSExpectStaticPrototypeTableValues, *this); | |
JSC_TO_STRING_TAG_WITHOUT_TRANSITION(); | |
} | |
JSExpectStatic::~JSExpectStatic() | |
{ | |
if (LIKELY(m_ctx)) { | |
ExpectStaticClass__finalize(m_ctx); | |
} | |
} | |
void JSExpectStatic::destroy(JSCell* cell) | |
{ | |
static_cast<JSExpectStatic*>(cell)->JSExpectStatic::~JSExpectStatic(); | |
} | |
const ClassInfo JSExpectStatic::s_info = { "ExpectStatic"_s, &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSExpectStatic) }; | |
void JSExpectStatic::finishCreation(VM& vm) | |
{ | |
Base::finishCreation(vm); | |
ASSERT(inherits(info())); | |
} | |
JSExpectStatic* JSExpectStatic::create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure, void* ctx) { | |
JSExpectStatic* ptr = new (NotNull, JSC::allocateCell<JSExpectStatic>(vm)) JSExpectStatic(vm, structure, ctx); | |
ptr->finishCreation(vm); | |
return ptr; | |
} | |
extern JSC_CALLCONV void* JSC_HOST_CALL_ATTRIBUTES ExpectStatic__fromJS(JSC::EncodedJSValue value) { | |
JSC::JSValue decodedValue = JSC::JSValue::decode(value); | |
if (decodedValue.isEmpty() || !decodedValue.isCell()) | |
return nullptr; | |
JSC::JSCell* cell = decodedValue.asCell(); | |
JSExpectStatic* object = JSC::jsDynamicCast<JSExpectStatic*>(cell); | |
if (!object) | |
return nullptr; | |
return object->wrapped(); | |
} | |
extern JSC_CALLCONV void* JSC_HOST_CALL_ATTRIBUTES ExpectStatic__fromJSDirect(JSC::EncodedJSValue value) { | |
JSC::JSValue decodedValue = JSC::JSValue::decode(value); | |
ASSERT(decodedValue.isCell()); | |
JSC::JSCell* cell = decodedValue.asCell(); | |
JSExpectStatic* object = JSC::jsDynamicCast<JSExpectStatic*>(cell); | |
if (!object) | |
return nullptr; | |
Zig::GlobalObject* globalObject = jsDynamicCast<Zig::GlobalObject*>(object->globalObject()); | |
if (UNLIKELY(globalObject == nullptr || cell->structureID() != globalObject->JSExpectStaticStructure()->id())) { | |
return nullptr; | |
} | |
return object->wrapped(); | |
} | |
extern JSC_CALLCONV bool JSC_HOST_CALL_ATTRIBUTES ExpectStatic__dangerouslySetPtr(JSC::EncodedJSValue value, void* ptr) { | |
JSExpectStatic* object = JSC::jsDynamicCast<JSExpectStatic*>(JSValue::decode(value)); | |
if (!object) | |
return false; | |
object->m_ctx = ptr; | |
return true; | |
} | |
extern "C" const size_t ExpectStatic__ptrOffset = JSExpectStatic::offsetOfWrapped(); | |
void JSExpectStatic::analyzeHeap(JSCell* cell, HeapAnalyzer& analyzer) | |
{ | |
auto* thisObject = jsCast<JSExpectStatic*>(cell); | |
if (void* wrapped = thisObject->wrapped()) { | |
// if (thisObject->scriptExecutionContext()) | |
// analyzer.setLabelForCell(cell, makeString("url ", thisObject->scriptExecutionContext()->url().string())); | |
} | |
Base::analyzeHeap(cell, analyzer); | |
} | |
JSObject* JSExpectStatic::createPrototype(VM& vm, JSDOMGlobalObject* globalObject) | |
{ | |
auto *structure = JSExpectStaticPrototype::createStructure(vm, globalObject, globalObject->objectPrototype()); | |
structure->setMayBePrototype(true); | |
return JSExpectStaticPrototype::create(vm, globalObject, structure); | |
} | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ExpectStatic__create(Zig::GlobalObject* globalObject, void* ptr) { | |
auto &vm = globalObject->vm(); | |
JSC::Structure* structure = globalObject->JSExpectStaticStructure(); | |
JSExpectStatic* instance = JSExpectStatic::create(vm, globalObject, structure, ptr); | |
return JSValue::encode(instance); | |
} | |
class JSExpectStringContainingPrototype final : public JSC::JSNonFinalObject { | |
public: | |
using Base = JSC::JSNonFinalObject; | |
static JSExpectStringContainingPrototype* create(JSC::VM& vm, JSGlobalObject* globalObject, JSC::Structure* structure) | |
{ | |
JSExpectStringContainingPrototype* ptr = new (NotNull, JSC::allocateCell<JSExpectStringContainingPrototype>(vm)) JSExpectStringContainingPrototype(vm, globalObject, structure); | |
ptr->finishCreation(vm, globalObject); | |
return ptr; | |
} | |
DECLARE_INFO; | |
template<typename CellType, JSC::SubspaceAccess> | |
static JSC::GCClient::IsoSubspace* subspaceFor(JSC::VM& vm) | |
{ | |
STATIC_ASSERT_ISO_SUBSPACE_SHARABLE(JSExpectStringContainingPrototype, Base); | |
return &vm.plainObjectSpace(); | |
} | |
static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype) | |
{ | |
return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info()); | |
} | |
private: | |
JSExpectStringContainingPrototype(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure) | |
: Base(vm, structure) | |
{ | |
} | |
void finishCreation(JSC::VM&, JSC::JSGlobalObject*); | |
}; | |
STATIC_ASSERT_ISO_SUBSPACE_SHARABLE(JSExpectStringContainingPrototype, JSExpectStringContainingPrototype::Base); | |
const ClassInfo JSExpectStringContainingPrototype::s_info = { "ExpectStringContaining"_s, &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSExpectStringContainingPrototype) }; | |
extern JSC_CALLCONV void ExpectStringContainingPrototype__stringValueSetCachedValue(JSC::EncodedJSValue thisValue, JSC::JSGlobalObject *globalObject, JSC::EncodedJSValue value) | |
{ | |
auto& vm = globalObject->vm(); | |
auto* thisObject = jsCast<JSExpectStringContaining*>(JSValue::decode(thisValue)); | |
thisObject->m_stringValue.set(vm, thisObject, JSValue::decode(value)); | |
} | |
extern JSC_CALLCONV JSC::EncodedJSValue ExpectStringContainingPrototype__stringValueGetCachedValue(JSC::EncodedJSValue thisValue) | |
{ | |
auto* thisObject = jsCast<JSExpectStringContaining*>(JSValue::decode(thisValue)); | |
return JSValue::encode(thisObject->m_stringValue.get()); | |
} | |
void JSExpectStringContainingPrototype::finishCreation(JSC::VM& vm, JSC::JSGlobalObject* globalObject) | |
{ | |
Base::finishCreation(vm); | |
JSC_TO_STRING_TAG_WITHOUT_TRANSITION(); | |
} | |
JSExpectStringContaining::~JSExpectStringContaining() | |
{ | |
if (LIKELY(m_ctx)) { | |
ExpectStringContainingClass__finalize(m_ctx); | |
} | |
} | |
void JSExpectStringContaining::destroy(JSCell* cell) | |
{ | |
static_cast<JSExpectStringContaining*>(cell)->JSExpectStringContaining::~JSExpectStringContaining(); | |
} | |
const ClassInfo JSExpectStringContaining::s_info = { "ExpectStringContaining"_s, &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSExpectStringContaining) }; | |
void JSExpectStringContaining::finishCreation(VM& vm) | |
{ | |
Base::finishCreation(vm); | |
ASSERT(inherits(info())); | |
} | |
JSExpectStringContaining* JSExpectStringContaining::create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure, void* ctx) { | |
JSExpectStringContaining* ptr = new (NotNull, JSC::allocateCell<JSExpectStringContaining>(vm)) JSExpectStringContaining(vm, structure, ctx); | |
ptr->finishCreation(vm); | |
return ptr; | |
} | |
extern JSC_CALLCONV void* JSC_HOST_CALL_ATTRIBUTES ExpectStringContaining__fromJS(JSC::EncodedJSValue value) { | |
JSC::JSValue decodedValue = JSC::JSValue::decode(value); | |
if (decodedValue.isEmpty() || !decodedValue.isCell()) | |
return nullptr; | |
JSC::JSCell* cell = decodedValue.asCell(); | |
JSExpectStringContaining* object = JSC::jsDynamicCast<JSExpectStringContaining*>(cell); | |
if (!object) | |
return nullptr; | |
return object->wrapped(); | |
} | |
extern JSC_CALLCONV void* JSC_HOST_CALL_ATTRIBUTES ExpectStringContaining__fromJSDirect(JSC::EncodedJSValue value) { | |
JSC::JSValue decodedValue = JSC::JSValue::decode(value); | |
ASSERT(decodedValue.isCell()); | |
JSC::JSCell* cell = decodedValue.asCell(); | |
JSExpectStringContaining* object = JSC::jsDynamicCast<JSExpectStringContaining*>(cell); | |
if (!object) | |
return nullptr; | |
Zig::GlobalObject* globalObject = jsDynamicCast<Zig::GlobalObject*>(object->globalObject()); | |
if (UNLIKELY(globalObject == nullptr || cell->structureID() != globalObject->JSExpectStringContainingStructure()->id())) { | |
return nullptr; | |
} | |
return object->wrapped(); | |
} | |
extern JSC_CALLCONV bool JSC_HOST_CALL_ATTRIBUTES ExpectStringContaining__dangerouslySetPtr(JSC::EncodedJSValue value, void* ptr) { | |
JSExpectStringContaining* object = JSC::jsDynamicCast<JSExpectStringContaining*>(JSValue::decode(value)); | |
if (!object) | |
return false; | |
object->m_ctx = ptr; | |
return true; | |
} | |
extern "C" const size_t ExpectStringContaining__ptrOffset = JSExpectStringContaining::offsetOfWrapped(); | |
void JSExpectStringContaining::analyzeHeap(JSCell* cell, HeapAnalyzer& analyzer) | |
{ | |
auto* thisObject = jsCast<JSExpectStringContaining*>(cell); | |
if (void* wrapped = thisObject->wrapped()) { | |
// if (thisObject->scriptExecutionContext()) | |
// analyzer.setLabelForCell(cell, makeString("url ", thisObject->scriptExecutionContext()->url().string())); | |
} | |
Base::analyzeHeap(cell, analyzer); | |
} | |
JSObject* JSExpectStringContaining::createPrototype(VM& vm, JSDOMGlobalObject* globalObject) | |
{ | |
auto *structure = JSExpectStringContainingPrototype::createStructure(vm, globalObject, globalObject->objectPrototype()); | |
structure->setMayBePrototype(true); | |
return JSExpectStringContainingPrototype::create(vm, globalObject, structure); | |
} | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ExpectStringContaining__create(Zig::GlobalObject* globalObject, void* ptr) { | |
auto &vm = globalObject->vm(); | |
JSC::Structure* structure = globalObject->JSExpectStringContainingStructure(); | |
JSExpectStringContaining* instance = JSExpectStringContaining::create(vm, globalObject, structure, ptr); | |
return JSValue::encode(instance); | |
} | |
template<typename Visitor> | |
void JSExpectStringContaining::visitChildrenImpl(JSCell* cell, Visitor& visitor) | |
{ | |
JSExpectStringContaining* thisObject = jsCast<JSExpectStringContaining*>(cell); | |
ASSERT_GC_OBJECT_INHERITS(thisObject, info()); | |
Base::visitChildren(thisObject, visitor); | |
thisObject->visitAdditionalChildren<Visitor>(visitor); | |
} | |
DEFINE_VISIT_CHILDREN(JSExpectStringContaining); | |
template<typename Visitor> | |
void JSExpectStringContaining::visitAdditionalChildren(Visitor& visitor) | |
{ | |
JSExpectStringContaining* thisObject = this; | |
ASSERT_GC_OBJECT_INHERITS(thisObject, info()); | |
visitor.append(thisObject->m_stringValue); | |
} | |
DEFINE_VISIT_ADDITIONAL_CHILDREN(JSExpectStringContaining); | |
template<typename Visitor> | |
void JSExpectStringContaining::visitOutputConstraintsImpl(JSCell *cell, Visitor& visitor) | |
{ | |
JSExpectStringContaining* thisObject = jsCast<JSExpectStringContaining*>(cell); | |
ASSERT_GC_OBJECT_INHERITS(thisObject, info()); | |
thisObject->visitAdditionalChildren<Visitor>(visitor); | |
} | |
DEFINE_VISIT_OUTPUT_CONSTRAINTS(JSExpectStringContaining); | |
class JSExpectStringMatchingPrototype final : public JSC::JSNonFinalObject { | |
public: | |
using Base = JSC::JSNonFinalObject; | |
static JSExpectStringMatchingPrototype* create(JSC::VM& vm, JSGlobalObject* globalObject, JSC::Structure* structure) | |
{ | |
JSExpectStringMatchingPrototype* ptr = new (NotNull, JSC::allocateCell<JSExpectStringMatchingPrototype>(vm)) JSExpectStringMatchingPrototype(vm, globalObject, structure); | |
ptr->finishCreation(vm, globalObject); | |
return ptr; | |
} | |
DECLARE_INFO; | |
template<typename CellType, JSC::SubspaceAccess> | |
static JSC::GCClient::IsoSubspace* subspaceFor(JSC::VM& vm) | |
{ | |
STATIC_ASSERT_ISO_SUBSPACE_SHARABLE(JSExpectStringMatchingPrototype, Base); | |
return &vm.plainObjectSpace(); | |
} | |
static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype) | |
{ | |
return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info()); | |
} | |
private: | |
JSExpectStringMatchingPrototype(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure) | |
: Base(vm, structure) | |
{ | |
} | |
void finishCreation(JSC::VM&, JSC::JSGlobalObject*); | |
}; | |
STATIC_ASSERT_ISO_SUBSPACE_SHARABLE(JSExpectStringMatchingPrototype, JSExpectStringMatchingPrototype::Base); | |
const ClassInfo JSExpectStringMatchingPrototype::s_info = { "ExpectStringMatching"_s, &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSExpectStringMatchingPrototype) }; | |
extern JSC_CALLCONV void ExpectStringMatchingPrototype__testValueSetCachedValue(JSC::EncodedJSValue thisValue, JSC::JSGlobalObject *globalObject, JSC::EncodedJSValue value) | |
{ | |
auto& vm = globalObject->vm(); | |
auto* thisObject = jsCast<JSExpectStringMatching*>(JSValue::decode(thisValue)); | |
thisObject->m_testValue.set(vm, thisObject, JSValue::decode(value)); | |
} | |
extern JSC_CALLCONV JSC::EncodedJSValue ExpectStringMatchingPrototype__testValueGetCachedValue(JSC::EncodedJSValue thisValue) | |
{ | |
auto* thisObject = jsCast<JSExpectStringMatching*>(JSValue::decode(thisValue)); | |
return JSValue::encode(thisObject->m_testValue.get()); | |
} | |
void JSExpectStringMatchingPrototype::finishCreation(JSC::VM& vm, JSC::JSGlobalObject* globalObject) | |
{ | |
Base::finishCreation(vm); | |
JSC_TO_STRING_TAG_WITHOUT_TRANSITION(); | |
} | |
JSExpectStringMatching::~JSExpectStringMatching() | |
{ | |
if (LIKELY(m_ctx)) { | |
ExpectStringMatchingClass__finalize(m_ctx); | |
} | |
} | |
void JSExpectStringMatching::destroy(JSCell* cell) | |
{ | |
static_cast<JSExpectStringMatching*>(cell)->JSExpectStringMatching::~JSExpectStringMatching(); | |
} | |
const ClassInfo JSExpectStringMatching::s_info = { "ExpectStringMatching"_s, &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSExpectStringMatching) }; | |
void JSExpectStringMatching::finishCreation(VM& vm) | |
{ | |
Base::finishCreation(vm); | |
ASSERT(inherits(info())); | |
} | |
JSExpectStringMatching* JSExpectStringMatching::create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure, void* ctx) { | |
JSExpectStringMatching* ptr = new (NotNull, JSC::allocateCell<JSExpectStringMatching>(vm)) JSExpectStringMatching(vm, structure, ctx); | |
ptr->finishCreation(vm); | |
return ptr; | |
} | |
extern JSC_CALLCONV void* JSC_HOST_CALL_ATTRIBUTES ExpectStringMatching__fromJS(JSC::EncodedJSValue value) { | |
JSC::JSValue decodedValue = JSC::JSValue::decode(value); | |
if (decodedValue.isEmpty() || !decodedValue.isCell()) | |
return nullptr; | |
JSC::JSCell* cell = decodedValue.asCell(); | |
JSExpectStringMatching* object = JSC::jsDynamicCast<JSExpectStringMatching*>(cell); | |
if (!object) | |
return nullptr; | |
return object->wrapped(); | |
} | |
extern JSC_CALLCONV void* JSC_HOST_CALL_ATTRIBUTES ExpectStringMatching__fromJSDirect(JSC::EncodedJSValue value) { | |
JSC::JSValue decodedValue = JSC::JSValue::decode(value); | |
ASSERT(decodedValue.isCell()); | |
JSC::JSCell* cell = decodedValue.asCell(); | |
JSExpectStringMatching* object = JSC::jsDynamicCast<JSExpectStringMatching*>(cell); | |
if (!object) | |
return nullptr; | |
Zig::GlobalObject* globalObject = jsDynamicCast<Zig::GlobalObject*>(object->globalObject()); | |
if (UNLIKELY(globalObject == nullptr || cell->structureID() != globalObject->JSExpectStringMatchingStructure()->id())) { | |
return nullptr; | |
} | |
return object->wrapped(); | |
} | |
extern JSC_CALLCONV bool JSC_HOST_CALL_ATTRIBUTES ExpectStringMatching__dangerouslySetPtr(JSC::EncodedJSValue value, void* ptr) { | |
JSExpectStringMatching* object = JSC::jsDynamicCast<JSExpectStringMatching*>(JSValue::decode(value)); | |
if (!object) | |
return false; | |
object->m_ctx = ptr; | |
return true; | |
} | |
extern "C" const size_t ExpectStringMatching__ptrOffset = JSExpectStringMatching::offsetOfWrapped(); | |
void JSExpectStringMatching::analyzeHeap(JSCell* cell, HeapAnalyzer& analyzer) | |
{ | |
auto* thisObject = jsCast<JSExpectStringMatching*>(cell); | |
if (void* wrapped = thisObject->wrapped()) { | |
// if (thisObject->scriptExecutionContext()) | |
// analyzer.setLabelForCell(cell, makeString("url ", thisObject->scriptExecutionContext()->url().string())); | |
} | |
Base::analyzeHeap(cell, analyzer); | |
} | |
JSObject* JSExpectStringMatching::createPrototype(VM& vm, JSDOMGlobalObject* globalObject) | |
{ | |
auto *structure = JSExpectStringMatchingPrototype::createStructure(vm, globalObject, globalObject->objectPrototype()); | |
structure->setMayBePrototype(true); | |
return JSExpectStringMatchingPrototype::create(vm, globalObject, structure); | |
} | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES ExpectStringMatching__create(Zig::GlobalObject* globalObject, void* ptr) { | |
auto &vm = globalObject->vm(); | |
JSC::Structure* structure = globalObject->JSExpectStringMatchingStructure(); | |
JSExpectStringMatching* instance = JSExpectStringMatching::create(vm, globalObject, structure, ptr); | |
return JSValue::encode(instance); | |
} | |
template<typename Visitor> | |
void JSExpectStringMatching::visitChildrenImpl(JSCell* cell, Visitor& visitor) | |
{ | |
JSExpectStringMatching* thisObject = jsCast<JSExpectStringMatching*>(cell); | |
ASSERT_GC_OBJECT_INHERITS(thisObject, info()); | |
Base::visitChildren(thisObject, visitor); | |
thisObject->visitAdditionalChildren<Visitor>(visitor); | |
} | |
DEFINE_VISIT_CHILDREN(JSExpectStringMatching); | |
template<typename Visitor> | |
void JSExpectStringMatching::visitAdditionalChildren(Visitor& visitor) | |
{ | |
JSExpectStringMatching* thisObject = this; | |
ASSERT_GC_OBJECT_INHERITS(thisObject, info()); | |
visitor.append(thisObject->m_testValue); | |
} | |
DEFINE_VISIT_ADDITIONAL_CHILDREN(JSExpectStringMatching); | |
template<typename Visitor> | |
void JSExpectStringMatching::visitOutputConstraintsImpl(JSCell *cell, Visitor& visitor) | |
{ | |
JSExpectStringMatching* thisObject = jsCast<JSExpectStringMatching*>(cell); | |
ASSERT_GC_OBJECT_INHERITS(thisObject, info()); | |
thisObject->visitAdditionalChildren<Visitor>(visitor); | |
} | |
DEFINE_VISIT_OUTPUT_CONSTRAINTS(JSExpectStringMatching); | |
class JSFFIPrototype final : public JSC::JSNonFinalObject { | |
public: | |
using Base = JSC::JSNonFinalObject; | |
static JSFFIPrototype* create(JSC::VM& vm, JSGlobalObject* globalObject, JSC::Structure* structure) | |
{ | |
JSFFIPrototype* ptr = new (NotNull, JSC::allocateCell<JSFFIPrototype>(vm)) JSFFIPrototype(vm, globalObject, structure); | |
ptr->finishCreation(vm, globalObject); | |
return ptr; | |
} | |
DECLARE_INFO; | |
template<typename CellType, JSC::SubspaceAccess> | |
static JSC::GCClient::IsoSubspace* subspaceFor(JSC::VM& vm) | |
{ | |
STATIC_ASSERT_ISO_SUBSPACE_SHARABLE(JSFFIPrototype, Base); | |
return &vm.plainObjectSpace(); | |
} | |
static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype) | |
{ | |
return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info()); | |
} | |
private: | |
JSFFIPrototype(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure) | |
: Base(vm, structure) | |
{ | |
} | |
void finishCreation(JSC::VM&, JSC::JSGlobalObject*); | |
}; | |
JSC_DECLARE_HOST_FUNCTION(FFIPrototype__closeCallback); | |
JSC_DECLARE_CUSTOM_GETTER(FFIPrototype__symbolsGetterWrap); | |
STATIC_ASSERT_ISO_SUBSPACE_SHARABLE(JSFFIPrototype, JSFFIPrototype::Base); | |
static const HashTableValue JSFFIPrototypeTableValues[2] = { | |
{ "close"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, FFIPrototype__closeCallback, 0 } } , | |
{ "symbols"_s, static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::GetterSetterType, FFIPrototype__symbolsGetterWrap, 0 } } | |
}; | |
const ClassInfo JSFFIPrototype::s_info = { "FFI"_s, &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSFFIPrototype) }; | |
JSC_DEFINE_CUSTOM_GETTER(jsFFIConstructor, (JSGlobalObject * lexicalGlobalObject, EncodedJSValue thisValue, PropertyName)) | |
{ | |
VM& vm = JSC::getVM(lexicalGlobalObject); | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
auto* globalObject = reinterpret_cast<Zig::GlobalObject*>(lexicalGlobalObject); | |
auto* prototype = jsDynamicCast<JSFFIPrototype*>(JSValue::decode(thisValue)); | |
if (UNLIKELY(!prototype)) | |
return throwVMTypeError(lexicalGlobalObject, throwScope, "Cannot get constructor for FFI"_s); | |
return JSValue::encode(globalObject->JSFFIConstructor()); | |
} | |
JSC_DEFINE_HOST_FUNCTION(FFIPrototype__closeCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSFFI* thisObject = jsDynamicCast<JSFFI*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof FFI"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = FFIPrototype__close(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "FFI.close returned an empty value without an exception"); | |
return result; | |
#endif | |
return FFIPrototype__close(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_CUSTOM_GETTER(FFIPrototype__symbolsGetterWrap, (JSGlobalObject * lexicalGlobalObject, EncodedJSValue encodedThisValue, PropertyName attributeName)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
Zig::GlobalObject *globalObject = reinterpret_cast<Zig::GlobalObject*>(lexicalGlobalObject); | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
JSFFI* thisObject = jsCast<JSFFI*>(JSValue::decode(encodedThisValue)); | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
if (JSValue cachedValue = thisObject->m_symbolsValue.get()) | |
return JSValue::encode(cachedValue); | |
JSC::JSValue result = JSC::JSValue::decode( | |
FFIPrototype__getSymbols(thisObject->wrapped(), globalObject) | |
); | |
RETURN_IF_EXCEPTION(throwScope, {}); | |
thisObject->m_symbolsValue.set(vm, thisObject, result); | |
RELEASE_AND_RETURN(throwScope, JSValue::encode(result)); | |
} | |
extern JSC_CALLCONV void FFIPrototype__symbolsSetCachedValue(JSC::EncodedJSValue thisValue, JSC::JSGlobalObject *globalObject, JSC::EncodedJSValue value) | |
{ | |
auto& vm = globalObject->vm(); | |
auto* thisObject = jsCast<JSFFI*>(JSValue::decode(thisValue)); | |
thisObject->m_symbolsValue.set(vm, thisObject, JSValue::decode(value)); | |
} | |
extern JSC_CALLCONV JSC::EncodedJSValue FFIPrototype__symbolsGetCachedValue(JSC::EncodedJSValue thisValue) | |
{ | |
auto* thisObject = jsCast<JSFFI*>(JSValue::decode(thisValue)); | |
return JSValue::encode(thisObject->m_symbolsValue.get()); | |
} | |
extern JSC_CALLCONV void FFIPrototype__symbolsValueSetCachedValue(JSC::EncodedJSValue thisValue, JSC::JSGlobalObject *globalObject, JSC::EncodedJSValue value) | |
{ | |
auto& vm = globalObject->vm(); | |
auto* thisObject = jsCast<JSFFI*>(JSValue::decode(thisValue)); | |
thisObject->m_symbolsValue.set(vm, thisObject, JSValue::decode(value)); | |
} | |
extern JSC_CALLCONV JSC::EncodedJSValue FFIPrototype__symbolsValueGetCachedValue(JSC::EncodedJSValue thisValue) | |
{ | |
auto* thisObject = jsCast<JSFFI*>(JSValue::decode(thisValue)); | |
return JSValue::encode(thisObject->m_symbolsValue.get()); | |
} | |
void JSFFIPrototype::finishCreation(JSC::VM& vm, JSC::JSGlobalObject* globalObject) | |
{ | |
Base::finishCreation(vm); | |
reifyStaticProperties(vm, JSFFI::info(), JSFFIPrototypeTableValues, *this); | |
JSC_TO_STRING_TAG_WITHOUT_TRANSITION(); | |
} | |
JSFFI::~JSFFI() | |
{ | |
if (LIKELY(m_ctx)) { | |
FFIClass__finalize(m_ctx); | |
} | |
} | |
void JSFFI::destroy(JSCell* cell) | |
{ | |
static_cast<JSFFI*>(cell)->JSFFI::~JSFFI(); | |
} | |
const ClassInfo JSFFI::s_info = { "FFI"_s, &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSFFI) }; | |
void JSFFI::finishCreation(VM& vm) | |
{ | |
Base::finishCreation(vm); | |
ASSERT(inherits(info())); | |
} | |
JSFFI* JSFFI::create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure, void* ctx) { | |
JSFFI* ptr = new (NotNull, JSC::allocateCell<JSFFI>(vm)) JSFFI(vm, structure, ctx); | |
ptr->finishCreation(vm); | |
return ptr; | |
} | |
extern JSC_CALLCONV void* JSC_HOST_CALL_ATTRIBUTES FFI__fromJS(JSC::EncodedJSValue value) { | |
JSC::JSValue decodedValue = JSC::JSValue::decode(value); | |
if (decodedValue.isEmpty() || !decodedValue.isCell()) | |
return nullptr; | |
JSC::JSCell* cell = decodedValue.asCell(); | |
JSFFI* object = JSC::jsDynamicCast<JSFFI*>(cell); | |
if (!object) | |
return nullptr; | |
return object->wrapped(); | |
} | |
extern JSC_CALLCONV void* JSC_HOST_CALL_ATTRIBUTES FFI__fromJSDirect(JSC::EncodedJSValue value) { | |
JSC::JSValue decodedValue = JSC::JSValue::decode(value); | |
ASSERT(decodedValue.isCell()); | |
JSC::JSCell* cell = decodedValue.asCell(); | |
JSFFI* object = JSC::jsDynamicCast<JSFFI*>(cell); | |
if (!object) | |
return nullptr; | |
Zig::GlobalObject* globalObject = jsDynamicCast<Zig::GlobalObject*>(object->globalObject()); | |
if (UNLIKELY(globalObject == nullptr || cell->structureID() != globalObject->JSFFIStructure()->id())) { | |
return nullptr; | |
} | |
return object->wrapped(); | |
} | |
extern JSC_CALLCONV bool JSC_HOST_CALL_ATTRIBUTES FFI__dangerouslySetPtr(JSC::EncodedJSValue value, void* ptr) { | |
JSFFI* object = JSC::jsDynamicCast<JSFFI*>(JSValue::decode(value)); | |
if (!object) | |
return false; | |
object->m_ctx = ptr; | |
return true; | |
} | |
extern "C" const size_t FFI__ptrOffset = JSFFI::offsetOfWrapped(); | |
void JSFFI::analyzeHeap(JSCell* cell, HeapAnalyzer& analyzer) | |
{ | |
auto* thisObject = jsCast<JSFFI*>(cell); | |
if (void* wrapped = thisObject->wrapped()) { | |
// if (thisObject->scriptExecutionContext()) | |
// analyzer.setLabelForCell(cell, makeString("url ", thisObject->scriptExecutionContext()->url().string())); | |
} | |
Base::analyzeHeap(cell, analyzer); | |
} | |
JSObject* JSFFI::createPrototype(VM& vm, JSDOMGlobalObject* globalObject) | |
{ | |
auto *structure = JSFFIPrototype::createStructure(vm, globalObject, globalObject->objectPrototype()); | |
structure->setMayBePrototype(true); | |
return JSFFIPrototype::create(vm, globalObject, structure); | |
} | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES FFI__create(Zig::GlobalObject* globalObject, void* ptr) { | |
auto &vm = globalObject->vm(); | |
JSC::Structure* structure = globalObject->JSFFIStructure(); | |
JSFFI* instance = JSFFI::create(vm, globalObject, structure, ptr); | |
return JSValue::encode(instance); | |
} | |
template<typename Visitor> | |
void JSFFI::visitChildrenImpl(JSCell* cell, Visitor& visitor) | |
{ | |
JSFFI* thisObject = jsCast<JSFFI*>(cell); | |
ASSERT_GC_OBJECT_INHERITS(thisObject, info()); | |
Base::visitChildren(thisObject, visitor); | |
thisObject->visitAdditionalChildren<Visitor>(visitor); | |
} | |
DEFINE_VISIT_CHILDREN(JSFFI); | |
template<typename Visitor> | |
void JSFFI::visitAdditionalChildren(Visitor& visitor) | |
{ | |
JSFFI* thisObject = this; | |
ASSERT_GC_OBJECT_INHERITS(thisObject, info()); | |
visitor.append(thisObject->m_symbolsValue); | |
} | |
DEFINE_VISIT_ADDITIONAL_CHILDREN(JSFFI); | |
template<typename Visitor> | |
void JSFFI::visitOutputConstraintsImpl(JSCell *cell, Visitor& visitor) | |
{ | |
JSFFI* thisObject = jsCast<JSFFI*>(cell); | |
ASSERT_GC_OBJECT_INHERITS(thisObject, info()); | |
thisObject->visitAdditionalChildren<Visitor>(visitor); | |
} | |
DEFINE_VISIT_OUTPUT_CONSTRAINTS(JSFFI); | |
class JSFSWatcherPrototype final : public JSC::JSNonFinalObject { | |
public: | |
using Base = JSC::JSNonFinalObject; | |
static JSFSWatcherPrototype* create(JSC::VM& vm, JSGlobalObject* globalObject, JSC::Structure* structure) | |
{ | |
JSFSWatcherPrototype* ptr = new (NotNull, JSC::allocateCell<JSFSWatcherPrototype>(vm)) JSFSWatcherPrototype(vm, globalObject, structure); | |
ptr->finishCreation(vm, globalObject); | |
return ptr; | |
} | |
DECLARE_INFO; | |
template<typename CellType, JSC::SubspaceAccess> | |
static JSC::GCClient::IsoSubspace* subspaceFor(JSC::VM& vm) | |
{ | |
STATIC_ASSERT_ISO_SUBSPACE_SHARABLE(JSFSWatcherPrototype, Base); | |
return &vm.plainObjectSpace(); | |
} | |
static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype) | |
{ | |
return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info()); | |
} | |
private: | |
JSFSWatcherPrototype(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure) | |
: Base(vm, structure) | |
{ | |
} | |
void finishCreation(JSC::VM&, JSC::JSGlobalObject*); | |
}; | |
JSC_DECLARE_HOST_FUNCTION(FSWatcherPrototype__closeCallback); | |
JSC_DECLARE_HOST_FUNCTION(FSWatcherPrototype__hasRefCallback); | |
JSC_DECLARE_HOST_FUNCTION(FSWatcherPrototype__refCallback); | |
JSC_DECLARE_HOST_FUNCTION(FSWatcherPrototype__unrefCallback); | |
STATIC_ASSERT_ISO_SUBSPACE_SHARABLE(JSFSWatcherPrototype, JSFSWatcherPrototype::Base); | |
static const HashTableValue JSFSWatcherPrototypeTableValues[4] = { | |
{ "close"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, FSWatcherPrototype__closeCallback, 0 } } , | |
{ "hasRef"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, FSWatcherPrototype__hasRefCallback, 0 } } , | |
{ "ref"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, FSWatcherPrototype__refCallback, 0 } } , | |
{ "unref"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, FSWatcherPrototype__unrefCallback, 0 } } | |
}; | |
const ClassInfo JSFSWatcherPrototype::s_info = { "FSWatcher"_s, &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSFSWatcherPrototype) }; | |
JSC_DEFINE_HOST_FUNCTION(FSWatcherPrototype__closeCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSFSWatcher* thisObject = jsDynamicCast<JSFSWatcher*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof FSWatcher"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = FSWatcherPrototype__doClose(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "FSWatcher.doClose returned an empty value without an exception"); | |
return result; | |
#endif | |
return FSWatcherPrototype__doClose(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_HOST_FUNCTION(FSWatcherPrototype__hasRefCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSFSWatcher* thisObject = jsDynamicCast<JSFSWatcher*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof FSWatcher"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = FSWatcherPrototype__hasRef(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "FSWatcher.hasRef returned an empty value without an exception"); | |
return result; | |
#endif | |
return FSWatcherPrototype__hasRef(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_HOST_FUNCTION(FSWatcherPrototype__refCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSFSWatcher* thisObject = jsDynamicCast<JSFSWatcher*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof FSWatcher"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = FSWatcherPrototype__doRef(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "FSWatcher.doRef returned an empty value without an exception"); | |
return result; | |
#endif | |
return FSWatcherPrototype__doRef(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_HOST_FUNCTION(FSWatcherPrototype__unrefCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSFSWatcher* thisObject = jsDynamicCast<JSFSWatcher*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof FSWatcher"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = FSWatcherPrototype__doUnref(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "FSWatcher.doUnref returned an empty value without an exception"); | |
return result; | |
#endif | |
return FSWatcherPrototype__doUnref(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
extern JSC_CALLCONV void FSWatcherPrototype__listenerSetCachedValue(JSC::EncodedJSValue thisValue, JSC::JSGlobalObject *globalObject, JSC::EncodedJSValue value) | |
{ | |
auto& vm = globalObject->vm(); | |
auto* thisObject = jsCast<JSFSWatcher*>(JSValue::decode(thisValue)); | |
thisObject->m_listener.set(vm, thisObject, JSValue::decode(value)); | |
} | |
extern JSC_CALLCONV JSC::EncodedJSValue FSWatcherPrototype__listenerGetCachedValue(JSC::EncodedJSValue thisValue) | |
{ | |
auto* thisObject = jsCast<JSFSWatcher*>(JSValue::decode(thisValue)); | |
return JSValue::encode(thisObject->m_listener.get()); | |
} | |
void JSFSWatcherPrototype::finishCreation(JSC::VM& vm, JSC::JSGlobalObject* globalObject) | |
{ | |
Base::finishCreation(vm); | |
reifyStaticProperties(vm, JSFSWatcher::info(), JSFSWatcherPrototypeTableValues, *this); | |
JSC_TO_STRING_TAG_WITHOUT_TRANSITION(); | |
} | |
bool JSFSWatcher::hasPendingActivity(void* ctx) { | |
return FSWatcher__hasPendingActivity(ctx); | |
} | |
JSFSWatcher::~JSFSWatcher() | |
{ | |
if (LIKELY(m_ctx)) { | |
FSWatcherClass__finalize(m_ctx); | |
} | |
} | |
void JSFSWatcher::destroy(JSCell* cell) | |
{ | |
static_cast<JSFSWatcher*>(cell)->JSFSWatcher::~JSFSWatcher(); | |
} | |
const ClassInfo JSFSWatcher::s_info = { "FSWatcher"_s, &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSFSWatcher) }; | |
void JSFSWatcher::finishCreation(VM& vm) | |
{ | |
Base::finishCreation(vm); | |
ASSERT(inherits(info())); | |
} | |
JSFSWatcher* JSFSWatcher::create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure, void* ctx) { | |
JSFSWatcher* ptr = new (NotNull, JSC::allocateCell<JSFSWatcher>(vm)) JSFSWatcher(vm, structure, ctx); | |
ptr->finishCreation(vm); | |
return ptr; | |
} | |
extern JSC_CALLCONV void* JSC_HOST_CALL_ATTRIBUTES FSWatcher__fromJS(JSC::EncodedJSValue value) { | |
JSC::JSValue decodedValue = JSC::JSValue::decode(value); | |
if (decodedValue.isEmpty() || !decodedValue.isCell()) | |
return nullptr; | |
JSC::JSCell* cell = decodedValue.asCell(); | |
JSFSWatcher* object = JSC::jsDynamicCast<JSFSWatcher*>(cell); | |
if (!object) | |
return nullptr; | |
return object->wrapped(); | |
} | |
extern JSC_CALLCONV void* JSC_HOST_CALL_ATTRIBUTES FSWatcher__fromJSDirect(JSC::EncodedJSValue value) { | |
JSC::JSValue decodedValue = JSC::JSValue::decode(value); | |
ASSERT(decodedValue.isCell()); | |
JSC::JSCell* cell = decodedValue.asCell(); | |
JSFSWatcher* object = JSC::jsDynamicCast<JSFSWatcher*>(cell); | |
if (!object) | |
return nullptr; | |
Zig::GlobalObject* globalObject = jsDynamicCast<Zig::GlobalObject*>(object->globalObject()); | |
if (UNLIKELY(globalObject == nullptr || cell->structureID() != globalObject->JSFSWatcherStructure()->id())) { | |
return nullptr; | |
} | |
return object->wrapped(); | |
} | |
extern JSC_CALLCONV bool JSC_HOST_CALL_ATTRIBUTES FSWatcher__dangerouslySetPtr(JSC::EncodedJSValue value, void* ptr) { | |
JSFSWatcher* object = JSC::jsDynamicCast<JSFSWatcher*>(JSValue::decode(value)); | |
if (!object) | |
return false; | |
object->m_ctx = ptr; | |
return true; | |
} | |
extern "C" const size_t FSWatcher__ptrOffset = JSFSWatcher::offsetOfWrapped(); | |
void JSFSWatcher::analyzeHeap(JSCell* cell, HeapAnalyzer& analyzer) | |
{ | |
auto* thisObject = jsCast<JSFSWatcher*>(cell); | |
if (void* wrapped = thisObject->wrapped()) { | |
// if (thisObject->scriptExecutionContext()) | |
// analyzer.setLabelForCell(cell, makeString("url ", thisObject->scriptExecutionContext()->url().string())); | |
} | |
Base::analyzeHeap(cell, analyzer); | |
} | |
JSObject* JSFSWatcher::createPrototype(VM& vm, JSDOMGlobalObject* globalObject) | |
{ | |
auto *structure = JSFSWatcherPrototype::createStructure(vm, globalObject, globalObject->objectPrototype()); | |
structure->setMayBePrototype(true); | |
return JSFSWatcherPrototype::create(vm, globalObject, structure); | |
} | |
extern JSC_CALLCONV JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES FSWatcher__create(Zig::GlobalObject* globalObject, void* ptr) { | |
auto &vm = globalObject->vm(); | |
JSC::Structure* structure = globalObject->JSFSWatcherStructure(); | |
JSFSWatcher* instance = JSFSWatcher::create(vm, globalObject, structure, ptr); | |
return JSValue::encode(instance); | |
} | |
template<typename Visitor> | |
void JSFSWatcher::visitChildrenImpl(JSCell* cell, Visitor& visitor) | |
{ | |
JSFSWatcher* thisObject = jsCast<JSFSWatcher*>(cell); | |
ASSERT_GC_OBJECT_INHERITS(thisObject, info()); | |
Base::visitChildren(thisObject, visitor); | |
thisObject->visitAdditionalChildren<Visitor>(visitor); | |
} | |
DEFINE_VISIT_CHILDREN(JSFSWatcher); | |
template<typename Visitor> | |
void JSFSWatcher::visitAdditionalChildren(Visitor& visitor) | |
{ | |
JSFSWatcher* thisObject = this; | |
ASSERT_GC_OBJECT_INHERITS(thisObject, info()); | |
visitor.append(thisObject->m_listener); | |
visitor.addOpaqueRoot(this->wrapped()); | |
} | |
DEFINE_VISIT_ADDITIONAL_CHILDREN(JSFSWatcher); | |
template<typename Visitor> | |
void JSFSWatcher::visitOutputConstraintsImpl(JSCell *cell, Visitor& visitor) | |
{ | |
JSFSWatcher* thisObject = jsCast<JSFSWatcher*>(cell); | |
ASSERT_GC_OBJECT_INHERITS(thisObject, info()); | |
thisObject->visitAdditionalChildren<Visitor>(visitor); | |
} | |
DEFINE_VISIT_OUTPUT_CONSTRAINTS(JSFSWatcher); | |
class JSFileInternalReadableStreamSourcePrototype final : public JSC::JSNonFinalObject { | |
public: | |
using Base = JSC::JSNonFinalObject; | |
static JSFileInternalReadableStreamSourcePrototype* create(JSC::VM& vm, JSGlobalObject* globalObject, JSC::Structure* structure) | |
{ | |
JSFileInternalReadableStreamSourcePrototype* ptr = new (NotNull, JSC::allocateCell<JSFileInternalReadableStreamSourcePrototype>(vm)) JSFileInternalReadableStreamSourcePrototype(vm, globalObject, structure); | |
ptr->finishCreation(vm, globalObject); | |
return ptr; | |
} | |
DECLARE_INFO; | |
template<typename CellType, JSC::SubspaceAccess> | |
static JSC::GCClient::IsoSubspace* subspaceFor(JSC::VM& vm) | |
{ | |
STATIC_ASSERT_ISO_SUBSPACE_SHARABLE(JSFileInternalReadableStreamSourcePrototype, Base); | |
return &vm.plainObjectSpace(); | |
} | |
static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype) | |
{ | |
return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info()); | |
} | |
private: | |
JSFileInternalReadableStreamSourcePrototype(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure) | |
: Base(vm, structure) | |
{ | |
} | |
void finishCreation(JSC::VM&, JSC::JSGlobalObject*); | |
}; | |
JSC_DECLARE_HOST_FUNCTION(FileInternalReadableStreamSourcePrototype__cancelCallback); | |
JSC_DECLARE_HOST_FUNCTION(FileInternalReadableStreamSourcePrototype__drainCallback); | |
JSC_DECLARE_CUSTOM_GETTER(FileInternalReadableStreamSourcePrototype__isClosedGetterWrap); | |
JSC_DECLARE_CUSTOM_GETTER(FileInternalReadableStreamSourcePrototype__onCloseGetterWrap); | |
static JSC_DECLARE_CUSTOM_SETTER(FileInternalReadableStreamSourcePrototype__onCloseSetterWrap); | |
JSC_DECLARE_CUSTOM_GETTER(FileInternalReadableStreamSourcePrototype__onDrainGetterWrap); | |
static JSC_DECLARE_CUSTOM_SETTER(FileInternalReadableStreamSourcePrototype__onDrainSetterWrap); | |
JSC_DECLARE_HOST_FUNCTION(FileInternalReadableStreamSourcePrototype__pullCallback); | |
JSC_DECLARE_HOST_FUNCTION(FileInternalReadableStreamSourcePrototype__setRawModeCallback); | |
JSC_DECLARE_HOST_FUNCTION(FileInternalReadableStreamSourcePrototype__startCallback); | |
JSC_DECLARE_HOST_FUNCTION(FileInternalReadableStreamSourcePrototype__updateRefCallback); | |
STATIC_ASSERT_ISO_SUBSPACE_SHARABLE(JSFileInternalReadableStreamSourcePrototype, JSFileInternalReadableStreamSourcePrototype::Base); | |
static const HashTableValue JSFileInternalReadableStreamSourcePrototypeTableValues[9] = { | |
{ "cancel"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, FileInternalReadableStreamSourcePrototype__cancelCallback, 1 } } , | |
{ "drain"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, FileInternalReadableStreamSourcePrototype__drainCallback, 1 } } , | |
{ "isClosed"_s, static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::GetterSetterType, FileInternalReadableStreamSourcePrototype__isClosedGetterWrap, 0 } } , | |
{ "onClose"_s, static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::GetterSetterType, FileInternalReadableStreamSourcePrototype__onCloseGetterWrap, FileInternalReadableStreamSourcePrototype__onCloseSetterWrap } } , | |
{ "onDrain"_s, static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::GetterSetterType, FileInternalReadableStreamSourcePrototype__onDrainGetterWrap, FileInternalReadableStreamSourcePrototype__onDrainSetterWrap } } , | |
{ "pull"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, FileInternalReadableStreamSourcePrototype__pullCallback, 1 } } , | |
{ "setRawMode"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, FileInternalReadableStreamSourcePrototype__setRawModeCallback, 1 } } , | |
{ "start"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, FileInternalReadableStreamSourcePrototype__startCallback, 1 } } , | |
{ "updateRef"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, FileInternalReadableStreamSourcePrototype__updateRefCallback, 1 } } | |
}; | |
const ClassInfo JSFileInternalReadableStreamSourcePrototype::s_info = { "FileInternalReadableStreamSource"_s, &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSFileInternalReadableStreamSourcePrototype) }; | |
JSC_DEFINE_HOST_FUNCTION(FileInternalReadableStreamSourcePrototype__cancelCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSFileInternalReadableStreamSource* thisObject = jsDynamicCast<JSFileInternalReadableStreamSource*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof FileInternalReadableStreamSource"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = FileInternalReadableStreamSourcePrototype__cancelFromJS(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "FileInternalReadableStreamSource.cancelFromJS returned an empty value without an exception"); | |
return result; | |
#endif | |
return FileInternalReadableStreamSourcePrototype__cancelFromJS(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_HOST_FUNCTION(FileInternalReadableStreamSourcePrototype__drainCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
JSFileInternalReadableStreamSource* thisObject = jsDynamicCast<JSFileInternalReadableStreamSource*>(callFrame->thisValue()); | |
if (UNLIKELY(!thisObject)) { | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
throwVMTypeError(lexicalGlobalObject, throwScope, "Expected 'this' to be instanceof FileInternalReadableStreamSource"_s); | |
return JSValue::encode({}); | |
} | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
#ifdef BUN_DEBUG | |
/** View the file name of the JS file that called this function | |
* from a debugger */ | |
SourceOrigin sourceOrigin = callFrame->callerSourceOrigin(vm); | |
const char* fileName = sourceOrigin.string().utf8().data(); | |
static const char* lastFileName = nullptr; | |
if (lastFileName != fileName) { | |
lastFileName = fileName; | |
} | |
JSC::EncodedJSValue result = FileInternalReadableStreamSourcePrototype__drainFromJS(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
ASSERT_WITH_MESSAGE(!JSValue::decode(result).isEmpty() or DECLARE_CATCH_SCOPE(vm).exception() != 0, "FileInternalReadableStreamSource.drainFromJS returned an empty value without an exception"); | |
return result; | |
#endif | |
return FileInternalReadableStreamSourcePrototype__drainFromJS(thisObject->wrapped(), lexicalGlobalObject, callFrame); | |
} | |
JSC_DEFINE_CUSTOM_GETTER(FileInternalReadableStreamSourcePrototype__isClosedGetterWrap, (JSGlobalObject * lexicalGlobalObject, EncodedJSValue encodedThisValue, PropertyName attributeName)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
Zig::GlobalObject *globalObject = reinterpret_cast<Zig::GlobalObject*>(lexicalGlobalObject); | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
JSFileInternalReadableStreamSource* thisObject = jsCast<JSFileInternalReadableStreamSource*>(JSValue::decode(encodedThisValue)); | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
JSC::EncodedJSValue result = FileInternalReadableStreamSourcePrototype__getIsClosedFromJS(thisObject->wrapped(), globalObject); | |
RETURN_IF_EXCEPTION(throwScope, {}); | |
RELEASE_AND_RETURN(throwScope, result); | |
} | |
JSC_DEFINE_CUSTOM_GETTER(FileInternalReadableStreamSourcePrototype__onCloseGetterWrap, (JSGlobalObject * lexicalGlobalObject, EncodedJSValue encodedThisValue, PropertyName attributeName)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
Zig::GlobalObject *globalObject = reinterpret_cast<Zig::GlobalObject*>(lexicalGlobalObject); | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
JSFileInternalReadableStreamSource* thisObject = jsCast<JSFileInternalReadableStreamSource*>(JSValue::decode(encodedThisValue)); | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
JSC::EncodedJSValue result = FileInternalReadableStreamSourcePrototype__getOnCloseFromJS(thisObject->wrapped(), globalObject); | |
RETURN_IF_EXCEPTION(throwScope, {}); | |
RELEASE_AND_RETURN(throwScope, result); | |
} | |
JSC_DEFINE_CUSTOM_SETTER(FileInternalReadableStreamSourcePrototype__onCloseSetterWrap, (JSGlobalObject * lexicalGlobalObject, EncodedJSValue encodedThisValue, EncodedJSValue encodedValue, PropertyName attributeName)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
JSFileInternalReadableStreamSource* thisObject = jsCast<JSFileInternalReadableStreamSource*>(JSValue::decode(encodedThisValue)); | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
auto result = FileInternalReadableStreamSourcePrototype__setOnCloseFromJS(thisObject->wrapped(), lexicalGlobalObject, encodedValue); | |
RELEASE_AND_RETURN(throwScope, result); | |
} | |
JSC_DEFINE_CUSTOM_GETTER(FileInternalReadableStreamSourcePrototype__onDrainGetterWrap, (JSGlobalObject * lexicalGlobalObject, EncodedJSValue encodedThisValue, PropertyName attributeName)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
Zig::GlobalObject *globalObject = reinterpret_cast<Zig::GlobalObject*>(lexicalGlobalObject); | |
auto throwScope = DECLARE_THROW_SCOPE(vm); | |
JSFileInternalReadableStreamSource* thisObject = jsCast<JSFileInternalReadableStreamSource*>(JSValue::decode(encodedThisValue)); | |
JSC::EnsureStillAliveScope thisArg = JSC::EnsureStillAliveScope(thisObject); | |
JSC::EncodedJSValue result = FileInternalReadableStreamSourcePrototype__getOnDrainFromJS(thisObject->wrapped(), globalObject); | |
RETURN_IF_EXCEPTION(throwScope, {}); | |
RELEASE_AND_RETURN(throwScope, result); | |
} | |
JSC_DEFINE_CUSTOM_SETTER(FileInternalReadableStreamSourcePrototype__onDrainSetterWrap, (JSGlobalObject * lexicalGlobalObject, EncodedJSValue encodedThisValue, EncodedJSValue encodedValue, PropertyName attributeName)) | |
{ | |
auto& vm = lexicalGlobalObject->vm(); | |
a |
View raw
(Sorry about that, but we can’t show files that are this big right now.)
View raw
(Sorry about that, but we can’t show files that are this big right now.)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment