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

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

Issue 744793002: Reland and fix bug: Don't store redundant compile-type at values. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 1 month 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/deopt_instructions.h » ('j') | runtime/vm/flow_graph_compiler_ia32.cc » ('J')
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/compiler.h" 5 #include "vm/compiler.h"
6 6
7 #include "vm/assembler.h" 7 #include "vm/assembler.h"
8 8
9 #include "vm/ast_printer.h" 9 #include "vm/ast_printer.h"
10 #include "vm/block_scheduler.h" 10 #include "vm/block_scheduler.h"
(...skipping 519 matching lines...) Expand 10 before | Expand all | Expand 10 after
530 } 530 }
531 531
532 // Attempt to sink allocations of temporary non-escaping objects to 532 // Attempt to sink allocations of temporary non-escaping objects to
533 // the deoptimization path. 533 // the deoptimization path.
534 AllocationSinking* sinking = NULL; 534 AllocationSinking* sinking = NULL;
535 if (FLAG_allocation_sinking && 535 if (FLAG_allocation_sinking &&
536 (flow_graph->graph_entry()->SuccessorCount() == 1)) { 536 (flow_graph->graph_entry()->SuccessorCount() == 1)) {
537 // TODO(fschneider): Support allocation sinking with try-catch. 537 // TODO(fschneider): Support allocation sinking with try-catch.
538 sinking = new AllocationSinking(flow_graph); 538 sinking = new AllocationSinking(flow_graph);
539 sinking->Optimize(); 539 sinking->Optimize();
540 DEBUG_ASSERT(flow_graph->VerifyUseLists());
540 } 541 }
542
543 // Recompute types after load elimination to ensure correct
544 // types for created phi-instructions.
545 FlowGraphTypePropagator::Propagate(flow_graph);
541 DEBUG_ASSERT(flow_graph->VerifyUseLists()); 546 DEBUG_ASSERT(flow_graph->VerifyUseLists());
542 547
543 // Ensure that all phis inserted by optimization passes have consistent 548 // Ensure that all phis inserted by optimization passes have consistent
544 // representations. 549 // representations.
545 optimizer.SelectRepresentations(); 550 optimizer.SelectRepresentations();
546 551
547 if (optimizer.Canonicalize()) { 552 if (optimizer.Canonicalize()) {
548 // To fully remove redundant boxing (e.g. BoxDouble used only in 553 // To fully remove redundant boxing (e.g. BoxDouble used only in
549 // environments and UnboxDouble instructions) instruction we 554 // environments and UnboxDouble instructions) instruction we
550 // first need to replace all their uses and then fold them away. 555 // first need to replace all their uses and then fold them away.
(...skipping 511 matching lines...) Expand 10 before | Expand all | Expand 10 after
1062 const Object& result = 1067 const Object& result =
1063 PassiveObject::Handle(isolate->object_store()->sticky_error()); 1068 PassiveObject::Handle(isolate->object_store()->sticky_error());
1064 isolate->object_store()->clear_sticky_error(); 1069 isolate->object_store()->clear_sticky_error();
1065 return result.raw(); 1070 return result.raw();
1066 } 1071 }
1067 UNREACHABLE(); 1072 UNREACHABLE();
1068 return Object::null(); 1073 return Object::null();
1069 } 1074 }
1070 1075
1071 } // namespace dart 1076 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/deopt_instructions.h » ('j') | runtime/vm/flow_graph_compiler_ia32.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698