oxc-parser 0.72.3 → 0.73.2
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.
- package/generated/deserialize/js.js +118 -260
- package/generated/deserialize/lazy.js +13908 -0
- package/generated/deserialize/ts.js +120 -275
- package/index.js +11 -288
- package/package.json +30 -21
- package/raw-transfer/eager.js +56 -0
- package/raw-transfer/index.js +283 -0
- package/raw-transfer/lazy-common.js +12 -0
- package/raw-transfer/lazy.js +87 -0
- package/raw-transfer/node-array.js +327 -0
|
@@ -13,8 +13,8 @@ const textDecoder = new TextDecoder('utf-8', { ignoreBOM: true }),
|
|
|
13
13
|
|
|
14
14
|
function deserialize(buffer, sourceTextInput, sourceLenInput) {
|
|
15
15
|
uint8 = buffer;
|
|
16
|
-
uint32 =
|
|
17
|
-
float64 =
|
|
16
|
+
uint32 = buffer.uint32;
|
|
17
|
+
float64 = buffer.float64;
|
|
18
18
|
|
|
19
19
|
sourceText = sourceTextInput;
|
|
20
20
|
sourceLen = sourceLenInput;
|
|
@@ -1078,14 +1078,13 @@ function deserializeStringLiteral(pos) {
|
|
|
1078
1078
|
}
|
|
1079
1079
|
|
|
1080
1080
|
function deserializeBigIntLiteral(pos) {
|
|
1081
|
-
const
|
|
1082
|
-
bigint = raw.slice(0, -1).replace(/_/g, '');
|
|
1081
|
+
const bigint = deserializeStr(pos + 8);
|
|
1083
1082
|
return {
|
|
1084
1083
|
type: 'Literal',
|
|
1085
1084
|
start: deserializeU32(pos),
|
|
1086
1085
|
end: deserializeU32(pos + 4),
|
|
1087
1086
|
value: BigInt(bigint),
|
|
1088
|
-
raw,
|
|
1087
|
+
raw: deserializeOptionStr(pos + 24),
|
|
1089
1088
|
bigint,
|
|
1090
1089
|
};
|
|
1091
1090
|
}
|
|
@@ -4053,10 +4052,10 @@ function deserializeStr(pos) {
|
|
|
4053
4052
|
|
|
4054
4053
|
function deserializeVecComment(pos) {
|
|
4055
4054
|
const arr = [],
|
|
4056
|
-
pos32 = pos >> 2
|
|
4057
|
-
len = uint32[pos32 + 2];
|
|
4055
|
+
pos32 = pos >> 2;
|
|
4058
4056
|
pos = uint32[pos32];
|
|
4059
|
-
|
|
4057
|
+
const endPos = pos + uint32[pos32 + 2] * 16;
|
|
4058
|
+
while (pos !== endPos) {
|
|
4060
4059
|
arr.push(deserializeComment(pos));
|
|
4061
4060
|
pos += 16;
|
|
4062
4061
|
}
|
|
@@ -4070,10 +4069,10 @@ function deserializeOptionHashbang(pos) {
|
|
|
4070
4069
|
|
|
4071
4070
|
function deserializeVecDirective(pos) {
|
|
4072
4071
|
const arr = [],
|
|
4073
|
-
pos32 = pos >> 2
|
|
4074
|
-
len = uint32[pos32 + 2];
|
|
4072
|
+
pos32 = pos >> 2;
|
|
4075
4073
|
pos = uint32[pos32];
|
|
4076
|
-
|
|
4074
|
+
const endPos = pos + uint32[pos32 + 2] * 72;
|
|
4075
|
+
while (pos !== endPos) {
|
|
4077
4076
|
arr.push(deserializeDirective(pos));
|
|
4078
4077
|
pos += 72;
|
|
4079
4078
|
}
|
|
@@ -4082,21 +4081,16 @@ function deserializeVecDirective(pos) {
|
|
|
4082
4081
|
|
|
4083
4082
|
function deserializeVecStatement(pos) {
|
|
4084
4083
|
const arr = [],
|
|
4085
|
-
pos32 = pos >> 2
|
|
4086
|
-
len = uint32[pos32 + 2];
|
|
4084
|
+
pos32 = pos >> 2;
|
|
4087
4085
|
pos = uint32[pos32];
|
|
4088
|
-
|
|
4086
|
+
const endPos = pos + uint32[pos32 + 2] * 16;
|
|
4087
|
+
while (pos !== endPos) {
|
|
4089
4088
|
arr.push(deserializeStatement(pos));
|
|
4090
4089
|
pos += 16;
|
|
4091
4090
|
}
|
|
4092
4091
|
return arr;
|
|
4093
4092
|
}
|
|
4094
4093
|
|
|
4095
|
-
function deserializeOptionScopeId(pos) {
|
|
4096
|
-
if (uint32[pos >> 2] === 0) return null;
|
|
4097
|
-
return deserializeScopeId(pos);
|
|
4098
|
-
}
|
|
4099
|
-
|
|
4100
4094
|
function deserializeBoxBooleanLiteral(pos) {
|
|
4101
4095
|
return deserializeBooleanLiteral(uint32[pos >> 2]);
|
|
4102
4096
|
}
|
|
@@ -4257,22 +4251,12 @@ function deserializeBoxV8IntrinsicExpression(pos) {
|
|
|
4257
4251
|
return deserializeV8IntrinsicExpression(uint32[pos >> 2]);
|
|
4258
4252
|
}
|
|
4259
4253
|
|
|
4260
|
-
function deserializeOptionReferenceId(pos) {
|
|
4261
|
-
if (uint32[pos >> 2] === 0) return null;
|
|
4262
|
-
return deserializeReferenceId(pos);
|
|
4263
|
-
}
|
|
4264
|
-
|
|
4265
|
-
function deserializeOptionSymbolId(pos) {
|
|
4266
|
-
if (uint32[pos >> 2] === 0) return null;
|
|
4267
|
-
return deserializeSymbolId(pos);
|
|
4268
|
-
}
|
|
4269
|
-
|
|
4270
4254
|
function deserializeVecArrayExpressionElement(pos) {
|
|
4271
4255
|
const arr = [],
|
|
4272
|
-
pos32 = pos >> 2
|
|
4273
|
-
len = uint32[pos32 + 2];
|
|
4256
|
+
pos32 = pos >> 2;
|
|
4274
4257
|
pos = uint32[pos32];
|
|
4275
|
-
|
|
4258
|
+
const endPos = pos + uint32[pos32 + 2] * 16;
|
|
4259
|
+
while (pos !== endPos) {
|
|
4276
4260
|
arr.push(deserializeArrayExpressionElement(pos));
|
|
4277
4261
|
pos += 16;
|
|
4278
4262
|
}
|
|
@@ -4285,10 +4269,10 @@ function deserializeBoxSpreadElement(pos) {
|
|
|
4285
4269
|
|
|
4286
4270
|
function deserializeVecObjectPropertyKind(pos) {
|
|
4287
4271
|
const arr = [],
|
|
4288
|
-
pos32 = pos >> 2
|
|
4289
|
-
len = uint32[pos32 + 2];
|
|
4272
|
+
pos32 = pos >> 2;
|
|
4290
4273
|
pos = uint32[pos32];
|
|
4291
|
-
|
|
4274
|
+
const endPos = pos + uint32[pos32 + 2] * 16;
|
|
4275
|
+
while (pos !== endPos) {
|
|
4292
4276
|
arr.push(deserializeObjectPropertyKind(pos));
|
|
4293
4277
|
pos += 16;
|
|
4294
4278
|
}
|
|
@@ -4313,10 +4297,10 @@ function deserializeBoxPrivateIdentifier(pos) {
|
|
|
4313
4297
|
|
|
4314
4298
|
function deserializeVecTemplateElement(pos) {
|
|
4315
4299
|
const arr = [],
|
|
4316
|
-
pos32 = pos >> 2
|
|
4317
|
-
len = uint32[pos32 + 2];
|
|
4300
|
+
pos32 = pos >> 2;
|
|
4318
4301
|
pos = uint32[pos32];
|
|
4319
|
-
|
|
4302
|
+
const endPos = pos + uint32[pos32 + 2] * 48;
|
|
4303
|
+
while (pos !== endPos) {
|
|
4320
4304
|
arr.push(deserializeTemplateElement(pos));
|
|
4321
4305
|
pos += 48;
|
|
4322
4306
|
}
|
|
@@ -4325,10 +4309,10 @@ function deserializeVecTemplateElement(pos) {
|
|
|
4325
4309
|
|
|
4326
4310
|
function deserializeVecExpression(pos) {
|
|
4327
4311
|
const arr = [],
|
|
4328
|
-
pos32 = pos >> 2
|
|
4329
|
-
len = uint32[pos32 + 2];
|
|
4312
|
+
pos32 = pos >> 2;
|
|
4330
4313
|
pos = uint32[pos32];
|
|
4331
|
-
|
|
4314
|
+
const endPos = pos + uint32[pos32 + 2] * 16;
|
|
4315
|
+
while (pos !== endPos) {
|
|
4332
4316
|
arr.push(deserializeExpression(pos));
|
|
4333
4317
|
pos += 16;
|
|
4334
4318
|
}
|
|
@@ -4363,10 +4347,10 @@ function deserializeBoxPrivateFieldExpression(pos) {
|
|
|
4363
4347
|
|
|
4364
4348
|
function deserializeVecArgument(pos) {
|
|
4365
4349
|
const arr = [],
|
|
4366
|
-
pos32 = pos >> 2
|
|
4367
|
-
len = uint32[pos32 + 2];
|
|
4350
|
+
pos32 = pos >> 2;
|
|
4368
4351
|
pos = uint32[pos32];
|
|
4369
|
-
|
|
4352
|
+
const endPos = pos + uint32[pos32 + 2] * 16;
|
|
4353
|
+
while (pos !== endPos) {
|
|
4370
4354
|
arr.push(deserializeArgument(pos));
|
|
4371
4355
|
pos += 16;
|
|
4372
4356
|
}
|
|
@@ -4388,10 +4372,10 @@ function deserializeOptionAssignmentTargetMaybeDefault(pos) {
|
|
|
4388
4372
|
|
|
4389
4373
|
function deserializeVecOptionAssignmentTargetMaybeDefault(pos) {
|
|
4390
4374
|
const arr = [],
|
|
4391
|
-
pos32 = pos >> 2
|
|
4392
|
-
len = uint32[pos32 + 2];
|
|
4375
|
+
pos32 = pos >> 2;
|
|
4393
4376
|
pos = uint32[pos32];
|
|
4394
|
-
|
|
4377
|
+
const endPos = pos + uint32[pos32 + 2] * 16;
|
|
4378
|
+
while (pos !== endPos) {
|
|
4395
4379
|
arr.push(deserializeOptionAssignmentTargetMaybeDefault(pos));
|
|
4396
4380
|
pos += 16;
|
|
4397
4381
|
}
|
|
@@ -4405,10 +4389,10 @@ function deserializeOptionAssignmentTargetRest(pos) {
|
|
|
4405
4389
|
|
|
4406
4390
|
function deserializeVecAssignmentTargetProperty(pos) {
|
|
4407
4391
|
const arr = [],
|
|
4408
|
-
pos32 = pos >> 2
|
|
4409
|
-
len = uint32[pos32 + 2];
|
|
4392
|
+
pos32 = pos >> 2;
|
|
4410
4393
|
pos = uint32[pos32];
|
|
4411
|
-
|
|
4394
|
+
const endPos = pos + uint32[pos32 + 2] * 16;
|
|
4395
|
+
while (pos !== endPos) {
|
|
4412
4396
|
arr.push(deserializeAssignmentTargetProperty(pos));
|
|
4413
4397
|
pos += 16;
|
|
4414
4398
|
}
|
|
@@ -4530,10 +4514,10 @@ function deserializeBoxTSImportEqualsDeclaration(pos) {
|
|
|
4530
4514
|
|
|
4531
4515
|
function deserializeVecVariableDeclarator(pos) {
|
|
4532
4516
|
const arr = [],
|
|
4533
|
-
pos32 = pos >> 2
|
|
4534
|
-
len = uint32[pos32 + 2];
|
|
4517
|
+
pos32 = pos >> 2;
|
|
4535
4518
|
pos = uint32[pos32];
|
|
4536
|
-
|
|
4519
|
+
const endPos = pos + uint32[pos32 + 2] * 64;
|
|
4520
|
+
while (pos !== endPos) {
|
|
4537
4521
|
arr.push(deserializeVariableDeclarator(pos));
|
|
4538
4522
|
pos += 64;
|
|
4539
4523
|
}
|
|
@@ -4557,10 +4541,10 @@ function deserializeOptionLabelIdentifier(pos) {
|
|
|
4557
4541
|
|
|
4558
4542
|
function deserializeVecSwitchCase(pos) {
|
|
4559
4543
|
const arr = [],
|
|
4560
|
-
pos32 = pos >> 2
|
|
4561
|
-
len = uint32[pos32 + 2];
|
|
4544
|
+
pos32 = pos >> 2;
|
|
4562
4545
|
pos = uint32[pos32];
|
|
4563
|
-
|
|
4546
|
+
const endPos = pos + uint32[pos32 + 2] * 48;
|
|
4547
|
+
while (pos !== endPos) {
|
|
4564
4548
|
arr.push(deserializeSwitchCase(pos));
|
|
4565
4549
|
pos += 48;
|
|
4566
4550
|
}
|
|
@@ -4613,10 +4597,10 @@ function deserializeBoxAssignmentPattern(pos) {
|
|
|
4613
4597
|
|
|
4614
4598
|
function deserializeVecBindingProperty(pos) {
|
|
4615
4599
|
const arr = [],
|
|
4616
|
-
pos32 = pos >> 2
|
|
4617
|
-
len = uint32[pos32 + 2];
|
|
4600
|
+
pos32 = pos >> 2;
|
|
4618
4601
|
pos = uint32[pos32];
|
|
4619
|
-
|
|
4602
|
+
const endPos = pos + uint32[pos32 + 2] * 64;
|
|
4603
|
+
while (pos !== endPos) {
|
|
4620
4604
|
arr.push(deserializeBindingProperty(pos));
|
|
4621
4605
|
pos += 64;
|
|
4622
4606
|
}
|
|
@@ -4639,10 +4623,10 @@ function deserializeOptionBindingPattern(pos) {
|
|
|
4639
4623
|
|
|
4640
4624
|
function deserializeVecOptionBindingPattern(pos) {
|
|
4641
4625
|
const arr = [],
|
|
4642
|
-
pos32 = pos >> 2
|
|
4643
|
-
len = uint32[pos32 + 2];
|
|
4626
|
+
pos32 = pos >> 2;
|
|
4644
4627
|
pos = uint32[pos32];
|
|
4645
|
-
|
|
4628
|
+
const endPos = pos + uint32[pos32 + 2] * 32;
|
|
4629
|
+
while (pos !== endPos) {
|
|
4646
4630
|
arr.push(deserializeOptionBindingPattern(pos));
|
|
4647
4631
|
pos += 32;
|
|
4648
4632
|
}
|
|
@@ -4687,10 +4671,10 @@ function deserializeOptionBoxFunctionBody(pos) {
|
|
|
4687
4671
|
|
|
4688
4672
|
function deserializeVecFormalParameter(pos) {
|
|
4689
4673
|
const arr = [],
|
|
4690
|
-
pos32 = pos >> 2
|
|
4691
|
-
len = uint32[pos32 + 2];
|
|
4674
|
+
pos32 = pos >> 2;
|
|
4692
4675
|
pos = uint32[pos32];
|
|
4693
|
-
|
|
4676
|
+
const endPos = pos + uint32[pos32 + 2] * 72;
|
|
4677
|
+
while (pos !== endPos) {
|
|
4694
4678
|
arr.push(deserializeFormalParameter(pos));
|
|
4695
4679
|
pos += 72;
|
|
4696
4680
|
}
|
|
@@ -4699,10 +4683,10 @@ function deserializeVecFormalParameter(pos) {
|
|
|
4699
4683
|
|
|
4700
4684
|
function deserializeVecDecorator(pos) {
|
|
4701
4685
|
const arr = [],
|
|
4702
|
-
pos32 = pos >> 2
|
|
4703
|
-
len = uint32[pos32 + 2];
|
|
4686
|
+
pos32 = pos >> 2;
|
|
4704
4687
|
pos = uint32[pos32];
|
|
4705
|
-
|
|
4688
|
+
const endPos = pos + uint32[pos32 + 2] * 24;
|
|
4689
|
+
while (pos !== endPos) {
|
|
4706
4690
|
arr.push(deserializeDecorator(pos));
|
|
4707
4691
|
pos += 24;
|
|
4708
4692
|
}
|
|
@@ -4716,10 +4700,10 @@ function deserializeOptionTSAccessibility(pos) {
|
|
|
4716
4700
|
|
|
4717
4701
|
function deserializeVecTSClassImplements(pos) {
|
|
4718
4702
|
const arr = [],
|
|
4719
|
-
pos32 = pos >> 2
|
|
4720
|
-
len = uint32[pos32 + 2];
|
|
4703
|
+
pos32 = pos >> 2;
|
|
4721
4704
|
pos = uint32[pos32];
|
|
4722
|
-
|
|
4705
|
+
const endPos = pos + uint32[pos32 + 2] * 32;
|
|
4706
|
+
while (pos !== endPos) {
|
|
4723
4707
|
arr.push(deserializeTSClassImplements(pos));
|
|
4724
4708
|
pos += 32;
|
|
4725
4709
|
}
|
|
@@ -4732,10 +4716,10 @@ function deserializeBoxClassBody(pos) {
|
|
|
4732
4716
|
|
|
4733
4717
|
function deserializeVecClassElement(pos) {
|
|
4734
4718
|
const arr = [],
|
|
4735
|
-
pos32 = pos >> 2
|
|
4736
|
-
len = uint32[pos32 + 2];
|
|
4719
|
+
pos32 = pos >> 2;
|
|
4737
4720
|
pos = uint32[pos32];
|
|
4738
|
-
|
|
4721
|
+
const endPos = pos + uint32[pos32 + 2] * 16;
|
|
4722
|
+
while (pos !== endPos) {
|
|
4739
4723
|
arr.push(deserializeClassElement(pos));
|
|
4740
4724
|
pos += 16;
|
|
4741
4725
|
}
|
|
@@ -4793,10 +4777,10 @@ function deserializeOptionImportPhase(pos) {
|
|
|
4793
4777
|
|
|
4794
4778
|
function deserializeVecImportDeclarationSpecifier(pos) {
|
|
4795
4779
|
const arr = [],
|
|
4796
|
-
pos32 = pos >> 2
|
|
4797
|
-
len = uint32[pos32 + 2];
|
|
4780
|
+
pos32 = pos >> 2;
|
|
4798
4781
|
pos = uint32[pos32];
|
|
4799
|
-
|
|
4782
|
+
const endPos = pos + uint32[pos32 + 2] * 16;
|
|
4783
|
+
while (pos !== endPos) {
|
|
4800
4784
|
arr.push(deserializeImportDeclarationSpecifier(pos));
|
|
4801
4785
|
pos += 16;
|
|
4802
4786
|
}
|
|
@@ -4831,10 +4815,10 @@ function deserializeBoxImportNamespaceSpecifier(pos) {
|
|
|
4831
4815
|
|
|
4832
4816
|
function deserializeVecImportAttribute(pos) {
|
|
4833
4817
|
const arr = [],
|
|
4834
|
-
pos32 = pos >> 2
|
|
4835
|
-
len = uint32[pos32 + 2];
|
|
4818
|
+
pos32 = pos >> 2;
|
|
4836
4819
|
pos = uint32[pos32];
|
|
4837
|
-
|
|
4820
|
+
const endPos = pos + uint32[pos32 + 2] * 112;
|
|
4821
|
+
while (pos !== endPos) {
|
|
4838
4822
|
arr.push(deserializeImportAttribute(pos));
|
|
4839
4823
|
pos += 112;
|
|
4840
4824
|
}
|
|
@@ -4848,10 +4832,10 @@ function deserializeOptionDeclaration(pos) {
|
|
|
4848
4832
|
|
|
4849
4833
|
function deserializeVecExportSpecifier(pos) {
|
|
4850
4834
|
const arr = [],
|
|
4851
|
-
pos32 = pos >> 2
|
|
4852
|
-
len = uint32[pos32 + 2];
|
|
4835
|
+
pos32 = pos >> 2;
|
|
4853
4836
|
pos = uint32[pos32];
|
|
4854
|
-
|
|
4837
|
+
const endPos = pos + uint32[pos32 + 2] * 128;
|
|
4838
|
+
while (pos !== endPos) {
|
|
4855
4839
|
arr.push(deserializeExportSpecifier(pos));
|
|
4856
4840
|
pos += 128;
|
|
4857
4841
|
}
|
|
@@ -4872,15 +4856,6 @@ function deserializeF64(pos) {
|
|
|
4872
4856
|
return float64[pos >> 3];
|
|
4873
4857
|
}
|
|
4874
4858
|
|
|
4875
|
-
function deserializeBoxPattern(pos) {
|
|
4876
|
-
return deserializePattern(uint32[pos >> 2]);
|
|
4877
|
-
}
|
|
4878
|
-
|
|
4879
|
-
function deserializeOptionBoxPattern(pos) {
|
|
4880
|
-
if (uint32[pos >> 2] === 0 && uint32[(pos + 4) >> 2] === 0) return null;
|
|
4881
|
-
return deserializeBoxPattern(pos);
|
|
4882
|
-
}
|
|
4883
|
-
|
|
4884
4859
|
function deserializeU8(pos) {
|
|
4885
4860
|
return uint8[pos];
|
|
4886
4861
|
}
|
|
@@ -4891,10 +4866,10 @@ function deserializeBoxJSXOpeningElement(pos) {
|
|
|
4891
4866
|
|
|
4892
4867
|
function deserializeVecJSXChild(pos) {
|
|
4893
4868
|
const arr = [],
|
|
4894
|
-
pos32 = pos >> 2
|
|
4895
|
-
len = uint32[pos32 + 2];
|
|
4869
|
+
pos32 = pos >> 2;
|
|
4896
4870
|
pos = uint32[pos32];
|
|
4897
|
-
|
|
4871
|
+
const endPos = pos + uint32[pos32 + 2] * 16;
|
|
4872
|
+
while (pos !== endPos) {
|
|
4898
4873
|
arr.push(deserializeJSXChild(pos));
|
|
4899
4874
|
pos += 16;
|
|
4900
4875
|
}
|
|
@@ -4912,10 +4887,10 @@ function deserializeOptionBoxJSXClosingElement(pos) {
|
|
|
4912
4887
|
|
|
4913
4888
|
function deserializeVecJSXAttributeItem(pos) {
|
|
4914
4889
|
const arr = [],
|
|
4915
|
-
pos32 = pos >> 2
|
|
4916
|
-
len = uint32[pos32 + 2];
|
|
4890
|
+
pos32 = pos >> 2;
|
|
4917
4891
|
pos = uint32[pos32];
|
|
4918
|
-
|
|
4892
|
+
const endPos = pos + uint32[pos32 + 2] * 16;
|
|
4893
|
+
while (pos !== endPos) {
|
|
4919
4894
|
arr.push(deserializeJSXAttributeItem(pos));
|
|
4920
4895
|
pos += 16;
|
|
4921
4896
|
}
|
|
@@ -4961,10 +4936,10 @@ function deserializeBoxJSXSpreadChild(pos) {
|
|
|
4961
4936
|
|
|
4962
4937
|
function deserializeVecTSEnumMember(pos) {
|
|
4963
4938
|
const arr = [],
|
|
4964
|
-
pos32 = pos >> 2
|
|
4965
|
-
len = uint32[pos32 + 2];
|
|
4939
|
+
pos32 = pos >> 2;
|
|
4966
4940
|
pos = uint32[pos32];
|
|
4967
|
-
|
|
4941
|
+
const endPos = pos + uint32[pos32 + 2] * 40;
|
|
4942
|
+
while (pos !== endPos) {
|
|
4968
4943
|
arr.push(deserializeTSEnumMember(pos));
|
|
4969
4944
|
pos += 40;
|
|
4970
4945
|
}
|
|
@@ -5121,10 +5096,10 @@ function deserializeBoxJSDocUnknownType(pos) {
|
|
|
5121
5096
|
|
|
5122
5097
|
function deserializeVecTSType(pos) {
|
|
5123
5098
|
const arr = [],
|
|
5124
|
-
pos32 = pos >> 2
|
|
5125
|
-
len = uint32[pos32 + 2];
|
|
5099
|
+
pos32 = pos >> 2;
|
|
5126
5100
|
pos = uint32[pos32];
|
|
5127
|
-
|
|
5101
|
+
const endPos = pos + uint32[pos32 + 2] * 16;
|
|
5102
|
+
while (pos !== endPos) {
|
|
5128
5103
|
arr.push(deserializeTSType(pos));
|
|
5129
5104
|
pos += 16;
|
|
5130
5105
|
}
|
|
@@ -5133,10 +5108,10 @@ function deserializeVecTSType(pos) {
|
|
|
5133
5108
|
|
|
5134
5109
|
function deserializeVecTSTupleElement(pos) {
|
|
5135
5110
|
const arr = [],
|
|
5136
|
-
pos32 = pos >> 2
|
|
5137
|
-
len = uint32[pos32 + 2];
|
|
5111
|
+
pos32 = pos >> 2;
|
|
5138
5112
|
pos = uint32[pos32];
|
|
5139
|
-
|
|
5113
|
+
const endPos = pos + uint32[pos32 + 2] * 16;
|
|
5114
|
+
while (pos !== endPos) {
|
|
5140
5115
|
arr.push(deserializeTSTupleElement(pos));
|
|
5141
5116
|
pos += 16;
|
|
5142
5117
|
}
|
|
@@ -5162,10 +5137,10 @@ function deserializeOptionTSType(pos) {
|
|
|
5162
5137
|
|
|
5163
5138
|
function deserializeVecTSTypeParameter(pos) {
|
|
5164
5139
|
const arr = [],
|
|
5165
|
-
pos32 = pos >> 2
|
|
5166
|
-
len = uint32[pos32 + 2];
|
|
5140
|
+
pos32 = pos >> 2;
|
|
5167
5141
|
pos = uint32[pos32];
|
|
5168
|
-
|
|
5142
|
+
const endPos = pos + uint32[pos32 + 2] * 80;
|
|
5143
|
+
while (pos !== endPos) {
|
|
5169
5144
|
arr.push(deserializeTSTypeParameter(pos));
|
|
5170
5145
|
pos += 80;
|
|
5171
5146
|
}
|
|
@@ -5174,10 +5149,10 @@ function deserializeVecTSTypeParameter(pos) {
|
|
|
5174
5149
|
|
|
5175
5150
|
function deserializeVecTSInterfaceHeritage(pos) {
|
|
5176
5151
|
const arr = [],
|
|
5177
|
-
pos32 = pos >> 2
|
|
5178
|
-
len = uint32[pos32 + 2];
|
|
5152
|
+
pos32 = pos >> 2;
|
|
5179
5153
|
pos = uint32[pos32];
|
|
5180
|
-
|
|
5154
|
+
const endPos = pos + uint32[pos32 + 2] * 32;
|
|
5155
|
+
while (pos !== endPos) {
|
|
5181
5156
|
arr.push(deserializeTSInterfaceHeritage(pos));
|
|
5182
5157
|
pos += 32;
|
|
5183
5158
|
}
|
|
@@ -5190,10 +5165,10 @@ function deserializeBoxTSInterfaceBody(pos) {
|
|
|
5190
5165
|
|
|
5191
5166
|
function deserializeVecTSSignature(pos) {
|
|
5192
5167
|
const arr = [],
|
|
5193
|
-
pos32 = pos >> 2
|
|
5194
|
-
len = uint32[pos32 + 2];
|
|
5168
|
+
pos32 = pos >> 2;
|
|
5195
5169
|
pos = uint32[pos32];
|
|
5196
|
-
|
|
5170
|
+
const endPos = pos + uint32[pos32 + 2] * 16;
|
|
5171
|
+
while (pos !== endPos) {
|
|
5197
5172
|
arr.push(deserializeTSSignature(pos));
|
|
5198
5173
|
pos += 16;
|
|
5199
5174
|
}
|
|
@@ -5218,10 +5193,10 @@ function deserializeBoxTSMethodSignature(pos) {
|
|
|
5218
5193
|
|
|
5219
5194
|
function deserializeVecTSIndexSignatureName(pos) {
|
|
5220
5195
|
const arr = [],
|
|
5221
|
-
pos32 = pos >> 2
|
|
5222
|
-
len = uint32[pos32 + 2];
|
|
5196
|
+
pos32 = pos >> 2;
|
|
5223
5197
|
pos = uint32[pos32];
|
|
5224
|
-
|
|
5198
|
+
const endPos = pos + uint32[pos32 + 2] * 32;
|
|
5199
|
+
while (pos !== endPos) {
|
|
5225
5200
|
arr.push(deserializeTSIndexSignatureName(pos));
|
|
5226
5201
|
pos += 32;
|
|
5227
5202
|
}
|
|
@@ -5269,74 +5244,6 @@ function deserializeOptionNameSpan(pos) {
|
|
|
5269
5244
|
return deserializeNameSpan(pos);
|
|
5270
5245
|
}
|
|
5271
5246
|
|
|
5272
|
-
function deserializeVecAlternative(pos) {
|
|
5273
|
-
const arr = [],
|
|
5274
|
-
pos32 = pos >> 2,
|
|
5275
|
-
len = uint32[pos32 + 2];
|
|
5276
|
-
pos = uint32[pos32];
|
|
5277
|
-
for (let i = 0; i < len; i++) {
|
|
5278
|
-
arr.push(deserializeAlternative(pos));
|
|
5279
|
-
pos += 32;
|
|
5280
|
-
}
|
|
5281
|
-
return arr;
|
|
5282
|
-
}
|
|
5283
|
-
|
|
5284
|
-
function deserializeVecTerm(pos) {
|
|
5285
|
-
const arr = [],
|
|
5286
|
-
pos32 = pos >> 2,
|
|
5287
|
-
len = uint32[pos32 + 2];
|
|
5288
|
-
pos = uint32[pos32];
|
|
5289
|
-
for (let i = 0; i < len; i++) {
|
|
5290
|
-
arr.push(deserializeTerm(pos));
|
|
5291
|
-
pos += 16;
|
|
5292
|
-
}
|
|
5293
|
-
return arr;
|
|
5294
|
-
}
|
|
5295
|
-
|
|
5296
|
-
function deserializeBoxBoundaryAssertion(pos) {
|
|
5297
|
-
return deserializeBoundaryAssertion(uint32[pos >> 2]);
|
|
5298
|
-
}
|
|
5299
|
-
|
|
5300
|
-
function deserializeBoxLookAroundAssertion(pos) {
|
|
5301
|
-
return deserializeLookAroundAssertion(uint32[pos >> 2]);
|
|
5302
|
-
}
|
|
5303
|
-
|
|
5304
|
-
function deserializeBoxQuantifier(pos) {
|
|
5305
|
-
return deserializeQuantifier(uint32[pos >> 2]);
|
|
5306
|
-
}
|
|
5307
|
-
|
|
5308
|
-
function deserializeBoxCharacter(pos) {
|
|
5309
|
-
return deserializeCharacter(uint32[pos >> 2]);
|
|
5310
|
-
}
|
|
5311
|
-
|
|
5312
|
-
function deserializeBoxCharacterClassEscape(pos) {
|
|
5313
|
-
return deserializeCharacterClassEscape(uint32[pos >> 2]);
|
|
5314
|
-
}
|
|
5315
|
-
|
|
5316
|
-
function deserializeBoxUnicodePropertyEscape(pos) {
|
|
5317
|
-
return deserializeUnicodePropertyEscape(uint32[pos >> 2]);
|
|
5318
|
-
}
|
|
5319
|
-
|
|
5320
|
-
function deserializeBoxCharacterClass(pos) {
|
|
5321
|
-
return deserializeCharacterClass(uint32[pos >> 2]);
|
|
5322
|
-
}
|
|
5323
|
-
|
|
5324
|
-
function deserializeBoxCapturingGroup(pos) {
|
|
5325
|
-
return deserializeCapturingGroup(uint32[pos >> 2]);
|
|
5326
|
-
}
|
|
5327
|
-
|
|
5328
|
-
function deserializeBoxIgnoreGroup(pos) {
|
|
5329
|
-
return deserializeIgnoreGroup(uint32[pos >> 2]);
|
|
5330
|
-
}
|
|
5331
|
-
|
|
5332
|
-
function deserializeBoxIndexedReference(pos) {
|
|
5333
|
-
return deserializeIndexedReference(uint32[pos >> 2]);
|
|
5334
|
-
}
|
|
5335
|
-
|
|
5336
|
-
function deserializeBoxNamedReference(pos) {
|
|
5337
|
-
return deserializeNamedReference(uint32[pos >> 2]);
|
|
5338
|
-
}
|
|
5339
|
-
|
|
5340
5247
|
function deserializeU64(pos) {
|
|
5341
5248
|
const pos32 = pos >> 2;
|
|
5342
5249
|
return uint32[pos32] + uint32[pos32 + 1] * 4294967296;
|
|
@@ -5347,61 +5254,12 @@ function deserializeOptionU64(pos) {
|
|
|
5347
5254
|
return deserializeU64(pos + 8);
|
|
5348
5255
|
}
|
|
5349
5256
|
|
|
5350
|
-
function deserializeVecCharacterClassContents(pos) {
|
|
5351
|
-
const arr = [],
|
|
5352
|
-
pos32 = pos >> 2,
|
|
5353
|
-
len = uint32[pos32 + 2];
|
|
5354
|
-
pos = uint32[pos32];
|
|
5355
|
-
for (let i = 0; i < len; i++) {
|
|
5356
|
-
arr.push(deserializeCharacterClassContents(pos));
|
|
5357
|
-
pos += 16;
|
|
5358
|
-
}
|
|
5359
|
-
return arr;
|
|
5360
|
-
}
|
|
5361
|
-
|
|
5362
|
-
function deserializeBoxCharacterClassRange(pos) {
|
|
5363
|
-
return deserializeCharacterClassRange(uint32[pos >> 2]);
|
|
5364
|
-
}
|
|
5365
|
-
|
|
5366
|
-
function deserializeBoxClassStringDisjunction(pos) {
|
|
5367
|
-
return deserializeClassStringDisjunction(uint32[pos >> 2]);
|
|
5368
|
-
}
|
|
5369
|
-
|
|
5370
|
-
function deserializeVecClassString(pos) {
|
|
5371
|
-
const arr = [],
|
|
5372
|
-
pos32 = pos >> 2,
|
|
5373
|
-
len = uint32[pos32 + 2];
|
|
5374
|
-
pos = uint32[pos32];
|
|
5375
|
-
for (let i = 0; i < len; i++) {
|
|
5376
|
-
arr.push(deserializeClassString(pos));
|
|
5377
|
-
pos += 40;
|
|
5378
|
-
}
|
|
5379
|
-
return arr;
|
|
5380
|
-
}
|
|
5381
|
-
|
|
5382
|
-
function deserializeVecCharacter(pos) {
|
|
5383
|
-
const arr = [],
|
|
5384
|
-
pos32 = pos >> 2,
|
|
5385
|
-
len = uint32[pos32 + 2];
|
|
5386
|
-
pos = uint32[pos32];
|
|
5387
|
-
for (let i = 0; i < len; i++) {
|
|
5388
|
-
arr.push(deserializeCharacter(pos));
|
|
5389
|
-
pos += 16;
|
|
5390
|
-
}
|
|
5391
|
-
return arr;
|
|
5392
|
-
}
|
|
5393
|
-
|
|
5394
|
-
function deserializeOptionModifiers(pos) {
|
|
5395
|
-
if (uint8[pos] === 0) return null;
|
|
5396
|
-
return deserializeModifiers(pos + 8);
|
|
5397
|
-
}
|
|
5398
|
-
|
|
5399
5257
|
function deserializeVecError(pos) {
|
|
5400
5258
|
const arr = [],
|
|
5401
|
-
pos32 = pos >> 2
|
|
5402
|
-
len = uint32[pos32 + 2];
|
|
5259
|
+
pos32 = pos >> 2;
|
|
5403
5260
|
pos = uint32[pos32];
|
|
5404
|
-
|
|
5261
|
+
const endPos = pos + uint32[pos32 + 2] * 80;
|
|
5262
|
+
while (pos !== endPos) {
|
|
5405
5263
|
arr.push(deserializeError(pos));
|
|
5406
5264
|
pos += 80;
|
|
5407
5265
|
}
|
|
@@ -5410,10 +5268,10 @@ function deserializeVecError(pos) {
|
|
|
5410
5268
|
|
|
5411
5269
|
function deserializeVecErrorLabel(pos) {
|
|
5412
5270
|
const arr = [],
|
|
5413
|
-
pos32 = pos >> 2
|
|
5414
|
-
len = uint32[pos32 + 2];
|
|
5271
|
+
pos32 = pos >> 2;
|
|
5415
5272
|
pos = uint32[pos32];
|
|
5416
|
-
|
|
5273
|
+
const endPos = pos + uint32[pos32 + 2] * 24;
|
|
5274
|
+
while (pos !== endPos) {
|
|
5417
5275
|
arr.push(deserializeErrorLabel(pos));
|
|
5418
5276
|
pos += 24;
|
|
5419
5277
|
}
|
|
@@ -5422,10 +5280,10 @@ function deserializeVecErrorLabel(pos) {
|
|
|
5422
5280
|
|
|
5423
5281
|
function deserializeVecStaticImport(pos) {
|
|
5424
5282
|
const arr = [],
|
|
5425
|
-
pos32 = pos >> 2
|
|
5426
|
-
len = uint32[pos32 + 2];
|
|
5283
|
+
pos32 = pos >> 2;
|
|
5427
5284
|
pos = uint32[pos32];
|
|
5428
|
-
|
|
5285
|
+
const endPos = pos + uint32[pos32 + 2] * 56;
|
|
5286
|
+
while (pos !== endPos) {
|
|
5429
5287
|
arr.push(deserializeStaticImport(pos));
|
|
5430
5288
|
pos += 56;
|
|
5431
5289
|
}
|
|
@@ -5434,10 +5292,10 @@ function deserializeVecStaticImport(pos) {
|
|
|
5434
5292
|
|
|
5435
5293
|
function deserializeVecStaticExport(pos) {
|
|
5436
5294
|
const arr = [],
|
|
5437
|
-
pos32 = pos >> 2
|
|
5438
|
-
len = uint32[pos32 + 2];
|
|
5295
|
+
pos32 = pos >> 2;
|
|
5439
5296
|
pos = uint32[pos32];
|
|
5440
|
-
|
|
5297
|
+
const endPos = pos + uint32[pos32 + 2] * 32;
|
|
5298
|
+
while (pos !== endPos) {
|
|
5441
5299
|
arr.push(deserializeStaticExport(pos));
|
|
5442
5300
|
pos += 32;
|
|
5443
5301
|
}
|
|
@@ -5446,10 +5304,10 @@ function deserializeVecStaticExport(pos) {
|
|
|
5446
5304
|
|
|
5447
5305
|
function deserializeVecDynamicImport(pos) {
|
|
5448
5306
|
const arr = [],
|
|
5449
|
-
pos32 = pos >> 2
|
|
5450
|
-
len = uint32[pos32 + 2];
|
|
5307
|
+
pos32 = pos >> 2;
|
|
5451
5308
|
pos = uint32[pos32];
|
|
5452
|
-
|
|
5309
|
+
const endPos = pos + uint32[pos32 + 2] * 16;
|
|
5310
|
+
while (pos !== endPos) {
|
|
5453
5311
|
arr.push(deserializeDynamicImport(pos));
|
|
5454
5312
|
pos += 16;
|
|
5455
5313
|
}
|
|
@@ -5458,10 +5316,10 @@ function deserializeVecDynamicImport(pos) {
|
|
|
5458
5316
|
|
|
5459
5317
|
function deserializeVecSpan(pos) {
|
|
5460
5318
|
const arr = [],
|
|
5461
|
-
pos32 = pos >> 2
|
|
5462
|
-
len = uint32[pos32 + 2];
|
|
5319
|
+
pos32 = pos >> 2;
|
|
5463
5320
|
pos = uint32[pos32];
|
|
5464
|
-
|
|
5321
|
+
const endPos = pos + uint32[pos32 + 2] * 8;
|
|
5322
|
+
while (pos !== endPos) {
|
|
5465
5323
|
arr.push(deserializeSpan(pos));
|
|
5466
5324
|
pos += 8;
|
|
5467
5325
|
}
|
|
@@ -5470,10 +5328,10 @@ function deserializeVecSpan(pos) {
|
|
|
5470
5328
|
|
|
5471
5329
|
function deserializeVecImportEntry(pos) {
|
|
5472
5330
|
const arr = [],
|
|
5473
|
-
pos32 = pos >> 2
|
|
5474
|
-
len = uint32[pos32 + 2];
|
|
5331
|
+
pos32 = pos >> 2;
|
|
5475
5332
|
pos = uint32[pos32];
|
|
5476
|
-
|
|
5333
|
+
const endPos = pos + uint32[pos32 + 2] * 96;
|
|
5334
|
+
while (pos !== endPos) {
|
|
5477
5335
|
arr.push(deserializeImportEntry(pos));
|
|
5478
5336
|
pos += 96;
|
|
5479
5337
|
}
|
|
@@ -5482,10 +5340,10 @@ function deserializeVecImportEntry(pos) {
|
|
|
5482
5340
|
|
|
5483
5341
|
function deserializeVecExportEntry(pos) {
|
|
5484
5342
|
const arr = [],
|
|
5485
|
-
pos32 = pos >> 2
|
|
5486
|
-
len = uint32[pos32 + 2];
|
|
5343
|
+
pos32 = pos >> 2;
|
|
5487
5344
|
pos = uint32[pos32];
|
|
5488
|
-
|
|
5345
|
+
const endPos = pos + uint32[pos32 + 2] * 144;
|
|
5346
|
+
while (pos !== endPos) {
|
|
5489
5347
|
arr.push(deserializeExportEntry(pos));
|
|
5490
5348
|
pos += 144;
|
|
5491
5349
|
}
|