Skip to content

Commit

Permalink
Remove type from TableElement
Browse files Browse the repository at this point in the history
  • Loading branch information
gumb0 committed Oct 21, 2020
1 parent b250510 commit 89c28dc
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
3 changes: 2 additions & 1 deletion lib/fizzy/execute.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -629,7 +629,8 @@ ExecutionResult execute(Instance& instance, FuncIdx func_idx, const Value* args,
goto trap;

// check actual type against expected type
const auto& actual_type = called_func->type;
const auto& actual_type =
called_func->instance->module->get_function_type(called_func->func_idx);
const auto& expected_type = instance.module->typesec[expected_type_idx];
if (expected_type != actual_type)
goto trap;
Expand Down
2 changes: 1 addition & 1 deletion lib/fizzy/instantiate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ std::unique_ptr<Instance> instantiate(std::unique_ptr<const Module> module,
auto it_table = instance->table->begin() + elementsec_offsets[i];
for (const auto idx : instance->module->elementsec[i].init)
{
*it_table++ = {instance.get(), idx, instance->module->get_function_type(idx), {}};
*it_table++ = {instance.get(), idx, {}};
}
}

Expand Down
1 change: 0 additions & 1 deletion lib/fizzy/instantiate.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ struct TableElement
{
Instance* instance;
FuncIdx func_idx;
FuncType type;
std::shared_ptr<Instance> shared_instance;
};

Expand Down

0 comments on commit 89c28dc

Please sign in to comment.