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

Unified Diff: pkg/kernel/lib/type_checker.dart

Issue 2767773004: Add Vector type to Kernel (Closed)
Patch Set: Make fixes suggested by the reviewers 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
Index: pkg/kernel/lib/type_checker.dart
diff --git a/pkg/kernel/lib/type_checker.dart b/pkg/kernel/lib/type_checker.dart
index c6a89373d2e416b251279de6171918c7582f95e8..0b5436438e79fd29ec0f7b4a6ddaf2bdbac3f80a 100644
--- a/pkg/kernel/lib/type_checker.dart
+++ b/pkg/kernel/lib/type_checker.dart
@@ -690,6 +690,26 @@ class TypeCheckingVisitor
}
@override
+ DartType visitVectorGet(VectorGet node) {
+ return const DynamicType();
asgerf 2017/03/23 11:53:51 Visit the "vector" subexpression to ensure it is t
Dmitry Stefantsov 2017/03/27 10:57:08 Done.
+ }
+
+ @override
+ visitVectorSet(VectorSet node) {
+ return node.value.getStaticType(environment);
asgerf 2017/03/23 11:53:51 We should not use getStaticType from the type chec
Dmitry Stefantsov 2017/03/27 10:57:09 Done.
+ }
+
+ @override
+ visitVectorCopy(VectorCopy node) {
+ return node.getStaticType(environment);
asgerf 2017/03/23 11:53:51 Same as above.
Dmitry Stefantsov 2017/03/27 10:57:08 Done.
+ }
+
+ @override
+ DartType visitVectorCreation(VectorCreation node) {
+ return node.getStaticType(environment);
asgerf 2017/03/23 11:53:51 Even though there are no subexpressions here, plea
Dmitry Stefantsov 2017/03/27 10:57:08 Done.
+ }
+
+ @override
visitAssertStatement(AssertStatement node) {
visitExpression(node.condition);
if (node.message != null) {

Powered by Google App Engine
This is Rietveld 408576698