oxc-parser 0.95.0 → 0.96.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.
@@ -8,11 +8,9 @@ const textDecoder = new TextDecoder('utf-8', { ignoreBOM: true }),
8
8
  { fromCodePoint } = String;
9
9
 
10
10
  export function deserialize(buffer, sourceText, sourceByteLen) {
11
- return deserializeWith(buffer, sourceText, sourceByteLen, null, deserializeRawTransferData);
12
- }
13
-
14
- export function deserializeProgramOnly(buffer, sourceText, sourceByteLen, getLoc) {
15
- return deserializeWith(buffer, sourceText, sourceByteLen, getLoc, deserializeProgram);
11
+ let data = deserializeWith(buffer, sourceText, sourceByteLen, null, deserializeRawTransferData);
12
+ resetBuffer();
13
+ return data;
16
14
  }
17
15
 
18
16
  function deserializeWith(buffer, sourceTextInput, sourceByteLenInput, getLocInput, deserialize) {
@@ -22,13 +20,12 @@ function deserializeWith(buffer, sourceTextInput, sourceByteLenInput, getLocInpu
22
20
  sourceText = sourceTextInput;
23
21
  sourceByteLen = sourceByteLenInput;
24
22
  sourceIsAscii = sourceText.length === sourceByteLen;
25
- let data = deserialize(uint32[536870902]);
26
- uint8 =
27
- uint32 =
28
- float64 =
29
- sourceText =
30
- void 0;
31
- return data;
23
+ return deserialize(uint32[536870902]);
24
+ }
25
+
26
+ export function resetBuffer() {
27
+ // Clear buffer and source text string to allow them to be garbage collected
28
+ uint8 = uint32 = float64 = sourceText = void 0;
32
29
  }
33
30
 
34
31
  function deserializeProgram(pos) {
@@ -42,7 +39,7 @@ function deserializeProgram(pos) {
42
39
  end,
43
40
  };
44
41
  program.hashbang = deserializeOptionHashbang(pos + 48);
45
- let body = program.body = deserializeVecDirective(pos + 72);
42
+ let body = (program.body = deserializeVecDirective(pos + 72));
46
43
  body.push(...deserializeVecStatement(pos + 96));
47
44
  {
48
45
  let start;
@@ -533,7 +530,8 @@ function deserializeTemplateElement(pos) {
533
530
  start = deserializeU32(pos) - 1,
534
531
  end = deserializeU32(pos + 4) + 2 - tail,
535
532
  value = deserializeTemplateElementValue(pos + 8);
536
- value.cooked !== null && deserializeBool(pos + 41) &&
533
+ value.cooked !== null &&
534
+ deserializeBool(pos + 41) &&
537
535
  (value.cooked = value.cooked.replace(/\uFFFD(.{4})/g, (_, hex) => String.fromCodePoint(parseInt(hex, 16))));
538
536
  return {
539
537
  type: 'TemplateElement',
@@ -1052,16 +1050,17 @@ function deserializeAssignmentTargetPropertyIdentifier(pos) {
1052
1050
  key = deserializeIdentifierReference(pos + 8),
1053
1051
  init = deserializeOptionExpression(pos + 40),
1054
1052
  value = { ...key };
1055
- init !== null && (value = {
1056
- type: 'AssignmentPattern',
1057
- decorators: [],
1058
- left: value,
1059
- right: init,
1060
- optional: false,
1061
- typeAnnotation: null,
1062
- start,
1063
- end,
1064
- });
1053
+ init !== null &&
1054
+ (value = {
1055
+ type: 'AssignmentPattern',
1056
+ decorators: [],
1057
+ left: value,
1058
+ right: init,
1059
+ optional: false,
1060
+ typeAnnotation: null,
1061
+ start,
1062
+ end,
1063
+ });
1065
1064
  node.kind = 'init';
1066
1065
  node.key = key;
1067
1066
  node.value = value;
@@ -1252,7 +1251,8 @@ function deserializeDirective(pos) {
1252
1251
  }
1253
1252
 
1254
1253
  function deserializeHashbang(pos) {
1255
- let start = deserializeU32(pos), end = deserializeU32(pos + 4);
1254
+ let start = deserializeU32(pos),
1255
+ end = deserializeU32(pos + 4);
1256
1256
  return {
1257
1257
  type: 'Hashbang',
1258
1258
  value: deserializeStr(pos + 8),
@@ -1886,8 +1886,8 @@ function deserializeFunctionType(pos) {
1886
1886
 
1887
1887
  function deserializeFormalParameters(pos) {
1888
1888
  let params = deserializeVecFormalParameter(pos + 8);
1889
- if (uint32[pos + 32 >> 2] !== 0 && uint32[pos + 36 >> 2] !== 0) {
1890
- pos = uint32[pos + 32 >> 2];
1889
+ if (uint32[(pos + 32) >> 2] !== 0 && uint32[(pos + 36) >> 2] !== 0) {
1890
+ pos = uint32[(pos + 32) >> 2];
1891
1891
  let rest = {
1892
1892
  type: 'RestElement',
1893
1893
  decorators: [],
@@ -2144,7 +2144,8 @@ function deserializeMethodDefinitionKind(pos) {
2144
2144
  }
2145
2145
 
2146
2146
  function deserializePrivateIdentifier(pos) {
2147
- let start = deserializeU32(pos), end = deserializeU32(pos + 4);
2147
+ let start = deserializeU32(pos),
2148
+ end = deserializeU32(pos + 4);
2148
2149
  return {
2149
2150
  type: 'PrivateIdentifier',
2150
2151
  name: deserializeStr(pos + 8),
@@ -2558,7 +2559,8 @@ function deserializeNullLiteral(pos) {
2558
2559
  }
2559
2560
 
2560
2561
  function deserializeNumericLiteral(pos) {
2561
- let start = deserializeU32(pos), end = deserializeU32(pos + 4);
2562
+ let start = deserializeU32(pos),
2563
+ end = deserializeU32(pos + 4);
2562
2564
  return {
2563
2565
  type: 'Literal',
2564
2566
  value: deserializeF64(pos + 8),
@@ -2631,7 +2633,8 @@ function deserializeRegExp(pos) {
2631
2633
  }
2632
2634
 
2633
2635
  function deserializeRegExpFlags(pos) {
2634
- let flagBits = deserializeU8(pos), flags = '';
2636
+ let flagBits = deserializeU8(pos),
2637
+ flags = '';
2635
2638
  // Alphabetical order
2636
2639
  flagBits & 64 && (flags += 'd');
2637
2640
  flagBits & 1 && (flags += 'g');
@@ -2977,7 +2980,8 @@ function deserializeJSXAttributeValue(pos) {
2977
2980
  }
2978
2981
 
2979
2982
  function deserializeJSXIdentifier(pos) {
2980
- let start = deserializeU32(pos), end = deserializeU32(pos + 4);
2983
+ let start = deserializeU32(pos),
2984
+ end = deserializeU32(pos + 4);
2981
2985
  return {
2982
2986
  type: 'JSXIdentifier',
2983
2987
  name: deserializeStr(pos + 8),
@@ -3015,7 +3019,8 @@ function deserializeJSXSpreadChild(pos) {
3015
3019
  }
3016
3020
 
3017
3021
  function deserializeJSXText(pos) {
3018
- let start = deserializeU32(pos), end = deserializeU32(pos + 4);
3022
+ let start = deserializeU32(pos),
3023
+ end = deserializeU32(pos + 4);
3019
3024
  return {
3020
3025
  type: 'JSXText',
3021
3026
  value: deserializeStr(pos + 8),
@@ -3694,7 +3699,7 @@ function deserializeTSClassImplements(pos) {
3694
3699
  if (expression.type === 'TSQualifiedName') {
3695
3700
  let object = expression.left,
3696
3701
  { right } = expression,
3697
- previous = expression = {
3702
+ previous = (expression = {
3698
3703
  type: 'MemberExpression',
3699
3704
  object,
3700
3705
  property: right,
@@ -3702,8 +3707,8 @@ function deserializeTSClassImplements(pos) {
3702
3707
  computed: false,
3703
3708
  start: expression.start,
3704
3709
  end: expression.end,
3705
- };
3706
- for (; object.type === 'TSQualifiedName';) {
3710
+ });
3711
+ for (; object.type === 'TSQualifiedName'; ) {
3707
3712
  let { left, right } = object;
3708
3713
  previous = previous.object = {
3709
3714
  type: 'MemberExpression',
@@ -3980,7 +3985,7 @@ function deserializeTSModuleDeclaration(pos) {
3980
3985
  if (body.type === 'TSModuleBlock') node.id = id;
3981
3986
  else {
3982
3987
  let innerId = body.id;
3983
- if (innerId.type === 'Identifier') {
3988
+ if (innerId.type === 'Identifier')
3984
3989
  node.id = {
3985
3990
  type: 'TSQualifiedName',
3986
3991
  left: id,
@@ -3988,7 +3993,7 @@ function deserializeTSModuleDeclaration(pos) {
3988
3993
  start: id.start,
3989
3994
  end: innerId.end,
3990
3995
  };
3991
- } else {
3996
+ else {
3992
3997
  // Replace `left` of innermost `TSQualifiedName` with a nested `TSQualifiedName` with `id` of
3993
3998
  // this module on left, and previous `left` of innermost `TSQualifiedName` on right
3994
3999
  node.id = innerId;
@@ -4178,7 +4183,7 @@ function deserializeTSConstructorType(pos) {
4178
4183
  end = deserializeU32(pos + 4),
4179
4184
  node = {
4180
4185
  type: 'TSConstructorType',
4181
- abstract: deserializeBool(pos + 32),
4186
+ abstract: deserializeBool(pos + 36),
4182
4187
  typeParameters: null,
4183
4188
  params: null,
4184
4189
  returnType: null,
@@ -4443,20 +4448,18 @@ function deserializeCommentKind(pos) {
4443
4448
  function deserializeComment(pos) {
4444
4449
  let type = deserializeCommentKind(pos + 12),
4445
4450
  start = deserializeU32(pos),
4446
- end = deserializeU32(pos + 4),
4447
- node = {
4448
- type,
4449
- value: null,
4450
- start,
4451
- end,
4452
- },
4453
- endCut = type === 'Line' ? 0 : 2;
4454
- node.value = sourceText.slice(start + 2, end - endCut);
4455
- return node;
4451
+ end = deserializeU32(pos + 4);
4452
+ return {
4453
+ type,
4454
+ value: sourceText.slice(start + 2, end - (type === 'Line' ? 0 : 2)),
4455
+ start,
4456
+ end,
4457
+ };
4456
4458
  }
4457
4459
 
4458
4460
  function deserializeNameSpan(pos) {
4459
- let start = deserializeU32(pos), end = deserializeU32(pos + 4);
4461
+ let start = deserializeU32(pos),
4462
+ end = deserializeU32(pos + 4);
4460
4463
  return {
4461
4464
  value: deserializeStr(pos + 8),
4462
4465
  start,
@@ -4503,7 +4506,8 @@ function deserializeImportImportName(pos) {
4503
4506
  }
4504
4507
 
4505
4508
  function deserializeExportEntry(pos) {
4506
- let start = deserializeU32(pos), end = deserializeU32(pos + 4);
4509
+ let start = deserializeU32(pos),
4510
+ end = deserializeU32(pos + 4);
4507
4511
  return {
4508
4512
  moduleRequest: deserializeOptionNameSpan(pos + 16),
4509
4513
  importName: deserializeExportImportName(pos + 40),
@@ -4612,7 +4616,8 @@ function deserializeExportLocalName(pos) {
4612
4616
  }
4613
4617
 
4614
4618
  function deserializeDynamicImport(pos) {
4615
- let start = deserializeU32(pos), end = deserializeU32(pos + 4);
4619
+ let start = deserializeU32(pos),
4620
+ end = deserializeU32(pos + 4);
4616
4621
  return {
4617
4622
  moduleRequest: deserializeSpan(pos + 8),
4618
4623
  start,
@@ -4806,7 +4811,8 @@ function deserializeErrorSeverity(pos) {
4806
4811
  }
4807
4812
 
4808
4813
  function deserializeErrorLabel(pos) {
4809
- let start = deserializeU32(pos), end = deserializeU32(pos + 4);
4814
+ let start = deserializeU32(pos),
4815
+ end = deserializeU32(pos + 4);
4810
4816
  return {
4811
4817
  message: deserializeOptionStr(pos + 8),
4812
4818
  start,
@@ -4825,7 +4831,8 @@ function deserializeEcmaScriptModule(pos) {
4825
4831
  }
4826
4832
 
4827
4833
  function deserializeStaticImport(pos) {
4828
- let start = deserializeU32(pos), end = deserializeU32(pos + 4);
4834
+ let start = deserializeU32(pos),
4835
+ end = deserializeU32(pos + 4);
4829
4836
  return {
4830
4837
  moduleRequest: deserializeNameSpan(pos + 8),
4831
4838
  entries: deserializeVecImportEntry(pos + 32),
@@ -4835,7 +4842,8 @@ function deserializeStaticImport(pos) {
4835
4842
  }
4836
4843
 
4837
4844
  function deserializeStaticExport(pos) {
4838
- let start = deserializeU32(pos), end = deserializeU32(pos + 4);
4845
+ let start = deserializeU32(pos),
4846
+ end = deserializeU32(pos + 4);
4839
4847
  return {
4840
4848
  entries: deserializeVecExportEntry(pos + 8),
4841
4849
  start,
@@ -4852,7 +4860,8 @@ function deserializeU8(pos) {
4852
4860
  }
4853
4861
 
4854
4862
  function deserializeStr(pos) {
4855
- let pos32 = pos >> 2, len = uint32[pos32 + 2];
4863
+ let pos32 = pos >> 2,
4864
+ len = uint32[pos32 + 2];
4856
4865
  if (len === 0) return '';
4857
4866
  pos = uint32[pos32];
4858
4867
  if (sourceIsAscii && pos < sourceByteLen) return sourceText.substr(pos, len);
@@ -4861,7 +4870,8 @@ function deserializeStr(pos) {
4861
4870
  let end = pos + len;
4862
4871
  if (len > 50) return decodeStr(uint8.subarray(pos, end));
4863
4872
  // Shorter strings decode by hand to avoid native call
4864
- let out = '', c;
4873
+ let out = '',
4874
+ c;
4865
4875
  do {
4866
4876
  c = uint8[pos++];
4867
4877
  if (c < 128) out += fromCodePoint(c);
@@ -4874,10 +4884,11 @@ function deserializeStr(pos) {
4874
4884
  }
4875
4885
 
4876
4886
  function deserializeVecComment(pos) {
4877
- let arr = [], pos32 = pos >> 2;
4887
+ let arr = [],
4888
+ pos32 = pos >> 2;
4878
4889
  pos = uint32[pos32];
4879
4890
  let endPos = pos + uint32[pos32 + 2] * 16;
4880
- for (; pos !== endPos;) {
4891
+ for (; pos !== endPos; ) {
4881
4892
  arr.push(deserializeComment(pos));
4882
4893
  pos += 16;
4883
4894
  }
@@ -4885,15 +4896,16 @@ function deserializeVecComment(pos) {
4885
4896
  }
4886
4897
 
4887
4898
  function deserializeOptionHashbang(pos) {
4888
- if (uint32[pos + 8 >> 2] === 0 && uint32[pos + 12 >> 2] === 0) return null;
4899
+ if (uint32[(pos + 8) >> 2] === 0 && uint32[(pos + 12) >> 2] === 0) return null;
4889
4900
  return deserializeHashbang(pos);
4890
4901
  }
4891
4902
 
4892
4903
  function deserializeVecDirective(pos) {
4893
- let arr = [], pos32 = pos >> 2;
4904
+ let arr = [],
4905
+ pos32 = pos >> 2;
4894
4906
  pos = uint32[pos32];
4895
4907
  let endPos = pos + uint32[pos32 + 2] * 72;
4896
- for (; pos !== endPos;) {
4908
+ for (; pos !== endPos; ) {
4897
4909
  arr.push(deserializeDirective(pos));
4898
4910
  pos += 72;
4899
4911
  }
@@ -4901,10 +4913,11 @@ function deserializeVecDirective(pos) {
4901
4913
  }
4902
4914
 
4903
4915
  function deserializeVecStatement(pos) {
4904
- let arr = [], pos32 = pos >> 2;
4916
+ let arr = [],
4917
+ pos32 = pos >> 2;
4905
4918
  pos = uint32[pos32];
4906
4919
  let endPos = pos + uint32[pos32 + 2] * 16;
4907
- for (; pos !== endPos;) {
4920
+ for (; pos !== endPos; ) {
4908
4921
  arr.push(deserializeStatement(pos));
4909
4922
  pos += 16;
4910
4923
  }
@@ -5072,10 +5085,11 @@ function deserializeBoxV8IntrinsicExpression(pos) {
5072
5085
  }
5073
5086
 
5074
5087
  function deserializeVecArrayExpressionElement(pos) {
5075
- let arr = [], pos32 = pos >> 2;
5088
+ let arr = [],
5089
+ pos32 = pos >> 2;
5076
5090
  pos = uint32[pos32];
5077
5091
  let endPos = pos + uint32[pos32 + 2] * 16;
5078
- for (; pos !== endPos;) {
5092
+ for (; pos !== endPos; ) {
5079
5093
  arr.push(deserializeArrayExpressionElement(pos));
5080
5094
  pos += 16;
5081
5095
  }
@@ -5087,10 +5101,11 @@ function deserializeBoxSpreadElement(pos) {
5087
5101
  }
5088
5102
 
5089
5103
  function deserializeVecObjectPropertyKind(pos) {
5090
- let arr = [], pos32 = pos >> 2;
5104
+ let arr = [],
5105
+ pos32 = pos >> 2;
5091
5106
  pos = uint32[pos32];
5092
5107
  let endPos = pos + uint32[pos32 + 2] * 16;
5093
- for (; pos !== endPos;) {
5108
+ for (; pos !== endPos; ) {
5094
5109
  arr.push(deserializeObjectPropertyKind(pos));
5095
5110
  pos += 16;
5096
5111
  }
@@ -5114,10 +5129,11 @@ function deserializeBoxPrivateIdentifier(pos) {
5114
5129
  }
5115
5130
 
5116
5131
  function deserializeVecTemplateElement(pos) {
5117
- let arr = [], pos32 = pos >> 2;
5132
+ let arr = [],
5133
+ pos32 = pos >> 2;
5118
5134
  pos = uint32[pos32];
5119
5135
  let endPos = pos + uint32[pos32 + 2] * 48;
5120
- for (; pos !== endPos;) {
5136
+ for (; pos !== endPos; ) {
5121
5137
  arr.push(deserializeTemplateElement(pos));
5122
5138
  pos += 48;
5123
5139
  }
@@ -5125,10 +5141,11 @@ function deserializeVecTemplateElement(pos) {
5125
5141
  }
5126
5142
 
5127
5143
  function deserializeVecExpression(pos) {
5128
- let arr = [], pos32 = pos >> 2;
5144
+ let arr = [],
5145
+ pos32 = pos >> 2;
5129
5146
  pos = uint32[pos32];
5130
5147
  let endPos = pos + uint32[pos32 + 2] * 16;
5131
- for (; pos !== endPos;) {
5148
+ for (; pos !== endPos; ) {
5132
5149
  arr.push(deserializeExpression(pos));
5133
5150
  pos += 16;
5134
5151
  }
@@ -5140,12 +5157,12 @@ function deserializeBoxTSTypeParameterInstantiation(pos) {
5140
5157
  }
5141
5158
 
5142
5159
  function deserializeOptionBoxTSTypeParameterInstantiation(pos) {
5143
- if (uint32[pos >> 2] === 0 && uint32[pos + 4 >> 2] === 0) return null;
5160
+ if (uint32[pos >> 2] === 0 && uint32[(pos + 4) >> 2] === 0) return null;
5144
5161
  return deserializeBoxTSTypeParameterInstantiation(pos);
5145
5162
  }
5146
5163
 
5147
5164
  function deserializeOptionStr(pos) {
5148
- if (uint32[pos >> 2] === 0 && uint32[pos + 4 >> 2] === 0) return null;
5165
+ if (uint32[pos >> 2] === 0 && uint32[(pos + 4) >> 2] === 0) return null;
5149
5166
  return deserializeStr(pos);
5150
5167
  }
5151
5168
 
@@ -5162,10 +5179,11 @@ function deserializeBoxPrivateFieldExpression(pos) {
5162
5179
  }
5163
5180
 
5164
5181
  function deserializeVecArgument(pos) {
5165
- let arr = [], pos32 = pos >> 2;
5182
+ let arr = [],
5183
+ pos32 = pos >> 2;
5166
5184
  pos = uint32[pos32];
5167
5185
  let endPos = pos + uint32[pos32 + 2] * 16;
5168
- for (; pos !== endPos;) {
5186
+ for (; pos !== endPos; ) {
5169
5187
  arr.push(deserializeArgument(pos));
5170
5188
  pos += 16;
5171
5189
  }
@@ -5186,10 +5204,11 @@ function deserializeOptionAssignmentTargetMaybeDefault(pos) {
5186
5204
  }
5187
5205
 
5188
5206
  function deserializeVecOptionAssignmentTargetMaybeDefault(pos) {
5189
- let arr = [], pos32 = pos >> 2;
5207
+ let arr = [],
5208
+ pos32 = pos >> 2;
5190
5209
  pos = uint32[pos32];
5191
5210
  let endPos = pos + uint32[pos32 + 2] * 16;
5192
- for (; pos !== endPos;) {
5211
+ for (; pos !== endPos; ) {
5193
5212
  arr.push(deserializeOptionAssignmentTargetMaybeDefault(pos));
5194
5213
  pos += 16;
5195
5214
  }
@@ -5201,15 +5220,16 @@ function deserializeBoxAssignmentTargetRest(pos) {
5201
5220
  }
5202
5221
 
5203
5222
  function deserializeOptionBoxAssignmentTargetRest(pos) {
5204
- if (uint32[pos >> 2] === 0 && uint32[pos + 4 >> 2] === 0) return null;
5223
+ if (uint32[pos >> 2] === 0 && uint32[(pos + 4) >> 2] === 0) return null;
5205
5224
  return deserializeBoxAssignmentTargetRest(pos);
5206
5225
  }
5207
5226
 
5208
5227
  function deserializeVecAssignmentTargetProperty(pos) {
5209
- let arr = [], pos32 = pos >> 2;
5228
+ let arr = [],
5229
+ pos32 = pos >> 2;
5210
5230
  pos = uint32[pos32];
5211
5231
  let endPos = pos + uint32[pos32 + 2] * 16;
5212
- for (; pos !== endPos;) {
5232
+ for (; pos !== endPos; ) {
5213
5233
  arr.push(deserializeAssignmentTargetProperty(pos));
5214
5234
  pos += 16;
5215
5235
  }
@@ -5330,10 +5350,11 @@ function deserializeBoxTSImportEqualsDeclaration(pos) {
5330
5350
  }
5331
5351
 
5332
5352
  function deserializeVecVariableDeclarator(pos) {
5333
- let arr = [], pos32 = pos >> 2;
5353
+ let arr = [],
5354
+ pos32 = pos >> 2;
5334
5355
  pos = uint32[pos32];
5335
5356
  let endPos = pos + uint32[pos32 + 2] * 64;
5336
- for (; pos !== endPos;) {
5357
+ for (; pos !== endPos; ) {
5337
5358
  arr.push(deserializeVariableDeclarator(pos));
5338
5359
  pos += 64;
5339
5360
  }
@@ -5351,15 +5372,16 @@ function deserializeOptionForStatementInit(pos) {
5351
5372
  }
5352
5373
 
5353
5374
  function deserializeOptionLabelIdentifier(pos) {
5354
- if (uint32[pos + 8 >> 2] === 0 && uint32[pos + 12 >> 2] === 0) return null;
5375
+ if (uint32[(pos + 8) >> 2] === 0 && uint32[(pos + 12) >> 2] === 0) return null;
5355
5376
  return deserializeLabelIdentifier(pos);
5356
5377
  }
5357
5378
 
5358
5379
  function deserializeVecSwitchCase(pos) {
5359
- let arr = [], pos32 = pos >> 2;
5380
+ let arr = [],
5381
+ pos32 = pos >> 2;
5360
5382
  pos = uint32[pos32];
5361
5383
  let endPos = pos + uint32[pos32 + 2] * 48;
5362
- for (; pos !== endPos;) {
5384
+ for (; pos !== endPos; ) {
5363
5385
  arr.push(deserializeSwitchCase(pos));
5364
5386
  pos += 48;
5365
5387
  }
@@ -5371,12 +5393,12 @@ function deserializeBoxCatchClause(pos) {
5371
5393
  }
5372
5394
 
5373
5395
  function deserializeOptionBoxCatchClause(pos) {
5374
- if (uint32[pos >> 2] === 0 && uint32[pos + 4 >> 2] === 0) return null;
5396
+ if (uint32[pos >> 2] === 0 && uint32[(pos + 4) >> 2] === 0) return null;
5375
5397
  return deserializeBoxCatchClause(pos);
5376
5398
  }
5377
5399
 
5378
5400
  function deserializeOptionBoxBlockStatement(pos) {
5379
- if (uint32[pos >> 2] === 0 && uint32[pos + 4 >> 2] === 0) return null;
5401
+ if (uint32[pos >> 2] === 0 && uint32[(pos + 4) >> 2] === 0) return null;
5380
5402
  return deserializeBoxBlockStatement(pos);
5381
5403
  }
5382
5404
 
@@ -5390,7 +5412,7 @@ function deserializeBoxTSTypeAnnotation(pos) {
5390
5412
  }
5391
5413
 
5392
5414
  function deserializeOptionBoxTSTypeAnnotation(pos) {
5393
- if (uint32[pos >> 2] === 0 && uint32[pos + 4 >> 2] === 0) return null;
5415
+ if (uint32[pos >> 2] === 0 && uint32[(pos + 4) >> 2] === 0) return null;
5394
5416
  return deserializeBoxTSTypeAnnotation(pos);
5395
5417
  }
5396
5418
 
@@ -5411,10 +5433,11 @@ function deserializeBoxAssignmentPattern(pos) {
5411
5433
  }
5412
5434
 
5413
5435
  function deserializeVecBindingProperty(pos) {
5414
- let arr = [], pos32 = pos >> 2;
5436
+ let arr = [],
5437
+ pos32 = pos >> 2;
5415
5438
  pos = uint32[pos32];
5416
5439
  let endPos = pos + uint32[pos32 + 2] * 64;
5417
- for (; pos !== endPos;) {
5440
+ for (; pos !== endPos; ) {
5418
5441
  arr.push(deserializeBindingProperty(pos));
5419
5442
  pos += 64;
5420
5443
  }
@@ -5426,7 +5449,7 @@ function deserializeBoxBindingRestElement(pos) {
5426
5449
  }
5427
5450
 
5428
5451
  function deserializeOptionBoxBindingRestElement(pos) {
5429
- if (uint32[pos >> 2] === 0 && uint32[pos + 4 >> 2] === 0) return null;
5452
+ if (uint32[pos >> 2] === 0 && uint32[(pos + 4) >> 2] === 0) return null;
5430
5453
  return deserializeBoxBindingRestElement(pos);
5431
5454
  }
5432
5455
 
@@ -5436,10 +5459,11 @@ function deserializeOptionBindingPattern(pos) {
5436
5459
  }
5437
5460
 
5438
5461
  function deserializeVecOptionBindingPattern(pos) {
5439
- let arr = [], pos32 = pos >> 2;
5462
+ let arr = [],
5463
+ pos32 = pos >> 2;
5440
5464
  pos = uint32[pos32];
5441
5465
  let endPos = pos + uint32[pos32 + 2] * 32;
5442
- for (; pos !== endPos;) {
5466
+ for (; pos !== endPos; ) {
5443
5467
  arr.push(deserializeOptionBindingPattern(pos));
5444
5468
  pos += 32;
5445
5469
  }
@@ -5447,7 +5471,7 @@ function deserializeVecOptionBindingPattern(pos) {
5447
5471
  }
5448
5472
 
5449
5473
  function deserializeOptionBindingIdentifier(pos) {
5450
- if (uint32[pos + 8 >> 2] === 0 && uint32[pos + 12 >> 2] === 0) return null;
5474
+ if (uint32[(pos + 8) >> 2] === 0 && uint32[(pos + 12) >> 2] === 0) return null;
5451
5475
  return deserializeBindingIdentifier(pos);
5452
5476
  }
5453
5477
 
@@ -5456,7 +5480,7 @@ function deserializeBoxTSTypeParameterDeclaration(pos) {
5456
5480
  }
5457
5481
 
5458
5482
  function deserializeOptionBoxTSTypeParameterDeclaration(pos) {
5459
- if (uint32[pos >> 2] === 0 && uint32[pos + 4 >> 2] === 0) return null;
5483
+ if (uint32[pos >> 2] === 0 && uint32[(pos + 4) >> 2] === 0) return null;
5460
5484
  return deserializeBoxTSTypeParameterDeclaration(pos);
5461
5485
  }
5462
5486
 
@@ -5465,7 +5489,7 @@ function deserializeBoxTSThisParameter(pos) {
5465
5489
  }
5466
5490
 
5467
5491
  function deserializeOptionBoxTSThisParameter(pos) {
5468
- if (uint32[pos >> 2] === 0 && uint32[pos + 4 >> 2] === 0) return null;
5492
+ if (uint32[pos >> 2] === 0 && uint32[(pos + 4) >> 2] === 0) return null;
5469
5493
  return deserializeBoxTSThisParameter(pos);
5470
5494
  }
5471
5495
 
@@ -5478,15 +5502,16 @@ function deserializeBoxFunctionBody(pos) {
5478
5502
  }
5479
5503
 
5480
5504
  function deserializeOptionBoxFunctionBody(pos) {
5481
- if (uint32[pos >> 2] === 0 && uint32[pos + 4 >> 2] === 0) return null;
5505
+ if (uint32[pos >> 2] === 0 && uint32[(pos + 4) >> 2] === 0) return null;
5482
5506
  return deserializeBoxFunctionBody(pos);
5483
5507
  }
5484
5508
 
5485
5509
  function deserializeVecFormalParameter(pos) {
5486
- let arr = [], pos32 = pos >> 2;
5510
+ let arr = [],
5511
+ pos32 = pos >> 2;
5487
5512
  pos = uint32[pos32];
5488
5513
  let endPos = pos + uint32[pos32 + 2] * 72;
5489
- for (; pos !== endPos;) {
5514
+ for (; pos !== endPos; ) {
5490
5515
  arr.push(deserializeFormalParameter(pos));
5491
5516
  pos += 72;
5492
5517
  }
@@ -5494,10 +5519,11 @@ function deserializeVecFormalParameter(pos) {
5494
5519
  }
5495
5520
 
5496
5521
  function deserializeVecDecorator(pos) {
5497
- let arr = [], pos32 = pos >> 2;
5522
+ let arr = [],
5523
+ pos32 = pos >> 2;
5498
5524
  pos = uint32[pos32];
5499
5525
  let endPos = pos + uint32[pos32 + 2] * 24;
5500
- for (; pos !== endPos;) {
5526
+ for (; pos !== endPos; ) {
5501
5527
  arr.push(deserializeDecorator(pos));
5502
5528
  pos += 24;
5503
5529
  }
@@ -5510,10 +5536,11 @@ function deserializeOptionTSAccessibility(pos) {
5510
5536
  }
5511
5537
 
5512
5538
  function deserializeVecTSClassImplements(pos) {
5513
- let arr = [], pos32 = pos >> 2;
5539
+ let arr = [],
5540
+ pos32 = pos >> 2;
5514
5541
  pos = uint32[pos32];
5515
5542
  let endPos = pos + uint32[pos32 + 2] * 32;
5516
- for (; pos !== endPos;) {
5543
+ for (; pos !== endPos; ) {
5517
5544
  arr.push(deserializeTSClassImplements(pos));
5518
5545
  pos += 32;
5519
5546
  }
@@ -5525,10 +5552,11 @@ function deserializeBoxClassBody(pos) {
5525
5552
  }
5526
5553
 
5527
5554
  function deserializeVecClassElement(pos) {
5528
- let arr = [], pos32 = pos >> 2;
5555
+ let arr = [],
5556
+ pos32 = pos >> 2;
5529
5557
  pos = uint32[pos32];
5530
5558
  let endPos = pos + uint32[pos32 + 2] * 16;
5531
- for (; pos !== endPos;) {
5559
+ for (; pos !== endPos; ) {
5532
5560
  arr.push(deserializeClassElement(pos));
5533
5561
  pos += 16;
5534
5562
  }
@@ -5585,10 +5613,11 @@ function deserializeOptionImportPhase(pos) {
5585
5613
  }
5586
5614
 
5587
5615
  function deserializeVecImportDeclarationSpecifier(pos) {
5588
- let arr = [], pos32 = pos >> 2;
5616
+ let arr = [],
5617
+ pos32 = pos >> 2;
5589
5618
  pos = uint32[pos32];
5590
5619
  let endPos = pos + uint32[pos32 + 2] * 16;
5591
- for (; pos !== endPos;) {
5620
+ for (; pos !== endPos; ) {
5592
5621
  arr.push(deserializeImportDeclarationSpecifier(pos));
5593
5622
  pos += 16;
5594
5623
  }
@@ -5596,7 +5625,7 @@ function deserializeVecImportDeclarationSpecifier(pos) {
5596
5625
  }
5597
5626
 
5598
5627
  function deserializeOptionVecImportDeclarationSpecifier(pos) {
5599
- if (uint32[pos >> 2] === 0 && uint32[pos + 4 >> 2] === 0) return null;
5628
+ if (uint32[pos >> 2] === 0 && uint32[(pos + 4) >> 2] === 0) return null;
5600
5629
  return deserializeVecImportDeclarationSpecifier(pos);
5601
5630
  }
5602
5631
 
@@ -5605,7 +5634,7 @@ function deserializeBoxWithClause(pos) {
5605
5634
  }
5606
5635
 
5607
5636
  function deserializeOptionBoxWithClause(pos) {
5608
- if (uint32[pos >> 2] === 0 && uint32[pos + 4 >> 2] === 0) return null;
5637
+ if (uint32[pos >> 2] === 0 && uint32[(pos + 4) >> 2] === 0) return null;
5609
5638
  return deserializeBoxWithClause(pos);
5610
5639
  }
5611
5640
 
@@ -5622,10 +5651,11 @@ function deserializeBoxImportNamespaceSpecifier(pos) {
5622
5651
  }
5623
5652
 
5624
5653
  function deserializeVecImportAttribute(pos) {
5625
- let arr = [], pos32 = pos >> 2;
5654
+ let arr = [],
5655
+ pos32 = pos >> 2;
5626
5656
  pos = uint32[pos32];
5627
5657
  let endPos = pos + uint32[pos32 + 2] * 112;
5628
- for (; pos !== endPos;) {
5658
+ for (; pos !== endPos; ) {
5629
5659
  arr.push(deserializeImportAttribute(pos));
5630
5660
  pos += 112;
5631
5661
  }
@@ -5638,10 +5668,11 @@ function deserializeOptionDeclaration(pos) {
5638
5668
  }
5639
5669
 
5640
5670
  function deserializeVecExportSpecifier(pos) {
5641
- let arr = [], pos32 = pos >> 2;
5671
+ let arr = [],
5672
+ pos32 = pos >> 2;
5642
5673
  pos = uint32[pos32];
5643
5674
  let endPos = pos + uint32[pos32 + 2] * 128;
5644
- for (; pos !== endPos;) {
5675
+ for (; pos !== endPos; ) {
5645
5676
  arr.push(deserializeExportSpecifier(pos));
5646
5677
  pos += 128;
5647
5678
  }
@@ -5667,10 +5698,11 @@ function deserializeBoxJSXOpeningElement(pos) {
5667
5698
  }
5668
5699
 
5669
5700
  function deserializeVecJSXChild(pos) {
5670
- let arr = [], pos32 = pos >> 2;
5701
+ let arr = [],
5702
+ pos32 = pos >> 2;
5671
5703
  pos = uint32[pos32];
5672
5704
  let endPos = pos + uint32[pos32 + 2] * 16;
5673
- for (; pos !== endPos;) {
5705
+ for (; pos !== endPos; ) {
5674
5706
  arr.push(deserializeJSXChild(pos));
5675
5707
  pos += 16;
5676
5708
  }
@@ -5682,15 +5714,16 @@ function deserializeBoxJSXClosingElement(pos) {
5682
5714
  }
5683
5715
 
5684
5716
  function deserializeOptionBoxJSXClosingElement(pos) {
5685
- if (uint32[pos >> 2] === 0 && uint32[pos + 4 >> 2] === 0) return null;
5717
+ if (uint32[pos >> 2] === 0 && uint32[(pos + 4) >> 2] === 0) return null;
5686
5718
  return deserializeBoxJSXClosingElement(pos);
5687
5719
  }
5688
5720
 
5689
5721
  function deserializeVecJSXAttributeItem(pos) {
5690
- let arr = [], pos32 = pos >> 2;
5722
+ let arr = [],
5723
+ pos32 = pos >> 2;
5691
5724
  pos = uint32[pos32];
5692
5725
  let endPos = pos + uint32[pos32 + 2] * 16;
5693
- for (; pos !== endPos;) {
5726
+ for (; pos !== endPos; ) {
5694
5727
  arr.push(deserializeJSXAttributeItem(pos));
5695
5728
  pos += 16;
5696
5729
  }
@@ -5735,10 +5768,11 @@ function deserializeBoxJSXSpreadChild(pos) {
5735
5768
  }
5736
5769
 
5737
5770
  function deserializeVecTSEnumMember(pos) {
5738
- let arr = [], pos32 = pos >> 2;
5771
+ let arr = [],
5772
+ pos32 = pos >> 2;
5739
5773
  pos = uint32[pos32];
5740
5774
  let endPos = pos + uint32[pos32 + 2] * 40;
5741
- for (; pos !== endPos;) {
5775
+ for (; pos !== endPos; ) {
5742
5776
  arr.push(deserializeTSEnumMember(pos));
5743
5777
  pos += 40;
5744
5778
  }
@@ -5894,10 +5928,11 @@ function deserializeBoxJSDocUnknownType(pos) {
5894
5928
  }
5895
5929
 
5896
5930
  function deserializeVecTSType(pos) {
5897
- let arr = [], pos32 = pos >> 2;
5931
+ let arr = [],
5932
+ pos32 = pos >> 2;
5898
5933
  pos = uint32[pos32];
5899
5934
  let endPos = pos + uint32[pos32 + 2] * 16;
5900
- for (; pos !== endPos;) {
5935
+ for (; pos !== endPos; ) {
5901
5936
  arr.push(deserializeTSType(pos));
5902
5937
  pos += 16;
5903
5938
  }
@@ -5905,10 +5940,11 @@ function deserializeVecTSType(pos) {
5905
5940
  }
5906
5941
 
5907
5942
  function deserializeVecTSTupleElement(pos) {
5908
- let arr = [], pos32 = pos >> 2;
5943
+ let arr = [],
5944
+ pos32 = pos >> 2;
5909
5945
  pos = uint32[pos32];
5910
5946
  let endPos = pos + uint32[pos32 + 2] * 16;
5911
- for (; pos !== endPos;) {
5947
+ for (; pos !== endPos; ) {
5912
5948
  arr.push(deserializeTSTupleElement(pos));
5913
5949
  pos += 16;
5914
5950
  }
@@ -5933,10 +5969,11 @@ function deserializeOptionTSType(pos) {
5933
5969
  }
5934
5970
 
5935
5971
  function deserializeVecTSTypeParameter(pos) {
5936
- let arr = [], pos32 = pos >> 2;
5972
+ let arr = [],
5973
+ pos32 = pos >> 2;
5937
5974
  pos = uint32[pos32];
5938
5975
  let endPos = pos + uint32[pos32 + 2] * 80;
5939
- for (; pos !== endPos;) {
5976
+ for (; pos !== endPos; ) {
5940
5977
  arr.push(deserializeTSTypeParameter(pos));
5941
5978
  pos += 80;
5942
5979
  }
@@ -5944,10 +5981,11 @@ function deserializeVecTSTypeParameter(pos) {
5944
5981
  }
5945
5982
 
5946
5983
  function deserializeVecTSInterfaceHeritage(pos) {
5947
- let arr = [], pos32 = pos >> 2;
5984
+ let arr = [],
5985
+ pos32 = pos >> 2;
5948
5986
  pos = uint32[pos32];
5949
5987
  let endPos = pos + uint32[pos32 + 2] * 32;
5950
- for (; pos !== endPos;) {
5988
+ for (; pos !== endPos; ) {
5951
5989
  arr.push(deserializeTSInterfaceHeritage(pos));
5952
5990
  pos += 32;
5953
5991
  }
@@ -5959,10 +5997,11 @@ function deserializeBoxTSInterfaceBody(pos) {
5959
5997
  }
5960
5998
 
5961
5999
  function deserializeVecTSSignature(pos) {
5962
- let arr = [], pos32 = pos >> 2;
6000
+ let arr = [],
6001
+ pos32 = pos >> 2;
5963
6002
  pos = uint32[pos32];
5964
6003
  let endPos = pos + uint32[pos32 + 2] * 16;
5965
- for (; pos !== endPos;) {
6004
+ for (; pos !== endPos; ) {
5966
6005
  arr.push(deserializeTSSignature(pos));
5967
6006
  pos += 16;
5968
6007
  }
@@ -5986,10 +6025,11 @@ function deserializeBoxTSMethodSignature(pos) {
5986
6025
  }
5987
6026
 
5988
6027
  function deserializeVecTSIndexSignatureName(pos) {
5989
- let arr = [], pos32 = pos >> 2;
6028
+ let arr = [],
6029
+ pos32 = pos >> 2;
5990
6030
  pos = uint32[pos32];
5991
6031
  let endPos = pos + uint32[pos32 + 2] * 32;
5992
- for (; pos !== endPos;) {
6032
+ for (; pos !== endPos; ) {
5993
6033
  arr.push(deserializeTSIndexSignatureName(pos));
5994
6034
  pos += 32;
5995
6035
  }
@@ -6010,7 +6050,7 @@ function deserializeBoxTSTypeParameter(pos) {
6010
6050
  }
6011
6051
 
6012
6052
  function deserializeOptionBoxObjectExpression(pos) {
6013
- if (uint32[pos >> 2] === 0 && uint32[pos + 4 >> 2] === 0) return null;
6053
+ if (uint32[pos >> 2] === 0 && uint32[(pos + 4) >> 2] === 0) return null;
6014
6054
  return deserializeBoxObjectExpression(pos);
6015
6055
  }
6016
6056
 
@@ -6033,15 +6073,16 @@ function deserializeBoxTSExternalModuleReference(pos) {
6033
6073
  }
6034
6074
 
6035
6075
  function deserializeOptionNameSpan(pos) {
6036
- if (uint32[pos + 8 >> 2] === 0 && uint32[pos + 12 >> 2] === 0) return null;
6076
+ if (uint32[(pos + 8) >> 2] === 0 && uint32[(pos + 12) >> 2] === 0) return null;
6037
6077
  return deserializeNameSpan(pos);
6038
6078
  }
6039
6079
 
6040
6080
  function deserializeVecError(pos) {
6041
- let arr = [], pos32 = pos >> 2;
6081
+ let arr = [],
6082
+ pos32 = pos >> 2;
6042
6083
  pos = uint32[pos32];
6043
6084
  let endPos = pos + uint32[pos32 + 2] * 80;
6044
- for (; pos !== endPos;) {
6085
+ for (; pos !== endPos; ) {
6045
6086
  arr.push(deserializeError(pos));
6046
6087
  pos += 80;
6047
6088
  }
@@ -6049,10 +6090,11 @@ function deserializeVecError(pos) {
6049
6090
  }
6050
6091
 
6051
6092
  function deserializeVecErrorLabel(pos) {
6052
- let arr = [], pos32 = pos >> 2;
6093
+ let arr = [],
6094
+ pos32 = pos >> 2;
6053
6095
  pos = uint32[pos32];
6054
6096
  let endPos = pos + uint32[pos32 + 2] * 24;
6055
- for (; pos !== endPos;) {
6097
+ for (; pos !== endPos; ) {
6056
6098
  arr.push(deserializeErrorLabel(pos));
6057
6099
  pos += 24;
6058
6100
  }
@@ -6060,10 +6102,11 @@ function deserializeVecErrorLabel(pos) {
6060
6102
  }
6061
6103
 
6062
6104
  function deserializeVecStaticImport(pos) {
6063
- let arr = [], pos32 = pos >> 2;
6105
+ let arr = [],
6106
+ pos32 = pos >> 2;
6064
6107
  pos = uint32[pos32];
6065
6108
  let endPos = pos + uint32[pos32 + 2] * 56;
6066
- for (; pos !== endPos;) {
6109
+ for (; pos !== endPos; ) {
6067
6110
  arr.push(deserializeStaticImport(pos));
6068
6111
  pos += 56;
6069
6112
  }
@@ -6071,10 +6114,11 @@ function deserializeVecStaticImport(pos) {
6071
6114
  }
6072
6115
 
6073
6116
  function deserializeVecStaticExport(pos) {
6074
- let arr = [], pos32 = pos >> 2;
6117
+ let arr = [],
6118
+ pos32 = pos >> 2;
6075
6119
  pos = uint32[pos32];
6076
6120
  let endPos = pos + uint32[pos32 + 2] * 32;
6077
- for (; pos !== endPos;) {
6121
+ for (; pos !== endPos; ) {
6078
6122
  arr.push(deserializeStaticExport(pos));
6079
6123
  pos += 32;
6080
6124
  }
@@ -6082,10 +6126,11 @@ function deserializeVecStaticExport(pos) {
6082
6126
  }
6083
6127
 
6084
6128
  function deserializeVecDynamicImport(pos) {
6085
- let arr = [], pos32 = pos >> 2;
6129
+ let arr = [],
6130
+ pos32 = pos >> 2;
6086
6131
  pos = uint32[pos32];
6087
6132
  let endPos = pos + uint32[pos32 + 2] * 16;
6088
- for (; pos !== endPos;) {
6133
+ for (; pos !== endPos; ) {
6089
6134
  arr.push(deserializeDynamicImport(pos));
6090
6135
  pos += 16;
6091
6136
  }
@@ -6093,10 +6138,11 @@ function deserializeVecDynamicImport(pos) {
6093
6138
  }
6094
6139
 
6095
6140
  function deserializeVecSpan(pos) {
6096
- let arr = [], pos32 = pos >> 2;
6141
+ let arr = [],
6142
+ pos32 = pos >> 2;
6097
6143
  pos = uint32[pos32];
6098
6144
  let endPos = pos + uint32[pos32 + 2] * 8;
6099
- for (; pos !== endPos;) {
6145
+ for (; pos !== endPos; ) {
6100
6146
  arr.push(deserializeSpan(pos));
6101
6147
  pos += 8;
6102
6148
  }
@@ -6104,10 +6150,11 @@ function deserializeVecSpan(pos) {
6104
6150
  }
6105
6151
 
6106
6152
  function deserializeVecImportEntry(pos) {
6107
- let arr = [], pos32 = pos >> 2;
6153
+ let arr = [],
6154
+ pos32 = pos >> 2;
6108
6155
  pos = uint32[pos32];
6109
6156
  let endPos = pos + uint32[pos32 + 2] * 96;
6110
- for (; pos !== endPos;) {
6157
+ for (; pos !== endPos; ) {
6111
6158
  arr.push(deserializeImportEntry(pos));
6112
6159
  pos += 96;
6113
6160
  }
@@ -6115,10 +6162,11 @@ function deserializeVecImportEntry(pos) {
6115
6162
  }
6116
6163
 
6117
6164
  function deserializeVecExportEntry(pos) {
6118
- let arr = [], pos32 = pos >> 2;
6165
+ let arr = [],
6166
+ pos32 = pos >> 2;
6119
6167
  pos = uint32[pos32];
6120
6168
  let endPos = pos + uint32[pos32 + 2] * 144;
6121
- for (; pos !== endPos;) {
6169
+ for (; pos !== endPos; ) {
6122
6170
  arr.push(deserializeExportEntry(pos));
6123
6171
  pos += 144;
6124
6172
  }