Let the optimizer decide what it takes to become a select

This commit is contained in:
dcodeIO
2018-01-12 05:03:25 +01:00
parent d89703cdad
commit 3980e53bb7
18 changed files with 225 additions and 242 deletions

View File

@ -2248,7 +2248,7 @@ export function mangleInternalName(declaration: DeclarationStatement): string {
function builderEndsWith(sb: string[], code: CharCode): bool {
if (sb.length) {
var last = sb[sb.length - 1];
return select<bool>(last.charCodeAt(last.length - 1) == code, false, last.length > 0);
return last.length > 0 ? last.charCodeAt(last.length - 1) == code : false;
}
return false;
}