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

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

Issue 2972343002: [kernel] Insert kernel bodies into VM heap (Closed)
Patch Set: Review comments Created 3 years, 4 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 614 matching lines...) Expand 10 before | Expand all | Expand 10 after
625 /// Mixin applications may not contain fields or procedures, as they implicitly 625 /// Mixin applications may not contain fields or procedures, as they implicitly
626 /// use those from its mixed-in type. However, the IR does not enforce this 626 /// use those from its mixed-in type. However, the IR does not enforce this
627 /// rule directly, as doing so can obstruct transformations. It is possible to 627 /// rule directly, as doing so can obstruct transformations. It is possible to
628 /// transform a mixin application to become a regular class, and vice versa. 628 /// transform a mixin application to become a regular class, and vice versa.
629 class Class extends NamedNode { 629 class Class extends NamedNode {
630 /// End offset in the source file it comes from. Valid values are from 0 and 630 /// End offset in the source file it comes from. Valid values are from 0 and
631 /// up, or -1 ([TreeNode.noOffset]) if the file end offset is not available 631 /// up, or -1 ([TreeNode.noOffset]) if the file end offset is not available
632 /// (this is the default if none is specifically set). 632 /// (this is the default if none is specifically set).
633 int fileEndOffset = TreeNode.noOffset; 633 int fileEndOffset = TreeNode.noOffset;
634 634
635 /// Offset of the declaration, set and used when writing the binary.
636 int binaryOffset = -1;
637
638 /// The degree to which the contents of the class have been loaded. 635 /// The degree to which the contents of the class have been loaded.
639 ClassLevel level = ClassLevel.Body; 636 ClassLevel level = ClassLevel.Body;
640 637
641 /// Documentation comment of the class, or `null`. 638 /// Documentation comment of the class, or `null`.
642 @informative 639 @informative
643 String documentationComment; 640 String documentationComment;
644 641
645 /// List of metadata annotations on the class. 642 /// List of metadata annotations on the class.
646 /// 643 ///
647 /// This defaults to an immutable empty list. Use [addAnnotation] to add 644 /// This defaults to an immutable empty list. Use [addAnnotation] to add
(...skipping 3747 matching lines...) Expand 10 before | Expand all | Expand 10 after
4395 /// different [FunctionType] objects. 4392 /// different [FunctionType] objects.
4396 class TypeParameter extends TreeNode { 4393 class TypeParameter extends TreeNode {
4397 String name; // Cosmetic name. 4394 String name; // Cosmetic name.
4398 4395
4399 /// The bound on the type variable. 4396 /// The bound on the type variable.
4400 /// 4397 ///
4401 /// Should not be null except temporarily during IR construction. Should 4398 /// Should not be null except temporarily during IR construction. Should
4402 /// be set to the root class for type parameters without an explicit bound. 4399 /// be set to the root class for type parameters without an explicit bound.
4403 DartType bound; 4400 DartType bound;
4404 4401
4405 /// Offset of the declaration, set and used when writing the binary.
4406 int binaryOffset = 0;
4407
4408 TypeParameter([this.name, this.bound]); 4402 TypeParameter([this.name, this.bound]);
4409 4403
4410 accept(TreeVisitor v) => v.visitTypeParameter(this); 4404 accept(TreeVisitor v) => v.visitTypeParameter(this);
4411 4405
4412 visitChildren(Visitor v) { 4406 visitChildren(Visitor v) {
4413 bound.accept(v); 4407 bound.accept(v);
4414 } 4408 }
4415 4409
4416 transformChildren(Transformer v) { 4410 transformChildren(Transformer v) {
4417 bound = v.visitDartType(bound); 4411 bound = v.visitDartType(bound);
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after
4746 if (typedef_.canonicalName == null) { 4740 if (typedef_.canonicalName == null) {
4747 throw '$typedef_ has no canonical name'; 4741 throw '$typedef_ has no canonical name';
4748 } 4742 }
4749 return typedef_.canonicalName; 4743 return typedef_.canonicalName;
4750 } 4744 }
4751 4745
4752 /// Annotation describing information which is not part of Dart semantics; in 4746 /// Annotation describing information which is not part of Dart semantics; in
4753 /// other words, if this information (or any information it refers to) changes, 4747 /// other words, if this information (or any information it refers to) changes,
4754 /// static analysis and runtime behavior of the library are unaffected. 4748 /// static analysis and runtime behavior of the library are unaffected.
4755 const informative = null; 4749 const informative = null;
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