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

Side by Side Diff: sdk/lib/_internal/compiler/implementation/resolution/members.dart

Issue 1259553002: Emit program and dependency information as relations in a Prolog database. Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 5 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
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 part of resolution; 5 part of resolution;
6 6
7 abstract class TreeElements { 7 abstract class TreeElements {
8 Element get currentElement; 8 Element get currentElement;
9 Setlet<Node> get superUses; 9 Setlet<Node> get superUses;
10 10
(...skipping 2334 matching lines...) Expand 10 before | Expand all | Expand 10 after
2345 2345
2346 visitIf(If node) { 2346 visitIf(If node) {
2347 doInPromotionScope(node.condition.expression, () => visit(node.condition)); 2347 doInPromotionScope(node.condition.expression, () => visit(node.condition));
2348 doInPromotionScope(node.thenPart, 2348 doInPromotionScope(node.thenPart,
2349 () => visitIn(node.thenPart, new BlockScope(scope))); 2349 () => visitIn(node.thenPart, new BlockScope(scope)));
2350 visitIn(node.elsePart, new BlockScope(scope)); 2350 visitIn(node.elsePart, new BlockScope(scope));
2351 } 2351 }
2352 2352
2353 Element resolveSend(Send node) { 2353 Element resolveSend(Send node) {
2354 Selector selector = resolveSelector(node, null); 2354 Selector selector = resolveSelector(node, null);
2355 if (selector != null) {
2356 compiler.enqueuer.resolution.dependencies.registerCallSite(
2357 registry.mapping, node);
2358 }
2355 if (node.isSuperCall) registry.registerSuperUse(node); 2359 if (node.isSuperCall) registry.registerSuperUse(node);
2356 2360
2357 if (node.receiver == null) { 2361 if (node.receiver == null) {
2358 // If this send is of the form "assert(expr);", then 2362 // If this send is of the form "assert(expr);", then
2359 // this is an assertion. 2363 // this is an assertion.
2360 if (selector.isAssert) { 2364 if (selector.isAssert) {
2361 if (selector.argumentCount != 1) { 2365 if (selector.argumentCount != 1) {
2362 error(node.selector, 2366 error(node.selector,
2363 MessageKind.WRONG_NUMBER_OF_ARGUMENTS_FOR_ASSERT, 2367 MessageKind.WRONG_NUMBER_OF_ARGUMENTS_FOR_ASSERT,
2364 {'argumentCount': selector.argumentCount}); 2368 {'argumentCount': selector.argumentCount});
(...skipping 2344 matching lines...) Expand 10 before | Expand all | Expand 10 after
4709 TreeElements _treeElements; 4713 TreeElements _treeElements;
4710 4714
4711 bool get hasTreeElements => _treeElements != null; 4715 bool get hasTreeElements => _treeElements != null;
4712 4716
4713 TreeElements get treeElements { 4717 TreeElements get treeElements {
4714 assert(invariant(this, _treeElements !=null, 4718 assert(invariant(this, _treeElements !=null,
4715 message: "TreeElements have not been computed for $this.")); 4719 message: "TreeElements have not been computed for $this."));
4716 return _treeElements; 4720 return _treeElements;
4717 } 4721 }
4718 } 4722 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698