Commit Graph

16993 Commits

Author SHA1 Message Date
gingerBill
f70939ab4f Use windows specific exception traps 2020-06-15 12:39:29 +01:00
gingerBill
08e271720a Merge branch 'master' of https://github.com/odin-lang/Odin 2020-06-15 11:54:28 +01:00
gingerBill
c3ebc49ad2 Fix @static slice for LLVM C API backend 2020-06-15 11:54:18 +01:00
vassvik
9cccb20f49 Add some tests to test utf16_to_utf8 and wstring_to_utf8 2020-06-13 18:04:19 +02:00
vassvik
6985d72fda Make os.get_current_directory no longer strip the zero at the end of the resulting string, as it no longer should occur. 2020-06-13 15:20:39 +02:00
vassvik
0056cdffa7 Reworked win32.utf16_to_utf8 and win32.wstring_to_utf8 to scan for zeros from the start of the string instead of from the end.
This is useful to correctly convert strings from a buffer possibly containing multiple multiple substrings.

The resulting utf8 string is not null terminated, even if the backing memory might be null terminated.
2020-06-13 15:19:41 +02:00
gingerBill
a229f9825b Fix -vet warning for fmt.printf("%10s") 2020-06-12 23:13:26 +01:00
gingerBill
a6ff48a5de Merge pull request #681 from ralph-the-mighty/stringwidth
Control %s width in fmt.print* functions
2020-06-12 23:10:28 +01:00
Josh
6648dc9ed1 use width in when printing formatted string to control padding added after the string 2020-06-12 18:05:40 -04:00
vassvik
bbbf7168f1 Add wstring_to_utf8 to sys/win32 2020-06-12 21:06:21 +02:00
vassvik
c15ed44f82 Fix off by one bug introduced in the previous commit. 2020-06-12 18:19:46 +02:00
gingerBill
58466a6f3b Add extra NUL termination check for string length in win32 general string convertors 2020-06-12 15:01:43 +01:00
gingerBill
be76c860a5 mem.simple_equal 2020-06-12 14:52:31 +01:00
gingerBill
4533c02cc7 Improve intrinsics.type_is_simple_compare 2020-06-12 14:37:27 +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
474d79dcf1 Add mem.simple_compare_values 2020-06-10 16:37:22 +01:00
gingerBill
61db6c1234 Add force usage when importing intrinsics or builtin 2020-06-10 16:36:59 +01:00
gingerBill
e641d714a0 Fix #677 2020-06-10 16:32:53 +01:00
gingerBill
f305726015 Fix #c_vararg for LLVM C API 2020-06-10 16:15:56 +01:00
gingerBill
57b09b2ffb Fix #439 2020-06-10 15:37:50 +01:00
gingerBill
e86fde3cb1 Fix #648 2020-06-10 15:09:04 +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
4acae2af44 Add support for using on relative pointers #670 2020-06-10 14:25:11 +01:00
gingerBill
036429bf2f Fix reflect.as_i64 and reflect.as_u64 2020-06-10 14:13: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
6ea0910213 Fix typo 2020-06-10 13:02:42 +01:00
gingerBill
b8d33165c9 Add -target:<string> fuzzy checking with "Did you mean" message 2020-06-10 12:59:54 +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
0ffb718a91 Add fmt.User_Formatter 2020-06-08 12:40:50 +01:00
gingerBill
a7dd686859 Add #caller_location to strings.clone; remove deprecated procedures in package strings 2020-06-08 11:42:38 +01:00
gingerBill
87a6d695d6 Fix typo in error message 2020-06-06 22:39:36 +01:00
gingerBill
a89633e3ed Remove return after unreachable 2020-06-06 15:22:22 +01:00
gingerBill
59a0bbb385 Improve termination rules checking for missing return; Make diverging procedure -> ! be terminators 2020-06-06 15:16:24 +01:00
gingerBill
a3fa647bfd Add package sys/llvm to expose some of the LLVM intrinsics 2020-06-06 14:52:22 +01:00
gingerBill
1a4e2196bd Fix runtime.bswap_16 2020-06-05 14:12:30 +01:00
gingerBill
d8f9daac95 Fix different endian integers for LLVM C API backend 2020-06-05 13:12:57 +01:00
gingerBill
f992e36f9a Rename reflect.to_* to reflect.as_* 2020-06-05 10:38:38 +01:00
gingerBill
11dd971e13 Add reflect.{to_int, to_uint, to_i64, to_u64, to_f64} 2020-06-05 10:27:32 +01:00
gingerBill
5ed4bac16f Merge pull request #676 from Tetralux/fix-temp-alloc-resize
Fix temporary allocator resizing
2020-06-04 23:13:41 +01:00
Tetralux
04ceb5d20c Fix temporary allocator resizing 2020-06-04 21:49:07 +00:00
Kevin Watters
0b67de47d6 add #config to odin parser
Update the `core:odin` parser for the new `#config` idiom.
2020-06-04 10:48:13 -04:00
gingerBill
15c4077806 Fix WASM foreign import names 2020-06-04 00:30:44 +01:00
gingerBill
37a3abdaaa Fix calling convention stuff with LLVM C API 2020-06-03 21:23:30 +01:00
gingerBill
ac709b8afb Merge branch 'master' of https://github.com/odin-lang/Odin 2020-06-03 21:10:18 +01:00
gingerBill
d80049bfd2 Change runtime.Type_Info_Enum_Value to be i64 internally rather than a union 2020-06-03 21:10:07 +01:00
gingerBill
239f3c0418 Merge pull request #672 from foxnne/fixwrap
Fix wrap in core:math.
2020-06-03 14:57:43 +01:00