[dart2js] Fix for issue 33500

Fix check for whether to lower JSArray.add to Array.push.

Change-Id: I22149bf7d31442b8a4bba6b6431239f5f031e55b
Reviewed-on: https://dart-review.googlesource.com/61104
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
diff --git a/pkg/compiler/lib/src/ssa/optimize.dart b/pkg/compiler/lib/src/ssa/optimize.dart
index bc0ea62..cd71861 100644
--- a/pkg/compiler/lib/src/ssa/optimize.dart
+++ b/pkg/compiler/lib/src/ssa/optimize.dart
@@ -424,7 +424,8 @@
         } else if (applies(commonElements.jsArrayAdd)) {
           // The codegen special cases array calls, but does not
           // inline argument type checks.
-          if (!_options.enableTypeAssertions) {
+          if (!_options.parameterCheckPolicy.isEmitted ||
+              input is HLiteralList) {
             target = commonElements.jsArrayAdd;
           }
         }
diff --git a/pkg/compiler/tool/status_files/log_parser.dart b/pkg/compiler/tool/status_files/log_parser.dart
index d373a2b..43df6f4 100644
--- a/pkg/compiler/tool/status_files/log_parser.dart
+++ b/pkg/compiler/tool/status_files/log_parser.dart
@@ -12,7 +12,7 @@
 
 /// Extracts test records from a test.py [log].
 List<Record> parse(String log) {
-  var records = [];
+  var records = <Record>[];
   var suite;
   var test;
   var config;
@@ -20,7 +20,7 @@
   var actual;
   var reason;
   var fullReason; // lines before stack, usually multiline reason.
-  var stack = [];
+  var stack = <String>[];
   var paragraph = []; // collector of lines for fullReason.
   bool reproIsNext = false;
   for (var line in log.split('\n')) {
diff --git a/tests/compiler/dart2js/rti/emission/function_type_argument_strong.dart b/tests/compiler/dart2js/rti/emission/function_type_argument_strong.dart
index 7b56dde..faa845a 100644
--- a/tests/compiler/dart2js/rti/emission/function_type_argument_strong.dart
+++ b/tests/compiler/dart2js/rti/emission/function_type_argument_strong.dart
@@ -5,12 +5,12 @@
 import 'package:expect/expect.dart';
 import 'package:meta/dart2js.dart';
 
-/*class: C:checks=[],instance,typeArgument*/
+/*class: C:checkedInstance,checks=[],instance,typeArgument*/
 class C {
   call(int i) {}
 }
 
-/*class: D:checks=[],instance,typeArgument*/
+/*class: D:checkedInstance,checks=[],instance,typeArgument*/
 class D {
   call(double i) {}
 }
diff --git a/tests/compiler/dart2js/rti/emission/list.dart b/tests/compiler/dart2js/rti/emission/list.dart
index 5be9f09..997bd49 100644
--- a/tests/compiler/dart2js/rti/emission/list.dart
+++ b/tests/compiler/dart2js/rti/emission/list.dart
@@ -9,10 +9,12 @@
 
 /*class: global#Iterable:checkedInstance*/
 
-/*class: A:checkedTypeArgument,checks=[],typeArgument*/
+/*kernel.class: A:checkedTypeArgument,checks=[],typeArgument*/
+/*strong.class: A:checkedInstance,checkedTypeArgument,checks=[],typeArgument*/
 class A {}
 
-/*class: B:checks=[],typeArgument*/
+/*kernel.class: B:checks=[],typeArgument*/
+/*strong.class: B:checkedInstance,checks=[],typeArgument*/
 class B {}
 
 @noInline
diff --git a/tests/corelib_2/corelib_2.status b/tests/corelib_2/corelib_2.status
index d7fb329..0e7b4ee 100644
--- a/tests/corelib_2/corelib_2.status
+++ b/tests/corelib_2/corelib_2.status
@@ -225,7 +225,6 @@
 list_concurrent_modify_test: RuntimeError
 main_test: RuntimeError
 nan_infinity_test/01: RuntimeError
-string_split_test/checkedstore: RuntimeError
 symbol_reserved_word_test/03: RuntimeError # Issue 19972, new Symbol('void') should be allowed.
 uri_base_test: Crash # RangeError (index): Invalid value: Valid value range is empty: 0
 
@@ -254,7 +253,6 @@
 main_test: RuntimeError
 nan_infinity_test/01: RuntimeError
 regexp/pcre_test: RuntimeError
-string_split_test/checkedstore: RuntimeError # Issue 30548: does not check stores into List<String>
 symbol_reserved_word_test/03: RuntimeError # Issue 19972, new Symbol('void') should be allowed.
 uri_base_test: RuntimeError
 
@@ -276,7 +274,6 @@
 nan_infinity_test/01: RuntimeError
 nsm_invocation_test: RuntimeError # Symbols don't match due to minifiaction.
 regexp/pcre_test: RuntimeError
-string_split_test/checkedstore: RuntimeError # Issue 30548: does not check stores into List<String>
 symbol_operator_test/03: RuntimeError
 symbol_operator_test/none: RuntimeError
 symbol_reserved_word_test/03: RuntimeError # Issue 19972, new Symbol('void') should be allowed.