about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/comp/front/test.rs2
-rw-r--r--src/comp/syntax/ast.rs3
-rw-r--r--src/comp/syntax/fold.rs2
-rw-r--r--src/comp/syntax/parse/parser.rs3
4 files changed, 10 insertions, 0 deletions
diff --git a/src/comp/front/test.rs b/src/comp/front/test.rs
index 8f4afc86877..23dadca206e 100644
--- a/src/comp/front/test.rs
+++ b/src/comp/front/test.rs
@@ -178,6 +178,7 @@ fn mk_tests(cx: &test_ctxt) -> @ast::item {
         {inputs: ~[],
          output: ret_ty,
          purity: ast::impure_fn,
+         il: ast::il_normal,
          cf: ast::return,
          constraints: ~[]};
     let proto = ast::proto_fn;
@@ -295,6 +296,7 @@ fn mk_main(cx: &test_ctxt) -> @ast::item {
         {inputs: ~[args_arg],
          output: @ret_ty,
          purity: ast::impure_fn,
+         il: ast::il_normal,
          cf: ast::return,
          constraints: ~[]};
     let proto = ast::proto_fn;
diff --git a/src/comp/syntax/ast.rs b/src/comp/syntax/ast.rs
index ff8e6c0893c..5b0787a5fc4 100644
--- a/src/comp/syntax/ast.rs
+++ b/src/comp/syntax/ast.rs
@@ -511,10 +511,13 @@ type ty_constr = spanned[ty_constr_];
  corresponding to these. */
 type arg = {mode: mode, ty: @ty, ident: ident, id: node_id};
 
+tag inlineness { il_normal; il_inline; }
+
 type fn_decl =
     {inputs: arg[],
      output: @ty,
      purity: purity,
+     il: inlineness,
      cf: controlflow,
      constraints: (@constr)[]};
 
diff --git a/src/comp/syntax/fold.rs b/src/comp/syntax/fold.rs
index e2bb0380c04..af0673da358 100644
--- a/src/comp/syntax/fold.rs
+++ b/src/comp/syntax/fold.rs
@@ -191,6 +191,7 @@ fn noop_fold_native_item(ni: &@native_item, fld: ast_fold) -> @native_item {
                                  {inputs: ivec::map(fold_arg, fdec.inputs),
                                   output: fld.fold_ty(fdec.output),
                                   purity: fdec.purity,
+                                  il: fdec.il,
                                   cf: fdec.cf,
                                   constraints:
                                       ivec::map(fld.fold_constr,
@@ -449,6 +450,7 @@ fn noop_fold_fn(f: &_fn, fld: ast_fold) -> _fn {
              {inputs: ivec::map(fold_arg, f.decl.inputs),
               output: fld.fold_ty(f.decl.output),
               purity: f.decl.purity,
+              il: f.decl.il,
               cf: f.decl.cf,
               constraints: ivec::map(fld.fold_constr, f.decl.constraints)},
          proto: f.proto,
diff --git a/src/comp/syntax/parse/parser.rs b/src/comp/syntax/parse/parser.rs
index 9e7f693c74b..125c6f04852 100644
--- a/src/comp/syntax/parse/parser.rs
+++ b/src/comp/syntax/parse/parser.rs
@@ -1730,6 +1730,7 @@ fn parse_fn_decl(p: &parser, purity: ast::purity) -> ast::fn_decl {
         ret {inputs: inputs.node,
              output: t,
              purity: purity,
+             il: ast::il_normal,
              cf: ast::return,
              constraints: constrs};
       }
@@ -1737,6 +1738,7 @@ fn parse_fn_decl(p: &parser, purity: ast::purity) -> ast::fn_decl {
         ret {inputs: inputs.node,
              output: @spanned(p.get_lo_pos(), p.get_hi_pos(), ast::ty_bot),
              purity: purity,
+             il: ast::il_normal,
              cf: ast::noreturn,
              constraints: constrs};
       }
@@ -1839,6 +1841,7 @@ fn parse_item_res(p: &parser, attrs: &ast::attribute[]) ->
                 id: p.get_id()}],
          output: @spanned(lo, lo, ast::ty_nil),
          purity: ast::impure_fn,
+         il: ast::il_normal,
          cf: ast::return,
          constraints: ~[]};
     let f = {decl: decl, proto: ast::proto_fn, body: dtor};