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

Unified Diff: sdk/lib/_internal/compiler/implementation/cps_ir/cps_ir_builder.dart

Issue 677663002: Support constructor invocation in analyzer2dart. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Add comment. Created 6 years, 2 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
Index: sdk/lib/_internal/compiler/implementation/cps_ir/cps_ir_builder.dart
diff --git a/sdk/lib/_internal/compiler/implementation/cps_ir/cps_ir_builder.dart b/sdk/lib/_internal/compiler/implementation/cps_ir/cps_ir_builder.dart
index 30a79830e105bd36f6a00d22b382d176c11e45f7..8190a705b9afd6a247bfc72a2764916512ee3105 100644
--- a/sdk/lib/_internal/compiler/implementation/cps_ir/cps_ir_builder.dart
+++ b/sdk/lib/_internal/compiler/implementation/cps_ir/cps_ir_builder.dart
@@ -491,7 +491,7 @@ class IrBuilder {
}
- /// Create a dynamic invocation on [receiver] with method name and arguments
+ /// Create a dynamic invocation on [receiver] with method name and argument
/// structure defined by [selector] and argument values defined by
/// [arguments].
ir.Primitive buildDynamicInvocation(ir.Definition receiver,
@@ -502,7 +502,7 @@ class IrBuilder {
(k) => new ir.InvokeMethod(receiver, selector, k, arguments));
}
- /// Create a static invocation of [element] with arguments structure defined
+ /// Create a static invocation of [element] with argument structure defined
/// by [selector] and argument values defined by [arguments].
ir.Primitive buildStaticInvocation(Element element,
Selector selector,
@@ -511,6 +511,18 @@ class IrBuilder {
(k) => new ir.InvokeStatic(element, selector, k, arguments));
}
+ /// Create a constructor invocation of [element] on [type] with argument
+ /// structure defined by [selector] and argument values defined by
+ /// [arguments].
+ ir.Primitive buildConstructorInvocation(FunctionElement element,
+ Selector selector,
+ DartType type,
+ List<ir.Definition> arguments) {
+ assert(isOpen);
+ return continueWithExpression(
+ (k) => new ir.InvokeConstructor(type, element, selector, k, arguments));
+ }
+
/// Creates an if-then-else statement with the provided [condition] where the
/// then and else branches are created through the [buildThenPart] and
/// [buildElsePart] functions, respectively.
« no previous file with comments | « pkg/analyzer2dart/test/sexpr_data.dart ('k') | sdk/lib/_internal/compiler/implementation/cps_ir/cps_ir_builder_visitor.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698