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

Side by Side Diff: pkg/dartdoc/mirrors/dart2js_mirror.dart

Issue 10928139: Changed interfaces to abstract classes where possible in {lib,samples,pkg} (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 3 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
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 #library('mirrors.dart2js'); 5 #library('mirrors.dart2js');
6 6
7 #import('../../../lib/compiler/compiler.dart', prefix: 'diagnostics'); 7 #import('../../../lib/compiler/compiler.dart', prefix: 'diagnostics');
8 #import('../../../lib/compiler/implementation/elements/elements.dart'); 8 #import('../../../lib/compiler/implementation/elements/elements.dart');
9 #import('../../../lib/compiler/implementation/apiimpl.dart', prefix: 'api'); 9 #import('../../../lib/compiler/implementation/apiimpl.dart', prefix: 'api');
10 #import('../../../lib/compiler/implementation/scanner/scannerlib.dart'); 10 #import('../../../lib/compiler/implementation/scanner/scannerlib.dart');
(...skipping 358 matching lines...) Expand 10 before | Expand all | Expand 10 after
369 369
370 Future<String> compileToJavaScript() => 370 Future<String> compileToJavaScript() =>
371 new Future<String>.immediate(_compiler.assembledCode); 371 new Future<String>.immediate(_compiler.assembledCode);
372 } 372 }
373 373
374 374
375 //------------------------------------------------------------------------------ 375 //------------------------------------------------------------------------------
376 // Dart2Js specific extensions of mirror interfaces 376 // Dart2Js specific extensions of mirror interfaces
377 //------------------------------------------------------------------------------ 377 //------------------------------------------------------------------------------
378 378
379 interface Dart2JsMirror extends Mirror { 379 abstract class Dart2JsMirror implements Mirror {
380 /** 380 /**
381 * A unique name used as the key in maps. 381 * A unique name used as the key in maps.
382 */ 382 */
383 final String canonicalName; 383 String get canonicalName;
384 final Dart2JsMirrorSystem system; 384 Dart2JsMirrorSystem get system;
385 } 385 }
386 386
387 interface Dart2JsMemberMirror extends Dart2JsMirror, MemberMirror { 387 abstract class Dart2JsMemberMirror implements Dart2JsMirror, MemberMirror {
388 388
389 } 389 }
390 390
391 interface Dart2JsTypeMirror extends Dart2JsMirror, TypeMirror { 391 abstract class Dart2JsTypeMirror implements Dart2JsMirror, TypeMirror {
392 392
393 } 393 }
394 394
395 abstract class Dart2JsElementMirror implements Dart2JsMirror { 395 abstract class Dart2JsElementMirror implements Dart2JsMirror {
396 final Dart2JsMirrorSystem system; 396 final Dart2JsMirrorSystem system;
397 final Element _element; 397 final Element _element;
398 398
399 Dart2JsElementMirror(this.system, this._element) { 399 Dart2JsElementMirror(this.system, this._element) {
400 assert (system !== null); 400 assert (system !== null);
401 assert (_element !== null); 401 assert (_element !== null);
(...skipping 981 matching lines...) Expand 10 before | Expand all | Expand 10 after
1383 if (node !== null) { 1383 if (node !== null) {
1384 var span = system.compiler.spanFromNode(node, script.uri); 1384 var span = system.compiler.spanFromNode(node, script.uri);
1385 return new Dart2JsLocation(script, span); 1385 return new Dart2JsLocation(script, span);
1386 } else { 1386 } else {
1387 var span = system.compiler.spanFromElement(_variable); 1387 var span = system.compiler.spanFromElement(_variable);
1388 return new Dart2JsLocation(script, span); 1388 return new Dart2JsLocation(script, span);
1389 } 1389 }
1390 } 1390 }
1391 } 1391 }
1392 1392
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698