summaryrefslogtreecommitdiff
path: root/src/analysis/scan/exprs
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2023-10-06 11:41:46 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2023-10-06 11:41:46 (GMT)
commitedb4cc9c11c417d81b1948d93dfd171f0696217a (patch)
treef4d4d121f6a7428c06cf9e6610113a9d3755a461 /src/analysis/scan/exprs
parent2553a987f2d8ba35d839152a35392ca29b409841 (diff)
Rename the registered items for ROST to make their name more expressive.
Diffstat (limited to 'src/analysis/scan/exprs')
-rw-r--r--src/analysis/scan/exprs/access-int.h6
-rw-r--r--src/analysis/scan/exprs/access.c18
-rw-r--r--src/analysis/scan/exprs/access.h4
-rw-r--r--src/analysis/scan/exprs/call.c22
4 files changed, 25 insertions, 25 deletions
diff --git a/src/analysis/scan/exprs/access-int.h b/src/analysis/scan/exprs/access-int.h
index 3216493..be37241 100644
--- a/src/analysis/scan/exprs/access-int.h
+++ b/src/analysis/scan/exprs/access-int.h
@@ -42,8 +42,8 @@ struct _GScanNamedAccess
union
{
- GRegisteredItem *base; /* Base de recherche */
- GRegisteredItem *resolved; /* Elément ciblé au final */
+ GScanRegisteredItem *base; /* Base de recherche */
+ GScanRegisteredItem *resolved; /* Elément ciblé au final */
GObject *any; /* Accès indistinct */
};
@@ -67,7 +67,7 @@ struct _GScanNamedAccessClass
bool g_scan_named_access_create(GScanNamedAccess *, const sized_string_t *);
/* Prépare une réduction en menant une résolution locale. */
-GRegisteredItem *_g_scan_named_access_prepare_reduction(const GScanNamedAccess *, GScanContext *, GScanScope *);
+GScanRegisteredItem *_g_scan_named_access_prepare_reduction(const GScanNamedAccess *, GScanContext *, GScanScope *);
diff --git a/src/analysis/scan/exprs/access.c b/src/analysis/scan/exprs/access.c
index 0df46e6..a1331b0 100644
--- a/src/analysis/scan/exprs/access.c
+++ b/src/analysis/scan/exprs/access.c
@@ -281,7 +281,7 @@ static void g_scan_named_access_copy(GScanNamedAccess *dest, const GScanNamedAcc
* *
******************************************************************************/
-GScanExpression *g_scan_named_access_duplicate(const GScanNamedAccess *access, GRegisteredItem *resolved)
+GScanExpression *g_scan_named_access_duplicate(const GScanNamedAccess *access, GScanRegisteredItem *resolved)
{
GScanExpression *result; /* Instance copiée à retourner */
GType type; /* Type d'objet à copier */
@@ -315,7 +315,7 @@ GScanExpression *g_scan_named_access_duplicate(const GScanNamedAccess *access, G
* *
******************************************************************************/
-void g_scan_named_access_set_base(GScanNamedAccess *access, GRegisteredItem *base)
+void g_scan_named_access_set_base(GScanNamedAccess *access, GScanRegisteredItem *base)
{
g_clear_object(&access->base);
@@ -372,10 +372,10 @@ void g_scan_named_access_attach_next(GScanNamedAccess *access, GScanNamedAccess
* *
******************************************************************************/
-GRegisteredItem *_g_scan_named_access_prepare_reduction(const GScanNamedAccess *expr, GScanContext *ctx, GScanScope *scope)
+GScanRegisteredItem *_g_scan_named_access_prepare_reduction(const GScanNamedAccess *expr, GScanContext *ctx, GScanScope *scope)
{
- GRegisteredItem *result; /* Etat synthétisé à retourner */
- GRegisteredItem *base; /* Base de recherche courante */
+ GScanRegisteredItem *result; /* Etat synthétisé à retourner */
+ GScanRegisteredItem *base; /* Base de recherche courante */
result = NULL;
@@ -387,9 +387,9 @@ GRegisteredItem *_g_scan_named_access_prepare_reduction(const GScanNamedAccess *
g_object_ref(G_OBJECT(base));
}
else
- base = G_REGISTERED_ITEM(get_rost_root_namespace());
+ base = G_SCAN_REGISTERED_ITEM(get_rost_root_namespace());
- g_registered_item_resolve(base, expr->target, ctx, scope, &result);
+ g_scan_registered_item_resolve(base, expr->target, ctx, scope, &result);
}
@@ -429,7 +429,7 @@ GRegisteredItem *_g_scan_named_access_prepare_reduction(const GScanNamedAccess *
static ScanReductionState g_scan_named_access_reduce(const GScanNamedAccess *expr, GScanContext *ctx, GScanScope *scope, GScanExpression **out)
{
ScanReductionState result; /* Etat synthétisé à retourner */
- GRegisteredItem *resolved; /* Cible concrète obtenue */
+ GScanRegisteredItem *resolved; /* Cible concrète obtenue */
GScanExpression *new_next; /* Nouvelle version du suivant */
const char *current_rule; /* Nom de la règle courante */
bool status; /* Bilan d'une autre règle */
@@ -448,7 +448,7 @@ static ScanReductionState g_scan_named_access_reduce(const GScanNamedAccess *exp
*/
if (expr->next == NULL)
{
- status = g_registered_item_reduce(resolved, ctx, scope, out);
+ status = g_scan_registered_item_reduce(resolved, ctx, scope, out);
result = (status ? SRS_REDUCED : SRS_UNRESOLVABLE);
diff --git a/src/analysis/scan/exprs/access.h b/src/analysis/scan/exprs/access.h
index 7c007a9..bf83dd0 100644
--- a/src/analysis/scan/exprs/access.h
+++ b/src/analysis/scan/exprs/access.h
@@ -53,10 +53,10 @@ GType g_scan_named_access_get_type(void);
GScanExpression *g_scan_named_access_new(const sized_string_t *);
/* Reproduit un accès en place dans une nouvelle instance. */
-GScanExpression *g_scan_named_access_duplicate(const GScanNamedAccess *, GRegisteredItem *);
+GScanExpression *g_scan_named_access_duplicate(const GScanNamedAccess *, GScanRegisteredItem *);
/* Définit une base de recherche pour la cible d'accès. */
-void g_scan_named_access_set_base(GScanNamedAccess *, GRegisteredItem *);
+void g_scan_named_access_set_base(GScanNamedAccess *, GScanRegisteredItem *);
/* Complète la chaine d'accès à des expressions. */
void g_scan_named_access_attach_next(GScanNamedAccess *, GScanNamedAccess *);
diff --git a/src/analysis/scan/exprs/call.c b/src/analysis/scan/exprs/call.c
index f68159f..74e0cba 100644
--- a/src/analysis/scan/exprs/call.c
+++ b/src/analysis/scan/exprs/call.c
@@ -264,7 +264,7 @@ static ScanReductionState g_scan_pending_call_reduce(const GScanPendingCall *exp
{
ScanReductionState result; /* Etat synthétisé à retourner */
GScanNamedAccess *access; /* Autre vision de l'expression*/
- GRegisteredItem *resolved; /* Cible concrète obtenue */
+ GScanRegisteredItem *resolved; /* Cible concrète obtenue */
size_t i; /* Boucle de parcours #1 */
GScanExpression *arg; /* Argument réduit à échanger */
GScanExpression *new; /* Nouvelle réduction obtenue */
@@ -358,15 +358,15 @@ static ScanReductionState g_scan_pending_call_reduce(const GScanPendingCall *exp
else if (result == SRS_PENDING)
{
if (new_args == NULL)
- valid = g_registered_item_run_call(resolved,
- expr->args,
- expr->count,
- ctx, scope, &final);
+ valid = g_scan_registered_item_run_call(resolved,
+ expr->args,
+ expr->count,
+ ctx, scope, &final);
else
- valid = g_registered_item_run_call(resolved,
- new_args,
- expr->count,
- ctx, scope, &final);
+ valid = g_scan_registered_item_run_call(resolved,
+ new_args,
+ expr->count,
+ ctx, scope, &final);
if (valid && final != NULL)
{
@@ -376,7 +376,7 @@ static ScanReductionState g_scan_pending_call_reduce(const GScanPendingCall *exp
*
* Ce cas de figure ne se rencontre normalement qu'en bout de chaîne.
*/
- if (!G_IS_REGISTERED_ITEM(final))
+ if (!G_IS_SCAN_REGISTERED_ITEM(final))
{
if (access->next != NULL)
result = SRS_UNRESOLVABLE;
@@ -395,7 +395,7 @@ static ScanReductionState g_scan_pending_call_reduce(const GScanPendingCall *exp
{
assert(access->next != NULL);
- new_next = g_scan_named_access_duplicate(access->next, G_REGISTERED_ITEM(final));
+ new_next = g_scan_named_access_duplicate(access->next, G_SCAN_REGISTERED_ITEM(final));
result = g_scan_expression_reduce(new_next, ctx, scope, out);