From 0a2c17602748d14a3d89668d59bcc69a9bd02a57 Mon Sep 17 00:00:00 2001 From: Jonas Jenwald Date: Sat, 8 Mar 2025 17:33:16 +0100 Subject: [PATCH] Remove the unused `or`/`shiftLeft` methods from the `Word64` class (PR 4938 follow-up) These methods were introduced in *the first* commit of PR 4938, however they became unused in *the second* commit of that PR. Hence it seems that we've been accidentally shipping, a small amount of, unused code for over a decade. --- src/core/calculate_sha_other.js | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/src/core/calculate_sha_other.js b/src/core/calculate_sha_other.js index b9badacaa..be794d01c 100644 --- a/src/core/calculate_sha_other.js +++ b/src/core/calculate_sha_other.js @@ -31,11 +31,6 @@ class Word64 { this.low ^= word.low; } - or(word) { - this.high |= word.high; - this.low |= word.low; - } - shiftRight(places) { if (places >= 32) { this.low = (this.high >>> (places - 32)) | 0; @@ -46,16 +41,6 @@ class Word64 { } } - shiftLeft(places) { - if (places >= 32) { - this.high = this.low << (places - 32); - this.low = 0; - } else { - this.high = (this.high << places) | (this.low >>> (32 - places)); - this.low <<= places; - } - } - rotateRight(places) { let low, high; if (places & 32) {