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

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

Issue 2196723002: Refactor how we report reload results (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: tweak Created 4 years, 4 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.h » ('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 1339 matching lines...) Expand 10 before | Expand all | Expand 10 after
1350 function.ToFullyQualifiedCString()); 1350 function.ToFullyQualifiedCString());
1351 do_stacktrace = true; 1351 do_stacktrace = true;
1352 } 1352 }
1353 } 1353 }
1354 if (do_deopt) { 1354 if (do_deopt) {
1355 // TODO(turnidge): Consider using DeoptimizeAt instead. 1355 // TODO(turnidge): Consider using DeoptimizeAt instead.
1356 DeoptimizeFunctionsOnStack(); 1356 DeoptimizeFunctionsOnStack();
1357 } 1357 }
1358 if (do_reload) { 1358 if (do_reload) {
1359 #ifndef PRODUCT 1359 #ifndef PRODUCT
1360 JSONStream js;
1360 // Maybe adjust the rate of future reloads. 1361 // Maybe adjust the rate of future reloads.
1361 isolate->MaybeIncreaseReloadEveryNStackOverflowChecks(); 1362 isolate->MaybeIncreaseReloadEveryNStackOverflowChecks();
1362 // Issue a reload. 1363 // Issue a reload.
1363 isolate->ReloadSources(true /* force_reload */); 1364 bool success = isolate->ReloadSources(&js, true /* force_reload */);
1364 const Error& error = Error::Handle(isolate->sticky_reload_error()); 1365 if (!success) {
1365 if (!error.IsNull()) { 1366 FATAL1("*** Isolate reload failed:\n%s\n", js.ToCString());
1366 FATAL1("*** Isolate reload failed: %s\n", error.ToErrorCString());
1367 } 1367 }
1368 #endif 1368 #endif
1369 } 1369 }
1370 if (FLAG_support_debugger && do_stacktrace) { 1370 if (FLAG_support_debugger && do_stacktrace) {
1371 String& var_name = String::Handle(); 1371 String& var_name = String::Handle();
1372 Instance& var_value = Instance::Handle(); 1372 Instance& var_value = Instance::Handle();
1373 // Collecting the stack trace and accessing local variables 1373 // Collecting the stack trace and accessing local variables
1374 // of frames may trigger parsing of functions to compute 1374 // of frames may trigger parsing of functions to compute
1375 // variable descriptors of functions. Parsing may trigger 1375 // variable descriptors of functions. Parsing may trigger
1376 // code execution, e.g. to compute compile-time constants. Thus, 1376 // code execution, e.g. to compute compile-time constants. Thus,
(...skipping 582 matching lines...) Expand 10 before | Expand all | Expand 10 after
1959 const intptr_t elm_size = old_data.ElementSizeInBytes(); 1959 const intptr_t elm_size = old_data.ElementSizeInBytes();
1960 const TypedData& new_data = 1960 const TypedData& new_data =
1961 TypedData::Handle(TypedData::New(cid, new_size, Heap::kOld)); 1961 TypedData::Handle(TypedData::New(cid, new_size, Heap::kOld));
1962 TypedData::Copy(new_data, 0, old_data, 0, old_size * elm_size); 1962 TypedData::Copy(new_data, 0, old_data, 0, old_size * elm_size);
1963 typed_data_cell.SetAt(0, new_data); 1963 typed_data_cell.SetAt(0, new_data);
1964 arguments.SetReturn(new_data); 1964 arguments.SetReturn(new_data);
1965 } 1965 }
1966 1966
1967 1967
1968 } // namespace dart 1968 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/isolate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698