Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(726)

Unified Diff: runtime/vm/parser.cc

Issue 1025633003: Revert "Mark async and generator functions as debuggable, so their frames are visible for return ty… (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tests/language/async_or_generator_return_type_stacktrace_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/parser.cc
diff --git a/runtime/vm/parser.cc b/runtime/vm/parser.cc
index ec9b3e60b6389bc2adcd07ecc956b756ae4ca27a..1f4ef85c34a434bc4aea646feecf601f804dbdb2 100644
--- a/runtime/vm/parser.cc
+++ b/runtime/vm/parser.cc
@@ -3181,24 +3181,23 @@ SequenceNode* Parser::ParseFunc(const Function& func,
Function& generated_body_closure = Function::ZoneHandle(Z);
if (func.IsAsyncFunction()) {
ASSERT(!func.is_generated_body());
- // Must show frame for checked mode return type error.
- ASSERT(func.is_debuggable());
+ // The code of an async function is synthesized. Disable debugging.
+ func.set_is_debuggable(false);
generated_body_closure = OpenAsyncFunction(func.token_pos());
} else if (func.IsAsyncClosure()) {
// The closure containing the body of an async function is debuggable.
ASSERT(func.is_debuggable());
OpenAsyncClosure();
} else if (func.IsSyncGenerator()) {
- // Must show frame for checked mode return type error.
- ASSERT(func.is_debuggable());
+ // The code of a sync generator is synthesized. Disable debugging.
+ func.set_is_debuggable(false);
generated_body_closure = OpenSyncGeneratorFunction(func.token_pos());
} else if (func.IsSyncGenClosure()) {
// The closure containing the body of a sync generator is debuggable.
ASSERT(func.is_debuggable());
async_temp_scope_ = current_block_->scope;
} else if (func.IsAsyncGenerator()) {
- // Must show frame for checked mode return type error.
- ASSERT(func.is_debuggable());
+ func.set_is_debuggable(false);
generated_body_closure = OpenAsyncGeneratorFunction(func.token_pos());
} else if (func.IsAsyncGenClosure()) {
// The closure containing the body of an async* function is debuggable.
« no previous file with comments | « no previous file | tests/language/async_or_generator_return_type_stacktrace_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698