Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
b91ccc3
On return type `impl Trait` for block with no expr point at last semi
estebank Feb 5, 2019
da5a0cd
De-duplicate number formatting implementations for smaller code size
fitzgen Feb 7, 2019
ed2157a
De-duplicate write_prefix lambda in pad_integral
fitzgen Feb 7, 2019
e633f15
Un-monomorphize and inline formatting with padding
fitzgen Feb 7, 2019
0afda05
Add fixme
estebank Feb 7, 2019
05f0dee
Improve the error messages for missing stability attributes
varkor Feb 7, 2019
c104b5c
Also de-duplicate 32- and 64-bit number formatting on wasm32
fitzgen Feb 7, 2019
05df9ff
Add a wasm code size test for stringifying numbers
fitzgen Feb 7, 2019
8fea705
Use write_char for writing padding characters
fitzgen Feb 8, 2019
f00f0e6
Don't shadow the provided `stringify!` macro in a wasm code size test…
fitzgen Feb 8, 2019
03d4fd9
Use descriptive variant name
varkor Feb 8, 2019
bb1eed0
Correct descriptive item name for impl
varkor Feb 8, 2019
18089df
Fix ICE and invalid filenames in MIR printing code
matthewjasper Feb 10, 2019
d7afd3e
Add test for MIR printing changes
matthewjasper Feb 10, 2019
3737d4d
Do not apply future deprecation warning for #[deprecated]
varkor Feb 5, 2019
87cd09b
Don't display "Deprecated since" for non-rustc deprecated items
varkor Feb 5, 2019
2a8a25b
Display "Deprecation planned" in rustdoc for future rustc deprecations
varkor Feb 5, 2019
3dc660f
Update existing rustdoc test
varkor Feb 6, 2019
01df8fe
Add a rustdoc test for future rustc_deprecated attributes
varkor Feb 6, 2019
c875241
Add rustdoc index page test for future deprecation attributes
varkor Feb 6, 2019
b5fa870
Add a test for rustc_deprecated
varkor Feb 11, 2019
48b0c9d
Only suggest imports if not imported.
davidtwco Feb 11, 2019
ddb6c4f
Set the query in the ImplicitCtxt before trying to mark it green
Zoxc Feb 12, 2019
3a8448c
Fix rustc_driver swallowing errors when compilation is stopped
gnzlbg Feb 12, 2019
eac43cc
HirId-ify hir::BodyId
ljedrz Feb 4, 2019
15e4bd3
target/uefi: clarify documentation
dvdhrm Feb 13, 2019
9cb5831
Rollup merge of #58167 - ljedrz:HirIdify_body_id, r=Zoxc
Centril Feb 13, 2019
a603e2a
Rollup merge of #58202 - varkor:deprecated-future-external, r=Guillau…
Centril Feb 13, 2019
7579ba9
Rollup merge of #58204 - estebank:impl-trait-semi, r=zackmdavis
Centril Feb 13, 2019
dfd8454
Rollup merge of #58272 - fitzgen:num-format-code-size, r=Mark-Simulacrum
Centril Feb 13, 2019
d18e4f0
Rollup merge of #58276 - varkor:missing-stability-attr-top-level, r=d…
Centril Feb 13, 2019
e35e9ee
Rollup merge of #58354 - matthewjasper:mir-dump-fixes, r=wesleywiser
Centril Feb 13, 2019
2a61352
Rollup merge of #58381 - davidtwco:issue-42944, r=estebank
Centril Feb 13, 2019
61caf1f
Rollup merge of #58386 - Zoxc:fix-54242, r=michaelwoerister
Centril Feb 13, 2019
df020a7
Rollup merge of #58400 - gnzlbg:fix_driver, r=oli-obk
Centril Feb 13, 2019
01533d4
Rollup merge of #58420 - dvdhrm:target-uefi-comments, r=nagisa
Centril Feb 13, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add a wasm code size test for stringifying numbers
  • Loading branch information
fitzgen committed Feb 8, 2019
commit 05df9ff41537bab6586eea7ad9272eeb611e09e1
10 changes: 10 additions & 0 deletions src/test/run-make/wasm-stringify-ints-small/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
-include ../../run-make-fulldeps/tools.mk

ifeq ($(TARGET),wasm32-unknown-unknown)
all:
$(RUSTC) foo.rs -C lto -O --target wasm32-unknown-unknown
wc -c < $(TMPDIR)/foo.wasm
[ "`wc -c < $(TMPDIR)/foo.wasm`" -lt "21000" ]
else
all:
endif
39 changes: 39 additions & 0 deletions src/test/run-make/wasm-stringify-ints-small/foo.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
#![crate_type = "cdylib"]

extern "C" {
fn observe(ptr: *const u8, len: usize);

fn get_u8() -> u8;
fn get_i8() -> i8;
fn get_u16() -> u16;
fn get_i16() -> i16;
fn get_u32() -> u32;
fn get_i32() -> i32;
fn get_u64() -> u64;
fn get_i64() -> i64;
fn get_usize() -> usize;
fn get_isize() -> isize;
}

macro_rules! stringify {
( $($f:ident)* ) => {
$(
let s = $f().to_string();
observe(s.as_ptr(), s.len());
)*
};
}

#[no_mangle]
pub unsafe extern "C" fn foo() {
stringify!(get_u8);
stringify!(get_i8);
stringify!(get_u16);
stringify!(get_i16);
stringify!(get_u32);
stringify!(get_i32);
stringify!(get_u64);
stringify!(get_i64);
stringify!(get_usize);
stringify!(get_isize);
}