@@ -6,7 +6,7 @@ import { TimeInterval, TimePoint } from './model/time';
66import { Scope } from './model/scope' ;
77import { Variable } from './model/variable' ;
88import { StatusBarItem } from './ui/status' ;
9- import { BoundReference , Reference , Sample } from './model/sample' ;
9+ import { Reference , UnboundReference , Sample } from './model/sample' ;
1010
1111export enum CXXRTLSimulationStatus {
1212 Paused = 'paused' ,
@@ -28,12 +28,16 @@ export class CXXRTLDebugger {
2828 // Session properties.
2929
3030 private _sessionStatus : CXXRTLSessionStatus = CXXRTLSessionStatus . Absent ;
31- public get sessionStatus ( ) { return this . _sessionStatus ; }
31+ public get sessionStatus ( ) {
32+ return this . _sessionStatus ;
33+ }
3234 private _onDidChangeSessionStatus : vscode . EventEmitter < CXXRTLSessionStatus > = new vscode . EventEmitter < CXXRTLSessionStatus > ( ) ;
3335 readonly onDidChangeSessionStatus : vscode . Event < CXXRTLSessionStatus > = this . _onDidChangeSessionStatus . event ;
3436
3537 private _currentTime : TimePoint = new TimePoint ( 0n , 0n ) ;
36- public get currentTime ( ) { return this . _currentTime ; }
38+ public get currentTime ( ) {
39+ return this . _currentTime ;
40+ }
3741 private _onDidChangeCurrentTime : vscode . EventEmitter < TimePoint > = new vscode . EventEmitter < TimePoint > ( ) ;
3842 readonly onDidChangeCurrentTime : vscode . Event < TimePoint > = this . _onDidChangeCurrentTime . event ;
3943
@@ -42,12 +46,16 @@ export class CXXRTLDebugger {
4246 private simulationStatusUpdateTimeout : NodeJS . Timeout | null = null ;
4347
4448 private _simulationStatus : CXXRTLSimulationStatus = CXXRTLSimulationStatus . Finished ;
45- public get simulationStatus ( ) { return this . _simulationStatus ; }
49+ public get simulationStatus ( ) {
50+ return this . _simulationStatus ;
51+ }
4652 private _onDidChangeSimulationStatus : vscode . EventEmitter < CXXRTLSimulationStatus > = new vscode . EventEmitter < CXXRTLSimulationStatus > ( ) ;
4753 readonly onDidChangeSimulationStatus : vscode . Event < CXXRTLSimulationStatus > = this . _onDidChangeSimulationStatus . event ;
4854
4955 private _latestTime : TimePoint = new TimePoint ( 0n , 0n ) ;
50- public get latestTime ( ) { return this . _latestTime ; }
56+ public get latestTime ( ) {
57+ return this . _latestTime ;
58+ }
5159 private _onDidChangeLatestTime : vscode . EventEmitter < TimePoint > = new vscode . EventEmitter < TimePoint > ( ) ;
5260 readonly onDidChangeLatestTime : vscode . Event < TimePoint > = this . _onDidChangeLatestTime . event ;
5361
@@ -63,7 +71,7 @@ export class CXXRTLDebugger {
6371
6472 public async startSession ( ) : Promise < void > {
6573 if ( this . terminal !== null ) {
66- vscode . window . showErrorMessage ( " A debug session is already in the process of being started." ) ;
74+ vscode . window . showErrorMessage ( ' A debug session is already in the process of being started.' ) ;
6775 return ;
6876 }
6977
@@ -81,39 +89,39 @@ export class CXXRTLDebugger {
8189 this . setSessionStatus ( CXXRTLSessionStatus . Starting ) ;
8290
8391 const processId = await this . terminal . processId ;
84- console . log ( " [RTL Debugger] Launched process %d" , processId ) ;
92+ console . log ( ' [RTL Debugger] Launched process %d' , processId ) ;
8593
8694 setTimeout ( ( ) => {
8795 const socket = net . createConnection ( { port : configuration . port , host : '::1' } , ( ) => {
88- vscode . window . showInformationMessage ( " Connected to the CXXRTL server." ) ;
96+ vscode . window . showInformationMessage ( ' Connected to the CXXRTL server.' ) ;
8997
9098 ( async ( ) => {
9199 this . connection = new Connection ( new NodeStreamLink ( socket ) ) ;
92100 this . setSessionStatus ( CXXRTLSessionStatus . Running ) ;
93101 this . updateSimulationStatus ( ) ;
94- console . log ( " [RTL Debugger] Initialized" ) ;
102+ console . log ( ' [RTL Debugger] Initialized' ) ;
95103 } ) ( ) . catch ( ( ) => {
96104 this . stopSession ( ) ;
97105 } ) ;
98106 } ) ;
99107 socket . on ( 'error' , ( err : any ) => {
100108 if ( err . code === 'ECONNREFUSED' ) {
101- vscode . window . showErrorMessage ( " The connection to the CXXRTL server was refused." ) ;
109+ vscode . window . showErrorMessage ( ' The connection to the CXXRTL server was refused.' ) ;
102110 } else {
103111 vscode . window . showErrorMessage ( `The connection to the CXXRTL server has failed: ${ err . code } .` ) ;
104112 }
105113 this . stopSession ( ) ;
106114 } ) ;
107115 socket . on ( 'close' , ( hadError ) => {
108116 if ( ! hadError ) {
109- vscode . window . showInformationMessage ( " Disconnected from the CXXRTL server." ) ;
117+ vscode . window . showInformationMessage ( ' Disconnected from the CXXRTL server.' ) ;
110118 }
111119 this . stopSession ( ) ;
112120 } ) ;
113121 } , 500 ) ; // FIXME
114122 } else {
115- const OpenSettings = " Open Settings" ;
116- const selection = await vscode . window . showErrorMessage ( " Configure the launch command to start a debug session." , OpenSettings ) ;
123+ const OpenSettings = ' Open Settings' ;
124+ const selection = await vscode . window . showErrorMessage ( ' Configure the launch command to start a debug session.' , OpenSettings ) ;
117125 if ( selection === OpenSettings ) {
118126 vscode . commands . executeCommand ( 'workbench.action.openSettings' , 'rtlDebugger.command' ) ;
119127 }
@@ -254,7 +262,7 @@ export class CXXRTLDebugger {
254262 for ( const [ cxxrtlName , cxxrtlDesc ] of Object . entries ( cxxrtlResponse . scopes ) ) {
255263 const nestedScopes : Scope [ ] = [ ] ;
256264 const nestedVariables : Thenable < Variable [ ] > = {
257- // NormallyPromises are evaluated eagerly; this Thenable does it lazily.
265+ // Normally Promises are evaluated eagerly; this Thenable does it lazily.
258266 then : ( onfulfilled , onrejected ) => {
259267 return this . getVariablesForScope ( cxxrtlName ) . then ( onfulfilled , onrejected ) ;
260268 }
@@ -292,7 +300,7 @@ export class CXXRTLDebugger {
292300 }
293301 }
294302
295- public bindReference ( name : string , reference : Reference ) : BoundReference {
303+ public bindReference ( name : string , reference : UnboundReference ) : Reference {
296304 const epoch = this . advanceReferenceEpoch ( name ) ;
297305 // Note that we do not wait for the command to complete. Although it is possible for
298306 // the command to fail, this would only happen if one of the designations is invalid,
@@ -303,13 +311,13 @@ export class CXXRTLDebugger {
303311 reference : name ,
304312 items : reference . cxxrtlItemDesignations ( )
305313 } ) . catch ( ( error ) => {
306- console . error ( ` [CXXRTL] invalid designation while binding reference` ,
314+ console . error ( ' [CXXRTL] invalid designation while binding reference' ,
307315 `${ name } #${ epoch } ` , error ) ;
308316 } ) ;
309- return new BoundReference ( name , epoch , reference ) ;
317+ return new Reference ( name , epoch , reference ) ;
310318 }
311319
312- public async queryInterval ( interval : TimeInterval , reference : BoundReference ) : Promise < Sample [ ] > {
320+ public async queryInterval ( interval : TimeInterval , reference : Reference ) : Promise < Sample [ ] > {
313321 this . verifyReferenceEpoch ( reference . name , reference . epoch ) ;
314322 const cxxrtlResponse = await this . connection ! . queryInterval ( {
315323 type : 'command' ,
0 commit comments