Commit Graph

633 Commits

Author SHA1 Message Date
gingerBill
adcaace03c Fix allow_field_separator for foreign import 2023-04-03 21:09:26 +01:00
Alexander Goussas
99d6c58971 Fix typo in warning message in parser 2023-03-24 15:37:17 -05:00
gingerBill
b3e712e0b8 Correctly handle end comment for doc generation 2023-03-21 15:22:11 +00:00
gingerBill
ba02ef8f25 Change trailing comma require to -strict-style only 2023-03-21 13:16:03 +00:00
gingerBill
edb23db2ae Fix potential race condition when determining the package name 2023-01-16 18:31:40 +00:00
gingerBill
2dca39b557 Remove auto_cast procedure field flag
Fixes #2285
2023-01-16 12:06:03 +00:00
gingerBill
868aa4c14a Minor changes to StringMap allocation 2023-01-14 12:58:45 +00:00
gingerBill
2720e98127 Add +ignore along with +build ignore 2023-01-03 17:25:51 +00:00
gingerBill
85e390deba Minimize calling of Ast::thread_safe_file() when cloning 2023-01-03 15:57:09 +00:00
gingerBill
0fb3032b73 General improves to alloc_ast_node and other unnecessary checks 2023-01-03 14:45:09 +00:00
gingerBill
600f2b7284 Use heap_allocator for all hash set types 2023-01-03 11:53:59 +00:00
gingerBill
bfdcf900ef Remove global_ prefix from global_thread_pool_* procedures 2023-01-02 00:56:06 +00:00
gingerBill
d16ddf7926 Use C++ style for loop over for_array macro in parser.cpp where posible 2023-01-01 16:32:51 +00:00
gingerBill
5c519f0e8d Remove the synchronization primitive init/destroy calls 2023-01-01 16:19:21 +00:00
gingerBill
ffa14c3aad Remove need the MPMC in single threaded case 2022-12-22 12:58:23 +00:00
gingerBill
41b32f0da4 Clean up mutex usage in the parser 2022-12-22 12:45:23 +00:00
gingerBill
9b278db993 Revert "Change tav to be a pointer internally"
This reverts commit e98f1a28e6.
2022-12-22 12:01:41 +00:00
gingerBill
e98f1a28e6 Change tav to be a pointer internally 2022-12-22 11:53:13 +00:00
gingerBill
44caa96d50 Set the file's filename and directory in init_ast_file 2022-12-20 14:56:44 +00:00
gingerBill
8fc9566a83 Use *_set_update where possible 2022-12-20 14:19:55 +00:00
gingerBill
0edda2bea7 Clarify ThreadPool interface; Move import_mutex guarding to just the string set 2022-12-20 12:46:33 +00:00
gingerBill
2a8fa8612d Use fetch_add rather than += 2022-12-18 23:24: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
3dfd53aee0 Improve error handling for trailing commas #2136 2022-11-21 11:56:59 +00:00
gingerBill
f7211408fc Merge pull request #1544 from FancyKillerPanda/build_ignore
Changed `//+ignore` to `//+build ignore` and emit a warning for unknown tags
2022-11-03 12:58:26 +00:00
Zac Nowicki
4767311a22 Fix -verbose-error source lines from having last char cut off
Fixes #1226
2022-09-15 07:09:38 -04:00
gingerBill
ef372bd861 Replace #optional_second with #optional_allocator_error 2022-09-12 13:08:32 +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
gingerBill
5e3cf45df3 Add #soa pointer type to aid with refactoring to #soa data types
a: #soa[16]Foo
p := &a[6]
#assert(type_of(p) == #soa^#soa[16]Foo)
p^.x = 123
p.x = 123
2022-08-08 15:07:00 +01:00
gingerBill
5168cf03a9 Remove dead #maybe code 2022-08-01 15:38:50 +01:00
gingerBill
b886ae6515 Simplify parser logic for field prefixes 2022-08-01 15:32:17 +01:00
gingerBill
5f2b220a85 Fix minor issue with a lack of a trailing comma 2022-07-25 12:12:25 +01:00
gingerBill
c8ab1b7ee1 Add #by_ptr procedure attribute to enforce a parameter to be passed by pointer internally 2022-07-24 13:11:48 +01:00
gingerBill
22a0c3fce1 Disallow proc() do stmt and only allow proc() { stmt } 2022-07-18 15:09:04 +01:00
gingerBill
80c10644dd Remove assert 2022-07-16 17:39:13 +01:00
gingerBill
041625381c Fix #1888 2022-07-16 17:36:03 +01:00
gingerBill
b40998de9e Improve -strict-style for foreign import 2022-06-13 11:11:51 +01:00
gingerBill
8c0c327df9 Improvements to -strict-style and trailing commas 2022-06-13 11:00:13 +01:00
gingerBill
35fd8e7f68 Move trailing comma requirement in field lists to -strict-style 2022-06-12 12:20:00 +01:00
gingerBill
ba5f7c4e2a Deprecate a..b based ranges in favour of ..= 2022-06-01 11:08:19 +01:00
gingerBill
66b5a35ec3 Add simd_to_bits; correct fix typo causing issue with parapoly 2022-05-26 13:45:47 +01:00
gingerBill
3ec70c5517 Merge functionality of #maybe with the standard 'union' functionality 2022-05-23 12:04:19 +01:00
Cedric Hutchings
5c647e2f61 Fix typo. 2022-05-21 01:50:59 -04:00
gingerBill
5bc866e420 Allow for import _ "foo" to allow for @(init) procedures; Remove using import code 2022-05-14 14:44:24 +01: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
gingerBill
3f935bea25 union #shared_nil
This adds a feature to `union` which requires all the variants to have a `nil` value and on assign to the union, checks whether that value is `nil` or not. If the value is `nil`, the union will be `nil` (thus sharing the `nil` value)
2022-03-24 11:55:03 +00:00
gingerBill
6ea9ba16e7 Fix #1610 2022-03-14 12:38:56 +00:00
Sébastien Marie
fad851d80c check for semi-colon before EOF too 2022-03-03 15:57:51 +00:00
gingerBill
d4ccb69ccc Check if directory exists with the same target executable name when building a directory 2022-02-28 21:49:19 +00:00