From 4410ac194a48816745065ab85a8012e5345d88a1 Mon Sep 17 00:00:00 2001 From: Leilei332 Date: Sat, 13 Sep 2025 21:22:01 +0800 Subject: [PATCH] Replace LLMap with Map --- core/modules/utils/linked-list.js | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/core/modules/utils/linked-list.js b/core/modules/utils/linked-list.js index 8d7f44676..ca041f7a8 100644 --- a/core/modules/utils/linked-list.js +++ b/core/modules/utils/linked-list.js @@ -16,8 +16,8 @@ function LinkedList() { LinkedList.prototype.clear = function() { // LinkedList performs the duty of both the head and tail node - this.next = new LLMap(); - this.prev = new LLMap(); + this.next = new Map(); + this.prev = new Map(); // Linked list head initially points to itself this.next.set(null, null); this.prev.set(null, null); @@ -190,18 +190,4 @@ function _assertString(value) { } }; -var LLMap = function() { - this.map = Object.create(null); -}; - -// Just a wrapper so our object map can also accept null. -LLMap.prototype = { - set: function(key,val) { - (key === null) ? (this.null = val) : (this.map[key] = val); - }, - get: function(key) { - return (key === null) ? this.null : this.map[key]; - } -}; - exports.LinkedList = LinkedList;