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

Side by Side Diff: pkg/compiler/lib/src/ssa/nodes.dart

Issue 1079253002: Use native behavior for dead code elimination (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 8 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 part of ssa; 5 part of ssa;
6 6
7 abstract class HVisitor<R> { 7 abstract class HVisitor<R> {
8 R visitAdd(HAdd node); 8 R visitAdd(HAdd node);
9 R visitAwait(HAwait node); 9 R visitAwait(HAwait node);
10 R visitBitAnd(HBitAnd node); 10 R visitBitAnd(HBitAnd node);
(...skipping 1732 matching lines...) Expand 10 before | Expand all | Expand 10 after
1743 HForeignCode.statement(js.Template codeTemplate, List<HInstruction> inputs, 1743 HForeignCode.statement(js.Template codeTemplate, List<HInstruction> inputs,
1744 SideEffects effects, 1744 SideEffects effects,
1745 native.NativeBehavior nativeBehavior, 1745 native.NativeBehavior nativeBehavior,
1746 TypeMask type) 1746 TypeMask type)
1747 : this(codeTemplate, type, inputs, isStatement: true, 1747 : this(codeTemplate, type, inputs, isStatement: true,
1748 effects: effects, nativeBehavior: nativeBehavior); 1748 effects: effects, nativeBehavior: nativeBehavior);
1749 1749
1750 accept(HVisitor visitor) => visitor.visitForeignCode(this); 1750 accept(HVisitor visitor) => visitor.visitForeignCode(this);
1751 1751
1752 bool isJsStatement() => isStatement; 1752 bool isJsStatement() => isStatement;
1753 bool canThrow() => throwBehavior.canThrow; 1753 bool canThrow() => canBeNull()
1754 ? throwBehavior.canThrow
1755 : throwBehavior.onNonNull.canThrow;
1756
1757 bool onlyThrowsNSM() => throwBehavior.onlyNullNSMGuard;
1754 } 1758 }
1755 1759
1756 class HForeignNew extends HForeign { 1760 class HForeignNew extends HForeign {
1757 ClassElement element; 1761 ClassElement element;
1758 1762
1759 /// If this field is not `null`, this call is from an inlined constructor and 1763 /// If this field is not `null`, this call is from an inlined constructor and
1760 /// we have to register the instantiated type in the code generator. The 1764 /// we have to register the instantiated type in the code generator. The
1761 /// [instructionType] of this node is not enough, because we also need the 1765 /// [instructionType] of this node is not enough, because we also need the
1762 /// type arguments. See also [SsaFromAstMixin.currentInlinedInstantiations]. 1766 /// type arguments. See also [SsaFromAstMixin.currentInlinedInstantiations].
1763 List<DartType> instantiatedTypes; 1767 List<DartType> instantiatedTypes;
(...skipping 1394 matching lines...) Expand 10 before | Expand all | Expand 10 after
3158 class HDynamicType extends HRuntimeType { 3162 class HDynamicType extends HRuntimeType {
3159 HDynamicType(DynamicType dartType, TypeMask instructionType) 3163 HDynamicType(DynamicType dartType, TypeMask instructionType)
3160 : super(const <HInstruction>[], dartType, instructionType); 3164 : super(const <HInstruction>[], dartType, instructionType);
3161 3165
3162 accept(HVisitor visitor) => visitor.visitDynamicType(this); 3166 accept(HVisitor visitor) => visitor.visitDynamicType(this);
3163 3167
3164 int typeCode() => HInstruction.DYNAMIC_TYPE_TYPECODE; 3168 int typeCode() => HInstruction.DYNAMIC_TYPE_TYPECODE;
3165 3169
3166 bool typeEquals(HInstruction other) => other is HDynamicType; 3170 bool typeEquals(HInstruction other) => other is HDynamicType;
3167 } 3171 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698