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

Side by Side Diff: lib/runtime/dart_utils.js

Issue 1252953003: Implement more of dart:mirrors (Closed) Base URL: https://github.com/dart-lang/dev_compiler.git@master
Patch Set: Address comments Created 5 years, 4 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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 /* This library defines a set of general javascript utilities for us 5 /* This library defines a set of general javascript utilities for us
6 * by the Dart runtime. 6 * by the Dart runtime.
7 */ 7 */
8 8
9 var dart_utils = 9 var dart_utils =
10 typeof module != "undefined" && module.exports || {}; 10 typeof module != "undefined" && module.exports || {};
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 return copyTheseProperties(to, from, getOwnNamesAndSymbols(from)); 106 return copyTheseProperties(to, from, getOwnNamesAndSymbols(from));
107 } 107 }
108 dart_utils.copyProperties = copyProperties; 108 dart_utils.copyProperties = copyProperties;
109 109
110 /** Exports from one Dart module to another. */ 110 /** Exports from one Dart module to another. */
111 function export_(to, from, show, hide) { 111 function export_(to, from, show, hide) {
112 if (show == void 0) { 112 if (show == void 0) {
113 show = getOwnNamesAndSymbols(from); 113 show = getOwnNamesAndSymbols(from);
114 } 114 }
115 if (hide != void 0) { 115 if (hide != void 0) {
116 var hideMap = new Map(hide); 116 var hideMap = new Set(hide);
vsm 2015/08/07 18:20:33 John - does this look right? I was hitting an err
Jennifer Messerly 2015/08/07 18:52:59 oh my gosh, good catch, it was supposed to be Set.
117 show = show.filter((k) => !hideMap.has(k)); 117 show = show.filter((k) => !hideMap.has(k));
118 } 118 }
119 return copyTheseProperties(to, from, show); 119 return copyTheseProperties(to, from, show);
120 } 120 }
121 dart_utils.export = export_; 121 dart_utils.export = export_;
122 122
123 })(dart_utils); 123 })(dart_utils);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698