summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--.travis.yml4
-rw-r--r--compiler/ast.nim1
-rw-r--r--compiler/ccgexprs.nim5
-rw-r--r--compiler/ccgstmts.nim2
-rw-r--r--compiler/semfold.nim2
-rw-r--r--compiler/transf.nim10
-rw-r--r--tests/testament/categories.nim12
-rw-r--r--tests/testament/tester.nim6
8 files changed, 17 insertions, 25 deletions
diff --git a/.travis.yml b/.travis.yml
index f8655f940..9cd0b13c4 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -10,14 +10,12 @@ addons:
     - libgc-dev
 before_script:
   - set -e
-  - wget http://flatassembler.net/fasm-1.71.39.tgz
-  - tar xvf fasm-1.71.39.tgz
   - git clone --depth 1 https://github.com/nim-lang/csources.git
   - cd csources
   - sh build.sh
   - cd ..
   - sed -i -e 's,cc = gcc,cc = clang,' config/nim.cfg
-  - export PATH=$(pwd)/bin:$(pwd)/fasm:$PATH
+  - export PATH=$(pwd)/bin:$PATH
 script:
   - nim c koch
   - ./koch boot
diff --git a/compiler/ast.nim b/compiler/ast.nim
index 8a3c76435..306fcdedc 100644
--- a/compiler/ast.nim
+++ b/compiler/ast.nim
@@ -271,7 +271,6 @@ type
   TSymFlags* = set[TSymFlag]
 
 const
-  sfFakeConst* = sfDeadCodeElim  # const cannot be put into a data section
   sfDispatcher* = sfDeadCodeElim # copied method symbol is the dispatcher
   sfNoInit* = sfMainModule       # don't generate code to init the variable
 
diff --git a/compiler/ccgexprs.nim b/compiler/ccgexprs.nim
index 3f12fed2c..75a7cb3bb 100644
--- a/compiler/ccgexprs.nim
+++ b/compiler/ccgexprs.nim
@@ -2003,10 +2003,7 @@ proc expr(p: BProc, n: PNode, d: var TLoc) =
         internalError(n.info, "expr: proc not init " & sym.name.s)
       putLocIntoDest(p, d, sym.loc)
     of skConst:
-      if sfFakeConst in sym.flags:
-        if sfGlobal in sym.flags: genVarPrototype(p.module, sym)
-        putLocIntoDest(p, d, sym.loc)
-      elif isSimpleConst(sym.typ):
+      if isSimpleConst(sym.typ):
         putIntoDest(p, d, n.typ, genLiteral(p, sym.ast, sym.typ), OnStatic)
       else:
         genComplexConst(p, sym, d)
diff --git a/compiler/ccgstmts.nim b/compiler/ccgstmts.nim
index 4836527a2..a5ce147c3 100644
--- a/compiler/ccgstmts.nim
+++ b/compiler/ccgstmts.nim
@@ -269,8 +269,6 @@ proc genConstStmt(p: BProc, t: PNode) =
     if it.kind != nkConstDef: internalError(t.info, "genConstStmt")
     var c = it.sons[0].sym
     if c.typ.containsCompileTimeOnly: continue
-    if sfFakeConst in c.flags:
-      genSingleVar(p, it)
     elif c.typ.kind in ConstantDataTypes and lfNoDecl notin c.loc.flags and
         c.ast.len != 0:
       if not emitLazily(c): requestConstImpl(p, c)
diff --git a/compiler/semfold.nim b/compiler/semfold.nim
index 7c734e33b..02f238ae6 100644
--- a/compiler/semfold.nim
+++ b/compiler/semfold.nim
@@ -648,7 +648,7 @@ proc getConstExpr(m: PSym, n: PNode): PNode =
         if isDefined(s.name):
           result = newStrNodeT(lookupSymbol(s.name), n)
       else:
-        if sfFakeConst notin s.flags: result = copyTree(s.ast)
+        result = copyTree(s.ast)
     of {skProc, skMethod}:
       result = n
     of skType:
diff --git a/compiler/transf.nim b/compiler/transf.nim
index 25988fb8c..d64276cfb 100644
--- a/compiler/transf.nim
+++ b/compiler/transf.nim
@@ -204,14 +204,8 @@ proc transformConstSection(c: PTransf, v: PNode): PTransNode =
       if it.kind != nkConstDef: internalError(it.info, "transformConstSection")
       if it.sons[0].kind != nkSym:
         internalError(it.info, "transformConstSection")
-      if sfFakeConst in it[0].sym.flags:
-        var b = newNodeI(nkConstDef, it.info)
-        addSon(b, it[0])
-        addSon(b, ast.emptyNode)            # no type description
-        addSon(b, transform(c, it[2]).PNode)
-        result[i] = PTransNode(b)
-      else:
-        result[i] = PTransNode(it)
+
+      result[i] = PTransNode(it)
 
 proc hasContinue(n: PNode): bool =
   case n.kind
diff --git a/tests/testament/categories.nim b/tests/testament/categories.nim
index 125643d5a..e534cc161 100644
--- a/tests/testament/categories.nim
+++ b/tests/testament/categories.nim
@@ -260,12 +260,14 @@ proc compileExample(r: var TResults, pattern, options: string, cat: Category) =
     testNoSpec r, makeTest(test, options, cat)
 
 proc testStdlib(r: var TResults, pattern, options: string, cat: Category) =
+  var disabledSet = disabledFiles.toSet()
   for test in os.walkFiles(pattern):
-    let contents = readFile(test).string
-    if contents.contains("when isMainModule"):
-      testSpec r, makeTest(test, options, cat, actionRunNoSpec)
-    else:
-      testNoSpec r, makeTest(test, options, cat, actionCompile)
+    if test notin disabledSet:
+      let contents = readFile(test).string
+      if contents.contains("when isMainModule"):
+        testSpec r, makeTest(test, options, cat, actionRunNoSpec)
+      else:
+        testNoSpec r, makeTest(test, options, cat, actionCompile)
 
 # ----------------------------- nimble ----------------------------------------
 type PackageFilter = enum
diff --git a/tests/testament/tester.nim b/tests/testament/tester.nim
index 9a253d0ff..6981f3c0c 100644
--- a/tests/testament/tester.nim
+++ b/tests/testament/tester.nim
@@ -12,7 +12,7 @@
 import
   parseutils, strutils, pegs, os, osproc, streams, parsecfg, json,
   marshal, backend, parseopt, specs, htmlgen, browsers, terminal,
-  algorithm, compiler/nodejs, re, times
+  algorithm, compiler/nodejs, re, times, sets
 
 const
   resultsFile = "testresults.html"
@@ -388,6 +388,10 @@ proc makeTest(test, options: string, cat: Category, action = actionCompile,
   result = TTest(cat: cat, name: test, options: options,
                  target: target, action: action, startTime: epochTime())
 
+const
+  # array of modules disabled from compilation test of stdlib.
+  disabledFiles = ["lib/pure/coro.nim"]
+
 include categories
 
 # proc runCaasTests(r: var TResults) =