Skip to content

Instantly share code, notes, and snippets.

@marciok
Last active January 27, 2016 21:44
Show Gist options
  • Select an option

  • Save marciok/301af424244d65f81fd3 to your computer and use it in GitHub Desktop.

Select an option

Save marciok/301af424244d65f81fd3 to your computer and use it in GitHub Desktop.
/**
* Multi line comments were added by me (Marcio) the single lines were added by swiftc
**/
sil_stage raw
import Builtin
import Swift
import SwiftShims
// main
sil @main : $@convention(c) (Int32, UnsafeMutablePointer<UnsafeMutablePointer<Int8>>) -> Int32 {
bb0(%0 : $Int32, %1 : $UnsafeMutablePointer<UnsafeMutablePointer<Int8>>):
/**
* ......
**/
+ %12 = function_ref @pony.Pony.genus (pony.Pony)() -> Swift.String : $@convention(method) (@guaranteed Pony) -> @owned String // user: %16
// function_ref pony.Pony.__allocating_init (pony.Pony.Type)() -> pony.Pony
%12 = function_ref @pony.Pony.__allocating_init (pony.Pony.Type)() -> pony.Pony : $@convention(thin) (@thick Pony.Type) -> @owned Pony // user: %14
%13 = metatype $@thick Pony.Type // user: %14
%14 = apply %12(%13) : $@convention(thin) (@thick Pony.Type) -> @owned Pony // users: %15, %16, %17
- %15 = class_method %14 : $Pony, #Pony.genus!1 : Pony -> () -> String , $@convention(method) (@guaranteed Pony) -> @owned String // user: %16
%16 = apply %15(%14) : $@convention(method) (@guaranteed Pony) -> @owned String // user: %18
/**
* ......
**/
}
/**
* .....
**/
sil_vtable Pony {
- #Pony.genus!1: pony.Pony.genus (pony.Pony)() -> Swift.String // pony.Pony.genus (pony.Pony)() -> Swift.String
#Pony.deinit!deallocator: pony.Pony.__deallocating_deinit // pony.Pony.__deallocating_deinit
#Pony.init!initializer.1: pony.Pony.init (pony.Pony.Type)() -> pony.Pony // pony.Pony.init (pony.Pony.Type)() -> pony.Pony
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment