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

Side by Side Diff: frog/leg/ssa/builder.dart

Issue 9616058: Implement parsing and resolving of type-variables. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix merge error. Created 8 years, 9 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 2482 matching lines...) Expand 10 before | Expand all | Expand 10 after
2493 } 2493 }
2494 2494
2495 visitCatchBlock(CatchBlock node) { 2495 visitCatchBlock(CatchBlock node) {
2496 visit(node.block); 2496 visit(node.block);
2497 } 2497 }
2498 2498
2499 visitTypedef(Typedef node) { 2499 visitTypedef(Typedef node) {
2500 compiler.unimplemented('SsaBuilder.visitTypedef', node: node); 2500 compiler.unimplemented('SsaBuilder.visitTypedef', node: node);
2501 } 2501 }
2502 2502
2503 visitTypeVariable(TypeVariable node) {
2504 compiler.unimplemented('SsaBuilder.visitTypeVariable', node: node);
ngeoffray 2012/03/15 11:47:40 Please use internalError or unreachable instead.
karlklose 2012/03/16 14:58:47 Done.
2505 }
2506
2503 generateUnimplemented(String reason, [bool isExpression = false]) { 2507 generateUnimplemented(String reason, [bool isExpression = false]) {
2504 DartString string = new DartString.literal(reason); 2508 DartString string = new DartString.literal(reason);
2505 HInstruction message = graph.addConstantString(string); 2509 HInstruction message = graph.addConstantString(string);
2506 2510
2507 // Normally, we would call [close] here. However, then we hit 2511 // Normally, we would call [close] here. However, then we hit
2508 // another unimplemented feature: aborting loop body. Simply 2512 // another unimplemented feature: aborting loop body. Simply
2509 // calling [add] does not work as it asserts that the instruction 2513 // calling [add] does not work as it asserts that the instruction
2510 // isn't a control flow instruction. So we inline parts of [add]. 2514 // isn't a control flow instruction. So we inline parts of [add].
2511 current.addAfter(current.last, new HThrow(message)); 2515 current.addAfter(current.last, new HThrow(message));
2512 if (isExpression) { 2516 if (isExpression) {
2513 stack.add(graph.addConstantNull()); 2517 stack.add(graph.addConstantNull());
2514 } 2518 }
2515 } 2519 }
2516 2520
2517 /** HACK HACK HACK */ 2521 /** HACK HACK HACK */
2518 void hackAroundPossiblyAbortingBody(Node body) { 2522 void hackAroundPossiblyAbortingBody(Node body) {
2519 stack.add(graph.addConstantBool(true)); 2523 stack.add(graph.addConstantBool(true));
2520 buildBody() { 2524 buildBody() {
2521 // TODO(lrn): Make sure to take continue into account. 2525 // TODO(lrn): Make sure to take continue into account.
2522 visit(body); 2526 visit(body);
2523 if (isAborted()) { 2527 if (isAborted()) {
2524 compiler.reportWarning(body, "aborting loop body"); 2528 compiler.reportWarning(body, "aborting loop body");
2525 } 2529 }
2526 } 2530 }
2527 handleIf(buildBody, null); 2531 handleIf(buildBody, null);
2528 } 2532 }
2529 } 2533 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698