Skip to content

Commit 01e23df

Browse files
committed
fbc: some source files were stored to the repository with mixed CRLF & LF line endings (as seen on Linux), likely due to the patch that was applied at the time. And will not auto convert to CRLF even when autocrlf=true
1 parent 084e9a8 commit 01e23df

File tree

12 files changed

+98
-98
lines changed

12 files changed

+98
-98
lines changed

src/compiler/ast-node-misc.bas

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -152,8 +152,8 @@ end function
152152
function astNewDBG _
153153
( _
154154
byval op as integer, _
155-
byval ex as integer, _
156-
byval filename As ZString Ptr _
155+
byval ex as integer, _
156+
byval filename As ZString Ptr _
157157
) as ASTNODE ptr
158158

159159
dim as ASTNODE ptr n = any
@@ -166,14 +166,14 @@ function astNewDBG _
166166

167167
n->dbg.op = op
168168
n->dbg.ex = ex
169-
n->dbg.filename = filename
169+
n->dbg.filename = filename
170170

171171
function = n
172172
end function
173173

174174
function astLoadDBG( byval n as ASTNODE ptr ) as IRVREG ptr
175175
if( ast.doemit ) then
176-
irEmitDBG( n->dbg.op, astGetProc( )->sym, n->dbg.ex, n->dbg.filename )
176+
irEmitDBG( n->dbg.op, astGetProc( )->sym, n->dbg.ex, n->dbg.filename )
177177
end if
178178

179179
function = NULL

src/compiler/ast.bi

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -172,9 +172,9 @@ type AST_NODE_JMPTB
172172
end type
173173

174174
type AST_NODE_DBG
175-
ex as integer
176-
filename as zstring ptr
177-
op as integer
175+
ex as integer
176+
filename as zstring ptr
177+
op as integer
178178
end type
179179

180180
type AST_NODE_MEM
@@ -794,9 +794,9 @@ declare function astNewASM( byval asmtokhead as ASTASMTOK ptr ) as ASTNODE ptr
794794

795795
declare function astNewDBG _
796796
( _
797-
byval op as integer, _
798-
byval ex as integer = 0, _
799-
byval filename as zstring ptr = 0 _
797+
byval op as integer, _
798+
byval ex as integer = 0, _
799+
byval filename as zstring ptr = 0 _
800800
) as ASTNODE ptr
801801

802802
declare function astNewMEM _

src/compiler/edbg_stab.bas

Lines changed: 39 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -213,10 +213,10 @@ sub edbgEmitHeader( byval filename as zstring ptr )
213213

214214
ctx.typecnt = 1
215215
ctx.label = NULL
216-
ctx.incfile = NULL
217-
218-
'' ctx.filename is never used
219-
ctx.filename = *filename
216+
ctx.incfile = NULL
217+
218+
'' ctx.filename is never used
219+
ctx.filename = *filename
220220

221221
'' emit source file name
222222
lname = *symbUniqueLabel( )
@@ -267,13 +267,13 @@ sub edbgLineBegin _
267267
( _
268268
byval proc as FBSYMBOL ptr, _
269269
byval lnum as integer, _
270-
byval pos_ as integer, _
271-
ByVal filename As zstring ptr _
270+
byval pos_ as integer, _
271+
ByVal filename As zstring ptr _
272272
)
273273

274274
if( env.clopt.debuginfo = FALSE ) then
275275
exit sub
276-
end if
276+
end if
277277

278278
if( ctx.lnum > 0 ) then
279279
ctx.pos = pos_ - ctx.pos
@@ -283,8 +283,8 @@ sub edbgLineBegin _
283283
end if
284284
end if
285285

286-
edbgInclude( filename )
287-
286+
edbgInclude( filename )
287+
288288
ctx.pos = pos_
289289
ctx.lnum = lnum
290290
if( ctx.isnewline ) then
@@ -534,7 +534,7 @@ sub edbgEmitProcHeader _
534534

535535
''
536536
ctx.isnewline = TRUE
537-
ctx.lnum = 0
537+
ctx.lnum = 0
538538
ctx.pos = 0
539539
ctx.label = NULL
540540

@@ -649,7 +649,7 @@ sub edbgEmitProcFooter _
649649

650650
''
651651
ctx.isnewline = TRUE
652-
ctx.lnum = 0
652+
ctx.lnum = 0
653653
ctx.pos = 0
654654
ctx.label = NULL
655655

@@ -1018,32 +1018,32 @@ end sub
10181018

10191019
sub edbgInclude( byval incfile as zstring ptr )
10201020
dim as string lname
1021-
1022-
'' NOTE: originally, fbc used STAB_TYPE_BINCL and STAB_TYPE_EINCL
1023-
'' to mark the beginning and end of an include file. The purpose
1024-
'' for these markers is so the linker (LD) can remove duplicate
1025-
'' debug type information from the final EXE. However, because
1026-
'' fbc only emits types actually used, the end result is that
1027-
'' type information from a header (.BI) is often different from
1028-
'' one object module to another is generally not used in the
1029-
'' way that BINCL/EINCL/EXCL was intented.
1030-
1031-
'' incfile is the new include file or main file name
1032-
1033-
'' coming from _close incfile is null so no real need to change
1034-
If( incfile = NULL )Then
1035-
Exit Sub
1036-
EndIf
1037-
1038-
'' Already handling the correct name
1039-
if( incfile = ctx.incfile ) Then
1040-
exit sub
1041-
end If
1042-
1043-
emitSECTION( IR_SECTION_CODE, 0 )
1044-
lname = *symbUniqueLabel( )
1045-
hEmitSTABS( STAB_TYPE_SOL, incfile, 0, 0, lname )
1046-
hLABEL( lname )
1047-
1048-
ctx.incfile = incfile
1021+
1022+
'' NOTE: originally, fbc used STAB_TYPE_BINCL and STAB_TYPE_EINCL
1023+
'' to mark the beginning and end of an include file. The purpose
1024+
'' for these markers is so the linker (LD) can remove duplicate
1025+
'' debug type information from the final EXE. However, because
1026+
'' fbc only emits types actually used, the end result is that
1027+
'' type information from a header (.BI) is often different from
1028+
'' one object module to another is generally not used in the
1029+
'' way that BINCL/EINCL/EXCL was intented.
1030+
1031+
'' incfile is the new include file or main file name
1032+
1033+
'' coming from _close incfile is null so no real need to change
1034+
If( incfile = NULL )Then
1035+
Exit Sub
1036+
EndIf
1037+
1038+
'' Already handling the correct name
1039+
if( incfile = ctx.incfile ) Then
1040+
exit sub
1041+
end If
1042+
1043+
emitSECTION( IR_SECTION_CODE, 0 )
1044+
lname = *symbUniqueLabel( )
1045+
hEmitSTABS( STAB_TYPE_SOL, incfile, 0, 0, lname )
1046+
hLABEL( lname )
1047+
1048+
ctx.incfile = incfile
10491049
end sub

src/compiler/emit.bas

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -204,8 +204,8 @@ sub emitFlush( )
204204
case EMIT_NODECLASS_DBG
205205
cast( EMIT_DBGCB, emit.opFnTb[n->dbg.op] )( n->dbg.sym, _
206206
n->dbg.lnum, _
207-
n->dbg.pos, _
208-
n->dbg.filename )
207+
n->dbg.pos, _
208+
n->dbg.filename )
209209

210210
end select
211211

@@ -457,8 +457,8 @@ private function hNewDBG _
457457
byval op as integer, _
458458
byval sym as FBSYMBOL ptr, _
459459
byval lnum as integer = 0, _
460-
byval pos_ as integer = 0, _
461-
byval filename As zstring ptr = 0 _
460+
byval pos_ as integer = 0, _
461+
byval filename As zstring ptr = 0 _
462462
) as EMIT_NODE ptr static
463463

464464
dim as EMIT_NODE ptr n
@@ -468,7 +468,7 @@ private function hNewDBG _
468468
n->dbg.op = op
469469
n->dbg.sym = sym
470470
n->dbg.lnum = lnum
471-
n->dbg.filename = filename
471+
n->dbg.filename = filename
472472
n->dbg.pos = pos_
473473

474474
function = n
@@ -1635,11 +1635,11 @@ end function
16351635
function emitDBGLineBegin _
16361636
( _
16371637
byval proc as FBSYMBOL ptr, _
1638-
byval lnum as integer, _
1639-
byval filename As zstring ptr _
1638+
byval lnum as integer, _
1639+
byval filename As zstring ptr _
16401640
) as EMIT_NODE ptr
16411641

1642-
function = hNewDBG( EMIT_OP_LINEINI, proc, lnum, emit.pos, filename )
1642+
function = hNewDBG( EMIT_OP_LINEINI, proc, lnum, emit.pos, filename )
16431643

16441644
end function
16451645

src/compiler/emit.bi

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ type EMIT_DBGNODE
199199
op as integer
200200
sym as FBSYMBOL ptr
201201
lnum as integer
202-
filename as zstring ptr
202+
filename as zstring ptr
203203
pos as integer
204204
end type
205205

@@ -262,8 +262,8 @@ type EMIT_MEMCB as sub( byval dvreg as IRVREG ptr, _
262262

263263
type EMIT_DBGCB as sub( byval sym as FBSYMBOL ptr, _
264264
byval lnum as integer, _
265-
byval pos as Integer, _
266-
ByVal filename As ZString Ptr =0 )
265+
byval pos as Integer, _
266+
ByVal filename As ZString Ptr =0 )
267267

268268
'' if changed, update the _vtbl symbols at emit_*.bas::*_ctor
269269
type EMIT_VTBL
@@ -792,8 +792,8 @@ declare function emitSTKCLEAR _
792792
declare function emitDBGLineBegin _
793793
( _
794794
byval proc as FBSYMBOL ptr, _
795-
byval ex as Integer, _
796-
ByVal filename As ZString Ptr _
795+
byval ex as Integer, _
796+
ByVal filename As ZString Ptr _
797797
) as EMIT_NODE ptr
798798

799799
declare function emitDBGLineEnd _

src/compiler/emit_x86.bas

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6049,11 +6049,11 @@ private sub _emitLINEINI _
60496049
( _
60506050
byval proc as FBSYMBOL ptr, _
60516051
byval lnum as integer, _
6052-
byval pos_ as integer, _
6053-
byval filename As zstring ptr _
6052+
byval pos_ as integer, _
6053+
byval filename As zstring ptr _
60546054
)
60556055

6056-
edbgLineBegin( proc, lnum, pos_, filename )
6056+
edbgLineBegin( proc, lnum, pos_, filename )
60576057

60586058
end sub
60596059

src/compiler/emitdbg.bi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ declare sub edbgLineBegin _
99
( _
1010
byval proc as FBSYMBOL ptr, _
1111
byval lnum as integer, _
12-
byval pos as integer, _
13-
byval filename as zstring ptr _
12+
byval pos as integer, _
13+
byval filename as zstring ptr _
1414
)
1515

1616
declare sub edbgLineEnd _

src/compiler/ir-llvm.bas

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -185,8 +185,8 @@ declare sub _emitDBG _
185185
( _
186186
byval op as integer, _
187187
byval proc as FBSYMBOL ptr, _
188-
byval lnum as integer, _
189-
ByVal filename As zstring ptr = 0 _
188+
byval lnum as integer, _
189+
ByVal filename As zstring ptr = 0 _
190190
)
191191
declare function hVregToStr( byval vreg as IRVREG ptr ) as string
192192
declare sub hEmitConvert( byval v1 as IRVREG ptr, byval v2 as IRVREG ptr )
@@ -2081,18 +2081,18 @@ private sub _emitDBG _
20812081
( _
20822082
byval op as integer, _
20832083
byval proc as FBSYMBOL ptr, _
2084-
byval lnum as integer, _
2085-
ByVal filename As zstring ptr _
2084+
byval lnum as integer, _
2085+
ByVal filename As zstring ptr _
20862086
)
20872087

2088-
if( op = AST_OP_DBG_LINEINI ) Then
2089-
if( filename <> NULL ) then
2090-
hWriteLine( "#line " & lnum & " """ & hReplace( filename, "\", $"\\" ) & """" )
2091-
else
2092-
hWriteLine( "#line " & lnum & " """ & hReplace( env.inf.name, "\", $"\\" ) & """" )
2093-
end if
2094-
ctx.linenum = lnum
2095-
end If
2088+
if( op = AST_OP_DBG_LINEINI ) Then
2089+
if( filename <> NULL ) then
2090+
hWriteLine( "#line " & lnum & " """ & hReplace( filename, "\", $"\\" ) & """" )
2091+
else
2092+
hWriteLine( "#line " & lnum & " """ & hReplace( env.inf.name, "\", $"\\" ) & """" )
2093+
end if
2094+
ctx.linenum = lnum
2095+
end If
20962096

20972097
end sub
20982098

src/compiler/ir-tac.bas

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,8 @@ declare sub hFlushDBG _
106106
( _
107107
byval op as integer, _
108108
byval proc as FBSYMBOL ptr, _
109-
byval ex as integer, _
110-
ByVal filename As zstring ptr _
109+
byval ex as integer, _
110+
ByVal filename As zstring ptr _
111111
)
112112

113113
declare sub hFlushLIT( byval op as integer, byval text as zstring ptr )
@@ -295,8 +295,8 @@ private sub _emit _
295295
byval v2 as IRVREG ptr, _
296296
byval vr as IRVREG ptr, _
297297
byval ex1 as FBSYMBOL ptr = NULL, _
298-
byval ex2 as integer = 0, _
299-
byval ex3 as zstring ptr = 0 _
298+
byval ex2 as integer = 0, _
299+
byval ex3 as zstring ptr = 0 _
300300
) static
301301

302302
dim as IRTAC ptr t
@@ -319,8 +319,8 @@ private sub _emit _
319319

320320
t->ex1 = ex1
321321
t->ex2 = ex2
322-
t->ex3 = ex3
323-
322+
t->ex3 = ex3
323+
324324
ctx.taccnt += 1
325325

326326
end sub
@@ -682,11 +682,11 @@ private sub _emitDBG _
682682
( _
683683
byval op as integer, _
684684
byval proc as FBSYMBOL ptr, _
685-
byval ex as integer, _
686-
byval filename as zstring ptr _
685+
byval ex as integer, _
686+
byval filename as zstring ptr _
687687
)
688688

689-
_emit( op, NULL, NULL, NULL, proc, ex, filename )
689+
_emit( op, NULL, NULL, NULL, proc, ex, filename )
690690

691691
end sub
692692

@@ -1365,7 +1365,7 @@ private sub _flush static
13651365
hFlushMEM( op, v1, v2, t->ex2, t->ex1 )
13661366

13671367
case AST_NODECLASS_DBG
1368-
hFlushDBG( op, t->ex1, t->ex2, t->ex3 )
1368+
hFlushDBG( op, t->ex1, t->ex2, t->ex3 )
13691369

13701370
case AST_NODECLASS_LIT
13711371
hFlushLIT( op, cast( any ptr, t->ex1 ) )
@@ -2401,13 +2401,13 @@ private sub hFlushDBG _
24012401
( _
24022402
byval op as integer, _
24032403
byval proc as FBSYMBOL ptr, _
2404-
byval ex as integer, _
2405-
ByVal filename As zstring ptr _
2404+
byval ex as integer, _
2405+
ByVal filename As zstring ptr _
24062406
)
24072407

24082408
select case as const op
24092409
case AST_OP_DBG_LINEINI
2410-
emitDBGLineBegin( proc, ex, filename )
2410+
emitDBGLineBegin( proc, ex, filename )
24112411

24122412
case AST_OP_DBG_LINEEND
24132413
emitDBGLineEnd( proc, ex )

0 commit comments

Comments
 (0)