MWCC/includes/compiler/Switch.h

30 lines
513 B
C
Raw Normal View History

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