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

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

Issue 2567133002: Add support for the new function-type syntax. (Closed)
Patch Set: Remove obsolete named argument. Created 3 years, 11 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) 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 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
248 /// <gvn-string> values are 'true' and 'false'. The default if unspecified 248 /// <gvn-string> values are 'true' and 'false'. The default if unspecified
249 /// is 'false'. 249 /// is 'false'.
250 /// 250 ///
251 /// <new-string> values are 'true' and 'false'. The default if unspecified 251 /// <new-string> values are 'true' and 'false'. The default if unspecified
252 /// is 'false'. A 'true' value means that each evaluation returns a fresh 252 /// is 'false'. A 'true' value means that each evaluation returns a fresh
253 /// (new) object that cannot be unaliased with existing objects. 253 /// (new) object that cannot be unaliased with existing objects.
254 /// 254 ///
255 /// Each tag kind (including the 'type-tag's) can only occur once in the 255 /// Each tag kind (including the 'type-tag's) can only occur once in the
256 /// sequence. 256 /// sequence.
257 /// 257 ///
258 /// [specString] is the specification string, [resolveType] resolves named 258 /// [specString] is the specification string, [lookupType] resolves named
259 /// types into type values, [typesReturned] and [typesInstantiated] collects 259 /// types into type values, [typesReturned] and [typesInstantiated] collects
260 /// the types defined by the specification string, and [objectType] and 260 /// the types defined by the specification string, and [objectType] and
261 /// [nullType] define the types for `Object` and `Null`, respectively. The 261 /// [nullType] define the types for `Object` and `Null`, respectively. The
262 /// latter is used for the type strings of the form '' and 'var'. 262 /// latter is used for the type strings of the form '' and 'var'.
263 /// [validTags] can be used to restrict which tags are accepted. 263 /// [validTags] can be used to restrict which tags are accepted.
264 static void processSpecString( 264 static void processSpecString(
265 DiagnosticReporter reporter, Spannable spannable, String specString, 265 DiagnosticReporter reporter, Spannable spannable, String specString,
266 {Iterable<String> validTags, 266 {Iterable<String> validTags,
267 void setSideEffects(SideEffects newEffects), 267 void setSideEffects(SideEffects newEffects),
268 void setThrows(NativeThrowBehavior throwKind), 268 void setThrows(NativeThrowBehavior throwKind),
(...skipping 737 matching lines...) Expand 10 before | Expand all | Expand 10 after
1006 type = lookupType(typeString.substring(0, index)); 1006 type = lookupType(typeString.substring(0, index));
1007 if (type != null) { 1007 if (type != null) {
1008 // TODO(sra): Parse type parameters. 1008 // TODO(sra): Parse type parameters.
1009 return type; 1009 return type;
1010 } 1010 }
1011 reporter.reportErrorMessage(spannable, MessageKind.GENERIC, 1011 reporter.reportErrorMessage(spannable, MessageKind.GENERIC,
1012 {'text': "Type '$typeString' not found."}); 1012 {'text': "Type '$typeString' not found."});
1013 return const DynamicType(); 1013 return const DynamicType();
1014 } 1014 }
1015 } 1015 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698