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

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

Issue 2931773005: [kernel] Delete most of the AST (Closed)
Patch Set: Review Created 3 years, 5 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
« no previous file with comments | « pkg/kernel/binary.md ('k') | pkg/kernel/lib/binary/ast_from_binary.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 4364 matching lines...) Expand 10 before | Expand all | Expand 10 after
4619 /// typedef has not been assigned a canonical name yet. 4622 /// typedef has not been assigned a canonical name yet.
4620 /// 4623 ///
4621 /// Returns `null` if the typedef is `null`. 4624 /// Returns `null` if the typedef is `null`.
4622 CanonicalName getCanonicalNameOfTypedef(Typedef typedef_) { 4625 CanonicalName getCanonicalNameOfTypedef(Typedef typedef_) {
4623 if (typedef_ == null) return null; 4626 if (typedef_ == null) return null;
4624 if (typedef_.canonicalName == null) { 4627 if (typedef_.canonicalName == null) {
4625 throw '$typedef_ has no canonical name'; 4628 throw '$typedef_ has no canonical name';
4626 } 4629 }
4627 return typedef_.canonicalName; 4630 return typedef_.canonicalName;
4628 } 4631 }
OLDNEW
« no previous file with comments | « pkg/kernel/binary.md ('k') | pkg/kernel/lib/binary/ast_from_binary.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698