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 1281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1292 OS::PrintErr("*** Computing stacktrace (%s)\n", | 1292 OS::PrintErr("*** Computing stacktrace (%s)\n", |
1293 function.ToFullyQualifiedCString()); | 1293 function.ToFullyQualifiedCString()); |
1294 do_stacktrace = true; | 1294 do_stacktrace = true; |
1295 } | 1295 } |
1296 } | 1296 } |
1297 if (do_deopt) { | 1297 if (do_deopt) { |
1298 // TODO(turnidge): Consider using DeoptimizeAt instead. | 1298 // TODO(turnidge): Consider using DeoptimizeAt instead. |
1299 DeoptimizeFunctionsOnStack(); | 1299 DeoptimizeFunctionsOnStack(); |
1300 } | 1300 } |
1301 if (do_reload) { | 1301 if (do_reload) { |
| 1302 #ifndef PRODUCT |
1302 // Maybe adjust the rate of future reloads. | 1303 // Maybe adjust the rate of future reloads. |
1303 isolate->MaybeIncreaseReloadEveryNStackOverflowChecks(); | 1304 isolate->MaybeIncreaseReloadEveryNStackOverflowChecks(); |
1304 // Issue a reload. | 1305 // Issue a reload. |
1305 NOT_IN_PRODUCT(isolate->ReloadSources();) | 1306 isolate->ReloadSources(); |
| 1307 const Error& error = Error::Handle(isolate->sticky_reload_error()); |
| 1308 if (!error.IsNull()) { |
| 1309 FATAL1("*** Isolate reload failed: %s\n", error.ToErrorCString()); |
| 1310 } |
| 1311 #endif |
1306 } | 1312 } |
1307 if (FLAG_support_debugger && do_stacktrace) { | 1313 if (FLAG_support_debugger && do_stacktrace) { |
1308 String& var_name = String::Handle(); | 1314 String& var_name = String::Handle(); |
1309 Instance& var_value = Instance::Handle(); | 1315 Instance& var_value = Instance::Handle(); |
1310 // Collecting the stack trace and accessing local variables | 1316 // Collecting the stack trace and accessing local variables |
1311 // of frames may trigger parsing of functions to compute | 1317 // of frames may trigger parsing of functions to compute |
1312 // variable descriptors of functions. Parsing may trigger | 1318 // variable descriptors of functions. Parsing may trigger |
1313 // code execution, e.g. to compute compile-time constants. Thus, | 1319 // code execution, e.g. to compute compile-time constants. Thus, |
1314 // disable FLAG_stacktrace_every during trace collection to prevent | 1320 // disable FLAG_stacktrace_every during trace collection to prevent |
1315 // recursive stack trace collection. | 1321 // recursive stack trace collection. |
(...skipping 580 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1896 const intptr_t elm_size = old_data.ElementSizeInBytes(); | 1902 const intptr_t elm_size = old_data.ElementSizeInBytes(); |
1897 const TypedData& new_data = | 1903 const TypedData& new_data = |
1898 TypedData::Handle(TypedData::New(cid, new_size, Heap::kOld)); | 1904 TypedData::Handle(TypedData::New(cid, new_size, Heap::kOld)); |
1899 TypedData::Copy(new_data, 0, old_data, 0, old_size * elm_size); | 1905 TypedData::Copy(new_data, 0, old_data, 0, old_size * elm_size); |
1900 typed_data_cell.SetAt(0, new_data); | 1906 typed_data_cell.SetAt(0, new_data); |
1901 arguments.SetReturn(new_data); | 1907 arguments.SetReturn(new_data); |
1902 } | 1908 } |
1903 | 1909 |
1904 | 1910 |
1905 } // namespace dart | 1911 } // namespace dart |
OLD | NEW |