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

Unified Diff: pkg/kernel/lib/transformations/continuation.dart

Issue 2533793005: Check that invocations have well-formed targets in kernel verifier. (Closed)
Patch Set: Created 4 years, 1 month 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
Index: pkg/kernel/lib/transformations/continuation.dart
diff --git a/pkg/kernel/lib/transformations/continuation.dart b/pkg/kernel/lib/transformations/continuation.dart
index fd6e1d2e5fe40da305da09ac84f56a27ab391769..97ef172f8c9475aa93bd5bfe43220c1fc90f9e2e 100644
--- a/pkg/kernel/lib/transformations/continuation.dart
+++ b/pkg/kernel/lib/transformations/continuation.dart
@@ -528,7 +528,8 @@ abstract class AsyncRewriterBase extends ContinuationRewriterBase {
var iteratorVariable = new VariableDeclaration(':for-iterator',
initializer: new ConstructorInvocation(
helper.streamIteratorConstructor,
- new Arguments(<Expression>[stmt.iterable])));
+ new Arguments(<Expression>[stmt.iterable],
+ types: [const DynamicType()])));
// await iterator.moveNext()
var condition = new AwaitExpression(new MethodInvocation(
@@ -733,8 +734,8 @@ class AsyncFunctionRewriter extends AsyncRewriterBase {
// var :completer = new Completer.sync();
completerVariable = new VariableDeclaration(":completer",
- initializer: new StaticInvocation(
- helper.completerConstructor, new Arguments([])),
+ initializer: new StaticInvocation(helper.completerConstructor,
+ new Arguments([], types: [const DynamicType()])),
isFinal: true);
statements.add(completerVariable);
@@ -746,7 +747,8 @@ class AsyncFunctionRewriter extends AsyncRewriterBase {
// new Future.microtask(:async_op);
var newMicrotaskStatement = new ExpressionStatement(new StaticInvocation(
helper.futureMicrotaskConstructor,
- new Arguments([new VariableGet(nestedClosureVariable)])));
+ new Arguments([new VariableGet(nestedClosureVariable)],
+ types: [const DynamicType()])));
statements.add(newMicrotaskStatement);
// return :completer.future;
« no previous file with comments | « pkg/kernel/lib/analyzer/ast_from_analyzer.dart ('k') | pkg/kernel/lib/transformations/mixin_full_resolution.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698