Skip to content

Commit 6408e2c

Browse files
committed
Merge branch 'john/erts/explain-deferred-fun-field-removal'
* john/erts/explain-deferred-fun-field-removal: erts: Explain why we can't get rid of old_index and old_uniq
2 parents 4378080 + 007ac9c commit 6408e2c

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

erts/emulator/beam/erl_fun.h

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,17 @@ typedef struct erl_fun_entry {
4343
int arity; /* The arity of the fun. */
4444
int index; /* New style index. */
4545

46-
/* These have been prepared for removal in OTP 29. */
46+
/* These are not used to identify the function anymore, and could in theory
47+
* be removed at any time if we didn't care about backwards compatibility.
48+
*
49+
* However, we have leaked their presence through `phash2`. If we would
50+
* replace these with placeholder values or whatever, the hash of a
51+
* fun would depend on what node version it runs on. What's worse, if we
52+
* were to have the _compiler_ emit the placeholder value for a few
53+
* versions before removal, we would still run afoul of this mess if a
54+
* really old fun was stored in ETF.
55+
*
56+
* We'll need decide what to do with this in OTP 30+ */
4757
int old_uniq; /* Unique number (old_style) */
4858
int old_index; /* Old style index */
4959
} ErlFunEntry;

0 commit comments

Comments
 (0)