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

Side by Side Diff: pkg/compiler/lib/src/js_backend/no_such_method_registry.dart

Issue 2009773004: Remove reference to compiler from libary loader, fix analyzer warning (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 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 | « pkg/compiler/lib/src/compiler.dart ('k') | pkg/compiler/lib/src/library_loader.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 part of js_backend; 5 part of js_backend;
6 6
7 /** 7 /**
8 * Categorizes `noSuchMethod` implementations. 8 * Categorizes `noSuchMethod` implementations.
9 * 9 *
10 * If user code includes `noSuchMethod` implementations, type inference is 10 * If user code includes `noSuchMethod` implementations, type inference is
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 if (body is Return && body.isArrowBody) { 199 if (body is Return && body.isArrowBody) {
200 expr = body.expression; 200 expr = body.expression;
201 } else if (body is Block && 201 } else if (body is Block &&
202 !body.statements.isEmpty && 202 !body.statements.isEmpty &&
203 body.statements.nodes.tail.isEmpty) { 203 body.statements.nodes.tail.isEmpty) {
204 Statement stmt = body.statements.nodes.head; 204 Statement stmt = body.statements.nodes.head;
205 if (stmt is Return && stmt.hasExpression) { 205 if (stmt is Return && stmt.hasExpression) {
206 expr = stmt.expression; 206 expr = stmt.expression;
207 } 207 }
208 } 208 }
209 if (expr is Send && 209 if (expr is Send && expr.isTypeCast) {
210 expr.isTypeCast && 210 Send sendExpr = expr;
211 expr.typeAnnotationFromIsCheckOrCast.typeName is Identifier && 211 var typeName = sendExpr.typeAnnotationFromIsCheckOrCast.typeName;
212 expr.typeAnnotationFromIsCheckOrCast.typeName.source == "dynamic") { 212 if (typeName is Identifier && typeName.source == "dynamic") {
213 expr = (expr as Send).receiver; 213 expr = sendExpr.receiver;
214 }
214 } 215 }
215 if (expr is Send && 216 if (expr is Send &&
216 expr.isSuperCall && 217 expr.isSuperCall &&
217 expr.selector is Identifier && 218 expr.selector is Identifier &&
218 (expr.selector as Identifier).source == Identifiers.noSuchMethod_) { 219 (expr.selector as Identifier).source == Identifiers.noSuchMethod_) {
219 var arg = expr.arguments.head; 220 var arg = expr.arguments.head;
220 if (expr.arguments.tail.isEmpty && 221 if (expr.arguments.tail.isEmpty &&
221 arg is Send && 222 arg is Send &&
222 arg.argumentsNode == null && 223 arg.argumentsNode == null &&
223 arg.receiver == null && 224 arg.receiver == null &&
(...skipping 17 matching lines...) Expand all
241 if (body.statements.nodes.head is ExpressionStatement) { 242 if (body.statements.nodes.head is ExpressionStatement) {
242 ExpressionStatement stmt = body.statements.nodes.head; 243 ExpressionStatement stmt = body.statements.nodes.head;
243 return stmt.expression is Throw; 244 return stmt.expression is Throw;
244 } 245 }
245 } 246 }
246 return false; 247 return false;
247 } 248 }
248 } 249 }
249 250
250 enum NsmCategory { DEFAULT, THROWING, NOT_APPLICABLE, OTHER, } 251 enum NsmCategory { DEFAULT, THROWING, NOT_APPLICABLE, OTHER, }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/compiler.dart ('k') | pkg/compiler/lib/src/library_loader.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698