OLD | NEW |
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, 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/runtime_entry.h" | 5 #include "vm/runtime_entry.h" |
6 | 6 |
7 #include "vm/assembler.h" | 7 #include "vm/assembler.h" |
8 #include "vm/ast.h" | 8 #include "vm/ast.h" |
9 #include "vm/code_patcher.h" | 9 #include "vm/code_patcher.h" |
10 #include "vm/compiler.h" | 10 #include "vm/compiler.h" |
(...skipping 1601 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1612 // time. | 1612 // time. |
1613 if (IsCalleeFrameOf(thread->saved_stack_limit(), stack_pos)) { | 1613 if (IsCalleeFrameOf(thread->saved_stack_limit(), stack_pos)) { |
1614 // Use the preallocated stack overflow exception to avoid calling | 1614 // Use the preallocated stack overflow exception to avoid calling |
1615 // into dart code. | 1615 // into dart code. |
1616 const Instance& exception = | 1616 const Instance& exception = |
1617 Instance::Handle(isolate->object_store()->stack_overflow()); | 1617 Instance::Handle(isolate->object_store()->stack_overflow()); |
1618 Exceptions::Throw(thread, exception); | 1618 Exceptions::Throw(thread, exception); |
1619 UNREACHABLE(); | 1619 UNREACHABLE(); |
1620 } | 1620 } |
1621 | 1621 |
1622 #if !defined(PRODUCT) | 1622 #if !defined(PRODUCT) && !defined(DART_PRECOMPILED_RUNTIME) |
1623 // The following code is used to stress test deoptimization and | 1623 // The following code is used to stress test deoptimization and |
1624 // debugger stack tracing. | 1624 // debugger stack tracing. |
1625 bool do_deopt = false; | 1625 bool do_deopt = false; |
1626 bool do_stacktrace = false; | 1626 bool do_stacktrace = false; |
1627 bool do_reload = false; | 1627 bool do_reload = false; |
1628 const intptr_t isolate_reload_every = | 1628 const intptr_t isolate_reload_every = |
1629 isolate->reload_every_n_stack_overflow_checks(); | 1629 isolate->reload_every_n_stack_overflow_checks(); |
1630 if ((FLAG_deoptimize_every > 0) || (FLAG_stacktrace_every > 0) || | 1630 if ((FLAG_deoptimize_every > 0) || (FLAG_stacktrace_every > 0) || |
1631 (isolate_reload_every > 0)) { | 1631 (isolate_reload_every > 0)) { |
1632 // TODO(turnidge): To make --deoptimize_every and | 1632 // TODO(turnidge): To make --deoptimize_every and |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1711 TokenPosition unused = TokenPosition::kNoSource; | 1711 TokenPosition unused = TokenPosition::kNoSource; |
1712 for (intptr_t v = 0; v < num_vars; v++) { | 1712 for (intptr_t v = 0; v < num_vars; v++) { |
1713 frame->VariableAt(v, &var_name, &unused, &unused, &unused, &var_value); | 1713 frame->VariableAt(v, &var_name, &unused, &unused, &unused, &var_value); |
1714 } | 1714 } |
1715 } | 1715 } |
1716 if (FLAG_stress_async_stacks) { | 1716 if (FLAG_stress_async_stacks) { |
1717 Debugger::CollectAwaiterReturnStackTrace(); | 1717 Debugger::CollectAwaiterReturnStackTrace(); |
1718 } | 1718 } |
1719 FLAG_stacktrace_every = saved_stacktrace_every; | 1719 FLAG_stacktrace_every = saved_stacktrace_every; |
1720 } | 1720 } |
1721 #endif // !defined(PRODUCT) | 1721 #endif // !defined(PRODUCT) && !defined(DART_PRECOMPILED_RUNTIME) |
1722 | 1722 |
1723 const Error& error = Error::Handle(thread->HandleInterrupts()); | 1723 const Error& error = Error::Handle(thread->HandleInterrupts()); |
1724 if (!error.IsNull()) { | 1724 if (!error.IsNull()) { |
1725 Exceptions::PropagateError(error); | 1725 Exceptions::PropagateError(error); |
1726 UNREACHABLE(); | 1726 UNREACHABLE(); |
1727 } | 1727 } |
1728 | 1728 |
1729 if ((stack_overflow_flags & Thread::kOsrRequest) != 0) { | 1729 if ((stack_overflow_flags & Thread::kOsrRequest) != 0) { |
1730 ASSERT(isolate->use_osr()); | 1730 ASSERT(isolate->use_osr()); |
1731 DartFrameIterator iterator(thread, | 1731 DartFrameIterator iterator(thread, |
(...skipping 629 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2361 true /* is_float */, | 2361 true /* is_float */, |
2362 reinterpret_cast<RuntimeFunction>(static_cast<UnaryMathCFunction>(&tan))); | 2362 reinterpret_cast<RuntimeFunction>(static_cast<UnaryMathCFunction>(&tan))); |
2363 | 2363 |
2364 DEFINE_RAW_LEAF_RUNTIME_ENTRY( | 2364 DEFINE_RAW_LEAF_RUNTIME_ENTRY( |
2365 LibcAtan, | 2365 LibcAtan, |
2366 1, | 2366 1, |
2367 true /* is_float */, | 2367 true /* is_float */, |
2368 reinterpret_cast<RuntimeFunction>(static_cast<UnaryMathCFunction>(&atan))); | 2368 reinterpret_cast<RuntimeFunction>(static_cast<UnaryMathCFunction>(&atan))); |
2369 | 2369 |
2370 } // namespace dart | 2370 } // namespace dart |
OLD | NEW |