Skip to content

Commit

Permalink
Add constructors to Code
Browse files Browse the repository at this point in the history
  • Loading branch information
chfast committed Mar 30, 2020
1 parent 12b951f commit a1eb378
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lib/fizzy/types.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,14 @@ struct Code
// The decoded instructions' immediate values.
// These are instruction-type dependent fixed size value in the order of instructions.
bytes immediates;

Code() noexcept = default;

Code(uint32_t _local_count, std::vector<Instr> _instructions, bytes _immediates) noexcept
: local_count{_local_count},
instructions{std::move(_instructions)},
immediates{std::move(_immediates)}
{}
};

/// The reference to the `code` in the wasm binary.
Expand Down

0 comments on commit a1eb378

Please sign in to comment.