Propagating type/cid at conditional branches is not possible because
it may cause invalid code motion.
For this to be safe we need to explicitly represent the dependency
between checks eliminated in a branch and the condition that constrains the type/cid.
BUG=
R=vegorov@google.com
Review URL: https://codereview.chromium.org/1491373005 .
This ensures the implicit closure function is enumerated in later steps. Fixes crash in co19 test reducible as
import 'dart:math';
main() {
print(const [1, 2.0, "3"].fold(0, max));
}
Also enumerate invocation dispatchers to avoid a similar situation there, though I cannot find a crashing example involving them.
R=fschneider@google.com
Review URL: https://codereview.chromium.org/1489203004 .
We get extra precision from including argument types that produce errors.
e.g. {int} + {int,null} --> {int}.
Nice improvement on some numerical benchmarks where the result is used as an index where we can now use the builtin indexer.
Review URL: https://codereview.chromium.org/1493673003 .
For some reason html.Element's static const _tagsForWhichCreateContextualFragmentIsNotSupported is inferred to dynamic instead of a ContainerTypeMask.
This change will also 'do the right thing' if we turn off type inference.
R=asgerf@google.com
Review URL: https://codereview.chromium.org/1490923003 .
The test suite PoorMansIncrementalResolutionTest was turning on the
new task model during setup and turning it off during teardown; as a
result, any tests run after it were using the old task model.
The easy fix is to just stop trying to adjust the task model state in
this test suite, since the new task model is on by default now.
This should fix test breakages when run via pkg/analyzer/test_all.dart.
TBR=scheglov@google.com
Review URL: https://codereview.chromium.org/1497573002 .
This should help to fix the following exception:
Dart analysis server, SDK version 1.13.0-dev.7.12, server version 1.12.0, error: Exception from fix contributor: DefaultFixContributor
Bad state: No element
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/1492843003 .
- renames the existing AbstractValue in cps_ir/type_propagation.dart to AbstractConstant
- introduces AbstractValue as an empty superinterface of TypeMask, and
- lift the interface of TypeMaskSystem to the superinterface AbstractValueDomain.
In follow-ups:
- change simple uses from TypeMask(System) to AbstractValue(Domain)
- update names and comment in AbstractValueDomain to more precisely reflect the abstraction
- update the complex uses (mainly type_propagation.dart) to use AbstractValue(Domain)
R=asgerf@google.com
Review URL: https://codereview.chromium.org/1415883005.
This fixes the following reported exception.
Dart analysis server, SDK version 1.13.0, server version 1.12.0, error: Exception from fix contributor: DefaultFixContributor
The null object does not have a getter 'offset'.
NoSuchMethodError: method not found: 'offset'
Receiver: null
Arguments: []
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/1487683006 .
I was not able to reproduce the problem.
But this might fix the following exception.
Dart analysis server, SDK version 1.13.0, server version 1.12.0, error: Exception from fix contributor: DefaultFixContributor
type 'MethodInvocation' is not a subtype of type 'ConstructorDeclaration' in type cast.
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/1489823003 .
- Weaken check in Dart_New: it is okay to invoke a factory constructor or redirecting constructor of a class that was removed. We only need the class of a generative constructor to have been retained.
- Fix crash sending two-byte symbols in isolate messages. Only occurs in precompilation because there are no two-byte string literals in the core libraries, and so no type-byte entries in the VM isolate's symbol table.
- Fix crash getting expression snippet for assertion failures.
R=srdjan@google.com
Review URL: https://codereview.chromium.org/1493433002 .
Creates an OSThread in OSThread::Current() if a thread doesn't
already have one.
Also removes the setup of an unneeded StackZone from a Timeline API
function.
BUG=
Review URL: https://codereview.chromium.org/1483113002 .
Each script has an associated top-level class in which the top-level functions and fields are stored, and the reference to the script. All other fields in the TL class are unused. There are 380 TL classes in corelib alone; eliminating them saves space.
This CL eliminates all TL classes but one per library. All TL functions and fields in the library are stored in that TL class. Because scripts are not stored directly in functions and fields, but are accessible via their owner class, the owner of TL entities are now PatchClasses, rather than classes.
Before:
Size of vm isolate snapshot = 930813
New space (0k of 0k) Old space (1184k of 1624k)
VM Isolate: Number of symbols : 14909
Size of isolate snapshot = 261873
New space (0k of 2048k) Old space (987k of 1024k)
After:
Size of vm isolate snapshot = 931101
New space (0k of 0k) Old space (713k of 1156k)
VM Isolate: Number of symbols : 14907
Size of isolate snapshot = 256956
New space (0k of 1024k) Old space (514k of 768k)
R=iposva@google.com
Review URL: https://codereview.chromium.org/1410383020 .
The sign of a +/- operation is computed, which can help in cases where
the result could not be proven to be within 53-bit range.
Also added rules for ~/, %, >>, &, and unary negation operators.
BUG=
R=sra@google.com
Review URL: https://codereview.chromium.org/1479193002 .
This might fix the following exception:
Dart analysis server, SDK version 1.14.0-edge.e3457758ed7e2b24263bcbd9831cd764ce9fd110, server version 1.12.0, FATAL error: Failed to perform operation: Instance of 'PerformAnalysisOperation'
The null object does not have a getter 'modificationTime'.
NoSuchMethodError: method not found: 'modificationTime'
Receiver: null
Arguments: []
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/1480393004 .