diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2017-05-17 15:27:04 +0200 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2017-05-17 15:27:04 +0200 |
commit | 61a0eba14ff311dff49457ed3cef955a97abc905 (patch) | |
tree | 7635ce2f48e76ab1c64f8900344cd05efb2727a1 /lib | |
parent | 503f7806765f0cc6f072f578e272d12d3f9cce56 (diff) | |
parent | 672c24e4b8fcfc07cdba6a36a2fc0445cdc3d9e9 (diff) | |
download | Nim-61a0eba14ff311dff49457ed3cef955a97abc905.tar.gz |
Merge branch 'zahary' into araq2
Diffstat (limited to 'lib')
-rw-r--r-- | lib/core/macros.nim | 2 | ||||
-rw-r--r-- | lib/system.nim | 17 |
2 files changed, 17 insertions, 2 deletions
diff --git a/lib/core/macros.nim b/lib/core/macros.nim index 83776f16b..5e0d4030d 100644 --- a/lib/core/macros.nim +++ b/lib/core/macros.nim @@ -68,6 +68,8 @@ type nnkProcTy, nnkIteratorTy, # iterator type nnkSharedTy, # 'shared T' + nnkInTy, + nnkOutTy, nnkEnumTy, nnkEnumFieldDef, nnkArglist, nnkPattern diff --git a/lib/system.nim b/lib/system.nim index 9b41253cc..05b4b88f2 100644 --- a/lib/system.nim +++ b/lib/system.nim @@ -49,6 +49,9 @@ type cstring* {.magic: Cstring.} ## built-in cstring (*compatible string*) type pointer* {.magic: Pointer.} ## built-in pointer type, use the ``addr`` ## operator to get a pointer to a variable + + typedesc* {.magic: TypeDesc.} ## meta type to denote a type description + const on* = true ## alias for ``true`` off* = false ## alias for ``false`` @@ -56,6 +59,15 @@ const {.push warning[GcMem]: off, warning[Uninit]: off.} {.push hints: off.} +proc `or` *(a, b: typedesc): typedesc {.magic: "TypeTrait", noSideEffect.} + ## Constructs an `or` meta class + +proc `and` *(a, b: typedesc): typedesc {.magic: "TypeTrait", noSideEffect.} + ## Constructs an `and` meta class + +proc `not` *(a: typedesc): typedesc {.magic: "TypeTrait", noSideEffect.} + ## Constructs an `not` meta class + type Ordinal* {.magic: Ordinal.}[T] ## Generic ordinal type. Includes integer, ## bool, character, and enumeration types @@ -66,11 +78,11 @@ type `ref`* {.magic: Pointer.}[T] ## built-in generic traced pointer type `nil` {.magic: "Nil".} + expr* {.magic: Expr, deprecated.} ## meta type to denote an expression (for templates) - ## **Deprecated** since version 0.15. Use ``untyped`` instead. + ## **Deprecated** since version 0.15. Use ``untyped`` instead. stmt* {.magic: Stmt, deprecated.} ## meta type to denote a statement (for templates) ## **Deprecated** since version 0.15. Use ``typed`` instead. - typedesc* {.magic: TypeDesc.} ## meta type to denote a type description void* {.magic: "VoidType".} ## meta type to denote the absence of any type auto* {.magic: Expr.} ## meta type for automatic type determination any* = distinct auto ## meta type for any supported type @@ -1332,6 +1344,7 @@ const hasThreadSupport = compileOption("threads") and not defined(nimscript) hasSharedHeap = defined(boehmgc) or defined(gogc) # don't share heaps; every thread has its own taintMode = compileOption("taintmode") + nimEnableCovariance* = defined(nimEnableCovariance) # or true when hasThreadSupport and defined(tcc) and not compileOption("tlsEmulation"): # tcc doesn't support TLS |