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

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

Issue 9027002: Support factory methods. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: '' Created 8 years, 12 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) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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 SsaBuilderTask extends CompilerTask { 5 class SsaBuilderTask extends CompilerTask {
6 SsaBuilderTask(Compiler compiler) : super(compiler); 6 SsaBuilderTask(Compiler compiler) : super(compiler);
7 String get name() => 'SSA builder'; 7 String get name() => 'SSA builder';
8 8
9 HGraph build(FunctionElement element, TreeElements elements) { 9 HGraph build(FunctionElement element, TreeElements elements) {
10 return measure(() { 10 return measure(() {
11 FunctionExpression function = element.node; 11 FunctionExpression function = element.node;
12 HInstruction.idCounter = 0; 12 HInstruction.idCounter = 0;
13 SsaBuilder builder = new SsaBuilder(compiler, elements); 13 SsaBuilder builder = new SsaBuilder(compiler, elements);
14 HGraph graph; 14 HGraph graph;
15 switch (element.kind) { 15 switch (element.kind) {
16 case ElementKind.CONSTRUCTOR: 16 case ElementKind.GENERATIVE_CONSTRUCTOR:
17 graph = compileConstructor(builder, function, element, elements); 17 graph = compileConstructor(builder, function, element, elements);
18 break; 18 break;
19 case ElementKind.CONSTRUCTOR_BODY: 19 case ElementKind.GENERATIVE_CONSTRUCTOR_BODY:
20 graph = compileConstructorBody(builder, function, element, elements); 20 graph = compileConstructorBody(builder, function, element, elements);
21 break; 21 break;
22 case ElementKind.FUNCTION: 22 case ElementKind.FUNCTION:
23 graph = compileMethod(builder, function, element, elements); 23 graph = compileMethod(builder, function, element, elements);
24 break; 24 break;
25 } 25 }
26 assert(graph.isValid()); 26 assert(graph.isValid());
27 if (GENERATE_SSA_TRACE) { 27 if (GENERATE_SSA_TRACE) {
28 Identifier name = function.name; 28 Identifier name = function.name;
29 new HTracer.singleton().traceCompilation(name.source.toString()); 29 new HTracer.singleton().traceCompilation(name.source.toString());
(...skipping 995 matching lines...) Expand 10 before | Expand all | Expand 10 after
1025 1025
1026 visitStringInterpolation(StringInterpolation node) { 1026 visitStringInterpolation(StringInterpolation node) {
1027 compiler.unimplemented('SsaBuilder.visitStringInterpolation', node: node); 1027 compiler.unimplemented('SsaBuilder.visitStringInterpolation', node: node);
1028 } 1028 }
1029 1029
1030 visitStringInterpolationPart(StringInterpolationPart node) { 1030 visitStringInterpolationPart(StringInterpolationPart node) {
1031 compiler.unimplemented('SsaBuilder.visitStringInterpolationPart', 1031 compiler.unimplemented('SsaBuilder.visitStringInterpolationPart',
1032 node: node); 1032 node: node);
1033 } 1033 }
1034 } 1034 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698