Commit Graph

522 Commits

Author SHA1 Message Date
swift-ci
4a31d01a00 Merge remote-tracking branch 'origin/master' into master-next 2017-12-19 11:09:52 -08:00
Pavel Yaskevich
d3cd61d8eb Merge pull request #13291 from xedin/rdar-34920390
[Mangling/ABI] Mangle function names with parameter labels
2017-12-19 10:50:18 -08:00
swift-ci
f1904666ac Merge remote-tracking branch 'origin/master' into master-next 2017-12-18 18:49:54 -08:00
Rintaro Ishizaki
6a201336ca Merge pull request #13500 from rintaro/syntax-trivia-misc
[Syntax] Support "conflict marker" and "carriage return" trivia
2017-12-19 11:39:17 +09:00
swift-ci
fd21243bd6 Merge remote-tracking branch 'origin/master' into master-next 2017-12-18 17:08:54 -08:00
swift-ci
20b240cf51 Merge pull request #13514 from compnerd/casting 2017-12-18 17:02:24 -08:00
Rintaro Ishizaki
cc72a3b934 [Lexer] Use ContentStart position for hashbang trivia 2017-12-19 09:24:34 +09:00
Rintaro Ishizaki
2c06060165 [Syntax] Add CarriageReturn trivia kind
To distinguish '\r' from '\n'.
2017-12-19 09:24:34 +09:00
Rintaro Ishizaki
181333ce0f [Lexer] Lex conflict marker as a trivia 2017-12-19 09:24:33 +09:00
Rintaro Ishizaki
475bb56228 [Syntax] Add test case for hashbang trivia in Lexer 2017-12-19 09:14:20 +09:00
Rintaro Ishizaki
b4e7f74ab4 [Syntax] Add dedicated unittest for Lexer with trivia parsing 2017-12-19 09:14:20 +09:00
swift-ci
ab66b86518 Merge remote-tracking branch 'origin/master' into master-next 2017-12-18 16:09:16 -08:00
Pavel Yaskevich
10c385d1b7 [Mangling/ABI] Add special LabelList to store parameter labels
Instead of mangling parameter labels as part of the function type
move them to the end of the function name instead, to match the
language semantics.
2017-12-18 15:44:24 -08:00
Saleem Abdulrasool
b329bf3b32 unittests: silence -Wqual-cast warnings
Qualify the casts to ensure that we do not trigger `-Wqual-cast`
warnings from the compiler.  NFC.
2017-12-18 15:28:53 -08:00
Xi Ge
fe1a4ca0d2 libSyntax: create libSyntax node for var decl accessors. 2017-12-18 15:16:14 -08:00
swift-ci
0302515cf0 Merge remote-tracking branch 'origin/master' into master-next 2017-12-18 12:48:55 -08:00
omochimetaru
ed58c152bf [Parse] Improve Lexer's UTF-8 BOM handling (#13483)
* Add BOM handling testcases
* Add ContentStart to Lexer for BOM handling
2017-12-18 17:22:11 +09:00
swift-ci
bb16a84204 Merge remote-tracking branch 'origin/master' into master-next 2017-12-15 11:09:35 -08:00
Rintaro Ishizaki
53b2e0fe14 [Syntax] Parse composition type node 2017-12-15 10:52:10 -08:00
swift-ci
e3e6dc9c79 Merge remote-tracking branch 'origin/master' into master-next 2017-12-14 17:49:31 -08:00
Xi Ge
b4b638651d libSyntax: create syntax node for typealias declarations. (#13450) 2017-12-14 17:44:54 -08:00
swift-ci
6349dc9aa0 Merge remote-tracking branch 'origin/master' into master-next 2017-12-14 08:29:34 -08:00
Rintaro Ishizaki
e616b2ad37 [Syntax] Use initializer clause syntax node for function parameter (#13430) 2017-12-14 08:12:10 -08:00
swift-ci
c920a92bb1 Merge remote-tracking branch 'origin/master' into master-next 2017-12-14 01:09:50 -08:00
Rintaro Ishizaki
ef29650acd [Syntax] Parse: add support for TupleType and FunctionType
For now using SyntaxParsingContext.
2017-12-14 14:55:27 +09:00
swift-ci
12c6729768 Merge remote-tracking branch 'origin/master' into master-next 2017-12-13 16:49:36 -08:00
Xi Ge
9ddd60d4ef libSyntax: create syntax nodes for closure signature. (#13415)
This patch also refactors the structure of function signature node so
that closure signature can re-use parts of function signature. For
instance, we group arrow and return type to be "ReturnClause". And we
group parenthesized parameter list to be "ParamClause".

This structure of closure signature also calls for a good way to
represent either-or node in libSyntax APIs, since we've two ways to
specify parameters in closure: one is as regular function parameter and
the other is dot-separated simple names.
2017-12-13 16:48:24 -08:00
swift-ci
6a3878e955 Merge remote-tracking branch 'origin/master' into master-next 2017-12-10 16:49:47 -08:00
Rintaro Ishizaki
a0f49ca935 Merge pull request #13339 from rintaro/syntax-parserposition
[Syntax] Fix roundtrip test
2017-12-11 09:49:21 +09:00
Rintaro Ishizaki
60bfa893b9 [Parse] Make PersistentParserState to hold ParserPosition
instead of PersistentParserState::ParserPos.
2017-12-09 13:58:50 +09:00
swift-ci
79a758cf10 Merge remote-tracking branch 'origin/master' into master-next 2017-12-08 15:48:53 -08:00
swift-ci
d1e377b947 Merge remote-tracking branch 'origin/master' into master-next 2017-12-08 14:08:50 -08:00
Slava Pestov
ffabf60118 IRGen: Hollow out generic class templates
Don't emit placeholders for field offsets and vtable entries,
since they were always null. Instead, calculate the final size
of class metadata at runtime using the size of the superclass
metadata and the number of immediate members, and only copy
this prefix from the template to the instantiated metadata,
zero-filling the rest.

For this to work with non-generic resilient classes and
non-generic subclasses of generic classes, we need a new
runtime entry point to relocate non-generic class metadata,
calculating its size at runtime using the same strategy.
2017-12-08 13:50:56 -08:00
Rintaro Ishizaki
ddac6ab1b9 Merge pull request #13301 from rintaro/lexer-lextrivia
[Syntax] Serveral improvements for Trivia lexing
2017-12-08 13:07:01 +09:00
Thomas Roughton
c5bf2ec553 [runtime] Remove TwoWordPair and use the Swift calling convention instead. (#13299) 2017-12-07 19:27:24 -08:00
Rintaro Ishizaki
2b1e316cf6 [Syntax] Add parsing hashbang (shebang) as a trivia.
Added GarbageText trivia kind for any skipped text.
2017-12-08 12:07:00 +09:00
swift-ci
4d15d2f087 Merge remote-tracking branch 'origin/master' into master-next 2017-12-07 14:09:54 -08:00
Xi Ge
1b24d23c1e libSyntax: support function parameter nodes. (#13324) 2017-12-07 14:09:17 -08:00
Bob Wilson
390058972a [master-next] Use PRIVATE in target_link_libraries for executables
This is needed to work with LLVM r319840.
2017-12-06 21:55:22 -08:00
Slava Pestov
66d7a3aad7 Merge pull request #13288 from slavapestov/class-resilience-part-1
Class resilience part 1
2017-12-05 20:57:27 -08:00
Xi Ge
fec040d95e libSyntax: support generic parameter clause. (#13286)
This patch also performs minor refactoring to align syntax parsing
context with the right scope. We start to support the generic clauses
because they are necessary pieces to construct struct or
function syntax node.
2017-12-05 19:34:55 -08:00
Slava Pestov
40ed4e0353 Runtime: Remove "copy prefix" logic
When allocating metadata for a generic class we would copy
any prefix matter from the superclass metadata, if the
superclass metadata's address point was greater than our
address point.

While we may use prefix matter for resilient metadata
in the future, I don't believe just copying bytes like
this will prove useful.
2017-12-05 16:31:46 -08:00
Slava Pestov
f7b4794769 Runtime: Fix TargetClassMetadata layout when Target is not InProcess 2017-12-05 16:31:46 -08:00
Xi Ge
1a7f1911b8 libSyntax: support declaration modifiers, like static, private, etc. (#13221)
Some declaration modifiers may have more details attached, like
"private(set)". This patch represents the detail part "(set)" as a token
list.
2017-12-04 13:03:02 -08:00
Rintaro Ishizaki
41c2cf2845 [Parse] Add test for Lexer::getStateForBeginningOfToken() with Trivia 2017-12-04 10:46:03 -08:00
Rintaro Ishizaki
c0ceb7a943 [Parse] Simplify parsing name for function declarations (#13141) 2017-12-05 02:04:01 +09:00
Greg Parker
1d7715bf86 [test] Fix SwiftRuntimeLongTests after symbol renaming. (#13230) 2017-12-03 04:39:26 -08:00
Xi Ge
68348944e2 libSyntax: parse declaration attribute list (@attributes). (#13212)
This commit starts to support syntax nodes for @ attributes list for
declarations. These attributes don't include modifiers like "static" or
access keywords. Along with the function change, the commit refactors
some existing code to reduce duplication.
2017-12-01 16:15:17 -08:00
Rintaro Ishizaki
d389a812e2 [libSyntax] Support parsing postfix type nodes
* OptionalType (?)
* ImplicitlyUnwrappedOptional (!)
* MetatypeType (.Type, .Protocol)
2017-11-30 14:31:21 +09:00
Saleem Abdulrasool
0c53bbf092 Merge pull request #13132 from compnerd/testable
stdlib: fix the build with macOS long tests
2017-11-29 16:22:31 -08:00