Commit Graph

137 Commits

Author SHA1 Message Date
Sébastien Marie
5676c9e7eb initial OpenBSD support 2022-02-25 08:49:25 +00:00
gingerBill
71df46456a Minimize memory usage by having an arena per thread rather than an arena per file 2022-02-18 21:30:25 +00:00
gingerBill
e814a3693f Improve usage of file_id 2021-11-15 17:26:01 +00:00
gingerBill
26e3daf5ad Unify MapFindResult types 2021-11-05 17:24:19 +00:00
gingerBill
541beb615b Move more things to PtrMap 2021-11-05 17:13:07 +00:00
gingerBill
e95204908a Add PtrMap, begin working change Map to PtrMap where possible 2021-11-05 16:34:37 +00:00
gingerBill
3794d2417d Write a log(n) fallback for llvm_vector_reduce_add
This may be what LLVM does at any rate
2021-10-28 15:01:13 +01:00
gingerBill
2ad6aa7886 Copying file contents rather than memory mapping 2021-10-12 11:06:39 +01:00
gingerBill
2bdae52fed Add @(init) attribute for procedures, allowing for procedures to be called at startup
These procedures will be called after global variables have been initialized as normal
2021-10-03 11:53:32 +01:00
Phil H
3ac13d2028 Correct levenshtein distance 2021-09-23 09:22:28 -07:00
gingerBill
05ac2002e0 Force file copy on odin strip-semicolon 2021-09-18 12:52:43 +01:00
gingerBill
3713f11461 Refactor init_tokenizer_with_data to file memory mapping (Windows only currently) 2021-09-18 11:58:27 +01:00
gingerBill
ad3a3547d6 Unify thread pool logic across the rest of the compiler, using a global thread pool 2021-08-26 21:22:30 +01:00
gingerBill
3e4d615983 Minor fixes 2021-08-26 15:41:32 +01:00
gingerBill
aa8777ee47 Change the implementation of Arena to use virtual memory, and remove the old gbArena code 2021-08-26 15:38:34 +01:00
gingerBill
df372dbd5b Migrate and remove more from gb.h 2021-08-19 15:38:21 +01:00
gingerBill
5c4d95d539 Move more of gb.h's Synchronization code into common.cpp 2021-08-19 15:19:36 +01:00
gingerBill
740995df3d Remove attribute parameter for pthread_mutex_init 2021-08-18 21:07:06 +01:00
gingerBill
aa5c3da414 Make BlockingMutex non-recursive on *nix systems 2021-08-18 20:57:03 +01:00
gingerBill
d419d81841 Remove unused code 2021-08-18 20:48:26 +01:00
gingerBill
08942714a2 Make Arena allocate virtual memory directory; make it use a BlockingMutex 2021-08-18 20:46:10 +01:00
gingerBill
423b842347 Fix typo 2021-08-07 15:07:29 +01:00
gingerBill
16eeae36d7 Inline heap_allocator resize logic on *nix platforms 2021-08-07 15:05:46 +01:00
gingerBill
571170fd30 Improve and simplify the memory layout of MPMCQueue 2021-08-07 14:25:48 +01:00
gingerBill
700624119b Give begin_error_block its own recursive mutex 2021-07-29 12:35:11 +01:00
gingerBill
af32aba7fc Modify MPMCQueue behaviour to use i32 over isize; Correct cache line padding within MPMCQueue 2021-07-28 00:59:30 +01:00
gingerBill
a5d6fda433 Define which mutexes are blocking and recursive explicitly 2021-07-27 23:14:01 +01:00
gingerBill
116e98b378 Improve default scope size 2021-07-27 10:59:39 +01:00
gingerBill
bd8e2f82be Replace non-recursive mutexes with BlockingMutex; Minor improves to initialization improves 2021-07-14 00:34:34 +01:00
gingerBill
698eeaf7c3 Add (internal flag) -show-debug-messages 2021-07-13 17:40:06 +01:00
gingerBill
ed5a4afc8c Temporarily disable -threaded-checker; Restructure the untyped-expr-info system to be much more thread-friendly 2021-07-13 15:54:56 +01:00
gingerBill
76707e1d2f Add sanity casts for 32/64 bit correctness 2021-07-12 11:03:12 +01:00
gingerBill
ed8a6f872d Move things around for sanity checking for multithread preparation 2021-07-10 21:29:49 +01:00
gingerBill
0a61d4bf2b Use next_pow2_isize 2021-07-10 19:57:54 +01:00
gingerBill
332461c0d2 Add prototypes for next_pow2 2021-07-10 19:52:26 +01:00
gingerBill
d8abe7fc4d Implement MPMCQueue for procedure body checking
This is preparation for basic multithreading in the semantic checker
2021-07-10 19:50:34 +01:00
gingerBill
141573c18c Enable Damerau-Levenshtein 2021-07-10 11:09:24 +01:00
gingerBill
35230b1a11 Add "Suggestion: Did you mean?" for selector expression typos 2021-07-08 23:15:07 +01:00
gingerBill
4662bad59c Remove unused file 2021-04-25 20:31:35 +01:00
gingerBill
54e6c50769 Implement f16 functionality 2021-04-01 10:06:00 +01:00
Nakst
acefb2edbc Similar to the update to gb.h 2021-03-14 20:37:32 +00:00
gingerBill
e884f8c165 Fix typo 2021-01-15 15:46:15 +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
3c1c10a178 Begin clarifying allocation patterns by changing from heap_allocator to specific arenas 2020-11-15 18:08:52 +00:00
Tetralux
dfac45942c Fix error message when importing package that does not exist
Previously on Linux, if a file in your program tried to import a
package that did not actually exist, read_directory() assumed that
the errno after calling opendir() was ENOTDIR.

This was incorrect.

Instead, we now switch on errno and check for ENOENT, which it is
if the directory does not exist.
2020-10-09 05:56:12 +01:00
Christian Seibold
ac126a8cd7 Add FreeBSD targets, get gb.h working with FreeBSD, fix odin_root_directory function for FreeBSD and a few other operating systems not yet added 2020-09-14 11:28:41 -05:00
gingerBill
e84406a895 Move zero_size 2020-05-27 18:26:20 +01:00
gingerBill
1a0614b0d7 Improve performance of tokenization and parsing 2020-05-27 18:23:37 +01:00
gingerBill
6ac0fb80a6 Minor tokenizer performance improvements 2020-05-27 12:32:11 +01:00