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

Side by Side Diff: pkg/dev_compiler/lib/src/compiler/code_generator.dart

Issue 2314193002: fix strong mode messages in pkg/dev_compiler (Closed)
Patch Set: Created 4 years, 3 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/dev_compiler/test/codegen_test.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) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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 import 'dart:collection' show HashMap, HashSet; 5 import 'dart:collection' show HashMap, HashSet;
6 import 'dart:math' show min, max; 6 import 'dart:math' show min, max;
7 7
8 import 'package:analyzer/analyzer.dart' hide ConstantEvaluator; 8 import 'package:analyzer/analyzer.dart' hide ConstantEvaluator;
9 import 'package:analyzer/dart/ast/ast.dart'; 9 import 'package:analyzer/dart/ast/ast.dart';
10 import 'package:analyzer/dart/ast/token.dart' show Token, TokenType; 10 import 'package:analyzer/dart/ast/token.dart' show Token, TokenType;
(...skipping 5077 matching lines...) Expand 10 before | Expand all | Expand 10 after
5088 5088
5089 @override 5089 @override
5090 visitNode(AstNode node) { 5090 visitNode(AstNode node) {
5091 // TODO(jmesserly): verify this is unreachable. 5091 // TODO(jmesserly): verify this is unreachable.
5092 throw 'Unimplemented ${node.runtimeType}: $node'; 5092 throw 'Unimplemented ${node.runtimeType}: $node';
5093 } 5093 }
5094 5094
5095 _visit(AstNode node) { 5095 _visit(AstNode node) {
5096 if (node == null) return null; 5096 if (node == null) return null;
5097 var result = node.accept(this); 5097 var result = node.accept(this);
5098 if (result is JS.Node) result = annotate(result, node); 5098 return result is JS.Node ? annotate(result, node) : result;
5099 return result;
5100 } 5099 }
5101 5100
5102 List/*<T>*/ _visitList/*<T extends AstNode>*/(Iterable/*<T>*/ nodes) { 5101 List/*<T>*/ _visitList/*<T extends AstNode>*/(Iterable/*<T>*/ nodes) {
5103 if (nodes == null) return null; 5102 if (nodes == null) return null;
5104 var result = /*<T>*/ []; 5103 var result = /*<T>*/ [];
5105 for (var node in nodes) result.add(_visit(node) as dynamic/*=T*/); 5104 for (var node in nodes) result.add(_visit(node) as dynamic/*=T*/);
5106 return result; 5105 return result;
5107 } 5106 }
5108 5107
5109 /// Visits a list of expressions, creating a comma expression if needed in JS. 5108 /// Visits a list of expressions, creating a comma expression if needed in JS.
(...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after
5452 } 5451 }
5453 5452
5454 bool isLibraryPrefix(Expression node) => 5453 bool isLibraryPrefix(Expression node) =>
5455 node is SimpleIdentifier && node.staticElement is PrefixElement; 5454 node is SimpleIdentifier && node.staticElement is PrefixElement;
5456 5455
5457 LibraryElement _getLibrary(AnalysisContext c, String uri) => 5456 LibraryElement _getLibrary(AnalysisContext c, String uri) =>
5458 c.computeLibraryElement(c.sourceFactory.forUri(uri)); 5457 c.computeLibraryElement(c.sourceFactory.forUri(uri));
5459 5458
5460 bool _isDartRuntime(LibraryElement l) => 5459 bool _isDartRuntime(LibraryElement l) =>
5461 l.isInSdk && l.source.uri.toString() == 'dart:_runtime'; 5460 l.isInSdk && l.source.uri.toString() == 'dart:_runtime';
OLDNEW
« no previous file with comments | « no previous file | pkg/dev_compiler/test/codegen_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698