Skip to content

Commit

Permalink
Fix TypeScript comment format
Browse files Browse the repository at this point in the history
Signed-off-by: Stefan Marr <git@stefan-marr.de>
  • Loading branch information
smarr committed Jan 25, 2017
1 parent 3c4f8b0 commit d26e7e6
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 41 deletions.
74 changes: 37 additions & 37 deletions tools/kompos/src/history-data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export class HistoryData {
private currentReceiver = "";

constructor(){
this.addActor("0:0", "Platform"); //add main actor
this.addActor("0:0", "Platform"); // add main actor
}

addActor(id: string, type: string) {
Expand Down Expand Up @@ -88,64 +88,64 @@ export class HistoryData {
switch(typ){
case 1:
var aid = (data.getInt32(i + 4) + ":" + data.getInt32(i));
//8 byte causal message id
var type: number = data.getInt16(i + 16); //type
// 8 byte causal message id
var type: number = data.getInt16(i + 16); // type
this.addActor(aid, this.strings[type]);
i += 18;
break;
case 2:
//8 byte promise id
//8 byte causal message id
// 8 byte promise id
// 8 byte causal message id
i += 16;
break;
case 3:
//8 byte promise id
//8 byte resolving message id
// 8 byte promise id
// 8 byte resolving message id
i += 16;
i += readParameter(data, i);
break;
case 4:
//8 byte promise id
//8 byte chained promise id
// 8 byte promise id
// 8 byte chained promise id
i += 16;
break;
case 5:
//8 byte message base id
this.currentReceiver = (data.getInt32(i + 12) + ":" + data.getInt32(i + 8)); //receiver id
// 8 byte message base id
this.currentReceiver = (data.getInt32(i + 12) + ":" + data.getInt32(i + 8)); // receiver id
i += 16;
break;
case 6:
data.getInt8(i); //Thread
//8 byte timestamp
data.getInt8(i); // Thread
// 8 byte timestamp
i += 9;
break;
case 7:
//8 byte message base id
this.currentReceiver = (data.getInt32(i + 12) + ":" + data.getInt32(i + 8)); //receiver id
data.getInt16(i + 16); //id offset
// 8 byte message base id
this.currentReceiver = (data.getInt32(i + 12) + ":" + data.getInt32(i + 8)); // receiver id
data.getInt16(i + 16); // id offset
i += 18;
break;
case 8:
var sender = (data.getInt32(i + 4) + ":" + data.getInt32(i)); //sender id
//8 byte causal message id
data.getInt16(i + 16); //selector
//8byte execution start
//8byte send time
var numParam = data.getInt8(i + 34); //parameter count
var sender = (data.getInt32(i + 4) + ":" + data.getInt32(i)); // sender id
// 8 byte causal message id
data.getInt16(i + 16); // selector
// 8byte execution start
// 8byte send time
var numParam = data.getInt8(i + 34); // parameter count
i += 35;
for (var k = 0; k < numParam; k++) {
i += readParameter(data, i);
}
this.addMessage(sender, this.currentReceiver);
break;
case 9:
//8 byte promise id
sender = (data.getInt32(i + 12) + ":" + data.getInt32(i + 8)); //sender id
//8 byte causal message id
data.getInt16(i + 24); //selector
//8byte execution start
//8byte send time
numParam = data.getInt8(i + 42); //parameter count
// 8 byte promise id
sender = (data.getInt32(i + 12) + ":" + data.getInt32(i + 8)); // sender id
// 8 byte causal message id
data.getInt16(i + 24); // selector
// 8byte execution start
// 8byte send time
numParam = data.getInt8(i + 42); // parameter count
i += 43;
for (var k = 0; k < numParam; k++) {
i += readParameter(data, i);
Expand All @@ -160,21 +160,21 @@ export class HistoryData {
function readParameter(dv: DataView, offset: number): number {
var paramType = dv.getInt8(offset);
switch(paramType){
case 0: //false
case 0: // false
return 1;
case 1: //true
case 1: // true
return 1;
case 2: //long
case 2: // long
return 9;
case 3: //double
case 3: // double
return 9;
case 4: //promise (promise id)
case 4: // promise (promise id)
return 9;
case 5: //resolver (promise id)
case 5: // resolver (promise id)
return 9;
case 6: //Object Type
case 6: // Object Type
return 3;
case 7: //String
case 7: // String
return 1;
default:
return 1;
Expand Down
4 changes: 2 additions & 2 deletions tools/kompos/src/visualizations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export function displayMessageHistory() {

var svg = d3.select("#graph-canvas")
.append("svg")
//.attr("oncontextmenu", "return false;")
// .attr("oncontextmenu", "return false;")
.attr("width", width)
.attr("height", height);

Expand Down Expand Up @@ -118,7 +118,7 @@ function restart() {
path = path.data(links);

// update existing links
path //.classed("selected", function(d) { return d === selected_link; })
path // .classed("selected", function(d) { return d === selected_link; })
.style("marker-start", function(d) { return d.left ? "url(#start-arrow)" : ""; })
.style("marker-end", function(d) { return d.right ? "url(#end-arrow)" : ""; });

Expand Down
3 changes: 1 addition & 2 deletions tools/kompos/src/vm-connection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@ export class VmConnection {

console.assert(this.binarySocket === null || this.binarySocket.readyState === WebSocket.CLOSED);
this.binarySocket = new WebSocket("ws://localhost:7978");
(<any> this.binarySocket).binaryType = "arraybuffer"; //workaround, typescript dosn't recognize this property

(<any> this.binarySocket).binaryType = "arraybuffer"; // workaround, typescript dosn't recognize this property

var controller = this.controller;
this.socket.onopen = function () {
Expand Down
1 change: 1 addition & 0 deletions tools/kompos/tslint.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
"variable-declaration": "space"}],
"quotemark": [true, "double", "avoid-escape"],
"curly": true,
"comment-format": [true, "check-space"],
"class-name": true,
"semicolon": ["always"],
"triple-equals": true
Expand Down

0 comments on commit d26e7e6

Please sign in to comment.