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

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

Issue 3001463002: [gardening] Revert "Eliminate dependencies on assemblers and code stubs in precompiled runtime." (Closed)
Patch Set: Created 3 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/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
7 #include "vm/globals.h" // Needed here to get TARGET_ARCH_XXX. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_XXX.
8 6
9 #include "vm/flow_graph_compiler.h" 7 #include "vm/flow_graph_compiler.h"
10 8
11 #include "vm/bit_vector.h" 9 #include "vm/bit_vector.h"
12 #include "vm/cha.h" 10 #include "vm/cha.h"
13 #include "vm/compiler.h" 11 #include "vm/compiler.h"
14 #include "vm/dart_entry.h" 12 #include "vm/dart_entry.h"
15 #include "vm/debugger.h" 13 #include "vm/debugger.h"
16 #include "vm/deopt_instructions.h" 14 #include "vm/deopt_instructions.h"
(...skipping 30 matching lines...) Expand all
47 "The scale of invocation count, by size of the function."); 45 "The scale of invocation count, by size of the function.");
48 DEFINE_FLAG(bool, source_lines, false, "Emit source line as assembly comment."); 46 DEFINE_FLAG(bool, source_lines, false, "Emit source line as assembly comment.");
49 DEFINE_FLAG(bool, 47 DEFINE_FLAG(bool,
50 trace_inlining_intervals, 48 trace_inlining_intervals,
51 false, 49 false,
52 "Inlining interval diagnostics"); 50 "Inlining interval diagnostics");
53 51
54 DECLARE_FLAG(bool, code_comments); 52 DECLARE_FLAG(bool, code_comments);
55 DECLARE_FLAG(charp, deoptimize_filter); 53 DECLARE_FLAG(charp, deoptimize_filter);
56 DECLARE_FLAG(bool, intrinsify); 54 DECLARE_FLAG(bool, intrinsify);
55 DECLARE_FLAG(bool, propagate_ic_data);
57 DECLARE_FLAG(int, regexp_optimization_counter_threshold); 56 DECLARE_FLAG(int, regexp_optimization_counter_threshold);
58 DECLARE_FLAG(int, reoptimization_counter_threshold); 57 DECLARE_FLAG(int, reoptimization_counter_threshold);
59 DECLARE_FLAG(int, stacktrace_every); 58 DECLARE_FLAG(int, stacktrace_every);
60 DECLARE_FLAG(charp, stacktrace_filter); 59 DECLARE_FLAG(charp, stacktrace_filter);
61 DECLARE_FLAG(bool, trace_compiler); 60 DECLARE_FLAG(bool, trace_compiler);
61 DECLARE_FLAG(int, reload_every);
62 DECLARE_FLAG(bool, unbox_numeric_fields);
63
64 static void PrecompilationModeHandler(bool value) {
65 if (value) {
66 #if defined(TARGET_ARCH_IA32)
67 FATAL("Precompilation not supported on IA32");
68 #endif
69
70 FLAG_background_compilation = false;
71 FLAG_fields_may_be_reset = true;
72 FLAG_interpret_irregexp = true;
73 FLAG_lazy_dispatchers = false;
74 FLAG_link_natives_lazily = true;
75 FLAG_optimization_counter_threshold = -1;
76 FLAG_polymorphic_with_deopt = false;
77 FLAG_precompiled_mode = true;
78 FLAG_reorder_basic_blocks = false;
79 FLAG_use_field_guards = false;
80 FLAG_use_cha_deopt = false;
81 FLAG_unbox_numeric_fields = false;
82 FLAG_enable_mirrors = false;
83
84 #if !defined(PRODUCT) && !defined(DART_PRECOMPILED_RUNTIME)
85 // Set flags affecting runtime accordingly for dart_bootstrap.
86 // These flags are constants with PRODUCT and DART_PRECOMPILED_RUNTIME.
87 FLAG_collect_code = false;
88 FLAG_deoptimize_alot = false; // Used in some tests.
89 FLAG_deoptimize_every = 0; // Used in some tests.
90 FLAG_load_deferred_eagerly = true;
91 FLAG_print_stop_message = false;
92 FLAG_use_osr = false;
93 #endif
94 }
95 }
96
97 DEFINE_FLAG_HANDLER(PrecompilationModeHandler,
98 precompilation,
99 "Precompilation mode");
62 100
63 #ifdef DART_PRECOMPILED_RUNTIME 101 #ifdef DART_PRECOMPILED_RUNTIME
64 102
65 COMPILE_ASSERT(!FLAG_collect_code); 103 COMPILE_ASSERT(!FLAG_collect_code);
66 COMPILE_ASSERT(!FLAG_deoptimize_alot); // Used in some tests. 104 COMPILE_ASSERT(!FLAG_deoptimize_alot); // Used in some tests.
105 COMPILE_ASSERT(FLAG_precompiled_runtime);
67 COMPILE_ASSERT(!FLAG_print_stop_message); 106 COMPILE_ASSERT(!FLAG_print_stop_message);
68 COMPILE_ASSERT(!FLAG_use_osr); 107 COMPILE_ASSERT(!FLAG_use_osr);
69 COMPILE_ASSERT(FLAG_deoptimize_every == 0); // Used in some tests. 108 COMPILE_ASSERT(FLAG_deoptimize_every == 0); // Used in some tests.
70 COMPILE_ASSERT(FLAG_load_deferred_eagerly); 109 COMPILE_ASSERT(FLAG_load_deferred_eagerly);
71 110
72 #endif // DART_PRECOMPILED_RUNTIME 111 #endif // DART_PRECOMPILED_RUNTIME
73 112
74 // Assign locations to incoming arguments, i.e., values pushed above spill slots 113 // Assign locations to incoming arguments, i.e., values pushed above spill slots
75 // with PushArgument. Recursively allocates from outermost to innermost 114 // with PushArgument. Recursively allocates from outermost to innermost
76 // environment. 115 // environment.
(...skipping 1829 matching lines...) Expand 10 before | Expand all | Expand 10 after
1906 return true; 1945 return true;
1907 } 1946 }
1908 1947
1909 void FlowGraphCompiler::FrameStateClear() { 1948 void FlowGraphCompiler::FrameStateClear() {
1910 ASSERT(!is_optimizing()); 1949 ASSERT(!is_optimizing());
1911 frame_state_.TruncateTo(0); 1950 frame_state_.TruncateTo(0);
1912 } 1951 }
1913 #endif // defined(DEBUG) && !defined(TARGET_ARCH_DBC) 1952 #endif // defined(DEBUG) && !defined(TARGET_ARCH_DBC)
1914 1953
1915 } // namespace dart 1954 } // namespace dart
1916
1917 #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