phase: 20.49 COMPLETE; 20.50 Flow+String minimal reps; 20.51 selfhost v0/v1 minimal (Option A/B); hv1-inline binop/unop/copy; docs + run_all + CURRENT_TASK -> 21.0
This commit is contained in:
21
examples/aot_string_len_simple.hako
Normal file
21
examples/aot_string_len_simple.hako
Normal file
@ -0,0 +1,21 @@
|
||||
// Simple AOT test for String.length()
|
||||
// Just a function that returns string length
|
||||
static box Main {
|
||||
getLen(s) {
|
||||
return s.length()
|
||||
}
|
||||
|
||||
main() {
|
||||
local s = new StringBox()
|
||||
local result = 0
|
||||
local i = 0
|
||||
|
||||
// Call getLen multiple times to trigger JIT
|
||||
loop(i < 20) {
|
||||
result = me.getLen(s)
|
||||
i = i + 1
|
||||
}
|
||||
|
||||
return result
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user