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

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

Issue 10580018: Fix checked mode after r8854. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 6 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
« no previous file with comments | « no previous file | no next file » | 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 class Interceptors { 5 class Interceptors {
6 Compiler compiler; 6 Compiler compiler;
7 Interceptors(Compiler this.compiler); 7 Interceptors(Compiler this.compiler);
8 8
9 SourceString mapOperatorToMethodName(Operator op) { 9 SourceString mapOperatorToMethodName(Operator op) {
10 String name = op.source.stringValue; 10 String name = op.source.stringValue;
(...skipping 782 matching lines...) Expand 10 before | Expand all | Expand 10 after
793 HInstruction rethrowableException; 793 HInstruction rethrowableException;
794 Map<Element, HParameterValue> parameters; 794 Map<Element, HParameterValue> parameters;
795 795
796 Map<TargetElement, JumpHandler> jumpTargets; 796 Map<TargetElement, JumpHandler> jumpTargets;
797 797
798 /** 798 /**
799 * Variables stored in the current activation. These variables are 799 * Variables stored in the current activation. These variables are
800 * being updated in try/catch blocks, and should be 800 * being updated in try/catch blocks, and should be
801 * accessed indirectly through HFieldGet and HFieldSet. 801 * accessed indirectly through HFieldGet and HFieldSet.
802 */ 802 */
803 Map<Element, HParameterValue> activationVariables; 803 Map<Element, HLocalValue> activationVariables;
804 804
805 // We build the Ssa graph by simulating a stack machine. 805 // We build the Ssa graph by simulating a stack machine.
806 List<HInstruction> stack; 806 List<HInstruction> stack;
807 807
808 // The current block to add instructions to. Might be null, if we are 808 // The current block to add instructions to. Might be null, if we are
809 // visiting dead code. 809 // visiting dead code.
810 HBasicBlock current; 810 HBasicBlock current;
811 // The most recently opened block. Has the same value as [current] while 811 // The most recently opened block. Has the same value as [current] while
812 // the block is open, but unlike [current], it isn't cleared when the current 812 // the block is open, but unlike [current], it isn't cleared when the current
813 // block is closed. 813 // block is closed.
814 HBasicBlock lastOpenedBlock; 814 HBasicBlock lastOpenedBlock;
815 815
816 LibraryElement get currentLibrary() => work.element.getLibrary(); 816 LibraryElement get currentLibrary() => work.element.getLibrary();
817 Compiler get compiler() => builder.compiler; 817 Compiler get compiler() => builder.compiler;
818 CodeEmitterTask get emitter() => builder.emitter; 818 CodeEmitterTask get emitter() => builder.emitter;
819 819
820 SsaBuilder(SsaBuilderTask builder, WorkItem work) 820 SsaBuilder(SsaBuilderTask builder, WorkItem work)
821 : this.builder = builder, 821 : this.builder = builder,
822 this.work = work, 822 this.work = work,
823 interceptors = builder.interceptors, 823 interceptors = builder.interceptors,
824 methodInterceptionEnabled = true, 824 methodInterceptionEnabled = true,
825 graph = new HGraph(), 825 graph = new HGraph(),
826 stack = new List<HInstruction>(), 826 stack = new List<HInstruction>(),
827 activationVariables = new Map<Element, HParameterValue>(), 827 activationVariables = new Map<Element, HLocalValue>(),
828 jumpTargets = new Map<TargetElement, JumpHandler>(), 828 jumpTargets = new Map<TargetElement, JumpHandler>(),
829 parameters = new Map<Element, HParameterValue>(), 829 parameters = new Map<Element, HParameterValue>(),
830 super(work.resolutionTree) { 830 super(work.resolutionTree) {
831 localsHandler = new LocalsHandler(this); 831 localsHandler = new LocalsHandler(this);
832 } 832 }
833 833
834 void disableMethodInterception() { 834 void disableMethodInterception() {
835 assert(methodInterceptionEnabled); 835 assert(methodInterceptionEnabled);
836 methodInterceptionEnabled = false; 836 methodInterceptionEnabled = false;
837 } 837 }
(...skipping 2624 matching lines...) Expand 10 before | Expand all | Expand 10 after
3462 void visitNodeList(NodeList node) { 3462 void visitNodeList(NodeList node) {
3463 node.visitChildren(this); 3463 node.visitChildren(this);
3464 } 3464 }
3465 3465
3466 HInstruction concat(HInstruction left, HInstruction right) { 3466 HInstruction concat(HInstruction left, HInstruction right) {
3467 HInstruction instruction = new HStringConcat(left, right, diagnosticNode); 3467 HInstruction instruction = new HStringConcat(left, right, diagnosticNode);
3468 builder.add(instruction); 3468 builder.add(instruction);
3469 return instruction; 3469 return instruction;
3470 } 3470 }
3471 } 3471 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698