Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 1852 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1863 final y = visitValue(node.y); | 1863 final y = visitValue(node.y); |
| 1864 var name = TokenKind.binaryMethodName(node.op.kind); | 1864 var name = TokenKind.binaryMethodName(node.op.kind); |
| 1865 if (node.op.kind == TokenKind.NE) { | 1865 if (node.op.kind == TokenKind.NE) { |
| 1866 name = ':ne'; | 1866 name = ':ne'; |
| 1867 } | 1867 } |
| 1868 if (name == null) { | 1868 if (name == null) { |
| 1869 world.internalError('unimplemented binary op ${node.op}', node.span); | 1869 world.internalError('unimplemented binary op ${node.op}', node.span); |
| 1870 return; | 1870 return; |
| 1871 } | 1871 } |
| 1872 return x.invoke(this, name, node, new Arguments(null, [y])); | 1872 return x.invoke(this, name, node, new Arguments(null, [y])); |
| 1873 } else { | 1873 } else if ((assignKind != 0) && (node.y is BinaryExpression)){ |
|
jimhug
2011/12/15 17:58:10
Final comment: Please add a TODO or unify with par
dgrove
2011/12/15 20:55:51
Done.
| |
| 1874 return _visitAssign(assignKind, node.x, | |
| 1875 new ParenExpression(node.y, node.y.span), node, null, isVoid); | |
| 1876 } else { | |
| 1874 return _visitAssign(assignKind, node.x, node.y, node, null, isVoid); | 1877 return _visitAssign(assignKind, node.x, node.y, node, null, isVoid); |
| 1875 } | 1878 } |
| 1876 } | 1879 } |
| 1877 | 1880 |
| 1878 /** | 1881 /** |
| 1879 * Visits an assignment expression. | 1882 * Visits an assignment expression. |
| 1880 * Note: captureOriginal can optionally capture the original value of the | 1883 * Note: captureOriginal can optionally capture the original value of the |
| 1881 * left side. This is used by postfix expressions to ensure they return the | 1884 * left side. This is used by postfix expressions to ensure they return the |
| 1882 * original value, before it has been modified. | 1885 * original value, before it has been modified. |
| 1883 */ | 1886 */ |
| (...skipping 654 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2538 result.add(new Value(world.varType, '\$$i', null, /*needsTemp:*/false)); | 2541 result.add(new Value(world.varType, '\$$i', null, /*needsTemp:*/false)); |
| 2539 } | 2542 } |
| 2540 for (int i = bareCount; i < length; i++) { | 2543 for (int i = bareCount; i < length; i++) { |
| 2541 var name = getName(i); | 2544 var name = getName(i); |
| 2542 if (name == null) name = '\$$i'; | 2545 if (name == null) name = '\$$i'; |
| 2543 result.add(new Value(world.varType, name, null, /*needsTemp:*/false)); | 2546 result.add(new Value(world.varType, name, null, /*needsTemp:*/false)); |
| 2544 } | 2547 } |
| 2545 return new Arguments(nodes, result); | 2548 return new Arguments(nodes, result); |
| 2546 } | 2549 } |
| 2547 } | 2550 } |
| OLD | NEW |