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/code_descriptors.h" | 9 #include "vm/code_descriptors.h" |
10 #include "vm/dart_entry.h" | 10 #include "vm/dart_entry.h" |
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
285 callee_exit->AddDominatedBlock(block); | 285 callee_exit->AddDominatedBlock(block); |
286 } | 286 } |
287 // The call block is now the immediate dominator of blocks whose | 287 // The call block is now the immediate dominator of blocks whose |
288 // immediate dominator was the callee entry. | 288 // immediate dominator was the callee entry. |
289 call_block->ClearDominatedBlocks(); | 289 call_block->ClearDominatedBlocks(); |
290 for (intptr_t i = 0; i < callee_entry->dominated_blocks().length(); ++i) { | 290 for (intptr_t i = 0; i < callee_entry->dominated_blocks().length(); ++i) { |
291 BlockEntryInstr* block = callee_entry->dominated_blocks()[i]; | 291 BlockEntryInstr* block = callee_entry->dominated_blocks()[i]; |
292 call_block->AddDominatedBlock(block); | 292 call_block->AddDominatedBlock(block); |
293 } | 293 } |
294 } | 294 } |
| 295 |
| 296 // Neither call nor callee entry are in the graph at this point. Remove them |
| 297 // from use lists. |
| 298 callee_entry->UnuseAllInputs(); |
| 299 call_->UnuseAllInputs(); |
295 } | 300 } |
296 | 301 |
297 | 302 |
298 void EffectGraphVisitor::Append(const EffectGraphVisitor& other_fragment) { | 303 void EffectGraphVisitor::Append(const EffectGraphVisitor& other_fragment) { |
299 ASSERT(is_open()); | 304 ASSERT(is_open()); |
300 if (other_fragment.is_empty()) return; | 305 if (other_fragment.is_empty()) return; |
301 if (is_empty()) { | 306 if (is_empty()) { |
302 entry_ = other_fragment.entry(); | 307 entry_ = other_fragment.entry(); |
303 exit_ = other_fragment.exit(); | 308 exit_ = other_fragment.exit(); |
304 } else { | 309 } else { |
(...skipping 3077 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3382 intptr_t len = OS::SNPrint(NULL, 0, kFormat, function_name, reason) + 1; | 3387 intptr_t len = OS::SNPrint(NULL, 0, kFormat, function_name, reason) + 1; |
3383 char* chars = Isolate::Current()->current_zone()->Alloc<char>(len); | 3388 char* chars = Isolate::Current()->current_zone()->Alloc<char>(len); |
3384 OS::SNPrint(chars, len, kFormat, function_name, reason); | 3389 OS::SNPrint(chars, len, kFormat, function_name, reason); |
3385 const Error& error = Error::Handle( | 3390 const Error& error = Error::Handle( |
3386 LanguageError::New(String::Handle(String::New(chars)))); | 3391 LanguageError::New(String::Handle(String::New(chars)))); |
3387 Isolate::Current()->long_jump_base()->Jump(1, error); | 3392 Isolate::Current()->long_jump_base()->Jump(1, error); |
3388 } | 3393 } |
3389 | 3394 |
3390 | 3395 |
3391 } // namespace dart | 3396 } // namespace dart |
OLD | NEW |