'parallel' now requires --experimental mode

This commit is contained in:
Araq 2015-08-10 02:50:15 +02:00
commit 2f721f0d99
4 changed files with 6 additions and 1 deletions

View file

@ -1720,6 +1720,8 @@ proc semMagic(c: PContext, n: PNode, s: PSym, flags: TExprFlags): PNode =
result = newStrNodeT(renderTree(n[1], {renderNoComments}), n) result = newStrNodeT(renderTree(n[1], {renderNoComments}), n)
result.typ = getSysType(tyString) result.typ = getSysType(tyString)
of mParallel: of mParallel:
if not experimentalMode(c):
localError(n.info, "use the {.experimental.} pragma to enable 'parallel'")
result = setMs(n, s) result = setMs(n, s)
var x = n.lastSon var x = n.lastSon
if x.kind == nkDo: x = x.sons[bodyPos] if x.kind == nkDo: x = x.sons[bodyPos]

View file

@ -1 +1,2 @@
threads:on threads:on
--experimental

View file

@ -13,7 +13,6 @@ version 0.11.4
- make '--implicitStatic:on' the default; then we can also clean up the - make '--implicitStatic:on' the default; then we can also clean up the
'static[T]' mess in the compiler! 'static[T]' mess in the compiler!
- Mark the 'parallel' statement as experimental.
- add "all threads are blocked" detection to 'spawn' - add "all threads are blocked" detection to 'spawn'
- Deprecate ``immediate`` for templates and macros - Deprecate ``immediate`` for templates and macros
- make 'nil' work for 'add': - make 'nil' work for 'add':

View file

@ -44,6 +44,9 @@ News
been removed. been removed.
- ``macros.high`` never worked and the manual says ``high`` cannot be - ``macros.high`` never worked and the manual says ``high`` cannot be
overloaded, so we removed it with no deprecation cycle. overloaded, so we removed it with no deprecation cycle.
- To use the ``parallel`` statement you now have to
use the ``--experimental`` mode.
Library additions Library additions