Home
last modified time | relevance | path

Searched refs:coro (Results 1 - 25 of 57) sorted by relevance

123

/third_party/python/Lib/asyncio/
H A Dcoroutines.py50 def _format_coroutine(coro):
51 assert iscoroutine(coro)
53 def get_name(coro):
58 if hasattr(coro, '__qualname__') and coro.__qualname__:
59 coro_name = coro.__qualname__
60 elif hasattr(coro, '__name__') and coro.__name__:
61 coro_name = coro.__name__
64 coro_name = f'<{type(coro)
[all...]
H A D__main__.py34 coro = func()
45 if not inspect.iscoroutine(coro):
46 future.set_result(coro)
50 repl_future = self.loop.create_task(coro)
H A Dtasks.py96 def __init__(self, coro, *, loop=None, name=None, context=None):
100 if not coroutines.iscoroutine(coro):
104 raise TypeError(f"a coroutine was expected, got {coro!r}")
114 self._coro = coro
258 coro = self._coro
262 # Call either coro.throw(exc) or coro.send(None).
267 result = coro.send(None)
269 result = coro.throw(exc)
272 # Task is cancelled right before coro stop
[all...]
H A Drunners.py86 def run(self, coro, *, context=None):
88 if not coroutines.iscoroutine(coro):
89 raise ValueError("a coroutine was expected, got {!r}".format(coro))
100 task = self._loop.create_task(coro, context=context)
H A Dtaskgroups.py151 def create_task(self, coro, *, name=None, context=None):
163 task = self._loop.create_task(coro)
165 task = self._loop.create_task(coro, context=context)
/third_party/skia/third_party/externals/swiftshader/third_party/llvm-10.0/llvm/lib/Transforms/Coroutines/
H A DCoroInternal.h29 // CoroEarly pass marks every function that has coro.begin with a string
33 // call to an empty function "coro.devirt.trigger" which is devirtualized by
42 #define CORO_DEVIRT_TRIGGER_FN "coro.devirt.trigger"
44 namespace coro { namespace
107 coro::ABI ABI;
134 assert(ABI == coro::ABI::Switch); in getSwitchCoroId()
139 assert(ABI == coro::ABI::Retcon || in getRetconCoroId()
140 ABI == coro::ABI::RetconOnce); in getRetconCoroId()
145 assert(ABI == coro::ABI::Switch); in getIndexType()
154 assert(ABI == coro in getSwitchResumePointerType()
[all...]
H A DCoroSplit.cpp73 #define DEBUG_TYPE "coro-split"
97 coro::Shape &Shape;
109 CoroCloner(Function &OrigF, const Twine &Suffix, coro::Shape &Shape, in CoroCloner()
113 assert(Shape.ABI == coro::ABI::Switch); in CoroCloner()
117 CoroCloner(Function &OrigF, const Twine &Suffix, coro::Shape &Shape, in CoroCloner()
122 assert(Shape.ABI == coro::ABI::Retcon || in CoroCloner()
123 Shape.ABI == coro::ABI::RetconOnce); in CoroCloner()
162 const coro::Shape &Shape, Value *FramePtr, in maybeFreeRetconStorage()
164 assert(Shape.ABI == coro::ABI::Retcon || in maybeFreeRetconStorage()
165 Shape.ABI == coro in maybeFreeRetconStorage()
[all...]
H A DCoroutines.cpp95 coro::LowererBase::LowererBase(Module &M) in LowererBase()
103 // llvm.coro.subfn.addr. It generates the following sequence:
105 // call i8* @llvm.coro.subfn.addr(i8* %Arg, i8 %index)
108 Value *coro::LowererBase::makeSubFnCall(Value *Arg, int Index, in makeSubFnCall()
127 "llvm.coro.alloc", in isCoroutineIntrinsicName()
128 "llvm.coro.begin", in isCoroutineIntrinsicName()
129 "llvm.coro.destroy", in isCoroutineIntrinsicName()
130 "llvm.coro.done", in isCoroutineIntrinsicName()
131 "llvm.coro.end", in isCoroutineIntrinsicName()
132 "llvm.coro in isCoroutineIntrinsicName()
[all...]
H A DCoroFrame.cpp36 // The "coro-suspend-crossing" flag is very noisy. There is another debug type,
37 // "coro-frame", which results in leaner debug spew.
38 #define DEBUG_TYPE "coro-suspend-crossing"
76 // End: a boolean indicating whether block 'i' contains a coro.end intrinsic.
102 SuspendCrossingInfo(Function &F, coro::Shape &Shape);
126 // As a special case, treat uses by an llvm.coro.suspend.retcon in isDefinitionAcrossSuspend()
131 assert(UseBB && "should have split coro.suspend into its own block"); in isDefinitionAcrossSuspend()
144 // As a special case, treat values produced by an llvm.coro.suspend.* in isDefinitionAcrossSuspend()
149 assert(DefBB && "should have split coro.suspend into its own block"); in isDefinitionAcrossSuspend()
178 SuspendCrossingInfo::SuspendCrossingInfo(Function &F, coro
[all...]
H A DCoroEarly.cpp22 #define DEBUG_TYPE "coro-early"
25 // Created on demand if the coro-early pass has work to do.
26 class Lowerer : public coro::LowererBase {
46 // Replace a direct call to coro.resume or coro.destroy with an indirect call to
47 // an address returned by coro.subfn.addr intrinsic. This is done so that
49 // to coro.subfn.addr with an appropriate function address.
59 // the coroutine frame. i8* coro.promise(i8*, i1 from) intrinsic adds an offset
88 // The llvm.coro.done intrinsic is used to check whether a coroutine is
94 static_assert(coro in lowerCoroDone()
[all...]
H A DCoroCleanup.cpp20 #define DEBUG_TYPE "coro-cleanup"
24 struct Lowerer : coro::LowererBase {
114 if (coro::declaresIntrinsics(M, {"llvm.coro.alloc", "llvm.coro.begin",
115 "llvm.coro.subfn.addr", "llvm.coro.free",
116 "llvm.coro.id", "llvm.coro.id.retcon",
117 "llvm.coro
[all...]
H A DCoroElide.cpp9 // replaces calls to llvm.coro.resume and llvm.coro.destroy with direct calls
24 #define DEBUG_TYPE "coro-elide"
27 // Created on demand if the coro-elide pass has work to do.
28 struct Lowerer : coro::LowererBase {
44 // Go through the list of coro.subfn.addr intrinsics and replace them with the
52 // being replaced. Note: All coro.subfn.addr intrinsics return the same type, in replaceWithConstant()
108 // llvm.coro.alloc and llvm.coro.free instructions.
114 // Replacing llvm.coro in elideHeapAllocations()
[all...]
/third_party/python/Lib/test/
H A Dtest_coroutines.py38 def run_async(coro):
39 assert coro.__class__ in {types.GeneratorType, types.CoroutineType}
45 buffer.append(coro.send(None))
52 def run_async__await__(coro):
53 assert coro.__class__ is types.CoroutineType
54 aw = coro.__await__()
558 coro = foo()
559 self.assertRegex(repr(coro), '^<coroutine object.* at 0x.*>$')
560 coro.close()
565 coro
750 async def coro(): global() function
1085 async def coro(): global() function
[all...]
/third_party/python/Lib/test/test_asyncio/
H A Dtest_base_events.py725 async def coro(): function
728 factory = lambda loop, coro: MyTask(coro, loop=loop)
734 task = self.loop.create_task(coro())
741 task = self.loop.create_task(coro())
784 def create_task(self, coro):
785 return MyTask(coro, loop=loop)
790 coro = test()
791 task = asyncio.ensure_future(coro, loop=loop)
796 coro
[all...]
H A Dtest_tasks.py42 return ('coro=<%s() %s at %s> created at %s:%s'
45 return 'coro=<%s() %s at %s>' % (qualname, state, src)
92 def new_task(self, loop, coro, name='TestTask', context=None):
93 return self.__class__.Task(coro, loop=loop, name=name, context=context)
110 async def coro(): function
112 t = self.new_task(self.loop, coro())
125 async def coro(): function
127 t = self.new_task(self.loop, coro())
267 def __init__(self, coro):
268 self.coro
272 async def coro(): global() function
701 async def coro(): global() function
735 async def coro(): global() function
761 async def coro(): global() function
787 async def coro(): global() function
962 async def coro(): global() function
996 async def coro(): global() function
1023 async def coro(): global() function
1078 async def coro(): global() function
1117 async def coro(s): global() function
1511 async def coro(s): global() function
1528 async def coro(): global() function
1541 async def coro(): global() function
1632 async def coro(): global() function
1760 async def coro(): global() function
1772 async def coro(loop): global() function
1961 async def coro(): global() function
1970 async def coro(): global() function
1982 async def coro(): global() function
2065 async def coro(): global() function
2183 async def coro(): global() function
2215 async def coro(): global() function
2244 async def coro(): global() function
2257 async def coro(): global() function
2351 async def coro(val): global() function
2379 async def coro(val): global() function
2407 async def coro(val): global() function
2566 async def coro(): global() function
2577 async def coro(): global() function
2652 async def coro(): global() function
2817 async def coro(): global() function
3065 async def coro(fut=fut): global() function
3071 async def coro(): global() function
3076 async def coro(): global() function
3086 async def coro(): global() function
3098 async def coro(): global() function
3109 async def coro(s): global() function
3173 async def coro(s): global() function
3300 async def coro(): global() function
[all...]
H A Dtest_runners.py113 coro = main()
115 asyncio.run(coro)
117 coro.close() # Suppress ResourceWarning
216 def __init__(self, loop, coro, **kwargs):
217 self._task = asyncio.Task(coro, loop=loop, **kwargs)
396 async def coro(): function
405 runner.run(coro())
411 async def coro(fut): function
421 runner.run(coro(fut))
434 async def coro() function
446 async def coro(): global() function
461 async def coro(): global() function
[all...]
H A Dtest_locks.py955 async def coro(tag): function
967 tg.create_task(coro('c1'))
968 tg.create_task(coro('c2'))
969 tg.create_task(coro('c3'))
1054 def make_tasks(self, n, coro):
1055 tasks = [asyncio.create_task(coro()) for _ in range(n)]
1058 async def gather_tasks(self, n, coro):
1059 tasks = self.make_tasks(n, coro)
1136 async def coro(): function
1140 await self.gather_tasks(self.N, coro)
1201 async def coro(): global() function
1222 async def coro(): global() function
1245 async def coro(): global() function
1267 async def coro(): global() function
1293 async def coro(): global() function
1338 async def coro(): global() function
1366 async def coro(): global() function
1392 async def coro(): global() function
1470 async def coro(): global() function
1524 async def coro(): global() function
1557 async def coro(): global() function
1585 async def coro(): global() function
[all...]
H A Dtest_pep492.py159 async def coro(): function
164 data = self.loop.run_until_complete(coro())
189 coro = afunc()
190 t = self.loop.create_task(coro)
193 await coro
H A Dtest_unix_events.py294 coro = self.loop.create_unix_server(lambda: None, path)
295 srv = self.loop.run_until_complete(coro)
311 coro = self.loop.create_unix_connection(lambda: None, path)
315 self.loop.run_until_complete(coro)
319 coro = self.loop.create_unix_server(lambda: None, file.name)
322 self.loop.run_until_complete(coro)
325 coro = self.loop.create_unix_server(lambda: None, path='spam',
329 self.loop.run_until_complete(coro)
332 coro = self.loop.create_unix_server(lambda: None, path=None)
335 self.loop.run_until_complete(coro)
[all...]
H A Dtest_events.py789 coro = self.loop.connect_accepted_socket(
794 self.loop.run_until_complete(coro)
1278 coro = self.loop.create_datagram_endpoint(
1280 s_transport, server = self.loop.run_until_complete(coro)
1290 coro = self.loop.create_datagram_endpoint(
1293 transport, client = self.loop.run_until_complete(coro)
1738 coro = close_loop(self.loop)
1740 self.loop.run_until_complete(coro)
1749 coro = test()
1750 self.addCleanup(coro
[all...]
/third_party/python/Lib/
H A Dtypes.py281 coro = func(*args, **kwargs)
282 if (coro.__class__ is CoroutineType or
283 coro.__class__ is GeneratorType and coro.gi_code.co_flags & 0x100):
284 # 'coro' is a native coroutine object or an iterable coroutine
285 return coro
286 if (isinstance(coro, _collections_abc.Generator) and
287 not isinstance(coro, _collections_abc.Coroutine)):
288 # 'coro' is either a pure Python generator iterator, or it
291 return _GeneratorWrapper(coro)
[all...]
/third_party/mesa3d/src/gallium/auxiliary/gallivm/
H A Dlp_bld_coro.h78 static inline void lp_build_coro_add_presplit(LLVMValueRef coro) in lp_build_coro_add_presplit() argument
81 lp_add_function_attr(coro, -1, LP_FUNC_ATTR_PRESPLITCORO); in lp_build_coro_add_presplit()
83 LLVMAddTargetDependentFunctionAttr(coro, "coroutine.presplit", "0"); in lp_build_coro_add_presplit()
/third_party/mesa3d/src/gallium/drivers/llvmpipe/
H A Dlp_state_cs.c85 LLVMValueRef function, coro; in generate_compute() local
118 arg_types[12] = int32_type; /* coro only - num X loops */ in generate_compute()
119 arg_types[13] = int32_type; /* coro only - partials */ in generate_compute()
120 arg_types[14] = int32_type; /* coro block_x_size */ in generate_compute()
121 arg_types[15] = int32_type; /* coro block_y_size */ in generate_compute()
122 arg_types[16] = int32_type; /* coro block_z_size */ in generate_compute()
123 arg_types[17] = int32_type; /* coro idx */ in generate_compute()
134 coro = LLVMAddFunction(gallivm->module, func_name_coro, coro_func_type); in generate_compute()
135 LLVMSetFunctionCallConv(coro, LLVMCCallConv); in generate_compute()
136 lp_build_coro_add_presplit(coro); in generate_compute()
[all...]
/third_party/python/Objects/
H A Dgenobject.c940 PyObject *coro = make_gen(&PyCoro_Type, func); in _Py_MakeCoro() local
941 if (!coro) { in _Py_MakeCoro()
948 ((PyCoroObject *)coro)->cr_origin_or_finalizer = NULL; in _Py_MakeCoro()
952 ((PyCoroObject *)coro)->cr_origin_or_finalizer = cr_origin; in _Py_MakeCoro()
954 Py_DECREF(coro); in _Py_MakeCoro()
958 return coro; in _Py_MakeCoro()
1084 coro_repr(PyCoroObject *coro) in coro_repr() argument
1087 coro->cr_qualname, coro); in coro_repr()
1091 coro_await(PyCoroObject *coro) in coro_await() argument
1104 coro_get_cr_await(PyCoroObject *coro, void *Py_UNUSED(ignored)) coro_get_cr_await() argument
1113 cr_getsuspended(PyCoroObject *coro, void *Py_UNUSED(ignored)) cr_getsuspended() argument
1122 cr_getrunning(PyCoroObject *coro, void *Py_UNUSED(ignored)) cr_getrunning() argument
1131 cr_getframe(PyCoroObject *coro, void *Py_UNUSED(ignored)) cr_getframe() argument
1362 PyObject *coro = gen_new_with_qualname(&PyCoro_Type, f, name, qualname); PyCoro_New() local
[all...]
/third_party/python/Modules/
H A D_asynciomodule.c140 _is_coroutine(PyObject *coro) in _is_coroutine() argument
142 /* 'coro' is not a native coroutine, call asyncio.iscoroutine() in _is_coroutine()
148 PyObject *res = PyObject_CallOneArg(asyncio_iscoroutine_func, coro); in _is_coroutine()
164 if (PySet_Add(iscoroutine_typecache, (PyObject*) Py_TYPE(coro))) { in _is_coroutine()
174 is_coroutine(PyObject *coro) in is_coroutine() argument
176 if (PyCoro_CheckExact(coro)) { in is_coroutine()
180 /* Check if `type(coro)` is in the cache. in is_coroutine()
190 iscoroutine_typecache, (PyObject*) Py_TYPE(coro)); in is_coroutine()
192 /* type(coro) is not in iscoroutine_typecache */ in is_coroutine()
193 return _is_coroutine(coro); in is_coroutine()
2005 _asyncio_Task___init___impl(TaskObj *self, PyObject *coro, PyObject *loop, PyObject *name, PyObject *context) _asyncio_Task___init___impl() argument
2636 PyObject *coro; task_step_impl() local
[all...]

Completed in 23 milliseconds

123