mirror of
https://github.com/oxc-project/oxc.git
synced 2026-11-04 10:29:58 +00:00
refactor(lexer): replace const with static (#28695)
Refactor. Use `static` instead of `const` to store large tables.
This commit is contained in:
1 parent
54752f1d16
commit
7bd0eeaee4
1 file changed
+2
-2
@@ -154,8 +154,8 @@ struct OpTablesData {
|
||||
op3: OpTableData<OP3_HASH_TABLE_SIZE>,
|
||||
}
|
||||
|
||||
const OP2_TABLE: OpTable<OP2_HASH_TABLE_SIZE> = OpTable::new(&OP_TABLES_DATA.op2, 2, OP2_MUL);
|
||||
const OP3_TABLE: OpTable<OP3_HASH_TABLE_SIZE> = OpTable::new(&OP_TABLES_DATA.op3, 3, OP3_MUL);
|
||||
static OP2_TABLE: OpTable<OP2_HASH_TABLE_SIZE> = OpTable::new(&OP_TABLES_DATA.op2, 2, OP2_MUL);
|
||||
static OP3_TABLE: OpTable<OP3_HASH_TABLE_SIZE> = OpTable::new(&OP_TABLES_DATA.op3, 3, OP3_MUL);
|
||||
|
||||
/// Operator hash table.
|
||||
struct OpTable<const TABLE_SIZE: usize> {
|
||||
|
||||
Reference in new issue
Block a user