aboutsummaryrefslogtreecommitdiff
path: root/src/javascript/jsc/bindings/DefaultGlobal.cpp
blob: 42e5c962cbda6493959c0b3816e3a09b61813668 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160

#include "root.h"
#include "DefaultGlobal.h"

#include <wtf/text/AtomStringImpl.h>

#include <JavaScriptCore/APICast.h>
#include <JavaScriptCore/CallFrameInlines.h>
#include <JavaScriptCore/CatchScope.h>
#include <JavaScriptCore/Completion.h>
#include <JavaScriptCore/Error.h>
#include <JavaScriptCore/Exception.h>
#include <JavaScriptCore/JSContextInternal.h>
#include <JavaScriptCore/JSInternalPromise.h>
#include <JavaScriptCore/JSModuleLoader.h>
#include <JavaScriptCore/JSNativeStdFunction.h>
#include <JavaScriptCore/JSPromise.h>
#include <JavaScriptCore/JSSourceCode.h>
#include <JavaScriptCore/JSValueInternal.h>
#include <JavaScriptCore/JSVirtualMachineInternal.h>
#include <JavaScriptCore/JavaScriptCore.h>
#include <JavaScriptCore/ObjectConstructor.h>
#include <JavaScriptCore/SourceOrigin.h>
#include <wtf/URL.h>

#include "JSCInlines.h"



class Script;
namespace JSC {
    class Identifier;
    class JSObject;
    class JSString;

}





namespace Wundle {



const ClassInfo DefaultGlobal::s_info = { "GlobalObject", &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(DefaultGlobal) };
const GlobalObjectMethodTable DefaultGlobal::s_globalObjectMethodTable = {
    &supportsRichSourceInfo,
    &shouldInterruptScript,
    &javaScriptRuntimeFlags,
    nullptr, // queueTaskToEventLoop
    &shouldInterruptScriptBeforeTimeout,
    &moduleLoaderImportModule, // moduleLoaderImportModule
    &moduleLoaderResolve, // moduleLoaderResolve
    &moduleLoaderFetch, // moduleLoaderFetch
    &moduleLoaderCreateImportMetaProperties, // moduleLoaderCreateImportMetaProperties
    &moduleLoaderEvaluate, // moduleLoaderEvaluate
    nullptr, // promiseRejectionTracker
    &reportUncaughtExceptionAtEventLoop,
    &currentScriptExecutionOwner,
    &scriptExecutionStatus,
    nullptr, // defaultLanguage
    nullptr, // compileStreaming
    nullptr, // instantiateStreaming
};


void DefaultGlobal::reportUncaughtExceptionAtEventLoop(JSGlobalObject* globalObject, Exception* exception) {}
JSC::Identifier DefaultGlobal::moduleLoaderResolve(JSGlobalObject* globalObject, JSModuleLoader* loader, JSValue key, JSValue referrer, JSValue val) {
    String string = key.toWTFString(globalObject);
    return JSC::Identifier::fromString(globalObject->vm(),  string );
}
JSInternalPromise* DefaultGlobal::moduleLoaderImportModule(JSGlobalObject* globalObject, JSModuleLoader*, JSString* specifierValue, JSValue, const SourceOrigin& sourceOrigin) {
    return nullptr;
}
JSInternalPromise* DefaultGlobal::moduleLoaderFetch(JSGlobalObject* globalObject, JSModuleLoader*, JSValue key, JSValue, JSValue) {
    return nullptr;
}
JSC::JSObject* DefaultGlobal::moduleLoaderCreateImportMetaProperties(JSGlobalObject* globalObject, JSModuleLoader*loader, JSValue key, JSModuleRecord* record, JSValue value) {
    return nullptr;
}
JSValue DefaultGlobal::moduleLoaderEvaluate(JSGlobalObject* globalObject, JSModuleLoader* moduleLoader, JSValue key, JSValue moduleRecordValue, JSValue scriptFetcher, JSValue sentValue, JSValue resumeMode) {
  return jsNull();
}

using namespace JSC;


JSC::ObjectPrototype* JSC__JSGlobalObject__objectPrototype(JSC::JSGlobalObject* arg0) {
    return arg0->objectPrototype();
}
JSC::FunctionPrototype* JSC__JSGlobalObject__functionPrototype(JSC::JSGlobalObject* arg0) {
    return arg0->functionPrototype();
}
JSC::ArrayPrototype* JSC__JSGlobalObject__arrayPrototype(JSC::JSGlobalObject* arg0) {
    return arg0->arrayPrototype();
}
JSC::JSObject* JSC__JSGlobalObject__booleanPrototype(JSC::JSGlobalObject* arg0) {
    return arg0->booleanPrototype();
}
JSC::StringPrototype* JSC__JSGlobalObject__stringPrototype(JSC::JSGlobalObject* arg0) {
    return arg0->stringPrototype();
}
JSC::JSObject* JSC__JSGlobalObject__numberPrototype(JSC::JSGlobalObject* arg0) {
    return arg0->numberPrototype();
}
JSC::BigIntPrototype* JSC__JSGlobalObject__bigIntPrototype(JSC::JSGlobalObject* arg0) {
    return arg0->bigIntPrototype();
}
JSC::JSObject* JSC__JSGlobalObject__datePrototype(JSC::JSGlobalObject* arg0) {
    return arg0->datePrototype();
}
JSC::JSObject* JSC__JSGlobalObject__symbolPrototype(JSC::JSGlobalObject* arg0) {
    return arg0->symbolPrototype();
}
JSC::RegExpPrototype* JSC__JSGlobalObject__regExpPrototype(JSC::JSGlobalObject* arg0) {
    return arg0->regExpPrototype();
}
JSC::JSObject* JSC__JSGlobalObject__errorPrototype(JSC::JSGlobalObject* arg0) {
    return arg0->errorPrototype();
}
JSC::IteratorPrototype* JSC__JSGlobalObject__iteratorPrototype(JSC::JSGlobalObject* arg0) {
    return arg0->iteratorPrototype();
}
JSC::AsyncIteratorPrototype* JSC__JSGlobalObject__asyncIteratorPrototype(JSC::JSGlobalObject* arg0) {
    return arg0->asyncIteratorPrototype();
}
JSC::GeneratorFunctionPrototype* JSC__JSGlobalObject__generatorFunctionPrototype(JSC::JSGlobalObject* arg0) {
    return arg0->generatorFunctionPrototype();
}
JSC::GeneratorPrototype* JSC__JSGlobalObject__generatorPrototype(JSC::JSGlobalObject* arg0) {
    return arg0->generatorPrototype();
}
JSC::AsyncFunctionPrototype* JSC__JSGlobalObject__asyncFunctionPrototype(JSC::JSGlobalObject* arg0) {
    return arg0->asyncFunctionPrototype();
}
JSC::ArrayIteratorPrototype* JSC__JSGlobalObject__arrayIteratorPrototype(JSC::JSGlobalObject* arg0) {
    return arg0->arrayIteratorPrototype();
}
JSC::MapIteratorPrototype* JSC__JSGlobalObject__mapIteratorPrototype(JSC::JSGlobalObject* arg0) {
    return arg0->mapIteratorPrototype();
}
JSC::SetIteratorPrototype* JSC__JSGlobalObject__setIteratorPrototype(JSC::JSGlobalObject* arg0) {
    return arg0->setIteratorPrototype();
}
JSC::JSObject* JSC__JSGlobalObject__mapPrototype(JSC::JSGlobalObject* arg0) {
    return arg0->mapPrototype();
}
JSC::JSObject* JSC__JSGlobalObject__jsSetPrototype(JSC::JSGlobalObject* arg0) {
    return arg0->jsSetPrototype();
}
JSC::JSPromisePrototype* JSC__JSGlobalObject__promisePrototype(JSC::JSGlobalObject* arg0) {
    return arg0->promisePrototype();
}
JSC::AsyncGeneratorPrototype* JSC__JSGlobalObject__asyncGeneratorPrototype(JSC::JSGlobalObject* arg0) {
    return arg0->asyncGeneratorPrototype();
}
JSC::AsyncGeneratorFunctionPrototype* JSC__JSGlobalObject__asyncGeneratorFunctionPrototype(JSC::JSGlobalObject* arg0) {
    return arg0->asyncGeneratorFunctionPrototype();
}