Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3)

Issue 12328104: Change new List(n) to return fixed length list. (Closed)

Created:
7 years, 10 months ago by Lasse Reichstein Nielsen
Modified:
7 years, 9 months ago
CC:
reviews_dartlang.org, bakster, kasperl
Visibility:
Public.

Description

Change new List(n) to return fixed length list. Deprecate List.fixedLength, add List.filled. Make Iterable.toList and List.from take "growable" argument, defaulting to false. Committed: https://code.google.com/p/dart/source/detail?r=19112

Patch Set 1 #

Total comments: 41

Patch Set 2 : Address comments, except IterableMixinWorkaround #

Patch Set 3 : Merge to head. #

Total comments: 7
Unified diffs Side-by-side diffs Delta from patch set Stats (+830 lines, -597 lines) Patch
M editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/ui/internal/cleanup/migration/Migrate_1M3_corelib_CleanUp.java View 1 2 chunks +4 lines, -4 lines 0 comments Download
M editor/tools/plugins/com.google.dart.tools.ui_test/src/com/google/dart/tools/ui/cleanup/MigrateCleanUpTest.java View 1 1 chunk +3 lines, -3 lines 0 comments Download
M editor/util/plugins/com.google.dart.java2dart/resources/java_engine.dart View 1 chunk +2 lines, -2 lines 0 comments Download
M editor/util/plugins/com.google.dart.java2dart_test/src/com/google/dart/java2dart/SyntaxTranslatorTest.java View 1 2 2 chunks +4 lines, -4 lines 0 comments Download
M pkg/analyzer-experimental/lib/src/generated/ast.dart View 2 chunks +2 lines, -2 lines 0 comments Download
M pkg/analyzer-experimental/lib/src/generated/element.dart View 26 chunks +26 lines, -26 lines 0 comments Download
M pkg/analyzer-experimental/lib/src/generated/engine.dart View 2 chunks +2 lines, -2 lines 0 comments Download
M pkg/analyzer-experimental/lib/src/generated/error.dart View 2 chunks +2 lines, -2 lines 0 comments Download
M pkg/analyzer-experimental/lib/src/generated/java_engine.dart View 2 chunks +2 lines, -2 lines 0 comments Download
M pkg/analyzer-experimental/lib/src/generated/resolver.dart View 4 chunks +4 lines, -4 lines 0 comments Download
M pkg/analyzer-experimental/lib/src/generated/scanner.dart View 4 chunks +4 lines, -4 lines 0 comments Download
M pkg/analyzer-experimental/test/generated/element_test.dart View 5 chunks +6 lines, -6 lines 0 comments Download
M pkg/analyzer-experimental/test/generated/parser_test.dart View 13 chunks +13 lines, -13 lines 0 comments Download
M pkg/analyzer-experimental/test/generated/scanner_test.dart View 1 chunk +1 line, -1 line 0 comments Download
M pkg/analyzer-experimental/test/generated/test_support.dart View 2 chunks +2 lines, -2 lines 0 comments Download
M pkg/args/lib/args.dart View 1 chunk +1 line, -1 line 0 comments Download
M pkg/fixnum/lib/src/int32.dart View 2 chunks +2 lines, -2 lines 0 comments Download
M pkg/fixnum/lib/src/int64.dart View 1 chunk +1 line, -1 line 0 comments Download
M pkg/fixnum/test/int_64_vm_test.dart View 1 chunk +1 line, -1 line 0 comments Download
M pkg/http/lib/src/multipart_request.dart View 1 chunk +1 line, -1 line 0 comments Download
M pkg/pathos/lib/path.dart View 1 chunk +2 lines, -1 line 0 comments Download
M pkg/serialization/lib/src/basic_rule.dart View 1 1 chunk +10 lines, -3 lines 0 comments Download
M pkg/serialization/lib/src/format.dart View 2 chunks +2 lines, -2 lines 0 comments Download
M pkg/serialization/lib/src/serialization_helpers.dart View 2 chunks +4 lines, -4 lines 0 comments Download
M pkg/unittest/lib/src/collection_matchers.dart View 1 chunk +1 line, -1 line 0 comments Download
M runtime/bin/process_patch.dart View 2 chunks +2 lines, -2 lines 0 comments Download
M runtime/bin/socket_patch.dart View 1 chunk +3 lines, -3 lines 0 comments Download
M runtime/lib/array.dart View 2 chunks +4 lines, -4 lines 0 comments Download
M runtime/lib/array_patch.dart View 1 chunk +4 lines, -3 lines 2 comments Download
M runtime/lib/byte_array.dart View 1 chunk +2 lines, -2 lines 0 comments Download
M runtime/lib/expando_patch.dart View 2 chunks +2 lines, -2 lines 0 comments Download
M runtime/lib/function_patch.dart View 1 chunk +2 lines, -2 lines 0 comments Download
M runtime/lib/growable_array.dart View 1 chunk +2 lines, -2 lines 0 comments Download
M runtime/lib/math_patch.dart View 1 chunk +1 line, -1 line 0 comments Download
M runtime/lib/regexp_patch.dart View 1 chunk +1 line, -1 line 0 comments Download
M runtime/lib/string_base.dart View 1 1 chunk +1 line, -1 line 0 comments Download
M runtime/vm/flow_graph_builder.cc View 1 chunk +3 lines, -3 lines 1 comment Download
M runtime/vm/snapshot_test.dart View 8 chunks +11 lines, -11 lines 0 comments Download
M runtime/vm/symbols.h View 1 chunk +0 lines, -1 line 0 comments Download
M samples/chat/chat_server_lib.dart View 1 chunk +1 line, -1 line 0 comments Download
M samples/clock/web/clock.dart View 1 chunk +3 lines, -3 lines 0 comments Download
M samples/clock/web/numbers.dart View 1 chunk +1 line, -1 line 0 comments Download
M samples/dartcombat/grids.dart View 2 chunks +4 lines, -4 lines 0 comments Download
M samples/sample_extension/sample_asynchronous_extension.dart View 1 chunk +1 line, -1 line 0 comments Download
M samples/swarm/swarm_ui_lib/layout/GridLayout.dart View 1 chunk +1 line, -1 line 0 comments Download
M samples/tests/samples/chat/chat_server_test.dart View 1 chunk +2 lines, -2 lines 0 comments Download
M sdk/lib/_collection_dev/iterable.dart View 2 chunks +8 lines, -3 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/js/nodes.dart View 1 1 chunk +1 line, -2 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/js_backend/backend.dart View 1 2 2 chunks +4 lines, -4 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart View 1 2 1 chunk +2 lines, -3 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/lib/core_patch.dart View 1 2 1 chunk +5 lines, -4 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/lib/js_array.dart View 1 chunk +2 lines, -1 line 0 comments Download
M sdk/lib/_internal/compiler/implementation/scanner/keyword.dart View 2 chunks +2 lines, -2 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/source_file_provider.dart View 1 chunk +1 line, -1 line 0 comments Download
M sdk/lib/_internal/compiler/implementation/ssa/optimize.dart View 1 2 5 chunks +6 lines, -5 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/ssa/value_set.dart View 2 chunks +2 lines, -2 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/util/link.dart View 1 chunk +1 line, -1 line 0 comments Download
M sdk/lib/_internal/compiler/implementation/util/link_implementation.dart View 1 1 chunk +2 lines, -6 lines 0 comments Download
M sdk/lib/async/future_impl.dart View 1 chunk +1 line, -1 line 0 comments Download
M sdk/lib/collection/hash_table.dart View 1 chunk +1 line, -1 line 0 comments Download
M sdk/lib/collection/linked_hash_table.dart View 1 chunk +1 line, -1 line 0 comments Download
M sdk/lib/collection/queue.dart View 4 chunks +10 lines, -5 lines 0 comments Download
M sdk/lib/core/iterable.dart View 1 chunk +2 lines, -1 line 0 comments Download
M sdk/lib/core/list.dart View 1 2 chunks +71 lines, -10 lines 3 comments Download
M sdk/lib/core/string.dart View 1 chunk +1 line, -1 line 0 comments Download
M sdk/lib/crypto/hash_utils.dart View 2 chunks +3 lines, -3 lines 0 comments Download
M sdk/lib/crypto/hmac.dart View 2 chunks +2 lines, -2 lines 0 comments Download
M sdk/lib/crypto/sha1.dart View 1 chunk +1 line, -1 line 0 comments Download
M sdk/lib/crypto/sha256.dart View 1 chunk +1 line, -1 line 0 comments Download
M sdk/lib/html/dart2js/html_dart2js.dart View 38 chunks +110 lines, -39 lines 1 comment Download
M sdk/lib/html/dartium/html_dartium.dart View 39 chunks +111 lines, -40 lines 0 comments Download
M sdk/lib/html/html_common/filtered_element_list.dart View 1 chunk +2 lines, -1 line 0 comments Download
M sdk/lib/io/directory_impl.dart View 5 chunks +5 lines, -5 lines 0 comments Download
M sdk/lib/io/file_impl.dart View 1 2 18 chunks +18 lines, -18 lines 0 comments Download
M sdk/lib/io/mime_multipart_parser.dart View 1 chunk +1 line, -1 line 0 comments Download
M sdk/lib/io/string_transformer.dart View 1 2 1 chunk +1 line, -1 line 0 comments Download
M sdk/lib/io/websocket_impl.dart View 2 chunks +2 lines, -2 lines 0 comments Download
M sdk/lib/isolate/mangler.dart View 1 chunk +1 line, -1 line 0 comments Download
M sdk/lib/svg/dart2js/svg_dart2js.dart View 1 2 6 chunks +18 lines, -6 lines 0 comments Download
M sdk/lib/svg/dartium/svg_dartium.dart View 6 chunks +18 lines, -6 lines 0 comments Download
M sdk/lib/utf/utf16.dart View 4 chunks +4 lines, -4 lines 0 comments Download
M sdk/lib/utf/utf32.dart View 1 chunk +1 line, -1 line 0 comments Download
M sdk/lib/utf/utf8.dart View 3 chunks +3 lines, -3 lines 0 comments Download
M sdk/lib/utf/utf_core.dart View 3 chunks +3 lines, -3 lines 0 comments Download
M sdk/lib/utf/utf_stream.dart View 1 2 1 chunk +1 line, -1 line 0 comments Download
M sdk/lib/web_sql/dart2js/web_sql_dart2js.dart View 1 2 1 chunk +3 lines, -1 line 0 comments Download
M sdk/lib/web_sql/dartium/web_sql_dartium.dart View 1 2 1 chunk +3 lines, -1 line 0 comments Download
M tests/co19/co19-dart2dart.status View 1 chunk +0 lines, -9 lines 0 comments Download
M tests/co19/co19-dart2js.status View 1 2 1 chunk +0 lines, -9 lines 0 comments Download
M tests/co19/co19-runtime.status View 1 chunk +0 lines, -9 lines 0 comments Download
M tests/compiler/dart2js/value_range_test.dart View 7 chunks +8 lines, -8 lines 0 comments Download
M tests/compiler/dart2js_extra/invalid_length_negative_test.dart View 1 chunk +1 line, -1 line 0 comments Download
M tests/compiler/dart2js_extra/list_factory_test.dart View 1 chunk +1 line, -1 line 0 comments Download
M tests/corelib/collection_contains_test.dart View 1 chunk +1 line, -1 line 0 comments Download
M tests/corelib/collection_removes_test.dart View 1 chunk +8 lines, -7 lines 0 comments Download
M tests/corelib/collection_test.dart View 1 chunk +1 line, -1 line 0 comments Download
M tests/corelib/for_in_test.dart View 1 chunk +1 line, -1 line 0 comments Download
M tests/corelib/indexed_list_access_test.dart View 1 chunk +1 line, -1 line 0 comments Download
M tests/corelib/iterable_join_test.dart View 1 chunk +1 line, -1 line 0 comments Download
M tests/corelib/linked_hash_map_test.dart View 1 chunk +2 lines, -2 lines 0 comments Download
M tests/corelib/list_fixed_test.dart View 2 chunks +2 lines, -2 lines 0 comments Download
M tests/corelib/list_growable_test.dart View 2 chunks +2 lines, -2 lines 0 comments Download
M tests/corelib/list_index_of_test.dart View 1 chunk +1 line, -1 line 0 comments Download
M tests/corelib/list_iterators_test.dart View 1 chunk +2 lines, -2 lines 0 comments Download
M tests/corelib/list_removeat_test.dart View 1 chunk +1 line, -1 line 0 comments Download
M tests/corelib/list_set_range_test.dart View 1 chunk +1 line, -1 line 0 comments Download
M tests/corelib/list_test.dart View 1 chunk +1 line, -1 line 0 comments Download
M tests/corelib/range_error_test.dart View 2 chunks +2 lines, -2 lines 0 comments Download
M tests/corelib/set_test.dart View 1 chunk +1 line, -1 line 0 comments Download
M tests/corelib/sort_helper.dart View 4 chunks +5 lines, -5 lines 0 comments Download
M tests/corelib/string_base_vm_test.dart View 1 chunk +1 line, -1 line 0 comments Download
M tests/corelib/string_from_list_test.dart View 1 chunk +1 line, -1 line 0 comments Download
M tests/corelib/strings_test.dart View 1 chunk +1 line, -1 line 0 comments Download
M tests/html/native_gc_test.dart View 2 chunks +2 lines, -2 lines 0 comments Download
M tests/isolate/mandel_isolate_test.dart View 2 chunks +2 lines, -2 lines 0 comments Download
M tests/isolate/message_test.dart View 1 chunk +1 line, -1 line 0 comments Download
M tests/isolate/multiple_timer_test.dart View 1 chunk +1 line, -1 line 0 comments Download
M tests/json/json_test.dart View 1 chunk +2 lines, -2 lines 0 comments Download
M tests/language/bailout4_test.dart View 1 chunk +1 line, -1 line 0 comments Download
M tests/language/compound_assignment_operator_test.dart View 1 chunk +1 line, -1 line 0 comments Download
M tests/language/const_list_test.dart View 1 chunk +2 lines, -2 lines 0 comments Download
M tests/language/deopt_no_feedback_test.dart View 1 chunk +2 lines, -2 lines 0 comments Download
M tests/language/execute_finally7_test.dart View 1 chunk +1 line, -1 line 0 comments Download
M tests/language/fannkuch_test.dart View 1 1 chunk +1 line, -1 line 0 comments Download
M tests/language/fixed_length_test.dart View 1 chunk +2 lines, -2 lines 0 comments Download
M tests/language/gc_test.dart View 1 chunk +2 lines, -2 lines 0 comments Download
M tests/language/generic_instanceof.dart View 1 chunk +55 lines, -55 lines 0 comments Download
M tests/language/incr_op_test.dart View 1 chunk +1 line, -1 line 0 comments Download
M tests/language/index_test.dart View 1 chunk +1 line, -1 line 0 comments Download
M tests/language/inst_field_initializer1_negative_test.dart View 1 chunk +1 line, -1 line 0 comments Download
M tests/language/instanceof2_test.dart View 5 chunks +5 lines, -5 lines 0 comments Download
M tests/language/list_test.dart View 4 chunks +8 lines, -8 lines 0 comments Download
M tests/language/local_function_test.dart View 3 chunks +5 lines, -5 lines 0 comments Download
M tests/language/many_calls_test.dart View 1 chunk +1 line, -1 line 0 comments Download
M tests/language/optimization_test.dart View 2 chunks +2 lines, -2 lines 0 comments Download
M tests/language/optimized_lists_test.dart View 1 chunk +1 line, -1 line 0 comments Download
M tests/language/string_test.dart View 1 chunk +1 line, -1 line 0 comments Download
M tests/language/type_cast_vm_test.dart View 1 chunk +1 line, -1 line 0 comments Download
M tests/language/type_vm_test.dart View 6 chunks +6 lines, -6 lines 0 comments Download
M tests/language/typed_message_test.dart View 1 chunk +1 line, -1 line 0 comments Download
M tests/lib/async/slow_consumer2_test.dart View 1 chunk +1 line, -1 line 0 comments Download
M tests/lib/async/slow_consumer3_test.dart View 1 chunk +1 line, -1 line 0 comments Download
M tests/lib/async/slow_consumer_test.dart View 1 chunk +1 line, -1 line 0 comments Download
M tests/lib/crypto/sha1_test.dart View 1 chunk +1 line, -1 line 0 comments Download
M tests/lib/crypto/sha256_test.dart View 1 chunk +1 line, -1 line 0 comments Download
M tests/standalone/io/dart_std_io_pipe_test.dart View 1 chunk +1 line, -1 line 0 comments Download
M tests/standalone/io/echo_server_stream_test.dart View 3 chunks +3 lines, -3 lines 0 comments Download
M tests/standalone/io/file_invalid_arguments_test.dart View 1 chunk +4 lines, -4 lines 0 comments Download
M tests/standalone/io/file_test.dart View 21 chunks +21 lines, -21 lines 0 comments Download
M tests/standalone/io/http_connection_close_test.dart View 1 chunk +1 line, -1 line 0 comments Download
M tests/standalone/io/http_head_test.dart View 1 chunk +1 line, -1 line 0 comments Download
M tests/standalone/io/http_keep_alive_test.dart View 1 chunk +1 line, -1 line 0 comments Download
M tests/standalone/io/raw_secure_server_socket_test.dart View 3 chunks +3 lines, -3 lines 0 comments Download
M tests/standalone/io/raw_socket_test.dart View 4 chunks +4 lines, -4 lines 0 comments Download
M tests/standalone/io/raw_socket_write_destroy_test.dart View 3 chunks +3 lines, -3 lines 0 comments Download
M tests/standalone/io/secure_server_socket_test.dart View 3 chunks +3 lines, -3 lines 0 comments Download
M tests/standalone/io/socket_exception_test.dart View 5 chunks +5 lines, -5 lines 0 comments Download
M tests/standalone/io/socket_many_connections_test.dart View 1 chunk +1 line, -1 line 0 comments Download
M tests/standalone/io/stream_pipe_test.dart View 2 chunks +3 lines, -3 lines 0 comments Download
M tests/standalone/io/web_socket_protocol_processor_test.dart View 3 chunks +3 lines, -3 lines 0 comments Download
M tests/standalone/out_of_memory_test.dart View 1 chunk +1 line, -1 line 0 comments Download
M tools/dom/src/CssClassSet.dart View 1 chunk +2 lines, -1 line 0 comments Download
M tools/dom/src/Serialization.dart View 1 chunk +1 line, -1 line 0 comments Download
M tools/dom/src/native_DOMImplementation.dart View 1 chunk +1 line, -1 line 0 comments Download
M tools/dom/templates/html/impl/impl_Document.darttemplate View 2 chunks +2 lines, -2 lines 0 comments Download
M tools/dom/templates/html/impl/impl_Element.darttemplate View 1 2 chunks +10 lines, -3 lines 0 comments Download
M tools/dom/templates/html/impl/impl_Node.darttemplate View 1 chunk +2 lines, -1 line 0 comments Download
M tools/dom/templates/immutable_list_mixin.darttemplate View 1 chunk +3 lines, -1 line 0 comments Download
M utils/apidoc/mdn/extract.dart View 1 chunk +1 line, -1 line 0 comments Download
M utils/lib/file_system_vm.dart View 1 chunk +1 line, -1 line 0 comments Download
M utils/peg/pegparser.dart View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 12 (0 generated)
Lasse Reichstein Nielsen
7 years, 10 months ago (2013-02-26 11:42:13 UTC) #1
floitsch
LGTM. https://codereview.chromium.org/12328104/diff/1/editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/ui/internal/cleanup/migration/Migrate_1M3_corelib_CleanUp.java File editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/ui/internal/cleanup/migration/Migrate_1M3_corelib_CleanUp.java (right): https://codereview.chromium.org/12328104/diff/1/editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/ui/internal/cleanup/migration/Migrate_1M3_corelib_CleanUp.java#newcode339 editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/ui/internal/cleanup/migration/Migrate_1M3_corelib_CleanUp.java:339: // new List(5) ---> new List(5) No. This ...
7 years, 10 months ago (2013-02-26 13:54:19 UTC) #2
Lasse Reichstein Nielsen
Ready to commit. Will do first thing tomorrow (if you don't want to try it ...
7 years, 10 months ago (2013-02-26 15:26:00 UTC) #3
Lasse Reichstein Nielsen
Committed patchset #3 manually as r19112 (presubmit successful).
7 years, 9 months ago (2013-02-27 08:46:25 UTC) #4
ngeoffray
https://codereview.chromium.org/12328104/diff/10002/sdk/lib/core/list.dart File sdk/lib/core/list.dart (right): https://codereview.chromium.org/12328104/diff/10002/sdk/lib/core/list.dart#newcode42 sdk/lib/core/list.dart:42: * growable list if [length] is omitted. Shouldn't you ...
7 years, 9 months ago (2013-02-27 08:59:12 UTC) #5
ngeoffray
https://codereview.chromium.org/12328104/diff/10002/sdk/lib/html/dart2js/html_dart2js.dart File sdk/lib/html/dart2js/html_dart2js.dart (right): https://codereview.chromium.org/12328104/diff/10002/sdk/lib/html/dart2js/html_dart2js.dart#newcode7976 sdk/lib/html/dart2js/html_dart2js.dart:7976: + output = <Element>[]; output is final
7 years, 9 months ago (2013-02-27 09:01:30 UTC) #6
floitsch
https://codereview.chromium.org/12328104/diff/10002/sdk/lib/core/list.dart File sdk/lib/core/list.dart (right): https://codereview.chromium.org/12328104/diff/10002/sdk/lib/core/list.dart#newcode42 sdk/lib/core/list.dart:42: * growable list if [length] is omitted. On 2013/02/27 ...
7 years, 9 months ago (2013-02-27 10:04:58 UTC) #7
ngeoffray
https://codereview.chromium.org/12328104/diff/10002/sdk/lib/core/list.dart File sdk/lib/core/list.dart (right): https://codereview.chromium.org/12328104/diff/10002/sdk/lib/core/list.dart#newcode42 sdk/lib/core/list.dart:42: * growable list if [length] is omitted. On 2013/02/27 ...
7 years, 9 months ago (2013-02-27 12:02:32 UTC) #8
Lasse Reichstein Nielsen
Schneider, could you just check out the VM change?
7 years, 9 months ago (2013-02-27 12:13:44 UTC) #9
Florian Schneider
VM changes LGTM. https://codereview.chromium.org/12328104/diff/10002/runtime/vm/flow_graph_builder.cc File runtime/vm/flow_graph_builder.cc (right): https://codereview.chromium.org/12328104/diff/10002/runtime/vm/flow_graph_builder.cc#newcode2008 runtime/vm/flow_graph_builder.cc:2008: if (node->arguments()->length() == 0) { style ...
7 years, 9 months ago (2013-02-27 12:26:55 UTC) #10
Ivan Posva
https://codereview.chromium.org/12328104/diff/10002/runtime/lib/array_patch.dart File runtime/lib/array_patch.dart (right): https://codereview.chromium.org/12328104/diff/10002/runtime/lib/array_patch.dart#newcode11 runtime/lib/array_patch.dart:11: if ((length is! int) || (length < 0)) { ...
7 years, 9 months ago (2013-02-27 18:14:35 UTC) #11
floitsch
7 years, 9 months ago (2013-02-28 09:41:57 UTC) #12
Message was sent while issue was closed.
https://codereview.chromium.org/12328104/diff/10002/runtime/lib/array_patch.dart
File runtime/lib/array_patch.dart (right):

https://codereview.chromium.org/12328104/diff/10002/runtime/lib/array_patch.d...
runtime/lib/array_patch.dart:11: if ((length is! int) || (length < 0)) {
On 2013/02/27 18:14:36, Ivan Posva wrote:
> Why do we still do manual type checking here?

1) because we didn't go through code to remove checks.
2) we do this check in dart2js, to avoid passing something bad to JS. This way
these two implementations are consistent.

Powered by Google App Engine
This is Rietveld 408576698