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

Side by Side Diff: pkg/kernel/lib/ast.dart

Issue 2931773005: [kernel] Delete most of the AST (Closed)
Patch Set: Remove getMainClosure handeling as it no longer exists Created 3 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
OLDNEW
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, 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 /// ----------------------------------------------------------------------- 5 /// -----------------------------------------------------------------------
6 /// ERROR HANDLING 6 /// ERROR HANDLING
7 /// ----------------------------------------------------------------------- 7 /// -----------------------------------------------------------------------
8 /// 8 ///
9 /// As a rule of thumb, errors that can be detected statically are handled by 9 /// As a rule of thumb, errors that can be detected statically are handled by
10 /// the frontend, typically by translating the erroneous code into a 'throw' or 10 /// the frontend, typically by translating the erroneous code into a 'throw' or
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 } 235 }
236 return node as Typedef; 236 return node as Typedef;
237 } 237 }
238 } 238 }
239 239
240 // ------------------------------------------------------------------------ 240 // ------------------------------------------------------------------------
241 // LIBRARIES and CLASSES 241 // LIBRARIES and CLASSES
242 // ------------------------------------------------------------------------ 242 // ------------------------------------------------------------------------
243 243
244 class Library extends NamedNode implements Comparable<Library> { 244 class Library extends NamedNode implements Comparable<Library> {
245 /// Offset of the declaration, set and used when writing the binary.
246 int binaryOffset = -1;
247
245 /// An import path to this library. 248 /// An import path to this library.
246 /// 249 ///
247 /// The [Uri] should have the `dart`, `package`, `app`, or `file` scheme. 250 /// The [Uri] should have the `dart`, `package`, `app`, or `file` scheme.
248 /// 251 ///
249 /// If the URI has the `app` scheme, it is relative to the application root. 252 /// If the URI has the `app` scheme, it is relative to the application root.
250 Uri importUri; 253 Uri importUri;
251 254
252 /// The uri of the source file this library was loaded from. 255 /// The uri of the source file this library was loaded from.
253 String fileUri; 256 String fileUri;
254 257
(...skipping 4361 matching lines...) Expand 10 before | Expand all | Expand 10 after
4616 /// typedef has not been assigned a canonical name yet. 4619 /// typedef has not been assigned a canonical name yet.
4617 /// 4620 ///
4618 /// Returns `null` if the typedef is `null`. 4621 /// Returns `null` if the typedef is `null`.
4619 CanonicalName getCanonicalNameOfTypedef(Typedef typedef_) { 4622 CanonicalName getCanonicalNameOfTypedef(Typedef typedef_) {
4620 if (typedef_ == null) return null; 4623 if (typedef_ == null) return null;
4621 if (typedef_.canonicalName == null) { 4624 if (typedef_.canonicalName == null) {
4622 throw '$typedef_ has no canonical name'; 4625 throw '$typedef_ has no canonical name';
4623 } 4626 }
4624 return typedef_.canonicalName; 4627 return typedef_.canonicalName;
4625 } 4628 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698