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

Side by Side Diff: runtime/vm/kernel.cc

Issue 2792333002: Add Kernel AST nodes for Vector and Closure primitives in VM (Closed)
Patch Set: Fixes according to the review comments Created 3 years, 8 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/kernel.h" 5 #include "vm/kernel.h"
6 6
7 #if !defined(DART_PRECOMPILED_RUNTIME) 7 #if !defined(DART_PRECOMPILED_RUNTIME)
8 namespace dart { 8 namespace dart {
9 9
10 namespace kernel { 10 namespace kernel {
(...skipping 875 matching lines...) Expand 10 before | Expand all | Expand 10 after
886 visitor->VisitLet(this); 886 visitor->VisitLet(this);
887 } 887 }
888 888
889 889
890 void Let::VisitChildren(Visitor* visitor) { 890 void Let::VisitChildren(Visitor* visitor) {
891 visitor->VisitVariableDeclaration(variable()); 891 visitor->VisitVariableDeclaration(variable());
892 body()->AcceptExpressionVisitor(visitor); 892 body()->AcceptExpressionVisitor(visitor);
893 } 893 }
894 894
895 895
896 VectorCreation::~VectorCreation() {}
897
898
899 void VectorCreation::AcceptExpressionVisitor(ExpressionVisitor* visitor) {
900 visitor->VisitVectorCreation(this);
901 }
902
903
904 void VectorCreation::VisitChildren(Visitor* visitor) {}
905
906
907 VectorGet::~VectorGet() {}
908
909
910 void VectorGet::AcceptExpressionVisitor(ExpressionVisitor* visitor) {
911 visitor->VisitVectorGet(this);
912 }
913
914
915 void VectorGet::VisitChildren(Visitor* visitor) {
916 vector_expression()->AcceptExpressionVisitor(visitor);
917 }
918
919
920 VectorSet::~VectorSet() {}
921
922
923 void VectorSet::AcceptExpressionVisitor(ExpressionVisitor* visitor) {
924 visitor->VisitVectorSet(this);
925 }
926
927
928 void VectorSet::VisitChildren(Visitor* visitor) {
929 vector_expression()->AcceptExpressionVisitor(visitor);
930 value()->AcceptExpressionVisitor(visitor);
931 }
932
933
934 VectorCopy::~VectorCopy() {}
935
936
937 void VectorCopy::AcceptExpressionVisitor(ExpressionVisitor* visitor) {
938 visitor->VisitVectorCopy(this);
939 }
940
941
942 void VectorCopy::VisitChildren(Visitor* visitor) {
943 vector_expression()->AcceptExpressionVisitor(visitor);
944 }
945
946
947 ClosureCreation::~ClosureCreation() {}
948
949
950 void ClosureCreation::AcceptExpressionVisitor(ExpressionVisitor* visitor) {
951 visitor->VisitClosureCreation(this);
952 }
953
954
955 void ClosureCreation::VisitChildren(Visitor* visitor) {
956 context_vector()->AcceptExpressionVisitor(visitor);
957 function_type()->AcceptDartTypeVisitor(visitor);
958 }
959
960
896 Statement::~Statement() {} 961 Statement::~Statement() {}
897 962
898 963
899 void Statement::AcceptTreeVisitor(TreeVisitor* visitor) { 964 void Statement::AcceptTreeVisitor(TreeVisitor* visitor) {
900 AcceptStatementVisitor(visitor); 965 AcceptStatementVisitor(visitor);
901 } 966 }
902 967
903 968
904 InvalidStatement::~InvalidStatement() {} 969 InvalidStatement::~InvalidStatement() {}
905 970
(...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after
1286 1351
1287 1352
1288 void TypeParameterType::AcceptDartTypeVisitor(DartTypeVisitor* visitor) { 1353 void TypeParameterType::AcceptDartTypeVisitor(DartTypeVisitor* visitor) {
1289 visitor->VisitTypeParameterType(this); 1354 visitor->VisitTypeParameterType(this);
1290 } 1355 }
1291 1356
1292 1357
1293 void TypeParameterType::VisitChildren(Visitor* visitor) {} 1358 void TypeParameterType::VisitChildren(Visitor* visitor) {}
1294 1359
1295 1360
1361 VectorType::~VectorType() {}
1362
1363
1364 void VectorType::AcceptDartTypeVisitor(DartTypeVisitor* visitor) {
1365 visitor->VisitVectorType(this);
1366 }
1367
1368
1369 void VectorType::VisitChildren(Visitor* visitor) {}
1370
1371
1296 TypeParameter::~TypeParameter() {} 1372 TypeParameter::~TypeParameter() {}
1297 1373
1298 1374
1299 void TypeParameter::AcceptTreeVisitor(TreeVisitor* visitor) { 1375 void TypeParameter::AcceptTreeVisitor(TreeVisitor* visitor) {
1300 visitor->VisitTypeParameter(this); 1376 visitor->VisitTypeParameter(this);
1301 } 1377 }
1302 1378
1303 1379
1304 void TypeParameter::VisitChildren(Visitor* visitor) { 1380 void TypeParameter::VisitChildren(Visitor* visitor) {
1305 bound()->AcceptDartTypeVisitor(visitor); 1381 bound()->AcceptDartTypeVisitor(visitor);
(...skipping 17 matching lines...) Expand all
1323 1399
1324 void Program::VisitChildren(Visitor* visitor) { 1400 void Program::VisitChildren(Visitor* visitor) {
1325 VisitList(&libraries(), visitor); 1401 VisitList(&libraries(), visitor);
1326 } 1402 }
1327 1403
1328 1404
1329 } // namespace kernel 1405 } // namespace kernel
1330 1406
1331 } // namespace dart 1407 } // namespace dart
1332 #endif // !defined(DART_PRECOMPILED_RUNTIME) 1408 #endif // !defined(DART_PRECOMPILED_RUNTIME)
OLDNEW
« no previous file with comments | « runtime/vm/kernel.h ('k') | runtime/vm/kernel_binary.h » ('j') | runtime/vm/kernel_binary.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698