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

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

Issue 1112793003: Refactor SimpleTypeInferrer.visitGetterSend and visitStaticSend. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | pkg/compiler/lib/src/inferrer/inferrer_visitor.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) 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 library concrete_types_inferrer; 5 library concrete_types_inferrer;
6 6
7 import 'dart:collection' show Queue, IterableBase; 7 import 'dart:collection' show Queue, IterableBase;
8 import '../native/native.dart' as native; 8 import '../native/native.dart' as native;
9 import '../closure.dart' show BoxFieldElement; 9 import '../closure.dart' show BoxFieldElement;
10 import '../dart2jslib.dart' hide Selector, TypedSelector; 10 import '../dart2jslib.dart' hide Selector, TypedSelector;
(...skipping 2350 matching lines...) Expand 10 before | Expand all | Expand 10 after
2361 : types.growableListType; 2361 : types.growableListType;
2362 return types.allocateList( 2362 return types.allocateList(
2363 containerType, 2363 containerType,
2364 node, 2364 node,
2365 outermostElement, 2365 outermostElement,
2366 elementType, 2366 elementType,
2367 length); 2367 length);
2368 } 2368 }
2369 2369
2370 /** 2370 /**
2371 * Same as super.visitGetterSend except it records the type of nodes in test 2371 * Same as super.handleLocalGet except it records the type of nodes in test
2372 * mode. 2372 * mode.
2373 */ 2373 */
2374 @override 2374 @override
2375 ConcreteType visitGetterSend(Send node) {
2376 if (inferrer.testMode) {
2377 var element = elements[node];
2378 if (element is Local) {
2379 internalError(node, "Unhandled local: $element");
2380 }
2381 }
2382 return super.visitGetterSend(node);
2383 }
2384
2385 @override
2386 ConcreteType handleLocalGet(Send node, LocalElement local) { 2375 ConcreteType handleLocalGet(Send node, LocalElement local) {
2387 if (inferrer.testMode) { 2376 if (inferrer.testMode) {
2388 ConcreteType type = locals.use(local); 2377 ConcreteType type = locals.use(local);
2389 if (type != null) { 2378 if (type != null) {
2390 inferrer.augmentInferredType(node, type); 2379 inferrer.augmentInferredType(node, type);
2391 } 2380 }
2392 } 2381 }
2393 return super.handleLocalGet(node, local); 2382 return super.handleLocalGet(node, local);
2394 } 2383 }
2395 } 2384 }
OLDNEW
« no previous file with comments | « no previous file | pkg/compiler/lib/src/inferrer/inferrer_visitor.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698