diff options
| author | Graydon Hoare <[email protected]> | 2010-09-20 23:56:43 -0700 |
|---|---|---|
| committer | Graydon Hoare <[email protected]> | 2010-09-20 23:56:43 -0700 |
| commit | c5f4789d5b75d3098665b17d318144cb7c54f42a (patch) | |
| tree | 2d0ef3ef0e85aa7f2453d8bae762c89552a99ed9 /src/boot/me/layout.ml | |
| parent | Wrap long lines. (diff) | |
| download | rust-c5f4789d5b75d3098665b17d318144cb7c54f42a.tar.xz rust-c5f4789d5b75d3098665b17d318144cb7c54f42a.zip | |
Bind pattern slots with ?, drop parens from 0-ary tag constructors, translate 0-ary constructors as constants. Rustc loses ~300kb.
Diffstat (limited to 'src/boot/me/layout.ml')
| -rw-r--r-- | src/boot/me/layout.ml | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/boot/me/layout.ml b/src/boot/me/layout.ml index 65d44d5a..0b994145 100644 --- a/src/boot/me/layout.ml +++ b/src/boot/me/layout.ml @@ -296,7 +296,7 @@ let layout_visitor layout_header i.id (header_slot_ids f.Ast.fn_input_slots) - | Ast.MOD_ITEM_tag (hdr, _, _) -> + | Ast.MOD_ITEM_tag (hdr, _, _) when Array.length hdr <> 0 -> enter_frame i.id; layout_header i.id (header_slot_ids hdr) @@ -319,8 +319,9 @@ let layout_visitor begin match i.node.Ast.decl_item with Ast.MOD_ITEM_fn _ - | Ast.MOD_ITEM_tag _ | Ast.MOD_ITEM_obj _ -> leave_frame () + | Ast.MOD_ITEM_tag (hdr, _, _) when Array.length hdr <> 0 -> + leave_frame() | _ -> () end in |