Github User Fetcher 1.0.0
C Application with Server and GUI
|
#include "duk_internal.h"
Go to the source code of this file.
Data Structures | |
struct | duk__transform_context |
Macros | |
#define | DUK__MKBITS(a, b, c, d, e, f, g, h) |
#define | DUK__CHECK_BITMASK(table, cp) ((table)[(cp) >> 3] & (1 << ((cp) & 0x07))) |
#define | DUK__IDX_REQUESTED_ID 0 /* Module id requested */ |
#define | DUK__IDX_REQUIRE 1 /* Current require() function */ |
#define | DUK__IDX_REQUIRE_ID 2 /* The base ID of the current require() function, resolution base */ |
#define | DUK__IDX_RESOLVED_ID 3 /* Resolved, normalized absolute module ID */ |
#define | DUK__IDX_LASTCOMP 4 /* Last component name in resolved path */ |
#define | DUK__IDX_DUKTAPE 5 /* Duktape object */ |
#define | DUK__IDX_MODLOADED 6 /* Duktape.modLoaded[] module cache */ |
#define | DUK__IDX_UNDEFINED 7 /* 'undefined', artifact of lookup */ |
#define | DUK__IDX_FRESH_REQUIRE 8 /* New require() function for module, updated resolution base */ |
#define | DUK__IDX_EXPORTS 9 /* Default exports table */ |
#define | DUK__IDX_MODULE 10 /* Module object containing module.exports, etc */ |
Typedefs | |
typedef void(* | duk__transform_callback) (duk__transform_context *tfm_ctx, const void *udata, duk_codepoint_t cp) |
Variables | |
DUK_LOCAL const duk_uint8_t | duk__encode_uriunescaped_table [16] |
DUK_LOCAL const duk_uint8_t | duk__encode_uricomponent_unescaped_table [16] |
DUK_LOCAL const duk_uint8_t | duk__decode_uri_reserved_table [16] |
DUK_LOCAL const duk_uint8_t | duk__decode_uri_component_reserved_table [16] |
DUK_LOCAL const duk_uint8_t | duk__escape_unescaped_table [16] |
#define DUK__CHECK_BITMASK | ( | table, | |
cp ) ((table)[(cp) >> 3] & (1 << ((cp) & 0x07))) |
Definition at line 23 of file duktape-1.5.2/src-separate/duk_bi_global.c.
Referenced by duk__transform_callback_decode_uri(), duk__transform_callback_encode_uri(), and duk__transform_callback_escape().
#define DUK__IDX_DUKTAPE 5 /* Duktape object */ |
Definition at line 1019 of file duktape-1.5.2/src-separate/duk_bi_global.c.
Referenced by duk_bi_global_object_require().
#define DUK__IDX_EXPORTS 9 /* Default exports table */ |
Definition at line 1023 of file duktape-1.5.2/src-separate/duk_bi_global.c.
Referenced by duk_bi_global_object_require().
#define DUK__IDX_FRESH_REQUIRE 8 /* New require() function for module, updated resolution base */ |
Definition at line 1022 of file duktape-1.5.2/src-separate/duk_bi_global.c.
Referenced by duk_bi_global_object_require().
#define DUK__IDX_LASTCOMP 4 /* Last component name in resolved path */ |
Definition at line 1018 of file duktape-1.5.2/src-separate/duk_bi_global.c.
Referenced by duk_bi_global_object_require().
#define DUK__IDX_MODLOADED 6 /* Duktape.modLoaded[] module cache */ |
Definition at line 1020 of file duktape-1.5.2/src-separate/duk_bi_global.c.
Referenced by duk_bi_global_object_require().
#define DUK__IDX_MODULE 10 /* Module object containing module.exports, etc */ |
Definition at line 1024 of file duktape-1.5.2/src-separate/duk_bi_global.c.
Referenced by duk_bi_global_object_require().
#define DUK__IDX_REQUESTED_ID 0 /* Module id requested */ |
Definition at line 1014 of file duktape-1.5.2/src-separate/duk_bi_global.c.
Referenced by duk_bi_global_object_require().
#define DUK__IDX_REQUIRE 1 /* Current require() function */ |
Definition at line 1015 of file duktape-1.5.2/src-separate/duk_bi_global.c.
#define DUK__IDX_REQUIRE_ID 2 /* The base ID of the current require() function, resolution base */ |
Definition at line 1016 of file duktape-1.5.2/src-separate/duk_bi_global.c.
Referenced by duk_bi_global_object_require().
#define DUK__IDX_RESOLVED_ID 3 /* Resolved, normalized absolute module ID */ |
Definition at line 1017 of file duktape-1.5.2/src-separate/duk_bi_global.c.
Referenced by duk_bi_global_object_require().
#define DUK__IDX_UNDEFINED 7 /* 'undefined', artifact of lookup */ |
Definition at line 1021 of file duktape-1.5.2/src-separate/duk_bi_global.c.
Referenced by duk_bi_global_object_require().
#define DUK__MKBITS | ( | a, | |
b, | |||
c, | |||
d, | |||
e, | |||
f, | |||
g, | |||
h ) |
Definition at line 19 of file duktape-1.5.2/src-separate/duk_bi_global.c.
typedef void(* duk__transform_callback) (duk__transform_context *tfm_ctx, const void *udata, duk_codepoint_t cp) |
Definition at line 98 of file duktape-1.5.2/src-separate/duk_bi_global.c.
DUK_LOCAL void duk__bi_global_resolve_module_id | ( | duk_context * | ctx, |
const char * | req_id, | ||
const char * | mod_id ) |
Definition at line 842 of file duktape-1.5.2/src-separate/duk_bi_global.c.
References DUK_ASSERT, DUK_BI_COMMONJS_MODULE_ID_LIMIT, DUK_DD, DUK_DDD, DUK_DDDPRINT, DUK_DDPRINT, DUK_ERR_TYPE_ERROR, DUK_ERROR_FMT1, DUK_LIKELY, duk_push_lstring(), DUK_SNPRINTF, DUK_STRLEN, DUK_UNLIKELY, and NULL.
Referenced by duk_bi_global_object_require().
DUK_LOCAL duk_small_int_t duk__decode_hex_escape | ( | const duk_uint8_t * | p, |
duk_small_int_t | n ) |
Definition at line 101 of file duktape-1.5.2/src-separate/duk_bi_global.c.
References duk_hex_dectab, and DUK_LIKELY.
Referenced by duk__transform_callback_decode_uri(), and duk__transform_callback_unescape().
DUK_LOCAL void duk__transform_callback_decode_uri | ( | duk__transform_context * | tfm_ctx, |
const void * | udata, | ||
duk_codepoint_t | cp ) |
Definition at line 208 of file duktape-1.5.2/src-separate/duk_bi_global.c.
References duk__transform_context::bw, DUK__CHECK_BITMASK, duk__decode_hex_escape(), DUK_ASC_PERCENT, DUK_ASSERT, DUK_BW_ENSURE, DUK_BW_WRITE_RAW_U8, DUK_BW_WRITE_RAW_U8_3, DUK_BW_WRITE_RAW_XUTF8, DUK_DDD, DUK_DDDPRINT, DUK_ERR_URI_ERROR, DUK_ERROR, DUK_UNICODE_MAX_CESU8_BMP_LENGTH, DUK_UNICODE_MAX_XUTF8_LENGTH, left, duk__transform_context::p, duk__transform_context::p_end, duk__transform_context::p_start, and duk__transform_context::thr.
Referenced by duk_bi_global_object_decode_uri(), and duk_bi_global_object_decode_uri_component().
DUK_LOCAL void duk__transform_callback_encode_uri | ( | duk__transform_context * | tfm_ctx, |
const void * | udata, | ||
duk_codepoint_t | cp ) |
Definition at line 146 of file duktape-1.5.2/src-separate/duk_bi_global.c.
References duk__transform_context::bw, DUK__CHECK_BITMASK, DUK_ASC_PERCENT, DUK_BW_ENSURE, DUK_BW_WRITE_RAW_U8, DUK_BW_WRITE_RAW_U8_3, DUK_ERR_URI_ERROR, DUK_ERROR, duk_uc_nybbles, duk_unicode_decode_xutf8(), duk_unicode_encode_xutf8(), DUK_UNICODE_MAX_XUTF8_LENGTH, duk__transform_context::p, duk__transform_context::p_end, duk__transform_context::p_start, and duk__transform_context::thr.
Referenced by duk_bi_global_object_encode_uri(), and duk_bi_global_object_encode_uri_component().
DUK_LOCAL void duk__transform_callback_escape | ( | duk__transform_context * | tfm_ctx, |
const void * | udata, | ||
duk_codepoint_t | cp ) |
Definition at line 347 of file duktape-1.5.2/src-separate/duk_bi_global.c.
References duk__transform_context::bw, DUK__CHECK_BITMASK, duk__escape_unescaped_table, DUK_ASC_LC_U, DUK_ASC_PERCENT, DUK_BW_ENSURE, DUK_BW_WRITE_RAW_U8, DUK_BW_WRITE_RAW_U8_3, DUK_BW_WRITE_RAW_U8_6, DUK_ERROR_TYPE, duk_uc_nybbles, DUK_UNREF, and duk__transform_context::thr.
Referenced by duk_bi_global_object_escape().
DUK_LOCAL void duk__transform_callback_unescape | ( | duk__transform_context * | tfm_ctx, |
const void * | udata, | ||
duk_codepoint_t | cp ) |
Definition at line 386 of file duktape-1.5.2/src-separate/duk_bi_global.c.
References duk__transform_context::bw, duk__decode_hex_escape(), DUK_BW_WRITE_ENSURE_XUTF8, DUK_UNREF, left, duk__transform_context::p, duk__transform_context::p_end, and duk__transform_context::thr.
Referenced by duk_bi_global_object_unescape().
DUK_LOCAL int duk__transform_helper | ( | duk_context * | ctx, |
duk__transform_callback | callback, | ||
const void * | udata ) |
Definition at line 118 of file duktape-1.5.2/src-separate/duk_bi_global.c.
References duk__transform_context::bw, DUK_ASSERT, DUK_BW_COMPACT, DUK_BW_INIT_PUSHBUF, DUK_HSTRING_GET_BYTELEN, DUK_HSTRING_GET_DATA, duk_to_hstring(), duk_to_string(), duk_unicode_decode_xutf8_checked(), duk__transform_context::h_str, NULL, duk__transform_context::p, duk__transform_context::p_end, duk__transform_context::p_start, and duk__transform_context::thr.
Referenced by duk_bi_global_object_decode_uri(), duk_bi_global_object_decode_uri_component(), duk_bi_global_object_encode_uri(), duk_bi_global_object_encode_uri_component(), duk_bi_global_object_escape(), and duk_bi_global_object_unescape().
DUK_INTERNAL duk_ret_t duk_bi_global_object_decode_uri | ( | duk_context * | ctx | ) |
Definition at line 687 of file duktape-1.5.2/src-separate/duk_bi_global.c.
References duk__decode_uri_reserved_table, duk__transform_callback_decode_uri(), and duk__transform_helper().
DUK_INTERNAL duk_ret_t duk_bi_global_object_decode_uri_component | ( | duk_context * | ctx | ) |
Definition at line 691 of file duktape-1.5.2/src-separate/duk_bi_global.c.
References duk__decode_uri_component_reserved_table, duk__transform_callback_decode_uri(), and duk__transform_helper().
DUK_INTERNAL duk_ret_t duk_bi_global_object_encode_uri | ( | duk_context * | ctx | ) |
Definition at line 695 of file duktape-1.5.2/src-separate/duk_bi_global.c.
References duk__encode_uriunescaped_table, duk__transform_callback_encode_uri(), and duk__transform_helper().
DUK_INTERNAL duk_ret_t duk_bi_global_object_encode_uri_component | ( | duk_context * | ctx | ) |
Definition at line 699 of file duktape-1.5.2/src-separate/duk_bi_global.c.
References duk__encode_uricomponent_unescaped_table, duk__transform_callback_encode_uri(), and duk__transform_helper().
DUK_INTERNAL duk_ret_t duk_bi_global_object_escape | ( | duk_context * | ctx | ) |
Definition at line 704 of file duktape-1.5.2/src-separate/duk_bi_global.c.
References duk__transform_callback_escape(), duk__transform_helper(), and NULL.
DUK_INTERNAL duk_ret_t duk_bi_global_object_eval | ( | duk_context * | ctx | ) |
Definition at line 421 of file duktape-1.5.2/src-separate/duk_bi_global.c.
References duk_hthread::builtins, duk_hthread::callstack, duk_hthread::callstack_top, DUK_ACT_FLAG_DIRECT_EVAL, DUK_ACT_FLAG_STRICT, DUK_ASSERT, DUK_BIDX_GLOBAL, DUK_BIDX_GLOBAL_ENV, duk_call_method(), DUK_DDD, DUK_DDDPRINT, duk_get_hobject(), duk_get_hstring(), duk_get_int(), duk_get_top(), duk_get_tval(), DUK_HOBJECT_CLASS_AS_FLAGS, DUK_HOBJECT_CLASS_DECENV, DUK_HOBJECT_FLAG_EXTENSIBLE, DUK_HOBJECT_HAS_NEWENV, DUK_HOBJECT_HAS_STRICT, DUK_HOBJECT_IS_COMPILEDFUNCTION, DUK_HSTRING_GET_BYTELEN, DUK_HSTRING_GET_DATA, duk_insert(), duk_is_number(), duk_js_compile(), DUK_JS_COMPILE_FLAG_EVAL, DUK_JS_COMPILE_FLAG_STRICT, duk_js_init_activation_environment_records_delayed(), duk_js_push_closure(), duk_push_hobject_bidx(), duk_push_hstring_stridx(), duk_push_object_helper_proto(), duk_push_tval(), duk_require_hobject(), DUK_STRIDX_INPUT, duk_activation::flags, duk_activation::idx_bottom, duk_activation::lex_env, NULL, duk_hthread::valstack, and duk_activation::var_env.
DUK_INTERNAL duk_ret_t duk_bi_global_object_is_finite | ( | duk_context * | ctx | ) |
Definition at line 677 of file duktape-1.5.2/src-separate/duk_bi_global.c.
References DUK_ISFINITE, duk_push_boolean(), and duk_to_number().
DUK_INTERNAL duk_ret_t duk_bi_global_object_is_nan | ( | duk_context * | ctx | ) |
Definition at line 671 of file duktape-1.5.2/src-separate/duk_bi_global.c.
References DUK_ISNAN, duk_push_boolean(), and duk_to_number().
DUK_INTERNAL duk_ret_t duk_bi_global_object_parse_float | ( | duk_context * | ctx | ) |
Definition at line 642 of file duktape-1.5.2/src-separate/duk_bi_global.c.
References DUK_ASSERT_TOP, duk_numconv_parse(), DUK_S2N_FLAG_ALLOW_EMPTY_FRAC, DUK_S2N_FLAG_ALLOW_EXP, DUK_S2N_FLAG_ALLOW_FRAC, DUK_S2N_FLAG_ALLOW_GARBAGE, DUK_S2N_FLAG_ALLOW_INF, DUK_S2N_FLAG_ALLOW_LEADING_ZERO, DUK_S2N_FLAG_ALLOW_MINUS, DUK_S2N_FLAG_ALLOW_NAKED_FRAC, DUK_S2N_FLAG_ALLOW_PLUS, DUK_S2N_FLAG_TRIM_WHITE, and duk_to_string().
DUK_INTERNAL duk_ret_t duk_bi_global_object_parse_int | ( | duk_context * | ctx | ) |
Definition at line 599 of file duktape-1.5.2/src-separate/duk_bi_global.c.
References DUK_ASSERT_TOP, duk_dup(), duk_numconv_parse(), duk_push_nan(), DUK_S2N_FLAG_ALLOW_AUTO_HEX_INT, DUK_S2N_FLAG_ALLOW_GARBAGE, DUK_S2N_FLAG_ALLOW_LEADING_ZERO, DUK_S2N_FLAG_ALLOW_MINUS, DUK_S2N_FLAG_ALLOW_PLUS, DUK_S2N_FLAG_TRIM_WHITE, duk_to_int32(), and duk_to_string().
DUK_INTERNAL duk_ret_t duk_bi_global_object_print_helper | ( | duk_context * | ctx | ) |
Definition at line 724 of file duktape-1.5.2/src-separate/duk_bi_global.c.
References DUK_ASC_LF, DUK_ASC_SPACE, DUK_ASSERT, duk_concat(), DUK_DBG_CMD_ALERT, DUK_DBG_CMD_PRINT, DUK_FFLUSH, DUK_FWRITE, duk_get_buffer(), duk_get_current_magic(), duk_get_lstring(), duk_get_top(), duk_insert(), duk_is_buffer(), duk_join(), DUK_MEMCPY, duk_push_fixed_buffer, duk_push_hstring_stridx(), duk_push_string(), DUK_STDERR, DUK_STDOUT, DUK_STRIDX_SPACE, duk_to_lstring(), DUK_UNREF, duk_hthread::heap, and NULL.
DUK_INTERNAL duk_ret_t duk_bi_global_object_require | ( | duk_context * | ctx | ) |
Definition at line 1026 of file duktape-1.5.2/src-separate/duk_bi_global.c.
References duk__bi_global_resolve_module_id(), DUK__IDX_DUKTAPE, DUK__IDX_EXPORTS, DUK__IDX_FRESH_REQUIRE, DUK__IDX_LASTCOMP, DUK__IDX_MODLOADED, DUK__IDX_MODULE, DUK__IDX_REQUESTED_ID, DUK__IDX_REQUIRE_ID, DUK__IDX_RESOLVED_ID, DUK__IDX_UNDEFINED, DUK_ASSERT_TOP, duk_bi_global_object_require(), DUK_BIDX_DUKTAPE, duk_compact(), DUK_COMPILE_EVAL, duk_concat(), DUK_D, DUK_DD, DUK_DDD, DUK_DDDPRINT, DUK_DDPRINT, duk_def_prop(), DUK_DEFPROP_FORCE, DUK_DEFPROP_HAVE_VALUE, duk_del_prop(), DUK_DPRINT, duk_dup(), duk_eval_raw(), DUK_EXEC_SUCCESS, duk_get_prop(), duk_get_prop_stridx(), duk_get_string(), duk_get_tval(), duk_is_string(), duk_pcall(), duk_pcall_method(), duk_pop(), DUK_PROPDESC_FLAGS_C, DUK_PROPDESC_FLAGS_NONE, DUK_PROPDESC_FLAGS_WC, duk_push_c_function(), duk_push_current_function(), duk_push_hobject_bidx(), duk_push_hstring_stridx(), duk_push_object(), duk_push_string(), duk_put_prop(), duk_require_hobject(), duk_require_string(), DUK_STRIDX_EXPORTS, DUK_STRIDX_FILENAME, DUK_STRIDX_ID, DUK_STRIDX_MOD_LOADED, DUK_STRIDX_MOD_SEARCH, DUK_STRIDX_NAME, DUK_STRIDX_REQUIRE, duk_throw(), duk_xdef_prop_stridx(), and NULL.
Referenced by duk_bi_global_object_require().
DUK_INTERNAL duk_ret_t duk_bi_global_object_unescape | ( | duk_context * | ctx | ) |
Definition at line 708 of file duktape-1.5.2/src-separate/duk_bi_global.c.
References duk__transform_callback_unescape(), duk__transform_helper(), and NULL.
DUK_LOCAL const duk_uint8_t duk__decode_uri_component_reserved_table[16] |
Definition at line 62 of file duktape-1.5.2/src-separate/duk_bi_global.c.
Referenced by duk_bi_global_object_decode_uri_component().
DUK_LOCAL const duk_uint8_t duk__decode_uri_reserved_table[16] |
Definition at line 50 of file duktape-1.5.2/src-separate/duk_bi_global.c.
Referenced by duk_bi_global_object_decode_uri().
DUK_LOCAL const duk_uint8_t duk__encode_uricomponent_unescaped_table[16] |
Definition at line 38 of file duktape-1.5.2/src-separate/duk_bi_global.c.
Referenced by duk_bi_global_object_encode_uri_component().
DUK_LOCAL const duk_uint8_t duk__encode_uriunescaped_table[16] |
Definition at line 26 of file duktape-1.5.2/src-separate/duk_bi_global.c.
Referenced by duk_bi_global_object_encode_uri().
DUK_LOCAL const duk_uint8_t duk__escape_unescaped_table[16] |
Definition at line 75 of file duktape-1.5.2/src-separate/duk_bi_global.c.
Referenced by duk__transform_callback_escape().