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

Side by Side Diff: sdk/lib/_internal/compiler/implementation/ssa/builder.dart

Issue 108293002: Fix a crash in the compiler. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years 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 | tests/language/phi_merge_test.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 part of ssa; 5 part of ssa;
6 6
7 /** 7 /**
8 * A special element for the extra parameter taken by intercepted 8 * A special element for the extra parameter taken by intercepted
9 * methods. We need to override [Element.computeType] because our 9 * methods. We need to override [Element.computeType] because our
10 * optimizers may look at its declared type. 10 * optimizers may look at its declared type.
(...skipping 631 matching lines...) Expand 10 before | Expand all | Expand 10 after
642 }); 642 });
643 } 643 }
644 if (thisValue != null) { 644 if (thisValue != null) {
645 // If there was a "this" for the scope, add it to the new locals. 645 // If there was a "this" for the scope, add it to the new locals.
646 joinedLocals[closureData.thisElement] = thisValue; 646 joinedLocals[closureData.thisElement] = thisValue;
647 } 647 }
648 648
649 // Remove locals that are not in all handlers. 649 // Remove locals that are not in all handlers.
650 directLocals = new Map<Element, HInstruction>(); 650 directLocals = new Map<Element, HInstruction>();
651 joinedLocals.forEach((element, instruction) { 651 joinedLocals.forEach((element, instruction) {
652 if (instruction is HPhi 652 if (element != closureData.thisElement
653 && instruction.inputs.length != localsHandlers.length) { 653 && instruction.inputs.length != localsHandlers.length) {
654 joinBlock.removePhi(instruction); 654 joinBlock.removePhi(instruction);
655 } else { 655 } else {
656 directLocals[element] = instruction; 656 directLocals[element] = instruction;
657 } 657 }
658 }); 658 });
659 return this; 659 return this;
660 } 660 }
661 } 661 }
662 662
(...skipping 5326 matching lines...) Expand 10 before | Expand all | Expand 10 after
5989 DartType unaliased = type.unalias(builder.compiler); 5989 DartType unaliased = type.unalias(builder.compiler);
5990 if (unaliased is TypedefType) throw 'unable to unalias $type'; 5990 if (unaliased is TypedefType) throw 'unable to unalias $type';
5991 unaliased.accept(this, builder); 5991 unaliased.accept(this, builder);
5992 } 5992 }
5993 5993
5994 void visitDynamicType(DynamicType type, SsaBuilder builder) { 5994 void visitDynamicType(DynamicType type, SsaBuilder builder) {
5995 ClassElement cls = builder.compiler.findHelper('DynamicRuntimeType'); 5995 ClassElement cls = builder.compiler.findHelper('DynamicRuntimeType');
5996 builder.push(new HDynamicType(type, new TypeMask.exact(cls))); 5996 builder.push(new HDynamicType(type, new TypeMask.exact(cls)));
5997 } 5997 }
5998 } 5998 }
OLDNEW
« no previous file with comments | « no previous file | tests/language/phi_merge_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698