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

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

Issue 1263573010: Use zone when allocating handles in FlowGraphCompiler assembling operations. Add profiling VM tags… (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: sync Created 5 years, 4 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
« no previous file with comments | « runtime/vm/constant_propagator.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 24 matching lines...) Expand all
35 "Eliminate type checks when allowed by static type analysis."); 35 "Eliminate type checks when allowed by static type analysis.");
36 DEFINE_FLAG(bool, print_ast, false, "Print abstract syntax tree."); 36 DEFINE_FLAG(bool, print_ast, false, "Print abstract syntax tree.");
37 DEFINE_FLAG(bool, print_scopes, false, "Print scopes of local variables."); 37 DEFINE_FLAG(bool, print_scopes, false, "Print scopes of local variables.");
38 DEFINE_FLAG(bool, support_debugger, true, "Emit code needed for debugging"); 38 DEFINE_FLAG(bool, support_debugger, true, "Emit code needed for debugging");
39 DEFINE_FLAG(bool, trace_type_check_elimination, false, 39 DEFINE_FLAG(bool, trace_type_check_elimination, false,
40 "Trace type check elimination at compile time."); 40 "Trace type check elimination at compile time.");
41 DEFINE_FLAG(bool, precompile_collect_closures, false, 41 DEFINE_FLAG(bool, precompile_collect_closures, false,
42 "Collect all closure functions referenced from compiled code."); 42 "Collect all closure functions referenced from compiled code.");
43 43
44 DECLARE_FLAG(int, optimization_counter_threshold); 44 DECLARE_FLAG(int, optimization_counter_threshold);
45 DECLARE_FLAG(bool, profile_vm);
45 DECLARE_FLAG(bool, warn_on_javascript_compatibility); 46 DECLARE_FLAG(bool, warn_on_javascript_compatibility);
46 DECLARE_FLAG(bool, use_field_guards); 47 DECLARE_FLAG(bool, use_field_guards);
47 48
48 // Quick access to the locally defined zone() method. 49 // Quick access to the locally defined zone() method.
49 #define Z (zone()) 50 #define Z (zone())
50 51
51 // TODO(srdjan): Allow compiler to add constants as they are encountered in 52 // TODO(srdjan): Allow compiler to add constants as they are encountered in
52 // the compilation. 53 // the compilation.
53 const double kCommonDoubleConstants[] = 54 const double kCommonDoubleConstants[] =
54 {-1.0, -0.5, -0.1, 0.0, 0.1, 0.5, 1.0, 2.0, 4.0, 5.0, 55 {-1.0, -0.5, -0.1, 0.0, 0.1, 0.5, 1.0, 2.0, 4.0, 5.0,
(...skipping 4721 matching lines...) Expand 10 before | Expand all | Expand 10 after
4776 exit_ = for_finally_block.exit_; 4777 exit_ = for_finally_block.exit_;
4777 } 4778 }
4778 4779
4779 4780
4780 void EffectGraphVisitor::VisitStopNode(StopNode* node) { 4781 void EffectGraphVisitor::VisitStopNode(StopNode* node) {
4781 AddInstruction(new(Z) StopInstr(node->message())); 4782 AddInstruction(new(Z) StopInstr(node->message()));
4782 } 4783 }
4783 4784
4784 4785
4785 FlowGraph* FlowGraphBuilder::BuildGraph() { 4786 FlowGraph* FlowGraphBuilder::BuildGraph() {
4787 VMTagScope tagScope(Thread::Current()->isolate(),
4788 VMTag::kCompileFlowGraphBuilderTagId,
4789 FLAG_profile_vm);
4786 if (FLAG_print_ast) { 4790 if (FLAG_print_ast) {
4787 // Print the function ast before IL generation. 4791 // Print the function ast before IL generation.
4788 AstPrinter::PrintFunctionNodes(parsed_function()); 4792 AstPrinter::PrintFunctionNodes(parsed_function());
4789 } 4793 }
4790 if (FLAG_print_scopes) { 4794 if (FLAG_print_scopes) {
4791 AstPrinter::PrintFunctionScope(parsed_function()); 4795 AstPrinter::PrintFunctionScope(parsed_function());
4792 } 4796 }
4793 TargetEntryInstr* normal_entry = 4797 TargetEntryInstr* normal_entry =
4794 new(Z) TargetEntryInstr(AllocateBlockId(), 4798 new(Z) TargetEntryInstr(AllocateBlockId(),
4795 CatchClauseNode::kInvalidTryIndex); 4799 CatchClauseNode::kInvalidTryIndex);
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
4828 Report::MessageF(Report::kBailout, 4832 Report::MessageF(Report::kBailout,
4829 Script::Handle(function.script()), 4833 Script::Handle(function.script()),
4830 function.token_pos(), 4834 function.token_pos(),
4831 "FlowGraphBuilder Bailout: %s %s", 4835 "FlowGraphBuilder Bailout: %s %s",
4832 String::Handle(function.name()).ToCString(), 4836 String::Handle(function.name()).ToCString(),
4833 reason); 4837 reason);
4834 UNREACHABLE(); 4838 UNREACHABLE();
4835 } 4839 }
4836 4840
4837 } // namespace dart 4841 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/constant_propagator.cc ('k') | runtime/vm/flow_graph_compiler_arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698