Sign in
chromium
/
external
/
github.com
/
WebAssembly
/
binaryen
/
refs/heads/debuginfo
/
.
/
test
/
wasm_backend
/
globals_only.cpp
blob: 9a2f1bcc8ceef47dd3881ae12b5cfdb076bdc4d6 [
file
] [
log
] [
blame
] [
edit
]
#include
<emscripten.h>
char
c
=
10
;
short
s
=
20
;
int
i
=
55
;
void
print
(
int
v
)
{
int
*
x
=
(
int
*)
8
;
*
x
=
v
;
EM_ASM
({
Module
.
print
(
"print: "
+
HEAP32
[
8
>>
2
]);
});
}
int
main
()
{
print
(
1
);
print
(
c
);
print
(
s
);
print
(
i
);
}