mirror of
https://github.com/dart-lang/sdk
synced 2024-09-05 08:24:39 +00:00
[dart2js] Use experimental type strategy from compiler based on flag.
Change-Id: I3b79750691792f8f4cc7a8c09d2d4cc9b142f074 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/260240 Reviewed-by: Mayank Patke <fishythefish@google.com>
This commit is contained in:
parent
4eda3397f3
commit
e96a0f6c98
|
@ -38,8 +38,12 @@ import 'inferrer/powersets/powersets.dart' show PowersetStrategy;
|
|||
import 'inferrer/typemasks/masks.dart' show TypeMaskStrategy;
|
||||
import 'inferrer/types.dart'
|
||||
show GlobalTypeInferenceResults, GlobalTypeInferenceTask;
|
||||
import 'inferrer_experimental/trivial.dart' as experimentalInferrer
|
||||
show TrivialAbstractValueStrategy;
|
||||
import 'inferrer_experimental/types.dart' as experimentalInferrer
|
||||
show GlobalTypeInferenceTask;
|
||||
import 'inferrer_experimental/typemasks/masks.dart' as experimentalInferrer
|
||||
show TypeMaskStrategy;
|
||||
import 'inferrer/wrapped.dart' show WrappedAbstractValueStrategy;
|
||||
import 'ir/modular.dart';
|
||||
import 'js_backend/backend.dart' show CodegenInputs;
|
||||
|
@ -158,9 +162,13 @@ class Compiler
|
|||
options.deriveOptions();
|
||||
options.validate();
|
||||
|
||||
abstractValueStrategy = options.useTrivialAbstractValueDomain
|
||||
? const TrivialAbstractValueStrategy()
|
||||
: const TypeMaskStrategy();
|
||||
abstractValueStrategy = options.experimentalInferrer
|
||||
? (options.useTrivialAbstractValueDomain
|
||||
? const experimentalInferrer.TrivialAbstractValueStrategy()
|
||||
: const experimentalInferrer.TypeMaskStrategy())
|
||||
: (options.useTrivialAbstractValueDomain
|
||||
? const TrivialAbstractValueStrategy()
|
||||
: const TypeMaskStrategy());
|
||||
if (options.experimentalWrapped || options.testMode) {
|
||||
abstractValueStrategy =
|
||||
WrappedAbstractValueStrategy(abstractValueStrategy);
|
||||
|
|
|
@ -271,9 +271,9 @@ abstract class TypeMask implements AbstractValue {
|
|||
|
||||
/// If [mask] is forwarding, returns the first non-forwarding [TypeMask] in
|
||||
/// [mask]'s forwarding chain.
|
||||
static TypeMask nonForwardingMask(mask) {
|
||||
while (mask.isForwarding) {
|
||||
mask = mask.forwardTo;
|
||||
static TypeMask nonForwardingMask(TypeMask mask) {
|
||||
while (mask is ForwardingTypeMask) {
|
||||
mask = (mask as ForwardingTypeMask).forwardTo;
|
||||
}
|
||||
return mask;
|
||||
}
|
||||
|
|
|
@ -271,9 +271,9 @@ abstract class TypeMask implements AbstractValue {
|
|||
|
||||
/// If [mask] is forwarding, returns the first non-forwarding [TypeMask] in
|
||||
/// [mask]'s forwarding chain.
|
||||
static TypeMask nonForwardingMask(mask) {
|
||||
while (mask.isForwarding) {
|
||||
mask = mask.forwardTo;
|
||||
static TypeMask nonForwardingMask(TypeMask mask) {
|
||||
while (mask is ForwardingTypeMask) {
|
||||
mask = (mask as ForwardingTypeMask).forwardTo;
|
||||
}
|
||||
return mask;
|
||||
}
|
||||
|
|
|
@ -25,10 +25,6 @@
|
|||
"Dynamic access of 'memberContext'.": 1,
|
||||
"Dynamic access of 'name'.": 1
|
||||
},
|
||||
"pkg/compiler/lib/src/inferrer/typemasks/type_mask.dart": {
|
||||
"Dynamic access of 'forwardTo'.": 1,
|
||||
"Dynamic access of 'isForwarding'.": 1
|
||||
},
|
||||
"pkg/compiler/lib/src/js_emitter/program_builder/program_builder.dart": {
|
||||
"Dynamic invocation of '[]='.": 1,
|
||||
"Dynamic invocation of 'add'.": 1
|
||||
|
|
Loading…
Reference in a new issue