bun_js_parser 0.1.0

A Rust-native programmable browser runtime built on Servo and SpiderMonkey
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
use criterion::{BenchmarkId, Criterion, black_box, criterion_group, criterion_main};
use std::collections::HashSet;

#[derive(Copy, Clone, PartialEq, Eq)]
pub(crate) enum PureGlobalIdentifierValue {
    NaN,
    Infinity,
    StrictUndefined,
    Other,
}

include!(concat!(
    env!("CARGO_MANIFEST_DIR"),
    "/../../build/debug/codegen/defines_table_generated.rs"
));

pub(crate) static PURE_GLOBAL_IDENTIFIER_MAP: phf::Map<&'static [u8], PureGlobalIdentifierValue> = phf::phf_map! {
    b"NaN" => PureGlobalIdentifierValue::NaN,
    b"Infinity" => PureGlobalIdentifierValue::Infinity,
    b"undefined" => PureGlobalIdentifierValue::StrictUndefined,

    // These global identifiers should exist in all JavaScript environments. This
    // deliberately omits "NaN", "Infinity", and "undefined" because these are
    // treated as automatically-inlined constants instead of identifiers.
    b"Array" => PureGlobalIdentifierValue::Other,
    b"Boolean" => PureGlobalIdentifierValue::Other,
    b"Function" => PureGlobalIdentifierValue::Other,
    b"Math" => PureGlobalIdentifierValue::Other,
    b"Number" => PureGlobalIdentifierValue::Other,
    b"Object" => PureGlobalIdentifierValue::Other,
    b"RegExp" => PureGlobalIdentifierValue::Other,
    b"String" => PureGlobalIdentifierValue::Other,

    // Other globals present in both the browser and node (except "eval" because
    // it has special behavior)
    b"AbortController" => PureGlobalIdentifierValue::Other,
    b"AbortSignal" => PureGlobalIdentifierValue::Other,
    b"AggregateError" => PureGlobalIdentifierValue::Other,
    b"ArrayBuffer" => PureGlobalIdentifierValue::Other,
    b"BigInt" => PureGlobalIdentifierValue::Other,
    b"DataView" => PureGlobalIdentifierValue::Other,
    b"Date" => PureGlobalIdentifierValue::Other,
    b"Error" => PureGlobalIdentifierValue::Other,
    b"EvalError" => PureGlobalIdentifierValue::Other,
    b"Event" => PureGlobalIdentifierValue::Other,
    b"EventTarget" => PureGlobalIdentifierValue::Other,
    b"Float16Array" => PureGlobalIdentifierValue::Other,
    b"Float32Array" => PureGlobalIdentifierValue::Other,
    b"Float64Array" => PureGlobalIdentifierValue::Other,
    b"Int16Array" => PureGlobalIdentifierValue::Other,
    b"Int32Array" => PureGlobalIdentifierValue::Other,
    b"Int8Array" => PureGlobalIdentifierValue::Other,
    b"Intl" => PureGlobalIdentifierValue::Other,
    b"JSON" => PureGlobalIdentifierValue::Other,
    b"Map" => PureGlobalIdentifierValue::Other,
    b"MessageChannel" => PureGlobalIdentifierValue::Other,
    b"MessageEvent" => PureGlobalIdentifierValue::Other,
    b"MessagePort" => PureGlobalIdentifierValue::Other,
    b"Promise" => PureGlobalIdentifierValue::Other,
    b"Proxy" => PureGlobalIdentifierValue::Other,
    b"RangeError" => PureGlobalIdentifierValue::Other,
    b"ReferenceError" => PureGlobalIdentifierValue::Other,
    b"Reflect" => PureGlobalIdentifierValue::Other,
    b"Set" => PureGlobalIdentifierValue::Other,
    b"Symbol" => PureGlobalIdentifierValue::Other,
    b"SyntaxError" => PureGlobalIdentifierValue::Other,
    b"TextDecoder" => PureGlobalIdentifierValue::Other,
    b"TextEncoder" => PureGlobalIdentifierValue::Other,
    b"TypeError" => PureGlobalIdentifierValue::Other,
    b"URIError" => PureGlobalIdentifierValue::Other,
    b"URL" => PureGlobalIdentifierValue::Other,
    b"URLSearchParams" => PureGlobalIdentifierValue::Other,
    b"Uint16Array" => PureGlobalIdentifierValue::Other,
    b"Uint32Array" => PureGlobalIdentifierValue::Other,
    b"Uint8Array" => PureGlobalIdentifierValue::Other,
    b"Uint8ClampedArray" => PureGlobalIdentifierValue::Other,
    b"WeakMap" => PureGlobalIdentifierValue::Other,
    b"WeakSet" => PureGlobalIdentifierValue::Other,
    b"WebAssembly" => PureGlobalIdentifierValue::Other,
    b"clearInterval" => PureGlobalIdentifierValue::Other,
    b"clearTimeout" => PureGlobalIdentifierValue::Other,
    b"console" => PureGlobalIdentifierValue::Other,
    b"decodeURI" => PureGlobalIdentifierValue::Other,
    b"decodeURIComponent" => PureGlobalIdentifierValue::Other,
    b"encodeURI" => PureGlobalIdentifierValue::Other,
    b"encodeURIComponent" => PureGlobalIdentifierValue::Other,
    b"escape" => PureGlobalIdentifierValue::Other,
    b"globalThis" => PureGlobalIdentifierValue::Other,
    b"isFinite" => PureGlobalIdentifierValue::Other,
    b"isNaN" => PureGlobalIdentifierValue::Other,
    b"parseFloat" => PureGlobalIdentifierValue::Other,
    b"parseInt" => PureGlobalIdentifierValue::Other,
    b"queueMicrotask" => PureGlobalIdentifierValue::Other,
    b"setInterval" => PureGlobalIdentifierValue::Other,
    b"setTimeout" => PureGlobalIdentifierValue::Other,
    b"unescape" => PureGlobalIdentifierValue::Other,

    // CSSOM APIs
    b"CSSAnimation" => PureGlobalIdentifierValue::Other,
    b"CSSFontFaceRule" => PureGlobalIdentifierValue::Other,
    b"CSSImportRule" => PureGlobalIdentifierValue::Other,
    b"CSSKeyframeRule" => PureGlobalIdentifierValue::Other,
    b"CSSKeyframesRule" => PureGlobalIdentifierValue::Other,
    b"CSSMediaRule" => PureGlobalIdentifierValue::Other,
    b"CSSNamespaceRule" => PureGlobalIdentifierValue::Other,
    b"CSSPageRule" => PureGlobalIdentifierValue::Other,
    b"CSSRule" => PureGlobalIdentifierValue::Other,
    b"CSSRuleList" => PureGlobalIdentifierValue::Other,
    b"CSSStyleDeclaration" => PureGlobalIdentifierValue::Other,
    b"CSSStyleRule" => PureGlobalIdentifierValue::Other,
    b"CSSStyleSheet" => PureGlobalIdentifierValue::Other,
    b"CSSSupportsRule" => PureGlobalIdentifierValue::Other,
    b"CSSTransition" => PureGlobalIdentifierValue::Other,

    // SVG DOM
    b"SVGAElement" => PureGlobalIdentifierValue::Other,
    b"SVGAngle" => PureGlobalIdentifierValue::Other,
    b"SVGAnimateElement" => PureGlobalIdentifierValue::Other,
    b"SVGAnimateMotionElement" => PureGlobalIdentifierValue::Other,
    b"SVGAnimateTransformElement" => PureGlobalIdentifierValue::Other,
    b"SVGAnimatedAngle" => PureGlobalIdentifierValue::Other,
    b"SVGAnimatedBoolean" => PureGlobalIdentifierValue::Other,
    b"SVGAnimatedEnumeration" => PureGlobalIdentifierValue::Other,
    b"SVGAnimatedInteger" => PureGlobalIdentifierValue::Other,
    b"SVGAnimatedLength" => PureGlobalIdentifierValue::Other,
    b"SVGAnimatedLengthList" => PureGlobalIdentifierValue::Other,
    b"SVGAnimatedNumber" => PureGlobalIdentifierValue::Other,
    b"SVGAnimatedNumberList" => PureGlobalIdentifierValue::Other,
    b"SVGAnimatedPreserveAspectRatio" => PureGlobalIdentifierValue::Other,
    b"SVGAnimatedRect" => PureGlobalIdentifierValue::Other,
    b"SVGAnimatedString" => PureGlobalIdentifierValue::Other,
    b"SVGAnimatedTransformList" => PureGlobalIdentifierValue::Other,
    b"SVGAnimationElement" => PureGlobalIdentifierValue::Other,
    b"SVGCircleElement" => PureGlobalIdentifierValue::Other,
    b"SVGClipPathElement" => PureGlobalIdentifierValue::Other,
    b"SVGComponentTransferFunctionElement" => PureGlobalIdentifierValue::Other,
    b"SVGDefsElement" => PureGlobalIdentifierValue::Other,
    b"SVGDescElement" => PureGlobalIdentifierValue::Other,
    b"SVGElement" => PureGlobalIdentifierValue::Other,
    b"SVGEllipseElement" => PureGlobalIdentifierValue::Other,
    b"SVGFEBlendElement" => PureGlobalIdentifierValue::Other,
    b"SVGFEColorMatrixElement" => PureGlobalIdentifierValue::Other,
    b"SVGFEComponentTransferElement" => PureGlobalIdentifierValue::Other,
    b"SVGFECompositeElement" => PureGlobalIdentifierValue::Other,
    b"SVGFEConvolveMatrixElement" => PureGlobalIdentifierValue::Other,
    b"SVGFEDiffuseLightingElement" => PureGlobalIdentifierValue::Other,
    b"SVGFEDisplacementMapElement" => PureGlobalIdentifierValue::Other,
    b"SVGFEDistantLightElement" => PureGlobalIdentifierValue::Other,
    b"SVGFEDropShadowElement" => PureGlobalIdentifierValue::Other,
    b"SVGFEFloodElement" => PureGlobalIdentifierValue::Other,
    b"SVGFEFuncAElement" => PureGlobalIdentifierValue::Other,
    b"SVGFEFuncBElement" => PureGlobalIdentifierValue::Other,
    b"SVGFEFuncGElement" => PureGlobalIdentifierValue::Other,
    b"SVGFEFuncRElement" => PureGlobalIdentifierValue::Other,
    b"SVGFEGaussianBlurElement" => PureGlobalIdentifierValue::Other,
    b"SVGFEImageElement" => PureGlobalIdentifierValue::Other,
    b"SVGFEMergeElement" => PureGlobalIdentifierValue::Other,
    b"SVGFEMergeNodeElement" => PureGlobalIdentifierValue::Other,
    b"SVGFEMorphologyElement" => PureGlobalIdentifierValue::Other,
    b"SVGFEOffsetElement" => PureGlobalIdentifierValue::Other,
    b"SVGFEPointLightElement" => PureGlobalIdentifierValue::Other,
    b"SVGFESpecularLightingElement" => PureGlobalIdentifierValue::Other,
    b"SVGFESpotLightElement" => PureGlobalIdentifierValue::Other,
    b"SVGFETileElement" => PureGlobalIdentifierValue::Other,
    b"SVGFETurbulenceElement" => PureGlobalIdentifierValue::Other,
    b"SVGFilterElement" => PureGlobalIdentifierValue::Other,
    b"SVGForeignObjectElement" => PureGlobalIdentifierValue::Other,
    b"SVGGElement" => PureGlobalIdentifierValue::Other,
    b"SVGGeometryElement" => PureGlobalIdentifierValue::Other,
    b"SVGGradientElement" => PureGlobalIdentifierValue::Other,
    b"SVGGraphicsElement" => PureGlobalIdentifierValue::Other,
    b"SVGImageElement" => PureGlobalIdentifierValue::Other,
    b"SVGLength" => PureGlobalIdentifierValue::Other,
    b"SVGLengthList" => PureGlobalIdentifierValue::Other,
    b"SVGLineElement" => PureGlobalIdentifierValue::Other,
    b"SVGLinearGradientElement" => PureGlobalIdentifierValue::Other,
    b"SVGMPathElement" => PureGlobalIdentifierValue::Other,
    b"SVGMarkerElement" => PureGlobalIdentifierValue::Other,
    b"SVGMaskElement" => PureGlobalIdentifierValue::Other,
    b"SVGMatrix" => PureGlobalIdentifierValue::Other,
    b"SVGMetadataElement" => PureGlobalIdentifierValue::Other,
    b"SVGNumber" => PureGlobalIdentifierValue::Other,
    b"SVGNumberList" => PureGlobalIdentifierValue::Other,
    b"SVGPathElement" => PureGlobalIdentifierValue::Other,
    b"SVGPatternElement" => PureGlobalIdentifierValue::Other,
    b"SVGPoint" => PureGlobalIdentifierValue::Other,
    b"SVGPointList" => PureGlobalIdentifierValue::Other,
    b"SVGPolygonElement" => PureGlobalIdentifierValue::Other,
    b"SVGPolylineElement" => PureGlobalIdentifierValue::Other,
    b"SVGPreserveAspectRatio" => PureGlobalIdentifierValue::Other,
    b"SVGRadialGradientElement" => PureGlobalIdentifierValue::Other,
    b"SVGRect" => PureGlobalIdentifierValue::Other,
    b"SVGRectElement" => PureGlobalIdentifierValue::Other,
    b"SVGSVGElement" => PureGlobalIdentifierValue::Other,
    b"SVGScriptElement" => PureGlobalIdentifierValue::Other,
    b"SVGSetElement" => PureGlobalIdentifierValue::Other,
    b"SVGStopElement" => PureGlobalIdentifierValue::Other,
    b"SVGStringList" => PureGlobalIdentifierValue::Other,
    b"SVGStyleElement" => PureGlobalIdentifierValue::Other,
    b"SVGSwitchElement" => PureGlobalIdentifierValue::Other,
    b"SVGSymbolElement" => PureGlobalIdentifierValue::Other,
    b"SVGTSpanElement" => PureGlobalIdentifierValue::Other,
    b"SVGTextContentElement" => PureGlobalIdentifierValue::Other,
    b"SVGTextElement" => PureGlobalIdentifierValue::Other,
    b"SVGTextPathElement" => PureGlobalIdentifierValue::Other,
    b"SVGTextPositioningElement" => PureGlobalIdentifierValue::Other,
    b"SVGTitleElement" => PureGlobalIdentifierValue::Other,
    b"SVGTransform" => PureGlobalIdentifierValue::Other,
    b"SVGTransformList" => PureGlobalIdentifierValue::Other,
    b"SVGUnitTypes" => PureGlobalIdentifierValue::Other,
    b"SVGUseElement" => PureGlobalIdentifierValue::Other,
    b"SVGViewElement" => PureGlobalIdentifierValue::Other,

    // Other browser APIs
    //
    // This list contains all globals present in modern versions of Chrome, Safari,
    // and Firefox except for the following properties, since they have a side effect
    // of triggering layout (https://gist.github.com/paulirish/5d52fb081b3570c81e3a):
    //
    //   - scrollX
    //   - scrollY
    //   - innerWidth
    //   - innerHeight
    //   - pageXOffset
    //   - pageYOffset
    //
    // The following globals have also been removed since they sometimes throw an
    // exception when accessed, which is a side effect (for more information see
    // https://stackoverflow.com/a/33047477):
    //
    //   - localStorage
    //   - sessionStorage
    //
    b"AnalyserNode" => PureGlobalIdentifierValue::Other,
    b"Animation" => PureGlobalIdentifierValue::Other,
    b"AnimationEffect" => PureGlobalIdentifierValue::Other,
    b"AnimationEvent" => PureGlobalIdentifierValue::Other,
    b"AnimationPlaybackEvent" => PureGlobalIdentifierValue::Other,
    b"AnimationTimeline" => PureGlobalIdentifierValue::Other,
    b"Attr" => PureGlobalIdentifierValue::Other,
    b"Audio" => PureGlobalIdentifierValue::Other,
    b"AudioBuffer" => PureGlobalIdentifierValue::Other,
    b"AudioBufferSourceNode" => PureGlobalIdentifierValue::Other,
    b"AudioDestinationNode" => PureGlobalIdentifierValue::Other,
    b"AudioListener" => PureGlobalIdentifierValue::Other,
    b"AudioNode" => PureGlobalIdentifierValue::Other,
    b"AudioParam" => PureGlobalIdentifierValue::Other,
    b"AudioProcessingEvent" => PureGlobalIdentifierValue::Other,
    b"AudioScheduledSourceNode" => PureGlobalIdentifierValue::Other,
    b"BarProp" => PureGlobalIdentifierValue::Other,
    b"BeforeUnloadEvent" => PureGlobalIdentifierValue::Other,
    b"BiquadFilterNode" => PureGlobalIdentifierValue::Other,
    b"Blob" => PureGlobalIdentifierValue::Other,
    b"BlobEvent" => PureGlobalIdentifierValue::Other,
    b"ByteLengthQueuingStrategy" => PureGlobalIdentifierValue::Other,
    b"CDATASection" => PureGlobalIdentifierValue::Other,
    b"CSS" => PureGlobalIdentifierValue::Other,
    b"CanvasGradient" => PureGlobalIdentifierValue::Other,
    b"CanvasPattern" => PureGlobalIdentifierValue::Other,
    b"CanvasRenderingContext2D" => PureGlobalIdentifierValue::Other,
    b"ChannelMergerNode" => PureGlobalIdentifierValue::Other,
    b"ChannelSplitterNode" => PureGlobalIdentifierValue::Other,
    b"CharacterData" => PureGlobalIdentifierValue::Other,
    b"ClipboardEvent" => PureGlobalIdentifierValue::Other,
    b"CloseEvent" => PureGlobalIdentifierValue::Other,
    b"Comment" => PureGlobalIdentifierValue::Other,
    b"CompositionEvent" => PureGlobalIdentifierValue::Other,
    b"ConvolverNode" => PureGlobalIdentifierValue::Other,
    b"CountQueuingStrategy" => PureGlobalIdentifierValue::Other,
    b"Crypto" => PureGlobalIdentifierValue::Other,
    b"CustomElementRegistry" => PureGlobalIdentifierValue::Other,
    b"CustomEvent" => PureGlobalIdentifierValue::Other,
    b"DOMException" => PureGlobalIdentifierValue::Other,
    b"DOMImplementation" => PureGlobalIdentifierValue::Other,
    b"DOMMatrix" => PureGlobalIdentifierValue::Other,
    b"DOMMatrixReadOnly" => PureGlobalIdentifierValue::Other,
    b"DOMParser" => PureGlobalIdentifierValue::Other,
    b"DOMPoint" => PureGlobalIdentifierValue::Other,
    b"DOMPointReadOnly" => PureGlobalIdentifierValue::Other,
    b"DOMQuad" => PureGlobalIdentifierValue::Other,
    b"DOMRect" => PureGlobalIdentifierValue::Other,
    b"DOMRectList" => PureGlobalIdentifierValue::Other,
    b"DOMRectReadOnly" => PureGlobalIdentifierValue::Other,
    b"DOMStringList" => PureGlobalIdentifierValue::Other,
    b"DOMStringMap" => PureGlobalIdentifierValue::Other,
    b"DOMTokenList" => PureGlobalIdentifierValue::Other,
    b"DataTransfer" => PureGlobalIdentifierValue::Other,
    b"DataTransferItem" => PureGlobalIdentifierValue::Other,
    b"DataTransferItemList" => PureGlobalIdentifierValue::Other,
    b"DelayNode" => PureGlobalIdentifierValue::Other,
    b"Document" => PureGlobalIdentifierValue::Other,
    b"DocumentFragment" => PureGlobalIdentifierValue::Other,
    b"DocumentTimeline" => PureGlobalIdentifierValue::Other,
    b"DocumentType" => PureGlobalIdentifierValue::Other,
    b"DragEvent" => PureGlobalIdentifierValue::Other,
    b"DynamicsCompressorNode" => PureGlobalIdentifierValue::Other,
    b"Element" => PureGlobalIdentifierValue::Other,
    b"ErrorEvent" => PureGlobalIdentifierValue::Other,
    b"EventSource" => PureGlobalIdentifierValue::Other,
    b"File" => PureGlobalIdentifierValue::Other,
    b"FileList" => PureGlobalIdentifierValue::Other,
    b"FileReader" => PureGlobalIdentifierValue::Other,
    b"FocusEvent" => PureGlobalIdentifierValue::Other,
    b"FontFace" => PureGlobalIdentifierValue::Other,
    b"FormData" => PureGlobalIdentifierValue::Other,
    b"GainNode" => PureGlobalIdentifierValue::Other,
    b"Gamepad" => PureGlobalIdentifierValue::Other,
    b"GamepadButton" => PureGlobalIdentifierValue::Other,
    b"GamepadEvent" => PureGlobalIdentifierValue::Other,
    b"Geolocation" => PureGlobalIdentifierValue::Other,
    b"GeolocationPositionError" => PureGlobalIdentifierValue::Other,
    b"HTMLAllCollection" => PureGlobalIdentifierValue::Other,
    b"HTMLAnchorElement" => PureGlobalIdentifierValue::Other,
    b"HTMLAreaElement" => PureGlobalIdentifierValue::Other,
    b"HTMLAudioElement" => PureGlobalIdentifierValue::Other,
    b"HTMLBRElement" => PureGlobalIdentifierValue::Other,
    b"HTMLBaseElement" => PureGlobalIdentifierValue::Other,
    b"HTMLBodyElement" => PureGlobalIdentifierValue::Other,
    b"HTMLButtonElement" => PureGlobalIdentifierValue::Other,
    b"HTMLCanvasElement" => PureGlobalIdentifierValue::Other,
    b"HTMLCollection" => PureGlobalIdentifierValue::Other,
    b"HTMLDListElement" => PureGlobalIdentifierValue::Other,
    b"HTMLDataElement" => PureGlobalIdentifierValue::Other,
    b"HTMLDataListElement" => PureGlobalIdentifierValue::Other,
    b"HTMLDetailsElement" => PureGlobalIdentifierValue::Other,
    b"HTMLDirectoryElement" => PureGlobalIdentifierValue::Other,
    b"HTMLDivElement" => PureGlobalIdentifierValue::Other,
    b"HTMLDocument" => PureGlobalIdentifierValue::Other,
    b"HTMLElement" => PureGlobalIdentifierValue::Other,
    b"HTMLEmbedElement" => PureGlobalIdentifierValue::Other,
    b"HTMLFieldSetElement" => PureGlobalIdentifierValue::Other,
    b"HTMLFontElement" => PureGlobalIdentifierValue::Other,
    b"HTMLFormControlsCollection" => PureGlobalIdentifierValue::Other,
    b"HTMLFormElement" => PureGlobalIdentifierValue::Other,
    b"HTMLFrameElement" => PureGlobalIdentifierValue::Other,
    b"HTMLFrameSetElement" => PureGlobalIdentifierValue::Other,
    b"HTMLHRElement" => PureGlobalIdentifierValue::Other,
    b"HTMLHeadElement" => PureGlobalIdentifierValue::Other,
    b"HTMLHeadingElement" => PureGlobalIdentifierValue::Other,
    b"HTMLHtmlElement" => PureGlobalIdentifierValue::Other,
    b"HTMLIFrameElement" => PureGlobalIdentifierValue::Other,
    b"HTMLImageElement" => PureGlobalIdentifierValue::Other,
    b"HTMLInputElement" => PureGlobalIdentifierValue::Other,
    b"HTMLLIElement" => PureGlobalIdentifierValue::Other,
    b"HTMLLabelElement" => PureGlobalIdentifierValue::Other,
    b"HTMLLegendElement" => PureGlobalIdentifierValue::Other,
    b"HTMLLinkElement" => PureGlobalIdentifierValue::Other,
    b"HTMLMapElement" => PureGlobalIdentifierValue::Other,
    b"HTMLMarqueeElement" => PureGlobalIdentifierValue::Other,
    b"HTMLMediaElement" => PureGlobalIdentifierValue::Other,
    b"HTMLMenuElement" => PureGlobalIdentifierValue::Other,
    b"HTMLMetaElement" => PureGlobalIdentifierValue::Other,
    b"HTMLMeterElement" => PureGlobalIdentifierValue::Other,
    b"HTMLModElement" => PureGlobalIdentifierValue::Other,
    b"HTMLOListElement" => PureGlobalIdentifierValue::Other,
    b"HTMLObjectElement" => PureGlobalIdentifierValue::Other,
    b"HTMLOptGroupElement" => PureGlobalIdentifierValue::Other,
    b"HTMLOptionElement" => PureGlobalIdentifierValue::Other,
    b"HTMLOptionsCollection" => PureGlobalIdentifierValue::Other,
    b"HTMLOutputElement" => PureGlobalIdentifierValue::Other,
    b"HTMLParagraphElement" => PureGlobalIdentifierValue::Other,
    b"HTMLParamElement" => PureGlobalIdentifierValue::Other,
    b"HTMLPictureElement" => PureGlobalIdentifierValue::Other,
    b"HTMLPreElement" => PureGlobalIdentifierValue::Other,
    b"HTMLProgressElement" => PureGlobalIdentifierValue::Other,
    b"HTMLQuoteElement" => PureGlobalIdentifierValue::Other,
    b"HTMLScriptElement" => PureGlobalIdentifierValue::Other,
    b"HTMLSelectElement" => PureGlobalIdentifierValue::Other,
    b"HTMLSlotElement" => PureGlobalIdentifierValue::Other,
    b"HTMLSourceElement" => PureGlobalIdentifierValue::Other,
    b"HTMLSpanElement" => PureGlobalIdentifierValue::Other,
    b"HTMLStyleElement" => PureGlobalIdentifierValue::Other,
    b"HTMLTableCaptionElement" => PureGlobalIdentifierValue::Other,
    b"HTMLTableCellElement" => PureGlobalIdentifierValue::Other,
    b"HTMLTableColElement" => PureGlobalIdentifierValue::Other,
    b"HTMLTableElement" => PureGlobalIdentifierValue::Other,
    b"HTMLTableRowElement" => PureGlobalIdentifierValue::Other,
    b"HTMLTableSectionElement" => PureGlobalIdentifierValue::Other,
    b"HTMLTemplateElement" => PureGlobalIdentifierValue::Other,
    b"HTMLTextAreaElement" => PureGlobalIdentifierValue::Other,
    b"HTMLTimeElement" => PureGlobalIdentifierValue::Other,
    b"HTMLTitleElement" => PureGlobalIdentifierValue::Other,
    b"HTMLTrackElement" => PureGlobalIdentifierValue::Other,
    b"HTMLUListElement" => PureGlobalIdentifierValue::Other,
    b"HTMLUnknownElement" => PureGlobalIdentifierValue::Other,
    b"HTMLVideoElement" => PureGlobalIdentifierValue::Other,
    b"HashChangeEvent" => PureGlobalIdentifierValue::Other,
    b"Headers" => PureGlobalIdentifierValue::Other,
    b"History" => PureGlobalIdentifierValue::Other,
    b"IDBCursor" => PureGlobalIdentifierValue::Other,
    b"IDBCursorWithValue" => PureGlobalIdentifierValue::Other,
    b"IDBDatabase" => PureGlobalIdentifierValue::Other,
    b"IDBFactory" => PureGlobalIdentifierValue::Other,
    b"IDBIndex" => PureGlobalIdentifierValue::Other,
    b"IDBKeyRange" => PureGlobalIdentifierValue::Other,
    b"IDBObjectStore" => PureGlobalIdentifierValue::Other,
    b"IDBOpenDBRequest" => PureGlobalIdentifierValue::Other,
    b"IDBRequest" => PureGlobalIdentifierValue::Other,
    b"IDBTransaction" => PureGlobalIdentifierValue::Other,
    b"IDBVersionChangeEvent" => PureGlobalIdentifierValue::Other,
    b"Image" => PureGlobalIdentifierValue::Other,
    b"ImageData" => PureGlobalIdentifierValue::Other,
    b"InputEvent" => PureGlobalIdentifierValue::Other,
    b"IntersectionObserver" => PureGlobalIdentifierValue::Other,
    b"IntersectionObserverEntry" => PureGlobalIdentifierValue::Other,
    b"KeyboardEvent" => PureGlobalIdentifierValue::Other,
    b"KeyframeEffect" => PureGlobalIdentifierValue::Other,
    b"Location" => PureGlobalIdentifierValue::Other,
    b"MediaCapabilities" => PureGlobalIdentifierValue::Other,
    b"MediaElementAudioSourceNode" => PureGlobalIdentifierValue::Other,
    b"MediaEncryptedEvent" => PureGlobalIdentifierValue::Other,
    b"MediaError" => PureGlobalIdentifierValue::Other,
    b"MediaList" => PureGlobalIdentifierValue::Other,
    b"MediaQueryList" => PureGlobalIdentifierValue::Other,
    b"MediaQueryListEvent" => PureGlobalIdentifierValue::Other,
    b"MediaRecorder" => PureGlobalIdentifierValue::Other,
    b"MediaSource" => PureGlobalIdentifierValue::Other,
    b"MediaStream" => PureGlobalIdentifierValue::Other,
    b"MediaStreamAudioDestinationNode" => PureGlobalIdentifierValue::Other,
    b"MediaStreamAudioSourceNode" => PureGlobalIdentifierValue::Other,
    b"MediaStreamTrack" => PureGlobalIdentifierValue::Other,
    b"MediaStreamTrackEvent" => PureGlobalIdentifierValue::Other,
    b"MimeType" => PureGlobalIdentifierValue::Other,
    b"MimeTypeArray" => PureGlobalIdentifierValue::Other,
    b"MouseEvent" => PureGlobalIdentifierValue::Other,
    b"MutationEvent" => PureGlobalIdentifierValue::Other,
    b"MutationObserver" => PureGlobalIdentifierValue::Other,
    b"MutationRecord" => PureGlobalIdentifierValue::Other,
    b"NamedNodeMap" => PureGlobalIdentifierValue::Other,
    b"Navigator" => PureGlobalIdentifierValue::Other,
    b"Node" => PureGlobalIdentifierValue::Other,
    b"NodeFilter" => PureGlobalIdentifierValue::Other,
    b"NodeIterator" => PureGlobalIdentifierValue::Other,
    b"NodeList" => PureGlobalIdentifierValue::Other,
    b"Notification" => PureGlobalIdentifierValue::Other,
    b"OfflineAudioCompletionEvent" => PureGlobalIdentifierValue::Other,
    b"Option" => PureGlobalIdentifierValue::Other,
    b"OscillatorNode" => PureGlobalIdentifierValue::Other,
    b"PageTransitionEvent" => PureGlobalIdentifierValue::Other,
    b"Path2D" => PureGlobalIdentifierValue::Other,
    b"Performance" => PureGlobalIdentifierValue::Other,
    b"PerformanceEntry" => PureGlobalIdentifierValue::Other,
    b"PerformanceMark" => PureGlobalIdentifierValue::Other,
    b"PerformanceMeasure" => PureGlobalIdentifierValue::Other,
    b"PerformanceNavigation" => PureGlobalIdentifierValue::Other,
    b"PerformanceObserver" => PureGlobalIdentifierValue::Other,
    b"PerformanceObserverEntryList" => PureGlobalIdentifierValue::Other,
    b"PerformanceResourceTiming" => PureGlobalIdentifierValue::Other,
    b"PerformanceTiming" => PureGlobalIdentifierValue::Other,
    b"PeriodicWave" => PureGlobalIdentifierValue::Other,
    b"Plugin" => PureGlobalIdentifierValue::Other,
    b"PluginArray" => PureGlobalIdentifierValue::Other,
    b"PointerEvent" => PureGlobalIdentifierValue::Other,
    b"PopStateEvent" => PureGlobalIdentifierValue::Other,
    b"ProcessingInstruction" => PureGlobalIdentifierValue::Other,
    b"ProgressEvent" => PureGlobalIdentifierValue::Other,
    b"PromiseRejectionEvent" => PureGlobalIdentifierValue::Other,
    b"RTCCertificate" => PureGlobalIdentifierValue::Other,
    b"RTCDTMFSender" => PureGlobalIdentifierValue::Other,
    b"RTCDTMFToneChangeEvent" => PureGlobalIdentifierValue::Other,
    b"RTCDataChannel" => PureGlobalIdentifierValue::Other,
    b"RTCDataChannelEvent" => PureGlobalIdentifierValue::Other,
    b"RTCIceCandidate" => PureGlobalIdentifierValue::Other,
    b"RTCPeerConnection" => PureGlobalIdentifierValue::Other,
    b"RTCPeerConnectionIceEvent" => PureGlobalIdentifierValue::Other,
    b"RTCRtpReceiver" => PureGlobalIdentifierValue::Other,
    b"RTCRtpSender" => PureGlobalIdentifierValue::Other,
    b"RTCRtpTransceiver" => PureGlobalIdentifierValue::Other,
    b"RTCSessionDescription" => PureGlobalIdentifierValue::Other,
    b"RTCStatsReport" => PureGlobalIdentifierValue::Other,
    b"RTCTrackEvent" => PureGlobalIdentifierValue::Other,
    b"RadioNodeList" => PureGlobalIdentifierValue::Other,
    b"Range" => PureGlobalIdentifierValue::Other,
    b"ReadableStream" => PureGlobalIdentifierValue::Other,
    b"Request" => PureGlobalIdentifierValue::Other,
    b"ResizeObserver" => PureGlobalIdentifierValue::Other,
    b"ResizeObserverEntry" => PureGlobalIdentifierValue::Other,
    b"Response" => PureGlobalIdentifierValue::Other,
    b"Screen" => PureGlobalIdentifierValue::Other,
    b"ScriptProcessorNode" => PureGlobalIdentifierValue::Other,
    b"SecurityPolicyViolationEvent" => PureGlobalIdentifierValue::Other,
    b"Selection" => PureGlobalIdentifierValue::Other,
    b"ShadowRoot" => PureGlobalIdentifierValue::Other,
    b"SourceBuffer" => PureGlobalIdentifierValue::Other,
    b"SourceBufferList" => PureGlobalIdentifierValue::Other,
    b"SpeechSynthesisEvent" => PureGlobalIdentifierValue::Other,
    b"SpeechSynthesisUtterance" => PureGlobalIdentifierValue::Other,
    b"StaticRange" => PureGlobalIdentifierValue::Other,
    b"Storage" => PureGlobalIdentifierValue::Other,
    b"StorageEvent" => PureGlobalIdentifierValue::Other,
    b"StyleSheet" => PureGlobalIdentifierValue::Other,
    b"StyleSheetList" => PureGlobalIdentifierValue::Other,
    b"Text" => PureGlobalIdentifierValue::Other,
    b"TextMetrics" => PureGlobalIdentifierValue::Other,
    b"TextTrack" => PureGlobalIdentifierValue::Other,
    b"TextTrackCue" => PureGlobalIdentifierValue::Other,
    b"TextTrackCueList" => PureGlobalIdentifierValue::Other,
    b"TextTrackList" => PureGlobalIdentifierValue::Other,
    b"TimeRanges" => PureGlobalIdentifierValue::Other,
    b"TrackEvent" => PureGlobalIdentifierValue::Other,
    b"TransitionEvent" => PureGlobalIdentifierValue::Other,
    b"TreeWalker" => PureGlobalIdentifierValue::Other,
    b"UIEvent" => PureGlobalIdentifierValue::Other,
    b"VTTCue" => PureGlobalIdentifierValue::Other,
    b"ValidityState" => PureGlobalIdentifierValue::Other,
    b"VisualViewport" => PureGlobalIdentifierValue::Other,
    b"WaveShaperNode" => PureGlobalIdentifierValue::Other,
    b"WebGLActiveInfo" => PureGlobalIdentifierValue::Other,
    b"WebGLBuffer" => PureGlobalIdentifierValue::Other,
    b"WebGLContextEvent" => PureGlobalIdentifierValue::Other,
    b"WebGLFramebuffer" => PureGlobalIdentifierValue::Other,
    b"WebGLProgram" => PureGlobalIdentifierValue::Other,
    b"WebGLQuery" => PureGlobalIdentifierValue::Other,
    b"WebGLRenderbuffer" => PureGlobalIdentifierValue::Other,
    b"WebGLRenderingContext" => PureGlobalIdentifierValue::Other,
    b"WebGLSampler" => PureGlobalIdentifierValue::Other,
    b"WebGLShader" => PureGlobalIdentifierValue::Other,
    b"WebGLShaderPrecisionFormat" => PureGlobalIdentifierValue::Other,
    b"WebGLSync" => PureGlobalIdentifierValue::Other,
    b"WebGLTexture" => PureGlobalIdentifierValue::Other,
    b"WebGLUniformLocation" => PureGlobalIdentifierValue::Other,
    b"WebKitCSSMatrix" => PureGlobalIdentifierValue::Other,
    b"WebSocket" => PureGlobalIdentifierValue::Other,
    b"WheelEvent" => PureGlobalIdentifierValue::Other,
    b"Window" => PureGlobalIdentifierValue::Other,
    b"Worker" => PureGlobalIdentifierValue::Other,
    b"XMLDocument" => PureGlobalIdentifierValue::Other,
    b"XMLHttpRequest" => PureGlobalIdentifierValue::Other,
    b"XMLHttpRequestEventTarget" => PureGlobalIdentifierValue::Other,
    b"XMLHttpRequestUpload" => PureGlobalIdentifierValue::Other,
    b"XMLSerializer" => PureGlobalIdentifierValue::Other,
    b"XPathEvaluator" => PureGlobalIdentifierValue::Other,
    b"XPathExpression" => PureGlobalIdentifierValue::Other,
    b"XPathResult" => PureGlobalIdentifierValue::Other,
    b"XSLTProcessor" => PureGlobalIdentifierValue::Other,
    b"alert" => PureGlobalIdentifierValue::Other,
    b"atob" => PureGlobalIdentifierValue::Other,
    b"blur" => PureGlobalIdentifierValue::Other,
    b"btoa" => PureGlobalIdentifierValue::Other,
    b"cancelAnimationFrame" => PureGlobalIdentifierValue::Other,
    b"captureEvents" => PureGlobalIdentifierValue::Other,
    b"close" => PureGlobalIdentifierValue::Other,
    b"closed" => PureGlobalIdentifierValue::Other,
    b"confirm" => PureGlobalIdentifierValue::Other,
    b"customElements" => PureGlobalIdentifierValue::Other,
    b"devicePixelRatio" => PureGlobalIdentifierValue::Other,
    b"document" => PureGlobalIdentifierValue::Other,
    b"event" => PureGlobalIdentifierValue::Other,
    b"fetch" => PureGlobalIdentifierValue::Other,
    b"find" => PureGlobalIdentifierValue::Other,
    b"focus" => PureGlobalIdentifierValue::Other,
    b"frameElement" => PureGlobalIdentifierValue::Other,
    b"frames" => PureGlobalIdentifierValue::Other,
    b"getComputedStyle" => PureGlobalIdentifierValue::Other,
    b"getSelection" => PureGlobalIdentifierValue::Other,
    b"history" => PureGlobalIdentifierValue::Other,
    b"indexedDB" => PureGlobalIdentifierValue::Other,
    b"isSecureContext" => PureGlobalIdentifierValue::Other,
    b"length" => PureGlobalIdentifierValue::Other,
    b"location" => PureGlobalIdentifierValue::Other,
    b"locationbar" => PureGlobalIdentifierValue::Other,
    b"matchMedia" => PureGlobalIdentifierValue::Other,
    b"menubar" => PureGlobalIdentifierValue::Other,
    b"moveBy" => PureGlobalIdentifierValue::Other,
    b"moveTo" => PureGlobalIdentifierValue::Other,
    b"name" => PureGlobalIdentifierValue::Other,
    b"navigator" => PureGlobalIdentifierValue::Other,
    b"onabort" => PureGlobalIdentifierValue::Other,
    b"onafterprint" => PureGlobalIdentifierValue::Other,
    b"onanimationend" => PureGlobalIdentifierValue::Other,
    b"onanimationiteration" => PureGlobalIdentifierValue::Other,
    b"onanimationstart" => PureGlobalIdentifierValue::Other,
    b"onbeforeprint" => PureGlobalIdentifierValue::Other,
    b"onbeforeunload" => PureGlobalIdentifierValue::Other,
    b"onblur" => PureGlobalIdentifierValue::Other,
    b"oncanplay" => PureGlobalIdentifierValue::Other,
    b"oncanplaythrough" => PureGlobalIdentifierValue::Other,
    b"onchange" => PureGlobalIdentifierValue::Other,
    b"onclick" => PureGlobalIdentifierValue::Other,
    b"oncontextmenu" => PureGlobalIdentifierValue::Other,
    b"oncuechange" => PureGlobalIdentifierValue::Other,
    b"ondblclick" => PureGlobalIdentifierValue::Other,
    b"ondrag" => PureGlobalIdentifierValue::Other,
    b"ondragend" => PureGlobalIdentifierValue::Other,
    b"ondragenter" => PureGlobalIdentifierValue::Other,
    b"ondragleave" => PureGlobalIdentifierValue::Other,
    b"ondragover" => PureGlobalIdentifierValue::Other,
    b"ondragstart" => PureGlobalIdentifierValue::Other,
    b"ondrop" => PureGlobalIdentifierValue::Other,
    b"ondurationchange" => PureGlobalIdentifierValue::Other,
    b"onemptied" => PureGlobalIdentifierValue::Other,
    b"onended" => PureGlobalIdentifierValue::Other,
    b"onerror" => PureGlobalIdentifierValue::Other,
    b"onfocus" => PureGlobalIdentifierValue::Other,
    b"ongotpointercapture" => PureGlobalIdentifierValue::Other,
    b"onhashchange" => PureGlobalIdentifierValue::Other,
    b"oninput" => PureGlobalIdentifierValue::Other,
    b"oninvalid" => PureGlobalIdentifierValue::Other,
    b"onkeydown" => PureGlobalIdentifierValue::Other,
    b"onkeypress" => PureGlobalIdentifierValue::Other,
    b"onkeyup" => PureGlobalIdentifierValue::Other,
    b"onlanguagechange" => PureGlobalIdentifierValue::Other,
    b"onload" => PureGlobalIdentifierValue::Other,
    b"onloadeddata" => PureGlobalIdentifierValue::Other,
    b"onloadedmetadata" => PureGlobalIdentifierValue::Other,
    b"onloadstart" => PureGlobalIdentifierValue::Other,
    b"onlostpointercapture" => PureGlobalIdentifierValue::Other,
    b"onmessage" => PureGlobalIdentifierValue::Other,
    b"onmousedown" => PureGlobalIdentifierValue::Other,
    b"onmouseenter" => PureGlobalIdentifierValue::Other,
    b"onmouseleave" => PureGlobalIdentifierValue::Other,
    b"onmousemove" => PureGlobalIdentifierValue::Other,
    b"onmouseout" => PureGlobalIdentifierValue::Other,
    b"onmouseover" => PureGlobalIdentifierValue::Other,
    b"onmouseup" => PureGlobalIdentifierValue::Other,
    b"onoffline" => PureGlobalIdentifierValue::Other,
    b"ononline" => PureGlobalIdentifierValue::Other,
    b"onpagehide" => PureGlobalIdentifierValue::Other,
    b"onpageshow" => PureGlobalIdentifierValue::Other,
    b"onpause" => PureGlobalIdentifierValue::Other,
    b"onplay" => PureGlobalIdentifierValue::Other,
    b"onplaying" => PureGlobalIdentifierValue::Other,
    b"onpointercancel" => PureGlobalIdentifierValue::Other,
    b"onpointerdown" => PureGlobalIdentifierValue::Other,
    b"onpointerenter" => PureGlobalIdentifierValue::Other,
    b"onpointerleave" => PureGlobalIdentifierValue::Other,
    b"onpointermove" => PureGlobalIdentifierValue::Other,
    b"onpointerout" => PureGlobalIdentifierValue::Other,
    b"onpointerover" => PureGlobalIdentifierValue::Other,
    b"onpointerup" => PureGlobalIdentifierValue::Other,
    b"onpopstate" => PureGlobalIdentifierValue::Other,
    b"onprogress" => PureGlobalIdentifierValue::Other,
    b"onratechange" => PureGlobalIdentifierValue::Other,
    b"onrejectionhandled" => PureGlobalIdentifierValue::Other,
    b"onreset" => PureGlobalIdentifierValue::Other,
    b"onresize" => PureGlobalIdentifierValue::Other,
    b"onscroll" => PureGlobalIdentifierValue::Other,
    b"onseeked" => PureGlobalIdentifierValue::Other,
    b"onseeking" => PureGlobalIdentifierValue::Other,
    b"onselect" => PureGlobalIdentifierValue::Other,
    b"onstalled" => PureGlobalIdentifierValue::Other,
    b"onstorage" => PureGlobalIdentifierValue::Other,
    b"onsubmit" => PureGlobalIdentifierValue::Other,
    b"onsuspend" => PureGlobalIdentifierValue::Other,
    b"ontimeupdate" => PureGlobalIdentifierValue::Other,
    b"ontoggle" => PureGlobalIdentifierValue::Other,
    b"ontransitioncancel" => PureGlobalIdentifierValue::Other,
    b"ontransitionend" => PureGlobalIdentifierValue::Other,
    b"ontransitionrun" => PureGlobalIdentifierValue::Other,
    b"ontransitionstart" => PureGlobalIdentifierValue::Other,
    b"onunhandledrejection" => PureGlobalIdentifierValue::Other,
    b"onunload" => PureGlobalIdentifierValue::Other,
    b"onvolumechange" => PureGlobalIdentifierValue::Other,
    b"onwaiting" => PureGlobalIdentifierValue::Other,
    b"onwebkitanimationend" => PureGlobalIdentifierValue::Other,
    b"onwebkitanimationiteration" => PureGlobalIdentifierValue::Other,
    b"onwebkitanimationstart" => PureGlobalIdentifierValue::Other,
    b"onwebkittransitionend" => PureGlobalIdentifierValue::Other,
    b"onwheel" => PureGlobalIdentifierValue::Other,
    b"open" => PureGlobalIdentifierValue::Other,
    b"opener" => PureGlobalIdentifierValue::Other,
    b"origin" => PureGlobalIdentifierValue::Other,
    b"outerHeight" => PureGlobalIdentifierValue::Other,
    b"outerWidth" => PureGlobalIdentifierValue::Other,
    b"parent" => PureGlobalIdentifierValue::Other,
    b"performance" => PureGlobalIdentifierValue::Other,
    b"personalbar" => PureGlobalIdentifierValue::Other,
    b"postMessage" => PureGlobalIdentifierValue::Other,
    b"print" => PureGlobalIdentifierValue::Other,
    b"prompt" => PureGlobalIdentifierValue::Other,
    b"releaseEvents" => PureGlobalIdentifierValue::Other,
    b"requestAnimationFrame" => PureGlobalIdentifierValue::Other,
    b"resizeBy" => PureGlobalIdentifierValue::Other,
    b"resizeTo" => PureGlobalIdentifierValue::Other,
    b"screen" => PureGlobalIdentifierValue::Other,
    b"screenLeft" => PureGlobalIdentifierValue::Other,
    b"screenTop" => PureGlobalIdentifierValue::Other,
    b"screenX" => PureGlobalIdentifierValue::Other,
    b"screenY" => PureGlobalIdentifierValue::Other,
    b"scroll" => PureGlobalIdentifierValue::Other,
    b"scrollBy" => PureGlobalIdentifierValue::Other,
    b"scrollTo" => PureGlobalIdentifierValue::Other,
    b"scrollbars" => PureGlobalIdentifierValue::Other,
    b"self" => PureGlobalIdentifierValue::Other,
    b"speechSynthesis" => PureGlobalIdentifierValue::Other,
    b"status" => PureGlobalIdentifierValue::Other,
    b"statusbar" => PureGlobalIdentifierValue::Other,
    b"stop" => PureGlobalIdentifierValue::Other,
    b"toolbar" => PureGlobalIdentifierValue::Other,
    b"top" => PureGlobalIdentifierValue::Other,
    b"webkitURL" => PureGlobalIdentifierValue::Other,
    b"window" => PureGlobalIdentifierValue::Other,
    b"crypto" => PureGlobalIdentifierValue::Other,
};

fn load_corpus() -> Vec<Vec<u8>> {
    let candidates = [
        concat!(
            env!("CARGO_MANIFEST_DIR"),
            "/../../test/snippets/react-dom.development.js"
        ),
        concat!(
            env!("CARGO_MANIFEST_DIR"),
            "/../../node_modules/typescript/lib/typescript.js"
        ),
    ];
    let src = candidates
        .iter()
        .find_map(|p| std::fs::read_to_string(p).ok())
        .expect("no corpus file found");
    let re = regex::Regex::new(r"[A-Za-z_$][A-Za-z0-9_$]*").unwrap();
    re.find_iter(&src)
        .map(|m| m.as_str().as_bytes().to_vec())
        .collect()
}

fn table_keys() -> Vec<Vec<u8>> {
    PURE_GLOBAL_IDENTIFIER_MAP
        .keys()
        .map(|k| k.to_vec())
        .collect()
}

fn rand_idents(n: usize, lo: usize, hi: usize, exclude: &HashSet<Vec<u8>>) -> Vec<Vec<u8>> {
    const FIRST: &[u8] = b"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_$";
    const REST: &[u8] = b"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_$";
    let mut state: u64 = 0x243f_6a88_85a3_08d3;
    let mut next = || {
        state = state
            .wrapping_mul(6364136223846793005)
            .wrapping_add(1442695040888963407);
        state
    };
    let mut out = Vec::with_capacity(n);
    while out.len() < n {
        let len = lo + (next() as usize % (hi - lo + 1));
        let mut s = Vec::with_capacity(len);
        s.push(FIRST[next() as usize % FIRST.len()]);
        for _ in 1..len {
            s.push(REST[next() as usize % REST.len()]);
        }
        if !exclude.contains(&s) {
            out.push(s);
        }
    }
    out
}

fn bench(c: &mut Criterion) {
    let corpus = load_corpus();
    let keys = table_keys();
    let key_set: HashSet<Vec<u8>> = keys.iter().cloned().collect();

    let hits = corpus.iter().filter(|k| key_set.contains(*k)).count();
    eprintln!(
        "corpus: {} idents ({} unique), table: {} keys, hit rate: {:.3}%",
        corpus.len(),
        corpus.iter().collect::<HashSet<_>>().len(),
        keys.len(),
        100.0 * hits as f64 / corpus.len() as f64
    );

    let short_miss = rand_idents(1000, 1, 5, &key_set);
    let long_miss = rand_idents(1000, 12, 20, &key_set);

    let cases: &[(&str, &[Vec<u8>])] = &[
        ("lookup_miss_heavy", &corpus),
        ("lookup_hits_only", &keys),
        ("lookup_short_miss", &short_miss),
        ("lookup_long_miss", &long_miss),
    ];

    for (name, data) in cases {
        let mut g = c.benchmark_group(*name);
        g.throughput(criterion::Throughput::Elements(data.len() as u64));
        g.bench_with_input(BenchmarkId::new("phf", data.len()), data, |b, data| {
            b.iter(|| {
                for k in data.iter() {
                    black_box(PURE_GLOBAL_IDENTIFIER_MAP.get(black_box(k.as_slice())));
                }
            })
        });
        g.bench_with_input(
            BenchmarkId::new("generated", data.len()),
            data,
            |b, data| {
                b.iter(|| {
                    for k in data.iter() {
                        black_box(lookup_pure_global_identifier(black_box(k.as_slice())));
                    }
                })
            },
        );
        g.finish();
    }
}

criterion_group!(benches, bench);
criterion_main!(benches);