From 9e41d505b63d0b573c3d99b0ac165e64789c33a8 Mon Sep 17 00:00:00 2001 From: Chris Tate Date: Fri, 23 Oct 2026 03:30:06 -0500 Subject: [PATCH] Declare the property-bag helpers in the runtime header scr_dyn_bag_create_field and scr_dyn_is_class_capsule are declared by the LLVM backend; their prototypes move from scr_json.c into scr_dyn.h, which llvm-runtime-abi.test.ts checks the backend's declares against. --- packages/runtime/src/scr_dyn.h | 2 ++ packages/runtime/src/scr_json.c | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/runtime/src/scr_dyn.h b/packages/runtime/src/scr_dyn.h index 553b897d2..f7a71538f 100644 --- a/packages/runtime/src/scr_dyn.h +++ b/packages/runtime/src/scr_dyn.h @@ -935,6 +935,8 @@ ScrDyn *scr_dyn_new_obj_null_proto(void); ScrDyn *scr_dyn_obj_create(ScrDyn *prototype); ScrDyn *scr_dyn_obj_create_with_properties(ScrDyn *prototype, ScrDyn *descriptors); ScrDyn *scr_dyn_get_prototype_for_identity(ScrDyn *object); +bool scr_dyn_bag_create_field(ScrDyn *bag, const ScrStr *key); +bool scr_dyn_is_class_capsule(const ScrDyn *d); ScrDyn *scr_dyn_get_prototype(ScrDyn *object); ScrDyn *scr_dyn_get_own_property_descriptors(ScrDyn *object); ScrDyn *scr_dyn_set_prototype(ScrDyn *object, ScrDyn *prototype); diff --git a/packages/runtime/src/scr_json.c b/packages/runtime/src/scr_json.c index 615785687..290ae4982 100644 --- a/packages/runtime/src/scr_json.c +++ b/packages/runtime/src/scr_json.c @@ -16215,7 +16215,6 @@ void scr_dyn_decl_become(ScrDyn *n, const ScrDyn *capsule) { * does not have it yet. Answers false, changing nothing, for any other bag, * whose creation takes the general defineProperty path. Calls only * exported functions. */ -bool scr_dyn_bag_create_field(ScrDyn *bag, const ScrStr *key); bool scr_dyn_bag_create_field(ScrDyn *bag, const ScrStr *key) { if (!bag || bag->kind != SCR_DYN_OBJ || bag->non_extensible || bag->v.obj.source_access) return false; @@ -16227,7 +16226,6 @@ bool scr_dyn_bag_create_field(ScrDyn *bag, const ScrStr *key) { /* Whether a value is a capsule of a compiled class instance (its type key * names an object type): the class tables' fast exit for every other value, * including record and array capsules. Calls only libc. */ -bool scr_dyn_is_class_capsule(const ScrDyn *d); bool scr_dyn_is_class_capsule(const ScrDyn *d) { return d && d->kind == SCR_DYN_TYPED_REF && d->v.typed_ref.type_key_len > 7 && memcmp(d->v.typed_ref.type_key, "object:", 7) == 0;