| 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 421 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 432 scope_->LookupVariable(Symbols::AsyncStackTraceVar(), true); | 432 scope_->LookupVariable(Symbols::AsyncStackTraceVar(), true); |
| 433 if (temp != NULL) { | 433 if (temp != NULL) { |
| 434 scope_->CaptureVariable(temp); | 434 scope_->CaptureVariable(temp); |
| 435 } | 435 } |
| 436 } | 436 } |
| 437 } | 437 } |
| 438 } | 438 } |
| 439 | 439 |
| 440 void StreamingScopeBuilder::VisitInitializer() { | 440 void StreamingScopeBuilder::VisitInitializer() { |
| 441 Tag tag = builder_->ReadTag(); | 441 Tag tag = builder_->ReadTag(); |
| 442 builder_->ReadByte(); // read isSynthetic flag. |
| 442 switch (tag) { | 443 switch (tag) { |
| 443 case kInvalidInitializer: | 444 case kInvalidInitializer: |
| 444 return; | 445 return; |
| 445 case kFieldInitializer: | 446 case kFieldInitializer: |
| 446 builder_->SkipCanonicalNameReference(); // read field_reference. | 447 builder_->SkipCanonicalNameReference(); // read field_reference. |
| 447 VisitExpression(); // read value. | 448 VisitExpression(); // read value. |
| 448 return; | 449 return; |
| 449 case kSuperInitializer: | 450 case kSuperInitializer: |
| 450 builder_->SkipCanonicalNameReference(); // read target_reference. | 451 builder_->SkipCanonicalNameReference(); // read target_reference. |
| 451 VisitArguments(); // read arguments. | 452 VisitArguments(); // read arguments. |
| (...skipping 2391 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2843 // class A { | 2844 // class A { |
| 2844 // var x; | 2845 // var x; |
| 2845 // var y; | 2846 // var y; |
| 2846 // A(this.x) : super(expr), y = (expr); | 2847 // A(this.x) : super(expr), y = (expr); |
| 2847 // } | 2848 // } |
| 2848 { | 2849 { |
| 2849 AlternativeReadingScope alt(reader_, initializers_offset); | 2850 AlternativeReadingScope alt(reader_, initializers_offset); |
| 2850 intptr_t list_length = ReadListLength(); // read initializers list length. | 2851 intptr_t list_length = ReadListLength(); // read initializers list length. |
| 2851 for (intptr_t i = 0; i < list_length; ++i) { | 2852 for (intptr_t i = 0; i < list_length; ++i) { |
| 2852 Tag tag = ReadTag(); | 2853 Tag tag = ReadTag(); |
| 2854 ReadByte(); // read isSynthetic flag. |
| 2853 switch (tag) { | 2855 switch (tag) { |
| 2854 case kInvalidInitializer: | 2856 case kInvalidInitializer: |
| 2855 UNIMPLEMENTED(); | 2857 UNIMPLEMENTED(); |
| 2856 return Fragment(); | 2858 return Fragment(); |
| 2857 case kFieldInitializer: { | 2859 case kFieldInitializer: { |
| 2858 NameIndex canonical_name = | 2860 NameIndex canonical_name = |
| 2859 ReadCanonicalNameReference(); // read field_reference. | 2861 ReadCanonicalNameReference(); // read field_reference. |
| 2860 instructions += BuildFieldInitializer(canonical_name); // read value. | 2862 instructions += BuildFieldInitializer(canonical_name); // read value. |
| 2861 break; | 2863 break; |
| 2862 } | 2864 } |
| (...skipping 4406 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7269 } | 7271 } |
| 7270 } | 7272 } |
| 7271 | 7273 |
| 7272 return Array::Handle(Array::null()); | 7274 return Array::Handle(Array::null()); |
| 7273 } | 7275 } |
| 7274 | 7276 |
| 7275 } // namespace kernel | 7277 } // namespace kernel |
| 7276 } // namespace dart | 7278 } // namespace dart |
| 7277 | 7279 |
| 7278 #endif // !defined(DART_PRECOMPILED_RUNTIME) | 7280 #endif // !defined(DART_PRECOMPILED_RUNTIME) |
| OLD | NEW |