Alex Hoppen
9d9bb5377a
[incrParse] Fix issue that did not report the first reparsed character as reparsed
2018-10-11 17:54:35 +02:00
Alex Hoppen
5f341999e5
Merge pull request #18905 from ahoppen/semantic-version-number
...
[libSyntax] Make the ByteTree protocol version consist of a major and minor component
2018-08-29 16:40:08 -07:00
Alex Hoppen
49d0d5b7a3
[libSyntax] Make the ByteTree protocol version consist of a major and minor component
2018-08-29 13:40:50 -07:00
Xi Ge
9f7e2f7610
swift-syntax-test: teach the test driver to accept RequestEvaluatorGraphVizPath.
2018-08-29 11:13:42 -07:00
Alex Hoppen
33d86d5cb6
[byteTree] Write fixed sized data using an optimized form
...
If we know the size of a type at compile time (like we do for all the
integer types), it is cheaper to assign the data buffer directly instead
of using a memcpy.
2018-08-24 15:27:23 -07:00
Alex Hoppen
34a89d45e2
[libSyntax] Make the ByteTree format forwards-compatible
2018-08-22 12:07:57 -07:00
Alex Hoppen
da7cdbb122
[libSyntax] Add test cases for ByteTree serialization and deserialization
2018-08-21 10:55:15 -07:00
Alex Hoppen
e9e7d5cf68
[libSyntax] Generate TokenKinds.def from gyb_syntax_support
2018-08-15 11:11:27 -07:00
swift-ci
7a25818d82
Merge remote-tracking branch 'origin/master' into master-next
2018-07-31 13:49:49 -07:00
Alex Hoppen
775beece65
[libSyntax] Add a swift token classifier for syntax highlighting
2018-07-30 14:54:43 -07:00
swift-ci
4b684e97ef
Merge remote-tracking branch 'origin/master' into master-next
2018-07-25 19:29:15 -07:00
Rintaro Ishizaki
6346e9b437
[libSyntax] Fix compiler error ( #18243 )
...
Another instance of 7ad81a88b9 .
2018-07-26 11:12:24 +09:00
swift-ci
879a10aa57
Merge remote-tracking branch 'origin/master' into master-next
2018-07-25 15:29:05 -07:00
Alex Hoppen
57196f8902
[libSyntax] Enable serialization of syntax trees for incremental transfer
2018-07-23 12:32:49 -07:00
swift-ci
7b5e5028b7
Merge remote-tracking branch 'origin/master' into master-next
2018-07-20 13:49:10 -07:00
swift-ci
770b29634b
Merge remote-tracking branch 'origin/master' into master-next
2018-07-19 14:50:16 -07:00
Alex Hoppen
d9d5afd15a
[incrParse] Refactor the test utility to be more modular
...
This way we can use the same core of the test utility to verify
round-tripness of incrementally transferring the syntax tree to
swiftSyntax.
2018-07-19 14:47:58 -07:00
Alex Hoppen
419ba044f1
[libSyntax] Record reused node IDs
...
This is cheaper than recording reused region offsets and the reused node
IDs will later be used to incrementally transfer the syntax to
SwiftSyntax.
2018-07-19 13:55:57 -07:00
swift-ci
3e0444534b
Merge remote-tracking branch 'origin/master' into master-next
2018-07-19 10:49:42 -07:00
Alex Hoppen
705f5b79a2
[libSyntax] Rename getAbsolutePosition-related methods for more clarity
2018-07-19 09:15:53 -07:00
swift-ci
c4feb3611d
Merge remote-tracking branch 'origin/master' into master-next
2018-07-18 17:09:20 -07:00
Alex Hoppen
7a750bf024
[libSyntax] Allow syntax cache reuse info to be passed back via SourceKit
2018-07-18 13:35:10 -07:00
Bob Wilson
e1cbc560f9
[master-next] More changes to adapt to new LLVM flags in r334221
...
My previous change for this issue (033b884de6 ) did not fix all the
affected code. This gets the rest of them. Thanks for Jason Molenda
for helping with this. rdar://problem/41025365
2018-06-12 14:55:40 -07:00
Alex Hoppen
2decf8ffaf
[libSyntax] Rename recordReuseInformation to setRecordReuseInformation
2018-05-22 09:07:56 -07:00
Alex Hoppen
b26dd1118c
[incrParse] Fix swift-syntax-test not complaining about unexpected reparsed functions
2018-05-22 08:52:40 -07:00
Alex Hoppen
c31a880a47
[incrParse] Allow whitespaces to be reparsed in test
...
This greatly improves the ergonomics of writing tests and outweighs the
ability to test which whitespaces get parsed since their parsing
overhead should be minimal.
2018-05-22 08:52:38 -07:00
Alex Hoppen
d026b2da04
[incrParse] Add verification of reparsed regions to swift-syntax-test
2018-05-22 08:52:37 -07:00
Alex Hoppen
4da37b1702
[incrParse] Add option to force coloured output
2018-05-22 08:52:36 -07:00
Alex Hoppen
6135f10151
[incrParse] Outdated documentation fixes
2018-05-22 08:52:36 -07:00
Alex Hoppen
bc5e4d709a
[incrParse] Compute byte offsets of pre-edit file based on that file
2018-05-22 08:52:35 -07:00
Alex Hoppen
d9fd523897
[swift-syntax-test] Refactor to allow incremental parsing on all actions
2018-05-22 08:52:34 -07:00
Alex Hoppen
8998b27dd4
[incrParse] Add coloured output indicating which code got reused
2018-05-22 08:52:34 -07:00
Alex Hoppen
92f8f34d22
[incrParse] Store reused regions and output them after parsing
2018-05-22 08:52:34 -07:00
Alex Hoppen
3382fac436
[incrParse] Allow line:column notation to specify edits
2018-05-22 08:52:34 -07:00
Alex Hoppen
186feb6f0e
[incrParse] Allow information about node reused be outputted
2018-05-22 08:52:33 -07:00
Alex Hoppen
db52819d94
[swift-syntax-test] Fix formatting of command-line-argument descriptions
2018-05-22 08:52:33 -07:00
Alex Hoppen
60d11d24f8
[incrParse] Reparse a node if the next leaf node has been modified
2018-05-22 08:52:33 -07:00
Alex Hoppen
de9737c946
[incrParse] Support incremental parsing for edited files
2018-05-22 08:52:33 -07:00
David Zarzycki
95473a10d7
[Misc] NFC: Fix random build warnings
...
Unused variables/methods, language extensions, extra semicolons, intentional
self assignment, platform specific quirks, etc.
2018-04-30 12:52:43 -04:00
Alex Hoppen
699ca79ac5
[swift-syntax-test] Add batch option to execute action for every swift file in directory
2018-04-20 13:38:14 -07:00
Dexin Li
e0f8b27117
[Syntax]Add a deserializer that convert json to libSyntax tree ( #15203 )
2018-03-16 15:22:04 -07:00
Rintaro Ishizaki
194a14346d
[swift-syntax-test] Make VerifySyntaxTree a command line option ( #15227 )
...
Add `-verify-syntax-tree` option to `swift-syntax-test`.
Defaulted to `true`, can be disabled with `-verify-syntax-tree=false`
2018-03-14 14:05:25 +09:00
omochimetaru
d12542503f
[Syntax] test diagnostics in Lexer with libSyntax ( #14954 )
2018-03-04 08:53:54 +09:00
Jordan Rose
3cd9f166bc
Don't spend time initializing LLVM when running the driver ( #14896 )
...
Tiny start-up time optimization noticed while looking at how we do
PrettyStackTraceProgram. Also add PrettyStackTraceProgram to a few
more of our testing tools, via the new PROGRAM_START macro.
2018-02-28 19:56:19 -08:00
Xi Ge
37f352fe41
sourcekitd: build Swift syntax tree more lazily than collecting parsed tokens. ( #14578 )
...
Before this patch, we have one flag (KeepSyntaxInfo) to turn on two syntax
functionalities of parser: (1) collecting parsed tokens for coloring and
(2) building syntax trees. Since sourcekitd is the only consumer of either of these
functionalities, sourcekitd by default always enables such flag.
However, empirical results show (2) is both heavier and less-frequently
needed than (1). Therefore, separating the flag to two flags makes more
sense, where CollectParsedToken controls (1) and BuildSyntaxTree
controls (2).
CollectingParsedToken is always enabled by sourcekitd because
formatting and syntax-coloring need it; however BuildSyntaxTree should
be explicitly switched on by sourcekitd clients.
resolves: rdar://problem/37483076
2018-02-13 16:27:12 -08:00
David Ungar
354a76ac4e
Merge pull request #14198 from davidungar/PR-18-3c-exp2
...
[Batch mode] Move frontend main output files to FrontendInputsAndOutputs. (1)
2018-02-01 16:42:10 -08:00
Rintaro Ishizaki
fced748790
[Syntax] Represent missing optioanl nodes as nullptr ( #14300 )
...
Allocating RawSyntax/SyntaxData for missing optional node is a waste of
resource.
2018-01-31 19:24:00 +09:00
David Ungar
a9819b6e60
Renaming FrontendInputs -> FrontendInputsAndOutputs
...
Fix comment in ArtsToFrontendOptionsConverter re getOutputFilenamesFromCommandLineOrFilelist
2018-01-30 18:54:38 -08:00
Rintaro Ishizaki
98fc073e2e
[Syntax] Don't rebuild Syntax with RawSyntax in SyntaxVisitor ( #14057 )
...
We don't guarantee RawSyntax nodes as unique object in the tree, while
we do that for SyntaxData. We shouldn't recreate SyntaxData once it was
built.
2018-01-22 14:24:20 -08:00
Rintaro Ishizaki
0780c529c4
[Syntax] Unify RawSyntax and RawTokenSyntax using union and TrailingObjects
...
It better matches with SwiftSyntax model.
Using TrailingObjects reduces the number of heap allocation which
gains 18% performance improvement.
2018-01-18 14:49:46 +09:00