Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 inferrer_visitor; | 5 library inferrer_visitor; |
| 6 | 6 |
| 7 import '../dart2jslib.dart' hide Selector, TypedSelector; | 7 import '../dart2jslib.dart' hide Selector, TypedSelector; |
| 8 import '../dart_types.dart'; | 8 import '../dart_types.dart'; |
| 9 import '../elements/elements.dart'; | 9 import '../elements/elements.dart'; |
| 10 import '../tree/tree.dart'; | 10 import '../tree/tree.dart'; |
| (...skipping 564 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 575 InferrerVisitor(Element analyzedElement, | 575 InferrerVisitor(Element analyzedElement, |
| 576 this.inferrer, | 576 this.inferrer, |
| 577 this.types, | 577 this.types, |
| 578 Compiler compiler, | 578 Compiler compiler, |
| 579 [LocalsHandler<T> handler]) | 579 [LocalsHandler<T> handler]) |
| 580 : this.analyzedElement = analyzedElement, | 580 : this.analyzedElement = analyzedElement, |
| 581 this.locals = handler, | 581 this.locals = handler, |
| 582 super(compiler.enqueuer.resolution.getCachedElements(analyzedElement), | 582 super(compiler.enqueuer.resolution.getCachedElements(analyzedElement), |
| 583 compiler) { | 583 compiler) { |
| 584 if (handler != null) return; | 584 if (handler != null) return; |
| 585 Node node = analyzedElement.parseNode(compiler); | 585 Node node; |
| 586 try { | |
| 587 // @lry debug | |
| 588 node = analyzedElement.parseNode(compiler); | |
| 589 } catch (e) { | |
| 590 print(0); | |
|
kasperl
2013/11/06 08:30:04
I guess you're going to get rid of this before sub
lukas
2013/11/06 11:36:08
yes, stuff annotated with "@lry" will be removed
| |
| 591 throw e; | |
|
kasperl
2013/11/06 08:30:04
rethrow.
| |
| 592 } | |
| 586 FieldInitializationScope<T> fieldScope = | 593 FieldInitializationScope<T> fieldScope = |
| 587 analyzedElement.isGenerativeConstructor() | 594 analyzedElement.isGenerativeConstructor() |
| 588 ? new FieldInitializationScope<T>(types) | 595 ? new FieldInitializationScope<T>(types) |
| 589 : null; | 596 : null; |
| 590 locals = new LocalsHandler<T>(inferrer, types, compiler, node, fieldScope); | 597 locals = new LocalsHandler<T>(inferrer, types, compiler, node, fieldScope); |
| 591 } | 598 } |
| 592 | 599 |
| 593 T visitSendSet(SendSet node); | 600 T visitSendSet(SendSet node); |
| 594 | 601 |
| 595 T visitSuperSend(Send node); | 602 T visitSuperSend(Send node); |
| (...skipping 550 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1146 return type; | 1153 return type; |
| 1147 } | 1154 } |
| 1148 | 1155 |
| 1149 T visitCascade(Cascade node) { | 1156 T visitCascade(Cascade node) { |
| 1150 // Ignore the result of the cascade send and return the type of the cascade | 1157 // Ignore the result of the cascade send and return the type of the cascade |
| 1151 // receiver. | 1158 // receiver. |
| 1152 visit(node.expression); | 1159 visit(node.expression); |
| 1153 return cascadeReceiverStack.removeLast(); | 1160 return cascadeReceiverStack.removeLast(); |
| 1154 } | 1161 } |
| 1155 } | 1162 } |
| OLD | NEW |