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

Side by Side Diff: frog/gen.dart

Issue 8774039: Fix for Issue 622 (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: frogsh Created 9 years 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/frogsh ('k') | frog/parser.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) 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 /** 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 1820 matching lines...) Expand 10 before | Expand all | Expand 10 after
1831 } 1831 }
1832 1832
1833 // TODO(jimhug): The usual battle with making assign impl not look ugly. 1833 // TODO(jimhug): The usual battle with making assign impl not look ugly.
1834 if (xn is VarExpression) { 1834 if (xn is VarExpression) {
1835 return _visitVarAssign(kind, xn, yn, position, captureOriginal); 1835 return _visitVarAssign(kind, xn, yn, position, captureOriginal);
1836 } else if (xn is IndexExpression) { 1836 } else if (xn is IndexExpression) {
1837 return _visitIndexAssign(kind, xn, yn, position, captureOriginal); 1837 return _visitIndexAssign(kind, xn, yn, position, captureOriginal);
1838 } else if (xn is DotExpression) { 1838 } else if (xn is DotExpression) {
1839 return _visitDotAssign(kind, xn, yn, position, captureOriginal); 1839 return _visitDotAssign(kind, xn, yn, position, captureOriginal);
1840 } else { 1840 } else {
1841 world.error('illegal lhs', position.span); 1841 world.error('illegal lhs', xn.span);
1842 } 1842 }
1843 } 1843 }
1844 1844
1845 // TODO(jmesserly): it'd be nice if we didn't have to deal directly with 1845 // TODO(jmesserly): it'd be nice if we didn't have to deal directly with
1846 // MemberSets here and in visitVarExpression. 1846 // MemberSets here and in visitVarExpression.
1847 _visitVarAssign(int kind, VarExpression xn, Expression yn, Node position, 1847 _visitVarAssign(int kind, VarExpression xn, Expression yn, Node position,
1848 Value captureOriginal(Value right)) { 1848 Value captureOriginal(Value right)) {
1849 final name = xn.name.name; 1849 final name = xn.name.name;
1850 1850
1851 // First check in block scopes. 1851 // First check in block scopes.
(...skipping 594 matching lines...) Expand 10 before | Expand all | Expand 10 after
2446 result.add(new Value(world.varType, '\$$i', null, /*needsTemp:*/false)); 2446 result.add(new Value(world.varType, '\$$i', null, /*needsTemp:*/false));
2447 } 2447 }
2448 for (int i = bareCount; i < length; i++) { 2448 for (int i = bareCount; i < length; i++) {
2449 var name = getName(i); 2449 var name = getName(i);
2450 if (name == null) name = '\$$i'; 2450 if (name == null) name = '\$$i';
2451 result.add(new Value(world.varType, name, null, /*needsTemp:*/false)); 2451 result.add(new Value(world.varType, name, null, /*needsTemp:*/false));
2452 } 2452 }
2453 return new Arguments(nodes, result); 2453 return new Arguments(nodes, result);
2454 } 2454 }
2455 } 2455 }
OLDNEW
« no previous file with comments | « frog/frogsh ('k') | frog/parser.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698