Commit 35da8e03 authored by Camillo Bruni's avatar Camillo Bruni Committed by Commit Bot

[tools] Format tickprocessor.mjs and friends

Bug: v8:10667
Change-Id: Ie11b21f6610ad5e5be81e12191207ac85680a1ca
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2622213
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: 's avatarSathya Gunasekaran  <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72043}
parent a23adbbc
...@@ -43,7 +43,7 @@ export class SourcePosition { ...@@ -43,7 +43,7 @@ export class SourcePosition {
} }
toString() { toString() {
return `${this.script.name}:${this.line}:${this.column}`; return `${this.script.name}:${this.line}:${this.column}`;
} }
toStringLong() { toStringLong() {
...@@ -79,7 +79,7 @@ export class Script { ...@@ -79,7 +79,7 @@ export class Script {
addSourcePosition(line, column, entry) { addSourcePosition(line, column, entry) {
let sourcePosition = this.lineToColumn.get(line)?.get(column); let sourcePosition = this.lineToColumn.get(line)?.get(column);
if (sourcePosition === undefined) { if (sourcePosition === undefined) {
sourcePosition = new SourcePosition(this, line, column, ) sourcePosition = new SourcePosition(this, line, column,)
this._addSourcePosition(line, column, sourcePosition); this._addSourcePosition(line, column, sourcePosition);
} }
sourcePosition.addEntry(entry); sourcePosition.addEntry(entry);
...@@ -110,13 +110,13 @@ export class Script { ...@@ -110,13 +110,13 @@ export class Script {
class SourceInfo { class SourceInfo {
script; script;
start; start;
end; end;
positions; positions;
inlined ; inlined;
fns; fns;
disassemble; disassemble;
setSourcePositionInfo(script, startPos, endPos, sourcePositionTable, inliningPositions, inlinedFunctions) { setSourcePositionInfo(script, startPos, endPos, sourcePositionTable, inliningPositions, inlinedFunctions) {
this.script = script; this.script = script;
...@@ -232,7 +232,7 @@ export class Profile { ...@@ -232,7 +232,7 @@ export class Profile {
* during stack strace processing, specifies a position of the frame * during stack strace processing, specifies a position of the frame
* containing the address. * containing the address.
*/ */
handleUnknownCode(operation, addr, opt_stackPos) {} handleUnknownCode(operation, addr, opt_stackPos) { }
/** /**
* Registers a library. * Registers a library.
...@@ -255,7 +255,7 @@ export class Profile { ...@@ -255,7 +255,7 @@ export class Profile {
* @param {number} endAddr Ending address. * @param {number} endAddr Ending address.
*/ */
addStaticCode(name, startAddr, endAddr) { addStaticCode(name, startAddr, endAddr) {
const entry = new CodeEntry(endAddr - startAddr, name, 'CPP'); const entry = new CodeEntry(endAddr - startAddr, name, 'CPP');
this.codeMap_.addStaticCode(startAddr, entry); this.codeMap_.addStaticCode(startAddr, entry);
return entry; return entry;
} }
...@@ -370,8 +370,8 @@ export class Profile { ...@@ -370,8 +370,8 @@ export class Profile {
} }
this.getOrCreateSourceInfo(entry).setSourcePositionInfo( this.getOrCreateSourceInfo(entry).setSourcePositionInfo(
script, startPos, endPos, sourcePositionTable, inliningPositions, script, startPos, endPos, sourcePositionTable, inliningPositions,
inlinedFunctions); inlinedFunctions);
} }
addDisassemble(start, kind, disassemble) { addDisassemble(start, kind, disassemble) {
...@@ -646,7 +646,7 @@ class DynamicCodeEntry extends CodeEntry { ...@@ -646,7 +646,7 @@ class DynamicCodeEntry extends CodeEntry {
constructor(size, type, name) { constructor(size, type, name) {
super(size, name, type); super(size, name, type);
} }
getName() { getName() {
return this.type + ': ' + this.name; return this.type + ': ' + this.name;
} }
...@@ -726,7 +726,7 @@ class DynamicFuncCodeEntry extends CodeEntry { ...@@ -726,7 +726,7 @@ class DynamicFuncCodeEntry extends CodeEntry {
* @constructor * @constructor
*/ */
class FunctionEntry extends CodeEntry { class FunctionEntry extends CodeEntry {
// Contains the list of generated code for this function. // Contains the list of generated code for this function.
_codeEntries = new Set(); _codeEntries = new Set();
...@@ -754,7 +754,7 @@ class FunctionEntry extends CodeEntry { ...@@ -754,7 +754,7 @@ class FunctionEntry extends CodeEntry {
getName() { getName() {
let name = this.name; let name = this.name;
if (name.length == 0) { if (name.length == 0) {
return '<anonymous>'; return '<anonymous>';
} else if (name.charAt(0) == ' ') { } else if (name.charAt(0) == ' ') {
// An anonymous function with location: " aaa.js:10". // An anonymous function with location: " aaa.js:10".
return `<anonymous>${name}`; return `<anonymous>${name}`;
...@@ -888,7 +888,7 @@ class CallTree { ...@@ -888,7 +888,7 @@ class CallTree {
* @param {function(CallTreeNode)} exit A function called * @param {function(CallTreeNode)} exit A function called
* after visiting node's children. * after visiting node's children.
*/ */
traverseInDepth(enter, exit) { traverseInDepth(enter, exit) {
function traverse(node) { function traverse(node) {
enter(node); enter(node);
node.forEachChild(traverse); node.forEachChild(traverse);
...@@ -905,7 +905,7 @@ class CallTree { ...@@ -905,7 +905,7 @@ class CallTree {
* @param {string} label Node label. * @param {string} label Node label.
* @param {CallTreeNode} opt_parent Node parent. * @param {CallTreeNode} opt_parent Node parent.
*/ */
class CallTreeNode { class CallTreeNode {
/** /**
* Node self weight (how many times this node was the last node in * Node self weight (how many times this node was the last node in
* a call path). * a call path).
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment