forked from Mirrors/wasm3
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.
33 lines
487 B
C
33 lines
487 B
C
//
|
|
// m3_optimize.c
|
|
// m3
|
|
//
|
|
// 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 now.
|
|
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;
|
|
}
|
|
|
|
|