1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

all: do compile time const evaluation for const x = "abc" + "xyz" and const x = 16 * 1024 + 5 (fix const prealloc_block_size)

This commit is contained in:
Delyan Angelov
2021-07-18 19:41:39 +03:00
parent 3ccde5ce55
commit 48546d0f45
8 changed files with 356 additions and 77 deletions

View File

@@ -13,8 +13,7 @@ module builtin
// NB: `-prealloc` is NOT safe to be used for multithreaded programs!
// size of the preallocated chunk
// TODO: see why comptime calculation of integer expressions fails
const prealloc_block_size = 16777216
const prealloc_block_size = 16 * 1024 * 1024
__global g_memory_block &VMemoryBlock
[heap]