Now that SILGen and IRGen can both handle capturing archetypes from generic scopes, we can set the DeclContext of ImplicitClosureExprs correctly, so that SILGen captures their context archetypes. &&, and ||, and assert now work in generic contexts, at least in simple test cases.
Swift SVN r5476
We were using _TMdT_ as a type metadata pointer, but it's really a full metadata symbol we need to offset to get the type metadata address.
Swift SVN r5376
Test that string bridging interacts successfully both with native ObjC NSString methods and with Swift subclasses that define String methods end-to-end.
Swift SVN r5367
This is a workaround for <rdar://problem/13986638>, since the compiler doesn't yet generate metadata for oneof types (and the final layout of oneof metadata is TBD).
Swift SVN r5360
Now that we can compile archetype metatypes properly, we can surface Builtin.typeof using a stdlib function. (Ultimately it should be always_inline so it doesn't do a bunch of redundant work for what is often a trivial operation.)
Swift SVN r5015
I broke writeback of byref arguments to functions with my RValue refactor, but assignment writeback (including destructuring assignments like (a, b) = (b, a)) should work. Add a test for it.
Swift SVN r4731
Collect the substitutions from SpecializeInsts and use them when emitting an ApplyInst to pass archetype parameters and to reexplode arguments at the right abstraction level for the generic callee. Unfortunately, ArchetypeTypeInfo::allocate() is broken, so alloc_box $T for an archetype type T doesn't yet work.
Swift SVN r4597
Preserve the AbstractCC of a function symbol when emitting a SIL ConstantRefInst by adding a new StaticFunction variant to LoweredValue. This lets us avoid a bunch of bitcasting noise for static functions that aren't used as values, and will lets us emit C-to-Swift-ABI thunks on demand when C functions are used as values.
Swift SVN r4543
Implement the syntax 'if x then y else z', which evaluates to 'y' if 'x' is true or 'z' if 'x' is false. 'x' must be a valid logic value, and 'y' and 'z' must be implicitly convertible to a common type.
Swift SVN r4407
Implement switch statements with simple value comparison to get the drudge work of parsing and generating switches in place. Cases are checked using a '=~' operator to compare the subject of the switch to the value in the case. Unlike a C switch, cases each have their own scope and don't fall through. 'break' and 'continue' apply to an outer loop rather to the switch itself. Multiple case values can be specified in a comma-separated list, as in 'case 1, 2, 3, 4:'. Currently no effort is made to check for duplicate cases or to rank cases by match strength; cases are just checked in source order, and the first one wins (aside from 'default', which is branched to if all cases fail).
Swift SVN r4359
A Swift method in an extension cannot override a method nor can it be
overridden by a method. Diagnose this. We may remove this limitation
at a later time.
An [objc] method in an extension can override and can be overridden, so
specifically allow this case. It's useful in our Foundation bindings.
Swift SVN r4308
In the lit.site.cfg, if a MODULES_SDK is available, add a '%sdk' substitution and enable REQUIRES: sdk tests. Add some tests under test/Interpreter/SDK to test some basic ObjC interop features.
Swift SVN r4243
Alter CalleeSource and Callee to keep their own internal vector of substitutions and concatentate multiple SpecializationExpr substitutions. Update EmitPolymorphicArguments::emit to emit arguments out of the substitution list based on the generic parameters of the current function type instead of assuming that the substitution list and generic parameter list match up.
Swift SVN r3937
- Defines a Generator struct using generics + closures to make it simpler to
implement iterators.
Let me know if you'd rather not have XFAILs in the test suite.
Swift SVN r2577
changes include:
- Each '%' in the format string is followed by some number of
non-alpha characters (the "layout") and then an alpha character
(the "kind"). The string and character are passed along to each
FormattedPrintable's printFormatted() so they can do custom
formatting
- The Format struct is now used for the 'default' layout, which all
of the standard libaries use
- Added 'x' and 'o' custom formatting for formatting numbers in hex
and octal, respectively. 'u' and 'l' can be used to print
characters in uppercase or lowercase (String versions are yet to
come).
- The code for splitFormat()/printf() match what will be on the
slides. They use the split operations to keep the whole thing
linear, rather than performing inefficient slices.
There are some ugly hacks here due to <rdar://problem/11529601>.
Swift SVN r1980
e.g. "foo is \(i+j)". This implements rdar://11223686
Doug implemented all the hard parts of this. I ripped out support for nested string
literals (i.e. string literals within an interpolated string), which simplified the
approach and defined away some problems with his patch in progress. I plan a few refinements
on top of this basic patch.
Swift SVN r1738
multiple times, as well as teaching the name lookup mechanism that
it's similarly rude to report ambiguous results because it searched
the same import twice. Fixes <rdar://problem/11287213>.
Yes, this is a bit of an ugly hack.
Swift SVN r1610
This currently consists of factorial and towers of hanoi, both using
recursion.
I'm not certain what the general policy will be for runtime tests,
but these don't look actively harmful right now and test real functionality.
Swift SVN r1440