Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(178)

Side by Side Diff: runtime/vm/code_generator.cc

Issue 2144113002: Disallow deferred loading when using isolate reloading. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Code review Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | runtime/vm/isolate_reload.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/isolate_reload.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698