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

Side by Side Diff: lib/runtime/dart/_js_helper.js

Issue 1133593004: fixes #131, use before define from variables to classes (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 5 years, 7 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
« no previous file with comments | « lib/runtime/dart/_isolate_helper.js ('k') | lib/runtime/dart/_native_typed_data.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 var _js_helper = dart.defineLibrary(_js_helper, {}); 1 var _js_helper = dart.defineLibrary(_js_helper, {});
2 var core = dart.import(core); 2 var core = dart.import(core);
3 var collection = dart.import(collection); 3 var collection = dart.import(collection);
4 var _internal = dart.import(_internal); 4 var _internal = dart.import(_internal);
5 var _foreign_helper = dart.import(_foreign_helper); 5 var _foreign_helper = dart.import(_foreign_helper);
6 var _js_embedded_names = dart.import(_js_embedded_names); 6 var _js_embedded_names = dart.import(_js_embedded_names);
7 var _interceptors = dart.lazyImport(_interceptors); 7 var _interceptors = dart.lazyImport(_interceptors);
8 var _js_names = dart.import(_js_names); 8 var _js_names = dart.import(_js_names);
9 var async = dart.import(async); 9 var async = dart.import(async);
10 var _isolate_helper = dart.lazyImport(_isolate_helper); 10 var _isolate_helper = dart.lazyImport(_isolate_helper);
(...skipping 3705 matching lines...) Expand 10 before | Expand all | Expand 10 after
3716 } 3716 }
3717 // Function jsonEncodeNative: (String) → String 3717 // Function jsonEncodeNative: (String) → String
3718 function jsonEncodeNative(string) { 3718 function jsonEncodeNative(string) {
3719 return JSON.stringify(string); 3719 return JSON.stringify(string);
3720 } 3720 }
3721 // Function getIsolateAffinityTag: (String) → String 3721 // Function getIsolateAffinityTag: (String) → String
3722 function getIsolateAffinityTag(name) { 3722 function getIsolateAffinityTag(name) {
3723 let isolateTagGetter = _foreign_helper.JS_EMBEDDED_GLOBAL('', _js_embedded_n ames.GET_ISOLATE_TAG); 3723 let isolateTagGetter = _foreign_helper.JS_EMBEDDED_GLOBAL('', _js_embedded_n ames.GET_ISOLATE_TAG);
3724 return isolateTagGetter(name); 3724 return isolateTagGetter(name);
3725 } 3725 }
3726 let LoadLibraryFunctionType = dart.typedef('LoadLibraryFunctionType', () => da rt.functionType(async.Future$(core.Null), [])); 3726 let LoadLibraryFunctionType = dart.typedef('LoadLibraryFunctionType', dart.fun ctionType(async.Future$(core.Null), []));
3727 // Function _loadLibraryWrapper: (String) → () → Future<Null> 3727 // Function _loadLibraryWrapper: (String) → () → Future<Null>
3728 function _loadLibraryWrapper(loadId) { 3728 function _loadLibraryWrapper(loadId) {
3729 return () => loadDeferredLibrary(loadId); 3729 return () => loadDeferredLibrary(loadId);
3730 } 3730 }
3731 dart.defineLazyProperties(exports, { 3731 dart.defineLazyProperties(exports, {
3732 get _loadingLibraries() { 3732 get _loadingLibraries() {
3733 return dart.map(); 3733 return dart.map();
3734 }, 3734 },
3735 get _loadedLibraries() { 3735 get _loadedLibraries() {
3736 return new (core.Set$(core.String))(); 3736 return new (core.Set$(core.String))();
3737 } 3737 }
3738 }); 3738 });
3739 let DeferredLoadCallback = dart.typedef('DeferredLoadCallback', () => dart.fun ctionType(dart.void, [])); 3739 let DeferredLoadCallback = dart.typedef('DeferredLoadCallback', dart.functionT ype(dart.void, []));
3740 exports.deferredLoadHook = null; 3740 exports.deferredLoadHook = null;
3741 // Function loadDeferredLibrary: (String) → Future<Null> 3741 // Function loadDeferredLibrary: (String) → Future<Null>
3742 function loadDeferredLibrary(loadId) { 3742 function loadDeferredLibrary(loadId) {
3743 let urisMap = _foreign_helper.JS_EMBEDDED_GLOBAL('', _js_embedded_names.DEFE RRED_LIBRARY_URIS); 3743 let urisMap = _foreign_helper.JS_EMBEDDED_GLOBAL('', _js_embedded_names.DEFE RRED_LIBRARY_URIS);
3744 let uris = dart.as(urisMap[loadId], core.List$(core.String)); 3744 let uris = dart.as(urisMap[loadId], core.List$(core.String));
3745 let hashesMap = _foreign_helper.JS_EMBEDDED_GLOBAL('', _js_embedded_names.DE FERRED_LIBRARY_HASHES); 3745 let hashesMap = _foreign_helper.JS_EMBEDDED_GLOBAL('', _js_embedded_names.DE FERRED_LIBRARY_HASHES);
3746 let hashes = dart.as(hashesMap[loadId], core.List$(core.String)); 3746 let hashes = dart.as(hashesMap[loadId], core.List$(core.String));
3747 if (uris == null) 3747 if (uris == null)
3748 return new (async.Future$(core.Null)).value(null); 3748 return new (async.Future$(core.Null)).value(null);
3749 let indices = new (core.List$(core.int)).generate(uris[core.$length], i => d art.as(i, core.int)); 3749 let indices = new (core.List$(core.int)).generate(uris[core.$length], i => d art.as(i, core.int));
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
3848 throw new MainError("No top-level function named 'main'."); 3848 throw new MainError("No top-level function named 'main'.");
3849 } 3849 }
3850 // Function badMain: () → void 3850 // Function badMain: () → void
3851 function badMain() { 3851 function badMain() {
3852 throw new MainError("'main' is not a function."); 3852 throw new MainError("'main' is not a function.");
3853 } 3853 }
3854 // Function mainHasTooManyParameters: () → void 3854 // Function mainHasTooManyParameters: () → void
3855 function mainHasTooManyParameters() { 3855 function mainHasTooManyParameters() {
3856 throw new MainError("'main' expects too many parameters."); 3856 throw new MainError("'main' expects too many parameters.");
3857 } 3857 }
3858 let __CastType0 = dart.typedef('__CastType0', () => dart.functionType(core.int , [core.String])); 3858 let __CastType0 = dart.typedef('__CastType0', dart.functionType(core.int, [cor e.String]));
3859 let __CastType2 = dart.typedef('__CastType2', () => dart.functionType(core.dou ble, [core.String])); 3859 let __CastType2 = dart.typedef('__CastType2', dart.functionType(core.double, [ core.String]));
3860 // Exports: 3860 // Exports:
3861 exports.NoSideEffects = NoSideEffects; 3861 exports.NoSideEffects = NoSideEffects;
3862 exports.NoThrows = NoThrows; 3862 exports.NoThrows = NoThrows;
3863 exports.NoInline = NoInline; 3863 exports.NoInline = NoInline;
3864 exports.IrRepresentation = IrRepresentation; 3864 exports.IrRepresentation = IrRepresentation;
3865 exports.Native = Native; 3865 exports.Native = Native;
3866 exports.ConstantMap$ = ConstantMap$; 3866 exports.ConstantMap$ = ConstantMap$;
3867 exports.ConstantMap = ConstantMap; 3867 exports.ConstantMap = ConstantMap;
3868 exports.ConstantStringMap$ = ConstantStringMap$; 3868 exports.ConstantStringMap$ = ConstantStringMap$;
3869 exports.ConstantStringMap = ConstantStringMap; 3869 exports.ConstantStringMap = ConstantStringMap;
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
4083 exports.jsonEncodeNative = jsonEncodeNative; 4083 exports.jsonEncodeNative = jsonEncodeNative;
4084 exports.getIsolateAffinityTag = getIsolateAffinityTag; 4084 exports.getIsolateAffinityTag = getIsolateAffinityTag;
4085 exports.LoadLibraryFunctionType = LoadLibraryFunctionType; 4085 exports.LoadLibraryFunctionType = LoadLibraryFunctionType;
4086 exports.DeferredLoadCallback = DeferredLoadCallback; 4086 exports.DeferredLoadCallback = DeferredLoadCallback;
4087 exports.loadDeferredLibrary = loadDeferredLibrary; 4087 exports.loadDeferredLibrary = loadDeferredLibrary;
4088 exports.MainError = MainError; 4088 exports.MainError = MainError;
4089 exports.missingMain = missingMain; 4089 exports.missingMain = missingMain;
4090 exports.badMain = badMain; 4090 exports.badMain = badMain;
4091 exports.mainHasTooManyParameters = mainHasTooManyParameters; 4091 exports.mainHasTooManyParameters = mainHasTooManyParameters;
4092 })(_js_helper, core, collection, _internal, _foreign_helper, _js_embedded_names, _interceptors, _js_names, async, _isolate_helper); 4092 })(_js_helper, core, collection, _internal, _foreign_helper, _js_embedded_names, _interceptors, _js_names, async, _isolate_helper);
OLDNEW
« no previous file with comments | « lib/runtime/dart/_isolate_helper.js ('k') | lib/runtime/dart/_native_typed_data.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698