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

Unified Diff: runtime/vm/flow_graph_builder.cc

Issue 132163005: Version 1.1.0-dev.5.7 (Closed) Base URL: http://dart.googlecode.com/svn/trunk/dart/
Patch Set: Created 6 years, 11 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 | « runtime/vm/disassembler_x64.cc ('k') | runtime/vm/flow_graph_compiler.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/flow_graph_builder.cc
===================================================================
--- runtime/vm/flow_graph_builder.cc (revision 31662)
+++ runtime/vm/flow_graph_builder.cc (working copy)
@@ -967,11 +967,15 @@
// Call to stub that checks whether the debugger is in single
// step mode. This call must happen before the contexts are
// unchained so that captured variables can be inspected.
- AddInstruction(new DebugStepCheckInstr(node->token_pos()));
+ // No debugger check is done in native functions.
+ const Function& function = owner()->parsed_function()->function();
+ if (!function.is_native()) {
+ AddInstruction(new DebugStepCheckInstr(node->token_pos(),
+ PcDescriptors::kReturn));
+ }
Value* return_value = for_value.value();
if (FLAG_enable_type_checks) {
- const Function& function = owner()->parsed_function()->function();
const bool is_implicit_dynamic_getter =
(!function.is_static() &&
((function.kind() == RawFunction::kImplicitGetter) ||
@@ -983,8 +987,7 @@
// However, factories may create an instance of the wrong type.
if (!is_implicit_dynamic_getter && !function.IsConstructor()) {
const AbstractType& dst_type =
- AbstractType::ZoneHandle(
- owner()->parsed_function()->function().result_type());
+ AbstractType::ZoneHandle(function.result_type());
return_value = BuildAssignableValue(node->value()->token_pos(),
return_value,
dst_type,
@@ -3207,6 +3210,15 @@
// value: <Expression> }
void EffectGraphVisitor::HandleStoreLocal(StoreLocalNode* node,
bool result_is_needed) {
+ // If the right hand side is an expression that does not contain
+ // a safe point for the debugger to stop, add an explicit stub
+ // call.
+ if (node->value()->IsLiteralNode() ||
+ node->value()->IsLoadLocalNode()) {
+ AddInstruction(new DebugStepCheckInstr(node->token_pos(),
+ PcDescriptors::kRuntimeCall));
+ }
+
ValueGraphVisitor for_value(owner());
node->value()->Visit(&for_value);
Append(for_value);
« no previous file with comments | « runtime/vm/disassembler_x64.cc ('k') | runtime/vm/flow_graph_compiler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698