Skip to content

Commit b3ea75c

Browse files
authored
Remove dead code from makeSetValue (#18678)
We don't have support any non-standard types such as `i24` these days. We have had an assertion in `getHeapForType` for a long time that guarantees that.
1 parent 30ba0ae commit b3ea75c

File tree

1 file changed

+0
-16
lines changed

1 file changed

+0
-16
lines changed

src/parseTools.js

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -390,22 +390,6 @@ function makeSetValue(ptr, pos, value, type, noNeedFirst, ignore, align, sep = '
390390
makeSetValue(ptr, getFastValue(pos, '+', Runtime.getNativeTypeSize('i32')), 'tempI64[1]', 'i32', noNeedFirst, ignore, align, ',') + ')';
391391
}
392392

393-
const bits = getBits(type);
394-
const needSplitting = bits > 0 && !isPowerOfTwo(bits); // an unnatural type like i24
395-
if (needSplitting) {
396-
// Alignment is important here, or we need to split this up for other reasons.
397-
const bytes = Runtime.getNativeTypeSize(type);
398-
if (needSplitting) {
399-
let ret = '';
400-
ret += 'tempBigInt=' + value + sep;
401-
for (let i = 0; i < bytes; i++) {
402-
ret += makeSetValue(ptr, getFastValue(pos, '+', i), 'tempBigInt&0xff', 'i8', noNeedFirst, ignore, 1);
403-
if (i < bytes - 1) ret += sep + 'tempBigInt = tempBigInt>>8' + sep;
404-
}
405-
return ret;
406-
}
407-
}
408-
409393
const offset = calcFastOffset(ptr, pos);
410394

411395
const slab = getHeapForType(type);

0 commit comments

Comments
 (0)