mirror of
https://github.com/wgh136/flutter_qjs.git
synced 2025-09-27 13:27:24 +00:00
init
This commit is contained in:
195
windows/quickjs/libquickjs.def
Normal file
195
windows/quickjs/libquickjs.def
Normal file
@@ -0,0 +1,195 @@
|
||||
EXPORTS
|
||||
JS_AddIntrinsicAtomics
|
||||
JS_AddIntrinsicBaseObjects
|
||||
JS_AddIntrinsicBigDecimal
|
||||
JS_AddIntrinsicBigFloat
|
||||
JS_AddIntrinsicBigInt
|
||||
JS_AddIntrinsicDate
|
||||
JS_AddIntrinsicEval
|
||||
JS_AddIntrinsicJSON
|
||||
JS_AddIntrinsicMapSet
|
||||
JS_AddIntrinsicOperators
|
||||
JS_AddIntrinsicPromise
|
||||
JS_AddIntrinsicProxy
|
||||
JS_AddIntrinsicRegExp
|
||||
JS_AddIntrinsicRegExpCompiler
|
||||
JS_AddIntrinsicStringNormalize
|
||||
JS_AddIntrinsicTypedArrays
|
||||
JS_AddModuleExport
|
||||
JS_AddModuleExportList
|
||||
JS_AtomToCString
|
||||
JS_AtomToString
|
||||
JS_AtomToValue
|
||||
JS_Call
|
||||
JS_CallConstructor
|
||||
JS_CallConstructor2
|
||||
JS_ComputeMemoryUsage
|
||||
JS_DefineProperty
|
||||
JS_DefinePropertyGetSet
|
||||
JS_DefinePropertyValue
|
||||
JS_DefinePropertyValueInt64
|
||||
JS_DefinePropertyValueStr
|
||||
JS_DefinePropertyValueUint32
|
||||
JS_DefinePropertyValueValue
|
||||
JS_DeleteProperty
|
||||
JS_DeletePropertyInt64
|
||||
JS_DetachArrayBuffer
|
||||
JS_DetectModule
|
||||
JS_DumpMemoryUsage
|
||||
JS_DupAtom
|
||||
JS_DupContext
|
||||
JS_EnableBignumExt
|
||||
JS_EnqueueJob
|
||||
JS_Eval
|
||||
JS_EvalFunction
|
||||
JS_ExecutePendingJob
|
||||
JS_FreeAtom
|
||||
JS_FreeAtomRT
|
||||
JS_FreeCString
|
||||
JS_FreeContext
|
||||
JS_FreeRuntime
|
||||
JS_GetArrayBuffer
|
||||
JS_GetClassProto
|
||||
JS_GetContextOpaque
|
||||
JS_GetException
|
||||
JS_GetGlobalObject
|
||||
JS_GetImportMeta
|
||||
JS_GetModuleName
|
||||
JS_GetOpaque
|
||||
JS_GetOpaque2
|
||||
JS_GetOwnProperty
|
||||
JS_GetOwnPropertyNames
|
||||
JS_GetPropertyInternal
|
||||
JS_GetPropertyStr
|
||||
JS_GetPropertyUint32
|
||||
JS_GetPrototype
|
||||
JS_GetRuntime
|
||||
JS_GetRuntimeOpaque
|
||||
JS_GetTypedArrayBuffer
|
||||
JS_HasProperty
|
||||
JS_Invoke
|
||||
JS_IsArray
|
||||
JS_IsCFunction
|
||||
JS_IsConstructor
|
||||
JS_IsError
|
||||
JS_IsExtensible
|
||||
JS_IsFunction
|
||||
JS_IsInstanceOf
|
||||
JS_IsJobPending
|
||||
JS_IsLiveObject
|
||||
JS_IsRegisteredClass
|
||||
JS_IsUncatchableError
|
||||
JS_JSONStringify
|
||||
JS_MarkValue
|
||||
JS_NewArray
|
||||
JS_NewArrayBuffer
|
||||
JS_NewArrayBufferCopy
|
||||
JS_NewAtom
|
||||
JS_NewAtomLen
|
||||
JS_NewAtomString
|
||||
JS_NewAtomUInt32
|
||||
JS_NewBigInt64
|
||||
JS_NewBigInt64_1
|
||||
JS_NewBigUint64
|
||||
JS_NewCFunction2
|
||||
JS_NewCFunctionData
|
||||
JS_NewCModule
|
||||
JS_NewClass
|
||||
JS_NewClassID
|
||||
JS_NewContext
|
||||
JS_NewContextRaw
|
||||
JS_NewError
|
||||
JS_NewObject
|
||||
JS_NewObjectClass
|
||||
JS_NewObjectProto
|
||||
JS_NewObjectProtoClass
|
||||
JS_NewPromiseCapability
|
||||
JS_NewRuntime
|
||||
JS_NewRuntime2
|
||||
JS_NewString
|
||||
JS_NewStringLen
|
||||
JS_ParseJSON
|
||||
JS_ParseJSON2
|
||||
JS_PreventExtensions
|
||||
JS_ReadObject
|
||||
JS_ResetUncatchableError
|
||||
JS_ResolveModule
|
||||
JS_RunGC
|
||||
JS_SetCanBlock
|
||||
JS_SetClassProto
|
||||
JS_SetConstructor
|
||||
JS_SetConstructorBit
|
||||
JS_SetContextOpaque
|
||||
JS_SetGCThreshold
|
||||
JS_SetHostPromiseRejectionTracker
|
||||
JS_SetInterruptHandler
|
||||
JS_SetMaxStackSize
|
||||
JS_SetMemoryLimit
|
||||
JS_SetModuleExport
|
||||
JS_SetModuleExportList
|
||||
JS_SetModuleLoaderFunc
|
||||
JS_SetOpaque
|
||||
JS_SetPropertyFunctionList
|
||||
JS_SetPropertyInt64
|
||||
JS_SetPropertyInternal
|
||||
JS_SetPropertyStr
|
||||
JS_SetPropertyUint32
|
||||
JS_SetPrototype
|
||||
JS_SetRuntimeInfo
|
||||
JS_SetRuntimeOpaque
|
||||
JS_SetSharedArrayBufferFunctions
|
||||
JS_SetUncatchableError
|
||||
JS_Throw
|
||||
JS_ThrowInternalError
|
||||
JS_ThrowOutOfMemory
|
||||
JS_ThrowRangeError
|
||||
JS_ThrowReferenceError
|
||||
JS_ThrowSyntaxError
|
||||
JS_ThrowTypeError
|
||||
JS_ToBigInt64
|
||||
JS_ToBool
|
||||
JS_ToCStringLen2
|
||||
JS_ToFloat64
|
||||
JS_ToIndex
|
||||
JS_ToInt32
|
||||
JS_ToInt32Clamp
|
||||
JS_ToInt32Sat
|
||||
JS_ToInt64
|
||||
JS_ToInt64Clamp
|
||||
JS_ToInt64Ext
|
||||
JS_ToInt64Sat
|
||||
JS_ToPropertyKey
|
||||
JS_ToString
|
||||
JS_ToStringInternal
|
||||
JS_ValueToAtom
|
||||
JS_WriteObject
|
||||
JS_WriteObject2
|
||||
__JS_FreeValue
|
||||
__JS_FreeValueRT
|
||||
js_free
|
||||
js_free_rt
|
||||
js_init_module_os
|
||||
js_init_module_std
|
||||
js_load_file
|
||||
js_malloc
|
||||
js_malloc_rt
|
||||
js_malloc_usable_size
|
||||
js_malloc_usable_size_rt
|
||||
js_mallocz
|
||||
js_mallocz_rt
|
||||
js_module_loader
|
||||
js_module_set_import_meta
|
||||
js_parse_error
|
||||
js_realloc
|
||||
js_realloc2
|
||||
js_realloc_rt
|
||||
js_std_add_helpers
|
||||
js_std_dump_error
|
||||
js_std_eval_binary
|
||||
js_std_free_handlers
|
||||
js_std_init_handlers
|
||||
js_std_loop
|
||||
js_std_promise_rejection_tracker
|
||||
js_strdup
|
||||
js_string_codePointRange
|
||||
js_strndup
|
BIN
windows/quickjs/libquickjs32.a
Normal file
BIN
windows/quickjs/libquickjs32.a
Normal file
Binary file not shown.
BIN
windows/quickjs/libquickjs32.dll
Normal file
BIN
windows/quickjs/libquickjs32.dll
Normal file
Binary file not shown.
BIN
windows/quickjs/libquickjs64.a
Normal file
BIN
windows/quickjs/libquickjs64.a
Normal file
Binary file not shown.
BIN
windows/quickjs/libquickjs64.dll
Normal file
BIN
windows/quickjs/libquickjs64.dll
Normal file
Binary file not shown.
100
windows/quickjs/quickjs/list.h
Normal file
100
windows/quickjs/quickjs/list.h
Normal file
@@ -0,0 +1,100 @@
|
||||
/*
|
||||
* Linux klist like system
|
||||
*
|
||||
* Copyright (c) 2016-2017 Fabrice Bellard
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
#ifndef LIST_H
|
||||
#define LIST_H
|
||||
|
||||
#ifndef NULL
|
||||
#include <stddef.h>
|
||||
#endif
|
||||
|
||||
struct list_head {
|
||||
struct list_head *prev;
|
||||
struct list_head *next;
|
||||
};
|
||||
|
||||
#define LIST_HEAD_INIT(el) { &(el), &(el) }
|
||||
|
||||
/* return the pointer of type 'type *' containing 'el' as field 'member' */
|
||||
#define list_entry(el, type, member) \
|
||||
((type *)((uint8_t *)(el) - offsetof(type, member)))
|
||||
|
||||
static inline void init_list_head(struct list_head *head)
|
||||
{
|
||||
head->prev = head;
|
||||
head->next = head;
|
||||
}
|
||||
|
||||
/* insert 'el' between 'prev' and 'next' */
|
||||
static inline void __list_add(struct list_head *el,
|
||||
struct list_head *prev, struct list_head *next)
|
||||
{
|
||||
prev->next = el;
|
||||
el->prev = prev;
|
||||
el->next = next;
|
||||
next->prev = el;
|
||||
}
|
||||
|
||||
/* add 'el' at the head of the list 'head' (= after element head) */
|
||||
static inline void list_add(struct list_head *el, struct list_head *head)
|
||||
{
|
||||
__list_add(el, head, head->next);
|
||||
}
|
||||
|
||||
/* add 'el' at the end of the list 'head' (= before element head) */
|
||||
static inline void list_add_tail(struct list_head *el, struct list_head *head)
|
||||
{
|
||||
__list_add(el, head->prev, head);
|
||||
}
|
||||
|
||||
static inline void list_del(struct list_head *el)
|
||||
{
|
||||
struct list_head *prev, *next;
|
||||
prev = el->prev;
|
||||
next = el->next;
|
||||
prev->next = next;
|
||||
next->prev = prev;
|
||||
el->prev = NULL; /* fail safe */
|
||||
el->next = NULL; /* fail safe */
|
||||
}
|
||||
|
||||
static inline int list_empty(struct list_head *el)
|
||||
{
|
||||
return el->next == el;
|
||||
}
|
||||
|
||||
#define list_for_each(el, head) \
|
||||
for(el = (head)->next; el != (head); el = el->next)
|
||||
|
||||
#define list_for_each_safe(el, el1, head) \
|
||||
for(el = (head)->next, el1 = el->next; el != (head); \
|
||||
el = el1, el1 = el->next)
|
||||
|
||||
#define list_for_each_prev(el, head) \
|
||||
for(el = (head)->prev; el != (head); el = el->prev)
|
||||
|
||||
#define list_for_each_prev_safe(el, el1, head) \
|
||||
for(el = (head)->prev, el1 = el->prev; el != (head); \
|
||||
el = el1, el1 = el->prev)
|
||||
|
||||
#endif /* LIST_H */
|
58
windows/quickjs/quickjs/quickjs-libc.h
Normal file
58
windows/quickjs/quickjs/quickjs-libc.h
Normal file
@@ -0,0 +1,58 @@
|
||||
/*
|
||||
* QuickJS C library
|
||||
*
|
||||
* Copyright (c) 2017-2018 Fabrice Bellard
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
#ifndef QUICKJS_LIBC_H
|
||||
#define QUICKJS_LIBC_H
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "quickjs.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
JSModuleDef *js_init_module_std(JSContext *ctx, const char *module_name);
|
||||
JSModuleDef *js_init_module_os(JSContext *ctx, const char *module_name);
|
||||
void js_std_add_helpers(JSContext *ctx, int argc, char **argv);
|
||||
void js_std_loop(JSContext *ctx);
|
||||
void js_std_init_handlers(JSRuntime *rt);
|
||||
void js_std_free_handlers(JSRuntime *rt);
|
||||
void js_std_dump_error(JSContext *ctx);
|
||||
uint8_t *js_load_file(JSContext *ctx, size_t *pbuf_len, const char *filename);
|
||||
int js_module_set_import_meta(JSContext *ctx, JSValueConst func_val,
|
||||
JS_BOOL use_realpath, JS_BOOL is_main);
|
||||
JSModuleDef *js_module_loader(JSContext *ctx,
|
||||
const char *module_name, void *opaque);
|
||||
void js_std_eval_binary(JSContext *ctx, const uint8_t *buf, size_t buf_len,
|
||||
int flags);
|
||||
void js_std_promise_rejection_tracker(JSContext *ctx, JSValueConst promise,
|
||||
JSValueConst reason,
|
||||
JS_BOOL is_handled, void *opaque);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" { */
|
||||
#endif
|
||||
|
||||
#endif /* QUICKJS_LIBC_H */
|
1031
windows/quickjs/quickjs/quickjs.h
Normal file
1031
windows/quickjs/quickjs/quickjs.h
Normal file
File diff suppressed because it is too large
Load Diff
1304
windows/quickjs/quickjspp.hpp
Normal file
1304
windows/quickjs/quickjspp.hpp
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user