|
@@ -2080,6 +2080,7 @@ In case not, the value returned can be arbitrary.
|
|
t : ttoken;
|
|
t : ttoken;
|
|
s : tspecialgenerictoken;
|
|
s : tspecialgenerictoken;
|
|
len : sizeint;
|
|
len : sizeint;
|
|
|
|
+ b : byte;
|
|
begin
|
|
begin
|
|
if not assigned(recordtokenbuf) then
|
|
if not assigned(recordtokenbuf) then
|
|
internalerror(200511176);
|
|
internalerror(200511176);
|
|
@@ -2108,8 +2109,17 @@ In case not, the value returned can be arbitrary.
|
|
begin
|
|
begin
|
|
s:=ST_COLUMN;
|
|
s:=ST_COLUMN;
|
|
writetoken(t);
|
|
writetoken(t);
|
|
- recordtokenbuf.write(s,1);
|
|
|
|
- recordtokenbuf.write(current_tokenpos.column,sizeof(current_tokenpos.column));
|
|
|
|
|
|
+ { can the column be written packed? }
|
|
|
|
+ if current_tokenpos.column<$80 then
|
|
|
|
+ begin
|
|
|
|
+ b:=$80 or current_tokenpos.column;
|
|
|
|
+ recordtokenbuf.write(b,1);
|
|
|
|
+ end
|
|
|
|
+ else
|
|
|
|
+ begin
|
|
|
|
+ recordtokenbuf.write(s,1);
|
|
|
|
+ recordtokenbuf.write(current_tokenpos.column,sizeof(current_tokenpos.column));
|
|
|
|
+ end;
|
|
last_filepos.column:=current_tokenpos.column;
|
|
last_filepos.column:=current_tokenpos.column;
|
|
end;
|
|
end;
|
|
if current_tokenpos.fileindex<>last_filepos.fileindex then
|
|
if current_tokenpos.fileindex<>last_filepos.fileindex then
|
|
@@ -2258,45 +2268,57 @@ In case not, the value returned can be arbitrary.
|
|
_GENERICSPECIALTOKEN:
|
|
_GENERICSPECIALTOKEN:
|
|
begin
|
|
begin
|
|
replaytokenbuf.read(specialtoken,1);
|
|
replaytokenbuf.read(specialtoken,1);
|
|
- case specialtoken of
|
|
|
|
- ST_LOADSETTINGS:
|
|
|
|
- replaytokenbuf.read(current_settings,sizeof(current_settings));
|
|
|
|
- ST_LINE:
|
|
|
|
- begin
|
|
|
|
- replaytokenbuf.read(current_tokenpos.line,sizeof(current_tokenpos.line));
|
|
|
|
|
|
+ { packed column? }
|
|
|
|
+ if (ord(specialtoken) and $80)<>0 then
|
|
|
|
+ begin
|
|
|
|
+ current_tokenpos.column:=ord(specialtoken) and $7f;
|
|
|
|
|
|
{ don't generate invalid line info if no sources are available for the current module }
|
|
{ don't generate invalid line info if no sources are available for the current module }
|
|
if not(get_module(current_filepos.moduleindex).sources_avail) then
|
|
if not(get_module(current_filepos.moduleindex).sources_avail) then
|
|
- current_tokenpos.line:=0;
|
|
|
|
|
|
+ current_tokenpos.column:=0;
|
|
|
|
|
|
current_filepos:=current_tokenpos;
|
|
current_filepos:=current_tokenpos;
|
|
- end;
|
|
|
|
- ST_COLUMN:
|
|
|
|
- begin
|
|
|
|
- replaytokenbuf.read(current_tokenpos.column,sizeof(current_tokenpos.column));
|
|
|
|
|
|
+ end
|
|
|
|
+ else
|
|
|
|
+ case specialtoken of
|
|
|
|
+ ST_LOADSETTINGS:
|
|
|
|
+ replaytokenbuf.read(current_settings,sizeof(current_settings));
|
|
|
|
+ ST_LINE:
|
|
|
|
+ begin
|
|
|
|
+ replaytokenbuf.read(current_tokenpos.line,sizeof(current_tokenpos.line));
|
|
|
|
|
|
- { don't generate invalid line info if no sources are available for the current module }
|
|
|
|
- if not(get_module(current_filepos.moduleindex).sources_avail) then
|
|
|
|
- current_tokenpos.column:=0;
|
|
|
|
|
|
+ { don't generate invalid line info if no sources are available for the current module }
|
|
|
|
+ if not(get_module(current_filepos.moduleindex).sources_avail) then
|
|
|
|
+ current_tokenpos.line:=0;
|
|
|
|
|
|
- current_filepos:=current_tokenpos;
|
|
|
|
- end;
|
|
|
|
- ST_FILEINDEX:
|
|
|
|
- begin
|
|
|
|
- replaytokenbuf.read(current_tokenpos.fileindex,sizeof(current_tokenpos.fileindex));
|
|
|
|
|
|
+ current_filepos:=current_tokenpos;
|
|
|
|
+ end;
|
|
|
|
+ ST_COLUMN:
|
|
|
|
+ begin
|
|
|
|
+ replaytokenbuf.read(current_tokenpos.column,sizeof(current_tokenpos.column));
|
|
|
|
|
|
- { don't generate invalid line info if no sources are available for the current module }
|
|
|
|
- if not(get_module(current_filepos.moduleindex).sources_avail) then
|
|
|
|
- begin
|
|
|
|
|
|
+ { don't generate invalid line info if no sources are available for the current module }
|
|
|
|
+ if not(get_module(current_filepos.moduleindex).sources_avail) then
|
|
current_tokenpos.column:=0;
|
|
current_tokenpos.column:=0;
|
|
- current_tokenpos.line:=0;
|
|
|
|
- end;
|
|
|
|
|
|
|
|
- current_filepos:=current_tokenpos;
|
|
|
|
- end;
|
|
|
|
- else
|
|
|
|
- internalerror(2006103010);
|
|
|
|
- end;
|
|
|
|
|
|
+ current_filepos:=current_tokenpos;
|
|
|
|
+ end;
|
|
|
|
+ ST_FILEINDEX:
|
|
|
|
+ begin
|
|
|
|
+ replaytokenbuf.read(current_tokenpos.fileindex,sizeof(current_tokenpos.fileindex));
|
|
|
|
+
|
|
|
|
+ { don't generate invalid line info if no sources are available for the current module }
|
|
|
|
+ if not(get_module(current_filepos.moduleindex).sources_avail) then
|
|
|
|
+ begin
|
|
|
|
+ current_tokenpos.column:=0;
|
|
|
|
+ current_tokenpos.line:=0;
|
|
|
|
+ end;
|
|
|
|
+
|
|
|
|
+ current_filepos:=current_tokenpos;
|
|
|
|
+ end;
|
|
|
|
+ else
|
|
|
|
+ internalerror(2006103010);
|
|
|
|
+ end;
|
|
continue;
|
|
continue;
|
|
end;
|
|
end;
|
|
end;
|
|
end;
|