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

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

Issue 1238163003: dart2js cps: Share interceptors by default and propagate to use later. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Renamed to let_sinking.dart Created 5 years, 5 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/cps_ir/cps_ir_tracer.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 library dart2js.ir_nodes; 4 library dart2js.ir_nodes;
5 5
6 import '../constants/values.dart' as values show ConstantValue; 6 import '../constants/values.dart' as values show ConstantValue;
7 import '../dart_types.dart' show DartType, InterfaceType, TypeVariableType; 7 import '../dart_types.dart' show DartType, InterfaceType, TypeVariableType;
8 import '../elements/elements.dart'; 8 import '../elements/elements.dart';
9 import '../io/source_information.dart' show SourceInformation; 9 import '../io/source_information.dart' show SourceInformation;
10 import '../types/types.dart' show TypeMask; 10 import '../types/types.dart' show TypeMask;
(...skipping 836 matching lines...) Expand 10 before | Expand all | Expand 10 after
847 this.typeInformation = _referenceList(typeInformation); 847 this.typeInformation = _referenceList(typeInformation);
848 848
849 accept(Visitor visitor) => visitor.visitCreateInstance(this); 849 accept(Visitor visitor) => visitor.visitCreateInstance(this);
850 850
851 bool get isSafeForElimination => true; 851 bool get isSafeForElimination => true;
852 bool get isSafeForReordering => true; 852 bool get isSafeForReordering => true;
853 } 853 }
854 854
855 class Interceptor extends Primitive { 855 class Interceptor extends Primitive {
856 final Reference<Primitive> input; 856 final Reference<Primitive> input;
857 final Set<ClassElement> interceptedClasses; 857 final Set<ClassElement> interceptedClasses = new Set<ClassElement>();
858 Interceptor(Primitive input, this.interceptedClasses) 858
859 Interceptor(Primitive input)
859 : this.input = new Reference<Primitive>(input); 860 : this.input = new Reference<Primitive>(input);
861
860 accept(Visitor visitor) => visitor.visitInterceptor(this); 862 accept(Visitor visitor) => visitor.visitInterceptor(this);
861 863
862 bool get isSafeForElimination => true; 864 bool get isSafeForElimination => true;
863 bool get isSafeForReordering => true; 865 bool get isSafeForReordering => true;
864 } 866 }
865 867
866 /// Create an instance of [Invocation] for use in a call to `noSuchMethod`. 868 /// Create an instance of [Invocation] for use in a call to `noSuchMethod`.
867 class CreateInvocationMirror extends Primitive { 869 class CreateInvocationMirror extends Primitive {
868 final Selector selector; 870 final Selector selector;
869 final List<Reference<Primitive>> arguments; 871 final List<Reference<Primitive>> arguments;
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
1003 : parameters = <Parameter>[new Parameter(null)], 1005 : parameters = <Parameter>[new Parameter(null)],
1004 isRecursive = false; 1006 isRecursive = false;
1005 1007
1006 accept(Visitor visitor) => visitor.visitContinuation(this); 1008 accept(Visitor visitor) => visitor.visitContinuation(this);
1007 } 1009 }
1008 1010
1009 /// Identifies a mutable variable. 1011 /// Identifies a mutable variable.
1010 class MutableVariable extends Definition { 1012 class MutableVariable extends Definition {
1011 Entity hint; 1013 Entity hint;
1012 1014
1013 MutableVariable(this.hint); 1015 MutableVariable(this.hint);
1014 1016
1015 accept(Visitor v) => v.visitMutableVariable(this); 1017 accept(Visitor v) => v.visitMutableVariable(this);
1016 } 1018 }
1017 1019
1018 /// A function definition, consisting of parameters and a body. 1020 /// A function definition, consisting of parameters and a body.
1019 /// 1021 ///
1020 /// There is an explicit parameter for the `this` argument, and a return 1022 /// There is an explicit parameter for the `this` argument, and a return
1021 /// continuation to invoke when returning from the function. 1023 /// continuation to invoke when returning from the function.
1022 class FunctionDefinition extends InteriorNode { 1024 class FunctionDefinition extends InteriorNode {
1023 final ExecutableElement element; 1025 final ExecutableElement element;
(...skipping 449 matching lines...) Expand 10 before | Expand all | Expand 10 after
1473 const RemovalVisitor(); 1475 const RemovalVisitor();
1474 1476
1475 processReference(Reference reference) { 1477 processReference(Reference reference) {
1476 reference.unlink(); 1478 reference.unlink();
1477 } 1479 }
1478 1480
1479 static void remove(Node node) { 1481 static void remove(Node node) {
1480 (const RemovalVisitor()).visit(node); 1482 (const RemovalVisitor()).visit(node);
1481 } 1483 }
1482 } 1484 }
OLDNEW
« no previous file with comments | « no previous file | pkg/compiler/lib/src/cps_ir/cps_ir_tracer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698