Browse Source

* remove obsolete bt_specialize

git-svn-id: trunk@12031 -
peter 16 years ago
parent
commit
b6dcffe79b
4 changed files with 6 additions and 11 deletions
  1. 1 1
      compiler/globtype.pas
  2. 2 3
      compiler/pexpr.pas
  3. 0 4
      compiler/ptype.pas
  4. 3 3
      compiler/scanner.pas

+ 1 - 1
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 }

+ 2 - 3
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

+ 0 - 4
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;
 
 

+ 3 - 3
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