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 | |
Dmitry Stefantsov
2017/07/31 15:15:06
As I mentioned, we maintain these comments related
sjindel
2017/07/31 15:44:30
Done.
| |
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 3292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4002 ReadUInt(); // read index. | 4003 ReadUInt(); // read index. |
4003 SkipExpression(); // read value. | 4004 SkipExpression(); // read value. |
4004 return; | 4005 return; |
4005 case kVectorCopy: | 4006 case kVectorCopy: |
4006 SkipExpression(); // read vector expression. | 4007 SkipExpression(); // read vector expression. |
4007 return; | 4008 return; |
4008 case kClosureCreation: | 4009 case kClosureCreation: |
4009 SkipCanonicalNameReference(); // read top-level function reference. | 4010 SkipCanonicalNameReference(); // read top-level function reference. |
4010 SkipExpression(); // read context vector. | 4011 SkipExpression(); // read context vector. |
4011 SkipDartType(); // read function type. | 4012 SkipDartType(); // read function type. |
4013 SkipListOfDartTypes(); // read type arguments | |
Dmitry Stefantsov
2017/07/31 15:15:06
Please, add a full-stop at the end.
sjindel
2017/07/31 15:44:30
Done.
| |
4012 return; | 4014 return; |
4013 case kBigIntLiteral: | 4015 case kBigIntLiteral: |
4014 SkipStringReference(); // read string reference. | 4016 SkipStringReference(); // read string reference. |
4015 return; | 4017 return; |
4016 case kStringLiteral: | 4018 case kStringLiteral: |
4017 SkipStringReference(); // read string reference. | 4019 SkipStringReference(); // read string reference. |
4018 return; | 4020 return; |
4019 case kSpecialIntLiteral: | 4021 case kSpecialIntLiteral: |
4020 return; | 4022 return; |
4021 case kNegativeIntLiteral: | 4023 case kNegativeIntLiteral: |
(...skipping 1875 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
5897 StoreInstanceField(TokenPosition::kNoSource, Closure::function_offset()); | 5899 StoreInstanceField(TokenPosition::kNoSource, Closure::function_offset()); |
5898 | 5900 |
5899 instructions += LoadLocal(closure); | 5901 instructions += LoadLocal(closure); |
5900 instructions += LoadLocal(context); | 5902 instructions += LoadLocal(context); |
5901 instructions += | 5903 instructions += |
5902 StoreInstanceField(TokenPosition::kNoSource, Closure::context_offset()); | 5904 StoreInstanceField(TokenPosition::kNoSource, Closure::context_offset()); |
5903 | 5905 |
5904 instructions += Drop(); | 5906 instructions += Drop(); |
5905 | 5907 |
5906 SkipDartType(); // skip function type of the closure. | 5908 SkipDartType(); // skip function type of the closure. |
5909 SkipListOfDartTypes(); // skip list of type arguments (for now) | |
Dmitry Stefantsov
2017/07/31 15:15:06
Please, remove "(for now)" and add a full-stop.
sjindel
2017/07/31 15:44:30
Done.
| |
5907 | 5910 |
5908 return instructions; | 5911 return instructions; |
5909 } | 5912 } |
5910 | 5913 |
5911 Fragment StreamingFlowGraphBuilder::BuildInvalidStatement() { | 5914 Fragment StreamingFlowGraphBuilder::BuildInvalidStatement() { |
5912 H.ReportError("Invalid statements not implemented yet!"); | 5915 H.ReportError("Invalid statements not implemented yet!"); |
5913 return Fragment(); | 5916 return Fragment(); |
5914 } | 5917 } |
5915 | 5918 |
5916 Fragment StreamingFlowGraphBuilder::BuildExpressionStatement() { | 5919 Fragment StreamingFlowGraphBuilder::BuildExpressionStatement() { |
(...skipping 1354 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
7271 } | 7274 } |
7272 } | 7275 } |
7273 | 7276 |
7274 return Array::Handle(Array::null()); | 7277 return Array::Handle(Array::null()); |
7275 } | 7278 } |
7276 | 7279 |
7277 } // namespace kernel | 7280 } // namespace kernel |
7278 } // namespace dart | 7281 } // namespace dart |
7279 | 7282 |
7280 #endif // !defined(DART_PRECOMPILED_RUNTIME) | 7283 #endif // !defined(DART_PRECOMPILED_RUNTIME) |
OLD | NEW |