DescriptionVM: Zero-cost try-finally with an empty finally-block.
Consider code like
try {
something();
} finally {
assert(expr);
}
The compiler de-sugars this into
try {
something();
} catch (_) {
rethrow;
} finally {
assert(expr);
}
In unchecked mode this leaves an empty finally-block, but we would still
have the overhead of the try-catch. This CL avoids this unnecessary overhead
by making try-finally with an empty finally zero-cost.
BUG=#27274
R=rmacnak@google.com
Committed: https://github.com/dart-lang/sdk/commit/60e6faa7c3357ab519fc88b3f51f39b5419eb257
Patch Set 1 #
Total comments: 5
Patch Set 2 : detect rethrow correctly #
Total comments: 2
Patch Set 3 : remove extra space #Patch Set 4 : rebased #
Messages
Total messages: 8 (2 generated)
|