| OLD | NEW |
| 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 Loading... |
| 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. Exception: don't do this when assigning to internal variables, | 3439 // call. Exception: don't do this when assigning to or from internal |
| 3440 // or for generated code that has no source position. | 3440 // variables, or for generated code that has no source position. |
| 3441 if ((node->value()->IsLiteralNode() || | 3441 if ((node->value()->IsLiteralNode() || |
| 3442 node->value()->IsLoadLocalNode() || | 3442 (node->value()->IsLoadLocalNode() && |
| 3443 !node->value()->AsLoadLocalNode()->local().IsInternal()) || |
| 3443 node->value()->IsClosureNode()) && | 3444 node->value()->IsClosureNode()) && |
| 3444 !node->local().IsInternal() && | 3445 !node->local().IsInternal() && |
| 3445 (node->token_pos() != Scanner::kNoSourcePos)) { | 3446 (node->token_pos() != Scanner::kNoSourcePos)) { |
| 3446 AddInstruction(new(Z) DebugStepCheckInstr( | 3447 AddInstruction(new(Z) DebugStepCheckInstr( |
| 3447 node->token_pos(), RawPcDescriptors::kRuntimeCall)); | 3448 node->token_pos(), RawPcDescriptors::kRuntimeCall)); |
| 3448 } | 3449 } |
| 3449 | 3450 |
| 3450 ValueGraphVisitor for_value(owner()); | 3451 ValueGraphVisitor for_value(owner()); |
| 3451 node->value()->Visit(&for_value); | 3452 node->value()->Visit(&for_value); |
| 3452 Append(for_value); | 3453 Append(for_value); |
| (...skipping 918 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4371 Report::MessageF(Report::kBailout, | 4372 Report::MessageF(Report::kBailout, |
| 4372 Script::Handle(function.script()), | 4373 Script::Handle(function.script()), |
| 4373 function.token_pos(), | 4374 function.token_pos(), |
| 4374 "FlowGraphBuilder Bailout: %s %s", | 4375 "FlowGraphBuilder Bailout: %s %s", |
| 4375 String::Handle(function.name()).ToCString(), | 4376 String::Handle(function.name()).ToCString(), |
| 4376 reason); | 4377 reason); |
| 4377 UNREACHABLE(); | 4378 UNREACHABLE(); |
| 4378 } | 4379 } |
| 4379 | 4380 |
| 4380 } // namespace dart | 4381 } // namespace dart |
| OLD | NEW |