summary refs log tree commit diff stats
path: root/tests/async
Commit message (Expand)AuthorAgeFilesLines
* fix #12919 tasyncclosestall flaky: Address already in use (#12934)Timothee Cour2019-12-191-1/+3
* increase the timeout for 'tasyncclosestall' (#12744)Miran2019-11-261-1/+1
* remove deprecated procs (#12535)Andreas Rumpf2019-11-051-2/+2
* proof that refcounting can handle Nim's async (#12533)Andreas Rumpf2019-10-281-0/+73
* Merge branch 'devel' into IOSelector_unregister_fixDominik Picheta2019-10-221-0/+10
|\
| * Fixed yield in nkCheckedFieldExpr (#12429) [backport]Yuriy Glukhov2019-10-151-0/+10
* | lowered the number of events in the test because some CI's have an extremely ...Ray Imber2019-10-071-2/+2
* | Test + fix for epoll and kqueue selector modules to properly unregisterRay Imber2019-10-061-0/+23
|/
* azure: disable failing testsLeorize2019-10-031-0/+1
* Fix spellings (#12277) [backport]Federico Ceratto2019-09-271-1/+1
* Fix issue with long wait for passed timer [bugfix] (#12221)PMunch2019-09-221-0/+52
* asyndispatch: removed deprecated setEvent procAraq2019-09-212-7/+7
* int128 on firstOrd, lastOrd and lengthOrd (#11701)Arne Döring2019-08-071-2/+7
* make async tests green againAndreas Rumpf2019-07-111-5/+5
* make tests green againAraq2019-07-101-5/+5
* ABI fixes for OSX/BSD; fixes #6860 (#11666)Andreas Rumpf2019-07-062-2/+2
* [bugfix] Fixes async IO operations stalling even after socket is closed. (#11...Dominik Picheta2019-06-121-0/+99
* better docs: osproc (#10708)Miran2019-02-191-1/+1
* Provide access to getsockname()/getpeername()Federico Ceratto2019-02-171-0/+4
* Remove deprecated modules (asyncio, sockets, ftpclient) (#10401)Miran2019-01-221-6/+8
* Remove long deprecated stuff (#10332)Miran2019-01-181-1/+1
* Fix defer not not-working at top level (#10191)Neelesh Chandola2019-01-071-2/+1
* C++: make async tests green on WindowsAraq2018-12-211-0/+1
* lots of small changesArne Döring2018-12-113-3/+3
* megatest can be executedArne Döring2018-12-111-2/+1
* require errormsg to be specified before file.Arne Döring2018-12-1119-39/+13
* updated tests to be executedArne Döring2018-11-232-1/+6
* make run the default action of a test in testerArne Döring2018-11-232-3/+5
* Disable tasyncssl on Windows to fix CIDominik Picheta2018-11-131-0/+1
* Merge pull request #9687 from narimiran/fix-7192Dominik Picheta2018-11-131-0/+14
|\
| * export `asyncdispatch.callSoon` (fixes #7192)narimiran2018-11-121-0/+14
* | complete future only once in `or` (fixes #8982) (#9632)Miran2018-11-091-0/+33
|/
* keep the order of the callbacksnarimiran2018-11-071-2/+3
* make some tests faster (#9413)Miran2018-10-171-1/+1
* Fix tests on NixOS (#9209) (#9285)xzfc2018-10-102-3/+3
* Fixes #8994. FutureStream read procedure data loss no longer occurs. (#9183)Dominik Picheta2018-10-091-0/+20
* asyncmacro: add nnkSym support for getName() (#9204)alaviss2018-10-091-0/+14
* Fix regression w/ templates defined in async procLemonBoy2018-10-031-0/+11
* remove test_async.txt after test to keep git status cleanTimothee Cour2018-09-291-0/+1
* Skip nested procedures in .async. macroLemonBoy2018-09-221-0/+29
* Convert *_family fields to cushortLemonBoy2018-09-193-9/+3
* make async test more reliableAraq2018-09-151-3/+5
* Process timers before and after `select`. Fixes flaky #7758 test. (#8750)Dominik Picheta2018-08-251-5/+6
* disables flaky test; fixes #8756Andreas Rumpf2018-08-241-0/+1
* Adds test case for #6846. (#8729)Dominik Picheta2018-08-231-0/+16
* Don't skip poll() when no handles are present. (#8727)Dominik Picheta2018-08-231-0/+17
* make more tests green; system.repr does not produce 'nil' for strings and seq...Araq2018-08-221-1/+1
* WIP: disallow 'nil' for strings and seqsAndreas Rumpf2018-08-132-4/+3
* disable tioselectors test for OSXAndreas Rumpf2018-08-061-1/+3
* Fixed #8399 (#8401)Yuriy Glukhov2018-07-223-34/+47
pan class="p">(n.sons[0].kind == nkSym) result = isPartOfAux(n.sons[0], b, marker) if result == arYes: return for i in countup(1, sonsLen(n) - 1): case n.sons[i].kind of nkOfBranch, nkElse: result = isPartOfAux(lastSon(n.sons[i]), b, marker) if result == arYes: return else: internalError("isPartOfAux(record case branch)") of nkSym: result = isPartOfAux(n.sym.typ, b, marker) else: internalError(n.info, "isPartOfAux()") proc isPartOfAux(a, b: PType, marker: var TIntSet): TAnalysisResult = result = arNo if a == nil or b == nil: return if ContainsOrIncl(marker, a.id): return if compareTypes(a, b, dcEqIgnoreDistinct): return arYes case a.kind of tyObject: result = isPartOfAux(a.sons[0], b, marker) if result == arNo: result = isPartOfAux(a.n, b, marker) of tyGenericInst, tyDistinct: result = isPartOfAux(lastSon(a), b, marker) of tyArray, tyArrayConstr, tySet, tyTuple: for i in countup(0, sonsLen(a) - 1): result = isPartOfAux(a.sons[i], b, marker) if result == arYes: return else: nil proc isPartOf(a, b: PType): TAnalysisResult = ## checks iff 'a' can be part of 'b'. Iterates over VALUE types! var marker = InitIntSet() # watch out: parameters reversed because I'm too lazy to change the code... result = isPartOfAux(b, a, marker) proc isPartOf*(a, b: PNode): TAnalysisResult = ## checks if location `a` can be part of location `b`. We treat seqs and ## strings as pointers because the code gen often just passes them as such. ## ## Note: `a` can only be part of `b`, if `a`'s type can be part of `b`'s ## type. Since however type analysis is more expensive, we perform it only ## if necessary. ## ## cases: ## ## YES-cases: ## x <| x # for general trees ## x[] <| x ## x[i] <| x ## x.f <| x ## ## NO-cases: ## x !<| y # depending on type and symbol kind ## x[constA] !<| x[constB] ## x.f !<| x.g ## x.f !<| y.f iff x !<= y ## ## MAYBE-cases: ## ## x[] ?<| y[] iff compatible type ## ## ## x[] ?<| y depending on type ## if a.kind == b.kind: case a.kind of nkSym: const varKinds = {skVar, skTemp, skProc} # same symbol: aliasing: if a.sym.id == b.sym.id: result = arYes elif a.sym.kind in varKinds or b.sym.kind in varKinds: # actually, a param could alias a var but we know that cannot happen # here. XXX make this more generic result = arNo else: # use expensive type check: if isPartOf(a.sym.typ, b.sym.typ) != arNo: result = arMaybe of nkBracketExpr: result = isPartOf(a[0], b[0]) if len(a) >= 2 and len(b) >= 2: # array accesses: if result == arYes and isDeepConstExpr(a[1]) and isDeepConstExpr(b[1]): # we know it's the same array and we have 2 constant indexes; # if they are var x = if a[1].kind == nkHiddenStdConv: a[1][1] else: a[1] var y = if b[1].kind == nkHiddenStdConv: b[1][1] else: b[1] if SameValue(x, y): result = arYes else: result = arNo # else: maybe and no are accurate else: # pointer derefs: if result != arYes: if isPartOf(a.typ, b.typ) != arNo: result = arMaybe of nkDotExpr: result = isPartOf(a[0], b[0]) if result != arNo: # if the fields are different, it's not the same location if a[1].sym.id != b[1].sym.id: result = arNo of nkHiddenDeref, nkDerefExpr: result = isPartOf(a[0], b[0]) # weaken because of indirection: if result != arYes: if isPartOf(a.typ, b.typ) != arNo: result = arMaybe of nkHiddenStdConv, nkHiddenSubConv, nkConv: result = isPartOf(a[1], b[1]) of nkObjUpConv, nkObjDownConv, nkCheckedFieldExpr: result = isPartOf(a[0], b[0]) else: nil # Calls return a new location, so a default of ``arNo`` is fine. else: # go down recursively; this is quite demanding: const Ix0Kinds = {nkDotExpr, nkBracketExpr, nkObjUpConv, nkObjDownConv, nkCheckedFieldExpr} Ix1Kinds = {nkHiddenStdConv, nkHiddenSubConv, nkConv} DerefKinds = {nkHiddenDeref, nkDerefExpr} case b.kind of Ix0Kinds: # a* !<| b.f iff a* !<| b result = isPartOf(a, b[0]) of DerefKinds: # a* !<| b[] iff if isPartOf(a.typ, b.typ) != arNo: result = isPartOf(a, b[0]) if result == arNo: result = arMaybe of Ix1Kinds: # a* !<| T(b) iff a* !<| b result = isPartOf(a, b[1]) of nkSym: # b is an atom, so we have to check a: case a.kind of Ix0Kinds: # a.f !<| b* iff a.f !<| b* result = isPartOf(a[0], b) of Ix1Kinds: result = isPartOf(a[1], b) of DerefKinds: if isPartOf(a.typ, b.typ) != arNo: result = isPartOf(a[0], b) if result == arNo: result = arMaybe else: nil else: nil