Commit Graph

245 Commits

Author SHA1 Message Date
gingerBill
520ff731de Add ArenaTemp to the compiler 2023-01-12 00:47:20 +00:00
gingerBill
e9cfe698ba Make the heap_allocator just be the permanent_allocator
This improves the speed of the compiler with very little memory increase (which surprised me, Ginger Bill)
2023-01-12 00:20:25 +00:00
gingerBill
6ec014e980 Make -threaded-checker the default not (opt out with -no-threaded-checker) 2023-01-11 17:27:06 +00:00
gingerBill
15469758de Merge branch 'master' into compiler-improvements-2023-01 2023-01-10 16:25:38 +00:00
gingerBill
747a11a954 Allow all set entry types to be implicitly cast to their key/value type to allow for easier iteration 2023-01-03 12:18:35 +00:00
gingerBill
600f2b7284 Use heap_allocator for all hash set types 2023-01-03 11:53:59 +00:00
gingerBill
f16d8e77b3 Narrow fullpath_mutex usage 2023-01-02 20:55:49 +00:00
gingerBill
529383f5b1 Correct a race condition when checking the procedure body 2023-01-02 15:30:04 +00:00
gingerBill
5c519f0e8d Remove the synchronization primitive init/destroy calls 2023-01-01 16:19:21 +00:00
gingerBill
85f0a1067c Merge pull request #2280 from DragosPopse/master
Fixed empty output_path.name when building a folder with no subfolders
2023-01-01 14:09:51 +00:00
Dragos
465d003b1e Patched empty output_path.name when building a folder 2022-12-26 19:21:24 +02:00
gingerBill
00823ca88c Remove a few TODOs 2022-12-22 13:03:34 +00:00
gingerBill
e27046098b Add missing gb_internal 2022-12-18 22:58:34 +00:00
gingerBill
c1f5be24e2 Remove dead code in the compiler 2022-12-18 22:49:10 +00:00
gingerBill
ac5f5a33e9 gb_internal a lot 2022-12-18 21:17:07 +00:00
gingerBill
34a048f7da Replace compiler for loops for the hash-table types to simplify code usage 2022-12-09 11:29:28 +00:00
gingerBill
a71daee545 Allow for -use-static-map-calls which generates a get procedure per map; add runtime.map_get 2022-11-08 14:58:05 +00:00
gingerBill
f1c24f434b -default-to-nil-allocator also enables -no-dynamic-literals 2022-11-07 10:24:14 +00:00
Jeroen van Rijn
9eec9f5788 Add -minimum-os-version flag
Allow for Darwin targets to specify the minimum OS version:
e.g. -minimum-os-version:12.0.0
2022-11-01 15:04:44 +01:00
Jeroen van Rijn
159c5311c3 Revert "Fix #2112" 2022-10-08 23:01:06 +02:00
Jeroen van Rijn
ab7367ae47 Fix #2112 2022-10-08 19:00:05 +02:00
Colin Davidson
2ff61bdfc7 fix target features to make wasm intrinsics happy 2022-09-21 18:35:56 -07:00
gingerBill
3ff56e4405 Correct get_fullpath_relative to remove all trailing path separators (/ and \) 2022-09-21 11:31:52 +01:00
gingerBill
663b62e45f Fix ODIN_BUILD_PROJECT_NAME 2022-09-12 14:43:50 +01:00
gingerBill
81e3b64ecd Add ODIN_BUILD_PROJECT_NAME and //+build-project-name
This allows for condition inclusion of files, similar to `+build` or `ODIN_BUILD`, but relies on the directory name of the project to be the same as specified

Example:

    odin build foo/bar/baz

    ODIN_BUILD_PROJECT_NAME == "baz"

    //+build_project_name baz
2022-09-08 16:35:25 +01:00
Jeroen van Rijn
cac72a9423 Allow Odin to find itself if it's in PATH on OpenBSD, because reasons. 2022-09-04 19:01:32 +02:00
gingerBill
aeacf3a9d8 Correct max alignment handling throughout the llvm backend 2022-08-24 13:07:41 +01:00
gingerBill
4ba486baa2 Add extra max alignment parameter for metrics (specifically for SIMD) 2022-08-24 12:58:16 +01:00
gingerBill
82e840a0ca EXPERIMENTAL intrinsics.valgrind_client_request 2022-08-17 13:52:13 +01:00
Ian Lilley
c1c8ceafc2 find windows sdk bin path for rc.exe 2022-08-07 17:52:29 -04:00
gingerBill
e8148055ad Fix compilation on non-windows platforms 2022-07-09 23:55:02 +01:00
gingerBill
babbc304b8 Fix wasm compilation in windows 2022-07-09 23:53:18 +01:00
gingerBill
a1f15c2c69 Merge pull request #1807 from odin-lang/simd-dev
Generic #simd type and intrinsics
2022-05-31 11:52:24 +01:00
gingerBill
f3aefbc443 @(require_target_feature=<string>) @(enable_target_feature=<string>)
require_target_feature - required by the target micro-architecture
enable_target_feature - will be enabled for the specified procedure only
2022-05-30 14:53:12 +01:00
gingerBill
d7eaf0f87b Add intrinsics.x86_cpuid and intrinsics.x86_xgetbv 2022-05-28 15:41:11 +01:00
Jeroen van Rijn
2f7bd154a2 Additional cleanup of microsoft_craziness.h. 2022-05-27 20:59:46 +02:00
Jeroen van Rijn
f137b927b6 Refactor ms_craziness.h 2022-05-27 15:47:29 +02:00
Jeroen van Rijn
3c5124ce68 Fix odin build examples\demo\ trailing slash handling. 2022-05-24 13:55:39 +02:00
gingerBill
dfbe68bcfe Begin to add support for experimental wasm64 2022-05-21 13:30:43 +01:00
gingerBill
da54d0ec8c Fix typo 2022-05-21 13:18:11 +01:00
gingerBill
0e27b27b81 Fix building issues with arm32 2022-05-01 23:28:32 +01:00
gingerBill
10a311092b Add basic arm32 ABI support (linux_arm32) 2022-05-01 23:15:06 +01:00
Jeroen van Rijn
a5342a0126 Address edge cases. 2022-04-26 13:14:09 +02:00
Jeroen van Rijn
f4723aea4c Remove redundant bit for non-Windows. 2022-04-24 13:37:26 +02:00
Jeroen van Rijn
76d48b38d3 Compiler: Allow -out: to not have an extension on *nix for executables (only). 2022-04-24 13:37:26 +02:00
Jeroen van Rijn
3cab2592c3 Compiler: Add early error for output path being a directory.
- Introduce new `Path` type and an array of build paths on the build context.
- Resolve input and output paths/files early (before parsing).
- Error early if inputs are missing or outputs are directories.
- Plumb new file path generation into linker stage instead of its adhoc method.

TODO:
- Remove more adhoc file path generation in parser and linker stage.
- Make intermediate object file generation use new path system.
- Round out and robustify Path helper functions.
2022-04-24 13:37:26 +02:00
Jeroen van Rijn
ad0a413b40 Give build/run/check/test/doc a -file flag.
A package has canonically always been a directory, but odin allowing you to build a single-file package confused newcomers who didn't understand why they could then not access variables and procedures from another file in the same directory.

This change disallows building single-file packages by default, requiring the `-file` flag to acknowledge you understand the nuance.

`-help` for these commands also clarifies the difference.

```
W:\Odin>odin build -help
odin is a tool for managing Odin source code
Usage:
        odin build [arguments]

        build   Compile directory of .odin files as an executable.
                One must contain the program's entry point, all must be in the same package.
                Use `-file` to build a single file instead.
                Examples:
                        odin build .                    # Build package in current directory
                        odin build <dir>                # Build package in <dir>
                        odin build filename.odin -file  # Build single-file package, must contain entry point.

        Flags

        -file
                Tells `odin build` to treat the given file as a self-contained package.
                This means that `<dir>/a.odin` won't have access to `<dir>/b.odin`'s contents.
```

```
W:\Odin>odin run examples\demo\demo.odin
ERROR: `odin run` takes a package as its first argument.
Did you mean `odin run examples\demo\demo.odin -file`?
The `-file` flag tells it to treat a file as a self-contained package.
```
2022-04-05 20:26:18 +02:00
gingerBill
a7adb2fb6e Merge branch 'master' into freestanding_amd64 2022-03-14 11:02:59 +00:00
Sébastien Marie
499c657ffa rename architecture from 386 to i386 2022-03-03 15:28:18 +00:00
gingerBill
15d783e920 Enforce -no-entry-point on freestanding targets 2022-02-28 15:13:41 +00:00