| OLD | NEW |
| 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 1795 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1806 } | 1806 } |
| 1807 return true; | 1807 return true; |
| 1808 } | 1808 } |
| 1809 Collections.filter = function(source, destination, f) { | 1809 Collections.filter = function(source, destination, f) { |
| 1810 for (var $$i = source.iterator(); $$i.hasNext$0(); ) { | 1810 for (var $$i = source.iterator(); $$i.hasNext$0(); ) { |
| 1811 var e = $$i.next$0(); | 1811 var e = $$i.next$0(); |
| 1812 if (f(e)) destination.add(e); | 1812 if (f(e)) destination.add(e); |
| 1813 } | 1813 } |
| 1814 return destination; | 1814 return destination; |
| 1815 } | 1815 } |
| 1816 // ********** Code for _Worker ************** |
| 1816 // ********** Code for top level ************** | 1817 // ********** Code for top level ************** |
| 1817 // ********** Library node ************** | 1818 // ********** Library node ************** |
| 1818 // ********** Code for Process ************** | 1819 // ********** Code for Process ************** |
| 1819 function Process(_process) { | 1820 function Process(_process) { |
| 1820 this.SIGHUP = 'SIGHUP' | 1821 this.SIGHUP = 'SIGHUP' |
| 1821 this.SIGINT = 'SIGINT' | 1822 this.SIGINT = 'SIGINT' |
| 1822 this.SIGQUIT = 'SIGQUIT' | 1823 this.SIGQUIT = 'SIGQUIT' |
| 1823 this.SIGILL = 'SIGILL' | 1824 this.SIGILL = 'SIGILL' |
| 1824 this.SIGTRAP = 'SIGTRAP' | 1825 this.SIGTRAP = 'SIGTRAP' |
| 1825 this.SIGABRT = 'SIGABRT' | 1826 this.SIGABRT = 'SIGABRT' |
| (...skipping 10979 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 12805 else if (existing != null) { | 12806 else if (existing != null) { |
| 12806 this.info(('mangling matching top level name "' + named.get$jsname() + '" in
') + ('both "' + named.get$library().get$jsname() + '" and "' + existing.get$li
brary().get$jsname() + '"')); | 12807 this.info(('mangling matching top level name "' + named.get$jsname() + '" in
') + ('both "' + named.get$library().get$jsname() + '" and "' + existing.get$li
brary().get$jsname() + '"')); |
| 12807 var existingPri = existing.get$jsnamePriority(); | 12808 var existingPri = existing.get$jsnamePriority(); |
| 12808 var namedPri = named.get$jsnamePriority(); | 12809 var namedPri = named.get$jsnamePriority(); |
| 12809 if (existingPri > namedPri || namedPri == 0) { | 12810 if (existingPri > namedPri || namedPri == 0) { |
| 12810 this._renameJavascriptTopName(named); | 12811 this._renameJavascriptTopName(named); |
| 12811 } | 12812 } |
| 12812 else if (namedPri > existingPri) { | 12813 else if (namedPri > existingPri) { |
| 12813 this._renameJavascriptTopName(existing); | 12814 this._renameJavascriptTopName(existing); |
| 12814 } | 12815 } |
| 12815 else { | 12816 else if ((!this._isDomWorker(named) || !this._isIsolateWorker(existing)) &&
(!this._isDomWorker(existing) || !this._isIsolateWorker(named))) { |
| 12816 $globals.world.internalError(('conflicting JS name "' + name + '" of same
') + ('priority ' + existingPri + ': (already defined in) ') + ('' + existing.ge
t$span().get$locationText() + ' with priority ' + namedPri + ')'), named.get$spa
n(), existing.get$span()); | 12817 $globals.world.internalError(('conflicting JS name "' + name + '" of same
') + ('priority ' + existingPri + ': (already defined in) ') + ('' + existing.ge
t$span().get$locationText() + ' with priority ' + namedPri + ')'), named.get$spa
n(), existing.get$span()); |
| 12817 } | 12818 } |
| 12818 } | 12819 } |
| 12819 else { | 12820 else { |
| 12820 this._topNames.$setindex(name, named); | 12821 this._topNames.$setindex(name, named); |
| 12821 } | 12822 } |
| 12822 } | 12823 } |
| 12824 World.prototype._isDomWorker = function(e) { |
| 12825 return $eq(e.get$library(), this.get$dom()) && e.get$nativeName() == 'Worker'; |
| 12826 } |
| 12827 World.prototype._isIsolateWorker = function(e) { |
| 12828 return $eq(e.get$library(), this.get$coreimpl()) && e.get$nativeName() == 'Wor
ker'; |
| 12829 } |
| 12823 World.prototype._renameJavascriptTopName = function(named) { | 12830 World.prototype._renameJavascriptTopName = function(named) { |
| 12824 named._jsname = ('' + named.get$library().get$jsname() + '_' + named.get$jsnam
e()); | 12831 named._jsname = ('' + named.get$library().get$jsname() + '_' + named.get$jsnam
e()); |
| 12825 var existing = this._topNames.$index(named.get$jsname()); | 12832 var existing = this._topNames.$index(named.get$jsname()); |
| 12826 if (existing != null && $ne(existing, named)) { | 12833 if (existing != null && $ne(existing, named)) { |
| 12827 $globals.world.internalError(('name mangling failed for "' + named.get$jsnam
e() + '" ') + ('("' + named.get$jsname() + '" defined also in ' + existing.get$s
pan().get$locationText() + ')'), named.get$span()); | 12834 $globals.world.internalError(('name mangling failed for "' + named.get$jsnam
e() + '" ') + ('("' + named.get$jsname() + '" defined also in ' + existing.get$s
pan().get$locationText() + ')'), named.get$span()); |
| 12828 } | 12835 } |
| 12829 this._topNames.$setindex(named.get$jsname(), named); | 12836 this._topNames.$setindex(named.get$jsname(), named); |
| 12830 } | 12837 } |
| 12831 World.prototype._addType = function(type) { | 12838 World.prototype._addType = function(type) { |
| 12832 if (!type.get$isTop()) this._addTopName(type); | 12839 if (!type.get$isTop()) this._addTopName(type); |
| (...skipping 772 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 13605 $globals._RED_COLOR = '\u001b[31m'; | 13612 $globals._RED_COLOR = '\u001b[31m'; |
| 13606 } | 13613 } |
| 13607 var const$1 = new EmptyQueueException()/*const EmptyQueueException()*/; | 13614 var const$1 = new EmptyQueueException()/*const EmptyQueueException()*/; |
| 13608 var const$126 = new IllegalAccessException()/*const IllegalAccessException()*/; | 13615 var const$126 = new IllegalAccessException()/*const IllegalAccessException()*/; |
| 13609 var const$127 = ImmutableList.ImmutableList$from$factory([])/*const []*/; | 13616 var const$127 = ImmutableList.ImmutableList$from$factory([])/*const []*/; |
| 13610 var const$2 = new _DeletedKeySentinel()/*const _DeletedKeySentinel()*/; | 13617 var const$2 = new _DeletedKeySentinel()/*const _DeletedKeySentinel()*/; |
| 13611 var const$7 = new NoMoreElementsException()/*const NoMoreElementsException()*/; | 13618 var const$7 = new NoMoreElementsException()/*const NoMoreElementsException()*/; |
| 13612 var $globals = {}; | 13619 var $globals = {}; |
| 13613 $static_init(); | 13620 $static_init(); |
| 13614 main(); | 13621 main(); |
| OLD | NEW |