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

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

Issue 2729913005: [Fasta] include source code in dill (Closed)
Patch Set: Use Uint8List.view when possible Created 3 years, 9 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/lib/analyzer/loader.dart ('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 4009 matching lines...) Expand 10 before | Expand all | Expand 10 after
4020 if (node == child) { 4020 if (node == child) {
4021 return replacement; 4021 return replacement;
4022 } else { 4022 } else {
4023 return node; 4023 return node;
4024 } 4024 }
4025 } 4025 }
4026 } 4026 }
4027 4027
4028 class Source { 4028 class Source {
4029 final List<int> lineStarts; 4029 final List<int> lineStarts;
4030 final String source; 4030 final List<int> source;
4031 4031
4032 Source(this.lineStarts, this.source); 4032 Source(this.lineStarts, this.source);
4033 } 4033 }
4034 4034
4035 /// Returns the [Reference] object for the given member. 4035 /// Returns the [Reference] object for the given member.
4036 /// 4036 ///
4037 /// Returns `null` if the member is `null`. 4037 /// Returns `null` if the member is `null`.
4038 Reference getMemberReference(Member member) { 4038 Reference getMemberReference(Member member) {
4039 return member?.reference; 4039 return member?.reference;
4040 } 4040 }
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
4074 /// library has not been assigned a canonical name yet. 4074 /// library has not been assigned a canonical name yet.
4075 /// 4075 ///
4076 /// Returns `null` if the library is `null`. 4076 /// Returns `null` if the library is `null`.
4077 CanonicalName getCanonicalNameOfLibrary(Library library) { 4077 CanonicalName getCanonicalNameOfLibrary(Library library) {
4078 if (library == null) return null; 4078 if (library == null) return null;
4079 if (library.canonicalName == null) { 4079 if (library.canonicalName == null) {
4080 throw '$library has no canonical name'; 4080 throw '$library has no canonical name';
4081 } 4081 }
4082 return library.canonicalName; 4082 return library.canonicalName;
4083 } 4083 }
OLDNEW
« no previous file with comments | « pkg/kernel/lib/analyzer/loader.dart ('k') | pkg/kernel/lib/binary/ast_from_binary.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698