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

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: Make top-level patch file native. Add comment. 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..485c8956de4fc8e34a10d138e0906fc50f142893 100644
--- a/sdk/lib/_internal/lib/internal_patch.dart
+++ b/sdk/lib/_internal/lib/internal_patch.dart
@@ -3,6 +3,8 @@
// BSD-style license that can be found in the LICENSE file.
import 'dart:_js_primitives' show printString;
+import 'dart:_js_helper' show JS;
+import 'dart:_interceptors' show JSArray;
patch class Symbol implements core.Symbol {
patch const Symbol(String name)
@@ -11,4 +13,9 @@ patch class Symbol implements core.Symbol {
patch void printToConsole(String line) {
printString('$line');
-}
+}
+
+patch List makeListFixedLength(List growableList) {
+ JSArray.markFixedList(growableList);
+ return growableList;
+}
« runtime/vm/parser.cc ('K') | « runtime/vm/parser.cc ('k') | sdk/lib/core/list.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698