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

Side by Side Diff: pkg/compiler/lib/src/inferrer/node_tracer.dart

Issue 2813093002: Remove BackendClasses and JavaScriptBackendClasses. (Closed)
Patch Set: . Created 3 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
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 4
5 library compiler.src.inferrer.node_tracer; 5 library compiler.src.inferrer.node_tracer;
6 6
7 import '../common/names.dart' show Identifiers; 7 import '../common/names.dart' show Identifiers;
8 import '../compiler.dart' show Compiler; 8 import '../compiler.dart' show Compiler;
9 import '../elements/elements.dart'; 9 import '../elements/elements.dart';
10 import '../types/types.dart' show ContainerTypeMask, MapTypeMask; 10 import '../types/types.dart' show ContainerTypeMask, MapTypeMask;
(...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after
390 } 390 }
391 } 391 }
392 392
393 /** 393 /**
394 * Check whether element is the parameter of a list adding method. 394 * Check whether element is the parameter of a list adding method.
395 * The definition of what a list adding method is has to stay in sync with 395 * The definition of what a list adding method is has to stay in sync with
396 * [mightAddToContainer]. 396 * [mightAddToContainer].
397 */ 397 */
398 bool isParameterOfListAddingMethod(Element element) { 398 bool isParameterOfListAddingMethod(Element element) {
399 if (!element.isRegularParameter) return false; 399 if (!element.isRegularParameter) return false;
400 if (element.enclosingClass != compiler.backend.backendClasses.listClass) { 400 if (element.enclosingClass != compiler.commonElements.jsArrayClass) {
401 return false; 401 return false;
402 } 402 }
403 String name = element.enclosingElement.name; 403 String name = element.enclosingElement.name;
404 return (name == '[]=') || (name == 'add') || (name == 'insert'); 404 return (name == '[]=') || (name == 'add') || (name == 'insert');
405 } 405 }
406 406
407 /** 407 /**
408 * Check whether element is the parameter of a list adding method. 408 * Check whether element is the parameter of a list adding method.
409 * The definition of what a list adding method is has to stay in sync with 409 * The definition of what a list adding method is has to stay in sync with
410 * [isIndexSetKey] and [isIndexSetValue]. 410 * [isIndexSetKey] and [isIndexSetValue].
411 */ 411 */
412 bool isParameterOfMapAddingMethod(Element element) { 412 bool isParameterOfMapAddingMethod(Element element) {
413 if (!element.isRegularParameter) return false; 413 if (!element.isRegularParameter) return false;
414 if (element.enclosingClass != compiler.backend.backendClasses.mapClass) { 414 if (element.enclosingClass != compiler.commonElements.mapLiteralClass) {
415 return false; 415 return false;
416 } 416 }
417 String name = element.enclosingElement.name; 417 String name = element.enclosingElement.name;
418 return (name == '[]='); 418 return (name == '[]=');
419 } 419 }
420 420
421 bool isClosure(Element element) { 421 bool isClosure(Element element) {
422 if (!element.isFunction) return false; 422 if (!element.isFunction) return false;
423 423
424 /// Creating an instance of a class that implements [Function] also 424 /// Creating an instance of a class that implements [Function] also
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
460 } 460 }
461 if (isParameterOfListAddingMethod(element) || 461 if (isParameterOfListAddingMethod(element) ||
462 isParameterOfMapAddingMethod(element)) { 462 isParameterOfMapAddingMethod(element)) {
463 // These elements are being handled in 463 // These elements are being handled in
464 // [visitDynamicCallSiteTypeInformation]. 464 // [visitDynamicCallSiteTypeInformation].
465 return; 465 return;
466 } 466 }
467 addNewEscapeInformation(info); 467 addNewEscapeInformation(info);
468 } 468 }
469 } 469 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/elements/elements.dart ('k') | pkg/compiler/lib/src/inferrer/type_graph_nodes.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698