You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
wasm3/source/m3_optimize.c

30 lines
473 B
C

//
// m3_optimize.c
//
// Created by Steven Massey on 4/27/19.
// Copyright © 2019 Steven Massey. All rights reserved.
//
#include "m3_compile.h"
#include "m3_exec.h"
// not currently used
bool PeekNextOpcode (IM3Compilation o, u8 i_opcode)
{
bool found = false;
if (o->wasm < o->wasmEnd)
{
u8 opcode = * o->wasm;
if (opcode == i_opcode)
{
found = true;
o->wasm++;
}
}
return found;
}