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

Unified Diff: pkg/kernel/lib/binary/ast_to_binary.dart

Issue 2972343002: [kernel] Insert kernel bodies into VM heap (Closed)
Patch Set: Rebased 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 side-by-side diff with in-line comments
Download patch
Index: pkg/kernel/lib/binary/ast_to_binary.dart
diff --git a/pkg/kernel/lib/binary/ast_to_binary.dart b/pkg/kernel/lib/binary/ast_to_binary.dart
index 0c54fce565111edc79ec20b1ca7001aa9b8084f9..1dc89d43af00f4d3646edbd90c1b7a41604f6194 100644
--- a/pkg/kernel/lib/binary/ast_to_binary.dart
+++ b/pkg/kernel/lib/binary/ast_to_binary.dart
@@ -382,7 +382,6 @@ class BinaryPrinter extends Visitor {
if (node.canonicalName == null) {
throw 'Missing canonical name for $node';
}
- node.binaryOffset = _sink.flushedLength + _sink.length;
writeByte(Tag.Class);
writeCanonicalNameReference(getCanonicalNameOfClass(node));
writeOffset(node.fileOffset);
@@ -415,9 +414,6 @@ class BinaryPrinter extends Visitor {
writeOffset(node.fileOffset);
writeOffset(node.fileEndOffset);
writeByte(node.flags);
- assert(node.parent is Class);
- Class parent = node.parent;
- writeUInt30(parent.binaryOffset);
writeName(node.name ?? _emptyName);
writeStringReference(node.documentationComment ?? '');
writeAnnotationList(node.annotations);
@@ -441,12 +437,6 @@ class BinaryPrinter extends Visitor {
writeOffset(node.fileEndOffset);
writeByte(node.kind.index);
writeByte(node.flags);
- if (node.parent is Class) {
- Class parent = node.parent;
- writeUInt30(parent.binaryOffset);
- } else {
- writeUInt30(0); // 0 is a valid offset, but not for a class.
- }
writeName(node.name ?? '');
writeUriReference(node.fileUri ?? '');
writeStringReference(node.documentationComment ?? '');
@@ -465,12 +455,6 @@ class BinaryPrinter extends Visitor {
writeOffset(node.fileOffset);
writeOffset(node.fileEndOffset);
writeByte(node.flags);
- if (node.parent is Class) {
- Class parent = node.parent;
- writeUInt30(parent.binaryOffset);
- } else {
- writeUInt30(0); // 0 is a valid offset, but not for a class.
- }
writeName(node.name);
writeUriReference(node.fileUri ?? '');
writeStringReference(node.documentationComment ?? '');
@@ -1158,7 +1142,6 @@ class BinaryPrinter extends Visitor {
}
visitTypeParameter(TypeParameter node) {
- node.binaryOffset = _sink.flushedLength + _sink.length;
writeStringReference(node.name ?? '');
writeNode(node.bound);
}

Powered by Google App Engine
This is Rietveld 408576698