Index: runtime/vm/parser.cc |
=================================================================== |
--- runtime/vm/parser.cc (revision 42569) |
+++ runtime/vm/parser.cc (working copy) |
@@ -944,6 +944,7 @@ |
false, // is_native |
cls, |
token_pos)); |
+ fake_function.set_is_debuggable(false); |
ParsedFunction* parsed_function = |
new ParsedFunction(isolate, fake_function); |
Parser parser(script, parsed_function, token_pos); |
@@ -1082,6 +1083,7 @@ |
// and inlining them. After the field is initialized, the |
// compiler can eliminate the call to the static initializer. |
initializer.set_is_visible(false); |
+ initializer.set_is_debuggable(false); |
initializer.SetIsOptimizable(false); |
initializer.set_is_inlinable(false); |
@@ -1647,6 +1649,7 @@ |
current_class(), |
parameter.name_pos)); |
signature_function.set_result_type(result_type); |
+ signature_function.set_is_debuggable(false); |
AddFormalParamsToFunction(&func_params, signature_function); |
const String& signature = String::Handle(I, |
signature_function.Signature()); |
@@ -3129,8 +3132,12 @@ |
Function& async_closure = Function::ZoneHandle(I); |
if (func.IsAsyncFunction() && !func.is_async_closure()) { |
+ // The code of an async function is synthesized. Disable debugging. |
+ func.set_is_debuggable(false); |
async_closure = OpenAsyncFunction(func.token_pos()); |
} else if (func.is_async_closure()) { |
+ // The closure containing the body of an async function is debuggable. |
+ ASSERT(func.is_debuggable()); |
OpenAsyncClosure(); |
} |
@@ -3774,6 +3781,7 @@ |
current_class(), |
field->name_pos); |
getter.set_result_type(*field->type); |
+ getter.set_is_debuggable(false); |
members->AddFunction(getter); |
} |
} |
@@ -3794,6 +3802,7 @@ |
ASSERT(current_class().raw() == getter.Owner()); |
params.AddReceiver(ReceiverType(current_class()), field->name_pos); |
getter.set_result_type(*field->type); |
+ getter.set_is_debuggable(false); |
AddFormalParamsToFunction(¶ms, getter); |
members->AddFunction(getter); |
if (!field->has_final) { |
@@ -3815,6 +3824,7 @@ |
&Symbols::Value(), |
field->type); |
setter.set_result_type(Type::Handle(I, Type::VoidType())); |
+ setter.set_is_debuggable(false); |
AddFormalParamsToFunction(¶ms, setter); |
members->AddFunction(setter); |
} |
@@ -4414,6 +4424,7 @@ |
cls, |
cls.token_pos()); |
getter.set_result_type(int_type); |
+ getter.set_is_debuggable(false); |
ParamList params; |
params.AddReceiver(&dynamic_type, cls.token_pos()); |
AddFormalParamsToFunction(¶ms, getter); |
@@ -4560,6 +4571,7 @@ |
cls, |
cls.token_pos())); |
ctor.set_end_token_pos(ctor.token_pos()); |
+ ctor.set_is_debuggable(false); |
if (library_.is_dart_scheme() && library_.IsPrivate(ctor_name)) { |
ctor.set_is_visible(false); |
} |
@@ -4796,6 +4808,7 @@ |
function_type_alias, |
alias_name_pos)); |
signature_function.set_result_type(result_type); |
+ signature_function.set_is_debuggable(false); |
AddFormalParamsToFunction(&func_params, signature_function); |
// Patch the signature function in the signature class. |
@@ -5137,6 +5150,7 @@ |
current_class(), |
name_pos); |
getter.set_result_type(type); |
+ getter.set_is_debuggable(false); |
top_level->functions.Add(getter); |
} |
} else if (is_final) { |
@@ -5259,8 +5273,11 @@ |
func.set_result_type(result_type); |
func.set_end_token_pos(function_end_pos); |
func.set_modifier(func_modifier); |
- if (is_native && library_.is_dart_scheme() && library_.IsPrivate(func_name)) { |
- func.set_is_visible(false); |
+ if (is_native) { |
+ func.set_is_debuggable(false); |
+ if (library_.is_dart_scheme() && library_.IsPrivate(func_name)) { |
+ func.set_is_visible(false); |
+ } |
} |
AddFormalParamsToFunction(¶ms, func); |
top_level->functions.Add(func); |
@@ -5399,9 +5416,11 @@ |
func.set_result_type(result_type); |
func.set_end_token_pos(accessor_end_pos); |
func.set_modifier(func_modifier); |
- if (is_native && library_.is_dart_scheme() && |
- library_.IsPrivate(accessor_name)) { |
- func.set_is_visible(false); |
+ if (is_native) { |
+ func.set_is_debuggable(false); |
+ if (library_.is_dart_scheme() && library_.IsPrivate(accessor_name)) { |
+ func.set_is_visible(false); |
+ } |
} |
AddFormalParamsToFunction(¶ms, func); |
top_level->functions.Add(func); |