Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 #include "vm/globals.h" // Needed here to get TARGET_ARCH_XXX. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_XXX. |
| 6 | 6 |
| 7 #include "vm/flow_graph_compiler.h" | 7 #include "vm/flow_graph_compiler.h" |
| 8 | 8 |
| 9 #include "vm/bit_vector.h" | 9 #include "vm/bit_vector.h" |
| 10 #include "vm/cha.h" | 10 #include "vm/cha.h" |
| 11 #include "vm/compiler.h" | 11 #include "vm/compiler.h" |
| 12 #include "vm/dart_entry.h" | 12 #include "vm/dart_entry.h" |
| 13 #include "vm/debugger.h" | 13 #include "vm/debugger.h" |
| 14 #include "vm/deopt_instructions.h" | 14 #include "vm/deopt_instructions.h" |
| 15 #include "vm/exceptions.h" | 15 #include "vm/exceptions.h" |
| 16 #include "vm/flags.h" | 16 #include "vm/flags.h" |
| 17 #include "vm/flow_graph_allocator.h" | 17 #include "vm/flow_graph_allocator.h" |
| 18 #include "vm/il_printer.h" | 18 #include "vm/il_printer.h" |
| 19 #include "vm/intrinsifier.h" | 19 #include "vm/intrinsifier.h" |
| 20 #include "vm/kernel_isolate.h" | |
| 20 #include "vm/locations.h" | 21 #include "vm/locations.h" |
| 21 #include "vm/log.h" | 22 #include "vm/log.h" |
| 22 #include "vm/longjump.h" | 23 #include "vm/longjump.h" |
| 23 #include "vm/object_store.h" | 24 #include "vm/object_store.h" |
| 24 #include "vm/parser.h" | 25 #include "vm/parser.h" |
| 25 #include "vm/raw_object.h" | 26 #include "vm/raw_object.h" |
| 26 #include "vm/resolver.h" | 27 #include "vm/resolver.h" |
| 27 #include "vm/stack_frame.h" | 28 #include "vm/stack_frame.h" |
| 28 #include "vm/stub_code.h" | 29 #include "vm/stub_code.h" |
| 29 #include "vm/symbols.h" | 30 #include "vm/symbols.h" |
| (...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 294 } | 295 } |
| 295 | 296 |
| 296 bool FlowGraphCompiler::CanOSRFunction() const { | 297 bool FlowGraphCompiler::CanOSRFunction() const { |
| 297 return isolate()->use_osr() && CanOptimizeFunction() && !is_optimizing(); | 298 return isolate()->use_osr() && CanOptimizeFunction() && !is_optimizing(); |
| 298 } | 299 } |
| 299 | 300 |
| 300 bool FlowGraphCompiler::ForceSlowPathForStackOverflow() const { | 301 bool FlowGraphCompiler::ForceSlowPathForStackOverflow() const { |
| 301 #if !defined(PRODUCT) | 302 #if !defined(PRODUCT) |
| 302 if ((FLAG_stacktrace_every > 0) || (FLAG_deoptimize_every > 0) || | 303 if ((FLAG_stacktrace_every > 0) || (FLAG_deoptimize_every > 0) || |
| 303 (isolate()->reload_every_n_stack_overflow_checks() > 0)) { | 304 (isolate()->reload_every_n_stack_overflow_checks() > 0)) { |
| 304 return true; | 305 #if defined(DART_PRECOMPILED_RUNTIME) |
|
kustermann
2017/08/23 11:22:15
Does someone know why the other FlowGraphCompiler
Vyacheslav Egorov (Google)
2017/08/23 18:41:25
I think it's just compiled and should be thrown by
kustermann
2017/08/24 09:15:02
Makes sense.
| |
| 306 const bool is_kernel_isolate = false; | |
| 307 #else | |
| 308 // Certain flags should not effect the kernel isolate itself. They might be | |
| 309 // used by tests via the "VMOptions=--..." annotation to test VM | |
| 310 // functionality in the main isolate. | |
| 311 const bool is_kernel_isolate = KernelIsolate::IsKernelIsolate(isolate()); | |
|
Vyacheslav Egorov (Google)
2017/08/23 18:41:25
What about VMService isolate?
kustermann
2017/08/24 09:15:02
done
| |
| 312 #endif // !defined(DART_PRECOMPILED_RUNTIME) | |
| 313 if (!is_kernel_isolate) { | |
| 314 return true; | |
| 315 } | |
| 305 } | 316 } |
| 306 if (FLAG_stacktrace_filter != NULL && | 317 if (FLAG_stacktrace_filter != NULL && |
| 307 strstr(parsed_function().function().ToFullyQualifiedCString(), | 318 strstr(parsed_function().function().ToFullyQualifiedCString(), |
| 308 FLAG_stacktrace_filter) != NULL) { | 319 FLAG_stacktrace_filter) != NULL) { |
| 309 return true; | 320 return true; |
| 310 } | 321 } |
| 311 if (is_optimizing() && FLAG_deoptimize_filter != NULL && | 322 if (is_optimizing() && FLAG_deoptimize_filter != NULL && |
| 312 strstr(parsed_function().function().ToFullyQualifiedCString(), | 323 strstr(parsed_function().function().ToFullyQualifiedCString(), |
| 313 FLAG_deoptimize_filter) != NULL) { | 324 FLAG_deoptimize_filter) != NULL) { |
| 314 return true; | 325 return true; |
| (...skipping 1630 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1945 return true; | 1956 return true; |
| 1946 } | 1957 } |
| 1947 | 1958 |
| 1948 void FlowGraphCompiler::FrameStateClear() { | 1959 void FlowGraphCompiler::FrameStateClear() { |
| 1949 ASSERT(!is_optimizing()); | 1960 ASSERT(!is_optimizing()); |
| 1950 frame_state_.TruncateTo(0); | 1961 frame_state_.TruncateTo(0); |
| 1951 } | 1962 } |
| 1952 #endif // defined(DEBUG) && !defined(TARGET_ARCH_DBC) | 1963 #endif // defined(DEBUG) && !defined(TARGET_ARCH_DBC) |
| 1953 | 1964 |
| 1954 } // namespace dart | 1965 } // namespace dart |
| OLD | NEW |