extensions
Steven Massey 3 years ago
parent 451d2d11c5
commit c9188be61e

@ -2270,7 +2270,6 @@ M3Result CompileBlock (IM3Compilation o, /*pc_t * o_startPC,*/ IM3FuncType i_b
block->type = i_blockType;
block->initStackIndex = o->stackIndex;
block->depth ++;
// block->loopDepth += (i_blockOpcode == c_waOp_loop);
block->opcode = i_blockOpcode;
_ (Compile_BlockStatements (o));

@ -66,7 +66,6 @@ typedef struct M3CompilationScope
pc_t pc; // used by ContinueLoop's
IM3BranchPatch patches;
i32 depth;
// i32 loopDepth;
i16 initStackIndex;
IM3FuncType type;
m3opcode_t opcode;

@ -18,6 +18,7 @@ M3Result AllocFuncType (IM3FuncType * o_functionType, u32 i
bool AreFuncTypesEqual (const IM3FuncType i_typeA, const IM3FuncType i_typeB);
//---------------------------------------------------------------------------------------------------------------------------------
typedef struct M3Function
{
@ -194,7 +195,7 @@ typedef struct M3Environment
{
// struct M3Runtime * runtimes;
IM3FuncType funcTypes; // linked list
IM3FuncType funcTypes; // linked list of unique M3FuncType structs that can be compared using pointer-equivalence
IM3FuncType retFuncTypes [c_m3Type_unknown]; // these 'point' to elements in the linked list above.
// the number of elements must match the basic types as per M3ValueType

@ -57,7 +57,7 @@ _ (ReadLEB_u32 (& numTypes, & i_bytes, i_end));
{
i8 form;
_ (ReadLEB_i7 (& form, & i_bytes, i_end));
_throwif (m3Err_wasmMalformed, form != -32); // for WA MVP
_throwif (m3Err_wasmMalformed, form != -32); // for Wasm MVP
u32 numArgs;
_ (ReadLEB_u32 (& numArgs, & i_bytes, i_end));
@ -97,7 +97,7 @@ _ (NormalizeType (& retType, wasmType));
ftype->types[r] = retType;
}
memcpy(ftype->types + numRets, argTypes, numArgs); m3log (parse, " type %2d: %s", i, SPrintFuncTypeSignature (ftype));
memcpy (ftype->types + numRets, argTypes, numArgs); m3log (parse, " type %2d: %s", i, SPrintFuncTypeSignature (ftype));
Environment_AddFuncType (io_module->environment, & ftype);
io_module->funcTypes [i] = ftype;

Loading…
Cancel
Save