diff --git a/tools/profile.mjs b/tools/profile.mjs index 50864dce0f..8bf1477aaf 100644 --- a/tools/profile.mjs +++ b/tools/profile.mjs @@ -56,13 +56,13 @@ export class Script { let sourcePosition = this.lineToColumn.get(line)?.get(column); if (sourcePosition === undefined) { sourcePosition = new SourcePosition(this, line, column, ) - this.#addSourcePosition(line, column, sourcePosition); + this._addSourcePosition(line, column, sourcePosition); } sourcePosition.addEntry(entry); return sourcePosition; } - #addSourcePosition(line, column, sourcePosition) { + _addSourcePosition(line, column, sourcePosition) { let columnToSourcePosition; if (this.lineToColumn.has(line)) { columnToSourcePosition = this.lineToColumn.get(line); diff --git a/tools/system-analyzer/app-model.mjs b/tools/system-analyzer/app-model.mjs index 2feb0bd58c..374a77f049 100644 --- a/tools/system-analyzer/app-model.mjs +++ b/tools/system-analyzer/app-model.mjs @@ -3,100 +3,100 @@ // found in the LICENSE file. class State { - #timeSelection = { start: 0, end: Infinity }; - #map; - #ic; - #selectedMapLogEntries; - #selectedIcLogEntries; - #selectedSourcePositions; - #nofChunks; - #chunks; - #icTimeline; - #mapTimeline; - #minStartTime = Number.POSITIVE_INFINITY; - #maxEndTime = Number.NEGATIVE_INFINITY; + _timeSelection = { start: 0, end: Infinity }; + _map; + _ic; + _selectedMapLogEntries; + _selectedIcLogEntries; + _selectedSourcePositions; + _nofChunks; + _chunks; + _icTimeline; + _mapTimeline; + _minStartTime = Number.POSITIVE_INFINITY; + _maxEndTime = Number.NEGATIVE_INFINITY; get minStartTime() { - return this.#minStartTime; + return this._minStartTime; } get maxEndTime() { - return this.#maxEndTime; + return this._maxEndTime; } - #updateTimeRange(timeline) { - this.#minStartTime = Math.min(this.#minStartTime, timeline.startTime); - this.#maxEndTime = Math.max(this.#maxEndTime, timeline.endTime); + _updateTimeRange(timeline) { + this._minStartTime = Math.min(this._minStartTime, timeline.startTime); + this._maxEndTime = Math.max(this._maxEndTime, timeline.endTime); } get mapTimeline() { - return this.#mapTimeline; + return this._mapTimeline; } set mapTimeline(timeline) { - this.#updateTimeRange(timeline); - timeline.startTime = this.#minStartTime; - timeline.endTime = this.#maxEndTime; - this.#mapTimeline = timeline; + this._updateTimeRange(timeline); + timeline.startTime = this._minStartTime; + timeline.endTime = this._maxEndTime; + this._mapTimeline = timeline; } set icTimeline(timeline) { - this.#updateTimeRange(timeline); - timeline.startTime = this.#minStartTime; - timeline.endTime = this.#maxEndTime; - this.#icTimeline = timeline; + this._updateTimeRange(timeline); + timeline.startTime = this._minStartTime; + timeline.endTime = this._maxEndTime; + this._icTimeline = timeline; } get icTimeline() { - return this.#icTimeline; + return this._icTimeline; } set chunks(value) { //TODO(zcankara) split up between maps and ics, and every timeline track - this.#chunks = value; + this._chunks = value; } get chunks() { //TODO(zcankara) split up between maps and ics, and every timeline track - return this.#chunks; + return this._chunks; } get nofChunks() { - return this.#nofChunks; + return this._nofChunks; } set nofChunks(count) { - this.#nofChunks = count; + this._nofChunks = count; } get map() { //TODO(zcankara) rename as selectedMapEvents, array of selected events - return this.#map; + return this._map; } set map(value) { //TODO(zcankara) rename as selectedMapEvents, array of selected events if (!value) return; - this.#map = value; + this._map = value; } get ic() { //TODO(zcankara) rename selectedICEvents, array of selected events - return this.#ic; + return this._ic; } set ic(value) { //TODO(zcankara) rename selectedIcEvents, array of selected events if (!value) return; - this.#ic = value; + this._ic = value; } get selectedMapLogEntries() { - return this.#selectedMapLogEntries; + return this._selectedMapLogEntries; } set selectedMapLogEntries(value) { if (!value) return; - this.#selectedMapLogEntries = value; + this._selectedMapLogEntries = value; } get selectedSourcePositions() { - return this.#selectedSourcePositions; + return this._selectedSourcePositions; } set selectedSourcePositions(value) { - this.#selectedSourcePositions = value; + this._selectedSourcePositions = value; } get selectedIcLogEntries() { - return this.#selectedIcLogEntries; + return this._selectedIcLogEntries; } set selectedIcLogEntries(value) { if (!value) return; - this.#selectedIcLogEntries = value; + this._selectedIcLogEntries = value; } get timeSelection() { - return this.#timeSelection; + return this._timeSelection; } get entries() { if (!this.map) return {}; diff --git a/tools/system-analyzer/events.mjs b/tools/system-analyzer/events.mjs index 8e9a5a0b44..ff71336b4c 100644 --- a/tools/system-analyzer/events.mjs +++ b/tools/system-analyzer/events.mjs @@ -3,7 +3,8 @@ // found in the LICENSE file. class SelectionEvent extends CustomEvent { - static name = "showentries"; + // TODO: turn into static class fields once Safari supports it. + static get name() { return "showentries"; } constructor(entries) { super(SelectionEvent.name, { bubbles: true, composed: true }); if (!Array.isArray(entries) || entries.length == 0) { @@ -14,7 +15,7 @@ class SelectionEvent extends CustomEvent { } class FocusEvent extends CustomEvent { - static name = "showentrydetail"; + static get name() { return "showentrydetail"; } constructor(entry) { super(FocusEvent.name, { bubbles: true, composed: true }); this.entry = entry; @@ -22,7 +23,7 @@ class FocusEvent extends CustomEvent { } class SelectTimeEvent extends CustomEvent { - static name = 'timerangeselect'; + static get name() { return 'timerangeselect'; } constructor(start, end) { super(SelectTimeEvent.name, { bubbles: true, composed: true }); this.start = start; @@ -31,7 +32,7 @@ class SelectTimeEvent extends CustomEvent { } class SynchronizeSelectionEvent extends CustomEvent { - static name = 'syncselection'; + static get name() { return 'syncselection'; } constructor(start, end) { super(SynchronizeSelectionEvent.name, { bubbles: true, composed: true }); this.start = start; diff --git a/tools/system-analyzer/ic-panel.mjs b/tools/system-analyzer/ic-panel.mjs index c1113ba37f..edb96343a4 100644 --- a/tools/system-analyzer/ic-panel.mjs +++ b/tools/system-analyzer/ic-panel.mjs @@ -10,8 +10,8 @@ import { IcLogEntry } from './log/ic.mjs'; defineCustomElement('ic-panel', (templateText) => class ICPanel extends V8CustomElement { - #selectedLogEntries; - #timeline; + _selectedLogEntries; + _timeline; constructor() { super(templateText); this.initGroupKeySelect(); @@ -22,8 +22,8 @@ defineCustomElement('ic-panel', (templateText) => } set timeline(value) { console.assert(value !== undefined, "timeline undefined!"); - this.#timeline = value; - this.selectedLogEntries = this.#timeline.all; + this._timeline = value; + this.selectedLogEntries = this._timeline.all; this.updateCount(); } get groupKey() { @@ -47,13 +47,13 @@ defineCustomElement('ic-panel', (templateText) => } set selectedLogEntries(value) { - this.#selectedLogEntries = value; + this._selectedLogEntries = value; this.updateCount(); this.updateTable(); } updateCount() { - this.count.innerHTML = this.#selectedLogEntries.length; + this.count.innerHTML = this._selectedLogEntries.length; } updateTable(event) { @@ -61,7 +61,7 @@ defineCustomElement('ic-panel', (templateText) => let key = select.options[select.selectedIndex].text; let tableBody = this.tableBody; this.removeAllChildren(tableBody); - let groups = Group.groupBy(this.#selectedLogEntries, key, true); + let groups = Group.groupBy(this._selectedLogEntries, key, true); this.render(groups, tableBody); } diff --git a/tools/system-analyzer/index.html b/tools/system-analyzer/index.html index 2981e7cc2e..2abdf0df30 100644 --- a/tools/system-analyzer/index.html +++ b/tools/system-analyzer/index.html @@ -10,7 +10,6 @@ found in the LICENSE file. --> Indicium -