File tree Expand file tree Collapse file tree 2 files changed +9
-38
lines changed Expand file tree Collapse file tree 2 files changed +9
-38
lines changed Original file line number Diff line number Diff line change @@ -56,9 +56,6 @@ const DEFAULT_RANGE_STATE = {
56
56
line : 0 ,
57
57
column : 0 ,
58
58
defScopeIdx : 0 ,
59
- callsiteSourceIdx : 0 ,
60
- callsiteLine : 0 ,
61
- callsiteColumn : 0 ,
62
59
} ;
63
60
64
61
class Decoder {
@@ -173,9 +170,9 @@ class Decoder {
173
170
}
174
171
case Tag . GENERATED_RANGE_CALL_SITE : {
175
172
this . #handleGeneratedRangeCallSite(
176
- iter . nextSignedVLQ ( ) ,
177
- iter . nextSignedVLQ ( ) ,
178
- iter . nextSignedVLQ ( ) ,
173
+ iter . nextUnsignedVLQ ( ) ,
174
+ iter . nextUnsignedVLQ ( ) ,
175
+ iter . nextUnsignedVLQ ( ) ,
179
176
) ;
180
177
break ;
181
178
}
@@ -352,21 +349,10 @@ class Decoder {
352
349
return ;
353
350
}
354
351
355
- if ( sourceIndex === 0 && line === 0 ) {
356
- this . #rangeState. callsiteColumn += column ;
357
- } else if ( sourceIndex === 0 ) {
358
- this . #rangeState. callsiteLine += line ;
359
- this . #rangeState. callsiteColumn = column ;
360
- } else {
361
- this . #rangeState. callsiteSourceIdx += sourceIndex ;
362
- this . #rangeState. callsiteLine = line ;
363
- this . #rangeState. callsiteColumn = column ;
364
- }
365
-
366
352
range . callSite = {
367
- sourceIndex : this . #rangeState . callsiteSourceIdx ,
368
- line : this . #rangeState . callsiteLine ,
369
- column : this . #rangeState . callsiteColumn ,
353
+ sourceIndex,
354
+ line,
355
+ column,
370
356
} ;
371
357
}
372
358
Original file line number Diff line number Diff line change @@ -22,9 +22,6 @@ const DEFAULT_RANGE_STATE = {
22
22
line : 0 ,
23
23
column : 0 ,
24
24
defScopeIdx : 0 ,
25
- callsiteSourceIdx : 0 ,
26
- callsiteLine : 0 ,
27
- callsiteColumn : 0 ,
28
25
} ;
29
26
30
27
export class Encoder {
@@ -217,21 +214,9 @@ export class Encoder {
217
214
218
215
// TODO: Throw if stackFrame flag is set or OriginalScope index is invalid or no generated range is here.
219
216
220
- const encodedSourceIndex = sourceIndex - this . #rangeState. callsiteSourceIdx ;
221
- const encodedLine = encodedSourceIndex == 0
222
- ? line - this . #rangeState. callsiteLine
223
- : line ;
224
- const encodedColumn = encodedLine == 0
225
- ? column - this . #rangeState. callsiteColumn
226
- : column ;
227
-
228
- this . #rangeState. callsiteSourceIdx = sourceIndex ;
229
- this . #rangeState. callsiteLine = line ;
230
- this . #rangeState. callsiteColumn = column ;
231
-
232
- this . #encodeTag( EncodedTag . GENERATED_RANGE_CALL_SITE ) . #encodeSigned(
233
- encodedSourceIndex ,
234
- ) . #encodeSigned( encodedLine ) . #encodeSigned( encodedColumn ) . #finishItem( ) ;
217
+ this . #encodeTag( EncodedTag . GENERATED_RANGE_CALL_SITE ) . #encodeUnsigned(
218
+ sourceIndex ,
219
+ ) . #encodeUnsigned( line ) . #encodeUnsigned( column ) . #finishItem( ) ;
235
220
}
236
221
237
222
#encodeGeneratedRangeEnd( range : GeneratedRange ) {
You can’t perform that action at this time.
0 commit comments