Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
SwiftコンパイラにContributeする
Search
freddi(Yuki Aki)
September 30, 2020
2
350
SwiftコンパイラにContributeする
freddi(Yuki Aki)
September 30, 2020
Tweet
Share
More Decks by freddi(Yuki Aki)
See All by freddi(Yuki Aki)
輝け俺のViewController 〜海外iOSカンファレンス登壇編〜
freddi
4
180
Deep Dive into "any" and "some"
freddi
3
1.3k
挑戦!ISUCON de Server-side Swift 〜タイムゾーンには気をつけろ〜
freddi
0
1.3k
意外と知られてないXcode13の新しい参照カウンタ最適化オプションの挙動
freddi
2
95
How to develop SIL Optimizer in Swift Language
freddi
0
270
SwiftコンパイラがSwiftで開発できるようになる話
freddi
3
550
知ろう! ShazamKit
freddi
1
160
Swift Optimizing at Compiler World
freddi
1
720
Recap Pointfree Vol. 1~3
freddi
1
760
Featured
See All Featured
KATA
mclloyd
29
13k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
9
680
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
250
21k
GraphQLとの向き合い方2022年版
quramy
43
13k
Bash Introduction
62gerente
608
210k
Unsuck your backbone
ammeep
668
57k
A Tale of Four Properties
chriscoyier
156
23k
Writing Fast Ruby
sferik
626
61k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
246
1.3M
Build The Right Thing And Hit Your Dates
maggiecrowley
32
2.4k
Rebuilding a faster, lazier Slack
samanthasiow
79
8.6k
Building Better People: How to give real-time feedback that sticks.
wjessup
363
19k
Transcript
4XJGUίϯύΠϥʹ $POUSJCVUF͢Δ·Ͱ Swift愛好会 Vol. 54 "QQMF͕։ൃͨ͠ΦʔϓϯιʔεͳίϯύΠϥʹߩݙ͢Δ GSFEEJ <ొஃऀ> ͔ΜͨΜͳ 4XJGUͷਂ͍ϨΠϠʔͷಡΈา͖ํ
4XJGU*OUFSNFEJBUF-BOHVBHFɹɹ4*-0QUJNJ[FS
GSFEEJ ొஃऀ ʹ͍ͭͯ ΠΩϦJ04&OHJOFFS
ࠓॳ৺ऀ͚ͷίϯύΠϥͷ ͕$POUSJCVUF͢Δ·ͰʹͲΜͳ͜ͱ͔ͬͨ w Ͳ͏͍͏ࣝΛಘ͔ͨ w Ͳ͏͍͏ΞΫγϣϯΛ͔ͨ͠
୯ೖʹݴ͑ 4XJGUίϯύΠϥʹ$POUSJCVUF͠·ͨ͠ w IUUQTHJUIVCDPNBQQMFTXJGUQVMM w IUUQTHJUIVCDPNBQQMFTXJGUQVMM
ԿΛ$POUSJCVUFͨ͠ͷʁ Ұͭ%PDTͷϛεͷగਖ਼ w 4XJGUͷதؒදݱͷ(SBNNFS͕ϛεͬͯͨ ͏Ұͭ࠷దԽϩδοΫͷόά w ੲɺొஃࢿྉ࡞ͬͯͨͱ͖ۮવݟ͚ͭͨͭ
ͱ͍͏Θ͚Ͱ4XJGU$POUSJCVUPSσϏϡʔ 4XJGUίϯύΠϥͷษڧࣗମڈ͔Β w ίϯύΠϥશൠͷษڧͬͯͨ w ͦͬͪʹཱ͔ͬͨඍົ
4XJGUίϯύΠϥͷษڧʹ͍ͭͯ ׂ̑͘Β͍ಠֶͰͬͨ ׂ̑͘Β͍Θ͍Θ͍TXJGUDͱ͔Ͱษڧ w ݄̍ͷ4XJGUίϯύΠϥͷษڧձ w աڈͷษڧձͷࢿྉಡΜͩΓ w ؔ࿈͢ΔํͷࢿྉΛಡΜͩΓ
ϞνϕͬͯԿʁ తح৺ͷෝ͘··ʹ͍ͬͯΔ w ͕ΒதϞνϕ͋ΔΘ͚Ͱͳ͍ ࣄͰ4XJGU͍ͬͯΔਂ͘Γ͍͔ͨΒ ͋ͱͦͷࣝͰΈΜͳͱΘ͍Θ͍͢Δͷָ͍͠
4XJGUίϯύΠϥͷೖͱ͍͑ ͜ͷίϯύΠϥͷϑϩʔਤ w ίϯύΠϥΔͱͷإΑΓݟΔӋʹͳΔ
4XJGUίϯύΠϥͷೖͱ͍͑ 4XJGU*OUFSNFEJBUF-BOHVBHF͔Β w 4XJGUͷதؒදݱݴޠ
4XJGU*OUFSNFEJBUF-BOHVBHF 4XJGUͷಛ༗ͷதؒදݱ w ௨শ4*- ίʔυΛநߏจʢ"45ʣʹͨ͠ޙͷϑΣʔζ 3VTUʹಉ͡Α͏ͳதؒදݱ͕͋Δ
ͳͥ4*-͔Βͳͷ͔ TXJGUDͷίʔυҾͬுΒΜ͍͍ͯ͘ 4*-͓खݩͰ͔ΜͨΜʹੜͰ͖Δ 4*-Λ࠷దԽ͢ΔίϯύΠϥͷίʔυಡΈ͍͢ w TXJGUDͷதͰൺֱతͱ͍͏ҙຯ ຊਓ͕Α͘4*-Λղઆ͍ͯ͠ΔͷͰจݙ๛
4XJGU͔Β4*-Λੜ͢Δ w ҎԼͷίϚϯυͰมͰ͖Δ swiftc -emit-sil hello.swift -o hello.sil w ҎԼͷίʔυΛม͑ͯΈΔ
print(“Hello SIL!”)
ಡΊͳ͍ɾɾɾʁ
Ͱେৎ LJUBTVLF͞Μͱ͍͏ํ͕ղઆ͍ͯ͠Δ IUUQTXXXTMJEFTIBSFOFULJUBTVLFTJMGPSpSTUUJNFMFBOFST
Ͱେৎ LJUBTVLF͞Μͱ͍͏ํ͕ຊΛॻ͍͍ͯΔ IUUQTLJUBTVLFCPPUIQNJUFNT
ͷ4*-ͷษڧ๏ ͖ͬ͞հͨ͠ຊͱࢿྉಡΈړͬͨ ͍ΖΜͳ4XJGUίʔυΛ4*-ʹͯ͠ಡΜͩ 4*-ͷߏΛཧղͨ͠
ͷ4*-ͷษڧ๏ 4*-͕ಡΊΔΑ͏ʹͳͬͨ ͢Δͱ4*-0QUJNJ[FS͕ಡΊΔΑ͏ʹͳΔ͜ͱʹؾͮ͘
4*-0QUJNJ[FS ͖ͬ͞ͷ4*-Λ࠷దԽ͢ΔίϯύΠϥͷϞδϡʔϧ 4XJGUಛ༗ͷ࠷దԽΛߦ͏
4*-0QUJNJ[FSʹؔͯ͠ ͜ͷຊ͕ࢀߟʹͳΔ IUUQTLJUBTVLFCPPUIQNJUFNT
࣍4*-0QUJNJ[FS ͜ͷ͜Ζ͔ΒࣗͰίϯύΠϥΛHJUDMPOFͨ͠ ίϯύΠϥͷίʔυΛ࿔ͬͯࣗͷ0QUJNJ[FS࡞ͬͨ
4*-0QUJNJ[FSͷษڧ ͦͷ࣌ͷͷղઆಈը͕͜Ε IUUQTXXXZPVUVCFDPNXBUDI W2#9D$5GXZ;
࣍0QUJNJ[FSͷதͷΈ͕ؾʹͳΔ ʮ෭࡞༻ͷ͋ΔίʔυʯΛൃݟ͢ΔΈ w ͜Ε͕ؾʹͳΓ͗ͯ͢͠ΐ͏͕ͳ͍ͷͰௐࠪ
ʮ෭࡞༻ͷ͋ΔίʔυʯΛൃݟ͢ΔΈ ΜͰ͜Εʹ͍ͭͯొஃ IUUQTTQFBLFSEFDLDPNGSFEEJNBZIBWFTJEFF⒎FDU
͜ͷௐࠪΛ௨ͯ͡ۮવόάΛݟ͚ͭΔ ͦΕ͕͖ͬ͞ͷ̎ͭͷBQQMFTXJGUͷ13 ҙ֎ͳͱ͜Ζͷௐ͕͖͔͚ࠪͬͯ$POUSJCVUF
͑ɺ$POUSJCVUFͨ͠ͷӡήʔ͡ΌΜ ͦ͏Ͱͳ͍ؾ͕͢Δ w (JUIVCʹ͋Δެࣜͷ4*-ͷղઆΨόΨό w '*9.&ͱ͔ҙ֎ͱࢸΔͱ͜Ζʹ͋Δ w νϟϯϨϯδͷՄೳੑແݶେ
$POUSJCVUFνϟϯεɺଞʹʁ IUUQTCVHTTXJGUPSHͱ͔όάใࠂͨ͘͞Μ͋Δ
͓લͷೖͬ͘͟Γ͗ͯ͢͠Θ͔ΒΜ LJUBTVLF͞Μ͕ຊΛ SZ IUUQTLJUBTVLFCPPUIQNJUFNT
ࣗ৴͕͍ͭͯདྷͯɺࣗ৴͕ͳͯ͘ Θ͍Θ͍TXJGUDʹࢀՃͯ͠Ͷʂొஃେܴ IUUQTJPTEJTDPSEDPOOQBTTDPN
·ͱΊ 4XJGUίϯύΠϥҙ֎ͱೖ͍͢͠Α Θ͍Θָ͍͘͠ษڧ͢Δͱ͍͔ͭ$POUSJCVUFͰ͖ΔΑ Θ͍Θ͍TXJGUDੋඇࢀՃͯ͠Ͷʢొஃʂʣ