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

Unified Diff: pkg/kernel/lib/binary/ast_from_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/ast.dart ('k') | pkg/kernel/lib/binary/ast_to_binary.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/kernel/lib/binary/ast_from_binary.dart
diff --git a/pkg/kernel/lib/binary/ast_from_binary.dart b/pkg/kernel/lib/binary/ast_from_binary.dart
index c1105bd13ec2edba8b1c6763551abdbfacd831ff..11d49a2aa67a47527b4fdc59f980e30c37c4efe6 100644
--- a/pkg/kernel/lib/binary/ast_from_binary.dart
+++ b/pkg/kernel/lib/binary/ast_from_binary.dart
@@ -827,6 +827,21 @@ class BinaryBuilder {
var body = readExpression();
variableStack.length = stackHeight;
return new Let(variable, body);
+ case Tag.VectorCreation:
+ var length = readUInt();
+ return new VectorCreation(length);
+ case Tag.VectorGet:
+ var vectorExpression = readExpression();
+ var index = readUInt();
+ return new VectorGet(vectorExpression, index);
+ case Tag.VectorSet:
+ var vectorExpression = readExpression();
+ var index = readUInt();
+ var value = readExpression();
+ return new VectorSet(vectorExpression, index, value);
+ case Tag.VectorCopy:
+ var vectorExpression = readExpression();
+ return new VectorCopy(vectorExpression);
default:
throw fail('Invalid expression tag: $tag');
}
@@ -1010,6 +1025,8 @@ class BinaryBuilder {
DartType readDartType() {
int tag = readByte();
switch (tag) {
+ case Tag.VectorType:
+ return const VectorType();
case Tag.BottomType:
return const BottomType();
case Tag.InvalidType:
« no previous file with comments | « pkg/kernel/lib/ast.dart ('k') | pkg/kernel/lib/binary/ast_to_binary.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698