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

Side by Side Diff: pkg/compiler/lib/src/native/behavior.dart

Issue 2481113003: Handle dart:html in kernel_impact (Closed)
Patch Set: Created 4 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
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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 import '../common.dart'; 5 import '../common.dart';
6 import '../common/backend_api.dart' show ForeignResolver; 6 import '../common/backend_api.dart' show ForeignResolver;
7 import '../common/resolution.dart' show ParsingContext, Resolution; 7 import '../common/resolution.dart' show ParsingContext, Resolution;
8 import '../compiler.dart' show Compiler; 8 import '../compiler.dart' show Compiler;
9 import '../constants/expressions.dart'; 9 import '../constants/expressions.dart';
10 import '../constants/values.dart'; 10 import '../constants/values.dart';
(...skipping 13 matching lines...) Expand all
24 /// This class is a temporary work-around until we get a more powerful DartType. 24 /// This class is a temporary work-around until we get a more powerful DartType.
25 class SpecialType { 25 class SpecialType {
26 final String name; 26 final String name;
27 const SpecialType._(this.name); 27 const SpecialType._(this.name);
28 28
29 /// The type Object, but no subtypes: 29 /// The type Object, but no subtypes:
30 static const JsObject = const SpecialType._('=Object'); 30 static const JsObject = const SpecialType._('=Object');
31 31
32 int get hashCode => name.hashCode; 32 int get hashCode => name.hashCode;
33 33
34 String toString() => name;
35
34 static SpecialType fromName(String name) { 36 static SpecialType fromName(String name) {
35 if (name == '=Object') { 37 if (name == '=Object') {
36 return JsObject; 38 return JsObject;
37 } else { 39 } else {
38 throw new UnsupportedError("Unknown SpecialType '$name'."); 40 throw new UnsupportedError("Unknown SpecialType '$name'.");
39 } 41 }
40 } 42 }
41 } 43 }
42 44
43 /// Description of the exception behaviour of native code. 45 /// Description of the exception behaviour of native code.
(...skipping 956 matching lines...) Expand 10 before | Expand all | Expand 10 after
1000 type = lookupType(typeString.substring(0, index)); 1002 type = lookupType(typeString.substring(0, index));
1001 if (type != null) { 1003 if (type != null) {
1002 // TODO(sra): Parse type parameters. 1004 // TODO(sra): Parse type parameters.
1003 return type; 1005 return type;
1004 } 1006 }
1005 reporter.reportErrorMessage(spannable, MessageKind.GENERIC, 1007 reporter.reportErrorMessage(spannable, MessageKind.GENERIC,
1006 {'text': "Type '$typeString' not found."}); 1008 {'text': "Type '$typeString' not found."});
1007 return const DynamicType(); 1009 return const DynamicType();
1008 } 1010 }
1009 } 1011 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/kernel/kernel_debug.dart ('k') | pkg/compiler/lib/src/resolution/members.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698