| OLD | NEW |
| 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/compiler.h" | 10 #include "vm/compiler.h" |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 | 32 |
| 33 namespace dart { | 33 namespace dart { |
| 34 | 34 |
| 35 DEFINE_FLAG(bool, eliminate_type_checks, true, | 35 DEFINE_FLAG(bool, eliminate_type_checks, true, |
| 36 "Eliminate type checks when allowed by static type analysis."); | 36 "Eliminate type checks when allowed by static type analysis."); |
| 37 DEFINE_FLAG(bool, print_ast, false, "Print abstract syntax tree."); | 37 DEFINE_FLAG(bool, print_ast, false, "Print abstract syntax tree."); |
| 38 DEFINE_FLAG(bool, print_scopes, false, "Print scopes of local variables."); | 38 DEFINE_FLAG(bool, print_scopes, false, "Print scopes of local variables."); |
| 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 | 41 |
| 42 DECLARE_FLAG(int, optimization_counter_threshold); |
| 42 DECLARE_FLAG(bool, profile_vm); | 43 DECLARE_FLAG(bool, profile_vm); |
| 44 DECLARE_FLAG(bool, use_field_guards); |
| 43 | 45 |
| 44 // Quick access to the locally defined zone() method. | 46 // Quick access to the locally defined zone() method. |
| 45 #define Z (zone()) | 47 #define Z (zone()) |
| 46 | 48 |
| 47 // Quick synthetic token position. | 49 // Quick synthetic token position. |
| 48 #define ST(token_pos) ((token_pos).ToSynthetic()) | 50 #define ST(token_pos) ((token_pos).ToSynthetic()) |
| 49 | 51 |
| 50 // 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 |
| 51 // the compilation. | 53 // the compilation. |
| 52 const double kCommonDoubleConstants[] = | 54 const double kCommonDoubleConstants[] = |
| (...skipping 4596 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4649 Script::Handle(function.script()), | 4651 Script::Handle(function.script()), |
| 4650 function.token_pos(), | 4652 function.token_pos(), |
| 4651 Report::AtLocation, | 4653 Report::AtLocation, |
| 4652 "FlowGraphBuilder Bailout: %s %s", | 4654 "FlowGraphBuilder Bailout: %s %s", |
| 4653 String::Handle(function.name()).ToCString(), | 4655 String::Handle(function.name()).ToCString(), |
| 4654 reason); | 4656 reason); |
| 4655 UNREACHABLE(); | 4657 UNREACHABLE(); |
| 4656 } | 4658 } |
| 4657 | 4659 |
| 4658 } // namespace dart | 4660 } // namespace dart |
| OLD | NEW |