Andrew Kelley
9017efee22
C ABI: support medium size structs & unions for x86_64 params
...
See #1481
2018-09-07 18:51:34 -04:00
Andrew Kelley
85534a26c6
stage1: function to classify x86_64 abi types
2018-09-07 18:51:34 -04:00
raulgrell
09a1162af5
builtin functions: @byteOffsetOf and @bitOffsetOf
2018-09-07 22:49:19 +01:00
Andrew Kelley
743b2e4afc
add C ABI test for big unions
2018-09-07 13:51:11 -04:00
Andrew Kelley
421ca1523f
stage1: refactor variable inits to use c abi fn walk
2018-09-07 13:24:41 -04:00
Andrew Kelley
c528c00900
stage1: refactor param vars for C ABI
2018-09-07 12:59:59 -04:00
Andrew Kelley
04d7b565f7
stage1: refactor fn type analysis to use C ABI walk fn
2018-09-07 12:23:50 -04:00
Andrew Kelley
be6cccb3a5
stage1: c abi for big struct works
2018-09-07 11:52:57 -04:00
Andrew Kelley
a9a925e500
add C ABI tests
2018-09-06 16:29:35 -04:00
Andrew Kelley
a375bd0d9f
stage1: compile error instead of incorrect code
...
for unimplemented C ABI
See #1411
See #1481
2018-09-06 11:58:58 -04:00
Andrew Kelley
b4d5d4d174
assume evenly divided base64
2018-09-05 23:39:14 -04:00
Andrew Kelley
97c9f61db4
start creating a hash of input parameters
...
See #1416
2018-09-05 23:24:40 -04:00
Andrew Kelley
8400163e02
stage1: rename more TypeTableEntry types to ZigType
2018-09-05 18:42:56 -04:00
Andrew Kelley
1f5c7ff4d7
stage1: rename VariableTableEntry to ZigVar
2018-09-05 18:35:57 -04:00
Andrew Kelley
3500d32db5
stage1: rename FnTableEntry to ZigFn
2018-09-05 18:34:33 -04:00
Andrew Kelley
db882e5d63
stage1: rename TypeTableEntry to ZigType
2018-09-05 18:33:07 -04:00
Andrew Kelley
ffb3b1576b
stage1: fix tagged union with no payloads
...
closes #1478
2018-09-05 16:19:58 -04:00
Andrew Kelley
3e94650ef7
stage1: fix emit asm with explicit output file
...
closes #1473
2018-09-05 10:28:08 -04:00
Andrew Kelley
b35c74ea4c
stage1: use os_path_resolve instead of os_path_real
...
to canonicalize imports.
This means that softlinks can represent different files,
but referencing the same absolute path different ways
still references the same import.
2018-09-04 23:17:38 -04:00
Andrew Kelley
2bf1b6840d
port std.os.path.resolve to stage1
2018-09-04 22:45:20 -04:00
Andrew Kelley
68db9d5074
add compile error for comptime control flow inside runtime block
...
closes #834
2018-09-04 15:28:35 -04:00
Andrew Kelley
f27d82fe90
Merge remote-tracking branch 'origin/master' into llvm7
2018-09-04 12:51:50 -04:00
Andrew Kelley
ff4591f0e6
fix llvm assertion when adding callsite sret attr
2018-09-04 12:15:15 -04:00
Andrew Kelley
dbde8254d0
Merge remote-tracking branch 'origin/master' into llvm7
2018-09-04 11:58:31 -04:00
Andrew Kelley
95636c7e5f
ability to @ptrCast to *void
...
fixes #960
2018-09-03 00:04:12 -04:00
Andrew Kelley
d5968086fe
use the sret attribute at the callsite when appropriate
...
Thanks to Shawn Landden for the original pull request.
closes #1450
2018-09-02 21:08:59 -04:00
Andrew Kelley
f7f11e237c
Merge remote-tracking branch 'origin/master' into llvm7
2018-08-26 02:39:26 -04:00
Andrew Kelley
8047f0eae2
fix llvm assertion failure when building std lib tests for macos
...
closes #1417
2018-08-26 02:36:18 -04:00
Andrew Kelley
7109035b78
Merge remote-tracking branch 'origin/master' into llvm7
2018-08-25 21:57:28 -04:00
Andrew Kelley
815950996d
Merge remote-tracking branch 'origin/master' into macos-stack-traces
2018-08-25 04:48:58 -04:00
Andrew Kelley
02f5a9fa62
fix handling multiple extern vars with the same name
2018-08-25 03:55:59 -04:00
Marc Tiehuis
353419f82d
Default to strict IEEE floating point
...
Closes #1227 .
2018-08-23 22:54:46 +12:00
Andrew Kelley
4b68ef45af
fix incorrectly generating an unused const fn global
...
closes #1277
2018-08-22 14:31:30 -04:00
Andrew Kelley
b48948d6e8
Merge branch 'master' into llvm7
2018-08-04 15:19:03 -04:00
kristopher tate
92cb330e16
src/codegen.cpp: @handle(): replace hacky ref chain with llvm intrinsic;
...
Tracking Issue #1296 ;
2018-08-02 16:50:08 +09:00
kristopher tate
104bdb03d6
src/codegen.cpp: return promise instead of null promise;
...
Tracking Issue #1296 ;
2018-08-02 16:50:08 +09:00
kristopher tate
db362bec18
src/codegen.cpp: reassert that there are no generated errors in codegen;
...
Tracking Issue #1296 ;
Thanks @andrewrk ;
2018-08-02 16:50:08 +09:00
kristopher tate
0ee6502562
src/codegen.cpp: remove add_node_error
from ir_render_handle
;
...
Tracking Issue #1296 ;
Thanks @andrewrk ;
2018-08-02 16:50:08 +09:00
kristopher tate
81f463626a
src/codegen.cpp: add/throw error for @handle() in a non async context;
...
Tracking Issue #1296 ;
I removed/commented-out the assert checking for no errors since we now have some errors rendered.
2018-08-02 16:50:08 +09:00
kristopher tate
a2e5691228
src/codegen.cpp: return null if calling convention is not async;
...
Tracking Issue #1296 ;
2018-08-02 16:50:08 +09:00
kristopher tate
cd18186715
src/codegen.cpp: base handle builtin on @frameAddress()
;
...
Tracking Issue #1296 ;
2018-08-02 16:50:08 +09:00
Andrew Kelley
dd9728c5a0
Merge remote-tracking branch 'origin/master' into llvm7
2018-07-24 00:43:12 -04:00
Andrew Kelley
a9f0681f85
prevent non-export symbols from clobbering builtins
...
closes #1263
2018-07-19 10:47:17 -04:00
Jimmi Holst Christensen
fd3a41dadc
Allow pointers to anything in extern/exported declarations ( #1258 )
...
* type_allowed_in_extern accepts all ptr not size 0
* Generate correct headers for none extern structs/unions/enums
2018-07-18 11:00:42 -04:00
Andrew Kelley
558b0b8791
Merge remote-tracking branch 'origin/master' into llvm7
2018-07-16 13:37:16 -04:00
Andrew Kelley
d3ce9d0643
codegen: remove unused variable
2018-07-16 11:59:37 -04:00
Andrew Kelley
e9a03cccf3
all integer sizes are available as primitives
...
* fix wrong implicit cast for `@IntType` bit_count parameter.
* fix incorrect docs for `@IntType` bit_count parameter.
closes #1242
closes #745
closes #1240
2018-07-16 10:53:15 -04:00
Andrew Kelley
4d920cee6e
Merge remote-tracking branch 'origin/master' into llvm7
2018-07-14 18:27:51 -04:00
Eduardo Sánchez Muñoz
722b9b9e59
codegen: Store returned value if type is 'handle_is_ptr' and function is not 'first_arg_ret'.
...
Seems to fix #1230 , includes test.
2018-07-14 11:33:01 -04:00
Andrew Kelley
5354d1f5fc
allow == for comparing optional pointers
...
closes #658
2018-07-13 12:34:42 -04:00