| OLD | NEW |
| 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 * A simple code analyzer for Dart. | 6 * A simple code analyzer for Dart. |
| 7 * | 7 * |
| 8 * Currently used to ensure all concrete generic types are visited. | 8 * Currently used to ensure all concrete generic types are visited. |
| 9 * Also performs all static type checks - so these don't need to be | 9 * Also performs all static type checks - so these don't need to be |
| 10 * done in later phases. | 10 * done in later phases. |
| (...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 157 // TODO(jimhug): Move this into parser? | 157 // TODO(jimhug): Move this into parser? |
| 158 world.error('bare argument cannot follow named arguments', arg.span); | 158 world.error('bare argument cannot follow named arguments', arg.span); |
| 159 } | 159 } |
| 160 args.add(visitValue(arg.value)); | 160 args.add(visitValue(arg.value)); |
| 161 } | 161 } |
| 162 | 162 |
| 163 return new Arguments(arguments, args); | 163 return new Arguments(arguments, args); |
| 164 } | 164 } |
| 165 | 165 |
| 166 MethodMember _makeLambdaMethod(String name, FunctionDefinition func) { | 166 MethodMember _makeLambdaMethod(String name, FunctionDefinition func) { |
| 167 var meth = new MethodMember(name, method.declaringType, func); | 167 var meth = new MethodMember.lambda(name, method.declaringType, func); |
| 168 meth.isLambda = true; | |
| 169 meth.enclosingElement = method; | 168 meth.enclosingElement = method; |
| 170 meth._methodData = new MethodData(meth, _frame); | 169 meth._methodData = new MethodData(meth, _frame); |
| 171 meth.resolve(); | 170 meth.resolve(); |
| 172 return meth; | 171 return meth; |
| 173 } | 172 } |
| 174 | 173 |
| 175 void _pushBlock(Node node) { | 174 void _pushBlock(Node node) { |
| 176 _frame.pushBlock(node); | 175 _frame.pushBlock(node); |
| 177 } | 176 } |
| 178 void _popBlock(Node node) { | 177 void _popBlock(Node node) { |
| (...skipping 607 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 786 for (var item in node.pieces) { | 785 for (var item in node.pieces) { |
| 787 var val = visitValue(item); | 786 var val = visitValue(item); |
| 788 var sval = val.invoke(_frame, 'toString', item, Arguments.EMPTY); | 787 var sval = val.invoke(_frame, 'toString', item, Arguments.EMPTY); |
| 789 ret = ret.binop(TokenKind.ADD, sval, _frame, item); | 788 ret = ret.binop(TokenKind.ADD, sval, _frame, item); |
| 790 } | 789 } |
| 791 return _frame._makeValue(world.stringType, node); //???ret; | 790 return _frame._makeValue(world.stringType, node); //???ret; |
| 792 */ | 791 */ |
| 793 } | 792 } |
| 794 } | 793 } |
| 795 | 794 |
| OLD | NEW |