Created
September 29, 2014 03:57
-
-
Save waywardmonkeys/8415fedcbf68cd4292cf to your computer and use it in GitHub Desktop.
inliner bug
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Module: int | |
Synopsis: | |
Author: | |
Copyright: | |
define inline function exit(#key s :: one-of(#"a", #"b") = #"a") | |
let status = | |
if (s = #"a") | |
0 | |
elseif (s == #"b") | |
1 | |
end if; | |
%call-c-function ("exit") | |
(status :: <raw-c-signed-long>) => (nothing :: <raw-c-void>) | |
(integer-as-raw(status)) | |
end; | |
end; | |
define function main | |
(name :: <string>, arguments :: <vector>) | |
format-out("Hello, world!\n"); | |
exit(); | |
end function main; | |
main(application-name(), application-arguments()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Library: int | |
Files: library | |
int |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Module: dylan-user | |
define library int | |
use dylan; | |
use common-dylan; | |
use io; | |
end library int; | |
define module int | |
use common-dylan; | |
use format-out; | |
use dylan-direct-c-ffi; | |
export exit, main; | |
end module int; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment