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

Unified Diff: runtime/vm/precompiler.cc

Issue 1746313002: Precompilation: also trace types of exception handlers. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/precompiler.cc
diff --git a/runtime/vm/precompiler.cc b/runtime/vm/precompiler.cc
index 3b31a6328eb712aabf5a465c61a348fa3292ce3b..7e5fb37c48b95f963540f5fbbd2064bba1d49b77 100644
--- a/runtime/vm/precompiler.cc
+++ b/runtime/vm/precompiler.cc
@@ -571,6 +571,23 @@ void Precompiler::AddTypesOf(const Function& function) {
type = function.ParameterTypeAt(i);
AddType(type);
}
+ Code& code = Code::Handle(Z, function.CurrentCode());
+ if (code.IsNull()) {
+ ASSERT(function.kind() == RawFunction::kSignatureFunction);
+ } else {
+ const ExceptionHandlers& handlers =
+ ExceptionHandlers::Handle(Z, code.exception_handlers());
+ if (!handlers.IsNull()) {
+ Array& types = Array::Handle(Z);
+ for (intptr_t i = 0; i < handlers.num_entries(); i++) {
+ types = handlers.GetHandledTypes(i);
+ for (intptr_t j = 0; j < types.Length(); j++) {
+ type ^= types.At(j);
+ AddType(type);
+ }
+ }
+ }
+ }
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698