From b6dcffe79b4194cccc76222acf08f10364206799 Mon Sep 17 00:00:00 2001 From: peter Date: Fri, 7 Nov 2008 00:14:08 +0000 Subject: [PATCH] * remove obsolete bt_specialize git-svn-id: trunk@12031 - --- compiler/globtype.pas | 2 +- compiler/pexpr.pas | 5 ++--- compiler/ptype.pas | 4 ---- compiler/scanner.pas | 6 +++--- 4 files changed, 6 insertions(+), 11 deletions(-) diff --git a/compiler/globtype.pas b/compiler/globtype.pas index a0d2956e0a..0af8940508 100644 --- a/compiler/globtype.pas +++ b/compiler/globtype.pas @@ -262,7 +262,7 @@ interface { currently parsed block type } tblock_type = (bt_none, - bt_general,bt_type,bt_const,bt_except,bt_body,bt_specialize + bt_general,bt_type,bt_const,bt_except,bt_body ); { Temp types } diff --git a/compiler/pexpr.pas b/compiler/pexpr.pas index 813c4ace6e..2ff79cb10a 100644 --- a/compiler/pexpr.pas +++ b/compiler/pexpr.pas @@ -1399,8 +1399,7 @@ implementation if (hdef=cvarianttype) and not(cs_compilesystem in current_settings.moduleswitches) then current_module.flags:=current_module.flags or uf_uses_variants; - if (block_type<>bt_specialize) and - try_to_consume(_LKLAMMER) then + if try_to_consume(_LKLAMMER) then begin p1:=comp_expr(true); consume(_RKLAMMER); @@ -1486,7 +1485,7 @@ implementation { For a type block we simply return only the type. For all other blocks we return a loadvmt node } - if not(block_type in [bt_type,bt_specialize]) then + if not(block_type in [bt_type]) then p1:=cloadvmtaddrnode.create(p1); end; end diff --git a/compiler/ptype.pas b/compiler/ptype.pas index 4f9ea1ae86..351c207326 100644 --- a/compiler/ptype.pas +++ b/compiler/ptype.pas @@ -86,7 +86,6 @@ implementation err : boolean; i : longint; sym : tsym; - old_block_type : tblock_type; genericdef : tstoreddef; generictype : ttypesym; generictypelist : TFPObjectList; @@ -132,8 +131,6 @@ implementation end; consume(_LSHARPBRACKET); - old_block_type:=block_type; - block_type:=bt_specialize; { Parse generic parameters, for each undefineddef in the symtable of the genericdef we need to have a new def } err:=false; @@ -271,7 +268,6 @@ implementation generictypelist.free; consume(_RSHARPBRACKET); - block_type:=old_block_type; end; diff --git a/compiler/scanner.pas b/compiler/scanner.pas index 0919bb9904..eb8fe8d7bd 100644 --- a/compiler/scanner.pas +++ b/compiler/scanner.pas @@ -3615,7 +3615,7 @@ In case not, the value returned can be arbitrary. begin readchar; c:=upcase(c); - if (block_type in [bt_type,bt_specialize]) or + if (block_type in [bt_type]) or (lasttoken=_ID) or (lasttoken=_NIL) or (lasttoken=_OPERATOR) or (lasttoken=_RKLAMMER) or (lasttoken=_RECKKLAMMER) or (lasttoken=_CARET) then begin @@ -3855,7 +3855,7 @@ In case not, the value returned can be arbitrary. '>' : begin readchar; - if (block_type in [bt_type,bt_specialize]) then + if (block_type in [bt_type]) then token:=_RSHARPBRACKET else begin @@ -3887,7 +3887,7 @@ In case not, the value returned can be arbitrary. '<' : begin readchar; - if (block_type in [bt_type,bt_specialize]) then + if (block_type in [bt_type]) then token:=_LSHARPBRACKET else begin