Commit Graph

1910 Commits

Author SHA1 Message Date
gingerBill
11577db6a8 Minor fixes 2020-11-17 16:36:33 +00:00
gingerBill
ede25a88f8 Ignore +build flags in packages comments with odin doc 2020-11-17 16:01:33 +00:00
gingerBill
aa5cb7f6a9 Fix proc type printing 2020-11-17 15:54:22 +00:00
gingerBill
d730c5b334 Improve file doc logic 2020-11-17 15:48:18 +00:00
gingerBill
34ca4e92eb Fix parser logic for first comment group line in a file 2020-11-17 15:45:55 +00:00
gingerBill
7442f4bab6 Fix typo 2020-11-17 15:17:36 +00:00
gingerBill
4f303603e7 Add more documentation for odin doc flags 2020-11-17 15:15:26 +00:00
gingerBill
a0fbc56317 Improve flags for odin doc 2020-11-17 15:13:38 +00:00
gingerBill
d90fc18bef Basic odin doc support 2020-11-17 15:05:16 +00:00
gingerBill
00192bb349 Improve flag handling to check for invalid uses 2020-11-17 13:55:08 +00:00
gingerBill
edd9d5e50b Add -show-unused-with-location 2020-11-17 13:02:10 +00:00
gingerBill
fea8c63ab3 Fix string_compare 2020-11-17 12:19:28 +00:00
gingerBill
6f71d1f2a9 Add -show-unused (Shows unused package declarations of all imported packages)
Crude output at the moment but better than nothing
2020-11-17 12:10:25 +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
adf6c85fd3 Minimize Ast flags usage 2020-11-16 01:42:30 +00:00
gingerBill
939878df50 Improve logic for x->y() shorthand 2020-11-15 23:54:18 +00:00
gingerBill
5fafb17d81 Improve generate_entity_dependency_graph: Calculate edges for graph M - Part 2 2020-11-15 22:46:07 +00:00
gingerBill
3a229397e4 Add next_pow2_isize for PtrSet 2020-11-15 21:22:26 +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
a6c5c203ab Begin work on Sys V for new ABI system 2020-11-12 01:21:09 +00:00
gingerBill
70b8b3c7dd Update LLVM backend to begin work on a generic ABI system 2020-11-12 00:43:49 +00:00
gingerBill
6c0fa24e5d Force dependency for @(export) entities 2020-11-10 19:00:16 +00:00
F0x1fy
0eba4b46b5 Made sure the entry point is not generated when -no-entry-point is specified. 2020-11-10 10:16:22 -07:00
F0x1fy
6b6f1a5283 For the sake of consistency, fixed the placement of the -no-entry-point flag check. 2020-11-10 09:56:16 -07:00
F0x1fy
3bed5fad77 Removed unnecessary newline from previous commit. 2020-11-10 09:55:00 -07:00
F0x1fy
301e1d2ff3 Added -no-entry-point flag and relevant check. 2020-11-10 09:50:53 -07:00
gingerBill
ee3b3fe6a3 Fix typeid_of bug 2020-11-10 14:48:57 +00:00
gingerBill
31f4590f4b Fix default parameters on record types 2020-11-09 13:04:36 +00:00
gingerBill
7909a9f5a5 Remove debug code causing bug 2020-11-09 10:36:09 +00:00
gingerBill
c26cb470a2 Fix LLVM-API type cycle for procedures of named procedures 2020-11-09 10:27:27 +00:00
gingerBill
3d5e180dec Merge branch 'master' of https://github.com/odin-lang/Odin 2020-11-08 23:55:53 +00:00
gingerBill
44baf56d62 Fix cyclic check in is_type_polymorphic 2020-11-08 23:54:09 +00:00
Tetralux
140bb3ebfc Fix -build-mode:shared type table on Unix
Fixes #527.

Previously on Linux, '__$startup_runtime', the procedure that
initializes the type table for runtime typeids, was NOT called when
a shared library was loaded by the dynamic loader.

This caused the library to not have its type table populated, which
caused an assert to fail if you tried to use runtime typeids - like
core:fmt, for example.

This commit fixes this by calling ld instead of clang, when building a
shared library, so that we can pass "-init '__$startup_runtime'" to it,
when building a shared library.

Try as I might, I could not get clang to correctly pass through
the linker flags that I wanted.
2020-11-06 20:44:11 +00:00
Platin21
8c46582667 Fixes text layout now via GitHub 2020-10-31 22:37:11 +01:00
Platin21
f29f7351e9 Revert "Changed tab width was on 2 now 4"
This reverts commit fc7c0ca3b0.
2020-10-31 22:30:03 +01:00
Platin21
fc7c0ca3b0 Changed tab width was on 2 now 4 2020-10-31 22:29:02 +01:00
Platin21
8158239d76 Sets llvm api back to use the generic sdk link 2020-10-31 22:15:16 +01:00
Platin21
f3108493fb Combines all link-able types to a single if and adds .o for linking 2020-10-31 22:12:50 +01:00
Platin21
7694a89d38 Fix for local/lib linking from brew for macOS 2020-10-31 22:05:40 +01:00
gingerBill
08fae7360a Fix ir printing for nested procedure literals indirectly through identifiers 2020-10-29 09:58:08 +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
0061e63db0 Merge branch 'master' of https://github.com/odin-lang/Odin 2020-10-24 15:08:46 +01:00
gingerBill
5fa488f163 Add intrinsics.cpu_relax for llvm-api 2020-10-24 15:08:35 +01:00
gingerBill
71ef27fef9 Merge pull request #753 from Tetralux/fix-dirnoexist-error
Fix error message when importing package that does not exist
2020-10-24 09:41:26 +01:00