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

Side by Side Diff: runtime/vm/flow_graph_builder.cc

Issue 1019683002: Eliminate some DebugStep calls in async code (Closed) Base URL: http://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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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/flow_graph_builder.h" 5 #include "vm/flow_graph_builder.h"
6 6
7 #include "lib/invocation_mirror.h" 7 #include "lib/invocation_mirror.h"
8 #include "vm/ast_printer.h" 8 #include "vm/ast_printer.h"
9 #include "vm/bit_vector.h" 9 #include "vm/bit_vector.h"
10 #include "vm/class_finalizer.h" 10 #include "vm/class_finalizer.h"
(...skipping 3418 matching lines...) Expand 10 before | Expand all | Expand 10 after
3429 Definition* load = BuildLoadLocal(node->local()); 3429 Definition* load = BuildLoadLocal(node->local());
3430 ReturnDefinition(load); 3430 ReturnDefinition(load);
3431 } 3431 }
3432 3432
3433 3433
3434 // <Expression> ::= StoreLocal { local: LocalVariable 3434 // <Expression> ::= StoreLocal { local: LocalVariable
3435 // value: <Expression> } 3435 // value: <Expression> }
3436 void EffectGraphVisitor::VisitStoreLocalNode(StoreLocalNode* node) { 3436 void EffectGraphVisitor::VisitStoreLocalNode(StoreLocalNode* node) {
3437 // If the right hand side is an expression that does not contain 3437 // If the right hand side is an expression that does not contain
3438 // a safe point for the debugger to stop, add an explicit stub 3438 // a safe point for the debugger to stop, add an explicit stub
3439 // call. 3439 // call. Exception: don't do this when assigning to internal variables,
3440 if (node->value()->IsLiteralNode() || 3440 // which by convention start with ':', or for generated code that
3441 // has no source position.
3442 if ((node->value()->IsLiteralNode() ||
3441 node->value()->IsLoadLocalNode() || 3443 node->value()->IsLoadLocalNode() ||
3442 node->value()->IsClosureNode()) { 3444 node->value()->IsClosureNode()) &&
3445 (node->local().name().CharAt(0) != ':') &&
3446 (node->token_pos() != Scanner::kNoSourcePos)) {
srdjan 2015/03/18 23:26:27 How about factoring this out into LocalVariable::I
hausner 2015/03/18 23:59:21 Done.
3443 AddInstruction(new(Z) DebugStepCheckInstr( 3447 AddInstruction(new(Z) DebugStepCheckInstr(
3444 node->token_pos(), RawPcDescriptors::kRuntimeCall)); 3448 node->token_pos(), RawPcDescriptors::kRuntimeCall));
3445 } 3449 }
3446 3450
3447 ValueGraphVisitor for_value(owner()); 3451 ValueGraphVisitor for_value(owner());
3448 node->value()->Visit(&for_value); 3452 node->value()->Visit(&for_value);
3449 Append(for_value); 3453 Append(for_value);
3450 Value* store_value = for_value.value(); 3454 Value* store_value = for_value.value();
3451 if (Isolate::Current()->TypeChecksEnabled()) { 3455 if (Isolate::Current()->TypeChecksEnabled()) {
3452 store_value = BuildAssignableValue(node->value()->token_pos(), 3456 store_value = BuildAssignableValue(node->value()->token_pos(),
(...skipping 912 matching lines...) Expand 10 before | Expand all | Expand 10 after
4365 Report::MessageF(Report::kBailout, 4369 Report::MessageF(Report::kBailout,
4366 Script::Handle(function.script()), 4370 Script::Handle(function.script()),
4367 function.token_pos(), 4371 function.token_pos(),
4368 "FlowGraphBuilder Bailout: %s %s", 4372 "FlowGraphBuilder Bailout: %s %s",
4369 String::Handle(function.name()).ToCString(), 4373 String::Handle(function.name()).ToCString(),
4370 reason); 4374 reason);
4371 UNREACHABLE(); 4375 UNREACHABLE();
4372 } 4376 }
4373 4377
4374 } // namespace dart 4378 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698