Commit Graph

130 Commits

Author SHA1 Message Date
gingerBill
2bd0fd932a Begin rudimentary work on implementing odin test tooling with *_test.odin files 2020-11-17 18:50:30 +00:00
gingerBill
ca4b0527e8 Minimize memory usage for AST nodes by using Slice<T> rather than Array<T> when the parameter doesn't need to grow 2020-11-16 15:18:25 +00:00
gingerBill
db0bcbc4f4 Fix calling convention for new LLVM ABI, and changePtrSet index to be u32 rather than isize 2020-11-15 21:19:08 +00:00
gingerBill
0d6f5cec37 Implement custom temporary allocator using ring buffer 2020-11-15 19:36:37 +00:00
gingerBill
17ec3e72a6 Add SCOPED_TEMPORARY_BLOCK for temporary allocations within a block 2020-11-15 18:45:40 +00:00
gingerBill
30d922b059 Make set_procedure_abi_types use the permanent_allocator 2020-11-15 18:11:49 +00:00
gingerBill
3c1c10a178 Begin clarifying allocation patterns by changing from heap_allocator to specific arenas 2020-11-15 18:08:52 +00:00
gingerBill
9f93042163 Improve lb_abi_to_odin_type 2020-11-14 17:09:42 +00:00
gingerBill
a64ea342df Improve USE_NEW_LLVM_ABI_SYSTEM's System V ABI 2020-11-12 23:40:13 +00:00
gingerBill
70b8b3c7dd Update LLVM backend to begin work on a generic ABI system 2020-11-12 00:43:49 +00:00
gingerBill
ee3b3fe6a3 Fix typeid_of bug 2020-11-10 14:48:57 +00:00
gingerBill
c26cb470a2 Fix LLVM-API type cycle for procedures of named procedures 2020-11-09 10:27:27 +00:00
gingerBill
4629754f7c Inline asm expression (-llvm-api)
See https://llvm.org/docs/LangRef.html#inline-assembler-expressions
Example:
```
x := asm(i32) -> i32 {
    "bswap $0",
    "=r,r",
}(123);
```
Allowed directives `#side_effect`, `#align_stack`, `#att`, `#intel` e.g. `asm() #side_effect #intel {...}`
2020-10-24 16:32:37 +01:00
gingerBill
5fa488f163 Add intrinsics.cpu_relax for llvm-api 2020-10-24 15:08:35 +01:00
gingerBill
feeb342c00 Improve multiple return value copy-elision 2020-10-20 17:08:55 +01:00
gingerBill
c4dbc88a12 Improve array programming code generation 2020-10-20 15:38:41 +01:00
gingerBill
f4b4cd0433 Specific set the code gen level for -llvm-api 2020-10-20 12:43:15 +01:00
gingerBill
4e5b8f2c61 Add -build-mode:assembly for -llvm-api 2020-10-20 12:35:12 +01:00
gingerBill
0be6ddc7e2 Add -microarch:<string> (e.g. -microarch:native) 2020-10-20 12:25:11 +01:00
gingerBill
609af3a651 Fix and clean up default procedure parameter code for non-constant types 2020-09-22 12:06:05 +01:00
gingerBill
0cd681e6b7 Expose runtime._startup_runtime to allow for freestanding targets in the future 2020-09-15 10:51:51 +01:00
gingerBill
bf215377de Add edge case check for "" string 2020-09-11 16:20:46 +01:00
gingerBill
d317d3d8b3 Simplify "" string code 2020-09-11 16:18:24 +01:00
gingerBill
77829af9de Fix delete("") on -llvm-api; Fix linalg stuff 2020-09-11 13:46:52 +01:00
gingerBill
7f48cf8405 [REFLECTION BREAKING] Modify the internals of the map type to increase performance 2020-09-07 11:41:42 +01:00
gingerBill
4daf098a3a Fix defer on explicit return of a procedure with no return values for llvm-api 2020-08-27 11:06:44 +01:00
gingerBill
c783840eab Fix #642 2020-08-26 23:20:25 +01:00
gingerBill
9f24188ec8 Fix #708 2020-08-05 22:51:24 +01:00
gingerBill
d1d5f61230 Add intrinsics.alloca 2020-08-02 14:59:39 +01:00
gingerBill
13e5cb8cc4 Fix #691 and Fix #692 2020-07-14 23:50:09 +01:00
gingerBill
c18fc2da9f Remove some dead code 2020-07-14 16:36:33 +01:00
gingerBill
9da1347c21 Fix Source_Code_Location error for *_insert_dynamic_map_key_and_value procedures 2020-07-08 22:57:39 +01:00
gingerBill
1b2cc739a9 Handle llvm package name edge case for IR mangling 2020-06-30 19:12:53 +01:00
gingerBill
92363da58e Add -show-system-calls; Update runtime for windows_386; Fix some minor bugs 2020-06-30 10:09:58 +01:00
gingerBill
0ea64182f1 Begin work on windows 386 2020-06-29 17:35:33 +01:00
gingerBill
a6edcf4f18 Fix ABI typo bug; Add pop_safe and pop_front_safe 2020-06-22 21:03:57 +01:00
gingerBill
2b27300387 Fix LLVM code gen bug 2020-06-22 16:57:21 +01:00
gingerBill
724c776dbe Fix enumerated array type information creation bug 2020-06-17 23:28:39 +01:00
gingerBill
781395ada1 Add deferred_in_out attribute 2020-06-16 16:21:44 +01:00
gingerBill
c3ebc49ad2 Fix @static slice for LLVM C API backend 2020-06-15 11:54:18 +01:00
gingerBill
01d12770fa Fix compound literals for constant procedure fields 2020-06-11 16:11:54 +01:00
gingerBill
82b559c32b Remove debug code 2020-06-10 19:29:24 +01:00
gingerBill
f305726015 Fix #c_vararg for LLVM C API 2020-06-10 16:15:56 +01:00
gingerBill
99944f3b02 Improve behaviour of return with named results to aid with defer statements 2020-06-10 14:53:35 +01:00
gingerBill
a9295d33ab Fix #674 2020-06-10 14:39:50 +01:00
gingerBill
d0920804c3 Stop statement generation after terminating instruction in current block (LLVM C API) 2020-06-10 13:57:25 +01:00
gingerBill
97d3d4ff6f Minor changes for \*nix backend 2020-06-10 13:38:17 +01:00
gingerBill
6b3ee447f0 Basic cross compilation support 2020-06-10 12:26:31 +01:00
gingerBill
9b1cc6e94f Update logic for slice literals, backing array to be on the stack if possible (LLVM C API) 2020-06-08 12:41:42 +01:00
gingerBill
59a0bbb385 Improve termination rules checking for missing return; Make diverging procedure -> ! be terminators 2020-06-06 15:16:24 +01:00