首页
首页
沸点
课程
直播
活动
竞赛
商城
APP
插件
搜索历史
清空
创作者中心
写文章
发沸点
写笔记
写代码
草稿箱
创作灵感
查看更多
会员
登录
注册
Swift编译器
KeithTsui
创建于2021-05-18
订阅专栏
深入浅出地研习Swift编译器
暂无订阅
共20篇文章
创建于2021-05-18
订阅专栏
默认顺序
默认顺序
最早发布
最新发布
Y Combinator in Swift
Some use of Y Combinator in Swift. And other Combinators K, S, I.
Co-inductive Type operator in Swift
co-inductive type in Swift, which is somewhat impossible (but not really).
WTSC 13: Code Emission
Thisisthefinalstageforcompilingasourcefiletoanobjectoranassemblyfile.Inpreviouspost,wegotamodulecons
WTSC 12: Register Allocation - Fast Register Allocator
AfterwegetMachineInstructions,MachineInstrs,thecompilerwilloptimizeittoproduceOptimizedMachineInstrs
WTSC 11: Instruction Selection - SelectionDAG
TherearethreewaystodoInstructionSelection,SelectionDAG-based,Fast-ISel,andGlobalInstructionSelection
WTSC 10: LLVM IR Generation
Inpreviouspost,wehavegotthecanonicalSIL,soitistimetolowerSILandtogenerateLLVMIR.Inthispost,theresult
WTSC 9: SIL Optimizations
Inpreviouspost,wegettherawsilofourhelloworldexample.Inthispost,wegoontogetthecanonicalsilfromthatraw
WTSC 8: SIL Generation
Inpreviouspost,WTSC7:SemanticAnalysis,wehavegettheType-annotatedASTforourhelloworldexampleshowasfoll
WTSC 7: Semantic Analysis
InpreviousPaserpost,wegettheASTofourhelloworldexampleasfollowing:Andourhelloworldexamplelookslikethi
WTSC 6: Parser
Fromthesetwoquotationsabove,weknowthatthereisagrammarforswiftprogramminglanguage,andarecursive-desce
WTSC 5: Lexer
With-driver-print-jobsoptiontoswiftc,wecanseeeachjobneedtobeendownbeforewegetthefinalexecutablebinar
WTSC 4.4 Schedule, Batch and Execute
Afterwegetthejobs,thecompilationisgoingtopeformtheminitsswift::driver::Compilation::performJobsmetho
WTSC 4.3 Build: Translating Actions into Jobs using a Toolchain
Inthepreviouspost,weknowhowthecompilerdriverconstructactions,afterthat,itwillcalltheswift::Driver::b
WTSC 4.2 Pipeline: Converting Args into Actions
Inpreviouspost,weknowhowtheswiftcompilerreceviesitsargumentinllvm::opt::InputArgListfromcommandline.
WTSC 4.1 Parse: Option parsing
Weneedsometermsbeforewemoveonintooptionparsing.Whatarecommandline,command,option,argument?Asweknow,w
WTSC 4: Compiler Driver
TheSwiftCompilerdoessomethingmorethantransformingsourcecodeintoexecutableorlibraries.Itneedstointera
WTSC 3: Build System
PreviousonSetupplayground,wefollowinstructionsfromswiftopensourceprojecttobuildanswiftcompilerasanex
WTSC 2: Setup playground
BeforewegetintothecoreprocessofcompilationofSwiftCompiler,weneedsomesetupsforourplaygroundwhichfacil
WTSC 1: Overview of the Swift Compiler
ThefollowingdiagramshowstheoverviewcomponentsofSwiftcompiler.Agreyblockindicatesananctionwhichtransf
WTSC 0: Plan for Walk Through the Swift Compiler
Purpose:ItisforabeginnerwhosomehowknowaboutprogrammingandcompilertoknowhowtheSwiftcompilerworks.Inot