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

Unified Diff: pkg/kernel/lib/binary/ast_to_binary.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/kernel/lib/binary/ast_from_binary.dart ('k') | runtime/vm/class_finalizer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 e889eaad32b6d7ccdb20ee615e2cf1a206b2c12f..00d7bd34fd04bda49506ee0cfcf253ed89e1294f 100644
--- a/pkg/kernel/lib/binary/ast_to_binary.dart
+++ b/pkg/kernel/lib/binary/ast_to_binary.dart
@@ -396,7 +396,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);
@@ -429,9 +428,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);
@@ -455,12 +451,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 ?? '');
@@ -479,12 +469,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 ?? '');
@@ -1178,7 +1162,6 @@ class BinaryPrinter extends Visitor {
}
visitTypeParameter(TypeParameter node) {
- node.binaryOffset = _sink.flushedLength + _sink.length;
writeStringReference(node.name ?? '');
writeNode(node.bound);
}
« no previous file with comments | « pkg/kernel/lib/binary/ast_from_binary.dart ('k') | runtime/vm/class_finalizer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698