Iain Buclaw avatar Iain Buclaw committed 5992dd0

more merges.

Comments (0)

Files changed (8)

 #include "attrib.h"
 #include "enum.h"
 #include "module.h"
+#include "id.h"
 
 #include "symbol.h"
 #include "d-lang.h"
            one-only.
         */
         D_DECL_ONE_ONLY(csym->Stree) = 1;
-        g.ofile->makeDeclOneOnly(csym->Stree, this);
+        g.ofile->makeDeclOneOnly(csym->Stree);
     }
     return csym;
 }
                 DECL_UNINLINABLE(fn_decl) = 1;
             }
 #if D_GCC_VER >= 44
-            else if (isMember())
+            else if (isMember() || isFuncLiteralDeclaration())
             {
                 // See grokmethod in cp/decl.c
                 DECL_DECLARED_INLINE_P(fn_decl) = 1;
         //needed on some targets to avoid "causes a section type conflict"
         D_DECL_ONE_ONLY(thunk_decl) = D_DECL_ONE_ONLY(target_func_decl);
         if (D_DECL_ONE_ONLY(thunk_decl))
-            g.ofile->makeDeclOneOnly(thunk_decl, this);
+            g.ofile->makeDeclOneOnly(thunk_decl);
 
         TREE_ADDRESSABLE(thunk_decl) = 1;
         TREE_USED (thunk_decl) = 1;
     tree lhs_assign = irs->toElemLvalue(e1b);
     lhs_assign = stabilize_reference(lhs_assign);
 
-
     tree lhs_var = irs->exprVar(type->toCtype());
     DECL_INITIAL(lhs_var) = lhs_assign;
 
 Label *
 IRBase::getLabelBlock(LabelDsymbol * label, Statement * from)
 {
-    Label * l = new Label;
-    l->block = NULL;
-    l->from = NULL;
-    l->kind = level_block;
-    l->level = 0;
+    Label * l = new Label();
 
     for (int i = loops.dim - 1; i >= 0; i--)
     {
 Flow *
 IRBase::beginFlow(Statement * stmt)
 {
-    Flow * flow = new Flow;
-
-    flow->statement = stmt;
-    flow->kind = level_block;
-    flow->exitLabel = NULL_TREE;
-    flow->condition = NULL_TREE;
-    flow->trueBranch = NULL_TREE;
-
+    Flow * flow = new Flow(stmt);
     loops.push(flow);
-
     pushStatementList();
-
     return flow;
 }
 
     Statement * from;
     LevelKind kind;
     unsigned level;
+
+    Label() : label(NULL), block(NULL), from(NULL),
+              kind(level_block), level(0) { }
 };
 
 struct Flow
             tree catchType;
         };
     };
+
+    Flow(Statement * stmt) :
+            statement(stmt), kind(level_block), exitLabel(NULL_TREE),
+            continueLabel(NULL_TREE), hasVars(NULL_TREE) { }
 };
 
 
       case OPT_iprefix:
           iprefix = xstrdup(arg);
           break;
-      case OPT_fmultilib_dir_:
+      case OPT_imultilib:
           multilib_dir = xstrdup(arg);
           break;
       case OPT_nostdinc:
           break;
       case OPT_fasm:
           gen.useInlineAsm = value;
+          break;
       case OPT_fbuiltin:
           gen.useBuiltins = value;
           break;
-      case OPT_fsigned_char:
-      case OPT_funsigned_char:
-          // ignored
-          break;
       case OPT_Wall:
           global.params.warnings = 2;
           gen.warnSignCompare = value;
         gen.emitTemplates = (supports_one_only()) ? TEall : TEprivate;
     }
     global.params.symdebug = write_symbols != NO_DEBUG;
-    global.params.useInline = flag_inline_functions;
+    //global.params.useInline = flag_inline_functions;
     global.params.obj = ! flag_syntax_only;
     global.params.pic = flag_pic != 0; // Has no effect yet.
     gen.originalOmitFramePointer = flag_omit_frame_pointer;
 /* For 4.5.x, return the COMDAT group into which DECL should be placed. */
 
 static tree
-d_comdat_group(tree decl, Dsymbol * dsym)
+d_comdat_group(tree decl)
 {
     // %% May need special case here.
     return DECL_ASSEMBLER_NAME(decl);
 
 
 void
-ObjectFile::makeDeclOneOnly(tree decl_tree, Dsymbol * dsym)
+ObjectFile::makeDeclOneOnly(tree decl_tree)
 {
     if (! D_DECL_IS_TEMPLATE(decl_tree) || gen.emitTemplates != TEprivate)
     {   /* Weak definitions have to be public.  Nested functions may or
         if (SUPPORTS_ONE_ONLY)
         {
 #if D_GCC_VER >= 45
-            make_decl_one_only(decl_tree, d_comdat_group(decl_tree, dsym));
+            make_decl_one_only(decl_tree, d_comdat_group(decl_tree));
 #else
             make_decl_one_only(decl_tree);
 #endif
             tree decl_init = DECL_INITIAL(decl_tree);
             DECL_INITIAL(decl_tree) = integer_zero_node;
 #if D_GCC_VER >= 45
-            make_decl_one_only(decl_tree, d_comdat_group(decl_tree, dsym));
+            make_decl_one_only(decl_tree, d_comdat_group(decl_tree));
 #else
             make_decl_one_only(decl_tree);
 #endif
             TREE_PUBLIC(decl_tree) = 1;
 
         if (D_DECL_ONE_ONLY(decl_tree))
-            makeDeclOneOnly(decl_tree, dsym);
+            makeDeclOneOnly(decl_tree);
 
     }
     else
     // Definitely in static data, but not neccessarily this module.
     // Assumed to be public data.
     static void setupStaticStorage(Dsymbol * dsym, tree decl_tree);
-    static void makeDeclOneOnly(tree decl_tree, Dsymbol * dsym);
+    static void makeDeclOneOnly(tree decl_tree);
 
     static void outputStaticSymbol(Symbol * s);
     static void outputFunction(FuncDeclaration * f);
 D Joined RejectNegative
 -fdoc-inc=<filename> Include a Ddoc macro file
 
-fmultilib-dir=
-D Joined RejectNegative
--fmultilib-dir=<dir> Select header multilib subdirectory
-
 Wsign-compare
 D
 Warn about signed-unsigned comparisons
 D
 Recognize built-in functions
 
-funsigned-char
-D
-Make \"char\" unsigned by default (silently ignored in D)
-
-fsigned-char
-D
-Make \"char\" signed by default (silently ignored in D)
-
 imultilib
 D Joined Separate
 -imultilib <dir> Set <dir> to be the multilib include subdirectory
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.