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

Unified Diff: lib/src/codegen/js_codegen.dart

Issue 1172453002: fixes #209, remove tree mutation from CodeChecker (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 5 years, 6 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: lib/src/codegen/js_codegen.dart
diff --git a/lib/src/codegen/js_codegen.dart b/lib/src/codegen/js_codegen.dart
index 40e8b5de16f29c0db9396e121f7750ad36448fa0..1749ca742cde6543c3bce6a52615e60543ad2c73 100644
--- a/lib/src/codegen/js_codegen.dart
+++ b/lib/src/codegen/js_codegen.dart
@@ -49,7 +49,7 @@ const DSETINDEX = 'dsetindex';
const DCALL = 'dcall';
const DSEND = 'dsend';
-class JSCodegenVisitor extends GeneralizingAstVisitor with ConversionVisitor {
+class JSCodegenVisitor extends GeneralizingAstVisitor {
final AbstractCompiler compiler;
final CompilerOptions options;
final TypeRules rules;
@@ -233,12 +233,6 @@ class JSCodegenVisitor extends GeneralizingAstVisitor with ConversionVisitor {
bool isPublic(String name) => !name.startsWith('_');
- /// Conversions that we don't handle end up here.
- @override
- visitConversion(Conversion node) {
- throw 'Unlowered conversion ${node.runtimeType}: $node';
- }
-
@override
visitAsExpression(AsExpression node) {
var from = getStaticType(node.expression);
@@ -1819,9 +1813,6 @@ class JSCodegenVisitor extends GeneralizingAstVisitor with ConversionVisitor {
if (expr is ParenthesizedExpression) {
return _isNonNullableExpression(expr.expression);
}
- if (expr is Conversion) {
- return _isNonNullableExpression(expr.expression);
- }
if (expr is SimpleIdentifier) {
// Type literals are not null.
Element e = expr.staticElement;

Powered by Google App Engine
This is Rietveld 408576698