dart-sdk/tests/dart2js
Stephen Adams 8c13fa841e [dart2js] Kernel transformer expansion for List.generate
Simple calls to `List.generate` are expanded into a list allocation
and a loop. This generates better code for several reasons:

 - There is no overhead for the function argument (closure allocation,
   closure type, closure class)

 - Global type inference is more precise since each List.generate list
   is tracked separately, and the assignments in the loop give better
   inference to the collection's element type.

To get precise element type inference, there are two new JSArray
constructors. Global type inference starts with the element type being
bottom for these elements, avoiding spurious nulls in the inferred
type.

Change-Id: I5efb90651ae3f9eb2e81af556704960cdf0b75c5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/168770
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2020-11-11 04:27:22 +00:00
..
deferred [dart2js] Add stressful unit / integation tests for deferred loading. 2020-10-13 17:55:58 +00:00
internal Rename is{Strong,Weak}Mode to has{Sound,Unsound}NullSafety 2020-11-05 14:26:53 +00:00
native [dart2js, ddc] Emit native null checks in sound mode only 2020-10-28 21:35:45 +00:00
regress
supermixin
3_test.dart
7_test.dart
12_test.dart
33_test.dart
43_test.dart
881_test.dart [dart2js] 20 dart2js tests ported to nnbd #1. 2020-06-26 15:21:42 +00:00
10216a_test.dart
10216b_test.dart
11673_test.dart
12320_test.dart [dart2js] 20 dart2js tests ported to nnbd #1. 2020-06-26 15:21:42 +00:00
16400_test.dart
16407_test.dart
16967_test.dart
17094_test.dart
17645_test.dart
17856_test.dart [dart2js] 20 dart2js tests ported to nnbd #1. 2020-06-26 15:21:42 +00:00
18175_test.dart [dart2js] Remove old bug work around in collector. 2020-07-22 17:51:00 +00:00
18383_test.dart
19191_test.dart
21351_test.dart
21579_test.dart
22487_test.dart
22776_test.dart
22868_test.dart
22917_test.dart
23404_test.dart
23432_test.dart
23486_helper.dart
23486_test.dart
23804_test.dart
23828_test.dart
26243_test.dart
27198_test.dart
27199_test.dart
27323_test.dart
27354_test.dart
28749_test.dart
28919_test.dart
29130_test.dart [dart2js] Fix tests/dart2js/29130_test. 2020-08-18 20:54:50 +00:00
31803_test.dart
32770a_test.dart
32770b_test.dart
32770c_test.dart [dart2js] 20 dart2js tests ported to nnbd #1. 2020-06-26 15:21:42 +00:00
32774_test.dart
32828_test.dart [dart2js] 20 dart2js tests ported to nnbd #1. 2020-06-26 15:21:42 +00:00
32853_test.dart
32928_test.dart
32969_test.dart
32997a_lib.dart
32997a_test.dart
32997b_lib.dart
32997b_test.dart
33296_test.dart
33572_test.dart
34156_test.dart
34701_test.dart
35341_test.dart
35356_test.dart
35853_test.dart
35965a_test.dart
37494_test.dart [dart2js] 20 dart2js tests ported to nnbd #1. 2020-06-26 15:21:42 +00:00
37576_test.dart
38005_test.dart
38949_test.dart
40152a_test.dart
40902_test.dart
41449a_test.dart [dart2js] 20 dart2js tests ported to nnbd #1. 2020-06-26 15:21:42 +00:00
41449b_test.dart [dart2js] 20 dart2js tests ported to nnbd #1. 2020-06-26 15:21:42 +00:00
41449c_test.dart [dart2js] Pass type arguments to callable properties even with 2020-07-24 11:09:15 +00:00
42088_test.dart [dart2js] Support conversion of local function type variables from K to J model 2020-07-07 06:46:21 +00:00
42189_test.dart [dart2js] 20 dart2js tests ported to nnbd #1. 2020-06-26 15:21:42 +00:00
42501_test.dart [dart2js] Ensure generic local functions are marked as potentially 2020-06-26 21:27:38 +00:00
42531_test.dart Fix #42531 2020-07-08 19:29:45 +00:00
assert_with_message_test.dart [dart2js] 20 dart2js tests ported to nnbd #1. 2020-06-26 15:21:42 +00:00
async_helper.dart
async_stacktrace_test.dart [dart2js] Clean up tests/dart2js/async_stacktrace_test. 2020-09-18 11:53:05 +00:00
big_allocation_expression_test.dart
block_expression_on_field_test.dart
bound_closure_interceptor_methods_test.dart
bound_closure_interceptor_type_test.dart [dart2js] 20 dart2js tests ported to nnbd #1. 2020-06-26 15:21:42 +00:00
bounded_type_literal_test.dart
bounds_check1a_test.dart
bounds_check1b_test.dart
bounds_check2a_test.dart
bounds_check2b_test.dart
bounds_check3a_test.dart
bounds_check3b_test.dart
bounds_check3c_test.dart
bounds_check4a_test.dart
bounds_check4b_test.dart
bounds_check_test.dart
break_test.dart
call_is_function_test.dart
call_signature_test.dart [dart2js] 20 dart2js tests ported to nnbd #1. 2020-06-26 15:21:42 +00:00
call_uninlined_test.dart
cfe_instance_constant_test.dart [dart2js] 20 dart2js tests ported to nnbd #1. 2020-06-26 15:21:42 +00:00
checked_setter_test.dart [dart2js] 20 dart2js tests ported to nnbd #1. 2020-06-26 15:21:42 +00:00
class_hierarchy_extends_clause_test.dart [dart2js] 20 dart2js tests ported to nnbd #1. 2020-06-26 15:21:42 +00:00
closure2_test.dart
closure3_test.dart
closure4_test.dart
closure5_test.dart
closure6_test.dart
closure7_test.dart
closure_capture2_test.dart
closure_capture3_test.dart
closure_capture4_test.dart
closure_capture5_test.dart
closure_capture6_test.dart
closure_capture7_test.dart [dart2js] 20 dart2js tests ported to nnbd #1. 2020-06-26 15:21:42 +00:00
closure_capture_test.dart
closure_signature_unneeded_test.dart
closure_test.dart
code_motion_exception_test.dart
compile_time_constant4_test.dart
compound_operator_index_test.dart [dart2js] 20 dart2js tests ported to nnbd #1. 2020-06-26 15:21:42 +00:00
conditional_rewrite_test.dart [dart2js] Port ~20 tests to nnbd #2. 2020-07-14 19:04:30 +00:00
conditional_send_test.dart [dart2js] Port ~20 tests to nnbd #2. 2020-07-14 19:04:30 +00:00
conditional_test.dart
conflict_index_test.dart
consistent_add_error_test.dart [dart2js] Port ~20 tests to nnbd #2. 2020-07-14 19:04:30 +00:00
consistent_codeUnitAt_error_test.dart [dart2js] Port ~20 tests to nnbd #2. 2020-07-14 19:04:30 +00:00
consistent_index_error_array_test.dart
consistent_index_error_string_test.dart
consistent_index_error_typed_list_test.dart
consistent_null_add_error_test.dart [dart2js] Port ~20 tests to nnbd #2. 2020-07-14 19:04:30 +00:00
consistent_subtract_error_test.dart [dart2js] Port ~20 tests to nnbd #2. 2020-07-14 19:04:30 +00:00
consistent_type_error_test.dart
constant_fold_number_dart2_j_s_test.dart
constant_folding2_test.dart
constant_folding_test.dart [dart2js] Port ~20 tests to nnbd #2. 2020-07-14 19:04:30 +00:00
constant_javascript_semantics2_test.dart
constant_javascript_semantics3_test.dart
constant_javascript_semantics4_test.dart
constant_javascript_semantics_test.dart
constant_javascript_semantics_test5.dart
constant_truncate_test.dart
crash_library_metadata.dart
dart2js.status [dart2js] Port ~20 tests to nnbd #2. 2020-07-14 19:04:30 +00:00
data_uri_test.dart
deferred_fail_and_retry_lib.dart
deferred_fail_and_retry_test.dart
deferred_function_types1_test.dart
deferred_function_types2_test.dart
deferred_function_types3_test.dart
deferred_function_types4_test.dart
deferred_function_types5_test.dart
deferred_function_types6_test.dart
deferred_function_types7_test.dart
deferred_function_types8_test.dart
deferred_function_types_lib1.dart
deferred_function_types_lib2.dart
deferred_inheritance_lib1.dart
deferred_inheritance_lib2.dart
deferred_inheritance_test.dart
deferred_split_lib1.dart
deferred_split_lib2.dart
deferred_split_test.dart
deferred_tearoff_load_library_lib.dart
deferred_tearoff_load_library_test.dart
deferred_with_cross_origin_lib.dart
deferred_with_cross_origin_test.dart
deferred_with_csp_nonce2_test.dart
deferred_with_csp_nonce_lib.dart
deferred_with_csp_nonce_test.dart
do_test.dart
dummy_compiler_test.dart
dynamic_bounds_check_test.dart
dynamic_invocation_test.dart
dynamic_type_literal_test.dart
effectively_constant_fields_test.dart [dart2js] Remove static error from effectively_constant_fields_test. 2020-07-31 14:58:10 +00:00
effectively_constant_instance_field_test.dart
empty_method_test.dart
eof_line_ending_test.dart
equals_test.dart
expose_this1_test.dart
expose_this2_test.dart
field_access_test.dart
field_in_constructor_test.dart
field_initializer_test.dart
fields_test.dart [dart2js] Port ~20 tests to nnbd #2. 2020-07-14 19:04:30 +00:00
first_class_types_hashcode_test.dart
fixed_type_argument_implements_test.dart
fixed_type_argument_test.dart
foo7_test.dart
for_in_test.dart [dart2js] Port ~20 tests to nnbd #2. 2020-07-14 19:04:30 +00:00
for_test.dart [dart2js] Port ~20 tests to nnbd #2. 2020-07-14 19:04:30 +00:00
function_parameters_test.dart
function_typed_arguments_test.dart
generator_elided_parameter_test.dart
generic_bounds_test.dart
generic_class_is_test.dart [dart2js] Port ~20 tests to nnbd #2. 2020-07-14 19:04:30 +00:00
generic_in_mixin_field_test.dart
generic_in_redirect_test.dart
generic_in_super_test.dart
generic_instantiation1_test.dart [dart2js] Port ~20 tests to nnbd #2. 2020-07-14 19:04:30 +00:00
generic_instantiation2_test.dart [dart2js] Port ~20 tests to nnbd #2. 2020-07-14 19:04:30 +00:00
generic_instantiation3_test.dart
generic_instantiation4_test.dart
generic_method_dynamic_is_test.dart
generic_method_dynamic_type_test.dart
generic_method_static_is_test.dart
generic_type_error_message_test.dart [dart2js] Port ~20 tests to nnbd #2. 2020-07-14 19:04:30 +00:00
generics_factories_test.dart
generics_is_check1_test.dart
getter_element_test.dart
getters_setters_test.dart [dart2js] Port ~20 tests to nnbd #2. 2020-07-14 19:04:30 +00:00
hash_code_test.dart
identical_trace_test.dart
if_in_loop_test.dart
if_null2_test.dart
if_null3_test.dart
if_null_test.dart
if_test.dart
index_test.dart
indirect_type_literal_test.dart
inference_super_set_call_test.dart
inferrer_is_int_test.dart [CFE] Don't issue bogus NNBD Strong error as package sets a language version 2020-07-09 12:42:11 +00:00
injected_cast_test.dart [dart2js] Port ~20 tests to nnbd #2. 2020-07-14 19:04:30 +00:00
inline_generic_test.dart
inline_position_crash_source.dart
inline_position_crash_test.dart
instantiation_stub_2_test.dart [dart2js] Port ~20 tests to nnbd #2. 2020-07-14 19:04:30 +00:00
instantiation_stub_test.dart
int_index_test.dart
interceptor_named_arguments_test.dart
interface_type_optimization_test.dart
invalid_annotation_test.dart
invoke_dynamic_test.dart
is_check_instanceof_test.dart [dart2js] Port ~20 tests to nnbd #3. 2020-07-15 21:50:10 +00:00
is_operator_test.dart
issue36562_test.dart
js_array_index_error_test.dart [dart2js] Port ~20 tests to nnbd #3. 2020-07-15 21:50:10 +00:00
js_array_removeLast_error_test.dart [dart2js] Port ~20 tests to nnbd #3. 2020-07-15 21:50:10 +00:00
js_array_sort_default_test.dart
js_interop_cast_test.dart
js_interop_implements_test.dart
js_interop_no_elide_optional_arg_test.dart
js_interop_optional_arg_test.dart
js_interop_test.dart
jsinterop_test.dart [package:js] Add checks for external keyword 2020-09-25 23:30:34 +00:00
label_test.dart
lax_runtime_type_closure_equals1_test.dart [dart2js] Port ~20 tests to nnbd #3. 2020-07-15 21:50:10 +00:00
lax_runtime_type_closure_equals2_test.dart [dart2js] Port ~20 tests to nnbd #3. 2020-07-15 21:50:10 +00:00
lax_runtime_type_closure_equals3_test.dart [dart2js] Port ~20 tests to nnbd #3. 2020-07-15 21:50:10 +00:00
lax_runtime_type_closure_equals4_test.dart [dart2js] Port ~20 tests to nnbd #3. 2020-07-15 21:50:10 +00:00
lax_runtime_type_closure_equals5_test.dart [dart2js] Port ~20 tests to nnbd #3. 2020-07-15 21:50:10 +00:00
lax_runtime_type_closure_equals6_test.dart [dart2js] Port ~20 tests to nnbd #3. 2020-07-15 21:50:10 +00:00
lax_runtime_type_closure_equals7_test.dart [dart2js] Port ~20 tests to nnbd #3. 2020-07-15 21:50:10 +00:00
lax_runtime_type_closure_equals8_test.dart [dart2js] Port ~20 tests to nnbd #3. 2020-07-15 21:50:10 +00:00
lax_runtime_type_closure_to_string3_test.dart [dart2js] Port ~20 tests to nnbd #3. 2020-07-15 21:50:10 +00:00
lax_runtime_type_closure_to_string4_test.dart [dart2js] Port ~20 tests to nnbd #3. 2020-07-15 21:50:10 +00:00
lax_runtime_type_closure_to_string5_test.dart
lax_runtime_type_closure_to_string6_test.dart
lax_runtime_type_equals1_test.dart
lax_runtime_type_equals2_test.dart
lax_runtime_type_equals3_test.dart
lax_runtime_type_equals4_test.dart
lax_runtime_type_instantiate_to_string_test.dart
LayoutTests_fast_mediastream_getusermedia_t01_test.dart
list_factory_test.dart [dart2js] Port ~20 tests to nnbd #3. 2020-07-15 21:50:10 +00:00
list_generate_1_test.dart [dart2js] Kernel transformer expansion for List.generate 2020-11-11 04:27:22 +00:00
list_generate_2_test.dart [dart2js] Kernel transformer expansion for List.generate 2020-11-11 04:27:22 +00:00
literal_string_juxtaposition_test.dart
literals_test.dart
local_function_call2_test.dart
local_function_call_test.dart
local_function_generic_strong_test.dart
local_function_signatures_strong_test.dart [dart2js] Port ~20 tests to nnbd #4. 2020-07-20 18:03:51 +00:00
local_function_signatures_test.dart [dart2js] Port ~20 tests to nnbd #4. 2020-07-20 18:03:51 +00:00
local_signature_test.dart
locals_test.dart
logical_and_test.dart
logical_or_test.dart
loop_if_phi_test.dart
many_constants_test.dart
many_fields_test.dart
many_instantiations_test.dart
map_to_set_test.dart
math_lib_prefix_test.dart
math_lib_test.dart
member_namespace_test.dart [dart2js] Port ~20 tests to nnbd #4. 2020-07-20 18:03:51 +00:00
method_signatures_strong_test.dart [dart2js] Port ~20 tests to nnbd #4. 2020-07-20 18:03:51 +00:00
method_signatures_test.dart [dart2js] Port ~20 tests to nnbd #4. 2020-07-20 18:03:51 +00:00
minus_zero2_test.dart [dart2js] Port ~20 tests to nnbd #4. 2020-07-20 18:03:51 +00:00
minus_zero_test.dart [dart2js] Port ~20 tests to nnbd #4. 2020-07-20 18:03:51 +00:00
mixin_subtype_test.dart
mixin_type_variable_test.dart [dart2js] Port ~20 tests to nnbd #4. 2020-07-20 18:03:51 +00:00
multi_global_def_single_instantiation_test.dart
named_mixin_runtime_type_test.dart
named_parameter_for_static_test.dart
named_parameter_test.dart
nan_negate_test.dart
new_from_env_test.dart
no_such_method_strong1_test.dart
no_such_method_strong2_test.dart
no_such_method_strong3_test.dart
no_such_method_strong4_test.dart
no_such_method_strong5_test.dart
no_such_method_strong6_test.dart
no_such_method_strong7_test.dart
no_such_method_strong8_test.dart
no_such_method_strong9_test.dart
no_such_method_strong10_test.dart
no_such_method_strong11_lib.dart
no_such_method_strong11_test.dart
no_such_method_strong12_test.dart
no_such_method_test.dart
non_jsinterop_test.dart [package:js] Add checks for external keyword 2020-09-25 23:30:34 +00:00
non_trivial_substitution_test.dart
not_equals_test.dart
not_test.dart
null_stacktrace_test.dart
null_test.dart
operator2_test.dart
operator3_test.dart
operator_equals_test.dart
operator_test.dart
optional_parameter_test.dart
panda_lib.dart
panda_test.dart [dart2js] Port some tests to nnbd #5. 2020-07-14 20:02:02 +00:00
phi_elimination_test.dart
phi_gvn_test.dart
phi_test.dart
private_symbol_literal_test.dart
recursive_metadata_test.dart [cfe] Check optional non-nullable parameters in constructors 2020-06-18 18:07:06 +00:00
regress_32069_test.dart
regress_36222_test.dart
regress_40349_test.dart [dart2js] Port some tests to nnbd #5. 2020-07-14 20:02:02 +00:00
regress_42281_test.dart Address review comments from 150935 2020-06-12 05:54:28 +00:00
regress_null_aware_test.dart [dart2js] Port some tests to nnbd #5. 2020-07-14 20:02:02 +00:00
regression_2913_test.dart
replaced_type_variable_test.dart
return_setter_test.dart [dart2js] Port some tests to nnbd #5. 2020-07-14 20:02:02 +00:00
round_constant_folding_test.dart
rti_need_for_closure_signature_test.dart
rti_need_for_runtime_type_test.dart
runtime_type_closure_equals1_test.dart [dart2js] Port some tests to nnbd #5. 2020-07-14 20:02:02 +00:00
runtime_type_closure_equals2_test.dart [dart2js] Port some tests to nnbd #5. 2020-07-14 20:02:02 +00:00
runtime_type_closure_equals3_test.dart [dart2js] Port some tests to nnbd #5. 2020-07-14 20:02:02 +00:00
runtime_type_closure_equals4_test.dart [dart2js] Port some tests to nnbd #5. 2020-07-14 20:02:02 +00:00
runtime_type_closure_equals5_test.dart [dart2js] Port some tests to nnbd #5. 2020-07-14 20:02:02 +00:00
runtime_type_closure_equals6_test.dart [dart2js] Port some tests to nnbd #5. 2020-07-14 20:02:02 +00:00
runtime_type_closure_equals7_test.dart [dart2js] Port some tests to nnbd #5. 2020-07-14 20:02:02 +00:00
runtime_type_closure_equals8_test.dart [dart2js] Port some tests to nnbd #5. 2020-07-14 20:02:02 +00:00
runtime_type_equals1_test.dart
runtime_type_equals2_test.dart
runtime_type_equals3_test.dart
runtime_type_equals4_test.dart
runtime_type_equals5_test.dart
runtime_type_equals6_test.dart
runtime_type_equals7_test.dart
runtime_type_equals8_test.dart
runtime_type_int_test.dart
runtime_type_test.dart
runtime_type_to_string1_test.dart
send_test.dart
simple_string_constant_test.dart
source_mapping_crash_source.dart
source_mapping_crash_test.dart
statements_test.dart
static_field2_test.dart [dart2js] Port some tests to nnbd #5. 2020-07-14 20:02:02 +00:00
static_field_test.dart [dart2js] Port some tests to nnbd #5. 2020-07-14 20:02:02 +00:00
static_method2_test.dart
static_method_test.dart
static_var_no_initializer_test.dart [dart2js] Port some tests to nnbd #5. 2020-07-14 20:02:02 +00:00
static_var_test.dart
string_escape_test.dart
string_interpolation_dynamic_test.dart
string_interpolation_opt1_test.dart [dart2js] Port some tests to nnbd #5. 2020-07-14 20:02:02 +00:00
string_interpolation_test.dart
super_call_test.dart
super_constructor1_test.dart [dart2js] Port some tests to nnbd #5. 2020-07-14 20:02:02 +00:00
super_constructor2_test.dart
switch_equals_test.dart
switch_test.dart
sync_star_element_rti_need_test.dart [dart2js] Add tests for https://dart-review.googlesource.com/c/sdk/+/162420. 2020-09-11 22:53:35 +00:00
tear_off_types_test.dart [dart2js] Port some tests to nnbd #5. 2020-07-14 20:02:02 +00:00
this_phi_elimination_test.dart
this_redirecting_constructor_test.dart
this_test.dart [dart2js] Port some tests to nnbd #5. 2020-07-14 20:02:02 +00:00
throw1_test.dart
throw2_test.dart
timer_test.dart
to_string_test.dart
truncation_errors_test.dart
type_argument_factory_crash_test.dart
type_argument_factory_nocrash_test.dart
type_argument_optimization_test.dart [dart2js] Port some tests to nnbd #5. 2020-07-14 20:02:02 +00:00
type_constant_switch_test.dart
type_error_message_test.dart
type_literal2_test.dart
type_literal_test.dart
typevariable_factory_test.dart
typevariable_substitution_test.dart
typevariable_typedef_test.dart
unconditional_dartio_import_test.dart
unused_local_const_test.dart
useful_error_message_1_test.dart
while_test.dart