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

Side by Side Diff: dart/sdk/lib/_internal/compiler/implementation/lib/js_mirrors.dart

Issue 16728005: Fix two type errors and dart2dart status. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | dart/tests/language/language.status » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 library dart._js_mirrors; 5 library dart._js_mirrors;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:mirrors'; 8 import 'dart:mirrors';
9 9
10 import 'dart:_foreign_helper' show JS, JS_CURRENT_ISOLATE; 10 import 'dart:_foreign_helper' show JS, JS_CURRENT_ISOLATE;
(...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after
395 JsVariableMirror mirror = new JsVariableMirror.from(field, metadata); 395 JsVariableMirror mirror = new JsVariableMirror.from(field, metadata);
396 if (mirror != null) { 396 if (mirror != null) {
397 result[mirror.simpleName] = mirror; 397 result[mirror.simpleName] = mirror;
398 mirror._owner = this; 398 mirror._owner = this;
399 } 399 }
400 } 400 }
401 return result; 401 return result;
402 } 402 }
403 403
404 Map<Symbol, Mirror> get members { 404 Map<Symbol, Mirror> get members {
405 Map<Symbol, Mirror> result = variables; 405 Map<Symbol, Mirror> result = new Map<Symbol, Mirror>.from(variables);
406 for (JsMethodMirror method in _methods) { 406 for (JsMethodMirror method in _methods) {
407 if (method.isSetter) { 407 if (method.isSetter) {
408 String name = n(method.simpleName); 408 String name = n(method.simpleName);
409 name = name.substring(0, name.length - 1); 409 name = name.substring(0, name.length - 1);
410 // Filter-out setters corresponding to variables. 410 // Filter-out setters corresponding to variables.
411 if (result[s(name)] is VariableMirror) continue; 411 if (result[s(name)] is VariableMirror) continue;
412 } 412 }
413 // Use putIfAbsent to filter-out getters corresponding to variables. 413 // Use putIfAbsent to filter-out getters corresponding to variables.
414 result.putIfAbsent(method.simpleName, () => method); 414 result.putIfAbsent(method.simpleName, () => method);
415 } 415 }
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after
699 List extractKeys(victim) { 699 List extractKeys(victim) {
700 return JS('List', ''' 700 return JS('List', '''
701 (function(victim, hasOwnProperty) { 701 (function(victim, hasOwnProperty) {
702 var result = []; 702 var result = [];
703 for (var key in victim) { 703 for (var key in victim) {
704 if (hasOwnProperty.call(victim, key)) result.push(key); 704 if (hasOwnProperty.call(victim, key)) result.push(key);
705 } 705 }
706 return result; 706 return result;
707 })(#, Object.prototype.hasOwnProperty)''', victim); 707 })(#, Object.prototype.hasOwnProperty)''', victim);
708 } 708 }
OLDNEW
« no previous file with comments | « no previous file | dart/tests/language/language.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698