Changeset 1208


Ignore:
Timestamp:
Aug 14, 2003, 2:00:20 PM (17 years ago)
Author:
orlov
Message:
  • Put constant declarations in cc-files instead of hh-ones.
Location:
to-imperative/trunk/compiler
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • to-imperative/trunk/compiler/rfp_asail.rf

    r1146 r1208  
    142142      (e.linkage 'const Expr ' <Rfp2Cpp e.name> ' = '
    143143        <Const-Expr-To-CPP e.expr> ';');
    144     (DECL-OBJ s.linkage s.tag t.name) =
     144    (OBJ s.linkage s.tag t.name) =
    145145      { s.linkage : LOCAL = 'static ';; } :: e.linkage,
    146146      <To-Chars s.tag> : s1 e2,
     
    149149      (e.linkage 'const Expr ' <Rfp2Cpp e.name>
    150150        ' = new rftype::' s1 <To-Lower e2> ' ();');
    151     (DECL-FUNC s.linkage t.name) =
     151    (DECL-OBJ t.name) =
     152      <RFP-Extract-Qualifiers t.name> :: (e.qualifiers) e.name,
     153      <Namespace-Control e.qualifiers>
     154      ('extern const Expr ' <Rfp2Cpp e.name> ';');
     155    (DECL-FUNC t.name) =
    152156      <RFP-Extract-Qualifiers t.name> :: (e.qualifiers) e.name,
    153157      <Namespace-Control e.qualifiers>
  • to-imperative/trunk/compiler/rfp_compile.rf

    r1201 r1208  
    131131      (s.link s.tag t.pragma t.name (e.in) (e.out) e.body), FUNC FUNC? : e s.tag e =
    132132        {
    133           s.link : EXPORT = (DECL-FUNC EXPORT t.name);
    134           <Put &Declarations (DECL-FUNC LOCAL t.name)> = /*empty*/;
     133          s.link : EXPORT = (DECL-FUNC t.name);
     134          <Put &Declarations (DECL-FUNC t.name)> = /*empty*/;
    135135        } :: e.decl,
    136136        {
     
    141141      (s.link CONST t.pragma t.name e.expr) =
    142142        (CONSTEXPR s.link t.name (e.expr) e.expr) :: t.const,
     143        <Put &Declarations t.const>,
    143144        {
    144           s.link : EXPORT = (t.const) /*empty*/;
    145           <Put &Declarations t.const> = () /*empty*/;
     145          s.link : EXPORT = ((DECL-OBJ t.name)) /*empty*/;
     146          () /*empty*/;
    146147        };
    147       (EXPORT s.tag t.pragma t.name) = ((DECL-OBJ EXPORT s.tag t.name)) /*empty*/;
     148      (EXPORT s.tag t.pragma t.name) =
     149        <Put &Declarations (OBJ EXPORT s.tag t.name)>,
     150        ((DECL-OBJ t.name)) /*empty*/;
    148151      (LOCAL  s.tag t.pragma t.name) =
    149         <Put &Declarations (DECL-OBJ LOCAL s.tag t.name)>,
     152        <Put &Declarations (OBJ LOCAL s.tag t.name)>,
    150153        () /*empty*/;
    151154    } :: (e.decl) e.item =
     
    165168Gener-Stub (t.name) =
    166169  <Lookup &Stub-Funcs t.name> : t.stub-name s.tag (e.Fin) (e.Fout),
    167   <Put &Declarations (DECL-FUNC LOCAL t.stub-name)>,
     170  <Put &Declarations (DECL-FUNC t.stub-name)>,
    168171  <Gener-Vars (e.Fin) "stub"> :: e.He,
    169172  <Comp-Func s.tag t.stub-name ((EVAR ("arg" 1))) ((EVAR))
Note: See TracChangeset for help on using the changeset viewer.