react-native-update-cli 2.22.0 → 2.22.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/utils/hermes-base.js +16 -1
- package/package.json +1 -1
- package/src/utils/hermes-base.ts +13 -1
package/lib/utils/hermes-base.js
CHANGED
|
@@ -537,7 +537,22 @@ function normalizeDisassemblyLine(line, strings) {
|
|
|
537
537
|
return `${m[1]} <tgt>${m[4]}`;
|
|
538
538
|
m = /^(\s*DefineOwnById\w*\s+r\d+, r\d+, \d+, )(\d+)$/.exec(line);
|
|
539
539
|
if (m)
|
|
540
|
-
|
|
540
|
+
line = `${m[1]}"${strings.get(Number(m[2])) ?? `?${m[2]}`}"`;
|
|
541
|
+
// Operand-width variants of one instruction (GetByIdShort/GetById/GetByIdLong,
|
|
542
|
+
// LoadConstString/LoadConstStringLongIndex, ...) only differ by how wide a
|
|
543
|
+
// string/function id or offset is encoded — a foreign base hands the new
|
|
544
|
+
// code's hot strings large ids, so the delta build legitimately picks the
|
|
545
|
+
// wider form. Fold the suffix and the column padding that follows it.
|
|
546
|
+
m = /^(\s*)([A-Za-z]+?)(?:LongIndex|Long|Short)?(\s+.*|)$/.exec(line);
|
|
547
|
+
if (m)
|
|
548
|
+
line = `${m[1]}${m[2]}${m[3].replace(/\s+/g, ' ')}`;
|
|
549
|
+
// switch jump tables sit after the instructions; their relative offset (and
|
|
550
|
+
// the table header hermesc prints for them) moves with instruction widths
|
|
551
|
+
m = /^(\s*(?:String|UInt)?SwitchImm r\d+, \d+, )\d+(, .*)$/.exec(line);
|
|
552
|
+
if (m)
|
|
553
|
+
line = `${m[1]}<jt>${m[2]}`;
|
|
554
|
+
if (/^\s*offset \d+$/.test(line))
|
|
555
|
+
line = line.replace(/\d+$/, '<jt>');
|
|
541
556
|
return line;
|
|
542
557
|
}
|
|
543
558
|
/** Split a readable stream into lines without readline (Bun's readline async iterator misbehaves when pulled manually). */
|
package/package.json
CHANGED
package/src/utils/hermes-base.ts
CHANGED
|
@@ -622,7 +622,19 @@ export function normalizeDisassemblyLine(
|
|
|
622
622
|
m = /^(\s*J[A-Za-z]+?)(Long)?\s+(L\d+|\d+)(.*)$/.exec(line);
|
|
623
623
|
if (m) return `${m[1]} <tgt>${m[4]}`;
|
|
624
624
|
m = /^(\s*DefineOwnById\w*\s+r\d+, r\d+, \d+, )(\d+)$/.exec(line);
|
|
625
|
-
if (m)
|
|
625
|
+
if (m) line = `${m[1]}"${strings.get(Number(m[2])) ?? `?${m[2]}`}"`;
|
|
626
|
+
// Operand-width variants of one instruction (GetByIdShort/GetById/GetByIdLong,
|
|
627
|
+
// LoadConstString/LoadConstStringLongIndex, ...) only differ by how wide a
|
|
628
|
+
// string/function id or offset is encoded — a foreign base hands the new
|
|
629
|
+
// code's hot strings large ids, so the delta build legitimately picks the
|
|
630
|
+
// wider form. Fold the suffix and the column padding that follows it.
|
|
631
|
+
m = /^(\s*)([A-Za-z]+?)(?:LongIndex|Long|Short)?(\s+.*|)$/.exec(line);
|
|
632
|
+
if (m) line = `${m[1]}${m[2]}${m[3].replace(/\s+/g, ' ')}`;
|
|
633
|
+
// switch jump tables sit after the instructions; their relative offset (and
|
|
634
|
+
// the table header hermesc prints for them) moves with instruction widths
|
|
635
|
+
m = /^(\s*(?:String|UInt)?SwitchImm r\d+, \d+, )\d+(, .*)$/.exec(line);
|
|
636
|
+
if (m) line = `${m[1]}<jt>${m[2]}`;
|
|
637
|
+
if (/^\s*offset \d+$/.test(line)) line = line.replace(/\d+$/, '<jt>');
|
|
626
638
|
return line;
|
|
627
639
|
}
|
|
628
640
|
|