Skip to content

Commit d0090ea

Browse files
authored
Remove unused argument from asmCoercion. NFC (#17062)
The last usage of this argument was the SAFE_HEAP support in makeGetValue/makeSetValue which was removed in #17040. I believe that all the callers of this function are right here in the one file, but in case there are external callers add an assertion check.
1 parent 1f6b136 commit d0090ea

File tree

1 file changed

+2
-11
lines changed

1 file changed

+2
-11
lines changed

src/parseTools.js

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -315,30 +315,21 @@ function asmEnsureFloat(value, type) {
315315
return value;
316316
}
317317

318-
function asmCoercion(value, type, signedness) {
318+
function asmCoercion(value, type) {
319+
assert(arguments.length == 2, 'asmCoercion takes exactly two arguments');
319320
if (type == 'void') {
320321
return value;
321322
} else if (FLOAT_TYPES.has(type)) {
322323
if (isNumber(value)) {
323324
return asmEnsureFloat(value, type);
324325
} else {
325-
if (signedness) {
326-
if (signedness == 'u') {
327-
value = '(' + value + ')>>>0';
328-
} else {
329-
value = '(' + value + ')|0';
330-
}
331-
}
332326
if (type === 'float') {
333327
return 'Math.fround(' + value + ')';
334328
} else {
335329
return '(+(' + value + '))';
336330
}
337331
}
338332
} else {
339-
if (signedness == 'u') {
340-
return '((' + value + ')>>>0)';
341-
}
342333
return '((' + value + ')|0)';
343334
}
344335
}

0 commit comments

Comments
 (0)