Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Latest commit

 

History

History
History
73 lines (62 loc) · 2.29 KB

File metadata and controls

73 lines (62 loc) · 2.29 KB
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
#include <stdint.h>
#include "_CJavaScriptKit.h"
#include "WasmGlobalMacros.h"
#if __wasm32__
# ifndef __wasi__
# if __has_include("malloc.h")
# include <malloc.h>
# endif
extern void *malloc(size_t size);
extern void free(void *ptr);
extern void *memset (void *, int, size_t);
extern void *memcpy (void *__restrict, const void *__restrict, size_t);
# else
# include <stdlib.h>
# include <stdbool.h>
# endif
/// The compatibility runtime library version.
/// Notes: If you change any interface of runtime library, please increment
/// this and `SwiftRuntime.version` in `./Runtime/src/index.ts`.
__attribute__((export_name("swjs_library_version")))
int swjs_library_version(void) {
return 708;
}
__attribute__((export_name("swjs_prepare_host_function_call")))
void *swjs_prepare_host_function_call(const int argc) {
return malloc(argc * sizeof(RawJSValue));
}
__attribute__((export_name("swjs_cleanup_host_function_call")))
void swjs_cleanup_host_function_call(void *argv_buffer) {
free(argv_buffer);
}
# if defined(__wasi__) && !defined(__EMBEDDED_SWIFT__)
bool _call_host_function_impl(const JavaScriptHostFuncRef host_func_ref,
const RawJSValue *argv, const int argc,
const JavaScriptObjectRef callback_func);
__attribute__((export_name("swjs_call_host_function")))
bool swjs_call_host_function(const JavaScriptHostFuncRef host_func_ref,
const RawJSValue *argv, const int argc,
const JavaScriptObjectRef callback_func) {
return _call_host_function_impl(host_func_ref, argv, argc, callback_func);
}
void _free_host_function_impl(const JavaScriptHostFuncRef host_func_ref);
__attribute__((export_name("swjs_free_host_function")))
void swjs_free_host_function(const JavaScriptHostFuncRef host_func_ref) {
_free_host_function_impl(host_func_ref);
}
int _library_features(void);
__attribute__((export_name("swjs_library_features")))
int swjs_library_features(void) {
return _library_features();
}
# endif
WASM_GLOBAL_DEFINE_STORAGE(_swift_js_exception, i32)
WASM_EXPORT_NAME(_swift_js_exception, _swift_js_exception)
#endif
int swjs_get_worker_thread_id_cached(void) {
_Thread_local static int tid = 0;
if (tid == 0) {
tid = swjs_get_worker_thread_id();
}
return tid;
}
Morty Proxy This is a proxified and sanitized view of the page, visit original site.