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

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

Issue 3006923002: Revised "Eliminate dependencies on assemblers and code stubs in precompiled runtime." (Closed)
Patch Set: Explicitly clear unbox_numeric_fields flag in PRODUCT builds Created 3 years, 3 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/flow_graph_builder.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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 #if !defined(DART_PRECOMPILED_RUNTIME)
6
5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_XXX. 7 #include "vm/globals.h" // Needed here to get TARGET_ARCH_XXX.
6 8
7 #include "vm/flow_graph_compiler.h" 9 #include "vm/flow_graph_compiler.h"
8 10
9 #include "vm/bit_vector.h" 11 #include "vm/bit_vector.h"
10 #include "vm/cha.h" 12 #include "vm/cha.h"
11 #include "vm/compiler.h" 13 #include "vm/compiler.h"
12 #include "vm/dart_entry.h" 14 #include "vm/dart_entry.h"
13 #include "vm/debugger.h" 15 #include "vm/debugger.h"
14 #include "vm/deopt_instructions.h" 16 #include "vm/deopt_instructions.h"
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 "The scale of invocation count, by size of the function."); 49 "The scale of invocation count, by size of the function.");
48 DEFINE_FLAG(bool, source_lines, false, "Emit source line as assembly comment."); 50 DEFINE_FLAG(bool, source_lines, false, "Emit source line as assembly comment.");
49 DEFINE_FLAG(bool, 51 DEFINE_FLAG(bool,
50 trace_inlining_intervals, 52 trace_inlining_intervals,
51 false, 53 false,
52 "Inlining interval diagnostics"); 54 "Inlining interval diagnostics");
53 55
54 DECLARE_FLAG(bool, code_comments); 56 DECLARE_FLAG(bool, code_comments);
55 DECLARE_FLAG(charp, deoptimize_filter); 57 DECLARE_FLAG(charp, deoptimize_filter);
56 DECLARE_FLAG(bool, intrinsify); 58 DECLARE_FLAG(bool, intrinsify);
57 DECLARE_FLAG(bool, propagate_ic_data);
58 DECLARE_FLAG(int, regexp_optimization_counter_threshold); 59 DECLARE_FLAG(int, regexp_optimization_counter_threshold);
59 DECLARE_FLAG(int, reoptimization_counter_threshold); 60 DECLARE_FLAG(int, reoptimization_counter_threshold);
60 DECLARE_FLAG(int, stacktrace_every); 61 DECLARE_FLAG(int, stacktrace_every);
61 DECLARE_FLAG(charp, stacktrace_filter); 62 DECLARE_FLAG(charp, stacktrace_filter);
62 DECLARE_FLAG(bool, trace_compiler); 63 DECLARE_FLAG(bool, trace_compiler);
63 DECLARE_FLAG(int, reload_every);
64 DECLARE_FLAG(bool, unbox_numeric_fields);
65
66 static void PrecompilationModeHandler(bool value) {
67 if (value) {
68 #if defined(TARGET_ARCH_IA32)
69 FATAL("Precompilation not supported on IA32");
70 #endif
71
72 FLAG_background_compilation = false;
73 FLAG_fields_may_be_reset = true;
74 FLAG_interpret_irregexp = true;
75 FLAG_lazy_dispatchers = false;
76 FLAG_link_natives_lazily = true;
77 FLAG_optimization_counter_threshold = -1;
78 FLAG_polymorphic_with_deopt = false;
79 FLAG_precompiled_mode = true;
80 FLAG_reorder_basic_blocks = false;
81 FLAG_use_field_guards = false;
82 FLAG_use_cha_deopt = false;
83 FLAG_unbox_numeric_fields = false;
84 FLAG_enable_mirrors = false;
85
86 #if !defined(PRODUCT) && !defined(DART_PRECOMPILED_RUNTIME)
87 // Set flags affecting runtime accordingly for dart_bootstrap.
88 // These flags are constants with PRODUCT and DART_PRECOMPILED_RUNTIME.
89 FLAG_collect_code = false;
90 FLAG_deoptimize_alot = false; // Used in some tests.
91 FLAG_deoptimize_every = 0; // Used in some tests.
92 FLAG_load_deferred_eagerly = true;
93 FLAG_print_stop_message = false;
94 FLAG_use_osr = false;
95 #endif
96 }
97 }
98
99 DEFINE_FLAG_HANDLER(PrecompilationModeHandler,
100 precompilation,
101 "Precompilation mode");
102 64
103 #ifdef DART_PRECOMPILED_RUNTIME 65 #ifdef DART_PRECOMPILED_RUNTIME
104 66
105 COMPILE_ASSERT(!FLAG_collect_code); 67 COMPILE_ASSERT(!FLAG_collect_code);
106 COMPILE_ASSERT(!FLAG_deoptimize_alot); // Used in some tests. 68 COMPILE_ASSERT(!FLAG_deoptimize_alot); // Used in some tests.
107 COMPILE_ASSERT(FLAG_precompiled_runtime);
108 COMPILE_ASSERT(!FLAG_print_stop_message); 69 COMPILE_ASSERT(!FLAG_print_stop_message);
109 COMPILE_ASSERT(!FLAG_use_osr); 70 COMPILE_ASSERT(!FLAG_use_osr);
110 COMPILE_ASSERT(FLAG_deoptimize_every == 0); // Used in some tests. 71 COMPILE_ASSERT(FLAG_deoptimize_every == 0); // Used in some tests.
111 COMPILE_ASSERT(FLAG_load_deferred_eagerly); 72 COMPILE_ASSERT(FLAG_load_deferred_eagerly);
112 73
113 #endif // DART_PRECOMPILED_RUNTIME 74 #endif // DART_PRECOMPILED_RUNTIME
114 75
115 // Assign locations to incoming arguments, i.e., values pushed above spill slots 76 // Assign locations to incoming arguments, i.e., values pushed above spill slots
116 // with PushArgument. Recursively allocates from outermost to innermost 77 // with PushArgument. Recursively allocates from outermost to innermost
117 // environment. 78 // environment.
(...skipping 1839 matching lines...) Expand 10 before | Expand all | Expand 10 after
1957 return true; 1918 return true;
1958 } 1919 }
1959 1920
1960 void FlowGraphCompiler::FrameStateClear() { 1921 void FlowGraphCompiler::FrameStateClear() {
1961 ASSERT(!is_optimizing()); 1922 ASSERT(!is_optimizing());
1962 frame_state_.TruncateTo(0); 1923 frame_state_.TruncateTo(0);
1963 } 1924 }
1964 #endif // defined(DEBUG) && !defined(TARGET_ARCH_DBC) 1925 #endif // defined(DEBUG) && !defined(TARGET_ARCH_DBC)
1965 1926
1966 } // namespace dart 1927 } // namespace dart
1928
1929 #endif // !defined(DART_PRECOMPILED_RUNTIME)
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_builder.cc ('k') | runtime/vm/flow_graph_compiler_arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698