|
This change makes it easier to put type parameters on JavaScript Arrays.
There is one special factory constructor for putting the type on an existing Array, and some higher level factory constructors that implement the common List subtypes.
The effect of this is to move the type parameter assignment from every "new List" site to a handful of site within JSArray. This shrinks some programs by half a percent, e,g, 3k of swarm.
JSArray.toList() and JSArray.sublist() now return JSArrays with the expected type parameters.
R=karlklose@google.com, ngeoffray@google.com
Committed: https://code.google.com/p/dart/source/detail?r=30374
Total comments: 2
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+107 lines, -53 lines) |
Patch |
|
M |
sdk/lib/_internal/compiler/implementation/js_backend/backend.dart
|
View
|
1
|
2 chunks |
+2 lines, -0 lines |
0 comments
|
Download
|
|
M |
sdk/lib/_internal/compiler/implementation/ssa/builder.dart
|
View
|
1
|
5 chunks |
+4 lines, -4 lines |
0 comments
|
Download
|
|
M |
sdk/lib/_internal/lib/core_patch.dart
|
View
|
|
2 chunks |
+3 lines, -16 lines |
0 comments
|
Download
|
|
M |
sdk/lib/_internal/lib/js_array.dart
|
View
|
|
4 chunks |
+73 lines, -8 lines |
0 comments
|
Download
|
|
M |
sdk/lib/_internal/lib/js_names.dart
|
View
|
1
2
|
2 chunks |
+2 lines, -3 lines |
0 comments
|
Download
|
|
M |
sdk/lib/_internal/lib/js_primitives.dart
|
View
|
|
2 chunks |
+0 lines, -17 lines |
0 comments
|
Download
|
|
M |
tests/compiler/dart2js/mirrors_used_test.dart
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
tests/compiler/dart2js/mock_compiler.dart
|
View
|
|
1 chunk |
+3 lines, -1 line |
0 comments
|
Download
|
|
M |
tests/compiler/dart2js/resolver_test.dart
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
tests/compiler/dart2js/value_range_test.dart
|
View
|
|
1 chunk |
+2 lines, -0 lines |
0 comments
|
Download
|
|
M |
tests/corelib/iterable_to_list_test.dart
|
View
|
|
4 chunks |
+12 lines, -0 lines |
0 comments
|
Download
|
|
M |
tests/utils/dummy_compiler_test.dart
|
View
|
|
2 chunks |
+4 lines, -2 lines |
0 comments
|
Download
|
Total messages: 6 (0 generated)
|