oxc-parser 0.123.0 → 0.124.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,31 +1,46 @@
1
1
  // Auto-generated code, DO NOT EDIT DIRECTLY!
2
2
  // To edit this generated file you have to edit `tasks/ast_tools/src/generators/raw_transfer.rs`.
3
3
 
4
- let uint8, uint32, float64, sourceText, sourceIsAscii, sourceEndPos;
5
-
6
- const textDecoder = new TextDecoder("utf-8", { ignoreBOM: true }),
7
- decodeStr = textDecoder.decode.bind(textDecoder),
8
- { fromCodePoint } = String;
4
+ let uint8,
5
+ uint32,
6
+ float64,
7
+ sourceText,
8
+ sourceTextLatin,
9
+ sourceEndPos = 0,
10
+ firstNonAsciiPos = 0;
11
+
12
+ const { fromCharCode } = String,
13
+ { utf8Slice, latin1Slice } = Buffer.prototype,
14
+ stringDecodeArrays = Array(65).fill(null);
15
+ for (let i = 0; i <= 64; i++) stringDecodeArrays[i] = Array(i).fill(0);
9
16
 
10
17
  export function deserialize(buffer, sourceText, sourceByteLen) {
11
18
  sourceEndPos = sourceByteLen;
12
- let data = deserializeWith(buffer, sourceText, sourceByteLen, null, deserializeRawTransferData);
13
- resetBuffer();
14
- return data;
19
+ return deserializeWith(buffer, sourceText, sourceByteLen, deserializeRawTransferData);
15
20
  }
16
21
 
17
- function deserializeWith(buffer, sourceTextInput, sourceByteLen, getLocInput, deserialize) {
22
+ function deserializeWith(buffer, sourceTextInput, sourceByteLen, deserialize) {
18
23
  uint8 = buffer;
19
24
  uint32 = buffer.uint32;
20
25
  float64 = buffer.float64;
21
26
  sourceText = sourceTextInput;
22
- sourceIsAscii = sourceText.length === sourceByteLen;
23
- return deserialize(uint32[536870900]);
27
+ if (sourceText.length === sourceByteLen) {
28
+ firstNonAsciiPos = sourceByteLen;
29
+ sourceTextLatin = sourceText;
30
+ } else {
31
+ let i = 0;
32
+ for (; i < sourceByteLen && uint8[i] < 128; i++);
33
+ firstNonAsciiPos = i;
34
+ sourceTextLatin = latin1Slice.call(uint8, 0, sourceByteLen);
35
+ }
36
+ let data = deserialize(uint32[536870900]);
37
+ resetBuffer();
38
+ return data;
24
39
  }
25
40
 
26
41
  export function resetBuffer() {
27
- // Clear buffer and source text string to allow them to be garbage collected
28
- uint8 = uint32 = float64 = sourceText = void 0;
42
+ // Clear buffer and source text strings to allow them to be garbage collected
43
+ uint8 = uint32 = float64 = sourceText = sourceTextLatin = void 0;
29
44
  }
30
45
 
31
46
  function deserializeProgram(pos) {
@@ -2562,22 +2577,32 @@ function deserializeNullLiteral(pos) {
2562
2577
  }
2563
2578
 
2564
2579
  function deserializeNumericLiteral(pos) {
2580
+ let start = deserializeU32(pos),
2581
+ end = deserializeU32(pos + 4);
2565
2582
  return {
2566
2583
  type: "Literal",
2567
2584
  value: deserializeF64(pos + 32),
2568
- raw: deserializeOptionStr(pos + 16),
2569
- start: deserializeU32(pos),
2570
- end: deserializeU32(pos + 4),
2585
+ raw:
2586
+ uint32[(pos + 16) >> 2] === 0 && uint32[(pos + 20) >> 2] === 0
2587
+ ? null
2588
+ : sourceText.slice(start, end),
2589
+ start,
2590
+ end,
2571
2591
  };
2572
2592
  }
2573
2593
 
2574
2594
  function deserializeStringLiteral(pos) {
2575
- let node = {
2595
+ let start = deserializeU32(pos),
2596
+ end = deserializeU32(pos + 4),
2597
+ node = {
2576
2598
  type: "Literal",
2577
2599
  value: null,
2578
- raw: deserializeOptionStr(pos + 32),
2579
- start: deserializeU32(pos),
2580
- end: deserializeU32(pos + 4),
2600
+ raw:
2601
+ uint32[(pos + 32) >> 2] === 0 && uint32[(pos + 36) >> 2] === 0
2602
+ ? null
2603
+ : sourceText.slice(start, end),
2604
+ start,
2605
+ end,
2581
2606
  },
2582
2607
  value = deserializeStr(pos + 16);
2583
2608
  deserializeBool(pos + 12) &&
@@ -2587,13 +2612,18 @@ function deserializeStringLiteral(pos) {
2587
2612
  }
2588
2613
 
2589
2614
  function deserializeBigIntLiteral(pos) {
2590
- let node = {
2615
+ let start = deserializeU32(pos),
2616
+ end = deserializeU32(pos + 4),
2617
+ node = {
2591
2618
  type: "Literal",
2592
2619
  value: null,
2593
- raw: deserializeOptionStr(pos + 32),
2620
+ raw:
2621
+ uint32[(pos + 32) >> 2] === 0 && uint32[(pos + 36) >> 2] === 0
2622
+ ? null
2623
+ : sourceText.slice(start, end),
2594
2624
  bigint: null,
2595
- start: deserializeU32(pos),
2596
- end: deserializeU32(pos + 4),
2625
+ start,
2626
+ end,
2597
2627
  },
2598
2628
  bigint = deserializeStr(pos + 16);
2599
2629
  node.value = BigInt(bigint);
@@ -2602,13 +2632,18 @@ function deserializeBigIntLiteral(pos) {
2602
2632
  }
2603
2633
 
2604
2634
  function deserializeRegExpLiteral(pos) {
2605
- let node = {
2635
+ let start = deserializeU32(pos),
2636
+ end = deserializeU32(pos + 4),
2637
+ node = {
2606
2638
  type: "Literal",
2607
2639
  value: null,
2608
- raw: deserializeOptionStr(pos + 48),
2640
+ raw:
2641
+ uint32[(pos + 48) >> 2] === 0 && uint32[(pos + 52) >> 2] === 0
2642
+ ? null
2643
+ : sourceText.slice(start, end),
2609
2644
  regex: null,
2610
- start: deserializeU32(pos),
2611
- end: deserializeU32(pos + 4),
2645
+ start,
2646
+ end,
2612
2647
  },
2613
2648
  regex = deserializeRegExp(pos + 16),
2614
2649
  value = null;
@@ -3012,12 +3047,17 @@ function deserializeJSXSpreadChild(pos) {
3012
3047
  }
3013
3048
 
3014
3049
  function deserializeJSXText(pos) {
3050
+ let start = deserializeU32(pos),
3051
+ end = deserializeU32(pos + 4);
3015
3052
  return {
3016
3053
  type: "JSXText",
3017
3054
  value: deserializeStr(pos + 16),
3018
- raw: deserializeOptionStr(pos + 32),
3019
- start: deserializeU32(pos),
3020
- end: deserializeU32(pos + 4),
3055
+ raw:
3056
+ uint32[(pos + 32) >> 2] === 0 && uint32[(pos + 36) >> 2] === 0
3057
+ ? null
3058
+ : sourceText.slice(start, end),
3059
+ start,
3060
+ end,
3021
3061
  };
3022
3062
  }
3023
3063
 
@@ -4822,23 +4862,27 @@ function deserializeStr(pos) {
4822
4862
  len = uint32[pos32 + 2];
4823
4863
  if (len === 0) return "";
4824
4864
  pos = uint32[pos32];
4825
- if (sourceIsAscii && pos < sourceEndPos) return sourceText.substr(pos, len);
4826
- // Longer strings use `TextDecoder`
4827
- // TODO: Find best switch-over point
4828
4865
  let end = pos + len;
4829
- if (len > 50) return decodeStr(uint8.subarray(pos, end));
4830
- // Shorter strings decode by hand to avoid native call
4831
- let out = "",
4832
- c;
4833
- do {
4834
- c = uint8[pos++];
4835
- if (c < 128) out += fromCodePoint(c);
4836
- else {
4837
- out += decodeStr(uint8.subarray(pos - 1, end));
4838
- break;
4839
- }
4840
- } while (pos < end);
4841
- return out;
4866
+ if (end <= firstNonAsciiPos) return sourceTextLatin.substr(pos, len);
4867
+ // Use `utf8Slice` for strings longer than 64 bytes
4868
+ if (len > 64) return utf8Slice.call(uint8, pos, end);
4869
+ if (pos < sourceEndPos) {
4870
+ // Check if all bytes are ASCII, use `utf8Slice` if not
4871
+ for (let i = pos; i < end; i++) if (uint8[i] >= 128) return utf8Slice.call(uint8, pos, end);
4872
+ // String is all ASCII, so slice from `sourceTextLatin`
4873
+ return sourceTextLatin.substr(pos, len);
4874
+ }
4875
+ // String is not in source region - use `fromCharCode.apply` with a temp array of correct length.
4876
+ // Copy bytes into temp array.
4877
+ // If any byte is non-ASCII, use `utf8Slice`.
4878
+ let arr = stringDecodeArrays[len];
4879
+ for (let i = 0; i < len; i++) {
4880
+ let b = uint8[pos + i];
4881
+ if (b >= 128) return utf8Slice.call(uint8, pos, end);
4882
+ arr[i] = b;
4883
+ }
4884
+ // Call `fromCharCode` with temp array
4885
+ return fromCharCode.apply(null, arr);
4842
4886
  }
4843
4887
 
4844
4888
  function deserializeVecComment(pos) {
@@ -4854,8 +4898,9 @@ function deserializeVecComment(pos) {
4854
4898
  }
4855
4899
 
4856
4900
  function deserializeOptionHashbang(pos) {
4857
- if (uint32[(pos + 16) >> 2] === 0 && uint32[(pos + 20) >> 2] === 0) return null;
4858
- return deserializeHashbang(pos);
4901
+ return uint32[(pos + 16) >> 2] === 0 && uint32[(pos + 20) >> 2] === 0
4902
+ ? null
4903
+ : deserializeHashbang(pos);
4859
4904
  }
4860
4905
 
4861
4906
  function deserializeVecDirective(pos) {
@@ -5115,13 +5160,13 @@ function deserializeBoxTSTypeParameterInstantiation(pos) {
5115
5160
  }
5116
5161
 
5117
5162
  function deserializeOptionBoxTSTypeParameterInstantiation(pos) {
5118
- if (uint32[pos >> 2] === 0 && uint32[(pos + 4) >> 2] === 0) return null;
5119
- return deserializeBoxTSTypeParameterInstantiation(pos);
5163
+ return uint32[pos >> 2] === 0 && uint32[(pos + 4) >> 2] === 0
5164
+ ? null
5165
+ : deserializeBoxTSTypeParameterInstantiation(pos);
5120
5166
  }
5121
5167
 
5122
5168
  function deserializeOptionStr(pos) {
5123
- if (uint32[pos >> 2] === 0 && uint32[(pos + 4) >> 2] === 0) return null;
5124
- return deserializeStr(pos);
5169
+ return uint32[pos >> 2] === 0 && uint32[(pos + 4) >> 2] === 0 ? null : deserializeStr(pos);
5125
5170
  }
5126
5171
 
5127
5172
  function deserializeBoxComputedMemberExpression(pos) {
@@ -5157,8 +5202,7 @@ function deserializeBoxObjectAssignmentTarget(pos) {
5157
5202
  }
5158
5203
 
5159
5204
  function deserializeOptionAssignmentTargetMaybeDefault(pos) {
5160
- if (uint8[pos] === 51) return null;
5161
- return deserializeAssignmentTargetMaybeDefault(pos);
5205
+ return uint8[pos] === 51 ? null : deserializeAssignmentTargetMaybeDefault(pos);
5162
5206
  }
5163
5207
 
5164
5208
  function deserializeVecOptionAssignmentTargetMaybeDefault(pos) {
@@ -5178,8 +5222,9 @@ function deserializeBoxAssignmentTargetRest(pos) {
5178
5222
  }
5179
5223
 
5180
5224
  function deserializeOptionBoxAssignmentTargetRest(pos) {
5181
- if (uint32[pos >> 2] === 0 && uint32[(pos + 4) >> 2] === 0) return null;
5182
- return deserializeBoxAssignmentTargetRest(pos);
5225
+ return uint32[pos >> 2] === 0 && uint32[(pos + 4) >> 2] === 0
5226
+ ? null
5227
+ : deserializeBoxAssignmentTargetRest(pos);
5183
5228
  }
5184
5229
 
5185
5230
  function deserializeVecAssignmentTargetProperty(pos) {
@@ -5207,8 +5252,7 @@ function deserializeBoxAssignmentTargetPropertyProperty(pos) {
5207
5252
  }
5208
5253
 
5209
5254
  function deserializeOptionExpression(pos) {
5210
- if (uint8[pos] === 51) return null;
5211
- return deserializeExpression(pos);
5255
+ return uint8[pos] === 51 ? null : deserializeExpression(pos);
5212
5256
  }
5213
5257
 
5214
5258
  function deserializeBoxBlockStatement(pos) {
@@ -5328,23 +5372,23 @@ function deserializeBoxTSTypeAnnotation(pos) {
5328
5372
  }
5329
5373
 
5330
5374
  function deserializeOptionBoxTSTypeAnnotation(pos) {
5331
- if (uint32[pos >> 2] === 0 && uint32[(pos + 4) >> 2] === 0) return null;
5332
- return deserializeBoxTSTypeAnnotation(pos);
5375
+ return uint32[pos >> 2] === 0 && uint32[(pos + 4) >> 2] === 0
5376
+ ? null
5377
+ : deserializeBoxTSTypeAnnotation(pos);
5333
5378
  }
5334
5379
 
5335
5380
  function deserializeOptionStatement(pos) {
5336
- if (uint8[pos] === 70) return null;
5337
- return deserializeStatement(pos);
5381
+ return uint8[pos] === 70 ? null : deserializeStatement(pos);
5338
5382
  }
5339
5383
 
5340
5384
  function deserializeOptionForStatementInit(pos) {
5341
- if (uint8[pos] === 65) return null;
5342
- return deserializeForStatementInit(pos);
5385
+ return uint8[pos] === 65 ? null : deserializeForStatementInit(pos);
5343
5386
  }
5344
5387
 
5345
5388
  function deserializeOptionLabelIdentifier(pos) {
5346
- if (uint32[(pos + 16) >> 2] === 0 && uint32[(pos + 20) >> 2] === 0) return null;
5347
- return deserializeLabelIdentifier(pos);
5389
+ return uint32[(pos + 16) >> 2] === 0 && uint32[(pos + 20) >> 2] === 0
5390
+ ? null
5391
+ : deserializeLabelIdentifier(pos);
5348
5392
  }
5349
5393
 
5350
5394
  function deserializeVecSwitchCase(pos) {
@@ -5364,18 +5408,19 @@ function deserializeBoxCatchClause(pos) {
5364
5408
  }
5365
5409
 
5366
5410
  function deserializeOptionBoxCatchClause(pos) {
5367
- if (uint32[pos >> 2] === 0 && uint32[(pos + 4) >> 2] === 0) return null;
5368
- return deserializeBoxCatchClause(pos);
5411
+ return uint32[pos >> 2] === 0 && uint32[(pos + 4) >> 2] === 0
5412
+ ? null
5413
+ : deserializeBoxCatchClause(pos);
5369
5414
  }
5370
5415
 
5371
5416
  function deserializeOptionBoxBlockStatement(pos) {
5372
- if (uint32[pos >> 2] === 0 && uint32[(pos + 4) >> 2] === 0) return null;
5373
- return deserializeBoxBlockStatement(pos);
5417
+ return uint32[pos >> 2] === 0 && uint32[(pos + 4) >> 2] === 0
5418
+ ? null
5419
+ : deserializeBoxBlockStatement(pos);
5374
5420
  }
5375
5421
 
5376
5422
  function deserializeOptionCatchParameter(pos) {
5377
- if (uint8[pos + 16] === 4) return null;
5378
- return deserializeCatchParameter(pos);
5423
+ return uint8[pos + 16] === 4 ? null : deserializeCatchParameter(pos);
5379
5424
  }
5380
5425
 
5381
5426
  function deserializeBoxBindingIdentifier(pos) {
@@ -5411,13 +5456,13 @@ function deserializeBoxBindingRestElement(pos) {
5411
5456
  }
5412
5457
 
5413
5458
  function deserializeOptionBoxBindingRestElement(pos) {
5414
- if (uint32[pos >> 2] === 0 && uint32[(pos + 4) >> 2] === 0) return null;
5415
- return deserializeBoxBindingRestElement(pos);
5459
+ return uint32[pos >> 2] === 0 && uint32[(pos + 4) >> 2] === 0
5460
+ ? null
5461
+ : deserializeBoxBindingRestElement(pos);
5416
5462
  }
5417
5463
 
5418
5464
  function deserializeOptionBindingPattern(pos) {
5419
- if (uint8[pos] === 4) return null;
5420
- return deserializeBindingPattern(pos);
5465
+ return uint8[pos] === 4 ? null : deserializeBindingPattern(pos);
5421
5466
  }
5422
5467
 
5423
5468
  function deserializeVecOptionBindingPattern(pos) {
@@ -5433,8 +5478,9 @@ function deserializeVecOptionBindingPattern(pos) {
5433
5478
  }
5434
5479
 
5435
5480
  function deserializeOptionBindingIdentifier(pos) {
5436
- if (uint32[(pos + 16) >> 2] === 0 && uint32[(pos + 20) >> 2] === 0) return null;
5437
- return deserializeBindingIdentifier(pos);
5481
+ return uint32[(pos + 16) >> 2] === 0 && uint32[(pos + 20) >> 2] === 0
5482
+ ? null
5483
+ : deserializeBindingIdentifier(pos);
5438
5484
  }
5439
5485
 
5440
5486
  function deserializeBoxTSTypeParameterDeclaration(pos) {
@@ -5442,8 +5488,9 @@ function deserializeBoxTSTypeParameterDeclaration(pos) {
5442
5488
  }
5443
5489
 
5444
5490
  function deserializeOptionBoxTSTypeParameterDeclaration(pos) {
5445
- if (uint32[pos >> 2] === 0 && uint32[(pos + 4) >> 2] === 0) return null;
5446
- return deserializeBoxTSTypeParameterDeclaration(pos);
5491
+ return uint32[pos >> 2] === 0 && uint32[(pos + 4) >> 2] === 0
5492
+ ? null
5493
+ : deserializeBoxTSTypeParameterDeclaration(pos);
5447
5494
  }
5448
5495
 
5449
5496
  function deserializeBoxTSThisParameter(pos) {
@@ -5451,8 +5498,9 @@ function deserializeBoxTSThisParameter(pos) {
5451
5498
  }
5452
5499
 
5453
5500
  function deserializeOptionBoxTSThisParameter(pos) {
5454
- if (uint32[pos >> 2] === 0 && uint32[(pos + 4) >> 2] === 0) return null;
5455
- return deserializeBoxTSThisParameter(pos);
5501
+ return uint32[pos >> 2] === 0 && uint32[(pos + 4) >> 2] === 0
5502
+ ? null
5503
+ : deserializeBoxTSThisParameter(pos);
5456
5504
  }
5457
5505
 
5458
5506
  function deserializeBoxFormalParameters(pos) {
@@ -5464,8 +5512,9 @@ function deserializeBoxFunctionBody(pos) {
5464
5512
  }
5465
5513
 
5466
5514
  function deserializeOptionBoxFunctionBody(pos) {
5467
- if (uint32[pos >> 2] === 0 && uint32[(pos + 4) >> 2] === 0) return null;
5468
- return deserializeBoxFunctionBody(pos);
5515
+ return uint32[pos >> 2] === 0 && uint32[(pos + 4) >> 2] === 0
5516
+ ? null
5517
+ : deserializeBoxFunctionBody(pos);
5469
5518
  }
5470
5519
 
5471
5520
  function deserializeVecFormalParameter(pos) {
@@ -5497,13 +5546,13 @@ function deserializeBoxExpression(pos) {
5497
5546
  }
5498
5547
 
5499
5548
  function deserializeOptionBoxExpression(pos) {
5500
- if (uint32[pos >> 2] === 0 && uint32[(pos + 4) >> 2] === 0) return null;
5501
- return deserializeBoxExpression(pos);
5549
+ return uint32[pos >> 2] === 0 && uint32[(pos + 4) >> 2] === 0
5550
+ ? null
5551
+ : deserializeBoxExpression(pos);
5502
5552
  }
5503
5553
 
5504
5554
  function deserializeOptionTSAccessibility(pos) {
5505
- if (uint8[pos] === 3) return null;
5506
- return deserializeTSAccessibility(pos);
5555
+ return uint8[pos] === 3 ? null : deserializeTSAccessibility(pos);
5507
5556
  }
5508
5557
 
5509
5558
  function deserializeVecTSClassImplements(pos) {
@@ -5579,8 +5628,7 @@ function deserializeBoxTSNamespaceExportDeclaration(pos) {
5579
5628
  }
5580
5629
 
5581
5630
  function deserializeOptionImportPhase(pos) {
5582
- if (uint8[pos] === 2) return null;
5583
- return deserializeImportPhase(pos);
5631
+ return uint8[pos] === 2 ? null : deserializeImportPhase(pos);
5584
5632
  }
5585
5633
 
5586
5634
  function deserializeVecImportDeclarationSpecifier(pos) {
@@ -5596,8 +5644,9 @@ function deserializeVecImportDeclarationSpecifier(pos) {
5596
5644
  }
5597
5645
 
5598
5646
  function deserializeOptionVecImportDeclarationSpecifier(pos) {
5599
- if (uint32[pos >> 2] === 0 && uint32[(pos + 4) >> 2] === 0) return null;
5600
- return deserializeVecImportDeclarationSpecifier(pos);
5647
+ return uint32[pos >> 2] === 0 && uint32[(pos + 4) >> 2] === 0
5648
+ ? null
5649
+ : deserializeVecImportDeclarationSpecifier(pos);
5601
5650
  }
5602
5651
 
5603
5652
  function deserializeBoxWithClause(pos) {
@@ -5605,8 +5654,9 @@ function deserializeBoxWithClause(pos) {
5605
5654
  }
5606
5655
 
5607
5656
  function deserializeOptionBoxWithClause(pos) {
5608
- if (uint32[pos >> 2] === 0 && uint32[(pos + 4) >> 2] === 0) return null;
5609
- return deserializeBoxWithClause(pos);
5657
+ return uint32[pos >> 2] === 0 && uint32[(pos + 4) >> 2] === 0
5658
+ ? null
5659
+ : deserializeBoxWithClause(pos);
5610
5660
  }
5611
5661
 
5612
5662
  function deserializeBoxImportSpecifier(pos) {
@@ -5634,8 +5684,7 @@ function deserializeVecImportAttribute(pos) {
5634
5684
  }
5635
5685
 
5636
5686
  function deserializeOptionDeclaration(pos) {
5637
- if (uint8[pos] === 31) return null;
5638
- return deserializeDeclaration(pos);
5687
+ return uint8[pos] === 31 ? null : deserializeDeclaration(pos);
5639
5688
  }
5640
5689
 
5641
5690
  function deserializeVecExportSpecifier(pos) {
@@ -5651,13 +5700,11 @@ function deserializeVecExportSpecifier(pos) {
5651
5700
  }
5652
5701
 
5653
5702
  function deserializeOptionStringLiteral(pos) {
5654
- if (uint8[pos + 12] === 2) return null;
5655
- return deserializeStringLiteral(pos);
5703
+ return uint8[pos + 12] === 2 ? null : deserializeStringLiteral(pos);
5656
5704
  }
5657
5705
 
5658
5706
  function deserializeOptionModuleExportName(pos) {
5659
- if (uint8[pos] === 3) return null;
5660
- return deserializeModuleExportName(pos);
5707
+ return uint8[pos] === 3 ? null : deserializeModuleExportName(pos);
5661
5708
  }
5662
5709
 
5663
5710
  function deserializeF64(pos) {
@@ -5689,8 +5736,9 @@ function deserializeBoxJSXClosingElement(pos) {
5689
5736
  }
5690
5737
 
5691
5738
  function deserializeOptionBoxJSXClosingElement(pos) {
5692
- if (uint32[pos >> 2] === 0 && uint32[(pos + 4) >> 2] === 0) return null;
5693
- return deserializeBoxJSXClosingElement(pos);
5739
+ return uint32[pos >> 2] === 0 && uint32[(pos + 4) >> 2] === 0
5740
+ ? null
5741
+ : deserializeBoxJSXClosingElement(pos);
5694
5742
  }
5695
5743
 
5696
5744
  function deserializeVecJSXAttributeItem(pos) {
@@ -5726,8 +5774,7 @@ function deserializeBoxJSXSpreadAttribute(pos) {
5726
5774
  }
5727
5775
 
5728
5776
  function deserializeOptionJSXAttributeValue(pos) {
5729
- if (uint8[pos] === 4) return null;
5730
- return deserializeJSXAttributeValue(pos);
5777
+ return uint8[pos] === 4 ? null : deserializeJSXAttributeValue(pos);
5731
5778
  }
5732
5779
 
5733
5780
  function deserializeBoxJSXExpressionContainer(pos) {
@@ -5939,8 +5986,7 @@ function deserializeBoxTSQualifiedName(pos) {
5939
5986
  }
5940
5987
 
5941
5988
  function deserializeOptionTSType(pos) {
5942
- if (uint8[pos] === 38) return null;
5943
- return deserializeTSType(pos);
5989
+ return uint8[pos] === 38 ? null : deserializeTSType(pos);
5944
5990
  }
5945
5991
 
5946
5992
  function deserializeVecTSTypeParameter(pos) {
@@ -6012,8 +6058,7 @@ function deserializeVecTSIndexSignatureName(pos) {
6012
6058
  }
6013
6059
 
6014
6060
  function deserializeOptionTSModuleDeclarationBody(pos) {
6015
- if (uint8[pos] === 2) return null;
6016
- return deserializeTSModuleDeclarationBody(pos);
6061
+ return uint8[pos] === 2 ? null : deserializeTSModuleDeclarationBody(pos);
6017
6062
  }
6018
6063
 
6019
6064
  function deserializeBoxTSModuleBlock(pos) {
@@ -6025,13 +6070,13 @@ function deserializeBoxTSTypeParameter(pos) {
6025
6070
  }
6026
6071
 
6027
6072
  function deserializeOptionBoxObjectExpression(pos) {
6028
- if (uint32[pos >> 2] === 0 && uint32[(pos + 4) >> 2] === 0) return null;
6029
- return deserializeBoxObjectExpression(pos);
6073
+ return uint32[pos >> 2] === 0 && uint32[(pos + 4) >> 2] === 0
6074
+ ? null
6075
+ : deserializeBoxObjectExpression(pos);
6030
6076
  }
6031
6077
 
6032
6078
  function deserializeOptionTSImportTypeQualifier(pos) {
6033
- if (uint8[pos] === 2) return null;
6034
- return deserializeTSImportTypeQualifier(pos);
6079
+ return uint8[pos] === 2 ? null : deserializeTSImportTypeQualifier(pos);
6035
6080
  }
6036
6081
 
6037
6082
  function deserializeBoxTSImportTypeQualifiedName(pos) {
@@ -6039,8 +6084,7 @@ function deserializeBoxTSImportTypeQualifiedName(pos) {
6039
6084
  }
6040
6085
 
6041
6086
  function deserializeOptionTSMappedTypeModifierOperator(pos) {
6042
- if (uint8[pos] === 3) return null;
6043
- return deserializeTSMappedTypeModifierOperator(pos);
6087
+ return uint8[pos] === 3 ? null : deserializeTSMappedTypeModifierOperator(pos);
6044
6088
  }
6045
6089
 
6046
6090
  function deserializeBoxTSExternalModuleReference(pos) {
@@ -6052,8 +6096,9 @@ function deserializeU32(pos) {
6052
6096
  }
6053
6097
 
6054
6098
  function deserializeOptionNameSpan(pos) {
6055
- if (uint32[(pos + 8) >> 2] === 0 && uint32[(pos + 12) >> 2] === 0) return null;
6056
- return deserializeNameSpan(pos);
6099
+ return uint32[(pos + 8) >> 2] === 0 && uint32[(pos + 12) >> 2] === 0
6100
+ ? null
6101
+ : deserializeNameSpan(pos);
6057
6102
  }
6058
6103
 
6059
6104
  function deserializeVecError(pos) {