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

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

Issue 2767773004: Add Vector type to Kernel (Closed)
Patch Set: Reformat comment with Markdown, throw exception in type propagation 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/kernel/lib/binary/ast_from_binary.dart ('k') | pkg/kernel/lib/binary/tag.dart » ('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 918283f11bdbc6d2f9fa5c4bf28dbacfa72aaf07..cef4a846697c761d08e09a67d69346ebe9fcd194 100644
--- a/pkg/kernel/lib/binary/ast_to_binary.dart
+++ b/pkg/kernel/lib/binary/ast_to_binary.dart
@@ -741,6 +741,29 @@ class BinaryPrinter extends Visitor {
writeDeferredImportReference(node.import);
}
+ visitVectorCreation(VectorCreation node) {
+ writeByte(Tag.VectorCreation);
+ writeUInt30(node.length);
+ }
+
+ visitVectorGet(VectorGet node) {
+ writeByte(Tag.VectorGet);
+ writeNode(node.vectorExpression);
+ writeUInt30(node.index);
+ }
+
+ visitVectorSet(VectorSet node) {
+ writeByte(Tag.VectorSet);
+ writeNode(node.vectorExpression);
+ writeUInt30(node.index);
+ writeNode(node.value);
+ }
+
+ visitVectorCopy(VectorCopy node) {
+ writeByte(Tag.VectorCopy);
+ writeNode(node.vectorExpression);
+ }
+
writeStatementOrEmpty(Statement node) {
if (node == null) {
writeByte(Tag.EmptyStatement);
@@ -988,6 +1011,10 @@ class BinaryPrinter extends Visitor {
writeUInt30(_typeParameterIndexer[node.parameter]);
}
+ visitVectorType(VectorType node) {
+ writeByte(Tag.VectorType);
+ }
+
visitTypeParameter(TypeParameter node) {
writeStringReference(node.name ?? '');
writeNode(node.bound);
« no previous file with comments | « pkg/kernel/lib/binary/ast_from_binary.dart ('k') | pkg/kernel/lib/binary/tag.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698