1
0
mirror of https://github.com/fluencelabs/wasmer synced 2025-06-25 14:41:32 +00:00

Isolated emscripten in new lib

This commit is contained in:
Syrus
2019-01-10 21:37:59 -08:00
parent ab0dae6d0c
commit de459fa5bd
990 changed files with 136 additions and 857 deletions
Cargo.lockCargo.toml
build
lib
clif-backend
emscripten
Cargo.toml
build
emtests
FS_exports.cppFS_exports.txtFS_exports.wasmFS_exports_2.txtFS_exports_assert.txtFS_exports_assert_2.txtREADME.mdclock_gettime.cclock_gettime.outclock_gettime.wasmclosebitcasts.cclosebitcasts.txtclosebitcasts.wasmdyncall.cdyncall.txtdyncall.wasmdyncall_specific.cdyncall_specific.txtdyncall_specific.wasmemscripten_get_compiler_setting.cemscripten_get_compiler_setting.outemscripten_get_compiler_setting.wasmenv.cenv.outenv.wasmfnmatch.cfnmatch.outgetValue_setValue.cppgetValue_setValue.txtgetValue_setValue.wasmgetValue_setValue_assert.txtignores.txtlegacy_exported_runtime_numbers.cpplegacy_exported_runtime_numbers.txtlegacy_exported_runtime_numbers.wasmlegacy_exported_runtime_numbers_assert.txtlocaltime.clocaltime.outlocaltime.wasmmodularize_closure_pre.cmodularize_closure_pre.outmodularize_closure_pre.wasmprintf.cprintf.outprintf.wasmputs.cputs.outputs.wasmstackAlloc.cppstackAlloc.txtstackAlloc.wasmstack_overflow.cppstack_overflow.wasmtest_addr_of_stacked.ctest_addr_of_stacked.outtest_addr_of_stacked.wasmtest_alloca.ctest_alloca.outtest_alloca.wasmtest_alloca_stack.ctest_alloca_stack.outtest_alloca_stack.wasmtest_array2.ctest_array2.outtest_array2.wasmtest_array2b.ctest_array2b.outtest_array2b.wasmtest_assert.ctest_assert.outtest_atexit.ctest_atexit.outtest_atoX.ctest_atoX.outtest_atoX.wasmtest_atomic.ctest_atomic.outtest_atomic.wasmtest_atomic_cxx.cpptest_atomic_cxx.txttest_atomic_cxx.wasmtest_bigarray.ctest_bigarray.outtest_bitfields.ctest_bitfields.outtest_bsearch.ctest_bsearch.outtest_bsearch.wasmtest_bswap64.ctest_bswap64.outtest_ccall.cpptest_ccall.outtest_ccall.wasmtest_class.ctest_class.outtest_complex.ctest_complex.outtest_complex.wasmtest_constglobalstructs.ctest_constglobalstructs.outtest_conststructs.ctest_conststructs.outtest_copyop.ctest_copyop.outtest_cxx03_do_run.ctest_cxx03_do_run.outtest_demangle_stacks.cpptest_demangle_stacks.outtest_demangle_stacks.wasmtest_demangle_stacks_noassert.cpptest_demangle_stacks_noassert.outtest_demangle_stacks_noassert.wasmtest_direct_string_constant_usage.ctest_direct_string_constant_usage.outtest_dlfcn_self.ctest_dlfcn_self.outtest_dlmalloc_partial_2.ctest_dlmalloc_partial_2.outtest_dlmalloc_partial_2.wasmtest_double_i64_conversion.ctest_double_i64_conversion.outtest_double_varargs.ctest_double_varargs.outtest_double_varargs.wasmtest_dynamic_cast.ctest_dynamic_cast.outtest_dynamic_cast_2.ctest_dynamic_cast_2.outtest_dynamic_cast_b.ctest_dynamic_cast_b.outtest_em_asm.cpptest_em_asm.outtest_em_asm.wasmtest_em_asm_2.cpptest_em_asm_2.outtest_em_asm_2.wasmtest_em_asm_parameter_pack.cpptest_em_asm_parameter_pack.outtest_em_asm_parameter_pack.wasmtest_em_asm_signatures.cpptest_em_asm_signatures.outtest_em_asm_signatures.wasmtest_em_asm_unicode.cpptest_em_asm_unicode.outtest_em_asm_unicode.wasmtest_em_asm_unused_arguments.cpptest_em_asm_unused_arguments.outtest_em_asm_unused_arguments.wasmtest_em_js.cpptest_em_js.outtest_em_js.wasmtest_embind_5.cpptest_embind_5.outtest_emmalloc.cpptest_emmalloc.txttest_emptyclass.ctest_emptyclass.outtest_emscripten_api.cpptest_emscripten_api.outtest_emscripten_api.wasmtest_emulate_function_pointer_casts.cpptest_emulate_function_pointer_casts.wasmtest_erf.ctest_erf.outtest_erf.wasmtest_errar.ctest_errar.outtest_errar.wasmtest_exceptions_2.cpptest_exceptions_2.outtest_exceptions_2.wasmtest_exceptions_alias.ctest_exceptions_alias.outtest_exceptions_convert.cpptest_exceptions_convert.txttest_exceptions_convert.wasmtest_exceptions_destroy_virtual.cpptest_exceptions_destroy_virtual.txttest_exceptions_destroy_virtual.wasmtest_exceptions_libcxx.cpptest_exceptions_libcxx.txttest_exceptions_libcxx.wasmtest_exceptions_multi.cpptest_exceptions_multi.outtest_exceptions_multi.wasmtest_exceptions_multiple_inherit.cpptest_exceptions_multiple_inherit.txttest_exceptions_multiple_inherit.wasmtest_exceptions_multiple_inherit_rethrow.cpptest_exceptions_multiple_inherit_rethrow.txttest_exceptions_multiple_inherit_rethrow.wasmtest_exceptions_primary.cpptest_exceptions_primary.txttest_exceptions_primary.wasmtest_exceptions_refcount.cpptest_exceptions_refcount.txttest_exceptions_refcount.wasmtest_exceptions_resume.cpptest_exceptions_resume.txttest_exceptions_resume.wasmtest_exceptions_rethrow.cpptest_exceptions_rethrow.txttest_exceptions_rethrow.wasmtest_exceptions_simplify_cfg.cpptest_exceptions_simplify_cfg.txttest_exceptions_simplify_cfg.wasmtest_exceptions_std.cpptest_exceptions_std.outtest_exceptions_std.wasmtest_exceptions_typed.ctest_exceptions_typed.outtest_exceptions_virtual_inheritance.cpptest_exceptions_virtual_inheritance.txttest_exceptions_virtual_inheritance.wasmtest_exceptions_white_list.cpptest_exceptions_white_list.outtest_exceptions_white_list.wasmtest_exceptions_white_list_2.ctest_exceptions_white_list_2.outtest_exceptions_white_list_empty.outtest_fakestat.ctest_fakestat.outtest_fast_math.ctest_fast_math.outtest_fast_math.wasmtest_fcvt.ctest_fcvt.outtest_flexarray_struct.ctest_flexarray_struct.outtest_flexarray_struct.wasmtest_float32_precise.ctest_float32_precise.outtest_float32_precise.wasmtest_float_builtins.ctest_float_builtins.outtest_float_builtins.wasmtest_floatvars.ctest_floatvars.outtest_frexp.ctest_frexp.outtest_frexp.wasmtest_funcptr.ctest_funcptr.outtest_funcptr.wasmtest_funcptr_import_type.cpptest_funcptr_import_type.outtest_funcptr_namecollide.ctest_funcptr_namecollide.outtest_funcptr_namecollide.wasmtest_funcptrfunc.ctest_funcptrfunc.outtest_funcptrfunc.wasmtest_funcs.ctest_funcs.outtest_funcs.wasmtest_functionpointer_libfunc_varargs.ctest_functionpointer_libfunc_varargs.outtest_functionpointer_libfunc_varargs.wasmtest_fwrite_0.ctest_fwrite_0.outtest_fwrite_0.wasmtest_getgep.ctest_getgep.outtest_getgep.wasmtest_getloadavg.ctest_getloadavg.outtest_getloadavg.wasmtest_getopt.ctest_getopt.outtest_getopt.wasmtest_getopt_long.ctest_getopt_long.outtest_getopt_long.wasmtest_globaldoubles.ctest_globaldoubles.outtest_globaldoubles.wasmtest_globals.ctest_globals.outtest_globals.wasmtest_gmtime.ctest_gmtime.outtest_gmtime.wasmtest_hello_world.ctest_hello_world.outtest_hello_world.wasmtest_i16_emcc_intrinsic.ctest_i16_emcc_intrinsic.outtest_i16_emcc_intrinsic.wasmtest_i32_mul_precise.ctest_i32_mul_precise.outtest_i32_mul_precise.wasmtest_i64.ctest_i64.outtest_i64.wasmtest_i64_2.ctest_i64_2.outtest_i64_3.ctest_i64_3.outtest_i64_4.ctest_i64_4.outtest_i64_4.wasmtest_i64_7z.ctest_i64_7z.outtest_i64_7z.wasmtest_i64_b.ctest_i64_b.outtest_i64_cmp.ctest_i64_cmp.outtest_i64_cmp2.ctest_i64_cmp2.outtest_i64_cmp2.wasmtest_i64_double.ctest_i64_double.outtest_i64_i16.ctest_i64_i16.outtest_i64_i16.wasmtest_i64_llabs.ctest_i64_llabs.outtest_i64_llabs.wasmtest_i64_precise.ctest_i64_precise.outtest_i64_precise.wasmtest_i64_precise_needed.ctest_i64_precise_needed.outtest_i64_precise_needed.wasmtest_i64_precise_unneeded.ctest_i64_precise_unneeded.outtest_i64_precise_unneeded.wasmtest_i64_qdouble.ctest_i64_qdouble.outtest_i64_qdouble.wasmtest_i64_umul.ctest_i64_umul.outtest_i64_umul.wasmtest_i64_varargs.ctest_i64_varargs.outtest_i64_varargs.wasmtest_i64_zextneg.ctest_i64_zextneg.outtest_i64_zextneg.wasmtest_if.ctest_if.outtest_if.wasmtest_if_else.ctest_if_else.outtest_if_else.wasmtest_indirectbr.ctest_indirectbr.outtest_indirectbr.wasmtest_indirectbr_many.ctest_indirectbr_many.outtest_indirectbr_many.wasmtest_inherit.ctest_inherit.outtest_inlinejs.ctest_inlinejs.outtest_inlinejs2.ctest_inlinejs2.outtest_inlinejs3.ctest_inlinejs3.outtest_intentional_fault.ctest_intentional_fault.wasmtest_intvars.ctest_intvars.outtest_isdigit_l.ctest_isdigit_l.outtest_isnan.ctest_isnan.outtest_isnan.wasmtest_istream.ctest_istream.outtest_iswdigit.ctest_iswdigit.outtest_libcextra.ctest_libcextra.outtest_libcextra.wasmtest_libgen.ctest_libgen.outtest_libgen.wasmtest_linked_list.ctest_linked_list.outtest_literal_negative_zero.ctest_literal_negative_zero.outtest_literal_negative_zero.wasmtest_llrint.ctest_llrint.outtest_llrint.wasmtest_llvm_fabs.ctest_llvm_fabs.outtest_llvm_fabs.wasmtest_llvm_intrinsics.cpptest_llvm_intrinsics.outtest_llvm_intrinsics.wasmtest_llvm_used.ctest_llvm_used.outtest_llvmswitch.ctest_llvmswitch.outtest_llvmswitch.wasmtest_longjmp.ctest_longjmp.outtest_longjmp.wasmtest_longjmp2.ctest_longjmp2.outtest_longjmp2.wasmtest_longjmp3.ctest_longjmp3.outtest_longjmp3.wasmtest_longjmp4.ctest_longjmp4.outtest_longjmp4.wasmtest_longjmp_exc.ctest_longjmp_exc.outtest_longjmp_exc.wasmtest_longjmp_funcptr.ctest_longjmp_funcptr.outtest_longjmp_funcptr.wasmtest_longjmp_repeat.ctest_longjmp_repeat.outtest_longjmp_repeat.wasmtest_longjmp_stacked.ctest_longjmp_stacked.outtest_longjmp_stacked.wasmtest_longjmp_throw.cpptest_longjmp_throw.outtest_longjmp_throw.wasmtest_longjmp_unwind.ctest_longjmp_unwind.outtest_longjmp_unwind.wasmtest_loop.ctest_loop.outtest_loop.wasmtest_lower_intrinsics.ctest_lower_intrinsics.outtest_lower_intrinsics.wasmtest_main_module_static_align.cpptest_main_module_static_align.txttest_main_module_static_align.wasmtest_main_thread_async_em_asm.cpptest_main_thread_async_em_asm.outtest_main_thread_async_em_asm.wasmtest_mainenv.ctest_mainenv.outtest_mainenv.wasmtest_math.ctest_math.outtest_mathfuncptr.ctest_mathfuncptr.outtest_mathfuncptr.wasmtest_memcpy2.ctest_memcpy2.outtest_memcpy2.wasmtest_memcpy3.ctest_memcpy3.outtest_memcpy3.wasmtest_memcpy_memcmp.ctest_memcpy_memcmp.outtest_memcpy_memcmp.wasmtest_memmove.ctest_memmove.outtest_memmove.wasmtest_memmove2.ctest_memmove2.outtest_memmove2.wasmtest_memmove3.ctest_memmove3.outtest_memmove3.wasmtest_memorygrowth.ctest_memorygrowth.wasmtest_memorygrowth_2.ctest_memorygrowth_2.wasmtest_memorygrowth_3.ctest_memorygrowth_3.txttest_memorygrowth_3.wasmtest_memorygrowth_wasm_mem_max.ctest_memorygrowth_wasm_mem_max.txttest_memorygrowth_wasm_mem_max.wasmtest_memset.ctest_memset.outtest_memset.wasmtest_mmap.ctest_mmap.outtest_mmap.wasmtest_mod_globalstruct.ctest_mod_globalstruct.outtest_negative_zero.ctest_negative_zero.outtest_negative_zero.wasmtest_nested_struct_varargs.ctest_nested_struct_varargs.outtest_nested_struct_varargs.wasmtest_nl_types.ctest_nl_types.outtest_nl_types.wasmtest_perrar.ctest_perrar.outtest_perrar.wasmtest_phiundef.ctest_phiundef.outtest_phiundef.wasmtest_poll.ctest_poll.outtest_poll.wasmtest_polymorph.ctest_polymorph.outtest_posixtime.ctest_posixtime.outtest_posixtime.wasmtest_posixtime_no_monotonic.outtest_printf_2.ctest_printf_2.outtest_printf_2.wasmtest_printf_more.ctest_printf_more.outtest_printf_more.wasmtest_ptrtoint.outtest_random_device.cpptest_random_device.txttest_regex.ctest_regex.outtest_regex.wasmtest_reinterpreted_ptrs.ctest_reinterpreted_ptrs.outtest_relocatable_void_function.ctest_relocatable_void_function.outtest_relocatable_void_function.wasmtest_rounding.ctest_rounding.outtest_rounding.wasmtest_runtime_stacksave.ctest_runtime_stacksave.wasmtest_set_align.ctest_set_align.outtest_set_align.wasmtest_siglongjmp.ctest_siglongjmp.outtest_siglongjmp.wasmtest_simd.ctest_simd.outtest_simd10.ctest_simd10.outtest_simd11.ctest_simd11.outtest_simd12.ctest_simd12.outtest_simd13.ctest_simd13.outtest_simd14.ctest_simd14.outtest_simd15.ctest_simd15.outtest_simd16.ctest_simd16.outtest_simd2.ctest_simd2.outtest_simd3.ctest_simd3.outtest_simd4.ctest_simd4.outtest_simd5.ctest_simd5.outtest_simd6.ctest_simd6.outtest_simd7.ctest_simd7.outtest_simd8.ctest_simd8.outtest_simd9.ctest_simd9.outtest_simd_dyncall.cpptest_simd_dyncall.txttest_simd_float32x4.ctest_simd_float32x4.outtest_simd_float64x2.ctest_simd_float64x2.outtest_simd_int16x8.ctest_simd_int16x8.outtest_simd_int32x4.ctest_simd_int32x4.outtest_simd_int8x16.ctest_simd_int8x16.outtest_simd_set_epi64x.ctest_simd_set_epi64x.outtest_simd_shift_right.ctest_simd_shift_right.outtest_simd_sitofp.ctest_simd_sitofp.outtest_sintvars.ctest_sintvars.outtest_sintvars.wasmtest_sizeof.cpptest_sizeof.outtest_sizeof.wasmtest_sscanf.ctest_sscanf.outtest_sscanf.wasmtest_sscanf_3.ctest_sscanf_3.outtest_sscanf_3.wasmtest_sscanf_4.ctest_sscanf_4.outtest_sscanf_4.wasmtest_sscanf_5.ctest_sscanf_5.outtest_sscanf_5.wasmtest_sscanf_6.ctest_sscanf_6.outtest_sscanf_6.wasmtest_sscanf_caps.ctest_sscanf_caps.outtest_sscanf_caps.wasmtest_sscanf_float.ctest_sscanf_float.outtest_sscanf_float.wasmtest_sscanf_hex.cpptest_sscanf_hex.outtest_sscanf_hex.wasmtest_sscanf_n.ctest_sscanf_n.outtest_sscanf_n.wasmtest_sscanf_other_whitespace.ctest_sscanf_other_whitespace.outtest_sscanf_other_whitespace.wasmtest_sscanf_skip.ctest_sscanf_skip.outtest_sscanf_skip.wasmtest_sscanf_whitespace.ctest_sscanf_whitespace.outtest_sscanf_whitespace.wasmtest_stack.ctest_stack.outtest_stack_align.cpptest_stack_align.wasmtest_stack_byval.ctest_stack_byval.outtest_stack_restore.ctest_stack_restore.outtest_stack_varargs.ctest_stack_varargs.outtest_stack_varargs.wasmtest_stack_void.ctest_stack_void.outtest_stack_void.wasmtest_static_variable.ctest_static_variable.outtest_statics.ctest_statics.outtest_statvfs.ctest_statvfs.outtest_statvfs.wasmtest_std_cout_new.cpptest_std_cout_new.outtest_std_cout_new.wasmtest_stdlibs.ctest_stdlibs.outtest_stdvec.ctest_stdvec.outtest_strcasecmp.ctest_strcasecmp.outtest_strcasecmp.wasmtest_strcmp_uni.ctest_strcmp_uni.outtest_strcmp_uni.wasmtest_strftime.cpptest_strftime.outtest_strftime.wasmtest_strings.ctest_strings.outtest_strings.wasmtest_strndup.ctest_strndup.outtest_strndup.wasmtest_strptime_days.ctest_strptime_days.outtest_strptime_days.wasmtest_strptime_reentrant.ctest_strptime_reentrant.outtest_strptime_reentrant.wasmtest_strptime_tm.ctest_strptime_tm.outtest_strstr.ctest_strstr.outtest_strstr.wasmtest_strtod.ctest_strtod.outtest_strtod.wasmtest_strtok.ctest_strtok.outtest_strtok.wasmtest_strtol_bin.ctest_strtol_bin.outtest_strtol_bin.wasmtest_strtol_dec.ctest_strtol_dec.outtest_strtol_dec.wasmtest_strtol_hex.ctest_strtol_hex.outtest_strtol_hex.wasmtest_strtol_oct.ctest_strtol_oct.outtest_strtol_oct.wasmtest_strtold.ctest_strtold.outtest_strtold.wasmtest_strtoll_bin.ctest_strtoll_bin.outtest_strtoll_bin.wasmtest_strtoll_dec.ctest_strtoll_dec.outtest_strtoll_dec.wasmtest_strtoll_hex.ctest_strtoll_hex.outtest_strtoll_hex.wasmtest_strtoll_oct.ctest_strtoll_oct.outtest_strtoll_oct.wasmtest_struct_varargs.ctest_struct_varargs.outtest_struct_varargs.wasmtest_structs.ctest_structs.outtest_time_c.ctest_time_c.outtest_time_c.wasmtest_timeb.ctest_timeb.outtest_tinyfuncstr.ctest_tinyfuncstr.outtest_tracing.ctest_tracing.outtest_tracing.wasmtest_transtrcase.ctest_transtrcase.outtest_transtrcase.wasmtest_trickystring.ctest_trickystring.outtest_trickystring.wasmtest_typeid.ctest_typeid.outtest_uname.ctest_uname.outtest_uname.wasmtest_unary_literal.cpptest_unary_literal.outtest_unary_literal.wasmtest_utf.ctest_utf.outtest_utf.wasmtest_varargs.ctest_varargs.outtest_varargs.wasmtest_varargs_multi.ctest_varargs_multi.outtest_varargs_multi.wasmtest_vprintf.ctest_vprintf.outtest_vprintf.wasmtest_vsnprintf.ctest_vsnprintf.outtest_vsnprintf.wasmtest_wprintf.cpptest_wprintf.outtest_wprintf.wasmtest_write_stdout_fileno.ctest_write_stdout_fileno.outtest_write_stdout_fileno.wasmtest_zero_multiplication.ctest_zero_multiplication.outtest_zero_multiplication.wasmtest_zerodiv.ctest_zerodiv.outtest_zerodiv.wasm
src
tests
emtest.rs
emtests
_common.rsclock_gettime.rsemscripten_get_compiler_setting.rsenv.rsfs_exports.rsgetvalue_setvalue.rslegacy_exported_runtime_numbers.rslocaltime.rsmod.rsmodularize_closure_pre.rsprintf.rsputs.rsstackalloc.rssyscalls.rstest_addr_of_stacked.rstest_alloca.rstest_alloca_stack.rstest_array2.rstest_array2b.rstest_atomic.rstest_atox.rstest_bsearch.rstest_ccall.rstest_complex.rstest_demangle_stacks.rstest_demangle_stacks_noassert.rstest_dlmalloc_partial_2.rstest_double_varargs.rstest_em_asm.rstest_em_asm_2.rstest_em_asm_parameter_pack.rstest_em_asm_signatures.rstest_em_asm_unicode.rstest_em_asm_unused_arguments.rstest_em_js.rstest_emscripten_api.rstest_erf.rstest_errar.rstest_exceptions_2.rstest_exceptions_multi.rstest_exceptions_std.rstest_exceptions_white_list.rstest_fast_math.rstest_flexarray_struct.rstest_float32_precise.rstest_float_builtins.rstest_frexp.rstest_funcptr.rstest_funcptr_namecollide.rstest_funcptrfunc.rstest_funcs.rstest_functionpointer_libfunc_varargs.rstest_fwrite_0.rstest_getgep.rstest_getloadavg.rstest_getopt.rstest_getopt_long.rstest_globaldoubles.rstest_globals.rstest_gmtime.rstest_hello_world.rstest_i16_emcc_intrinsic.rstest_i32_mul_precise.rstest_i64.rstest_i64_4.rstest_i64_7z.rstest_i64_cmp2.rstest_i64_i16.rstest_i64_llabs.rstest_i64_precise.rstest_i64_precise_needed.rstest_i64_precise_unneeded.rstest_i64_qdouble.rstest_i64_umul.rstest_i64_varargs.rstest_i64_zextneg.rstest_if.rstest_if_else.rstest_indirectbr.rstest_indirectbr_many.rstest_isnan.rstest_libcextra.rstest_libgen.rstest_literal_negative_zero.rstest_llrint.rstest_llvm_fabs.rstest_llvm_intrinsics.rstest_llvmswitch.rstest_longjmp.rstest_longjmp2.rstest_longjmp3.rstest_longjmp4.rstest_longjmp_exc.rstest_longjmp_funcptr.rstest_longjmp_repeat.rstest_longjmp_stacked.rstest_longjmp_throw.rstest_longjmp_unwind.rstest_loop.rstest_lower_intrinsics.rstest_main_thread_async_em_asm.rstest_mainenv.rstest_mathfuncptr.rstest_memcpy2.rstest_memcpy3.rstest_memcpy_memcmp.rstest_memmove.rstest_memmove2.rstest_memmove3.rstest_memset.rstest_mmap.rstest_negative_zero.rstest_nested_struct_varargs.rstest_nl_types.rstest_perrar.rstest_phiundef.rstest_poll.rstest_posixtime.rstest_printf_2.rstest_printf_more.rstest_regex.rstest_relocatable_void_function.rstest_rounding.rstest_set_align.rstest_siglongjmp.rstest_sintvars.rstest_sizeof.rstest_sscanf.rstest_sscanf_3.rstest_sscanf_4.rstest_sscanf_5.rstest_sscanf_6.rstest_sscanf_caps.rstest_sscanf_float.rstest_sscanf_hex.rstest_sscanf_n.rstest_sscanf_other_whitespace.rstest_sscanf_skip.rstest_sscanf_whitespace.rstest_stack_varargs.rstest_stack_void.rstest_statvfs.rstest_std_cout_new.rstest_strcasecmp.rstest_strcmp_uni.rstest_strftime.rstest_strings.rstest_strndup.rstest_strptime_days.rstest_strptime_reentrant.rstest_strstr.rstest_strtod.rstest_strtok.rstest_strtol_bin.rstest_strtol_dec.rstest_strtol_hex.rstest_strtol_oct.rstest_strtold.rstest_strtoll_bin.rstest_strtoll_dec.rstest_strtoll_hex.rstest_strtoll_oct.rstest_struct_varargs.rstest_time_c.rstest_tracing.rstest_transtrcase.rstest_trickystring.rstest_uname.rstest_unary_literal.rstest_utf.rstest_varargs.rstest_varargs_multi.rstest_vprintf.rstest_vsnprintf.rstest_wprintf.rstest_write_stdout_fileno.rstest_zero_multiplication.rstest_zerodiv.rs
runtime
src

@ -0,0 +1,33 @@
// Copyright 2014 The Emscripten Authors. All rights reserved.
// Emscripten is available under two separate licenses, the MIT license and the
// University of Illinois/NCSA Open Source License. Both these licenses can be
// found in the LICENSE file.
#include <iostream>
#include <stdexcept>
using std::cout;
using std::endl;
struct my_exception : public virtual std::runtime_error {
// To allow this to be thrown directly in the tests below.
explicit my_exception(const std::string &what)
: std::runtime_error(what)
{}
protected:
my_exception()
// This won't be called because of virtual inheritance.
: std::runtime_error("::my_exception")
{}
};
int main(const int argc, const char * const * const argv) {
try {
cout << "Throwing ::my_exception" << endl;
throw ::my_exception("my_what");
} catch(const std::runtime_error &ex) {
cout << "Caught std::runtime_error: " << ex.what() << endl;
}
}