Fix function argument ordering

This commit is contained in:
Krzosa Karol
2022-06-13 21:01:22 +02:00
parent 3bbe5e5c2b
commit 95235836fd
2 changed files with 10 additions and 1 deletions

View File

@@ -26,7 +26,12 @@ align_up :: (size: SizeU, align: SizeU): SizeU
reserve :: (size: SizeU): OS_Memory reserve :: (size: SizeU): OS_Memory
result := OS_Memory{reserve=align_up(size, OS_PAGE_SIZE)} result := OS_Memory{reserve=align_up(size, OS_PAGE_SIZE)}
result.data = VirtualAlloc(0, result.reserve, MEM_RESERVE, PAGE_READWRITE)->*U8 result.data = VirtualAlloc(
flProtect = PAGE_READWRITE,
dwSize = result.reserve,
flAllocationType = MEM_RESERVE,
lpAddress = 0,
)->*U8
return result return result
clamp_top_sizeu :: (val: SizeU, max: SizeU): SizeU clamp_top_sizeu :: (val: SizeU, max: SizeU): SizeU
@@ -45,3 +50,5 @@ commit :: (m: *OS_Memory, size: SizeU): Bool
return true return true
return false return false
entry :: ()
memory := reserve(size = 10000)

View File

@@ -884,6 +884,8 @@ resolve_expr(Ast_Expr *ast, Resolve_Flag flags, Ast_Type *compound_context){
} }
node->exprs = items.tight_copy(pctx->perm);
// @note: check if all arguments are included and cleanup // @note: check if all arguments are included and cleanup
For(node->exprs){ For(node->exprs){
if(!is_flag_set(it->flags, AST_ITEM_INCLUDED)) if(!is_flag_set(it->flags, AST_ITEM_INCLUDED))