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

Side by Side Diff: dart/frog/gen.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/analyze.dart ('k') | dart/frog/method_data.dart » ('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 * Top level generator object for writing code and keeping track of 6 * Top level generator object for writing code and keeping track of
7 * dependencies. 7 * dependencies.
8 * 8 *
9 * Should have two compilation models, but only one implemented so far. 9 * Should have two compilation models, but only one implemented so far.
10 * 10 *
(...skipping 981 matching lines...) Expand 10 before | Expand all | Expand 10 after
992 Value currentArg = null; 992 Value currentArg = null;
993 if (i < args.bareCount) { 993 if (i < args.bareCount) {
994 currentArg = args.values[i]; 994 currentArg = args.values[i];
995 } else { 995 } else {
996 // Handle named or missing arguments 996 // Handle named or missing arguments
997 currentArg = args.getValue(p.name); 997 currentArg = args.getValue(p.name);
998 if (currentArg === null) { 998 if (currentArg === null) {
999 // Ensure default value for param has been generated 999 // Ensure default value for param has been generated
1000 p.genValue(method, this); 1000 p.genValue(method, this);
1001 currentArg = p.value; 1001 currentArg = p.value;
1002 if (currentArg == null) {
1003 // Not enough arguments, we'll get an error later.
1004 return;
1005 }
1002 } 1006 }
1003 } 1007 }
1004 1008
1005 if (p.isInitializer) { 1009 if (p.isInitializer) {
1006 _paramCode.add(p.name); 1010 _paramCode.add(p.name);
1007 fieldsSet = true; 1011 fieldsSet = true;
1008 _initField(newObject, p.name, currentArg, p.definition.span); 1012 _initField(newObject, p.name, currentArg, p.definition.span);
1009 } else { 1013 } else {
1010 var paramValue = _scope.declareParameter(p); 1014 var paramValue = _scope.declareParameter(p);
1011 _paramCode.add(paramValue.code); 1015 _paramCode.add(paramValue.code);
(...skipping 1428 matching lines...) Expand 10 before | Expand all | Expand 10 after
2440 return true; 2444 return true;
2441 } 2445 }
2442 2446
2443 } 2447 }
2444 2448
2445 class ReturnKind { 2449 class ReturnKind {
2446 static final int IGNORE = 1; 2450 static final int IGNORE = 1;
2447 static final int POST = 2; 2451 static final int POST = 2;
2448 static final int PRE = 3; 2452 static final int PRE = 3;
2449 } 2453 }
OLDNEW
« no previous file with comments | « dart/frog/analyze.dart ('k') | dart/frog/method_data.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698