Upgrade to Pro — share decks privately, control downloads, hide ads and more …

SwiftのDemanglerを書く @ わいわいswiftc番外編

ukitaka
December 15, 2018

SwiftのDemanglerを書く @ わいわいswiftc番外編

ukitaka

December 15, 2018
Tweet

More Decks by ukitaka

Other Decks in Programming

Transcript

  1. Swift Demangler workshop ՝୊1 global ::= entity entity ::= context

    entity-spec context ::= module module ::= identifier $S13ExampleNumber6isEven6numberSbSi_tF global
  2. Swift Demangler workshop ՝୊1 global ::= entity entity ::= context

    entity-spec context ::= module module ::= identifier $S13ExampleNumber6isEven6numberSbSi_tF global entity
  3. Swift Demangler workshop ՝୊1 global ::= entity entity ::= context

    entity-spec context ::= module module ::= identifier $S13ExampleNumber6isEven6numberSbSi_tF context entity-spec module
  4. Swift Demangler workshop ՝୊1 entity-spec ::= decl-name label-list function-signature 'F'

    function-signature ::= params-type params-type throws? label-list ::= empty-list label-list ::= ('_' | identifier)* throws ::= 'K' params-type ::= type decl-name ::= identifier identifier ::= NATURAL IDENTIFIER-STRING $S13ExampleNumber6isEven6numberSbSi_tF decl-name label-list function-signature