| 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_reader.h" | 5 #include "vm/kernel_reader.h" |
| 6 | 6 |
| 7 #include <string.h> | 7 #include <string.h> |
| 8 | 8 |
| 9 #include "vm/dart_api_impl.h" | 9 #include "vm/dart_api_impl.h" |
| 10 #include "vm/kernel_binary.h" | 10 #include "vm/kernel_binary.h" |
| (...skipping 503 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 514 function.set_is_inlinable(!FLAG_causal_async_stacks); | 514 function.set_is_inlinable(!FLAG_causal_async_stacks); |
| 515 break; | 515 break; |
| 516 case FunctionNode::kAsyncStar: | 516 case FunctionNode::kAsyncStar: |
| 517 function.set_modifier(RawFunction::kAsyncGen); | 517 function.set_modifier(RawFunction::kAsyncGen); |
| 518 function.set_is_inlinable(!FLAG_causal_async_stacks); | 518 function.set_is_inlinable(!FLAG_causal_async_stacks); |
| 519 break; | 519 break; |
| 520 default: | 520 default: |
| 521 // no special modifier | 521 // no special modifier |
| 522 break; | 522 break; |
| 523 } | 523 } |
| 524 ASSERT(kernel_procedure->function()->async_marker() == FunctionNode::kSync); | 524 ASSERT(kernel_procedure->function()->async_marker() == FunctionNode::kSync || |
| 525 kernel_procedure->function()->async_marker() == |
| 526 FunctionNode::kSyncYielding); |
| 525 | 527 |
| 526 if (native_name != NULL) { | 528 if (native_name != NULL) { |
| 527 function.set_native_name(*native_name); | 529 function.set_native_name(*native_name); |
| 528 } | 530 } |
| 529 | 531 |
| 530 SetupFunctionParameters(H, T, owner, function, kernel_procedure->function(), | 532 SetupFunctionParameters(H, T, owner, function, kernel_procedure->function(), |
| 531 is_method, | 533 is_method, |
| 532 false); // is_closure | 534 false); // is_closure |
| 533 | 535 |
| 534 if (kernel_klass == NULL) { | 536 if (kernel_klass == NULL) { |
| (...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 906 initializer_fun.set_is_debuggable(false); | 908 initializer_fun.set_is_debuggable(false); |
| 907 initializer_fun.set_is_reflectable(false); | 909 initializer_fun.set_is_reflectable(false); |
| 908 initializer_fun.set_is_inlinable(false); | 910 initializer_fun.set_is_inlinable(false); |
| 909 return new (zone) ParsedFunction(thread, initializer_fun); | 911 return new (zone) ParsedFunction(thread, initializer_fun); |
| 910 } | 912 } |
| 911 | 913 |
| 912 | 914 |
| 913 } // namespace kernel | 915 } // namespace kernel |
| 914 } // namespace dart | 916 } // namespace dart |
| 915 #endif // !defined(DART_PRECOMPILED_RUNTIME) | 917 #endif // !defined(DART_PRECOMPILED_RUNTIME) |
| OLD | NEW |