mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 17:07:46 +00:00
LibWasm: Make the Module ctor generate a list of module functions
This list is supposed to be accessed rather frequently, so there's no reason to make things slower by generating it many times on the spot.
This commit is contained in:
parent
6e891822c5
commit
2b755f1fbf
4 changed files with 70 additions and 26 deletions
|
@ -11,14 +11,16 @@
|
|||
namespace Wasm {
|
||||
|
||||
struct Printer {
|
||||
explicit Printer(OutputStream& stream)
|
||||
explicit Printer(OutputStream& stream, size_t initial_indent = 0)
|
||||
: m_stream(stream)
|
||||
, m_indent(initial_indent)
|
||||
{
|
||||
}
|
||||
|
||||
void print(const Wasm::BlockType&);
|
||||
void print(const Wasm::CodeSection&);
|
||||
void print(const Wasm::CodeSection::Code&);
|
||||
void print(const Wasm::CodeSection::Func&);
|
||||
void print(const Wasm::ConstrainedStream&);
|
||||
void print(const Wasm::CustomSection&);
|
||||
void print(const Wasm::DataCountSection&);
|
||||
|
@ -29,7 +31,6 @@ struct Printer {
|
|||
void print(const Wasm::ExportSection&);
|
||||
void print(const Wasm::ExportSection::Export&);
|
||||
void print(const Wasm::Expression&);
|
||||
void print(const Wasm::Func&);
|
||||
void print(const Wasm::FunctionSection&);
|
||||
void print(const Wasm::FunctionType&);
|
||||
void print(const Wasm::GlobalSection&);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue