[BinAST] Eliminate string comparison in sorting sum interfaces and enums
Categories
(Core :: JavaScript Engine, task, P3)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox71 | --- | fixed |
People
(Reporter: arai, Assigned: arai)
References
Details
Attachments
(1 external file)
We can have pre-calculated numeric sort key for them and use it instead
| Assignee | ||
Comment 1•7 years ago
|
||
maybe... numeric value of BinASTKind and BinASTVariant can just be used...?
If they are in the same alphanumerical order, sure.
| Assignee | ||
Comment 3•7 years ago
|
||
(In reply to Tooru Fujisawa [:arai] from comment #1)
maybe... numeric value of
BinASTKindandBinASTVariantcan just be used...?
uh, this wasn't the case
BinASTVariant is sorted alphabetically by CPP_NAME (like BinaryOperatorOrUnaryOperatorPlus) and then SPEC_NAME (like +),
but we need to sort them by SPEC_NAME (like +) here.
for BinASTKind, it's in the same order and we can use its numeric value.
I'll check if we can change the order of BinASTVariant.
We could create a second enum BinASTVariantByAlphanumericalOrder and then add a constant-time lookup BinASTVariant => BinASTVariantByAlphanumericalOrder.
| Assignee | ||
Comment 5•7 years ago
|
||
Comment 7•7 years ago
|
||
| bugherder | ||
Description
•