Commit Graph

24 Commits

Author SHA1 Message Date
Yuta Saito
8b4ce2c2ff [wasm][test] Remove unused argc/argv parameters from @main decl
In WebAssembly, `main` function is mangled differently depending on if
it takes argc/argv or not. If it doesn't take them, it's mangled to
`main` as well as other platforms, so remove unused argc/argv in
executable tests to avoid linkage failure.
2023-10-24 00:15:58 +00:00
Holly Borla
7b586d20cc [Type Resolution] Only allow each applied directly to a type parameter pack. 2023-07-20 15:29:53 -07:00
Arnold Schwaighofer
3b5ebaa46c Fix some tests in IRGen folder 2023-06-21 10:10:32 -07:00
Arnold Schwaighofer
c1a93e0bde Move tests over to use the %use_no_opaque_pointers option 2023-06-14 10:49:48 -07:00
Nate Chandler
6e7952b4ad [IRGen] Mask off metadata pack passed to DebugInfo
When a metadata pack is heap allocated, the pointer's LSB is set.
But lldb is expecting a real pointer.  So mask it off.

Companion PR has a test: https://github.com/apple/llvm-project/pull/6961

rdar://110195273
2023-06-03 07:30:09 -07:00
Slava Pestov
d98484050b SILOptimizer: Fix bad hash calculation in CSE
Fixes rdar://problem/108045677.
2023-04-17 16:22:06 -04:00
Holly Borla
e48a9b5aeb [NFC] Remove the VariadicGenerics flag from tests that don't use generic types
with parameter packs.
2023-04-15 17:48:08 -07:00
Erik Eckstein
3296e6cc49 tests: disable IRGen/run_variadic_generics.sil to unblock CI
It crashes the compiler on linux
rdar://108045677
2023-04-14 14:34:08 +02:00
Holly Borla
234b5dc660 [SE-0393] Require the repeat keyword for generic requirement expansions. 2023-04-12 22:04:01 -07:00
Slava Pestov
39d82deabd Enable SIL optimizer for some executable variadic generics tests
variadic_generic_tuples is still WIP.
2023-04-02 23:02:37 -04:00
Slava Pestov
fd6ff412c5 IRGen: Fix indexing into on-heap packs from emitTypeMetadataPackElementRef() 2023-03-24 13:05:37 -04:00
Sophia Poirier
70cffb06f3 [Variadic Generics] type parameter pack syntax change: T... -> each T 2023-03-02 14:42:28 -08:00
nate-chandler
57ceb506df Merge pull request #63733 from nate-chandler/variadic-generics/irgen/open_pack_element_requirements
[IRGen] Bound all requirements of open_pack_element.
2023-02-16 20:07:35 -08:00
Nate Chandler
6378efee04 [IRGen] Bound all reqs of open_pack_element.
Previously, only the element archetypes that corresponded to the
relevant pack generic parameters were bound, and the wtables that were
bound for them were based on looking up what they conform to.  Here, the
requirements of the generic signature are used to find which archetypes
must be bound to metadata and which conformances must be bound to
wtables.
2023-02-16 15:29:45 -08:00
nate-chandler
87459d61b9 Merge pull request #63665 from nate-chandler/variadic-generics/irgen/full_metadata_binding
[GenPack] Emit all element signature requirements.
2023-02-16 15:16:24 -08:00
Nate Chandler
c5563ff414 [Test] Verified variadic type construction. 2023-02-14 20:54:07 -08:00
Nate Chandler
0d8aac1086 [Test] Verified called witness.
Previously, the test didn't actually verify that the called witness
method was the witness method from the right method--all the methods had
the same implementation and just forwarded the type along to be printed.
Now an id specific to each method is printed as well.
2023-02-14 20:54:06 -08:00
John McCall
d49ab3a762 A couple 32-bit correctness fixes
Fixes rdar://105453258
2023-02-14 12:16:53 -05:00
Nate Chandler
5cb91af1c0 [IRGen] Forwarded wtable packs when possible.
Previously wtable packs were never forwarded because pack types
consisting of a single element which was itself a pack archetype were
never canonicalized into that.

In the forwarding scenario, gepped and loaded from wtable when lowering
open_pack_element.
2023-02-10 18:13:21 -08:00
Nate Chandler
6b8408a3a1 [Test] Sorted test cases better. 2023-02-07 14:02:16 -08:00
Nate Chandler
cd7e675bce [IRGen] Bind wtables at open_pack_element.
Call out to the infrastructure for emitting witness table packs to emit
references to individual witness tables when binding opened archetypes
during open_pack_element.
2023-02-07 12:40:46 -08:00
Nate Chandler
aa5b27158f [Test] Added missing check lines.
And shuffled generic parameters.
2023-02-07 12:21:08 -08:00
Nate Chandler
e287c3b3de [Test] Loosened integer pattern to match.
SizeTy is only i64 on 64 bit platforms.
2023-02-06 09:50:09 -08:00
Nate Chandler
a442245925 [IRGen] Lowered open_pack_element. 2023-02-02 12:48:40 -08:00