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

Side by Side Diff: frog/gen.dart

Issue 8618004: Fix Swarm to run again, and enable its test (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 9 years, 1 month 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
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 430 matching lines...) Expand 10 before | Expand all | Expand 10 after
441 } 441 }
442 } 442 }
443 writer.exitBlock('}'); 443 writer.exitBlock('}');
444 444
445 // Keep const expressions shared across isolates. Note that the frog 445 // Keep const expressions shared across isolates. Note that the frog
446 // isolate library needs this because we wrote it's bootstrap and 446 // isolate library needs this because we wrote it's bootstrap and
447 // book-keeping directly in Dart. Specifically, that code uses 447 // book-keeping directly in Dart. Specifically, that code uses
448 // [HashMapImplementation] which internally uses a constant expression. 448 // [HashMapImplementation] which internally uses a constant expression.
449 for (var global in list) { 449 for (var global in list) {
450 if (global.field == null) { 450 if (global.field == null) {
451 writer.writeln('${global.name} = ${global.exp.code};'); 451 writer.writeln('var ${global.name} = ${global.exp.code};');
452 } 452 }
453 } 453 }
454 } 454 }
455 455
456 if (!corejs.useIsolates) { 456 if (!corejs.useIsolates) {
457 if (hasStatics) { 457 if (hasStatics) {
458 writer.writeln('var \$globals = {};'); 458 writer.writeln('var \$globals = {};');
459 } 459 }
460 if (globals.length > 0) { 460 if (globals.length > 0) {
461 writer.writeln('\$static_init();'); 461 writer.writeln('\$static_init();');
(...skipping 1928 matching lines...) Expand 10 before | Expand all | Expand 10 after
2390 result.add(new Value(world.varType, '\$$i', null, /*needsTemp:*/false)); 2390 result.add(new Value(world.varType, '\$$i', null, /*needsTemp:*/false));
2391 } 2391 }
2392 for (int i = bareCount; i < length; i++) { 2392 for (int i = bareCount; i < length; i++) {
2393 var name = getName(i); 2393 var name = getName(i);
2394 if (name == null) name = '\$$i'; 2394 if (name == null) name = '\$$i';
2395 result.add(new Value(world.varType, name, null, /*needsTemp:*/false)); 2395 result.add(new Value(world.varType, name, null, /*needsTemp:*/false));
2396 } 2396 }
2397 return new Arguments(nodes, result); 2397 return new Arguments(nodes, result);
2398 } 2398 }
2399 } 2399 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698