29 lines
544 B
C

#ifndef COMPILER_SWITCH_H
#define COMPILER_SWITCH_H
#include "compiler/common.h"
typedef struct SwitchCase {
struct SwitchCase *next;
CLabel *label;
CInt64 min;
CInt64 max;
} SwitchCase;
typedef struct CaseRange {
CInt64 min;
CInt64 range;
PCodeLabel *label;
} CaseRange;
typedef struct SwitchInfo {
SwitchCase *cases;
CLabel *defaultlabel;
} SwitchInfo;
extern ObjectList *switchtables;
extern void switchstatement(ENode *expr, SwitchInfo *info);
extern void dumpswitchtables(Object *funcobj);
#endif