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

Side by Side 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 8 years, 11 months 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/await/transformation.dart ('k') | frog/tests/await/await.status » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env node 1 #!/usr/bin/env node
2 // ********** Library dart:core ************** 2 // ********** Library dart:core **************
3 // ********** Natives dart:core ************** 3 // ********** Natives dart:core **************
4 /** 4 /**
5 * Generates a dynamic call stub for a function. 5 * Generates a dynamic call stub for a function.
6 * Our goal is to create a stub method like this on-the-fly: 6 * Our goal is to create a stub method like this on-the-fly:
7 * function($0, $1, capture) { return this($0, $1, true, capture); } 7 * function($0, $1, capture) { return this($0, $1, true, capture); }
8 * 8 *
9 * This stub then replaces the dynamic one on Function, with one that is 9 * This stub then replaces the dynamic one on Function, with one that is
10 * specialized for that particular function, taking into account its default 10 * specialized for that particular function, taking into account its default
(...skipping 12969 matching lines...) Expand 10 before | Expand all | Expand 10 after
12980 World.prototype.resolveAll = function() { 12980 World.prototype.resolveAll = function() {
12981 var $$list = this.libraries.getValues(); 12981 var $$list = this.libraries.getValues();
12982 for (var $$i = this.libraries.getValues().iterator$0(); $$i.hasNext$0(); ) { 12982 for (var $$i = this.libraries.getValues().iterator$0(); $$i.hasNext$0(); ) {
12983 var lib = $$i.next$0(); 12983 var lib = $$i.next$0();
12984 lib.resolve$0(); 12984 lib.resolve$0();
12985 } 12985 }
12986 } 12986 }
12987 World.prototype.get$resolveAll = function() { 12987 World.prototype.get$resolveAll = function() {
12988 return this.resolveAll.bind(this); 12988 return this.resolveAll.bind(this);
12989 } 12989 }
12990 World.prototype.generateCode = function(lib) { 12990 World.prototype.findMainMethod = function(lib) {
12991 var mainMembers = lib.topType.resolveMember('main'); 12991 var mainMembers = lib.topType.resolveMember('main');
12992 var main = null; 12992 var main = null;
12993 if (mainMembers == null || $eq(mainMembers.get$members().get$length(), 0)) { 12993 if (mainMembers == null || $eq(mainMembers.get$members().get$length(), 0)) {
12994 this.fatal('no main method specified'); 12994 this.fatal('no main method specified');
12995 } 12995 }
12996 else if (mainMembers.get$members().get$length() > 1) { 12996 else if (mainMembers.get$members().get$length() > 1) {
12997 var $$list = mainMembers.get$members(); 12997 var $$list = mainMembers.get$members();
12998 for (var $$i = mainMembers.get$members().iterator$0(); $$i.hasNext$0(); ) { 12998 for (var $$i = mainMembers.get$members().iterator$0(); $$i.hasNext$0(); ) {
12999 var m = $$i.next$0(); 12999 var m = $$i.next$0();
13000 main = m; 13000 main = m;
13001 this.error('more than one main member (using last?)', main.get$span()); 13001 this.error('more than one main member (using last?)', main.get$span());
13002 } 13002 }
13003 } 13003 }
13004 else { 13004 else {
13005 main = mainMembers.get$members().$index(0); 13005 main = mainMembers.get$members().$index(0);
13006 } 13006 }
13007 return main;
13008 }
13009 World.prototype.generateCode = function(lib) {
13007 var codeWriter = new CodeWriter(); 13010 var codeWriter = new CodeWriter();
13008 this.gen = new WorldGenerator(main, codeWriter); 13011 this.gen = new WorldGenerator(this.findMainMethod(lib), codeWriter);
13009 this.gen.run(); 13012 this.gen.run();
13010 this.jsBytesWritten = codeWriter.get$text().get$length(); 13013 this.jsBytesWritten = codeWriter.get$text().get$length();
13011 } 13014 }
13012 World.prototype._message = function(color, prefix, message, span, span1, span2, throwing) { 13015 World.prototype._message = function(color, prefix, message, span, span1, span2, throwing) {
13013 if (this.messageHandler != null) { 13016 if (this.messageHandler != null) {
13014 this.messageHandler(prefix, message, span); 13017 this.messageHandler(prefix, message, span);
13015 if (span1 != null) { 13018 if (span1 != null) {
13016 this.messageHandler(prefix, message, span1); 13019 this.messageHandler(prefix, message, span1);
13017 } 13020 }
13018 if (span2 != null) { 13021 if (span2 != null) {
(...skipping 599 matching lines...) Expand 10 before | Expand all | Expand 10 after
13618 $globals._RED_COLOR = '\u001b[31m'; 13621 $globals._RED_COLOR = '\u001b[31m';
13619 } 13622 }
13620 var const$1 = new EmptyQueueException()/*const EmptyQueueException()*/; 13623 var const$1 = new EmptyQueueException()/*const EmptyQueueException()*/;
13621 var const$126 = new IllegalAccessException()/*const IllegalAccessException()*/; 13624 var const$126 = new IllegalAccessException()/*const IllegalAccessException()*/;
13622 var const$127 = ImmutableList.ImmutableList$from$factory([])/*const []*/; 13625 var const$127 = ImmutableList.ImmutableList$from$factory([])/*const []*/;
13623 var const$2 = new _DeletedKeySentinel()/*const _DeletedKeySentinel()*/; 13626 var const$2 = new _DeletedKeySentinel()/*const _DeletedKeySentinel()*/;
13624 var const$7 = new NoMoreElementsException()/*const NoMoreElementsException()*/; 13627 var const$7 = new NoMoreElementsException()/*const NoMoreElementsException()*/;
13625 var $globals = {}; 13628 var $globals = {};
13626 $static_init(); 13629 $static_init();
13627 main(); 13630 main();
OLDNEW
« 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