| 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/code_generator.h" | 5 #include "vm/code_generator.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 1613 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1624 frame->function().EnsureHasCompiledUnoptimizedCode(); | 1624 frame->function().EnsureHasCompiledUnoptimizedCode(); |
| 1625 #endif | 1625 #endif |
| 1626 // Variable locations and number are unknown when precompiling. | 1626 // Variable locations and number are unknown when precompiling. |
| 1627 const int num_vars = | 1627 const int num_vars = |
| 1628 FLAG_precompiled_runtime ? 0 : frame->NumLocalVariables(); | 1628 FLAG_precompiled_runtime ? 0 : frame->NumLocalVariables(); |
| 1629 TokenPosition unused = TokenPosition::kNoSource; | 1629 TokenPosition unused = TokenPosition::kNoSource; |
| 1630 for (intptr_t v = 0; v < num_vars; v++) { | 1630 for (intptr_t v = 0; v < num_vars; v++) { |
| 1631 frame->VariableAt(v, &var_name, &unused, &unused, &unused, &var_value); | 1631 frame->VariableAt(v, &var_name, &unused, &unused, &unused, &var_value); |
| 1632 } | 1632 } |
| 1633 } | 1633 } |
| 1634 if (FLAG_stress_async_stacks) { |
| 1635 Debugger::CollectAwaiterReturnStackTrace(); |
| 1636 } |
| 1634 FLAG_stacktrace_every = saved_stacktrace_every; | 1637 FLAG_stacktrace_every = saved_stacktrace_every; |
| 1635 } | 1638 } |
| 1636 | 1639 |
| 1637 const Error& error = Error::Handle(thread->HandleInterrupts()); | 1640 const Error& error = Error::Handle(thread->HandleInterrupts()); |
| 1638 if (!error.IsNull()) { | 1641 if (!error.IsNull()) { |
| 1639 Exceptions::PropagateError(error); | 1642 Exceptions::PropagateError(error); |
| 1640 UNREACHABLE(); | 1643 UNREACHABLE(); |
| 1641 } | 1644 } |
| 1642 | 1645 |
| 1643 if ((stack_overflow_flags & Thread::kOsrRequest) != 0) { | 1646 if ((stack_overflow_flags & Thread::kOsrRequest) != 0) { |
| (...skipping 572 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2216 const intptr_t elm_size = old_data.ElementSizeInBytes(); | 2219 const intptr_t elm_size = old_data.ElementSizeInBytes(); |
| 2217 const TypedData& new_data = | 2220 const TypedData& new_data = |
| 2218 TypedData::Handle(TypedData::New(cid, new_size, Heap::kOld)); | 2221 TypedData::Handle(TypedData::New(cid, new_size, Heap::kOld)); |
| 2219 TypedData::Copy(new_data, 0, old_data, 0, old_size * elm_size); | 2222 TypedData::Copy(new_data, 0, old_data, 0, old_size * elm_size); |
| 2220 typed_data_cell.SetAt(0, new_data); | 2223 typed_data_cell.SetAt(0, new_data); |
| 2221 arguments.SetReturn(new_data); | 2224 arguments.SetReturn(new_data); |
| 2222 } | 2225 } |
| 2223 | 2226 |
| 2224 | 2227 |
| 2225 } // namespace dart | 2228 } // namespace dart |
| OLD | NEW |