|
@@ -3,6 +3,13 @@ include "jit.alh"
|
|
|
|
|
|
Void function test_main()
|
|
|
|
|
|
+Void function call_function(function_name : String):
|
|
|
+ // Resolve the specified function, and execute it.
|
|
|
+ Element func
|
|
|
+ func = resolve(function_name)
|
|
|
+ func()
|
|
|
+ return!
|
|
|
+
|
|
|
Void function main():
|
|
|
String config
|
|
|
Integer start_time
|
|
@@ -12,7 +19,10 @@ Void function main():
|
|
|
set_jit_enabled(False)
|
|
|
|
|
|
start_time = time()
|
|
|
- test_main()
|
|
|
+ // HACK: use `call_function` to hide what would otherwise be a direct call to `test_main`
|
|
|
+ // from the JIT. This prevents the JIT from compiling `test_main` _before_ `config` has
|
|
|
+ // been analyzed.
|
|
|
+ call_function("test_main")
|
|
|
end_time = time()
|
|
|
output(end_time - start_time)
|
|
|
|