| 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 1164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1175 // TODO(turnidge): Consider using DeoptimizeAt instead. | 1175 // TODO(turnidge): Consider using DeoptimizeAt instead. |
| 1176 DeoptimizeFunctionsOnStack(); | 1176 DeoptimizeFunctionsOnStack(); |
| 1177 } | 1177 } |
| 1178 if (do_stacktrace) { | 1178 if (do_stacktrace) { |
| 1179 String& var_name = String::Handle(); | 1179 String& var_name = String::Handle(); |
| 1180 Instance& var_value = Instance::Handle(); | 1180 Instance& var_value = Instance::Handle(); |
| 1181 DebuggerStackTrace* stack = isolate->debugger()->StackTrace(); | 1181 DebuggerStackTrace* stack = isolate->debugger()->StackTrace(); |
| 1182 intptr_t num_frames = stack->Length(); | 1182 intptr_t num_frames = stack->Length(); |
| 1183 for (intptr_t i = 0; i < num_frames; i++) { | 1183 for (intptr_t i = 0; i < num_frames; i++) { |
| 1184 ActivationFrame* frame = stack->FrameAt(i); | 1184 ActivationFrame* frame = stack->FrameAt(i); |
| 1185 const int num_vars = frame->NumLocalVariables(); | 1185 // Variable locations and number are unknown when 'always_optimize'. |
| 1186 const int num_vars = |
| 1187 Compiler::always_optimize() ? 0 : frame->NumLocalVariables(); |
| 1186 intptr_t unused; | 1188 intptr_t unused; |
| 1187 for (intptr_t v = 0; v < num_vars; v++) { | 1189 for (intptr_t v = 0; v < num_vars; v++) { |
| 1188 frame->VariableAt(v, &var_name, &unused, &unused, &var_value); | 1190 frame->VariableAt(v, &var_name, &unused, &unused, &var_value); |
| 1189 } | 1191 } |
| 1190 } | 1192 } |
| 1191 } | 1193 } |
| 1192 | 1194 |
| 1193 uword interrupt_bits = isolate->GetAndClearInterrupts(); | 1195 uword interrupt_bits = isolate->GetAndClearInterrupts(); |
| 1194 if ((interrupt_bits & Isolate::kStoreBufferInterrupt) != 0) { | 1196 if ((interrupt_bits & Isolate::kStoreBufferInterrupt) != 0) { |
| 1195 if (FLAG_verbose_gc) { | 1197 if (FLAG_verbose_gc) { |
| (...skipping 486 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1682 const intptr_t elm_size = old_data.ElementSizeInBytes(); | 1684 const intptr_t elm_size = old_data.ElementSizeInBytes(); |
| 1683 const TypedData& new_data = | 1685 const TypedData& new_data = |
| 1684 TypedData::Handle(TypedData::New(cid, new_size, Heap::kOld)); | 1686 TypedData::Handle(TypedData::New(cid, new_size, Heap::kOld)); |
| 1685 TypedData::Copy(new_data, 0, old_data, 0, old_size * elm_size); | 1687 TypedData::Copy(new_data, 0, old_data, 0, old_size * elm_size); |
| 1686 typed_data_cell.SetAt(0, new_data); | 1688 typed_data_cell.SetAt(0, new_data); |
| 1687 arguments.SetReturn(new_data); | 1689 arguments.SetReturn(new_data); |
| 1688 } | 1690 } |
| 1689 | 1691 |
| 1690 | 1692 |
| 1691 } // namespace dart | 1693 } // namespace dart |
| OLD | NEW |