244 Commits

Author SHA1 Message Date
LemonBoy
e8012740b9 Fix off-by-one error (and missing store op) 2020-01-15 20:03:41 +01:00
LemonBoy
ede28755b6 Fix test case 2020-01-15 18:41:07 +01:00
LemonBoy
c5cfc9bf68 Move definition of __aeabi_read_tp 2020-01-15 17:50:51 +01:00
LemonBoy
5d5345728a Fix div builtins to use the correct calling convention 2020-01-15 17:50:51 +01:00
LemonBoy
109e5f8a5a Remove unnecessary logic 2020-01-15 17:50:51 +01:00
LemonBoy
44e3796285 Rearrange some builtin functions placement 2020-01-15 12:48:28 +01:00
LemonBoy
5ab5de89c0 New @export() handling
Use a struct as second parameter to be future proof (and also allows to
specify default values for the parameters)

Closes #2679 as it was just a matter of a few lines of code.
2020-01-09 13:43:06 -05:00
Ryan Liptak
834218d789 Fix remaining variadic formatted prints
Used a series of regex searches to try to find as many instances of the old pattern as I could and update them.
2020-01-09 13:36:44 -05:00
Rocknest
437c6a4b7e Make markdown parser more safe (#4105)
Fixes #3722
2020-01-07 15:26:21 -05:00
emekoi
156e43b463 added -- to pass args to zig build commands 2020-01-07 13:59:16 -05:00
LemonBoy
e81b505960 Use the correct calling convention for AEABI intrinsics 2020-01-07 13:42:47 -05:00
LemonBoy
e3a63b4e5a Add more compiler-rt functions for ARM platform 2020-01-06 19:08:15 -05:00
Andrew Kelley
53913acaf7
zig fmt and update extern fn to callconv(.C) 2020-01-06 15:34:50 -05:00
Andrew Kelley
0a9daeb37e
Merge branch 'cc-work' of https://github.com/LemonBoy/zig into LemonBoy-cc-work 2020-01-06 14:07:56 -05:00
LemonBoy
563d9ebfe5 Implement the callconv() annotation 2020-01-02 18:53:16 +01:00
Andrew Kelley
cb56b26900
fix float ops with respect to vectors
also remove the redundant type parameter
2020-01-01 23:27:43 -05:00
Andrew Kelley
b1abe4a172
Revert "added -- to pass args to zig build commands"
This reverts commit d4e56ae6ae15ed1b062b0d775893abb5579fc66d.

This broke the build
2019-12-16 16:36:42 -05:00
emekoi
d4e56ae6ae added -- to pass args to zig build commands 2019-12-16 16:24:54 -05:00
Henry Wu
170de5ecae generated docs: log trace instead of error
When the error occurred for getValueText it could potentially omit
useful documentation since the page stops rendering.
2019-12-16 12:40:38 -05:00
Andrew Kelley
fff3c1fff4
un-special-case startup code in the std lib
Previously, the compiler had special logic to determine whether to
include the startup code, which was in `std/special/start.zig`. Now,
the file is moved to `std/start.zig`, and there is no special logic
in the compiler. Instead, the standard library unconditionally imports
the `start.zig` file, which then has a `comptime` block that does the
logic of determining what, if any, start symbols to export. Instead of
`start.zig` being in its own special package, it is just another normal
file that is part of the standard library.

`std.builtin.TestFn` is now part of the standard library rather than
specially generated by the compiler.
2019-12-12 18:33:44 -05:00
Christine Dodrill
b37acc4d68
allow custom OS entrypoint
Also:

 * Expose `std.start.callMain`.
 * Other fixes added to fix issues found in development.
2019-12-12 16:00:23 -05:00
Robin Voetter
4b4fbe3887
Replace @typeOf with @TypeOf in all zig source
This change was mostly made with `zig fmt` and this also modified some whitespace. Note that in some files, `zig fmt` produced incorrect code, so the change was made manually.
2019-12-10 11:09:41 -05:00
Andrew Kelley
a3f6a58c77
remove var args from the language
closes #208
2019-12-09 15:27:27 -05:00
Andrew Kelley
d571fad20e
update tests to new format API 2019-12-09 00:05:21 -05:00
Andrew Kelley
8b2622cdd5
std.fmt.format: tuple parameter instead of var args 2019-12-08 22:53:51 -05:00
Andrew Kelley
525b1e8fb4
Merge pull request #3856 from ziglang/builtin-call
introduce `@call` and remove other builtin calls
2019-12-06 15:49:47 -05:00
Andrew Kelley
71b7f4b47f
remove @newStackCall from zig 2019-12-06 14:52:09 -05:00
Andrew Kelley
343987cd05
remove @inlineCall from zig 2019-12-06 14:12:01 -05:00
Andrew Kelley
ef83358eb6
remove @noInlineCall from zig 2019-12-05 17:37:29 -05:00
xackus
71354498c9 docs: add html lang and minor fixes 2019-12-05 22:40:58 +01:00
Andrew Kelley
10e172b1d7
add other OS and fix regression in build-exe for freestanding 2019-12-04 14:42:40 -05:00
Vexu
137cb32f5e add docs for function parameters 2019-12-04 14:14:47 -05:00
Andrew Kelley
521744bb91
correct the calling convention of WinMainCRTStartup 2019-12-03 16:55:27 -05:00
Andrew Kelley
8db4d2332e
correct startup logic for exporting libc main 2019-12-03 13:10:26 -05:00
Andrew Kelley
6a046c1bcd
activate start code when pub main exists
and rename LinkType->LinkMode, OutType->OutputMode
2019-12-03 12:50:42 -05:00
Vexu
621c08e692
exported main must be pub 2019-12-03 12:50:42 -05:00
Vexu
a0ca30ce01
move more startup code to std lib 2019-12-03 12:50:18 -05:00
Andrew Kelley
b6127b0fe9
add some null-termination annotations
closes #3797
2019-12-02 01:13:46 -05:00
LemonBoy
e1e06e6766 linux-i386 support 2019-11-30 16:13:33 +01:00
Andrew Kelley
cb38bd0a14
rename std.heap.direct_allocator to std.heap.page_allocator
std.heap.direct_allocator is still available for now but it is marked
deprecated.
2019-11-25 17:25:06 -05:00
Andrew Kelley
15d415e10b
make std.mem.toSlice use null terminated pointers
and fix the fallout
2019-11-24 21:21:05 -05:00
Andrew Kelley
34b1ebefaa
Merge remote-tracking branch 'origin/master' into null-terminated-pointers 2019-11-24 20:28:46 -05:00
Andrew Kelley
44b1dc6db8
add type coercion: [:x]T to [*:x]T 2019-11-24 15:17:55 -05:00
syscall0
eea8b10463 Call DllMain entry point if declared 2019-11-24 14:46:22 -05:00
Andrew Kelley
47f06be369
string literals are now null terminated
this also deletes C string literals from the language, and then makes
the std lib changes and compiler changes necessary to get the behavior
tests and std lib tests passing again.
2019-11-21 20:43:41 -05:00
Vexu
977b613881
add container doc comments to generated docs 2019-11-15 15:17:59 +02:00
Andrew Kelley
0237e7a701 std.io.getStdOut and related fns no longer can error
Thanks to the Windows Process Environment Block, it is possible to
obtain handles to the standard input, output, and error streams without
possibility of failure.
2019-11-13 04:01:40 +00:00
Andrew Kelley
e0db54e89d
update the codebase to use @as 2019-11-08 15:57:24 -05:00
Vexu
3858a526e3 make callMainAsync async 2019-11-07 13:18:47 -05:00
Andrew Kelley
913f7d0450
improve the start code for evented I/O
When evented I/O is being used, prevent event loop from terminating
at least until main() has returned.
2019-11-06 15:08:29 -05:00