Created
February 21, 2016 02:17
-
-
Save gregomni/3fdf53b2c5bdb9f621ab to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// c.thingy (c.Foo) -> Swift.String | |
sil hidden @_TF1c6thingyFOS_3FooSS : $@convention(thin) (@owned Foo) -> @owned String { | |
// %0 // users: %1, %5, %6, %94 | |
bb0(%0 : $Foo): | |
debug_value %0 : $Foo, let, name "arg", argno 1 // id: %1 | |
%2 = alloc_box $String, var, name "r" // users: %3, %93 | |
%3 = project_box %2 : $@box String // user: %4 | |
%4 = mark_uninitialized [var] %3 : $*String // users: %79, %89, %91 | |
retain_value %0 : $Foo // id: %5 | |
switch_enum %0 : $Foo, case #Foo.A!enumelt.1: bb1, case #Foo.B!enumelt.1: bb2, case #Foo.C!enumelt.1: bb4 // id: %6 | |
// %7 // users: %8, %9 | |
bb1(%7 : $(String, Int)): // Preds: bb0 | |
%8 = tuple_extract %7 : $(String, Int), 0 // users: %10, %12 | |
%9 = tuple_extract %7 : $(String, Int), 1 // users: %11, %12 | |
debug_value %8 : $String, let, name "s" // id: %10 | |
debug_value %9 : $Int, let, name "i" // id: %11 | |
br bb3(%8 : $String, %9 : $Int) // id: %12 | |
// %13 // users: %14, %15, %16 | |
bb2(%13 : $(Int, String, String)): // Preds: bb0 | |
%14 = tuple_extract %13 : $(Int, String, String), 0 // users: %17, %20 | |
%15 = tuple_extract %13 : $(Int, String, String), 1 // user: %19 | |
%16 = tuple_extract %13 : $(Int, String, String), 2 // users: %18, %20 | |
debug_value %14 : $Int, let, name "i" // id: %17 | |
debug_value %16 : $String, let, name "s" // id: %18 | |
release_value %15 : $String // id: %19 | |
br bb3(%16 : $String, %14 : $Int) // id: %20 | |
// %21 // users: %45, %46, %80 | |
// %22 // user: %64 | |
bb3(%21 : $String, %22 : $Int): // Preds: bb1 bb2 | |
// function_ref Swift.String.init (stringInterpolation : Swift.Array<Swift.String>...) -> Swift.String | |
%23 = function_ref @_TFSSCft19stringInterpolationGSaSS__SS : $@convention(thin) (@owned Array<String>, @thin String.Type) -> @owned String // user: %78 | |
%24 = metatype $@thin String.Type // user: %78 | |
%25 = integer_literal $Builtin.Word, 5 // user: %27 | |
// function_ref Swift._allocateUninitializedArray <A> (Builtin.Word) -> (Swift.Array<A>, Builtin.RawPointer) | |
%26 = function_ref @_TFs27_allocateUninitializedArrayurFBwTGSax_Bp_ : $@convention(thin) <τ_0_0> (Builtin.Word) -> @owned (Array<τ_0_0>, Builtin.RawPointer) // user: %27 | |
%27 = apply %26<String>(%25) : $@convention(thin) <τ_0_0> (Builtin.Word) -> @owned (Array<τ_0_0>, Builtin.RawPointer) // users: %28, %29 | |
%28 = tuple_extract %27 : $(Array<String>, Builtin.RawPointer), 0 // user: %78 | |
%29 = tuple_extract %27 : $(Array<String>, Builtin.RawPointer), 1 // user: %30 | |
%30 = pointer_to_address %29 : $Builtin.RawPointer to $*String // users: %40, %42, %49, %61, %67 | |
// function_ref Swift.String.init (stringInterpolationSegment : Swift.String) -> Swift.String | |
%31 = function_ref @_TFSSCfT26stringInterpolationSegmentSS_SS : $@convention(thin) (@owned String, @thin String.Type) -> @owned String // user: %39 | |
%32 = metatype $@thin String.Type // user: %39 | |
// function_ref Swift.String.init (_builtinStringLiteral : Builtin.RawPointer, byteSize : Builtin.Word, isASCII : Builtin.Int1) -> Swift.String | |
%33 = function_ref @_TFSSCfT21_builtinStringLiteralBp8byteSizeBw7isASCIIBi1__SS : $@convention(thin) (Builtin.RawPointer, Builtin.Word, Builtin.Int1, @thin String.Type) -> @owned String // user: %38 | |
%34 = metatype $@thin String.Type // user: %38 | |
%35 = string_literal utf8 "" // user: %38 | |
%36 = integer_literal $Builtin.Word, 0 // user: %38 | |
%37 = integer_literal $Builtin.Int1, -1 // user: %38 | |
%38 = apply %33(%35, %36, %37, %34) : $@convention(thin) (Builtin.RawPointer, Builtin.Word, Builtin.Int1, @thin String.Type) -> @owned String // user: %39 | |
%39 = apply %31(%38, %32) : $@convention(thin) (@owned String, @thin String.Type) -> @owned String // user: %40 | |
store %39 to %30 : $*String // id: %40 | |
%41 = integer_literal $Builtin.Word, 1 // user: %42 | |
%42 = index_addr %30 : $*String, %41 : $Builtin.Word // user: %47 | |
// function_ref Swift.String.init (stringInterpolationSegment : Swift.String) -> Swift.String | |
%43 = function_ref @_TFSSCfT26stringInterpolationSegmentSS_SS : $@convention(thin) (@owned String, @thin String.Type) -> @owned String // user: %46 | |
%44 = metatype $@thin String.Type // user: %46 | |
retain_value %21 : $String // id: %45 | |
%46 = apply %43(%21, %44) : $@convention(thin) (@owned String, @thin String.Type) -> @owned String // user: %47 | |
store %46 to %42 : $*String // id: %47 | |
%48 = integer_literal $Builtin.Word, 2 // user: %49 | |
%49 = index_addr %30 : $*String, %48 : $Builtin.Word // user: %59 | |
// function_ref Swift.String.init (stringInterpolationSegment : Swift.String) -> Swift.String | |
%50 = function_ref @_TFSSCfT26stringInterpolationSegmentSS_SS : $@convention(thin) (@owned String, @thin String.Type) -> @owned String // user: %58 | |
%51 = metatype $@thin String.Type // user: %58 | |
// function_ref Swift.String.init (_builtinStringLiteral : Builtin.RawPointer, byteSize : Builtin.Word, isASCII : Builtin.Int1) -> Swift.String | |
%52 = function_ref @_TFSSCfT21_builtinStringLiteralBp8byteSizeBw7isASCIIBi1__SS : $@convention(thin) (Builtin.RawPointer, Builtin.Word, Builtin.Int1, @thin String.Type) -> @owned String // user: %57 | |
%53 = metatype $@thin String.Type // user: %57 | |
%54 = string_literal utf8 "" // user: %57 | |
%55 = integer_literal $Builtin.Word, 0 // user: %57 | |
%56 = integer_literal $Builtin.Int1, -1 // user: %57 | |
%57 = apply %52(%54, %55, %56, %53) : $@convention(thin) (Builtin.RawPointer, Builtin.Word, Builtin.Int1, @thin String.Type) -> @owned String // user: %58 | |
%58 = apply %50(%57, %51) : $@convention(thin) (@owned String, @thin String.Type) -> @owned String // user: %59 | |
store %58 to %49 : $*String // id: %59 | |
%60 = integer_literal $Builtin.Word, 3 // user: %61 | |
%61 = index_addr %30 : $*String, %60 : $Builtin.Word // user: %65 | |
// function_ref Swift.String.init (stringInterpolationSegment : Swift.Int) -> Swift.String | |
%62 = function_ref @_TFSSCfT26stringInterpolationSegmentSi_SS : $@convention(thin) (Int, @thin String.Type) -> @owned String // user: %64 | |
%63 = metatype $@thin String.Type // user: %64 | |
%64 = apply %62(%22, %63) : $@convention(thin) (Int, @thin String.Type) -> @owned String // user: %65 | |
store %64 to %61 : $*String // id: %65 | |
%66 = integer_literal $Builtin.Word, 4 // user: %67 | |
%67 = index_addr %30 : $*String, %66 : $Builtin.Word // user: %77 | |
// function_ref Swift.String.init (stringInterpolationSegment : Swift.String) -> Swift.String | |
%68 = function_ref @_TFSSCfT26stringInterpolationSegmentSS_SS : $@convention(thin) (@owned String, @thin String.Type) -> @owned String // user: %76 | |
%69 = metatype $@thin String.Type // user: %76 | |
// function_ref Swift.String.init (_builtinStringLiteral : Builtin.RawPointer, byteSize : Builtin.Word, isASCII : Builtin.Int1) -> Swift.String | |
%70 = function_ref @_TFSSCfT21_builtinStringLiteralBp8byteSizeBw7isASCIIBi1__SS : $@convention(thin) (Builtin.RawPointer, Builtin.Word, Builtin.Int1, @thin String.Type) -> @owned String // user: %75 | |
%71 = metatype $@thin String.Type // user: %75 | |
%72 = string_literal utf8 "" // user: %75 | |
%73 = integer_literal $Builtin.Word, 0 // user: %75 | |
%74 = integer_literal $Builtin.Int1, -1 // user: %75 | |
%75 = apply %70(%72, %73, %74, %71) : $@convention(thin) (Builtin.RawPointer, Builtin.Word, Builtin.Int1, @thin String.Type) -> @owned String // user: %76 | |
%76 = apply %68(%75, %69) : $@convention(thin) (@owned String, @thin String.Type) -> @owned String // user: %77 | |
store %76 to %67 : $*String // id: %77 | |
%78 = apply %23(%28, %24) : $@convention(thin) (@owned Array<String>, @thin String.Type) -> @owned String // user: %79 | |
assign %78 to %4 : $*String // id: %79 | |
release_value %21 : $String // id: %80 | |
br bb5 // id: %81 | |
bb4(%82 : $Int): // Preds: bb0 | |
// function_ref Swift.String.init (_builtinStringLiteral : Builtin.RawPointer, byteSize : Builtin.Word, isASCII : Builtin.Int1) -> Swift.String | |
%83 = function_ref @_TFSSCfT21_builtinStringLiteralBp8byteSizeBw7isASCIIBi1__SS : $@convention(thin) (Builtin.RawPointer, Builtin.Word, Builtin.Int1, @thin String.Type) -> @owned String // user: %88 | |
%84 = metatype $@thin String.Type // user: %88 | |
%85 = string_literal utf8 "c" // user: %88 | |
%86 = integer_literal $Builtin.Word, 1 // user: %88 | |
%87 = integer_literal $Builtin.Int1, -1 // user: %88 | |
%88 = apply %83(%85, %86, %87, %84) : $@convention(thin) (Builtin.RawPointer, Builtin.Word, Builtin.Int1, @thin String.Type) -> @owned String // user: %89 | |
assign %88 to %4 : $*String // id: %89 | |
br bb5 // id: %90 | |
bb5: // Preds: bb3 bb4 | |
%91 = load %4 : $*String // users: %92, %95 | |
retain_value %91 : $String // id: %92 | |
strong_release %2 : $@box String // id: %93 | |
release_value %0 : $Foo // id: %94 | |
return %91 : $String // id: %95 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment