With this change we now simplify 2192 retain, release operations on
enums an increase of ~56% over the previous stat, 1403 retain, release
operations.
The next step is to implement switch_enum simplification and pushing
releases on enums into switch regions (the real purpose of this pass).
rdar://17139960
Swift SVN r18740
These arrays are meant to be used in situations where you want to allocate a
potentially large amount of default constructible items for a collection of
fixed size.
An example of such a use case is for data flow algorithms which need a
one to one mapping from BB -> StateObject. In such a case, if the state
object is default constructible, we can allocate all of the structures
first, initialize them for each BB, and then process as we normally
would. Thus we eliminate overhead due to memory allocation.
Since the data structures take an allocator it also enables one to use it in
cases where one allocates memory from an allocator and references it via an
ArrayRef. We do this in swift when storing data into certain instructions.
Another benefit over using DenseMaps in such cases is that a DenseMap (unless
you preallocate) can cause all sorts of invalidation issues as new states are
added.
I am planning on using this in my Enum Simplification work and changing
the Global ARC Optimizer to use this.
Swift SVN r18739
Previously, the frontend detected that its output was being piped into the
driver and buffered, and decided that that wasn't a color-friendly output
stream. Now, the driver passes -color-diagnostics to the frontend to force
color output if the driver itself is in a color-output context.
<rdar://problem/16697713>
Swift SVN r18506
I didn't want to rip this logic out wholesale. There is a possibility
the character lexing can be reborn/revisited later, and
disabling it in the parser was easy.
Swift SVN r18102
No options should be changed because of the absence of a flag. This is
necessary for clients like LLDB which may have an initial set of options
that differs from the usual set.
Part of <rdar://problem/16776705>
Swift SVN r17819
When importing an Objective-C init method or factory method into an
initializer, if the first camelCase word of the first argument name
starts with "with", drop the "with". This means that
-initWithRed:green:blue:alpha:
will get imported into Swift as
init(red:green:blue:alpha:)
as will
+colorWithRed:green:blue:alpha:
This is <rdar://problem/16795899>, hidden behind the
-implicit-objc-with flag.
Swift SVN r17271
Another baby step toward <rdar://problem/14462349>, made even more
tepid by the fact that I've quarantined this behind a new flag,
-strict-keyword-arguments. Enforcing this breaks a lot of code, so I'd
like to bring up the new model on the side (with good diagnostics that
include Fix-Its) before trolling through the entire standard library
and testsuite to fix violations of these new rules.
Swift SVN r17143
double-quoted string literals that contain a single extended grapheme cluster
SEGCL by default infer type String, but you can ask to infer Character
for them.
Single quoted literals continue to infer Character.
Actual extended grapheme cluster segmentation is not implemented yet,
<rdar://problem/16755123> Implement extended grapheme cluster
segmentation in libSwiftBasic
This is part of
<rdar://problem/16363872> Remove single quoted characters
Swift SVN r17034
This was part of the original weak design that
there was never any particular reason to rush the
implementation for. It's convenient to do this now
so that we can use it to implement Unmanaged<T> for
importing CF types.
Swift SVN r16693
We're going to want these various adaptors, and helpers built on top
of them, when we replace the array-based storage of members in nominal
types and extensions with something more sane.
Swift SVN r16569
The actual logic to do this is simple; the vast majority of this
commit is just a pile of changes to test cases to reflect the fact
that Objective-C metadata now includes the module name for each class
and the mangling of Swift-defined @objc classes no longer goes into
the "So" namespace for Objective-C classes. Finishes
<rdar://problem/15506580>.
Swift SVN r16274
This makes a number of changes to the selector-splitting
heuristics. Specifically:
- Eliminate last-word splitting, and with it the notion of
multi-words. We only split at prepositions now.
- Introduce the notion of "linking verbs" such as "will" or
"should"; when these show up, we refuse to split a selector, which
helps with delegates.
- Eliminate the special case for "get" and "set". It wasn't
helping.
Swift SVN r16265