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

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

Issue 2820363002: Move Kernel strings into the VM's heap. (Closed)
Patch Set: Incorporate review comments. Created 3 years, 8 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 | runtime/vm/bootstrap.cc » ('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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 consists of the UTF-8 encoded string stretching from offset endOffset[N-1] 57 consists of the UTF-8 encoded string stretching from offset endOffset[N-1]
58 (inclusive) to endOffset[N] (exclusive). 58 (inclusive) to endOffset[N] (exclusive).
59 59
60 ``` scala 60 ``` scala
61 type StringTable { 61 type StringTable {
62 List<UInt> endOffsets; 62 List<UInt> endOffsets;
63 Byte[endOffsets.last] utf8Bytes; 63 Byte[endOffsets.last] utf8Bytes;
64 } 64 }
65 65
66 type StringReference { 66 type StringReference {
67 UInt index; // Index into the Program's .strings. 67 UInt index; // Index into the Program's strings.
68 } 68 }
69 69
70 type Source { 70 type Source {
71 List<Byte> utf8Bytes; 71 List<Byte> utf8Bytes;
72 // Line starts are delta-encoded (they are encoded as line lengths). The list 72 // Line starts are delta-encoded (they are encoded as line lengths). The list
73 // [0, 10, 25, 32, 42] is encoded as [0, 10, 15, 7, 10]. 73 // [0, 10, 25, 32, 42] is encoded as [0, 10, 15, 7, 10].
74 List<Uint> lineStarts; 74 List<Uint> lineStarts;
75 } 75 }
76 76
77 type UriSource { 77 type UriSource {
(...skipping 877 matching lines...) Expand 10 before | Expand all | Expand 10 after
955 Byte tag = 88; 955 Byte tag = 88;
956 } 956 }
957 957
958 type TypeParameter { 958 type TypeParameter {
959 // Note: there is no tag on TypeParameter 959 // Note: there is no tag on TypeParameter
960 StringReference name; // Cosmetic, may be empty, not unique. 960 StringReference name; // Cosmetic, may be empty, not unique.
961 DartType bound; // 'dynamic' if no explicit bound was given. 961 DartType bound; // 'dynamic' if no explicit bound was given.
962 } 962 }
963 963
964 ``` 964 ```
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/bootstrap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698