~maelkum/viuavm

fbb18c2cefb259ee79718e09cf2d188d9e771bf3 — Marek Marecki a month ago 299b15c devel
Format code
2 files changed, 2 insertions(+), 8 deletions(-)

M new/include/viua/vm/core.h
M new/src/vm/ins.cpp
M new/include/viua/vm/core.h => new/include/viua/vm/core.h +1 -5
@@ 440,11 440,7 @@ struct Process {
    stack_type stack;

    explicit inline Process(pid_type const p, Core* c, Module const& m)
            : pid{p}
            , core{c}
            , module{m}
            , strtab{&m.strings_table}
            , stack{*this}
            : pid{p}, core{c}, module{m}, strtab{&m.strings_table}, stack{*this}
    {}

    inline auto push_frame(size_t const locals,

M new/src/vm/ins.cpp => new/src/vm/ins.cpp +1 -3
@@ 1337,9 1337,7 @@ auto execute(FLOAT const op, Stack& stack, ip_type const) -> void
    auto const data_size   = [&strtab, data_offset]() -> uint64_t {
        auto const size_offset = (data_offset - sizeof(uint64_t));
        auto tmp               = uint64_t{};
        memcpy(&tmp,
               &strtab[size_offset],
               sizeof(uint64_t));
        memcpy(&tmp, &strtab[size_offset], sizeof(uint64_t));
        return le64toh(tmp);
    }();