Skip to content

Commit 9adf3c1

Browse files
johnniwinthercommit-bot@chromium.org
authored andcommitted
[dart2js] Remove testing of no-constant-update-2018 state
Change-Id: If445307c28d9989f3b3c56d905e5bbe0d5f25ac6 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/112388 Reviewed-by: Stephen Adams <[email protected]> Commit-Queue: Johnni Winther <[email protected]>
1 parent 357f8b7 commit 9adf3c1

File tree

94 files changed

+178
-652
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

94 files changed

+178
-652
lines changed

tests/compiler/dart2js/codegen/model_data/dynamic_set.dart

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,11 @@ method1(dynamic c) {
2626
class Class2a<T> {
2727
/*strong.member: Class2a.field2:checked,emitted*/
2828
/*omit.member: Class2a.field2:emitted*/
29-
/*strongConst.member: Class2a.field2:checked,emitted*/
30-
/*omitConst.member: Class2a.field2:emitted*/
3129
T field2;
3230
}
3331

3432
/*strong.member: method2:calls=[set$field2(1)],params=1*/
3533
/*omit.member: method2:assign=[field2],params=1*/
36-
/*strongConst.member: method2:calls=[set$field2(1)],params=1*/
37-
/*omitConst.member: method2:assign=[field2],params=1*/
3834
@pragma('dart2js:noInline')
3935
method2(dynamic c) {
4036
c.field2 = 42;
@@ -43,16 +39,12 @@ method2(dynamic c) {
4339
class Class3a {
4440
/*strong.member: Class3a.field3:checked,emitted*/
4541
/*omit.member: Class3a.field3:emitted,set=simple*/
46-
/*strongConst.member: Class3a.field3:checked,emitted*/
47-
/*omitConst.member: Class3a.field3:emitted,set=simple*/
4842
int field3;
4943
}
5044

5145
class Class3b {
5246
/*strong.member: Class3b.field3:checked,emitted*/
5347
/*omit.member: Class3b.field3:emitted,set=simple*/
54-
/*strongConst.member: Class3b.field3:checked,emitted*/
55-
/*omitConst.member: Class3b.field3:emitted,set=simple*/
5648
int field3;
5749
}
5850

@@ -65,16 +57,12 @@ method3(dynamic c) {
6557
class Class4a {
6658
/*strong.member: Class4a.field4:checked,emitted*/
6759
/*omit.member: Class4a.field4:emitted,set=simple*/
68-
/*strongConst.member: Class4a.field4:checked,emitted*/
69-
/*omitConst.member: Class4a.field4:emitted,set=simple*/
7060
int field4;
7161
}
7262

7363
class Class4b implements Class4a {
7464
/*strong.member: Class4b.field4:checked,emitted*/
7565
/*omit.member: Class4b.field4:emitted,set=simple*/
76-
/*strongConst.member: Class4b.field4:checked,emitted*/
77-
/*omitConst.member: Class4b.field4:emitted,set=simple*/
7866
@override
7967
int field4;
8068
}

tests/compiler/dart2js/codegen/model_data/dynamic_set_unread.dart

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,11 @@ method1(dynamic c) {
2626
class Class2a<T> {
2727
/*strong.member: Class2a.field2:checked,elided*/
2828
/*omit.member: Class2a.field2:elided*/
29-
/*strongConst.member: Class2a.field2:checked,elided*/
30-
/*omitConst.member: Class2a.field2:elided*/
3129
T field2;
3230
}
3331

3432
/*strong.member: method2:calls=[set$field2(1)],params=1*/
3533
/*omit.member: method2:params=1*/
36-
/*strongConst.member: method2:calls=[set$field2(1)],params=1*/
37-
/*omitConst.member: method2:params=1*/
3834
@pragma('dart2js:noInline')
3935
method2(dynamic c) {
4036
c.field2 = 42;
@@ -43,16 +39,12 @@ method2(dynamic c) {
4339
class Class3a {
4440
/*strong.member: Class3a.field3:checked,elided*/
4541
/*omit.member: Class3a.field3:elided,set=simple*/
46-
/*strongConst.member: Class3a.field3:checked,elided*/
47-
/*omitConst.member: Class3a.field3:elided,set=simple*/
4842
int field3;
4943
}
5044

5145
class Class3b {
5246
/*strong.member: Class3b.field3:checked,elided*/
5347
/*omit.member: Class3b.field3:elided,set=simple*/
54-
/*strongConst.member: Class3b.field3:checked,elided*/
55-
/*omitConst.member: Class3b.field3:elided,set=simple*/
5648
int field3;
5749
}
5850

@@ -65,16 +57,12 @@ method3(dynamic c) {
6557
class Class4a {
6658
/*strong.member: Class4a.field4:checked,elided*/
6759
/*omit.member: Class4a.field4:elided,set=simple*/
68-
/*strongConst.member: Class4a.field4:checked,elided*/
69-
/*omitConst.member: Class4a.field4:elided,set=simple*/
7060
int field4;
7161
}
7262

7363
class Class4b implements Class4a {
7464
/*strong.member: Class4b.field4:checked,elided*/
7565
/*omit.member: Class4b.field4:elided,set=simple*/
76-
/*strongConst.member: Class4b.field4:checked,elided*/
77-
/*omitConst.member: Class4b.field4:elided,set=simple*/
7866
@override
7967
int field4;
8068
}

tests/compiler/dart2js/codegen/model_data/static_tearoff.dart

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,8 @@ void foo(I1 x) {}
1818
@pragma('dart2js:noInline')
1919
void bar(I2 x) {}
2020

21-
/*strong.member: main:calls=[call$1(new F.A()),call$1(new F.B()),foo(1),foo(1),main__bar$closure(0),main__bar$closure(0)],params=0*/
22-
/*omit.member: main:calls=[call$1(new F.A()),call$1(new F.B()),foo(1),foo(1),main__bar$closure(0),main__bar$closure(0)],params=0*/
23-
/*strongConst.member: main:calls=[bar(1),bar(1),foo(1),foo(1)],params=0*/
24-
/*omitConst.member: main:calls=[bar(1),bar(1),foo(1),foo(1)],params=0*/
21+
/*strong.member: main:calls=[bar(1),bar(1),foo(1),foo(1)],params=0*/
22+
/*omit.member: main:calls=[bar(1),bar(1),foo(1),foo(1)],params=0*/
2523
main() {
2624
dynamic f = bar;
2725

tests/compiler/dart2js/dart2js.status

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ codegen/logical_expression_test: Fail # Issue 17027
1313
codegen/model_test: Pass, Slow
1414
codegen/side_effect_tdiv_regression_test: Fail # Issue 33050
1515
codegen/simple_function_subtype_test: Fail # simple_function_subtype_test is temporarily(?) disabled due to new method for building function type tests.
16-
codegen/string_escapes_test: Fail # Issue 33060
1716
deferred_loading/deferred_loading_test: Slow, Pass
1817
end_to_end/dump_info_test: Slow, Pass
1918
end_to_end/generate_code_with_compile_time_errors_test: RuntimeError # not supported yet with the new FE.
@@ -29,7 +28,6 @@ inference/simple_inferrer_const_closure2_test: Fail # Issue 16507
2928
inference/simple_inferrer_const_closure_test: Fail # Issue 16507
3029
inference/simple_inferrer_global_field_closure_test: Fail # Issue 16507
3130
inference/swarm_test: Slow, Pass, Fail #
32-
inference/type_mask2_test: RuntimeError # Issue 34095
3331
inlining/inlining_test: Slow, Pass
3432
model/native_test: Pass, Slow
3533
model/no_such_method_enabled_test: Pass, Slow

tests/compiler/dart2js/deferred/constant_emission_test_helper.dart

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
// Files when using deferred loading.
77

88
import 'package:compiler/compiler_new.dart';
9-
import 'package:compiler/src/commandline_options.dart';
109
import 'package:compiler/src/compiler.dart';
1110
import 'package:compiler/src/constants/values.dart';
1211
import 'package:compiler/src/deferred_load.dart';
@@ -27,15 +26,10 @@ class OutputUnitDescriptor {
2726
}
2827

2928
run(Map<String, String> sourceFiles, List<OutputUnitDescriptor> outputUnits,
30-
Map<String, Set<String>> expectedOutputUnits,
31-
{bool useCFEConstants: false}) async {
29+
Map<String, Set<String>> expectedOutputUnits) async {
3230
OutputCollector collector = new OutputCollector();
3331
CompilationResult result = await runCompiler(
34-
memorySourceFiles: sourceFiles,
35-
outputProvider: collector,
36-
options: useCFEConstants
37-
? ['${Flags.enableLanguageExperiments}=constant-update-2018']
38-
: ['${Flags.enableLanguageExperiments}=no-constant-update-2018']);
32+
memorySourceFiles: sourceFiles, outputProvider: collector);
3933
Compiler compiler = result.compiler;
4034
ProgramLookup lookup = new ProgramLookup(compiler.backendStrategy);
4135
var closedWorld = compiler.backendClosedWorldForTesting;

tests/compiler/dart2js/deferred/deferred_constant3_test.dart

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ import 'package:async_helper/async_helper.dart';
99
import 'constant_emission_test_helper.dart';
1010

1111
void main() {
12-
runTest({bool useCFEConstants: false}) async {
12+
runTest() async {
1313
Map<String, Set<String>> expectedOutputUnits = {
1414
'ConstructedConstant(C(x=IntConstant(1)))': {'main'},
1515
'DeferredGlobalConstant(ConstructedConstant(C(x=IntConstant(1))))':
1616
// With CFE constants, the references are inlined, so the constant
1717
// only occurs in main.
18-
useCFEConstants ? {} : {'lib2'},
18+
{},
1919
'ConstructedConstant(C(x=IntConstant(2)))': {'lib1'},
2020
'DeferredGlobalConstant(ConstructedConstant(C(x=IntConstant(2))))': {
2121
'lib1'
@@ -33,15 +33,12 @@ void main() {
3333
OutputUnitDescriptor('memory:lib1.dart', 'm1', 'lib1'),
3434
OutputUnitDescriptor('memory:lib2.dart', 'm2', 'lib2'),
3535
],
36-
expectedOutputUnits,
37-
useCFEConstants: useCFEConstants);
36+
expectedOutputUnits);
3837
}
3938

4039
asyncTest(() async {
4140
print('--test from kernel------------------------------------------------');
4241
await runTest();
43-
print('--test from kernel with CFE constants-----------------------------');
44-
await runTest(useCFEConstants: true);
4542
});
4643
}
4744

tests/compiler/dart2js/deferred/dont_inline_deferred_constants_test.dart

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import 'package:async_helper/async_helper.dart';
99
import 'constant_emission_test_helper.dart';
1010

1111
void main() {
12-
runTest({bool useCFEConstants: false}) async {
12+
runTest() async {
1313
Map<String, Set<String>> expectedOutputUnits = {
1414
// Test that the deferred constants are not inlined into the main file.
1515
'DeferredGlobalConstant(IntConstant(1010))': {'lib1'},
@@ -19,21 +19,21 @@ void main() {
1919
'DeferredGlobalConstant(StringConstant("string4"))':
2020
// TODO(johnniwinther): Should we inline CFE constants within deferred
2121
// library boundaries?
22-
useCFEConstants ? {'lib12'} : {'lib1', 'lib2'},
22+
{'lib12'},
2323
// C(1) is shared between main, lib1 and lib2. Test that lib1 and lib2
2424
// each has a reference to it. It is defined in the main output file.
2525
'ConstructedConstant(C(p=IntConstant(1)))': {'main'},
2626
'DeferredGlobalConstant(ConstructedConstant(C(p=IntConstant(1))))':
2727
// With CFE constants, the references are inlined, so the constant
2828
// only occurs in main.
29-
useCFEConstants ? {} : {'lib1', 'lib2'},
29+
{},
3030
// C(2) is shared between lib1 and lib2, each of them has their own
3131
// reference to it.
3232
'ConstructedConstant(C(p=IntConstant(2)))': {'lib12'},
3333
'DeferredGlobalConstant(ConstructedConstant(C(p=IntConstant(2))))':
3434
// With CFE constants, the references are inlined, so the constant
3535
// occurs in lib12.
36-
useCFEConstants ? {'lib12'} : {'lib1', 'lib2'},
36+
{'lib12'},
3737
// Test that the non-deferred constant is inlined.
3838
'ConstructedConstant(C(p=IntConstant(5)))': {'main'},
3939
};
@@ -44,15 +44,12 @@ void main() {
4444
OutputUnitDescriptor('memory:lib2.dart', 'foo', 'lib2'),
4545
OutputUnitDescriptor('memory:main.dart', 'foo', 'lib12')
4646
],
47-
expectedOutputUnits,
48-
useCFEConstants: useCFEConstants);
47+
expectedOutputUnits);
4948
}
5049

5150
asyncTest(() async {
5251
print('--test from kernel------------------------------------------------');
5352
await runTest();
54-
print('--test from kernel with CFE constants-----------------------------');
55-
await runTest(useCFEConstants: true);
5653
});
5754
}
5855

tests/compiler/dart2js/deferred/dont_inline_deferred_globals_test.dart

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import 'package:async_helper/async_helper.dart';
99
import 'constant_emission_test_helper.dart';
1010

1111
void main() {
12-
runTest({bool useCFEConstants: false}) async {
12+
runTest() async {
1313
Map<String, Set<String>> expectedOutputUnits = {
1414
// Test that the deferred globals are not inlined into the main file.
1515
'ConstructedConstant(C(field=StringConstant("string1")))': {'lib1'},
@@ -21,15 +21,12 @@ void main() {
2121
await run(
2222
MEMORY_SOURCE_FILES,
2323
const [OutputUnitDescriptor('memory:lib1.dart', 'finalVar', 'lib1')],
24-
expectedOutputUnits,
25-
useCFEConstants: useCFEConstants);
24+
expectedOutputUnits);
2625
}
2726

2827
asyncTest(() async {
2928
print('--test from kernel------------------------------------------------');
3029
await runTest();
31-
print('--test from kernel with CFE constants-----------------------------');
32-
await runTest(useCFEConstants: true);
3330
});
3431
}
3532

tests/compiler/dart2js/deferred/follow_constant_dependencies_test.dart

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,15 @@
55
// Test that constants depended on by other constants are correctly deferred.
66

77
import 'package:async_helper/async_helper.dart';
8-
import 'package:compiler/src/commandline_options.dart';
98
import 'package:compiler/src/compiler.dart';
109
import 'package:compiler/src/constants/values.dart';
1110
import 'package:expect/expect.dart';
1211
import '../helpers/memory_compiler.dart';
1312

1413
void main() {
15-
runTest({bool useCFEConstants: false}) async {
16-
CompilationResult result = await runCompiler(
17-
memorySourceFiles: MEMORY_SOURCE_FILES,
18-
options: useCFEConstants
19-
? ['${Flags.enableLanguageExperiments}=constant-update-2018']
20-
: ['${Flags.enableLanguageExperiments}=no-constant-update-2018']);
14+
runTest() async {
15+
CompilationResult result =
16+
await runCompiler(memorySourceFiles: MEMORY_SOURCE_FILES);
2117

2218
Compiler compiler = result.compiler;
2319
var closedWorld = compiler.backendClosedWorldForTesting;
@@ -52,8 +48,6 @@ void main() {
5248
asyncTest(() async {
5349
print('--test from kernel------------------------------------------------');
5450
await runTest();
55-
print('--test from kernel with CFE constants-----------------------------');
56-
await runTest(useCFEConstants: true);
5751
});
5852
}
5953

tests/compiler/dart2js/deferred/not_in_main_test.dart

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
// much be included in the initial download (loaded eagerly).
88

99
import 'package:async_helper/async_helper.dart';
10-
import 'package:compiler/src/commandline_options.dart';
1110
import 'package:compiler/src/compiler.dart';
1211
import 'package:expect/expect.dart';
1312
import '../helpers/memory_compiler.dart';
@@ -17,18 +16,11 @@ void main() {
1716
print('--test from kernel------------------------------------------------');
1817
await deferredTest1();
1918
await deferredTest2();
20-
print('--test from kernel with CFE constants-----------------------------');
21-
await deferredTest1(useCFEConstants: true);
22-
await deferredTest2(useCFEConstants: true);
2319
});
2420
}
2521

26-
deferredTest1({bool useCFEConstants: false}) async {
27-
CompilationResult result = await runCompiler(
28-
memorySourceFiles: TEST1,
29-
options: useCFEConstants
30-
? ['${Flags.enableLanguageExperiments}=constant-update-2018']
31-
: ['${Flags.enableLanguageExperiments}=no-constant-update-2018']);
22+
deferredTest1() async {
23+
CompilationResult result = await runCompiler(memorySourceFiles: TEST1);
3224

3325
Compiler compiler = result.compiler;
3426
var closedWorld = compiler.backendClosedWorldForTesting;
@@ -44,12 +36,8 @@ deferredTest1({bool useCFEConstants: false}) async {
4436
Expect.notEquals(mainOutputUnit, outputUnitForMember(foo2));
4537
}
4638

47-
deferredTest2({bool useCFEConstants: false}) async {
48-
CompilationResult result = await runCompiler(
49-
memorySourceFiles: TEST2,
50-
options: useCFEConstants
51-
? ['${Flags.enableLanguageExperiments}=constant-update-2018']
52-
: ['${Flags.enableLanguageExperiments}=no-constant-update-2018']);
39+
deferredTest2() async {
40+
CompilationResult result = await runCompiler(memorySourceFiles: TEST2);
5341

5442
Compiler compiler = result.compiler;
5543
var closedWorld = compiler.backendClosedWorldForTesting;

0 commit comments

Comments
 (0)