- DMD
$ dmd --version
DMD64 D Compiler v2.074.0
Copyright (c) 1999-2017 by Digital Mars written by Walter Bright
$ dmd -O -c hoge.d
$ objdump -Mintel -d hoge.o
...
b: 49 89 fd mov r13,rdi| $ spin -a lock.spin | |
| $ gcc -o pan pan.c | |
| $ ./pan | |
| (Spin Version 6.4.6 -- 2 December 2016) | |
| + Partial Order Reduction | |
| Full statespace search for: | |
| never claim - (none specified) | |
| assertion violations + |
$ dmd --version
DMD64 D Compiler v2.074.0
Copyright (c) 1999-2017 by Digital Mars written by Walter Bright
$ dmd -O -c hoge.d
$ objdump -Mintel -d hoge.o
...
b: 49 89 fd mov r13,rdi| import core.sys.linux.epoll; | |
| import std.stdio; | |
| import core.stdc.errno; | |
| import std.exception : errnoEnforce; | |
| void main() | |
| { | |
| epoll_event event; | |
| event.events = EPOLLIN; | |
| auto epfd = epoll_create1(EPOLL_CLOEXEC); |
| module parser; | |
| import lexer : Lexer, Token, TokenType; | |
| class ParserError : Exception | |
| { | |
| public: | |
| this(string message, | |
| string file =__FILE__, |
| import std.stdio : writeln; | |
| class Company | |
| { | |
| Employee[] employees; | |
| auto opOpAssign(string op)(Employee employee) if (op == "~") | |
| { | |
| employees ~= employee; | |
| } |
| # emacsキーバインドを使用 | |
| bindkey -e | |
| setopt ignore_eof | |
| # 補完 | |
| setopt COMPLETE_IN_WORD | |
| # コピペ時PROMPTを消す | |
| setopt TRANSIENT_RPROMPT |
| uint inner_nqueen(int all_bits, int left, int depth, int right) pure nothrow @safe @nogc | |
| { | |
| int results, bitmap = ~(left | depth | right) & all_bits; | |
| while (bitmap != 0) { | |
| int last_bit = -bitmap & bitmap; | |
| bitmap ^= last_bit; | |
| results += inner_nqueen(all_bits, (left | last_bit) << 1, depth | last_bit, (right | last_bit) >> 1); | |
| } | |
| return results + (depth == all_bits ? 1 : 0); | |
| } |
| package main | |
| import "fmt" | |
| var noEscape = [256]bool{ | |
| 'A': true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, | |
| 'a': true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, | |
| '0': true, true, true, true, true, true, true, true, true, true, | |
| '-': true, | |
| '.': true, |
| RUBY := ruby | |
| RUBY_CFLAGS := $(shell $(RUBY) -e "puts RbConfig::CONFIG['rubyhdrdir'] + ' -I' + RbConfig::CONFIG['rubyarchhdrdir']") | |
| RUBY_LDFLAGS := $(shell $(RUBY) -e "puts '-L' + RbConfig::CONFIG['rubylibdir']") | |
| CGO_LDFLAGS := "$(RUBY_LDFLAGS)" | |
| CGO_CFLAGS := "-I$(RUBY_CFLAGS)" | |
| # default to gc, but allow caller to override on command line | |
| GO_COMPILER:=$(GC) | |
| ifeq ($(GO_COMPILER),) |
| import std.algorithm, std.conv, std.stdio, std.string; | |
| void main() { | |
| string[] arr = stdin.readln.strip.split(" "); | |
| int num = arr[0].to!int; | |
| int days = arr[1].to!int; | |
| int[] prices; |