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

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

Issue 285543002: Recognize List constructor and turn it into CreateArray ... (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 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 | « no previous file | runtime/vm/flow_graph_optimizer.h » ('j') | runtime/vm/flow_graph_optimizer.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 392 matching lines...) Expand 10 before | Expand all | Expand 10 after
403 if (FLAG_constant_propagation) { 403 if (FLAG_constant_propagation) {
404 ConstantPropagator::Optimize(flow_graph); 404 ConstantPropagator::Optimize(flow_graph);
405 DEBUG_ASSERT(flow_graph->VerifyUseLists()); 405 DEBUG_ASSERT(flow_graph->VerifyUseLists());
406 // A canonicalization pass to remove e.g. smi checks on smi constants. 406 // A canonicalization pass to remove e.g. smi checks on smi constants.
407 optimizer.Canonicalize(); 407 optimizer.Canonicalize();
408 DEBUG_ASSERT(flow_graph->VerifyUseLists()); 408 DEBUG_ASSERT(flow_graph->VerifyUseLists());
409 // Canonicalization introduced more opportunities for constant 409 // Canonicalization introduced more opportunities for constant
410 // propagation. 410 // propagation.
411 ConstantPropagator::Optimize(flow_graph); 411 ConstantPropagator::Optimize(flow_graph);
412 DEBUG_ASSERT(flow_graph->VerifyUseLists()); 412 DEBUG_ASSERT(flow_graph->VerifyUseLists());
413 // Use propagated constants.
414 optimizer.ApplyConstants();
415 DEBUG_ASSERT(flow_graph->VerifyUseLists());
413 } 416 }
414 417
415 // Propagate types and eliminate even more type tests. 418 // Propagate types and eliminate even more type tests.
416 // Recompute types after constant propagation to infer more precise 419 // Recompute types after constant propagation to infer more precise
417 // types for uses that were previously reached by now eliminated phis. 420 // types for uses that were previously reached by now eliminated phis.
418 FlowGraphTypePropagator::Propagate(flow_graph); 421 FlowGraphTypePropagator::Propagate(flow_graph);
419 DEBUG_ASSERT(flow_graph->VerifyUseLists()); 422 DEBUG_ASSERT(flow_graph->VerifyUseLists());
420 423
421 // Unbox doubles. Performed after constant propagation to minimize 424 // Unbox doubles. Performed after constant propagation to minimize
422 // interference from phis merging double values and tagged 425 // interference from phis merging double values and tagged
(...skipping 561 matching lines...) Expand 10 before | Expand all | Expand 10 after
984 const Object& result = 987 const Object& result =
985 Object::Handle(isolate->object_store()->sticky_error()); 988 Object::Handle(isolate->object_store()->sticky_error());
986 isolate->object_store()->clear_sticky_error(); 989 isolate->object_store()->clear_sticky_error();
987 return result.raw(); 990 return result.raw();
988 } 991 }
989 UNREACHABLE(); 992 UNREACHABLE();
990 return Object::null(); 993 return Object::null();
991 } 994 }
992 995
993 } // namespace dart 996 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/flow_graph_optimizer.h » ('j') | runtime/vm/flow_graph_optimizer.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698