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

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

Issue 9223012: Small changes to get code generation of getters and setters working. Resolution is not fully corr... (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: '' Created 8 years, 11 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 | « frog/leg/resolver.dart ('k') | tests/language/language-leg.status » ('j') | 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) 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 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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 TreeElements elements = work.resolutionTree; 93 TreeElements elements = work.resolutionTree;
94 HInstruction.idCounter = 0; 94 HInstruction.idCounter = 0;
95 SsaBuilder builder = new SsaBuilder(compiler, elements); 95 SsaBuilder builder = new SsaBuilder(compiler, elements);
96 HGraph graph; 96 HGraph graph;
97 switch (element.kind) { 97 switch (element.kind) {
98 case ElementKind.GENERATIVE_CONSTRUCTOR: 98 case ElementKind.GENERATIVE_CONSTRUCTOR:
99 graph = compileConstructor(builder, work); 99 graph = compileConstructor(builder, work);
100 break; 100 break;
101 case ElementKind.GENERATIVE_CONSTRUCTOR_BODY: 101 case ElementKind.GENERATIVE_CONSTRUCTOR_BODY:
102 case ElementKind.FUNCTION: 102 case ElementKind.FUNCTION:
103 case ElementKind.GETTER:
104 case ElementKind.SETTER:
103 graph = builder.buildMethod(work.element); 105 graph = builder.buildMethod(work.element);
104 break; 106 break;
105 } 107 }
106 assert(graph.isValid()); 108 assert(graph.isValid());
107 if (GENERATE_SSA_TRACE) { 109 if (GENERATE_SSA_TRACE) {
108 String name; 110 String name;
109 if (element.enclosingElement !== null) { 111 if (element.enclosingElement !== null) {
110 name = "${element.enclosingElement.name}.${element.name}"; 112 name = "${element.enclosingElement.name}.${element.name}";
111 if (element.kind == ElementKind.GENERATIVE_CONSTRUCTOR_BODY) { 113 if (element.kind == ElementKind.GENERATIVE_CONSTRUCTOR_BODY) {
112 name = "$name (body)"; 114 name = "$name (body)";
(...skipping 1293 matching lines...) Expand 10 before | Expand all | Expand 10 after
1406 } 1408 }
1407 1409
1408 visitCatchBlock(CatchBlock node) { 1410 visitCatchBlock(CatchBlock node) {
1409 compiler.unimplemented('SsaBuilder.visitCatchBlock', node: node); 1411 compiler.unimplemented('SsaBuilder.visitCatchBlock', node: node);
1410 } 1412 }
1411 1413
1412 visitTypedef(Typedef node) { 1414 visitTypedef(Typedef node) {
1413 compiler.unimplemented('SsaBuilder.visitTypedef', node: node); 1415 compiler.unimplemented('SsaBuilder.visitTypedef', node: node);
1414 } 1416 }
1415 } 1417 }
OLDNEW
« no previous file with comments | « frog/leg/resolver.dart ('k') | tests/language/language-leg.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698