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

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

Issue 10957060: First stab at parsing redirecting constructors. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Parsing correct syntax. Created 8 years, 2 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
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 2279 matching lines...) Expand 10 before | Expand all | Expand 10 after
2290 isNot = true; 2290 isNot = true;
2291 } 2291 }
2292 2292
2293 DartType type = elements.getType(typeAnnotation); 2293 DartType type = elements.getType(typeAnnotation);
2294 HInstruction typeInfo = null; 2294 HInstruction typeInfo = null;
2295 if (compiler.codegenWorld.rti.hasTypeArguments(type)) { 2295 if (compiler.codegenWorld.rti.hasTypeArguments(type)) {
2296 pushInvokeHelper1(interceptors.getGetRuntimeTypeInfo(), expression); 2296 pushInvokeHelper1(interceptors.getGetRuntimeTypeInfo(), expression);
2297 typeInfo = pop(); 2297 typeInfo = pop();
2298 } 2298 }
2299 if (type.element.isTypeVariable()) { 2299 if (type.element.isTypeVariable()) {
2300 // TODO(karlklose): We currently answer true to any is check 2300 // TODO(karlklose): We currently answer true to any is check
2301 // involving a type variable -- both is T and is !T -- until 2301 // involving a type variable -- both is T and is !T -- until
2302 // we have a proper implementation of reified generics. 2302 // we have a proper implementation of reified generics.
2303 stack.add(graph.addConstantBool(true, constantSystem)); 2303 stack.add(graph.addConstantBool(true, constantSystem));
2304 } else { 2304 } else {
2305 HInstruction instruction; 2305 HInstruction instruction;
2306 if (typeInfo !== null) { 2306 if (typeInfo !== null) {
2307 instruction = new HIs.withTypeInfoCall(type, expression, typeInfo); 2307 instruction = new HIs.withTypeInfoCall(type, expression, typeInfo);
2308 } else { 2308 } else {
2309 instruction = new HIs(type, expression); 2309 instruction = new HIs(type, expression);
2310 } 2310 }
2311 if (isNot) { 2311 if (isNot) {
(...skipping 2031 matching lines...) Expand 10 before | Expand all | Expand 10 after
4343 new HSubGraphBlockInformation(elseBranch.graph)); 4343 new HSubGraphBlockInformation(elseBranch.graph));
4344 4344
4345 HBasicBlock conditionStartBlock = conditionBranch.block; 4345 HBasicBlock conditionStartBlock = conditionBranch.block;
4346 conditionStartBlock.setBlockFlow(info, joinBlock); 4346 conditionStartBlock.setBlockFlow(info, joinBlock);
4347 SubGraph conditionGraph = conditionBranch.graph; 4347 SubGraph conditionGraph = conditionBranch.graph;
4348 HIf branch = conditionGraph.end.last; 4348 HIf branch = conditionGraph.end.last;
4349 assert(branch is HIf); 4349 assert(branch is HIf);
4350 branch.blockInformation = conditionStartBlock.blockFlow; 4350 branch.blockInformation = conditionStartBlock.blockFlow;
4351 } 4351 }
4352 } 4352 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698