Skip to content

Commit

Permalink
[dart2js] Fix function_type GVN bug
Browse files Browse the repository at this point in the history
Fixes flutter#30476

Change-Id: Ie1e536c197b137ccddeeaa45d337f1bd16a2ff78
Reviewed-on: https://dart-review.googlesource.com/68848
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
  • Loading branch information
rakudrama committed Aug 8, 2018
1 parent 4196c0e commit 4d156f9
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 23 deletions.
2 changes: 1 addition & 1 deletion pkg/compiler/lib/src/elements/types.dart
Original file line number Diff line number Diff line change
Expand Up @@ -707,8 +707,8 @@ class FunctionType extends DartType {
}

bool _equalsInternal(FunctionType other, _Assumptions assumptions) {
if (typeVariables.length != other.typeVariables.length) return false;
if (typeVariables.isNotEmpty) {
if (typeVariables.length != other.typeVariables.length) return false;
assumptions ??= new _Assumptions();
for (int index = 0; index < typeVariables.length; index++) {
assumptions.assume(typeVariables[index], other.typeVariables[index]);
Expand Down
22 changes: 0 additions & 22 deletions tests/language_2/language_2_dart2js.status
Original file line number Diff line number Diff line change
Expand Up @@ -116,33 +116,11 @@ field_override_optimization_test: RuntimeError
field_type_check2_test/01: MissingRuntimeError
regress_23996_test: RuntimeError # Jsshell does not provide non-zero timers, Issue 7728

[ $compiler == dart2js && $runtime != none ]
function_type/function_type0_test: RuntimeError # Issue 30476
function_type/function_type1_test: RuntimeError # Issue 30476
function_type/function_type2_test: RuntimeError # Issue 30476
function_type/function_type3_test: RuntimeError # Issue 30476
function_type/function_type58_test: RuntimeError # Issue 30476
function_type/function_type96_test: RuntimeError # Issue 30476
function_type/function_type97_test: RuntimeError # Issue 30476
function_type/function_type98_test: RuntimeError # Issue 30476
function_type/function_type99_test: RuntimeError # Issue 30476

[ $compiler == dart2js && $runtime != none && $checked ]
assert_with_message_test: RuntimeError
syncstar_covariant_type_test: RuntimeError # dart2js misplaces check in Iterator, not Iterable.
syncstar_dcall_type_test: RuntimeError # dart2js misplaces check in Iterator, not Iterable.

[ $compiler == dart2js && $runtime != none && $host_checked ]
function_type/function_type0_test: RuntimeError # Issue 30476
function_type/function_type1_test: RuntimeError # Issue 30476
function_type/function_type2_test: RuntimeError # Issue 30476
function_type/function_type3_test: RuntimeError # Issue 30476
function_type/function_type58_test: Crash # Failed assertion: line 2259 pos 18: 'other.gvnEquals(instruction) && instruction.gvnEquals(other)': is not true.
function_type/function_type96_test: Crash # Failed assertion: line 2259 pos 18: 'other.gvnEquals(instruction) && instruction.gvnEquals(other)': is not true.
function_type/function_type97_test: Crash # Failed assertion: line 2259 pos 18: 'other.gvnEquals(instruction) && instruction.gvnEquals(other)': is not true.
function_type/function_type98_test: Crash # Failed assertion: line 2259 pos 18: 'other.gvnEquals(instruction) && instruction.gvnEquals(other)': is not true.
function_type/function_type99_test: Crash # Failed assertion: line 2259 pos 18: 'other.gvnEquals(instruction) && instruction.gvnEquals(other)': is not true.

[ $compiler == dart2js && $runtime == safari ]
field_override_optimization_test: RuntimeError
field_type_check2_test/01: MissingRuntimeError
Expand Down

0 comments on commit 4d156f9

Please sign in to comment.