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

Side by Side Diff: dart/frog/method_data.dart

Issue 9325029: Fix for issue 1480: analyze a method even if it does not have a body, and do not try to evaluate ... (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 8 years, 10 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 | « dart/frog/gen.dart ('k') | dart/frog/minfrog » ('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) 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 5
6 class MethodCallData { 6 class MethodCallData {
7 MethodData data; 7 MethodData data;
8 8
9 MethodMember method; 9 MethodMember method;
10 10
(...skipping 29 matching lines...) Expand all
40 List<MethodCallData> _calls; 40 List<MethodCallData> _calls;
41 41
42 MethodData(this.baseMethod, [this.context]): _calls = [] { 42 MethodData(this.baseMethod, [this.context]): _calls = [] {
43 body = baseMethod.definition.body; 43 body = baseMethod.definition.body;
44 if (baseMethod.isConstructor) { 44 if (baseMethod.isConstructor) {
45 needsTypeParams = true; 45 needsTypeParams = true;
46 } 46 }
47 } 47 }
48 48
49 void analyze() { 49 void analyze() {
50 // TODO(jimhug): Is there really no analysis to do for a missing body?
51 if (body === null) return;
52 var ma = new MethodAnalyzer(baseMethod, body); 50 var ma = new MethodAnalyzer(baseMethod, body);
53 ma.analyze(context); 51 ma.analyze(context);
54 // TODO(jimhug): Add support for specializing on type parameters. 52 // TODO(jimhug): Add support for specializing on type parameters.
55 /* 53 /*
56 if (ma.hasTypeParams) { 54 if (ma.hasTypeParams) {
57 needsTypeParams = true; 55 needsTypeParams = true;
58 } 56 }
59 */ 57 */
60 } 58 }
61 59
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 if (baseMethod.name != '') { 140 if (baseMethod.name != '') {
143 lambdaGen._popBlock(baseMethod.definition); 141 lambdaGen._popBlock(baseMethod.definition);
144 } 142 }
145 143
146 final writer = new CodeWriter(); 144 final writer = new CodeWriter();
147 lambdaGen.writeDefinition(writer, node); 145 lambdaGen.writeDefinition(writer, node);
148 return new Value(baseMethod.functionType, writer.text, 146 return new Value(baseMethod.functionType, writer.text,
149 baseMethod.definition.span); 147 baseMethod.definition.span);
150 } 148 }
151 } 149 }
OLDNEW
« no previous file with comments | « dart/frog/gen.dart ('k') | dart/frog/minfrog » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698