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

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

Issue 298883009: Eliminate some unnecessary handle allocations in the compiler. (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 | « runtime/vm/block_scheduler.cc ('k') | runtime/vm/flow_graph_compiler_arm.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) 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.h" 5 #include "vm/flow_graph.h"
6 6
7 #include "vm/bit_vector.h" 7 #include "vm/bit_vector.h"
8 #include "vm/flow_graph_builder.h" 8 #include "vm/flow_graph_builder.h"
9 #include "vm/intermediate_language.h" 9 #include "vm/intermediate_language.h"
10 #include "vm/longjump.h" 10 #include "vm/longjump.h"
(...skipping 741 matching lines...) Expand 10 before | Expand all | Expand 10 after
752 RenameRecursive(entry, &env, live_phis, variable_liveness); 752 RenameRecursive(entry, &env, live_phis, variable_liveness);
753 } 753 }
754 754
755 755
756 void FlowGraph::AttachEnvironment(Instruction* instr, 756 void FlowGraph::AttachEnvironment(Instruction* instr,
757 GrowableArray<Definition*>* env) { 757 GrowableArray<Definition*>* env) {
758 Environment* deopt_env = 758 Environment* deopt_env =
759 Environment::From(isolate(), 759 Environment::From(isolate(),
760 *env, 760 *env,
761 num_non_copied_params_, 761 num_non_copied_params_,
762 Code::Handle(parsed_function_.code())); 762 &parsed_function_);
763 // TODO(fschneider): Add predicates CanEagerlyDeoptimize and 763 // TODO(fschneider): Add predicates CanEagerlyDeoptimize and
764 // CanLazilyDeoptimize to instructions to generally deal with instructions 764 // CanLazilyDeoptimize to instructions to generally deal with instructions
765 // that have pushed arguments and input operands. 765 // that have pushed arguments and input operands.
766 // Right now, closure calls are the only instructions that have both. They 766 // Right now, closure calls are the only instructions that have both. They
767 // also don't have an eager deoptimziation point, so the environment attached 767 // also don't have an eager deoptimziation point, so the environment attached
768 // here is only used for after the call. 768 // here is only used for after the call.
769 if (instr->IsClosureCall()) { 769 if (instr->IsClosureCall()) {
770 deopt_env = deopt_env->DeepCopy(isolate(), 770 deopt_env = deopt_env->DeepCopy(isolate(),
771 deopt_env->Length() - instr->InputCount()); 771 deopt_env->Length() - instr->InputCount());
772 } 772 }
(...skipping 461 matching lines...) Expand 10 before | Expand all | Expand 10 after
1234 } 1234 }
1235 1235
1236 1236
1237 bool BlockEffects::IsSideEffectFreePath(BlockEntryInstr* from, 1237 bool BlockEffects::IsSideEffectFreePath(BlockEntryInstr* from,
1238 BlockEntryInstr* to) const { 1238 BlockEntryInstr* to) const {
1239 return available_at_[to->postorder_number()]->Contains( 1239 return available_at_[to->postorder_number()]->Contains(
1240 from->postorder_number()); 1240 from->postorder_number());
1241 } 1241 }
1242 1242
1243 } // namespace dart 1243 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/block_scheduler.cc ('k') | runtime/vm/flow_graph_compiler_arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698