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 locals_handler; | 5 library locals_handler; |
6 | 6 |
7 import 'dart:collection' show IterableMixin; | 7 import 'dart:collection' show IterableMixin; |
8 | 8 |
9 import '../options.dart' show CompilerOptions; | 9 import '../options.dart' show CompilerOptions; |
10 import '../elements/elements.dart'; | 10 import '../elements/elements.dart'; |
(...skipping 412 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
423 }); | 423 }); |
424 } | 424 } |
425 } | 425 } |
426 | 426 |
427 /** | 427 /** |
428 * Merge all [LocalsHandler] in [handlers] into [:this:]. | 428 * Merge all [LocalsHandler] in [handlers] into [:this:]. |
429 * | 429 * |
430 * If [keepOwnLocals] is true, the types of locals in this | 430 * If [keepOwnLocals] is true, the types of locals in this |
431 * [LocalsHandler] are being used in the merge. [keepOwnLocals] | 431 * [LocalsHandler] are being used in the merge. [keepOwnLocals] |
432 * should be true if this [LocalsHandler], the dominator of | 432 * should be true if this [LocalsHandler], the dominator of |
433 * all [handlers], also direclty flows into the join point, | 433 * all [handlers], also directly flows into the join point, |
434 * that is the code after all [handlers]. For example, consider: | 434 * that is the code after all [handlers]. For example, consider: |
435 * | 435 * |
436 * [: switch (...) { | 436 * [: switch (...) { |
437 * case 1: ...; break; | 437 * case 1: ...; break; |
438 * } | 438 * } |
439 * :] | 439 * :] |
440 * | 440 * |
441 * The [LocalsHandler] at entry of the switch also flows into the | 441 * The [LocalsHandler] at entry of the switch also flows into the |
442 * exit of the switch, because there is no default case. So the | 442 * exit of the switch, because there is no default case. So the |
443 * types of locals at entry of the switch have to take part to the | 443 * types of locals at entry of the switch have to take part to the |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
543 if (newType != type) { | 543 if (newType != type) { |
544 locals[variable] = newType; | 544 locals[variable] = newType; |
545 } | 545 } |
546 }); | 546 }); |
547 } | 547 } |
548 | 548 |
549 void updateField(Element element, TypeInformation type) { | 549 void updateField(Element element, TypeInformation type) { |
550 fieldScope.updateField(element, type); | 550 fieldScope.updateField(element, type); |
551 } | 551 } |
552 } | 552 } |
OLD | NEW |