From 8ee326565fef61d6458a8ecb5eb3190b5d81e135 Mon Sep 17 00:00:00 2001 From: Brendan Hansen Date: Sat, 18 Nov 2023 21:55:09 -0600 Subject: [PATCH] renamed: `core/std` -> `core/module`; `--no-std` -> `--no-core` --- compiler/include/astnodes.h | 2 +- compiler/src/onyx.c | 12 ++++++------ core/{std.onyx => module.onyx} | 0 core/onyx/cbindgen.onyx | 1 - docs/ideas/mapped_directories.md | 4 ++-- examples/01_hello_world.onyx | 2 +- examples/02_variables.onyx | 2 +- examples/04_fixed_arrays.onyx | 2 +- examples/05_slices.onyx | 2 +- examples/06_dynamic_arrays.onyx | 2 +- examples/07_structs.onyx | 2 +- examples/08_enums.onyx | 2 +- examples/09_for_loops.onyx | 2 +- examples/10_switch_statements.onyx | 2 +- examples/11_map.onyx | 2 +- examples/12_varargs.onyx | 2 +- examples/13_use_keyword.onyx | 2 +- examples/14_overloaded_procs.onyx | 2 +- examples/15_polymorphic_procs.onyx | 2 +- examples/16_pipe_operator.onyx | 2 +- examples/17_operator_overload.onyx | 2 +- examples/18_macros.onyx | 2 +- examples/19_do_blocks.onyx | 2 +- examples/20_auto_return.onyx | 2 +- examples/21_quick_functions.onyx | 2 +- examples/22_interfaces.onyx | 2 +- examples/50_misc.onyx | 2 +- scripts/core_tests.onyx | 2 +- scripts/onyx-pkg.onyx | 2 +- scripts/run_tests.onyx | 3 --- tests/aoc-2020/day1.onyx | 2 +- tests/aoc-2020/day10.onyx | 2 +- tests/aoc-2020/day12.onyx | 2 +- tests/aoc-2020/day13.onyx | 2 +- tests/aoc-2020/day14.onyx | 2 +- tests/aoc-2020/day15.onyx | 2 +- tests/aoc-2020/day16.onyx | 2 +- tests/aoc-2020/day17.onyx | 2 +- tests/aoc-2020/day18.onyx | 2 +- tests/aoc-2020/day19.onyx | 2 +- tests/aoc-2020/day2.onyx | 2 +- tests/aoc-2020/day20.onyx | 2 +- tests/aoc-2020/day21.onyx | 2 +- tests/aoc-2020/day22.onyx | 2 +- tests/aoc-2020/day23.onyx | 2 +- tests/aoc-2020/day24.onyx | 2 +- tests/aoc-2020/day25.onyx | 2 +- tests/aoc-2020/day3.onyx | 2 +- tests/aoc-2020/day4.onyx | 2 +- tests/aoc-2020/day5.onyx | 2 +- tests/aoc-2020/day6.onyx | 2 +- tests/aoc-2020/day7.onyx | 2 +- tests/aoc-2020/day8.onyx | 2 +- tests/aoc-2020/day9.onyx | 2 +- tests/aoc-2021/day01.onyx | 2 +- tests/aoc-2021/day03.onyx | 2 +- tests/aoc-2021/day05.onyx | 2 +- tests/aoc-2021/day06.onyx | 2 +- tests/aoc-2021/day07.onyx | 2 +- tests/aoc-2021/day08.onyx | 2 +- tests/aoc-2021/day09.onyx | 2 +- tests/aoc-2021/day10.onyx | 2 +- tests/aoc-2021/day11.onyx | 2 +- tests/aoc-2021/day12.onyx | 2 +- tests/aoc-2021/day13.onyx | 2 +- tests/aoc-2021/day14.onyx | 2 +- tests/aoc-2021/day15.onyx | 2 +- tests/aoc-2021/day16.onyx | 2 +- tests/aoc-2021/day17.onyx | 2 +- tests/aoc-2021/day18.onyx | 2 +- tests/array_struct_robustness.onyx | 2 +- tests/arrow_notation.onyx | 2 +- tests/atomics.onyx | 2 +- tests/auto_poly.onyx | 2 +- tests/avl_test.onyx | 2 +- tests/baked_parameters.onyx | 2 +- tests/better_field_accesses.onyx | 2 +- tests/bucket_array.onyx | 2 +- tests/bugs/anonymous_struct_defaults.onyx | 2 +- tests/bugs/defer_block_in_macro.onyx | 2 +- tests/bugs/fallthrough_defer_interaction.onyx | 2 +- tests/bugs/macro_auto_return_not_resolved.onyx | 2 +- tests/bugs/namespace_aliasing.onyx | 2 +- tests/caller_location.onyx | 2 +- tests/compile_time_procedures.onyx | 2 +- tests/complicated_polymorph.onyx | 2 +- tests/defer_with_continue.onyx | 2 +- tests/defined_test.onyx | 2 +- tests/float_parsing.onyx | 2 +- tests/hello_world.onyx | 2 +- tests/i32map.onyx | 2 +- tests/if_expressions.onyx | 2 +- tests/implicit_initialize_locals.onyx | 2 +- tests/init_procedures.onyx | 2 +- tests/interfaces.onyx | 2 +- tests/lazy_iterators.onyx | 2 +- tests/multiple_returns_robustness.onyx | 2 +- tests/named_arguments_test.onyx | 2 +- tests/new_printf.onyx | 2 +- tests/new_struct_behaviour.onyx | 2 +- tests/operator_overload.onyx | 2 +- tests/overload_precedence.onyx | 2 +- tests/overload_with_autocast.onyx | 2 +- tests/persist_locals.onyx | 2 +- tests/poly_struct_in_type_info.onyx | 2 +- tests/poly_structs_with_values.onyx | 2 +- tests/polymorphic_array_lengths.onyx | 2 +- tests/remove_test.onyx | 2 +- tests/sets.onyx | 2 +- tests/string_stream_test.onyx | 2 +- tests/struct_robustness.onyx | 2 +- tests/struct_use_pointer_member.onyx | 2 +- tests/switch_using_equals.onyx | 2 +- tests/vararg_test.onyx | 2 +- 114 files changed, 117 insertions(+), 121 deletions(-) rename core/{std.onyx => module.onyx} (100%) diff --git a/compiler/include/astnodes.h b/compiler/include/astnodes.h index 136ae2a3..95ab9110 100644 --- a/compiler/include/astnodes.h +++ b/compiler/include/astnodes.h @@ -1815,7 +1815,7 @@ struct CompileOptions { b32 use_multi_threading : 1; b32 generate_foreign_info : 1; b32 generate_type_info : 1; - b32 no_std : 1; + b32 no_core : 1; b32 no_stale_code : 1; b32 show_all_errors : 1; diff --git a/compiler/src/onyx.c b/compiler/src/onyx.c index 2e6eec7f..eb77f02f 100644 --- a/compiler/src/onyx.c +++ b/compiler/src/onyx.c @@ -84,7 +84,7 @@ static const char *build_docstring = DOCSTRING_HEADER "\t--syminfo (DEPRECATED) Generates a symbol resolution information file. Used by onyx-lsp.\n" "\t--lspinfo Generates an LSP information file. Used by onyx-lsp.\n" "\t--stack-trace Enable dynamic stack trace.\n" - "\t--no-std Disable automatically including \"core/std\".\n" + "\t--no-core Disable automatically including \"core/module\".\n" "\t--no-stale-code Disables use of `#allow_stale_code` directive\n" "\t--no-type-info Disables generating type information\n" "\t--generate-foreign-info Generate information for foreign blocks. Rarely needed, so disabled by default.\n" @@ -113,7 +113,7 @@ static CompileOptions compile_opts_parse(bh_allocator alloc, int argc, char *arg .use_multi_threading = 0, .generate_foreign_info = 0, .generate_type_info = 1, - .no_std = 0, + .no_core = 0, .no_stale_code = 0, .show_all_errors = 0, @@ -262,8 +262,8 @@ static CompileOptions compile_opts_parse(bh_allocator alloc, int argc, char *arg else if (!strcmp(argv[i], "--no-type-info")) { options.generate_type_info = 0; } - else if (!strcmp(argv[i], "--no-std")) { - options.no_std = 1; + else if (!strcmp(argv[i], "--no-core")) { + options.no_core = 1; } else if (!strcmp(argv[i], "--no-stale-code")) { options.no_stale_code = 1; @@ -546,12 +546,12 @@ static void context_init(CompileOptions* opts) { add_entities_for_node(NULL, (AstNode *) load_node, context.global_scope, NULL); } - if (!context.options->no_std) { + if (!context.options->no_core) { entity_heap_insert(&context.entities, ((Entity) { .state = Entity_State_Parse, .type = Entity_Type_Load_File, .package = NULL, - .include = create_load(context.ast_alloc, "core/std"), + .include = create_load(context.ast_alloc, "core/module"), })); } diff --git a/core/std.onyx b/core/module.onyx similarity index 100% rename from core/std.onyx rename to core/module.onyx diff --git a/core/onyx/cbindgen.onyx b/core/onyx/cbindgen.onyx index c1b9ad0e..fe97d219 100644 --- a/core/onyx/cbindgen.onyx +++ b/core/onyx/cbindgen.onyx @@ -8,7 +8,6 @@ package cbindgen // 3. Run the build file with the --generate-foreign-info flag enabled. // // Full example: -// #load "core/std" // #load "./module" // // use core {*} diff --git a/docs/ideas/mapped_directories.md b/docs/ideas/mapped_directories.md index 83e9eff1..f279a25f 100644 --- a/docs/ideas/mapped_directories.md +++ b/docs/ideas/mapped_directories.md @@ -13,7 +13,7 @@ scheme for file resolution, UNLESS you specify the full path, or a *mapped directory* to use as the base directory. For example, instead of relying on "/usr/share/onyx" to be in -the search path to make "core/std" work, we would instead have +the search path to make "core/module" work, we would instead have "core" be a mapped directory to "/usr/share/onyx/core". Then, -you would say, `#load "core:std"` or `#load core "std"` to +you would say, `#load "core:module"` or `#load core "module"` to specify the base path. diff --git a/examples/01_hello_world.onyx b/examples/01_hello_world.onyx index 67e41eb1..f1a5bf58 100644 --- a/examples/01_hello_world.onyx +++ b/examples/01_hello_world.onyx @@ -14,7 +14,7 @@ package main // option to disable loading the standard library, if that is needed. For the sake // of completeness, the following line manually includes the standard library, but // this is not necessary. -#load "core/std" +#load "core/module" // Below is the function declaration for `main`. While it might look weird at first // sight, Onyx uses a consistent syntax for declaring static "things" (functions, diff --git a/examples/02_variables.onyx b/examples/02_variables.onyx index 813f2d98..8b749b2f 100644 --- a/examples/02_variables.onyx +++ b/examples/02_variables.onyx @@ -1,4 +1,4 @@ -// Notice this time, we are not adding, 'package main' or '#load "core/std"' +// Notice this time, we are not adding, 'package main' or '#load "core/module"' // to the top of the file, since every file is automatically part of the // main package unless specified otherwise, and every compilations includes // the standard library. diff --git a/examples/04_fixed_arrays.onyx b/examples/04_fixed_arrays.onyx index 2ac9e93f..5c9fc860 100644 --- a/examples/04_fixed_arrays.onyx +++ b/examples/04_fixed_arrays.onyx @@ -15,7 +15,7 @@ // This file will give examples of all of these things, as well as some of the gotchas // you need to be aware of. -#load "core/std" +#load "core/module" use core {*} diff --git a/examples/05_slices.onyx b/examples/05_slices.onyx index 66b0b22a..2b218d37 100644 --- a/examples/05_slices.onyx +++ b/examples/05_slices.onyx @@ -5,7 +5,7 @@ // is a powerful construct to have. In fact, strings in Onyx, i.e. // the 'str' type, is actually just a slice of u8. -#load "core/std" +#load "core/module" use core {*} diff --git a/examples/06_dynamic_arrays.onyx b/examples/06_dynamic_arrays.onyx index b6e203c2..cd1e1d96 100644 --- a/examples/06_dynamic_arrays.onyx +++ b/examples/06_dynamic_arrays.onyx @@ -7,7 +7,7 @@ // Dynamic arrays in Onyx are easy to use on purpose, because I // know how useful they are in almost every program I write. -#load "core/std" +#load "core/module" use core {*} diff --git a/examples/07_structs.onyx b/examples/07_structs.onyx index 1e2347e1..44601ee5 100644 --- a/examples/07_structs.onyx +++ b/examples/07_structs.onyx @@ -5,7 +5,7 @@ // 'structs' in Onyx are very similar to structs in C and C++, with a couple // of additional capabilities to make using them even easier. -#load "core/std" +#load "core/module" use core {*} diff --git a/examples/08_enums.onyx b/examples/08_enums.onyx index 041865ce..1ae2a735 100644 --- a/examples/08_enums.onyx +++ b/examples/08_enums.onyx @@ -4,7 +4,7 @@ // expressions. This is going to improve in the future, but for the moment, // enums are rather limited. -#load "core/std" +#load "core/module" use core {*} diff --git a/examples/09_for_loops.onyx b/examples/09_for_loops.onyx index 385fe700..99a0f9d3 100644 --- a/examples/09_for_loops.onyx +++ b/examples/09_for_loops.onyx @@ -4,7 +4,7 @@ // in Onyx are extremely simple to use by design and should make programming very // enjoyable. But I digress, let's look at some examples. -#load "core/std" +#load "core/module" use core {package, *} diff --git a/examples/10_switch_statements.onyx b/examples/10_switch_statements.onyx index ef85b576..29aa997a 100644 --- a/examples/10_switch_statements.onyx +++ b/examples/10_switch_statements.onyx @@ -1,4 +1,4 @@ -#load "core/std" +#load "core/module" use core {*} diff --git a/examples/11_map.onyx b/examples/11_map.onyx index 8bd00846..a8944247 100644 --- a/examples/11_map.onyx +++ b/examples/11_map.onyx @@ -1,4 +1,4 @@ -#load "core/std" +#load "core/module" use core {*} diff --git a/examples/12_varargs.onyx b/examples/12_varargs.onyx index 26c29a01..5aef6935 100644 --- a/examples/12_varargs.onyx +++ b/examples/12_varargs.onyx @@ -15,7 +15,7 @@ // - 'variadic argument' is shortened to 'vararg' in many situtations -#load "core/std" +#load "core/module" use core {*} diff --git a/examples/13_use_keyword.onyx b/examples/13_use_keyword.onyx index 635b4e75..2b8a13bd 100644 --- a/examples/13_use_keyword.onyx +++ b/examples/13_use_keyword.onyx @@ -14,7 +14,7 @@ // most cases, but can easily break and require you to write the code without it. This // is being address and hopefully in the next couple months it will be much more robust. -#load "core/std" +#load "core/module" use core {*} diff --git a/examples/14_overloaded_procs.onyx b/examples/14_overloaded_procs.onyx index c3645e5a..1ebac42e 100644 --- a/examples/14_overloaded_procs.onyx +++ b/examples/14_overloaded_procs.onyx @@ -32,7 +32,7 @@ // Let's look at some examples of overloaded procedures and how they are resolved. -#load "core/std" +#load "core/module" use core {*} diff --git a/examples/15_polymorphic_procs.onyx b/examples/15_polymorphic_procs.onyx index 34c6a865..9ce5e24b 100644 --- a/examples/15_polymorphic_procs.onyx +++ b/examples/15_polymorphic_procs.onyx @@ -57,7 +57,7 @@ compose :: (a: $A, f: (A) -> $B, g: (B) -> $C) -> C { } -#load "core/std" +#load "core/module" use core {*} diff --git a/examples/16_pipe_operator.onyx b/examples/16_pipe_operator.onyx index aa1336a0..c82e7c85 100644 --- a/examples/16_pipe_operator.onyx +++ b/examples/16_pipe_operator.onyx @@ -1,4 +1,4 @@ -#load "core/std" +#load "core/module" use core { println } diff --git a/examples/17_operator_overload.onyx b/examples/17_operator_overload.onyx index 5b86907f..a2a84c76 100644 --- a/examples/17_operator_overload.onyx +++ b/examples/17_operator_overload.onyx @@ -1,4 +1,4 @@ -#load "core/std" +#load "core/module" use core {*} // Operator overloading allows you to define what it means to perform diff --git a/examples/18_macros.onyx b/examples/18_macros.onyx index 39a55e73..76d394d6 100644 --- a/examples/18_macros.onyx +++ b/examples/18_macros.onyx @@ -134,5 +134,5 @@ main :: (args: [] cstr) { // } } -#load "core/std" +#load "core/module" use core {*} diff --git a/examples/19_do_blocks.onyx b/examples/19_do_blocks.onyx index 8c60673b..1c48671f 100644 --- a/examples/19_do_blocks.onyx +++ b/examples/19_do_blocks.onyx @@ -65,5 +65,5 @@ main :: (args: [] cstr) { } -#load "core/std" +#load "core/module" use core {*} diff --git a/examples/20_auto_return.onyx b/examples/20_auto_return.onyx index 72519dd4..a56ac4df 100644 --- a/examples/20_auto_return.onyx +++ b/examples/20_auto_return.onyx @@ -42,6 +42,6 @@ main :: (args: [] cstr) { println(arr); } -#load "core/std" +#load "core/module" use core {*} diff --git a/examples/21_quick_functions.onyx b/examples/21_quick_functions.onyx index 6434ef0d..5d794f97 100644 --- a/examples/21_quick_functions.onyx +++ b/examples/21_quick_functions.onyx @@ -44,5 +44,5 @@ main :: (args) => { println(val); } -#load "core/std" +#load "core/module" use core {*} diff --git a/examples/22_interfaces.onyx b/examples/22_interfaces.onyx index 9b5e5678..da875cd5 100644 --- a/examples/22_interfaces.onyx +++ b/examples/22_interfaces.onyx @@ -134,6 +134,6 @@ main :: (args) => { overloaded_procedure_example(); } -#load "core/std" +#load "core/module" use core {*} use core.intrinsics.onyx {*} diff --git a/examples/50_misc.onyx b/examples/50_misc.onyx index 57d6ee40..2eb51432 100644 --- a/examples/50_misc.onyx +++ b/examples/50_misc.onyx @@ -66,5 +66,5 @@ main :: (args) => { multiple_declaration_improvements(); } -#load "core/std" +#load "core/module" use core {*} diff --git a/scripts/core_tests.onyx b/scripts/core_tests.onyx index eefbc138..eecc5061 100644 --- a/scripts/core_tests.onyx +++ b/scripts/core_tests.onyx @@ -1,6 +1,6 @@ -#load "core/std" +#load "core/module" use core {package, test} diff --git a/scripts/onyx-pkg.onyx b/scripts/onyx-pkg.onyx index 1fd21907..bbfc753d 100644 --- a/scripts/onyx-pkg.onyx +++ b/scripts/onyx-pkg.onyx @@ -1,5 +1,5 @@ -#load "core/std" +#load "core/module" #load "core/encoding/ini" // diff --git a/scripts/run_tests.onyx b/scripts/run_tests.onyx index e8f59db6..190ee0ee 100644 --- a/scripts/run_tests.onyx +++ b/scripts/run_tests.onyx @@ -2,9 +2,6 @@ // - Fancy display - -#load "core/std" - use runtime use core {package, *} use core.intrinsics.onyx { init } diff --git a/tests/aoc-2020/day1.onyx b/tests/aoc-2020/day1.onyx index 54784b7b..4e5fdcd5 100644 --- a/tests/aoc-2020/day1.onyx +++ b/tests/aoc-2020/day1.onyx @@ -1,4 +1,4 @@ -#load "core/std" +#load "core/module" use core use core.io diff --git a/tests/aoc-2020/day10.onyx b/tests/aoc-2020/day10.onyx index 0cf43692..eca37c87 100644 --- a/tests/aoc-2020/day10.onyx +++ b/tests/aoc-2020/day10.onyx @@ -1,4 +1,4 @@ -#load "core/std" +#load "core/module" use core {*} diff --git a/tests/aoc-2020/day12.onyx b/tests/aoc-2020/day12.onyx index 81b9eea0..08dcaf0b 100644 --- a/tests/aoc-2020/day12.onyx +++ b/tests/aoc-2020/day12.onyx @@ -1,4 +1,4 @@ -#load "core/std" +#load "core/module" use core {*} diff --git a/tests/aoc-2020/day13.onyx b/tests/aoc-2020/day13.onyx index b8d408a4..00995587 100644 --- a/tests/aoc-2020/day13.onyx +++ b/tests/aoc-2020/day13.onyx @@ -1,4 +1,4 @@ -#load "core/std" +#load "core/module" use core {*} diff --git a/tests/aoc-2020/day14.onyx b/tests/aoc-2020/day14.onyx index 34b4118f..9a094958 100644 --- a/tests/aoc-2020/day14.onyx +++ b/tests/aoc-2020/day14.onyx @@ -1,4 +1,4 @@ -#load "core/std" +#load "core/module" use core {*} diff --git a/tests/aoc-2020/day15.onyx b/tests/aoc-2020/day15.onyx index 1bc2335c..0ce1b716 100644 --- a/tests/aoc-2020/day15.onyx +++ b/tests/aoc-2020/day15.onyx @@ -1,4 +1,4 @@ -#load "core/std" +#load "core/module" use core {*} diff --git a/tests/aoc-2020/day16.onyx b/tests/aoc-2020/day16.onyx index 6ad35350..73088aaf 100644 --- a/tests/aoc-2020/day16.onyx +++ b/tests/aoc-2020/day16.onyx @@ -1,4 +1,4 @@ -#load "core/std" +#load "core/module" use core {*} diff --git a/tests/aoc-2020/day17.onyx b/tests/aoc-2020/day17.onyx index f1b5a87c..5cf9434e 100644 --- a/tests/aoc-2020/day17.onyx +++ b/tests/aoc-2020/day17.onyx @@ -1,4 +1,4 @@ -#load "core/std" +#load "core/module" use core {package, *} diff --git a/tests/aoc-2020/day18.onyx b/tests/aoc-2020/day18.onyx index 4e2bff12..87c7b5d3 100644 --- a/tests/aoc-2020/day18.onyx +++ b/tests/aoc-2020/day18.onyx @@ -1,4 +1,4 @@ -#load "core/std" +#load "core/module" use core {*} diff --git a/tests/aoc-2020/day19.onyx b/tests/aoc-2020/day19.onyx index be0ad640..ec61e744 100644 --- a/tests/aoc-2020/day19.onyx +++ b/tests/aoc-2020/day19.onyx @@ -1,4 +1,4 @@ -#load "core/std" +#load "core/module" use core {*} diff --git a/tests/aoc-2020/day2.onyx b/tests/aoc-2020/day2.onyx index 32a150fd..4ab43dfb 100644 --- a/tests/aoc-2020/day2.onyx +++ b/tests/aoc-2020/day2.onyx @@ -1,6 +1,6 @@ package main -#load "core/std" +#load "core/module" use core {*} diff --git a/tests/aoc-2020/day20.onyx b/tests/aoc-2020/day20.onyx index a4ed4858..dc7b7502 100644 --- a/tests/aoc-2020/day20.onyx +++ b/tests/aoc-2020/day20.onyx @@ -1,4 +1,4 @@ -#load "core/std" +#load "core/module" use core {*} diff --git a/tests/aoc-2020/day21.onyx b/tests/aoc-2020/day21.onyx index 729bbdd5..05889f7a 100644 --- a/tests/aoc-2020/day21.onyx +++ b/tests/aoc-2020/day21.onyx @@ -1,4 +1,4 @@ -#load "core/std" +#load "core/module" use core {*} diff --git a/tests/aoc-2020/day22.onyx b/tests/aoc-2020/day22.onyx index 9a95b811..e05ca22f 100644 --- a/tests/aoc-2020/day22.onyx +++ b/tests/aoc-2020/day22.onyx @@ -1,4 +1,4 @@ -#load "core/std" +#load "core/module" use core {*} diff --git a/tests/aoc-2020/day23.onyx b/tests/aoc-2020/day23.onyx index 521e9ad4..6c185f3e 100644 --- a/tests/aoc-2020/day23.onyx +++ b/tests/aoc-2020/day23.onyx @@ -1,4 +1,4 @@ -#load "core/std" +#load "core/module" use core {*} diff --git a/tests/aoc-2020/day24.onyx b/tests/aoc-2020/day24.onyx index d781376f..a5f937f5 100644 --- a/tests/aoc-2020/day24.onyx +++ b/tests/aoc-2020/day24.onyx @@ -1,4 +1,4 @@ -#load "core/std" +#load "core/module" use core {*} diff --git a/tests/aoc-2020/day25.onyx b/tests/aoc-2020/day25.onyx index 9b6f80b6..1d31169e 100644 --- a/tests/aoc-2020/day25.onyx +++ b/tests/aoc-2020/day25.onyx @@ -1,4 +1,4 @@ -#load "core/std" +#load "core/module" use core {*} diff --git a/tests/aoc-2020/day3.onyx b/tests/aoc-2020/day3.onyx index 074241a0..2ab75cbb 100644 --- a/tests/aoc-2020/day3.onyx +++ b/tests/aoc-2020/day3.onyx @@ -1,4 +1,4 @@ -#load "core/std" +#load "core/module" use core {*} diff --git a/tests/aoc-2020/day4.onyx b/tests/aoc-2020/day4.onyx index 5bcd8b3d..dbec2f5a 100644 --- a/tests/aoc-2020/day4.onyx +++ b/tests/aoc-2020/day4.onyx @@ -1,4 +1,4 @@ -#load "core/std" +#load "core/module" use core {*} diff --git a/tests/aoc-2020/day5.onyx b/tests/aoc-2020/day5.onyx index 80fa256b..e7251103 100644 --- a/tests/aoc-2020/day5.onyx +++ b/tests/aoc-2020/day5.onyx @@ -1,4 +1,4 @@ -#load "core/std" +#load "core/module" use core {*} diff --git a/tests/aoc-2020/day6.onyx b/tests/aoc-2020/day6.onyx index ba4848ac..aaecf0ed 100644 --- a/tests/aoc-2020/day6.onyx +++ b/tests/aoc-2020/day6.onyx @@ -1,4 +1,4 @@ -#load "core/std" +#load "core/module" use core {*} diff --git a/tests/aoc-2020/day7.onyx b/tests/aoc-2020/day7.onyx index 5b030823..b1b6f71e 100644 --- a/tests/aoc-2020/day7.onyx +++ b/tests/aoc-2020/day7.onyx @@ -1,4 +1,4 @@ -#load "core/std" +#load "core/module" use core {*} diff --git a/tests/aoc-2020/day8.onyx b/tests/aoc-2020/day8.onyx index c883c126..294661fa 100644 --- a/tests/aoc-2020/day8.onyx +++ b/tests/aoc-2020/day8.onyx @@ -1,4 +1,4 @@ -#load "core/std" +#load "core/module" use core {*} diff --git a/tests/aoc-2020/day9.onyx b/tests/aoc-2020/day9.onyx index 0c73e274..f69569b1 100644 --- a/tests/aoc-2020/day9.onyx +++ b/tests/aoc-2020/day9.onyx @@ -1,4 +1,4 @@ -#load "core/std" +#load "core/module" use core {*} diff --git a/tests/aoc-2021/day01.onyx b/tests/aoc-2021/day01.onyx index e306be1a..8f2bc602 100644 --- a/tests/aoc-2021/day01.onyx +++ b/tests/aoc-2021/day01.onyx @@ -1,4 +1,4 @@ -#load "core/std" +#load "core/module" use core.io use core.os diff --git a/tests/aoc-2021/day03.onyx b/tests/aoc-2021/day03.onyx index e922a5f8..2665d7a3 100644 --- a/tests/aoc-2021/day03.onyx +++ b/tests/aoc-2021/day03.onyx @@ -1,6 +1,6 @@ PART :: 2 -#load "core/std" +#load "core/module" use core {*} diff --git a/tests/aoc-2021/day05.onyx b/tests/aoc-2021/day05.onyx index cf34dc22..ae8761e5 100644 --- a/tests/aoc-2021/day05.onyx +++ b/tests/aoc-2021/day05.onyx @@ -1,4 +1,4 @@ -#load "core/std" +#load "core/module" use core {*} diff --git a/tests/aoc-2021/day06.onyx b/tests/aoc-2021/day06.onyx index 680caa90..462747bd 100644 --- a/tests/aoc-2021/day06.onyx +++ b/tests/aoc-2021/day06.onyx @@ -1,4 +1,4 @@ -#load "core/std" +#load "core/module" use core {*} diff --git a/tests/aoc-2021/day07.onyx b/tests/aoc-2021/day07.onyx index 05a12ec7..dc72f98a 100644 --- a/tests/aoc-2021/day07.onyx +++ b/tests/aoc-2021/day07.onyx @@ -1,4 +1,4 @@ -#load "core/std" +#load "core/module" use core {*} diff --git a/tests/aoc-2021/day08.onyx b/tests/aoc-2021/day08.onyx index ff258357..25f60f7a 100644 --- a/tests/aoc-2021/day08.onyx +++ b/tests/aoc-2021/day08.onyx @@ -1,5 +1,5 @@ PART :: 2 -#load "core/std" +#load "core/module" use core {*} diff --git a/tests/aoc-2021/day09.onyx b/tests/aoc-2021/day09.onyx index 1eb4e92d..08e8c88e 100644 --- a/tests/aoc-2021/day09.onyx +++ b/tests/aoc-2021/day09.onyx @@ -1,4 +1,4 @@ -#load "core/std" +#load "core/module" use core {*} diff --git a/tests/aoc-2021/day10.onyx b/tests/aoc-2021/day10.onyx index b64b9542..fa98a021 100644 --- a/tests/aoc-2021/day10.onyx +++ b/tests/aoc-2021/day10.onyx @@ -1,4 +1,4 @@ -#load "core/std" +#load "core/module" use core {*} diff --git a/tests/aoc-2021/day11.onyx b/tests/aoc-2021/day11.onyx index 81e872ab..9a492d9b 100644 --- a/tests/aoc-2021/day11.onyx +++ b/tests/aoc-2021/day11.onyx @@ -1,4 +1,4 @@ -#load "core/std" +#load "core/module" use core {*} diff --git a/tests/aoc-2021/day12.onyx b/tests/aoc-2021/day12.onyx index fe7d7a93..d485bf3f 100644 --- a/tests/aoc-2021/day12.onyx +++ b/tests/aoc-2021/day12.onyx @@ -1,4 +1,4 @@ -#load "core/std" +#load "core/module" use core {*} diff --git a/tests/aoc-2021/day13.onyx b/tests/aoc-2021/day13.onyx index 5d5daa13..bfdbc68b 100644 --- a/tests/aoc-2021/day13.onyx +++ b/tests/aoc-2021/day13.onyx @@ -1,4 +1,4 @@ -#load "core/std" +#load "core/module" use core {*} diff --git a/tests/aoc-2021/day14.onyx b/tests/aoc-2021/day14.onyx index 64362d38..64a9327f 100644 --- a/tests/aoc-2021/day14.onyx +++ b/tests/aoc-2021/day14.onyx @@ -1,4 +1,4 @@ -#load "core/std" +#load "core/module" use core {*} diff --git a/tests/aoc-2021/day15.onyx b/tests/aoc-2021/day15.onyx index e9ff322f..a2edaf12 100644 --- a/tests/aoc-2021/day15.onyx +++ b/tests/aoc-2021/day15.onyx @@ -1,4 +1,4 @@ -#load "core/std" +#load "core/module" use core {*} diff --git a/tests/aoc-2021/day16.onyx b/tests/aoc-2021/day16.onyx index 886cc86d..314d8798 100644 --- a/tests/aoc-2021/day16.onyx +++ b/tests/aoc-2021/day16.onyx @@ -1,4 +1,4 @@ -#load "core/std" +#load "core/module" use core {*} diff --git a/tests/aoc-2021/day17.onyx b/tests/aoc-2021/day17.onyx index c0d8cbba..2cd92b96 100644 --- a/tests/aoc-2021/day17.onyx +++ b/tests/aoc-2021/day17.onyx @@ -1,4 +1,4 @@ -#load "core/std" +#load "core/module" use core {*} diff --git a/tests/aoc-2021/day18.onyx b/tests/aoc-2021/day18.onyx index 927c467c..6ad6aeaa 100644 --- a/tests/aoc-2021/day18.onyx +++ b/tests/aoc-2021/day18.onyx @@ -1,4 +1,4 @@ -#load "core/std" +#load "core/module" PART :: 2 diff --git a/tests/array_struct_robustness.onyx b/tests/array_struct_robustness.onyx index 1eb734e5..965b8d62 100644 --- a/tests/array_struct_robustness.onyx +++ b/tests/array_struct_robustness.onyx @@ -1,4 +1,4 @@ -#load "core/std" +#load "core/module" use core {*} diff --git a/tests/arrow_notation.onyx b/tests/arrow_notation.onyx index 9fd69352..c6861372 100644 --- a/tests/arrow_notation.onyx +++ b/tests/arrow_notation.onyx @@ -1,4 +1,4 @@ -#load "core/std" +#load "core/module" use core use core.conv diff --git a/tests/atomics.onyx b/tests/atomics.onyx index bfc23104..0e08f584 100644 --- a/tests/atomics.onyx +++ b/tests/atomics.onyx @@ -1,4 +1,4 @@ -#load "core/std" +#load "core/module" #load "core/intrinsics/atomics" use core {*} diff --git a/tests/auto_poly.onyx b/tests/auto_poly.onyx index 68315956..a744e61f 100644 --- a/tests/auto_poly.onyx +++ b/tests/auto_poly.onyx @@ -1,4 +1,4 @@ -#load "core/std" +#load "core/module" use core {*} diff --git a/tests/avl_test.onyx b/tests/avl_test.onyx index de302e77..edaf538a 100644 --- a/tests/avl_test.onyx +++ b/tests/avl_test.onyx @@ -1,4 +1,4 @@ -#load "core/std" +#load "core/module" use core {*} diff --git a/tests/baked_parameters.onyx b/tests/baked_parameters.onyx index 459f032e..c6d8e5ba 100644 --- a/tests/baked_parameters.onyx +++ b/tests/baked_parameters.onyx @@ -1,4 +1,4 @@ -#load "core/std" +#load "core/module" use core {*} diff --git a/tests/better_field_accesses.onyx b/tests/better_field_accesses.onyx index 6b949e51..8d6e4d89 100644 --- a/tests/better_field_accesses.onyx +++ b/tests/better_field_accesses.onyx @@ -1,4 +1,4 @@ -#load "core/std" +#load "core/module" use core {*} diff --git a/tests/bucket_array.onyx b/tests/bucket_array.onyx index 8a78e2e3..fd160398 100644 --- a/tests/bucket_array.onyx +++ b/tests/bucket_array.onyx @@ -1,4 +1,4 @@ -#load "core/std" +#load "core/module" use core {*} diff --git a/tests/bugs/anonymous_struct_defaults.onyx b/tests/bugs/anonymous_struct_defaults.onyx index 28adc09e..5b6dc99b 100644 --- a/tests/bugs/anonymous_struct_defaults.onyx +++ b/tests/bugs/anonymous_struct_defaults.onyx @@ -1,4 +1,4 @@ -#load "core/std" +#load "core/module" use core {*} diff --git a/tests/bugs/defer_block_in_macro.onyx b/tests/bugs/defer_block_in_macro.onyx index 9ebc0c95..ce5e6235 100644 --- a/tests/bugs/defer_block_in_macro.onyx +++ b/tests/bugs/defer_block_in_macro.onyx @@ -1,4 +1,4 @@ -#load "core/std" +#load "core/module" use core {*} diff --git a/tests/bugs/fallthrough_defer_interaction.onyx b/tests/bugs/fallthrough_defer_interaction.onyx index 1e470ae7..68ce1de1 100644 --- a/tests/bugs/fallthrough_defer_interaction.onyx +++ b/tests/bugs/fallthrough_defer_interaction.onyx @@ -1,4 +1,4 @@ -#load "core/std" +#load "core/module" use core {*} diff --git a/tests/bugs/macro_auto_return_not_resolved.onyx b/tests/bugs/macro_auto_return_not_resolved.onyx index d4820a78..6b6485c8 100644 --- a/tests/bugs/macro_auto_return_not_resolved.onyx +++ b/tests/bugs/macro_auto_return_not_resolved.onyx @@ -1,4 +1,4 @@ -#load "core/std" +#load "core/module" use core {*} diff --git a/tests/bugs/namespace_aliasing.onyx b/tests/bugs/namespace_aliasing.onyx index f3736246..aaa91b3b 100644 --- a/tests/bugs/namespace_aliasing.onyx +++ b/tests/bugs/namespace_aliasing.onyx @@ -1,4 +1,4 @@ -#load "core/std" +#load "core/module" use core {*} SomeNamespace :: struct { diff --git a/tests/caller_location.onyx b/tests/caller_location.onyx index f53026af..2939defe 100644 --- a/tests/caller_location.onyx +++ b/tests/caller_location.onyx @@ -1,4 +1,4 @@ -#load "core/std" +#load "core/module" use core {*} diff --git a/tests/compile_time_procedures.onyx b/tests/compile_time_procedures.onyx index af5d251c..652b4a23 100644 --- a/tests/compile_time_procedures.onyx +++ b/tests/compile_time_procedures.onyx @@ -1,4 +1,4 @@ -#load "core/std" +#load "core/module" use core {*} diff --git a/tests/complicated_polymorph.onyx b/tests/complicated_polymorph.onyx index a66b3091..80162f03 100644 --- a/tests/complicated_polymorph.onyx +++ b/tests/complicated_polymorph.onyx @@ -1,4 +1,4 @@ -#load "core/std" +#load "core/module" use core {*} diff --git a/tests/defer_with_continue.onyx b/tests/defer_with_continue.onyx index d3758e6a..10d27418 100644 --- a/tests/defer_with_continue.onyx +++ b/tests/defer_with_continue.onyx @@ -1,4 +1,4 @@ -#load "core/std" +#load "core/module" use core {*} diff --git a/tests/defined_test.onyx b/tests/defined_test.onyx index bc4b6843..b9962d38 100644 --- a/tests/defined_test.onyx +++ b/tests/defined_test.onyx @@ -1,4 +1,4 @@ -#load "core/std" +#load "core/module" use core {*} diff --git a/tests/float_parsing.onyx b/tests/float_parsing.onyx index d8e4c653..b2dc9dfc 100644 --- a/tests/float_parsing.onyx +++ b/tests/float_parsing.onyx @@ -1,4 +1,4 @@ -#load "core/std" +#load "core/module" use core {*} diff --git a/tests/hello_world.onyx b/tests/hello_world.onyx index 5302c31e..dff9ba35 100644 --- a/tests/hello_world.onyx +++ b/tests/hello_world.onyx @@ -1,6 +1,6 @@ package main -#load "core/std" +#load "core/module" use core {*} diff --git a/tests/i32map.onyx b/tests/i32map.onyx index fdc16368..dfa46e76 100644 --- a/tests/i32map.onyx +++ b/tests/i32map.onyx @@ -1,6 +1,6 @@ package main -#load "core/std" +#load "core/module" use core {*} diff --git a/tests/if_expressions.onyx b/tests/if_expressions.onyx index 4fb0a1a1..1de27b55 100644 --- a/tests/if_expressions.onyx +++ b/tests/if_expressions.onyx @@ -1,4 +1,4 @@ -#load "core/std" +#load "core/module" use core {package, println, printf} diff --git a/tests/implicit_initialize_locals.onyx b/tests/implicit_initialize_locals.onyx index b888294d..33c14b11 100644 --- a/tests/implicit_initialize_locals.onyx +++ b/tests/implicit_initialize_locals.onyx @@ -1,4 +1,4 @@ -#load "core/std" +#load "core/module" use core {*} diff --git a/tests/init_procedures.onyx b/tests/init_procedures.onyx index c45559f5..17414000 100644 --- a/tests/init_procedures.onyx +++ b/tests/init_procedures.onyx @@ -1,4 +1,4 @@ -#load "core/std" +#load "core/module" use core {*} diff --git a/tests/interfaces.onyx b/tests/interfaces.onyx index 4c4e0420..dcec9b54 100644 --- a/tests/interfaces.onyx +++ b/tests/interfaces.onyx @@ -1,4 +1,4 @@ -#load "core/std" +#load "core/module" use core use core.hash diff --git a/tests/lazy_iterators.onyx b/tests/lazy_iterators.onyx index 953f9737..5dd8caed 100644 --- a/tests/lazy_iterators.onyx +++ b/tests/lazy_iterators.onyx @@ -1,4 +1,4 @@ -#load "core/std" +#load "core/module" use core {*} diff --git a/tests/multiple_returns_robustness.onyx b/tests/multiple_returns_robustness.onyx index 52963323..f9f99f94 100644 --- a/tests/multiple_returns_robustness.onyx +++ b/tests/multiple_returns_robustness.onyx @@ -1,4 +1,4 @@ -#load "core/std" +#load "core/module" use core {package, *} diff --git a/tests/named_arguments_test.onyx b/tests/named_arguments_test.onyx index 0b3b6922..918cc5c6 100644 --- a/tests/named_arguments_test.onyx +++ b/tests/named_arguments_test.onyx @@ -1,4 +1,4 @@ -#load "core/std" +#load "core/module" use core {*} diff --git a/tests/new_printf.onyx b/tests/new_printf.onyx index 60cd3c67..e1d46a19 100644 --- a/tests/new_printf.onyx +++ b/tests/new_printf.onyx @@ -1,4 +1,4 @@ -#load "core/std" +#load "core/module" use core {printf, map} diff --git a/tests/new_struct_behaviour.onyx b/tests/new_struct_behaviour.onyx index 8063a110..5e94952b 100644 --- a/tests/new_struct_behaviour.onyx +++ b/tests/new_struct_behaviour.onyx @@ -1,6 +1,6 @@ // This is a needlessly complicated test of some of the newer features with structs. -#load "core/std" +#load "core/module" use core {*} diff --git a/tests/operator_overload.onyx b/tests/operator_overload.onyx index 40e726c1..971694d8 100644 --- a/tests/operator_overload.onyx +++ b/tests/operator_overload.onyx @@ -1,4 +1,4 @@ -#load "core/std" +#load "core/module" use core {*} diff --git a/tests/overload_precedence.onyx b/tests/overload_precedence.onyx index 37c04132..fc40f131 100644 --- a/tests/overload_precedence.onyx +++ b/tests/overload_precedence.onyx @@ -1,4 +1,4 @@ -#load "core/std" +#load "core/module" use core {*} diff --git a/tests/overload_with_autocast.onyx b/tests/overload_with_autocast.onyx index fdd15b0e..0323ebc7 100644 --- a/tests/overload_with_autocast.onyx +++ b/tests/overload_with_autocast.onyx @@ -1,4 +1,4 @@ -#load "core/std" +#load "core/module" use core use core {println} diff --git a/tests/persist_locals.onyx b/tests/persist_locals.onyx index 2cf4da09..c209911a 100644 --- a/tests/persist_locals.onyx +++ b/tests/persist_locals.onyx @@ -1,6 +1,6 @@ // This test does not make a whole ton of sense, but it does thoroughly test the #persist local capability. -#load "core/std" +#load "core/module" use core {*} diff --git a/tests/poly_struct_in_type_info.onyx b/tests/poly_struct_in_type_info.onyx index 8ee9da74..8281ad54 100644 --- a/tests/poly_struct_in_type_info.onyx +++ b/tests/poly_struct_in_type_info.onyx @@ -1,4 +1,4 @@ -#load "core/std" +#load "core/module" use core {*} use runtime.info diff --git a/tests/poly_structs_with_values.onyx b/tests/poly_structs_with_values.onyx index df466d14..67525943 100644 --- a/tests/poly_structs_with_values.onyx +++ b/tests/poly_structs_with_values.onyx @@ -1,4 +1,4 @@ -#load "core/std" +#load "core/module" use core {*} diff --git a/tests/polymorphic_array_lengths.onyx b/tests/polymorphic_array_lengths.onyx index e44edcde..e813bf05 100644 --- a/tests/polymorphic_array_lengths.onyx +++ b/tests/polymorphic_array_lengths.onyx @@ -1,4 +1,4 @@ -#load "core/std" +#load "core/module" use core {*} diff --git a/tests/remove_test.onyx b/tests/remove_test.onyx index 24e7a6bc..753f2ae3 100644 --- a/tests/remove_test.onyx +++ b/tests/remove_test.onyx @@ -1,4 +1,4 @@ -#load "core/std" +#load "core/module" use core {*} diff --git a/tests/sets.onyx b/tests/sets.onyx index a1cf8b9b..1918c472 100644 --- a/tests/sets.onyx +++ b/tests/sets.onyx @@ -1,4 +1,4 @@ -#load "core/std" +#load "core/module" use core {*} diff --git a/tests/string_stream_test.onyx b/tests/string_stream_test.onyx index 516c112e..c629bea2 100644 --- a/tests/string_stream_test.onyx +++ b/tests/string_stream_test.onyx @@ -1,4 +1,4 @@ -#load "core/std" +#load "core/module" use core use core.io diff --git a/tests/struct_robustness.onyx b/tests/struct_robustness.onyx index a35e9396..a940dc8b 100644 --- a/tests/struct_robustness.onyx +++ b/tests/struct_robustness.onyx @@ -1,4 +1,4 @@ -#load "core/std" +#load "core/module" use core {*} diff --git a/tests/struct_use_pointer_member.onyx b/tests/struct_use_pointer_member.onyx index 84a8ed26..0fce1d1c 100644 --- a/tests/struct_use_pointer_member.onyx +++ b/tests/struct_use_pointer_member.onyx @@ -1,4 +1,4 @@ -#load "core/std" +#load "core/module" use core {*} Person_Vtable :: struct { diff --git a/tests/switch_using_equals.onyx b/tests/switch_using_equals.onyx index e0fd8051..1f18f55f 100644 --- a/tests/switch_using_equals.onyx +++ b/tests/switch_using_equals.onyx @@ -1,4 +1,4 @@ -#load "core/std" +#load "core/module" use core {*} diff --git a/tests/vararg_test.onyx b/tests/vararg_test.onyx index f9994ac4..125703aa 100644 --- a/tests/vararg_test.onyx +++ b/tests/vararg_test.onyx @@ -1,6 +1,6 @@ package main -#load "core/std" +#load "core/module" use core {*}; -- 2.25.1