Andrew Kelley
cd5fd653d7
self-hosted: move code to std.os.ChildProcess.exec
2017-12-12 14:35:53 -05:00
Andrew Kelley
caa6433b56
stack traces: support DW_AT_ranges
...
This makes some cases print stack traces where it previously failed.
2017-12-12 12:05:28 -05:00
Andrew Kelley
23058d8b43
self-hosted: link with LLVM
2017-12-11 23:34:59 -05:00
Andrew Kelley
ed4d94a5d5
self-hosted: test all out of memory conditions
2017-12-11 21:12:47 -05:00
Andrew Kelley
c4e7d05ce3
refactor debug.global_allocator into mem.FixedBufferAllocator
2017-12-11 17:27:31 -05:00
Andrew Kelley
d8d379faf1
self-hosted: refactor into multiple files
...
add return expression
add number literal
2017-12-11 16:18:06 -05:00
Andrew Kelley
a3a590a32a
self-hosted: workaround for issue #537
2017-12-11 14:47:20 -05:00
Andrew Kelley
fd6a36a235
self-hosted: parsing and rendering blocks
2017-12-11 09:21:06 -05:00
Andrew Kelley
9a51091a5c
self-hosted: clean up parser
2017-12-10 23:19:01 -05:00
Andrew Kelley
f951bcf01b
self-hosted: parse variable declarations with types
2017-12-10 23:02:45 -05:00
Andrew Kelley
53d58684a6
self-hosted: parse var decls
2017-12-10 22:44:04 -05:00
Andrew Kelley
f210f17d30
add self-hosted parsing and rendering to main tests
2017-12-10 21:26:52 -05:00
Andrew Kelley
4b1d120f58
Merge remote-tracking branch 'origin/master' into self-hosted
2017-12-10 19:41:01 -05:00
Andrew Kelley
dc2e3465c7
rendering source code without recursion
2017-12-10 19:40:46 -05:00
Andrew Kelley
22dc713a2f
mem.Allocator initializes bytes to undefined
2017-12-10 15:38:05 -05:00
Andrew Kelley
990db3c35a
rename @EnumTagType to @TagType in type names
2017-12-10 15:03:57 -05:00
Andrew Kelley
62ead3a2ee
parsing an extern fn declaration
2017-12-09 20:50:31 -05:00
Andrew Kelley
e9efa74333
partial parameter decl parsing
2017-12-09 20:01:13 -05:00
Andrew Kelley
f466e539ef
tokenizing libc hello world
2017-12-08 23:56:07 -05:00
Andrew Kelley
d431b0fb99
parse a simple variable declaration
2017-12-08 23:15:43 -05:00
Andrew Kelley
5ead3244a2
Merge remote-tracking branch 'origin/master' into self-hosted
2017-12-08 23:15:07 -05:00
Andrew Kelley
756a218e27
add implicit cast from enum tag type of union to const ptr to the union
...
closes #654
2017-12-08 17:49:14 -05:00
Andrew Kelley
18cf256817
Merge branch 'master' into self-hosted
2017-12-08 16:39:00 -05:00
Andrew Kelley
3577a80bb6
translate-c: more complex logic for translating a C cast in a macro
2017-12-08 12:28:21 -05:00
Andrew Kelley
0dd3bbf6e8
Merge branch 'master' into self-hosted
2017-12-07 14:22:41 -05:00
Andrew Kelley
182cf5b8de
translate-c: support macros with pointer casting
2017-12-07 12:27:29 -05:00
Andrew Kelley
dc502042d5
translate-c: refactor prefix and suffix op C macro parsing
2017-12-07 11:52:52 -05:00
Andrew Kelley
37fbf01755
awkward void union field syntax no longer needed
2017-12-06 21:41:38 -05:00
Andrew Kelley
18b8a625f5
upgrade to new args api
2017-12-06 18:22:52 -05:00
Andrew Kelley
7c91a055c1
Merge branch 'master' into self-hosted
2017-12-06 18:20:02 -05:00
Andrew Kelley
62c25af802
add higher level arg-parsing API + misc. changes
...
* add @noInlineCall - see #640
This fixes a crash in --release-safe and --release-fast modes
where the optimizer inlines everything into _start and
clobbers the command line argument data.
If we were able to verify that the user's code never reads
command line args, we could leave off this "no inline"
attribute.
* add i29 and u29 primitive types. u29 is the type of alignment,
so it makes sense to be a primitive.
probably in the future we'll make any `i` or `u` followed by
digits into a primitive.
* add `aligned` functions to Allocator interface
* add `os.argsAlloc` and `os.argsFree` so that you can get
a `[]const []u8`, do whatever arg parsing you want, and then free
it. For now this uses the other API under the hood, but it could
be reimplemented to do a single allocation.
* add tests to make sure command line argument parsing works.
2017-12-06 18:12:05 -05:00
Andrew Kelley
04612d25d7
Merge branch 'master' into self-hosted
2017-12-06 14:58:24 -05:00
Andrew Kelley
249cb2aa30
fix regressions from previous commit
...
c49ee9f632
broke the tests
and this fixes them
2017-12-05 22:39:36 -05:00
Andrew Kelley
f464fe14f4
switch on enum which only has 1 field is comptime known
...
closes #593
2017-12-05 22:26:17 -05:00
Andrew Kelley
bb6b4f8db2
fix enum with 1 member causing segfault
...
closes #647
2017-12-05 22:15:33 -05:00
Andrew Kelley
c49ee9f632
allow union and its tag type to peer resolve to the tag type
2017-12-05 21:33:24 -05:00
Andrew Kelley
2715f6fdb8
allow implicit cast from union to its enum tag type
...
closes #642
2017-12-05 21:10:47 -05:00
Andrew Kelley
b66fb7ceae
revert to master branch ir.cpp, fixes issue better than this branch
2017-12-05 20:51:49 -05:00
Andrew Kelley
6018dbd339
Merge branch 'master' into self-hosted
2017-12-05 20:49:03 -05:00
Andrew Kelley
960914a073
add implicit cast from enum to union
...
when the enum is the tag type of the union and is comptime known
to be of a void field of the union
See #642
2017-12-05 20:46:58 -05:00
Andrew Kelley
63a2f9a8b2
fix casting integer literal to enum
2017-12-05 18:09:22 -05:00
Andrew Kelley
74cea89fce
translate-c: fix not printing clang errors
2017-12-05 12:28:59 -05:00
Andrew Kelley
08d531143f
parser skeleton
2017-12-05 00:20:23 -05:00
Andrew Kelley
3976981ab3
tokenizing hello world
2017-12-04 23:40:33 -05:00
Andrew Kelley
7297baa9c6
tokenizing basic operators
2017-12-04 23:29:39 -05:00
Andrew Kelley
07898cc0df
tokenizing string literals
2017-12-04 23:25:59 -05:00
Andrew Kelley
798dbe487b
simple tokenization
2017-12-04 23:09:03 -05:00
Andrew Kelley
31d9dc3539
read a file
2017-12-04 22:05:27 -05:00
Andrew Kelley
5ebed1c9ee
fix incorrect LLVM IR for union constant when active field is void
...
found in the llvm6 branch with llvm assertions on
2017-12-04 17:10:46 -05:00
Andrew Kelley
a966275e50
rename builtin.is_big_endian to builtin.endian
...
See #307
2017-12-04 10:36:31 -05:00