From 0769c83b1bfa3264e1daf271de8da09ed5ce630d Mon Sep 17 00:00:00 2001 From: Razvan Nitu Date: Thu, 23 May 2024 14:36:33 +0300 Subject: [PATCH] Revert "simplify union evc (#16502)" This reverts commit 35bcd18e513f94ebf9523f1545974c8192c0075e. --- compiler/src/dmd/backend/code.d | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/compiler/src/dmd/backend/code.d b/compiler/src/dmd/backend/code.d index 56b564fd0fd4..97c2d5e52fbd 100644 --- a/compiler/src/dmd/backend/code.d +++ b/compiler/src/dmd/backend/code.d @@ -34,7 +34,7 @@ nothrow: alias segidx_t = int; // index into SegData[] /********************************** - * Variant for operand of code struct + * Code data type */ struct _Declaration; @@ -49,7 +49,7 @@ union evc targ_size_t Vsize_t; struct { - targ_size_t Vpointer; /// offset from start of segment + targ_size_t Vpointer; int Vseg; /// segment the pointer is in } Srcpos Vsrcpos; /// source position for OPlinnum @@ -60,12 +60,19 @@ union evc struct { targ_size_t Voffset; /// offset from symbol - union - { - Symbol* Vsym; /// pointer to symbol table (FLfunc,FLextern) - _Declaration* Vdsym; /// pointer to D Declaration - _LabelDsymbol* Vlsym; /// pointer to D LabelDSymbol - } + Symbol *Vsym; /// pointer to symbol table (FLfunc,FLextern) + } + + struct + { + targ_size_t Vdoffset; /// offset from symbol + _Declaration *Vdsym; /// pointer to D symbol table + } + + struct + { + targ_size_t Vloffset; /// offset from symbol + _LabelDsymbol *Vlsym; /// pointer to D Label } struct