| 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 2451 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2462 | 2462 |
| 2463 Value getValue(String name) { | 2463 Value getValue(String name) { |
| 2464 int i = getIndexOfName(name); | 2464 int i = getIndexOfName(name); |
| 2465 return i >= 0 ? values[i] : null; | 2465 return i >= 0 ? values[i] : null; |
| 2466 } | 2466 } |
| 2467 | 2467 |
| 2468 int get bareCount() { | 2468 int get bareCount() { |
| 2469 if (_bareCount == null) { | 2469 if (_bareCount == null) { |
| 2470 _bareCount = length; | 2470 _bareCount = length; |
| 2471 if (nodes != null) { | 2471 if (nodes != null) { |
| 2472 for (int i=0; i < nodes.length; i++) { | 2472 for (int i = 0; i < nodes.length; i++) { |
| 2473 if (nodes[i].label != null) { | 2473 if (nodes[i].label != null) { |
| 2474 _bareCount = i; | 2474 _bareCount = i; |
| 2475 break; | 2475 break; |
| 2476 } | 2476 } |
| 2477 } | 2477 } |
| 2478 } | 2478 } |
| 2479 } | 2479 } |
| 2480 return _bareCount; | 2480 return _bareCount; |
| 2481 } | 2481 } |
| 2482 | 2482 |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2530 result.add(new Value(world.varType, '\$$i', null, /*needsTemp:*/false)); | 2530 result.add(new Value(world.varType, '\$$i', null, /*needsTemp:*/false)); |
| 2531 } | 2531 } |
| 2532 for (int i = bareCount; i < length; i++) { | 2532 for (int i = bareCount; i < length; i++) { |
| 2533 var name = getName(i); | 2533 var name = getName(i); |
| 2534 if (name == null) name = '\$$i'; | 2534 if (name == null) name = '\$$i'; |
| 2535 result.add(new Value(world.varType, name, null, /*needsTemp:*/false)); | 2535 result.add(new Value(world.varType, name, null, /*needsTemp:*/false)); |
| 2536 } | 2536 } |
| 2537 return new Arguments(nodes, result); | 2537 return new Arguments(nodes, result); |
| 2538 } | 2538 } |
| 2539 } | 2539 } |
| OLD | NEW |