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

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 | runtime/vm/scopes.h » ('j') | 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 // or for generated code that has no source position.
3441 if ((node->value()->IsLiteralNode() ||
3441 node->value()->IsLoadLocalNode() || 3442 node->value()->IsLoadLocalNode() ||
3442 node->value()->IsClosureNode()) { 3443 node->value()->IsClosureNode()) &&
3444 node->local().IsInternal() &&
3445 (node->token_pos() != Scanner::kNoSourcePos)) {
3443 AddInstruction(new(Z) DebugStepCheckInstr( 3446 AddInstruction(new(Z) DebugStepCheckInstr(
3444 node->token_pos(), RawPcDescriptors::kRuntimeCall)); 3447 node->token_pos(), RawPcDescriptors::kRuntimeCall));
3445 } 3448 }
3446 3449
3447 ValueGraphVisitor for_value(owner()); 3450 ValueGraphVisitor for_value(owner());
3448 node->value()->Visit(&for_value); 3451 node->value()->Visit(&for_value);
3449 Append(for_value); 3452 Append(for_value);
3450 Value* store_value = for_value.value(); 3453 Value* store_value = for_value.value();
3451 if (Isolate::Current()->TypeChecksEnabled()) { 3454 if (Isolate::Current()->TypeChecksEnabled()) {
3452 store_value = BuildAssignableValue(node->value()->token_pos(), 3455 store_value = BuildAssignableValue(node->value()->token_pos(),
(...skipping 912 matching lines...) Expand 10 before | Expand all | Expand 10 after
4365 Report::MessageF(Report::kBailout, 4368 Report::MessageF(Report::kBailout,
4366 Script::Handle(function.script()), 4369 Script::Handle(function.script()),
4367 function.token_pos(), 4370 function.token_pos(),
4368 "FlowGraphBuilder Bailout: %s %s", 4371 "FlowGraphBuilder Bailout: %s %s",
4369 String::Handle(function.name()).ToCString(), 4372 String::Handle(function.name()).ToCString(),
4370 reason); 4373 reason);
4371 UNREACHABLE(); 4374 UNREACHABLE();
4372 } 4375 }
4373 4376
4374 } // namespace dart 4377 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/scopes.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698