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

Side by Side Diff: pkg/compiler/lib/src/cps_ir/cps_ir_builder_task.dart

Issue 1152903003: Create SendStructure for unary and binary in resolution. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Updated cf. comments Created 5 years, 7 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 unified diff | Download patch
« no previous file with comments | « no previous file | pkg/compiler/lib/src/elements/elements.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library dart2js.ir_builder_task; 5 library dart2js.ir_builder_task;
6 6
7 import '../closure.dart' as closurelib; 7 import '../closure.dart' as closurelib;
8 import '../closure.dart' hide ClosureScope; 8 import '../closure.dart' hide ClosureScope;
9 import '../constants/expressions.dart'; 9 import '../constants/expressions.dart';
10 import '../dart_types.dart'; 10 import '../dart_types.dart';
(...skipping 978 matching lines...) Expand 10 before | Expand all | Expand 10 after
989 ast.Node argument, 989 ast.Node argument,
990 _) { 990 _) {
991 return irBuilder.buildNegation( 991 return irBuilder.buildNegation(
992 translateSuperBinary(function, op.BinaryOperator.NOT_EQ, argument)); 992 translateSuperBinary(function, op.BinaryOperator.NOT_EQ, argument));
993 } 993 }
994 994
995 @override 995 @override
996 ir.Primitive visitUnary(ast.Send node, 996 ir.Primitive visitUnary(ast.Send node,
997 op.UnaryOperator operator, ast.Node expression, _) { 997 op.UnaryOperator operator, ast.Node expression, _) {
998 // TODO(johnniwinther): Clean up the creation of selectors. 998 // TODO(johnniwinther): Clean up the creation of selectors.
999 Selector selector = new Selector( 999 Selector selector = operator.selector;
1000 SelectorKind.OPERATOR,
1001 new PublicName(operator.selectorName),
1002 CallStructure.NO_ARGS);
1003 ir.Primitive receiver = translateReceiver(expression); 1000 ir.Primitive receiver = translateReceiver(expression);
1004 return irBuilder.buildDynamicInvocation(receiver, selector, const []); 1001 return irBuilder.buildDynamicInvocation(receiver, selector, const []);
1005 } 1002 }
1006 1003
1007 @override 1004 @override
1008 ir.Primitive visitSuperUnary( 1005 ir.Primitive visitSuperUnary(
1009 ast.Send node, 1006 ast.Send node,
1010 op.UnaryOperator operator, 1007 op.UnaryOperator operator,
1011 FunctionElement function, 1008 FunctionElement function,
1012 _) { 1009 _) {
(...skipping 2060 matching lines...) Expand 10 before | Expand all | Expand 10 after
3073 node.body = replacementFor(node.body); 3070 node.body = replacementFor(node.body);
3074 } 3071 }
3075 } 3072 }
3076 3073
3077 /// Visit a just-deleted subterm and unlink all [Reference]s in it. 3074 /// Visit a just-deleted subterm and unlink all [Reference]s in it.
3078 class RemovalVisitor extends ir.RecursiveVisitor { 3075 class RemovalVisitor extends ir.RecursiveVisitor {
3079 processReference(ir.Reference reference) { 3076 processReference(ir.Reference reference) {
3080 reference.unlink(); 3077 reference.unlink();
3081 } 3078 }
3082 } 3079 }
OLDNEW
« no previous file with comments | « no previous file | pkg/compiler/lib/src/elements/elements.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698