| Index: lib/compiler/implementation/ssa/codegen.dart
|
| diff --git a/lib/compiler/implementation/ssa/codegen.dart b/lib/compiler/implementation/ssa/codegen.dart
|
| index f68eedea1faed2849d015a57aa7f258300eda6ed..ec02d39175ffeeef51e0e8c3c95a636213acb607 100644
|
| --- a/lib/compiler/implementation/ssa/codegen.dart
|
| +++ b/lib/compiler/implementation/ssa/codegen.dart
|
| @@ -27,6 +27,15 @@ class SsaCodeGeneratorTask extends CompilerTask {
|
|
|
| CodeBuffer generateMethod(WorkItem work, HGraph graph) {
|
| return measure(() {
|
| + HTypeMap types = work.compilationContext.types;
|
| + graph.exit.predecessors.forEach((block) {
|
| + assert(block.last is HGoto || block.last is HReturn);
|
| + if (block.last is HReturn) {
|
| + backend.registerReturnType(work.element, types[block.last.inputs[0]]);
|
| + } else {
|
| + backend.registerReturnType(work.element, HType.NULL);
|
| + }
|
| + });
|
| compiler.tracer.traceGraph("codegen", graph);
|
| Map<Element, String> parameterNames = getParameterNames(work);
|
| parameterNames.forEach((element, name) {
|
|
|