commit_hash
stringlengths
40
40
author
stringlengths
1
57
date
timestamp[s]date
2010-07-26 04:45:09
2026-04-14 18:21:10
message
stringlengths
8
1.39M
diff
stringlengths
68
51.2k
files_changed
int64
1
136
insertions
int64
0
2.35k
deletions
int64
0
1.9k
f652b969989acacf4ed4d4410bdc8c511bf787cd
Xudong-Huang
2024-02-19T07:11:18
:pencil: fix yield_from_unsafe doc name
diff --git a/src/scope.rs b/src/scope.rs index 1436eb8..d2de3f8 100644 --- a/src/scope.rs +++ b/src/scope.rs @@ -78,7 +78,7 @@ impl<'scope, 'a, A, T> Scope<'scope, 'a, A, T> { self.get_yield() } - /// `yield_from` + /// `yield_from_unsafe` /// the from generator must has the same type as itse...
1
1
1
efb4471529ee288eed217a39e80db983e11b20f8
Xudong Huang
2023-12-30T13:12:14
:pencil: fix cargo clippy
diff --git a/src/detail/mod.rs b/src/detail/mod.rs index c0428a6..aa78928 100644 --- a/src/detail/mod.rs +++ b/src/detail/mod.rs @@ -27,13 +27,14 @@ #[cfg_attr(all(unix, target_arch = "arm"), path = "arm_unix.rs")] #[cfg_attr(all(unix, target_arch = "x86_64"), path = "x86_64_unix.rs")] #[cfg_attr(all(windows, target...
1
2
1
8552fc03dcc91a7a34beb33df741aa9d666e03fb
Xudong-Huang
2023-10-17T01:58:14
:pencil: fix clippy
diff --git a/benches/lib.rs b/benches/lib.rs index 580a09e..2317471 100644 --- a/benches/lib.rs +++ b/benches/lib.rs @@ -119,7 +119,7 @@ fn create_gen(b: &mut Bencher) { b.iter(|| { let g = Gn::<()>::new_scoped(|mut s| { let mut i = 0; - while let Some(..) = s.yield_(i) { + ...
1
1
1
64e6259c05b65b7ebcfcfca7ef69bceaa80b1e15
Xudong Huang
2023-10-04T11:48:48
:pencil: only static scope yield is safe (#49)
diff --git a/benches/lib.rs b/benches/lib.rs index 36c7004..580a09e 100644 --- a/benches/lib.rs +++ b/benches/lib.rs @@ -131,7 +131,7 @@ fn create_gen(b: &mut Bencher) { #[bench] fn init_gen(b: &mut Bencher) { let clo_gen = || { - |mut s: Scope<(), _>| { + |mut s: Scope<'_, 'static, (), _>| { ...
5
66
14
2a7984eb5305f69b92b7a8e4b3d35371863dc32e
LaoLittle
2023-10-03T07:16:05
initfn abi fix
diff --git a/src/detail/aarch64_unix.rs b/src/detail/aarch64_unix.rs index c422abc..8e96f90 100644 --- a/src/detail/aarch64_unix.rs +++ b/src/detail/aarch64_unix.rs @@ -1,5 +1,4 @@ use crate::detail::align_down; -use crate::reg_context::InitFn; use crate::stack::Stack; cfg_if::cfg_if! { @@ -10,6 +9,13 @@ cfg_if::c...
7
108
67
783e7d2898edcd1a6c969770fd37e7e9ad49bf4b
Xudong Huang
2023-09-19T08:30:55
:pencil: fix clippy warnings
diff --git a/src/stack/mod.rs b/src/stack/mod.rs index 6cf22c1..993b58e 100644 --- a/src/stack/mod.rs +++ b/src/stack/mod.rs @@ -42,8 +42,11 @@ pub struct StackBox<T> { impl<T> StackBox<T> { /// create uninit stack box - #[allow(clippy::needless_pass_by_ref_mut)] fn new_uninit(stack: &mut Stack, need_dr...
1
4
1
e3f16af60af2ff7547f698b8b4883f518f48a949
Benjamin Lerman
2023-06-21T08:27:53
bump version to 0.7.5
diff --git a/Cargo.toml b/Cargo.toml index 0189884..26af840 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "generator" -version = "0.7.4" +version = "0.7.5" edition = "2021" authors = ["Xudong Huang <huangxu008@hotmail.com>"] license = "MIT/Apache-2.0"
1
1
1
6865d3abf03c5850f596c8a60cbb1a4e7b55e501
Alex Konradi
2023-05-18T13:55:44
Expose DEFAULT_STACK_SIZE constant from crate Expose the default stack size for new generators as a public constant from the crate root.
diff --git a/src/gen_impl.rs b/src/gen_impl.rs index 7b0683e..1b560ab 100644 --- a/src/gen_impl.rs +++ b/src/gen_impl.rs @@ -15,7 +15,7 @@ use crate::scope::Scope; use crate::stack::{Func, Stack, StackBox}; use crate::yield_::yield_now; -// default stack size, in usize +/// The default stack size for generators, in...
2
2
2
6e5cbeac4b3de27a93d8fa520db3200373cf27eb
Xudong-Huang
2023-04-21T07:31:53
:pencil: bump version to 0.7.4
diff --git a/Cargo.toml b/Cargo.toml index 23c2776..0189884 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "generator" -version = "0.7.3" +version = "0.7.4" edition = "2021" authors = ["Xudong Huang <huangxu008@hotmail.com>"] license = "MIT/Apache-2.0"
1
1
1
d81567ec243a748ec6fd1c0648b24de0c0c7b2da
Xudong-Huang
2023-04-21T07:48:33
:pencil: use std::any::type_name
diff --git a/src/gen_impl.rs b/src/gen_impl.rs index 35b26dd..7b0683e 100644 --- a/src/gen_impl.rs +++ b/src/gen_impl.rs @@ -161,23 +161,15 @@ impl<'a, T, const LOCAL: bool> Iterator for GeneratorObj<'a, (), T, LOCAL> { } impl<'a, A, T, const LOCAL: bool> fmt::Debug for GeneratorObj<'a, A, T, LOCAL> { - #[cfg(ni...
2
2
11
ad9f793619a97f8bd618a0eff2f0a355f87ff8a3
Xudong-Huang
2023-04-21T07:43:13
:pencil: refine type_error
diff --git a/src/rt.rs b/src/rt.rs index f53d41d..0c55d42 100644 --- a/src/rt.rs +++ b/src/rt.rs @@ -261,18 +261,7 @@ impl ContextStack { #[inline] fn type_error<A>(msg: &str) -> ! { - #[cfg(nightly)] - #[allow(unused_unsafe)] - { - use std::intrinsics::type_name; - let t = unsafe { type_name...
1
1
12
8fb671e9fdb6a157d73070c0add6e53cd1b16659
Xudong-Huang
2023-04-21T07:25:28
:pencil: fix windows compile issue (#40)
diff --git a/Cargo.toml b/Cargo.toml index 640babc..23c2776 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -21,7 +21,7 @@ exclude = [ [target.'cfg(windows)'.dependencies.windows] -version = "0.44" +version = "0.48" features = [ "Win32_System_Memory", "Win32_Foundation", diff --git a/src/rt.rs b/src/rt.rs i...
2
1
2
4fcd32462842e748a10640e2437f5d0d0a275e70
Xudong Huang
2023-02-23T05:02:18
:pencil: bump version to 0.7.3
diff --git a/Cargo.toml b/Cargo.toml index 45a9acc..640babc 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "generator" -version = "0.7.2" +version = "0.7.3" edition = "2021" authors = ["Xudong Huang <huangxu008@hotmail.com>"] license = "MIT/Apache-2.0"
1
1
1
5888dac74f498a3c176f7b23c2260822a3928f48
Xudong Huang
2022-12-30T09:08:06
:pencil: fmt code
diff --git a/src/stack/windows.rs b/src/stack/windows.rs index 160012c..2504e5c 100644 --- a/src/stack/windows.rs +++ b/src/stack/windows.rs @@ -11,7 +11,12 @@ use windows::Win32::System::SystemInformation::*; use super::SysStack; pub unsafe fn allocate_stack(size: usize) -> io::Result<SysStack> { - let ptr = Vi...
1
6
1
70771f8baf2ddb780082312757deb354369a3d06
Xudong Huang
2022-12-30T09:03:04
:pencil:use inline fmt
diff --git a/build.rs b/build.rs index ac4df89..78f046b 100644 --- a/build.rs +++ b/build.rs @@ -24,7 +24,7 @@ fn main() { // "powerpc64" => "ppc64", "x86_64" => "x86_64", _ => { - panic!("Unsupported architecture: {}", target); + panic!("Unsupported architecture: {targe...
2
2
3
4e67435abdd65db9164ed9f4eae3a13f668cd794
silvanshade
2022-12-25T22:21:14
Update windows dependencies
diff --git a/Cargo.toml b/Cargo.toml index e5ea6b9..b4e8acf 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -21,7 +21,7 @@ exclude = [ [target.'cfg(windows)'.dependencies.windows] -version = "0.39" +version = "0.43" features = [ "Win32_System_Memory", "Win32_Foundation", diff --git a/src/stack/windows.rs b/...
2
2
2
699d5e24d3898ff8fc2d673e3130a4b7b178e044
Xudong Huang
2022-12-07T13:31:54
:pencil: bump version to 0.7.2
diff --git a/Cargo.toml b/Cargo.toml index 13d117b..e5ea6b9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "generator" -version = "0.7.1" -edition = "2018" +version = "0.7.2" +edition = "2021" authors = ["Xudong Huang <huangxu008@hotmail.com>"] license = "MIT/Apache-2.0" repository = "ht...
1
2
2
149f0885bad0ffb748ed14791cf95e07b9f5840a
Xudong Huang
2022-12-07T13:26:21
:pencil: unify prefetch for diff platforms
diff --git a/src/rt.rs b/src/rt.rs index 4faad12..9c7af7d 100644 --- a/src/rt.rs +++ b/src/rt.rs @@ -45,6 +45,7 @@ pub enum Error { /// generator context #[repr(C)] +#[repr(align(128))] pub struct Context { /// generator regs context pub regs: RegContext,
1
1
0
2fea7a5d7198e4712124426eb28a15882121bc49
Xudong Huang
2022-12-02T10:51:06
:pencil: update generator prefetch
diff --git a/src/detail/aarch64_unix.rs b/src/detail/aarch64_unix.rs index f04e6ca..101aa75 100644 --- a/src/detail/aarch64_unix.rs +++ b/src/detail/aarch64_unix.rs @@ -26,9 +26,10 @@ impl Registers { #[inline] pub fn prefetch(&self) { + let ptr = self.gpr[12] as *const usize; unsafe { - ...
3
9
6
500ed99fa15d6290ac2e0e538d258637619749ac
Xudong Huang
2022-09-13T10:27:11
:pencil: update windows dependency to 0.39
diff --git a/Cargo.toml b/Cargo.toml index 7217ebc..13d117b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -21,7 +21,7 @@ exclude = [ [target.'cfg(windows)'.dependencies.windows] -version = "0.32" +version = "0.39" features = [ "Win32_System_Memory", "Win32_Foundation", diff --git a/src/stack/mod.rs b/src/...
2
2
2
737495ada9bc5b368857c10f4b574bc60e6b58c8
Xudong Huang
2022-07-17T05:16:40
:pencil: bump version to 0.7.1
diff --git a/Cargo.toml b/Cargo.toml index 4ee95df..7217ebc 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "generator" -version = "0.7.0" +version = "0.7.1" edition = "2018" authors = ["Xudong Huang <huangxu008@hotmail.com>"] license = "MIT/Apache-2.0"
1
1
1
e79b3b1592fe6efe6e6a5aa958f9a67696f95165
Xudong Huang
2022-07-17T05:16:04
:pencil: fix clippy warnings
diff --git a/examples/fib.rs b/examples/fib.rs index 4c3bd79..5f2f9da 100644 --- a/examples/fib.rs +++ b/examples/fib.rs @@ -5,7 +5,7 @@ fn main() { let (mut a, mut b) = (0, 1); while b < 200 { std::mem::swap(&mut a, &mut b); - b = a + b; + b += a; s.yie...
4
6
8
9406e3860b76a5c294a1c1c752e777de99ec816c
Xudong Huang
2022-04-01T09:28:07
:pencil: fix cd example release bug
diff --git a/examples/cd.rs b/examples/cd.rs index 18a5c9b..26211ea 100644 --- a/examples/cd.rs +++ b/examples/cd.rs @@ -6,7 +6,7 @@ enum Action { Stop, } -#[derive(Debug, Clone, Copy)] +#[derive(Debug, Clone, Copy, PartialEq)] enum State { Playing, Stopped, @@ -19,6 +19,10 @@ fn main() { let mu...
1
17
7
b3bd994a23ff003849f0d495762fd6ba94840209
Xudong Huang
2022-04-01T08:41:06
:pencil: catch panic filter out Done and Cancel
diff --git a/src/gen_impl.rs b/src/gen_impl.rs index 94f85e2..35b26dd 100644 --- a/src/gen_impl.rs +++ b/src/gen_impl.rs @@ -530,6 +530,27 @@ impl<'a, A, T> Drop for GeneratorImpl<'a, A, T> { } } +/// don't print panic info for Done/Cancel +fn catch_unwind_filter<F: FnOnce() -> R + panic::UnwindSafe, R>(f: F) -...
1
22
1
2dd30711c72a837afe610b84d5c79c6c9a1e1d29
Xudong Huang
2022-02-23T09:55:06
:bug: fix wrong assume init in done (#34)
diff --git a/src/gen_impl.rs b/src/gen_impl.rs index e2eb707..94f85e2 100644 --- a/src/gen_impl.rs +++ b/src/gen_impl.rs @@ -339,18 +339,10 @@ impl<'a, A, T> GeneratorImpl<'a, A, T> { // init the ref to 0 means that it's ready to start self.context._ref = 0; let ret = &mut self.ret as *mut _;...
4
19
26
4627deca9ad2787566fcb2cf956ece9682ef0ce9
Xudong Huang
2022-02-22T06:33:34
:pencil: use is_null instead of ptr compare
diff --git a/src/stack/windows.rs b/src/stack/windows.rs index e4a7dde..5a60304 100644 --- a/src/stack/windows.rs +++ b/src/stack/windows.rs @@ -13,7 +13,7 @@ use super::SysStack; pub unsafe fn allocate_stack(size: usize) -> io::Result<SysStack> { let ptr = VirtualAlloc(ptr::null(), size, MEM_COMMIT | MEM_RESERVE...
1
1
1
c34d7dd2da1bbdad9b3e90dc65a5a6c6eeba86b6
Xudong Huang
2022-02-22T06:28:49
:pencil: use windows instead of winapi
diff --git a/Cargo.toml b/Cargo.toml index 8f084e5..4ee95df 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -20,8 +20,14 @@ exclude = [ ] -[target.'cfg(windows)'.dependencies] -winapi = { version = "0.3", features = ["memoryapi", "sysinfoapi"] } +[target.'cfg(windows)'.dependencies.windows] +version = "0.32" +features...
2
22
24
ffdebdffec66b7a110d29fa13afb0de626909c65
Xudong Huang
2022-02-22T05:46:21
:pencil: refine assume_init code (#34)
diff --git a/src/detail/mod.rs b/src/detail/mod.rs index 3579b1e..3c0e2dd 100644 --- a/src/detail/mod.rs +++ b/src/detail/mod.rs @@ -41,7 +41,7 @@ fn align_down(sp: *mut usize) -> *mut usize { sp as *mut usize } -// ptr::mut_offset is positive isizes only +// ptr::mut_offset is positive isize only #[inline] #...
8
19
21
9f45261a075f0ecac8928e40fb37ca650319bd46
Xudong Huang
2021-08-17T07:11:09
:pencil: use panic_any
diff --git a/src/gen_impl.rs b/src/gen_impl.rs index a407ed6..5eaac3b 100644 --- a/src/gen_impl.rs +++ b/src/gen_impl.rs @@ -536,7 +536,7 @@ impl<'a, A, T> Drop for GeneratorImpl<'a, A, T> { // set_stack_size::<F>(used_stack); } else { error!("stack overflow detected!"); - ...
5
6
7
0776da5ffad8f0f74a6cb5b031acc6ef2e4317ce
Xudong Huang
2021-06-10T06:13:14
:pencil: fix test warnings
diff --git a/tests/lib.rs b/tests/lib.rs index f909b6a..43b6b46 100644 --- a/tests/lib.rs +++ b/tests/lib.rs @@ -190,7 +190,6 @@ fn test_scoped_yield() { fn test_inner_ref() { let mut g = Gn::<()>::new_scoped(|mut s| { use std::mem; - use std::ptr; // setup something let mut x: u...
1
5
4
cd677f7d13696e840d312f5e3658ded2de2fb4bb
Xudong Huang
2021-06-10T05:57:50
:pencil: fix clippy warnings
diff --git a/src/stack/unix.rs b/src/stack/unix.rs index 6c9675c..0cb9576 100644 --- a/src/stack/unix.rs +++ b/src/stack/unix.rs @@ -93,13 +93,9 @@ pub fn max_stack_size() -> usize { let mut ret = PAGE_SIZE.load(Ordering::Relaxed); if ret == 0 { - let mut limit; - let limitret; - - unsa...
2
7
8
6ca717a7eb066068eff4b97dc044d1327e2f8f89
Xudong Huang
2021-03-30T08:01:29
:pencil: bump version to 0.7.0
diff --git a/Cargo.toml b/Cargo.toml index 492dca3..8f084e5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "generator" -version = "0.6.25" +version = "0.7.0" edition = "2018" authors = ["Xudong Huang <huangxu008@hotmail.com>"] license = "MIT/Apache-2.0"
1
1
1
d2bc8bb0d564a38bcba069b3b3b10ae25f71060b
Xudong Huang
2021-03-30T08:00:36
:pencil: fix clippy warnings
diff --git a/src/detail/aarch64_unix.rs b/src/detail/aarch64_unix.rs index 37bc9c3..75ba0dd 100644 --- a/src/detail/aarch64_unix.rs +++ b/src/detail/aarch64_unix.rs @@ -46,7 +46,7 @@ pub fn initialize_call_frame( const FP: usize = 29 - 19; const LR: usize = 30 - 19; const SP: usize = 31 - 19; - + ...
5
14
15
949200a75b671f90753df4d43d0c35c110e3eb3a
Xudong Huang
2021-03-30T05:40:13
:pencil: make cancel safe
diff --git a/src/gen_impl.rs b/src/gen_impl.rs index 257abc3..236360c 100644 --- a/src/gen_impl.rs +++ b/src/gen_impl.rs @@ -135,12 +135,9 @@ impl<'a, A, T, const LOCAL: bool> GeneratorObj<'a, A, T, LOCAL> { self.gen.send(para) } - /// cancel the generator [TODO: change to safe?] - /// this will t...
2
10
16
997cf9c5ee71ac317234b2d3b34569f9d6e97f69
Xudong Huang
2021-03-30T05:32:54
:pencil: public LocalGenerator
diff --git a/src/lib.rs b/src/lib.rs index 6053862..a755a7a 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -21,7 +21,7 @@ mod scope; mod stack; mod yield_; -pub use crate::gen_impl::{Generator, Gn}; +pub use crate::gen_impl::{Generator, LocalGenerator, Gn}; pub use crate::rt::{get_local_data, is_generator, Error}; p...
1
1
1
1c5b258d1e29ead90355aecb7ec21688ecb26330
Xudong Huang
2021-03-30T04:55:37
:pencil: fix release code reorder
diff --git a/benches/lib.rs b/benches/lib.rs index f8553d4..8dd69d0 100644 --- a/benches/lib.rs +++ b/benches/lib.rs @@ -89,8 +89,7 @@ fn scoped_yield_bench(b: &mut Bencher) { i += 1; match v { Some(x) => { - dbg!(x, i); - // assert_eq!(x,...
4
39
3
f7d120a3b724d06a7b623d0a4306acf8f78cb4f0
Xudong Huang
2021-03-30T04:18:42
:pencil: fix send issue (#27)
diff --git a/benches/lib.rs b/benches/lib.rs index 8dd69d0..f8553d4 100644 --- a/benches/lib.rs +++ b/benches/lib.rs @@ -89,7 +89,8 @@ fn scoped_yield_bench(b: &mut Bencher) { i += 1; match v { Some(x) => { - assert_eq!(x, i); + dbg!(x, i)...
5
85
41
c58e33c2f77ea93ebffd289d88c3e2652e4f2a2c
Xudong Huang
2021-03-23T10:00:26
:pencil: fix aarch64 release optimization issue
diff --git a/src/rt.rs b/src/rt.rs index 9ec5408..46f585b 100644 --- a/src/rt.rs +++ b/src/rt.rs @@ -179,7 +179,7 @@ unsafe fn init_root_p() { impl ContextStack { #[cfg(nightly)] - #[inline] + #[inline(never)] pub fn current() -> ContextStack { unsafe { if ROOT_CONTEXT_P.is_null...
1
2
2
b6d6162afc6ada812c59726c2705095107c08e9e
Xudong Huang
2021-02-21T14:08:24
:pencil: bump version to 0.6.24
diff --git a/Cargo.toml b/Cargo.toml index 256e366..fb12d21 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "generator" -version = "0.6.23" +version = "0.6.24" edition = "2018" authors = ["Xudong Huang <huangxu008@hotmail.com>"] license = "MIT/Apache-2.0"
1
1
1
cb2d146532f7d5509cbedd46f5fef2c5f5e9871f
Xudong Huang
2021-02-21T14:47:59
:pencil: fix 2021 edition panic warning
diff --git a/src/lib.rs b/src/lib.rs index fd296ab..6053862 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -8,6 +8,7 @@ #![cfg_attr(test, deny(warnings))] #![deny(missing_docs)] #![allow(deprecated)] +#![allow(non_fmt_panic)] #[macro_use] extern crate log;
1
1
0
8cb578fa0fa7614a301e16c84e7d3ef53695486d
Xudong Huang
2021-02-21T14:07:16
:pencil: revert send bound
diff --git a/src/gen_impl.rs b/src/gen_impl.rs index 2913c49..5122c8a 100644 --- a/src/gen_impl.rs +++ b/src/gen_impl.rs @@ -24,7 +24,7 @@ pub struct Generator<'a, A, T> { gen: StackBox<GeneratorImpl<'a, A, T>>, } -unsafe impl<A: Send, T: Send> Send for Generator<'static, A, T> {} +unsafe impl<A, T> Send for Ge...
1
1
1
4a9d4b94cba04889dff24a9ace09c47df4c202dd
Xudong Huang
2020-12-08T14:06:21
:bug: fix generator send bound (#27)
diff --git a/Cargo.toml b/Cargo.toml index a0a2a8c..256e366 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -32,7 +32,7 @@ log = "0.4" [build-dependencies] cc = "1.0" -rustversion = "1.0.4" +rustversion = "1.0" # release build [profile.release] diff --git a/src/gen_impl.rs b/src/gen_impl.rs index 5122c8a..2913c49 1...
2
2
2
628d0dca4e90e3a5e73d0a6322c9e82c751c0f48
Dirkjan Ochtman
2020-10-27T09:55:53
:pencil: switch from rustc_version to rustversion This reduces the amount of dependencies pulled in at build time.
diff --git a/Cargo.toml b/Cargo.toml index 150a071..a0a2a8c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -32,7 +32,7 @@ log = "0.4" [build-dependencies] cc = "1.0" -rustc_version = "0.2" +rustversion = "1.0.4" # release build [profile.release] diff --git a/build.rs b/build.rs index bcd189a..f5b0e8f 100644 --- a/...
2
8
6
4af7740e18fb2be4ef2adbf0e4dd7b1889e0099b
Xudong Huang
2020-10-21T01:53:59
:pencil: bump version to 0.6.23
diff --git a/Cargo.toml b/Cargo.toml index 0653bc2..150a071 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "generator" -version = "0.6.22" +version = "0.6.23" edition = "2018" authors = ["Xudong Huang <huangxu008@hotmail.com>"] license = "MIT/Apache-2.0"
1
1
1
dde65054178311bf6ba5724e7f476e3dc4cc67d7
Xudong Huang
2020-10-21T01:52:28
:pencil: change warning to trace when generator not fully consumed (#22)
diff --git a/src/gen_impl.rs b/src/gen_impl.rs index 2010c73..5122c8a 100644 --- a/src/gen_impl.rs +++ b/src/gen_impl.rs @@ -483,7 +483,7 @@ impl<'a, A, T> Drop for GeneratorImpl<'a, A, T> { } if !self.is_done() { - warn!("generator is not done while drop"); + trace!("generator...
1
1
1
6590c13e6e4f863470d6c87de18dbeab5207cf7f
Xudong Huang
2020-10-21T01:51:23
:pencil: remove cold attribute
diff --git a/src/gen_impl.rs b/src/gen_impl.rs index 332f584..2010c73 100644 --- a/src/gen_impl.rs +++ b/src/gen_impl.rs @@ -354,7 +354,6 @@ impl<'a, A, T> GeneratorImpl<'a, A, T> { if let Some(err) = self.context.err.take() { // pass the error to the parent until root - #[cold] ...
4
0
16
9ede1477f615787e8e214c40a685363efd52da92
Xudong Huang
2020-09-07T04:16:58
:pencil: bump version to 0.6.22
diff --git a/Cargo.toml b/Cargo.toml index c1f0c85..0653bc2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "generator" -version = "0.6.21" +version = "0.6.22" edition = "2018" authors = ["Xudong Huang <huangxu008@hotmail.com>"] license = "MIT/Apache-2.0"
1
1
1
3293b89ce4bd1288332560020302c0caeac937d6
Xudong Huang
2020-09-04T08:31:24
:bug: remove naked function feature to fix nightly build (#24)
diff --git a/build.rs b/build.rs index ad28533..02c39f8 100644 --- a/build.rs +++ b/build.rs @@ -9,7 +9,8 @@ use rustc_version::{version_meta, Channel}; fn main() { // Set cfg flags depending on release channel if let Channel::Nightly = version_meta().unwrap().channel { - return println!("cargo:rustc-...
4
10
8
188f42baf5a8668bc294b626448c5dab46feb3a8
Xudong Huang
2020-06-19T00:59:29
:pencil: bump version to 0.6.21
diff --git a/Cargo.toml b/Cargo.toml index 9973739..c1f0c85 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "generator" -version = "0.6.20" +version = "0.6.21" edition = "2018" authors = ["Xudong Huang <huangxu008@hotmail.com>"] license = "MIT/Apache-2.0"
1
1
1
e6387a521bdd50270db6b80de1d8eca43896111f
Xudong Huang
2020-06-10T07:57:28
:pencil: fix clippy warnings
diff --git a/src/gen_impl.rs b/src/gen_impl.rs index 952a440..332f584 100644 --- a/src/gen_impl.rs +++ b/src/gen_impl.rs @@ -115,8 +115,11 @@ impl<'a, A, T> Generator<'a, A, T> { self.gen.send(para) } - /// cancel the generator - /// this will trigger a Cancel panic, it's unsafe in that you must c...
4
7
3
97ba715b80a03e6288aa70326cb7e0d921d01cfb
Paul Kernfeld
2020-05-22T15:41:13
Migrate asm! to llvm_asm! Replace uses of asm! with llvm_asm!, add the llvm_asm feature [Tracking Issue for LLVM-style inline assembly](https://github.com/rust-lang/rust/issues/70173) `cargo test` now passes for me with rustc 1.45.0-nightly (9310e3bd4 2020-05-21)
diff --git a/src/detail/x86_64_unix.rs b/src/detail/x86_64_unix.rs index 9182e2f..47b5060 100644 --- a/src/detail/x86_64_unix.rs +++ b/src/detail/x86_64_unix.rs @@ -16,7 +16,7 @@ mod asm_impl { /// prefetch data #[inline] pub unsafe extern "C" fn prefetch(data: *const usize) { - asm!( + llv...
3
9
8
a414fbe573306c54aa8a150cfeaeee9fcfe29a90
Xudong Huang
2020-04-12T15:09:28
:pencil: hide GeneratorImpl completely
diff --git a/src/gen_impl.rs b/src/gen_impl.rs index d7cb148..952a440 100644 --- a/src/gen_impl.rs +++ b/src/gen_impl.rs @@ -48,19 +48,88 @@ impl<'a, A, T> Generator<'a, A, T> { std::mem::forget(g); ret } -} -impl<'a, A, T> std::ops::Deref for Generator<'a, A, T> { - type Target = GeneratorI...
1
91
22
5fda139f4bff6f8e5ccddeee1ddfcb5a890c84b8
Xudong Huang
2020-04-12T14:56:23
:pencil: refine StackBox impl
diff --git a/src/gen_impl.rs b/src/gen_impl.rs index ee678d5..d7cb148 100644 --- a/src/gen_impl.rs +++ b/src/gen_impl.rs @@ -6,7 +6,6 @@ use std::any::Any; use std::fmt; use std::marker::PhantomData; -use std::mem::ManuallyDrop; use std::panic; use std::thread; @@ -22,8 +21,7 @@ pub const DEFAULT_STACK_SIZE: usi...
3
65
90
6122c6a017bf6e422e8f84d0f44adef7aef3b658
Xudong Huang
2020-04-09T15:58:34
:pencil: impl generator into_raw/from_raw
diff --git a/src/gen_impl.rs b/src/gen_impl.rs index 7711b68..ee678d5 100644 --- a/src/gen_impl.rs +++ b/src/gen_impl.rs @@ -26,6 +26,35 @@ pub struct Generator<'a, A, T> { gen: ManuallyDrop<StackBox<GeneratorImpl<'a, A, T>>>, } +unsafe impl<A, T> Send for Generator<'static, A, T> {} + +impl<'a, A, T> Generator...
3
54
19
302c996cfa35f05e2f1bb5d4242f2b11734e1d08
Xudong Huang
2020-04-07T13:40:46
:pencil: impl into_raw/from_raw for StackBox
diff --git a/src/lib.rs b/src/lib.rs index 6d3afde..098f266 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -26,6 +26,7 @@ mod yield_; pub use crate::gen_impl::{Generator, Gn}; pub use crate::rt::{get_local_data, is_generator, Error}; pub use crate::scope::Scope; +pub use crate::stack::StackBox; pub use crate::yield_::...
2
26
2
e5bb64fc094e30e0a258f5ae0f0ffec475ad3a0b
Xudong Huang
2020-04-07T13:33:29
:pencil: fix clippy warnings
diff --git a/src/stack/mod.rs b/src/stack/mod.rs index f7380e8..642b2d4 100644 --- a/src/stack/mod.rs +++ b/src/stack/mod.rs @@ -41,7 +41,7 @@ impl<T> StackBox<T> { // alloc the data let layout = std::alloc::Layout::new::<T>(); let align = std::cmp::max(layout.align(), ALIGN); - let si...
3
6
12
297a4ce6d6226a6803ab349247b5dcbbc72d81cd
Xudong Huang
2020-04-06T14:31:37
:pencil: add stack box header
diff --git a/src/stack/mod.rs b/src/stack/mod.rs index 49129ce..f7380e8 100644 --- a/src/stack/mod.rs +++ b/src/stack/mod.rs @@ -17,34 +17,58 @@ pub mod sys; #[path = "windows.rs"] pub mod sys; -/// A pointer type for stack allocation. -pub struct StackBox<T> { - ptr: ptr::NonNull<T>, +// must align with StackBo...
1
43
17
bb11584651b96ad022b3a0500afbb6f101fda6e9
Xudong Huang
2020-04-06T12:33:02
:pencil: alloc func in stack memory
diff --git a/src/gen_impl.rs b/src/gen_impl.rs index 1a2b077..7711b68 100644 --- a/src/gen_impl.rs +++ b/src/gen_impl.rs @@ -13,7 +13,7 @@ use std::thread; use crate::reg_context::RegContext; use crate::rt::{Context, ContextStack, Error}; use crate::scope::Scope; -use crate::stack::{Stack, StackBox}; +use crate::sta...
2
102
35
cb71b8fe622b472b9bbc8a56430da368976aaa22
Xudong Huang
2020-04-05T12:32:39
:pencil: use StackBox instead of box
diff --git a/src/gen_impl.rs b/src/gen_impl.rs index 2e0f574..1a2b077 100644 --- a/src/gen_impl.rs +++ b/src/gen_impl.rs @@ -6,27 +6,77 @@ use std::any::Any; use std::fmt; use std::marker::PhantomData; +use std::mem::ManuallyDrop; use std::panic; use std::thread; use crate::reg_context::RegContext; use crate::...
3
178
72
2f60d170de1db684451e06d121628a9ef8f47e1e
Xudong Huang
2020-04-04T14:05:31
:pencil: hide GeneratorImpl
diff --git a/src/gen_impl.rs b/src/gen_impl.rs index b977386..2e0f574 100644 --- a/src/gen_impl.rs +++ b/src/gen_impl.rs @@ -90,7 +90,7 @@ pub struct GeneratorImpl<'a, A, T> { impl<'a, A: Any, T: Any> GeneratorImpl<'a, A, T> { /// create a new generator with default stack size - pub fn init_context(&mut self...
4
6
6
1b7c84653804d496b929ca27cac2290f3f1858af
Xudong Huang
2020-02-04T11:07:36
:pencil: bump version to 0.6.20
diff --git a/Cargo.toml b/Cargo.toml index 5e91bac..9973739 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "generator" -version = "0.6.19" +version = "0.6.20" edition = "2018" authors = ["Xudong Huang <huangxu008@hotmail.com>"] license = "MIT/Apache-2.0"
1
1
1
762bc8b37a731183ba8d274c2e8dbfacb04a6fce
Xudong Huang
2020-02-04T09:45:12
:pencil: panic build when arch is not supported
diff --git a/build.rs b/build.rs index 2f52384..ad28533 100644 --- a/build.rs +++ b/build.rs @@ -19,12 +19,12 @@ fn main() { let is_win = is_win_gnu || is_win_msvc; let arch = match target.split('-').next().unwrap() { - "arm" | "armv7" | "armv7s" => "arm", - "arm64" | "aarch64" => "arm64", - ...
1
6
6
16af52a4d2e08da6545af2b23793e66b51a337f9
Andrii Radyk
2020-01-02T22:18:36
remove deprecated Error::description, replace deprecated cause with source
diff --git a/src/stack/mod.rs b/src/stack/mod.rs index 0fd8c11..51d37ca 100644 --- a/src/stack/mod.rs +++ b/src/stack/mod.rs @@ -40,13 +40,7 @@ impl Display for StackError { } impl Error for StackError { - fn description(&self) -> &str { - match *self { - StackError::ExceedsMaximumSize(_) => "e...
1
1
7
0c3af770f910ab7a0278901c75f4468a8afd57f4
Xudong Huang
2020-01-04T08:32:39
:pencil: deny warnings for test
diff --git a/src/lib.rs b/src/lib.rs index 09018a4..c66caa6 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -8,7 +8,7 @@ #![cfg_attr(nightly, feature(core_intrinsics))] #![cfg_attr(nightly, feature(naked_functions))] #![cfg_attr(nightly, feature(thread_local))] -// #![cfg_attr(test, deny(warnings))] +#![cfg_attr(test, d...
1
1
1
3fd7de31aa0d793ee1f2a5aafeb912127c2aba83
Xudong Huang
2019-11-25T09:48:54
:pencil: fix some compile warnings
diff --git a/examples/get_yield.rs b/examples/get_yield.rs index 644b72a..3c7ad09 100644 --- a/examples/get_yield.rs +++ b/examples/get_yield.rs @@ -15,7 +15,7 @@ fn sum(a: u32) -> u32 { fn main() { // we specify the send type is u32 - let mut s = Gn::<(u32)>::new(|| sum(1)); + let mut s = Gn::<u32>::new(...
3
6
3
754c7e11a78a3f343a1c5b726a10af1d1b5dcb51
Mike Zeller
2019-11-14T17:52:18
Add support for illumos/solaris
diff --git a/src/stack/unix.rs b/src/stack/unix.rs index 26080b7..ed63600 100644 --- a/src/stack/unix.rs +++ b/src/stack/unix.rs @@ -12,7 +12,9 @@ use super::SysStack; target_os = "openbsd", target_os = "macos", target_os = "ios", - target_os = "android" + target_os = "android", + target_os = "i...
1
6
2
4e219363aa98910a62bbb39019bb67ebed62b336
Xudong Huang
2019-10-24T04:37:53
:pencil: bump version to 0.6.19
diff --git a/Cargo.toml b/Cargo.toml index e8e041b..5e91bac 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "generator" -version = "0.6.18" +version = "0.6.19" edition = "2018" authors = ["Xudong Huang <huangxu008@hotmail.com>"] license = "MIT/Apache-2.0"
1
1
1
35ea351fa4baaa775161dcf468da076d279bfd52
Xudong Huang
2019-10-24T04:34:58
:pencil: remove priority
diff --git a/src/gen_impl.rs b/src/gen_impl.rs index ac1d956..9ca04b8 100644 --- a/src/gen_impl.rs +++ b/src/gen_impl.rs @@ -80,8 +80,6 @@ impl<A: Any> Gn<A> { pub struct GeneratorImpl<'a, A, T> { // run time context context: Context, - // priority - priority: usize, // save the input para: O...
1
0
15
6bbd89c6fa6e98b200904bd489794eaabe854694
Xudong Huang
2019-10-23T06:34:06
:pencil: add priority perperty
diff --git a/src/gen_impl.rs b/src/gen_impl.rs index ecd3d40..ac1d956 100644 --- a/src/gen_impl.rs +++ b/src/gen_impl.rs @@ -80,6 +80,8 @@ impl<A: Any> Gn<A> { pub struct GeneratorImpl<'a, A, T> { // run time context context: Context, + // priority + priority: usize, // save the input para: O...
2
16
7
6e95f144368c018877d9be4d69ab8f76d80941f8
Xudong Huang
2019-10-23T03:44:15
:pencil: add get_para API for generator
diff --git a/src/gen_impl.rs b/src/gen_impl.rs index 9ca04b8..ecd3d40 100644 --- a/src/gen_impl.rs +++ b/src/gen_impl.rs @@ -210,6 +210,12 @@ impl<'a, A, T> GeneratorImpl<'a, A, T> { self.para = Some(para); } + /// retrive the para of the generator + #[inline] + pub fn get_para(&self) -> Option...
1
6
0
70281d8e3442fabb436ab21f84fbea9410553746
Xudong Huang
2019-10-23T02:15:47
:pencil: remove stack track flag
diff --git a/src/gen_impl.rs b/src/gen_impl.rs index 935c5be..9ca04b8 100644 --- a/src/gen_impl.rs +++ b/src/gen_impl.rs @@ -76,6 +76,7 @@ impl<A: Any> Gn<A> { } /// `GeneratorImpl` +#[repr(C)] pub struct GeneratorImpl<'a, A, T> { // run time context context: Context, diff --git a/src/rt.rs b/src/rt.rs i...
3
13
17
d8d62a38aa5321c76857e94fe9a20f571baa8449
Léo Gaspard
2019-09-05T05:51:27
:bug: remove UB The UB arose due to `self.context.para` being `MaybeUninit::zeroed`, which is an invalid value for an `*mut dyn T`, as fat pointers' vtable pointer cannot be null. Which means that during the phase on the left-hand side of the `=`, an invalid object was created, which lead to UB. This, in turn, manif...
diff --git a/src/gen_impl.rs b/src/gen_impl.rs index 586e30a..935c5be 100644 --- a/src/gen_impl.rs +++ b/src/gen_impl.rs @@ -91,8 +91,8 @@ impl<'a, A: Any, T: Any> GeneratorImpl<'a, A, T> { /// create a new generator with default stack size pub fn init_context(&mut self) { unsafe { - *self...
1
2
2
8fc320e35469072f3147ea0fefb1b77fffb45b37
Xudong Huang
2019-09-02T08:40:02
:pencil: bump version to 0.6.18
diff --git a/Cargo.toml b/Cargo.toml index 39a7707..e8e041b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "generator" -version = "0.6.17" +version = "0.6.18" edition = "2018" authors = ["Xudong Huang <huangxu008@hotmail.com>"] license = "MIT/Apache-2.0"
1
1
1
0f4446b0163d0941cbcadb9c5caef960932b386f
Xudong Huang
2019-09-02T08:16:50
:pencil: un-deprecate Gn::new_opt
diff --git a/src/gen_impl.rs b/src/gen_impl.rs index ae6c56b..586e30a 100644 --- a/src/gen_impl.rs +++ b/src/gen_impl.rs @@ -63,7 +63,7 @@ impl<A: Any> Gn<A> { } /// create a new generator with specified stack size - #[deprecated(since = "0.6.18", note = "please use `scope` version instead")] + // the...
1
1
1
e26c885c60604e9c500f3a59a6c95678e8687a3f
Xudong Huang
2019-09-02T08:06:41
:pencil: deprecate non scoped APIs (#14)
diff --git a/benches/lib.rs b/benches/lib.rs index 50fff39..8dd69d0 100644 --- a/benches/lib.rs +++ b/benches/lib.rs @@ -1,4 +1,5 @@ #![feature(test)] +#![allow(deprecated)] extern crate generator; extern crate test; @@ -176,6 +177,6 @@ fn fnbox_bench(b: &mut Bencher) { let f: Box<dyn FnOnce()> = Box::new...
14
70
36
33c51a52403b0dd88c0537909d503bbc7d32a478
Xudong Huang
2019-09-02T06:43:13
:pencil: add conext check for done (#13)
diff --git a/src/yield_.rs b/src/yield_.rs index 614f906..75936bc 100644 --- a/src/yield_.rs +++ b/src/yield_.rs @@ -6,7 +6,7 @@ use std::any::Any; use crate::gen_impl::Generator; use crate::reg_context::RegContext; -use crate::rt::{Context, ContextStack, Error}; +use crate::rt::{is_generator, Context, ContextStack...
2
10
1
52b6356f121e26173696acfcd77051bd24c90b8a
Xudong Huang
2019-07-31T13:26:46
:pencil: bump version to 0.6.17
diff --git a/Cargo.toml b/Cargo.toml index 95be920..39a7707 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "generator" -version = "0.6.16" +version = "0.6.17" edition = "2018" authors = ["Xudong Huang <huangxu008@hotmail.com>"] license = "MIT/Apache-2.0"
1
1
1
276a6be219f91e5bee5af08ea011800bca558d83
Xudong Huang
2019-07-31T13:16:56
:pencil: allow warnings for latest nightly build
diff --git a/src/lib.rs b/src/lib.rs index 7787211..b2caec8 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -8,7 +8,7 @@ #![cfg_attr(nightly, feature(core_intrinsics))] #![cfg_attr(nightly, feature(naked_functions))] #![cfg_attr(nightly, feature(thread_local))] -#![cfg_attr(test, deny(warnings))] +// #![cfg_attr(test, d...
1
1
1
f2ef3f65a1ab665c83513f0b0c39ea3935ea529d
Xudong Huang
2019-07-08T12:50:53
:pencil: bump version to 0.6.16
diff --git a/Cargo.toml b/Cargo.toml index 3670a0b..95be920 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "generator" -version = "0.6.15" +version = "0.6.16" edition = "2018" authors = ["Xudong Huang <huangxu008@hotmail.com>"] license = "MIT/Apache-2.0"
1
1
1
563ecf1a636fccf81b58a8ef339cd5c3db6dbd42
Xudong Huang
2019-07-08T12:48:36
:pencil: fix deprecated mem::uninitialized()
diff --git a/src/rt.rs b/src/rt.rs index 60748ff..765227d 100644 --- a/src/rt.rs +++ b/src/rt.rs @@ -70,8 +70,8 @@ impl Context { Context { regs: RegContext::empty(), stack: Stack::empty(), - para: unsafe { mem::uninitialized() }, - ret: unsafe { mem::uninitializ...
3
6
6
c98bb3f0ac97af252312c3349d8fc9bad89c87f8
Xudong Huang
2019-07-08T12:32:23
:pencil: bump version to 0.6.15
diff --git a/Cargo.toml b/Cargo.toml index 7096d96..3670a0b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "generator" -version = "0.6.14" +version = "0.6.15" edition = "2018" authors = ["Xudong Huang <huangxu008@hotmail.com>"] license = "MIT/Apache-2.0"
1
1
1
d68410dc66e5b9f366ce654f9004d027d6172afa
Xudong Huang
2019-07-05T12:15:15
:rocket: optimize coroutine version set/get para
diff --git a/src/rt.rs b/src/rt.rs index 94f9768..60748ff 100644 --- a/src/rt.rs +++ b/src/rt.rs @@ -115,18 +115,33 @@ impl Context { } } + /// get coroutine send para + #[inline] + pub fn co_get_para<A>(&self) -> Option<A> { + let para = unsafe { &mut *(self.para as *mut Option<A>) }; +...
2
36
13
6149bb88498e0fc2ff9ebdb76dfd60e78bcbc846
Xudong Huang
2019-07-05T07:32:22
:rocket: add more cold optimization
diff --git a/src/gen_impl.rs b/src/gen_impl.rs index 918b05e..8f56304 100644 --- a/src/gen_impl.rs +++ b/src/gen_impl.rs @@ -188,6 +188,7 @@ impl<'a, A, T> GeneratorImpl<'a, A, T> { if let Some(err) = self.context.err.take() { // pass the error to the parent until root + #[cold] ...
4
14
2
32ba2f2ba98d62040d9c629e9021438b6332b6b3
Xudong Huang
2019-07-05T01:49:25
:rocket: some more optimization
diff --git a/src/gen_impl.rs b/src/gen_impl.rs index c9f623c..918b05e 100644 --- a/src/gen_impl.rs +++ b/src/gen_impl.rs @@ -19,7 +19,7 @@ use crate::yield_::yield_now; pub const DEFAULT_STACK_SIZE: usize = 0x1000; /// Generator helper -pub struct Gn<A> { +pub struct Gn<A = ()> { dummy: PhantomData<A>, } @@...
2
10
3
f6abb94884ee6550f93090015222bb2df1577bf6
Xudong Huang
2019-07-04T06:06:20
:rocket: some optimization
diff --git a/src/gen_impl.rs b/src/gen_impl.rs index 57c4e1f..c9f623c 100644 --- a/src/gen_impl.rs +++ b/src/gen_impl.rs @@ -170,7 +170,7 @@ impl<'a, A, T> GeneratorImpl<'a, A, T> { // switch to new context, always use the top context's reg // for normal generator self.context.parent == self.context ...
2
2
1
902fcd1dd45865403fec41c082584bc222e8fb37
Xudong Huang
2019-06-15T06:42:18
:pencil: rename sys module filename
diff --git a/src/stack/mod.rs b/src/stack/mod.rs index 1629919..63d03f7 100644 --- a/src/stack/mod.rs +++ b/src/stack/mod.rs @@ -8,24 +8,14 @@ use std::io; use std::os::raw::c_void; use std::ptr; -// #[cfg(windows)] -// const MIN_STACK_SIZE: usize = 0x4b0; - -// #[cfg(unix)] -// const MIN_STACK_SIZE: usize = 0x100;...
3
3
13
f32de3c1ecd1411e8864f2992bc0e2f10959621e
Xudong Huang
2019-06-12T08:48:44
:pencil: bump version to 0.6.14
diff --git a/Cargo.toml b/Cargo.toml index 3b51117..7096d96 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "generator" -version = "0.6.13" +version = "0.6.14" edition = "2018" authors = ["Xudong Huang <huangxu008@hotmail.com>"] license = "MIT/Apache-2.0"
1
1
1
a4d991a57219c488ef2e645a1d5f3b645e77660f
Xudong Huang
2019-06-12T07:39:52
:pencil: use guarded stack (#12)
diff --git a/Cargo.toml b/Cargo.toml index 7ff98ed..3b51117 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -19,12 +19,20 @@ exclude = [ "benches/**/*", ] + +[target.'cfg(windows)'.dependencies] +winapi = { version = "0.3", features = ["memoryapi", "sysinfoapi"] } + +[target.'cfg(unix)'.dependencies] +libc = "0.2" ...
8
456
116
f10355d6e9a9e09a4ae9856c04b1f7a0a2f5ea49
Xudong Huang
2019-06-12T03:16:40
:pencil: update to 2018 edition for unix
diff --git a/src/detail/x86_64_unix.rs b/src/detail/x86_64_unix.rs index 47497e4..12e02fe 100644 --- a/src/detail/x86_64_unix.rs +++ b/src/detail/x86_64_unix.rs @@ -1,6 +1,6 @@ -use detail::{align_down, mut_offset}; -use reg_context::InitFn; -use stack::Stack; +use crate::detail::{align_down, mut_offset}; +use crate::r...
1
3
3
7ae6c3016a71ca47f9137254c2d56b0565674267
Xudong Huang
2019-06-12T02:39:27
:pencil: update to 2018 edition
diff --git a/Cargo.toml b/Cargo.toml index 97063bc..7ff98ed 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,7 @@ [package] name = "generator" version = "0.6.13" +edition = "2018" authors = ["Xudong Huang <huangxu008@hotmail.com>"] license = "MIT/Apache-2.0" repository = "https://github.com/Xudong-Huang/genera...
11
38
52
f3d2a9c3f7a28f212da2f45c38b84f87a1364ed4
Xudong Huang
2019-04-13T13:51:26
:pencil: bump version to 0.6.13
diff --git a/Cargo.toml b/Cargo.toml index 2e4e70d..97063bc 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "generator" -version = "0.6.12" +version = "0.6.13" authors = ["Xudong Huang <huangxu008@hotmail.com>"] license = "MIT/Apache-2.0" repository = "https://github.com/Xudong-Huang/gene...
2
4
4
25963e871a1b951322f90e4c213472cccb3408f6
Xudong Huang
2019-04-13T13:46:18
:bug: we should forget done dummy value (#11)
diff --git a/src/gen_impl.rs b/src/gen_impl.rs index 9623671..beff432 100644 --- a/src/gen_impl.rs +++ b/src/gen_impl.rs @@ -116,7 +116,7 @@ impl<'a, A, T> GeneratorImpl<'a, A, T> { }) } - /// prefech the generator into cache + /// prefetch the generator into cache #[inline] pub fn prefe...
5
32
18
156425ca9fdcce7d0dea4da8b46e4f4790e21914
Andy Russell
2019-02-19T18:19:52
fix doc comment placement
diff --git a/src/rt.rs b/src/rt.rs index 97fc3ce..eb150fd 100644 --- a/src/rt.rs +++ b/src/rt.rs @@ -9,13 +9,15 @@ use std::ptr; use reg_context::RegContext; use stack::Stack; -/// each thread has it's own generator context stack -thread_local!(static ROOT_CONTEXT: Box<Context> = { - let mut root = Box::new(Cont...
1
9
7
6fb88db85ddd9c518681c51425a19ebf434fa09e
Xudong Huang
2019-02-19T05:59:08
:pencil: bump version to 0.6.12
diff --git a/Cargo.toml b/Cargo.toml index 99da80f..2e4e70d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "generator" -version = "0.6.11" +version = "0.6.12" authors = ["Xudong Huang <huangxu008@hotmail.com>"] license = "MIT/Apache-2.0" repository = "https://github.com/Xudong-Huang/gene...
1
1
1
71d3a30296d24fc2549dd08da73c5d5c2fcb2593
Xudong Huang
2019-02-19T05:56:48
:pencil: fix mac os release asm issue (#8)
diff --git a/src/detail/x86_64_unix.rs b/src/detail/x86_64_unix.rs index 865633c..d541225 100644 --- a/src/detail/x86_64_unix.rs +++ b/src/detail/x86_64_unix.rs @@ -16,26 +16,28 @@ mod asm_impl { /// prefetch data #[inline] pub unsafe extern "C" fn prefetch(data: *const usize) { - asm!(" - ...
2
156
147
9209ce2336011f67662c047512e4378a3a5f60bd
Xudong Huang
2019-02-18T06:50:30
:pencil: remove get_scope api (#9)
diff --git a/benches/lib.rs b/benches/lib.rs index 5b9f7a2..9d93495 100644 --- a/benches/lib.rs +++ b/benches/lib.rs @@ -161,11 +161,10 @@ fn init_gen(b: &mut Bencher) { assert_eq!(g.is_done(), true); b.iter(|| { - let s = g.get_scope(); let clo = clo_gen(); // this cost about 20ns ...
4
20
20
75a9de1f805fd509c757a17f88d9e14d19fa602b
Xudong Huang
2019-02-15T05:42:07
:pencil: bump version to 0.6.11
diff --git a/Cargo.toml b/Cargo.toml index d7e196b..99da80f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "generator" -version = "0.6.10" +version = "0.6.11" authors = ["Xudong Huang <huangxu008@hotmail.com>"] license = "MIT/Apache-2.0" repository = "https://github.com/Xudong-Huang/gene...
1
1
1
965ab486bf8f4435c664230363081f5be3705a8a
Xudong Huang
2019-02-15T05:40:29
:gift: add co_set_para api
diff --git a/src/lib.rs b/src/lib.rs index daabd6f..76fb1f7 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -26,4 +26,6 @@ mod yield_; pub use gen_impl::{Generator, GeneratorImpl, Gn}; pub use rt::{get_local_data, is_generator, Error}; pub use scope::Scope; -pub use yield_::{co_get_yield, co_yield_with, done, get_yield,...
3
23
1
0f7f2761da73c8b04bc6efa350cdd09b84be98ec
Xudong Huang
2018-11-19T11:35:47
:pencil: fix some clippy warnings
diff --git a/build.rs b/build.rs index 141e182..2f52384 100644 --- a/build.rs +++ b/build.rs @@ -34,11 +34,13 @@ fn main() { let abi = match arch { "arm" | "arm64" => "aapcs", "mips32" => "o32", - _ => if is_win { - "ms" - } else { - "sysv" - }, + ...
8
24
26
f331debf7bbe6749da1e1a4ac67d680f7e7d9349
Xudong Huang
2018-07-10T06:23:50
:pencil: format code
diff --git a/benches/lib.rs b/benches/lib.rs index 291b58c..5b9f7a2 100644 --- a/benches/lib.rs +++ b/benches/lib.rs @@ -4,6 +4,7 @@ extern crate generator; extern crate test; use std::panic; + use generator::*; use test::Bencher; diff --git a/examples/send.rs b/examples/send.rs index ec8b578..30f0226 100644 --...
6
9
5