@scriptc/cli-darwin-x64 0.2.1 → 0.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/THIRD_PARTY_NOTICES +1 -1
- package/dist/bin/scriptc +0 -0
- package/dist/bin/scriptc.json +1 -1
- package/dist/lib/declarations/scriptc-node-fallback.d.ts +158 -31
- package/dist/lib/llvm/bin/scriptc-llvm-codegen +0 -0
- package/dist/lib/llvm/package.json +1 -1
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_array.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_assert.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_async.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_async_dyn.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_bytes.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_bytes_io.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_crypto_async.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_dyn_invoke.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_events.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_exception.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_file_handle.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_json.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_lib.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_map.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_node_builtin.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_qs.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_regex.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_symbol.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_url.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_url_params.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_util_compare.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_util_style.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_array.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_assert.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_async.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_async_dyn.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_bytes.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_bytes_io.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_crypto_async.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_dyn_invoke.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_events.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_exception.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_file_handle.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_island.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_json.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_lib.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_map.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_node_builtin.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_qs.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_regex.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_symbol.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_url.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_url_params.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_util_compare.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_util_style.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_web.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic-text-decoder-legacy/scr_bytes.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/text-decoder-legacy/scr_bytes.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-dev/runtime/default/scr_array.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-dev/runtime/default/scr_assert.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-dev/runtime/default/scr_bytes.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-dev/runtime/default/scr_bytes_io.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-dev/runtime/default/scr_dyn_invoke.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-dev/runtime/default/scr_exception.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-dev/runtime/default/scr_json.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-dev/runtime/default/scr_lib.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-dev/runtime/default/scr_map.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-dev/runtime/default/scr_node_builtin.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-dev/runtime/default/scr_regex.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-dev/runtime/default/scr_symbol.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-dev/runtime/default/scr_url.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-dev/runtime/default/scr_url_params.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-dev/runtime/text-decoder-legacy/scr_bytes.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-release/runtime/default/scr_array.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-release/runtime/default/scr_assert.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-release/runtime/default/scr_bytes.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-release/runtime/default/scr_bytes_io.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-release/runtime/default/scr_dyn_invoke.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-release/runtime/default/scr_exception.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-release/runtime/default/scr_json.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-release/runtime/default/scr_lib.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-release/runtime/default/scr_map.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-release/runtime/default/scr_node_builtin.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-release/runtime/default/scr_regex.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-release/runtime/default/scr_symbol.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-release/runtime/default/scr_url.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-release/runtime/default/scr_url_params.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-release/runtime/text-decoder-legacy/scr_bytes.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-thread-dev/runtime/default/scr_array.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-thread-dev/runtime/default/scr_assert.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-thread-dev/runtime/default/scr_bytes.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-thread-dev/runtime/default/scr_bytes_io.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-thread-dev/runtime/default/scr_dyn_invoke.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-thread-dev/runtime/default/scr_exception.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-thread-dev/runtime/default/scr_json.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-thread-dev/runtime/default/scr_lib.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-thread-dev/runtime/default/scr_map.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-thread-dev/runtime/default/scr_node_builtin.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-thread-dev/runtime/default/scr_regex.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-thread-dev/runtime/default/scr_symbol.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-thread-dev/runtime/default/scr_url.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-thread-dev/runtime/default/scr_url_params.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-thread-dev/runtime/text-decoder-legacy/scr_bytes.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-thread-release/runtime/default/scr_array.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-thread-release/runtime/default/scr_assert.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-thread-release/runtime/default/scr_bytes.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-thread-release/runtime/default/scr_bytes_io.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-thread-release/runtime/default/scr_dyn_invoke.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-thread-release/runtime/default/scr_exception.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-thread-release/runtime/default/scr_json.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-thread-release/runtime/default/scr_lib.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-thread-release/runtime/default/scr_map.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-thread-release/runtime/default/scr_node_builtin.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-thread-release/runtime/default/scr_regex.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-thread-release/runtime/default/scr_symbol.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-thread-release/runtime/default/scr_url.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-thread-release/runtime/default/scr_url_params.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-thread-release/runtime/text-decoder-legacy/scr_bytes.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_array.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_assert.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_async.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_async_dyn.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_bytes.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_bytes_io.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_crypto_async.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_dyn_invoke.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_events.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_exception.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_file_handle.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_json.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_lib.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_map.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_node_builtin.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_qs.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_regex.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_symbol.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_url.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_url_params.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_util_compare.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_util_style.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_array.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_assert.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_async.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_async_dyn.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_bytes.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_bytes_io.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_crypto_async.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_dyn_invoke.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_events.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_exception.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_file_handle.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_island.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_json.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_lib.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_map.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_node_builtin.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_qs.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_regex.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_symbol.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_url.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_url_params.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_util_compare.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_util_style.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_web.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic-text-decoder-legacy/scr_bytes.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/text-decoder-legacy/scr_bytes.o +0 -0
- package/dist/lib/runtime-darwin-x64/package.json +1 -1
- package/dist/lib/runtime-darwin-x64/runtime-pack.json +423 -297
- package/dist/lib/runtime-sources/package.json +1 -1
- package/dist/lib/runtime-sources/src/scr_abort.c +5 -0
- package/dist/lib/runtime-sources/src/scr_array.c +5 -0
- package/dist/lib/runtime-sources/src/scr_assert.c +26 -0
- package/dist/lib/runtime-sources/src/scr_async.c +56 -4
- package/dist/lib/runtime-sources/src/scr_async_dyn.c +118 -24
- package/dist/lib/runtime-sources/src/scr_bytes.c +226 -0
- package/dist/lib/runtime-sources/src/scr_bytes_io.c +355 -51
- package/dist/lib/runtime-sources/src/scr_crypto_async.c +22 -2
- package/dist/lib/runtime-sources/src/scr_dyn_invoke.c +181 -43
- package/dist/lib/runtime-sources/src/scr_events.c +9 -0
- package/dist/lib/runtime-sources/src/scr_exception.c +1 -0
- package/dist/lib/runtime-sources/src/scr_fetch.c +45 -1
- package/dist/lib/runtime-sources/src/scr_file_handle.c +42 -0
- package/dist/lib/runtime-sources/src/scr_island.c +2166 -786
- package/dist/lib/runtime-sources/src/scr_island_manifest.h +19 -13
- package/dist/lib/runtime-sources/src/scr_json.c +584 -54
- package/dist/lib/runtime-sources/src/scr_json.test.ts +1 -0
- package/dist/lib/runtime-sources/src/scr_lib.c +1192 -43
- package/dist/lib/runtime-sources/src/scr_map.c +8 -0
- package/dist/lib/runtime-sources/src/scr_node_builtin.c +78 -0
- package/dist/lib/runtime-sources/src/scr_qs.c +10 -0
- package/dist/lib/runtime-sources/src/scr_regex.c +107 -5
- package/dist/lib/runtime-sources/src/scr_runtime.h +136 -9
- package/dist/lib/runtime-sources/src/scr_symbol.c +5 -0
- package/dist/lib/runtime-sources/src/scr_system_errors.h +573 -0
- package/dist/lib/runtime-sources/src/scr_text_decoder_labels.h +12 -12
- package/dist/lib/runtime-sources/src/scr_url.c +547 -64
- package/dist/lib/runtime-sources/src/scr_url_internal.h +6 -0
- package/dist/lib/runtime-sources/src/scr_url_params.c +10 -0
- package/dist/lib/runtime-sources/src/scr_util_compare.c +222 -0
- package/dist/lib/runtime-sources/src/scr_util_style.c +337 -0
- package/dist/lib/runtime-sources/src/scr_web.c +849 -264
- package/package.json +1 -1
|
@@ -522,6 +522,13 @@ struct ScrDyn *scr_dyn_class_base_prototype(struct ScrDyn *constructor);
|
|
|
522
522
|
struct ScrDyn *scr_dyn_class_inherit(struct ScrDyn *constructor, struct ScrDyn *base);
|
|
523
523
|
void scr_dyn_class_super(struct ScrDyn *constructor, struct ScrDyn *receiver, struct ScrDyn *arguments);
|
|
524
524
|
struct ScrDyn *scr_dyn_assign_prototype(struct ScrDyn *target, struct ScrDyn *sources, struct ScrDyn *protected_keys);
|
|
525
|
+
struct ScrDyn *scr_dyn_bag_get(struct ScrDyn *bag, ScrStr *key, struct ScrDyn *receiver);
|
|
526
|
+
struct ScrDyn *scr_dyn_reflect_get(struct ScrDyn *target, struct ScrDyn *key, struct ScrDyn *receiver);
|
|
527
|
+
bool scr_dyn_reflect_set(struct ScrDyn *target, struct ScrDyn *key, struct ScrDyn *value, struct ScrDyn *receiver);
|
|
528
|
+
bool scr_dyn_reflect_define(struct ScrDyn *receiver, struct ScrDyn *key, struct ScrDyn *value);
|
|
529
|
+
bool scr_dyn_abstract_eq(const struct ScrDyn *left, const struct ScrDyn *right);
|
|
530
|
+
int scr_dyn_function_kind(const struct ScrDyn *value);
|
|
531
|
+
void scr_dyn_bag_set(struct ScrDyn *bag, ScrStr *key, struct ScrDyn *value, struct ScrDyn *receiver);
|
|
525
532
|
/* The keyed-write miss on a fixed-shape record: throws the catchable
|
|
526
533
|
* TypeError naming the key (JS would add the property — the documented
|
|
527
534
|
* monomorphic-struct divergence). scr_object.c. */
|
|
@@ -772,6 +779,7 @@ ScrStr *scr_str_trim(ScrStr *s);
|
|
|
772
779
|
* sets the regex link flag for case-conversion sites). Borrow s; +1. */
|
|
773
780
|
ScrStr *scr_str_to_lower(const ScrStr *s);
|
|
774
781
|
ScrStr *scr_str_to_upper(const ScrStr *s);
|
|
782
|
+
ScrStr *scr_str_normalize(const ScrStr *s, const ScrStr *form);
|
|
775
783
|
|
|
776
784
|
/* charAt(i): 1-code-unit string; out of range → empty string. Half of an
|
|
777
785
|
* astral pair → U+FFFD (divergence, see above). Returns +1. */
|
|
@@ -810,6 +818,11 @@ ScrStr *scr_str_pad_end(ScrStr *s, double maxLength, ScrStr *fill);
|
|
|
810
818
|
* both are no-ops on well-formed input). Borrow s; toWellFormed +1. */
|
|
811
819
|
bool scr_str_is_well_formed(ScrStr *s);
|
|
812
820
|
ScrStr *scr_str_to_well_formed(ScrStr *s);
|
|
821
|
+
/* Node text utilities: borrowed input, +1 result or NULL+pending. The VT
|
|
822
|
+
* helper lives in the optional regex unit; USV conversion uses native strings. */
|
|
823
|
+
ScrStr *scr_util_strip_vt(const struct ScrDyn *input);
|
|
824
|
+
ScrStr *scr_util_to_usv_string(const struct ScrDyn *input);
|
|
825
|
+
void scr_dyn_install_to_primitive_symbol(struct ScrDyn *key);
|
|
813
826
|
|
|
814
827
|
/* RegExp.escape(s) — ES2025 EncodeForRegExpEscape per code point: leading
|
|
815
828
|
* ASCII alphanumeric hex-escapes, SyntaxCharacters and '/' take a
|
|
@@ -903,6 +916,23 @@ void scr_qs_parse_into(ScrMap *out, const ScrStr *qs, const ScrStr *sep,
|
|
|
903
916
|
* a fresh ParsedResults object whose `values` child has null prototype.
|
|
904
917
|
* Borrows config; returns +1, or NULL with a Node-coded TypeError pending. */
|
|
905
918
|
struct ScrDyn *scr_util_parse_args(const struct ScrDyn *config);
|
|
919
|
+
ScrStr *scr_util_style_text(const struct ScrDyn *format, const struct ScrDyn *text, const struct ScrDyn *options);
|
|
920
|
+
|
|
921
|
+
/* Node/libuv system error utilities. Arguments are checked without coercion;
|
|
922
|
+
* entries is a fresh array of [number, [name, message]] pairs (+1). */
|
|
923
|
+
ScrStr *scr_util_system_error_name(const struct ScrDyn *error);
|
|
924
|
+
ScrStr *scr_util_system_error_message(const struct ScrDyn *error);
|
|
925
|
+
struct ScrDyn *scr_util_system_error_entries(void);
|
|
926
|
+
|
|
927
|
+
/* Node 24's dotenv grammar, shared by util.parseEnv and process.loadEnvFile.
|
|
928
|
+
* Arguments are borrowed; parseEnv returns a fresh ordinary object (+1).
|
|
929
|
+
* Validation and file failures leave a coded exception pending. */
|
|
930
|
+
struct ScrDyn *scr_util_parse_env(const struct ScrDyn *content);
|
|
931
|
+
/* Checked primitives, ordinary records/arrays and byte views. Opaque native
|
|
932
|
+
* objects and accessor descriptors retain explicit catchable refusals. */
|
|
933
|
+
bool scr_util_is_deep_strict_equal(const struct ScrDyn *a, const struct ScrDyn *b,
|
|
934
|
+
const struct ScrDyn *skip_prototype);
|
|
935
|
+
void scr_process_load_env_file(const struct ScrDyn *path);
|
|
906
936
|
|
|
907
937
|
/* querystring.stringify — Node's stringify over a borrowed dyn value (the
|
|
908
938
|
* frontend dynFroms the typed record; JS-world dyn values pass straight
|
|
@@ -1105,6 +1135,10 @@ double scr_arr_get_number(const ScrArr *a, double i);
|
|
|
1105
1135
|
bool scr_arr_index_eq(const ScrArr *a, double i, const ScrArr *b, double j);
|
|
1106
1136
|
bool scr_arr_get_bool(ScrArr *a, double i); /* trap missing/hole */
|
|
1107
1137
|
void *scr_arr_get_ref(ScrArr *a, double i); /* trap missing/hole; +1 */
|
|
1138
|
+
/* Borrow a non-null reference element, or NULL for a hole/undefined/missing
|
|
1139
|
+
* property. Keep the array alive and retain before removing its element.
|
|
1140
|
+
* This read does not invoke retain callbacks or mutate runtime state. */
|
|
1141
|
+
void *scr_arr_peek_ref(const ScrArr *a, double i);
|
|
1108
1142
|
|
|
1109
1143
|
/* i == len appends; the _ref variant releases the old element (when
|
|
1110
1144
|
* replacing) and takes ownership of the new one. */
|
|
@@ -1452,6 +1486,7 @@ void scr_set_add_all(ScrMap *set, ScrArr *values);
|
|
|
1452
1486
|
ScrArr *scr_set_to_arr_f64(const ScrMap *s);
|
|
1453
1487
|
ScrArr *scr_set_to_arr_str(const ScrMap *s);
|
|
1454
1488
|
ScrArr *scr_set_to_arr_ref(const ScrMap *s);
|
|
1489
|
+
ScrArr *scr_set_to_arr_dyn(const ScrMap *s);
|
|
1455
1490
|
|
|
1456
1491
|
/* REF-element Set construction: a set-shaped map whose keys are refcounted
|
|
1457
1492
|
* pointers under identity hashing (see SCR_MAP_KEY_REF above). The element
|
|
@@ -1545,7 +1580,7 @@ typedef struct ScrClosure {
|
|
|
1545
1580
|
* (like the dyn→closure edge): a cycle through it is merely never
|
|
1546
1581
|
* collected. */
|
|
1547
1582
|
ScrBox *props;
|
|
1548
|
-
uint32_t function_kind; /* low bits: 0 ordinary, 1 generator, 2 async, 3 async generator; bit 2: ordinary own prototype */
|
|
1583
|
+
uint32_t function_kind; /* low bits: 0 ordinary, 1 generator, 2 async, 3 async generator; bit 2: ordinary own prototype; bit 3: checked callable adapter in caps[0] */
|
|
1549
1584
|
ScrBox *caps[];
|
|
1550
1585
|
} ScrClosure;
|
|
1551
1586
|
|
|
@@ -2599,7 +2634,31 @@ ScrStats *scr_fs_lstat(ScrStr *path); /* +1, or throws; NO follow (lstat) */
|
|
|
2599
2634
|
ScrStats *scr_fs_fstat(double fd); /* +1, or throws */
|
|
2600
2635
|
void scr_fs_fchmod(double fd, double mode);
|
|
2601
2636
|
void scr_fs_fsync(double fd);
|
|
2637
|
+
void scr_fs_fdatasync(double fd);
|
|
2638
|
+
void scr_fs_ftruncate(double fd, double length);
|
|
2639
|
+
void scr_fs_utimes(ScrStr *path, double atime, double mtime, bool nofollow);
|
|
2640
|
+
void scr_fs_invalid_path(const ScrDyn *value, const ScrStr *path);
|
|
2641
|
+
void scr_fs_invalid_named_path(const ScrDyn *value, const ScrStr *path, const char *name);
|
|
2642
|
+
void scr_fs_futimes(double fd, double atime, double mtime);
|
|
2602
2643
|
void scr_fs_link(ScrStr *source, ScrStr *dest);
|
|
2644
|
+
void scr_fs_symlink(ScrStr *target, ScrStr *destination, int kind);
|
|
2645
|
+
int scr_fs_symlink_infer(ScrStr *absolute);
|
|
2646
|
+
ScrBytes *scr_fs_readlink_bytes(ScrStr *path);
|
|
2647
|
+
void scr_fs_link_checked(const ScrDyn *existing, const ScrDyn *destination);
|
|
2648
|
+
void scr_fs_symlink_checked(const ScrDyn *target, const ScrDyn *destination, const ScrDyn *type);
|
|
2649
|
+
void scr_fs_symlink_promise_checked(const ScrDyn *target, const ScrDyn *destination, const ScrDyn *type);
|
|
2650
|
+
ScrDyn *scr_fs_readlink_checked(const ScrDyn *path, const ScrDyn *options, bool promise);
|
|
2651
|
+
ScrDyn *scr_fs_readlink_dyn(const ScrDyn *path, const ScrDyn *options);
|
|
2652
|
+
ScrDyn *scr_fs_statfs(ScrStr *path, bool bigint);
|
|
2653
|
+
ScrDyn *scr_fs_statfs_checked(const ScrDyn *path, const ScrDyn *options);
|
|
2654
|
+
ScrPromise *scr_fsp_statfs(const ScrDyn *path, const ScrDyn *options);
|
|
2655
|
+
ScrStr *scr_fs_readlink_str(const ScrDyn *path, const ScrDyn *options);
|
|
2656
|
+
ScrBytes *scr_fs_readlink_buffer(const ScrDyn *path, const ScrDyn *options);
|
|
2657
|
+
ScrPromise *scr_fsp_link(const ScrDyn *existing, const ScrDyn *destination);
|
|
2658
|
+
ScrPromise *scr_fsp_symlink(const ScrDyn *target, const ScrDyn *destination, const ScrDyn *type);
|
|
2659
|
+
ScrPromise *scr_fsp_readlink_dyn(const ScrDyn *path, const ScrDyn *options);
|
|
2660
|
+
ScrPromise *scr_fsp_readlink_str(const ScrDyn *path, const ScrDyn *options);
|
|
2661
|
+
ScrPromise *scr_fsp_readlink_buffer(const ScrDyn *path, const ScrDyn *options);
|
|
2603
2662
|
ScrStats *scr_stats_retain(ScrStats *s);
|
|
2604
2663
|
void scr_stats_release(ScrStats *s);
|
|
2605
2664
|
void *scr_stats_retain_v(void *p);
|
|
@@ -2631,6 +2690,8 @@ ScrPromise *scr_fsp_mkdir_recursive(ScrStr *path);
|
|
|
2631
2690
|
ScrPromise *scr_fsp_mkdir_recursive_mode(ScrStr *path, double mode);
|
|
2632
2691
|
ScrPromise *scr_fsp_unlink(ScrStr *path);
|
|
2633
2692
|
ScrPromise *scr_fsp_chmod(ScrStr *path, double mode);
|
|
2693
|
+
ScrPromise *scr_fsp_utimes(const ScrDyn *path, const ScrDyn *atime, const ScrDyn *mtime);
|
|
2694
|
+
ScrPromise *scr_fsp_lutimes(const ScrDyn *path, const ScrDyn *atime, const ScrDyn *mtime);
|
|
2634
2695
|
ScrPromise *scr_fsp_readdir(ScrStr *path);
|
|
2635
2696
|
ScrPromise *scr_fsp_rm(ScrStr *path);
|
|
2636
2697
|
ScrPromise *scr_fsp_stat(ScrStr *path);
|
|
@@ -2639,6 +2700,7 @@ ScrPromise *scr_fsp_lstat(ScrStr *path);
|
|
|
2639
2700
|
ScrPromise *scr_fsp_rename(ScrStr *oldpath, ScrStr *newpath);
|
|
2640
2701
|
ScrPromise *scr_fsp_open(ScrStr *path, ScrStr *flags, double mode);
|
|
2641
2702
|
ScrPromise *scr_file_handle_close_promise(ScrFileHandle *h);
|
|
2703
|
+
ScrPromise *scr_file_handle_utimes_promise(ScrFileHandle *h, const ScrDyn *atime, const ScrDyn *mtime);
|
|
2642
2704
|
ScrPromise *scr_file_handle_read_file_promise(ScrFileHandle *h, ScrStr *encoding);
|
|
2643
2705
|
ScrPromise *scr_file_handle_read_file_bytes_promise(ScrFileHandle *h, ScrStr *encoding);
|
|
2644
2706
|
ScrPromise *scr_file_handle_write_file_promise(ScrFileHandle *h, ScrStr *data, ScrStr *encoding);
|
|
@@ -3053,22 +3115,33 @@ ScrBytes *scr_crypto_random_fill_rest(ScrBytes *bytes, double offset);
|
|
|
3053
3115
|
double scr_crypto_random_int(double min, double max);
|
|
3054
3116
|
ScrBytes *scr_crypto_pbkdf2(ScrBytes *password, ScrBytes *salt,
|
|
3055
3117
|
double iterations, double keylen, ScrStr *digest);
|
|
3056
|
-
|
|
3057
|
-
|
|
3118
|
+
ScrBytes *scr_crypto_hkdf_bytes(ScrStr *digest, ScrBytes *ikm, ScrBytes *salt,
|
|
3119
|
+
ScrBytes *info, double keylen);
|
|
3120
|
+
ScrDyn *scr_crypto_hkdf(ScrStr *digest, ScrBytes *ikm, ScrBytes *salt,
|
|
3121
|
+
ScrBytes *info, double keylen);
|
|
3122
|
+
ScrBytes *scr_crypto_scrypt(ScrBytes *password, ScrBytes *salt, double keylen, ScrDyn *options);
|
|
3123
|
+
ScrBytes *scr_crypto_scrypt_derive(ScrBytes *password, ScrBytes *salt, double keylen,
|
|
3124
|
+
double n, double r, double p, double maxmem);
|
|
3125
|
+
typedef void (*ScrCryptoBytesFn)(ScrClosure *cb, ScrError *error /* borrowed */, ScrBytes *value /* moves */);
|
|
3126
|
+
void scr_crypto_defer_bytes(ScrBytes *value /* moves */, ScrError *error /* moves */, ScrClosure *cb /* moves */,
|
|
3058
3127
|
ScrCryptoBytesFn fn);
|
|
3059
3128
|
void scr_crypto_random_bytes_async(double size, ScrClosure *cb /* moves */,
|
|
3060
3129
|
ScrCryptoBytesFn fn);
|
|
3061
3130
|
void scr_crypto_pbkdf2_async(ScrBytes *password, ScrBytes *salt,
|
|
3062
3131
|
double iterations, double keylen, ScrStr *digest,
|
|
3063
3132
|
ScrClosure *cb /* moves */, ScrCryptoBytesFn fn);
|
|
3064
|
-
|
|
3133
|
+
void scr_crypto_hkdf_async(ScrStr *digest, ScrBytes *ikm, ScrBytes *salt,
|
|
3134
|
+
ScrBytes *info, double keylen, ScrClosure *cb, ScrCryptoBytesFn fn);
|
|
3135
|
+
void scr_crypto_scrypt_async(ScrBytes *password, ScrBytes *salt, double keylen,
|
|
3136
|
+
ScrDyn *options, ScrClosure *cb, ScrCryptoBytesFn fn);
|
|
3137
|
+
/* One-shot raw digest/HMAC by algorithm name ("md5", "sha1", and SHA-2)
|
|
3065
3138
|
* — the island crypto shim's bridge (scr_island.c host hooks). Digest
|
|
3066
|
-
* bytes into out (≥
|
|
3139
|
+
* bytes into out (≥64); returns the digest length, 0 for an unknown
|
|
3067
3140
|
* algorithm. */
|
|
3068
3141
|
size_t scr_crypto_digest_raw(const char *alg, const unsigned char *data, size_t len,
|
|
3069
|
-
unsigned char out[
|
|
3142
|
+
unsigned char out[64]);
|
|
3070
3143
|
size_t scr_crypto_hmac_raw(const char *alg, const unsigned char *key, size_t keylen,
|
|
3071
|
-
const unsigned char *data, size_t len, unsigned char out[
|
|
3144
|
+
const unsigned char *data, size_t len, unsigned char out[64]);
|
|
3072
3145
|
/* The composed `new crypto.X509Certificate(data).fingerprint` read (the
|
|
3073
3146
|
* handle never materializes): the SHA-1 of the DER, uppercase
|
|
3074
3147
|
* colon-separated — PEM or raw-DER input; anything else throws Node's
|
|
@@ -3129,6 +3202,9 @@ ScrStr *scr_path_win32_to_namespaced_path(ScrStr *path);
|
|
|
3129
3202
|
* The pair behind spawn's fd-stdio form. */
|
|
3130
3203
|
double scr_fs_open(ScrStr *path, ScrStr *flags);
|
|
3131
3204
|
double scr_fs_open_numeric(ScrStr *path, double flags, double mode);
|
|
3205
|
+
/* Engine callers supply the target OS's flags, rather than the frontend's
|
|
3206
|
+
* portable constant mask. Argument validation happens before this seam. */
|
|
3207
|
+
double scr_fs_open_native(ScrStr *path, double flags, double mode);
|
|
3132
3208
|
ScrFileHandle *scr_file_handle_open(ScrStr *path, ScrStr *flags, double mode);
|
|
3133
3209
|
ScrFileHandle *scr_file_handle_retain(ScrFileHandle *h);
|
|
3134
3210
|
void scr_file_handle_release(ScrFileHandle *h);
|
|
@@ -3136,6 +3212,12 @@ void *scr_file_handle_retain_v(void *p);
|
|
|
3136
3212
|
void scr_file_handle_release_v(void *p);
|
|
3137
3213
|
double scr_file_handle_fd(ScrFileHandle *h);
|
|
3138
3214
|
void scr_file_handle_close(ScrFileHandle *h);
|
|
3215
|
+
ScrPromise *scr_file_handle_sync_promise(ScrFileHandle *h);
|
|
3216
|
+
ScrPromise *scr_file_handle_datasync_promise(ScrFileHandle *h);
|
|
3217
|
+
ScrPromise *scr_file_handle_truncate_promise(ScrFileHandle *h, double length);
|
|
3218
|
+
ScrPromise *scr_file_handle_chmod_promise(ScrFileHandle *h, double mode);
|
|
3219
|
+
double scr_file_handle_readv(ScrFileHandle *h, ScrArr *buffers, double position);
|
|
3220
|
+
double scr_file_handle_writev(ScrFileHandle *h, ScrArr *buffers, double position);
|
|
3139
3221
|
double scr_file_handle_read(ScrFileHandle *h, ScrBytes *buf, double offset,
|
|
3140
3222
|
double length, double position, bool length_default);
|
|
3141
3223
|
double scr_file_handle_write_bytes(ScrFileHandle *h, ScrBytes *buf,
|
|
@@ -3159,10 +3241,15 @@ double scr_fs_write_sync(double fd, ScrBytes *buf, double offset, double length,
|
|
|
3159
3241
|
double position);
|
|
3160
3242
|
double scr_fs_write_str_sync(double fd, ScrStr *data, double position,
|
|
3161
3243
|
ScrStr *encoding);
|
|
3244
|
+
double scr_fs_readv_sync(double fd, ScrArr *buffers, double position);
|
|
3245
|
+
double scr_fs_writev_sync(double fd, ScrArr *buffers, double position);
|
|
3246
|
+
/* Unlike scalar readSync's zero-length fast path, a nonempty vector of
|
|
3247
|
+
* empty views still tests the descriptor and positioned-read capability. */
|
|
3248
|
+
double scr_fs_read_zero(double fd, double position);
|
|
3162
3249
|
void scr_fs_close(double fd);
|
|
3163
3250
|
|
|
3164
3251
|
/* ── WHATWG URL (scr_url.c) ──────────────────────────────────────────
|
|
3165
|
-
*
|
|
3252
|
+
* A mutable, refcounted URL value with selected component setters. The
|
|
3166
3253
|
* parser covers the WHATWG algorithm's common ground exactly (see
|
|
3167
3254
|
* scr_url.c's header comment for the covered surface and the documented
|
|
3168
3255
|
* divergences: no IDNA, no IPv6, opaque paths verbatim).
|
|
@@ -3177,6 +3264,10 @@ typedef struct ScrUrl ScrUrl;
|
|
|
3177
3264
|
|
|
3178
3265
|
ScrUrl *scr_url_new(ScrStr *input); /* +1, or throws */
|
|
3179
3266
|
ScrUrl *scr_url_new_base(ScrStr *input, ScrStr *base); /* +1, or throws */
|
|
3267
|
+
bool scr_url_can_parse(ScrStr *input);
|
|
3268
|
+
bool scr_url_can_parse_base(ScrStr *input, ScrStr *base);
|
|
3269
|
+
ScrDyn *scr_url_parse(ScrStr *input); /* +1 native URL or null; invalid URLs do not throw */
|
|
3270
|
+
ScrDyn *scr_url_parse_base(ScrStr *input, ScrStr *base);
|
|
3180
3271
|
ScrUrl *scr_url_retain(ScrUrl *u);
|
|
3181
3272
|
void scr_url_release(ScrUrl *u);
|
|
3182
3273
|
void *scr_url_retain_v(void *p);
|
|
@@ -3190,6 +3281,9 @@ ScrStr *scr_url_hostname(ScrUrl *u); /* +1 port-less host ("" when none) */
|
|
|
3190
3281
|
ScrStr *scr_url_port(ScrUrl *u); /* +1 "" or normalized non-default port */
|
|
3191
3282
|
ScrStr *scr_url_pathname(ScrUrl *u); /* +1 */
|
|
3192
3283
|
ScrStr *scr_url_href(ScrUrl *u); /* +1; also toString() */
|
|
3284
|
+
void scr_url_set(ScrUrl *u, ScrStr *field, ScrStr *value); /* borrowed; href may throw */
|
|
3285
|
+
bool scr_url_set_component(ScrUrl *u, ScrStr *field, ScrStr *value); /* borrowed; false for ignored writes */
|
|
3286
|
+
void scr_url_set_checked(ScrUrl *u, ScrStr *field, const ScrDyn *value); /* borrowed; conversion may throw */
|
|
3193
3287
|
ScrStr *scr_url_to_path(ScrUrl *u); /* +1, or throws */
|
|
3194
3288
|
ScrStr *scr_url_str_to_path(ScrStr *s); /* +1, or throws */
|
|
3195
3289
|
ScrUrl *scr_url_from_path(ScrStr *path); /* +1; throws on win32 UNC malformations only */
|
|
@@ -3607,7 +3701,7 @@ struct ScrDyn {
|
|
|
3607
3701
|
ScrBigInt *bigint; /* owned (SCR_DYN_BIGINT) */
|
|
3608
3702
|
/* Callbacks keep the optional symbol unit out of symbol-free binaries. */
|
|
3609
3703
|
struct { ScrSym *value; void (*release)(ScrSym *); ScrStr *(*render)(ScrSym *); ScrStr *(*description)(ScrSym *); } symbol;
|
|
3610
|
-
struct { size_t len; size_t cap; ScrDyn **items; struct ScrDyn *properties; bool sealed; bool frozen; } arr; /* owned */
|
|
3704
|
+
struct { size_t len; size_t cap; ScrDyn **items; struct ScrDyn *properties; bool sealed; bool frozen; unsigned char *presence; } arr; /* owned; NULL presence means dense */
|
|
3611
3705
|
struct {
|
|
3612
3706
|
size_t len;
|
|
3613
3707
|
size_t cap;
|
|
@@ -3781,6 +3875,7 @@ ScrSym *scr_sym_well_known(ScrStr *name);
|
|
|
3781
3875
|
ScrDyn *scr_dyn_symbol_get(const ScrDyn *value, const ScrStr *key);
|
|
3782
3876
|
ScrDyn *scr_dyn_symbol_key_get(const ScrDyn *value, const ScrDyn *key, bool optional);
|
|
3783
3877
|
void scr_dyn_symbol_key_set(ScrDyn *value, ScrDyn *key, ScrDyn *stored);
|
|
3878
|
+
void scr_dyn_symbol_key_placeholder(ScrDyn *value, ScrDyn *key);
|
|
3784
3879
|
bool scr_dyn_has_key_computed(const ScrDyn *value, const ScrDyn *key);
|
|
3785
3880
|
bool scr_dyn_has_own_computed(const ScrDyn *value, const ScrDyn *key);
|
|
3786
3881
|
bool scr_dyn_property_is_enumerable_computed(const ScrDyn *value, const ScrDyn *key);
|
|
@@ -3793,6 +3888,9 @@ ScrDyn *scr_dyn_increment(const ScrDyn *value, bool increment);
|
|
|
3793
3888
|
ScrDyn *scr_dyn_symbol_ref(ScrSym *value, void (*release)(ScrSym *), ScrStr *(*render)(ScrSym *), ScrStr *(*description)(ScrSym *));
|
|
3794
3889
|
ScrDyn *scr_dyn_new_str(ScrStr *s);
|
|
3795
3890
|
ScrDyn *scr_dyn_new_arr(void);
|
|
3891
|
+
ScrDyn *scr_dyn_array_constructor(void);
|
|
3892
|
+
bool scr_dyn_arr_has_index(const ScrDyn *arr, size_t index);
|
|
3893
|
+
void scr_dyn_arr_push_hole(ScrDyn *arr);
|
|
3796
3894
|
ScrDyn *scr_dyn_new_obj(void);
|
|
3797
3895
|
ScrDyn *scr_dyn_iterator(const ScrDyn *value, const ScrStr *spell);
|
|
3798
3896
|
ScrDyn *scr_dyn_iterator_optional(const ScrDyn *value);
|
|
@@ -3823,6 +3921,7 @@ bool scr_dyn_is_extensible(ScrDyn *object);
|
|
|
3823
3921
|
ScrDyn *scr_dyn_seal(ScrDyn *object);
|
|
3824
3922
|
bool scr_dyn_is_sealed(const ScrDyn *object);
|
|
3825
3923
|
ScrDyn *scr_dyn_proxy_new(const ScrDyn *target, const ScrDyn *handler);
|
|
3924
|
+
bool scr_dyn_is_callable(const ScrDyn *value);
|
|
3826
3925
|
ScrDyn *scr_dyn_proxy_get(const ScrDyn *proxy, const ScrStr *key);
|
|
3827
3926
|
bool scr_dyn_proxy_has(const ScrDyn *proxy, const ScrStr *key);
|
|
3828
3927
|
ScrDyn *scr_dyn_own_descriptor(const ScrDyn *value, const ScrStr *key);
|
|
@@ -3878,6 +3977,8 @@ ScrBytes *scr_dyn_bytes_unbox(const ScrDyn *d);
|
|
|
3878
3977
|
/* Exact numeric typed-array brand; elem is a ScrBytesElem tag. */
|
|
3879
3978
|
bool scr_dyn_bytes_is(const ScrDyn *d, int elem);
|
|
3880
3979
|
bool scr_dyn_typed_array_is(const ScrDyn *d, int elem);
|
|
3980
|
+
bool scr_dyn_util_type_is(const ScrDyn *value, const ScrStr *probe);
|
|
3981
|
+
ScrDyn *scr_dyn_util_type_value(const ScrDyn *value, const ScrStr *probe);
|
|
3881
3982
|
void scr_dyn_arr_push(ScrDyn *arr, ScrDyn *item);
|
|
3882
3983
|
/* Spread completion for a runtime-arity argument list (`f(...xs)` in the
|
|
3883
3984
|
* checked-dynamic tier): flattens `src` into `arr` per JS's spread over the
|
|
@@ -3969,6 +4070,7 @@ bool scr_dyn_number_coerce_js(const ScrDyn *d, double *out);
|
|
|
3969
4070
|
double scr_dyn_number_coerce(const ScrDyn *d);
|
|
3970
4071
|
double scr_dyn_number_constructor(const ScrDyn *d);
|
|
3971
4072
|
ScrBigInt *scr_dyn_bigint_constructor(const ScrDyn *d);
|
|
4073
|
+
ScrBigInt *scr_dyn_bigint_coerce(const ScrDyn *d);
|
|
3972
4074
|
ScrDyn *scr_dyn_add(const ScrDyn *left, const ScrDyn *right); /* borrowed; +1 or NULL/pending */
|
|
3973
4075
|
ScrDyn *scr_dyn_arithmetic(const ScrDyn *left, const ScrDyn *right, const ScrStr *operation);
|
|
3974
4076
|
bool scr_dyn_compare(const ScrDyn *left, const ScrDyn *right, const ScrStr *operation);
|
|
@@ -4045,6 +4147,7 @@ ScrDyn *scr_dyn_fn_get(const ScrDyn *d, const char *key, size_t key_len);
|
|
|
4045
4147
|
* Returns the target (+1, JS's return), or NULL with a pending catchable
|
|
4046
4148
|
* TypeError (non-object target/descriptor — Node's messages). */
|
|
4047
4149
|
ScrDyn *scr_dyn_define_props(ScrDyn *target, ScrDyn *descs);
|
|
4150
|
+
ScrDyn *scr_dyn_define_prototype_props(ScrDyn *target, ScrDyn *descs, ScrDyn *protected_keys);
|
|
4048
4151
|
/* Boxes a closure as a callable dyn value. Ownership of `clo` MOVES in
|
|
4049
4152
|
* (callers retain first when they keep their own reference); `sig`/`name`
|
|
4050
4153
|
* must be static literals (the box never frees them; name may be NULL). */
|
|
@@ -4081,6 +4184,9 @@ ScrMap *scr_dyn_native_map_check(const ScrDyn *value, const ScrDynPath *path);
|
|
|
4081
4184
|
bool scr_dyn_native_collection_is(const ScrDyn *value, int map, const char *type);
|
|
4082
4185
|
ScrMap *scr_dyn_native_collection_check(const ScrDyn *value, int map, const char *type, const ScrDynPath *path);
|
|
4083
4186
|
ScrStr *scr_url_checked_to_path(const ScrDyn *value);
|
|
4187
|
+
ScrStr *scr_url_checked_to_path_options(const ScrDyn *value, const ScrDyn *options);
|
|
4188
|
+
ScrBytes *scr_url_checked_to_path_buffer(const ScrDyn *value, const ScrDyn *options);
|
|
4189
|
+
ScrUrl *scr_url_checked_from_path(const ScrDyn *value, const ScrDyn *options);
|
|
4084
4190
|
ScrUrl *scr_dyn_native_url_check(const ScrDyn *value, const ScrDynPath *path);
|
|
4085
4191
|
ScrRegex *scr_dyn_native_regex_check(const ScrDyn *value, const ScrDynPath *path);
|
|
4086
4192
|
ScrClassObj *scr_dyn_class_check(const ScrDyn *value, const char *type_key, const ScrDynPath *path);
|
|
@@ -4142,6 +4248,8 @@ ScrDyn *scr_global_native(ScrArr *known);
|
|
|
4142
4248
|
ScrDyn *scr_global_native_init(ScrArr *known, ScrDyn *(*console_get)(void));
|
|
4143
4249
|
ScrDyn *scr_console_native(void);
|
|
4144
4250
|
ScrDyn *scr_process_stdio(double fd);
|
|
4251
|
+
bool scr_dyn_process_stdio_is(const ScrDyn *value);
|
|
4252
|
+
double scr_dyn_process_stdio_fd(const ScrDyn *value, const ScrDynPath *path);
|
|
4145
4253
|
|
|
4146
4254
|
void scr_dyn_handle_install(ScrDynHandleTag tag, const ScrDynHandleOps *ops);
|
|
4147
4255
|
void scr_file_handle_dyn_install(void);
|
|
@@ -4185,6 +4293,7 @@ ScrDyn *scr_dyn_new_promise_adapting(ScrPromise *src,
|
|
|
4185
4293
|
void (*adapt)(ScrPromise *dst, ScrPromise *src));
|
|
4186
4294
|
/* BORROWED peek at the boxed promise; NULL when d is not a promise box. */
|
|
4187
4295
|
ScrPromise *scr_dyn_promise_of(const ScrDyn *d);
|
|
4296
|
+
ScrPromise *scr_dyn_promise_all(const ScrDyn *entries);
|
|
4188
4297
|
|
|
4189
4298
|
/* ── island values in the checked-dynamic tree (SCR_DYN_JSVAL) ─────────────────────────
|
|
4190
4299
|
* Engine routing ops for JSVAL nodes, installed by the gated constructor
|
|
@@ -4245,6 +4354,7 @@ typedef struct ScrDynJsvalOps {
|
|
|
4245
4354
|
ScrDyn *(*iter_drain)(ScrJsval *cell, bool spread, const ScrStr *spell);
|
|
4246
4355
|
ScrDyn *(*iterator)(ScrJsval *cell, const ScrStr *spell, bool array_from);
|
|
4247
4356
|
ScrDyn *(*iter_n)(ScrJsval *cell, double count);
|
|
4357
|
+
bool (*type_probe)(ScrJsval *cell, const ScrStr *probe); /* internal brand; no property access */
|
|
4248
4358
|
} ScrDynJsvalOps;
|
|
4249
4359
|
|
|
4250
4360
|
/* The allocator view the gated constructor uses (installs the ops);
|
|
@@ -4513,6 +4623,7 @@ void scr_promise_rethrow_top_level(ScrPromise *p);
|
|
|
4513
4623
|
* payload as a dyn value (+1; void fulfillments answer the undefined
|
|
4514
4624
|
* value), or NULL with the rejection re-thrown into the awaiter. */
|
|
4515
4625
|
ScrDyn *scr_await_dyn(ScrPromise *p);
|
|
4626
|
+
ScrDyn *scr_await_dyn_value_settled(ScrDyn *value);
|
|
4516
4627
|
void scr_promise_resolve_dyn(ScrPromise *destination, ScrDyn *value);
|
|
4517
4628
|
/* `await v` over a checked-dynamic VALUE: dyn promises adopt, everything
|
|
4518
4629
|
* else takes JS's one-hop non-thenable await and answers itself (+1). */
|
|
@@ -5097,6 +5208,8 @@ typedef struct ScrIslandEdge {
|
|
|
5097
5208
|
* after scr_lib_init. */
|
|
5098
5209
|
void scr_island_modules(const ScrIslandModule *mods, size_t nmods,
|
|
5099
5210
|
const ScrIslandEdge *edges, size_t nedges);
|
|
5211
|
+
/* The logical source entry, independent of the installed binary path. */
|
|
5212
|
+
void scr_island_entry_module(const char *filename);
|
|
5100
5213
|
|
|
5101
5214
|
/* The inflater for compressed embedded module text (raw DEFLATE, exact
|
|
5102
5215
|
* inflated size known from the table row). The emitted main installs
|
|
@@ -5821,6 +5934,11 @@ ScrStr *scr_bytes_to_str_checked_range(const ScrBytes *b, const ScrStr *enc, dou
|
|
|
5821
5934
|
* stripped. Borrows; +1; never throws. */
|
|
5822
5935
|
ScrStr *scr_text_decode(const ScrBytes *b);
|
|
5823
5936
|
double scr_text_decoder_encoding(const ScrDyn *label);
|
|
5937
|
+
ScrStr *scr_text_decoder_name(double encoding);
|
|
5938
|
+
ScrDyn *scr_text_encode_into(const ScrDyn *source, const ScrDyn *destination);
|
|
5939
|
+
bool scr_buffer_is_ascii(const ScrDyn *input);
|
|
5940
|
+
bool scr_buffer_is_utf8(const ScrDyn *input);
|
|
5941
|
+
ScrBytes *scr_buffer_transcode(const ScrDyn *source, const ScrDyn *from, const ScrDyn *to);
|
|
5824
5942
|
ScrBytes *scr_bytes_buffer_source(const ScrDyn *value);
|
|
5825
5943
|
ScrStr *scr_text_decode_buffer_source(const ScrDyn *value);
|
|
5826
5944
|
ScrStr *scr_text_decode_options(const ScrBytes *b, bool fatal, bool ignore_bom);
|
|
@@ -5891,6 +6009,10 @@ ScrBytes *scr_buffer_new_string_fail(const ScrDyn *got);
|
|
|
5891
6009
|
* numbers coerce (negatives answer now/1000), the rest throw Node's
|
|
5892
6010
|
* ERR_INVALID_ARG_TYPE. Borrowed. */
|
|
5893
6011
|
double scr_fs_to_unix_timestamp(const ScrDyn *t);
|
|
6012
|
+
double scr_fs_timestamp_value(const ScrDyn *t, const char *name);
|
|
6013
|
+
void scr_fs_utimes_checked(const ScrDyn *path, const ScrDyn *atime, const ScrDyn *mtime);
|
|
6014
|
+
void scr_fs_lutimes_checked(const ScrDyn *path, const ScrDyn *atime, const ScrDyn *mtime);
|
|
6015
|
+
void scr_fs_futimes_checked(const ScrDyn *fd, const ScrDyn *atime, const ScrDyn *mtime);
|
|
5894
6016
|
/* The fs argument-validation ladders (the fs.*Chk libCalls): Node-order
|
|
5895
6017
|
* validation over dyn values with Node's exact typed errors; a pass
|
|
5896
6018
|
* meets the real operation where one exists (mkdtempSync, macOS
|
|
@@ -7305,6 +7427,11 @@ void scr_assert_shape_end(ScrStr *msg, bool has_msg);
|
|
|
7305
7427
|
/* assert.doesNotReject whose rejection MATCHED (or had no expected):
|
|
7306
7428
|
* "Got unwanted rejection[: message].\nActual message: \"...\"". */
|
|
7307
7429
|
void scr_assert_unwanted_rejection(ScrError *err, ScrStr *msg, bool has_msg);
|
|
7430
|
+
/* No-error assertions share Node's unwanted-exception/rejection message.
|
|
7431
|
+
* The frontend reads and coerces actual?.message, preserving getter throws. */
|
|
7432
|
+
void scr_assert_unwanted_error(ScrStr *actual_message, bool rejection, ScrStr *msg, bool has_msg);
|
|
7433
|
+
bool scr_assert_no_error_predicate(ScrDyn *predicate, ScrDyn *actual);
|
|
7434
|
+
bool scr_assert_regex_dyn_test(ScrRegex *re, ScrDyn *actual);
|
|
7308
7435
|
/* assert.ifError over the static surface: throws for ANY value the
|
|
7309
7436
|
* frontend routes here (Node: everything but null/undefined, falsy
|
|
7310
7437
|
* included) — "ifError got unwanted exception: " + the error's message
|
|
@@ -90,6 +90,11 @@ ScrSym *scr_sym_well_known(ScrStr *name) {
|
|
|
90
90
|
scr_dyn_install_async_iterator_symbol(key);
|
|
91
91
|
scr_dyn_release(key);
|
|
92
92
|
}
|
|
93
|
+
if (name->len == 11 && !memcmp(name->data, "toPrimitive", 11)) {
|
|
94
|
+
ScrDyn *key = scr_dyn_new_symbol(symbol);
|
|
95
|
+
scr_dyn_install_to_primitive_symbol(key);
|
|
96
|
+
scr_dyn_release(key);
|
|
97
|
+
}
|
|
93
98
|
return symbol;
|
|
94
99
|
}
|
|
95
100
|
|