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

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

Issue 15730003: Support inlining function containing throw in the optimizer. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 7 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 | « runtime/vm/intermediate_language.h ('k') | runtime/vm/object.cc » ('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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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/intermediate_language.h" 5 #include "vm/intermediate_language.h"
6 6
7 #include "vm/bigint_operations.h" 7 #include "vm/bigint_operations.h"
8 #include "vm/bit_vector.h" 8 #include "vm/bit_vector.h"
9 #include "vm/dart_entry.h" 9 #include "vm/dart_entry.h"
10 #include "vm/flow_graph_allocator.h" 10 #include "vm/flow_graph_allocator.h"
(...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after
431 431
432 // Update def-use chains whenever instructions are added to the graph 432 // Update def-use chains whenever instructions are added to the graph
433 // after initial graph construction. 433 // after initial graph construction.
434 for (intptr_t i = InputCount() - 1; i >= 0; --i) { 434 for (intptr_t i = InputCount() - 1; i >= 0; --i) {
435 Value* input = InputAt(i); 435 Value* input = InputAt(i);
436 input->definition()->AddInputUse(input); 436 input->definition()->AddInputUse(input);
437 } 437 }
438 } 438 }
439 439
440 440
441 Instruction* Instruction::AppendInstruction(Instruction* tail) {
442 LinkTo(tail);
443 // Update def-use chains whenever instructions are added to the graph
444 // after initial graph construction.
445 for (intptr_t i = tail->InputCount() - 1; i >= 0; --i) {
446 Value* input = tail->InputAt(i);
447 input->definition()->AddInputUse(input);
448 }
449 return tail;
450 }
451
452
441 BlockEntryInstr* Instruction::GetBlock() const { 453 BlockEntryInstr* Instruction::GetBlock() const {
442 // TODO(fschneider): Implement a faster way to get the block of an 454 // TODO(fschneider): Implement a faster way to get the block of an
443 // instruction. 455 // instruction.
444 ASSERT(previous() != NULL); 456 ASSERT(previous() != NULL);
445 Instruction* result = previous(); 457 Instruction* result = previous();
446 while (!result->IsBlockEntry()) result = result->previous(); 458 while (!result->IsBlockEntry()) result = result->previous();
447 return result->AsBlockEntry(); 459 return result->AsBlockEntry();
448 } 460 }
449 461
450 462
(...skipping 2010 matching lines...) Expand 10 before | Expand all | Expand 10 after
2461 default: 2473 default:
2462 UNREACHABLE(); 2474 UNREACHABLE();
2463 } 2475 }
2464 return kPowRuntimeEntry; 2476 return kPowRuntimeEntry;
2465 } 2477 }
2466 2478
2467 2479
2468 #undef __ 2480 #undef __
2469 2481
2470 } // namespace dart 2482 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/intermediate_language.h ('k') | runtime/vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698