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

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

Issue 2680303002: Kernel debugging; service tests (Closed)
Patch Set: Changes based on feedback. Also fixed regress_28443_test Created 3 years, 10 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 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 417 matching lines...) Expand 10 before | Expand all | Expand 10 after
428 } 428 }
429 429
430 type StaticGet extends Expression { 430 type StaticGet extends Expression {
431 Byte tag = 26; 431 Byte tag = 26;
432 FileOffset fileOffset; 432 FileOffset fileOffset;
433 MemberReference target; 433 MemberReference target;
434 } 434 }
435 435
436 type StaticSet extends Expression { 436 type StaticSet extends Expression {
437 Byte tag = 27; 437 Byte tag = 27;
438 FileOffset fileOffset;
438 MemberReference target; 439 MemberReference target;
439 Expression value; 440 Expression value;
440 } 441 }
441 442
442 type Arguments { 443 type Arguments {
443 // Note: there is no tag on Arguments. 444 // Note: there is no tag on Arguments.
444 List<DartType> types; 445 List<DartType> types;
445 List<Expression> positional; 446 List<Expression> positional;
446 List<NamedExpression> named; 447 List<NamedExpression> named;
447 } 448 }
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
538 539
539 type IsExpression extends Expression { 540 type IsExpression extends Expression {
540 Byte tag = 37; 541 Byte tag = 37;
541 FileOffset fileOffset; 542 FileOffset fileOffset;
542 Expression operand; 543 Expression operand;
543 DartType type; 544 DartType type;
544 } 545 }
545 546
546 type AsExpression extends Expression { 547 type AsExpression extends Expression {
547 Byte tag = 38; 548 Byte tag = 38;
549 FileOffset fileOffset;
548 Expression operand; 550 Expression operand;
549 DartType type; 551 DartType type;
550 } 552 }
551 553
552 type StringLiteral extends Expression { 554 type StringLiteral extends Expression {
553 Byte tag = 39; 555 Byte tag = 39;
554 StringReference value; 556 StringReference value;
555 } 557 }
556 558
557 type SpecializedIntLiteral extends Expression { 559 type SpecializedIntLiteral extends Expression {
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
600 Byte tag = 45; 602 Byte tag = 45;
601 DartType type; 603 DartType type;
602 } 604 }
603 605
604 type ThisExpression extends Expression { 606 type ThisExpression extends Expression {
605 Byte tag = 46; 607 Byte tag = 46;
606 } 608 }
607 609
608 type Rethrow extends Expression { 610 type Rethrow extends Expression {
609 Byte tag = 47; 611 Byte tag = 47;
612 FileOffset fileOffset;
610 } 613 }
611 614
612 type Throw extends Expression { 615 type Throw extends Expression {
613 Byte tag = 48; 616 Byte tag = 48;
614 FileOffset fileOffset; 617 FileOffset fileOffset;
615 Expression value; 618 Expression value;
616 } 619 }
617 620
618 type ListLiteral extends Expression { 621 type ListLiteral extends Expression {
619 Byte tag = 49; 622 Byte tag = 49;
623 FileOffset fileOffset;
620 DartType typeArgument; 624 DartType typeArgument;
621 List<Expression> values; 625 List<Expression> values;
622 } 626 }
623 627
624 type ConstListLiteral extends Expression { 628 type ConstListLiteral extends Expression {
625 Byte tag = 58; // Note: tag is out of order. 629 Byte tag = 58; // Note: tag is out of order.
630 FileOffset fileOffset;
626 DartType typeArgument; 631 DartType typeArgument;
627 List<Expression> values; 632 List<Expression> values;
628 } 633 }
629 634
630 type MapLiteral extends Expression { 635 type MapLiteral extends Expression {
631 Byte tag = 50; 636 Byte tag = 50;
632 FileOffset fileOffset; 637 FileOffset fileOffset;
633 DartType keyType; 638 DartType keyType;
634 DartType valueType; 639 DartType valueType;
635 List<MapEntry> entries; 640 List<MapEntry> entries;
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
690 Option<Expression> message; 695 Option<Expression> message;
691 } 696 }
692 697
693 type LabeledStatement extends Statement { 698 type LabeledStatement extends Statement {
694 Byte tag = 65; 699 Byte tag = 65;
695 Statement body; 700 Statement body;
696 } 701 }
697 702
698 type BreakStatement extends Statement { 703 type BreakStatement extends Statement {
699 Byte tag = 66; 704 Byte tag = 66;
705 FileOffset fileOffset;
700 706
701 // Reference to the Nth LabeledStatement in scope, with 0 being the 707 // Reference to the Nth LabeledStatement in scope, with 0 being the
702 // outermost enclosing labeled statement within the same FunctionNode. 708 // outermost enclosing labeled statement within the same FunctionNode.
703 // 709 //
704 // Labels are not in scope across function boundaries. 710 // Labels are not in scope across function boundaries.
705 UInt labelIndex; 711 UInt labelIndex;
706 } 712 }
707 713
708 type WhileStatement extends Statement { 714 type WhileStatement extends Statement {
709 Byte tag = 67; 715 Byte tag = 67;
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
805 Byte flags (isYieldStar); 811 Byte flags (isYieldStar);
806 Expression expression; 812 Expression expression;
807 } 813 }
808 814
809 type VariableDeclarationStatement extends Statement { 815 type VariableDeclarationStatement extends Statement {
810 Byte tag = 78; 816 Byte tag = 78;
811 VariableDeclaration variable; 817 VariableDeclaration variable;
812 } 818 }
813 819
814 type VariableDeclaration { 820 type VariableDeclaration {
821 // The offset for the variable declaration, i.e. the offset of the start of
822 // the declaration.
815 FileOffset fileOffset; 823 FileOffset fileOffset;
824
825 // The offset for the equal sign in the declaration (if it contains one).
826 // If it does not contain one this should be -1.
827 FileOffset fileEqualsOffset;
828
816 Byte flags (isFinal, isConst); 829 Byte flags (isFinal, isConst);
817 // For named parameters, this is the parameter name. 830 // For named parameters, this is the parameter name.
818 // For other variables, the name is cosmetic, may be empty, 831 // For other variables, the name is cosmetic, may be empty,
819 // and is not necessarily unique. 832 // and is not necessarily unique.
820 StringReference name; 833 StringReference name;
821 DartType type; 834 DartType type;
822 Option<InferredValue> inferredValue; 835 Option<InferredValue> inferredValue;
823 836
824 // For statements and for-loops, this is the initial value. 837 // For statements and for-loops, this is the initial value.
825 // For optional parameters, this is the default value (if given). 838 // For optional parameters, this is the default value (if given).
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
917 930
918 /* enum BaseClassKind { None, Exact, Subclass, Subtype, } */ 931 /* enum BaseClassKind { None, Exact, Subclass, Subtype, } */
919 932
920 type InferredValue { 933 type InferredValue {
921 ClassReference baseClass; // May be NullReference if kind = None. 934 ClassReference baseClass; // May be NullReference if kind = None.
922 Byte kind; // Index into BaseClassKind. 935 Byte kind; // Index into BaseClassKind.
923 Byte valueBits; // See lib/type_propagation/type_propagation.dart 936 Byte valueBits; // See lib/type_propagation/type_propagation.dart
924 } 937 }
925 938
926 ``` 939 ```
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698