summaryrefslogtreecommitdiff
path: root/yjit_core.c
diff options
context:
space:
mode:
authorMaxime Chevalier-Boisvert <maxime.chevalierboisvert@shopify.com>2021-04-09 11:44:35 -0400
committerAlan Wu <XrXr@users.noreply.github.com>2021-10-20 18:19:33 -0400
commit6164274c76d31bc447a92c59c8d277670a93f229 (patch)
tree187c238cfd80a5a73b039b02821503f294ea70e4 /yjit_core.c
parent0805cba73572a5150975a0dfdc4461ae0872e90c (diff)
Re-enable local type tracking, until first call
Diffstat (limited to 'yjit_core.c')
-rw-r--r--yjit_core.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/yjit_core.c b/yjit_core.c
index 64a87b5d8a..9469616947 100644
--- a/yjit_core.c
+++ b/yjit_core.c
@@ -208,6 +208,13 @@ void ctx_set_local_type(ctx_t* ctx, size_t idx, val_type_t type)
ctx->local_types[idx] = type;
}
+// Erase local variable type information
+// eg: because of a call we can't track
+void ctx_clear_local_types(ctx_t* ctx)
+{
+ memset(&ctx->local_types, 0, sizeof(ctx->local_types));
+}
+
/*
Compute a difference between two value types
Returns 0 if the two are the same