| 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 1710 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1721 ActivationFrame* frame = stack->FrameAt(i); | 1721 ActivationFrame* frame = stack->FrameAt(i); |
| 1722 #ifndef DART_PRECOMPILED_RUNTIME | 1722 #ifndef DART_PRECOMPILED_RUNTIME |
| 1723 // Ensure that we have unoptimized code. | 1723 // Ensure that we have unoptimized code. |
| 1724 frame->function().EnsureHasCompiledUnoptimizedCode(); | 1724 frame->function().EnsureHasCompiledUnoptimizedCode(); |
| 1725 #endif | 1725 #endif |
| 1726 // Variable locations and number are unknown when precompiling. | 1726 // Variable locations and number are unknown when precompiling. |
| 1727 const int num_vars = | 1727 const int num_vars = |
| 1728 FLAG_precompiled_runtime ? 0 : frame->NumLocalVariables(); | 1728 FLAG_precompiled_runtime ? 0 : frame->NumLocalVariables(); |
| 1729 TokenPosition unused = TokenPosition::kNoSource; | 1729 TokenPosition unused = TokenPosition::kNoSource; |
| 1730 for (intptr_t v = 0; v < num_vars; v++) { | 1730 for (intptr_t v = 0; v < num_vars; v++) { |
| 1731 frame->VariableAt(v, &var_name, &unused, &unused, &var_value); | 1731 frame->VariableAt(v, &var_name, &unused, &unused, &unused, &var_value); |
| 1732 } | 1732 } |
| 1733 } | 1733 } |
| 1734 FLAG_stacktrace_every = saved_stacktrace_every; | 1734 FLAG_stacktrace_every = saved_stacktrace_every; |
| 1735 } | 1735 } |
| 1736 | 1736 |
| 1737 const Error& error = Error::Handle(thread->HandleInterrupts()); | 1737 const Error& error = Error::Handle(thread->HandleInterrupts()); |
| 1738 if (!error.IsNull()) { | 1738 if (!error.IsNull()) { |
| 1739 Exceptions::PropagateError(error); | 1739 Exceptions::PropagateError(error); |
| 1740 UNREACHABLE(); | 1740 UNREACHABLE(); |
| 1741 } | 1741 } |
| (...skipping 603 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2345 const intptr_t elm_size = old_data.ElementSizeInBytes(); | 2345 const intptr_t elm_size = old_data.ElementSizeInBytes(); |
| 2346 const TypedData& new_data = | 2346 const TypedData& new_data = |
| 2347 TypedData::Handle(TypedData::New(cid, new_size, Heap::kOld)); | 2347 TypedData::Handle(TypedData::New(cid, new_size, Heap::kOld)); |
| 2348 TypedData::Copy(new_data, 0, old_data, 0, old_size * elm_size); | 2348 TypedData::Copy(new_data, 0, old_data, 0, old_size * elm_size); |
| 2349 typed_data_cell.SetAt(0, new_data); | 2349 typed_data_cell.SetAt(0, new_data); |
| 2350 arguments.SetReturn(new_data); | 2350 arguments.SetReturn(new_data); |
| 2351 } | 2351 } |
| 2352 | 2352 |
| 2353 | 2353 |
| 2354 } // namespace dart | 2354 } // namespace dart |
| OLD | NEW |