Compare commits
2 Commits
8d915f03bf
...
d74f67f9a8
Author | SHA1 | Date |
---|---|---|
Ben Visness | d74f67f9a8 | |
Ben Visness | caed72856e |
|
@ -439,7 +439,7 @@ i32 orca_runloop(void* user)
|
||||||
fread(app->env.wasmBytecode.ptr, 1, app->env.wasmBytecode.len, file);
|
fread(app->env.wasmBytecode.ptr, 1, app->env.wasmBytecode.len, file);
|
||||||
fclose(file);
|
fclose(file);
|
||||||
|
|
||||||
u32 stackSize = 65536;
|
u32 stackSize = 65536 * 20; // MOAR STACK
|
||||||
app->env.m3Env = m3_NewEnvironment();
|
app->env.m3Env = m3_NewEnvironment();
|
||||||
|
|
||||||
app->env.m3Runtime = m3_NewRuntime(app->env.m3Env, stackSize, NULL);
|
app->env.m3Runtime = m3_NewRuntime(app->env.m3Env, stackSize, NULL);
|
||||||
|
|
|
@ -196,23 +196,16 @@ oc_str8_list oc_str8_split(oc_arena* arena, oc_str8 str, oc_str8_list separators
|
||||||
}
|
}
|
||||||
if(foundSep)
|
if(foundSep)
|
||||||
{
|
{
|
||||||
//NOTE(martin): we found a separator. If the start of the current substring is != ptr,
|
oc_str8 sub = oc_str8_from_buffer(ptr - subStart, subStart);
|
||||||
// the current substring is not empty and we emit the substring
|
oc_str8_list_push(arena, &list, sub);
|
||||||
if(ptr != subStart)
|
|
||||||
{
|
|
||||||
oc_str8 sub = oc_str8_from_buffer(ptr - subStart, subStart);
|
|
||||||
oc_str8_list_push(arena, &list, sub);
|
|
||||||
}
|
|
||||||
ptr += foundSep->len - 1; //NOTE(martin): ptr is incremented at the end of the loop
|
ptr += foundSep->len - 1; //NOTE(martin): ptr is incremented at the end of the loop
|
||||||
subStart = ptr + 1;
|
subStart = ptr + 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//NOTE(martin): emit the last substring
|
//NOTE(martin): emit the last substring
|
||||||
if(ptr != subStart)
|
oc_str8 sub = oc_str8_from_buffer(ptr - subStart, subStart);
|
||||||
{
|
oc_str8_list_push(arena, &list, sub);
|
||||||
oc_str8 sub = oc_str8_from_buffer(ptr - subStart, subStart);
|
|
||||||
oc_str8_list_push(arena, &list, sub);
|
|
||||||
}
|
|
||||||
return (list);
|
return (list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue