Commit Graph

11 Commits

Author SHA1 Message Date
Slava Pestov
2e5aef9c8d stdlib: Remove redundant @usableFromInline attributes 2018-04-06 00:02:30 -07:00
Slava Pestov
e1f50b2d36 SE-0193: Rename @_inlineable to @inlinable, @_versioned to @usableFromInline 2018-03-30 21:55:30 -07:00
Slava Pestov
a07e991093 SILOptimizer: Fix string switch optimization with resilient stdlib
Progress on <rdar://problem/34794790>, but since the build started failing
some other things broke.
2017-10-26 23:58:50 -07:00
Slava Pestov
c272d41e2f Re-apply "SIL: Remove special meaning for @_semantics("stdlib_binary_only")"
With -sil-serialize-all gone, this no longer means anything; just
don't declare the function as @_inlineable instead.

Fixes <rdar://problem/34564380>.
2017-10-04 14:07:52 -07:00
Jordan Rose
aab5f7aa4f Revert "SIL: Remove special meaning for @_semantics("stdlib_binary_only")" (#12270)
It still affects StdlibUnittest, which is still using -sil-serialize-all.
2017-10-04 12:49:21 -07:00
Slava Pestov
0fad13eeba SIL: Remove special meaning for @_semantics("stdlib_binary_only")
With -sil-serialize-all gone, this no longer means anything; just
don't declare the function as @_inlineable instead.

Fixes <rdar://problem/34564380>.
2017-10-03 13:48:22 -07:00
Max Moiseev
a24998a5b1 [stdlib] Add missing @_fixed_layout attributes to fix resilience build 2017-10-02 15:19:06 -07:00
Maxim Moiseev
98b875a6e5 Fix compilation errors 2017-09-29 11:26:56 -07:00
Max Moiseev
ef6b5c4795 Add missing @_inlineable attributes and deinits 2017-09-29 11:26:56 -07:00
Erik Eckstein
ba1a5f9cae Produce more efficient code for the init(rawValue: String) constructor of string enums, part 2.
Use a dictionary for string lookup, which is initialized the first time the constructor is called.
This is more efficient than just iterating of the string table.

Unfortunately it's still not as fast as the original version (where all the string comparisons are inlined into the constructor) for enums with < 100 strings.
But this will improve once we can pass the string and string table as borrowed parameters and we can reduce the ARC overhead.
2017-09-18 17:50:24 -07:00
Erik Eckstein
0bdd91a039 Produce more efficient code for the init(rawValue: String) constructor of string enums.
Instead of inlining a series of string comparisons, we call a library function which does the string lookup on a table of static strings.
This reduces the code size of those initializers dramatically.
Performance wise it's slower than before, because the string comparisons are not inlined anymore.
2017-09-18 17:50:24 -07:00