diff options
Diffstat (limited to 'src/cmd/internal/obj/link.go')
-rw-r--r-- | src/cmd/internal/obj/link.go | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/cmd/internal/obj/link.go b/src/cmd/internal/obj/link.go index a3eba73906..dc06a3aa11 100644 --- a/src/cmd/internal/obj/link.go +++ b/src/cmd/internal/obj/link.go @@ -495,10 +495,20 @@ type FuncInfo struct { ArgInfo *LSym // argument info for traceback ArgLiveInfo *LSym // argument liveness info for traceback WrapInfo *LSym // for wrapper, info of wrapped function + JumpTables []JumpTable FuncInfoSym *LSym } +// JumpTable represents a table used for implementing multi-way +// computed branching, used typically for implementing switches. +// Sym is the table itself, and Targets is a list of target +// instructions to go to for the computed branch index. +type JumpTable struct { + Sym *LSym + Targets []*Prog +} + // NewFuncInfo allocates and returns a FuncInfo for LSym. func (s *LSym) NewFuncInfo() *FuncInfo { if s.Extra != nil { |