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

Side by Side Diff: lib/compiler/implementation/lib/isolate_patch.dart

Issue 11267018: Make getKeys, getValues getters (keys, values). (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Update status files with co19 issue number. Created 8 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 // Patch file for the dart:isolate library. 5 // Patch file for the dart:isolate library.
6 6
7 #import("dart:uri"); 7 #import("dart:uri");
8 8
9 /** 9 /**
10 * Called by the compiler to support switching 10 * Called by the compiler to support switching
(...skipping 837 matching lines...) Expand 10 before | Expand all | Expand 10 after
848 // list.forEach(_dispatch); 848 // list.forEach(_dispatch);
849 list.forEach((e) => _dispatch(e)); 849 list.forEach((e) => _dispatch(e));
850 } 850 }
851 851
852 visitMap(Map map) { 852 visitMap(Map map) {
853 final seen = _visited[map]; 853 final seen = _visited[map];
854 if (seen != null) return; 854 if (seen != null) return;
855 855
856 _visited[map] = true; 856 _visited[map] = true;
857 // TODO(sigmund): replace with the following: (bug #1660) 857 // TODO(sigmund): replace with the following: (bug #1660)
858 // map.getValues().forEach(_dispatch); 858 // map.values.forEach(_dispatch);
859 map.getValues().forEach((e) => _dispatch(e)); 859 map.values.forEach((e) => _dispatch(e));
860 } 860 }
861 861
862 visitSendPort(SendPort port) { 862 visitSendPort(SendPort port) {
863 if (port is _BufferingSendPort && port._port == null) { 863 if (port is _BufferingSendPort && port._port == null) {
864 ports.add(port._futurePort); 864 ports.add(port._futurePort);
865 } 865 }
866 } 866 }
867 } 867 }
868 868
869 /******************************************************** 869 /********************************************************
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after
1146 // TODO(floitsch): we are losing the generic type. 1146 // TODO(floitsch): we are losing the generic type.
1147 return ['list', id, jsArray]; 1147 return ['list', id, jsArray];
1148 } 1148 }
1149 1149
1150 visitMap(Map map) { 1150 visitMap(Map map) {
1151 int copyId = _visited[map]; 1151 int copyId = _visited[map];
1152 if (copyId != null) return ['ref', copyId]; 1152 if (copyId != null) return ['ref', copyId];
1153 1153
1154 int id = _nextFreeRefId++; 1154 int id = _nextFreeRefId++;
1155 _visited[map] = id; 1155 _visited[map] = id;
1156 var keys = _serializeList(map.getKeys()); 1156 var keys = _serializeList(map.keys);
1157 var values = _serializeList(map.getValues()); 1157 var values = _serializeList(map.values);
1158 // TODO(floitsch): we are losing the generic type. 1158 // TODO(floitsch): we are losing the generic type.
1159 return ['map', id, keys, values]; 1159 return ['map', id, keys, values];
1160 } 1160 }
1161 1161
1162 _serializeList(List list) { 1162 _serializeList(List list) {
1163 int len = list.length; 1163 int len = list.length;
1164 var result = new List(len); 1164 var result = new List(len);
1165 for (int i = 0; i < len; i++) { 1165 for (int i = 0; i < len; i++) {
1166 result[i] = _dispatch(list[i]); 1166 result[i] = _dispatch(list[i]);
1167 } 1167 }
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
1280 _window.clearTimeout(_handle); 1280 _window.clearTimeout(_handle);
1281 } else { 1281 } else {
1282 _window.clearInterval(_handle); 1282 _window.clearInterval(_handle);
1283 } 1283 }
1284 } 1284 }
1285 } 1285 }
1286 1286
1287 Timer _timerFactory(int millis, void callback(Timer timer), bool repeating) => 1287 Timer _timerFactory(int millis, void callback(Timer timer), bool repeating) =>
1288 repeating ? new _Timer.repeating(millis, callback) 1288 repeating ? new _Timer.repeating(millis, callback)
1289 : new _Timer(millis, callback); 1289 : new _Timer(millis, callback);
OLDNEW
« no previous file with comments | « lib/compiler/implementation/lib/constant_map.dart ('k') | lib/compiler/implementation/lib/js_helper.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698