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

Unified Diff: frog/minfrog

Issue 9007053: await in frog: partial support for try-catch blocks (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: '' 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « frog/await/transformation.dart ('k') | frog/tests/await/await.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: frog/minfrog
diff --git a/frog/minfrog b/frog/minfrog
index ccb42898f86f7902570fc51f9b81490f5980cee3..a8c6090179f53dc84723541599bb7a0fdb63c6d5 100755
--- a/frog/minfrog
+++ b/frog/minfrog
@@ -12987,7 +12987,7 @@ World.prototype.resolveAll = function() {
World.prototype.get$resolveAll = function() {
return this.resolveAll.bind(this);
}
-World.prototype.generateCode = function(lib) {
+World.prototype.findMainMethod = function(lib) {
var mainMembers = lib.topType.resolveMember('main');
var main = null;
if (mainMembers == null || $eq(mainMembers.get$members().get$length(), 0)) {
@@ -13004,8 +13004,11 @@ World.prototype.generateCode = function(lib) {
else {
main = mainMembers.get$members().$index(0);
}
+ return main;
+}
+World.prototype.generateCode = function(lib) {
var codeWriter = new CodeWriter();
- this.gen = new WorldGenerator(main, codeWriter);
+ this.gen = new WorldGenerator(this.findMainMethod(lib), codeWriter);
this.gen.run();
this.jsBytesWritten = codeWriter.get$text().get$length();
}
« no previous file with comments | « frog/await/transformation.dart ('k') | frog/tests/await/await.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698