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) {
@@ -2847,26 +2862,33 @@ function deserializeNullLiteral(pos) {
2847
2862
  }
2848
2863
 
2849
2864
  function deserializeNumericLiteral(pos) {
2850
- let start, end;
2865
+ let start = deserializeU32(pos),
2866
+ end = deserializeU32(pos + 4);
2851
2867
  return {
2852
2868
  type: "Literal",
2853
2869
  value: deserializeF64(pos + 32),
2854
- raw: deserializeOptionStr(pos + 16),
2855
- start: (start = deserializeU32(pos)),
2856
- end: (end = deserializeU32(pos + 4)),
2870
+ raw:
2871
+ uint32[(pos + 16) >> 2] === 0 && uint32[(pos + 20) >> 2] === 0
2872
+ ? null
2873
+ : sourceText.slice(start, end),
2874
+ start,
2875
+ end,
2857
2876
  range: [start, end],
2858
2877
  };
2859
2878
  }
2860
2879
 
2861
2880
  function deserializeStringLiteral(pos) {
2862
- let start,
2863
- end,
2881
+ let start = deserializeU32(pos),
2882
+ end = deserializeU32(pos + 4),
2864
2883
  node = {
2865
2884
  type: "Literal",
2866
2885
  value: null,
2867
- raw: deserializeOptionStr(pos + 32),
2868
- start: (start = deserializeU32(pos)),
2869
- end: (end = deserializeU32(pos + 4)),
2886
+ raw:
2887
+ uint32[(pos + 32) >> 2] === 0 && uint32[(pos + 36) >> 2] === 0
2888
+ ? null
2889
+ : sourceText.slice(start, end),
2890
+ start,
2891
+ end,
2870
2892
  range: [start, end],
2871
2893
  },
2872
2894
  value = deserializeStr(pos + 16);
@@ -2877,15 +2899,18 @@ function deserializeStringLiteral(pos) {
2877
2899
  }
2878
2900
 
2879
2901
  function deserializeBigIntLiteral(pos) {
2880
- let start,
2881
- end,
2902
+ let start = deserializeU32(pos),
2903
+ end = deserializeU32(pos + 4),
2882
2904
  node = {
2883
2905
  type: "Literal",
2884
2906
  value: null,
2885
- raw: deserializeOptionStr(pos + 32),
2907
+ raw:
2908
+ uint32[(pos + 32) >> 2] === 0 && uint32[(pos + 36) >> 2] === 0
2909
+ ? null
2910
+ : sourceText.slice(start, end),
2886
2911
  bigint: null,
2887
- start: (start = deserializeU32(pos)),
2888
- end: (end = deserializeU32(pos + 4)),
2912
+ start,
2913
+ end,
2889
2914
  range: [start, end],
2890
2915
  },
2891
2916
  bigint = deserializeStr(pos + 16);
@@ -2895,15 +2920,18 @@ function deserializeBigIntLiteral(pos) {
2895
2920
  }
2896
2921
 
2897
2922
  function deserializeRegExpLiteral(pos) {
2898
- let start,
2899
- end,
2923
+ let start = deserializeU32(pos),
2924
+ end = deserializeU32(pos + 4),
2900
2925
  node = {
2901
2926
  type: "Literal",
2902
2927
  value: null,
2903
- raw: deserializeOptionStr(pos + 48),
2928
+ raw:
2929
+ uint32[(pos + 48) >> 2] === 0 && uint32[(pos + 52) >> 2] === 0
2930
+ ? null
2931
+ : sourceText.slice(start, end),
2904
2932
  regex: null,
2905
- start: (start = deserializeU32(pos)),
2906
- end: (end = deserializeU32(pos + 4)),
2933
+ start,
2934
+ end,
2907
2935
  range: [start, end],
2908
2936
  },
2909
2937
  regex = deserializeRegExp(pos + 16),
@@ -3350,13 +3378,17 @@ function deserializeJSXSpreadChild(pos) {
3350
3378
  }
3351
3379
 
3352
3380
  function deserializeJSXText(pos) {
3353
- let start, end;
3381
+ let start = deserializeU32(pos),
3382
+ end = deserializeU32(pos + 4);
3354
3383
  return {
3355
3384
  type: "JSXText",
3356
3385
  value: deserializeStr(pos + 16),
3357
- raw: deserializeOptionStr(pos + 32),
3358
- start: (start = deserializeU32(pos)),
3359
- end: (end = deserializeU32(pos + 4)),
3386
+ raw:
3387
+ uint32[(pos + 32) >> 2] === 0 && uint32[(pos + 36) >> 2] === 0
3388
+ ? null
3389
+ : sourceText.slice(start, end),
3390
+ start,
3391
+ end,
3360
3392
  range: [start, end],
3361
3393
  };
3362
3394
  }
@@ -5403,23 +5435,27 @@ function deserializeStr(pos) {
5403
5435
  len = uint32[pos32 + 2];
5404
5436
  if (len === 0) return "";
5405
5437
  pos = uint32[pos32];
5406
- if (sourceIsAscii && pos < sourceEndPos) return sourceText.substr(pos, len);
5407
- // Longer strings use `TextDecoder`
5408
- // TODO: Find best switch-over point
5409
5438
  let end = pos + len;
5410
- if (len > 50) return decodeStr(uint8.subarray(pos, end));
5411
- // Shorter strings decode by hand to avoid native call
5412
- let out = "",
5413
- c;
5414
- do {
5415
- c = uint8[pos++];
5416
- if (c < 128) out += fromCodePoint(c);
5417
- else {
5418
- out += decodeStr(uint8.subarray(pos - 1, end));
5419
- break;
5420
- }
5421
- } while (pos < end);
5422
- return out;
5439
+ if (end <= firstNonAsciiPos) return sourceTextLatin.substr(pos, len);
5440
+ // Use `utf8Slice` for strings longer than 64 bytes
5441
+ if (len > 64) return utf8Slice.call(uint8, pos, end);
5442
+ if (pos < sourceEndPos) {
5443
+ // Check if all bytes are ASCII, use `utf8Slice` if not
5444
+ for (let i = pos; i < end; i++) if (uint8[i] >= 128) return utf8Slice.call(uint8, pos, end);
5445
+ // String is all ASCII, so slice from `sourceTextLatin`
5446
+ return sourceTextLatin.substr(pos, len);
5447
+ }
5448
+ // String is not in source region - use `fromCharCode.apply` with a temp array of correct length.
5449
+ // Copy bytes into temp array.
5450
+ // If any byte is non-ASCII, use `utf8Slice`.
5451
+ let arr = stringDecodeArrays[len];
5452
+ for (let i = 0; i < len; i++) {
5453
+ let b = uint8[pos + i];
5454
+ if (b >= 128) return utf8Slice.call(uint8, pos, end);
5455
+ arr[i] = b;
5456
+ }
5457
+ // Call `fromCharCode` with temp array
5458
+ return fromCharCode.apply(null, arr);
5423
5459
  }
5424
5460
 
5425
5461
  function deserializeVecComment(pos) {
@@ -5435,8 +5471,9 @@ function deserializeVecComment(pos) {
5435
5471
  }
5436
5472
 
5437
5473
  function deserializeOptionHashbang(pos) {
5438
- if (uint32[(pos + 16) >> 2] === 0 && uint32[(pos + 20) >> 2] === 0) return null;
5439
- return deserializeHashbang(pos);
5474
+ return uint32[(pos + 16) >> 2] === 0 && uint32[(pos + 20) >> 2] === 0
5475
+ ? null
5476
+ : deserializeHashbang(pos);
5440
5477
  }
5441
5478
 
5442
5479
  function deserializeVecDirective(pos) {
@@ -5696,13 +5733,13 @@ function deserializeBoxTSTypeParameterInstantiation(pos) {
5696
5733
  }
5697
5734
 
5698
5735
  function deserializeOptionBoxTSTypeParameterInstantiation(pos) {
5699
- if (uint32[pos >> 2] === 0 && uint32[(pos + 4) >> 2] === 0) return null;
5700
- return deserializeBoxTSTypeParameterInstantiation(pos);
5736
+ return uint32[pos >> 2] === 0 && uint32[(pos + 4) >> 2] === 0
5737
+ ? null
5738
+ : deserializeBoxTSTypeParameterInstantiation(pos);
5701
5739
  }
5702
5740
 
5703
5741
  function deserializeOptionStr(pos) {
5704
- if (uint32[pos >> 2] === 0 && uint32[(pos + 4) >> 2] === 0) return null;
5705
- return deserializeStr(pos);
5742
+ return uint32[pos >> 2] === 0 && uint32[(pos + 4) >> 2] === 0 ? null : deserializeStr(pos);
5706
5743
  }
5707
5744
 
5708
5745
  function deserializeBoxComputedMemberExpression(pos) {
@@ -5738,8 +5775,7 @@ function deserializeBoxObjectAssignmentTarget(pos) {
5738
5775
  }
5739
5776
 
5740
5777
  function deserializeOptionAssignmentTargetMaybeDefault(pos) {
5741
- if (uint8[pos] === 51) return null;
5742
- return deserializeAssignmentTargetMaybeDefault(pos);
5778
+ return uint8[pos] === 51 ? null : deserializeAssignmentTargetMaybeDefault(pos);
5743
5779
  }
5744
5780
 
5745
5781
  function deserializeVecOptionAssignmentTargetMaybeDefault(pos) {
@@ -5759,8 +5795,9 @@ function deserializeBoxAssignmentTargetRest(pos) {
5759
5795
  }
5760
5796
 
5761
5797
  function deserializeOptionBoxAssignmentTargetRest(pos) {
5762
- if (uint32[pos >> 2] === 0 && uint32[(pos + 4) >> 2] === 0) return null;
5763
- return deserializeBoxAssignmentTargetRest(pos);
5798
+ return uint32[pos >> 2] === 0 && uint32[(pos + 4) >> 2] === 0
5799
+ ? null
5800
+ : deserializeBoxAssignmentTargetRest(pos);
5764
5801
  }
5765
5802
 
5766
5803
  function deserializeVecAssignmentTargetProperty(pos) {
@@ -5788,8 +5825,7 @@ function deserializeBoxAssignmentTargetPropertyProperty(pos) {
5788
5825
  }
5789
5826
 
5790
5827
  function deserializeOptionExpression(pos) {
5791
- if (uint8[pos] === 51) return null;
5792
- return deserializeExpression(pos);
5828
+ return uint8[pos] === 51 ? null : deserializeExpression(pos);
5793
5829
  }
5794
5830
 
5795
5831
  function deserializeBoxBlockStatement(pos) {
@@ -5909,23 +5945,23 @@ function deserializeBoxTSTypeAnnotation(pos) {
5909
5945
  }
5910
5946
 
5911
5947
  function deserializeOptionBoxTSTypeAnnotation(pos) {
5912
- if (uint32[pos >> 2] === 0 && uint32[(pos + 4) >> 2] === 0) return null;
5913
- return deserializeBoxTSTypeAnnotation(pos);
5948
+ return uint32[pos >> 2] === 0 && uint32[(pos + 4) >> 2] === 0
5949
+ ? null
5950
+ : deserializeBoxTSTypeAnnotation(pos);
5914
5951
  }
5915
5952
 
5916
5953
  function deserializeOptionStatement(pos) {
5917
- if (uint8[pos] === 70) return null;
5918
- return deserializeStatement(pos);
5954
+ return uint8[pos] === 70 ? null : deserializeStatement(pos);
5919
5955
  }
5920
5956
 
5921
5957
  function deserializeOptionForStatementInit(pos) {
5922
- if (uint8[pos] === 65) return null;
5923
- return deserializeForStatementInit(pos);
5958
+ return uint8[pos] === 65 ? null : deserializeForStatementInit(pos);
5924
5959
  }
5925
5960
 
5926
5961
  function deserializeOptionLabelIdentifier(pos) {
5927
- if (uint32[(pos + 16) >> 2] === 0 && uint32[(pos + 20) >> 2] === 0) return null;
5928
- return deserializeLabelIdentifier(pos);
5962
+ return uint32[(pos + 16) >> 2] === 0 && uint32[(pos + 20) >> 2] === 0
5963
+ ? null
5964
+ : deserializeLabelIdentifier(pos);
5929
5965
  }
5930
5966
 
5931
5967
  function deserializeVecSwitchCase(pos) {
@@ -5945,18 +5981,19 @@ function deserializeBoxCatchClause(pos) {
5945
5981
  }
5946
5982
 
5947
5983
  function deserializeOptionBoxCatchClause(pos) {
5948
- if (uint32[pos >> 2] === 0 && uint32[(pos + 4) >> 2] === 0) return null;
5949
- return deserializeBoxCatchClause(pos);
5984
+ return uint32[pos >> 2] === 0 && uint32[(pos + 4) >> 2] === 0
5985
+ ? null
5986
+ : deserializeBoxCatchClause(pos);
5950
5987
  }
5951
5988
 
5952
5989
  function deserializeOptionBoxBlockStatement(pos) {
5953
- if (uint32[pos >> 2] === 0 && uint32[(pos + 4) >> 2] === 0) return null;
5954
- return deserializeBoxBlockStatement(pos);
5990
+ return uint32[pos >> 2] === 0 && uint32[(pos + 4) >> 2] === 0
5991
+ ? null
5992
+ : deserializeBoxBlockStatement(pos);
5955
5993
  }
5956
5994
 
5957
5995
  function deserializeOptionCatchParameter(pos) {
5958
- if (uint8[pos + 16] === 4) return null;
5959
- return deserializeCatchParameter(pos);
5996
+ return uint8[pos + 16] === 4 ? null : deserializeCatchParameter(pos);
5960
5997
  }
5961
5998
 
5962
5999
  function deserializeBoxBindingIdentifier(pos) {
@@ -5992,13 +6029,13 @@ function deserializeBoxBindingRestElement(pos) {
5992
6029
  }
5993
6030
 
5994
6031
  function deserializeOptionBoxBindingRestElement(pos) {
5995
- if (uint32[pos >> 2] === 0 && uint32[(pos + 4) >> 2] === 0) return null;
5996
- return deserializeBoxBindingRestElement(pos);
6032
+ return uint32[pos >> 2] === 0 && uint32[(pos + 4) >> 2] === 0
6033
+ ? null
6034
+ : deserializeBoxBindingRestElement(pos);
5997
6035
  }
5998
6036
 
5999
6037
  function deserializeOptionBindingPattern(pos) {
6000
- if (uint8[pos] === 4) return null;
6001
- return deserializeBindingPattern(pos);
6038
+ return uint8[pos] === 4 ? null : deserializeBindingPattern(pos);
6002
6039
  }
6003
6040
 
6004
6041
  function deserializeVecOptionBindingPattern(pos) {
@@ -6014,8 +6051,9 @@ function deserializeVecOptionBindingPattern(pos) {
6014
6051
  }
6015
6052
 
6016
6053
  function deserializeOptionBindingIdentifier(pos) {
6017
- if (uint32[(pos + 16) >> 2] === 0 && uint32[(pos + 20) >> 2] === 0) return null;
6018
- return deserializeBindingIdentifier(pos);
6054
+ return uint32[(pos + 16) >> 2] === 0 && uint32[(pos + 20) >> 2] === 0
6055
+ ? null
6056
+ : deserializeBindingIdentifier(pos);
6019
6057
  }
6020
6058
 
6021
6059
  function deserializeBoxTSTypeParameterDeclaration(pos) {
@@ -6023,8 +6061,9 @@ function deserializeBoxTSTypeParameterDeclaration(pos) {
6023
6061
  }
6024
6062
 
6025
6063
  function deserializeOptionBoxTSTypeParameterDeclaration(pos) {
6026
- if (uint32[pos >> 2] === 0 && uint32[(pos + 4) >> 2] === 0) return null;
6027
- return deserializeBoxTSTypeParameterDeclaration(pos);
6064
+ return uint32[pos >> 2] === 0 && uint32[(pos + 4) >> 2] === 0
6065
+ ? null
6066
+ : deserializeBoxTSTypeParameterDeclaration(pos);
6028
6067
  }
6029
6068
 
6030
6069
  function deserializeBoxTSThisParameter(pos) {
@@ -6032,8 +6071,9 @@ function deserializeBoxTSThisParameter(pos) {
6032
6071
  }
6033
6072
 
6034
6073
  function deserializeOptionBoxTSThisParameter(pos) {
6035
- if (uint32[pos >> 2] === 0 && uint32[(pos + 4) >> 2] === 0) return null;
6036
- return deserializeBoxTSThisParameter(pos);
6074
+ return uint32[pos >> 2] === 0 && uint32[(pos + 4) >> 2] === 0
6075
+ ? null
6076
+ : deserializeBoxTSThisParameter(pos);
6037
6077
  }
6038
6078
 
6039
6079
  function deserializeBoxFormalParameters(pos) {
@@ -6045,8 +6085,9 @@ function deserializeBoxFunctionBody(pos) {
6045
6085
  }
6046
6086
 
6047
6087
  function deserializeOptionBoxFunctionBody(pos) {
6048
- if (uint32[pos >> 2] === 0 && uint32[(pos + 4) >> 2] === 0) return null;
6049
- return deserializeBoxFunctionBody(pos);
6088
+ return uint32[pos >> 2] === 0 && uint32[(pos + 4) >> 2] === 0
6089
+ ? null
6090
+ : deserializeBoxFunctionBody(pos);
6050
6091
  }
6051
6092
 
6052
6093
  function deserializeVecFormalParameter(pos) {
@@ -6078,13 +6119,13 @@ function deserializeBoxExpression(pos) {
6078
6119
  }
6079
6120
 
6080
6121
  function deserializeOptionBoxExpression(pos) {
6081
- if (uint32[pos >> 2] === 0 && uint32[(pos + 4) >> 2] === 0) return null;
6082
- return deserializeBoxExpression(pos);
6122
+ return uint32[pos >> 2] === 0 && uint32[(pos + 4) >> 2] === 0
6123
+ ? null
6124
+ : deserializeBoxExpression(pos);
6083
6125
  }
6084
6126
 
6085
6127
  function deserializeOptionTSAccessibility(pos) {
6086
- if (uint8[pos] === 3) return null;
6087
- return deserializeTSAccessibility(pos);
6128
+ return uint8[pos] === 3 ? null : deserializeTSAccessibility(pos);
6088
6129
  }
6089
6130
 
6090
6131
  function deserializeVecTSClassImplements(pos) {
@@ -6160,8 +6201,7 @@ function deserializeBoxTSNamespaceExportDeclaration(pos) {
6160
6201
  }
6161
6202
 
6162
6203
  function deserializeOptionImportPhase(pos) {
6163
- if (uint8[pos] === 2) return null;
6164
- return deserializeImportPhase(pos);
6204
+ return uint8[pos] === 2 ? null : deserializeImportPhase(pos);
6165
6205
  }
6166
6206
 
6167
6207
  function deserializeVecImportDeclarationSpecifier(pos) {
@@ -6177,8 +6217,9 @@ function deserializeVecImportDeclarationSpecifier(pos) {
6177
6217
  }
6178
6218
 
6179
6219
  function deserializeOptionVecImportDeclarationSpecifier(pos) {
6180
- if (uint32[pos >> 2] === 0 && uint32[(pos + 4) >> 2] === 0) return null;
6181
- return deserializeVecImportDeclarationSpecifier(pos);
6220
+ return uint32[pos >> 2] === 0 && uint32[(pos + 4) >> 2] === 0
6221
+ ? null
6222
+ : deserializeVecImportDeclarationSpecifier(pos);
6182
6223
  }
6183
6224
 
6184
6225
  function deserializeBoxWithClause(pos) {
@@ -6186,8 +6227,9 @@ function deserializeBoxWithClause(pos) {
6186
6227
  }
6187
6228
 
6188
6229
  function deserializeOptionBoxWithClause(pos) {
6189
- if (uint32[pos >> 2] === 0 && uint32[(pos + 4) >> 2] === 0) return null;
6190
- return deserializeBoxWithClause(pos);
6230
+ return uint32[pos >> 2] === 0 && uint32[(pos + 4) >> 2] === 0
6231
+ ? null
6232
+ : deserializeBoxWithClause(pos);
6191
6233
  }
6192
6234
 
6193
6235
  function deserializeBoxImportSpecifier(pos) {
@@ -6215,8 +6257,7 @@ function deserializeVecImportAttribute(pos) {
6215
6257
  }
6216
6258
 
6217
6259
  function deserializeOptionDeclaration(pos) {
6218
- if (uint8[pos] === 31) return null;
6219
- return deserializeDeclaration(pos);
6260
+ return uint8[pos] === 31 ? null : deserializeDeclaration(pos);
6220
6261
  }
6221
6262
 
6222
6263
  function deserializeVecExportSpecifier(pos) {
@@ -6232,13 +6273,11 @@ function deserializeVecExportSpecifier(pos) {
6232
6273
  }
6233
6274
 
6234
6275
  function deserializeOptionStringLiteral(pos) {
6235
- if (uint8[pos + 12] === 2) return null;
6236
- return deserializeStringLiteral(pos);
6276
+ return uint8[pos + 12] === 2 ? null : deserializeStringLiteral(pos);
6237
6277
  }
6238
6278
 
6239
6279
  function deserializeOptionModuleExportName(pos) {
6240
- if (uint8[pos] === 3) return null;
6241
- return deserializeModuleExportName(pos);
6280
+ return uint8[pos] === 3 ? null : deserializeModuleExportName(pos);
6242
6281
  }
6243
6282
 
6244
6283
  function deserializeF64(pos) {
@@ -6270,8 +6309,9 @@ function deserializeBoxJSXClosingElement(pos) {
6270
6309
  }
6271
6310
 
6272
6311
  function deserializeOptionBoxJSXClosingElement(pos) {
6273
- if (uint32[pos >> 2] === 0 && uint32[(pos + 4) >> 2] === 0) return null;
6274
- return deserializeBoxJSXClosingElement(pos);
6312
+ return uint32[pos >> 2] === 0 && uint32[(pos + 4) >> 2] === 0
6313
+ ? null
6314
+ : deserializeBoxJSXClosingElement(pos);
6275
6315
  }
6276
6316
 
6277
6317
  function deserializeVecJSXAttributeItem(pos) {
@@ -6307,8 +6347,7 @@ function deserializeBoxJSXSpreadAttribute(pos) {
6307
6347
  }
6308
6348
 
6309
6349
  function deserializeOptionJSXAttributeValue(pos) {
6310
- if (uint8[pos] === 4) return null;
6311
- return deserializeJSXAttributeValue(pos);
6350
+ return uint8[pos] === 4 ? null : deserializeJSXAttributeValue(pos);
6312
6351
  }
6313
6352
 
6314
6353
  function deserializeBoxJSXExpressionContainer(pos) {
@@ -6520,8 +6559,7 @@ function deserializeBoxTSQualifiedName(pos) {
6520
6559
  }
6521
6560
 
6522
6561
  function deserializeOptionTSType(pos) {
6523
- if (uint8[pos] === 38) return null;
6524
- return deserializeTSType(pos);
6562
+ return uint8[pos] === 38 ? null : deserializeTSType(pos);
6525
6563
  }
6526
6564
 
6527
6565
  function deserializeVecTSTypeParameter(pos) {
@@ -6593,8 +6631,7 @@ function deserializeVecTSIndexSignatureName(pos) {
6593
6631
  }
6594
6632
 
6595
6633
  function deserializeOptionTSModuleDeclarationBody(pos) {
6596
- if (uint8[pos] === 2) return null;
6597
- return deserializeTSModuleDeclarationBody(pos);
6634
+ return uint8[pos] === 2 ? null : deserializeTSModuleDeclarationBody(pos);
6598
6635
  }
6599
6636
 
6600
6637
  function deserializeBoxTSModuleBlock(pos) {
@@ -6606,13 +6643,13 @@ function deserializeBoxTSTypeParameter(pos) {
6606
6643
  }
6607
6644
 
6608
6645
  function deserializeOptionBoxObjectExpression(pos) {
6609
- if (uint32[pos >> 2] === 0 && uint32[(pos + 4) >> 2] === 0) return null;
6610
- return deserializeBoxObjectExpression(pos);
6646
+ return uint32[pos >> 2] === 0 && uint32[(pos + 4) >> 2] === 0
6647
+ ? null
6648
+ : deserializeBoxObjectExpression(pos);
6611
6649
  }
6612
6650
 
6613
6651
  function deserializeOptionTSImportTypeQualifier(pos) {
6614
- if (uint8[pos] === 2) return null;
6615
- return deserializeTSImportTypeQualifier(pos);
6652
+ return uint8[pos] === 2 ? null : deserializeTSImportTypeQualifier(pos);
6616
6653
  }
6617
6654
 
6618
6655
  function deserializeBoxTSImportTypeQualifiedName(pos) {
@@ -6620,8 +6657,7 @@ function deserializeBoxTSImportTypeQualifiedName(pos) {
6620
6657
  }
6621
6658
 
6622
6659
  function deserializeOptionTSMappedTypeModifierOperator(pos) {
6623
- if (uint8[pos] === 3) return null;
6624
- return deserializeTSMappedTypeModifierOperator(pos);
6660
+ return uint8[pos] === 3 ? null : deserializeTSMappedTypeModifierOperator(pos);
6625
6661
  }
6626
6662
 
6627
6663
  function deserializeBoxTSExternalModuleReference(pos) {
@@ -6633,8 +6669,9 @@ function deserializeU32(pos) {
6633
6669
  }
6634
6670
 
6635
6671
  function deserializeOptionNameSpan(pos) {
6636
- if (uint32[(pos + 8) >> 2] === 0 && uint32[(pos + 12) >> 2] === 0) return null;
6637
- return deserializeNameSpan(pos);
6672
+ return uint32[(pos + 8) >> 2] === 0 && uint32[(pos + 12) >> 2] === 0
6673
+ ? null
6674
+ : deserializeNameSpan(pos);
6638
6675
  }
6639
6676
 
6640
6677
  function deserializeVecError(pos) {