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

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

Issue 9970001: Fix typo in type. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 8 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 914 matching lines...) Expand 10 before | Expand all | Expand 10 after
925 f: (ClassElement enclosingClass, Element member) { 925 f: (ClassElement enclosingClass, Element member) {
926 HInstruction value = fieldValues[member]; 926 HInstruction value = fieldValues[member];
927 if (value === null) { 927 if (value === null) {
928 // The field has no value in the initializer list. Initialize it 928 // The field has no value in the initializer list. Initialize it
929 // with the declaration-site constant (if any). 929 // with the declaration-site constant (if any).
930 Constant fieldValue = compiler.constantHandler.compileVariable(member); 930 Constant fieldValue = compiler.constantHandler.compileVariable(member);
931 value = graph.addConstant(fieldValue); 931 value = graph.addConstant(fieldValue);
932 } 932 }
933 constructorArguments.add(value); 933 constructorArguments.add(value);
934 }); 934 });
935 935
936 HForeignNew newObject = new HForeignNew(classElement, constructorArguments); 936 HForeignNew newObject = new HForeignNew(classElement, constructorArguments);
937 add(newObject); 937 add(newObject);
938 // Generate calls to the constructor bodies. 938 // Generate calls to the constructor bodies.
939 for (int index = constructors.length - 1; index >= 0; index--) { 939 for (int index = constructors.length - 1; index >= 0; index--) {
940 FunctionElement constructor = constructors[index]; 940 FunctionElement constructor = constructors[index];
941 // TODO(floitsch): find better way to detect that constructor body is 941 // TODO(floitsch): find better way to detect that constructor body is
942 // empty. 942 // empty.
943 if (constructor is SynthesizedConstructorElement) continue; 943 if (constructor is SynthesizedConstructorElement) continue;
944 ConstructorBodyElement body = getConstructorBody(classElement, 944 ConstructorBodyElement body = getConstructorBody(classElement,
945 constructor); 945 constructor);
(...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after
1299 conditionBlock, 1299 conditionBlock,
1300 target, 1300 target,
1301 isContinue: true); 1301 isContinue: true);
1302 } 1302 }
1303 } 1303 }
1304 open(conditionBlock); 1304 open(conditionBlock);
1305 1305
1306 visit(node.condition); 1306 visit(node.condition);
1307 assert(!isAborted()); 1307 assert(!isAborted());
1308 HInstruction conditionInstruction = popBoolified(); 1308 HInstruction conditionInstruction = popBoolified();
1309 HBasicBLock conditionEndBlock = 1309 HBasicBlock conditionEndBlock =
1310 close(new HLoopBranch(conditionInstruction, HLoopBranch.DO_WHILE_LOOP)); 1310 close(new HLoopBranch(conditionInstruction, HLoopBranch.DO_WHILE_LOOP));
1311 1311
1312 conditionEndBlock.addSuccessor(loopEntryBlock); // The back-edge. 1312 conditionEndBlock.addSuccessor(loopEntryBlock); // The back-edge.
1313 loopEntryBlock.postProcessLoopHeader(); 1313 loopEntryBlock.postProcessLoopHeader();
1314 1314
1315 endLoop(loopEntryBlock, conditionEndBlock, jumpHandler, localsHandler); 1315 endLoop(loopEntryBlock, conditionEndBlock, jumpHandler, localsHandler);
1316 jumpHandler.close(); 1316 jumpHandler.close();
1317 1317
1318 loopInfo.body = new SubGraph(bodyEntryBlock, bodyExitBlock); 1318 loopInfo.body = new SubGraph(bodyEntryBlock, bodyExitBlock);
1319 loopInfo.condition = new SubExpression(conditionBlock, conditionEndBlock, 1319 loopInfo.condition = new SubExpression(conditionBlock, conditionEndBlock,
(...skipping 1677 matching lines...) Expand 10 before | Expand all | Expand 10 after
2997 false, 2997 false,
2998 <HInstruction>[target, input])); 2998 <HInstruction>[target, input]));
2999 return builder.pop(); 2999 return builder.pop();
3000 } 3000 }
3001 3001
3002 HInstruction result() { 3002 HInstruction result() {
3003 flushLiterals(); 3003 flushLiterals();
3004 return prefix; 3004 return prefix;
3005 } 3005 }
3006 } 3006 }
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