gingerBill
4812601e78
Fix #2167 context.assertion_failure_proc = nil (context field assignments)
2022-11-01 12:56:17 +00:00
gingerBill
8fa571c283
Use direct parameter value in lb_find_ident when possible
2022-10-30 22:58:44 +00:00
gingerBill
0fe006157e
Remove extra pointer indirection
2022-09-27 00:18:19 +01:00
gingerBill
4d208dc092
Override lbArgKind to be indirect for #by_ptr parameters
2022-09-27 00:10:05 +01:00
gingerBill
0dce7769f4
Clean up private internal constant global handling
2022-09-22 00:18:03 +01:00
gingerBill
ff97a73152
Reduce unnecessary map gets
2022-09-21 13:03:13 +01:00
gingerBill
7840c1b89f
Change __dynamic_map_get and __dynamic_map_set to use separate parameters rather than take a singular struct
2022-09-17 12:48:12 +01:00
gingerBill
a3c04db828
Revert "Just get the value directly and store it in another global variable"
...
This reverts commit 190c3ab0cd .
2022-09-14 17:57:12 +01:00
gingerBill
190c3ab0cd
Just get the value directly and store it in another global variable
...
// global
x := &Foo{}
2022-09-14 17:50:31 +01:00
gingerBill
0c9aaed9f7
Fix #2029 Eumerated array of procs literal crashes the compiler with an llvm error
2022-09-07 11:09:22 +01:00
gingerBill
aeacf3a9d8
Correct max alignment handling throughout the llvm backend
2022-08-24 13:07:41 +01:00
gingerBill
5337b0b471
Revert "Remove debug message"
...
This reverts commit 22d16c20f8 .
Revert "Correct global constant procedure initialization"
This reverts commit 697c839c84 .
Revert "Clean up how procedures are typed in LLVM's dumb type system"
This reverts commit de8bd88d2a .
2022-08-16 16:16:36 +01:00
gingerBill
d30198c99a
Merge pull request #1944 from odin-lang/load-improvements
...
Improvements to `#load`
2022-08-15 10:27:53 +01:00
gingerBill
697c839c84
Correct global constant procedure initialization
2022-08-12 12:29:11 +01:00
gingerBill
de8bd88d2a
Clean up how procedures are typed in LLVM's dumb type system
2022-08-12 11:15:12 +01:00
gingerBill
0f3562ef02
Improve compound literal generation for array-like types
2022-08-11 16:01:46 +01:00
gingerBill
03f683f9e7
Improve emit store for large constants
2022-08-11 15:19:27 +01:00
gingerBill
a7c3906003
#load(path, type)
...
where `type` can be `string` or `[]T` where `T` is a simple type
2022-08-11 14:30:14 +01:00
gingerBill
84f9fb706b
General clean up of LLVM*GEP2 code
2022-08-10 11:36:25 +01:00
gingerBill
812823cad8
Wrap all LLVMGetElementType uses
2022-08-09 21:17:32 +01:00
gingerBill
cfc3723879
Remove other uses of LLVMGetElementType on pointer types
2022-08-09 21:12:31 +01:00
gingerBill
ff94c605e0
Minor change to lb_emit_store for storing nil to procedure variables
2022-08-09 18:08:30 +01:00
gingerBill
cb0a59bb2c
Eliminate use of LLVMGetElementType for pointers
2022-08-09 15:36:18 +01:00
gingerBill
076700bd22
Merge pull request #1933 from lerno/reduce_reliance_on_ptr_type
...
Removed use of deprecated functions. Cleaned up most deprecated use o…
2022-08-09 15:18:09 +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
Christoffer Lerno
9c0a3b6c60
Removed use of deprecated functions. Cleaned up most deprecated use of LLVMGetElementType.
2022-08-07 19:26:28 +02:00
gingerBill
b28d4b753b
Temp fix for lb_emit_store
2022-07-24 20:58:50 +01:00
gingerBill
e6ab4f4856
Force memset instead of store zeroinitializer when the value is large
2022-07-24 20:22:50 +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
6c7e5748a8
Integrate numerous debug fixes from #1877
2022-07-18 12:49:29 +01:00
gingerBill
e61b73d7ad
Fix #1869
2022-07-16 22:30:57 +01:00
gingerBill
1676c643df
Change MAX_STORE_SIZE
2022-06-30 15:47:19 +01:00
gingerBill
4d06a54c0c
Use memmove if possible when emitting store over a certain size
2022-06-30 15:42:02 +01:00
gingerBill
5187db525f
Minor style change
2022-06-12 17:17:59 +01:00
gingerBill
a8bd340267
Merge pull request #1395 from hdooley/master
...
factor out alloca generation into a helper
2022-06-12 17:17:12 +01:00
gingerBill
cec049b7d3
Make the link order of foreign imports deterministic
2022-05-04 16:04:26 +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
f702c782f1
Make constant string backing structures use PrivateLinkage compared to InternalLinkage
2022-03-24 12:18:17 +00: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
gitlost
fdbbf24271
Fix issue #1592 "LLVM code gen error when using a constant in an if"
...
Changes lb_build_if_stmt() to return null lbValue if condition is
cmpAnd, cmpOr or non-const neg and check in lb_build_if_stmt()
to avoid short circuiting if that's the case
Adds test to "tests/issues" and adds step in CI to check this dir
2022-03-18 13:57:22 +00:00
gingerBill
0cc40db565
Begin work on support objc intrinsics
2022-02-08 17:04:55 +00:00
CiD-
498f68c06b
avoid segfault on map resize
2022-01-26 14:37:15 -05:00
gingerBill
b190404b21
Fix double map dereference indexing
2022-01-26 16:37:16 +00:00
Henry Dooley
865d88dd56
review feedback
2021-12-28 10:50:34 -06:00
Henry Dooley
069c05669f
cast isize to unsigned int for llvm api, add defaulted name parameter to helper.
2021-12-25 16:46:02 -06:00
Henry Dooley
516065d7c2
factor out alloca generation into a helper
2021-12-25 16:28:09 -06:00
gingerBill
daebaa8b50
Fix #1319
2021-11-19 15:43:13 +00:00
gingerBill
3d3785a7f1
Remove many LLVM optimization passes which were causes UB due to them assuming C-like behaviour incompatible with Odin
2021-11-06 17:23:33 +00:00
gingerBill
6be104e521
Make llvm backend code use PtrMap; remove dead code
2021-11-05 16:43:53 +00:00
gingerBill
6ded538546
@(linkage=<string>) for procedures and variables; @(require) for procedures; package runtime linkage improvements; Subsequence improvements to lb_run_remove_unused_function_pass
2021-11-04 12:40:50 +00:00