Merge branch 'quicken_native' into fix_native_suite

This commit is contained in:
2026-02-17 12:22:42 -06:00
2 changed files with 769 additions and 427 deletions

View File

@@ -489,6 +489,9 @@ function compile_native_batched(il_parts, cc, tmp_prefix) {
var ai = 0
var rc = null
var parallel_cmd = null
var helpers_il = (il_parts.helpers && length(il_parts.helpers) > 0)
? text(il_parts.helpers, "\n") : ""
var prefix = null
if (nfuncs < nbatch) nbatch = nfuncs
if (nbatch < 1) nbatch = 1
@@ -501,7 +504,9 @@ function compile_native_batched(il_parts, cc, tmp_prefix) {
batch_fns[] = il_parts.functions[fi]
fi = fi + 1
}
batch_il = il_parts.data + "\n\n" + text(batch_fns, "\n")
// Batch 0 includes helper functions; others reference them as external symbols
prefix = (bi == 0 && helpers_il != "") ? helpers_il + "\n\n" : ""
batch_il = il_parts.data + "\n\n" + prefix + text(batch_fns, "\n")
asm_text = os.qbe(batch_il)
s_path = tmp_prefix + '_b' + text(bi) + '.s'
o_path = tmp_prefix + '_b' + text(bi) + '.o'
@@ -595,7 +600,6 @@ Build.compile_native = function(src_path, target, buildtype, pkg) {
sym_name = shop.c_symbol_for_file(pkg, fd.basename(src_path))
}
var il_parts = qbe_emit(optimized, qbe_macros, sym_name)
var il = il_parts.data + "\n\n" + text(il_parts.functions, "\n")
// Content hash for cache key
var hash = content_hash(src + '\n' + _target + '\nnative')

File diff suppressed because it is too large Load Diff