summaryrefslogtreecommitdiff
path: root/src/ir.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/ir.h')
-rw-r--r--src/ir.h36
1 files changed, 18 insertions, 18 deletions
diff --git a/src/ir.h b/src/ir.h
index a27f4d16..78014bfa 100644
--- a/src/ir.h
+++ b/src/ir.h
@@ -413,8 +413,8 @@ typedef LoadStoreExpr<ExprType::AtomicRmwCmpxchg> AtomicRmwCmpxchgExpr;
typedef LoadStoreExpr<ExprType::AtomicWait> AtomicWaitExpr;
typedef LoadStoreExpr<ExprType::AtomicNotify> AtomicNotifyExpr;
-struct Exception {
- explicit Exception(string_view name) : name(name.to_string()) {}
+struct Event {
+ explicit Event(string_view name) : name(name.to_string()) {}
std::string name;
TypeVector sig;
@@ -604,12 +604,12 @@ class GlobalImport : public ImportMixin<ExternalKind::Global> {
Global global;
};
-class ExceptionImport : public ImportMixin<ExternalKind::Except> {
+class EventImport : public ImportMixin<ExternalKind::Event> {
public:
- explicit ExceptionImport(string_view name = string_view())
- : ImportMixin<ExternalKind::Except>(), except(name) {}
+ explicit EventImport(string_view name = string_view())
+ : ImportMixin<ExternalKind::Event>(), event(name) {}
- Exception except;
+ Event event;
};
struct Export {
@@ -629,7 +629,7 @@ enum class ModuleFieldType {
Memory,
DataSegment,
Start,
- Except
+ Event
};
class ModuleField : public intrusive_list_base<ModuleField> {
@@ -748,13 +748,13 @@ class DataSegmentModuleField
DataSegment data_segment;
};
-class ExceptionModuleField : public ModuleFieldMixin<ModuleFieldType::Except> {
+class EventModuleField : public ModuleFieldMixin<ModuleFieldType::Event> {
public:
- explicit ExceptionModuleField(const Location& loc = Location(),
- string_view name = string_view())
- : ModuleFieldMixin<ModuleFieldType::Except>(loc), except(name) {}
+ explicit EventModuleField(const Location& loc = Location(),
+ string_view name = string_view())
+ : ModuleFieldMixin<ModuleFieldType::Event>(loc), event(name) {}
- Exception except;
+ Event event;
};
class StartModuleField : public ModuleFieldMixin<ModuleFieldType::Start> {
@@ -784,8 +784,8 @@ struct Module {
const Global* GetGlobal(const Var&) const;
Global* GetGlobal(const Var&);
const Export* GetExport(string_view) const;
- Exception* GetExcept(const Var&) const;
- Index GetExceptIndex(const Var&) const;
+ Event* GetEvent(const Var&) const;
+ Index GetEventIndex(const Var&) const;
const DataSegment* GetDataSegment(const Var&) const;
DataSegment* GetDataSegment(const Var&);
Index GetDataSegmentIndex(const Var&) const;
@@ -801,7 +801,7 @@ struct Module {
// TODO(binji): move this into a builder class?
void AppendField(std::unique_ptr<DataSegmentModuleField>);
void AppendField(std::unique_ptr<ElemSegmentModuleField>);
- void AppendField(std::unique_ptr<ExceptionModuleField>);
+ void AppendField(std::unique_ptr<EventModuleField>);
void AppendField(std::unique_ptr<ExportModuleField>);
void AppendField(std::unique_ptr<FuncModuleField>);
void AppendField(std::unique_ptr<FuncTypeModuleField>);
@@ -817,7 +817,7 @@ struct Module {
std::string name;
ModuleFieldList fields;
- Index num_except_imports = 0;
+ Index num_event_imports = 0;
Index num_func_imports = 0;
Index num_table_imports = 0;
Index num_memory_imports = 0;
@@ -825,7 +825,7 @@ struct Module {
// Cached for convenience; the pointers are shared with values that are
// stored in either ModuleField or Import.
- std::vector<Exception*> excepts;
+ std::vector<Event*> events;
std::vector<Func*> funcs;
std::vector<Global*> globals;
std::vector<Import*> imports;
@@ -837,7 +837,7 @@ struct Module {
std::vector<DataSegment*> data_segments;
std::vector<Var*> starts;
- BindingHash except_bindings;
+ BindingHash event_bindings;
BindingHash func_bindings;
BindingHash global_bindings;
BindingHash export_bindings;