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

Unified Diff: sdk/lib/_internal/lib/internal_patch.dart

Issue 134893003: Add internal operation that converts a growable list to a fixed list. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 10 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
Index: sdk/lib/_internal/lib/internal_patch.dart
diff --git a/sdk/lib/_internal/lib/internal_patch.dart b/sdk/lib/_internal/lib/internal_patch.dart
index cccc6569f5e4db64e692815f57fc58ddc89c7bef..ae0f29d1530f07086f70834020fa613964659da4 100644
--- a/sdk/lib/_internal/lib/internal_patch.dart
+++ b/sdk/lib/_internal/lib/internal_patch.dart
@@ -3,6 +3,7 @@
// BSD-style license that can be found in the LICENSE file.
import 'dart:_js_primitives' show printString;
+import 'dart:_js_helper' show JS;
patch class Symbol implements core.Symbol {
patch const Symbol(String name)
@@ -11,4 +12,9 @@ patch class Symbol implements core.Symbol {
patch void printToConsole(String line) {
printString('$line');
-}
+}
+
+patch makeListFixedLength(List growableList) {
+ JS('void', r'#.fixed$length = #', growableList, true);
floitsch 2014/02/06 16:38:39 use the static method in jsArray.
Lasse Reichstein Nielsen 2014/02/07 12:55:25 Done.
+ return growableList;
+}

Powered by Google App Engine
This is Rietveld 408576698