| OLD | NEW |
| 1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2017, 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 #ifndef RUNTIME_VM_KERNEL_BINARY_FLOWGRAPH_H_ | 5 #ifndef RUNTIME_VM_KERNEL_BINARY_FLOWGRAPH_H_ |
| 6 #define RUNTIME_VM_KERNEL_BINARY_FLOWGRAPH_H_ | 6 #define RUNTIME_VM_KERNEL_BINARY_FLOWGRAPH_H_ |
| 7 | 7 |
| 8 #if !defined(DART_PRECOMPILED_RUNTIME) | 8 #if !defined(DART_PRECOMPILED_RUNTIME) |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| (...skipping 971 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 982 case kType: | 982 case kType: |
| 983 builder_->SkipDartType(); // read type. | 983 builder_->SkipDartType(); // read type. |
| 984 if (++next_read_ == field) return; | 984 if (++next_read_ == field) return; |
| 985 case kInitializer: | 985 case kInitializer: |
| 986 if (builder_->ReadTag() == kSomething) { | 986 if (builder_->ReadTag() == kSomething) { |
| 987 if (detect_function_literal_initializer && | 987 if (detect_function_literal_initializer && |
| 988 builder_->PeekTag() == kFunctionExpression) { | 988 builder_->PeekTag() == kFunctionExpression) { |
| 989 AlternativeReadingScope alt(builder_->reader_); | 989 AlternativeReadingScope alt(builder_->reader_); |
| 990 Tag tag = builder_->ReadTag(); | 990 Tag tag = builder_->ReadTag(); |
| 991 ASSERT(tag == kFunctionExpression); | 991 ASSERT(tag == kFunctionExpression); |
| 992 builder_->ReadPosition(); // read position. |
| 992 | 993 |
| 993 FunctionNodeHelper helper(builder_); | 994 FunctionNodeHelper helper(builder_); |
| 994 helper.ReadUntilIncluding(FunctionNodeHelper::kEndPosition); | 995 helper.ReadUntilIncluding(FunctionNodeHelper::kEndPosition); |
| 995 | 996 |
| 996 has_function_literal_initializer_ = true; | 997 has_function_literal_initializer_ = true; |
| 997 function_literal_start_ = helper.position_; | 998 function_literal_start_ = helper.position_; |
| 998 function_literal_end_ = helper.end_position_; | 999 function_literal_end_ = helper.end_position_; |
| 999 } | 1000 } |
| 1000 builder_->SkipExpression(); // read initializer. | 1001 builder_->SkipExpression(); // read initializer. |
| 1001 } | 1002 } |
| (...skipping 564 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1566 private: | 1567 private: |
| 1567 StreamingFlowGraphBuilder* builder_; | 1568 StreamingFlowGraphBuilder* builder_; |
| 1568 intptr_t next_read_; | 1569 intptr_t next_read_; |
| 1569 }; | 1570 }; |
| 1570 | 1571 |
| 1571 } // namespace kernel | 1572 } // namespace kernel |
| 1572 } // namespace dart | 1573 } // namespace dart |
| 1573 | 1574 |
| 1574 #endif // !defined(DART_PRECOMPILED_RUNTIME) | 1575 #endif // !defined(DART_PRECOMPILED_RUNTIME) |
| 1575 #endif // RUNTIME_VM_KERNEL_BINARY_FLOWGRAPH_H_ | 1576 #endif // RUNTIME_VM_KERNEL_BINARY_FLOWGRAPH_H_ |
| OLD | NEW |