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

Unified Diff: runtime/vm/kernel_binary_flowgraph.cc

Issue 2938173002: [kernel] Fix loading of type argument in catch. (Closed)
Patch Set: Created 3 years, 6 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 | tests/language/language_kernel.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/kernel_binary_flowgraph.cc
diff --git a/runtime/vm/kernel_binary_flowgraph.cc b/runtime/vm/kernel_binary_flowgraph.cc
index 33c85883c08dca768e4f896411db799a63c561f3..c244164bc4734340e94508c1b2a0b093f0eb97bd 100644
--- a/runtime/vm/kernel_binary_flowgraph.cc
+++ b/runtime/vm/kernel_binary_flowgraph.cc
@@ -888,7 +888,7 @@ void StreamingScopeBuilder::VisitStatement() {
EnterScope(offset);
- builder_->SkipDartType(); // read guard.
+ VisitDartType(); // read guard.
Kevin Millikin (Google) 2017/06/21 07:02:58 Update comments to be full sentences: "Read the gu
tag = builder_->ReadTag(); // read first part of exception.
if (tag == kSomething) {
VisitVariableDeclaration(); // read exception.
@@ -6542,9 +6542,17 @@ Fragment StreamingFlowGraphBuilder::BuildTryCatch() {
} else {
catch_body += LoadLocal(CurrentException());
catch_body += PushArgument(); // exception
- catch_body += NullConstant();
+ if (!type_guard->IsInstantiated(kCurrentClass)) {
+ catch_body += LoadInstantiatorTypeArguments();
+ } else {
+ catch_body += NullConstant();
+ }
catch_body += PushArgument(); // instantiator type arguments
- catch_body += NullConstant();
+ if (!type_guard->IsInstantiated(kFunctions)) {
+ catch_body += LoadFunctionTypeArguments();
+ } else {
+ catch_body += NullConstant();
+ }
catch_body += PushArgument(); // function type arguments
catch_body += Constant(*type_guard);
catch_body += PushArgument(); // guard type
« no previous file with comments | « no previous file | tests/language/language_kernel.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698