From c384ef07991d08dc378bf6450363aaa654099813 Mon Sep 17 00:00:00 2001 From: Kevin Newton Date: Tue, 5 Sep 2023 12:34:16 -0400 Subject: [ruby/yarp] Introduce a BlockLocalVariableNode This is a tradeoff that I think is worth it. Right now we have a location list that tracks the location of each of the block locals. Instead, I'd like to make that a node list that has a proper node in each spot in the list. In doing so, we eliminate the need to have a location list at all, making it simpler on all of the various consumers as we have one fewer field type. There should be minimal memory implications here since this syntax is exceedingly rare. https://github.com/ruby/yarp/commit/04d329ddf0 --- yarp/node.h | 4 ---- 1 file changed, 4 deletions(-) (limited to 'yarp/node.h') diff --git a/yarp/node.h b/yarp/node.h index f2d5be8bf2..1b546f086f 100644 --- a/yarp/node.h +++ b/yarp/node.h @@ -4,9 +4,6 @@ #include "yarp/defines.h" #include "yarp/parser.h" -// Append a token to the given list. -void yp_location_list_append(yp_location_list_t *list, const yp_token_t *token); - // Append a new node onto the end of the node list. void yp_node_list_append(yp_node_list_t *list, yp_node_t *node); @@ -31,7 +28,6 @@ YP_EXPORTED_FUNCTION void yp_node_memsize(yp_node_t *node, yp_memsize_t *memsize YP_EXPORTED_FUNCTION const char * yp_node_type_to_str(yp_node_type_t node_type); #define YP_EMPTY_NODE_LIST ((yp_node_list_t) { .nodes = NULL, .size = 0, .capacity = 0 }) -#define YP_EMPTY_LOCATION_LIST ((yp_location_list_t) { .locations = NULL, .size = 0, .capacity = 0 }) #endif // YARP_NODE_H -- cgit v1.2.3