@@ -33,7 +33,7 @@ var async = dart.import(async);
33
33
class _Serializer extends core . Object {
34
34
_Serializer ( opts ) {
35
35
let serializeSendPorts = opts && 'serializeSendPorts' in opts ? opts . serializeSendPorts : true ;
36
- this . serializedObjectIds = new ( core . Map$ ( core . Object , core . int ) ) . identity ( ) ;
36
+ this . serializedObjectIds = core . Map$ ( core . Object , core . int ) . identity ( ) ;
37
37
this [ _serializeSendPorts ] = dart . as ( serializeSendPorts , core . bool ) ;
38
38
}
39
39
serialize ( x ) {
@@ -190,7 +190,7 @@ var async = dart.import(async);
190
190
class _Deserializer extends core . Object {
191
191
_Deserializer ( opts ) {
192
192
let adjustSendPorts = opts && 'adjustSendPorts' in opts ? opts . adjustSendPorts : true ;
193
- this . deserializedObjects = new core . List ( ) ;
193
+ this . deserializedObjects = core . List . new ( ) ;
194
194
this [ _adjustSendPorts ] = dart . as ( adjustSendPorts , core . bool ) ;
195
195
}
196
196
deserialize ( x ) {
@@ -290,13 +290,13 @@ var async = dart.import(async);
290
290
dart . assert ( dart . equals ( dart . dindex ( x , 0 ) , 'fixed' ) ) ;
291
291
let result = dart . as ( dart . dindex ( x , 1 ) , core . List ) ;
292
292
this . deserializedObjects [ core . $add ] ( result ) ;
293
- return new _interceptors . JSArray . markFixed ( this . deserializeArrayInPlace ( dart . as ( result , _interceptors . JSArray ) ) ) ;
293
+ return _interceptors . JSArray . markFixed ( this . deserializeArrayInPlace ( dart . as ( result , _interceptors . JSArray ) ) ) ;
294
294
}
295
295
deserializeExtendable ( x ) {
296
296
dart . assert ( dart . equals ( dart . dindex ( x , 0 ) , 'extendable' ) ) ;
297
297
let result = dart . as ( dart . dindex ( x , 1 ) , core . List ) ;
298
298
this . deserializedObjects [ core . $add ] ( result ) ;
299
- return new _interceptors . JSArray . markGrowable ( this . deserializeArrayInPlace ( dart . as ( result , _interceptors . JSArray ) ) ) ;
299
+ return _interceptors . JSArray . markGrowable ( this . deserializeArrayInPlace ( dart . as ( result , _interceptors . JSArray ) ) ) ;
300
300
}
301
301
deserializeMutable ( x ) {
302
302
dart . assert ( dart . equals ( dart . dindex ( x , 0 ) , 'mutable' ) ) ;
@@ -308,7 +308,7 @@ var async = dart.import(async);
308
308
dart . assert ( dart . equals ( dart . dindex ( x , 0 ) , 'const' ) ) ;
309
309
let result = dart . as ( dart . dindex ( x , 1 ) , core . List ) ;
310
310
this . deserializedObjects [ core . $add ] ( result ) ;
311
- return new _interceptors . JSArray . markFixed ( this . deserializeArrayInPlace ( dart . as ( result , _interceptors . JSArray ) ) ) ;
311
+ return _interceptors . JSArray . markFixed ( this . deserializeArrayInPlace ( dart . as ( result , _interceptors . JSArray ) ) ) ;
312
312
}
313
313
deserializeMap ( x ) {
314
314
dart . assert ( dart . equals ( dart . dindex ( x , 0 ) , 'map' ) ) ;
@@ -484,8 +484,8 @@ var async = dart.import(async);
484
484
this . managers = null ;
485
485
this [ _nativeDetectEnvironment ] ( ) ;
486
486
this . topEventLoop = new _EventLoop ( ) ;
487
- this . isolates = new ( core . Map$ ( core . int , _IsolateContext ) ) ( ) ;
488
- this . managers = new ( core . Map$ ( core . int , core . Object ) ) ( ) ;
487
+ this . isolates = core . Map$ ( core . int , _IsolateContext ) . new ( ) ;
488
+ this . managers = core . Map$ ( core . int , core . Object ) . new ( ) ;
489
489
if ( this . isWorker ) {
490
490
this . mainManager = new _MainManagerStub ( ) ;
491
491
this [ _nativeInitWorkerMessageHandler ] ( ) ;
@@ -547,15 +547,15 @@ var async = dart.import(async);
547
547
o . nextIsolateId = dart . notNull ( x ) + 1 ;
548
548
return x ;
549
549
} ) ( ) ;
550
- this . ports = new ( core . Map$ ( core . int , RawReceivePortImpl ) ) ( ) ;
551
- this . weakPorts = new ( core . Set$ ( core . int ) ) ( ) ;
550
+ this . ports = core . Map$ ( core . int , RawReceivePortImpl ) . new ( ) ;
551
+ this . weakPorts = core . Set$ ( core . int ) . new ( ) ;
552
552
this . isolateStatics = _foreign_helper . JS_CREATE_ISOLATE ( ) ;
553
553
this . controlPort = new RawReceivePortImpl . _controlPort ( ) ;
554
- this . pauseCapability = new isolate . Capability ( ) ;
555
- this . terminateCapability = new isolate . Capability ( ) ;
554
+ this . pauseCapability = isolate . Capability . new ( ) ;
555
+ this . terminateCapability = isolate . Capability . new ( ) ;
556
556
this . delayedEvents = dart . setType ( [ ] , core . List$ ( _IsolateEvent ) ) ;
557
- this . pauseTokens = new ( core . Set$ ( isolate . Capability ) ) ( ) ;
558
- this . errorPorts = new ( core . Set$ ( isolate . SendPort ) ) ( ) ;
557
+ this . pauseTokens = core . Set$ ( isolate . Capability ) . new ( ) ;
558
+ this . errorPorts = core . Set$ ( isolate . SendPort ) . new ( ) ;
559
559
this . initialized = false ;
560
560
this . isPaused = false ;
561
561
this . doneHandlers = null ;
@@ -618,7 +618,7 @@ var async = dart.import(async);
618
618
}
619
619
dart . assert ( pingType == isolate . Isolate . BEFORE_NEXT_EVENT ) ;
620
620
if ( this [ _scheduledControlEvents ] == null ) {
621
- this [ _scheduledControlEvents ] = new collection . Queue ( ) ;
621
+ this [ _scheduledControlEvents ] = collection . Queue . new ( ) ;
622
622
}
623
623
dart . dsend ( this [ _scheduledControlEvents ] , 'addLast' , respond ) ;
624
624
}
@@ -635,7 +635,7 @@ var async = dart.import(async);
635
635
}
636
636
dart . assert ( priority == isolate . Isolate . BEFORE_NEXT_EVENT ) ;
637
637
if ( this [ _scheduledControlEvents ] == null ) {
638
- this [ _scheduledControlEvents ] = new collection . Queue ( ) ;
638
+ this [ _scheduledControlEvents ] = collection . Queue . new ( ) ;
639
639
}
640
640
dart . dsend ( this [ _scheduledControlEvents ] , 'addLast' , dart . bind ( this , 'kill' ) ) ;
641
641
}
@@ -659,7 +659,7 @@ var async = dart.import(async);
659
659
}
660
660
return ;
661
661
}
662
- let message = new core . List ( 2 ) ;
662
+ let message = core . List . new ( 2 ) ;
663
663
message [ core . $set ] ( 0 , dart . toString ( error ) ) ;
664
664
message [ core . $set ] ( 1 , stackTrace == null ? null : dart . toString ( stackTrace ) ) ;
665
665
for ( let port of this . errorPorts )
@@ -754,7 +754,7 @@ var async = dart.import(async);
754
754
}
755
755
[ _addRegistration ] ( portId , port ) {
756
756
if ( this . ports . containsKey ( portId ) ) {
757
- throw new core . Exception ( "Registry: ports must be registered only once." ) ;
757
+ throw core . Exception . new ( "Registry: ports must be registered only once." ) ;
758
758
}
759
759
this . ports . set ( portId , port ) ;
760
760
}
@@ -826,7 +826,7 @@ var async = dart.import(async);
826
826
let _runHelper = Symbol ( '_runHelper' ) ;
827
827
class _EventLoop extends core . Object {
828
828
_EventLoop ( ) {
829
- this . events = new ( collection . Queue$ ( _IsolateEvent ) ) ( ) ;
829
+ this . events = collection . Queue$ ( _IsolateEvent ) . new ( ) ;
830
830
this [ _activeJsAsyncCount ] = 0 ;
831
831
}
832
832
enqueue ( isolate , fn , msg ) {
@@ -842,7 +842,7 @@ var async = dart.import(async);
842
842
}
843
843
checkOpenReceivePortsFromCommandLine ( ) {
844
844
if ( dart . notNull ( exports . _globalState . rootContext != null ) && dart . notNull ( exports . _globalState . isolates . containsKey ( exports . _globalState . rootContext . id ) ) && dart . notNull ( exports . _globalState . fromCommandLine ) && dart . notNull ( exports . _globalState . rootContext . ports . isEmpty ) ) {
845
- throw new core . Exception ( "Program exited with open ReceivePorts." ) ;
845
+ throw core . Exception . new ( "Program exited with open ReceivePorts." ) ;
846
846
}
847
847
}
848
848
runIteration ( ) {
@@ -1068,7 +1068,7 @@ var async = dart.import(async);
1068
1068
IsolateNatives . _consoleLog ( msg ) ;
1069
1069
} catch ( e ) {
1070
1070
let trace = dart . stackTrace ( e ) ;
1071
- throw new core . Exception ( trace ) ;
1071
+ throw core . Exception . new ( trace ) ;
1072
1072
}
1073
1073
1074
1074
}
@@ -1107,8 +1107,8 @@ var async = dart.import(async);
1107
1107
if ( uri != null && dart . notNull ( uri . endsWith ( ".dart" ) ) ) {
1108
1108
uri = dart . notNull ( uri ) + ".js" ;
1109
1109
}
1110
- let port = new isolate . ReceivePort ( ) ;
1111
- let completer = new ( async . Completer$ ( core . List ) ) ( ) ;
1110
+ let port = isolate . ReceivePort . new ( ) ;
1111
+ let completer = async . Completer$ ( core . List ) . new ( ) ;
1112
1112
port . first . then ( dart . fn ( msg => {
1113
1113
if ( dart . equals ( dart . dindex ( msg , 0 ) , _SPAWNED_SIGNAL ) ) {
1114
1114
completer . complete ( msg ) ;
@@ -1127,7 +1127,7 @@ var async = dart.import(async);
1127
1127
}
1128
1128
static _startWorker ( functionName , uri , args , message , isSpawnUri , startPaused , replyPort , onError ) {
1129
1129
if ( args != null )
1130
- args = new ( core . List$ ( core . String ) ) . from ( args ) ;
1130
+ args = core . List$ ( core . String ) . from ( args ) ;
1131
1131
if ( exports . _globalState . isWorker ) {
1132
1132
exports . _globalState . mainManager . postMessage ( _serializeMessage ( dart . map ( { command : 'spawn-worker' , functionName : functionName , args : args , msg : message , uri : uri , isSpawnUri : isSpawnUri , startPaused : startPaused , replyPort : replyPort } ) ) ) ;
1133
1133
} else {
@@ -1140,7 +1140,7 @@ var async = dart.import(async);
1140
1140
}
1141
1141
message = _clone ( message ) ;
1142
1142
if ( args != null )
1143
- args = new ( core . List$ ( core . String ) ) . from ( args ) ;
1143
+ args = core . List$ ( core . String ) . from ( args ) ;
1144
1144
exports . _globalState . topEventLoop . enqueue ( new _IsolateContext ( ) , dart . fn ( ( ) => {
1145
1145
let func = IsolateNatives . _getJSFunctionFromName ( functionName ) ;
1146
1146
IsolateNatives . _startIsolate ( dart . as ( func , core . Function ) , args , message , isSpawnUri , startPaused , replyPort ) ;
@@ -1252,7 +1252,7 @@ var async = dart.import(async);
1252
1252
}
1253
1253
[ _checkReplyTo ] ( replyTo ) {
1254
1254
if ( dart . notNull ( replyTo != null ) && ! dart . is ( replyTo , _NativeJsSendPort ) && ! dart . is ( replyTo , _WorkerSendPort ) ) {
1255
- throw new core . Exception ( "SendPort.send: Illegal replyTo port type" ) ;
1255
+ throw core . Exception . new ( "SendPort.send: Illegal replyTo port type" ) ;
1256
1256
}
1257
1257
}
1258
1258
}
@@ -1405,7 +1405,7 @@ var async = dart.import(async);
1405
1405
this [ _rawPort ] = rawPort ;
1406
1406
this [ _controller ] = null ;
1407
1407
super . Stream ( ) ;
1408
- this [ _controller ] = new async . StreamController ( { onCancel : dart . bind ( this , 'close' ) , sync : true } ) ;
1408
+ this [ _controller ] = async . StreamController . new ( { onCancel : dart . bind ( this , 'close' ) , sync : true } ) ;
1409
1409
this [ _rawPort ] . handler = dart . bind ( this [ _controller ] , 'add' ) ;
1410
1410
}
1411
1411
listen ( onData , opts ) {
0 commit comments