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

Side by Side Diff: lib/runtime/dart/_isolate_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/_internal.js ('k') | lib/runtime/dart/_js_helper.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 _isolate_helper = dart.defineLibrary(_isolate_helper, {}); 1 var _isolate_helper = dart.defineLibrary(_isolate_helper, {});
2 var core = dart.import(core); 2 var core = dart.import(core);
3 var _native_typed_data = dart.import(_native_typed_data); 3 var _native_typed_data = dart.import(_native_typed_data);
4 var _interceptors = dart.lazyImport(_interceptors); 4 var _interceptors = dart.lazyImport(_interceptors);
5 var _js_helper = dart.lazyImport(_js_helper); 5 var _js_helper = dart.lazyImport(_js_helper);
6 var isolate = dart.import(isolate); 6 var isolate = dart.import(isolate);
7 var _foreign_helper = dart.import(_foreign_helper); 7 var _foreign_helper = dart.import(_foreign_helper);
8 var _js_embedded_names = dart.import(_js_embedded_names); 8 var _js_embedded_names = dart.import(_js_embedded_names);
9 var collection = dart.import(collection); 9 var collection = dart.import(collection);
10 var async = dart.import(async); 10 var async = dart.import(async);
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after
349 let classId = dart.as(dart.dindex(x, 1), core.String); 349 let classId = dart.as(dart.dindex(x, 1), core.String);
350 let fields = dart.as(dart.dindex(x, 2), core.List); 350 let fields = dart.as(dart.dindex(x, 2), core.List);
351 let instanceFromClassId = _foreign_helper.JS_EMBEDDED_GLOBAL('', _js_embed ded_names.INSTANCE_FROM_CLASS_ID); 351 let instanceFromClassId = _foreign_helper.JS_EMBEDDED_GLOBAL('', _js_embed ded_names.INSTANCE_FROM_CLASS_ID);
352 let initializeObject = _foreign_helper.JS_EMBEDDED_GLOBAL('', _js_embedded _names.INITIALIZE_EMPTY_INSTANCE); 352 let initializeObject = _foreign_helper.JS_EMBEDDED_GLOBAL('', _js_embedded _names.INITIALIZE_EMPTY_INSTANCE);
353 let emptyInstance = instanceFromClassId(classId); 353 let emptyInstance = instanceFromClassId(classId);
354 this.deserializedObjects[core.$add](emptyInstance); 354 this.deserializedObjects[core.$add](emptyInstance);
355 this.deserializeArrayInPlace(dart.as(fields, _interceptors.JSArray)); 355 this.deserializeArrayInPlace(dart.as(fields, _interceptors.JSArray));
356 return initializeObject(classId, emptyInstance, fields); 356 return initializeObject(classId, emptyInstance, fields);
357 } 357 }
358 } 358 }
359 let __CastType0 = dart.typedef('__CastType0', () => dart.functionType(dart.dyn amic, [dart.dynamic])); 359 let __CastType0 = dart.typedef('__CastType0', dart.functionType(dart.dynamic, [dart.dynamic]));
360 // Function _callInIsolate: (_IsolateContext, Function) → dynamic 360 // Function _callInIsolate: (_IsolateContext, Function) → dynamic
361 function _callInIsolate(isolate, func) { 361 function _callInIsolate(isolate, func) {
362 let result = isolate.eval(func); 362 let result = isolate.eval(func);
363 exports._globalState.topEventLoop.run(); 363 exports._globalState.topEventLoop.run();
364 return result; 364 return result;
365 } 365 }
366 let _activeJsAsyncCount = Symbol('_activeJsAsyncCount'); 366 let _activeJsAsyncCount = Symbol('_activeJsAsyncCount');
367 // Function enterJsAsync: () → dynamic 367 // Function enterJsAsync: () → dynamic
368 function enterJsAsync() { 368 function enterJsAsync() {
369 let o = exports._globalState.topEventLoop; 369 let o = exports._globalState.topEventLoop;
(...skipping 463 matching lines...) Expand 10 before | Expand all | Expand 10 after
833 }, 833 },
834 get globalWorker() { 834 get globalWorker() {
835 _js_helper.requiresPreamble(); 835 _js_helper.requiresPreamble();
836 return self.Worker; 836 return self.Worker;
837 }, 837 },
838 get globalPostMessageDefined() { 838 get globalPostMessageDefined() {
839 _js_helper.requiresPreamble(); 839 _js_helper.requiresPreamble();
840 return !!self.postMessage; 840 return !!self.postMessage;
841 } 841 }
842 }); 842 });
843 let _MainFunction = dart.typedef('_MainFunction', () => dart.functionType(dart .dynamic, [])); 843 let _MainFunction = dart.typedef('_MainFunction', dart.functionType(dart.dynam ic, []));
844 let _MainFunctionArgs = dart.typedef('_MainFunctionArgs', () => dart.functionT ype(dart.dynamic, [dart.dynamic])); 844 let _MainFunctionArgs = dart.typedef('_MainFunctionArgs', dart.functionType(da rt.dynamic, [dart.dynamic]));
845 let _MainFunctionArgsMessage = dart.typedef('_MainFunctionArgsMessage', () => dart.functionType(dart.dynamic, [dart.dynamic, dart.dynamic])); 845 let _MainFunctionArgsMessage = dart.typedef('_MainFunctionArgsMessage', dart.f unctionType(dart.dynamic, [dart.dynamic, dart.dynamic]));
846 class IsolateNatives extends core.Object { 846 class IsolateNatives extends core.Object {
847 static computeThisScript() { 847 static computeThisScript() {
848 let currentScript = _foreign_helper.JS_EMBEDDED_GLOBAL('', _js_embedded_na mes.CURRENT_SCRIPT); 848 let currentScript = _foreign_helper.JS_EMBEDDED_GLOBAL('', _js_embedded_na mes.CURRENT_SCRIPT);
849 if (currentScript != null) { 849 if (currentScript != null) {
850 return String(currentScript.src); 850 return String(currentScript.src);
851 } 851 }
852 if (_js_helper.Primitives.isD8) 852 if (_js_helper.Primitives.isD8)
853 return IsolateNatives.computeThisScriptD8(); 853 return IsolateNatives.computeThisScriptD8();
854 if (_js_helper.Primitives.isJsshell) 854 if (_js_helper.Primitives.isJsshell)
855 return IsolateNatives.computeThisScriptJsshell(); 855 return IsolateNatives.computeThisScriptJsshell();
(...skipping 531 matching lines...) Expand 10 before | Expand all | Expand 10 after
1387 exports.leaveJsAsync = leaveJsAsync; 1387 exports.leaveJsAsync = leaveJsAsync;
1388 exports.isWorker = isWorker; 1388 exports.isWorker = isWorker;
1389 exports.startRootIsolate = startRootIsolate; 1389 exports.startRootIsolate = startRootIsolate;
1390 exports.IsolateNatives = IsolateNatives; 1390 exports.IsolateNatives = IsolateNatives;
1391 exports.RawReceivePortImpl = RawReceivePortImpl; 1391 exports.RawReceivePortImpl = RawReceivePortImpl;
1392 exports.ReceivePortImpl = ReceivePortImpl; 1392 exports.ReceivePortImpl = ReceivePortImpl;
1393 exports.TimerImpl = TimerImpl; 1393 exports.TimerImpl = TimerImpl;
1394 exports.hasTimer = hasTimer; 1394 exports.hasTimer = hasTimer;
1395 exports.CapabilityImpl = CapabilityImpl; 1395 exports.CapabilityImpl = CapabilityImpl;
1396 })(_isolate_helper, core, _native_typed_data, _interceptors, _js_helper, isolate , _foreign_helper, _js_embedded_names, collection, async); 1396 })(_isolate_helper, core, _native_typed_data, _interceptors, _js_helper, isolate , _foreign_helper, _js_embedded_names, collection, async);
OLDNEW
« no previous file with comments | « lib/runtime/dart/_internal.js ('k') | lib/runtime/dart/_js_helper.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698