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

Unified Diff: pkg/compiler/lib/src/ssa/builder.dart

Issue 1313323002: Add visitor methods specific to ??= to SemanticSendVisitor. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Updated cf. comments. Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/compiler/lib/src/resolution/send_structure.dart ('k') | pkg/compiler/lib/src/use_unused_api.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/ssa/builder.dart
diff --git a/pkg/compiler/lib/src/ssa/builder.dart b/pkg/compiler/lib/src/ssa/builder.dart
index fb0f231c080395f3df096661daee2d846a526602..f9d87f94304cfb42add3c17338ba54c19881a5c1 100644
--- a/pkg/compiler/lib/src/ssa/builder.dart
+++ b/pkg/compiler/lib/src/ssa/builder.dart
@@ -990,6 +990,7 @@ class SwitchCaseJumpHandler extends TargetJumpHandler {
*/
class SsaBuilder extends ast.Visitor
with BaseImplementationOfCompoundsMixin,
+ BaseImplementationOfSetIfNullsMixin,
SendResolverMixin,
SemanticSendResolvedMixin,
NewBulkMixin,
@@ -6728,6 +6729,70 @@ class SsaBuilder extends ast.Visitor
handleCompoundSendSet(node);
}
+ @override
+ handleDynamicSetIfNulls(
+ ast.Send node,
+ ast.Node receiver,
+ Name name,
+ ast.Node rhs,
+ arg) {
+ handleCompoundSendSet(node);
+ }
+
+ @override
+ handleLocalSetIfNulls(
+ ast.SendSet node,
+ LocalElement local,
+ ast.Node rhs,
+ arg,
+ {bool isSetterValid}) {
+ handleCompoundSendSet(node);
+ }
+
+ @override
+ handleStaticSetIfNulls(
+ ast.SendSet node,
+ Element getter,
+ CompoundGetter getterKind,
+ Element setter,
+ CompoundSetter setterKind,
+ ast.Node rhs,
+ arg) {
+ handleCompoundSendSet(node);
+ }
+
+ @override
+ handleSuperSetIfNulls(
+ ast.SendSet node,
+ Element getter,
+ CompoundGetter getterKind,
+ Element setter,
+ CompoundSetter setterKind,
+ ast.Node rhs,
+ arg) {
+ handleSuperSendSet(node);
+ }
+
+ @override
+ handleTypeLiteralConstantSetIfNulls(
+ ast.SendSet node,
+ ConstantExpression constant,
+ ast.Node rhs,
+ arg) {
+ // The type variable is never `null`.
+ generateConstantTypeLiteral(node);
+ }
+
+ @override
+ visitTypeVariableTypeLiteralSetIfNull(
+ ast.Send node,
+ TypeVariableElement element,
+ ast.Node rhs,
+ arg) {
+ // The type variable is never `null`.
+ generateTypeVariableLiteral(node, element.type);
+ }
+
void visitLiteralInt(ast.LiteralInt node) {
stack.add(graph.addConstantInt(node.value, compiler));
}
@@ -8191,11 +8256,7 @@ class SsaBuilder extends ast.Visitor
ConstantExpression constant,
CompoundRhs rhs,
_) {
- if (rhs.operator.kind == BinaryOperatorKind.IF_NULL) {
- handleCompoundSendSet(node);
- } else {
- handleTypeLiteralCompound(node);
- }
+ handleTypeLiteralCompound(node);
}
@override
« no previous file with comments | « pkg/compiler/lib/src/resolution/send_structure.dart ('k') | pkg/compiler/lib/src/use_unused_api.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698