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
360
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
190
Deep Dive into "any" and "some"
freddi
3
1.3k
挑戦!ISUCON de Server-side Swift 〜タイムゾーンには気をつけろ〜
freddi
0
1.3k
意外と知られてないXcode13の新しい参照カウンタ最適化オプションの挙動
freddi
2
97
How to develop SIL Optimizer in Swift Language
freddi
0
280
SwiftコンパイラがSwiftで開発できるようになる話
freddi
3
550
知ろう! ShazamKit
freddi
1
160
Swift Optimizing at Compiler World
freddi
1
730
Recap Pointfree Vol. 1~3
freddi
1
760
Featured
See All Featured
Documentation Writing (for coders)
carmenintech
65
4.4k
Large-scale JavaScript Application Architecture
addyosmani
510
110k
Code Review Best Practice
trishagee
64
17k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
31
2.7k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
6
430
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
38
1.8k
Build The Right Thing And Hit Your Dates
maggiecrowley
33
2.4k
Building Applications with DynamoDB
mza
90
6.1k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
364
24k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
131
33k
Measuring & Analyzing Core Web Vitals
bluesmoon
4
130
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
226
22k
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ੋඇࢀՃͯ͠Ͷʢొஃʂʣ