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

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

Issue 70183010: Fixes a couple problems with GC of unoptimized code. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 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 | « runtime/vm/flow_graph.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_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/bit_vector.h" 9 #include "vm/bit_vector.h"
10 #include "vm/class_finalizer.h" 10 #include "vm/class_finalizer.h"
(...skipping 3976 matching lines...) Expand 10 before | Expand all | Expand 10 after
3987 CatchClauseNode::kInvalidTryIndex); 3987 CatchClauseNode::kInvalidTryIndex);
3988 graph_entry_ = new GraphEntryInstr(parsed_function(), normal_entry, osr_id_); 3988 graph_entry_ = new GraphEntryInstr(parsed_function(), normal_entry, osr_id_);
3989 EffectGraphVisitor for_effect(this); 3989 EffectGraphVisitor for_effect(this);
3990 // This check may be deleted if the generated code is leaf. 3990 // This check may be deleted if the generated code is leaf.
3991 // Native functions don't need a stack check at entry. 3991 // Native functions don't need a stack check at entry.
3992 if (!function.is_native()) { 3992 if (!function.is_native()) {
3993 CheckStackOverflowInstr* check = 3993 CheckStackOverflowInstr* check =
3994 new CheckStackOverflowInstr(function.token_pos(), 0); 3994 new CheckStackOverflowInstr(function.token_pos(), 0);
3995 // If we are inlining don't actually attach the stack check. We must still 3995 // If we are inlining don't actually attach the stack check. We must still
3996 // create the stack check in order to allocate a deopt id. 3996 // create the stack check in order to allocate a deopt id.
3997 if (!IsInlining()) for_effect.AddInstruction(check); 3997 if (!IsInlining()) {
3998 for_effect.AddInstruction(check);
3999 }
3998 } 4000 }
3999 parsed_function()->node_sequence()->Visit(&for_effect); 4001 parsed_function()->node_sequence()->Visit(&for_effect);
4000 AppendFragment(normal_entry, for_effect); 4002 AppendFragment(normal_entry, for_effect);
4001 // Check that the graph is properly terminated. 4003 // Check that the graph is properly terminated.
4002 ASSERT(!for_effect.is_open()); 4004 ASSERT(!for_effect.is_open());
4003 4005
4004 // When compiling for OSR, use a depth first search to prune instructions 4006 // When compiling for OSR, use a depth first search to prune instructions
4005 // unreachable from the OSR entry. Catch entries are not (yet) properly 4007 // unreachable from the OSR entry. Catch entries are not (yet) properly
4006 // recognized as reachable. 4008 // recognized as reachable.
4007 if (osr_id_ != Isolate::kNoDeoptId) { 4009 if (osr_id_ != Isolate::kNoDeoptId) {
(...skipping 26 matching lines...) Expand all
4034 LanguageError::kError, 4036 LanguageError::kError,
4035 Heap::kNew, 4037 Heap::kNew,
4036 "FlowGraphBuilder Bailout: %s %s", 4038 "FlowGraphBuilder Bailout: %s %s",
4037 String::Handle(function.name()).ToCString(), 4039 String::Handle(function.name()).ToCString(),
4038 reason)); 4040 reason));
4039 Isolate::Current()->long_jump_base()->Jump(1, error); 4041 Isolate::Current()->long_jump_base()->Jump(1, error);
4040 } 4042 }
4041 4043
4042 4044
4043 } // namespace dart 4045 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph.cc ('k') | runtime/vm/flow_graph_compiler_arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698