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

Side by Side Diff: pkg/kernel/binary.md

Issue 2680303002: Kernel debugging; service tests (Closed)
Patch Set: Address comments 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 | « no previous file | pkg/kernel/lib/analyzer/ast_from_analyzer.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 This file describes the binary format of Dart Kernel. 1 This file describes the binary format of Dart Kernel.
2 2
3 Notation 3 Notation
4 -------- 4 --------
5 Bitmasks are described with the syntax: 5 Bitmasks are described with the syntax:
6 ```scala 6 ```scala
7 Byte flags (flag1, flag2, ..., flagN) 7 Byte flags (flag1, flag2, ..., flagN)
8 ``` 8 ```
9 where 'flag<N>' is the N-th least significant bit, 9 where 'flag<N>' is the N-th least significant bit,
10 (so flag1 is the least significant bit). 10 (so flag1 is the least significant bit).
(...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after
407 } 407 }
408 408
409 type StaticGet extends Expression { 409 type StaticGet extends Expression {
410 Byte tag = 26; 410 Byte tag = 26;
411 FileOffset fileOffset; 411 FileOffset fileOffset;
412 MemberReference target; 412 MemberReference target;
413 } 413 }
414 414
415 type StaticSet extends Expression { 415 type StaticSet extends Expression {
416 Byte tag = 27; 416 Byte tag = 27;
417 FileOffset fileOffset;
417 MemberReference target; 418 MemberReference target;
418 Expression value; 419 Expression value;
419 } 420 }
420 421
421 type Arguments { 422 type Arguments {
422 // Note: there is no tag on Arguments. 423 // Note: there is no tag on Arguments.
423 List<DartType> types; 424 List<DartType> types;
424 List<Expression> positional; 425 List<Expression> positional;
425 List<NamedExpression> named; 426 List<NamedExpression> named;
426 } 427 }
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
517 518
518 type IsExpression extends Expression { 519 type IsExpression extends Expression {
519 Byte tag = 37; 520 Byte tag = 37;
520 FileOffset fileOffset; 521 FileOffset fileOffset;
521 Expression operand; 522 Expression operand;
522 DartType type; 523 DartType type;
523 } 524 }
524 525
525 type AsExpression extends Expression { 526 type AsExpression extends Expression {
526 Byte tag = 38; 527 Byte tag = 38;
528 FileOffset fileOffset;
527 Expression operand; 529 Expression operand;
528 DartType type; 530 DartType type;
529 } 531 }
530 532
531 type StringLiteral extends Expression { 533 type StringLiteral extends Expression {
532 Byte tag = 39; 534 Byte tag = 39;
533 StringReference value; 535 StringReference value;
534 } 536 }
535 537
536 type SpecializedIntLiteral extends Expression { 538 type SpecializedIntLiteral extends Expression {
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
579 Byte tag = 45; 581 Byte tag = 45;
580 DartType type; 582 DartType type;
581 } 583 }
582 584
583 type ThisExpression extends Expression { 585 type ThisExpression extends Expression {
584 Byte tag = 46; 586 Byte tag = 46;
585 } 587 }
586 588
587 type Rethrow extends Expression { 589 type Rethrow extends Expression {
588 Byte tag = 47; 590 Byte tag = 47;
591 FileOffset fileOffset;
589 } 592 }
590 593
591 type Throw extends Expression { 594 type Throw extends Expression {
592 Byte tag = 48; 595 Byte tag = 48;
593 FileOffset fileOffset; 596 FileOffset fileOffset;
594 Expression value; 597 Expression value;
595 } 598 }
596 599
597 type ListLiteral extends Expression { 600 type ListLiteral extends Expression {
598 Byte tag = 49; 601 Byte tag = 49;
602 FileOffset fileOffset;
599 DartType typeArgument; 603 DartType typeArgument;
600 List<Expression> values; 604 List<Expression> values;
601 } 605 }
602 606
603 type ConstListLiteral extends Expression { 607 type ConstListLiteral extends Expression {
604 Byte tag = 58; // Note: tag is out of order. 608 Byte tag = 58; // Note: tag is out of order.
609 FileOffset fileOffset;
605 DartType typeArgument; 610 DartType typeArgument;
606 List<Expression> values; 611 List<Expression> values;
607 } 612 }
608 613
609 type MapLiteral extends Expression { 614 type MapLiteral extends Expression {
610 Byte tag = 50; 615 Byte tag = 50;
611 FileOffset fileOffset; 616 FileOffset fileOffset;
612 DartType keyType; 617 DartType keyType;
613 DartType valueType; 618 DartType valueType;
614 List<MapEntry> entries; 619 List<MapEntry> entries;
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
679 Option<Expression> message; 684 Option<Expression> message;
680 } 685 }
681 686
682 type LabeledStatement extends Statement { 687 type LabeledStatement extends Statement {
683 Byte tag = 65; 688 Byte tag = 65;
684 Statement body; 689 Statement body;
685 } 690 }
686 691
687 type BreakStatement extends Statement { 692 type BreakStatement extends Statement {
688 Byte tag = 66; 693 Byte tag = 66;
694 FileOffset fileOffset;
689 695
690 // Reference to the Nth LabeledStatement in scope, with 0 being the 696 // Reference to the Nth LabeledStatement in scope, with 0 being the
691 // outermost enclosing labeled statement within the same FunctionNode. 697 // outermost enclosing labeled statement within the same FunctionNode.
692 // 698 //
693 // Labels are not in scope across function boundaries. 699 // Labels are not in scope across function boundaries.
694 UInt labelIndex; 700 UInt labelIndex;
695 } 701 }
696 702
697 type WhileStatement extends Statement { 703 type WhileStatement extends Statement {
698 Byte tag = 67; 704 Byte tag = 67;
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
794 Byte flags (isYieldStar); 800 Byte flags (isYieldStar);
795 Expression expression; 801 Expression expression;
796 } 802 }
797 803
798 type VariableDeclarationStatement extends Statement { 804 type VariableDeclarationStatement extends Statement {
799 Byte tag = 78; 805 Byte tag = 78;
800 VariableDeclaration variable; 806 VariableDeclaration variable;
801 } 807 }
802 808
803 type VariableDeclaration { 809 type VariableDeclaration {
810 // The offset for the variable declaration, i.e. the offset of the start of
811 // the declaration.
804 FileOffset fileOffset; 812 FileOffset fileOffset;
813
814 // The offset for the equal sign in the declaration (if it contains one).
815 // If it does not contain one this should be -1.
816 FileOffset fileEqualsOffset;
817
805 Byte flags (isFinal, isConst); 818 Byte flags (isFinal, isConst);
806 // For named parameters, this is the parameter name. 819 // For named parameters, this is the parameter name.
807 // For other variables, the name is cosmetic, may be empty, 820 // For other variables, the name is cosmetic, may be empty,
808 // and is not necessarily unique. 821 // and is not necessarily unique.
809 StringReference name; 822 StringReference name;
810 DartType type; 823 DartType type;
811 Option<InferredValue> inferredValue; 824 Option<InferredValue> inferredValue;
812 825
813 // For statements and for-loops, this is the initial value. 826 // For statements and for-loops, this is the initial value.
814 // For optional parameters, this is the default value (if given). 827 // For optional parameters, this is the default value (if given).
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
906 919
907 /* enum BaseClassKind { None, Exact, Subclass, Subtype, } */ 920 /* enum BaseClassKind { None, Exact, Subclass, Subtype, } */
908 921
909 type InferredValue { 922 type InferredValue {
910 ClassReference baseClass; // May be NullReference if kind = None. 923 ClassReference baseClass; // May be NullReference if kind = None.
911 Byte kind; // Index into BaseClassKind. 924 Byte kind; // Index into BaseClassKind.
912 Byte valueBits; // See lib/type_propagation/type_propagation.dart 925 Byte valueBits; // See lib/type_propagation/type_propagation.dart
913 } 926 }
914 927
915 ``` 928 ```
OLDNEW
« no previous file with comments | « no previous file | pkg/kernel/lib/analyzer/ast_from_analyzer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698