-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for declarations in switch expressions #505
Add support for declarations in switch expressions #505
Conversation
✅ PR OK, no changes in deprecations or warnings Total deprecations: 0 Total warnings: 0 Build statistics: ------ libdparse statistics ------
statistics (-before, +after)
-library size=3105508 libdparse.a
+library size=3105556 libdparse.a
rough build time=21s
------ DCD statistics ------
statistics (-before, +after)
client size=1048544 bin/dcd-client
server size=3089720 bin/dcd-server
rough build time=100s
-DCD run_tests.sh Elapsed (wall clock) time (h:mm:ss or m:ss): 0:09.08
-DCD run_tests.sh Maximum resident set size (kbytes): 43176
+DCD run_tests.sh Elapsed (wall clock) time (h:mm:ss or m:ss): 0:09.30
+DCD run_tests.sh Maximum resident set size (kbytes): 44200
short requests: (230x)
min request time = 0.009ms
- 10th percentile = 0.131ms
- median time = 0.497ms
- 90th percentile = 0.879ms
- max request time = 1.872ms
+ 10th percentile = 0.140ms
+ median time = 0.531ms
+ 90th percentile = 0.944ms
+ max request time = 5.627ms
long requests over 10ms: (51x)
- min request time = 18.176ms
- 10th percentile = 18.863ms
- median time = 21.334ms
- 90th percentile = 24.299ms
- max request time = 32.228ms
+ min request time = 18.317ms
+ 10th percentile = 19.928ms
+ median time = 23.014ms
+ 90th percentile = 26.819ms
+ max request time = 32.185ms
top 5 GC sources in server:
bytes allocated, allocations, type, function, file:line
78117888 844 void[] std.array.Appender!(const(TokenStructure!(ubyte, "import dparse.lexer:TokenTriviaFields,TriviaToken; mixin TokenTriviaFields;"))[]).Appender.ensureAddable.__lambda9 /opt/hostedtoolcache/dc/dmd-2.105.2/x64/dmd2/linux/bin64/../../src/phobos/std/array.d:3634
15257216 476788 void[] core.lifetime._d_newitemT!(Data)._d_newitemT /opt/hostedtoolcache/dc/dmd-2.105.2/x64/dmd2/linux/bin64/../../src/druntime/import/core/lifetime.d:2833
14316800 164422 void[] std.array.Appender!(DSymbol*[]).Appender.ensureAddable.__lambda9 /opt/hostedtoolcache/dc/dmd-2.105.2/x64/dmd2/linux/bin64/../../src/phobos/std/array.d:3634
9773344 305417 Data std.array.Appender!string.Appender.this /opt/hostedtoolcache/dc/dmd-2.105.2/x64/dmd2/linux/bin64/../../src/phobos/std/array.d:3509
7372208 281 ubyte[] msgpack.unpacker.Unpacker.InternalBuffer!().initializeBuffer ../../../../.dub/packages/msgpack-d/1.0.4/msgpack-d/src/msgpack/common.d:628 Full build output
|
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #505 +/- ##
==========================================
- Coverage 84.28% 84.25% -0.04%
==========================================
Files 11 11
Lines 8561 8561
==========================================
- Hits 7216 7213 -3
- Misses 1345 1348 +3
Continue to review full report in Codecov by Sentry.
|
Adding additional attributes to deprecation-wrapper of SwitchStatement.expression to avoid breakage Co-authored-by: Jan Jurzitza <[email protected]>
This PR adds parsing for declarations in switchStatement's expression by converting it to a IfCondition. Closes #504.