fix(lang_specs): drop ObjectScript UDL method_call, hidden by the grammar

The v1.9.19 UDL grammar hides method_call: `Do obj.M(x)` now parses as
do_parameter(lvn, oref_method). The registration could never match, so
repro_primary_call_metadata_names_exist_in_grammars failed. Instance
calls are still found by cbm_is_call_site through
cbm_objectscript_is_instance_call, which already recognizes
do_parameter/job_argument with an oref_method child.

Remove the dead kind from objectscript_udl_call_types and its ledger row
(historical 226 -> 225, direct/primary counts down by one), and point the
UDL method-call behavior case at do_parameter, the node that now carries
the call.

Signed-off-by: Thomas Dyar <tdyar@intersystems.com>
This commit is contained in:
Thomas Dyar
2026-11-14 00:18:45 +01:00
committed by Martin Vogel
parent 9e0588f4c1
commit 05cfbd06d2
3 changed files with 10 additions and 8 deletions
+5 -2
View File
@@ -1699,8 +1699,11 @@ static const char *objectscript_udl_func_types[] = {"method", "classmethod", "qu
static const char *objectscript_udl_class_types[] = {"class_definition", NULL};
static const char *objectscript_udl_field_types[] = {
"property", "parameter", "index", "trigger", "xdata", "storage", "foreignkey", NULL};
static const char *objectscript_udl_call_types[] = {"class_method_call", "method_call",
"relative_dot_method", "macro", NULL};
/* Instance calls (`Do obj.M()`) have no call node of their own: the grammar
* hides method_call, leaving do_parameter/job_argument with an oref_method
* child. cbm_is_call_site() matches those via cbm_objectscript_is_instance_call. */
static const char *objectscript_udl_call_types[] = {"class_method_call", "relative_dot_method",
"macro", NULL};
static const char *objectscript_udl_module_types[] = {"source_file", NULL};
/* Branching nodes for cyclomatic complexity (verified against grammar node-types) */
static const char *objectscript_udl_branch_types[] = {
+1 -1
View File
@@ -712,7 +712,7 @@ TEST(repro_call_node_behavior_objectscript_udl_method_call) {
CBM_LANG_OBJECTSCRIPT_UDL,
"Behavior.cls",
OBJECTSCRIPT_METHOD_SOURCE,
"method_call",
"do_parameter",
"a typed ObjectScript receiver resolves one exact instance-method call without "
"consuming its argument usage"};
return run_objectscript_call_behavior(&test_case, "repro.Behavior.Sample.Behavior.run",
+4 -5
View File
@@ -59,9 +59,9 @@ typedef struct {
} CallNodeManifestEntry;
enum {
EXPECTED_HISTORICAL_CALL_NODE_TOTAL = 226,
EXPECTED_ACTIVE_PRIMARY_TOTAL = 196,
EXPECTED_DIRECT_CALLS = 160,
EXPECTED_HISTORICAL_CALL_NODE_TOTAL = 225,
EXPECTED_ACTIVE_PRIMARY_TOTAL = 195,
EXPECTED_DIRECT_CALLS = 159,
EXPECTED_CONSTRUCTOR_CALLS = 22,
EXPECTED_OPERATOR_CALLS = 12,
EXPECTED_IMPLICIT_CALLS = 2,
@@ -70,7 +70,7 @@ enum {
EXPECTED_CALLEE_WRAPPERS = 8,
EXPECTED_ARGUMENT_WRAPPERS = 1,
EXPECTED_CONTROL_OR_DOCUMENT_NONCALLS = 6,
EXPECTED_PRIMARY_OWNERS = 196,
EXPECTED_PRIMARY_OWNERS = 195,
EXPECTED_SYNTHETIC_OWNERS = 10,
EXPECTED_NO_CALL_EDGE_OWNERS = 20,
EXPECTED_PRIMARY_OPERATOR_CALLS = 4,
@@ -310,7 +310,6 @@ static const CallNodeManifestEntry CALL_NODE_MANIFEST[] = {
ENTRY(CBM_LANG_MOJO, "call", DIRECT_CALL, PRIMARY_EXTRACTOR, true, true),
ENTRY(CBM_LANG_OBJECTSCRIPT_UDL, "class_method_call", DIRECT_CALL, PRIMARY_EXTRACTOR, true,
true),
ENTRY(CBM_LANG_OBJECTSCRIPT_UDL, "method_call", DIRECT_CALL, PRIMARY_EXTRACTOR, true, true),
ENTRY(CBM_LANG_OBJECTSCRIPT_UDL, "relative_dot_method", DIRECT_CALL, PRIMARY_EXTRACTOR, true,
true),
ENTRY(CBM_LANG_OBJECTSCRIPT_UDL, "macro", DIRECT_CALL, PRIMARY_EXTRACTOR, true, true),