File 0420-erts-Remove-unused-MatchProg.single_variable.patch of Package erlang
From 8f086707f59fe8309b85d59b253992fedf70346a Mon Sep 17 00:00:00 2001
From: Sverker Eriksson <sverker@erlang.org>
Date: Tue, 9 Feb 2021 17:18:49 +0100
Subject: [PATCH 20/34] erts: Remove unused MatchProg.single_variable
---
erts/emulator/beam/erl_db_util.c | 5 ++---
erts/emulator/beam/erl_db_util.h | 1 -
2 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/erts/emulator/beam/erl_db_util.c b/erts/emulator/beam/erl_db_util.c
index e55b7bfc33..34856727ca 100644
--- a/erts/emulator/beam/erl_db_util.c
+++ b/erts/emulator/beam/erl_db_util.c
@@ -1903,8 +1903,8 @@ restart:
** ..........
** +-------------+
** The stack is expected to grow towards *higher* adresses.
- ** A special case is when the match expression is a single binding
- ** (i.e '$1'), then the field single_variable is set to 1.
+ ** A special case is when the match expression is a single binding
+ ** (i.e '$1').
*/
bp = erts_create_magic_binary(((sizeof(MatchProg) - sizeof(UWord)) +
(DMC_STACK_NUM(text) * sizeof(UWord))),
@@ -1914,7 +1914,6 @@ restart:
ret->saved_program = NIL;
ret->term_save = context.save;
ret->num_bindings = heap.vars_used;
- ret->single_variable = context.special;
sys_memcpy(ret->text, DMC_STACK_DATA(text),
DMC_STACK_NUM(text) * sizeof(UWord));
ret->stack_offset = heap.vars_used*sizeof(MatchVariable) + FENCE_PATTERN_SIZE;
diff --git a/erts/emulator/beam/erl_db_util.h b/erts/emulator/beam/erl_db_util.h
index 83dbf9f0f7..5ee059ef40 100644
--- a/erts/emulator/beam/erl_db_util.h
+++ b/erts/emulator/beam/erl_db_util.h
@@ -466,7 +466,6 @@ typedef struct match_prog {
ErlHeapFragment *term_save; /* Only if needed, a list of message
buffers for off heap copies
(i.e. binaries)*/
- int single_variable; /* ets:match needs to know this. */
int num_bindings; /* Size of heap */
/* The following two are only filled in when match specs
are used for tracing */
--
2.26.2