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

Unified Diff: sdk/lib/_internal/js_runtime/lib/core_patch.dart

Issue 1629553002: List constructor sentinel must not implement 'int' (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/compiler/lib/src/ssa/builder.dart ('k') | sdk/lib/_internal/js_runtime/lib/js_array.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/js_runtime/lib/core_patch.dart
diff --git a/sdk/lib/_internal/js_runtime/lib/core_patch.dart b/sdk/lib/_internal/js_runtime/lib/core_patch.dart
index 8a3cc9d17bdb8c9dba3523c1fcdff142b3eafa0e..b5ad1e8314eb5596097e5689cbf1c1d45dbd3311 100644
--- a/sdk/lib/_internal/js_runtime/lib/core_patch.dart
+++ b/sdk/lib/_internal/js_runtime/lib/core_patch.dart
@@ -340,20 +340,11 @@ class Stopwatch {
static int _now() => Primitives.timerTicks();
}
-class _ListConstructorSentinel extends JSInt {
- const _ListConstructorSentinel();
-}
-
// Patch for List implementation.
@patch
class List<E> {
@patch
- factory List([int length = const _ListConstructorSentinel()]) {
- if (length == const _ListConstructorSentinel()) {
- return new JSArray<E>.emptyGrowable();
- }
- return new JSArray<E>.fixed(length);
- }
+ factory List([int length]) = JSArray<E>.list;
@patch
factory List.filled(int length, E fill, {bool growable: false}) {
« no previous file with comments | « pkg/compiler/lib/src/ssa/builder.dart ('k') | sdk/lib/_internal/js_runtime/lib/js_array.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698