MCPcopy Create free account
hub / github.com/nodejs/node / format

Method format

deps/v8/tools/system-analyzer/view/code-panel.mjs:251–264  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

249 }
250
251 format() {
252 const content = DOM.span({textContent: this.line + '\n'});
253 let formattedCode = content.innerHTML.split(kRegisterSplitRegexp)
254 .map(part => this._formatRegisterPart(part))
255 .join('');
256 formattedCode =
257 formattedCode.split(kAnyAddressRegexp)
258 .map((part, index) => this._formatAddressPart(part, index))
259 .join('');
260 // Let's replace the base-address since it doesn't add any value.
261 // TODO
262 content.innerHTML = formattedCode;
263 return content;
264 }
265
266 _formatRegisterPart(part) {
267 if (!kIsRegisterRegexp.test(part)) return part;

Callers

nothing calls this directly

Calls 6

_formatRegisterPartMethod · 0.95
_formatAddressPartMethod · 0.95
spanMethod · 0.80
mapMethod · 0.65
joinMethod · 0.45
splitMethod · 0.45

Tested by

no test coverage detected