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

Side by Side Diff: pkg/compiler/lib/src/mirrors/dart2js_instance_mirrors.dart

Issue 1383483006: Extract DiagnosticReporter implementation from Compiler. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Fixes after rebase. Created 5 years, 2 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) 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 part of dart2js.mirrors; 5 part of dart2js.mirrors;
6 6
7 abstract class ObjectMirrorMixin implements ObjectMirror { 7 abstract class ObjectMirrorMixin implements ObjectMirror {
8 InstanceMirror getField(Symbol fieldName) { 8 InstanceMirror getField(Symbol fieldName) {
9 throw new UnsupportedError('ObjectMirror.getField unsupported.'); 9 throw new UnsupportedError('ObjectMirror.getField unsupported.');
10 } 10 }
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 return new Dart2JsMapConstantMirror(mirrorSystem, constant, value); 49 return new Dart2JsMapConstantMirror(mirrorSystem, constant, value);
50 } else if (value.isType) { 50 } else if (value.isType) {
51 return new Dart2JsTypeConstantMirror(mirrorSystem, constant, value); 51 return new Dart2JsTypeConstantMirror(mirrorSystem, constant, value);
52 } else if (value.isFunction) { 52 } else if (value.isFunction) {
53 return new Dart2JsConstantMirror(mirrorSystem, constant, value); 53 return new Dart2JsConstantMirror(mirrorSystem, constant, value);
54 } else if (value.isNull) { 54 } else if (value.isNull) {
55 return new Dart2JsNullConstantMirror(mirrorSystem, constant, value); 55 return new Dart2JsNullConstantMirror(mirrorSystem, constant, value);
56 } else if (value.isConstructedObject) { 56 } else if (value.isConstructedObject) {
57 return new Dart2JsConstructedConstantMirror(mirrorSystem, constant, value); 57 return new Dart2JsConstructedConstantMirror(mirrorSystem, constant, value);
58 } 58 }
59 mirrorSystem.compiler.internalError(NO_LOCATION_SPANNABLE, 59 mirrorSystem.compiler.reporter.internalError(NO_LOCATION_SPANNABLE,
60 "Unexpected constant value $value"); 60 "Unexpected constant value $value");
61 return null; 61 return null;
62 } 62 }
63 63
64 64
65 //////////////////////////////////////////////////////////////////////////////// 65 ////////////////////////////////////////////////////////////////////////////////
66 // Mirrors on constant values used for metadata. 66 // Mirrors on constant values used for metadata.
67 //////////////////////////////////////////////////////////////////////////////// 67 ////////////////////////////////////////////////////////////////////////////////
68 68
69 class Dart2JsConstantMirror extends Object 69 class Dart2JsConstantMirror extends Object
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 return new Dart2JsBoolConstantMirror.fromBool(mirrorSystem, isDocComment); 289 return new Dart2JsBoolConstantMirror.fromBool(mirrorSystem, isDocComment);
290 } else if (fieldName == #text) { 290 } else if (fieldName == #text) {
291 return new Dart2JsStringConstantMirror.fromString(mirrorSystem, text); 291 return new Dart2JsStringConstantMirror.fromString(mirrorSystem, text);
292 } else if (fieldName == #trimmedText) { 292 } else if (fieldName == #trimmedText) {
293 return new Dart2JsStringConstantMirror.fromString(mirrorSystem, 293 return new Dart2JsStringConstantMirror.fromString(mirrorSystem,
294 trimmedText); 294 trimmedText);
295 } 295 }
296 return super.getField(fieldName); 296 return super.getField(fieldName);
297 } 297 }
298 } 298 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/library_loader.dart ('k') | pkg/compiler/lib/src/mirrors/dart2js_library_mirror.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698