@@ -314,25 +314,6 @@ const _super = (function (geti, seti) {
314
314
emitNodeWithNotification ( node , emitWithComments ) ;
315
315
}
316
316
317
- /**
318
- * Emits a node with specialized emit flags.
319
- */
320
- // TODO(rbuckton): This should be removed once source maps are aligned with the old
321
- // emitter and new baselines are taken. This exists solely to
322
- // align with the old emitter.
323
- function emitSpecialized ( node : Node , flags : NodeEmitFlags ) {
324
- if ( node ) {
325
- const flagsToAdd = flags & ~ node . emitFlags ;
326
- if ( flagsToAdd ) {
327
- node . emitFlags |= flagsToAdd ;
328
- emit ( node ) ;
329
- node . emitFlags &= ~ flagsToAdd ;
330
- return ;
331
- }
332
-
333
- emit ( node ) ;
334
- }
335
- }
336
317
337
318
/**
338
319
* Emits a node with comments.
@@ -354,6 +335,16 @@ const _super = (function (geti, seti) {
354
335
emitNodeWithSourceMap ( node , emitWorker ) ;
355
336
}
356
337
338
+ function emitIdentifierName ( node : Identifier ) {
339
+ if ( node ) {
340
+ emitNodeWithNotification ( node , emitIdentifierNameWithComments ) ;
341
+ }
342
+ }
343
+
344
+ function emitIdentifierNameWithComments ( node : Identifier ) {
345
+ emitNodeWithComments ( node , emitWorker ) ;
346
+ }
347
+
357
348
/**
358
349
* Emits an expression node.
359
350
*/
@@ -1573,7 +1564,7 @@ const _super = (function (geti, seti) {
1573
1564
emitDecorators ( node , node . decorators ) ;
1574
1565
emitModifiers ( node , node . modifiers ) ;
1575
1566
write ( node . asteriskToken ? "function* " : "function " ) ;
1576
- emitSpecialized ( node . name , NodeEmitFlags . NoSourceMap ) ;
1567
+ emitIdentifierName ( node . name ) ;
1577
1568
emitSignatureAndBody ( node , emitSignatureHead ) ;
1578
1569
}
1579
1570
@@ -1709,7 +1700,7 @@ const _super = (function (geti, seti) {
1709
1700
emitDecorators ( node , node . decorators ) ;
1710
1701
emitModifiers ( node , node . modifiers ) ;
1711
1702
write ( "class" ) ;
1712
- emitSpecializedWithPrefix ( " " , node . name , NodeEmitFlags . NoSourceMap ) ;
1703
+ emitNodeWithPrefix ( " " , node . name , emitIdentifierName ) ;
1713
1704
1714
1705
const indentedFlag = node . emitFlags & NodeEmitFlags . Indented ;
1715
1706
if ( indentedFlag ) {
@@ -2237,16 +2228,6 @@ const _super = (function (geti, seti) {
2237
2228
emitNodeWithPrefix ( prefix , node , emit ) ;
2238
2229
}
2239
2230
2240
- // TODO(rbuckton): This should be removed once source maps are aligned with the old
2241
- // emitter and new baselines are taken. This exists solely to
2242
- // align with the old emitter.
2243
- function emitSpecializedWithPrefix ( prefix : string , node : Node , flags : NodeEmitFlags ) {
2244
- if ( node ) {
2245
- write ( prefix ) ;
2246
- emitSpecialized ( node , flags ) ;
2247
- }
2248
- }
2249
-
2250
2231
function emitExpressionWithPrefix ( prefix : string , node : Node ) {
2251
2232
emitNodeWithPrefix ( prefix , node , emitExpression ) ;
2252
2233
}
0 commit comments