OLD | NEW |
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_binary_flowgraph.h" | 5 #include "vm/kernel_binary_flowgraph.h" |
6 | 6 |
7 #include "vm/compiler.h" | 7 #include "vm/compiler.h" |
8 #include "vm/longjump.h" | 8 #include "vm/longjump.h" |
9 #include "vm/object_store.h" | 9 #include "vm/object_store.h" |
10 | 10 |
(...skipping 678 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
689 VisitExpression(); // read vector expression. | 689 VisitExpression(); // read vector expression. |
690 builder_->ReadUInt(); // read index. | 690 builder_->ReadUInt(); // read index. |
691 VisitExpression(); // read value. | 691 VisitExpression(); // read value. |
692 return; | 692 return; |
693 case kVectorCopy: | 693 case kVectorCopy: |
694 VisitExpression(); // read vector expression. | 694 VisitExpression(); // read vector expression. |
695 return; | 695 return; |
696 case kClosureCreation: | 696 case kClosureCreation: |
697 builder_->SkipCanonicalNameReference(); // read function reference. | 697 builder_->SkipCanonicalNameReference(); // read function reference. |
698 VisitExpression(); // read context vector. | 698 VisitExpression(); // read context vector. |
699 VisitDartType(); // read function type of the closure. | 699 VisitDartType(); // read function type of the closure. |
| 700 builder_->SkipListOfDartTypes(); // read type arguments. |
700 return; | 701 return; |
701 default: | 702 default: |
702 UNREACHABLE(); | 703 UNREACHABLE(); |
703 } | 704 } |
704 } | 705 } |
705 | 706 |
706 void StreamingScopeBuilder::VisitStatement() { | 707 void StreamingScopeBuilder::VisitStatement() { |
707 Tag tag = builder_->ReadTag(); // read tag. | 708 Tag tag = builder_->ReadTag(); // read tag. |
708 switch (tag) { | 709 switch (tag) { |
709 case kInvalidStatement: | 710 case kInvalidStatement: |
(...skipping 3296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4006 ReadUInt(); // read index. | 4007 ReadUInt(); // read index. |
4007 SkipExpression(); // read value. | 4008 SkipExpression(); // read value. |
4008 return; | 4009 return; |
4009 case kVectorCopy: | 4010 case kVectorCopy: |
4010 SkipExpression(); // read vector expression. | 4011 SkipExpression(); // read vector expression. |
4011 return; | 4012 return; |
4012 case kClosureCreation: | 4013 case kClosureCreation: |
4013 SkipCanonicalNameReference(); // read top-level function reference. | 4014 SkipCanonicalNameReference(); // read top-level function reference. |
4014 SkipExpression(); // read context vector. | 4015 SkipExpression(); // read context vector. |
4015 SkipDartType(); // read function type. | 4016 SkipDartType(); // read function type. |
| 4017 SkipListOfDartTypes(); // read type arguments. |
4016 return; | 4018 return; |
4017 case kBigIntLiteral: | 4019 case kBigIntLiteral: |
4018 SkipStringReference(); // read string reference. | 4020 SkipStringReference(); // read string reference. |
4019 return; | 4021 return; |
4020 case kStringLiteral: | 4022 case kStringLiteral: |
4021 SkipStringReference(); // read string reference. | 4023 SkipStringReference(); // read string reference. |
4022 return; | 4024 return; |
4023 case kSpecialIntLiteral: | 4025 case kSpecialIntLiteral: |
4024 return; | 4026 return; |
4025 case kNegativeIntLiteral: | 4027 case kNegativeIntLiteral: |
(...skipping 1881 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5907 StoreInstanceField(TokenPosition::kNoSource, Closure::function_offset()); | 5909 StoreInstanceField(TokenPosition::kNoSource, Closure::function_offset()); |
5908 | 5910 |
5909 instructions += LoadLocal(closure); | 5911 instructions += LoadLocal(closure); |
5910 instructions += LoadLocal(context); | 5912 instructions += LoadLocal(context); |
5911 instructions += | 5913 instructions += |
5912 StoreInstanceField(TokenPosition::kNoSource, Closure::context_offset()); | 5914 StoreInstanceField(TokenPosition::kNoSource, Closure::context_offset()); |
5913 | 5915 |
5914 instructions += Drop(); | 5916 instructions += Drop(); |
5915 | 5917 |
5916 SkipDartType(); // skip function type of the closure. | 5918 SkipDartType(); // skip function type of the closure. |
| 5919 SkipListOfDartTypes(); // skip list of type arguments. |
5917 | 5920 |
5918 return instructions; | 5921 return instructions; |
5919 } | 5922 } |
5920 | 5923 |
5921 Fragment StreamingFlowGraphBuilder::BuildInvalidStatement() { | 5924 Fragment StreamingFlowGraphBuilder::BuildInvalidStatement() { |
5922 H.ReportError("Invalid statements not implemented yet!"); | 5925 H.ReportError("Invalid statements not implemented yet!"); |
5923 return Fragment(); | 5926 return Fragment(); |
5924 } | 5927 } |
5925 | 5928 |
5926 Fragment StreamingFlowGraphBuilder::BuildExpressionStatement() { | 5929 Fragment StreamingFlowGraphBuilder::BuildExpressionStatement() { |
(...skipping 1354 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7281 } | 7284 } |
7282 } | 7285 } |
7283 | 7286 |
7284 return Array::Handle(Array::null()); | 7287 return Array::Handle(Array::null()); |
7285 } | 7288 } |
7286 | 7289 |
7287 } // namespace kernel | 7290 } // namespace kernel |
7288 } // namespace dart | 7291 } // namespace dart |
7289 | 7292 |
7290 #endif // !defined(DART_PRECOMPILED_RUNTIME) | 7293 #endif // !defined(DART_PRECOMPILED_RUNTIME) |
OLD | NEW |