| OLD | NEW |
| 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 | 5 |
| 6 /** | 6 /** |
| 7 * If true, print a warning for each method that was resolved, but not | 7 * If true, print a warning for each method that was resolved, but not |
| 8 * compiled. | 8 * compiled. |
| 9 */ | 9 */ |
| 10 final bool REPORT_EXCESS_RESOLUTION = false; | 10 final bool REPORT_EXCESS_RESOLUTION = false; |
| (...skipping 437 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 448 assert(world.checkNoEnqueuedInvokedInstanceMethods()); | 448 assert(world.checkNoEnqueuedInvokedInstanceMethods()); |
| 449 world.registerFieldClosureInvocations(); | 449 world.registerFieldClosureInvocations(); |
| 450 } | 450 } |
| 451 | 451 |
| 452 processRecompilationQueue(Enqueuer world) { | 452 processRecompilationQueue(Enqueuer world) { |
| 453 pass = 2; | 453 pass = 2; |
| 454 while (!world.recompilationCandidates.isEmpty()) { | 454 while (!world.recompilationCandidates.isEmpty()) { |
| 455 WorkItem work = world.recompilationCandidates.next(); | 455 WorkItem work = world.recompilationCandidates.next(); |
| 456 var oldCode = world.universe.generatedCode[work.element]; | 456 var oldCode = world.universe.generatedCode[work.element]; |
| 457 world.universe.generatedCode.remove(work.element); | 457 world.universe.generatedCode.remove(work.element); |
| 458 world.universe.generatedBailoutCode.remove(work.element); |
| 458 withCurrentElement(work.element, () => work.run(this, world)); | 459 withCurrentElement(work.element, () => work.run(this, world)); |
| 459 var newCode = world.universe.generatedCode[work.element]; | 460 var newCode = world.universe.generatedCode[work.element]; |
| 460 if (REPORT_PASS2_OPTIMIZATIONS && newCode != oldCode) { | 461 if (REPORT_PASS2_OPTIMIZATIONS && newCode != oldCode) { |
| 461 log("Pass 2 optimization:"); | 462 log("Pass 2 optimization:"); |
| 462 log("Before:\n$oldCode"); | 463 log("Before:\n$oldCode"); |
| 463 log("After:\n$newCode"); | 464 log("After:\n$newCode"); |
| 464 } | 465 } |
| 465 } | 466 } |
| 466 } | 467 } |
| 467 | 468 |
| (...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 738 // invariant that endOffset > beginOffset, but for EOF the | 739 // invariant that endOffset > beginOffset, but for EOF the |
| 739 // charoffset of the next token may be [beginOffset]. This can | 740 // charoffset of the next token may be [beginOffset]. This can |
| 740 // also happen for synthetized tokens that are produced during | 741 // also happen for synthetized tokens that are produced during |
| 741 // error handling. | 742 // error handling. |
| 742 final endOffset = | 743 final endOffset = |
| 743 Math.max((end.next !== null) ? end.next.charOffset : 0, beginOffset + 1); | 744 Math.max((end.next !== null) ? end.next.charOffset : 0, beginOffset + 1); |
| 744 assert(endOffset > beginOffset); | 745 assert(endOffset > beginOffset); |
| 745 return f(beginOffset, endOffset); | 746 return f(beginOffset, endOffset); |
| 746 } | 747 } |
| 747 } | 748 } |
| OLD | NEW |