File tree 3 files changed +11
-26
lines changed
3 files changed +11
-26
lines changed Original file line number Diff line number Diff line change @@ -90,8 +90,9 @@ pub mod arch {
90
90
/// See the [module documentation](../index.html) for more details.
91
91
#[ cfg( any( target_arch = "wasm32" , dox) ) ]
92
92
#[ doc( cfg( target_arch = "wasm32" ) ) ]
93
- #[ unstable ( feature = "stdsimd " , issue = "27731 " ) ]
93
+ #[ stable ( feature = "simd_wasm32 " , since = "1.33.0 " ) ]
94
94
pub mod wasm32 {
95
+ #[ stable( feature = "simd_wasm32" , since = "1.33.0" ) ]
95
96
pub use coresimd:: wasm32:: * ;
96
97
}
97
98
Original file line number Diff line number Diff line change @@ -24,11 +24,12 @@ extern "C" {
24
24
#[ inline]
25
25
#[ cfg_attr( test, assert_instr( "memory.size" , mem = 0 ) ) ]
26
26
#[ rustc_args_required_const( 0 ) ]
27
- pub unsafe fn size ( mem : i32 ) -> i32 {
27
+ #[ stable( feature = "simd_wasm32" , since = "1.33.0" ) ]
28
+ pub unsafe fn memory_size ( mem : u32 ) -> usize {
28
29
if mem != 0 {
29
30
:: intrinsics:: abort ( ) ;
30
31
}
31
- llvm_memory_size ( 0 )
32
+ llvm_memory_size ( 0 ) as usize
32
33
}
33
34
34
35
/// Corresponding intrinsic to wasm's [`memory.grow` instruction][instr]
@@ -47,9 +48,10 @@ pub unsafe fn size(mem: i32) -> i32 {
47
48
#[ inline]
48
49
#[ cfg_attr( test, assert_instr( "memory.grow" , mem = 0 ) ) ]
49
50
#[ rustc_args_required_const( 0 ) ]
50
- pub unsafe fn grow ( mem : i32 , delta : i32 ) -> i32 {
51
+ #[ stable( feature = "simd_wasm32" , since = "1.33.0" ) ]
52
+ pub unsafe fn memory_grow ( mem : u32 , delta : usize ) -> isize {
51
53
if mem != 0 {
52
54
:: intrinsics:: abort ( ) ;
53
55
}
54
- llvm_memory_grow ( 0 , delta)
56
+ llvm_memory_grow ( 0 , delta as i32 ) as isize
55
57
}
Original file line number Diff line number Diff line change @@ -16,28 +16,10 @@ use stdsimd_test::assert_instr;
16
16
#[ cfg( test) ]
17
17
use wasm_bindgen_test:: wasm_bindgen_test;
18
18
19
- #[ inline]
20
- #[ cfg_attr( test, assert_instr( "memory.size" ) ) ]
21
- #[ rustc_deprecated( reason = "renamed to memory::size" , since = "1.30.0" ) ]
22
- #[ unstable( feature = "stdsimd" , issue = "27731" ) ]
23
- #[ allow( deprecated) ]
24
- #[ doc( hidden) ]
25
- pub unsafe fn current_memory ( ) -> i32 {
26
- memory:: size ( 0 )
27
- }
28
-
29
- #[ inline]
30
- #[ cfg_attr( test, assert_instr( "memory.grow" ) ) ]
31
- #[ rustc_deprecated( reason = "renamed to memory::grow" , since = "1.30.0" ) ]
32
- #[ unstable( feature = "stdsimd" , issue = "27731" ) ]
33
- #[ allow( deprecated) ]
34
- #[ doc( hidden) ]
35
- pub unsafe fn grow_memory ( delta : i32 ) -> i32 {
36
- memory:: grow ( 0 , delta)
37
- }
38
-
39
19
pub mod atomic;
40
- pub mod memory;
20
+
21
+ mod memory;
22
+ pub use self :: memory:: * ;
41
23
42
24
/// Generates the trap instruction `UNREACHABLE`
43
25
#[ cfg_attr( test, assert_instr( unreachable) ) ]
You can’t perform that action at this time.
0 commit comments