| 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" |
| 28 #include "vm/service_isolate.h" |
| 27 #include "vm/stack_frame.h" | 29 #include "vm/stack_frame.h" |
| 28 #include "vm/stub_code.h" | 30 #include "vm/stub_code.h" |
| 29 #include "vm/symbols.h" | 31 #include "vm/symbols.h" |
| 30 #include "vm/timeline.h" | 32 #include "vm/timeline.h" |
| 31 | 33 |
| 32 namespace dart { | 34 namespace dart { |
| 33 | 35 |
| 34 DEFINE_FLAG(bool, | 36 DEFINE_FLAG(bool, |
| 35 enable_simd_inline, | 37 enable_simd_inline, |
| 36 true, | 38 true, |
| (...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 294 } | 296 } |
| 295 | 297 |
| 296 bool FlowGraphCompiler::CanOSRFunction() const { | 298 bool FlowGraphCompiler::CanOSRFunction() const { |
| 297 return isolate()->use_osr() && CanOptimizeFunction() && !is_optimizing(); | 299 return isolate()->use_osr() && CanOptimizeFunction() && !is_optimizing(); |
| 298 } | 300 } |
| 299 | 301 |
| 300 bool FlowGraphCompiler::ForceSlowPathForStackOverflow() const { | 302 bool FlowGraphCompiler::ForceSlowPathForStackOverflow() const { |
| 301 #if !defined(PRODUCT) | 303 #if !defined(PRODUCT) |
| 302 if ((FLAG_stacktrace_every > 0) || (FLAG_deoptimize_every > 0) || | 304 if ((FLAG_stacktrace_every > 0) || (FLAG_deoptimize_every > 0) || |
| 303 (isolate()->reload_every_n_stack_overflow_checks() > 0)) { | 305 (isolate()->reload_every_n_stack_overflow_checks() > 0)) { |
| 304 return true; | 306 bool is_auxiliary_isolate = ServiceIsolate::IsServiceIsolate(isolate()); |
| 307 #if !defined(DART_PRECOMPILED_RUNTIME) |
| 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 is_auxiliary_isolate = |
| 312 is_auxiliary_isolate || KernelIsolate::IsKernelIsolate(isolate()); |
| 313 #endif // !defined(DART_PRECOMPILED_RUNTIME) |
| 314 if (!is_auxiliary_isolate) { |
| 315 return true; |
| 316 } |
| 305 } | 317 } |
| 306 if (FLAG_stacktrace_filter != NULL && | 318 if (FLAG_stacktrace_filter != NULL && |
| 307 strstr(parsed_function().function().ToFullyQualifiedCString(), | 319 strstr(parsed_function().function().ToFullyQualifiedCString(), |
| 308 FLAG_stacktrace_filter) != NULL) { | 320 FLAG_stacktrace_filter) != NULL) { |
| 309 return true; | 321 return true; |
| 310 } | 322 } |
| 311 if (is_optimizing() && FLAG_deoptimize_filter != NULL && | 323 if (is_optimizing() && FLAG_deoptimize_filter != NULL && |
| 312 strstr(parsed_function().function().ToFullyQualifiedCString(), | 324 strstr(parsed_function().function().ToFullyQualifiedCString(), |
| 313 FLAG_deoptimize_filter) != NULL) { | 325 FLAG_deoptimize_filter) != NULL) { |
| 314 return true; | 326 return true; |
| (...skipping 1630 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1945 return true; | 1957 return true; |
| 1946 } | 1958 } |
| 1947 | 1959 |
| 1948 void FlowGraphCompiler::FrameStateClear() { | 1960 void FlowGraphCompiler::FrameStateClear() { |
| 1949 ASSERT(!is_optimizing()); | 1961 ASSERT(!is_optimizing()); |
| 1950 frame_state_.TruncateTo(0); | 1962 frame_state_.TruncateTo(0); |
| 1951 } | 1963 } |
| 1952 #endif // defined(DEBUG) && !defined(TARGET_ARCH_DBC) | 1964 #endif // defined(DEBUG) && !defined(TARGET_ARCH_DBC) |
| 1953 | 1965 |
| 1954 } // namespace dart | 1966 } // namespace dart |
| OLD | NEW |