From b417385d55a175d5fd5f22ca9b69948f370b73e1 Mon Sep 17 00:00:00 2001 From: John DeBord Date: Tue, 13 Nov 2018 17:54:01 -0500 Subject: [PATCH 001/342] Update contracts and CMakeLists.txt --- contracts/CMakeLists.txt | 67 +- contracts/asserter/CMakeLists.txt | 13 +- contracts/asserter/asserter.cpp | 27 +- contracts/asserter/asserter.hpp | 2 +- contracts/bancor/CMakeLists.txt | 8 - contracts/bancor/bancor.cpp | 18 - contracts/bancor/bancor.hpp | 22 - contracts/bancor/converter.hpp | 166 -- contracts/bancor/eosio.system.abi | 37 - contracts/eosio.bios/CMakeLists.txt | 8 - contracts/eosio.bios/eosio.bios.abi | 263 -- contracts/eosio.bios/eosio.bios.cpp | 3 - contracts/eosio.bios/eosio.bios.hpp | 49 - contracts/eosio.msig/CMakeLists.txt | 9 - contracts/eosio.msig/README.md | 113 - contracts/eosio.msig/eosio.msig.abi | 152 -- contracts/eosio.msig/eosio.msig.cpp | 137 -- contracts/eosio.msig/eosio.msig.hpp | 36 - contracts/eosio.sudo/CMakeLists.txt | 9 - contracts/eosio.sudo/README.md | 886 ------- contracts/eosio.sudo/eosio.sudo.abi | 73 - contracts/eosio.sudo/eosio.sudo.cpp | 37 - contracts/eosio.sudo/eosio.sudo.hpp | 15 - contracts/eosio.system/CMakeLists.txt | 8 - contracts/eosio.system/README.md | 84 - contracts/eosio.system/delegate_bandwidth.cpp | 426 ---- contracts/eosio.system/eosio.system.abi | 578 ----- contracts/eosio.system/eosio.system.cpp | 198 -- contracts/eosio.system/eosio.system.hpp | 236 -- contracts/eosio.system/exchange_state.cpp | 85 - contracts/eosio.system/exchange_state.hpp | 40 - contracts/eosio.system/native.hpp | 112 - contracts/eosio.system/producer_pay.cpp | 140 -- contracts/eosio.system/voting.cpp | 288 --- contracts/eosio.token/CMakeLists.txt | 8 - contracts/eosio.token/eosio.token.abi | 78 - contracts/eosio.token/eosio.token.cpp | 120 - contracts/eosio.token/eosio.token.hpp | 83 - contracts/eosiolib/CMakeLists.txt | 6 - contracts/eosiolib/action.h | 170 -- contracts/eosiolib/action.hpp | 395 --- contracts/eosiolib/asset.hpp | 472 ---- contracts/eosiolib/chain.h | 45 - contracts/eosiolib/compiler_builtins.h | 423 ---- contracts/eosiolib/contract.hpp | 47 - contracts/eosiolib/contracts.dox | 65 - contracts/eosiolib/core_symbol.hpp.in | 7 - contracts/eosiolib/crypto.h | 240 -- contracts/eosiolib/currency.hpp | 254 -- contracts/eosiolib/datastream.hpp | 1019 -------- contracts/eosiolib/db.h | 940 ------- contracts/eosiolib/dispatcher.hpp | 155 -- contracts/eosiolib/eosio.hpp | 11 - contracts/eosiolib/eosiolib.cpp | 558 ----- contracts/eosiolib/fixed_key.hpp | 291 --- contracts/eosiolib/fixedpoint.hpp | 922 ------- contracts/eosiolib/mainpage.md | 20 - contracts/eosiolib/memory.h | 8 - contracts/eosiolib/memory.hpp | 68 - contracts/eosiolib/multi_index.hpp | 2183 ----------------- contracts/eosiolib/optional.hpp | 535 ---- contracts/eosiolib/permission.h | 68 - contracts/eosiolib/permission.hpp | 98 - contracts/eosiolib/print.h | 168 -- contracts/eosiolib/print.hpp | 321 --- contracts/eosiolib/privileged.h | 105 - contracts/eosiolib/privileged.hpp | 162 -- contracts/eosiolib/producer_schedule.hpp | 30 - contracts/eosiolib/public_key.hpp | 44 - contracts/eosiolib/reflect.hpp | 186 -- contracts/eosiolib/rpc.dox | 544 ---- contracts/eosiolib/serialize.hpp | 63 - contracts/eosiolib/singleton.hpp | 150 -- contracts/eosiolib/stdlib.hpp | 5 - contracts/eosiolib/symbol.hpp | 227 -- contracts/eosiolib/system.h | 92 - contracts/eosiolib/time.hpp | 179 -- contracts/eosiolib/transaction.h | 158 -- contracts/eosiolib/transaction.hpp | 97 - contracts/eosiolib/types.h | 123 - contracts/eosiolib/types.hpp | 220 -- contracts/eosiolib/varint.hpp | 484 ---- contracts/eosiolib/vector.hpp | 12 - contracts/hello/CMakeLists.txt | 9 +- contracts/hello/hello.cpp | 21 +- contracts/identity/CMakeLists.txt | 24 - contracts/identity/common.cpp | 27 - contracts/identity/common.hpp | 84 - contracts/identity/identity.abi | 118 - contracts/identity/identity.cpp | 188 -- contracts/identity/interface.cpp | 82 - contracts/identity/interface.hpp | 18 - contracts/identity/test/CMakeLists.txt | 7 - contracts/identity/test/identity_test.abi | 35 - contracts/identity/test/identity_test.cpp | 35 - contracts/infinite/CMakeLists.txt | 8 +- contracts/infinite/infinite.cpp | 20 +- contracts/integration_test/CMakeLists.txt | 9 +- .../integration_test/integration_test.cpp | 62 +- contracts/libc++/CMakeLists.txt | 18 - contracts/multi_index_test/CMakeLists.txt | 9 +- .../multi_index_test/multi_index_test.cpp | 292 +-- contracts/musl/CMakeLists.txt | 27 - contracts/noop/CMakeLists.txt | 9 +- contracts/noop/noop.cpp | 27 +- contracts/payloadless/CMakeLists.txt | 9 +- contracts/payloadless/payloadless.cpp | 21 +- contracts/proxy/CMakeLists.txt | 13 +- contracts/proxy/proxy.cpp | 66 +- contracts/proxy/proxy.hpp | 34 +- contracts/simple.token/CMakeLists.txt | 10 +- contracts/simple.token/simple.token.cpp | 90 +- contracts/skeleton/skeleton.cpp | 15 - contracts/skeleton/skeleton.hpp | 7 - contracts/snapshot_test/CMakeLists.txt | 9 +- contracts/snapshot_test/snapshot_test.cpp | 34 +- contracts/social/CMakeLists.txt | 5 - contracts/social/social.cpp | 107 - eosio_build.sh | 4 +- libraries/testing/CMakeLists.txt | 2 - libraries/testing/tester.cpp | 11 +- plugins/txn_test_gen_plugin/CMakeLists.txt | 2 - tests/CMakeLists.txt | 4 +- unittests/CMakeLists.txt | 4 +- unittests/contracts/CMakeLists.txt | 2 +- unittests/identity_tests.cpp | 10 +- 126 files changed, 447 insertions(+), 18145 deletions(-) delete mode 100644 contracts/bancor/CMakeLists.txt delete mode 100644 contracts/bancor/bancor.cpp delete mode 100644 contracts/bancor/bancor.hpp delete mode 100644 contracts/bancor/converter.hpp delete mode 100644 contracts/bancor/eosio.system.abi delete mode 100644 contracts/eosio.bios/CMakeLists.txt delete mode 100644 contracts/eosio.bios/eosio.bios.abi delete mode 100644 contracts/eosio.bios/eosio.bios.cpp delete mode 100644 contracts/eosio.bios/eosio.bios.hpp delete mode 100644 contracts/eosio.msig/CMakeLists.txt delete mode 100644 contracts/eosio.msig/README.md delete mode 100644 contracts/eosio.msig/eosio.msig.abi delete mode 100644 contracts/eosio.msig/eosio.msig.cpp delete mode 100644 contracts/eosio.msig/eosio.msig.hpp delete mode 100644 contracts/eosio.sudo/CMakeLists.txt delete mode 100644 contracts/eosio.sudo/README.md delete mode 100644 contracts/eosio.sudo/eosio.sudo.abi delete mode 100644 contracts/eosio.sudo/eosio.sudo.cpp delete mode 100644 contracts/eosio.sudo/eosio.sudo.hpp delete mode 100644 contracts/eosio.system/CMakeLists.txt delete mode 100644 contracts/eosio.system/README.md delete mode 100644 contracts/eosio.system/delegate_bandwidth.cpp delete mode 100644 contracts/eosio.system/eosio.system.abi delete mode 100644 contracts/eosio.system/eosio.system.cpp delete mode 100644 contracts/eosio.system/eosio.system.hpp delete mode 100644 contracts/eosio.system/exchange_state.cpp delete mode 100644 contracts/eosio.system/exchange_state.hpp delete mode 100644 contracts/eosio.system/native.hpp delete mode 100644 contracts/eosio.system/producer_pay.cpp delete mode 100644 contracts/eosio.system/voting.cpp delete mode 100644 contracts/eosio.token/CMakeLists.txt delete mode 100644 contracts/eosio.token/eosio.token.abi delete mode 100644 contracts/eosio.token/eosio.token.cpp delete mode 100644 contracts/eosio.token/eosio.token.hpp delete mode 100644 contracts/eosiolib/CMakeLists.txt delete mode 100644 contracts/eosiolib/action.h delete mode 100644 contracts/eosiolib/action.hpp delete mode 100644 contracts/eosiolib/asset.hpp delete mode 100644 contracts/eosiolib/chain.h delete mode 100644 contracts/eosiolib/compiler_builtins.h delete mode 100644 contracts/eosiolib/contract.hpp delete mode 100644 contracts/eosiolib/contracts.dox delete mode 100644 contracts/eosiolib/core_symbol.hpp.in delete mode 100644 contracts/eosiolib/crypto.h delete mode 100644 contracts/eosiolib/currency.hpp delete mode 100644 contracts/eosiolib/datastream.hpp delete mode 100644 contracts/eosiolib/db.h delete mode 100644 contracts/eosiolib/dispatcher.hpp delete mode 100644 contracts/eosiolib/eosio.hpp delete mode 100644 contracts/eosiolib/eosiolib.cpp delete mode 100644 contracts/eosiolib/fixed_key.hpp delete mode 100644 contracts/eosiolib/fixedpoint.hpp delete mode 100644 contracts/eosiolib/mainpage.md delete mode 100644 contracts/eosiolib/memory.h delete mode 100644 contracts/eosiolib/memory.hpp delete mode 100644 contracts/eosiolib/multi_index.hpp delete mode 100644 contracts/eosiolib/optional.hpp delete mode 100644 contracts/eosiolib/permission.h delete mode 100644 contracts/eosiolib/permission.hpp delete mode 100644 contracts/eosiolib/print.h delete mode 100644 contracts/eosiolib/print.hpp delete mode 100644 contracts/eosiolib/privileged.h delete mode 100644 contracts/eosiolib/privileged.hpp delete mode 100644 contracts/eosiolib/producer_schedule.hpp delete mode 100644 contracts/eosiolib/public_key.hpp delete mode 100644 contracts/eosiolib/reflect.hpp delete mode 100644 contracts/eosiolib/rpc.dox delete mode 100644 contracts/eosiolib/serialize.hpp delete mode 100644 contracts/eosiolib/singleton.hpp delete mode 100644 contracts/eosiolib/stdlib.hpp delete mode 100644 contracts/eosiolib/symbol.hpp delete mode 100644 contracts/eosiolib/system.h delete mode 100644 contracts/eosiolib/time.hpp delete mode 100644 contracts/eosiolib/transaction.h delete mode 100644 contracts/eosiolib/transaction.hpp delete mode 100644 contracts/eosiolib/types.h delete mode 100644 contracts/eosiolib/types.hpp delete mode 100644 contracts/eosiolib/varint.hpp delete mode 100644 contracts/eosiolib/vector.hpp delete mode 100644 contracts/identity/CMakeLists.txt delete mode 100644 contracts/identity/common.cpp delete mode 100644 contracts/identity/common.hpp delete mode 100644 contracts/identity/identity.abi delete mode 100644 contracts/identity/identity.cpp delete mode 100644 contracts/identity/interface.cpp delete mode 100644 contracts/identity/interface.hpp delete mode 100644 contracts/identity/test/CMakeLists.txt delete mode 100644 contracts/identity/test/identity_test.abi delete mode 100644 contracts/identity/test/identity_test.cpp delete mode 100644 contracts/libc++/CMakeLists.txt delete mode 100644 contracts/musl/CMakeLists.txt delete mode 100644 contracts/skeleton/skeleton.cpp delete mode 100644 contracts/skeleton/skeleton.hpp delete mode 100644 contracts/social/CMakeLists.txt delete mode 100644 contracts/social/social.cpp diff --git a/contracts/CMakeLists.txt b/contracts/CMakeLists.txt index bd84d155e85..eac4281b3bd 100644 --- a/contracts/CMakeLists.txt +++ b/contracts/CMakeLists.txt @@ -1,49 +1,24 @@ -# will be implictly used for any compilation unit if not overrided by SYSTEM_INCLUDE_FOLDERS parameter -# these directories go as -isystem to avoid warnings from code of third-party libraries -set(DEFAULT_SYSTEM_INCLUDE_FOLDERS ${CMAKE_SOURCE_DIR}/contracts/libc++/upstream/include ${CMAKE_SOURCE_DIR}/contracts/musl/upstream/include ${Boost_INCLUDE_DIR}) +macro(add_contract_no_abi CONTRACT_NAME TARGET) + add_executable( ${TARGET}.wasm ${ARGN} ) +endmacro() -set(STANDARD_INCLUDE_FOLDERS ${CMAKE_SOURCE_DIR}/contracts ${CMAKE_BINARY_DIR}/contracts ${CMAKE_SOURCE_DIR}/externals/magic_get/include) +# ??? +find_package(eosio.cdt) -add_subdirectory(eosiolib) -add_subdirectory(musl) -add_subdirectory(libc++) -add_subdirectory(simple.token) -add_subdirectory(eosio.token) -add_subdirectory(eosio.msig) -add_subdirectory(eosio.sudo) -add_subdirectory(multi_index_test) -add_subdirectory(snapshot_test) -add_subdirectory(eosio.system) -add_subdirectory(identity) -add_subdirectory(stltest) -add_subdirectory(test.inline) +add_subdirectory( asserter ) +add_subdirectory( hello ) +add_subdirectory( infinite ) +add_subdirectory( integration_test ) +#add_subdirectory( multi_index_test ) +add_subdirectory( noop ) +add_subdirectory( payloadless ) +add_subdirectory( proxy ) +add_subdirectory( simple.token ) +add_subdirectory( snapshot_test ) -#add_subdirectory(bancor) -add_subdirectory(hello) -add_subdirectory(asserter) -add_subdirectory(infinite) -add_subdirectory(proxy) -add_subdirectory(test_api) -add_subdirectory(test_api_mem) -add_subdirectory(test_api_db) -add_subdirectory(test_api_multi_index) -add_subdirectory(test_ram_limit) -#add_subdirectory(social) -add_subdirectory(eosio.bios) -add_subdirectory(noop) -add_subdirectory(tic_tac_toe) -add_subdirectory(payloadless) -add_subdirectory(integration_test) - - -file(GLOB SKELETONS RELATIVE ${CMAKE_SOURCE_DIR}/contracts "skeleton/*") - -# Documented multiple output support is broken, so properly setting up the multiple -# dependencies in the custom target is not possible. (CMake 3.5) -add_custom_command(OUTPUT share/eosio/skeleton/skeleton.cpp - COMMAND ${CMAKE_COMMAND} -E make_directory ../share/eosio/skeleton - COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/skeleton ../share/eosio/skeleton - DEPENDS ${SKELETONS} - COMMENT Copying skeleton contract... - VERBATIM) -add_custom_target(copy_skeleton_contract ALL DEPENDS share/eosio/skeleton/skeleton.cpp) +# add_subdirectory(test_api) +# add_subdirectory(test_api_mem) +# add_subdirectory(test_api_db) +# add_subdirectory(test_api_multi_index) +# add_subdirectory(test_ram_limit) +# add_subdirectory(tic_tac_toe) diff --git a/contracts/asserter/CMakeLists.txt b/contracts/asserter/CMakeLists.txt index e73595af1de..079773361f4 100644 --- a/contracts/asserter/CMakeLists.txt +++ b/contracts/asserter/CMakeLists.txt @@ -1,8 +1,7 @@ -file(GLOB ABI_FILES "*.abi") -configure_file("${ABI_FILES}" "${CMAKE_CURRENT_BINARY_DIR}" COPYONLY) +set( CMAKE_CXX_STANDARD 17 ) -add_wast_executable(TARGET asserter - INCLUDE_FOLDERS "${STANDARD_INCLUDE_FOLDERS}" - LIBRARIES libc libc++ eosiolib - DESTINATION_FOLDER ${CMAKE_CURRENT_BINARY_DIR} -) +include_directories( ${MYPROJECT_DIR}../ ) + +add_contract_no_abi( asserter asserter asserter.cpp ) + +configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/asserter.abi ${CMAKE_CURRENT_BINARY_DIR}/asserter.abi COPYONLY ) diff --git a/contracts/asserter/asserter.cpp b/contracts/asserter/asserter.cpp index f64ea509a1f..9249bc28e35 100644 --- a/contracts/asserter/asserter.cpp +++ b/contracts/asserter/asserter.cpp @@ -5,24 +5,25 @@ #include /// defines assert_def struct (abi) +using namespace eosio; using namespace asserter; static int global_variable = 45; extern "C" { - /// The apply method implements the dispatch of events to this contract + /// The apply method implements the dispatch of events to this contract void apply( uint64_t /* receiver */, uint64_t code, uint64_t action ) { - require_auth(code); - if( code == N(asserter) ) { - if( action == N(procassert) ) { - assertdef def = eosio::unpack_action_data(); + require_auth(code); + if( code == "asserter"_n.value ) { + if( action == "procassert"_n.value ) { + assertdef def = eosio::unpack_action_data(); - // maybe assert? - eosio_assert((uint32_t)def.condition, def.message.c_str()); - } else if( action == N(provereset) ) { - eosio_assert(global_variable == 45, "Global Variable Initialized poorly"); - global_variable = 100; - } - } - } + // maybe assert? + eosio_assert((uint32_t)def.condition, def.message.c_str()); + } else if( action == "provereset"_n.value ) { + eosio_assert(global_variable == 45, "Global Variable Initialized poorly"); + global_variable = 100; + } + } + } } diff --git a/contracts/asserter/asserter.hpp b/contracts/asserter/asserter.hpp index 99680870c04..db78422cb4c 100644 --- a/contracts/asserter/asserter.hpp +++ b/contracts/asserter/asserter.hpp @@ -6,7 +6,7 @@ #include namespace asserter { - struct assertdef { + TABLE assertdef { int8_t condition; std::string message; diff --git a/contracts/bancor/CMakeLists.txt b/contracts/bancor/CMakeLists.txt deleted file mode 100644 index b845361e8f0..00000000000 --- a/contracts/bancor/CMakeLists.txt +++ /dev/null @@ -1,8 +0,0 @@ -file(GLOB ABI_FILES "*.abi") -configure_file("${ABI_FILES}" "${CMAKE_CURRENT_BINARY_DIR}" COPYONLY) - -add_wast_executable(TARGET bancor - INCLUDE_FOLDERS "${STANDARD_INCLUDE_FOLDERS}" - LIBRARIES libc libc++ eosiolib - DESTINATION_FOLDER ${CMAKE_CURRENT_BINARY_DIR} -) diff --git a/contracts/bancor/bancor.cpp b/contracts/bancor/bancor.cpp deleted file mode 100644 index 15bc9e802c8..00000000000 --- a/contracts/bancor/bancor.cpp +++ /dev/null @@ -1,18 +0,0 @@ -/** - * @file - * @copyright defined in eos/LICENSE.txt - */ - -#include - -namespace bancor { - -extern "C" { - - /// The apply method implements the dispatch of events to this contract - void apply( uint64_t r, uint64_t c, uint64_t a ) { - bancor::example_converter::apply( c, a ); - } -} - -} diff --git a/contracts/bancor/bancor.hpp b/contracts/bancor/bancor.hpp deleted file mode 100644 index b6030908b81..00000000000 --- a/contracts/bancor/bancor.hpp +++ /dev/null @@ -1,22 +0,0 @@ -/** - * @file - * @copyright defined in eos/LICENSE.txt - */ -#pragma once - -#include -#include -#include -#include - -#include -#include - -namespace bancor { - typedef eosio::generic_currency< eosio::token > other_currency; - typedef eosio::generic_currency< eosio::token > relay_currency; - typedef eosio::generic_currency< eosio::token > cur_currency; - - typedef converter example_converter; -} /// bancor - diff --git a/contracts/bancor/converter.hpp b/contracts/bancor/converter.hpp deleted file mode 100644 index 774fc910e32..00000000000 --- a/contracts/bancor/converter.hpp +++ /dev/null @@ -1,166 +0,0 @@ -#pragma once -namespace bancor { - template - class converter_contract { - public: - typedef ConverterCurrency converter_currency; - typedef FirstCurrency first_currency; - typedef SecondCurrency second_currency; - - - static const account_name converter_account = converter_currency::code; - - struct converter_state { - typename converter_currency::token_type supply; /// total supply held by all users - typename converter_currency::token_type balance; /// supply held by converter in its own balance - }; - - struct converter_args { - eosio::account_name to_currency_account; - eosio::symbol_name to_currency_symbol; - uint64_t min_return_currency; - }; - - - template - struct connector { - typedef CurrencyType currency_type; - typedef typename converter_currency::token_type converter_token_type; - typedef typename currency_type::token_type in_token_type; - - converter_token_type convert_to_converter( in_token_type in, converter_state& state ) { - in_token_type balance = currency_type::get_balance( converter_account ); - - /// balance already changed when transfer executed, get pre-transfer balance - in_token_type previous_balance = balance - in; - - auto init_price = (previous_balance * Base) / (Weight * state.supply); - auto init_out = init_price * in; - - auto out_price = (balance*Base) / (Weight * (state.supply+init_out) ); - auto final_out = out_price * in; - - state.balance += final_out; - state.supply += final_out; - - return final_out; - } - - - in_token_type convert_from_converter( converter_token_type converter_in, converter_state& state ) { - in_token_type to_balance = CurrencyType::get_balance( converter_account ); - - auto init_price = (to_balance * Base) / (Weight * state.supply); - in_token_type init_out = init_price * converter_in; - - state.supply -= converter_in; - state.balance -= converter_in; - - auto out_price = ((to_balance-init_out) * Base) / ( Weight * (state.supply) ); - - return out_price * converter_in; - } - - }; - - - - /** - * This is called when we receive RELAY tokens from user and wish to - * convert to one of the connector currencies. - */ - static void on_convert( const typename converter_currency::transfer& trans, - const converter_args& args, - converter_state& state ) { - - if( args.to_currency_type == first_currency ) { - auto output = first_connector::convert_from_converter( trans.quantity, state ); - save_and_send( trans.from, state, output, args.min_return ); - } - else if( args.to_currency_type == second_currency ) { - auto output = second_connector::convert_from_converter( trans.quantity, state ); - save_and_send( trans.from, state, output, args.min_return ); - } - else { - eosio_assert( false, "invalid to currency" ); - } - } - - - /** - * This is called when the converter receives one of the connector currencies and it - * will send either converter tokens or a different connector currency in response. - */ - template - static void on_convert( const typename ConnectorType::currency_type::transfer& trans, - const converter_args& args, - converter_state& state ) - { - /// convert to converter - auto converter_out = ConnectorType::convert_to_converter( trans.quantity, state ); - - if( args.to_currency_type == converter_currency ) - { - save_and_send( trans.from, state, converter_out, args.min_return ); - } - else - { - auto output = ConnectorType::convert_from_converter( converter_out, state ); - save_and_send( trans.from, state, output, args.min_return ); - } - } - - - /** - * This method factors out the boiler plate for parsing args and loading the - * initial state before dispatching to the proper on_convert case - */ - template - static void start_convert( const typename CurrencyType::transfer_memo& trans ) { - auto args = unpack( trans.memo ); - eosio_assert( args.to_currency_type != trans.quantity.token_type(), "cannot convert to self" ); - - auto state = read_converter_state(); - on_convert( trans, args, state ); - } - - - /** - * converter_account first needs to call the currency handler to perform - * user-to-user transfers of the converter token, then if a transfer is sending - * the token back to the converter contract, it should convert like everything else. - * - * This method should be called from apply( code, action ) for each of the - * transfer types that we support (for each currency) - */ - static void on( const typename converter_currency::transfer_memo& trans ) { - converter_currency::on( trans ); - if( trans.to == converter_account ) { - start_convert( trans ); - } - } - - /** - * All other currencies simply call start_convert if to == converter_account - */ - template - static void on( const typename Currency::transfer_memo& trans ) { - if( trans.to == converter_account ) { - start_convert( trans ); - } else { - eosio_assert( trans.from == converter_account, - "received unexpected notification of transfer" ); - } - } - - static void apply( account_name code, action_name action ) { - if( !dispatch( converter_contract, - converter_currency::transfer, - converter_currency::issue, - first_currency::transfer, - second_currency::transfer ) { - eosio_assert( false, "received unexpected action" ); - } - } - }; /// converter_contract -} /// namespace bancor diff --git a/contracts/bancor/eosio.system.abi b/contracts/bancor/eosio.system.abi deleted file mode 100644 index c8d8e4b16e9..00000000000 --- a/contracts/bancor/eosio.system.abi +++ /dev/null @@ -1,37 +0,0 @@ -{ - "types": [{ - "new_type_name": "account_name", - "type": "name" - } - ], - "structs": [{ - "name": "transfer", - "base": "", - "fields": [ - {"name":"from", "type":"account_name"}, - {"name":"to", "type":"account_name"}, - {"name":"quantity", "type":"uint64"} - ] - },{ - "name": "account", - "base": "", - "fields": [ - {"name":"key", "type":"name"}, - {"name":"balance", "type":"uint64"} - ] - } - ], - "actions": [{ - "name": "transfer", - "type": "transfer" - } - ], - "tables": [{ - "name": "account", - "type": "account", - "index_type": "i64", - "key_names" : ["key"], - "key_types" : ["name"] - } - ] -} \ No newline at end of file diff --git a/contracts/eosio.bios/CMakeLists.txt b/contracts/eosio.bios/CMakeLists.txt deleted file mode 100644 index ae5ea158406..00000000000 --- a/contracts/eosio.bios/CMakeLists.txt +++ /dev/null @@ -1,8 +0,0 @@ -file(GLOB ABI_FILES "*.abi") -configure_file("${ABI_FILES}" "${CMAKE_CURRENT_BINARY_DIR}" COPYONLY) - -add_wast_executable(TARGET eosio.bios - INCLUDE_FOLDERS "${STANDARD_INCLUDE_FOLDERS}" - LIBRARIES libc++ libc eosiolib - DESTINATION_FOLDER ${CMAKE_CURRENT_BINARY_DIR} -) diff --git a/contracts/eosio.bios/eosio.bios.abi b/contracts/eosio.bios/eosio.bios.abi deleted file mode 100644 index 2dd3310fc67..00000000000 --- a/contracts/eosio.bios/eosio.bios.abi +++ /dev/null @@ -1,263 +0,0 @@ -{ - "version": "eosio::abi/1.0", - "types": [{ - "new_type_name": "account_name", - "type": "name" - },{ - "new_type_name": "permission_name", - "type": "name" - },{ - "new_type_name": "action_name", - "type": "name" - },{ - "new_type_name": "transaction_id_type", - "type": "checksum256" - },{ - "new_type_name": "weight_type", - "type": "uint16" - }], - "structs": [{ - "name": "permission_level", - "base": "", - "fields": [ - {"name":"actor", "type":"account_name"}, - {"name":"permission", "type":"permission_name"} - ] - },{ - "name": "key_weight", - "base": "", - "fields": [ - {"name":"key", "type":"public_key"}, - {"name":"weight", "type":"weight_type"} - ] - },{ - "name": "permission_level_weight", - "base": "", - "fields": [ - {"name":"permission", "type":"permission_level"}, - {"name":"weight", "type":"weight_type"} - ] - },{ - "name": "wait_weight", - "base": "", - "fields": [ - {"name":"wait_sec", "type":"uint32"}, - {"name":"weight", "type":"weight_type"} - ] - },{ - "name": "authority", - "base": "", - "fields": [ - {"name":"threshold", "type":"uint32"}, - {"name":"keys", "type":"key_weight[]"}, - {"name":"accounts", "type":"permission_level_weight[]"}, - {"name":"waits", "type":"wait_weight[]"} - ] - },{ - "name": "blockchain_parameters", - "base": "", - "fields": [ - {"name":"max_block_net_usage", "type":"uint64"}, - {"name":"target_block_net_usage_pct", "type":"uint32"}, - {"name":"max_transaction_net_usage", "type":"uint32"}, - {"name":"base_per_transaction_net_usage", "type":"uint32"}, - {"name":"net_usage_leeway", "type":"uint32"}, - {"name":"context_free_discount_net_usage_num", "type":"uint32"}, - {"name":"context_free_discount_net_usage_den", "type":"uint32"}, - {"name":"max_block_cpu_usage", "type":"uint32"}, - {"name":"target_block_cpu_usage_pct", "type":"uint32"}, - {"name":"max_transaction_cpu_usage", "type":"uint32"}, - {"name":"min_transaction_cpu_usage", "type":"uint32"}, - {"name":"max_transaction_lifetime", "type":"uint32"}, - {"name":"deferred_trx_expiration_window", "type":"uint32"}, - {"name":"max_transaction_delay", "type":"uint32"}, - {"name":"max_inline_action_size", "type":"uint32"}, - {"name":"max_inline_action_depth", "type":"uint16"}, - {"name":"max_authority_depth", "type":"uint16"} - ] - },{ - "name": "newaccount", - "base": "", - "fields": [ - {"name":"creator", "type":"account_name"}, - {"name":"name", "type":"account_name"}, - {"name":"owner", "type":"authority"}, - {"name":"active", "type":"authority"} - ] - },{ - "name": "setcode", - "base": "", - "fields": [ - {"name":"account", "type":"account_name"}, - {"name":"vmtype", "type":"uint8"}, - {"name":"vmversion", "type":"uint8"}, - {"name":"code", "type":"bytes"} - ] - },{ - "name": "setabi", - "base": "", - "fields": [ - {"name":"account", "type":"account_name"}, - {"name":"abi", "type":"bytes"} - ] - },{ - "name": "updateauth", - "base": "", - "fields": [ - {"name":"account", "type":"account_name"}, - {"name":"permission", "type":"permission_name"}, - {"name":"parent", "type":"permission_name"}, - {"name":"auth", "type":"authority"} - ] - },{ - "name": "deleteauth", - "base": "", - "fields": [ - {"name":"account", "type":"account_name"}, - {"name":"permission", "type":"permission_name"} - ] - },{ - "name": "linkauth", - "base": "", - "fields": [ - {"name":"account", "type":"account_name"}, - {"name":"code", "type":"account_name"}, - {"name":"type", "type":"action_name"}, - {"name":"requirement", "type":"permission_name"} - ] - },{ - "name": "unlinkauth", - "base": "", - "fields": [ - {"name":"account", "type":"account_name"}, - {"name":"code", "type":"account_name"}, - {"name":"type", "type":"action_name"} - ] - },{ - "name": "canceldelay", - "base": "", - "fields": [ - {"name":"canceling_auth", "type":"permission_level"}, - {"name":"trx_id", "type":"transaction_id_type"} - ] - },{ - "name": "onerror", - "base": "", - "fields": [ - {"name":"sender_id", "type":"uint128"}, - {"name":"sent_trx", "type":"bytes"} - ] - },{ - "name": "set_account_limits", - "base": "", - "fields": [ - {"name":"account", "type":"account_name"}, - {"name":"ram_bytes", "type":"int64"}, - {"name":"net_weight", "type":"int64"}, - {"name":"cpu_weight", "type":"int64"} - ] - },{ - "name": "setpriv", - "base": "", - "fields": [ - {"name":"account", "type":"account_name"}, - {"name":"is_priv", "type":"int8"} - ] - },{ - "name": "set_global_limits", - "base": "", - "fields": [ - {"name":"cpu_usec_per_period", "type":"int64"} - ] - },{ - "name": "producer_key", - "base": "", - "fields": [ - {"name":"producer_name", "type":"account_name"}, - {"name":"block_signing_key", "type":"public_key"} - ] - },{ - "name": "set_producers", - "base": "", - "fields": [ - {"name":"schedule", "type":"producer_key[]"} - ] - },{ - "name": "setparams", - "base": "", - "fields": [ - {"name":"params", "type":"blockchain_parameters"} - ] - },{ - "name": "require_auth", - "base": "", - "fields": [ - {"name":"from", "type":"account_name"} - ] - }], - "actions": [{ - "name": "newaccount", - "type": "newaccount", - "ricardian_contract": "" - },{ - "name": "setcode", - "type": "setcode", - "ricardian_contract": "" - },{ - "name": "setabi", - "type": "setabi", - "ricardian_contract": "" - },{ - "name": "updateauth", - "type": "updateauth", - "ricardian_contract": "" - },{ - "name": "deleteauth", - "type": "deleteauth", - "ricardian_contract": "" - },{ - "name": "linkauth", - "type": "linkauth", - "ricardian_contract": "" - },{ - "name": "unlinkauth", - "type": "unlinkauth", - "ricardian_contract": "" - },{ - "name": "canceldelay", - "type": "canceldelay", - "ricardian_contract": "" - },{ - "name": "onerror", - "type": "onerror", - "ricardian_contract": "" - },{ - "name": "setalimits", - "type": "set_account_limits", - "ricardian_contract": "" - },{ - "name": "setglimits", - "type": "set_global_limits", - "ricardian_contract": "" - },{ - "name": "setpriv", - "type": "setpriv", - "ricardian_contract": "" - },{ - "name": "setprods", - "type": "set_producers", - "ricardian_contract": "" - },{ - "name": "setparams", - "type": "setparams", - "ricardian_contract": "" - },{ - "name": "reqauth", - "type": "require_auth", - "ricardian_contract": "" - } - ], - "tables": [], - "ricardian_clauses": [], - "abi_extensions": [] -} diff --git a/contracts/eosio.bios/eosio.bios.cpp b/contracts/eosio.bios/eosio.bios.cpp deleted file mode 100644 index 66d70f0c47e..00000000000 --- a/contracts/eosio.bios/eosio.bios.cpp +++ /dev/null @@ -1,3 +0,0 @@ -#include - -EOSIO_ABI( eosio::bios, (setpriv)(setalimits)(setglimits)(setprods)(setparams)(reqauth) ) diff --git a/contracts/eosio.bios/eosio.bios.hpp b/contracts/eosio.bios/eosio.bios.hpp deleted file mode 100644 index 0abca64c90e..00000000000 --- a/contracts/eosio.bios/eosio.bios.hpp +++ /dev/null @@ -1,49 +0,0 @@ -#pragma once -#include -#include - -namespace eosio { - - class bios : public contract { - public: - bios( action_name self ):contract(self){} - - void setpriv( account_name account, uint8_t ispriv ) { - require_auth( _self ); - set_privileged( account, ispriv ); - } - - void setalimits( account_name account, int64_t ram_bytes, int64_t net_weight, int64_t cpu_weight ) { - require_auth( _self ); - set_resource_limits( account, ram_bytes, net_weight, cpu_weight ); - } - - void setglimits( uint64_t ram, uint64_t net, uint64_t cpu ) { - (void)ram; (void)net; (void)cpu; - require_auth( _self ); - } - - void setprods( std::vector schedule ) { - (void)schedule; // schedule argument just forces the deserialization of the action data into vector (necessary check) - require_auth( _self ); - - constexpr size_t max_stack_buffer_size = 512; - size_t size = action_data_size(); - char* buffer = (char*)( max_stack_buffer_size < size ? malloc(size) : alloca(size) ); - read_action_data( buffer, size ); - set_proposed_producers(buffer, size); - } - - void setparams( const eosio::blockchain_parameters& params ) { - require_auth( _self ); - set_blockchain_parameters( params ); - } - - void reqauth( action_name from ) { - require_auth( from ); - } - - private: - }; - -} /// namespace eosio diff --git a/contracts/eosio.msig/CMakeLists.txt b/contracts/eosio.msig/CMakeLists.txt deleted file mode 100644 index afcf7038f1a..00000000000 --- a/contracts/eosio.msig/CMakeLists.txt +++ /dev/null @@ -1,9 +0,0 @@ - -file(GLOB ABI_FILES "*.abi") -configure_file("${ABI_FILES}" "${CMAKE_CURRENT_BINARY_DIR}" COPYONLY) - -add_wast_executable(TARGET eosio.msig - INCLUDE_FOLDERS "${STANDARD_INCLUDE_FOLDERS}" - LIBRARIES libc++ libc eosiolib - DESTINATION_FOLDER ${CMAKE_CURRENT_BINARY_DIR} -) diff --git a/contracts/eosio.msig/README.md b/contracts/eosio.msig/README.md deleted file mode 100644 index 6857660782e..00000000000 --- a/contracts/eosio.msig/README.md +++ /dev/null @@ -1,113 +0,0 @@ -eosio.msig --------- - -Actions: -The naming convention is codeaccount::actionname followed by a list of paramters. - -Create a proposal -## eosio.msig::propose proposer proposal_name requested trx - - **proposer** account proposing a transaction - - **proposal_name** name of the proposal (should be unique for proposer) - - **requested** permission levels expected to approve the proposal - - **trx** proposed transaction - - Storage changes are billed to 'proposer' - -Approve a proposal -## eosio.msig::approve proposer proposal_name level - - **proposer** account proposing a transaction - - **proposal_name** name of the proposal - - **level** permission level approving the transaction - - Storage changes are billed to 'proposer' - -Revoke an approval of transaction -## eosio.msig::unapprove proposer proposal_name level - - **proposer** account proposing a transaction - - **proposal_name** name of the proposal - - **level** permission level revoking approval from the transaction - - Storage changes are billed to 'proposer' - -Cancel a proposal -## eosio.msig::cancel proposer proposal_name canceler - - **proposer** account proposing a transaction - - **proposal_name** name of the proposal - - **canceler** account canceling the transaction (only proposer can cancel not expired transaction) - -Execute a proposal -## eosio.msig::exec proposer proposal_name executer - - **proposer** account proposing a transaction - - **proposal_name** name of the proposal - - **executer** account executing the transaction - - -Cleos usage example. - -Prerequisites: - - eosio.token contract installed to eosio.token account, eosio.msig contract installed on eosio.msig account which is a privileged account. - - account 'treasury' is the issuer of EOS token. - - account 'tester' exists. - - keys to accounts 'treasury' and 'tester' imported into local wallet, the wallet is unlocked. - -One user creates a proposal: -```` -$ cleos multisig propose test '[{"actor": "treasury", "permission": "active"}]' '[{"actor": "treasury", "permission": "active"}]' eosio.token issue '{"to": "tester", "quantity": "1000.0000 EOS", "memo": ""}' -p tester -executed transaction: e26f3a3a7cba524a7b15a0b6c77c7daa73d3ba9bf84e83f9c2cdf27fcb183d61 336 bytes 107520 cycles -# eosio.msig <= eosio.msig::propose {"proposer":"tester","proposal_name":"test","requested":[{"actor":"treasury","permission":"active"}]... -```` - -Another user reviews the transaction: -```` -$ cleos multisig review tester test -p treasury -{ - "proposal_name": "test", - "requested_approvals": [{ - "actor": "treasury", - "permission": "active" - } - ], - "provided_approvals": [], - "packed_transaction": "00aee75a0000000000000000000000000100a6823403ea30550000000000a5317601000000fe6a6cd4cd00000000a8ed323219000000005c95b1ca809698000000000004454f530000000000", - "transaction": { - "expiration": "2018-05-01T00:00:00", - "region": 0, - "ref_block_num": 0, - "ref_block_prefix": 0, - "max_net_usage_words": 0, - "max_kcpu_usage": 0, - "delay_sec": 0, - "context_free_actions": [], - "actions": [{ - "account": "eosio.token", - "name": "issue", - "authorization": [{ - "actor": "treasury", - "permission": "active" - } - ], - "data": { - "to": "tester", - "quantity": "1000.0000 EOS", - "memo": "" - }, - "hex_data": "000000005c95b1ca809698000000000004454f530000000000" - } - ] - } -} -```` - -And then approves it: -```` -$ cleos multisig approve tester test '{"actor": "treasury", "permission": "active"}' -p treasury -executed transaction: 475970a4b0016368d0503d1ce01577376f91f5a5ba63dd4353683bd95101b88d 256 bytes 108544 cycles -# eosio.msig <= eosio.msig::approve {"proposer":"tester","proposal_name":"test","level":{"actor":"treasury","permission":"active"}} -```` - -First user initiates execution: -```` -$ cleos multisig exec tester test -p tester -executed transaction: 64e5eaceb77362694055f572ae35876111e87b637a55250de315b1b55e56d6c2 248 bytes 109568 cycles -# eosio.msig <= eosio.msig::exec {"proposer":"tester","proposal_name":"test","executer":"tester"} -```` diff --git a/contracts/eosio.msig/eosio.msig.abi b/contracts/eosio.msig/eosio.msig.abi deleted file mode 100644 index 9fcf8a957cc..00000000000 --- a/contracts/eosio.msig/eosio.msig.abi +++ /dev/null @@ -1,152 +0,0 @@ -{ - "version": "eosio::abi/1.0", - "types": [{ - "new_type_name": "account_name", - "type": "name" - },{ - "new_type_name": "permission_name", - "type": "name" - },{ - "new_type_name": "action_name", - "type": "name" - }], - "structs": [{ - "name": "permission_level", - "base": "", - "fields": [ - {"name": "actor", "type": "account_name"}, - {"name": "permission", "type": "permission_name"} - ] - },{ - "name": "action", - "base": "", - "fields": [ - {"name": "account", "type": "account_name"}, - {"name": "name", "type": "action_name"}, - {"name": "authorization", "type": "permission_level[]"}, - {"name": "data", "type": "bytes"} - ] - },{ - "name": "transaction_header", - "base": "", - "fields": [ - {"name": "expiration", "type": "time_point_sec"}, - {"name": "ref_block_num", "type": "uint16"}, - {"name": "ref_block_prefix", "type": "uint32"}, - {"name": "max_net_usage_words", "type": "varuint32"}, - {"name": "max_cpu_usage_ms", "type": "uint8"}, - {"name": "delay_sec", "type": "varuint32"} - ] - },{ - "name": "extension", - "base": "", - "fields": [ - {"name": "type", "type" : "uint16" }, - {"name": "data", "type": "bytes"} - ] - },{ - "name": "transaction", - "base": "transaction_header", - "fields": [ - {"name": "context_free_actions", "type": "action[]"}, - {"name": "actions", "type": "action[]"}, - {"name": "transaction_extensions", "type": "extension[]"} - ] - },{ - "name": "propose", - "base": "", - "fields": [ - {"name":"proposer", "type":"account_name"}, - {"name":"proposal_name", "type":"name"}, - {"name":"requested", "type":"permission_level[]"}, - {"name":"trx", "type":"transaction"} - ] - },{ - "name": "approve", - "base": "", - "fields": [ - {"name":"proposer", "type":"account_name"}, - {"name":"proposal_name", "type":"name"}, - {"name":"level", "type":"permission_level"} - ] - },{ - "name": "unapprove", - "base": "", - "fields": [ - {"name":"proposer", "type":"account_name"}, - {"name":"proposal_name", "type":"name"}, - {"name":"level", "type":"permission_level"} - ] - },{ - "name": "cancel", - "base": "", - "fields": [ - {"name":"proposer", "type":"account_name"}, - {"name":"proposal_name", "type":"name"}, - {"name":"canceler", "type":"account_name"} - ] - },{ - "name": "exec", - "base": "", - "fields": [ - {"name":"proposer", "type":"account_name"}, - {"name":"proposal_name", "type":"name"}, - {"name":"executer", "type":"account_name"} - ] - },{ - "name": "proposal", - "base": "", - "fields": [ - {"name": "proposal_name", "type": "name"}, - {"name": "packed_transaction", "type": "bytes"} - ] - },{ - "name": "approvals_info", - "base": "", - "fields": [ - {"name": "proposal_name", "type": "name"}, - {"name": "requested_approvals", "type": "permission_level[]"}, - {"name": "provided_approvals", "type": "permission_level[]"} - ] - } - ], - "actions": [{ - "name": "propose", - "type": "propose", - "ricardian_contract": "" - },{ - "name": "approve", - "type": "approve", - "ricardian_contract": "" - },{ - "name": "unapprove", - "type": "unapprove", - "ricardian_contract": "" - }, { - "name": "cancel", - "type": "cancel", - "ricardian_contract": "" - }, { - "name": "exec", - "type": "exec", - "ricardian_contract": "" - } - - ], - "tables": [{ - "name": "proposal", - "type": "proposal", - "index_type": "i64", - "key_names" : ["proposal_name"], - "key_types" : ["name"] - },{ - "name": "approvals", - "type": "approvals_info", - "index_type": "i64", - "key_names" : ["proposal_name"], - "key_types" : ["name"] - } - ], - "ricardian_clauses": [], - "abi_extensions": [] -} diff --git a/contracts/eosio.msig/eosio.msig.cpp b/contracts/eosio.msig/eosio.msig.cpp deleted file mode 100644 index 9d04a1a9813..00000000000 --- a/contracts/eosio.msig/eosio.msig.cpp +++ /dev/null @@ -1,137 +0,0 @@ -#include -#include -#include - -namespace eosio { - -/* -propose function manually parses input data (instead of taking parsed arguments from dispatcher) -because parsing data in the dispatcher uses too much CPU in case if proposed transaction is big - -If we use dispatcher the function signature should be: - -void multisig::propose( account_name proposer, - name proposal_name, - vector requested, - transaction trx) -*/ - -void multisig::propose() { - constexpr size_t max_stack_buffer_size = 512; - size_t size = action_data_size(); - char* buffer = (char*)( max_stack_buffer_size < size ? malloc(size) : alloca(size) ); - read_action_data( buffer, size ); - - account_name proposer; - name proposal_name; - vector requested; - transaction_header trx_header; - - datastream ds( buffer, size ); - ds >> proposer >> proposal_name >> requested; - - size_t trx_pos = ds.tellp(); - ds >> trx_header; - - require_auth( proposer ); - eosio_assert( trx_header.expiration >= eosio::time_point_sec(now()), "transaction expired" ); - //eosio_assert( trx_header.actions.size() > 0, "transaction must have at least one action" ); - - proposals proptable( _self, proposer ); - eosio_assert( proptable.find( proposal_name ) == proptable.end(), "proposal with the same name exists" ); - - bytes packed_requested = pack(requested); - auto res = ::check_transaction_authorization( buffer+trx_pos, size-trx_pos, - (const char*)0, 0, - packed_requested.data(), packed_requested.size() - ); - eosio_assert( res > 0, "transaction authorization failed" ); - - proptable.emplace( proposer, [&]( auto& prop ) { - prop.proposal_name = proposal_name; - prop.packed_transaction = bytes( buffer+trx_pos, buffer+size ); - }); - - approvals apptable( _self, proposer ); - apptable.emplace( proposer, [&]( auto& a ) { - a.proposal_name = proposal_name; - a.requested_approvals = std::move(requested); - }); -} - -void multisig::approve( account_name proposer, name proposal_name, permission_level level ) { - require_auth( level ); - - approvals apptable( _self, proposer ); - auto& apps = apptable.get( proposal_name, "proposal not found" ); - - auto itr = std::find( apps.requested_approvals.begin(), apps.requested_approvals.end(), level ); - eosio_assert( itr != apps.requested_approvals.end(), "approval is not on the list of requested approvals" ); - - apptable.modify( apps, proposer, [&]( auto& a ) { - a.provided_approvals.push_back( level ); - a.requested_approvals.erase( itr ); - }); -} - -void multisig::unapprove( account_name proposer, name proposal_name, permission_level level ) { - require_auth( level ); - - approvals apptable( _self, proposer ); - auto& apps = apptable.get( proposal_name, "proposal not found" ); - auto itr = std::find( apps.provided_approvals.begin(), apps.provided_approvals.end(), level ); - eosio_assert( itr != apps.provided_approvals.end(), "no approval previously granted" ); - - apptable.modify( apps, proposer, [&]( auto& a ) { - a.requested_approvals.push_back(level); - a.provided_approvals.erase(itr); - }); -} - -void multisig::cancel( account_name proposer, name proposal_name, account_name canceler ) { - require_auth( canceler ); - - proposals proptable( _self, proposer ); - auto& prop = proptable.get( proposal_name, "proposal not found" ); - - if( canceler != proposer ) { - eosio_assert( unpack( prop.packed_transaction ).expiration < eosio::time_point_sec(now()), "cannot cancel until expiration" ); - } - - approvals apptable( _self, proposer ); - auto& apps = apptable.get( proposal_name, "proposal not found" ); - - proptable.erase(prop); - apptable.erase(apps); -} - -void multisig::exec( account_name proposer, name proposal_name, account_name executer ) { - require_auth( executer ); - - proposals proptable( _self, proposer ); - auto& prop = proptable.get( proposal_name, "proposal not found" ); - - approvals apptable( _self, proposer ); - auto& apps = apptable.get( proposal_name, "proposal not found" ); - - transaction_header trx_header; - datastream ds( prop.packed_transaction.data(), prop.packed_transaction.size() ); - ds >> trx_header; - eosio_assert( trx_header.expiration >= eosio::time_point_sec(now()), "transaction expired" ); - - bytes packed_provided_approvals = pack(apps.provided_approvals); - auto res = ::check_transaction_authorization( prop.packed_transaction.data(), prop.packed_transaction.size(), - (const char*)0, 0, - packed_provided_approvals.data(), packed_provided_approvals.size() - ); - eosio_assert( res > 0, "transaction authorization failed" ); - - send_deferred( (uint128_t(proposer) << 64) | proposal_name, executer, prop.packed_transaction.data(), prop.packed_transaction.size() ); - - proptable.erase(prop); - apptable.erase(apps); -} - -} /// namespace eosio - -EOSIO_ABI( eosio::multisig, (propose)(approve)(unapprove)(cancel)(exec) ) diff --git a/contracts/eosio.msig/eosio.msig.hpp b/contracts/eosio.msig/eosio.msig.hpp deleted file mode 100644 index 48ce2e3dca8..00000000000 --- a/contracts/eosio.msig/eosio.msig.hpp +++ /dev/null @@ -1,36 +0,0 @@ -#pragma once -#include -#include - -namespace eosio { - - class multisig : public contract { - public: - multisig( account_name self ):contract(self){} - - void propose(); - void approve( account_name proposer, name proposal_name, permission_level level ); - void unapprove( account_name proposer, name proposal_name, permission_level level ); - void cancel( account_name proposer, name proposal_name, account_name canceler ); - void exec( account_name proposer, name proposal_name, account_name executer ); - - private: - struct proposal { - name proposal_name; - vector packed_transaction; - - auto primary_key()const { return proposal_name.value; } - }; - typedef eosio::multi_index proposals; - - struct approvals_info { - name proposal_name; - vector requested_approvals; - vector provided_approvals; - - auto primary_key()const { return proposal_name.value; } - }; - typedef eosio::multi_index approvals; - }; - -} /// namespace eosio diff --git a/contracts/eosio.sudo/CMakeLists.txt b/contracts/eosio.sudo/CMakeLists.txt deleted file mode 100644 index 3760b6e82e2..00000000000 --- a/contracts/eosio.sudo/CMakeLists.txt +++ /dev/null @@ -1,9 +0,0 @@ - -file(GLOB ABI_FILES "*.abi") -configure_file("${ABI_FILES}" "${CMAKE_CURRENT_BINARY_DIR}" COPYONLY) - -add_wast_executable(TARGET eosio.sudo - INCLUDE_FOLDERS "${STANDARD_INCLUDE_FOLDERS}" - LIBRARIES libc++ libc eosiolib - DESTINATION_FOLDER ${CMAKE_CURRENT_BINARY_DIR} -) diff --git a/contracts/eosio.sudo/README.md b/contracts/eosio.sudo/README.md deleted file mode 100644 index af1031e0126..00000000000 --- a/contracts/eosio.sudo/README.md +++ /dev/null @@ -1,886 +0,0 @@ -# eosio.sudo - -## 1. Actions: -The naming convention is codeaccount::actionname followed by a list of parameters. - -Execute a transaction while bypassing regular authorization checks (requires authorization of eosio.sudo which needs to be a privileged account). - -### eosio.sudo::exec executer trx - - **executer** account executing the transaction - - **trx** transaction to execute - - Deferred transaction RAM usage is billed to 'executer' - - -## 2. Installing the eosio.sudo contract - -The eosio.sudo contract needs to be installed on a privileged account to function. It is recommended to use the account `eosio.sudo`. - -First, the account `eosio.sudo` needs to be created. Since it has the restricted `eosio.` prefix, only a privileged account can create this account. So this guide will use the `eosio` account to create the `eosio.sudo` account. On typical live blockchain configurations, the `eosio` account can only be controlled by a supermajority of the current active block producers. So, this guide will use the `eosio.msig` contract to help coordinate the approvals of the proposed transaction that creates the `eosio.sudo` account. - -The `eosio.sudo` account also needs to have sufficient RAM to host the contract and sufficient CPU and network bandwidth to deploy the contract. This means that the creator of the account (`eosio`) needs to gift sufficient RAM to the new account and delegate (preferably with transfer) sufficient bandwidth to the new account. To pull this off the `eosio` account needs to have enough of the core system token (the `SYS` token will be used within this guide) in its liquid balance. So prior to continuing with the next steps of this guide, the active block producers of the chain who are coordinating this process need to ensure that a sufficient amount of core system tokens that they are authorized to spend is placed in the liquid balance of the `eosio` account. - -This guide will be using cleos to carry out the process. - -### 2.1 Create the eosio.sudo account - -#### 2.1.1 Generate the transaction to create the eosio.sudo account - -The transaction to create the `eosio.sudo` account will need to be proposed to get the necessary approvals from active block producers before executing it. This transaction needs to first be generated and stored as JSON into a file so that it can be used in the cleos command to propose the transaction to the eosio.msig contract. - -A simple way to generate a transaction to create a new account is to use the `cleos system newaccount`. However, that sub-command currently only accepts a single public key as the owner and active authority of the new account. However, the owner and active authorities of the new account should only be satisfied by the `active` permission of `eosio`. One option is to create the new account with the some newly generated key, and then later update the authorities of the new account using `cleos set account permission`. This guide will take an alternative approach which atomically creates the new account in its proper configuration. - -Three unsigned transactions will be generated using cleos and then the actions within those transactions will be appropriately stitched together into a single transaction which will later be proposed using the eosio.msig contract. - -First, generate a transaction to capture the necessary actions involved in creating a new account: -``` -$ cleos system newaccount -s -j -d --transfer --stake-net "1.000 SYS" --stake-cpu "1.000 SYS" --buy-ram-kbytes 50 eosio eosio.sudo EOS8MMUW11TAdTDxqdSwSqJodefSoZbFhcprndomgLi9MeR2o8MT4 > generated_account_creation_trx.json -726964ms thread-0 main.cpp:429 create_action ] result: {"binargs":"0000000000ea305500004d1a03ea305500c80000"} arg: {"code":"eosio","action":"buyrambytes","args":{"payer":"eosio","receiver":"eosio.sudo","bytes":51200}} -726967ms thread-0 main.cpp:429 create_action ] result: {"binargs":"0000000000ea305500004d1a03ea3055102700000000000004535953000000001027000000000000045359530000000001"} arg: {"code":"eosio","action":"delegatebw","args":{"from":"eosio","receiver":"eosio.sudo","stake_net_quantity":"1.0000 SYS","stake_cpu_quantity":"1.0000 SYS","transfer":true}} -$ cat generated_account_creation_trx.json -{ - "expiration": "2018-06-29T17:11:36", - "ref_block_num": 16349, - "ref_block_prefix": 3248946195, - "max_net_usage_words": 0, - "max_cpu_usage_ms": 0, - "delay_sec": 0, - "context_free_actions": [], - "actions": [{ - "account": "eosio", - "name": "newaccount", - "authorization": [{ - "actor": "eosio", - "permission": "active" - } - ], - "data": "0000000000ea305500004d1a03ea305501000000010003c8162ea04fed738bfd5470527fd1ae7454c2e9ad1acbadec9f9e35bab2f33c660100000001000000010003c8162ea04fed738bfd5470527fd1ae7454c2e9ad1acbadec9f9e35bab2f33c6601000000" - },{ - "account": "eosio", - "name": "buyrambytes", - "authorization": [{ - "actor": "eosio", - "permission": "active" - } - ], - "data": "0000000000ea305500004d1a03ea305500c80000" - },{ - "account": "eosio", - "name": "delegatebw", - "authorization": [{ - "actor": "eosio", - "permission": "active" - } - ], - "data": "0000000000ea305500004d1a03ea3055102700000000000004535953000000001027000000000000045359530000000001" - } - ], - "transaction_extensions": [], - "signatures": [], - "context_free_data": [] -} -``` -Adjust the amount of delegated tokens and the amount of RAM bytes to gift as necessary. -The actual public key used is not important since that data is only encoded into the `eosio::newaccount` action which will be replaced soon anyway. - -Second, create a file (e.g. newaccount_payload.json) with the JSON payload for the real `eosio::newaccount` action. It should look like: -``` -$ cat newaccount_payload.json -{ - "creator": "eosio", - "name": "eosio.sudo", - "owner": { - "threshold": 1, - "keys": [], - "accounts": [{ - "permission": {"actor": "eosio", "permission": "active"}, - "weight": 1 - }], - "waits": [] - }, - "active": { - "threshold": 1, - "keys": [], - "accounts": [{ - "permission": {"actor": "eosio", "permission": "active"}, - "weight": 1 - }], - "waits": [] - } -} -``` - -Third, generate a transaction containing the actual `eosio::newaccount` action that will be used in the final transaction: -``` -$ cleos push action -s -j -d eosio newaccount newaccount_payload.json -p eosio > generated_newaccount_trx.json -$ cat generated_newaccount_trx.json -{ - "expiration": "2018-06-29T17:11:36", - "ref_block_num": 16349, - "ref_block_prefix": 3248946195, - "max_net_usage_words": 0, - "max_cpu_usage_ms": 0, - "delay_sec": 0, - "context_free_actions": [], - "actions": [{ - "account": "eosio", - "name": "newaccount", - "authorization": [{ - "actor": "eosio", - "permission": "active" - } - ], - "data": "0000000000ea305500004d1a03ea30550100000000010000000000ea305500000000a8ed32320100000100000000010000000000ea305500000000a8ed3232010000" - } - ], - "transaction_extensions": [], - "signatures": [], - "context_free_data": [] -} -``` - -Fourth, generate a transaction containing the `eosio::setpriv` action which will make the `eosio.sudo` account privileged: -``` -$ cleos push action -s -j -d eosio setpriv '{"account": "eosio.sudo", "is_priv": 1}' -p eosio > generated_setpriv_trx.json -$ cat generated_setpriv_trx.json -{ - "expiration": "2018-06-29T17:11:36", - "ref_block_num": 16349, - "ref_block_prefix": 3248946195, - "max_net_usage_words": 0, - "max_cpu_usage_ms": 0, - "delay_sec": 0, - "context_free_actions": [], - "actions": [{ - "account": "eosio", - "name": "setpriv", - "authorization": [{ - "actor": "eosio", - "permission": "active" - } - ], - "data": "00004d1a03ea305501" - } - ], - "transaction_extensions": [], - "signatures": [], - "context_free_data": [] -} -``` - -Next, the action JSONs of the previously generated transactions will be used to construct a unified transaction which will eventually be proposed with the eosio.msig contract. A good way to get started is to make a copy of the generated_newaccount_trx.json file (call the copied file create_sudo_account_trx.json) and edit the first three fields so it looks something like the following: -``` -$ cat create_sudo_account_trx.json -{ - "expiration": "2018-07-06T12:00:00", - "ref_block_num": 0, - "ref_block_prefix": 0, - "max_net_usage_words": 0, - "max_cpu_usage_ms": 0, - "delay_sec": 0, - "context_free_actions": [], - "actions": [{ - "account": "eosio", - "name": "newaccount", - "authorization": [{ - "actor": "eosio", - "permission": "active" - } - ], - "data": "0000000000ea305500004d1a03ea30550100000000010000000000ea305500000000a8ed32320100000100000000010000000000ea305500000000a8ed3232010000" - } - ], - "transaction_extensions": [], - "signatures": [], - "context_free_data": [] -} -``` - -The `ref_block_num` and `ref_block_prefix` values were set to 0. The proposed transaction does not need to have a valid TaPoS reference block because it will be reset anyway when scheduled as a deferred transaction during the `eosio.msig::exec` action. The `expiration` field, which was the only other field that was changed, will also be reset when the proposed transaction is scheduled as a deferred transaction during `eosio.msig::exec`. However, this field actually does matter during the propose-approve-exec lifecycle of the proposed transaction. If the present time passes the time in the `expiration` field of the proposed transaction, it will not be possible to execute the proposed transaction even if all necessary approvals are gathered. Therefore, it is important to set the expiration time to some point well enough in the future to give all necessary approvers enough time to review and approve the proposed transaction, but it is otherwise arbitrary. Generally, for reviewing/validation purposes it is important that all potential approvers of the transaction (i.e. the block producers) choose the exact same `expiration` time so that there is not any discrepancy in bytes of the serialized transaction if it was to later be included in payload data of some other action. - -Then, all but the first action JSON object of generated_account_creation_trx.json should be appended to the `actions` array of create_sudo_account_trx.json, and then the single action JSON object of generated_setpriv_trx.json should be appended to the `actions` array of create_sudo_account_trx.json. The final result is a create_sudo_account_trx.json file that looks like the following: -``` -$ cat create_sudo_account_trx.json -{ - "expiration": "2018-07-06T12:00:00", - "ref_block_num": 0, - "ref_block_prefix": 0, - "max_net_usage_words": 0, - "max_cpu_usage_ms": 0, - "delay_sec": 0, - "context_free_actions": [], - "actions": [{ - "account": "eosio", - "name": "newaccount", - "authorization": [{ - "actor": "eosio", - "permission": "active" - } - ], - "data": "0000000000ea305500004d1a03ea30550100000000010000000000ea305500000000a8ed32320100000100000000010000000000ea305500000000a8ed3232010000" - },{ - "account": "eosio", - "name": "buyrambytes", - "authorization": [{ - "actor": "eosio", - "permission": "active" - } - ], - "data": "0000000000ea305500004d1a03ea305500c80000" - },{ - "account": "eosio", - "name": "delegatebw", - "authorization": [{ - "actor": "eosio", - "permission": "active" - } - ], - "data": "0000000000ea305500004d1a03ea3055102700000000000004535953000000001027000000000000045359530000000001" - },{ - "account": "eosio", - "name": "setpriv", - "authorization": [{ - "actor": "eosio", - "permission": "active" - } - ], - "data": "00004d1a03ea305501" - } - ], - "transaction_extensions": [], - "signatures": [], - "context_free_data": [] -} -``` - -The transaction in create_sudo_account_trx.json is now ready to be proposed. - -It will be useful to have a JSON of the active permissions of each of the active block producers for later when proposing transactions using the eosio.msig contract. - -This guide will assume that there are 21 active block producers on the chain with account names: `blkproducera`, `blkproducerb`, ..., `blkproduceru`. - -In that case, create a file producer_permissions.json with the content shown in the command below: -``` -$ cat producer_permissions.json -[ - {"actor": "blkproducera", "permission": "active"}, - {"actor": "blkproducerb", "permission": "active"}, - {"actor": "blkproducerc", "permission": "active"}, - {"actor": "blkproducerd", "permission": "active"}, - {"actor": "blkproducere", "permission": "active"}, - {"actor": "blkproducerf", "permission": "active"}, - {"actor": "blkproducerg", "permission": "active"}, - {"actor": "blkproducerh", "permission": "active"}, - {"actor": "blkproduceri", "permission": "active"}, - {"actor": "blkproducerj", "permission": "active"}, - {"actor": "blkproducerk", "permission": "active"}, - {"actor": "blkproducerl", "permission": "active"}, - {"actor": "blkproducerm", "permission": "active"}, - {"actor": "blkproducern", "permission": "active"}, - {"actor": "blkproducero", "permission": "active"}, - {"actor": "blkproducerp", "permission": "active"}, - {"actor": "blkproducerq", "permission": "active"}, - {"actor": "blkproducerr", "permission": "active"}, - {"actor": "blkproducers", "permission": "active"}, - {"actor": "blkproducert", "permission": "active"}, - {"actor": "blkproduceru", "permission": "active"} -] -``` - -#### 2.1.2 Propose the transaction to create the eosio.sudo account - -Only one of the potential approvers will need to propose the transaction that was created in the previous sub-section. All the other approvers should still follow the steps in the previous sub-section to generate the same create_sudo_account_trx.json file as all the other approvers. They will need this to compare to the actual proposed transaction prior to approving. - -The approvers are typically going to be the active block producers of the chain, so it makes sense that one of the block producers is elected as the leader to propose the actual transaction. Note that this lead block producer will need to incur the temporary RAM cost of proposing the transaction, but they will get the RAM back when the proposal has executed or has been canceled (which only the proposer can do prior to expiration). - -The guide will assume that `blkproducera` was chosen as the lead block producer to propose the transaction. - -The lead block producer (`blkproducera`) should propose the transaction stored in create_sudo_account_trx.json: -``` -$ cleos multisig propose_trx createsudo producer_permissions.json create_sudo_account_trx.json blkproducera -executed transaction: bf6aaa06b40e2a35491525cb11431efd2b5ac94e4a7a9c693c5bf0cfed942393 744 bytes 772 us -# eosio.msig <= eosio.msig::propose {"proposer":"blkproducera","proposal_name":"createsudo","requested":[{"actor":"blkproducera","permis... -warning: transaction executed locally, but may not be confirmed by the network yet -``` - -#### 2.1.3 Review and approve the transaction to create the eosio.sudo account - -Each of the potential approvers of the proposed transaction (i.e. the active block producers) should first review the proposed transaction to make sure they are not approving anything that they do not agree to. - -The proposed transaction can be reviewed using the `cleos multisig review` command: -``` -$ cleos multisig review blkproducera createsudo > create_sudo_account_trx_to_review.json -$ head -n 30 create_sudo_account_trx_to_review.json -{ - "proposal_name": "createsudo", - "packed_transaction": "c0593f5b00000000000000000000040000000000ea305500409e9a2264b89a010000000000ea305500000000a8ed3232420000000000ea305500004d1a03ea30550100000000010000000000ea305500000000a8ed32320100000100000000010000000000ea305500000000a8ed32320100000000000000ea305500b0cafe4873bd3e010000000000ea305500000000a8ed3232140000000000ea305500004d1a03ea3055002800000000000000ea305500003f2a1ba6a24a010000000000ea305500000000a8ed3232310000000000ea305500004d1a03ea30551027000000000000045359530000000010270000000000000453595300000000010000000000ea305500000060bb5bb3c2010000000000ea305500000000a8ed32320900004d1a03ea30550100", - "transaction": { - "expiration": "2018-07-06T12:00:00", - "ref_block_num": 0, - "ref_block_prefix": 0, - "max_net_usage_words": 0, - "max_cpu_usage_ms": 0, - "delay_sec": 0, - "context_free_actions": [], - "actions": [{ - "account": "eosio", - "name": "newaccount", - "authorization": [{ - "actor": "eosio", - "permission": "active" - } - ], - "data": { - "creator": "eosio", - "name": "eosio.sudo", - "owner": { - "threshold": 1, - "keys": [], - "accounts": [{ - "permission": { - "actor": "eosio", - "permission": "active" - }, -``` - -The approvers should go through the full human-readable transaction output and make sure everything looks fine. But they can also use tools to automatically compare the proposed transaction to the one they generated to make sure there are absolutely no differences: -``` -$ cleos multisig propose_trx -j -s -d createsudo '[]' create_sudo_account_trx.json blkproducera | grep '"data":' | sed 's/^[ \t]*"data":[ \t]*//;s/[",]//g' | cut -c 35- > expected_create_sudo_trx_serialized.hex -$ cat expected_create_sudo_trx_serialized.hex -c0593f5b00000000000000000000040000000000ea305500409e9a2264b89a010000000000ea305500000000a8ed3232420000000000ea305500004d1a03ea30550100000000010000000000ea305500000000a8ed32320100000100000000010000000000ea305500000000a8ed32320100000000000000ea305500b0cafe4873bd3e010000000000ea305500000000a8ed3232140000000000ea305500004d1a03ea3055002800000000000000ea305500003f2a1ba6a24a010000000000ea305500000000a8ed3232310000000000ea305500004d1a03ea30551027000000000000045359530000000010270000000000000453595300000000010000000000ea305500000060bb5bb3c2010000000000ea305500000000a8ed32320900004d1a03ea30550100 -$ cat create_sudo_account_trx_to_review.json | grep '"packed_transaction":' | sed 's/^[ \t]*"packed_transaction":[ \t]*//;s/[",]//g' > proposed_create_sudo_trx_serialized.hex -$ cat proposed_create_sudo_trx_serialized.hex -c0593f5b00000000000000000000040000000000ea305500409e9a2264b89a010000000000ea305500000000a8ed3232420000000000ea305500004d1a03ea30550100000000010000000000ea305500000000a8ed32320100000100000000010000000000ea305500000000a8ed32320100000000000000ea305500b0cafe4873bd3e010000000000ea305500000000a8ed3232140000000000ea305500004d1a03ea3055002800000000000000ea305500003f2a1ba6a24a010000000000ea305500000000a8ed3232310000000000ea305500004d1a03ea30551027000000000000045359530000000010270000000000000453595300000000010000000000ea305500000060bb5bb3c2010000000000ea305500000000a8ed32320900004d1a03ea30550100 -$ diff expected_create_sudo_trx_serialized.hex proposed_create_sudo_trx_serialized.hex -``` - -When an approver (e.g. `blkproducerb`) is satisfied with the proposed transaction, they can simply approve it: -``` -$ cleos multisig approve blkproducera createsudo '{"actor": "blkproducerb", "permission": "active"}' -p blkproducerb -executed transaction: 03a907e2a3192aac0cd040c73db8273c9da7696dc7960de22b1a479ae5ee9f23 128 bytes 472 us -# eosio.msig <= eosio.msig::approve {"proposer":"blkproducera","proposal_name":"createsudo","level":{"actor":"blkproducerb","permission"... -warning: transaction executed locally, but may not be confirmed by the network yet -``` - -#### 2.1.4 Execute the transaction to create the eosio.sudo account - -When the necessary approvals are collected (in this example, with 21 block producers, at least 15 of their approvals were required), anyone can push the `eosio.msig::exec` action which executes the approved transaction. It makes a lot of sense for the lead block producer who proposed the transaction to also execute it (this will incur another temporary RAM cost for the deferred transaction that is generated by the eosio.msig contract). - -``` -$ cleos multisig exec blkproducera createsudo blkproducera -executed transaction: 7ecc183b99915cc411f96dde7c35c3fe0df6e732507f272af3a039b706482e5a 160 bytes 850 us -# eosio.msig <= eosio.msig::exec {"proposer":"blkproducera","proposal_name":"createsudo","executer":"blkproducera"} -warning: transaction executed locally, but may not be confirmed by the network yet -``` - -Anyone can now verify that the `eosio.sudo` was created: -``` -$ cleos get account eosio.sudo -privileged: true -permissions: - owner 1: 1 eosio@active, - active 1: 1 eosio@active, -memory: - quota: 49.74 KiB used: 3.33 KiB - -net bandwidth: - staked: 1.0000 SYS (total stake delegated from account to self) - delegated: 0.0000 SYS (total staked delegated to account from others) - used: 0 bytes - available: 2.304 MiB - limit: 2.304 MiB - -cpu bandwidth: - staked: 1.0000 SYS (total stake delegated from account to self) - delegated: 0.0000 SYS (total staked delegated to account from others) - used: 0 us - available: 460.8 ms - limit: 460.8 ms - -producers: - -``` - -### 2.2 Deploy the eosio.sudo contract - -#### 2.2.1 Generate the transaction to deploy the eosio.sudo contract - -The transaction to deploy the contract to the `eosio.sudo` account will need to be proposed to get the necessary approvals from active block producers before executing it. This transaction needs to first be generated and stored as JSON into a file so that it can be used in the cleos command to propose the transaction to the eosio.msig contract. - -The easy way to generate this transaction is using cleos: -``` -$ cleos set contract -s -j -d eosio.sudo contracts/eosio.sudo/ > deploy_sudo_contract_trx.json -Reading WAST/WASM from contracts/eosio.sudo/eosio.sudo.wasm... -Using already assembled WASM... -Publishing contract... -$ cat deploy_sudo_contract_trx.json -{ - "expiration": "2018-06-29T19:55:26", - "ref_block_num": 18544, - "ref_block_prefix": 562790588, - "max_net_usage_words": 0, - "max_cpu_usage_ms": 0, - "delay_sec": 0, - "context_free_actions": [], - "actions": [{ - "account": "eosio", - "name": "setcode", - "authorization": [{ - "actor": "eosio.sudo", - "permission": "active" - } - ], - "data": "00004d1a03ea30550000c8180061736d01000000013e0c60017f006000017e60027e7e0060017e006000017f60027f7f017f60027f7f0060037f7f7f017f60057f7e7f7f7f0060000060037e7e7e0060017f017f029d010803656e7610616374696f6e5f646174615f73697a65000403656e760c63757272656e745f74696d65000103656e760c656f73696f5f617373657274000603656e76066d656d637079000703656e7610726561645f616374696f6e5f64617461000503656e760c726571756972655f61757468000303656e760d726571756972655f6175746832000203656e760d73656e645f64656665727265640008030f0e0505050400000a05070b050b000904050170010202050301000107c7010b066d656d6f72790200165f5a6571524b3131636865636b73756d32353653315f0008165f5a6571524b3131636865636b73756d31363053315f0009165f5a6e65524b3131636865636b73756d31363053315f000a036e6f77000b305f5a4e35656f73696f3132726571756972655f6175746845524b4e535f31367065726d697373696f6e5f6c6576656c45000c155f5a4e35656f73696f347375646f34657865634576000d056170706c79000e066d656d636d700010066d616c6c6f630011046672656500140908010041000b02150d0a9a130e0b002000200141201010450b0b002000200141201010450b0d0020002001412010104100470b0a00100142c0843d80a70b0e002000290300200029030810060b9e0102017e027f410028020441206b2202210341002002360204200029030010050240024010002200418104490d002000101121020c010b410020022000410f6a4170716b22023602040b2002200010041a200041074b41101002200341186a2002410810031a2003290318100520032903182101200310013703002003200137030820032003290318200241086a2000410010074100200341206a3602040bfd0403027f047e017f4100410028020441206b220936020442002106423b2105412021044200210703400240024002400240024020064206560d0020042c00002203419f7f6a41ff017141194b0d01200341a5016a21030c020b420021082006420b580d020c030b200341d0016a41002003414f6a41ff01714105491b21030b2003ad42388642388721080b2008421f83200542ffffffff0f838621080b200441016a2104200642017c2106200820078421072005427b7c2205427a520d000b024020072002520d0042002106423b2105413021044200210703400240024002400240024020064204560d0020042c00002203419f7f6a41ff017141194b0d01200341a5016a21030c020b420021082006420b580d020c030b200341d0016a41002003414f6a41ff01714105491b21030b2003ad42388642388721080b2008421f83200542ffffffff0f838621080b200441016a2104200642017c2106200820078421072005427b7c2205427a520d000b200720015141c00010020b0240024020012000510d0042002106423b2105412021044200210703400240024002400240024020064206560d0020042c00002203419f7f6a41ff017141194b0d01200341a5016a21030c020b420021082006420b580d020c030b200341d0016a41002003414f6a41ff01714105491b21030b2003ad42388642388721080b2008421f83200542ffffffff0f838621080b200441016a2104200642017c2106200820078421072005427b7c2205427a520d000b20072002520d010b20092000370318200242808080808080a0aad700520d00200941003602142009410136021020092009290310370208200941186a200941086a100f1a0b4100200941206a3602040b8c0101047f4100280204220521042001280204210220012802002101024010002203450d00024020034180044d0d00200310112205200310041a200510140c010b410020052003410f6a4170716b22053602042005200310041a0b200020024101756a210302402002410171450d00200328020020016a28020021010b200320011100004100200436020441010b4901037f4100210502402002450d000240034020002d0000220320012d00002204470d01200141016a2101200041016a21002002417f6a22020d000c020b0b200320046b21050b20050b0900418001200010120bcd04010c7f02402001450d00024020002802c041220d0d004110210d200041c0c1006a41103602000b200141086a200141046a41077122026b200120021b210202400240024020002802c441220a200d4f0d002000200a410c6c6a4180c0006a21010240200a0d0020004184c0006a220d2802000d0020014180c000360200200d20003602000b200241046a210a034002402001280208220d200a6a20012802004b0d002001280204200d6a220d200d28020041808080807871200272360200200141086a22012001280200200a6a360200200d200d28020041808080807872360200200d41046a22010d030b2000101322010d000b0b41fcffffff0720026b2104200041c8c1006a210b200041c0c1006a210c20002802c8412203210d03402000200d410c6c6a22014188c0006a28020020014180c0006a22052802004641d0c200100220014184c0006a280200220641046a210d0340200620052802006a2107200d417c6a2208280200220941ffffffff07712101024020094100480d000240200120024f0d000340200d20016a220a20074f0d01200a280200220a4100480d012001200a41ffffffff07716a41046a22012002490d000b0b20082001200220012002491b200941808080807871723602000240200120024d0d00200d20026a200420016a41ffffffff07713602000b200120024f0d040b200d20016a41046a220d2007490d000b41002101200b4100200b28020041016a220d200d200c280200461b220d360200200d2003470d000b0b20010f0b2008200828020041808080807872360200200d0f0b41000b870501087f20002802c44121010240024041002d00a643450d0041002802a84321070c010b3f002107410041013a00a6434100200741107422073602a8430b200721030240024002400240200741ffff036a41107622023f0022084d0d00200220086b40001a4100210820023f00470d0141002802a84321030b41002108410020033602a84320074100480d0020002001410c6c6a210220074180800441808008200741ffff037122084181f8034922061b6a2008200741ffff077120061b6b20076b2107024041002d00a6430d003f002103410041013a00a6434100200341107422033602a8430b20024180c0006a210220074100480d01200321060240200741076a417871220520036a41ffff036a41107622083f0022044d0d00200820046b40001a20083f00470d0241002802a84321060b4100200620056a3602a8432003417f460d0120002001410c6c6a22014184c0006a2802002206200228020022086a2003460d020240200820014188c0006a22052802002201460d00200620016a2206200628020041808080807871417c20016b20086a72360200200520022802003602002006200628020041ffffffff07713602000b200041c4c1006a2202200228020041016a220236020020002002410c6c6a22004184c0006a200336020020004180c0006a220820073602000b20080f0b02402002280200220820002001410c6c6a22034188c0006a22012802002207460d0020034184c0006a28020020076a2203200328020041808080807871417c20076b20086a72360200200120022802003602002003200328020041ffffffff07713602000b2000200041c4c1006a220728020041016a22033602c0412007200336020041000f0b2002200820076a36020020020b7b01037f024002402000450d0041002802c04222024101480d004180c10021032002410c6c4180c1006a21010340200341046a2802002202450d010240200241046a20004b0d00200220032802006a20004b0d030b2003410c6a22032001490d000b0b0f0b2000417c6a2203200328020041ffffffff07713602000b0300000b0bcf01060041040b04b04900000041100b0572656164000041200b086f6e6572726f72000041300b06656f73696f000041c0000b406f6e6572726f7220616374696f6e277320617265206f6e6c792076616c69642066726f6d207468652022656f73696f222073797374656d206163636f756e74000041d0c2000b566d616c6c6f635f66726f6d5f6672656564207761732064657369676e656420746f206f6e6c792062652063616c6c6564206166746572205f686561702077617320636f6d706c6574656c7920616c6c6f636174656400" - },{ - "account": "eosio", - "name": "setabi", - "authorization": [{ - "actor": "eosio.sudo", - "permission": "active" - } - ], - "data": "00004d1a03ea3055df040e656f73696f3a3a6162692f312e30030c6163636f756e745f6e616d65046e616d650f7065726d697373696f6e5f6e616d65046e616d650b616374696f6e5f6e616d65046e616d6506107065726d697373696f6e5f6c6576656c0002056163746f720c6163636f756e745f6e616d650a7065726d697373696f6e0f7065726d697373696f6e5f6e616d6506616374696f6e0004076163636f756e740c6163636f756e745f6e616d65046e616d650b616374696f6e5f6e616d650d617574686f72697a6174696f6e127065726d697373696f6e5f6c6576656c5b5d0464617461056279746573127472616e73616374696f6e5f68656164657200060a65787069726174696f6e0e74696d655f706f696e745f7365630d7265665f626c6f636b5f6e756d0675696e743136107265665f626c6f636b5f7072656669780675696e743332136d61785f6e65745f75736167655f776f7264730976617275696e743332106d61785f6370755f75736167655f6d730575696e74380964656c61795f7365630976617275696e74333209657874656e73696f6e000204747970650675696e74313604646174610562797465730b7472616e73616374696f6e127472616e73616374696f6e5f6865616465720314636f6e746578745f667265655f616374696f6e7308616374696f6e5b5d07616374696f6e7308616374696f6e5b5d167472616e73616374696f6e5f657874656e73696f6e730b657874656e73696f6e5b5d046578656300020865786563757465720c6163636f756e745f6e616d65037472780b7472616e73616374696f6e01000000000080545704657865630000000000" - } - ], - "transaction_extensions": [], - "signatures": [], - "context_free_data": [] -} -``` - -Once again, as described in sub-section 2.1.1, edit the values of the `ref_block_num` and `ref_block_prefix` fields to be 0 and edit the time of the `expiration` field to some point in the future that provides enough time to approve and execute the proposed transaction. After editing deploy_sudo_contract_trx.json the first few lines of it may look something like the following: -``` -$ head -n 9 deploy_sudo_contract_trx.json -{ - "expiration": "2018-07-06T12:00:00", - "ref_block_num": 0, - "ref_block_prefix": 0, - "max_net_usage_words": 0, - "max_cpu_usage_ms": 0, - "delay_sec": 0, - "context_free_actions": [], - "actions": [{ -``` - -This guide will assume that there are 21 active block producers on the chain with account names: `blkproducera`, `blkproducerb`, ..., `blkproduceru`. The end of sub-section 2.1.1 displayed what the JSON of the active permissions of each of the active block producers would look like given the assumptions about the active block producer set. That JSON was stored in the file producer_permissions.json; if the approvers (i.e. block producers) have not created that file already, they should create that file now as shown at the end of sub-section 2.1.1. - -#### 2.2.2 Propose the transaction to deploy the eosio.sudo contract - -Only one of the potential approvers will need to propose the transaction that was created in the previous sub-section. All the other approvers should still follow the steps in the previous sub-section to generate the same deploy_sudo_contract_trx.json file as all the other approvers. They will need this to compare to the actual proposed transaction prior to approving. - -The approvers are typically going to be the active block producers of the chain, so it makes sense that one of the block producers is elected as the leader to propose the actual transaction. Note that this lead block producer will need to incur the temporary RAM cost of proposing the transaction, but they will get the RAM back when the proposal has executed or has been canceled (which only the proposer can do prior to expiration). - -This guide will assume that `blkproducera` was chosen as the lead block producer to propose the transaction. - -The lead block producer (`blkproducera`) should propose the transaction stored in deploy_sudo_contract_trx.json: -``` -$ cleos multisig propose_trx deploysudo producer_permissions.json deploy_sudo_contract_trx.json blkproducera -executed transaction: 9e50dd40eba25583a657ee8114986a921d413b917002c8fb2d02e2d670f720a8 4312 bytes 871 us -# eosio.msig <= eosio.msig::propose {"proposer":"blkproducera","proposal_name":"deploysudo","requested":[{"actor":"blkproducera","permis... -warning: transaction executed locally, but may not be confirmed by the network yet -``` - -#### 2.2.3 Review and approve the transaction to deploy the eosio.sudo contract - -Each of the potential approvers of the proposed transaction (i.e. the active block producers) should first review the proposed transaction to make sure they are not approving anything that they do not agree to. - -The proposed transaction can be reviewed using the `cleos multisig review` command: -``` -$ cleos multisig review blkproducera deploysudo > deploy_sudo_contract_trx_to_review.json -$ cat deploy_sudo_contract_trx_to_review.json -{ - "proposal_name": "deploysudo", - "packed_transaction": "c0593f5b00000000000000000000020000000000ea305500000040258ab2c20100004d1a03ea305500000000a8ed3232d41800004d1a03ea30550000c8180061736d01000000013e0c60017f006000017e60027e7e0060017e006000017f60027f7f017f60027f7f0060037f7f7f017f60057f7e7f7f7f0060000060037e7e7e0060017f017f029d010803656e7610616374696f6e5f646174615f73697a65000403656e760c63757272656e745f74696d65000103656e760c656f73696f5f617373657274000603656e76066d656d637079000703656e7610726561645f616374696f6e5f64617461000503656e760c726571756972655f61757468000303656e760d726571756972655f6175746832000203656e760d73656e645f64656665727265640008030f0e0505050400000a05070b050b000904050170010202050301000107c7010b066d656d6f72790200165f5a6571524b3131636865636b73756d32353653315f0008165f5a6571524b3131636865636b73756d31363053315f0009165f5a6e65524b3131636865636b73756d31363053315f000a036e6f77000b305f5a4e35656f73696f3132726571756972655f6175746845524b4e535f31367065726d697373696f6e5f6c6576656c45000c155f5a4e35656f73696f347375646f34657865634576000d056170706c79000e066d656d636d700010066d616c6c6f630011046672656500140908010041000b02150d0a9a130e0b002000200141201010450b0b002000200141201010450b0d0020002001412010104100470b0a00100142c0843d80a70b0e002000290300200029030810060b9e0102017e027f410028020441206b2202210341002002360204200029030010050240024010002200418104490d002000101121020c010b410020022000410f6a4170716b22023602040b2002200010041a200041074b41101002200341186a2002410810031a2003290318100520032903182101200310013703002003200137030820032003290318200241086a2000410010074100200341206a3602040bfd0403027f047e017f4100410028020441206b220936020442002106423b2105412021044200210703400240024002400240024020064206560d0020042c00002203419f7f6a41ff017141194b0d01200341a5016a21030c020b420021082006420b580d020c030b200341d0016a41002003414f6a41ff01714105491b21030b2003ad42388642388721080b2008421f83200542ffffffff0f838621080b200441016a2104200642017c2106200820078421072005427b7c2205427a520d000b024020072002520d0042002106423b2105413021044200210703400240024002400240024020064204560d0020042c00002203419f7f6a41ff017141194b0d01200341a5016a21030c020b420021082006420b580d020c030b200341d0016a41002003414f6a41ff01714105491b21030b2003ad42388642388721080b2008421f83200542ffffffff0f838621080b200441016a2104200642017c2106200820078421072005427b7c2205427a520d000b200720015141c00010020b0240024020012000510d0042002106423b2105412021044200210703400240024002400240024020064206560d0020042c00002203419f7f6a41ff017141194b0d01200341a5016a21030c020b420021082006420b580d020c030b200341d0016a41002003414f6a41ff01714105491b21030b2003ad42388642388721080b2008421f83200542ffffffff0f838621080b200441016a2104200642017c2106200820078421072005427b7c2205427a520d000b20072002520d010b20092000370318200242808080808080a0aad700520d00200941003602142009410136021020092009290310370208200941186a200941086a100f1a0b4100200941206a3602040b8c0101047f4100280204220521042001280204210220012802002101024010002203450d00024020034180044d0d00200310112205200310041a200510140c010b410020052003410f6a4170716b22053602042005200310041a0b200020024101756a210302402002410171450d00200328020020016a28020021010b200320011100004100200436020441010b4901037f4100210502402002450d000240034020002d0000220320012d00002204470d01200141016a2101200041016a21002002417f6a22020d000c020b0b200320046b21050b20050b0900418001200010120bcd04010c7f02402001450d00024020002802c041220d0d004110210d200041c0c1006a41103602000b200141086a200141046a41077122026b200120021b210202400240024020002802c441220a200d4f0d002000200a410c6c6a4180c0006a21010240200a0d0020004184c0006a220d2802000d0020014180c000360200200d20003602000b200241046a210a034002402001280208220d200a6a20012802004b0d002001280204200d6a220d200d28020041808080807871200272360200200141086a22012001280200200a6a360200200d200d28020041808080807872360200200d41046a22010d030b2000101322010d000b0b41fcffffff0720026b2104200041c8c1006a210b200041c0c1006a210c20002802c8412203210d03402000200d410c6c6a22014188c0006a28020020014180c0006a22052802004641d0c200100220014184c0006a280200220641046a210d0340200620052802006a2107200d417c6a2208280200220941ffffffff07712101024020094100480d000240200120024f0d000340200d20016a220a20074f0d01200a280200220a4100480d012001200a41ffffffff07716a41046a22012002490d000b0b20082001200220012002491b200941808080807871723602000240200120024d0d00200d20026a200420016a41ffffffff07713602000b200120024f0d040b200d20016a41046a220d2007490d000b41002101200b4100200b28020041016a220d200d200c280200461b220d360200200d2003470d000b0b20010f0b2008200828020041808080807872360200200d0f0b41000b870501087f20002802c44121010240024041002d00a643450d0041002802a84321070c010b3f002107410041013a00a6434100200741107422073602a8430b200721030240024002400240200741ffff036a41107622023f0022084d0d00200220086b40001a4100210820023f00470d0141002802a84321030b41002108410020033602a84320074100480d0020002001410c6c6a210220074180800441808008200741ffff037122084181f8034922061b6a2008200741ffff077120061b6b20076b2107024041002d00a6430d003f002103410041013a00a6434100200341107422033602a8430b20024180c0006a210220074100480d01200321060240200741076a417871220520036a41ffff036a41107622083f0022044d0d00200820046b40001a20083f00470d0241002802a84321060b4100200620056a3602a8432003417f460d0120002001410c6c6a22014184c0006a2802002206200228020022086a2003460d020240200820014188c0006a22052802002201460d00200620016a2206200628020041808080807871417c20016b20086a72360200200520022802003602002006200628020041ffffffff07713602000b200041c4c1006a2202200228020041016a220236020020002002410c6c6a22004184c0006a200336020020004180c0006a220820073602000b20080f0b02402002280200220820002001410c6c6a22034188c0006a22012802002207460d0020034184c0006a28020020076a2203200328020041808080807871417c20076b20086a72360200200120022802003602002003200328020041ffffffff07713602000b2000200041c4c1006a220728020041016a22033602c0412007200336020041000f0b2002200820076a36020020020b7b01037f024002402000450d0041002802c04222024101480d004180c10021032002410c6c4180c1006a21010340200341046a2802002202450d010240200241046a20004b0d00200220032802006a20004b0d030b2003410c6a22032001490d000b0b0f0b2000417c6a2203200328020041ffffffff07713602000b0300000b0bcf01060041040b04b04900000041100b0572656164000041200b086f6e6572726f72000041300b06656f73696f000041c0000b406f6e6572726f7220616374696f6e277320617265206f6e6c792076616c69642066726f6d207468652022656f73696f222073797374656d206163636f756e74000041d0c2000b566d616c6c6f635f66726f6d5f6672656564207761732064657369676e656420746f206f6e6c792062652063616c6c6564206166746572205f686561702077617320636f6d706c6574656c7920616c6c6f6361746564000000000000ea305500000000b863b2c20100004d1a03ea305500000000a8ed3232e90400004d1a03ea3055df040e656f73696f3a3a6162692f312e30030c6163636f756e745f6e616d65046e616d650f7065726d697373696f6e5f6e616d65046e616d650b616374696f6e5f6e616d65046e616d6506107065726d697373696f6e5f6c6576656c0002056163746f720c6163636f756e745f6e616d650a7065726d697373696f6e0f7065726d697373696f6e5f6e616d6506616374696f6e0004076163636f756e740c6163636f756e745f6e616d65046e616d650b616374696f6e5f6e616d650d617574686f72697a6174696f6e127065726d697373696f6e5f6c6576656c5b5d0464617461056279746573127472616e73616374696f6e5f68656164657200060a65787069726174696f6e0e74696d655f706f696e745f7365630d7265665f626c6f636b5f6e756d0675696e743136107265665f626c6f636b5f7072656669780675696e743332136d61785f6e65745f75736167655f776f7264730976617275696e743332106d61785f6370755f75736167655f6d730575696e74380964656c61795f7365630976617275696e74333209657874656e73696f6e000204747970650675696e74313604646174610562797465730b7472616e73616374696f6e127472616e73616374696f6e5f6865616465720314636f6e746578745f667265655f616374696f6e7308616374696f6e5b5d07616374696f6e7308616374696f6e5b5d167472616e73616374696f6e5f657874656e73696f6e730b657874656e73696f6e5b5d046578656300020865786563757465720c6163636f756e745f6e616d65037472780b7472616e73616374696f6e0100000000008054570465786563000000000000", - "transaction": { - "expiration": "2018-07-06T12:00:00", - "ref_block_num": 0, - "ref_block_prefix": 0, - "max_net_usage_words": 0, - "max_cpu_usage_ms": 0, - "delay_sec": 0, - "context_free_actions": [], - "actions": [{ - "account": "eosio", - "name": "setcode", - "authorization": [{ - "actor": "eosio.sudo", - "permission": "active" - } - ], - "data": { - "account": "eosio.sudo", - "vmtype": 0, - "vmversion": 0, - "code": "0061736d01000000013e0c60017f006000017e60027e7e0060017e006000017f60027f7f017f60027f7f0060037f7f7f017f60057f7e7f7f7f0060000060037e7e7e0060017f017f029d010803656e7610616374696f6e5f646174615f73697a65000403656e760c63757272656e745f74696d65000103656e760c656f73696f5f617373657274000603656e76066d656d637079000703656e7610726561645f616374696f6e5f64617461000503656e760c726571756972655f61757468000303656e760d726571756972655f6175746832000203656e760d73656e645f64656665727265640008030f0e0505050400000a05070b050b000904050170010202050301000107c7010b066d656d6f72790200165f5a6571524b3131636865636b73756d32353653315f0008165f5a6571524b3131636865636b73756d31363053315f0009165f5a6e65524b3131636865636b73756d31363053315f000a036e6f77000b305f5a4e35656f73696f3132726571756972655f6175746845524b4e535f31367065726d697373696f6e5f6c6576656c45000c155f5a4e35656f73696f347375646f34657865634576000d056170706c79000e066d656d636d700010066d616c6c6f630011046672656500140908010041000b02150d0a9a130e0b002000200141201010450b0b002000200141201010450b0d0020002001412010104100470b0a00100142c0843d80a70b0e002000290300200029030810060b9e0102017e027f410028020441206b2202210341002002360204200029030010050240024010002200418104490d002000101121020c010b410020022000410f6a4170716b22023602040b2002200010041a200041074b41101002200341186a2002410810031a2003290318100520032903182101200310013703002003200137030820032003290318200241086a2000410010074100200341206a3602040bfd0403027f047e017f4100410028020441206b220936020442002106423b2105412021044200210703400240024002400240024020064206560d0020042c00002203419f7f6a41ff017141194b0d01200341a5016a21030c020b420021082006420b580d020c030b200341d0016a41002003414f6a41ff01714105491b21030b2003ad42388642388721080b2008421f83200542ffffffff0f838621080b200441016a2104200642017c2106200820078421072005427b7c2205427a520d000b024020072002520d0042002106423b2105413021044200210703400240024002400240024020064204560d0020042c00002203419f7f6a41ff017141194b0d01200341a5016a21030c020b420021082006420b580d020c030b200341d0016a41002003414f6a41ff01714105491b21030b2003ad42388642388721080b2008421f83200542ffffffff0f838621080b200441016a2104200642017c2106200820078421072005427b7c2205427a520d000b200720015141c00010020b0240024020012000510d0042002106423b2105412021044200210703400240024002400240024020064206560d0020042c00002203419f7f6a41ff017141194b0d01200341a5016a21030c020b420021082006420b580d020c030b200341d0016a41002003414f6a41ff01714105491b21030b2003ad42388642388721080b2008421f83200542ffffffff0f838621080b200441016a2104200642017c2106200820078421072005427b7c2205427a520d000b20072002520d010b20092000370318200242808080808080a0aad700520d00200941003602142009410136021020092009290310370208200941186a200941086a100f1a0b4100200941206a3602040b8c0101047f4100280204220521042001280204210220012802002101024010002203450d00024020034180044d0d00200310112205200310041a200510140c010b410020052003410f6a4170716b22053602042005200310041a0b200020024101756a210302402002410171450d00200328020020016a28020021010b200320011100004100200436020441010b4901037f4100210502402002450d000240034020002d0000220320012d00002204470d01200141016a2101200041016a21002002417f6a22020d000c020b0b200320046b21050b20050b0900418001200010120bcd04010c7f02402001450d00024020002802c041220d0d004110210d200041c0c1006a41103602000b200141086a200141046a41077122026b200120021b210202400240024020002802c441220a200d4f0d002000200a410c6c6a4180c0006a21010240200a0d0020004184c0006a220d2802000d0020014180c000360200200d20003602000b200241046a210a034002402001280208220d200a6a20012802004b0d002001280204200d6a220d200d28020041808080807871200272360200200141086a22012001280200200a6a360200200d200d28020041808080807872360200200d41046a22010d030b2000101322010d000b0b41fcffffff0720026b2104200041c8c1006a210b200041c0c1006a210c20002802c8412203210d03402000200d410c6c6a22014188c0006a28020020014180c0006a22052802004641d0c200100220014184c0006a280200220641046a210d0340200620052802006a2107200d417c6a2208280200220941ffffffff07712101024020094100480d000240200120024f0d000340200d20016a220a20074f0d01200a280200220a4100480d012001200a41ffffffff07716a41046a22012002490d000b0b20082001200220012002491b200941808080807871723602000240200120024d0d00200d20026a200420016a41ffffffff07713602000b200120024f0d040b200d20016a41046a220d2007490d000b41002101200b4100200b28020041016a220d200d200c280200461b220d360200200d2003470d000b0b20010f0b2008200828020041808080807872360200200d0f0b41000b870501087f20002802c44121010240024041002d00a643450d0041002802a84321070c010b3f002107410041013a00a6434100200741107422073602a8430b200721030240024002400240200741ffff036a41107622023f0022084d0d00200220086b40001a4100210820023f00470d0141002802a84321030b41002108410020033602a84320074100480d0020002001410c6c6a210220074180800441808008200741ffff037122084181f8034922061b6a2008200741ffff077120061b6b20076b2107024041002d00a6430d003f002103410041013a00a6434100200341107422033602a8430b20024180c0006a210220074100480d01200321060240200741076a417871220520036a41ffff036a41107622083f0022044d0d00200820046b40001a20083f00470d0241002802a84321060b4100200620056a3602a8432003417f460d0120002001410c6c6a22014184c0006a2802002206200228020022086a2003460d020240200820014188c0006a22052802002201460d00200620016a2206200628020041808080807871417c20016b20086a72360200200520022802003602002006200628020041ffffffff07713602000b200041c4c1006a2202200228020041016a220236020020002002410c6c6a22004184c0006a200336020020004180c0006a220820073602000b20080f0b02402002280200220820002001410c6c6a22034188c0006a22012802002207460d0020034184c0006a28020020076a2203200328020041808080807871417c20076b20086a72360200200120022802003602002003200328020041ffffffff07713602000b2000200041c4c1006a220728020041016a22033602c0412007200336020041000f0b2002200820076a36020020020b7b01037f024002402000450d0041002802c04222024101480d004180c10021032002410c6c4180c1006a21010340200341046a2802002202450d010240200241046a20004b0d00200220032802006a20004b0d030b2003410c6a22032001490d000b0b0f0b2000417c6a2203200328020041ffffffff07713602000b0300000b0bcf01060041040b04b04900000041100b0572656164000041200b086f6e6572726f72000041300b06656f73696f000041c0000b406f6e6572726f7220616374696f6e277320617265206f6e6c792076616c69642066726f6d207468652022656f73696f222073797374656d206163636f756e74000041d0c2000b566d616c6c6f635f66726f6d5f6672656564207761732064657369676e656420746f206f6e6c792062652063616c6c6564206166746572205f686561702077617320636f6d706c6574656c7920616c6c6f636174656400" - }, - "hex_data": "00004d1a03ea30550000c8180061736d01000000013e0c60017f006000017e60027e7e0060017e006000017f60027f7f017f60027f7f0060037f7f7f017f60057f7e7f7f7f0060000060037e7e7e0060017f017f029d010803656e7610616374696f6e5f646174615f73697a65000403656e760c63757272656e745f74696d65000103656e760c656f73696f5f617373657274000603656e76066d656d637079000703656e7610726561645f616374696f6e5f64617461000503656e760c726571756972655f61757468000303656e760d726571756972655f6175746832000203656e760d73656e645f64656665727265640008030f0e0505050400000a05070b050b000904050170010202050301000107c7010b066d656d6f72790200165f5a6571524b3131636865636b73756d32353653315f0008165f5a6571524b3131636865636b73756d31363053315f0009165f5a6e65524b3131636865636b73756d31363053315f000a036e6f77000b305f5a4e35656f73696f3132726571756972655f6175746845524b4e535f31367065726d697373696f6e5f6c6576656c45000c155f5a4e35656f73696f347375646f34657865634576000d056170706c79000e066d656d636d700010066d616c6c6f630011046672656500140908010041000b02150d0a9a130e0b002000200141201010450b0b002000200141201010450b0d0020002001412010104100470b0a00100142c0843d80a70b0e002000290300200029030810060b9e0102017e027f410028020441206b2202210341002002360204200029030010050240024010002200418104490d002000101121020c010b410020022000410f6a4170716b22023602040b2002200010041a200041074b41101002200341186a2002410810031a2003290318100520032903182101200310013703002003200137030820032003290318200241086a2000410010074100200341206a3602040bfd0403027f047e017f4100410028020441206b220936020442002106423b2105412021044200210703400240024002400240024020064206560d0020042c00002203419f7f6a41ff017141194b0d01200341a5016a21030c020b420021082006420b580d020c030b200341d0016a41002003414f6a41ff01714105491b21030b2003ad42388642388721080b2008421f83200542ffffffff0f838621080b200441016a2104200642017c2106200820078421072005427b7c2205427a520d000b024020072002520d0042002106423b2105413021044200210703400240024002400240024020064204560d0020042c00002203419f7f6a41ff017141194b0d01200341a5016a21030c020b420021082006420b580d020c030b200341d0016a41002003414f6a41ff01714105491b21030b2003ad42388642388721080b2008421f83200542ffffffff0f838621080b200441016a2104200642017c2106200820078421072005427b7c2205427a520d000b200720015141c00010020b0240024020012000510d0042002106423b2105412021044200210703400240024002400240024020064206560d0020042c00002203419f7f6a41ff017141194b0d01200341a5016a21030c020b420021082006420b580d020c030b200341d0016a41002003414f6a41ff01714105491b21030b2003ad42388642388721080b2008421f83200542ffffffff0f838621080b200441016a2104200642017c2106200820078421072005427b7c2205427a520d000b20072002520d010b20092000370318200242808080808080a0aad700520d00200941003602142009410136021020092009290310370208200941186a200941086a100f1a0b4100200941206a3602040b8c0101047f4100280204220521042001280204210220012802002101024010002203450d00024020034180044d0d00200310112205200310041a200510140c010b410020052003410f6a4170716b22053602042005200310041a0b200020024101756a210302402002410171450d00200328020020016a28020021010b200320011100004100200436020441010b4901037f4100210502402002450d000240034020002d0000220320012d00002204470d01200141016a2101200041016a21002002417f6a22020d000c020b0b200320046b21050b20050b0900418001200010120bcd04010c7f02402001450d00024020002802c041220d0d004110210d200041c0c1006a41103602000b200141086a200141046a41077122026b200120021b210202400240024020002802c441220a200d4f0d002000200a410c6c6a4180c0006a21010240200a0d0020004184c0006a220d2802000d0020014180c000360200200d20003602000b200241046a210a034002402001280208220d200a6a20012802004b0d002001280204200d6a220d200d28020041808080807871200272360200200141086a22012001280200200a6a360200200d200d28020041808080807872360200200d41046a22010d030b2000101322010d000b0b41fcffffff0720026b2104200041c8c1006a210b200041c0c1006a210c20002802c8412203210d03402000200d410c6c6a22014188c0006a28020020014180c0006a22052802004641d0c200100220014184c0006a280200220641046a210d0340200620052802006a2107200d417c6a2208280200220941ffffffff07712101024020094100480d000240200120024f0d000340200d20016a220a20074f0d01200a280200220a4100480d012001200a41ffffffff07716a41046a22012002490d000b0b20082001200220012002491b200941808080807871723602000240200120024d0d00200d20026a200420016a41ffffffff07713602000b200120024f0d040b200d20016a41046a220d2007490d000b41002101200b4100200b28020041016a220d200d200c280200461b220d360200200d2003470d000b0b20010f0b2008200828020041808080807872360200200d0f0b41000b870501087f20002802c44121010240024041002d00a643450d0041002802a84321070c010b3f002107410041013a00a6434100200741107422073602a8430b200721030240024002400240200741ffff036a41107622023f0022084d0d00200220086b40001a4100210820023f00470d0141002802a84321030b41002108410020033602a84320074100480d0020002001410c6c6a210220074180800441808008200741ffff037122084181f8034922061b6a2008200741ffff077120061b6b20076b2107024041002d00a6430d003f002103410041013a00a6434100200341107422033602a8430b20024180c0006a210220074100480d01200321060240200741076a417871220520036a41ffff036a41107622083f0022044d0d00200820046b40001a20083f00470d0241002802a84321060b4100200620056a3602a8432003417f460d0120002001410c6c6a22014184c0006a2802002206200228020022086a2003460d020240200820014188c0006a22052802002201460d00200620016a2206200628020041808080807871417c20016b20086a72360200200520022802003602002006200628020041ffffffff07713602000b200041c4c1006a2202200228020041016a220236020020002002410c6c6a22004184c0006a200336020020004180c0006a220820073602000b20080f0b02402002280200220820002001410c6c6a22034188c0006a22012802002207460d0020034184c0006a28020020076a2203200328020041808080807871417c20076b20086a72360200200120022802003602002003200328020041ffffffff07713602000b2000200041c4c1006a220728020041016a22033602c0412007200336020041000f0b2002200820076a36020020020b7b01037f024002402000450d0041002802c04222024101480d004180c10021032002410c6c4180c1006a21010340200341046a2802002202450d010240200241046a20004b0d00200220032802006a20004b0d030b2003410c6a22032001490d000b0b0f0b2000417c6a2203200328020041ffffffff07713602000b0300000b0bcf01060041040b04b04900000041100b0572656164000041200b086f6e6572726f72000041300b06656f73696f000041c0000b406f6e6572726f7220616374696f6e277320617265206f6e6c792076616c69642066726f6d207468652022656f73696f222073797374656d206163636f756e74000041d0c2000b566d616c6c6f635f66726f6d5f6672656564207761732064657369676e656420746f206f6e6c792062652063616c6c6564206166746572205f686561702077617320636f6d706c6574656c7920616c6c6f636174656400" - },{ - "account": "eosio", - "name": "setabi", - "authorization": [{ - "actor": "eosio.sudo", - "permission": "active" - } - ], - "data": { - "account": "eosio.sudo", - "abi": "0e656f73696f3a3a6162692f312e30030c6163636f756e745f6e616d65046e616d650f7065726d697373696f6e5f6e616d65046e616d650b616374696f6e5f6e616d65046e616d6506107065726d697373696f6e5f6c6576656c0002056163746f720c6163636f756e745f6e616d650a7065726d697373696f6e0f7065726d697373696f6e5f6e616d6506616374696f6e0004076163636f756e740c6163636f756e745f6e616d65046e616d650b616374696f6e5f6e616d650d617574686f72697a6174696f6e127065726d697373696f6e5f6c6576656c5b5d0464617461056279746573127472616e73616374696f6e5f68656164657200060a65787069726174696f6e0e74696d655f706f696e745f7365630d7265665f626c6f636b5f6e756d0675696e743136107265665f626c6f636b5f7072656669780675696e743332136d61785f6e65745f75736167655f776f7264730976617275696e743332106d61785f6370755f75736167655f6d730575696e74380964656c61795f7365630976617275696e74333209657874656e73696f6e000204747970650675696e74313604646174610562797465730b7472616e73616374696f6e127472616e73616374696f6e5f6865616465720314636f6e746578745f667265655f616374696f6e7308616374696f6e5b5d07616374696f6e7308616374696f6e5b5d167472616e73616374696f6e5f657874656e73696f6e730b657874656e73696f6e5b5d046578656300020865786563757465720c6163636f756e745f6e616d65037472780b7472616e73616374696f6e01000000000080545704657865630000000000" - }, - "hex_data": "00004d1a03ea3055df040e656f73696f3a3a6162692f312e30030c6163636f756e745f6e616d65046e616d650f7065726d697373696f6e5f6e616d65046e616d650b616374696f6e5f6e616d65046e616d6506107065726d697373696f6e5f6c6576656c0002056163746f720c6163636f756e745f6e616d650a7065726d697373696f6e0f7065726d697373696f6e5f6e616d6506616374696f6e0004076163636f756e740c6163636f756e745f6e616d65046e616d650b616374696f6e5f6e616d650d617574686f72697a6174696f6e127065726d697373696f6e5f6c6576656c5b5d0464617461056279746573127472616e73616374696f6e5f68656164657200060a65787069726174696f6e0e74696d655f706f696e745f7365630d7265665f626c6f636b5f6e756d0675696e743136107265665f626c6f636b5f7072656669780675696e743332136d61785f6e65745f75736167655f776f7264730976617275696e743332106d61785f6370755f75736167655f6d730575696e74380964656c61795f7365630976617275696e74333209657874656e73696f6e000204747970650675696e74313604646174610562797465730b7472616e73616374696f6e127472616e73616374696f6e5f6865616465720314636f6e746578745f667265655f616374696f6e7308616374696f6e5b5d07616374696f6e7308616374696f6e5b5d167472616e73616374696f6e5f657874656e73696f6e730b657874656e73696f6e5b5d046578656300020865786563757465720c6163636f756e745f6e616d65037472780b7472616e73616374696f6e01000000000080545704657865630000000000" - } - ], - "transaction_extensions": [] - } -} -``` - -Each approver should be able to see that the proposed transaction is setting the code and ABI of the `eosio.sudo` contract. But the data is just hex data and therefore not very meaningful to the approver. And considering that `eosio.sudo` at this point should be a privileged contract, it would be very dangerous for block producers to just allow a contract to be deployed to a privileged account without knowing exactly which WebAssembly code they are deploying and also auditing the source code that generated that WebAssembly code to ensure it is safe to deploy. - -This guide assumes that each approver has already audited the source code of the contract to be deployed and has already compiled that code to generate the WebAssembly code that should be byte-for-byte identical to the code that every other approver following the same process should have generated. The guide also assumes that this generated code and its associated ABI were provided in the steps in sub-section 2.2.1 that generated the transaction in the deploy_sudo_contract_trx.json file. It then becomes quite simple to verify that the proposed transaction is identical to the one the potential approver could have proposed with the code and ABI that they already audited: -``` -$ cleos multisig propose_trx -j -s -d deploysudo '[]' deploy_sudo_contract_trx.json blkproducera | grep '"data":' | sed 's/^[ \t]*"data":[ \t]*//;s/[",]//g' | cut -c 35- > expected_deploy_sudo_trx_serialized.hex -$ cat expected_deploy_sudo_trx_serialized.hex | cut -c -50 -c0593f5b00000000000000000000020000000000ea30550000 -$ cat deploy_sudo_account_trx_to_review.json | grep '"packed_transaction":' | sed 's/^[ \t]*"packed_transaction":[ \t]*//;s/[",]//g' > proposed_deploy_sudo_trx_serialized.hex -$ cat proposed_deploy_sudo_trx_serialized.hex | cut -c -50 -c0593f5b00000000000000000000020000000000ea30550000 -$ diff expected_deploy_sudo_trx_serialized.hex proposed_deploy_sudo_trx_serialized.hex -``` - -When an approver (e.g. `blkproducerb`) is satisfied with the proposed transaction, they can simply approve it: -``` -$ cleos multisig approve blkproducera deploysudo '{"actor": "blkproducerb", "permission": "active"}' -p blkproducerb -executed transaction: d1e424e05ee4d96eb079fcd5190dd0bf35eca8c27dd7231b59df8e464881abfd 128 bytes 483 us -# eosio.msig <= eosio.msig::approve {"proposer":"blkproducera","proposal_name":"deploysudo","level":{"actor":"blkproducerb","permission"... -warning: transaction executed locally, but may not be confirmed by the network yet -``` - -#### 2.2.4 Execute the transaction to create the eosio.sudo account - -When the necessary approvals are collected (in this example, with 21 block producers, at least 15 of their approvals were required), anyone can push the `eosio.msig::exec` action which executes the approved transaction. It makes a lot of sense for the lead block producer who proposed the transaction to also execute it (this will incur another temporary RAM cost for the deferred transaction that is generated by the eosio.msig contract). - -``` -$ cleos multisig exec blkproducera deploysudo blkproducera -executed transaction: e8da14c6f1fdc3255b5413adccfd0d89b18f832a4cc18c4324ea2beec6abd483 160 bytes 1877 us -# eosio.msig <= eosio.msig::exec {"proposer":"blkproducera","proposal_name":"deploysudo","executer":"blkproducera"} -``` - -Anyone can now verify that the `eosio.sudo` contract was deployed correctly. - -``` -$ cleos get code -a retrieved-eosio.sudo.abi eosio.sudo -code hash: 1b3456a5eca28bcaca7a2a3360fbb2a72b9772a416c8e11a303bcb26bfe3263c -saving abi to retrieved-eosio.sudo.abi -$ sha256sum contracts/eosio.sudo/eosio.sudo.wasm -1b3456a5eca28bcaca7a2a3360fbb2a72b9772a416c8e11a303bcb26bfe3263c contracts/eosio.sudo/eosio.sudo.wasm -``` - -If the two hashes match then the local WebAssembly code is the one deployed on the blockchain. The retrieved ABI, which was stored in the file retrieved-eosio.sudo.abi, can then be compared to the original ABI of the contract (contracts/eosio.sudo/eosio.sudo.abi) to ensure they are semantically the same. - -## 3. Using the eosio.sudo contract - -### 3.1 Example: Updating owner authority of an arbitrary account - -This example will demonstrate how to use the deployed eosio.sudo contract together with the eosio.msig contract to allow a greater than two-thirds supermajority of block producers of an EOSIO blockchain to change the owner authority of an arbitrary account. The example will use cleos: in particular, the `cleos multisig` command, the `cleos set account permission` sub-command, and the `cleos sudo exec` sub-command. However, the guide also demonstrates what to do if the `cleos sudo exec` sub-command is not available. - -This guide assumes that there are 21 active block producers on the chain with account names: `blkproducera`, `blkproducerb`, ..., `blkproduceru`. Block producer `blkproducera` will act as the lead block producer handling the proposal of the transaction. - -The producer permissions will later come in handy when proposing a transaction that must be approved by a supermajority of the producers. So a file producer_permissions.json containing those permission (see contents below) should be created to be used later in this guide: -``` -$ cat producer_permissions.json -[ - {"actor": "blkproducera", "permission": "active"}, - {"actor": "blkproducerb", "permission": "active"}, - {"actor": "blkproducerc", "permission": "active"}, - {"actor": "blkproducerd", "permission": "active"}, - {"actor": "blkproducere", "permission": "active"}, - {"actor": "blkproducerf", "permission": "active"}, - {"actor": "blkproducerg", "permission": "active"}, - {"actor": "blkproducerh", "permission": "active"}, - {"actor": "blkproduceri", "permission": "active"}, - {"actor": "blkproducerj", "permission": "active"}, - {"actor": "blkproducerk", "permission": "active"}, - {"actor": "blkproducerl", "permission": "active"}, - {"actor": "blkproducerm", "permission": "active"}, - {"actor": "blkproducern", "permission": "active"}, - {"actor": "blkproducero", "permission": "active"}, - {"actor": "blkproducerp", "permission": "active"}, - {"actor": "blkproducerq", "permission": "active"}, - {"actor": "blkproducerr", "permission": "active"}, - {"actor": "blkproducers", "permission": "active"}, - {"actor": "blkproducert", "permission": "active"}, - {"actor": "blkproduceru", "permission": "active"} -] -``` - -#### 3.1.1 Generate the transaction to change the owner permission of an account - -The goal of this example is for the block producers to change the owner permission of the account `alice`. - -The initial status of the `alice` account might be: -``` -permissions: - owner 1: 1 EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV - active 1: 1 EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV -memory: - quota: 49.74 KiB used: 3.365 KiB - -net bandwidth: - staked: 1.0000 SYS (total stake delegated from account to self) - delegated: 0.0000 SYS (total staked delegated to account from others) - used: 0 bytes - available: 2.304 MiB - limit: 2.304 MiB - -cpu bandwidth: - staked: 1.0000 SYS (total stake delegated from account to self) - delegated: 0.0000 SYS (total staked delegated to account from others) - used: 0 us - available: 460.8 ms - limit: 460.8 ms - -producers: -``` - -Assume that none of the block producers know the private key corresponding to the public key `EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV` which, as can be seen above, is initially securing access to the `alice` account. - -The first step is to generate the transaction changing the owner permission of the `alice` account as if `alice` is authorizing the change: -``` -$ cleos set account permission -s -j -d alice owner '{"threshold": 1, "accounts": [{"permission": {"actor": "eosio", "permission": "active"}, "weight": 1}]}' > update_alice_owner_trx.json -``` - -Then modify update_alice_owner_trx.json so that the values for the `ref_block_num` and `ref_block_prefix` fields are both 0 and the value of the `expiration` field is `"1970-01-01T00:00:00"`: -``` -$ cat update_alice_owner_trx.json -{ - "expiration": "1970-01-01T00:00:00", - "ref_block_num": 0, - "ref_block_prefix": 0, - "max_net_usage_words": 0, - "max_cpu_usage_ms": 0, - "delay_sec": 0, - "context_free_actions": [], - "actions": [{ - "account": "eosio", - "name": "updateauth", - "authorization": [{ - "actor": "alice", - "permission": "active" - } - ], - "data": "0000000000855c340000000080ab26a700000000000000000100000000010000000000ea305500000000a8ed3232010000" - } - ], - "transaction_extensions": [], - "signatures": [], - "context_free_data": [] -} -``` - -The next step is to generate the transaction containing the `eosio.sudo::exec` action. This action will contain the transaction in update_alice_owner_trx.json as part of its action payload data. - -``` -$ cleos sudo exec -s -j -d blkproducera update_alice_owner_trx.json > sudo_update_alice_owner_trx.json -``` - -Once again modify sudo_update_alice_owner_trx.json so that the value for the `ref_block_num` and `ref_block_prefix` fields are both 0. However, instead of changing the value of the expiration field to `"1970-01-01T00:00:00"`, it should be changed to a time that is far enough in the future to allow enough time for the proposed transaction to be approved and executed. -``` -$ cat sudo_update_alice_owner_trx.json -{ - "expiration": "2018-07-06T12:00:00", - "ref_block_num": 0, - "ref_block_prefix": 0, - "max_net_usage_words": 0, - "max_cpu_usage_ms": 0, - "delay_sec": 0, - "context_free_actions": [], - "actions": [{ - "account": "eosio.sudo", - "name": "exec", - "authorization": [{ - "actor": "blkproducera", - "permission": "active" - },{ - "actor": "eosio.sudo", - "permission": "active" - } - ], - "data": "60ae423ad15b613c0000000000000000000000000000010000000000ea30550040cbdaa86c52d5010000000000855c3400000000a8ed3232310000000000855c340000000080ab26a700000000000000000100000000010000000000ea305500000000a8ed323201000000" - } - ], - "transaction_extensions": [], - "signatures": [], - "context_free_data": [] -} -``` - -If the `cleos sudo` command is not available, there is an alternative way to generate the above transaction. There is no need to continue reading the remaining of sub-section 3.1.1 if the sudo_update_alice_owner_trx.json file was already generated with content similar to the above using the `cleos sudo exec` sub-command method. - -First the hex encoding of the binary serialization of the transaction in update_alice_owner_trx.json must be obtained. One way of obtaining this data is through the following command: -``` -$ cleos multisig propose_trx -s -j -d nothing '[]' update_alice_owner_trx.json nothing | grep '"data":' | sed 's/^[ \t]*"data":[ \t]*//;s/[",]//g' | cut -c 35- > update_alice_owner_trx_serialized.hex -$ cat update_alice_owner_trx_serialized.hex -0000000000000000000000000000010000000000ea30550040cbdaa86c52d5010000000000855c3400000000a8ed3232310000000000855c340000000080ab26a700000000000000000100000000010000000000ea305500000000a8ed323201000000 -``` - -Then generate the template for the transaction containing the `eosio.sudo::exec` action: -``` -$ cleos push action -s -j -d eosio.sudo exec '{"executer": "blkproducera", "trx": ""}' > sudo_update_alice_owner_trx.json -$ cat sudo_update_alice_owner_trx.json -{ - "expiration": "2018-06-29T23:34:01", - "ref_block_num": 23708, - "ref_block_prefix": 3605208482, - "max_net_usage_words": 0, - "max_cpu_usage_ms": 0, - "delay_sec": 0, - "context_free_actions": [], - "actions": [{ - "account": "eosio.sudo", - "name": "exec", - "authorization": [], - "data": "60ae423ad15b613c" - } - ], - "transaction_extensions": [], - "signatures": [], - "context_free_data": [] -} -``` - -Then modify the transaction in sudo_update_alice_owner_trx.json as follows: - * replace the values of the `ref_block_num` and `ref_block_prefix` fields to 0; - * replace the time of the `expiration` field to the desired expiration time as described above (e.g. `"2018-07-06T12:00:00"`); - * append the hex data from update_alice_owner_trx_serialized.hex to the end of the existing hex data in the `data` field in sudo_update_alice_owner_trx.json. - - -#### 3.1.2 Propose the transaction to change the owner permission of an account - -The lead block producer (`blkproducera`) should propose the transaction stored in sudo_update_alice_owner_trx.json: -``` -$ cleos multisig propose_trx updatealice producer_permissions.json sudo_update_alice_owner_trx.json blkproducera -executed transaction: 10474f52c9e3fc8e729469a577cd2fc9e4330e25b3fd402fc738ddde26605c13 624 bytes 782 us -# eosio.msig <= eosio.msig::propose {"proposer":"blkproducera","proposal_name":"updatealice","requested":[{"actor":"blkproducera","permi... -warning: transaction executed locally, but may not be confirmed by the network yet -``` - -#### 3.1.3 Review and approve the transaction to change the owner permission of an account - -Each of the potential approvers of the proposed transaction (i.e. the active block producers) should first review the proposed transaction to make sure they are not approving anything that they do not agree to. -``` -$ cleos multisig review blkproducera updatealice > sudo_update_alice_owner_trx_to_review.json -$ cat sudo_update_alice_owner_trx_to_review.json -{ - "proposal_name": "updatealice", - "packed_transaction": "c0593f5b000000000000000000000100004d1a03ea305500000000008054570260ae423ad15b613c00000000a8ed323200004d1a03ea305500000000a8ed32326b60ae423ad15b613c0000000000000000000000000000010000000000ea30550040cbdaa86c52d5010000000000855c3400000000a8ed3232310000000000855c340000000080ab26a700000000000000000100000000010000000000ea305500000000a8ed32320100000000", - "transaction": { - "expiration": "2018-07-06T12:00:00", - "ref_block_num": 0, - "ref_block_prefix": 0, - "max_net_usage_words": 0, - "max_cpu_usage_ms": 0, - "delay_sec": 0, - "context_free_actions": [], - "actions": [{ - "account": "eosio.sudo", - "name": "exec", - "authorization": [{ - "actor": "blkproducera", - "permission": "active" - },{ - "actor": "eosio.sudo", - "permission": "active" - } - ], - "data": { - "executer": "blkproducera", - "trx": { - "expiration": "1970-01-01T00:00:00", - "ref_block_num": 0, - "ref_block_prefix": 0, - "max_net_usage_words": 0, - "max_cpu_usage_ms": 0, - "delay_sec": 0, - "context_free_actions": [], - "actions": [{ - "account": "eosio", - "name": "updateauth", - "authorization": [{ - "actor": "alice", - "permission": "active" - } - ], - "data": "0000000000855c340000000080ab26a700000000000000000100000000010000000000ea305500000000a8ed3232010000" - } - ], - "transaction_extensions": [] - } - }, - "hex_data": "60ae423ad15b613c0000000000000000000000000000010000000000ea30550040cbdaa86c52d5010000000000855c3400000000a8ed3232310000000000855c340000000080ab26a700000000000000000100000000010000000000ea305500000000a8ed323201000000" - } - ], - "transaction_extensions": [] - } -} -``` - -The approvers should go through the human-readable transaction output and make sure everything looks fine. However, due to a current limitation of nodeos/cleos, the JSONification of action payload data does not occur recursively. So while both the `hex_data` and the human-readable JSON `data` of the payload of the `eosio.sudo::exec` action is available in the output of the `cleos multisig review` command, only the hex data is available of the payload of the inner `eosio::updateauth` action. So it is not clear what the `updateauth` will actually do. - -Furthermore, even if this usability issue was fixed in nodeos/cleos, there will still be cases where there is no sensible human-readable version of an action data payload within a transaction. An example of this is the proposed transaction in sub-section 2.2.3 which used the `eosio::setcode` action to set the contract code of the `eosio.sudo` account. The best thing to do in such situations is for the reviewer to compare the proposed transaction to one generated by them through a process they trust. - -Since each block producer generated a transaction in sub-section 3.1.1 (stored in the file sudo_update_alice_owner_trx.json) which should be identical to the transaction proposed by the lead block producer, they can each simply check to see if the two transactions are identical: -``` -$ cleos multisig propose_trx -j -s -d updatealice '[]' sudo_update_alice_owner_trx.json blkproducera | grep '"data":' | sed 's/^[ \t]*"data":[ \t]*//;s/[",]//g' | cut -c 35- > expected_sudo_update_alice_owner_trx_serialized.hex -$ cat expected_sudo_update_alice_owner_trx_serialized.hex -c0593f5b000000000000000000000100004d1a03ea305500000000008054570260ae423ad15b613c00000000a8ed323200004d1a03ea305500000000a8ed32326b60ae423ad15b613c0000000000000000000000000000010000000000ea30550040cbdaa86c52d5010000000000855c3400000000a8ed3232310000000000855c340000000080ab26a700000000000000000100000000010000000000ea305500000000a8ed32320100000000 -$ cat sudo_update_alice_owner_trx_to_review.json | grep '"packed_transaction":' | sed 's/^[ \t]*"packed_transaction":[ \t]*//;s/[",]//g' > proposed_sudo_update_alice_owner_trx_serialized.hex -$ cat proposed_sudo_update_alice_owner_trx_serialized.hex -c0593f5b000000000000000000000100004d1a03ea305500000000008054570260ae423ad15b613c00000000a8ed323200004d1a03ea305500000000a8ed32326b60ae423ad15b613c0000000000000000000000000000010000000000ea30550040cbdaa86c52d5010000000000855c3400000000a8ed3232310000000000855c340000000080ab26a700000000000000000100000000010000000000ea305500000000a8ed32320100000000 -$ diff expected_sudo_update_alice_owner_trx_serialized.hex proposed_sudo_update_alice_owner_trx_serialized.hex -``` - -When an approver (e.g. `blkproducerb`) is satisfied with the proposed transaction, they can simply approve it: -``` -$ cleos multisig approve blkproducera updatealice '{"actor": "blkproducerb", "permission": "active"}' -p blkproducerb -executed transaction: 2bddc7747e0660ba26babf95035225895b134bfb2ede32ba0a2bb6091c7dab56 128 bytes 543 us -# eosio.msig <= eosio.msig::approve {"proposer":"blkproducera","proposal_name":"updatealice","level":{"actor":"blkproducerb","permission... -warning: transaction executed locally, but may not be confirmed by the network yet -``` - -#### 3.1.4 Execute the transaction to change the owner permission of an account - -When the necessary approvals are collected (in this example, with 21 block producers, at least 15 of their approvals were required), anyone can push the `eosio.msig::exec` action which executes the approved transaction. It makes a lot of sense for the lead block producer who proposed the transaction to also execute it (this will incur another temporary RAM cost for the deferred transaction that is generated by the eosio.msig contract). - -``` -$ cleos multisig exec blkproducera updatealice blkproducera -executed transaction: 7127a66ae307fbef6415bf60c3e91a88b79bcb46030da983c683deb2a1a8e0d0 160 bytes 820 us -# eosio.msig <= eosio.msig::exec {"proposer":"blkproducera","proposal_name":"updatealice","executer":"blkproducera"} -warning: transaction executed locally, but may not be confirmed by the network yet -``` - -Anyone can now verify that the owner authority of `alice` was successfully changed: -``` -$ cleos get account alice -permissions: - owner 1: 1 eosio@active, - active 1: 1 EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV -memory: - quota: 49.74 KiB used: 3.348 KiB - -net bandwidth: - staked: 1.0000 SYS (total stake delegated from account to self) - delegated: 0.0000 SYS (total staked delegated to account from others) - used: 0 bytes - available: 2.304 MiB - limit: 2.304 MiB - -cpu bandwidth: - staked: 1.0000 SYS (total stake delegated from account to self) - delegated: 0.0000 SYS (total staked delegated to account from others) - used: 413 us - available: 460.4 ms - limit: 460.8 ms - -producers: - -``` diff --git a/contracts/eosio.sudo/eosio.sudo.abi b/contracts/eosio.sudo/eosio.sudo.abi deleted file mode 100644 index 6f74921bc2a..00000000000 --- a/contracts/eosio.sudo/eosio.sudo.abi +++ /dev/null @@ -1,73 +0,0 @@ -{ - "version": "eosio::abi/1.0", - "types": [{ - "new_type_name": "account_name", - "type": "name" - },{ - "new_type_name": "permission_name", - "type": "name" - },{ - "new_type_name": "action_name", - "type": "name" - }], - "structs": [{ - "name": "permission_level", - "base": "", - "fields": [ - {"name": "actor", "type": "account_name"}, - {"name": "permission", "type": "permission_name"} - ] - },{ - "name": "action", - "base": "", - "fields": [ - {"name": "account", "type": "account_name"}, - {"name": "name", "type": "action_name"}, - {"name": "authorization", "type": "permission_level[]"}, - {"name": "data", "type": "bytes"} - ] - },{ - "name": "transaction_header", - "base": "", - "fields": [ - {"name": "expiration", "type": "time_point_sec"}, - {"name": "ref_block_num", "type": "uint16"}, - {"name": "ref_block_prefix", "type": "uint32"}, - {"name": "max_net_usage_words", "type": "varuint32"}, - {"name": "max_cpu_usage_ms", "type": "uint8"}, - {"name": "delay_sec", "type": "varuint32"} - ] - },{ - "name": "extension", - "base": "", - "fields": [ - {"name": "type", "type" : "uint16" }, - {"name": "data", "type": "bytes"} - ] - },{ - "name": "transaction", - "base": "transaction_header", - "fields": [ - {"name": "context_free_actions", "type": "action[]"}, - {"name": "actions", "type": "action[]"}, - {"name": "transaction_extensions", "type": "extension[]"} - ] - },{ - "name": "exec", - "base": "", - "fields": [ - {"name":"executer", "type":"account_name"}, - {"name":"trx", "type":"transaction"} - ] - } - ], - "actions": [{ - "name": "exec", - "type": "exec", - "ricardian_contract": "" - } - ], - "tables": [], - "ricardian_clauses": [], - "abi_extensions": [] -} diff --git a/contracts/eosio.sudo/eosio.sudo.cpp b/contracts/eosio.sudo/eosio.sudo.cpp deleted file mode 100644 index c64ffa756aa..00000000000 --- a/contracts/eosio.sudo/eosio.sudo.cpp +++ /dev/null @@ -1,37 +0,0 @@ -#include -#include - -namespace eosio { - -/* -exec function manually parses input data (instead of taking parsed arguments from dispatcher) -because parsing data in the dispatcher uses too much CPU if the included transaction is very big - -If we use dispatcher the function signature should be: - -void sudo::exec( account_name executer, - transaction trx ) -*/ - -void sudo::exec() { - require_auth( _self ); - - constexpr size_t max_stack_buffer_size = 512; - size_t size = action_data_size(); - char* buffer = (char*)( max_stack_buffer_size < size ? malloc(size) : alloca(size) ); - read_action_data( buffer, size ); - - account_name executer; - - datastream ds( buffer, size ); - ds >> executer; - - require_auth( executer ); - - size_t trx_pos = ds.tellp(); - send_deferred( (uint128_t(executer) << 64) | current_time(), executer, buffer+trx_pos, size-trx_pos ); -} - -} /// namespace eosio - -EOSIO_ABI( eosio::sudo, (exec) ) diff --git a/contracts/eosio.sudo/eosio.sudo.hpp b/contracts/eosio.sudo/eosio.sudo.hpp deleted file mode 100644 index a96562121dc..00000000000 --- a/contracts/eosio.sudo/eosio.sudo.hpp +++ /dev/null @@ -1,15 +0,0 @@ -#pragma once - -#include - -namespace eosio { - - class sudo : public contract { - public: - sudo( account_name self ):contract(self){} - - void exec(); - - }; - -} /// namespace eosio diff --git a/contracts/eosio.system/CMakeLists.txt b/contracts/eosio.system/CMakeLists.txt deleted file mode 100644 index eb4ff749f77..00000000000 --- a/contracts/eosio.system/CMakeLists.txt +++ /dev/null @@ -1,8 +0,0 @@ -file(GLOB ABI_FILES "*.abi") -configure_file("${ABI_FILES}" "${CMAKE_CURRENT_BINARY_DIR}" COPYONLY) - -add_wast_executable(TARGET eosio.system - INCLUDE_FOLDERS ${STANDARD_INCLUDE_FOLDERS} - LIBRARIES libc++ libc eosiolib eosio.token - DESTINATION_FOLDER ${CMAKE_CURRENT_BINARY_DIR} -) diff --git a/contracts/eosio.system/README.md b/contracts/eosio.system/README.md deleted file mode 100644 index 9e5c3160069..00000000000 --- a/contracts/eosio.system/README.md +++ /dev/null @@ -1,84 +0,0 @@ -eosio.system ----------- - -This contract enables users to stake tokens, and then configure and vote on producers and worker proposals. - -Users can also proxy their voting influence to other users. - -The state of this contract is read to determine the 21 active block producers. - -Actions: -The naming convention is codeaccount::actionname followed by a list of paramters. - -Indicates that a particular account wishes to become a producer -## eosio.system::cfgproducer account config - - **account** the producer account to update - - updates the configuration settings for a particular producer, these - - Storage changes are billed to 'account' - -## eosio.system::okproducer account producer vote - - **account** the account which is doing the voting - - **producer** the producer which is being voted for (or unvoted for) - - **vote** true if the producer should be voted for, false if not - - Each account has a maximum number of votes it can maintain. Storage changes will be billed to 'account' - -## eosio.system::setproxy account proxy - - **account** the account which is updating it's proxy - - **proxy** the account which will have the power to vote account's stake - - All current votes are removed and a new proxy link is created. The votes for every producer the proxy - has voted for are updated immediately. - - Storage changes will be billed to 'account' - -## eosio.system::unstake account quantity - - **account** - the account which is requesting their balance be unstaked - - **quantity** - the quantity which will be unstaked, unstaked tokens lose voting influence immediately - - - in order to unstake tokens, an account must request them. The user will receive them over - time via weekly withdraws. The length of time will be configured by the median time as set by - the active producers. - - - If this is called while in the process of unstaking, the currently pending unstake is canceled as if - quantity were 0, then it is applied as if a new unstake request was made. - - - all producers this 'from' has voted for will have their votes updated immediately. - - - bandwidth and storage for the deferred transaction will be billed to 'from' - -## eosio.system::withdraw account - - this action can only be triggered by eosio.system via a deferred transaction generated by unstake - - this will generate an inline eosio.token::transfer call from=eosio.system to=account and amount equal to the next withdraw increment - - this will generate another deferred withdraw to continue the process if there are still withdraws to be made - - -## eosio.system::transfer from to amount memo - - decrements balance of from if amount <= balance - - increments balance of to by amount - - memo is ignored - -## eosio.system::stakevote account amount - - the primary currency of eosio is controlled by the token contract which enables users to transfer - balances from one user to another. The receiver is notified on incoming balances and the vote contract - will stake the tokens on receipt. - - - all producers this 'from' has voted for will have their votes updated immediately. - - -## eosio.system::onblock account blocktime blocknum - - this special action is triggered when a block is applied by the given producer and cannot be generated from - any other source. It is used to pay producers and calculate missed blocks of other producers. - - - producer pay is deposited into the producer's stake balance and can be withdrawn over time. - - - if blocknum is the start of a new round this may update the active producer config from the producer votes. - -## eosio.system::freeze producer accounts true|false - - requires permission of the @producers account - - if an account is frozen, all authorizations of that account are rejected and the code for that account will not be run - -## eosio.system::paystandby producer - - every block some amount of tokens is paid - - at most once per day a producer may claim a percentage of the standby pay equal to their totalvotes / allvotes diff --git a/contracts/eosio.system/delegate_bandwidth.cpp b/contracts/eosio.system/delegate_bandwidth.cpp deleted file mode 100644 index 1e190e9fe3c..00000000000 --- a/contracts/eosio.system/delegate_bandwidth.cpp +++ /dev/null @@ -1,426 +0,0 @@ -/** - * @file - * @copyright defined in eos/LICENSE.txt - */ -#include "eosio.system.hpp" - -#include -#include -#include -#include -#include -#include -#include - -#include - - -#include -#include - -namespace eosiosystem { - using eosio::asset; - using eosio::indexed_by; - using eosio::const_mem_fun; - using eosio::bytes; - using eosio::print; - using eosio::permission_level; - using std::map; - using std::pair; - - static constexpr time refund_delay = 3*24*3600; - static constexpr time refund_expiration_time = 3600; - - struct user_resources { - account_name owner; - asset net_weight; - asset cpu_weight; - int64_t ram_bytes = 0; - - uint64_t primary_key()const { return owner; } - - // explicit serialization macro is not necessary, used here only to improve compilation time - EOSLIB_SERIALIZE( user_resources, (owner)(net_weight)(cpu_weight)(ram_bytes) ) - }; - - - /** - * Every user 'from' has a scope/table that uses every receipient 'to' as the primary key. - */ - struct delegated_bandwidth { - account_name from; - account_name to; - asset net_weight; - asset cpu_weight; - - uint64_t primary_key()const { return to; } - - // explicit serialization macro is not necessary, used here only to improve compilation time - EOSLIB_SERIALIZE( delegated_bandwidth, (from)(to)(net_weight)(cpu_weight) ) - - }; - - struct refund_request { - account_name owner; - time request_time; - eosio::asset net_amount; - eosio::asset cpu_amount; - - uint64_t primary_key()const { return owner; } - - // explicit serialization macro is not necessary, used here only to improve compilation time - EOSLIB_SERIALIZE( refund_request, (owner)(request_time)(net_amount)(cpu_amount) ) - }; - - /** - * These tables are designed to be constructed in the scope of the relevant user, this - * facilitates simpler API for per-user queries - */ - typedef eosio::multi_index< N(userres), user_resources> user_resources_table; - typedef eosio::multi_index< N(delband), delegated_bandwidth> del_bandwidth_table; - typedef eosio::multi_index< N(refunds), refund_request> refunds_table; - - - - /** - * This action will buy an exact amount of ram and bill the payer the current market price. - */ - void system_contract::buyrambytes( account_name payer, account_name receiver, uint32_t bytes ) { - auto itr = _rammarket.find(S(4,RAMCORE)); - auto tmp = *itr; - auto eosout = tmp.convert( asset(bytes,S(0,RAM)), CORE_SYMBOL ); - - buyram( payer, receiver, eosout ); - } - - - /** - * When buying ram the payer irreversiblly transfers quant to system contract and only - * the receiver may reclaim the tokens via the sellram action. The receiver pays for the - * storage of all database records associated with this action. - * - * RAM is a scarce resource whose supply is defined by global properties max_ram_size. RAM is - * priced using the bancor algorithm such that price-per-byte with a constant reserve ratio of 100:1. - */ - void system_contract::buyram( account_name payer, account_name receiver, asset quant ) - { - require_auth( payer ); - eosio_assert( quant.amount > 0, "must purchase a positive amount" ); - - auto fee = quant; - fee.amount = ( fee.amount + 199 ) / 200; /// .5% fee (round up) - // fee.amount cannot be 0 since that is only possible if quant.amount is 0 which is not allowed by the assert above. - // If quant.amount == 1, then fee.amount == 1, - // otherwise if quant.amount > 1, then 0 < fee.amount < quant.amount. - auto quant_after_fee = quant; - quant_after_fee.amount -= fee.amount; - // quant_after_fee.amount should be > 0 if quant.amount > 1. - // If quant.amount == 1, then quant_after_fee.amount == 0 and the next inline transfer will fail causing the buyram action to fail. - - INLINE_ACTION_SENDER(eosio::token, transfer)( N(eosio.token), {payer,N(active)}, - { payer, N(eosio.ram), quant_after_fee, std::string("buy ram") } ); - - if( fee.amount > 0 ) { - INLINE_ACTION_SENDER(eosio::token, transfer)( N(eosio.token), {payer,N(active)}, - { payer, N(eosio.ramfee), fee, std::string("ram fee") } ); - } - - int64_t bytes_out; - - const auto& market = _rammarket.get(S(4,RAMCORE), "ram market does not exist"); - _rammarket.modify( market, 0, [&]( auto& es ) { - bytes_out = es.convert( quant_after_fee, S(0,RAM) ).amount; - }); - - eosio_assert( bytes_out > 0, "must reserve a positive amount" ); - - _gstate.total_ram_bytes_reserved += uint64_t(bytes_out); - _gstate.total_ram_stake += quant_after_fee.amount; - - user_resources_table userres( _self, receiver ); - auto res_itr = userres.find( receiver ); - if( res_itr == userres.end() ) { - res_itr = userres.emplace( receiver, [&]( auto& res ) { - res.owner = receiver; - res.ram_bytes = bytes_out; - }); - } else { - userres.modify( res_itr, receiver, [&]( auto& res ) { - res.ram_bytes += bytes_out; - }); - } - set_resource_limits( res_itr->owner, res_itr->ram_bytes, res_itr->net_weight.amount, res_itr->cpu_weight.amount ); - } - - - /** - * The system contract now buys and sells RAM allocations at prevailing market prices. - * This may result in traders buying RAM today in anticipation of potential shortages - * tomorrow. Overall this will result in the market balancing the supply and demand - * for RAM over time. - */ - void system_contract::sellram( account_name account, int64_t bytes ) { - require_auth( account ); - eosio_assert( bytes > 0, "cannot sell negative byte" ); - - user_resources_table userres( _self, account ); - auto res_itr = userres.find( account ); - eosio_assert( res_itr != userres.end(), "no resource row" ); - eosio_assert( res_itr->ram_bytes >= bytes, "insufficient quota" ); - - asset tokens_out; - auto itr = _rammarket.find(S(4,RAMCORE)); - _rammarket.modify( itr, 0, [&]( auto& es ) { - /// the cast to int64_t of bytes is safe because we certify bytes is <= quota which is limited by prior purchases - tokens_out = es.convert( asset(bytes,S(0,RAM)), CORE_SYMBOL); - }); - - eosio_assert( tokens_out.amount > 1, "token amount received from selling ram is too low" ); - - _gstate.total_ram_bytes_reserved -= static_cast(bytes); // bytes > 0 is asserted above - _gstate.total_ram_stake -= tokens_out.amount; - - //// this shouldn't happen, but just in case it does we should prevent it - eosio_assert( _gstate.total_ram_stake >= 0, "error, attempt to unstake more tokens than previously staked" ); - - userres.modify( res_itr, account, [&]( auto& res ) { - res.ram_bytes -= bytes; - }); - set_resource_limits( res_itr->owner, res_itr->ram_bytes, res_itr->net_weight.amount, res_itr->cpu_weight.amount ); - - INLINE_ACTION_SENDER(eosio::token, transfer)( N(eosio.token), {N(eosio.ram),N(active)}, - { N(eosio.ram), account, asset(tokens_out), std::string("sell ram") } ); - - auto fee = ( tokens_out.amount + 199 ) / 200; /// .5% fee (round up) - // since tokens_out.amount was asserted to be at least 2 earlier, fee.amount < tokens_out.amount - - if( fee > 0 ) { - INLINE_ACTION_SENDER(eosio::token, transfer)( N(eosio.token), {account,N(active)}, - { account, N(eosio.ramfee), asset(fee), std::string("sell ram fee") } ); - } - } - - void validate_b1_vesting( int64_t stake ) { - const int64_t base_time = 1527811200; /// 2018-06-01 - const int64_t max_claimable = 100'000'000'0000ll; - const int64_t claimable = int64_t(max_claimable * double(now()-base_time) / (10*seconds_per_year) ); - - eosio_assert( max_claimable - claimable <= stake, "b1 can only claim their tokens over 10 years" ); - } - - void system_contract::changebw( account_name from, account_name receiver, - const asset stake_net_delta, const asset stake_cpu_delta, bool transfer ) - { - require_auth( from ); - eosio_assert( stake_net_delta != asset(0) || stake_cpu_delta != asset(0), "should stake non-zero amount" ); - eosio_assert( std::abs( (stake_net_delta + stake_cpu_delta).amount ) - >= std::max( std::abs( stake_net_delta.amount ), std::abs( stake_cpu_delta.amount ) ), - "net and cpu deltas cannot be opposite signs" ); - - account_name source_stake_from = from; - if ( transfer ) { - from = receiver; - } - - // update stake delegated from "from" to "receiver" - { - del_bandwidth_table del_tbl( _self, from); - auto itr = del_tbl.find( receiver ); - if( itr == del_tbl.end() ) { - itr = del_tbl.emplace( from, [&]( auto& dbo ){ - dbo.from = from; - dbo.to = receiver; - dbo.net_weight = stake_net_delta; - dbo.cpu_weight = stake_cpu_delta; - }); - } - else { - del_tbl.modify( itr, 0, [&]( auto& dbo ){ - dbo.net_weight += stake_net_delta; - dbo.cpu_weight += stake_cpu_delta; - }); - } - eosio_assert( asset(0) <= itr->net_weight, "insufficient staked net bandwidth" ); - eosio_assert( asset(0) <= itr->cpu_weight, "insufficient staked cpu bandwidth" ); - if ( itr->net_weight == asset(0) && itr->cpu_weight == asset(0) ) { - del_tbl.erase( itr ); - } - } // itr can be invalid, should go out of scope - - // update totals of "receiver" - { - user_resources_table totals_tbl( _self, receiver ); - auto tot_itr = totals_tbl.find( receiver ); - if( tot_itr == totals_tbl.end() ) { - tot_itr = totals_tbl.emplace( from, [&]( auto& tot ) { - tot.owner = receiver; - tot.net_weight = stake_net_delta; - tot.cpu_weight = stake_cpu_delta; - }); - } else { - totals_tbl.modify( tot_itr, from == receiver ? from : 0, [&]( auto& tot ) { - tot.net_weight += stake_net_delta; - tot.cpu_weight += stake_cpu_delta; - }); - } - eosio_assert( asset(0) <= tot_itr->net_weight, "insufficient staked total net bandwidth" ); - eosio_assert( asset(0) <= tot_itr->cpu_weight, "insufficient staked total cpu bandwidth" ); - - set_resource_limits( receiver, tot_itr->ram_bytes, tot_itr->net_weight.amount, tot_itr->cpu_weight.amount ); - - if ( tot_itr->net_weight == asset(0) && tot_itr->cpu_weight == asset(0) && tot_itr->ram_bytes == 0 ) { - totals_tbl.erase( tot_itr ); - } - } // tot_itr can be invalid, should go out of scope - - // create refund or update from existing refund - if ( N(eosio.stake) != source_stake_from ) { //for eosio both transfer and refund make no sense - refunds_table refunds_tbl( _self, from ); - auto req = refunds_tbl.find( from ); - - //create/update/delete refund - auto net_balance = stake_net_delta; - auto cpu_balance = stake_cpu_delta; - bool need_deferred_trx = false; - - - // net and cpu are same sign by assertions in delegatebw and undelegatebw - // redundant assertion also at start of changebw to protect against misuse of changebw - bool is_undelegating = (net_balance.amount + cpu_balance.amount ) < 0; - bool is_delegating_to_self = (!transfer && from == receiver); - - if( is_delegating_to_self || is_undelegating ) { - if ( req != refunds_tbl.end() ) { //need to update refund - refunds_tbl.modify( req, 0, [&]( refund_request& r ) { - if ( net_balance < asset(0) || cpu_balance < asset(0) ) { - r.request_time = now(); - } - r.net_amount -= net_balance; - if ( r.net_amount < asset(0) ) { - net_balance = -r.net_amount; - r.net_amount = asset(0); - } else { - net_balance = asset(0); - } - r.cpu_amount -= cpu_balance; - if ( r.cpu_amount < asset(0) ){ - cpu_balance = -r.cpu_amount; - r.cpu_amount = asset(0); - } else { - cpu_balance = asset(0); - } - }); - - eosio_assert( asset(0) <= req->net_amount, "negative net refund amount" ); //should never happen - eosio_assert( asset(0) <= req->cpu_amount, "negative cpu refund amount" ); //should never happen - - if ( req->net_amount == asset(0) && req->cpu_amount == asset(0) ) { - refunds_tbl.erase( req ); - need_deferred_trx = false; - } else { - need_deferred_trx = true; - } - - } else if ( net_balance < asset(0) || cpu_balance < asset(0) ) { //need to create refund - refunds_tbl.emplace( from, [&]( refund_request& r ) { - r.owner = from; - if ( net_balance < asset(0) ) { - r.net_amount = -net_balance; - net_balance = asset(0); - } // else r.net_amount = 0 by default constructor - if ( cpu_balance < asset(0) ) { - r.cpu_amount = -cpu_balance; - cpu_balance = asset(0); - } // else r.cpu_amount = 0 by default constructor - r.request_time = now(); - }); - need_deferred_trx = true; - } // else stake increase requested with no existing row in refunds_tbl -> nothing to do with refunds_tbl - } /// end if is_delegating_to_self || is_undelegating - - if ( need_deferred_trx ) { - eosio::transaction out; - out.actions.emplace_back( permission_level{ from, N(active) }, _self, N(refund), from ); - out.delay_sec = refund_delay; - cancel_deferred( from ); // TODO: Remove this line when replacing deferred trxs is fixed - out.send( from, from, true ); - } else { - cancel_deferred( from ); - } - - auto transfer_amount = net_balance + cpu_balance; - if ( asset(0) < transfer_amount ) { - INLINE_ACTION_SENDER(eosio::token, transfer)( N(eosio.token), {source_stake_from, N(active)}, - { source_stake_from, N(eosio.stake), asset(transfer_amount), std::string("stake bandwidth") } ); - } - } - - // update voting power - { - asset total_update = stake_net_delta + stake_cpu_delta; - auto from_voter = _voters.find(from); - if( from_voter == _voters.end() ) { - from_voter = _voters.emplace( from, [&]( auto& v ) { - v.owner = from; - v.staked = total_update.amount; - }); - } else { - _voters.modify( from_voter, 0, [&]( auto& v ) { - v.staked += total_update.amount; - }); - } - eosio_assert( 0 <= from_voter->staked, "stake for voting cannot be negative"); - if( from == N(b1) ) { - validate_b1_vesting( from_voter->staked ); - } - - if( from_voter->producers.size() || from_voter->proxy ) { - update_votes( from, from_voter->proxy, from_voter->producers, false ); - } - } - } - - void system_contract::delegatebw( account_name from, account_name receiver, - asset stake_net_quantity, - asset stake_cpu_quantity, bool transfer ) - { - eosio_assert( stake_cpu_quantity >= asset(0), "must stake a positive amount" ); - eosio_assert( stake_net_quantity >= asset(0), "must stake a positive amount" ); - eosio_assert( stake_net_quantity + stake_cpu_quantity > asset(0), "must stake a positive amount" ); - eosio_assert( !transfer || from != receiver, "cannot use transfer flag if delegating to self" ); - - changebw( from, receiver, stake_net_quantity, stake_cpu_quantity, transfer); - } // delegatebw - - void system_contract::undelegatebw( account_name from, account_name receiver, - asset unstake_net_quantity, asset unstake_cpu_quantity ) - { - eosio_assert( asset() <= unstake_cpu_quantity, "must unstake a positive amount" ); - eosio_assert( asset() <= unstake_net_quantity, "must unstake a positive amount" ); - eosio_assert( asset() < unstake_cpu_quantity + unstake_net_quantity, "must unstake a positive amount" ); - eosio_assert( _gstate.total_activated_stake >= min_activated_stake, - "cannot undelegate bandwidth until the chain is activated (at least 15% of all tokens participate in voting)" ); - - changebw( from, receiver, -unstake_net_quantity, -unstake_cpu_quantity, false); - } // undelegatebw - - - void system_contract::refund( const account_name owner ) { - require_auth( owner ); - - refunds_table refunds_tbl( _self, owner ); - auto req = refunds_tbl.find( owner ); - eosio_assert( req != refunds_tbl.end(), "refund request not found" ); - eosio_assert( req->request_time + refund_delay <= now(), "refund is not available yet" ); - // Until now() becomes NOW, the fact that now() is the timestamp of the previous block could in theory - // allow people to get their tokens earlier than the 3 day delay if the unstake happened immediately after many - // consecutive missed blocks. - - INLINE_ACTION_SENDER(eosio::token, transfer)( N(eosio.token), {N(eosio.stake),N(active)}, - { N(eosio.stake), req->owner, req->net_amount + req->cpu_amount, std::string("unstake") } ); - - refunds_tbl.erase( req ); - } - - -} //namespace eosiosystem diff --git a/contracts/eosio.system/eosio.system.abi b/contracts/eosio.system/eosio.system.abi deleted file mode 100644 index 87937c787f9..00000000000 --- a/contracts/eosio.system/eosio.system.abi +++ /dev/null @@ -1,578 +0,0 @@ -{ - "version": "eosio::abi/1.0", - "types": [{ - "new_type_name": "account_name", - "type": "name" - },{ - "new_type_name": "permission_name", - "type": "name" - },{ - "new_type_name": "action_name", - "type": "name" - },{ - "new_type_name": "transaction_id_type", - "type": "checksum256" - },{ - "new_type_name": "weight_type", - "type": "uint16" - }], - "____comment": "eosio.bios structs: set_account_limits, setpriv, set_global_limits, producer_key, set_producers, require_auth are provided so abi available for deserialization in future.", - "structs": [{ - "name": "permission_level", - "base": "", - "fields": [ - {"name":"actor", "type":"account_name"}, - {"name":"permission", "type":"permission_name"} - ] - },{ - "name": "key_weight", - "base": "", - "fields": [ - {"name":"key", "type":"public_key"}, - {"name":"weight", "type":"weight_type"} - ] - },{ - "name": "bidname", - "base": "", - "fields": [ - {"name":"bidder", "type":"account_name"}, - {"name":"newname", "type":"account_name"}, - {"name":"bid", "type":"asset"} - ] - },{ - "name": "permission_level_weight", - "base": "", - "fields": [ - {"name":"permission", "type":"permission_level"}, - {"name":"weight", "type":"weight_type"} - ] - },{ - "name": "wait_weight", - "base": "", - "fields": [ - {"name":"wait_sec", "type":"uint32"}, - {"name":"weight", "type":"weight_type"} - ] - },{ - "name": "authority", - "base": "", - "fields": [ - {"name":"threshold", "type":"uint32"}, - {"name":"keys", "type":"key_weight[]"}, - {"name":"accounts", "type":"permission_level_weight[]"}, - {"name":"waits", "type":"wait_weight[]"} - ] - },{ - "name": "newaccount", - "base": "", - "fields": [ - {"name":"creator", "type":"account_name"}, - {"name":"name", "type":"account_name"}, - {"name":"owner", "type":"authority"}, - {"name":"active", "type":"authority"} - ] - },{ - "name": "setcode", - "base": "", - "fields": [ - {"name":"account", "type":"account_name"}, - {"name":"vmtype", "type":"uint8"}, - {"name":"vmversion", "type":"uint8"}, - {"name":"code", "type":"bytes"} - ] - },{ - "name": "setabi", - "base": "", - "fields": [ - {"name":"account", "type":"account_name"}, - {"name":"abi", "type":"bytes"} - ] - },{ - "name": "updateauth", - "base": "", - "fields": [ - {"name":"account", "type":"account_name"}, - {"name":"permission", "type":"permission_name"}, - {"name":"parent", "type":"permission_name"}, - {"name":"auth", "type":"authority"} - ] - },{ - "name": "deleteauth", - "base": "", - "fields": [ - {"name":"account", "type":"account_name"}, - {"name":"permission", "type":"permission_name"} - ] - },{ - "name": "linkauth", - "base": "", - "fields": [ - {"name":"account", "type":"account_name"}, - {"name":"code", "type":"account_name"}, - {"name":"type", "type":"action_name"}, - {"name":"requirement", "type":"permission_name"} - ] - },{ - "name": "unlinkauth", - "base": "", - "fields": [ - {"name":"account", "type":"account_name"}, - {"name":"code", "type":"account_name"}, - {"name":"type", "type":"action_name"} - ] - },{ - "name": "canceldelay", - "base": "", - "fields": [ - {"name":"canceling_auth", "type":"permission_level"}, - {"name":"trx_id", "type":"transaction_id_type"} - ] - },{ - "name": "onerror", - "base": "", - "fields": [ - {"name":"sender_id", "type":"uint128"}, - {"name":"sent_trx", "type":"bytes"} - ] - },{ - "name": "buyrambytes", - "base": "", - "fields": [ - {"name":"payer", "type":"account_name"}, - {"name":"receiver", "type":"account_name"}, - {"name":"bytes", "type":"uint32"} - ] - },{ - "name": "sellram", - "base": "", - "fields": [ - {"name":"account", "type":"account_name"}, - {"name":"bytes", "type":"uint64"} - ] - },{ - "name": "buyram", - "base": "", - "fields": [ - {"name":"payer", "type":"account_name"}, - {"name":"receiver", "type":"account_name"}, - {"name":"quant", "type":"asset"} - ] - },{ - "name": "delegatebw", - "base": "", - "fields": [ - {"name":"from", "type":"account_name"}, - {"name":"receiver", "type":"account_name"}, - {"name":"stake_net_quantity", "type":"asset"}, - {"name":"stake_cpu_quantity", "type":"asset"}, - {"name":"transfer", "type":"bool"} - ] - },{ - "name": "undelegatebw", - "base": "", - "fields": [ - {"name":"from", "type":"account_name"}, - {"name":"receiver", "type":"account_name"}, - {"name":"unstake_net_quantity", "type":"asset"}, - {"name":"unstake_cpu_quantity", "type":"asset"} - ] - },{ - "name": "refund", - "base": "", - "fields": [ - {"name":"owner", "type":"account_name"} - ] - },{ - "name": "delegated_bandwidth", - "base": "", - "fields": [ - {"name":"from", "type":"account_name"}, - {"name":"to", "type":"account_name"}, - {"name":"net_weight", "type":"asset"}, - {"name":"cpu_weight", "type":"asset"} - ] - },{ - "name": "user_resources", - "base": "", - "fields": [ - {"name":"owner", "type":"account_name"}, - {"name":"net_weight", "type":"asset"}, - {"name":"cpu_weight", "type":"asset"}, - {"name":"ram_bytes", "type":"uint64"} - ] - },{ - "name": "total_resources", - "base": "", - "fields": [ - {"name":"owner", "type":"account_name"}, - {"name":"net_weight", "type":"asset"}, - {"name":"cpu_weight", "type":"asset"}, - {"name":"ram_bytes", "type":"uint64"} - ] - },{ - "name": "refund_request", - "base": "", - "fields": [ - {"name":"owner", "type":"account_name"}, - {"name":"request_time", "type":"time_point_sec"}, - {"name":"net_amount", "type":"asset"}, - {"name":"cpu_amount", "type":"asset"} - ] - },{ - "name": "blockchain_parameters", - "base": "", - "fields": [ - - {"name":"max_block_net_usage", "type":"uint64"}, - {"name":"target_block_net_usage_pct", "type":"uint32"}, - {"name":"max_transaction_net_usage", "type":"uint32"}, - {"name":"base_per_transaction_net_usage", "type":"uint32"}, - {"name":"net_usage_leeway", "type":"uint32"}, - {"name":"context_free_discount_net_usage_num", "type":"uint32"}, - {"name":"context_free_discount_net_usage_den", "type":"uint32"}, - {"name":"max_block_cpu_usage", "type":"uint32"}, - {"name":"target_block_cpu_usage_pct", "type":"uint32"}, - {"name":"max_transaction_cpu_usage", "type":"uint32"}, - {"name":"min_transaction_cpu_usage", "type":"uint32"}, - {"name":"max_transaction_lifetime", "type":"uint32"}, - {"name":"deferred_trx_expiration_window", "type":"uint32"}, - {"name":"max_transaction_delay", "type":"uint32"}, - {"name":"max_inline_action_size", "type":"uint32"}, - {"name":"max_inline_action_depth", "type":"uint16"}, - {"name":"max_authority_depth", "type":"uint16"} - - ] - },{ - "name": "eosio_global_state", - "base": "blockchain_parameters", - "fields": [ - {"name":"max_ram_size", "type":"uint64"}, - {"name":"total_ram_bytes_reserved", "type":"uint64"}, - {"name":"total_ram_stake", "type":"int64"}, - {"name":"last_producer_schedule_update", "type":"block_timestamp_type"}, - {"name":"last_pervote_bucket_fill", "type":"uint64"}, - {"name":"pervote_bucket", "type":"int64"}, - {"name":"perblock_bucket", "type":"int64"}, - {"name":"total_unpaid_blocks", "type":"uint32"}, - {"name":"total_activated_stake", "type":"int64"}, - {"name":"thresh_activated_stake_time", "type":"uint64"}, - {"name":"last_producer_schedule_size", "type":"uint16"}, - {"name":"total_producer_vote_weight", "type":"float64"}, - {"name":"last_name_close", "type":"block_timestamp_type"} - ] - },{ - "name": "producer_info", - "base": "", - "fields": [ - {"name":"owner", "type":"account_name"}, - {"name":"total_votes", "type":"float64"}, - {"name":"producer_key", "type":"public_key"}, - {"name":"is_active", "type":"bool"}, - {"name":"url", "type":"string"}, - {"name":"unpaid_blocks", "type":"uint32"}, - {"name":"last_claim_time", "type":"uint64"}, - {"name":"location", "type":"uint16"} - ] - },{ - "name": "regproducer", - "base": "", - "fields": [ - {"name":"producer", "type":"account_name"}, - {"name":"producer_key", "type":"public_key"}, - {"name":"url", "type":"string"}, - {"name":"location", "type":"uint16"} - ] - },{ - "name": "unregprod", - "base": "", - "fields": [ - {"name":"producer", "type":"account_name"} - ] - },{ - "name": "setram", - "base": "", - "fields": [ - {"name":"max_ram_size", "type":"uint64"} - ] - },{ - "name": "regproxy", - "base": "", - "fields": [ - {"name":"proxy", "type":"account_name"}, - {"name":"isproxy", "type":"bool"} - ] - },{ - "name": "voteproducer", - "base": "", - "fields": [ - {"name":"voter", "type":"account_name"}, - {"name":"proxy", "type":"account_name"}, - {"name":"producers", "type":"account_name[]"} - ] - },{ - "name": "voter_info", - "base": "", - "fields": [ - {"name":"owner", "type":"account_name"}, - {"name":"proxy", "type":"account_name"}, - {"name":"producers", "type":"account_name[]"}, - {"name":"staked", "type":"int64"}, - {"name":"last_vote_weight", "type":"float64"}, - {"name":"proxied_vote_weight", "type":"float64"}, - {"name":"is_proxy", "type":"bool"} - ] - },{ - "name": "claimrewards", - "base": "", - "fields": [ - {"name":"owner", "type":"account_name"} - ] - },{ - "name": "setpriv", - "base": "", - "fields": [ - {"name":"account", "type":"account_name"}, - {"name":"is_priv", "type":"int8"} - ] - },{ - "name": "rmvproducer", - "base": "", - "fields": [ - {"name":"producer", "type":"account_name"} - ] - },{ - "name": "set_account_limits", - "base": "", - "fields": [ - {"name":"account", "type":"account_name"}, - {"name":"ram_bytes", "type":"int64"}, - {"name":"net_weight", "type":"int64"}, - {"name":"cpu_weight", "type":"int64"} - ] - },{ - "name": "set_global_limits", - "base": "", - "fields": [ - {"name":"cpu_usec_per_period", "type":"int64"} - ] - },{ - "name": "producer_key", - "base": "", - "fields": [ - {"name":"producer_name", "type":"account_name"}, - {"name":"block_signing_key", "type":"public_key"} - ] - },{ - "name": "set_producers", - "base": "", - "fields": [ - {"name":"schedule", "type":"producer_key[]"} - ] - },{ - "name": "require_auth", - "base": "", - "fields": [ - {"name":"from", "type":"account_name"} - ] - },{ - "name": "setparams", - "base": "", - "fields": [ - {"name":"params", "type":"blockchain_parameters"} - ] - },{ - "name": "connector", - "base": "", - "fields": [ - {"name":"balance", "type":"asset"}, - {"name":"weight", "type":"float64"} - ] - },{ - "name": "exchange_state", - "base": "", - "fields": [ - {"name":"supply", "type":"asset"}, - {"name":"base", "type":"connector"}, - {"name":"quote", "type":"connector"} - ] - }, { - "name": "namebid_info", - "base": "", - "fields": [ - {"name":"newname", "type":"account_name"}, - {"name":"high_bidder", "type":"account_name"}, - {"name":"high_bid", "type":"int64"}, - {"name":"last_bid_time", "type":"uint64"} - ] - } - ], - "actions": [{ - "name": "newaccount", - "type": "newaccount", - "ricardian_contract": "" - },{ - "name": "setcode", - "type": "setcode", - "ricardian_contract": "" - },{ - "name": "setabi", - "type": "setabi", - "ricardian_contract": "" - },{ - "name": "updateauth", - "type": "updateauth", - "ricardian_contract": "" - },{ - "name": "deleteauth", - "type": "deleteauth", - "ricardian_contract": "" - },{ - "name": "linkauth", - "type": "linkauth", - "ricardian_contract": "" - },{ - "name": "unlinkauth", - "type": "unlinkauth", - "ricardian_contract": "" - },{ - "name": "canceldelay", - "type": "canceldelay", - "ricardian_contract": "" - },{ - "name": "onerror", - "type": "onerror", - "ricardian_contract": "" - },{ - "name": "buyrambytes", - "type": "buyrambytes", - "ricardian_contract": "" - },{ - "name": "buyram", - "type": "buyram", - "ricardian_contract": "" - },{ - "name": "sellram", - "type": "sellram", - "ricardian_contract": "" - },{ - "name": "delegatebw", - "type": "delegatebw", - "ricardian_contract": "" - },{ - "name": "undelegatebw", - "type": "undelegatebw", - "ricardian_contract": "" - },{ - "name": "refund", - "type": "refund", - "ricardian_contract": "" - },{ - "name": "regproducer", - "type": "regproducer", - "ricardian_contract": "" - },{ - "name": "setram", - "type": "setram", - "ricardian_contract": "" - },{ - "name": "bidname", - "type": "bidname", - "ricardian_contract": "" - },{ - "name": "unregprod", - "type": "unregprod", - "ricardian_contract": "" - },{ - "name": "regproxy", - "type": "regproxy", - "ricardian_contract": "" - },{ - "name": "voteproducer", - "type": "voteproducer", - "ricardian_contract": "" - },{ - "name": "claimrewards", - "type": "claimrewards", - "ricardian_contract": "" - },{ - "name": "setpriv", - "type": "setpriv", - "ricardian_contract": "" - },{ - "name": "rmvproducer", - "type": "rmvproducer", - "ricardian_contract": "" - },{ - "name": "setalimits", - "type": "set_account_limits", - "ricardian_contract": "" - },{ - "name": "setglimits", - "type": "set_global_limits", - "ricardian_contract": "" - },{ - "name": "setprods", - "type": "set_producers", - "ricardian_contract": "" - },{ - "name": "reqauth", - "type": "require_auth", - "ricardian_contract": "" - },{ - "name": "setparams", - "type": "setparams", - "ricardian_contract": "" - }], - "tables": [{ - "name": "producers", - "type": "producer_info", - "index_type": "i64", - "key_names" : ["owner"], - "key_types" : ["uint64"] - },{ - "name": "global", - "type": "eosio_global_state", - "index_type": "i64", - "key_names" : [], - "key_types" : [] - },{ - "name": "voters", - "type": "voter_info", - "index_type": "i64", - "key_names" : ["owner"], - "key_types" : ["account_name"] - },{ - "name": "userres", - "type": "user_resources", - "index_type": "i64", - "key_names" : ["owner"], - "key_types" : ["uint64"] - },{ - "name": "delband", - "type": "delegated_bandwidth", - "index_type": "i64", - "key_names" : ["to"], - "key_types" : ["uint64"] - },{ - "name": "rammarket", - "type": "exchange_state", - "index_type": "i64", - "key_names" : ["supply"], - "key_types" : ["uint64"] - },{ - "name": "refunds", - "type": "refund_request", - "index_type": "i64", - "key_names" : ["owner"], - "key_types" : ["uint64"] - },{ - "name": "namebids", - "type": "namebid_info", - "index_type": "i64", - "key_names" : ["newname"], - "key_types" : ["account_name"] - } - ], - "ricardian_clauses": [], - "abi_extensions": [] -} diff --git a/contracts/eosio.system/eosio.system.cpp b/contracts/eosio.system/eosio.system.cpp deleted file mode 100644 index daf40efbb84..00000000000 --- a/contracts/eosio.system/eosio.system.cpp +++ /dev/null @@ -1,198 +0,0 @@ -#include "eosio.system.hpp" -#include - -#include "producer_pay.cpp" -#include "delegate_bandwidth.cpp" -#include "voting.cpp" -#include "exchange_state.cpp" - - -namespace eosiosystem { - - system_contract::system_contract( account_name s ) - :native(s), - _voters(_self,_self), - _producers(_self,_self), - _global(_self,_self), - _rammarket(_self,_self) - { - //print( "construct system\n" ); - _gstate = _global.exists() ? _global.get() : get_default_parameters(); - - auto itr = _rammarket.find(S(4,RAMCORE)); - - if( itr == _rammarket.end() ) { - auto system_token_supply = eosio::token(N(eosio.token)).get_supply(eosio::symbol_type(system_token_symbol).name()).amount; - if( system_token_supply > 0 ) { - itr = _rammarket.emplace( _self, [&]( auto& m ) { - m.supply.amount = 100000000000000ll; - m.supply.symbol = S(4,RAMCORE); - m.base.balance.amount = int64_t(_gstate.free_ram()); - m.base.balance.symbol = S(0,RAM); - m.quote.balance.amount = system_token_supply / 1000; - m.quote.balance.symbol = CORE_SYMBOL; - }); - } - } else { - //print( "ram market already created" ); - } - } - - eosio_global_state system_contract::get_default_parameters() { - eosio_global_state dp; - get_blockchain_parameters(dp); - return dp; - } - - - system_contract::~system_contract() { - //print( "destruct system\n" ); - _global.set( _gstate, _self ); - //eosio_exit(0); - } - - void system_contract::setram( uint64_t max_ram_size ) { - require_auth( _self ); - - eosio_assert( _gstate.max_ram_size < max_ram_size, "ram may only be increased" ); /// decreasing ram might result market maker issues - eosio_assert( max_ram_size < 1024ll*1024*1024*1024*1024, "ram size is unrealistic" ); - eosio_assert( max_ram_size > _gstate.total_ram_bytes_reserved, "attempt to set max below reserved" ); - - auto delta = int64_t(max_ram_size) - int64_t(_gstate.max_ram_size); - auto itr = _rammarket.find(S(4,RAMCORE)); - - /** - * Increase or decrease the amount of ram for sale based upon the change in max - * ram size. - */ - _rammarket.modify( itr, 0, [&]( auto& m ) { - m.base.balance.amount += delta; - }); - - _gstate.max_ram_size = max_ram_size; - _global.set( _gstate, _self ); - } - - void system_contract::setparams( const eosio::blockchain_parameters& params ) { - require_auth( N(eosio) ); - (eosio::blockchain_parameters&)(_gstate) = params; - eosio_assert( 3 <= _gstate.max_authority_depth, "max_authority_depth should be at least 3" ); - set_blockchain_parameters( params ); - } - - void system_contract::setpriv( account_name account, uint8_t ispriv ) { - require_auth( _self ); - set_privileged( account, ispriv ); - } - - void system_contract::rmvproducer( account_name producer ) { - require_auth( _self ); - auto prod = _producers.find( producer ); - eosio_assert( prod != _producers.end(), "producer not found" ); - _producers.modify( prod, 0, [&](auto& p) { - p.deactivate(); - }); - } - - void system_contract::bidname( account_name bidder, account_name newname, asset bid ) { - require_auth( bidder ); - eosio_assert( eosio::name_suffix(newname) == newname, "you can only bid on top-level suffix" ); - eosio_assert( newname != 0, "the empty name is not a valid account name to bid on" ); - eosio_assert( (newname & 0xFull) == 0, "13 character names are not valid account names to bid on" ); - eosio_assert( (newname & 0x1F0ull) == 0, "accounts with 12 character names and no dots can be created without bidding required" ); - eosio_assert( !is_account( newname ), "account already exists" ); - eosio_assert( bid.symbol == asset().symbol, "asset must be system token" ); - eosio_assert( bid.amount > 0, "insufficient bid" ); - - INLINE_ACTION_SENDER(eosio::token, transfer)( N(eosio.token), {bidder,N(active)}, - { bidder, N(eosio.names), bid, std::string("bid name ")+(name{newname}).to_string() } ); - - name_bid_table bids(_self,_self); - print( name{bidder}, " bid ", bid, " on ", name{newname}, "\n" ); - auto current = bids.find( newname ); - if( current == bids.end() ) { - bids.emplace( bidder, [&]( auto& b ) { - b.newname = newname; - b.high_bidder = bidder; - b.high_bid = bid.amount; - b.last_bid_time = current_time(); - }); - } else { - eosio_assert( current->high_bid > 0, "this auction has already closed" ); - eosio_assert( bid.amount - current->high_bid > (current->high_bid / 10), "must increase bid by 10%" ); - eosio_assert( current->high_bidder != bidder, "account is already highest bidder" ); - - INLINE_ACTION_SENDER(eosio::token, transfer)( N(eosio.token), {N(eosio.names),N(active)}, - { N(eosio.names), current->high_bidder, asset(current->high_bid), - std::string("refund bid on name ")+(name{newname}).to_string() } ); - - bids.modify( current, bidder, [&]( auto& b ) { - b.high_bidder = bidder; - b.high_bid = bid.amount; - b.last_bid_time = current_time(); - }); - } - } - - /** - * Called after a new account is created. This code enforces resource-limits rules - * for new accounts as well as new account naming conventions. - * - * Account names containing '.' symbols must have a suffix equal to the name of the creator. - * This allows users who buy a premium name (shorter than 12 characters with no dots) to be the only ones - * who can create accounts with the creator's name as a suffix. - * - */ - void native::newaccount( account_name creator, - account_name newact - /* no need to parse authorities - const authority& owner, - const authority& active*/ ) { - - if( creator != _self ) { - auto tmp = newact >> 4; - bool has_dot = false; - - for( uint32_t i = 0; i < 12; ++i ) { - has_dot |= !(tmp & 0x1f); - tmp >>= 5; - } - if( has_dot ) { // or is less than 12 characters - auto suffix = eosio::name_suffix(newact); - if( suffix == newact ) { - name_bid_table bids(_self,_self); - auto current = bids.find( newact ); - eosio_assert( current != bids.end(), "no active bid for name" ); - eosio_assert( current->high_bidder == creator, "only highest bidder can claim" ); - eosio_assert( current->high_bid < 0, "auction for name is not closed yet" ); - bids.erase( current ); - } else { - eosio_assert( creator == suffix, "only suffix may create this account" ); - } - } - } - - user_resources_table userres( _self, newact); - - userres.emplace( newact, [&]( auto& res ) { - res.owner = newact; - }); - - set_resource_limits( newact, 0, 0, 0 ); - } - -} /// eosio.system - - -EOSIO_ABI( eosiosystem::system_contract, - // native.hpp (newaccount definition is actually in eosio.system.cpp) - (newaccount)(updateauth)(deleteauth)(linkauth)(unlinkauth)(canceldelay)(onerror) - // eosio.system.cpp - (setram)(setparams)(setpriv)(rmvproducer)(bidname) - // delegate_bandwidth.cpp - (buyrambytes)(buyram)(sellram)(delegatebw)(undelegatebw)(refund) - // voting.cpp - (regproducer)(unregprod)(voteproducer)(regproxy) - // producer_pay.cpp - (onblock)(claimrewards) -) diff --git a/contracts/eosio.system/eosio.system.hpp b/contracts/eosio.system/eosio.system.hpp deleted file mode 100644 index a33238a1eaa..00000000000 --- a/contracts/eosio.system/eosio.system.hpp +++ /dev/null @@ -1,236 +0,0 @@ -/** - * @file - * @copyright defined in eos/LICENSE.txt - */ -#pragma once - -#include -#include -#include -#include -#include -#include - -#include - -namespace eosiosystem { - - using eosio::asset; - using eosio::indexed_by; - using eosio::const_mem_fun; - using eosio::block_timestamp; - - struct name_bid { - account_name newname; - account_name high_bidder; - int64_t high_bid = 0; ///< negative high_bid == closed auction waiting to be claimed - uint64_t last_bid_time = 0; - - auto primary_key()const { return newname; } - uint64_t by_high_bid()const { return static_cast(-high_bid); } - }; - - typedef eosio::multi_index< N(namebids), name_bid, - indexed_by > - > name_bid_table; - - - struct eosio_global_state : eosio::blockchain_parameters { - uint64_t free_ram()const { return max_ram_size - total_ram_bytes_reserved; } - - uint64_t max_ram_size = 64ll*1024 * 1024 * 1024; - uint64_t total_ram_bytes_reserved = 0; - int64_t total_ram_stake = 0; - - block_timestamp last_producer_schedule_update; - uint64_t last_pervote_bucket_fill = 0; - int64_t pervote_bucket = 0; - int64_t perblock_bucket = 0; - uint32_t total_unpaid_blocks = 0; /// all blocks which have been produced but not paid - int64_t total_activated_stake = 0; - uint64_t thresh_activated_stake_time = 0; - uint16_t last_producer_schedule_size = 0; - double total_producer_vote_weight = 0; /// the sum of all producer votes - block_timestamp last_name_close; - - // explicit serialization macro is not necessary, used here only to improve compilation time - EOSLIB_SERIALIZE_DERIVED( eosio_global_state, eosio::blockchain_parameters, - (max_ram_size)(total_ram_bytes_reserved)(total_ram_stake) - (last_producer_schedule_update)(last_pervote_bucket_fill) - (pervote_bucket)(perblock_bucket)(total_unpaid_blocks)(total_activated_stake)(thresh_activated_stake_time) - (last_producer_schedule_size)(total_producer_vote_weight)(last_name_close) ) - }; - - struct producer_info { - account_name owner; - double total_votes = 0; - eosio::public_key producer_key; /// a packed public key object - bool is_active = true; - std::string url; - uint32_t unpaid_blocks = 0; - uint64_t last_claim_time = 0; - uint16_t location = 0; - - uint64_t primary_key()const { return owner; } - double by_votes()const { return is_active ? -total_votes : total_votes; } - bool active()const { return is_active; } - void deactivate() { producer_key = public_key(); is_active = false; } - - // explicit serialization macro is not necessary, used here only to improve compilation time - EOSLIB_SERIALIZE( producer_info, (owner)(total_votes)(producer_key)(is_active)(url) - (unpaid_blocks)(last_claim_time)(location) ) - }; - - struct voter_info { - account_name owner = 0; /// the voter - account_name proxy = 0; /// the proxy set by the voter, if any - std::vector producers; /// the producers approved by this voter if no proxy set - int64_t staked = 0; - - /** - * Every time a vote is cast we must first "undo" the last vote weight, before casting the - * new vote weight. Vote weight is calculated as: - * - * stated.amount * 2 ^ ( weeks_since_launch/weeks_per_year) - */ - double last_vote_weight = 0; /// the vote weight cast the last time the vote was updated - - /** - * Total vote weight delegated to this voter. - */ - double proxied_vote_weight= 0; /// the total vote weight delegated to this voter as a proxy - bool is_proxy = 0; /// whether the voter is a proxy for others - - - uint32_t reserved1 = 0; - time reserved2 = 0; - eosio::asset reserved3; - - uint64_t primary_key()const { return owner; } - - // explicit serialization macro is not necessary, used here only to improve compilation time - EOSLIB_SERIALIZE( voter_info, (owner)(proxy)(producers)(staked)(last_vote_weight)(proxied_vote_weight)(is_proxy)(reserved1)(reserved2)(reserved3) ) - }; - - typedef eosio::multi_index< N(voters), voter_info> voters_table; - - - typedef eosio::multi_index< N(producers), producer_info, - indexed_by > - > producers_table; - - typedef eosio::singleton global_state_singleton; - - // static constexpr uint32_t max_inflation_rate = 5; // 5% annual inflation - static constexpr uint32_t seconds_per_day = 24 * 3600; - static constexpr uint64_t system_token_symbol = CORE_SYMBOL; - - class system_contract : public native { - private: - voters_table _voters; - producers_table _producers; - global_state_singleton _global; - - eosio_global_state _gstate; - rammarket _rammarket; - - public: - system_contract( account_name s ); - ~system_contract(); - - // Actions: - void onblock( block_timestamp timestamp, account_name producer ); - // const block_header& header ); /// only parse first 3 fields of block header - - // functions defined in delegate_bandwidth.cpp - - /** - * Stakes SYS from the balance of 'from' for the benfit of 'receiver'. - * If transfer == true, then 'receiver' can unstake to their account - * Else 'from' can unstake at any time. - */ - void delegatebw( account_name from, account_name receiver, - asset stake_net_quantity, asset stake_cpu_quantity, bool transfer ); - - - /** - * Decreases the total tokens delegated by from to receiver and/or - * frees the memory associated with the delegation if there is nothing - * left to delegate. - * - * This will cause an immediate reduction in net/cpu bandwidth of the - * receiver. - * - * A transaction is scheduled to send the tokens back to 'from' after - * the staking period has passed. If existing transaction is scheduled, it - * will be canceled and a new transaction issued that has the combined - * undelegated amount. - * - * The 'from' account loses voting power as a result of this call and - * all producer tallies are updated. - */ - void undelegatebw( account_name from, account_name receiver, - asset unstake_net_quantity, asset unstake_cpu_quantity ); - - - /** - * Increases receiver's ram quota based upon current price and quantity of - * tokens provided. An inline transfer from receiver to system contract of - * tokens will be executed. - */ - void buyram( account_name buyer, account_name receiver, asset tokens ); - void buyrambytes( account_name buyer, account_name receiver, uint32_t bytes ); - - /** - * Reduces quota my bytes and then performs an inline transfer of tokens - * to receiver based upon the average purchase price of the original quota. - */ - void sellram( account_name receiver, int64_t bytes ); - - /** - * This action is called after the delegation-period to claim all pending - * unstaked tokens belonging to owner - */ - void refund( account_name owner ); - - // functions defined in voting.cpp - - void regproducer( const account_name producer, const public_key& producer_key, const std::string& url, uint16_t location ); - - void unregprod( const account_name producer ); - - void setram( uint64_t max_ram_size ); - - void voteproducer( const account_name voter, const account_name proxy, const std::vector& producers ); - - void regproxy( const account_name proxy, bool isproxy ); - - void setparams( const eosio::blockchain_parameters& params ); - - // functions defined in producer_pay.cpp - void claimrewards( const account_name& owner ); - - void setpriv( account_name account, uint8_t ispriv ); - - void rmvproducer( account_name producer ); - - void bidname( account_name bidder, account_name newname, asset bid ); - private: - void update_elected_producers( block_timestamp timestamp ); - - // Implementation details: - - //defind in delegate_bandwidth.cpp - void changebw( account_name from, account_name receiver, - asset stake_net_quantity, asset stake_cpu_quantity, bool transfer ); - - //defined in voting.hpp - static eosio_global_state get_default_parameters(); - - void update_votes( const account_name voter, const account_name proxy, const std::vector& producers, bool voting ); - - // defined in voting.cpp - void propagate_weight_change( const voter_info& voter ); - }; - -} /// eosiosystem diff --git a/contracts/eosio.system/exchange_state.cpp b/contracts/eosio.system/exchange_state.cpp deleted file mode 100644 index 621d3e714b3..00000000000 --- a/contracts/eosio.system/exchange_state.cpp +++ /dev/null @@ -1,85 +0,0 @@ -#include - -namespace eosiosystem { - asset exchange_state::convert_to_exchange( connector& c, asset in ) { - - real_type R(supply.amount); - real_type C(c.balance.amount+in.amount); - real_type F(c.weight/1000.0); - real_type T(in.amount); - real_type ONE(1.0); - - real_type E = -R * (ONE - std::pow( ONE + T / C, F) ); - //print( "E: ", E, "\n"); - int64_t issued = int64_t(E); - - supply.amount += issued; - c.balance.amount += in.amount; - - return asset( issued, supply.symbol ); - } - - asset exchange_state::convert_from_exchange( connector& c, asset in ) { - eosio_assert( in.symbol== supply.symbol, "unexpected asset symbol input" ); - - real_type R(supply.amount - in.amount); - real_type C(c.balance.amount); - real_type F(1000.0/c.weight); - real_type E(in.amount); - real_type ONE(1.0); - - - // potentially more accurate: - // The functions std::expm1 and std::log1p are useful for financial calculations, for example, - // when calculating small daily interest rates: (1+x)n - // -1 can be expressed as std::expm1(n * std::log1p(x)). - // real_type T = C * std::expm1( F * std::log1p(E/R) ); - - real_type T = C * (std::pow( ONE + E/R, F) - ONE); - //print( "T: ", T, "\n"); - int64_t out = int64_t(T); - - supply.amount -= in.amount; - c.balance.amount -= out; - - return asset( out, c.balance.symbol ); - } - - asset exchange_state::convert( asset from, symbol_type to ) { - auto sell_symbol = from.symbol; - auto ex_symbol = supply.symbol; - auto base_symbol = base.balance.symbol; - auto quote_symbol = quote.balance.symbol; - - //print( "From: ", from, " TO ", asset( 0,to), "\n" ); - //print( "base: ", base_symbol, "\n" ); - //print( "quote: ", quote_symbol, "\n" ); - //print( "ex: ", supply.symbol, "\n" ); - - if( sell_symbol != ex_symbol ) { - if( sell_symbol == base_symbol ) { - from = convert_to_exchange( base, from ); - } else if( sell_symbol == quote_symbol ) { - from = convert_to_exchange( quote, from ); - } else { - eosio_assert( false, "invalid sell" ); - } - } else { - if( to == base_symbol ) { - from = convert_from_exchange( base, from ); - } else if( to == quote_symbol ) { - from = convert_from_exchange( quote, from ); - } else { - eosio_assert( false, "invalid conversion" ); - } - } - - if( to != from.symbol ) - return convert( from, to ); - - return from; - } - - - -} /// namespace eosiosystem diff --git a/contracts/eosio.system/exchange_state.hpp b/contracts/eosio.system/exchange_state.hpp deleted file mode 100644 index 3705a9b8b98..00000000000 --- a/contracts/eosio.system/exchange_state.hpp +++ /dev/null @@ -1,40 +0,0 @@ -#pragma once - -#include - -namespace eosiosystem { - using eosio::asset; - using eosio::symbol_type; - - typedef double real_type; - - /** - * Uses Bancor math to create a 50/50 relay between two asset types. The state of the - * bancor exchange is entirely contained within this struct. There are no external - * side effects associated with using this API. - */ - struct exchange_state { - asset supply; - - struct connector { - asset balance; - double weight = .5; - - EOSLIB_SERIALIZE( connector, (balance)(weight) ) - }; - - connector base; - connector quote; - - uint64_t primary_key()const { return supply.symbol; } - - asset convert_to_exchange( connector& c, asset in ); - asset convert_from_exchange( connector& c, asset in ); - asset convert( asset from, symbol_type to ); - - EOSLIB_SERIALIZE( exchange_state, (supply)(base)(quote) ) - }; - - typedef eosio::multi_index rammarket; - -} /// namespace eosiosystem diff --git a/contracts/eosio.system/native.hpp b/contracts/eosio.system/native.hpp deleted file mode 100644 index e6395807395..00000000000 --- a/contracts/eosio.system/native.hpp +++ /dev/null @@ -1,112 +0,0 @@ -/** - * @file - * @copyright defined in eos/LICENSE.txt - */ -#pragma once - -#include -#include -#include -#include -#include -#include -#include -#include - -namespace eosiosystem { - using eosio::permission_level; - using eosio::public_key; - - typedef std::vector bytes; - - struct permission_level_weight { - permission_level permission; - weight_type weight; - - // explicit serialization macro is not necessary, used here only to improve compilation time - EOSLIB_SERIALIZE( permission_level_weight, (permission)(weight) ) - }; - - struct key_weight { - public_key key; - weight_type weight; - - // explicit serialization macro is not necessary, used here only to improve compilation time - EOSLIB_SERIALIZE( key_weight, (key)(weight) ) - }; - - struct authority { - uint32_t threshold; - uint32_t delay_sec; - std::vector keys; - std::vector accounts; - - // explicit serialization macro is not necessary, used here only to improve compilation time - EOSLIB_SERIALIZE( authority, (threshold)(delay_sec)(keys)(accounts) ) - }; - - struct block_header { - uint32_t timestamp; - account_name producer; - uint16_t confirmed = 0; - block_id_type previous; - checksum256 transaction_mroot; - checksum256 action_mroot; - uint32_t schedule_version = 0; - eosio::optional new_producers; - - // explicit serialization macro is not necessary, used here only to improve compilation time - EOSLIB_SERIALIZE(block_header, (timestamp)(producer)(confirmed)(previous)(transaction_mroot)(action_mroot) - (schedule_version)(new_producers)) - }; - - - /* - * Method parameters commented out to prevent generation of code that parses input data. - */ - class native : public eosio::contract { - public: - - using eosio::contract::contract; - - /** - * Called after a new account is created. This code enforces resource-limits rules - * for new accounts as well as new account naming conventions. - * - * 1. accounts cannot contain '.' symbols which forces all acccounts to be 12 - * characters long without '.' until a future account auction process is implemented - * which prevents name squatting. - * - * 2. new accounts must stake a minimal number of tokens (as set in system parameters) - * therefore, this method will execute an inline buyram from receiver for newacnt in - * an amount equal to the current new account creation fee. - */ - void newaccount( account_name creator, - account_name newact - /* no need to parse authorites - const authority& owner, - const authority& active*/ ); - - - void updateauth( /*account_name account, - permission_name permission, - permission_name parent, - const authority& data*/ ) {} - - void deleteauth( /*account_name account, permission_name permission*/ ) {} - - void linkauth( /*account_name account, - account_name code, - action_name type, - permission_name requirement*/ ) {} - - void unlinkauth( /*account_name account, - account_name code, - action_name type*/ ) {} - - void canceldelay( /*permission_level canceling_auth, transaction_id_type trx_id*/ ) {} - - void onerror( /*const bytes&*/ ) {} - - }; -} diff --git a/contracts/eosio.system/producer_pay.cpp b/contracts/eosio.system/producer_pay.cpp deleted file mode 100644 index 1d0af68d432..00000000000 --- a/contracts/eosio.system/producer_pay.cpp +++ /dev/null @@ -1,140 +0,0 @@ -#include "eosio.system.hpp" - -#include - -namespace eosiosystem { - - const int64_t min_pervote_daily_pay = 100'0000; - const int64_t min_activated_stake = 150'000'000'0000; - const double continuous_rate = 0.04879; // 5% annual rate - const double perblock_rate = 0.0025; // 0.25% - const double standby_rate = 0.0075; // 0.75% - const uint32_t blocks_per_year = 52*7*24*2*3600; // half seconds per year - const uint32_t seconds_per_year = 52*7*24*3600; - const uint32_t blocks_per_day = 2 * 24 * 3600; - const uint32_t blocks_per_hour = 2 * 3600; - const uint64_t useconds_per_day = 24 * 3600 * uint64_t(1000000); - const uint64_t useconds_per_year = seconds_per_year*1000000ll; - - - void system_contract::onblock( block_timestamp timestamp, account_name producer ) { - using namespace eosio; - - require_auth(N(eosio)); - - /** until activated stake crosses this threshold no new rewards are paid */ - if( _gstate.total_activated_stake < min_activated_stake ) - return; - - if( _gstate.last_pervote_bucket_fill == 0 ) /// start the presses - _gstate.last_pervote_bucket_fill = current_time(); - - - /** - * At startup the initial producer may not be one that is registered / elected - * and therefore there may be no producer object for them. - */ - auto prod = _producers.find(producer); - if ( prod != _producers.end() ) { - _gstate.total_unpaid_blocks++; - _producers.modify( prod, 0, [&](auto& p ) { - p.unpaid_blocks++; - }); - } - - /// only update block producers once every minute, block_timestamp is in half seconds - if( timestamp.slot - _gstate.last_producer_schedule_update.slot > 120 ) { - update_elected_producers( timestamp ); - - if( (timestamp.slot - _gstate.last_name_close.slot) > blocks_per_day ) { - name_bid_table bids(_self,_self); - auto idx = bids.get_index(); - auto highest = idx.begin(); - if( highest != idx.end() && - highest->high_bid > 0 && - highest->last_bid_time < (current_time() - useconds_per_day) && - _gstate.thresh_activated_stake_time > 0 && - (current_time() - _gstate.thresh_activated_stake_time) > 14 * useconds_per_day ) { - _gstate.last_name_close = timestamp; - idx.modify( highest, 0, [&]( auto& b ){ - b.high_bid = -b.high_bid; - }); - } - } - } - } - - using namespace eosio; - void system_contract::claimrewards( const account_name& owner ) { - require_auth(owner); - - const auto& prod = _producers.get( owner ); - eosio_assert( prod.active(), "producer does not have an active key" ); - - eosio_assert( _gstate.total_activated_stake >= min_activated_stake, - "cannot claim rewards until the chain is activated (at least 15% of all tokens participate in voting)" ); - - auto ct = current_time(); - - eosio_assert( ct - prod.last_claim_time > useconds_per_day, "already claimed rewards within past day" ); - - const asset token_supply = token( N(eosio.token)).get_supply(symbol_type(system_token_symbol).name() ); - const auto usecs_since_last_fill = ct - _gstate.last_pervote_bucket_fill; - - if( usecs_since_last_fill > 0 && _gstate.last_pervote_bucket_fill > 0 ) { - auto new_tokens = static_cast( (continuous_rate * double(token_supply.amount) * double(usecs_since_last_fill)) / double(useconds_per_year) ); - - auto to_producers = new_tokens / 5; - auto to_savings = new_tokens - to_producers; - auto to_per_block_pay = to_producers / 4; - auto to_per_vote_pay = to_producers - to_per_block_pay; - - INLINE_ACTION_SENDER(eosio::token, issue)( N(eosio.token), {{N(eosio),N(active)}}, - {N(eosio), asset(new_tokens), std::string("issue tokens for producer pay and savings")} ); - - INLINE_ACTION_SENDER(eosio::token, transfer)( N(eosio.token), {N(eosio),N(active)}, - { N(eosio), N(eosio.saving), asset(to_savings), "unallocated inflation" } ); - - INLINE_ACTION_SENDER(eosio::token, transfer)( N(eosio.token), {N(eosio),N(active)}, - { N(eosio), N(eosio.bpay), asset(to_per_block_pay), "fund per-block bucket" } ); - - INLINE_ACTION_SENDER(eosio::token, transfer)( N(eosio.token), {N(eosio),N(active)}, - { N(eosio), N(eosio.vpay), asset(to_per_vote_pay), "fund per-vote bucket" } ); - - _gstate.pervote_bucket += to_per_vote_pay; - _gstate.perblock_bucket += to_per_block_pay; - - _gstate.last_pervote_bucket_fill = ct; - } - - int64_t producer_per_block_pay = 0; - if( _gstate.total_unpaid_blocks > 0 ) { - producer_per_block_pay = (_gstate.perblock_bucket * prod.unpaid_blocks) / _gstate.total_unpaid_blocks; - } - int64_t producer_per_vote_pay = 0; - if( _gstate.total_producer_vote_weight > 0 ) { - producer_per_vote_pay = int64_t((_gstate.pervote_bucket * prod.total_votes ) / _gstate.total_producer_vote_weight); - } - if( producer_per_vote_pay < min_pervote_daily_pay ) { - producer_per_vote_pay = 0; - } - _gstate.pervote_bucket -= producer_per_vote_pay; - _gstate.perblock_bucket -= producer_per_block_pay; - _gstate.total_unpaid_blocks -= prod.unpaid_blocks; - - _producers.modify( prod, 0, [&](auto& p) { - p.last_claim_time = ct; - p.unpaid_blocks = 0; - }); - - if( producer_per_block_pay > 0 ) { - INLINE_ACTION_SENDER(eosio::token, transfer)( N(eosio.token), {N(eosio.bpay),N(active)}, - { N(eosio.bpay), owner, asset(producer_per_block_pay), std::string("producer block pay") } ); - } - if( producer_per_vote_pay > 0 ) { - INLINE_ACTION_SENDER(eosio::token, transfer)( N(eosio.token), {N(eosio.vpay),N(active)}, - { N(eosio.vpay), owner, asset(producer_per_vote_pay), std::string("producer vote pay") } ); - } - } - -} //namespace eosiosystem diff --git a/contracts/eosio.system/voting.cpp b/contracts/eosio.system/voting.cpp deleted file mode 100644 index 166f1707cd7..00000000000 --- a/contracts/eosio.system/voting.cpp +++ /dev/null @@ -1,288 +0,0 @@ -/** - * @file - * @copyright defined in eos/LICENSE.txt - */ -#include "eosio.system.hpp" - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include - -namespace eosiosystem { - using eosio::indexed_by; - using eosio::const_mem_fun; - using eosio::bytes; - using eosio::print; - using eosio::singleton; - using eosio::transaction; - - /** - * This method will create a producer_config and producer_info object for 'producer' - * - * @pre producer is not already registered - * @pre producer to register is an account - * @pre authority of producer to register - * - */ - void system_contract::regproducer( const account_name producer, const eosio::public_key& producer_key, const std::string& url, uint16_t location ) { - eosio_assert( url.size() < 512, "url too long" ); - eosio_assert( producer_key != eosio::public_key(), "public key should not be the default value" ); - require_auth( producer ); - - auto prod = _producers.find( producer ); - - if ( prod != _producers.end() ) { - _producers.modify( prod, producer, [&]( producer_info& info ){ - info.producer_key = producer_key; - info.is_active = true; - info.url = url; - info.location = location; - }); - } else { - _producers.emplace( producer, [&]( producer_info& info ){ - info.owner = producer; - info.total_votes = 0; - info.producer_key = producer_key; - info.is_active = true; - info.url = url; - info.location = location; - }); - } - } - - void system_contract::unregprod( const account_name producer ) { - require_auth( producer ); - - const auto& prod = _producers.get( producer, "producer not found" ); - - _producers.modify( prod, 0, [&]( producer_info& info ){ - info.deactivate(); - }); - } - - void system_contract::update_elected_producers( block_timestamp block_time ) { - _gstate.last_producer_schedule_update = block_time; - - auto idx = _producers.get_index(); - - std::vector< std::pair > top_producers; - top_producers.reserve(21); - - for ( auto it = idx.cbegin(); it != idx.cend() && top_producers.size() < 21 && 0 < it->total_votes && it->active(); ++it ) { - top_producers.emplace_back( std::pair({{it->owner, it->producer_key}, it->location}) ); - } - - if ( top_producers.size() < _gstate.last_producer_schedule_size ) { - return; - } - - /// sort by producer name - std::sort( top_producers.begin(), top_producers.end() ); - - std::vector producers; - - producers.reserve(top_producers.size()); - for( const auto& item : top_producers ) - producers.push_back(item.first); - - bytes packed_schedule = pack(producers); - - if( set_proposed_producers( packed_schedule.data(), packed_schedule.size() ) >= 0 ) { - _gstate.last_producer_schedule_size = static_cast( top_producers.size() ); - } - } - - double stake2vote( int64_t staked ) { - /// TODO subtract 2080 brings the large numbers closer to this decade - double weight = int64_t( (now() - (block_timestamp::block_timestamp_epoch / 1000)) / (seconds_per_day * 7) ) / double( 52 ); - return double(staked) * std::pow( 2, weight ); - } - /** - * @pre producers must be sorted from lowest to highest and must be registered and active - * @pre if proxy is set then no producers can be voted for - * @pre if proxy is set then proxy account must exist and be registered as a proxy - * @pre every listed producer or proxy must have been previously registered - * @pre voter must authorize this action - * @pre voter must have previously staked some EOS for voting - * @pre voter->staked must be up to date - * - * @post every producer previously voted for will have vote reduced by previous vote weight - * @post every producer newly voted for will have vote increased by new vote amount - * @post prior proxy will proxied_vote_weight decremented by previous vote weight - * @post new proxy will proxied_vote_weight incremented by new vote weight - * - * If voting for a proxy, the producer votes will not change until the proxy updates their own vote. - */ - void system_contract::voteproducer( const account_name voter_name, const account_name proxy, const std::vector& producers ) { - require_auth( voter_name ); - update_votes( voter_name, proxy, producers, true ); - } - - void system_contract::update_votes( const account_name voter_name, const account_name proxy, const std::vector& producers, bool voting ) { - //validate input - if ( proxy ) { - eosio_assert( producers.size() == 0, "cannot vote for producers and proxy at same time" ); - eosio_assert( voter_name != proxy, "cannot proxy to self" ); - require_recipient( proxy ); - } else { - eosio_assert( producers.size() <= 30, "attempt to vote for too many producers" ); - for( size_t i = 1; i < producers.size(); ++i ) { - eosio_assert( producers[i-1] < producers[i], "producer votes must be unique and sorted" ); - } - } - - auto voter = _voters.find(voter_name); - eosio_assert( voter != _voters.end(), "user must stake before they can vote" ); /// staking creates voter object - eosio_assert( !proxy || !voter->is_proxy, "account registered as a proxy is not allowed to use a proxy" ); - - /** - * The first time someone votes we calculate and set last_vote_weight, since they cannot unstake until - * after total_activated_stake hits threshold, we can use last_vote_weight to determine that this is - * their first vote and should consider their stake activated. - */ - if( voter->last_vote_weight <= 0.0 ) { - _gstate.total_activated_stake += voter->staked; - if( _gstate.total_activated_stake >= min_activated_stake && _gstate.thresh_activated_stake_time == 0 ) { - _gstate.thresh_activated_stake_time = current_time(); - } - } - - auto new_vote_weight = stake2vote( voter->staked ); - if( voter->is_proxy ) { - new_vote_weight += voter->proxied_vote_weight; - } - - boost::container::flat_map > producer_deltas; - if ( voter->last_vote_weight > 0 ) { - if( voter->proxy ) { - auto old_proxy = _voters.find( voter->proxy ); - eosio_assert( old_proxy != _voters.end(), "old proxy not found" ); //data corruption - _voters.modify( old_proxy, 0, [&]( auto& vp ) { - vp.proxied_vote_weight -= voter->last_vote_weight; - }); - propagate_weight_change( *old_proxy ); - } else { - for( const auto& p : voter->producers ) { - auto& d = producer_deltas[p]; - d.first -= voter->last_vote_weight; - d.second = false; - } - } - } - - if( proxy ) { - auto new_proxy = _voters.find( proxy ); - eosio_assert( new_proxy != _voters.end(), "invalid proxy specified" ); //if ( !voting ) { data corruption } else { wrong vote } - eosio_assert( !voting || new_proxy->is_proxy, "proxy not found" ); - if ( new_vote_weight >= 0 ) { - _voters.modify( new_proxy, 0, [&]( auto& vp ) { - vp.proxied_vote_weight += new_vote_weight; - }); - propagate_weight_change( *new_proxy ); - } - } else { - if( new_vote_weight >= 0 ) { - for( const auto& p : producers ) { - auto& d = producer_deltas[p]; - d.first += new_vote_weight; - d.second = true; - } - } - } - - for( const auto& pd : producer_deltas ) { - auto pitr = _producers.find( pd.first ); - if( pitr != _producers.end() ) { - eosio_assert( !voting || pitr->active() || !pd.second.second /* not from new set */, "producer is not currently registered" ); - _producers.modify( pitr, 0, [&]( auto& p ) { - p.total_votes += pd.second.first; - if ( p.total_votes < 0 ) { // floating point arithmetics can give small negative numbers - p.total_votes = 0; - } - _gstate.total_producer_vote_weight += pd.second.first; - //eosio_assert( p.total_votes >= 0, "something bad happened" ); - }); - } else { - eosio_assert( !pd.second.second /* not from new set */, "producer is not registered" ); //data corruption - } - } - - _voters.modify( voter, 0, [&]( auto& av ) { - av.last_vote_weight = new_vote_weight; - av.producers = producers; - av.proxy = proxy; - }); - } - - /** - * An account marked as a proxy can vote with the weight of other accounts which - * have selected it as a proxy. Other accounts must refresh their voteproducer to - * update the proxy's weight. - * - * @param isproxy - true if proxy wishes to vote on behalf of others, false otherwise - * @pre proxy must have something staked (existing row in voters table) - * @pre new state must be different than current state - */ - void system_contract::regproxy( const account_name proxy, bool isproxy ) { - require_auth( proxy ); - - auto pitr = _voters.find(proxy); - if ( pitr != _voters.end() ) { - eosio_assert( isproxy != pitr->is_proxy, "action has no effect" ); - eosio_assert( !isproxy || !pitr->proxy, "account that uses a proxy is not allowed to become a proxy" ); - _voters.modify( pitr, 0, [&]( auto& p ) { - p.is_proxy = isproxy; - }); - propagate_weight_change( *pitr ); - } else { - _voters.emplace( proxy, [&]( auto& p ) { - p.owner = proxy; - p.is_proxy = isproxy; - }); - } - } - - void system_contract::propagate_weight_change( const voter_info& voter ) { - eosio_assert( voter.proxy == 0 || !voter.is_proxy, "account registered as a proxy is not allowed to use a proxy" ); - double new_weight = stake2vote( voter.staked ); - if ( voter.is_proxy ) { - new_weight += voter.proxied_vote_weight; - } - - /// don't propagate small changes (1 ~= epsilon) - if ( fabs( new_weight - voter.last_vote_weight ) > 1 ) { - if ( voter.proxy ) { - auto& proxy = _voters.get( voter.proxy, "proxy not found" ); //data corruption - _voters.modify( proxy, 0, [&]( auto& p ) { - p.proxied_vote_weight += new_weight - voter.last_vote_weight; - } - ); - propagate_weight_change( proxy ); - } else { - auto delta = new_weight - voter.last_vote_weight; - for ( auto acnt : voter.producers ) { - auto& pitr = _producers.get( acnt, "producer not found" ); //data corruption - _producers.modify( pitr, 0, [&]( auto& p ) { - p.total_votes += delta; - _gstate.total_producer_vote_weight += delta; - }); - } - } - } - _voters.modify( voter, 0, [&]( auto& v ) { - v.last_vote_weight = new_weight; - } - ); - } - -} /// namespace eosiosystem diff --git a/contracts/eosio.token/CMakeLists.txt b/contracts/eosio.token/CMakeLists.txt deleted file mode 100644 index 00ab99ec249..00000000000 --- a/contracts/eosio.token/CMakeLists.txt +++ /dev/null @@ -1,8 +0,0 @@ -file(GLOB ABI_FILES "*.abi") -configure_file("${ABI_FILES}" "${CMAKE_CURRENT_BINARY_DIR}" COPYONLY) - -add_wast_executable(TARGET eosio.token - INCLUDE_FOLDERS "${STANDARD_INCLUDE_FOLDERS}" - LIBRARIES libc++ libc eosiolib - DESTINATION_FOLDER ${CMAKE_CURRENT_BINARY_DIR} -) diff --git a/contracts/eosio.token/eosio.token.abi b/contracts/eosio.token/eosio.token.abi deleted file mode 100644 index d769deb331b..00000000000 --- a/contracts/eosio.token/eosio.token.abi +++ /dev/null @@ -1,78 +0,0 @@ -{ - "version": "eosio::abi/1.0", - "types": [{ - "new_type_name": "account_name", - "type": "name" - }], - "structs": [{ - "name": "transfer", - "base": "", - "fields": [ - {"name":"from", "type":"account_name"}, - {"name":"to", "type":"account_name"}, - {"name":"quantity", "type":"asset"}, - {"name":"memo", "type":"string"} - ] - },{ - "name": "create", - "base": "", - "fields": [ - {"name":"issuer", "type":"account_name"}, - {"name":"maximum_supply", "type":"asset"} - ] - },{ - "name": "issue", - "base": "", - "fields": [ - {"name":"to", "type":"account_name"}, - {"name":"quantity", "type":"asset"}, - {"name":"memo", "type":"string"} - ] - },{ - "name": "account", - "base": "", - "fields": [ - {"name":"balance", "type":"asset"} - ] - },{ - "name": "currency_stats", - "base": "", - "fields": [ - {"name":"supply", "type":"asset"}, - {"name":"max_supply", "type":"asset"}, - {"name":"issuer", "type":"account_name"} - ] - } - ], - "actions": [{ - "name": "transfer", - "type": "transfer", - "ricardian_contract": "" - },{ - "name": "issue", - "type": "issue", - "ricardian_contract": "" - }, { - "name": "create", - "type": "create", - "ricardian_contract": "" - } - - ], - "tables": [{ - "name": "accounts", - "type": "account", - "index_type": "i64", - "key_names" : ["currency"], - "key_types" : ["uint64"] - },{ - "name": "stat", - "type": "currency_stats", - "index_type": "i64", - "key_names" : ["currency"], - "key_types" : ["uint64"] - } - ], - "ricardian_clauses": [], - "abi_extensions": [] -} diff --git a/contracts/eosio.token/eosio.token.cpp b/contracts/eosio.token/eosio.token.cpp deleted file mode 100644 index 351d81c47c5..00000000000 --- a/contracts/eosio.token/eosio.token.cpp +++ /dev/null @@ -1,120 +0,0 @@ -/** - * @file - * @copyright defined in eos/LICENSE.txt - */ - -#include "eosio.token.hpp" - -namespace eosio { - -void token::create( account_name issuer, - asset maximum_supply ) -{ - require_auth( _self ); - - auto sym = maximum_supply.symbol; - eosio_assert( sym.is_valid(), "invalid symbol name" ); - eosio_assert( maximum_supply.is_valid(), "invalid supply"); - eosio_assert( maximum_supply.amount > 0, "max-supply must be positive"); - - stats statstable( _self, sym.name() ); - auto existing = statstable.find( sym.name() ); - eosio_assert( existing == statstable.end(), "token with symbol already exists" ); - - statstable.emplace( _self, [&]( auto& s ) { - s.supply.symbol = maximum_supply.symbol; - s.max_supply = maximum_supply; - s.issuer = issuer; - }); -} - - -void token::issue( account_name to, asset quantity, string memo ) -{ - auto sym = quantity.symbol; - eosio_assert( sym.is_valid(), "invalid symbol name" ); - eosio_assert( memo.size() <= 256, "memo has more than 256 bytes" ); - - auto sym_name = sym.name(); - stats statstable( _self, sym_name ); - auto existing = statstable.find( sym_name ); - eosio_assert( existing != statstable.end(), "token with symbol does not exist, create token before issue" ); - const auto& st = *existing; - - require_auth( st.issuer ); - eosio_assert( quantity.is_valid(), "invalid quantity" ); - eosio_assert( quantity.amount > 0, "must issue positive quantity" ); - - eosio_assert( quantity.symbol == st.supply.symbol, "symbol precision mismatch" ); - eosio_assert( quantity.amount <= st.max_supply.amount - st.supply.amount, "quantity exceeds available supply"); - - statstable.modify( st, 0, [&]( auto& s ) { - s.supply += quantity; - }); - - add_balance( st.issuer, quantity, st.issuer ); - - if( to != st.issuer ) { - SEND_INLINE_ACTION( *this, transfer, {st.issuer,N(active)}, {st.issuer, to, quantity, memo} ); - } -} - -void token::transfer( account_name from, - account_name to, - asset quantity, - string memo ) -{ - eosio_assert( from != to, "cannot transfer to self" ); - require_auth( from ); - eosio_assert( is_account( to ), "to account does not exist"); - auto sym = quantity.symbol.name(); - stats statstable( _self, sym ); - const auto& st = statstable.get( sym ); - - require_recipient( from ); - require_recipient( to ); - - eosio_assert( quantity.is_valid(), "invalid quantity" ); - eosio_assert( quantity.amount > 0, "must transfer positive quantity" ); - eosio_assert( quantity.symbol == st.supply.symbol, "symbol precision mismatch" ); - eosio_assert( memo.size() <= 256, "memo has more than 256 bytes" ); - - - sub_balance( from, quantity ); - add_balance( to, quantity, from ); -} - -void token::sub_balance( account_name owner, asset value ) { - accounts from_acnts( _self, owner ); - - const auto& from = from_acnts.get( value.symbol.name(), "no balance object found" ); - eosio_assert( from.balance.amount >= value.amount, "overdrawn balance" ); - - - if( from.balance.amount == value.amount ) { - from_acnts.erase( from ); - } else { - from_acnts.modify( from, owner, [&]( auto& a ) { - a.balance -= value; - }); - } -} - -void token::add_balance( account_name owner, asset value, account_name ram_payer ) -{ - accounts to_acnts( _self, owner ); - auto to = to_acnts.find( value.symbol.name() ); - if( to == to_acnts.end() ) { - to_acnts.emplace( ram_payer, [&]( auto& a ){ - a.balance = value; - }); - } else { - to_acnts.modify( to, 0, [&]( auto& a ) { - a.balance += value; - }); - } -} - -} /// namespace eosio - -EOSIO_ABI( eosio::token, (create)(issue)(transfer) ) diff --git a/contracts/eosio.token/eosio.token.hpp b/contracts/eosio.token/eosio.token.hpp deleted file mode 100644 index 15875134777..00000000000 --- a/contracts/eosio.token/eosio.token.hpp +++ /dev/null @@ -1,83 +0,0 @@ -/** - * @file - * @copyright defined in eos/LICENSE.txt - */ -#pragma once - -#include -#include - -#include - -namespace eosiosystem { - class system_contract; -} - -namespace eosio { - - using std::string; - - class token : public contract { - public: - token( account_name self ):contract(self){} - - void create( account_name issuer, - asset maximum_supply); - - void issue( account_name to, asset quantity, string memo ); - - void transfer( account_name from, - account_name to, - asset quantity, - string memo ); - - - inline asset get_supply( symbol_name sym )const; - - inline asset get_balance( account_name owner, symbol_name sym )const; - - private: - struct account { - asset balance; - - uint64_t primary_key()const { return balance.symbol.name(); } - }; - - struct currency_stats { - asset supply; - asset max_supply; - account_name issuer; - - uint64_t primary_key()const { return supply.symbol.name(); } - }; - - typedef eosio::multi_index accounts; - typedef eosio::multi_index stats; - - void sub_balance( account_name owner, asset value ); - void add_balance( account_name owner, asset value, account_name ram_payer ); - - public: - struct transfer_args { - account_name from; - account_name to; - asset quantity; - string memo; - }; - }; - - asset token::get_supply( symbol_name sym )const - { - stats statstable( _self, sym ); - const auto& st = statstable.get( sym ); - return st.supply; - } - - asset token::get_balance( account_name owner, symbol_name sym )const - { - accounts accountstable( _self, owner ); - const auto& ac = accountstable.get( sym ); - return ac.balance; - } - -} /// namespace eosio diff --git a/contracts/eosiolib/CMakeLists.txt b/contracts/eosiolib/CMakeLists.txt deleted file mode 100644 index f7dc3b0c5a0..00000000000 --- a/contracts/eosiolib/CMakeLists.txt +++ /dev/null @@ -1,6 +0,0 @@ -configure_file(${CMAKE_CURRENT_SOURCE_DIR}/core_symbol.hpp.in ${CMAKE_CURRENT_BINARY_DIR}/core_symbol.hpp) - -add_wast_library(TARGET eosiolib - INCLUDE_FOLDERS "${STANDARD_INCLUDE_FOLDERS}" ${CMAKE_SOURCE_DIR}/externals/magic_get/include - DESTINATION_FOLDER ${CMAKE_CURRENT_BINARY_DIR} -) diff --git a/contracts/eosiolib/action.h b/contracts/eosiolib/action.h deleted file mode 100644 index 3e686fe469d..00000000000 --- a/contracts/eosiolib/action.h +++ /dev/null @@ -1,170 +0,0 @@ -/** - * @file - * @copyright defined in eos/LICENSE.txt - */ -#pragma once -#include - -extern "C" { - /** - * @defgroup actionapi Action API - * @ingroup contractdev - * @brief Defines API for for querying action and sending action - * - */ - - /** - * @defgroup actioncapi Action C API - * @ingroup actionapi - * @brief Defines API for querying action and sending action - * - * - * A EOS.IO action has the following abstract structure: - * - * ``` - * struct action { - * scope_name scope; // the contract defining the primary code to execute for code/type - * action_name name; // the action to be taken - * permission_level[] authorization; // the accounts and permission levels provided - * bytes data; // opaque data processed by code - * }; - * ``` - * - * This API enables your contract to inspect the fields on the current action and act accordingly. - * - * Example: - * @code - * // Assume this action is used for the following examples: - * // { - * // "code": "eos", - * // "type": "transfer", - * // "authorization": [{ "account": "inita", "permission": "active" }], - * // "data": { - * // "from": "inita", - * // "to": "initb", - * // "amount": 1000 - * // } - * // } - * - * char buffer[128]; - * uint32_t total = read_action(buffer, 5); // buffer contains the content of the action up to 5 bytes - * print(total); // Output: 5 - * - * uint32_t msgsize = action_size(); - * print(msgsize); // Output: size of the above action's data field - * - * require_recipient(N(initc)); // initc account will be notified for this action - * - * require_auth(N(inita)); // Do nothing since inita exists in the auth list - * require_auth(N(initb)); // Throws an exception - * - * print(current_time()); // Output: timestamp (in microseconds since 1970) of current block - * - * @endcode - * - * - * @{ - */ - - /** - * Copy up to @ref len bytes of current action data to the specified location - * - * @brief Copy current action data to the specified location - * @param msg - a pointer where up to @ref len bytes of the current action data will be copied - * @param len - len of the current action data to be copied, 0 to report required size - * @return the number of bytes copied to msg, or number of bytes that can be copied if len==0 passed - * @pre `msg` is a valid pointer to a range of memory at least `len` bytes long - * @post `msg` is filled with packed action data - */ - uint32_t read_action_data( void* msg, uint32_t len ); - - /** - * Get the length of the current action's data field. This method is useful for dynamically sized actions - * - * @brief Get the length of current action's data field - * @return the length of the current action's data field - */ - uint32_t action_data_size(); - - /** - * Add the specified account to set of accounts to be notified - * - * @brief Add the specified account to set of accounts to be notified - * @param name - name of the account to be verified - */ - void require_recipient( account_name name ); - - /** - * Verifies that @ref name exists in the set of provided auths on a action. Throws if not found. - * - * @brief Verify specified account exists in the set of provided auths - * @param name - name of the account to be verified - */ - void require_auth( account_name name ); - - /** - * Verifies that @ref name has auth. - * - * @brief Verifies that @ref name has auth. - * @param name - name of the account to be verified - */ - bool has_auth( account_name name ); - - /** - * Verifies that @ref name exists in the set of provided auths on a action. Throws if not found. - * - * @brief Verify specified account exists in the set of provided auths - * @param name - name of the account to be verified - * @param permission - permission level to be verified - */ - void require_auth2( account_name name, permission_name permission ); - - bool is_account( account_name name ); - - /** - * Send an inline action in the context of this action's parent transaction - * - * @param serialized_action - serialized action - * @param size - size of serialized action in bytes - * @pre `serialized_action` is a valid pointer to an array at least `size` bytes long - */ - void send_inline(char *serialized_action, size_t size); - - /** - * Send an inline context free action in the context of this action's parent transaction - * - * @param serialized_action - serialized action - * @param size - size of serialized action in bytes - * @pre `serialized_action` is a valid pointer to an array at least `size` bytes long - */ - void send_context_free_inline(char *serialized_action, size_t size); - - /** - * Verifies that @ref name exists in the set of write locks held on a action. Throws if not found - * @brief Verifies that @ref name exists in the set of write locks held - * @param name - name of the account to be verified - */ - void require_write_lock( account_name name ); - - /** - * Verifies that @ref name exists in the set of read locks held on a action. Throws if not found - * @brief Verifies that @ref name exists in the set of read locks held - * @param name - name of the account to be verified - */ - void require_read_lock( account_name name ); - - /** - * Returns the time in microseconds from 1970 of the publication_time - * @brief Get the publication time - * @return the time in microseconds from 1970 of the publication_time - */ - uint64_t publication_time(); - - /** - * Get the current receiver of the action - * @brief Get the current receiver of the action - * @return the account which specifies the current receiver of the action - */ - account_name current_receiver(); - ///@ } actioncapi -} diff --git a/contracts/eosiolib/action.hpp b/contracts/eosiolib/action.hpp deleted file mode 100644 index 11028f09e93..00000000000 --- a/contracts/eosiolib/action.hpp +++ /dev/null @@ -1,395 +0,0 @@ -/** - * @file - * @copyright defined in eos/LICENSE.txt - */ -#pragma once -#include -#include -#include - -#include -#include -#include -#include - -namespace eosio { - - /** - * @defgroup actioncppapi Action C++ API - * @ingroup actionapi - * @brief Defines type-safe C++ wrapers for querying action and sending action - * - * @note There are some methods from the @ref actioncapi that can be used directly from C++ - * - * @{ - */ - - /** - * - * This method unpacks the current action at type T. - * - * @brief Interpret the action body as type T. - * @return Unpacked action data casted as T. - * - * Example: - * - * @code - * struct dummy_action { - * char a; //1 - * unsigned long long b; //8 - * int c; //4 - * - * EOSLIB_SERIALIZE( dummy_action, (a)(b)(c) ) - * }; - * dummy_action msg = unpack_action_data(); - * @endcode - */ - template - T unpack_action_data() { - constexpr size_t max_stack_buffer_size = 512; - size_t size = action_data_size(); - const bool heap_allocation = max_stack_buffer_size < size; - char* buffer = (char*)( heap_allocation ? malloc(size) : alloca(size) ); - read_action_data( buffer, size ); - auto res = unpack( buffer, size ); - // Free allocated memory - if ( heap_allocation ) { - free(buffer); - } - return res; - } - - using ::require_auth; - using ::require_recipient; - - /** - * All of the listed accounts will be added to the set of accounts to be notified - * - * This helper method enables you to add multiple accounts to accounts to be notified list with a single - * call rather than having to call the similar C API multiple times. - * - * @note action.code is also considered as part of the set of notified accounts - * - * @brief Notify an account for this action - * @param name account to be notified - * @param remaining_accounts accounts to be notified - * - * Example: - * - * @code - * require_recipient(N(Account1), N(Account2), N(Account3)); // throws exception if any of them not in set. - * @endcode - */ - template - void require_recipient( account_name name, accounts... remaining_accounts ){ - require_recipient( name ); - require_recipient( remaining_accounts... ); - } - - /** - * Packed representation of a permission level (Authorization) - * - * @brief Packed representation of a permission level (Authorization) - */ - struct permission_level { - /** - * Construct a new permission level object with actor name and permission name - * - * @brief Construct a new permission level object - * @param a - Name of the account who owns this authorization - * @param p - Name of the permission - */ - permission_level( account_name a, permission_name p ):actor(a),permission(p){} - - /** - * Default Constructor - * - * @brief Construct a new permission level object - */ - permission_level(){} - - /** - * Name of the account who owns this permission - * - * @brief Name of the account who owns this permission - */ - account_name actor; - /** - * Name of the permission - * - * @brief Name of the permission - */ - permission_name permission; - - /** - * Check equality of two permissions - * - * @brief Check equality of two permissions - * @param a - first permission to compare - * @param b - second permission to compare - * @return true if equal - * @return false if unequal - */ - friend bool operator == ( const permission_level& a, const permission_level& b ) { - return std::tie( a.actor, a.permission ) == std::tie( b.actor, b.permission ); - } - - EOSLIB_SERIALIZE( permission_level, (actor)(permission) ) - }; - - /** - * Require the specified authorization for this action. If this action doesn't contain the specified auth, it will fail. - * - * @brief Require the specified authorization for this action - * - * @param level - Authorization to be required - */ - void require_auth(const permission_level& level) { - require_auth2( level.actor, level.permission ); - } - - /** - * This is the packed representation of an action along with - * meta-data about the authorization levels. - * - * @brief Packed representation of an action - */ - struct action { - /** - * Name of the account the action is intended for - * - * @brief Name of the account the action is intended for - */ - account_name account; - - /** - * Name of the action - * - * @brief Name of the action - */ - action_name name; - - /** - * List of permissions that authorize this action - * - * @brief List of permissions that authorize this action - */ - vector authorization; - - /** - * Payload data - * - * @brief Payload data - */ - bytes data; - - /** - * Default Constructor - * - * @brief Construct a new action object - */ - action() = default; - - /** - * Construct a new action object with the given permission and action struct - * - * @brief Construct a new action object with the given permission and action struct - * @tparam Action - Type of action struct - * @param auth - The permission that authorizes this action - * @param value - The action struct that will be serialized via pack into data - */ - template - action( vector&& auth, const Action& value ) { - account = Action::get_account(); - name = Action::get_name(); - authorization = move(auth); - data = pack(value); - } - - /** - * Construct a new action object with the given list of permissions and action struct - * - * @brief Construct a new action object with the given list of permissions and action struct - * @tparam Action - Type of action struct - * @param auth - The list of permissions that authorizes this action - * @param value - The action struct that will be serialized via pack into data - */ - template - action( const permission_level& auth, const Action& value ) - :authorization(1,auth) { - account = Action::get_account(); - name = Action::get_name(); - data = pack(value); - } - - - /** - * Construct a new action object with the given action struct - * - * @brief Construct a new action object with the given action struct - * @tparam Action - Type of action struct - * @param value - The action struct that will be serialized via pack into data - */ - template - action( const Action& value ) { - account = Action::get_account(); - name = Action::get_name(); - data = pack(value); - } - - /** - * Construct a new action object with the given action struct - * - * @brief Construct a new action object with the given permission, action receiver, action name, action struct - * @tparam T - Type of action struct, must be serializable by `pack(...)` - * @param auth - The permissions that authorizes this action - * @param a - The name of the account this action is intended for (action receiver) - * @param n - The name of the action - * @param value - The action struct that will be serialized via pack into data - */ - template - action( const permission_level& auth, account_name a, action_name n, T&& value ) - :account(a), name(n), authorization(1,auth), data(pack(std::forward(value))) {} - - /** - * Construct a new action object with the given action struct - * - * @brief Construct a new action object with the given list of permissions, action receiver, action name, action struct - * @tparam T - Type of action struct, must be serializable by `pack(...)` - * @param auths - The list of permissions that authorize this action - * @param a - The name of the account this action is intended for (action receiver) - * @param n - The name of the action - * @param value - The action struct that will be serialized via pack into data - */ - template - action( vector auths, account_name a, action_name n, T&& value ) - :account(a), name(n), authorization(std::move(auths)), data(pack(std::forward(value))) {} - - EOSLIB_SERIALIZE( action, (account)(name)(authorization)(data) ) - - /** - * Send the action as inline action - * - * @brief Send the action as inline action - */ - void send() const { - auto serialize = pack(*this); - ::send_inline(serialize.data(), serialize.size()); - } - - /** - * Send the action as inline context free action - * - * @brief Send the action as inline context free action - * @pre This action should not contain any authorizations - */ - void send_context_free() const { - eosio_assert( authorization.size() == 0, "context free actions cannot have authorizations"); - auto serialize = pack(*this); - ::send_context_free_inline(serialize.data(), serialize.size()); - } - - /** - * Retrieve the unpacked data as T - * - * @brief Retrieve the unpacked data as T - * @tparam T expected type of data - * @return the action data - */ - template - T data_as() { - eosio_assert( name == T::get_name(), "Invalid name" ); - eosio_assert( account == T::get_account(), "Invalid account" ); - return unpack( &data[0], data.size() ); - } - - }; - - /** - * Base class to derive a new defined action from so it can take advantage of the dispatcher - * - * @brief Base class to derive a new defined action from - * @tparam Account - The account this action is intended for - * @tparam Name - The name of the action - */ - template - struct action_meta { - /** - * Get the account this action is intended for - * - * @brief Get the account this action is intended for - * @return uint64_t The account this action is intended for - */ - static uint64_t get_account() { return Account; } - /** - * Get the name of this action - * - * @brief Get the name of this action - * @return uint64_t Name of the action - */ - static uint64_t get_name() { return Name; } - }; - - ///@} actioncpp api - - template - void dispatch_inline( account_name code, action_name act, - vector perms, - std::tuple args ) { - action( perms, code, act, std::move(args) ).send(); - } - - - template - struct inline_dispatcher; - - - template - struct inline_dispatcher { - static void call(account_name code, const permission_level& perm, std::tuple args) { - dispatch_inline(code, Name, vector(1, perm), std::move(args)); - } - static void call(account_name code, vector perms, std::tuple args) { - dispatch_inline(code, Name, std::move(perms), std::move(args)); - } - }; - - -} // namespace eosio - -#define INLINE_ACTION_SENDER3( CONTRACT_CLASS, FUNCTION_NAME, ACTION_NAME )\ -::eosio::inline_dispatcher::call - -#define INLINE_ACTION_SENDER2( CONTRACT_CLASS, NAME )\ -INLINE_ACTION_SENDER3( CONTRACT_CLASS, NAME, ::eosio::string_to_name(#NAME) ) - -#define INLINE_ACTION_SENDER(...) BOOST_PP_OVERLOAD(INLINE_ACTION_SENDER,__VA_ARGS__)(__VA_ARGS__) - -/** - * @addtogroup actioncppapi - * Additional documentation for group - * @{ - */ - -/** - * Send inline action - * - * @brief Send inline action - * @param CONTRACT - The account this action is intended for - * @param NAME - The name of the action - * @param ... - The member of the action specified as ("action_member1_name", action_member1_value)("action_member2_name", action_member2_value) - */ -#define SEND_INLINE_ACTION( CONTRACT, NAME, ... )\ -INLINE_ACTION_SENDER(std::decay_t, NAME)( (CONTRACT).get_self(),\ -BOOST_PP_TUPLE_ENUM(BOOST_PP_VARIADIC_SIZE(__VA_ARGS__), BOOST_PP_VARIADIC_TO_TUPLE(__VA_ARGS__)) ); - -/** - * Extend a new defined action with theaction meta, so it can work with the dispatcher - * - * @brief Extend a new defined action with the action meta - * @param CODE - The account this action is intended for - * @param NAME - The name of the action - */ -#define ACTION( CODE, NAME ) struct NAME : ::eosio::action_meta - - /// @} diff --git a/contracts/eosiolib/asset.hpp b/contracts/eosiolib/asset.hpp deleted file mode 100644 index c3e454384ff..00000000000 --- a/contracts/eosiolib/asset.hpp +++ /dev/null @@ -1,472 +0,0 @@ -#pragma once -#include -#include -#include -#include -#include -#include - -namespace eosio { - - /** - * @defgroup assetapi Asset API - * @brief Defines API for managing assets - * @ingroup contractdev - */ - - /** - * @defgroup assetcppapi Asset CPP API - * @brief Defines %CPP API for managing assets - * @ingroup assetapi - * @{ - */ - - /** - * \struct Stores information for owner of asset - * - * @brief Stores information for owner of asset - */ - - struct asset { - /** - * The amount of the asset - * - * @brief The amount of the asset - */ - int64_t amount; - - /** - * The symbol name of the asset - * - * @brief The symbol name of the asset - */ - symbol_type symbol; - - /** - * Maximum amount possible for this asset. It's capped to 2^62 - 1 - * - * @brief Maximum amount possible for this asset - */ - static constexpr int64_t max_amount = (1LL << 62) - 1; - - /** - * Construct a new asset given the symbol name and the amount - * - * @brief Construct a new asset object - * @param a - The amount of the asset - * @param s - THe name of the symbol, default to CORE_SYMBOL - */ - explicit asset( int64_t a = 0, symbol_type s = CORE_SYMBOL ) - :amount(a),symbol{s} - { - eosio_assert( is_amount_within_range(), "magnitude of asset amount must be less than 2^62" ); - eosio_assert( symbol.is_valid(), "invalid symbol name" ); - } - - /** - * Check if the amount doesn't exceed the max amount - * - * @brief Check if the amount doesn't exceed the max amount - * @return true - if the amount doesn't exceed the max amount - * @return false - otherwise - */ - bool is_amount_within_range()const { return -max_amount <= amount && amount <= max_amount; } - - /** - * Check if the asset is valid. %A valid asset has its amount <= max_amount and its symbol name valid - * - * @brief Check if the asset is valid - * @return true - if the asset is valid - * @return false - otherwise - */ - bool is_valid()const { return is_amount_within_range() && symbol.is_valid(); } - - /** - * Set the amount of the asset - * - * @brief Set the amount of the asset - * @param a - New amount for the asset - */ - void set_amount( int64_t a ) { - amount = a; - eosio_assert( is_amount_within_range(), "magnitude of asset amount must be less than 2^62" ); - } - - /** - * Unary minus operator - * - * @brief Unary minus operator - * @return asset - New asset with its amount is the negative amount of this asset - */ - asset operator-()const { - asset r = *this; - r.amount = -r.amount; - return r; - } - - /** - * Subtraction assignment operator - * - * @brief Subtraction assignment operator - * @param a - Another asset to subtract this asset with - * @return asset& - Reference to this asset - * @post The amount of this asset is subtracted by the amount of asset a - */ - asset& operator-=( const asset& a ) { - eosio_assert( a.symbol == symbol, "attempt to subtract asset with different symbol" ); - amount -= a.amount; - eosio_assert( -max_amount <= amount, "subtraction underflow" ); - eosio_assert( amount <= max_amount, "subtraction overflow" ); - return *this; - } - - /** - * Addition Assignment operator - * - * @brief Addition Assignment operator - * @param a - Another asset to subtract this asset with - * @return asset& - Reference to this asset - * @post The amount of this asset is added with the amount of asset a - */ - asset& operator+=( const asset& a ) { - eosio_assert( a.symbol == symbol, "attempt to add asset with different symbol" ); - amount += a.amount; - eosio_assert( -max_amount <= amount, "addition underflow" ); - eosio_assert( amount <= max_amount, "addition overflow" ); - return *this; - } - - /** - * Addition operator - * - * @brief Addition operator - * @param a - The first asset to be added - * @param b - The second asset to be added - * @return asset - New asset as the result of addition - */ - inline friend asset operator+( const asset& a, const asset& b ) { - asset result = a; - result += b; - return result; - } - - /** - * Subtraction operator - * - * @brief Subtraction operator - * @param a - The asset to be subtracted - * @param b - The asset used to subtract - * @return asset - New asset as the result of subtraction of a with b - */ - inline friend asset operator-( const asset& a, const asset& b ) { - asset result = a; - result -= b; - return result; - } - - /** - * Multiplication assignment operator. Multiply the amount of this asset with a number and then assign the value to itself. - * - * @brief Multiplication assignment operator, with a number - * @param a - The multiplier for the asset's amount - * @return asset - Reference to this asset - * @post The amount of this asset is multiplied by a - */ - asset& operator*=( int64_t a ) { - int128_t tmp = (int128_t)amount * (int128_t)a; - eosio_assert( tmp <= max_amount, "multiplication overflow" ); - eosio_assert( tmp >= -max_amount, "multiplication underflow" ); - amount = (int64_t)tmp; - return *this; - } - - /** - * Multiplication operator, with a number proceeding - * - * @brief Multiplication operator, with a number proceeding - * @param a - The asset to be multiplied - * @param b - The multiplier for the asset's amount - * @return asset - New asset as the result of multiplication - */ - friend asset operator*( const asset& a, int64_t b ) { - asset result = a; - result *= b; - return result; - } - - - /** - * Multiplication operator, with a number preceeding - * - * @brief Multiplication operator, with a number preceeding - * @param a - The multiplier for the asset's amount - * @param b - The asset to be multiplied - * @return asset - New asset as the result of multiplication - */ - friend asset operator*( int64_t b, const asset& a ) { - asset result = a; - result *= b; - return result; - } - - /** - * Division assignment operator. Divide the amount of this asset with a number and then assign the value to itself. - * - * @brief Division assignment operator, with a number - * @param a - The divisor for the asset's amount - * @return asset - Reference to this asset - * @post The amount of this asset is divided by a - */ - asset& operator/=( int64_t a ) { - eosio_assert( a != 0, "divide by zero" ); - eosio_assert( !(amount == std::numeric_limits::min() && a == -1), "signed division overflow" ); - amount /= a; - return *this; - } - - /** - * Division operator, with a number proceeding - * - * @brief Division operator, with a number proceeding - * @param a - The asset to be divided - * @param b - The divisor for the asset's amount - * @return asset - New asset as the result of division - */ - friend asset operator/( const asset& a, int64_t b ) { - asset result = a; - result /= b; - return result; - } - - /** - * Division operator, with another asset - * - * @brief Division operator, with another asset - * @param a - The asset which amount acts as the dividend - * @param b - The asset which amount acts as the divisor - * @return int64_t - the resulted amount after the division - * @pre Both asset must have the same symbol - */ - friend int64_t operator/( const asset& a, const asset& b ) { - eosio_assert( a.symbol == b.symbol, "comparison of assets with different symbols is not allowed" ); - return a.amount / b.amount; - } - - /** - * Equality operator - * - * @brief Equality operator - * @param a - The first asset to be compared - * @param b - The second asset to be compared - * @return true - if both asset has the same amount - * @return false - otherwise - * @pre Both asset must have the same symbol - */ - friend bool operator==( const asset& a, const asset& b ) { - eosio_assert( a.symbol == b.symbol, "comparison of assets with different symbols is not allowed" ); - return a.amount == b.amount; - } - - /** - * Inequality operator - * - * @brief Inequality operator - * @param a - The first asset to be compared - * @param b - The second asset to be compared - * @return true - if both asset doesn't have the same amount - * @return false - otherwise - * @pre Both asset must have the same symbol - */ - friend bool operator!=( const asset& a, const asset& b ) { - return !( a == b); - } - - /** - * Less than operator - * - * @brief Less than operator - * @param a - The first asset to be compared - * @param b - The second asset to be compared - * @return true - if the first asset's amount is less than the second asset amount - * @return false - otherwise - * @pre Both asset must have the same symbol - */ - friend bool operator<( const asset& a, const asset& b ) { - eosio_assert( a.symbol == b.symbol, "comparison of assets with different symbols is not allowed" ); - return a.amount < b.amount; - } - - /** - * Less or equal to operator - * - * @brief Less or equal to operator - * @param a - The first asset to be compared - * @param b - The second asset to be compared - * @return true - if the first asset's amount is less or equal to the second asset amount - * @return false - otherwise - * @pre Both asset must have the same symbol - */ - friend bool operator<=( const asset& a, const asset& b ) { - eosio_assert( a.symbol == b.symbol, "comparison of assets with different symbols is not allowed" ); - return a.amount <= b.amount; - } - - /** - * Greater than operator - * - * @brief Greater than operator - * @param a - The first asset to be compared - * @param b - The second asset to be compared - * @return true - if the first asset's amount is greater than the second asset amount - * @return false - otherwise - * @pre Both asset must have the same symbol - */ - friend bool operator>( const asset& a, const asset& b ) { - eosio_assert( a.symbol == b.symbol, "comparison of assets with different symbols is not allowed" ); - return a.amount > b.amount; - } - - /** - * Greater or equal to operator - * - * @brief Greater or equal to operator - * @param a - The first asset to be compared - * @param b - The second asset to be compared - * @return true - if the first asset's amount is greater or equal to the second asset amount - * @return false - otherwise - * @pre Both asset must have the same symbol - */ - friend bool operator>=( const asset& a, const asset& b ) { - eosio_assert( a.symbol == b.symbol, "comparison of assets with different symbols is not allowed" ); - return a.amount >= b.amount; - } - - /** - * %Print the asset - * - * @brief %Print the asset - */ - void print()const { - int64_t p = (int64_t)symbol.precision(); - int64_t p10 = 1; - while( p > 0 ) { - p10 *= 10; --p; - } - p = (int64_t)symbol.precision(); - - char fraction[p+1]; - fraction[p] = '\0'; - auto change = amount % p10; - - for( int64_t i = p -1; i >= 0; --i ) { - fraction[i] = (change % 10) + '0'; - change /= 10; - } - printi( amount / p10 ); - prints("."); - prints_l( fraction, uint32_t(p) ); - prints(" "); - symbol.print(false); - } - - EOSLIB_SERIALIZE( asset, (amount)(symbol) ) - }; - - /** - * \struct Extended asset which stores the information of the owner of the asset - * - * @brief Extended asset which stores the information of the owner of the asset - */ - struct extended_asset : public asset { - /** - * The owner of the asset - * - * @brief The owner of the asset - */ - account_name contract; - - /** - * Get the extended symbol of the asset - * - * @brief Get the extended symbol of the asset - * @return extended_symbol - The extended symbol of the asset - */ - extended_symbol get_extended_symbol()const { return extended_symbol( symbol, contract ); } - - /** - * Default constructor - * - * @brief Construct a new extended asset object - */ - extended_asset() = default; - - /** - * Construct a new extended asset given the amount and extended symbol - * - * @brief Construct a new extended asset object - */ - extended_asset( int64_t v, extended_symbol s ):asset(v,s),contract(s.contract){} - /** - * Construct a new extended asset given the asset and owner name - * - * @brief Construct a new extended asset object - */ - extended_asset( asset a, account_name c ):asset(a),contract(c){} - - /** - * %Print the extended asset - * - * @brief %Print the extended asset - */ - void print()const { - asset::print(); - prints("@"); - printn(contract); - } - - /** - * Unary minus operator - * - * @brief Unary minus operator - * @return extended_asset - New extended asset with its amount is the negative amount of this extended asset - */ - extended_asset operator-()const { - asset r = this->asset::operator-(); - return {r, contract}; - } - - /** - * Subtraction operator. This subtracts the amount of the extended asset. - * - * @brief Subtraction operator - * @param a - The extended asset to be subtracted - * @param b - The extended asset used to subtract - * @return extended_asset - New extended asset as the result of subtraction - * @pre The owner of both extended asset need to be the same - */ - friend extended_asset operator - ( const extended_asset& a, const extended_asset& b ) { - eosio_assert( a.contract == b.contract, "type mismatch" ); - asset r = static_cast(a) - static_cast(b); - return {r, a.contract}; - } - - /** - * Addition operator. This adds the amount of the extended asset. - * - * @brief Addition operator - * @param a - The extended asset to be added - * @param b - The extended asset to be added - * @return extended_asset - New extended asset as the result of addition - * @pre The owner of both extended asset need to be the same - */ - friend extended_asset operator + ( const extended_asset& a, const extended_asset& b ) { - eosio_assert( a.contract == b.contract, "type mismatch" ); - asset r = static_cast(a) + static_cast(b); - return {r, a.contract}; - } - - EOSLIB_SERIALIZE( extended_asset, (amount)(symbol)(contract) ) - }; - -/// @} asset type -} /// namespace eosio diff --git a/contracts/eosiolib/chain.h b/contracts/eosiolib/chain.h deleted file mode 100644 index 8477968be9e..00000000000 --- a/contracts/eosiolib/chain.h +++ /dev/null @@ -1,45 +0,0 @@ -/** - * @file - * @copyright defined in eos/LICENSE.txt - */ -#pragma once - -#include - -/** - * @defgroup chainapi Chain API - * @brief Defines API for querying internal chain state - * @ingroup contractdev - */ - -/** - * @defgroup chaincapi Chain C API - * @brief Defines %C API for querying internal chain state - * @ingroup chainapi - * @{ - */ - -extern "C" { - /** - * Gets the set of active producers. - * @brief Gets the set of active producers. - * - * @param producers - Pointer to a buffer of account names - * @param datalen - Byte length of buffer, when passed 0 will return the size required to store full output. - * - * @return uint32_t - Number of bytes actually populated - * @pre `producers` is a pointer to a range of memory at least `datalen` bytes long - * @post the passed in `producers` pointer gets the array of active producers. - * - * Example: - * - * @code - * account_name producers[21]; - * uint32_t bytes_populated = get_active_producers(producers, sizeof(account_name)*21); - * @endcode - */ - - uint32_t get_active_producers( account_name* producers, uint32_t datalen ); - - ///@ } chaincapi -} diff --git a/contracts/eosiolib/compiler_builtins.h b/contracts/eosiolib/compiler_builtins.h deleted file mode 100644 index 3e0d9435357..00000000000 --- a/contracts/eosiolib/compiler_builtins.h +++ /dev/null @@ -1,423 +0,0 @@ -/** - * @file - * @copyright defined in eos/LICENSE.txt - */ -#pragma once - -#include - -extern "C" { - /** - * @defgroup compilerbuiltinsapi Compiler Builtins API - * @ingroup mathapi - * @brief Declares int128 helper builtins generated by the toolchain. - * - * @{ - */ - - /** - * Multiply two 128 bit integers split as two 64 bit unsigned integers and assign the value to the first parameter. - * @brief Multiply two 128 unsigned bit integers (which are represented as two 64 bit unsigned integers. - * @param res It will be replaced with the result product. - * @param la Low 64 bits of the first 128 bit factor. - * @param ha High 64 bits of the first 128 bit factor. - * @param lb Low 64 bits of the second 128 bit factor. - * @param hb High 64 bits of the second 128 bit factor. - * @post `res` is replaced with the result of multiplication - * Example: - * @code - * __int128 res = 0; - * __int128 a = 100; - * __int128 b = 100; - * __multi3(res, a, (a >> 64), b, (b >> 64)); - * printi128(&res); // Output: 10000 - * @endcode - */ - void __multi3(__int128& res, uint64_t la, uint64_t ha, uint64_t lb, uint64_t hb); - - /** - * Divide two 128 bit integers split as two 64 bit unsigned integers and assign the value to the first parameter. - * @brief Divide two 128 bit integers (which are represented as two 64 bit unsigned integers) - * @param res It will be replaced with the result product. - * @param la Low 64 bits of the first 128 bit factor. - * @param ha High 64 bits of the first 128 bit factor. - * @param lb Low 64 bits of the second 128 bit factor. - * @param hb High 64 bits of the second 128 bit factor. - * @post `res` is replaced with the result of division - * Example: - * @code - * __int128 res = 0; - * __int128 a = 100; - * __int128 b = 100; - * __divti3(res, a, (a >> 64), b, (b >> 64)); - * printi128(&res); // Output: 1 - * @endcode - */ - void __divti3(__int128& res, uint64_t la, uint64_t ha, uint64_t lb, uint64_t hb); - - /** - * Divide two 128 bit unsigned integers split as two 64 bit unsigned integers and assign the value to the first parameter. - * @brief Divide two 128 unsigned bit integers (which are represented as two 64 bit unsigned integers) - * @param res It will be replaced with the result product. - * @param la Low 64 bits of the first 128 bit factor. - * @param ha High 64 bits of the first 128 bit factor. - * @param lb Low 64 bits of the second 128 bit factor. - * @param hb High 64 bits of the second 128 bit factor. - * Example: - * @code - * unsigned __int128 res = 0; - * unsigned __int128 a = 100; - * unsigned __int128 b = 100; - * __udivti3(res, a, (a >> 64), b, (b >> 64)); - * printi128(&res); // Output: 1 - * @endcode - */ - void __udivti3(unsigned __int128& res, uint64_t la, uint64_t ha, uint64_t lb, uint64_t hb); - - /** - * Perform modular arithmetic on two 128 bit integers split as two 64 bit unsigned integers and assign the value to the first parameter. - * @brief Perform modular arithmetic on two 128 bit integers (which are represented as two 64 bit unsigned integers) - * @param res It will be replaced with the result product. - * @param la Low 64 bits of the first 128 bit factor. - * @param ha High 64 bits of the first 128 bit factor. - * @param lb Low 64 bits of the second 128 bit factor. - * @param hb High 64 bits of the second 128 bit factor. - * @post `res` is replaced with the result of modulus - * Example: - * @code - * __int128 res = 0; - * __int128 a = 100; - * __int128 b = 3; - * __modti3(res, a, (a >> 64), b, (b >> 64)); - * printi128(&res); // Output: 1 - * @endcode - */ - void __modti3(__int128& res, uint64_t la, uint64_t ha, uint64_t lb, uint64_t hb); - - /** - * Perform modular arithmetic on two 128 unsigned bit integers split as two 64 bit unsigned integers and assign the value to the first parameter. - * @brief Perform modular arithmetic on two 128 unsigned bit integers (which are represented as two 64 bit unsigned integers) - * @param res It will be replaced with the result product. - * @param la Low 64 bits of the first 128 bit factor. - * @param ha High 64 bits of the first 128 bit factor. - * @param lb Low 64 bits of the second 128 bit factor. - * @param hb High 64 bits of the second 128 bit factor. - * @post `res` is replaced with the result of modulus - * Example: - * @code - * unsigned __int128 res = 0; - * unsigned __int128 a = 100; - * unsigned __int128 b = 3; - * __umodti3(res, a, (a >> 64), b, (b >> 64)); - * printi128(&res); // Output: 1 - * @endcode - */ - void __umodti3(unsigned __int128& res, uint64_t la, uint64_t ha, uint64_t lb, uint64_t hb); - -/** - * Perform logical shift left on a 128 bit integer split as two 64 bit unsigned integers and assign the value to the first parameter. - * @brief Perform logical shift left on a 128 bit integer (which is represented as two 64 bit unsigned integers) - * @param res It will be replaced with the result product. - * @param lo Low 64 bits of the 128 bit factor. - * @param hi High 64 bits of the 128 bit factor. - * @param shift Number of bits to shift. - * @post `res` is replaced with the result of the operation - * Example: - * @code - * __int128 res = 0; - * __int128 a = 8; - * __lshlti3(res, a, (a >> 64), 1); - * printi128(&res); // Output: 16 - * @endcode - */ - void __lshlti3(__int128& res, uint64_t lo, uint64_t hi, uint32_t shift); - - /** - * Perform logical shift right on a 128 bit integer split as two 64 bit unsigned integers and assign the value to the first parameter. - * @brief Perform logical shift right on a 128 bit integer (which is represented as two 64 bit unsigned integers) - * @param res It will be replaced with the result product. - * @param lo Low 64 bits of the 128 bit factor. - * @param hi High 64 bits of the 128 bit factor. - * @param shift Number of bits to shift. - * @post `res` is replaced with the result of the operation - * Example: - * @code - * __int128 res = 0; - * __int128 a = 8; - * __lshrti3(res, a, (a >> 64), 1); - * printi128(&res); // Output: 4 - * @endcode - */ - void __lshrti3(__int128& res, uint64_t lo, uint64_t hi, uint32_t shift); - -/** - * Perform arithmetic shift left on a 128 bit integer split as two 64 bit unsigned integers and assign the value to the first parameter. - * @brief Perform arithmetic shift left on a 128 bit integer (which is represented as two 64 bit unsigned integers) - * @param res It will be replaced with the result product. - * @param lo Low 64 bits of the 128 bit factor. - * @param hi High 64 bits of the 128 bit factor. - * @param shift Number of bits to shift. - * @post `res` is replaced with the result of the operation - * Example: - * @code - * __int128 res = 0; - * __int128 a = 8; - * __ashlti3(res, a, (a >> 64), 1); - * printi128(&res); // Output: 16 - * @endcode - */ - void __ashlti3(__int128& res, uint64_t lo, uint64_t hi, uint32_t shift); - - /** - * Perform arithmetic shift right on a 128 bit integer split as two 64 bit unsigned integers and assign the value to the first parameter. - * @brief Perform arithmetic shift right on a 128 bit integer (which is represented as two 64 bit unsigned integers) - * @param res It will be replaced with the result product. - * @param lo Low 64 bits of the 128 bit factor. - * @param hi High 64 bits of the 128 bit factor. - * @param shift Number of bits to shift. - * @post `res` is replaced with the result of the operation - * Example: - * @code - * __int128 res = 0; - * __int128 a = -8; - * __ashrti3(res, a, (a >> 64), 1); - * printi128(&res); // Output: -4 - * @endcode - */ - void __ashrti3(__int128& res, uint64_t lo, uint64_t hi, uint32_t shift); - - /** - * Add two long doubles split as two 64 bit unsigned integers and assign the value to the first parameter. - * @brief Add two long doubles (which are represented as two 64 bit unsigned integers) - * @param ret It will be replaced with the result product. - * @param la Low 64 bits of the first 128 bit factor. - * @param ha High 64 bits of the first 128 bit factor. - * @param lb Low 64 bits of the second 128 bit factor. - * @param hb High 64 bits of the second 128 bit factor. - * @post `ret` is replaced with the result of the operation - */ - void __addtf3( long double& ret, uint64_t la, uint64_t ha, uint64_t lb, uint64_t hb ); - - /** - * Subtract two long doubles split as two 64 bit unsigned integers and assign the value to the first parameter. - * @brief Subtract two long doubles (which are represented as two 64 bit unsigned integers) - * @param ret It will be replaced with the result product. - * @param la Low 64 bits of the first 128 bit factor. - * @param ha High 64 bits of the first 128 bit factor. - * @param lb Low 64 bits of the second 128 bit factor. - * @param hb High 64 bits of the second 128 bit factor. - * @post `ret` is replaced with the result of the operation - */ - void __subtf3( long double& ret, uint64_t la, uint64_t ha, uint64_t lb, uint64_t hb ); - - /** - * Multiply two long doubles split as two 64 bit unsigned integers and assign the value to the first parameter. - * @brief Multiply two long doubles (which are represented as two 64 bit unsigned integers) - * @param ret It will be replaced with the result product. - * @param la Low 64 bits of the first 128 bit factor. - * @param ha High 64 bits of the first 128 bit factor. - * @param lb Low 64 bits of the second 128 bit factor. - * @param hb High 64 bits of the second 128 bit factor. - * @post `ret` is replaced with the result of the operation - */ - void __multf3( long double& ret, uint64_t la, uint64_t ha, uint64_t lb, uint64_t hb ); - - /** - * Divide two long doubles split as two 64 bit unsigned integers and assign the value to the first parameter. - * @brief Divide two long doubles (which are represented as two 64 bit unsigned integers) - * @param ret It will be replaced with the result product. - * @param la Low 64 bits of the first 128 bit factor. - * @param ha High 64 bits of the first 128 bit factor. - * @param lb Low 64 bits of the second 128 bit factor. - * @param hb High 64 bits of the second 128 bit factor. - * @post `ret` is replaced with the result of the operation - */ - void __divtf3( long double& ret, uint64_t la, uint64_t ha, uint64_t lb, uint64_t hb ); - - /** - * Check equality between two doubles split as two 64 bit unsigned integers - * @brief Check equality between two doubles (which are represented as two 64 bit unsigned integers) - * @param la Low 64 bits of the first 128 bit factor. - * @param ha High 64 bits of the first 128 bit factor. - * @param lb Low 64 bits of the second 128 bit factor. - * @param hb High 64 bits of the second 128 bit factor. - * @return 1 if a greater than b - * @return 0 if a equal to b - * @return -1 if a less than b - * @return 1 if either a or b is NaN - */ - int __eqtf2( uint64_t la, uint64_t ha, uint64_t lb, uint64_t hb ); - - /** - * Check inequality between two doubles split as two 64 bit unsigned integers - * @brief Check inequality between two doubles (which are represented as two 64 bit unsigned integers) - * @param la Low 64 bits of the first 128 bit factor. - * @param ha High 64 bits of the first 128 bit factor. - * @param lb Low 64 bits of the second 128 bit factor. - * @param hb High 64 bits of the second 128 bit factor. - * @return 1 if a greater than b - * @return 0 if a equal to b - * @return -1 if a less than b - * @return1 if either a or b is NaN - */ - int __netf2( uint64_t la, uint64_t ha, uint64_t lb, uint64_t hb ); - - - /** - * Check if the first double is greater or equal to the second double, the doubles are split as two 64 bit unsigned integers - * @brief Check if the first double is greater or equal to the second double, (the doubles are represented as two 64 bit unsigned integers) - * @param la Low 64 bits of the first 128 bit factor. - * @param ha High 64 bits of the first 128 bit factor. - * @param lb Low 64 bits of the second 128 bit factor. - * @param hb High 64 bits of the second 128 bit factor. - * @return 1 if a greater than b - * @return 0 if a equal to b - * @return -1 if a less than b - * @return -1 if either a or b is NaN - */ - int __getf2( uint64_t la, uint64_t ha, uint64_t lb, uint64_t hb ); - - /** - * Check if the first double is greater than the second double, the doubles are split as two 64 bit unsigned integers - * @brief Check if the first double is greater than the second double, (the doubles are represented as two 64 bit unsigned integers) - * @param la Low 64 bits of the first 128 bit factor. - * @param ha High 64 bits of the first 128 bit factor. - * @param lb Low 64 bits of the second 128 bit factor. - * @param hb High 64 bits of the second 128 bit factor. - * @return 1 if a greater than b - * @return 0 if a equal to b - * @return -1 if a less than b - * @return 0 if either a or b is NaN - */ - int __gttf2( uint64_t la, uint64_t ha, uint64_t lb, uint64_t hb ); - - /** - * Check if the first double is less or equal to the second double, the doubles are split as two 64 bit unsigned integers - * @brief Check if the first double is less or equal to the second double, (the doubles are represented as two 64 bit unsigned integers) - * @param la Low 64 bits of the first 128 bit factor. - * @param ha High 64 bits of the first 128 bit factor. - * @param lb Low 64 bits of the second 128 bit factor. - * @param hb High 64 bits of the second 128 bit factor. - * @return 1 if a greater than b - * @return 0 if a equal to b - * @return -1 if a less than b - * @return 1 if either a or b is NaN - */ - int __letf2( uint64_t la, uint64_t ha, uint64_t lb, uint64_t hb ); - - /** - * Check if the first double is less than the second double, the doubles are split as two 64 bit unsigned integers - * @brief Check if the first double is less than the second double, (the doubles are represented as two 64 bit unsigned integers) - * @param la Low 64 bits of the first 128 bit factor. - * @param ha High 64 bits of the first 128 bit factor. - * @param lb Low 64 bits of the second 128 bit factor. - * @param hb High 64 bits of the second 128 bit factor. - * @return 1 if a greater than b - * @return 0 if a equal to b - * @return -1 if a less than b - * @return 0 if either a or b is NaN - */ - int __lttf2( uint64_t la, uint64_t ha, uint64_t lb, uint64_t hb ); - - /** - * Compare two doubles which are split as two 64 bit unsigned integers - * @brief Compare two doubles (the doubles are represented as two 64 bit unsigned integers) - * @param la Low 64 bits of the first 128 bit factor. - * @param ha High 64 bits of the first 128 bit factor. - * @param lb Low 64 bits of the second 128 bit factor. - * @param hb High 64 bits of the second 128 bit factor. - * @return 1 if a greater than b - * @return 0 if a equal to b - * @return -1 if a less than b - * @return 1 if either a or b is NaN - */ - int __cmptf2( uint64_t la, uint64_t ha, uint64_t lb, uint64_t hb ); - - /** - * Check if either of the doubles is NaN, the doubles are split as two 64 bit unsigned integers - * @brief Check if either of the doubles is NaN, (the doubles are represented as two 64 bit unsigned integers) - * @param la Low 64 bits of the first 128 bit factor. - * @param ha High 64 bits of the first 128 bit factor. - * @param lb Low 64 bits of the second 128 bit factor. - * @param hb High 64 bits of the second 128 bit factor. - * @return 1 if either a or b is NaN - * @return 0 if either a or b is not NaN - */ - int __unordtf2( uint64_t la, uint64_t ha, uint64_t lb, uint64_t hb ); - - /** - * Extend float to long double - * @brief Extend float to long double - * @param ret It will be replaced with the result product. - * @param f Input float to be extended - * @post `ret` is replaced with the extended float - */ - void __extendsftf2( long double& ret, float f ); - - /** - * Extend double to long double - * @brief Extend float to long double - * @param ret It will be replaced with the result product. - * @param f Input float to be extended - * @post `ret` is replaced with the extended float - */ - void __extenddftf2( long double& ret, double f ); - - /** - * Convert long double (which are split as two 64 bit unsigned integers) into 64 bit integer - * @brief Convert long double (which are split as two 64 bit unsigned integers) into 64 bit integer - * @param l Low 64 bits of the first 128 bit factor. - * @param h High 64 bits of the first 128 bit factor. - * @return the converted 64 bit integer. - */ - int64_t __fixtfdi( uint64_t l, uint64_t h ); - - /** - * Convert long double (which are split as two 64 bit unsigned integers) into 32 bit integer - * @brief Convert long double (which are split as two 64 bit unsigned integers) into 32 bit integer - * @param l Low 64 bits of the first 128 bit factor. - * @param h High 64 bits of the first 128 bit factor. - * @return the converted 32 bit integer. - */ - int32_t __fixtfsi( uint64_t l, uint64_t h ); - - /** - * Convert long double (which are split as two 64 bit unsigned integers) into 64 bit unsigned integer - * @brief Convert long double (which are split as two 64 bit unsigned integers) into 64 bit unsigned integer - * @param l Low 64 bits of the first 128 bit factor. - * @param h High 64 bits of the first 128 bit factor. - * @return the converted 64 bit unsigned integer. - */ - uint64_t __fixunstfdi( uint64_t l, uint64_t h ); - - /** - * Convert long double (which are split as two 64 bit unsigned integers) into 32 bit unsigned integer - * @brief Convert long double (which are split as two 64 bit unsigned integers) into 32 bit unsigned integer - * @param l Low 64 bits of the first 128 bit factor. - * @param h High 64 bits of the first 128 bit factor. - * @return the converted 32 bit unsigned integer. - */ - uint32_t __fixunstfsi( uint64_t l, uint64_t h ); - - /** - * Truncate long double (which are split as two 64 bit unsigned integers) into double - * @brief Convert long double (which are split as two 64 bit unsigned integers) into double - * @param l Low 64 bits of the first 128 bit factor. - * @param h High 64 bits of the first 128 bit factor. - * @return the converted double - */ - double __trunctfdf2( uint64_t l, uint64_t h ); - - /** - * Truncate long double (which are split as two 64 bit unsigned integers) into float - * @brief Convert long double (which are split as two 64 bit unsigned integers) into float - * @param l Low 64 bits of the first 128 bit factor. - * @param h High 64 bits of the first 128 bit factor. - * @return the converted float - */ - float __trunctfsf2( uint64_t l, uint64_t h ); - - void __break_point(); - -/// @} -} // extern "C" diff --git a/contracts/eosiolib/contract.hpp b/contracts/eosiolib/contract.hpp deleted file mode 100644 index 307731bd726..00000000000 --- a/contracts/eosiolib/contract.hpp +++ /dev/null @@ -1,47 +0,0 @@ -#pragma once - -namespace eosio { - -/** - * @defgroup contracttype Contract Type - * @ingroup types - * @brief Defines contract type which is %base class for every EOSIO contract - * - * @{ - * - */ - -/** - * @brief %Base class for EOSIO contract. - * @details %Base class for EOSIO contract. %A new contract should derive from this class, so it can make use of EOSIO_ABI macro. - */ -class contract { - public: - /** - * Construct a new contract given the contract name - * - * @brief Construct a new contract object. - * @param n - The name of this contract - */ - contract( account_name n ):_self(n){} - - /** - * - * Get this contract name - * - * @brief Get this contract name. - * @return account_name - The name of this contract - */ - inline account_name get_self()const { return _self; } - - protected: - /** - * The name of this contract - * - * @brief The name of this contract. - */ - account_name _self; -}; - -/// @} contracttype -} /// namespace eosio diff --git a/contracts/eosiolib/contracts.dox b/contracts/eosiolib/contracts.dox deleted file mode 100644 index 3bc851b6c56..00000000000 --- a/contracts/eosiolib/contracts.dox +++ /dev/null @@ -1,65 +0,0 @@ -/** - @defgroup contractdev Smart Contract API Reference - @brief Introduction to writing contracts for EOS.IO - - @section background Background - - EOS.IO contracts (aka applications) are deployed to a blockchain as pre-compiled Web Assembly (aka WASM). WASM is compiled - from C/C++ using LLVM and clang, which means that you will require knowledge of C/C++ in order to develop your blockchain - applications. While it is possible to develop in C, we strongly recommend that all developers use the EOS.IO C++ API which - provides much stronger type safety and is generally easier to read. - - @section programstructure Application Structure - - EOS.IO applications are designed around event (aka action) handlers that respond to user actions. For example, - a user might transfer tokens to another user. This event can be processed and potentially rejected by the sender, - the receiver, and the currency application itself. - - As an application developer you get to decide what actions users can take and which handlers may or must be called - in response to those events. - - - @subsection programentry Entry Points - - EOS.IO applications have a `apply` which is like `main` in traditional applications: - - ``` - extern "C" { - void init(); - void apply( uint64_t code, uint64_t action ); - } - ``` - - `apply` is given the arguments `code` and `action` which uniquely identify every event in - the system. For example, `code` could be a *currency* contract and `action` could be *transfer*. This event (code,action) - may be passed to several contracts including the `sender` and `receiver`. It is up to your application to figure - out what to do in response to such an event. - - `init` is another entry point that is called once immediately after loading the code. It is where you should perform - one-time initialization of state. - - -### Example Apply Entry Handler - - Generally speaking, you should use your entry handler to dispatch events to functions that implement the majority - of your logic and optionally reject events that your contract is unable or unwilling to accept. - - ``` - extern "C" { - void apply( uint64_t code, uint64_t action ) { - if( code == N(currency) ) { - if( action == N(transfer) ) - currency::apply_currency_transfer( current_action< currency::transfer >() ); - } else { - eosio_assert( false, "rejecting unexpected event" ); - } - } - } - ``` - - @note When defining your entry points it is required that they are placed in an `extern "C"` code block so that - c++ name mangling does not get applied to the function. - - - -*/ diff --git a/contracts/eosiolib/core_symbol.hpp.in b/contracts/eosiolib/core_symbol.hpp.in deleted file mode 100644 index 4a60220b6a9..00000000000 --- a/contracts/eosiolib/core_symbol.hpp.in +++ /dev/null @@ -1,7 +0,0 @@ -/** @file - * @copyright defined in eos/LICENSE.txt - * - * \warning This file is machine generated. DO NOT EDIT. See core_symbol.hpp.in for changes. - */ - -#define CORE_SYMBOL S(4,${CORE_SYMBOL_NAME}) \ No newline at end of file diff --git a/contracts/eosiolib/crypto.h b/contracts/eosiolib/crypto.h deleted file mode 100644 index 916c25954f7..00000000000 --- a/contracts/eosiolib/crypto.h +++ /dev/null @@ -1,240 +0,0 @@ -/** - * @file - * @copyright defined in eos/LICENSE.txt - */ -#pragma once -#include -extern "C" { - -/** - * @defgroup cryptoapi Chain API - * @brief Defines API for calculating and checking hash - * @ingroup contractdev - */ - -/** - * @defgroup cryptocapi Chain C API - * @brief Defines %C API for calculating and checking hash - * @ingroup chainapi - * @{ - */ - -/** - * Tests if the sha256 hash generated from data matches the provided checksum. - * This method is optimized to a NO-OP when in fast evaluation mode. - * @brief Tests if the sha256 hash generated from data matches the provided checksum. - * - * @param data - Data you want to hash - * @param length - Data length - * @param hash - `checksum256*` hash to compare to - * - * @pre **assert256 hash** of `data` equals provided `hash` parameter. - * @post Executes next statement. If was not `true`, hard return. - * - * Example: -* - * @code - * checksum hash; - * char data; - * uint32_t length; - * assert_sha256( data, length, hash ) - * //If the sha256 hash generated from data does not equal provided hash, anything below will never fire. - * eosio::print("sha256 hash generated from data equals provided hash"); - * @endcode - */ -void assert_sha256( const char* data, uint32_t length, const checksum256* hash ); - -/** - * Tests if the sha1 hash generated from data matches the provided checksum. - * This method is optimized to a NO-OP when in fast evaluation mode. - * @brief Tests if the sha1 hash generated from data matches the provided checksum. - * - * @param data - Data you want to hash - * @param length - Data length - * @param hash - `checksum160*` hash to compare to - * - * @pre **sha1 hash** of `data` equals provided `hash` parameter. - * @post Executes next statement. If was not `true`, hard return. - * - * Example: -* - * @code - * checksum hash; - * char data; - * uint32_t length; - * assert_sha1( data, length, hash ) - * //If the sha1 hash generated from data does not equal provided hash, anything below will never fire. - * eosio::print("sha1 hash generated from data equals provided hash"); - * @endcode - */ -void assert_sha1( const char* data, uint32_t length, const checksum160* hash ); - -/** - * Tests if the sha512 hash generated from data matches the provided checksum. - * This method is optimized to a NO-OP when in fast evaluation mode. - * @brief Tests if the sha512 hash generated from data matches the provided checksum. - * - * @param data - Data you want to hash - * @param length - Data length - * @param hash - `checksum512*` hash to compare to - * - * @pre **assert512 hash** of `data` equals provided `hash` parameter. - * @post Executes next statement. If was not `true`, hard return. - * - * Example: -* - * @code - * checksum hash; - * char data; - * uint32_t length; - * assert_sha512( data, length, hash ) - * //If the sha512 hash generated from data does not equal provided hash, anything below will never fire. - * eosio::print("sha512 hash generated from data equals provided hash"); - * @endcode - */ -void assert_sha512( const char* data, uint32_t length, const checksum512* hash ); - -/** - * Tests if the ripemod160 hash generated from data matches the provided checksum. - * @brief Tests if the ripemod160 hash generated from data matches the provided checksum. - * - * @param data - Data you want to hash - * @param length - Data length - * @param hash - `checksum160*` hash to compare to - * - * @pre **assert160 hash** of `data` equals provided `hash` parameter. - * @post Executes next statement. If was not `true`, hard return. - * - * Example: -* - * @code - * checksum hash; - * char data; - * uint32_t length; - * assert_ripemod160( data, length, hash ) - * //If the ripemod160 hash generated from data does not equal provided hash, anything below will never fire. - * eosio::print("ripemod160 hash generated from data equals provided hash"); - * @endcode - */ -void assert_ripemd160( const char* data, uint32_t length, const checksum160* hash ); - -/** - * Hashes `data` using `sha256` and stores result in memory pointed to by hash. - * @brief Hashes `data` using `sha256` and stores result in memory pointed to by hash. - * - * @param data - Data you want to hash - * @param length - Data length - * @param hash - Hash pointer - * - * Example: -* - * @code - * checksum calc_hash; - * sha256( data, length, &calc_hash ); - * eos_assert( calc_hash == hash, "invalid hash" ); - * @endcode - */ -void sha256( const char* data, uint32_t length, checksum256* hash ); - -/** - * Hashes `data` using `sha1` and stores result in memory pointed to by hash. - * @brief Hashes `data` using `sha1` and stores result in memory pointed to by hash. - * - * @param data - Data you want to hash - * @param length - Data length - * @param hash - Hash pointer - * - * Example: -* - * @code - * checksum calc_hash; - * sha1( data, length, &calc_hash ); - * eos_assert( calc_hash == hash, "invalid hash" ); - * @endcode - */ -void sha1( const char* data, uint32_t length, checksum160* hash ); - -/** - * Hashes `data` using `sha512` and stores result in memory pointed to by hash. - * @brief Hashes `data` using `sha512` and stores result in memory pointed to by hash. - * - * @param data - Data you want to hash - * @param length - Data length - * @param hash - Hash pointer - * - * Example: -* - * @code - * checksum calc_hash; - * sha512( data, length, &calc_hash ); - * eos_assert( calc_hash == hash, "invalid hash" ); - * @endcode - */ -void sha512( const char* data, uint32_t length, checksum512* hash ); - -/** - * Hashes `data` using `ripemod160` and stores result in memory pointed to by hash. - * @brief Hashes `data` using `ripemod160` and stores result in memory pointed to by hash. - * - * @param data - Data you want to hash - * @param length - Data length - * @param hash - Hash pointer - * - * Example: -* - * @code - * checksum calc_hash; - * ripemod160( data, length, &calc_hash ); - * eos_assert( calc_hash == hash, "invalid hash" ); - * @endcode - */ -void ripemd160( const char* data, uint32_t length, checksum160* hash ); - -/** - * Calculates the public key used for a given signature and hash used to create a message. - * @brief Calculates the public key used for a given signature and hash used to create a message. - * - * @param digest - Hash used to create a message - * @param sig - Signature - * @param siglen - Signature length - * @param pub - Public key - * @param publen - Public key length - * - * Example: -* - * @code - * @endcode - */ -int recover_key( const checksum256* digest, const char* sig, size_t siglen, char* pub, size_t publen ); - -/** - * Tests a given public key with the generated key from digest and the signature. - * @brief Tests a given public key with the generated key from digest and the signature. - * - * @param digest - What the key will be generated from - * @param sig - Signature - * @param siglen - Signature length - * @param pub - Public key - * @param publen - Public key length - * - * @pre **assert recovery key** of `pub` equals the key generated from the `digest` parameter - * @post Executes next statement. If was not `true`, hard return. - * - * Example: -* - * @code - * checksum digest; - * char sig; - * size_t siglen; - * char pub; - * size_t publen; - * assert_recover_key( digest, sig, siglen, pub, publen ) - * // If the given public key does not match with the generated key from digest and the signature, anything below will never fire. - * eosio::print("pub key matches the pub key generated from digest"); - * @endcode - */ -void assert_recover_key( const checksum256* digest, const char* sig, size_t siglen, const char* pub, size_t publen ); - -/// }@cryptocapi - -} diff --git a/contracts/eosiolib/currency.hpp b/contracts/eosiolib/currency.hpp deleted file mode 100644 index 1328c493876..00000000000 --- a/contracts/eosiolib/currency.hpp +++ /dev/null @@ -1,254 +0,0 @@ -#pragma once -#include -#include -#include - -namespace eosio { - using std::string; - using std::array; - - /** - * This contract enables the creation, issuance, and transfering of many different tokens. - * @deprecated This class is deprecated in favor of eosio.token in Dawn 3.0 - */ - class currency { - public: - currency( account_name contract ) - :_contract(contract) - { } - - struct create { - account_name issuer; - asset maximum_supply; - // array issuer_agreement_hash; - uint8_t issuer_can_freeze = true; - uint8_t issuer_can_recall = true; - uint8_t issuer_can_whitelist = true; - - /*(issuer_agreement_hash)*/ - EOSLIB_SERIALIZE( create, (issuer)(maximum_supply)(issuer_can_freeze)(issuer_can_recall)(issuer_can_whitelist) ) - }; - - struct transfer - { - account_name from; - account_name to; - asset quantity; - string memo; - - EOSLIB_SERIALIZE( transfer, (from)(to)(quantity)(memo) ) - }; - - struct issue { - account_name to; - asset quantity; - string memo; - - EOSLIB_SERIALIZE( issue, (to)(quantity)(memo) ) - }; - - struct fee_schedule { - uint64_t primary_key()const { return 0; } - - array fee_per_length; - EOSLIB_SERIALIZE( fee_schedule, (fee_per_length) ) - }; - - struct account { - asset balance; - bool frozen = false; - bool whitelist = true; - - uint64_t primary_key()const { return balance.symbol.name(); } - - EOSLIB_SERIALIZE( account, (balance)(frozen)(whitelist) ) - }; - - struct currency_stats { - asset supply; - asset max_supply; - account_name issuer; - bool can_freeze = true; - bool can_recall = true; - bool can_whitelist = true; - bool is_frozen = false; - bool enforce_whitelist = false; - - uint64_t primary_key()const { return supply.symbol.name(); } - - EOSLIB_SERIALIZE( currency_stats, (supply)(max_supply)(issuer)(can_freeze)(can_recall)(can_whitelist)(is_frozen)(enforce_whitelist) ) - }; - - typedef eosio::multi_index accounts; - typedef eosio::multi_index stats; - - - asset get_balance( account_name owner, symbol_name symbol )const { - accounts t( _contract, owner ); - return t.get(symbol).balance; - } - - asset get_supply( symbol_name symbol )const { - accounts t( _contract, symbol ); - return t.get(symbol).balance; - } - - static void inline_transfer( account_name from, account_name to, extended_asset amount, string memo = string(), permission_name perm = N(active) ) { - action act( permission_level( from, perm ), amount.contract, N(transfer), transfer{from,to,amount,memo} ); - act.send(); - } - - void inline_transfer( account_name from, account_name to, asset amount, string memo = string(), permission_name perm = N(active) ) { - action act( permission_level( from, perm ), _contract, N(transfer), transfer{from,to,amount,memo} ); - act.send(); - } - - - bool apply( account_name contract, action_name act ) { - if( contract != _contract ) - return false; - - switch( act ) { - case N(issue): - print( "issue\n"); - on( unpack_action_data() ); - return true; - case N(transfer): - print( "transfer\n"); - on( unpack_action_data() ); - return true; - case N(create): - print( "create\n"); - on( unpack_action_data() ); - return true; - } - return false; - } - - /** - * This is factored out so it can be used as a building block - */ - void create_currency( const create& c ) { - auto sym = c.maximum_supply.symbol; - eosio_assert( sym.is_valid(), "invalid symbol name" ); - - stats statstable( _contract, sym.name() ); - auto existing = statstable.find( sym.name() ); - eosio_assert( existing == statstable.end(), "token with symbol already exists" ); - - statstable.emplace( c.issuer, [&]( auto& s ) { - s.supply.symbol = c.maximum_supply.symbol; - s.max_supply = c.maximum_supply; - s.issuer = c.issuer; - s.can_freeze = c.issuer_can_freeze; - s.can_recall = c.issuer_can_recall; - s.can_whitelist = c.issuer_can_whitelist; - }); - } - - void issue_currency( const issue& i ) { - auto sym = i.quantity.symbol.name(); - stats statstable( _contract, sym ); - const auto& st = statstable.get( sym ); - - statstable.modify( st, 0, [&]( auto& s ) { - s.supply.amount += i.quantity.amount; - eosio_assert( s.supply.amount >= 0, "underflow" ); - }); - - add_balance( st.issuer, i.quantity, st, st.issuer ); - } - - - void on( const create& c ) { - require_auth( c.issuer ); - create_currency( c ); - - /* - auto fee = get_fee_schedule()[c.maximum_supply.name_length()]; - if( fee.amount > 0 ) { - inline_transfer( c.issuer, _contract, fee, "symbol registration fee" ); - } - */ - } - - void on( const issue& i ) { - auto sym = i.quantity.symbol.name(); - stats statstable( _contract, sym ); - const auto& st = statstable.get( sym ); - - require_auth( st.issuer ); - eosio_assert( i.quantity.is_valid(), "invalid quantity" ); - eosio_assert( i.quantity.amount > 0, "must issue positive quantity" ); - - statstable.modify( st, 0, [&]( auto& s ) { - s.supply.amount += i.quantity.amount; - }); - - add_balance( st.issuer, i.quantity, st, st.issuer ); - - if( i.to != st.issuer ) - { - inline_transfer( st.issuer, i.to, i.quantity, i.memo ); - } - } - - void on( const transfer& t ) { - require_auth(t.from); - auto sym = t.quantity.symbol.name(); - stats statstable( _contract, sym ); - const auto& st = statstable.get( sym ); - - require_recipient( t.to ); - - eosio_assert( t.quantity.is_valid(), "invalid quantity" ); - eosio_assert( t.quantity.amount > 0, "must transfer positive quantity" ); - sub_balance( t.from, t.quantity, st ); - add_balance( t.to, t.quantity, st, t.from ); - } - - - private: - void sub_balance( account_name owner, asset value, const currency_stats& st ) { - accounts from_acnts( _contract, owner ); - - const auto& from = from_acnts.get( value.symbol.name() ); - eosio_assert( from.balance.amount >= value.amount, "overdrawn balance" ); - - if( has_auth( owner ) ) { - eosio_assert( !st.can_freeze || !from.frozen, "account is frozen by issuer" ); - eosio_assert( !st.can_freeze || !st.is_frozen, "all transfers are frozen by issuer" ); - eosio_assert( !st.enforce_whitelist || from.whitelist, "account is not white listed" ); - } else if( has_auth( st.issuer ) ) { - eosio_assert( st.can_recall, "issuer may not recall token" ); - } else { - eosio_assert( false, "insufficient authority" ); - } - - from_acnts.modify( from, owner, [&]( auto& a ) { - a.balance.amount -= value.amount; - }); - } - - void add_balance( account_name owner, asset value, const currency_stats& st, account_name ram_payer ) - { - accounts to_acnts( _contract, owner ); - auto to = to_acnts.find( value.symbol.name() ); - if( to == to_acnts.end() ) { - eosio_assert( !st.enforce_whitelist, "can only transfer to white listed accounts" ); - to_acnts.emplace( ram_payer, [&]( auto& a ){ - a.balance = value; - }); - } else { - eosio_assert( !st.enforce_whitelist || to->whitelist, "receiver requires whitelist by issuer" ); - to_acnts.modify( to, 0, [&]( auto& a ) { - a.balance.amount += value.amount; - }); - } - } - - private: - account_name _contract; - }; - -} diff --git a/contracts/eosiolib/datastream.hpp b/contracts/eosiolib/datastream.hpp deleted file mode 100644 index 65666e78cc4..00000000000 --- a/contracts/eosiolib/datastream.hpp +++ /dev/null @@ -1,1019 +0,0 @@ -/** - * @file datastream.hpp - * @copyright defined in eos/LICENSE.txt - */ -#pragma once -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include - -#include - - -namespace eosio { - -/** - * @defgroup datastream Data Stream - * @brief Defines data stream for reading and writing data in the form of bytes - * @ingroup serialize - * @{ - */ - -/** - * %A data stream for reading and writing data in the form of bytes - * - * @brief %A data stream for reading and writing data in the form of bytes. - * @tparam T - Type of the datastream buffer - */ -template -class datastream { - public: - /** - * Construct a new datastream object given the size of the buffer and start position of the buffer - * - * @brief Construct a new datastream object - * @param start - The start position of the buffer - * @param s - The size of the buffer - */ - datastream( T start, size_t s ) - :_start(start),_pos(start),_end(start+s){} - - /** - * Skips a specified number of bytes from this stream - * - * @brief Skips a specific number of bytes from this stream - * @param s - The number of bytes to skip - */ - inline void skip( size_t s ){ _pos += s; } - - /** - * Reads a specified number of bytes from the stream into a buffer - * - * @brief Reads a specified number of bytes from this stream into a buffer - * @param d - The pointer to the destination buffer - * @param s - the number of bytes to read - * @return true - */ - inline bool read( char* d, size_t s ) { - eosio_assert( size_t(_end - _pos) >= (size_t)s, "read" ); - memcpy( d, _pos, s ); - _pos += s; - return true; - } - - /** - * Writes a specified number of bytes into the stream from a buffer - * - * @brief Writes a specified number of bytes into the stream from a buffer - * @param d - The pointer to the source buffer - * @param s - The number of bytes to write - * @return true - */ - inline bool write( const char* d, size_t s ) { - eosio_assert( _end - _pos >= (int32_t)s, "write" ); - memcpy( (void*)_pos, d, s ); - _pos += s; - return true; - } - - /** - * Writes a byte into the stream - * - * @brief Writes a byte into the stream - * @param c byte to write - * @return true - */ - inline bool put(char c) { - eosio_assert( _pos < _end, "put" ); - *_pos = c; - ++_pos; - return true; - } - - /** - * Reads a byte from the stream - * - * @brief Reads a byte from the stream - * @param c - The reference to destination byte - * @return true - */ - inline bool get( unsigned char& c ) { return get( *(char*)&c ); } - - /** - * Reads a byte from the stream - * - * @brief Reads a byte from the stream - * @param c - The reference to destination byte - * @return true - */ - inline bool get( char& c ) - { - eosio_assert( _pos < _end, "get" ); - c = *_pos; - ++_pos; - return true; - } - - /** - * Retrieves the current position of the stream - * - * @brief Retrieves the current position of the stream - * @return T - The current position of the stream - */ - T pos()const { return _pos; } - inline bool valid()const { return _pos <= _end && _pos >= _start; } - - /** - * Sets the position within the current stream - * - * @brief Sets the position within the current stream - * @param p - The offset relative to the origin - * @return true if p is within the range - * @return false if p is not within the rawnge - */ - inline bool seekp(size_t p) { _pos = _start + p; return _pos <= _end; } - - /** - * Gets the position within the current stream - * - * @brief Gets the position within the current stream - * @return p - The position within the current stream - */ - inline size_t tellp()const { return size_t(_pos - _start); } - - /** - * Returns the number of remaining bytes that can be read/skipped - * - * @brief Returns the number of remaining bytes that can be read/skipped - * @return size_t - The number of remaining bytes - */ - inline size_t remaining()const { return _end - _pos; } - private: - /** - * The start position of the buffer - * - * @brief The start position of the buffer - */ - T _start; - /** - * The current position of the buffer - * - * @brief The current position of the buffer - */ - T _pos; - /** - * The end position of the buffer - * - * @brief The end position of the buffer - */ - T _end; -}; - -/** - * @brief Specialization of datastream used to help determine the final size of a serialized value. - * Specialization of datastream used to help determine the final size of a serialized value - */ -template<> -class datastream { - public: - /** - * Construct a new specialized datastream object given the initial size - * - * @brief Construct a new specialized datastream object - * @param init_size - The initial size - */ - datastream( size_t init_size = 0):_size(init_size){} - - /** - * Increment the size by s. This behaves the same as write( const char* ,size_t s ). - * - * @brief Increase the size by s - * @param s - The amount of size to increase - * @return true - */ - inline bool skip( size_t s ) { _size += s; return true; } - - /** - * Increment the size by s. This behaves the same as skip( size_t s ) - * - * @brief Increase the size by s - * @param s - The amount of size to increase - * @return true - */ - inline bool write( const char* ,size_t s ) { _size += s; return true; } - - /** - * Increment the size by one - * - * @brief Increase the size by one - * @return true - */ - inline bool put(char ) { ++_size; return true; } - - /** - * Check validity. It's always valid - * - * @brief Check validity - * @return true - */ - inline bool valid()const { return true; } - - /** - * Set new size - * - * @brief Set new size - * @param p - The new size - * @return true - */ - inline bool seekp(size_t p) { _size = p; return true; } - - /** - * Get the size - * - * @brief Get the size - * @return size_t - The size - */ - inline size_t tellp()const { return _size; } - - /** - * Always returns 0 - * - * @brief Always returns 0 - * @return size_t - 0 - */ - inline size_t remaining()const { return 0; } - private: - /** - * The size used to determine the final size of a serialized value. - * - * @brief The size used to determine the final size of a serialized value. - */ - size_t _size; -}; - -/** - * Serialize a public_key into a stream - * - * @brief Serialize a public_key - * @param ds - The stream to write - * @param pubkey - The value to serialize - * @tparam Stream - Type of datastream buffer - * @return datastream& - Reference to the datastream - */ -template -inline datastream& operator<<(datastream& ds, const public_key pubkey) { - ds.write( (const char*)&pubkey, sizeof(pubkey)); - return ds; -} - -/** - * Deserialize a public_key from a stream - * - * @brief Deserialize a public_key - * @param ds - The stream to read - * @param pubkey - The destination for deserialized value - * @tparam Stream - Type of datastream buffer - * @return datastream& - Reference to the datastream - */ -template -inline datastream& operator>>(datastream& ds, public_key& pubkey) { - ds.read((char*)&pubkey, sizeof(pubkey)); - return ds; -} - -/** - * Serialize a key256 into a stream - * - * @brief Serialize a key256 - * @param ds - The stream to write - * @param d - The value to serialize - * @tparam Stream - Type of datastream buffer - * @return datastream& - Reference to the datastream - */ -template -inline datastream& operator<<(datastream& ds, const key256& d) { - ds.write( (const char*)d.data(), d.size() ); - return ds; -} - -/** - * Deserialize a key256 from a stream - * - * @brief Deserialize a key256 - * @param ds - The stream to read - * @param d - The destination for deserialized value - * @tparam Stream - Type of datastream buffer - * @return datastream& - Reference to the datastream - */ -template -inline datastream& operator>>(datastream& ds, key256& d) { - ds.read((char*)d.data(), d.size() ); - return ds; -} - -/** - * Serialize a bool into a stream - * - * @brief Serialize a bool into a stream - * @param ds - The stream to read - * @param d - The value to serialize - * @tparam Stream - Type of datastream buffer - * @return datastream& - Reference to the datastream - */ -template -inline datastream& operator<<(datastream& ds, const bool& d) { - return ds << uint8_t(d); -} - -/** - * Deserialize a bool from a stream - * - * @brief Deserialize a bool - * @param ds - The stream to read - * @param d - The destination for deserialized value - * @tparam Stream - Type of datastream buffer - * @return datastream& - Reference to the datastream - */ -template -inline datastream& operator>>(datastream& ds, bool& d) { - uint8_t t; - ds >> t; - d = t; - return ds; -} - -/** - * Serialize a checksum256 into a stream - * - * @brief Serialize a checksum256 - * @param ds - The stream to write - * @param d - The value to serialize - * @tparam Stream - Type of datastream buffer - * @return datastream& - Reference to the datastream - */ -template -inline datastream& operator<<(datastream& ds, const checksum256& d) { - ds.write( (const char*)&d.hash[0], sizeof(d.hash) ); - return ds; -} - -/** - * Deserialize a checksum256 from a stream - * - * @brief Deserialize a checksum256 - * @param ds - The stream to read - * @param d - The destination for deserialized value - * @tparam Stream - Type of datastream buffer - * @return datastream& - Reference to the datastream - */ -template -inline datastream& operator>>(datastream& ds, checksum256& d) { - ds.read((char*)&d.hash[0], sizeof(d.hash) ); - return ds; -} - -/** - * Serialize a string into a stream - * - * @brief Serialize a string - * @param ds - The stream to write - * @param v - The value to serialize - * @tparam DataStream - Type of datastream - * @return DataStream& - Reference to the datastream - */ -template -DataStream& operator << ( DataStream& ds, const std::string& v ) { - ds << unsigned_int( v.size() ); - if (v.size()) - ds.write(v.data(), v.size()); - return ds; -} - -/** - * Deserialize a string from a stream - * - * @brief Deserialize a string - * @param ds - The stream to read - * @param v - The destination for deserialized value - * @tparam DataStream - Type of datastream - * @return DataStream& - Reference to the datastream - */ -template -DataStream& operator >> ( DataStream& ds, std::string& v ) { - std::vector tmp; - ds >> tmp; - if( tmp.size() ) - v = std::string(tmp.data(),tmp.data()+tmp.size()); - else - v = std::string(); - return ds; -} - -/** - * Serialize a fixed size array into a stream - * - * @brief Serialize a fixed size array - * @param ds - The stream to write - * @param v - The value to serialize - * @tparam DataStream - Type of datastream - * @tparam T - Type of the object contained in the array - * @tparam N - Size of the array - * @return DataStream& - Reference to the datastream - */ -template -DataStream& operator << ( DataStream& ds, const std::array& v ) { - for( const auto& i : v ) - ds << i; - return ds; -} - - -/** - * Deserialize a fixed size array from a stream - * - * @brief Deserialize a fixed size array - * @param ds - The stream to read - * @param v - The destination for deserialized value - * @tparam DataStream - Type of datastream - * @tparam T - Type of the object contained in the array - * @tparam N - Size of the array - * @return DataStream& - Reference to the datastream - */ -template -DataStream& operator >> ( DataStream& ds, std::array& v ) { - for( auto& i : v ) - ds >> i; - return ds; -} - -namespace _datastream_detail { - /** - * Check if type T is a pointer - * - * @brief Check if type T is a pointer - * @tparam T - The type to be checked - * @return true if T is a pointer - * @return false otherwise - */ - template - constexpr bool is_pointer() { - return std::is_pointer::value || - std::is_null_pointer::value || - std::is_member_pointer::value; - } - - /** - * Check if type T is a primitive type - * - * @brief Check if type T is a primitive type - * @tparam T - The type to be checked - * @return true if T is a primitive type - * @return false otherwise - */ - template - constexpr bool is_primitive() { - return std::is_arithmetic::value || - std::is_enum::value; - } -} - -/** - * Pointer should not be serialized, so this function will always throws an error - * - * @brief Deserialize a a pointer - * @param ds - The stream to read - * @tparam DataStream - Type of datastream - * @tparam T - Type of the pointer - * @return DataStream& - Reference to the datastream - * @post Throw an exception if it is a pointer - */ -template()>* = nullptr> -DataStream& operator >> ( DataStream& ds, T ) { - static_assert(!_datastream_detail::is_pointer(), "Pointers should not be serialized" ); - return ds; -} - -/** - * Serialize a fixed size array of non-primitive and non-pointer type - * - * @brief Serialize a fixed size array of non-primitive and non-pointer type - * @param ds - The stream to write - * @param v - The value to serialize - * @tparam DataStream - Type of datastream - * @tparam T - Type of the pointer - * @return DataStream& - Reference to the datastream - */ -template() && - !_datastream_detail::is_pointer()>* = nullptr> -DataStream& operator << ( DataStream& ds, const T (&v)[N] ) { - ds << unsigned_int( N ); - for( uint32_t i = 0; i < N; ++i ) - ds << v[i]; - return ds; -} - -/** - * Serialize a fixed size array of non-primitive type - * - * @brief Serialize a fixed size array of non-primitive type - * @param ds - The stream to write - * @param v - The value to serialize - * @tparam DataStream - Type of datastream - * @tparam T - Type of the pointer - * @return DataStream& - Reference to the datastream - */ -template()>* = nullptr> -DataStream& operator << ( DataStream& ds, const T (&v)[N] ) { - ds << unsigned_int( N ); - ds.write((char*)&v[0], sizeof(v)); - return ds; -} - -/** - * Deserialize a fixed size array of non-primitive and non-pointer type - * - * @brief Deserialize a fixed size array of non-primitive and non-pointer type - * @param ds - The stream to read - * @param v - The destination for deserialized value - * @tparam T - Type of the object contained in the array - * @tparam N - Size of the array - * @tparam DataStream - Type of datastream - * @return DataStream& - Reference to the datastream - */ -template() && - !_datastream_detail::is_pointer()>* = nullptr> -DataStream& operator >> ( DataStream& ds, T (&v)[N] ) { - unsigned_int s; - ds >> s; - eosio_assert( N == s.value, "T[] size and unpacked size don't match"); - for( uint32_t i = 0; i < N; ++i ) - ds >> v[i]; - return ds; -} - -/** - * Deserialize a fixed size array of non-primitive type - * - * @brief Deserialize a fixed size array of non-primitive type - * @param ds - The stream to read - * @param v - The destination for deserialized value - * @tparam T - Type of the object contained in the array - * @tparam N - Size of the array - * @tparam DataStream - Type of datastream - * @return DataStream& - Reference to the datastream - */ -template()>* = nullptr> -DataStream& operator >> ( DataStream& ds, T (&v)[N] ) { - unsigned_int s; - ds >> s; - eosio_assert( N == s.value, "T[] size and unpacked size don't match"); - ds.read((char*)&v[0], sizeof(v)); - return ds; -} - -/** - * Serialize a vector of char - * - * @brief Serialize a vector of char - * @param ds - The stream to write - * @param v - The value to serialize - * @tparam DataStream - Type of datastream - * @return DataStream& - Reference to the datastream - */ -template -DataStream& operator << ( DataStream& ds, const vector& v ) { - ds << unsigned_int( v.size() ); - ds.write( v.data(), v.size() ); - return ds; -} - -/** - * Serialize a vector - * - * @brief Serialize a vector - * @param ds - The stream to write - * @param v - The value to serialize - * @tparam DataStream - Type of datastream - * @tparam T - Type of the object contained in the vector - * @return DataStream& - Reference to the datastream - */ -template -DataStream& operator << ( DataStream& ds, const vector& v ) { - ds << unsigned_int( v.size() ); - for( const auto& i : v ) - ds << i; - return ds; -} - -/** - * Deserialize a vector of char - * - * @brief Deserialize a vector of char - * @param ds - The stream to read - * @param v - The destination for deserialized value - * @tparam DataStream - Type of datastream - * @return DataStream& - Reference to the datastream - */ -template -DataStream& operator >> ( DataStream& ds, vector& v ) { - unsigned_int s; - ds >> s; - v.resize( s.value ); - ds.read( v.data(), v.size() ); - return ds; -} - -/** - * Deserialize a vector - * - * @brief Deserialize a vector - * @param ds - The stream to read - * @param v - The destination for deserialized value - * @tparam DataStream - Type of datastream - * @tparam T - Type of the object contained in the vector - * @return DataStream& - Reference to the datastream - */ -template -DataStream& operator >> ( DataStream& ds, vector& v ) { - unsigned_int s; - ds >> s; - v.resize(s.value); - for( auto& i : v ) - ds >> i; - return ds; -} - -template -DataStream& operator << ( DataStream& ds, const std::set& s ) { - ds << unsigned_int( s.size() ); - for( const auto& i : s ) { - ds << i; - } - return ds; -} - -template -DataStream& operator >> ( DataStream& ds, std::set& s ) { - s.clear(); - unsigned_int sz; ds >> sz; - - for( uint32_t i = 0; i < sz.value; ++i ) { - T v; - ds >> v; - s.emplace( std::move(v) ); - } - return ds; -} - -/** - * Serialize a map - * - * @brief Serialize a map - * @param ds - The stream to write - * @param m - The value to serialize - * @tparam DataStream - Type of datastream - * @tparam K - Type of the key contained in the map - * @tparam V - Type of the value contained in the map - * @return DataStream& - Reference to the datastream - */ -template -DataStream& operator << ( DataStream& ds, const std::map& m ) { - ds << unsigned_int( m.size() ); - for( const auto& i : m ) { - ds << i.first << i.second; - } - return ds; -} - -/** - * Deserialize a map - * - * @brief Deserialize a map - * @param ds - The stream to read - * @param m - The destination for deserialized value - * @tparam DataStream - Type of datastream - * @tparam K - Type of the key contained in the map - * @tparam V - Type of the value contained in the map - * @return DataStream& - Reference to the datastream - */ -template -DataStream& operator >> ( DataStream& ds, std::map& m ) { - m.clear(); - unsigned_int s; ds >> s; - - for (uint32_t i = 0; i < s.value; ++i) { - K k; V v; - ds >> k >> v; - m.emplace( std::move(k), std::move(v) ); - } - return ds; -} - -template -DataStream& operator << ( DataStream& ds, const boost::container::flat_set& s ) { - ds << unsigned_int( s.size() ); - for( const auto& i : s ) { - ds << i; - } - return ds; -} - -template -DataStream& operator >> ( DataStream& ds, boost::container::flat_set& s ) { - s.clear(); - unsigned_int sz; ds >> sz; - - for( uint32_t i = 0; i < sz.value; ++i ) { - T v; - ds >> v; - s.emplace( std::move(v) ); - } - return ds; -} - - -/** - * Serialize a flat map - * - * @brief Serialize a flat map - * @param ds - The stream to write - * @param m - The value to serialize - * @tparam DataStream - Type of datastream - * @tparam K - Type of the key contained in the flat map - * @tparam V - Type of the value contained in the flat map - * @return DataStream& - Reference to the datastream - */ -template -DataStream& operator<<( DataStream& ds, const boost::container::flat_map& m ) { - ds << unsigned_int( m.size() ); - for( const auto& i : m ) - ds << i.first << i.second; - return ds; -} - -/** - * Deserialize a flat map - * - * @brief Deserialize a flat map - * @param ds - The stream to read - * @param m - The destination for deserialized value - * @tparam DataStream - Type of datastream - * @tparam K - Type of the key contained in the flat map - * @tparam V - Type of the value contained in the flat map - * @return DataStream& - Reference to the datastream - */ -template -DataStream& operator>>( DataStream& ds, boost::container::flat_map& m ) { - m.clear(); - unsigned_int s; ds >> s; - - for( uint32_t i = 0; i < s.value; ++i ) { - K k; V v; - ds >> k >> v; - m.emplace( std::move(k), std::move(v) ); - } - return ds; -} - -/** - * Serialize a tuple - * - * @brief Serialize a tuple - * @param ds - The stream to write - * @param t - The value to serialize - * @tparam DataStream - Type of datastream - * @tparam Args - Type of the objects contained in the tuple - * @return DataStream& - Reference to the datastream - */ -template -DataStream& operator<<( DataStream& ds, const std::tuple& t ) { - boost::fusion::for_each( t, [&]( const auto& i ) { - ds << i; - }); - return ds; -} - -/** - * Deserialize a tuple - * - * @brief Deserialize a tuple - * @param ds - The stream to read - * @param t - The destination for deserialized value - * @tparam DataStream - Type of datastream - * @tparam Args - Type of the objects contained in the tuple - * @return DataStream& - Reference to the datastream - */ -template -DataStream& operator>>( DataStream& ds, std::tuple& t ) { - boost::fusion::for_each( t, [&]( auto& i ) { - ds >> i; - }); - return ds; -} - -/** - * Serialize a class - * - * @brief Serialize a class - * @param ds - The stream to write - * @param v - The value to serialize - * @tparam DataStream - Type of datastream - * @tparam T - Type of class - * @return DataStream& - Reference to the datastream - */ -template::value>* = nullptr> -DataStream& operator<<( DataStream& ds, const T& v ) { - boost::pfr::for_each_field(v, [&](const auto& field) { - ds << field; - }); - return ds; -} - -/** - * Deserialize a class - * - * @brief Deserialize a class - * @param ds - The stream to read - * @param v - The destination for deserialized value - * @tparam DataStream - Type of datastream - * @tparam T - Type of class - * @return DataStream& - Reference to the datastream - */ -template::value>* = nullptr> -DataStream& operator>>( DataStream& ds, T& v ) { - boost::pfr::for_each_field(v, [&](auto& field) { - ds >> field; - }); - return ds; -} - -/** - * Serialize a primitive type - * - * @brief Serialize a primitive type - * @param ds - The stream to write - * @param v - The value to serialize - * @tparam DataStream - Type of datastream - * @tparam T - Type of the primitive type - * @return DataStream& - Reference to the datastream - */ -template()>* = nullptr> -DataStream& operator<<( DataStream& ds, const T& v ) { - ds.write( (const char*)&v, sizeof(T) ); - return ds; -} - -/** - * Deserialize a primitive type - * - * @brief Deserialize a primitive type - * @param ds - The stream to read - * @param v - The destination for deserialized value - * @tparam DataStream - Type of datastream - * @tparam T - Type of the primitive type - * @return DataStream& - Reference to the datastream - */ -template()>* = nullptr> -DataStream& operator>>( DataStream& ds, T& v ) { - ds.read( (char*)&v, sizeof(T) ); - return ds; -} - -/** - * Unpack data inside a fixed size buffer as T - * - * @brief Unpack data inside a fixed size buffer as T - * @tparam T - Type of the unpacked data - * @param buffer - Pointer to the buffer - * @param len - Length of the buffer - * @return T - The unpacked data - */ -template -T unpack( const char* buffer, size_t len ) { - T result; - datastream ds(buffer,len); - ds >> result; - return result; -} - -/** - * Unpack data inside a variable size buffer as T - * - * @brief Unpack data inside a variable size buffer as T - * @tparam T - Type of the unpacked data - * @param bytes - Buffer - * @return T - The unpacked data - */ -template -T unpack( const vector& bytes ) { - return unpack( bytes.data(), bytes.size() ); -} - -/** - * Get the size of the packed data - * - * @brief Get the size of the packed data - * @tparam T - Type of the data to be packed - * @param value - Data to be packed - * @return size_t - Size of the packed data - */ -template -size_t pack_size( const T& value ) { - datastream ps; - ps << value; - return ps.tellp(); -} - -/** - * Get packed data - * - * @brief Get packed data - * @tparam T - Type of the data to be packed - * @param value - Data to be packed - * @return bytes - The packed data - */ -template -bytes pack( const T& value ) { - bytes result; - result.resize(pack_size(value)); - - datastream ds( result.data(), result.size() ); - ds << value; - return result; -} - -/** - * Serialize a checksum160 type - * - * @brief Serialize a checksum160 type - * @param ds - The stream to write - * @param cs - The value to serialize - * @tparam Stream - Type of datastream buffer - * @return datastream& - Reference to the datastream - */ -template -inline datastream& operator<<(datastream& ds, const checksum160& cs) { - ds.write((const char*)&cs.hash[0], sizeof(cs.hash)); - return ds; -} - -/** - * Deserialize a checksum160 type - * - * @brief Deserialize a checksum160 type - * @param ds - The stream to read - * @param cs - The destination for deserialized value - * @tparam Stream - Type of datastream buffer - * @return datastream& - Reference to the datastream - */ -template -inline datastream& operator>>(datastream& ds, checksum160& cs) { - ds.read((char*)&cs.hash[0], sizeof(cs.hash)); - return ds; -} - -/** - * Serialize a checksum512 type - * - * @brief Serialize a checksum512 type - * @param ds - The stream to write - * @param cs - The value to serialize - * @tparam Stream - Type of datastream buffer - * @return datastream& - Reference to the datastream - */ -template -inline datastream& operator<<(datastream& ds, const checksum512& cs) { - ds.write((const char*)&cs.hash[0], sizeof(cs.hash)); - return ds; -} - -/** - * Deserialize a checksum512 type - * - * @brief Deserialize a checksum512 type - * @param ds - The stream to read - * @param cs - The destination for deserialized value - * @tparam Stream - Type of datastream buffer - * @return datastream& - Reference to the datastream - */ -template -inline datastream& operator>>(datastream& ds, checksum512& cs) { - ds.read((char*)&cs.hash[0], sizeof(cs.hash)); - return ds; -} -/// @} datastream -} diff --git a/contracts/eosiolib/db.h b/contracts/eosiolib/db.h deleted file mode 100644 index d2c01b6b15d..00000000000 --- a/contracts/eosiolib/db.h +++ /dev/null @@ -1,940 +0,0 @@ -/** - * @file db.h - * @copyright defined in eos/LICENSE.txt - * @brief Defines C API for interfacing with blockchain database - */ -#pragma once - -#include -extern "C" { -/** - * @defgroup database Database API - * @brief Defines APIs that store and retrieve data on the blockchain - * @ingroup contractdev - * - * @defgroup databasecpp Database C++ API - * @brief Defines an interface to EOSIO database - * @ingroup database - * - * @details - * EOSIO organizes data according to the following broad structure: - * - **code** - the account name which has write permission - * - **scope** - an area where the data is stored - * - **table** - a name for the table that is being stored - * - **record** - a row in the table - */ - -/** - * @defgroup databasec Database C API - * @brief Defines %C APIs for interfacing with the database. - * @ingroup database - * - * @details Database C API provides low level interface to EOSIO database. - * - * @section tabletypes Supported Table Types - * Following are the table types supported by the C API: - * 1. Primary Table - * - 64-bit integer key - * 2. Secondary Index Table - * - 64-bit integer key - * - 128-bit integer key - * - 256-bit integer key - * - double key - * - long double key - * @{ - */ - -/** - * - * Store a record in a primary 64-bit integer index table - * - * @brief Store a record in a primary 64-bit integer index table - * @param scope - The scope where the table resides (implied to be within the code of the current receiver) - * @param table - The table name - * @param payer - The account that pays for the storage costs - * @param id - ID of the entry - * @param data - Record to store - * @param len - Size of data - * @pre `data` is a valid pointer to a range of memory at least `len` bytes long - * @pre `*((uint64_t*)data)` stores the primary key - * @return iterator to the newly created table row - * @post a new entry is created in the table - */ -int32_t db_store_i64(account_name scope, table_name table, account_name payer, uint64_t id, const void* data, uint32_t len); - -/** - * - * Update a record in a primary 64-bit integer index table - * - * @brief Update a record in a primary 64-bit integer index table - * @param iterator - Iterator to the table row containing the record to update - * @param payer - The account that pays for the storage costs (use 0 to continue using current payer) - * @param data - New updated record - * @param len - Size of data - * @pre `data` is a valid pointer to a range of memory at least `len` bytes long - * @pre `*((uint64_t*)data)` stores the primary key - * @pre `iterator` points to an existing table row in the table - * @post the record contained in the table row pointed to by `iterator` is replaced with the new updated record - */ -void db_update_i64(int32_t iterator, account_name payer, const void* data, uint32_t len); - -/** - * - * Remove a record from a primary 64-bit integer index table - * - * @brief Remove a record from a primary 64-bit integer index table - * @param iterator - Iterator to the table row to remove - * @pre `iterator` points to an existing table row in the table - * @post the table row pointed to by `iterator` is removed and the associated storage costs are refunded to the payer - * - * Example: - * - * @code - * int32_t itr = db_find_i64(receiver, receiver, table1, N(alice)); - * eosio_assert(itr >= 0, "Alice cannot be removed since she was already not found in the table"); - * db_remove_i64(itr); - * @endcode - */ -void db_remove_i64(int32_t iterator); - -/** - * - * Get a record in a primary 64-bit integer index table - * - * @brief Get a record in a primary 64-bit integer index table - * @param iterator - The iterator to the table row containing the record to retrieve - * @param data - Pointer to the buffer which will be filled with the retrieved record - * @param len - Size of the buffer - * @return size of the data copied into the buffer if `len > 0`, or size of the retrieved record if `len == 0`. - * @pre `iterator` points to an existing table row in the table - * @pre `data` is a valid pointer to a range of memory at least `len` bytes long - * @post `data` will be filled with the retrieved record (truncated to the first `len` bytes if necessary) - * - * Example: - * - * @code - * char value[50]; - * auto len = db_get_i64(itr, value, 0); - * eosio_assert(len <= 50, "buffer to small to store retrieved record"); - * db_get_i64(itr, value, len); - * @endcode - */ -int32_t db_get_i64(int32_t iterator, const void* data, uint32_t len); - -/** - * - * Find the table row following the referenced table row in a primary 64-bit integer index table - * - * @brief Find the table row following the referenced table row in a primary 64-bit integer index table - * @param iterator - The iterator to the referenced table row - * @param primary - Pointer to a `uint64_t` variable which will have its value set to the primary key of the next table row - * @return iterator to the table row following the referenced table row (or the end iterator of the table if the referenced table row is the last one in the table) - * @pre `iterator` points to an existing table row in the table - * @post `*primary` will be replaced with the primary key of the table row following the referenced table row if it exists, otherwise `*primary` will be left untouched - * - * Example: - * - * @code - * int32_t charlie_itr = db_find_i64(receiver, receiver, table1, N(charlie)); - * // expect nothing after charlie - * uint64_t prim = 0 - * int32_t end_itr = db_next_i64(charlie_itr, &prim); - * eosio_assert(end_itr < -1, "Charlie was not the last entry in the table"); - * @endcode - */ -int32_t db_next_i64(int32_t iterator, uint64_t* primary); - -/** - * - * Find the table row preceding the referenced table row in a primary 64-bit integer index table - * - * @brief Find the table row preceding the referenced table row in a primary 64-bit integer index table - * @param iterator - The iterator to the referenced table row - * @param primary - Pointer to a `uint64_t` variable which will have its value set to the primary key of the previous table row - * @return iterator to the table row preceding the referenced table row assuming one exists (it will return -1 if the referenced table row is the first one in the table) - * @pre `iterator` points to an existing table row in the table or it is the end iterator of the table - * @post `*primary` will be replaced with the primary key of the table row preceding the referenced table row if it exists, otherwise `*primary` will be left untouched - * - * Example: - * - * @code - * uint64_t prim = 0; - * int32_t itr_prev = db_previous_i64(itr, &prim); - * @endcode - */ -int32_t db_previous_i64(int32_t iterator, uint64_t* primary); - -/** - * - * Find a table row in a primary 64-bit integer index table by primary key - * - * @brief Find a table row in a primary 64-bit integer index table by primary key - * @param code - The name of the owner of the table - * @param scope - The scope where the table resides - * @param table - The table name - * @param id - The primary key of the table row to look up - * @return iterator to the table row with a primary key equal to `id` or the end iterator of the table if the table row could not be found - * - * Example: - * - * @code - * int itr = db_find_i64(receiver, receiver, table1, N(charlie)); - * @endcode - */ -int32_t db_find_i64(account_name code, account_name scope, table_name table, uint64_t id); - -/** - * - * Find the table row in a primary 64-bit integer index table that matches the lowerbound condition for a given primary key - * The table row that matches the lowerbound condition is the first table row in the table with the lowest primary key that is >= the given key - * - * @brief Find the table row in a primary 64-bit integer index table that matches the lowerbound condition for a given primary key - * @param code - The name of the owner of the table - * @param scope - The scope where the table resides - * @param table - The table name - * @param id - The primary key used to determine the lowerbound - * @return iterator to the found table row or the end iterator of the table if the table row could not be found - */ -int32_t db_lowerbound_i64(account_name code, account_name scope, table_name table, uint64_t id); - -/** - * - * Find the table row in a primary 64-bit integer index table that matches the upperbound condition for a given primary key - * The table row that matches the upperbound condition is the first table row in the table with the lowest primary key that is > the given key - * - * @brief Find the table row in a primary 64-bit integer index table that matches the upperbound condition for a given primary key - * @param code - The name of the owner of the table - * @param scope - The scope where the table resides - * @param table - The table name - * @param id - The primary key used to determine the upperbound - * @return iterator to the found table row or the end iterator of the table if the table row could not be found - */ -int32_t db_upperbound_i64(account_name code, account_name scope, table_name table, uint64_t id); - -/** - * - * Get an iterator representing just-past-the-end of the last table row of a primary 64-bit integer index table - * - * @brief Get an iterator representing just-past-the-end of the last table row of a primary 64-bit integer index table - * @param code - The name of the owner of the table - * @param scope - The scope where the table resides - * @param table - The table name - * @return end iterator of the table - */ -int32_t db_end_i64(account_name code, account_name scope, table_name table); - -/** - * - * Store an association of a 64-bit integer secondary key to a primary key in a secondary 64-bit integer index table - * - * @brief Store an association of a 64-bit integer secondary key to a primary key in a secondary 64-bit integer index table - * @param scope - The scope where the table resides (implied to be within the code of the current receiver) - * @param table - The table name - * @param payer - The account that pays for the storage costs - * @param id - The primary key to which to associate the secondary key - * @param secondary - Pointer to the secondary key - * @return iterator to the newly created table row - * @post new secondary key association between primary key `id` and secondary key `*secondary` is created in the secondary 64-bit integer index table - */ -int32_t db_idx64_store(account_name scope, table_name table, account_name payer, uint64_t id, const uint64_t* secondary); - -/** - * - * Update an association for a 64-bit integer secondary key to a primary key in a secondary 64-bit integer index table - * - * @brief Update an association for a 64-bit integer secondary key to a primary key in a secondary 64-bit integer index table - * @param iterator - The iterator to the table row containing the secondary key association to update - * @param payer - The account that pays for the storage costs (use 0 to continue using current payer) - * @param secondary - Pointer to the **new** secondary key that will replace the existing one of the association - * @pre `iterator` points to an existing table row in the table - * @post the secondary key of the table row pointed to by `iterator` is replaced by `*secondary` - */ -void db_idx64_update(int32_t iterator, account_name payer, const uint64_t* secondary); - -/** - * - * Remove a table row from a secondary 64-bit integer index table - * - * @brief Remove a table row from a secondary 64-bit integer index table - * @param iterator - Iterator to the table row to remove - * @pre `iterator` points to an existing table row in the table - * @post the table row pointed to by `iterator` is removed and the associated storage costs are refunded to the payer - */ -void db_idx64_remove(int32_t iterator); - -/** - * - * Find the table row following the referenced table row in a secondary 64-bit integer index table - * - * @brief Find the table row following the referenced table row in a secondary 64-bit integer index table - * @param iterator - The iterator to the referenced table row - * @param primary - Pointer to a `uint64_t` variable which will have its value set to the primary key of the next table row - * @return iterator to the table row following the referenced table row (or the end iterator of the table if the referenced table row is the last one in the table) - * @pre `iterator` points to an existing table row in the table - * @post `*primary` will be replaced with the primary key of the table row following the referenced table row if it exists, otherwise `*primary` will be left untouched - */ -int32_t db_idx64_next(int32_t iterator, uint64_t* primary); - -/** - * - * Find the table row preceding the referenced table row in a secondary 64-bit integer index table - * - * @brief Find the table row preceding the referenced table row in a secondary 64-bit integer index table - * @param iterator - The iterator to the referenced table row - * @param primary - Pointer to a `uint64_t` variable which will have its value set to the primary key of the previous table row - * @return iterator to the table row preceding the referenced table row assuming one exists (it will return -1 if the referenced table row is the first one in the table) - * @pre `iterator` points to an existing table row in the table or it is the end iterator of the table - * @post `*primary` will be replaced with the primary key of the table row preceding the referenced table row if it exists, otherwise `*primary` will be left untouched - */ -int32_t db_idx64_previous(int32_t iterator, uint64_t* primary); - -/** - * - * Find a table row in a secondary 64-bit integer index table by primary key - * - * @brief Find a table row in a secondary 64-bit integer index table by primary key - * @param code - The name of the owner of the table - * @param scope - The scope where the table resides - * @param table - The table name - * @param secondary - Pointer to a `uint64_t` variable which will have its value set to the secondary key of the found table row - * @param primary - The primary key of the table row to look up - * @post If and only if the table row is found, `*secondary` will be replaced with the secondary key of the found table row - * @return iterator to the table row with a primary key equal to `id` or the end iterator of the table if the table row could not be found - */ -int32_t db_idx64_find_primary(account_name code, account_name scope, table_name table, uint64_t* secondary, uint64_t primary); - -/** - * - * Find a table row in a secondary 64-bit integer index table by secondary key - * - * @brief Find a table row in a secondary 64-bit integer index table by secondary key - * @param code - The name of the owner of the table - * @param scope - The scope where the table resides - * @param table - The table name - * @param secondary - Pointer to secondary key used to lookup the table row - * @param primary - Pointer to a `uint64_t` variable which will have its value set to the primary key of the found table row - * @post If and only if the table row is found, `*primary` will be replaced with the primary key of the found table row - * @return iterator to the first table row with a secondary key equal to `*secondary` or the end iterator of the table if the table row could not be found - */ -int32_t db_idx64_find_secondary(account_name code, account_name scope, table_name table, const uint64_t* secondary, uint64_t* primary); - -/** - * - * Find the table row in a secondary 64-bit integer index table that matches the lowerbound condition for a given secondary key - * The table row that matches the lowerbound condition is the first table row in the table with the lowest secondary key that is >= the given key - * - * @brief Find the table row in a secondary 64-bit integer index table that matches the lowerbound condition for a given secondary key - * @param code - The name of the owner of the table - * @param scope - The scope where the table resides - * @param table - The table name - * @param secondary - Pointer to secondary key first used to determine the lowerbound and which is then replaced with the secondary key of the found table row - * @param primary - Pointer to a `uint64_t` variable which will have its value set to the primary key of the found table row - * @post If and only if the table row is found, `*secondary` will be replaced with the secondary key of the found table row - * @post If and only if the table row is found, `*primary` will be replaced with the primary key of the found table row - * @return iterator to the found table row or the end iterator of the table if the table row could not be found - */ -int32_t db_idx64_lowerbound(account_name code, account_name scope, table_name table, uint64_t* secondary, uint64_t* primary); - -/** - * - * Find the table row in a secondary 64-bit integer index table that matches the upperbound condition for a given secondary key - * The table row that matches the upperbound condition is the first table row in the table with the lowest secondary key that is > the given key - * - * @brief Find the table row in a secondary 64-bit integer index table that matches the upperbound condition for a given secondary key - * @param code - The name of the owner of the table - * @param scope - The scope where the table resides - * @param table - The table name - * @param secondary - Pointer to secondary key first used to determine the upperbound and which is then replaced with the secondary key of the found table row - * @param primary - Pointer to a `uint64_t` variable which will have its value set to the primary key of the found table row - * @post If and only if the table row is found, `*secondary` will be replaced with the secondary key of the found table row - * @post If and only if the table row is found, `*primary` will be replaced with the primary key of the found table row - * @return iterator to the found table row or the end iterator of the table if the table row could not be found - */ -int32_t db_idx64_upperbound(account_name code, account_name scope, table_name table, uint64_t* secondary, uint64_t* primary); - -/** - * - * Get an end iterator representing just-past-the-end of the last table row of a secondary 64-bit integer index table - * - * @brief Get an end iterator representing just-past-the-end of the last table row of a secondary 64-bit integer index table - * @param code - The name of the owner of the table - * @param scope - The scope where the table resides - * @param table - The table name - * @return end iterator of the table - */ -int32_t db_idx64_end(account_name code, account_name scope, table_name table); - - - -/** - * - * Store an association of a 128-bit integer secondary key to a primary key in a secondary 128-bit integer index table - * - * @brief Store an association of a 128-bit integer secondary key to a primary key in a secondary 128-bit integer index table - * @param scope - The scope where the table resides (implied to be within the code of the current receiver) - * @param table - The table name - * @param payer - The account that pays for the storage costs - * @param id - The primary key to which to associate the secondary key - * @param secondary - Pointer to the secondary key - * @return iterator to the newly created table row - * @post new secondary key association between primary key `id` and secondary key `*secondary` is created in the secondary 128-bit integer index table - */ -int32_t db_idx128_store(account_name scope, table_name table, account_name payer, uint64_t id, const uint128_t* secondary); - -/** - * - * Update an association for a 128-bit integer secondary key to a primary key in a secondary 128-bit integer index table - * - * @brief Update an association for a 128-bit integer secondary key to a primary key in a secondary 128-bit integer index table - * @param iterator - The iterator to the table row containing the secondary key association to update - * @param payer - The account that pays for the storage costs (use 0 to continue using current payer) - * @param secondary - Pointer to the **new** secondary key that will replace the existing one of the association - * @pre `iterator` points to an existing table row in the table - * @post the secondary key of the table row pointed to by `iterator` is replaced by `*secondary` - */ -void db_idx128_update(int32_t iterator, account_name payer, const uint128_t* secondary); - -/** - * - * Remove a table row from a secondary 128-bit integer index table - * - * @brief Remove a table row from a secondary 128-bit integer index table - * @param iterator - Iterator to the table row to remove - * @pre `iterator` points to an existing table row in the table - * @post the table row pointed to by `iterator` is removed and the associated storage costs are refunded to the payer - */ -void db_idx128_remove(int32_t iterator); - -/** - * - * Find the table row following the referenced table row in a secondary 128-bit integer index table - * - * @brief Find the table row following the referenced table row in a secondary 128-bit integer index table - * @param iterator - The iterator to the referenced table row - * @param primary - Pointer to a `uint64_t` variable which will have its value set to the primary key of the next table row - * @return iterator to the table row following the referenced table row (or the end iterator of the table if the referenced table row is the last one in the table) - * @pre `iterator` points to an existing table row in the table - * @post `*primary` will be replaced with the primary key of the table row following the referenced table row if it exists, otherwise `*primary` will be left untouched - */ -int32_t db_idx128_next(int32_t iterator, uint64_t* primary); - -/** - * - * Find the table row preceding the referenced table row in a secondary 128-bit integer index table - * - * @brief Find the table row preceding the referenced table row in a secondary 128-bit integer index table - * @param iterator - The iterator to the referenced table row - * @param primary - Pointer to a `uint64_t` variable which will have its value set to the primary key of the previous table row - * @return iterator to the table row preceding the referenced table row assuming one exists (it will return -1 if the referenced table row is the first one in the table) - * @pre `iterator` points to an existing table row in the table or it is the end iterator of the table - * @post `*primary` will be replaced with the primary key of the table row preceding the referenced table row if it exists, otherwise `*primary` will be left untouched - */ -int32_t db_idx128_previous(int32_t iterator, uint64_t* primary); - -/** - * - * Find a table row in a secondary 128-bit integer index table by primary key - * - * @brief Find a table row in a secondary 128-bit integer index table by primary key - * @param code - The name of the owner of the table - * @param scope - The scope where the table resides - * @param table - The table name - * @param secondary - Pointer to a `uint128_t` variable which will have its value set to the secondary key of the found table row - * @param primary - The primary key of the table row to look up - * @post If and only if the table row is found, `*secondary` will be replaced with the secondary key of the found table row - * @return iterator to the table row with a primary key equal to `id` or the end iterator of the table if the table row could not be found - */ -int32_t db_idx128_find_primary(account_name code, account_name scope, table_name table, uint128_t* secondary, uint64_t primary); - -/** - * - * Find a table row in a secondary 128-bit integer index table by secondary key - * - * @brief Find a table row in a secondary 128-bit integer index table by secondary key - * @param code - The name of the owner of the table - * @param scope - The scope where the table resides - * @param table - The table name - * @param secondary - Pointer to secondary key used to lookup the table row - * @param primary - Pointer to a `uint64_t` variable which will have its value set to the primary key of the found table row - * @post If and only if the table row is found, `*primary` will be replaced with the primary key of the found table row - * @return iterator to the first table row with a secondary key equal to `*secondary` or the end iterator of the table if the table row could not be found - */ -int32_t db_idx128_find_secondary(account_name code, account_name scope, table_name table, const uint128_t* secondary, uint64_t* primary); - -/** - * - * Find the table row in a secondary 128-bit integer index table that matches the lowerbound condition for a given secondary key - * The table row that matches the lowerbound condition is the first table row in the table with the lowest secondary key that is >= the given key - * - * @brief Find the table row in a secondary 128-bit integer index table that matches the lowerbound condition for a given secondary key - * @param code - The name of the owner of the table - * @param scope - The scope where the table resides - * @param table - The table name - * @param secondary - Pointer to secondary key first used to determine the lowerbound and which is then replaced with the secondary key of the found table row - * @param primary - Pointer to a `uint64_t` variable which will have its value set to the primary key of the found table row - * @post If and only if the table row is found, `*secondary` will be replaced with the secondary key of the found table row - * @post If and only if the table row is found, `*primary` will be replaced with the primary key of the found table row - * @return iterator to the found table row or the end iterator of the table if the table row could not be found - */ -int32_t db_idx128_lowerbound(account_name code, account_name scope, table_name table, uint128_t* secondary, uint64_t* primary); - -/** - * - * Find the table row in a secondary 128-bit integer index table that matches the upperbound condition for a given secondary key - * The table row that matches the upperbound condition is the first table row in the table with the lowest secondary key that is > the given key - * - * @brief Find the table row in a secondary 128-bit integer index table that matches the upperbound condition for a given secondary key - * @param code - The name of the owner of the table - * @param scope - The scope where the table resides - * @param table - The table name - * @param secondary - Pointer to secondary key first used to determine the upperbound and which is then replaced with the secondary key of the found table row - * @param primary - Pointer to a `uint64_t` variable which will have its value set to the primary key of the found table row - * @post If and only if the table row is found, `*secondary` will be replaced with the secondary key of the found table row - * @post If and only if the table row is found, `*primary` will be replaced with the primary key of the found table row - * @return iterator to the found table row or the end iterator of the table if the table row could not be found - */ -int32_t db_idx128_upperbound(account_name code, account_name scope, table_name table, uint128_t* secondary, uint64_t* primary); - -/** - * - * Get an end iterator representing just-past-the-end of the last table row of a secondary 128-bit integer index table - * - * @brief Get an end iterator representing just-past-the-end of the last table row of a secondary 128-bit integer index table - * @param code - The name of the owner of the table - * @param scope - The scope where the table resides - * @param table - The table name - * @return end iterator of the table - */ -int32_t db_idx128_end(account_name code, account_name scope, table_name table); - -/** - * - * Store an association of a 256-bit secondary key to a primary key in a secondary 256-bit index table - * - * @brief Store an association of a 256-bit secondary key to a primary key in a secondary 256-bit index table - * @param scope - The scope where the table resides (implied to be within the code of the current receiver) - * @param table - The table name - * @param payer - The account that pays for the storage costs - * @param id - The primary key to which to associate the secondary key - * @param data - Pointer to the secondary key data stored as an array of 2 `uint128_t` integers - * @param data_len - Must be set to 2 - * @return iterator to the newly created table row - * @post new secondary key association between primary key `id` and the specified secondary key is created in the secondary 256-bit index table - */ -int32_t db_idx256_store(account_name scope, table_name table, account_name payer, uint64_t id, const uint128_t* data, uint32_t data_len ); - -/** - * - * Update an association for a 256-bit secondary key to a primary key in a secondary 256-bit index table - * - * @brief Update an association for a 256-bit secondary key to a primary key in a secondary 256-bit index table - * @param iterator - The iterator to the table row containing the secondary key association to update - * @param payer - The account that pays for the storage costs (use 0 to continue using current payer) - * @param data - Pointer to the **new** secondary key data (which is stored as an array of 2 `uint128_t` integers) that will replace the existing one of the association - * @param data_len - Must be set to 2 - * @pre `iterator` points to an existing table row in the table - * @post the secondary key of the table row pointed to by `iterator` is replaced by the specified secondary key - */ -void db_idx256_update(int32_t iterator, account_name payer, const uint128_t* data, uint32_t data_len); - -/** - * - * Remove a table row from a secondary 256-bit index table - * - * @brief Remove a table row from a secondary 256-bit index table - * @param iterator - Iterator to the table row to remove - * @pre `iterator` points to an existing table row in the table - * @post the table row pointed to by `iterator` is removed and the associated storage costs are refunded to the payer - */ -void db_idx256_remove(int32_t iterator); - -/** - * - * Find the table row following the referenced table row in a secondary 256-bit index table - * - * @brief Find the table row following the referenced table row in a secondary 256-bit index table - * @param iterator - The iterator to the referenced table row - * @param primary - Pointer to a `uint64_t` variable which will have its value set to the primary key of the next table row - * @return iterator to the table row following the referenced table row (or the end iterator of the table if the referenced table row is the last one in the table) - * @pre `iterator` points to an existing table row in the table - * @post `*primary` will be replaced with the primary key of the table row following the referenced table row if it exists, otherwise `*primary` will be left untouched - */ -int32_t db_idx256_next(int32_t iterator, uint64_t* primary); - -/** - * - * Find the table row preceding the referenced table row in a secondary 256-bit index table - * - * @brief Find the table row preceding the referenced table row in a secondary 256-bit index table - * @param iterator - The iterator to the referenced table row - * @param primary - Pointer to a `uint64_t` variable which will have its value set to the primary key of the previous table row - * @return iterator to the table row preceding the referenced table row assuming one exists (it will return -1 if the referenced table row is the first one in the table) - * @pre `iterator` points to an existing table row in the table or it is the end iterator of the table - * @post `*primary` will be replaced with the primary key of the table row preceding the referenced table row if it exists, otherwise `*primary` will be left untouched - */ -int32_t db_idx256_previous(int32_t iterator, uint64_t* primary); - -/** - * - * Find a table row in a secondary 256-bit index table by primary key - * - * @brief Find a table row in a secondary 128-bit integer index table by primary key - * @param code - The name of the owner of the table - * @param scope - The scope where the table resides - * @param table - The table name - * @param data - Pointer to the an array of 2 `uint128_t` integers which will act as the buffer to hold the retrieved secondary key of the found table row - * @param data_len - Must be set to 2 - * @param primary - The primary key of the table row to look up - * @post If and only if the table row is found, the buffer pointed to by `data` will be filled with the secondary key of the found table row - * @return iterator to the table row with a primary key equal to `id` or the end iterator of the table if the table row could not be found - */ -int32_t db_idx256_find_primary(account_name code, account_name scope, table_name table, uint128_t* data, uint32_t data_len, uint64_t primary); - -/** - * - * Find a table row in a secondary 256-bit index table by secondary key - * - * @brief Find a table row in a secondary 256-bit index table by secondary key - * @param code - The name of the owner of the table - * @param scope - The scope where the table resides - * @param table - The table name - * @param data - Pointer to the secondary key data (which is stored as an array of 2 `uint128_t` integers) used to lookup the table row - * @param data_len - Must be set to 2 - * @param primary - Pointer to a `uint64_t` variable which will have its value set to the primary key of the found table row - * @post If and only if the table row is found, `*primary` will be replaced with the primary key of the found table row - * @return iterator to the first table row with a secondary key equal to the specified secondary key or the end iterator of the table if the table row could not be found - */ -int32_t db_idx256_find_secondary(account_name code, account_name scope, table_name table, const uint128_t* data, uint32_t data_len, uint64_t* primary); - -/** - * - * Find the table row in a secondary 256-bit index table that matches the lowerbound condition for a given secondary key - * The table row that matches the lowerbound condition is the first table row in the table with the lowest secondary key that is >= the given key (uses lexicographical ordering on the 256-bit keys) - * - * @brief Find the table row in a secondary 256-bit index table that matches the lowerbound condition for a given secondary key - * @param code - The name of the owner of the table - * @param scope - The scope where the table resides - * @param table - The table name - * @param data - Pointer to the secondary key data (which is stored as an array of 2 `uint128_t` integers) first used to determine the lowerbound and which is then replaced with the secondary key of the found table row - * @param data_len - Must be set to 2 - * @param primary - Pointer to a `uint64_t` variable which will have its value set to the primary key of the found table row - * @post If and only if the table row is found, the buffer pointed to by `data` will be filled with the secondary key of the found table row - * @post If and only if the table row is found, `*primary` will be replaced with the primary key of the found table row - * @return iterator to the found table row or the end iterator of the table if the table row could not be found - */ -int32_t db_idx256_lowerbound(account_name code, account_name scope, table_name table, uint128_t* data, uint32_t data_len, uint64_t* primary); - -/** - * - * Find the table row in a secondary 256-bit index table that matches the upperbound condition for a given secondary key - * The table row that matches the upperbound condition is the first table row in the table with the lowest secondary key that is > the given key (uses lexicographical ordering on the 256-bit keys) - * - * @brief Find the table row in a secondary 256-bit index table that matches the upperbound condition for a given secondary key - * @param code - The name of the owner of the table - * @param scope - The scope where the table resides - * @param table - The table name - * @param data - Pointer to the secondary key data (which is stored as an array of 2 `uint128_t` integers) first used to determine the upperbound and which is then replaced with the secondary key of the found table row - * @param data_len - Must be set to 2 - * @param primary - Pointer to a `uint64_t` variable which will have its value set to the primary key of the found table row - * @post If and only if the table row is found, the buffer pointed to by `data` will be filled with the secondary key of the found table row - * @post If and only if the table row is found, `*primary` will be replaced with the primary key of the found table row - * @return iterator to the found table row or the end iterator of the table if the table row could not be found - */ -int32_t db_idx256_upperbound(account_name code, account_name scope, table_name table, uint128_t* data, uint32_t data_len, uint64_t* primary); - -/** - * - * Get an end iterator representing just-past-the-end of the last table row of a secondary 256-bit index table - * - * @brief Get an end iterator representing just-past-the-end of the last table row of a secondary 256-bit index table - * @param code - The name of the owner of the table - * @param scope - The scope where the table resides - * @param table - The table name - * @return end iterator of the table - */ -int32_t db_idx256_end(account_name code, account_name scope, table_name table); - -/** - * - * Store an association of a double-precision floating-point secondary key to a primary key in a secondary double-precision floating-point index table - * - * @brief Store an association of a double-precision floating-point secondary key to a primary key in a secondary double-precision floating-point index table - * @param scope - The scope where the table resides (implied to be within the code of the current receiver) - * @param table - The table name - * @param payer - The account that pays for the storage costs - * @param id - The primary key to which to associate the secondary key - * @param secondary - Pointer to the secondary key - * @return iterator to the newly created table row - * @post new secondary key association between primary key `id` and secondary key `*secondary` is created in the secondary double-precision floating-point index table - */ -int32_t db_idx_double_store(account_name scope, table_name table, account_name payer, uint64_t id, const double* secondary); - -/** - * - * Update an association for a double-precision floating-point secondary key to a primary key in a secondary double-precision floating-point index table - * - * @brief Update an association for a double-precision floating-point secondary key to a primary key in a secondary double-precision floating-point index table - * @param iterator - The iterator to the table row containing the secondary key association to update - * @param payer - The account that pays for the storage costs (use 0 to continue using current payer) - * @param secondary - Pointer to the **new** secondary key that will replace the existing one of the association - * @pre `iterator` points to an existing table row in the table - * @post the secondary key of the table row pointed to by `iterator` is replaced by `*secondary` - */ -void db_idx_double_update(int32_t iterator, account_name payer, const double* secondary); - -/** - * - * Remove a table row from a secondary double-precision floating-point index table - * - * @brief Remove a table row from a secondary double-precision floating-point index table - * @param iterator - Iterator to the table row to remove - * @pre `iterator` points to an existing table row in the table - * @post the table row pointed to by `iterator` is removed and the associated storage costs are refunded to the payer - */ -void db_idx_double_remove(int32_t iterator); - -/** - * - * Find the table row following the referenced table row in a secondary double-precision floating-point index table - * - * @brief Find the table row following the referenced table row in a secondary double-precision floating-point index table - * @param iterator - The iterator to the referenced table row - * @param primary - Pointer to a `uint64_t` variable which will have its value set to the primary key of the next table row - * @return iterator to the table row following the referenced table row (or the end iterator of the table if the referenced table row is the last one in the table) - * @pre `iterator` points to an existing table row in the table - * @post `*primary` will be replaced with the primary key of the table row following the referenced table row if it exists, otherwise `*primary` will be left untouched - */ -int32_t db_idx_double_next(int32_t iterator, uint64_t* primary); - -/** - * - * Find the table row preceding the referenced table row in a secondary double-precision floating-point index table - * - * @brief Find the table row preceding the referenced table row in a secondary double-precision floating-point index table - * @param iterator - The iterator to the referenced table row - * @param primary - Pointer to a `uint64_t` variable which will have its value set to the primary key of the previous table row - * @return iterator to the table row preceding the referenced table row assuming one exists (it will return -1 if the referenced table row is the first one in the table) - * @pre `iterator` points to an existing table row in the table or it is the end iterator of the table - * @post `*primary` will be replaced with the primary key of the table row preceding the referenced table row if it exists, otherwise `*primary` will be left untouched - */ -int32_t db_idx_double_previous(int32_t iterator, uint64_t* primary); - -/** - * - * Find a table row in a secondary double-precision floating-point index table by primary key - * - * @brief Find a table row in a secondary double-precision floating-point index table by primary key - * @param code - The name of the owner of the table - * @param scope - The scope where the table resides - * @param table - The table name - * @param secondary - Pointer to a `double` variable which will have its value set to the secondary key of the found table row - * @param primary - The primary key of the table row to look up - * @post If and only if the table row is found, `*secondary` will be replaced with the secondary key of the found table row - * @return iterator to the table row with a primary key equal to `id` or the end iterator of the table if the table row could not be found - */ -int32_t db_idx_double_find_primary(account_name code, account_name scope, table_name table, double* secondary, uint64_t primary); - -/** - * - * Find a table row in a secondary double-precision floating-point index table by secondary key - * - * @brief Find a table row in a secondary double-precision floating-point index table by secondary key - * @param code - The name of the owner of the table - * @param scope - The scope where the table resides - * @param table - The table name - * @param secondary - Pointer to secondary key used to lookup the table row - * @param primary - Pointer to a `double` variable which will have its value set to the primary key of the found table row - * @post If and only if the table row is found, `*primary` will be replaced with the primary key of the found table row - * @return iterator to the first table row with a secondary key equal to `*secondary` or the end iterator of the table if the table row could not be found - */ -int32_t db_idx_double_find_secondary(account_name code, account_name scope, table_name table, const double* secondary, uint64_t* primary); - -/** - * - * Find the table row in a secondary double-precision floating-point index table that matches the lowerbound condition for a given secondary key - * The table row that matches the lowerbound condition is the first table row in the table with the lowest secondary key that is >= the given key - * - * @brief Find the table row in a secondary double-precision floating-point index table that matches the lowerbound condition for a given secondary key - * @param code - The name of the owner of the table - * @param scope - The scope where the table resides - * @param table - The table name - * @param secondary - Pointer to secondary key first used to determine the lowerbound and which is then replaced with the secondary key of the found table row - * @param primary - Pointer to a `uint64_t` variable which will have its value set to the primary key of the found table row - * @post If and only if the table row is found, `*secondary` will be replaced with the secondary key of the found table row - * @post If and only if the table row is found, `*primary` will be replaced with the primary key of the found table row - * @return iterator to the found table row or the end iterator of the table if the table row could not be found - */ -int32_t db_idx_double_lowerbound(account_name code, account_name scope, table_name table, double* secondary, uint64_t* primary); - -/** - * - * Find the table row in a secondary double-precision floating-point index table that matches the upperbound condition for a given secondary key - * The table row that matches the upperbound condition is the first table row in the table with the lowest secondary key that is > the given key - * - * @brief Find the table row in a secondary double-precision floating-point index table that matches the upperbound condition for a given secondary key - * @param code - The name of the owner of the table - * @param scope - The scope where the table resides - * @param table - The table name - * @param secondary - Pointer to secondary key first used to determine the upperbound and which is then replaced with the secondary key of the found table row - * @param primary - Pointer to a `uint64_t` variable which will have its value set to the primary key of the found table row - * @post If and only if the table row is found, `*secondary` will be replaced with the secondary key of the found table row - * @post If and only if the table row is found, `*primary` will be replaced with the primary key of the found table row - * @return iterator to the found table row or the end iterator of the table if the table row could not be found - */ -int32_t db_idx_double_upperbound(account_name code, account_name scope, table_name table, double* secondary, uint64_t* primary); - -/** - * - * Get an end iterator representing just-past-the-end of the last table row of a secondary double-precision floating-point index table - * - * @brief Get an end iterator representing just-past-the-end of the last table row of a secondary double-precision floating-point index table - * @param code - The name of the owner of the table - * @param scope - The scope where the table resides - * @param table - The table name - * @return end iterator of the table - */ -int32_t db_idx_double_end(account_name code, account_name scope, table_name table); - -/** - * - * Store an association of a quadruple-precision floating-point secondary key to a primary key in a secondary quadruple-precision floating-point index table - * - * @brief Store an association of a quadruple-precision floating-point secondary key to a primary key in a secondary quadruple-precision floating-point index table - * @param scope - The scope where the table resides (implied to be within the code of the current receiver) - * @param table - The table name - * @param payer - The account that pays for the storage costs - * @param id - The primary key to which to associate the secondary key - * @param secondary - Pointer to the secondary key - * @return iterator to the newly created table row - * @post new secondary key association between primary key `id` and secondary key `*secondary` is created in the secondary quadruple-precision floating-point index table - */ -int32_t db_idx_long_double_store(account_name scope, table_name table, account_name payer, uint64_t id, const long double* secondary); - -/** - * - * Update an association for a quadruple-precision floating-point secondary key to a primary key in a secondary quadruple-precision floating-point index table - * - * @brief Update an association for a quadruple-precision floating-point secondary key to a primary key in a secondary quadruple-precision floating-point index table - * @param iterator - The iterator to the table row containing the secondary key association to update - * @param payer - The account that pays for the storage costs (use 0 to continue using current payer) - * @param secondary - Pointer to the **new** secondary key that will replace the existing one of the association - * @pre `iterator` points to an existing table row in the table - * @post the secondary key of the table row pointed to by `iterator` is replaced by `*secondary` - */ -void db_idx_long_double_update(int32_t iterator, account_name payer, const long double* secondary); - -/** - * - * Remove a table row from a secondary quadruple-precision floating-point index table - * - * @brief Remove a table row from a secondary quadruple-precision floating-point index table - * @param iterator - Iterator to the table row to remove - * @pre `iterator` points to an existing table row in the table - * @post the table row pointed to by `iterator` is removed and the associated storage costs are refunded to the payer - */ -void db_idx_long_double_remove(int32_t iterator); - -/** - * - * Find the table row following the referenced table row in a secondary quadruple-precision floating-point index table - * - * @brief Find the table row following the referenced table row in a secondary quadruple-precision floating-point index table - * @param iterator - The iterator to the referenced table row - * @param primary - Pointer to a `uint64_t` variable which will have its value set to the primary key of the next table row - * @return iterator to the table row following the referenced table row (or the end iterator of the table if the referenced table row is the last one in the table) - * @pre `iterator` points to an existing table row in the table - * @post `*primary` will be replaced with the primary key of the table row following the referenced table row if it exists, otherwise `*primary` will be left untouched - */ -int32_t db_idx_long_double_next(int32_t iterator, uint64_t* primary); - -/** - * - * Find the table row preceding the referenced table row in a secondary quadruple-precision floating-point index table - * - * @brief Find the table row preceding the referenced table row in a secondary quadruple-precision floating-point index table - * @param iterator - The iterator to the referenced table row - * @param primary - Pointer to a `uint64_t` variable which will have its value set to the primary key of the previous table row - * @return iterator to the table row preceding the referenced table row assuming one exists (it will return -1 if the referenced table row is the first one in the table) - * @pre `iterator` points to an existing table row in the table or it is the end iterator of the table - * @post `*primary` will be replaced with the primary key of the table row preceding the referenced table row if it exists, otherwise `*primary` will be left untouched - */ -int32_t db_idx_long_double_previous(int32_t iterator, uint64_t* primary); - -/** - * - * Find a table row in a secondary quadruple-precision floating-point index table by primary key - * - * @brief Find a table row in a secondary quadruple-precision floating-point index table by primary key - * @param code - The name of the owner of the table - * @param scope - The scope where the table resides - * @param table - The table name - * @param secondary - Pointer to a `long double` variable which will have its value set to the secondary key of the found table row - * @param primary - The primary key of the table row to look up - * @post If and only if the table row is found, `*secondary` will be replaced with the secondary key of the found table row - * @return iterator to the table row with a primary key equal to `id` or the end iterator of the table if the table row could not be found - */ -int32_t db_idx_long_double_find_primary(account_name code, account_name scope, table_name table, long double* secondary, uint64_t primary); - -/** - * - * Find a table row in a secondary quadruple-precision floating-point index table by secondary key - * - * @brief Find a table row in a secondary quadruple-precision floating-point index table by secondary key - * @param code - The name of the owner of the table - * @param scope - The scope where the table resides - * @param table - The table name - * @param secondary - Pointer to secondary key used to lookup the table row - * @param primary - Pointer to a `long double` variable which will have its value set to the primary key of the found table row - * @post If and only if the table row is found, `*primary` will be replaced with the primary key of the found table row - * @return iterator to the first table row with a secondary key equal to `*secondary` or the end iterator of the table if the table row could not be found - */ -int32_t db_idx_long_double_find_secondary(account_name code, account_name scope, table_name table, const long double* secondary, uint64_t* primary); - -/** - * - * Find the table row in a secondary quadruple-precision floating-point index table that matches the lowerbound condition for a given secondary key - * The table row that matches the lowerbound condition is the first table row in the table with the lowest secondary key that is >= the given key - * - * @brief Find the table row in a secondary quadruple-precision floating-point index table that matches the lowerbound condition for a given secondary key - * @param code - The name of the owner of the table - * @param scope - The scope where the table resides - * @param table - The table name - * @param secondary - Pointer to secondary key first used to determine the lowerbound and which is then replaced with the secondary key of the found table row - * @param primary - Pointer to a `uint64_t` variable which will have its value set to the primary key of the found table row - * @post If and only if the table row is found, `*secondary` will be replaced with the secondary key of the found table row - * @post If and only if the table row is found, `*primary` will be replaced with the primary key of the found table row - * @return iterator to the found table row or the end iterator of the table if the table row could not be found - */ -int32_t db_idx_long_double_lowerbound(account_name code, account_name scope, table_name table, long double* secondary, uint64_t* primary); - -/** - * - * Find the table row in a secondary quadruple-precision floating-point index table that matches the upperbound condition for a given secondary key - * The table row that matches the upperbound condition is the first table row in the table with the lowest secondary key that is > the given key - * - * @brief Find the table row in a secondary quadruple-precision floating-point index table that matches the upperbound condition for a given secondary key - * @param code - The name of the owner of the table - * @param scope - The scope where the table resides - * @param table - The table name - * @param secondary - Pointer to secondary key first used to determine the upperbound and which is then replaced with the secondary key of the found table row - * @param primary - Pointer to a `uint64_t` variable which will have its value set to the primary key of the found table row - * @post If and only if the table row is found, `*secondary` will be replaced with the secondary key of the found table row - * @post If and only if the table row is found, `*primary` will be replaced with the primary key of the found table row - * @return iterator to the found table row or the end iterator of the table if the table row could not be found - */ -int32_t db_idx_long_double_upperbound(account_name code, account_name scope, table_name table, long double* secondary, uint64_t* primary); - -/** - * - * Get an end iterator representing just-past-the-end of the last table row of a secondary quadruple-precision floating-point index table - * - * @brief Get an end iterator representing just-past-the-end of the last table row of a secondary quadruple-precision floating-point index table - * @param code - The name of the owner of the table - * @param scope - The scope where the table resides - * @param table - The table name - * @return end iterator of the table - */ -int32_t db_idx_long_double_end(account_name code, account_name scope, table_name table); - -///@} databasec -} diff --git a/contracts/eosiolib/dispatcher.hpp b/contracts/eosiolib/dispatcher.hpp deleted file mode 100644 index eadc55bc3e8..00000000000 --- a/contracts/eosiolib/dispatcher.hpp +++ /dev/null @@ -1,155 +0,0 @@ -#pragma once -#include -#include - -#include -#include - -#include -#define N(X) ::eosio::string_to_name(#X) -namespace eosio { - - template - bool dispatch( uint64_t code, uint64_t act ) { - if( code == FirstAction::get_account() && FirstAction::get_name() == act ) { - Contract().on( unpack_action_data() ); - return true; - } - return false; - } - - - /** - * This method will dynamically dispatch an incoming set of actions to - * - * ``` - * static Contract::on( ActionType ) - * ``` - * - * For this to work the Actions must be derived from eosio::contract - * - */ - template - bool dispatch( uint64_t code, uint64_t act ) { - if( code == FirstAction::get_account() && FirstAction::get_name() == act ) { - Contract().on( unpack_action_data() ); - return true; - } - return eosio::dispatch( code, act ); - } - - /** - * @defgroup dispatcher Dispatcher API - * @brief Defines functions to dispatch action to proper action handler inside a contract - * @ingroup contractdev - */ - - /** - * @defgroup dispatchercpp Dispatcher C++ API - * @brief Defines C++ functions to dispatch action to proper action handler inside a contract - * @ingroup dispatcher - * @{ - */ - - /** - * Unpack the received action and execute the correponding action handler - * - * @brief Unpack the received action and execute the correponding action handler - * @tparam T - The contract class that has the correponding action handler, this contract should be derived from eosio::contract - * @tparam Q - The namespace of the action handler function - * @tparam Args - The arguments that the action handler accepts, i.e. members of the action - * @param obj - The contract object that has the correponding action handler - * @param func - The action handler - * @return true - */ - template - bool execute_action( T* obj, void (Q::*func)(Args...) ) { - size_t size = action_data_size(); - - //using malloc/free here potentially is not exception-safe, although WASM doesn't support exceptions - constexpr size_t max_stack_buffer_size = 512; - void* buffer = nullptr; - if( size > 0 ) { - buffer = max_stack_buffer_size < size ? malloc(size) : alloca(size); - read_action_data( buffer, size ); - } - - auto args = unpack...>>( (char*)buffer, size ); - - if ( max_stack_buffer_size < size ) { - free(buffer); - } - - auto f2 = [&]( auto... a ){ - (obj->*func)( a... ); - }; - - boost::mp11::tuple_apply( f2, args ); - return true; - } - /// @} dispatcher - -// Helper macro for EOSIO_API -#define EOSIO_API_CALL( r, OP, elem ) \ - case ::eosio::string_to_name( BOOST_PP_STRINGIZE(elem) ): \ - eosio::execute_action( &thiscontract, &OP::elem ); \ - break; - -// Helper macro for EOSIO_ABI -#define EOSIO_API( TYPE, MEMBERS ) \ - BOOST_PP_SEQ_FOR_EACH( EOSIO_API_CALL, TYPE, MEMBERS ) - -/** - * @addtogroup dispatcher - * @{ - */ - -/** - * Convenient macro to create contract apply handler - * To be able to use this macro, the contract needs to be derived from eosio::contract - * - * @brief Convenient macro to create contract apply handler - * @param TYPE - The class name of the contract - * @param MEMBERS - The sequence of available actions supported by this contract - * - * Example: - * @code - * EOSIO_ABI( eosio::bios, (setpriv)(setalimits)(setglimits)(setprods)(reqauth) ) - * @endcode - */ -#define EOSIO_ABI( TYPE, MEMBERS ) \ -extern "C" { \ - void apply( uint64_t receiver, uint64_t code, uint64_t action ) { \ - auto self = receiver; \ - if( action == N(onerror)) { \ - /* onerror is only valid if it is for the "eosio" code account and authorized by "eosio"'s "active permission */ \ - eosio_assert(code == N(eosio), "onerror action's are only valid from the \"eosio\" system account"); \ - } \ - if( code == self || action == N(onerror) ) { \ - TYPE thiscontract( self ); \ - switch( action ) { \ - EOSIO_API( TYPE, MEMBERS ) \ - } \ - /* does not allow destructor of thiscontract to run: eosio_exit(0); */ \ - } \ - } \ -} \ - /// @} dispatcher - - - /* - template - struct dispatcher { - dispatcher( account_name code ):_contract(code){} - - template - void dispatch( account_name action, FuncPtr ) { - } - - T contract; - }; - - void dispatch( account_name code, account_name action, - */ - -} diff --git a/contracts/eosiolib/eosio.hpp b/contracts/eosiolib/eosio.hpp deleted file mode 100644 index 3e850a69dea..00000000000 --- a/contracts/eosiolib/eosio.hpp +++ /dev/null @@ -1,11 +0,0 @@ -/** - * @file - * @copyright defined in eos/LICENSE.txt - */ -#pragma once -#include -#include -#include -#include -#include -#include diff --git a/contracts/eosiolib/eosiolib.cpp b/contracts/eosiolib/eosiolib.cpp deleted file mode 100644 index 48d80b1037b..00000000000 --- a/contracts/eosiolib/eosiolib.cpp +++ /dev/null @@ -1,558 +0,0 @@ -#include "datastream.hpp" -#include "memory.hpp" -#include "privileged.hpp" - -void* sbrk(size_t num_bytes) { - constexpr uint32_t NBPPL2 = 16U; - constexpr uint32_t NBBP = 65536U; - - static bool initialized; - static uint32_t sbrk_bytes; - if(!initialized) { - sbrk_bytes = __builtin_wasm_current_memory() * NBBP; - initialized = true; - } - - if(num_bytes > INT32_MAX) - return reinterpret_cast(-1); - - //uint32_t num_bytes = (uint32_t)num_bytesI; - const uint32_t prev_num_bytes = sbrk_bytes; - const uint32_t current_pages = __builtin_wasm_current_memory(); - - // round the absolute value of num_bytes to an alignment boundary - num_bytes = (num_bytes + 7U) & ~7U; - - // update the number of bytes allocated, and compute the number of pages needed - const uint32_t num_desired_pages = (sbrk_bytes + num_bytes + NBBP - 1) >> NBPPL2; - - if(num_desired_pages > current_pages) { - //unfortuately clang4 doesn't provide the return code of grow_memory, that's why need - //to go back around and double check current_memory to make sure it has actually grown! - __builtin_wasm_grow_memory(num_desired_pages - current_pages); - if(num_desired_pages != __builtin_wasm_current_memory()) - return reinterpret_cast(-1); - } - - sbrk_bytes += num_bytes; - return reinterpret_cast(prev_num_bytes); -} - -namespace eosio { - - void set_blockchain_parameters(const eosio::blockchain_parameters& params) { - char buf[sizeof(eosio::blockchain_parameters)]; - eosio::datastream ds( buf, sizeof(buf) ); - ds << params; - set_blockchain_parameters_packed( buf, ds.tellp() ); - } - - void get_blockchain_parameters(eosio::blockchain_parameters& params) { - char buf[sizeof(eosio::blockchain_parameters)]; - size_t size = get_blockchain_parameters_packed( buf, sizeof(buf) ); - eosio_assert( size <= sizeof(buf), "buffer is too small" ); - eosio::datastream ds( buf, size_t(size) ); - ds >> params; - } - - using ::memset; - using ::memcpy; - - - - class memory_manager // NOTE: Should never allocate another instance of memory_manager - { - friend void* ::malloc(size_t size); - friend void* ::calloc(size_t count, size_t size); - friend void* ::realloc(void* ptr, size_t size); - friend void ::free(void* ptr); - public: - memory_manager() - // NOTE: it appears that WASM has an issue with initialization lists if the object is globally allocated, - // and seems to just initialize members to 0 - : _heaps_actual_size(0) - , _active_heap(0) - , _active_free_heap(0) - { - } - - private: - class memory; - - memory* next_active_heap() - { - constexpr uint32_t wasm_page_size = 64*1024; - memory* const current_memory = _available_heaps + _active_heap; - - const uint32_t current_memory_size = reinterpret_cast(sbrk(0)); - if(static_cast(current_memory_size) < 0) - return nullptr; - - //grab up to the end of the current WASM memory page provided that it has 1KiB remaining, otherwise - // grow to end of next page - uint32_t heap_adj; - if(current_memory_size % wasm_page_size <= wasm_page_size-1024) - heap_adj = (current_memory_size + wasm_page_size) - (current_memory_size % wasm_page_size) - current_memory_size; - else - heap_adj = (current_memory_size + wasm_page_size*2) - (current_memory_size % (wasm_page_size*2)) - current_memory_size; - char* new_memory_start = reinterpret_cast(sbrk(heap_adj)); - if(reinterpret_cast(new_memory_start) == -1) { - // ensure that any remaining unallocated memory gets cleaned up - current_memory->cleanup_remaining(); - ++_active_heap; - _heaps_actual_size = _active_heap; - return nullptr; - } - - // if we can expand the current memory, keep working with it - if (current_memory->expand_memory(new_memory_start, heap_adj)) - return current_memory; - - // ensure that any remaining unallocated memory gets cleaned up - current_memory->cleanup_remaining(); - - ++_active_heap; - memory* const next = _available_heaps + _active_heap; - next->init(new_memory_start, heap_adj); - - return next; - } - - void* malloc(uint32_t size) - { - if (size == 0) - return nullptr; - - // see Note on ctor - if (_heaps_actual_size == 0) - _heaps_actual_size = _heaps_size; - - adjust_to_mem_block(size); - - // first pass of loop never has to initialize the slot in _available_heap - char* buffer = nullptr; - memory* current = nullptr; - // need to make sure - if (_active_heap < _heaps_actual_size) - { - memory* const start_heap = &_available_heaps[_active_heap]; - // only heap 0 won't be initialized already - if(_active_heap == 0 && !start_heap->is_init()) - { - start_heap->init(_initial_heap, _initial_heap_size); - } - - current = start_heap; - } - - while (current != nullptr) - { - buffer = current->malloc(size); - // done if we have a buffer - if (buffer != nullptr) - break; - - current = next_active_heap(); - } - - if (buffer == nullptr) - { - const uint32_t end_free_heap = _active_free_heap; - - do - { - buffer = _available_heaps[_active_free_heap].malloc_from_freed(size); - - if (buffer != nullptr) - break; - - if (++_active_free_heap == _heaps_actual_size) - _active_free_heap = 0; - - } while (_active_free_heap != end_free_heap); - } - - return buffer; - } - - void* realloc(void* ptr, uint32_t size) - { - if (size == 0) - { - free(ptr); - return nullptr; - } - - adjust_to_mem_block(size); - - char* realloc_ptr = nullptr; - uint32_t orig_ptr_size = 0; - if (ptr != nullptr) - { - char* const char_ptr = static_cast(ptr); - for (memory* realloc_heap = _available_heaps; realloc_heap < _available_heaps + _heaps_actual_size && realloc_heap->is_init(); ++realloc_heap) - { - if (realloc_heap->is_in_heap(char_ptr)) - { - realloc_ptr = realloc_heap->realloc_in_place(char_ptr, size, &orig_ptr_size); - - if (realloc_ptr != nullptr) - return realloc_ptr; - else - break; - } - } - } - - char* new_alloc = static_cast(malloc(size)); - if (new_alloc == nullptr) - return nullptr; - - const uint32_t copy_size = (size < orig_ptr_size) ? size : orig_ptr_size; - if (copy_size > 0) - { - memcpy(new_alloc, ptr, copy_size); - free (ptr); - } - - return new_alloc; - } - - void free(void* ptr) - { - if (ptr == nullptr) - return; - - char* const char_ptr = static_cast(ptr); - for (memory* free_heap = _available_heaps; free_heap < _available_heaps + _heaps_actual_size && free_heap->is_init(); ++free_heap) - { - if (free_heap->is_in_heap(char_ptr)) - { - free_heap->free(char_ptr); - break; - } - } - } - - void adjust_to_mem_block(uint32_t& size) - { - const uint32_t remainder = (size + _size_marker) & _rem_mem_block_mask; - if (remainder > 0) - { - size += _mem_block - remainder; - } - } - - class memory - { - public: - memory() - : _heap_size(0) - , _heap(nullptr) - , _offset(0) - { - } - - void init(char* const mem_heap, uint32_t size) - { - _heap_size = size; - _heap = mem_heap; - } - - uint32_t is_init() const - { - return _heap != nullptr; - } - - uint32_t is_in_heap(const char* const ptr) const - { - const char* const end_of_buffer = _heap + _heap_size; - const char* const first_ptr_of_buffer = _heap + _size_marker; - return ptr >= first_ptr_of_buffer && ptr < end_of_buffer; - } - - uint32_t is_capacity_remaining() const - { - return _offset + _size_marker < _heap_size; - } - - char* malloc(uint32_t size) - { - uint32_t used_up_size = _offset + size + _size_marker; - if (used_up_size > _heap_size) - { - return nullptr; - } - - buffer_ptr new_buff(&_heap[_offset + _size_marker], size, _heap + _heap_size); - _offset += size + _size_marker; - new_buff.mark_alloc(); - return new_buff.ptr(); - } - - char* malloc_from_freed(uint32_t size) - { - eosio_assert(_offset == _heap_size, "malloc_from_freed was designed to only be called after _heap was completely allocated"); - - char* current = _heap + _size_marker; - while (current != nullptr) - { - buffer_ptr current_buffer(current, _heap + _heap_size); - if (!current_buffer.is_alloc()) - { - // done if we have enough contiguous memory - if (current_buffer.merge_contiguous(size)) - { - current_buffer.mark_alloc(); - return current; - } - } - - current = current_buffer.next_ptr(); - } - - // failed to find any free memory - return nullptr; - } - - char* realloc_in_place(char* const ptr, uint32_t size, uint32_t* orig_ptr_size) - { - const char* const end_of_buffer = _heap + _heap_size; - - buffer_ptr orig_buffer(ptr, end_of_buffer); - *orig_ptr_size = orig_buffer.size(); - // is the passed in pointer valid - char* const orig_buffer_end = orig_buffer.end(); - if (orig_buffer_end > end_of_buffer) - { - *orig_ptr_size = 0; - return nullptr; - } - - if (ptr > end_of_buffer - size) - { - // cannot resize in place - return nullptr; - } - - if( *orig_ptr_size > size ) - { - // use a buffer_ptr to allocate the memory to free - char* const new_ptr = ptr + size + _size_marker; - buffer_ptr excess_to_free(new_ptr, *orig_ptr_size - size, _heap + _heap_size); - excess_to_free.mark_free(); - - return ptr; - } - // if ptr was the last allocated buffer, we can expand - else if (orig_buffer_end == &_heap[_offset]) - { - orig_buffer.size(size); - _offset += size - *orig_ptr_size; - - return ptr; - } - if (size == *orig_ptr_size ) - return ptr; - - if (!orig_buffer.merge_contiguous_if_available(size)) - // could not resize in place - return nullptr; - - orig_buffer.mark_alloc(); - return ptr; - } - - void free(char* ptr) - { - buffer_ptr to_free(ptr, _heap + _heap_size); - to_free.mark_free(); - } - - void cleanup_remaining() - { - if (_offset == _heap_size) - return; - - // take the remaining memory and act like it was allocated - const uint32_t size = _heap_size - _offset - _size_marker; - buffer_ptr new_buff(&_heap[_offset + _size_marker], size, _heap + _heap_size); - _offset = _heap_size; - new_buff.mark_free(); - } - - bool expand_memory(char* exp_mem, uint32_t size) - { - if (_heap + _heap_size != exp_mem) - return false; - - _heap_size += size; - - return true; - } - - private: - class buffer_ptr - { - public: - buffer_ptr(void* ptr, const char* const heap_end) - : _ptr(static_cast(ptr)) - , _size(*reinterpret_cast(static_cast(ptr) - _size_marker) & ~_alloc_memory_mask) - , _heap_end(heap_end) - { - } - - buffer_ptr(void* ptr, uint32_t buff_size, const char* const heap_end) - : _ptr(static_cast(ptr)) - , _heap_end(heap_end) - { - size(buff_size); - } - - uint32_t size() const - { - return _size; - } - - char* next_ptr() const - { - char* const next = end() + _size_marker; - if (next >= _heap_end) - return nullptr; - - return next; - } - - void size(uint32_t val) - { - // keep the same state (allocated or free) as was set before - const uint32_t memory_state = *reinterpret_cast(_ptr - _size_marker) & _alloc_memory_mask; - *reinterpret_cast(_ptr - _size_marker) = val | memory_state; - _size = val; - } - - char* end() const - { - return _ptr + _size; - } - - char* ptr() const - { - return _ptr; - } - - void mark_alloc() - { - *reinterpret_cast(_ptr - _size_marker) |= _alloc_memory_mask; - } - - void mark_free() - { - *reinterpret_cast(_ptr - _size_marker) &= ~_alloc_memory_mask; - } - - bool is_alloc() const - { - return *reinterpret_cast(_ptr - _size_marker) & _alloc_memory_mask; - } - - bool merge_contiguous_if_available(uint32_t needed_size) - { - return merge_contiguous(needed_size, true); - } - - bool merge_contiguous(uint32_t needed_size) - { - return merge_contiguous(needed_size, false); - } - private: - bool merge_contiguous(uint32_t needed_size, bool all_or_nothing) - { - // do not bother if there isn't contiguious space to allocate - if( all_or_nothing && uint32_t(_heap_end - _ptr) < needed_size ) - return false; - - uint32_t possible_size = _size; - while (possible_size < needed_size && (_ptr + possible_size < _heap_end)) - { - const uint32_t next_mem_flag_size = *reinterpret_cast(_ptr + possible_size); - // if ALLOCed then done with contiguous free memory - if (next_mem_flag_size & _alloc_memory_mask) - break; - - possible_size += (next_mem_flag_size & ~_alloc_memory_mask) + _size_marker; - } - - if (all_or_nothing && possible_size < needed_size) - return false; - - // combine - const uint32_t new_size = possible_size < needed_size ? possible_size : needed_size; - size(new_size); - - if (possible_size > needed_size) - { - const uint32_t freed_size = possible_size - needed_size - _size_marker; - buffer_ptr freed_remainder(_ptr + needed_size + _size_marker, freed_size, _heap_end); - freed_remainder.mark_free(); - } - - return new_size == needed_size; - } - - char* _ptr; - uint32_t _size; - const char* const _heap_end; - }; - - uint32_t _heap_size; - char* _heap; - uint32_t _offset; - }; - - static const uint32_t _size_marker = sizeof(uint32_t); - // allocate memory in 8 char blocks - static const uint32_t _mem_block = 8; - static const uint32_t _rem_mem_block_mask = _mem_block - 1; - static const uint32_t _initial_heap_size = 8192;//32768; - // if sbrk is not called outside of this file, then this is the max times we can call it - static const uint32_t _heaps_size = 16; - char _initial_heap[_initial_heap_size]; - memory _available_heaps[_heaps_size]; - uint32_t _heaps_actual_size; - uint32_t _active_heap; - uint32_t _active_free_heap; - static const uint32_t _alloc_memory_mask = uint32_t(1) << 31; - }; - - memory_manager memory_heap; - -} /// namespace eosio - -extern "C" { - -void* __dso_handle = 0; - -void* malloc(size_t size) -{ - return eosio::memory_heap.malloc(size); -} - -void* calloc(size_t count, size_t size) -{ - void* ptr = eosio::memory_heap.malloc(count*size); - memset(ptr, 0, count*size); - return ptr; -} - -void* realloc(void* ptr, size_t size) -{ - return eosio::memory_heap.realloc(ptr, size); -} - -void free(void* ptr) -{ - return eosio::memory_heap.free(ptr); -} - -} diff --git a/contracts/eosiolib/fixed_key.hpp b/contracts/eosiolib/fixed_key.hpp deleted file mode 100644 index eb04a45b46c..00000000000 --- a/contracts/eosiolib/fixed_key.hpp +++ /dev/null @@ -1,291 +0,0 @@ -/** - * @file - * @copyright defined in eos/LICENSE.txt - */ -#pragma once - -#include -#include -#include - -#include - -namespace eosio { - - template - class fixed_key; - - template - bool operator==(const fixed_key &c1, const fixed_key &c2); - - template - bool operator!=(const fixed_key &c1, const fixed_key &c2); - - template - bool operator>(const fixed_key &c1, const fixed_key &c2); - - template - bool operator<(const fixed_key &c1, const fixed_key &c2); - - /** - * @defgroup fixed_key Fixed Size Key - * @brief Fixed size key sorted lexicographically for Multi Index Table - * @ingroup types - * @{ - */ - - /** - * Fixed size key sorted lexicographically for Multi Index Table - * - * @brief Fixed size key sorted lexicographically for Multi Index Table - * @tparam Size - Size of the fixed_key object - * @ingroup types - */ - template - class fixed_key { - private: - - template struct bool_pack; - template - using all_true = std::is_same< bool_pack, bool_pack >; - - template - static void set_from_word_sequence(const std::array& arr, fixed_key& key) - { - auto itr = key._data.begin(); - word_t temp_word = 0; - const size_t sub_word_shift = 8 * sizeof(Word); - const size_t num_sub_words = sizeof(word_t) / sizeof(Word); - auto sub_words_left = num_sub_words; - for( auto&& w : arr ) { - if( sub_words_left > 1 ) { - temp_word |= static_cast(w); - temp_word <<= sub_word_shift; - --sub_words_left; - continue; - } - - eosio_assert( sub_words_left == 1, "unexpected error in fixed_key constructor" ); - temp_word |= static_cast(w); - sub_words_left = num_sub_words; - - *itr = temp_word; - temp_word = 0; - ++itr; - } - if( sub_words_left != num_sub_words ) { - if( sub_words_left > 1 ) - temp_word <<= 8 * (sub_words_left-1); - *itr = temp_word; - } - } - - public: - - typedef uint128_t word_t; - - /** - * Get number of words contained in this fixed_key object. A word is defined to be 16 bytes in size - * - * @brief Get number of words contained in this fixed_key object - */ - - static constexpr size_t num_words() { return (Size + sizeof(word_t) - 1) / sizeof(word_t); } - - /** - * Get number of padded bytes contained in this fixed_key object. Padded bytes are the remaining bytes - * inside the fixed_key object after all the words are allocated - * - * @brief Get number of padded bytes contained in this fixed_key object - */ - static constexpr size_t padded_bytes() { return num_words() * sizeof(word_t) - Size; } - - /** - * @brief Default constructor to fixed_key object - * - * @details Default constructor to fixed_key object which initializes all bytes to zero - */ - constexpr fixed_key() : _data() {} - - /** - * @brief Constructor to fixed_key object from std::array of num_words() words - * - * @details Constructor to fixed_key object from std::array of num_words() words - * @param arr data - */ - fixed_key(const std::array& arr) - { - std::copy(arr.begin(), arr.end(), _data.begin()); - } - - /** - * @brief Constructor to fixed_key object from std::array of num_words() words - * - * @details Constructor to fixed_key object from std::array of num_words() words - * @param arr - Source data - */ - template::value && - !std::is_same::value && - sizeof(Word) < sizeof(word_t)>::type > - fixed_key(const std::array& arr) - { - static_assert( sizeof(word_t) == (sizeof(word_t)/sizeof(Word)) * sizeof(Word), - "size of the backing word size is not divisible by the size of the array element" ); - static_assert( sizeof(Word) * NumWords <= Size, "too many words supplied to fixed_key constructor" ); - - set_from_word_sequence(arr, *this); - } - - /** - * @brief Create a new fixed_key object from a sequence of words - * - * @details Create a new fixed_key object from a sequence of words - * @tparam FirstWord - The type of the first word in the sequence - * @tparam Rest - THe type of the remaining words in the sequence - * @param first_word - The first word in the sequence - * @param rest - The remaining words in the sequence - */ - template - static - fixed_key - make_from_word_sequence(typename std::enable_if::value && - !std::is_same::value && - sizeof(FirstWord) <= sizeof(word_t) && - all_true<(std::is_same::value)...>::value, - FirstWord>::type first_word, - Rest... rest) - { - static_assert( sizeof(word_t) == (sizeof(word_t)/sizeof(FirstWord)) * sizeof(FirstWord), - "size of the backing word size is not divisible by the size of the words supplied as arguments" ); - static_assert( sizeof(FirstWord) * (1 + sizeof...(Rest)) <= Size, "too many words supplied to make_from_word_sequence" ); - - fixed_key key; - set_from_word_sequence(std::array{{ first_word, rest... }}, key); - return key; - } - - /** - * Get the contained std::array - * @brief Get the contained std::array - */ - const auto& get_array()const { return _data; } - - /** - * Get the underlying data of the contained std::array - * @brief Get the underlying data of the contained std::array - */ - auto data() { return _data.data(); } - - /** - * Get the underlying data of the contained std::array - * @brief Get the underlying data of the contained std::array - */ - auto data()const { return _data.data(); } - - /** - * Get the size of the contained std::array - * @brief Get the size of the contained std::array - */ - auto size()const { return _data.size(); } - - - /** - * Extract the contained data as an array of bytes - * @brief Extract the contained data as an array of bytes - * @return - the extracted data as array of bytes - */ - std::array extract_as_byte_array()const { - std::array arr; - - const size_t num_sub_words = sizeof(word_t); - - auto arr_itr = arr.begin(); - auto data_itr = _data.begin(); - - for( size_t counter = _data.size(); counter > 0; --counter, ++data_itr ) { - size_t sub_words_left = num_sub_words; - - if( counter == 1 ) { // If last word in _data array... - sub_words_left -= padded_bytes(); - } - auto temp_word = *data_itr; - for( ; sub_words_left > 0; --sub_words_left ) { - *(arr_itr + sub_words_left - 1) = static_cast(temp_word & 0xFF); - temp_word >>= 8; - } - arr_itr += num_sub_words; - } - - return arr; - } - - // Comparison operators - friend bool operator== <>(const fixed_key &c1, const fixed_key &c2); - - friend bool operator!= <>(const fixed_key &c1, const fixed_key &c2); - - friend bool operator> <>(const fixed_key &c1, const fixed_key &c2); - - friend bool operator< <>(const fixed_key &c1, const fixed_key &c2); - - private: - - std::array _data; - }; - - /** - * @brief Compares two fixed_key variables c1 and c2 - * - * @details Lexicographically compares two fixed_key variables c1 and c2 - * @param c1 - First fixed_key object to compare - * @param c2 - Second fixed_key object to compare - * @return if c1 == c2, return true, otherwise false - */ - template - bool operator==(const fixed_key &c1, const fixed_key &c2) { - return c1._data == c2._data; - } - - /** - * @brief Compares two fixed_key variables c1 and c2 - * - * @details Lexicographically compares two fixed_key variables c1 and c2 - * @param c1 - First fixed_key object to compare - * @param c2 - Second fixed_key object to compare - * @return if c1 != c2, return true, otherwise false - */ - template - bool operator!=(const fixed_key &c1, const fixed_key &c2) { - return c1._data != c2._data; - } - - /** - * @brief Compares two fixed_key variables c1 and c2 - * - * @details Lexicographically compares two fixed_key variables c1 and c2 - * @param c1 - First fixed_key object to compare - * @param c2 - Second fixed_key object to compare - * @return if c1 > c2, return true, otherwise false - */ - template - bool operator>(const fixed_key& c1, const fixed_key& c2) { - return c1._data > c2._data; - } - - /** - * @brief Compares two fixed_key variables c1 and c2 - * - * @details Lexicographically compares two fixed_key variables c1 and c2 - * @param c1 - First fixed_key object to compare - * @param c2 - Second fixed_key object to compare - * @return if c1 < c2, return true, otherwise false - */ - template - bool operator<(const fixed_key &c1, const fixed_key &c2) { - return c1._data < c2._data; - } - /// @} fixed_key - - typedef fixed_key<32> key256; -} diff --git a/contracts/eosiolib/fixedpoint.hpp b/contracts/eosiolib/fixedpoint.hpp deleted file mode 100644 index 8c36f5ea54b..00000000000 --- a/contracts/eosiolib/fixedpoint.hpp +++ /dev/null @@ -1,922 +0,0 @@ -#pragma once -#include -#include - -namespace eosio -{ - /** - * @defgroup fixedpoint Fixed Point - * @ingroup mathcppapi - * @brief 32,64,128,256 bits version of fixed point variables - * - * Floating point operations are indeterministic, hence is prevented in smart contract. - * The smart contract developers should use the appropriate Fixed_Point template class - * by passing the number to be represented in integer format and the number of decimals - * required. - * These template classes also support the arithmetic operations and basic comparison operators - * @{ - */ - - // Some forward declarations - template struct fixed_point32; - template struct fixed_point64; - template struct fixed_point128; - - // Will support fixed_point256 in next release -#if 0 - template struct fixed_point256; - /** - * @defgroup Template class for Fixed Point 256 bits representaton - * @ingroup contractdev - * @brief Template param Q is the Q factor i.e. number of decimals - * - */ - template - struct fixed_point256 - { - int128_t val; - fixed_point256(int256_t v=0) : val(v) {} - template fixed_point256(const fixed_point256 &r); - template fixed_point256(const fixed_point128 &r); - template fixed_point256(const fixed_point64 &r); - template fixed_point256(const fixed_point32 &r); - /** - * Get the integer part of the 64 bit fixed number - * @brief To get the integer part of the fixed number - * @return Returns integer part of the fixed number - * - * Example: - * @code - * fixed64<18> a(1234.455667) - * std::cout << a.int_part(); // Output: 1234 - * @endcode - */ - int128_t int_part() const { - return val >> q; - } - - /** - * Get the decimal part of the 64 bit fixed number - * @brief To get the decimal part of the fixed number - * @return Returns decimal part of the fixed number - * - * Example: - * @code - * fixed64<18> a(1234.455667) - * std::cout << a.decimal_part(); // Output: 45567 - * @endcode - */ - uint128_t frac_part() const { - if(!Q) return 0; - return val << (32-Q); - } - - - - template fixed_point256 &operator=(const fixed_point32 &r); - template fixed_point256 &operator=(const fixed_point64 &r); - template fixed_point256 &operator=(const fixed_point128 &r); - template fixed_point256 &operator=(const fixed_point256 &r); - // Comparison functions - template bool operator==(const fixed_point256 &r) { return (val == r.val);} - template bool operator>(const fixed_point256 &r) { return (val > r.val);} - template bool operator<(const fixed_point256 &r) { return (val < r.val);} - }; -#endif - - /** - * The template param Q represents the Q Factor i.e number of decimals - * - * @brief 128 bits representation of Fixed Point class. - * - * Example: - * @code - * fixed_point128<6> a(123232.455667233) - * fixed_point128<0> a(123424) - * fixed_point128<18> c = a*b; - * fixed_point128<24> d = a+b+c; - * fixed_point128<24> e = b/a; - * @endcode - */ - template - struct fixed_point128 - { - static_assert(Q < 128, "Maximum number of decimals supported in fixed_point128 is 128 decimals"); - - /** - * @brief Value of the fixed point represented as int128_t - * - * Value of the fixed point represented as int128_t - */ - int128_t val; - - /** - * Various constructors for fixed_point128. Can create fixed_point128 instance from an int128_t, fixed_point128,64,32 instance - * - * @brief Various constructors for fixed_point128 - * - * Example: - * @code - * fixed_point64<18> a(1234.455667); - * fixed_point128<3> b(a); - * fixed_point32<6> b(13324.32323); - * fixed_point128<5> c(a); - * @endcode - */ - - /** - * Construct a new fixed point128 object from int128_t - * - * @brief Construct a new fixed point128 object - * @param v - int128_t representation of the fixed point value - */ - fixed_point128(int128_t v=0) : val(v) {} - - /** - * Construct a new fixed point128 object from another fixed_point128 - * - * @brief Construct a new fixed point128 object from another fixed_point128 - * @param r - Another fixed_point128 as source - */ - template fixed_point128(const fixed_point128 &r); - - /** - * Construct a new fixed point128 object from another fixed_point64 - * - * @brief Construct a new fixed point128 object from another fixed_point64 - * @param r -fixed_point64 as source - */ - template fixed_point128(const fixed_point64 &r); - - /** - * Construct a new fixed point128 object from another fixed_point32 - * - * @brief Construct a new fixed point128 object from another fixed_point32 - * @param r -fixed_point32 as source - */ - template fixed_point128(const fixed_point32 &r); - - /** - * Get the integer part of the 64 bit fixed number - * - * @brief To get the integer part of the fixed number - * @return Returns integer part of the fixed number - * - * Example: - * @code - * fixed_point64<5> a(1234.455667) - * std::cout << a.int_part(); // Output: 1234 - * @endcode - */ - int128_t int_part() const { - return val >> Q; - } - - /** - * Get the decimal part of the 64 bit fixed number - * - * @brief To get the decimal part of the fixed number - * @return Returns decimal part of the fixed number - * - * Example: - * @code - * fixed_point128<3> a(1234.455667) - * std::cout << a.decimal_part(); // Output: 455 - * @endcode - */ - uint128_t frac_part() const { - if(!Q) return 0; - return uint128_t(val << (32-Q)); - } - - /** - * Prints the fixed point value - * - * @brief Prints the fixed point value - */ - void print() const { - uint128_t ip((uint128_t)int_part()); - uint128_t fp(frac_part()); - printui128(&ip); - prints("."); - printui128(&fp); - } - - // Various assignment operators - /** - * Assignment operator. Assign fixed_point32 to fixed_point128 - * - * @brief Assignment operator - * @tparam qr - Precision of the source - * @param r - Source - * @return fixed_point128& - Reference to this object - */ - template fixed_point128 &operator=(const fixed_point32 &r); - /** - * Assignment operator. Assign fixed_point32 to fixed_point64 - * - * @brief Assignment operator - * @tparam qr - Precision of the source - * @param r - Source - * @return fixed_point128& - Reference to this object - */ - template fixed_point128 &operator=(const fixed_point64 &r); - /** - * Assignment operator. Assign fixed_point32 to fixed_point32 - * - * @brief Assignment operator - * @tparam qr - Precision of the source - * @param r - Source - * @return fixed_point128& - Reference to this object - */ - template fixed_point128 &operator=(const fixed_point128 &r); - - // Comparison functions - /** - * Equality operator - * - * @brief Equality operator - * @tparam qr - Precision of the source - * @param r - Source - * @return true - if equal - * @return false - otherwise - */ - template bool operator==(const fixed_point128 &r) { return (val == r.val);} - - /** - * Greater than operator - * - * @brief Greater than operator - * @tparam qr - Precision of the source - * @param r - Source - * @return true - if equal - * @return false - otherwise - */ - template bool operator>(const fixed_point128 &r) { return (val > r.val);} - - /** - * Less than operator - * - * @brief Less than operator - * @tparam qr - Precision of the source - * @param r - Source - * @return true - if equal - * @return false - otherwise - */ - template bool operator<(const fixed_point128 &r) { return (val < r.val);} - }; - - - /** - * @brief 64 bits representation of Fixed Point class. - * - * Example: - * @code - * fixed_point64<6> a(123232.455667233) - * fixed_point64<0> a(123424) - * fixed_point64<18> c = a*b; - * fixed_point64<24> d = a+b+c; - * fixed_point64<24> e = b/a; - * @endcode - */ - template - struct fixed_point64 - { - static_assert(Q < 128, "Maximum number of decimals supported in fixed_point64 is 128 decimals"); - - /** - * @brief Value of the fixed point represented as int64_t - * - * Value of the fixed point represented as int64_t - */ - int64_t val; - - /** - * Construct a new fixed point64 object from int64_t - * - * @brief Construct a new fixed point64 object - * @param v - int64_t representation of the fixed point value - */ - fixed_point64(int64_t v=0) : val(v) {} - - /** - * Construct a new fixed point64 object from another fixed_point64 - * - * @brief Construct a new fixed point64 object from another fixed_point64 - * @param r - Another fixed_point64 as source - */ - template fixed_point64(const fixed_point64 &r); - - /** - * Construct a new fixed point64 object from another fixed_point32 - * - * @brief Construct a new fixed point64 object from another fixed_point32 - * @param r - fixed_point64 as source - */ - template fixed_point64(const fixed_point32 &r); - - /** - * Get the integer part of the 64 bit fixed number - * @brief To get the integer part of the fixed number - * @return Returns integer part of the fixed number - * - * Example: - * @code - * fixed_point64<18> a(1234.455667) - * std::cout << a.int_part(); // Output: 1234 - * @endcode - */ - int64_t int_part() const { - return val >> Q; - } - - /** - * Get the decimal part of the 64 bit fixed number - * @brief To get the decimal part of the fixed number - * @return Returns decimal part of the fixed number - * - * Example: - * @code - * fixed64<3> a(1234.455667) - * std::cout << a.decimal_part(); // Output: 455 - * @endcode - */ - uint64_t frac_part() const { - if(!Q) return 0; - return uint64_t(val << (32-Q)); - } - - /** - * Prints the fixed point value - * - * @brief Prints the fixed point value - */ - void print() const { - printi(int_part()); - prints("."); - printi128(frac_part()); - } - - // Various assignment operators - /** - * Assignment operator. Assign fixed_point32 to fixed_point64 - * - * @brief Assignment operator - * @tparam QR - Precision of the source - * @param r - Source - * @return fixed_point64& - Reference to this object - */ - template fixed_point64 &operator=(const fixed_point32 &r); - - /** - * Assignment operator. Assign fixed_point64 to fixed_point64 - * - * @brief Assignment operator - * @tparam QR - Precision of the source - * @param r - Source - * @return fixed_point64& - Reference to this object - */ - template fixed_point64 &operator=(const fixed_point64 &r); - - // Arithmetic operations - /** - * Addition operator - * - * @brief Addition operator - * @tparam QR - Precision of the second addend - * @param r - Second addend - * @return - The result of addition - */ - template fixed_point64< (Q>QR)?Q:QR > operator+(const fixed_point64 &r) const; - - /** - * Subtraction operator - * - * @brief Subtraction operator - * @tparam QR - Precision of the minuend - * @param r - Minuend - * @return - The result of subtraction - */ - template fixed_point64< (Q>QR)?Q:QR > operator-(const fixed_point64 &r) const; - - // product and division of two fixed_point64 instances will be fixed_point128 - // The total number of decimals will be the max - /** - * Multiplication operator - * - * @brief Multiplication operator - * @tparam QR - Precision of the multiplier - * @param r - Multiplier - * @return - The result of multiplication - */ - template fixed_point128 operator*(const fixed_point64 &r) const; - - /** - * Division operator - * - * @brief Division operator - * @tparam QR - Precision of the divisor - * @param r - Divisor - * @return - The result of division - */ - template fixed_point128 operator/(const fixed_point64 &r) const; - - // Comparison functions - /** - * Equality operator - * - * @brief Equality operator - * @tparam QR - Precision of the source - * @param r - Source - * @return true - if equal - * @return false - otherwise - */ - template bool operator==(const fixed_point64 &r) { return (val == r.val);} - - /** - * Greater than operator - * - * @brief Greater than operator - * @tparam QR - Precision of the source - * @param r - Source - * @return true - if equal - * @return false - otherwise - */ - template bool operator>(const fixed_point64 &r) { return (val > r.val);} - - /** - * Less than operator - * - * @brief Less than operator - * @tparam QR - Precision of the source - * @param r - Source - * @return true - if equal - * @return false - otherwise - */ - template bool operator<(const fixed_point64 &r) { return (val < r.val);} - }; - - /** - * @brief 32 bits representation of Fixed Point class. - * - * This class is implemented to to replace the floating point variables - * It can resolve floating point undetermenistic related issues - * - * Example: - * @code - * - * fixed_point32<17> b(9.654); - * fixed_point32<18> c = a*b; - * fixed_point32<24> d = a+b+c; - * fixed_point32<24> e = b/a; - * @endcode - * - */ - // fixed_point 32 bit version. The template param 'q' is the scale factor - template - struct fixed_point32 - { - static_assert(Q < 128, "Maximum number of decimals supported in fixed_point32 is 128 decimals"); - - /** - * @brief Value of the fixed point represented as int32_t - * - * Value of the fixed point represented as int32_t - */ - int32_t val; - - /** - * Construct a new fixed point32 object from another fixed_point32 - * - * @brief Construct a new fixed point32 object from another fixed_point32 - * @param r - Another fixed_point32 as source - */ - template fixed_point32(const fixed_point32 &r); - - /** - * Construct a new fixed point32 object from another fixed_point64. It will be truncated. - * - * @brief Construct a new fixed point32 object from another fixed_point64 - * @param r - Another fixed_point32 as source - */ - template fixed_point32(const fixed_point64 &r); - - - /** - * Construct a new fixed point32 object from int32_t - * - * @brief Construct a new fixed point32 object - * @param param - int32_t representation of the fixed point value - */ - fixed_point32(int32_t param=0) : val(param) {} - - // translates given double variable to the int32 based on the scale factor - // fixed_point32(double d=0) : val(d * (1< a(1234.455667) - * std::cout << a.int_part(); // Output: 1234 - * @endcode - */ - int32_t int_part() const { - return val >> Q; - } - uint32_t frac_part() const { - if(!Q) return 0; - return uint32_t(val << (32-Q)); - } - - /** - * Prints the fixed point value - * - * @brief Prints the fixed point value - */ - void print() const { - printi(int_part()); - prints("."); - printi128(frac_part()); - } - - // Various assignment operators - /** - * Assignment operator. Assign fixed_point32 to fixed_point32 - * - * @brief Assignment operator - * @tparam QR - Precision of the source - * @param r - Source - * @return fixed_point32& - Reference to this object - */ - template fixed_point32 &operator=(const fixed_point32 &r); - - /** - * Assignment operator. Assign fixed_point64 to fixed_point32 - * - * @brief Assignment operator - * @tparam QR - Precision of the source - * @param r - Source - * @return fixed_point32& - Reference to this object - */ - template fixed_point32 &operator=(const fixed_point64 &r); - - /** - * Addition operator - * - * @brief Addition operator - * @tparam QR - Precision of the second addend - * @param r - Second addend - * @return - The result of addition - */ - template fixed_point32< (Q>QR)?Q:QR > operator+(const fixed_point32 &r) const; - - /** - * Subtraction operator - * - * @brief Subtraction operator - * @tparam QR - Precision of the minuend - * @param r - Minuend - * @return - The result of subtraction - */ - template fixed_point32< (Q>QR)?Q:QR > operator-(const fixed_point32 &r) const; - - // productd of to fixed_point32 instances will be fixed_point64 - /** - * Multiplication operator - * - * @brief Multiplication operator - * @tparam QR - Precision of the multiplier - * @param r - Multiplier - * @return - The result of multiplication - */ - template fixed_point64 operator*(const fixed_point32 &r) const; - - /** - * Division operator - * - * @brief Division operator - * @tparam QR - Precision of the divisor - * @param r - Divisor - * @return - The result of division - */ - template fixed_point64 operator/(const fixed_point32 &r) const; - - // Comparison functions - /** - * Equality operator - * - * @brief Equality operator - * @tparam QR - Precision of the source - * @param r - Source - * @return true - if equal - * @return false - otherwise - */ - template bool operator==(const fixed_point32 &r) { return (val == r.val);} - - /** - * Greater than operator - * - * @brief Greater than operator - * @tparam QR - Precision of the source - * @param r - Source - * @return true - if equal - * @return false - otherwise - */ - template bool operator>(const fixed_point32 &r) { return (val > r.val);} - - /** - * Less than operator - * - * @brief Less than operator - * @tparam QR - Precision of the source - * @param r - Source - * @return true - if equal - * @return false - otherwise - */ - template bool operator<(const fixed_point32 &r) { return (val < r.val);} - }; - - - /// @} fixedpoint - - // Helper functions - template - T assignHelper(T rhs_val, uint8_t q, uint8_t qr) - { - T result = (q > qr) ? rhs_val << (q-qr) : rhs_val >> (qr-q); - return result; - } - - -#if 0 - // fixed_point256 methods - template template - fixed_point256::fixed_point256(const fixed_point256 &r) { - val = assignHelper(r.val, q, qr); - } - - template template - fixed_point256::fixed_point256(const fixed_point128 &r) { - val = assignHelper(r.val, q, qr); - } - - template template - fixed_point256::fixed_point256(const fixed_point64 &r) { - val = assignHelper(r.val, q, qr); - } - - template template - fixed_point256::fixed_point256(const fixed_point32 &r) { - val = assignHelper(r.val, q, qr); - } -#endif - - // fixed_point128 methods - template template - fixed_point128::fixed_point128(const fixed_point128 &r) { - val = assignHelper(r.val, Q, QR); - } - - template template - fixed_point128::fixed_point128(const fixed_point64 &r) { - val = assignHelper(r.val, Q, QR); - } - - template template - fixed_point128::fixed_point128(const fixed_point32 &r) { - val = assignHelper(r.val, Q, QR); - } - - - // fixed_point64 methods - template template - fixed_point64::fixed_point64(const fixed_point64 &r) { - val = assignHelper(r.val, Q, QR); - } - - template template - fixed_point64::fixed_point64(const fixed_point32 &r) { - val = assignHelper(r.val, Q, QR); - } - - /** - * @brief Addition between two fixed_point64 variables and the result goes to fixed_point64 - * - * Addition between two fixed_point64 variables - * Number of decimal on result will be max of decimals of lhs and rhs - */ - template template - fixed_point64< (Q>QR)?Q:QR > fixed_point64::operator+(const fixed_point64 &rhs) const - { - // if the scaling factor for both are same, no need to make any intermediate objects except the result - if(Q == QR) - { - return fixed_point64(val + rhs.val); - } - return fixed_point64<(Q>QR)?Q:QR>( - fixed_point64<(Q>QR)?Q:QR>( *this ).val + - fixed_point64<(Q>QR)?Q:QR>( rhs ).val - ); - } - - /** - * @brief Subtraction between two fixed_point64 variables and the result goes to fixed_point64 - * - * Subtraction between two fixed_point64 variables - * Number of decimal on result will be max of decimals of lhs and rhs - */ - template template - fixed_point64< (Q>QR)?Q:QR > fixed_point64::operator-(const fixed_point64 &rhs) const - { - // if the scaling factor for both are same, no need to make any intermediate objects except the result - if(Q == QR) - { - return fixed_point64(val - rhs.val); - } - return fixed_point64<(Q>QR)?Q:QR>( - fixed_point64<(Q>QR)?Q:QR>( *this ).val - - fixed_point64<(Q>QR)?Q:QR>( rhs ).val - ); - } - - /** - * @brief Multiplication operator for fixed_point64. The result goes to fixed_point64 - * - * Multiplication operator for fixed_point64. The result goes to fixed_point128 - * Number of decimal on result will be sum of number of decimals of lhs and rhs - * - * Example: - * @code - * fixed_point128<33> result = fixed_point64<0>(131313) / fixed_point64<0>(2323) - * @endcode - */ - template template - fixed_point128 fixed_point64::operator*(const fixed_point64 &r) const { - return fixed_point128(int128_t(val)*r.val); - } - - /** - * @brief Division of two fixed_point64 result will be stored in fixed_point128 - * - * Division operator for fixed_point64 - * - * Example: - * @code - * fixed_point128<33> result = fixed_point64<0>(131313) / fixed_point64<0>(2323) - * @endcode - */ - template template - fixed_point128 fixed_point64::operator/(const fixed_point64 &r) const { - // std::cout << "Performing division on " << val << ", with " << q << " precision / " << r.val << ", with " << qr << " precision. Result precision " << ((q>qr) ? q:qr) << std::endl; - // Convert val to 128 bit by additionally shifting 64 bit and take the result to 128bit - // Q(X+64-Y) = Q(X+64) / Q(Y) - eosio_assert( !(r.int_part() == 0 && r.frac_part() == 0), "divide by zero" ); - return fixed_point128((int128_t(val)<<64)/r.val); - } - - // fixed_point32 methods - template template - fixed_point32::fixed_point32(const fixed_point32 &r) { - val = assignHelper(r.val, Q, QR); - } - - template template - fixed_point32::fixed_point32(const fixed_point64 &r) { - val = assignHelper(r.val, Q, QR); - } - - template template - fixed_point32 &fixed_point32::operator=(const fixed_point32 &r) { - val = assignHelper(r.val, Q, QR); - } - - template template - fixed_point32 &fixed_point32::operator=(const fixed_point64 &r) { - val = assignHelper(r.val, Q, QR); - } - - /** - * @brief Addition between two fixed_point32 variables and the result goes to fixed_point32 - * - * Addition between two fixed_point32 variables - * Number of decimal on result will be max of decimals of lhs and rhs - * - */ - template template - fixed_point32< (Q>QR)?Q:QR > fixed_point32::operator+(const fixed_point32 &rhs) const - { - // if the scaling factor for both are same, no need to make any intermediate objects except the result - if(Q == QR) - { - return fixed_point32(val + rhs.val); - } - return fixed_point32<(Q>QR)?Q:QR>( - fixed_point32<(Q>QR)?Q:QR>( *this ).val + - fixed_point32<(Q>QR)?Q:QR>( rhs ).val - ); - } - - /** - * @brief Subtraction between two fixed_point32 variables and the result goes to fixed_point32 - * - * Subtraction between two fixed_point32 variables - * Number of decimal on result will be max of decimals of lhs and rhs - * - */ - template template - fixed_point32< (Q>QR)?Q:QR > fixed_point32::operator-(const fixed_point32 &rhs) const - { - // if the scaling factor for both are same, no need to make any intermediate objects except the result - if(Q == QR) - { - return fixed_point32(val - rhs.val); - } - return fixed_point32<(Q>QR)?Q:QR>( - fixed_point32<(Q>QR)?Q:QR>( *this ).val - - fixed_point32<(Q>QR)?Q:QR>( rhs ).val - ); - } - - /** - * @brief Multiplication operator for fixed_point32. The result goes to fixed_point64 - * - * Multiplication operator for fixed_point32. The result goes to fixed_point64 - * Number of decimal on result will be sum of number of decimals of lhs and rhs - * - * Example: - * @code - * fixed_point64<33> result = fixed_point32<0>(131313) / fixed_point32<0>(2323) - * @endcode - */ - template template - fixed_point64 fixed_point32::operator*(const fixed_point32 &r) const { - return fixed_point64(int64_t(val)*r.val); - } - - /** - * @brief Division of two fixed_point32 result will be stored in fixed_point64 - * - * Division operator for fixed_point32 - * - * Example: - * @code - * fixed_point64<33> result = fixed_point32<0>(131313) / fixed_point32<0>(2323) - * @endcode - */ - template template - fixed_point64 fixed_point32::operator/(const fixed_point32 &r) const { - // Convert val into 64 bit and perform the division - // Q(X+32-Y) = Q(X+32) / Q(Y) - eosio_assert( !(r.int_part() == 0 && r.frac_part() == 0), "divide by zero" ); - return fixed_point64((int64_t(val)<<32)/r.val); - } - - /** - * @brief Wrapper function for dividing two unit64 variable and stores result in fixed_point64 - * - * Wrapper function for dividing two unit32 variable and stores result in fixed_point64 - * - * Example: - * @code - * fixed_point64<33> result = fixed_divide(131313, 2323) - * @endcode - */ - template - fixed_point64 fixed_divide(uint32_t lhs, uint32_t rhs) - { - - eosio_assert( rhs != 0, "divide by zero" ); - fixed_point64 result = fixed_point32<0>((int32_t)lhs) / fixed_point32<0>((int32_t)rhs); - return result; - } - - /** - * @brief Wrapper function for dividing two unit64 variable and stores result in fixed_point128 - * Wrapper function for dividing two unit64 variable and stores result in fixed_point128 - * - * Example: - * @code - * fixed_point128<33> result = fixed_divide(131313, 2323) - * @endcode - */ - - template - fixed_point128 fixed_divide(uint64_t lhs, uint64_t rhs) - { - - eosio_assert( rhs != 0, "divide by zero" ); - fixed_point128 result = fixed_point64<0>((int32_t)lhs) / fixed_point64<0>((int32_t)rhs); - return fixed_point128(result); - } - - -}; diff --git a/contracts/eosiolib/mainpage.md b/contracts/eosiolib/mainpage.md deleted file mode 100644 index e9c9d0cd8a6..00000000000 --- a/contracts/eosiolib/mainpage.md +++ /dev/null @@ -1,20 +0,0 @@ -Welcome to the EOS.IO Documentation ------------------------------------ - -@note This documentation is in progress and subject to change due to rapid development. Please report inaccuracies identified to the [EOS.IO Developer Telegram Group](https://t.me/joinchat/EaEnSUPktgfoI-XPfMYtcQ) - -## EOS.IO - - [Additional resources - Github Readme](https://github.com/EOSIO/eos#readme) - -## Smart Contract Developers -- @ref eosiorpc -- @ref contractdev - - @ref chainapi - Define API for querying internal chain state - - @ref database - APIs that store and retreive data on the blockchainEOS.IO organizes data according to the following broad structure - - @ref actionapi - Defines API for querying action properties - - @ref consoleapi - Enables applications to log/print text messages - - @ref systemapi - Define API for interating with system level intrinsics - - @ref transactionapi - Define API for sending transactions and inline messages - - @ref types - Specifies typedefs and aliases - - diff --git a/contracts/eosiolib/memory.h b/contracts/eosiolib/memory.h deleted file mode 100644 index 58e5a482b3d..00000000000 --- a/contracts/eosiolib/memory.h +++ /dev/null @@ -1,8 +0,0 @@ -/** - * @file - * @copyright defined in eos/LICENSE.txt - */ -#pragma once - -#include -#include diff --git a/contracts/eosiolib/memory.hpp b/contracts/eosiolib/memory.hpp deleted file mode 100644 index 4a4f56a1c48..00000000000 --- a/contracts/eosiolib/memory.hpp +++ /dev/null @@ -1,68 +0,0 @@ -/** - * @file - * @copyright defined in eos/LICENSE.txt - */ -#pragma once - -#include -#include - -void* sbrk(size_t num_bytes); - - /** - * @defgroup memoryapi Memory API - * @brief Defines common memory functions - * @ingroup contractdev - */ - - /** - * @defgroup memorycppapi Memory C++ API - * @brief Defines common memory functions - * @ingroup memoryapi - * - * @{ - */ - -extern "C" { - -/** - * Allocate additional memory - * - * @brief Allocate additional memory - * @param size - Number of additional bytes to be allocated - * @return void* - Pointer to start of the new allocated memory - */ -void* malloc(size_t size); - -/** - * Allocate a block of memory for an array of **count** elements, each of them **size** bytes long, and initializes all bits with 0 - * - * @brief Allocate a block of memory for an array of **count** elements, each of them **size** bytes long, and initializes all bits with 0 - * @param count - Number of elements to allocate - * @param size - Size of each element - * @return void* - Pointer to start of the new allocated memory - */ -void* calloc(size_t count, size_t size); - -/** - * Reallocate the given area of memory, which is allocated by malloc(), calloc(), or realloc() previously - * - * @brief Reallocate the given area of memory - * @param ptr - Pointer to the memory area to be reallocated - * @param size - New size of the memory - * @return void* - Pointer to the new reallocated memory - */ -void* realloc(void* ptr, size_t size); - -/** - * - * Deallocates the given area of memory which is previously allocated by malloc(), calloc(), or realloc() - * @brief Deallocates the given area of memory - * - * @param ptr - Pointer to the memory to be deallocated - */ -void free(void* ptr); - -} - -/// @}memorycppapi diff --git a/contracts/eosiolib/multi_index.hpp b/contracts/eosiolib/multi_index.hpp deleted file mode 100644 index d7082559059..00000000000 --- a/contracts/eosiolib/multi_index.hpp +++ /dev/null @@ -1,2183 +0,0 @@ -/** - * @file - * @copyright defined in eos/LICENSE.txt - */ -#pragma once - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -#include -#include -#include -#include -#include -#include - -namespace eosio { - -using boost::multi_index::const_mem_fun; - -#define WRAP_SECONDARY_SIMPLE_TYPE(IDX, TYPE)\ -template<>\ -struct secondary_index_db_functions {\ - static int32_t db_idx_next( int32_t iterator, uint64_t* primary ) { return db_##IDX##_next( iterator, primary ); }\ - static int32_t db_idx_previous( int32_t iterator, uint64_t* primary ) { return db_##IDX##_previous( iterator, primary ); }\ - static void db_idx_remove( int32_t iterator ) { db_##IDX##_remove( iterator ); }\ - static int32_t db_idx_end( uint64_t code, uint64_t scope, uint64_t table ) { return db_##IDX##_end( code, scope, table ); }\ - static int32_t db_idx_store( uint64_t scope, uint64_t table, uint64_t payer, uint64_t id, const TYPE& secondary ) {\ - return db_##IDX##_store( scope, table, payer, id, &secondary );\ - }\ - static void db_idx_update( int32_t iterator, uint64_t payer, const TYPE& secondary ) {\ - db_##IDX##_update( iterator, payer, &secondary );\ - }\ - static int32_t db_idx_find_primary( uint64_t code, uint64_t scope, uint64_t table, uint64_t primary, TYPE& secondary ) {\ - return db_##IDX##_find_primary( code, scope, table, &secondary, primary );\ - }\ - static int32_t db_idx_find_secondary( uint64_t code, uint64_t scope, uint64_t table, const TYPE& secondary, uint64_t& primary ) {\ - return db_##IDX##_find_secondary( code, scope, table, &secondary, &primary );\ - }\ - static int32_t db_idx_lowerbound( uint64_t code, uint64_t scope, uint64_t table, TYPE& secondary, uint64_t& primary ) {\ - return db_##IDX##_lowerbound( code, scope, table, &secondary, &primary );\ - }\ - static int32_t db_idx_upperbound( uint64_t code, uint64_t scope, uint64_t table, TYPE& secondary, uint64_t& primary ) {\ - return db_##IDX##_upperbound( code, scope, table, &secondary, &primary );\ - }\ -}; - -#define WRAP_SECONDARY_ARRAY_TYPE(IDX, TYPE)\ -template<>\ -struct secondary_index_db_functions {\ - static int32_t db_idx_next( int32_t iterator, uint64_t* primary ) { return db_##IDX##_next( iterator, primary ); }\ - static int32_t db_idx_previous( int32_t iterator, uint64_t* primary ) { return db_##IDX##_previous( iterator, primary ); }\ - static void db_idx_remove( int32_t iterator ) { db_##IDX##_remove( iterator ); }\ - static int32_t db_idx_end( uint64_t code, uint64_t scope, uint64_t table ) { return db_##IDX##_end( code, scope, table ); }\ - static int32_t db_idx_store( uint64_t scope, uint64_t table, uint64_t payer, uint64_t id, const TYPE& secondary ) {\ - return db_##IDX##_store( scope, table, payer, id, secondary.data(), TYPE::num_words() );\ - }\ - static void db_idx_update( int32_t iterator, uint64_t payer, const TYPE& secondary ) {\ - db_##IDX##_update( iterator, payer, secondary.data(), TYPE::num_words() );\ - }\ - static int32_t db_idx_find_primary( uint64_t code, uint64_t scope, uint64_t table, uint64_t primary, TYPE& secondary ) {\ - return db_##IDX##_find_primary( code, scope, table, secondary.data(), TYPE::num_words(), primary );\ - }\ - static int32_t db_idx_find_secondary( uint64_t code, uint64_t scope, uint64_t table, const TYPE& secondary, uint64_t& primary ) {\ - return db_##IDX##_find_secondary( code, scope, table, secondary.data(), TYPE::num_words(), &primary );\ - }\ - static int32_t db_idx_lowerbound( uint64_t code, uint64_t scope, uint64_t table, TYPE& secondary, uint64_t& primary ) {\ - return db_##IDX##_lowerbound( code, scope, table, secondary.data(), TYPE::num_words(), &primary );\ - }\ - static int32_t db_idx_upperbound( uint64_t code, uint64_t scope, uint64_t table, TYPE& secondary, uint64_t& primary ) {\ - return db_##IDX##_upperbound( code, scope, table, secondary.data(), TYPE::num_words(), &primary );\ - }\ -}; - -#define MAKE_TRAITS_FOR_ARITHMETIC_SECONDARY_KEY(TYPE)\ -template<>\ -struct secondary_key_traits {\ - static constexpr TYPE lowest() { return std::numeric_limits::lowest(); }\ -}; - -namespace _multi_index_detail { - - namespace hana = boost::hana; - - template - struct secondary_index_db_functions; - - template - struct secondary_key_traits; - - WRAP_SECONDARY_SIMPLE_TYPE(idx64, uint64_t) - MAKE_TRAITS_FOR_ARITHMETIC_SECONDARY_KEY(uint64_t) - - WRAP_SECONDARY_SIMPLE_TYPE(idx128, uint128_t) - MAKE_TRAITS_FOR_ARITHMETIC_SECONDARY_KEY(uint128_t) - - WRAP_SECONDARY_SIMPLE_TYPE(idx_double, double) - MAKE_TRAITS_FOR_ARITHMETIC_SECONDARY_KEY(double) - - WRAP_SECONDARY_SIMPLE_TYPE(idx_long_double, long double) - MAKE_TRAITS_FOR_ARITHMETIC_SECONDARY_KEY(long double) - - WRAP_SECONDARY_ARRAY_TYPE(idx256, key256) - template<> - struct secondary_key_traits { - static constexpr key256 lowest() { return key256(); } - }; - -} - -/** - * The indexed_by struct is used to instantiate the indices for the Multi-Index table. In EOSIO, up to 16 secondary indices can be specified. - * @brief The indexed_by struct is used to instantiate the indices for the Multi-Index table. In EOSIO, up to 16 secondary indices can be specified. - * - * @tparam IndexName - is the name of the index. The name must be provided as an EOSIO base32 encoded 64-bit integer and must conform to the EOSIO naming requirements of a maximum of 13 characters, the first twelve from the lowercase characters a-z, digits 0-5, and ".", and if there is a 13th character, it is restricted to lowercase characters a-p and ".". - * @tparam Extractor - is a function call operator that takes a const reference to the table object type and returns either a secondary key type or a reference to a secondary key type. It is recommended to use the `eosio::const_mem_fun` template, which is a type alias to the `boost::multi_index::const_mem_fun`. See the documentation for the Boost `const_mem_fun` key extractor for more details. - * - * Example: - * -* - * @code - * #include - * using namespace eosio; - * class mycontract: eosio::contract { - * struct record { - * uint64_t primary; - * uint128_t secondary; - * uint64_t primary_key() const { return primary; } - * uint64_t get_secondary() const { return secondary; } - * EOSLIB_SERIALIZE( record, (primary)(secondary) ) - * }; - * public: - * mycontract( account_name self ):contract(self){} - * void myaction() { - * auto code = _self; - * auto scope = _self; - * multi_index > > table( code, scope); - * } - * } - * EOSIO_ABI( mycontract, (myaction) ) - * @endcode - */ -template -struct indexed_by { - enum constants { index_name = IndexName }; - typedef Extractor secondary_extractor_type; -}; - -/** - * @defgroup multiindex Multi Index Table - * @brief Defines EOSIO Multi Index Table - * @ingroup databasecpp - * - * - * - * EOSIO Multi-Index API provides a C++ interface to the EOSIO database. It is patterned after Boost Multi Index Container. - * EOSIO Multi-Index table requires exactly a uint64_t primary key. For the table to be able to retrieve the primary key, - * the object stored inside the table is required to have a const member function called primary_key() that returns uint64_t. - * EOSIO Multi-Index table also supports up to 16 secondary indices. The type of the secondary indices could be any of: - * - uint64_t - * - uint128_t - * - uint256_t - * - double - * - long double - * - * @tparam TableName - name of the table - * @tparam T - type of the data stored inside the table - * @tparam Indices - secondary indices for the table, up to 16 indices is supported here - * - * Example: - * - * @code - * #include - * using namespace eosio; - * class mycontract: contract { - * struct record { - * uint64_t primary; - * uint64_t secondary_1; - * uint128_t secondary_2; - * uint256_t secondary_3; - * double secondary_4; - * long double secondary_5; - * uint64_t primary_key() const { return primary; } - * uint64_t get_secondary_1() const { return secondary_1; } - * uint128_t get_secondary_2() const { return secondary_2; } - * uint256_t get_secondary_3() const { return secondary_3; } - * double get_secondary_4() const { return secondary_4; } - * long double get_secondary_5() const { return secondary_5; } - * EOSLIB_SERIALIZE( record, (primary)(secondary_1)(secondary_2)(secondary_3)(secondary_4)(secondary_5) ) - * }; - * public: - * mycontract( account_name self ):contract(self){} - * void myaction() { - * auto code = _self; - * auto scope = _self; - * multi_index >, - * indexed_by< N(bysecondary2), const_mem_fun >, - * indexed_by< N(bysecondary3), const_mem_fun >, - * indexed_by< N(bysecondary4), const_mem_fun >, - * indexed_by< N(bysecondary5), const_mem_fun > - * > table( code, scope); - * } - * } - * EOSIO_ABI( mycontract, (myaction) ) - * @endcode - * @{ - */ - -template -class multi_index -{ - private: - - static_assert( sizeof...(Indices) <= 16, "multi_index only supports a maximum of 16 secondary indices" ); - - constexpr static bool validate_table_name( uint64_t n ) { - // Limit table names to 12 characters so that the last character (4 bits) can be used to distinguish between the secondary indices. - return (n & 0x000000000000000FULL) == 0; - } - - constexpr static size_t max_stack_buffer_size = 512; - - static_assert( validate_table_name(TableName), "multi_index does not support table names with a length greater than 12"); - - uint64_t _code; - uint64_t _scope; - - mutable uint64_t _next_primary_key; - - enum next_primary_key_tags : uint64_t { - no_available_primary_key = static_cast(-2), // Must be the smallest uint64_t value compared to all other tags - unset_next_primary_key = static_cast(-1) - }; - - struct item : public T - { - template - item( const multi_index* idx, Constructor&& c ) - :__idx(idx){ - c(*this); - } - - const multi_index* __idx; - int32_t __primary_itr; - int32_t __iters[sizeof...(Indices)+(sizeof...(Indices)==0)]; - }; - - struct item_ptr - { - item_ptr(std::unique_ptr&& i, uint64_t pk, int32_t pitr) - : _item(std::move(i)), _primary_key(pk), _primary_itr(pitr) {} - - std::unique_ptr _item; - uint64_t _primary_key; - int32_t _primary_itr; - }; - - mutable std::vector _items_vector; - - template - struct index { - public: - typedef Extractor secondary_extractor_type; - typedef typename std::decay::type secondary_key_type; - - constexpr static bool validate_index_name( uint64_t n ) { - return n != 0 && n != N(primary); // Primary is a reserve index name. - } - - static_assert( validate_index_name(IndexName), "invalid index name used in multi_index" ); - - enum constants { - table_name = TableName, - index_name = IndexName, - index_number = Number, - index_table_name = (TableName & 0xFFFFFFFFFFFFFFF0ULL) | (Number & 0x000000000000000FULL) // Assuming no more than 16 secondary indices are allowed - }; - - constexpr static uint64_t name() { return index_table_name; } - constexpr static uint64_t number() { return Number; } - - struct const_iterator : public std::iterator { - public: - friend bool operator == ( const const_iterator& a, const const_iterator& b ) { - return a._item == b._item; - } - friend bool operator != ( const const_iterator& a, const const_iterator& b ) { - return a._item != b._item; - } - - const T& operator*()const { return *static_cast(_item); } - const T* operator->()const { return static_cast(_item); } - - const_iterator operator++(int){ - const_iterator result(*this); - ++(*this); - return result; - } - - const_iterator operator--(int){ - const_iterator result(*this); - --(*this); - return result; - } - - const_iterator& operator++() { - using namespace _multi_index_detail; - - eosio_assert( _item != nullptr, "cannot increment end iterator" ); - - if( _item->__iters[Number] == -1 ) { - secondary_key_type temp_secondary_key; - auto idxitr = secondary_index_db_functions::db_idx_find_primary(_idx->get_code(), _idx->get_scope(), _idx->name(), _item->primary_key(), temp_secondary_key); - auto& mi = const_cast( *_item ); - mi.__iters[Number] = idxitr; - } - - uint64_t next_pk = 0; - auto next_itr = secondary_index_db_functions::db_idx_next( _item->__iters[Number], &next_pk ); - if( next_itr < 0 ) { - _item = nullptr; - return *this; - } - - const T& obj = *_idx->_multidx->find( next_pk ); - auto& mi = const_cast( static_cast(obj) ); - mi.__iters[Number] = next_itr; - _item = &mi; - - return *this; - } - - const_iterator& operator--() { - using namespace _multi_index_detail; - - uint64_t prev_pk = 0; - int32_t prev_itr = -1; - - if( !_item ) { - auto ei = secondary_index_db_functions::db_idx_end(_idx->get_code(), _idx->get_scope(), _idx->name()); - eosio_assert( ei != -1, "cannot decrement end iterator when the index is empty" ); - prev_itr = secondary_index_db_functions::db_idx_previous( ei , &prev_pk ); - eosio_assert( prev_itr >= 0, "cannot decrement end iterator when the index is empty" ); - } else { - if( _item->__iters[Number] == -1 ) { - secondary_key_type temp_secondary_key; - auto idxitr = secondary_index_db_functions::db_idx_find_primary(_idx->get_code(), _idx->get_scope(), _idx->name(), _item->primary_key(), temp_secondary_key); - auto& mi = const_cast( *_item ); - mi.__iters[Number] = idxitr; - } - prev_itr = secondary_index_db_functions::db_idx_previous( _item->__iters[Number], &prev_pk ); - eosio_assert( prev_itr >= 0, "cannot decrement iterator at beginning of index" ); - } - - const T& obj = *_idx->_multidx->find( prev_pk ); - auto& mi = const_cast( static_cast(obj) ); - mi.__iters[Number] = prev_itr; - _item = &mi; - - return *this; - } - - const_iterator():_item(nullptr){} - private: - friend struct index; - const_iterator( const index* idx, const item* i = nullptr ) - : _idx(idx), _item(i) {} - - const index* _idx; - const item* _item; - }; /// struct multi_index::index::const_iterator - - typedef std::reverse_iterator const_reverse_iterator; - - const_iterator cbegin()const { - using namespace _multi_index_detail; - return lower_bound( secondary_key_traits::lowest() ); - } - const_iterator begin()const { return cbegin(); } - - const_iterator cend()const { return const_iterator( this ); } - const_iterator end()const { return cend(); } - - const_reverse_iterator crbegin()const { return std::make_reverse_iterator(cend()); } - const_reverse_iterator rbegin()const { return crbegin(); } - - const_reverse_iterator crend()const { return std::make_reverse_iterator(cbegin()); } - const_reverse_iterator rend()const { return crend(); } - - const_iterator find( secondary_key_type&& secondary )const { - return find( secondary ); - } - - const_iterator find( const secondary_key_type& secondary )const { - auto lb = lower_bound( secondary ); - auto e = cend(); - if( lb == e ) return e; - - if( secondary != secondary_extractor_type()(*lb) ) - return e; - return lb; - } - - const_iterator require_find( secondary_key_type&& secondary, const char* error_msg = "unable to find secondary key" )const { - return require_find( secondary, error_msg ); - } - - const_iterator require_find( const secondary_key_type& secondary, const char* error_msg = "unable to find secondary key" )const { - auto lb = lower_bound( secondary ); - eosio_assert( lb != cend(), error_msg ); - eosio_assert( secondary == secondary_extractor_type()(*lb), error_msg ); - return lb; - } - - const T& get( secondary_key_type&& secondary, const char* error_msg = "unable to find secondary key" )const { - return get( secondary, error_msg ); - } - - // Gets the object with the smallest primary key in the case where the secondary key is not unique. - const T& get( const secondary_key_type& secondary, const char* error_msg = "unable to find secondary key" )const { - auto result = find( secondary ); - eosio_assert( result != cend(), error_msg ); - return *result; - } - - const_iterator lower_bound( secondary_key_type&& secondary )const { - return lower_bound( secondary ); - } - const_iterator lower_bound( const secondary_key_type& secondary )const { - using namespace _multi_index_detail; - - uint64_t primary = 0; - secondary_key_type secondary_copy(secondary); - auto itr = secondary_index_db_functions::db_idx_lowerbound( get_code(), get_scope(), name(), secondary_copy, primary ); - if( itr < 0 ) return cend(); - - const T& obj = *_multidx->find( primary ); - auto& mi = const_cast( static_cast(obj) ); - mi.__iters[Number] = itr; - - return {this, &mi}; - } - - const_iterator upper_bound( secondary_key_type&& secondary )const { - return upper_bound( secondary ); - } - const_iterator upper_bound( const secondary_key_type& secondary )const { - using namespace _multi_index_detail; - - uint64_t primary = 0; - secondary_key_type secondary_copy(secondary); - auto itr = secondary_index_db_functions::db_idx_upperbound( get_code(), get_scope(), name(), secondary_copy, primary ); - if( itr < 0 ) return cend(); - - const T& obj = *_multidx->find( primary ); - auto& mi = const_cast( static_cast(obj) ); - mi.__iters[Number] = itr; - - return {this, &mi}; - } - - const_iterator iterator_to( const T& obj ) { - using namespace _multi_index_detail; - - const auto& objitem = static_cast(obj); - eosio_assert( objitem.__idx == _multidx, "object passed to iterator_to is not in multi_index" ); - - if( objitem.__iters[Number] == -1 ) { - secondary_key_type temp_secondary_key; - auto idxitr = secondary_index_db_functions::db_idx_find_primary(get_code(), get_scope(), name(), objitem.primary_key(), temp_secondary_key); - auto& mi = const_cast( objitem ); - mi.__iters[Number] = idxitr; - } - - return {this, &objitem}; - } - - template - void modify( const_iterator itr, uint64_t payer, Lambda&& updater ) { - eosio_assert( itr != cend(), "cannot pass end iterator to modify" ); - - _multidx->modify( *itr, payer, std::forward(updater) ); - } - - const_iterator erase( const_iterator itr ) { - eosio_assert( itr != cend(), "cannot pass end iterator to erase" ); - - const auto& obj = *itr; - ++itr; - - _multidx->erase(obj); - - return itr; - } - - uint64_t get_code()const { return _multidx->get_code(); } - uint64_t get_scope()const { return _multidx->get_scope(); } - - static auto extract_secondary_key(const T& obj) { return secondary_extractor_type()(obj); } - - private: - friend class multi_index; - - index( typename std::conditional::type midx ) - :_multidx(midx){} - - typename std::conditional::type _multidx; - }; /// struct multi_index::index - - template - struct intc { enum e{ value = I }; operator uint64_t()const{ return I; } }; - - static constexpr auto transform_indices( ) { - using namespace _multi_index_detail; - - typedef decltype( hana::zip_shortest( - hana::make_tuple( intc<0>(), intc<1>(), intc<2>(), intc<3>(), intc<4>(), intc<5>(), - intc<6>(), intc<7>(), intc<8>(), intc<9>(), intc<10>(), intc<11>(), - intc<12>(), intc<13>(), intc<14>(), intc<15>() ), - hana::tuple() ) ) indices_input_type; - - return hana::transform( indices_input_type(), [&]( auto&& idx ){ - typedef typename std::decay(idx))>::type num_type; - typedef typename std::decay(idx))>::type idx_type; - return hana::make_tuple( hana::type_c >, - hana::type_c > ); - - }); - } - - typedef decltype( multi_index::transform_indices() ) indices_type; - - indices_type _indices; - - const item& load_object_by_primary_iterator( int32_t itr )const { - using namespace _multi_index_detail; - - auto itr2 = std::find_if(_items_vector.rbegin(), _items_vector.rend(), [&](const item_ptr& ptr) { - return ptr._primary_itr == itr; - }); - if( itr2 != _items_vector.rend() ) - return *itr2->_item; - - auto size = db_get_i64( itr, nullptr, 0 ); - eosio_assert( size >= 0, "error reading iterator" ); - - //using malloc/free here potentially is not exception-safe, although WASM doesn't support exceptions - void* buffer = max_stack_buffer_size < size_t(size) ? malloc(size_t(size)) : alloca(size_t(size)); - - db_get_i64( itr, buffer, uint32_t(size) ); - - datastream ds( (char*)buffer, uint32_t(size) ); - - if ( max_stack_buffer_size < size_t(size) ) { - free(buffer); - } - - auto itm = std::make_unique( this, [&]( auto& i ) { - T& val = static_cast(i); - ds >> val; - - i.__primary_itr = itr; - hana::for_each( _indices, [&]( auto& idx ) { - typedef typename decltype(+hana::at_c<1>(idx))::type index_type; - - i.__iters[ index_type::number() ] = -1; - }); - }); - - const item* ptr = itm.get(); - auto pk = itm->primary_key(); - auto pitr = itm->__primary_itr; - - _items_vector.emplace_back( std::move(itm), pk, pitr ); - - return *ptr; - } /// load_object_by_primary_iterator - - public: - /** - * Constructs an instance of a Multi-Index table. - * @brief Constructs an instance of a Multi-Index table. - * - * @param code - Account that owns table - * @param scope - Scope identifier within the code hierarchy - * - * @pre code and scope member properties are initialized - * @post each secondary index table initialized - * @post Secondary indices are updated to refer to the newly added object. If the secondary index tables do not exist, they are created. - * @post The payer is charged for the storage usage of the new object and, if the table (and secondary index tables) must be created, for the overhead of the table creation. - * - * Notes - * The `eosio::multi_index` template has template parameters ``, where: - * - `TableName` is the name of the table, maximum 12 characters long, characters in the name from the set of lowercase letters, digits 1 to 5, and the "." (period) character; - * - `T` is the object type (i.e., row definition); - * - `Indices` is a list of up to 16 secondary indices. - * - Each must be a default constructable class or struct - * - Each must have a function call operator that takes a const reference to the table object type and returns either a secondary key type or a reference to a secondary key type - * - It is recommended to use the eosio::const_mem_fun template, which is a type alias to the boost::multi_index::const_mem_fun. See the documentation for the Boost const_mem_fun key extractor for more details. - * - * Example: - * - * @code - * #include - * using namespace eosio; - * using namespace std; - * class addressbook: contract { - * struct address { - * uint64_t account_name; - * string first_name; - * string last_name; - * string street; - * string city; - * string state; - * uint64_t primary_key() const { return account_name; } - * EOSLIB_SERIALIZE( address, (account_name)(first_name)(last_name)(street)(city)(state) ) - * }; - * public: - * addressbook(account_name self):contract(self) {} - * typedef eosio::multi_index< N(address), address > address_index; - * void myaction() { - * address_index addresses(_self, _self); // code, scope - * } - * } - * EOSIO_ABI( addressbook, (myaction) ) - * @endcode - */ - multi_index( uint64_t code, uint64_t scope ) - :_code(code),_scope(scope),_next_primary_key(unset_next_primary_key) - {} - - /** - * Returns the `code` member property. - * @brief Returns the `code` member property. - * - * @return Account name of the Code that owns the Primary Table. - * - * Example: - * - * @code - * #include - * using namespace eosio; - * using namespace std; - * class addressbook: contract { - * struct address { - * uint64_t account_name; - * string first_name; - * string last_name; - * string street; - * string city; - * string state; - * uint64_t primary_key() const { return account_name; } - * EOSLIB_SERIALIZE( address, (account_name)(first_name)(last_name)(street)(city)(state) ) - * }; - * public: - * addressbook(account_name self):contract(self) {} - * typedef eosio::multi_index< N(address), address > address_index; - * void myaction() { - * address_index addresses(N(dan), N(dan)); // code, scope - * eosio_assert(addresses.get_code() == N(dan), "Codes don't match."); - * } - * } - * EOSIO_ABI( addressbook, (myaction) ) - * @endcode - */ - uint64_t get_code()const { return _code; } - - /** - * Returns the `scope` member property. - * @brief Returns the `scope` member property. - * - * @return Scope id of the Scope within the Code of the Current Receiver under which the desired Primary Table instance can be found. - * - * Example: - * - * @code - * #include - * using namespace eosio; - * using namespace std; - * class addressbook: contract { - * struct address { - * uint64_t account_name; - * string first_name; - * string last_name; - * string street; - * string city; - * string state; - * uint64_t primary_key() const { return account_name; } - * EOSLIB_SERIALIZE( address, (account_name)(first_name)(last_name)(street)(city)(state) ) - * }; - * public: - * addressbook(account_name self):contract(self) {} - * typedef eosio::multi_index< N(address), address > address_index; - * void myaction() { - * address_index addresses(N(dan), N(dan)); // code, scope - * eosio_assert(addresses.get_code() == N(dan), "Scopes don't match"); - * } - * } - * EOSIO_ABI( addressbook, (myaction) ) - * @endcode - */ - uint64_t get_scope()const { return _scope; } - - struct const_iterator : public std::iterator { - friend bool operator == ( const const_iterator& a, const const_iterator& b ) { - return a._item == b._item; - } - friend bool operator != ( const const_iterator& a, const const_iterator& b ) { - return a._item != b._item; - } - - const T& operator*()const { return *static_cast(_item); } - const T* operator->()const { return static_cast(_item); } - - const_iterator operator++(int) { - const_iterator result(*this); - ++(*this); - return result; - } - - const_iterator operator--(int) { - const_iterator result(*this); - --(*this); - return result; - } - - const_iterator& operator++() { - eosio_assert( _item != nullptr, "cannot increment end iterator" ); - - uint64_t next_pk; - auto next_itr = db_next_i64( _item->__primary_itr, &next_pk ); - if( next_itr < 0 ) - _item = nullptr; - else - _item = &_multidx->load_object_by_primary_iterator( next_itr ); - return *this; - } - const_iterator& operator--() { - uint64_t prev_pk; - int32_t prev_itr = -1; - - if( !_item ) { - auto ei = db_end_i64(_multidx->get_code(), _multidx->get_scope(), TableName); - eosio_assert( ei != -1, "cannot decrement end iterator when the table is empty" ); - prev_itr = db_previous_i64( ei , &prev_pk ); - eosio_assert( prev_itr >= 0, "cannot decrement end iterator when the table is empty" ); - } else { - prev_itr = db_previous_i64( _item->__primary_itr, &prev_pk ); - eosio_assert( prev_itr >= 0, "cannot decrement iterator at beginning of table" ); - } - - _item = &_multidx->load_object_by_primary_iterator( prev_itr ); - return *this; - } - - private: - const_iterator( const multi_index* mi, const item* i = nullptr ) - :_multidx(mi),_item(i){} - - const multi_index* _multidx; - const item* _item; - friend class multi_index; - }; /// struct multi_index::const_iterator - - typedef std::reverse_iterator const_reverse_iterator; - - /** - * Returns an iterator pointing to the object_type with the lowest primary key value in the Multi-Index table. - * @brief Returns an iterator pointing to the object_type with the lowest primary key value in the Multi-Index table. - * - * @return An iterator pointing to the object_type with the lowest primary key value in the Multi-Index table. - * - * Example: - * - * @code - * #include - * using namespace eosio; - * using namespace std; - * class addressbook: contract { - * struct address { - * uint64_t account_name; - * string first_name; - * string last_name; - * string street; - * string city; - * string state; - * uint64_t primary_key() const { return account_name; } - * EOSLIB_SERIALIZE( address, (account_name)(first_name)(last_name)(street)(city)(state) ) - * }; - * public: - * addressbook(account_name self):contract(self) {} - * typedef eosio::multi_index< N(address), address > address_index; - * void myaction() { - * address_index addresses(_self, _self); // code, scope - * // add to table, first argument is account to bill for storage - * addresses.emplace(_self, [&](auto& address) { - * address.account_name = N(dan); - * address.first_name = "Daniel"; - * address.last_name = "Larimer"; - * address.street = "1 EOS Way"; - * address.city = "Blacksburg"; - * address.state = "VA"; - * }); - * auto itr = addresses.find(N(dan)); - * eosio_assert(itr == addresses.cbegin(), "Only address is not at front."); - * } - * } - * EOSIO_ABI( addressbook, (myaction) ) - * @endcode - */ - const_iterator cbegin()const { - return lower_bound(std::numeric_limits::lowest()); - } - - /** - * Returns an iterator pointing to the object_type with the lowest primary key value in the Multi-Index table. - * @brief Returns an iterator pointing to the object_type with the lowest primary key value in the Multi-Index table. - * - * @return An iterator pointing to the object_type with the lowest primary key value in the Multi-Index table. - * - * Example: - * - * @code - * #include - * using namespace eosio; - * using namespace std; - * class addressbook: contract { - * struct address { - * uint64_t account_name; - * string first_name; - * string last_name; - * string street; - * string city; - * string state; - * uint64_t primary_key() const { return account_name; } - * EOSLIB_SERIALIZE( address, (account_name)(first_name)(last_name)(street)(city)(state) ) - * }; - * public: - * addressbook(account_name self):contract(self) {} - * typedef eosio::multi_index< N(address), address > address_index; - * void myaction() { - * address_index addresses(_self, _self); // code, scope - * // add to table, first argument is account to bill for storage - * addresses.emplace(_self, [&](auto& address) { - * address.account_name = N(dan); - * address.first_name = "Daniel"; - * address.last_name = "Larimer"; - * address.street = "1 EOS Way"; - * address.city = "Blacksburg"; - * address.state = "VA"; - * }); - * auto itr = addresses.find(N(dan)); - * eosio_assert(itr == addresses.begin(), "Only address is not at front."); - * } - * } - * EOSIO_ABI( addressbook, (myaction) ) - * @endcode - */ - const_iterator begin()const { return cbegin(); } - - /** - * Returns an iterator pointing to the `object_type` with the highest primary key value in the Multi-Index table. - * @brief Returns an iterator pointing to the `object_type` with the highest primary key value in the Multi-Index table. - * - * @return An iterator pointing to the `object_type` with the highest primary key value in the Multi-Index table. - * - * Example: - * - * @code - * #include - * using namespace eosio; - * using namespace std; - * class addressbook: contract { - * struct address { - * uint64_t account_name; - * string first_name; - * string last_name; - * string street; - * string city; - * string state; - * uint64_t primary_key() const { return account_name; } - * EOSLIB_SERIALIZE( address, (account_name)(first_name)(last_name)(street)(city)(state) ) - * }; - * public: - * addressbook(account_name self):contract(self) {} - * typedef eosio::multi_index< N(address), address > address_index; - * void myaction() { - * address_index addresses(_self, _self); // code, scope - * // add to table, first argument is account to bill for storage - * addresses.emplace(_self, [&](auto& address) { - * address.account_name = N(dan); - * address.first_name = "Daniel"; - * address.last_name = "Larimer"; - * address.street = "1 EOS Way"; - * address.city = "Blacksburg"; - * address.state = "VA"; - * }); - * auto itr = addresses.find(N(dan)); - * eosio_assert(itr != addresses.cend(), "Address for account doesn't exist"); - * } - * } - * EOSIO_ABI( addressbook, (myaction) ) - * @endcode - */ - const_iterator cend()const { return const_iterator( this ); } - - /** - * Returns an iterator pointing to the `object_type` with the highest primary key value in the Multi-Index table. - * @brief Returns an iterator pointing to the `object_type` with the highest primary key value in the Multi-Index table. - * - * @return An iterator pointing to the `object_type` with the highest primary key value in the Multi-Index table. - * - * Example: - * - * @code - * #include - * using namespace eosio; - * using namespace std; - * class addressbook: contract { - * struct address { - * uint64_t account_name; - * string first_name; - * string last_name; - * string street; - * string city; - * string state; - * uint64_t primary_key() const { return account_name; } - * EOSLIB_SERIALIZE( address, (account_name)(first_name)(last_name)(street)(city)(state) ) - * }; - * public: - * addressbook(account_name self):contract(self) {} - * typedef eosio::multi_index< N(address), address > address_index; - * void myaction() { - * address_index addresses(_self, _self); // code, scope - * // add to table, first argument is account to bill for storage - * addresses.emplace(_self, [&](auto& address) { - * address.account_name = N(dan); - * address.first_name = "Daniel"; - * address.last_name = "Larimer"; - * address.street = "1 EOS Way"; - * address.city = "Blacksburg"; - * address.state = "VA"; - * }); - * auto itr = addresses.find(N(dan)); - * eosio_assert(itr != addresses.end(), "Address for account doesn't exist"); - * } - * } - * EOSIO_ABI( addressbook, (myaction) ) - * @endcode - */ - const_iterator end()const { return cend(); } - - /** - * Returns a reverse iterator pointing to the `object_type` with the highest primary key value in the Multi-Index table. - * @brief Returns a reverse iterator pointing to the `object_type` with the highest primary key value in the Multi-Index table. - * - * @return A reverse iterator pointing to the `object_type` with the highest primary key value in the Multi-Index table. - * - * Example: - * - * @code - * #include - * using namespace eosio; - * using namespace std; - * class addressbook: contract { - * struct address { - * uint64_t account_name; - * string first_name; - * string last_name; - * string street; - * string city; - * string state; - * uint64_t primary_key() const { return account_name; } - * EOSLIB_SERIALIZE( address, (account_name)(first_name)(last_name)(street)(city)(state) ) - * }; - * public: - * addressbook(account_name self):contract(self) {} - * typedef eosio::multi_index< N(address), address > address_index; - * void myaction() { - * address_index addresses(_self, _self); // code, scope - * // add to table, first argument is account to bill for storage - * addresses.emplace(payer, [&](auto& address) { - * address.account_name = N(dan); - * address.first_name = "Daniel"; - * address.last_name = "Larimer"; - * address.street = "1 EOS Way"; - * address.city = "Blacksburg"; - * address.state = "VA"; - * }); - * addresses.emplace(payer, [&](auto& address) { - * address.account_name = N(brendan); - * address.first_name = "Brendan"; - * address.last_name = "Blumer"; - * address.street = "1 EOS Way"; - * address.city = "Hong Kong"; - * address.state = "HK"; - * }); - * auto itr = addresses.crbegin(); - * eosio_assert(itr->account_name == N(dan), "Incorrect Last Record "); - * itr++; - * eosio_assert(itr->account_name == N(brendan), "Incorrect Second Last Record"); - * } - * } - * EOSIO_ABI( addressbook, (myaction) ) - * @endcode - */ - const_reverse_iterator crbegin()const { return std::make_reverse_iterator(cend()); } - - /** - * Returns a reverse iterator pointing to the `object_type` with the highest primary key value in the Multi-Index table. - * @brief Returns a reverse iterator pointing to the `object_type` with the highest primary key value in the Multi-Index table. - * - * @return A reverse iterator pointing to the `object_type` with the highest primary key value in the Multi-Index table. - * - * Example: - * - * @code - * #include - * using namespace eosio; - * using namespace std; - * class addressbook: contract { - * struct address { - * uint64_t account_name; - * string first_name; - * string last_name; - * string street; - * string city; - * string state; - * uint64_t primary_key() const { return account_name; } - * EOSLIB_SERIALIZE( address, (account_name)(first_name)(last_name)(street)(city)(state) ) - * }; - * public: - * addressbook(account_name self):contract(self) {} - * typedef eosio::multi_index< N(address), address > address_index; - * void myaction() { - * address_index addresses(_self, _self); // code, scope - * // add to table, first argument is account to bill for storage - * addresses.emplace(payer, [&](auto& address) { - * address.account_name = N(dan); - * address.first_name = "Daniel"; - * address.last_name = "Larimer"; - * address.street = "1 EOS Way"; - * address.city = "Blacksburg"; - * address.state = "VA"; - * }); - * addresses.emplace(payer, [&](auto& address) { - * address.account_name = N(brendan); - * address.first_name = "Brendan"; - * address.last_name = "Blumer"; - * address.street = "1 EOS Way"; - * address.city = "Hong Kong"; - * address.state = "HK"; - * }); - * auto itr = addresses.rbegin(); - * eosio_assert(itr->account_name == N(dan), "Incorrect Last Record "); - * itr++; - * eosio_assert(itr->account_name == N(brendan), "Incorrect Second Last Record"); - * } - * } - * EOSIO_ABI( addressbook, (myaction) ) - * @endcode - */ - const_reverse_iterator rbegin()const { return crbegin(); } - - /** - * Returns an iterator pointing to the `object_type` with the lowest primary key value in the Multi-Index table. - * @brief Returns an iterator pointing to the `object_type` with the lowest primary key value in the Multi-Index table. - * - * @return An iterator pointing to the `object_type` with the lowest primary key value in the Multi-Index table. - * - * Example: - * - * @code - * #include - * using namespace eosio; - * using namespace std; - * class addressbook: contract { - * struct address { - * uint64_t account_name; - * string first_name; - * string last_name; - * string street; - * string city; - * string state; - * uint64_t primary_key() const { return account_name; } - * EOSLIB_SERIALIZE( address, (account_name)(first_name)(last_name)(street)(city)(state) ) - * }; - * public: - * addressbook(account_name self):contract(self) {} - * typedef eosio::multi_index< N(address), address > address_index; - * void myaction() { - * address_index addresses(_self, _self); // code, scope - * // add to table, first argument is account to bill for storage - * addresses.emplace(payer, [&](auto& address) { - * address.account_name = N(dan); - * address.first_name = "Daniel"; - * address.last_name = "Larimer"; - * address.street = "1 EOS Way"; - * address.city = "Blacksburg"; - * address.state = "VA"; - * }); - * addresses.emplace(payer, [&](auto& address) { - * address.account_name = N(brendan); - * address.first_name = "Brendan"; - * address.last_name = "Blumer"; - * address.street = "1 EOS Way"; - * address.city = "Hong Kong"; - * address.state = "HK"; - * }); - * auto itr = addresses.crend(); - * itr--; - * eosio_assert(itr->account_name == N(brendan), "Incorrect First Record "); - * itr--; - * eosio_assert(itr->account_name == N(dan), "Incorrect Second Record"); - * } - * } - * EOSIO_ABI( addressbook, (myaction) ) - * @endcode - */ - const_reverse_iterator crend()const { return std::make_reverse_iterator(cbegin()); } - - /** - * Returns an iterator pointing to the `object_type` with the lowest primary key value in the Multi-Index table. - * @brief Returns an iterator pointing to the `object_type` with the lowest primary key value in the Multi-Index table. - * - * @return An iterator pointing to the `object_type` with the lowest primary key value in the Multi-Index table. - * - * Example: - * - * @code - * #include - * using namespace eosio; - * using namespace std; - * class addressbook: contract { - * struct address { - * uint64_t account_name; - * string first_name; - * string last_name; - * string street; - * string city; - * string state; - * uint64_t primary_key() const { return account_name; } - * EOSLIB_SERIALIZE( address, (account_name)(first_name)(last_name)(street)(city)(state) ) - * }; - * public: - * addressbook(account_name self):contract(self) {} - * typedef eosio::multi_index< N(address), address > address_index; - * void myaction() { - * address_index addresses(_self, _self); // code, scope - * // add to table, first argument is account to bill for storage - * addresses.emplace(payer, [&](auto& address) { - * address.account_name = N(dan); - * address.first_name = "Daniel"; - * address.last_name = "Larimer"; - * address.street = "1 EOS Way"; - * address.city = "Blacksburg"; - * address.state = "VA"; - * }); - * addresses.emplace(payer, [&](auto& address) { - * address.account_name = N(brendan); - * address.first_name = "Brendan"; - * address.last_name = "Blumer"; - * address.street = "1 EOS Way"; - * address.city = "Hong Kong"; - * address.state = "HK"; - * }); - * auto itr = addresses.rend(); - * itr--; - * eosio_assert(itr->account_name == N(brendan), "Incorrect First Record "); - * itr--; - * eosio_assert(itr->account_name == N(dan), "Incorrect Second Record"); - * } - * } - * EOSIO_ABI( addressbook, (myaction) ) - * @endcode - */ - const_reverse_iterator rend()const { return crend(); } - - /** - * Searches for the `object_type` with the lowest primary key that is greater than or equal to a given primary key. - * @brief Searches for the `object_type` with the lowest primary key that is greater than or equal to a given primary key. - * - * @param primary - Primary key that establishes the target value for the lower bound search. - * - * @return An iterator pointing to the `object_type` that has the lowest primary key that is greater than or equal to `primary`. If an object could not be found, it will return the `end` iterator. If the table does not exist** it will return `-1`. - * - * Example: - * - * @code - * #include - * using namespace eosio; - * using namespace std; - * class addressbook: contract { - * struct address { - * uint64_t account_name; - * string first_name; - * string last_name; - * string street; - * string city; - * string state; - * uint32_t zip = 0; - * uint64_t primary_key() const { return account_name; } - * uint64_t by_zip() const { return zip; } - * EOSLIB_SERIALIZE( address, (account_name)(first_name)(last_name)(street)(city)(state)(zip) ) - * }; - * public: - * addressbook(account_name self):contract(self) {} - * typedef eosio::multi_index< N(address), address, indexed_by< N(zip), const_mem_fun > address_index; - * void myaction() { - * address_index addresses(_self, _self); // code, scope - * // add to table, first argument is account to bill for storage - * addresses.emplace(payer, [&](auto& address) { - * address.account_name = N(dan); - * address.first_name = "Daniel"; - * address.last_name = "Larimer"; - * address.street = "1 EOS Way"; - * address.city = "Blacksburg"; - * address.state = "VA"; - * address.zip = 93446; - * }); - * addresses.emplace(payer, [&](auto& address) { - * address.account_name = N(brendan); - * address.first_name = "Brendan"; - * address.last_name = "Blumer"; - * address.street = "1 EOS Way"; - * address.city = "Hong Kong"; - * address.state = "HK"; - * address.zip = 93445; - * }); - * uint32_t zipnumb = 93445; - * auto zip_index = addresses.get_index(); - * auto itr = zip_index.lower_bound(zipnumb); - * eosio_assert(itr->account_name == N(brendan), "Incorrect First Lower Bound Record "); - * itr++; - * eosio_assert(itr->account_name == N(dan), "Incorrect Second Lower Bound Record"); - * itr++; - * eosio_assert(itr == zip_index.end(), "Incorrect End of Iterator"); - * } - * } - * EOSIO_ABI( addressbook, (myaction) ) - * @endcode - */ - const_iterator lower_bound( uint64_t primary )const { - auto itr = db_lowerbound_i64( _code, _scope, TableName, primary ); - if( itr < 0 ) return end(); - const auto& obj = load_object_by_primary_iterator( itr ); - return {this, &obj}; - } - - /** - * Searches for the `object_type` with the highest primary key that is less than or equal to a given primary key. - * @brief Searches for the `object_type` with the highest primary key that is less than or equal to a given primary key. - * - * @param primary - Primary key that establishes the target value for the upper bound search - * - * @return An iterator pointing to the `object_type` that has the highest primary key that is less than or equal to `primary`. If an object could not be found, it will return the `end` iterator. If the table does not exist** it will return `-1`. - * - * Example: - * - * @code - * #include - * using namespace eosio; - * using namespace std; - * class addressbook: contract { - * struct address { - * uint64_t account_name; - * string first_name; - * string last_name; - * string street; - * string city; - * string state; - * uint32_t zip = 0; - * uint64_t liked = 0; - * uint64_t primary_key() const { return account_name; } - * uint64_t by_zip() const { return zip; } - * EOSLIB_SERIALIZE( address, (account_name)(first_name)(last_name)(street)(city)(state)(zip) ) - * }; - * public: - * addressbook(account_name self):contract(self) {} - * typedef eosio::multi_index< N(address), address, indexed_by< N(zip), const_mem_fun > address_index; - * void myaction() { - * address_index addresses(_self, _self); // code, scope - * // add to table, first argument is account to bill for storage - * addresses.emplace(payer, [&](auto& address) { - * address.account_name = N(dan); - * address.first_name = "Daniel"; - * address.last_name = "Larimer"; - * address.street = "1 EOS Way"; - * address.city = "Blacksburg"; - * address.state = "VA"; - * address.zip = 93446; - * }); - * addresses.emplace(payer, [&](auto& address) { - * address.account_name = N(brendan); - * address.first_name = "Brendan"; - * address.last_name = "Blumer"; - * address.street = "1 EOS Way"; - * address.city = "Hong Kong"; - * address.state = "HK"; - * address.zip = 93445; - * }); - * uint32_t zipnumb = 93445; - * auto zip_index = addresses.get_index(); - * auto itr = zip_index.upper_bound(zipnumb); - * eosio_assert(itr->account_name == N(dan), "Incorrect First Upper Bound Record "); - * itr++; - * eosio_assert(itr == zip_index.end(), "Incorrect End of Iterator"); - * } - * } - * EOSIO_ABI( addressbook, (myaction) ) - * @endcode - */ - const_iterator upper_bound( uint64_t primary )const { - auto itr = db_upperbound_i64( _code, _scope, TableName, primary ); - if( itr < 0 ) return end(); - const auto& obj = load_object_by_primary_iterator( itr ); - return {this, &obj}; - } - - /** - * Returns an available primary key. - * @brief Returns an available primary key. - * - * @return An available (unused) primary key value. - * - * Notes: - * Intended to be used in tables in which the primary keys of the table are strictly intended to be auto-incrementing, and thus will never be set to custom values by the contract. Violating this expectation could result in the table appearing to be full due to inability to allocate an available primary key. - * Ideally this method would only be used to determine the appropriate primary key to use within new objects added to a table in which the primary keys of the table are strictly intended from the beginning to be autoincrementing and thus will not ever be set to custom arbitrary values by the contract. Violating this agreement could result in the table appearing full when in reality there is plenty of space left. - * - * Example: - * - * @code - * #include - * using namespace eosio; - * using namespace std; - * class addressbook: contract { - * struct address { - * uint64_t key; - * string first_name; - * string last_name; - * string street; - * string city; - * string state; - * uint64_t primary_key() const { return key; } - * EOSLIB_SERIALIZE( address, (key)(first_name)(last_name)(street)(city)(state) ) - * }; - * public: - * addressbook(account_name self):contract(self) {} - * typedef eosio::multi_index< N(address), address > address_index; - * void myaction() { - * address_index addresses(_self, _self); // code, scope - * // add to table, first argument is account to bill for storage - * addresses.emplace(payer, [&](auto& address) { - * address.key = addresses.available_primary_key(); - * address.first_name = "Daniel"; - * address.last_name = "Larimer"; - * address.street = "1 EOS Way"; - * address.city = "Blacksburg"; - * address.state = "VA"; - * }); - * } - * } - * EOSIO_ABI( addressbook, (myaction) ) - * @endcode - */ - uint64_t available_primary_key()const { - if( _next_primary_key == unset_next_primary_key ) { - // This is the first time available_primary_key() is called for this multi_index instance. - if( begin() == end() ) { // empty table - _next_primary_key = 0; - } else { - auto itr = --end(); // last row of table sorted by primary key - auto pk = itr->primary_key(); // largest primary key currently in table - if( pk >= no_available_primary_key ) // Reserve the tags - _next_primary_key = no_available_primary_key; - else - _next_primary_key = pk + 1; - } - } - - eosio_assert( _next_primary_key < no_available_primary_key, "next primary key in table is at autoincrement limit"); - return _next_primary_key; - } - - /** - * Returns an appropriately typed Secondary Index. - * @brief Returns an appropriately typed Secondary Index. - * - * @tparam IndexName - the ID of the desired secondary index - * - * @return An index of the appropriate type: Primitive 64-bit unsigned integer key (idx64), Primitive 128-bit unsigned integer key (idx128), 128-bit fixed-size lexicographical key (idx128), 256-bit fixed-size lexicographical key (idx256), Floating point key, Double precision floating point key, Long Double (quadruple) precision floating point key - * - * Example: - * - * @code - * #include - * using namespace eosio; - * using namespace std; - * class addressbook: contract { - * struct address { - * uint64_t account_name; - * string first_name; - * string last_name; - * string street; - * string city; - * string state; - * uint32_t zip = 0; - * uint64_t primary_key() const { return account_name; } - * uint64_t by_zip() const { return zip; } - * EOSLIB_SERIALIZE( address, (account_name)(first_name)(last_name)(street)(city)(state)(zip) ) - * }; - * public: - * addressbook(account_name self):contract(self) {} - * typedef eosio::multi_index< N(address), address, indexed_by< N(zip), const_mem_fun > address_index; - * void myaction() { - * address_index addresses(_self, _self); // code, scope - * // add to table, first argument is account to bill for storage - * addresses.emplace(payer, [&](auto& address) { - * address.account_name = N(dan); - * address.first_name = "Daniel"; - * address.last_name = "Larimer"; - * address.street = "1 EOS Way"; - * address.city = "Blacksburg"; - * address.state = "VA"; - * address.zip = 93446; - * }); - * uint32_t zipnumb = 93446; - * auto zip_index = addresses.get_index(); - * auto itr = zip_index.find(zipnumb); - * eosio_assert(itr->account_name == N(dan), "Incorrect Record "); - * } - * } - * EOSIO_ABI( addressbook, (myaction) ) - * @endcode - */ - template - auto get_index() { - using namespace _multi_index_detail; - - auto res = hana::find_if( _indices, []( auto&& in ) { - return std::integral_constant(in))::type>::type::index_name == IndexName>(); - }); - - static_assert( res != hana::nothing, "name provided is not the name of any secondary index within multi_index" ); - - return typename decltype(+hana::at_c<0>(res.value()))::type(this); - } - - /** - * Returns an appropriately typed Secondary Index. - * @brief Returns an appropriately typed Secondary Index. - * - * @tparam IndexName - the ID of the desired secondary index - * - * @return An index of the appropriate type: Primitive 64-bit unsigned integer key (idx64), Primitive 128-bit unsigned integer key (idx128), 128-bit fixed-size lexicographical key (idx128), 256-bit fixed-size lexicographical key (idx256), Floating point key, Double precision floating point key, Long Double (quadruple) precision floating point key - * - * Example: - * - * @code - * #include - * using namespace eosio; - * using namespace std; - * class addressbook: contract { - * struct address { - * uint64_t account_name; - * string first_name; - * string last_name; - * string street; - * string city; - * string state; - * uint32_t zip = 0; - * uint64_t primary_key() const { return account_name; } - * uint64_t by_zip() const { return zip; } - * EOSLIB_SERIALIZE( address, (account_name)(first_name)(last_name)(street)(city)(state)(zip) ) - * }; - * public: - * addressbook(account_name self):contract(self) {} - * typedef eosio::multi_index< N(address), address, indexed_by< N(zip), const_mem_fun > address_index; - * void myaction() { - * address_index addresses(_self, _self); // code, scope - * // add to table, first argument is account to bill for storage - * addresses.emplace(payer, [&](auto& address) { - * address.account_name = N(dan); - * address.first_name = "Daniel"; - * address.last_name = "Larimer"; - * address.street = "1 EOS Way"; - * address.city = "Blacksburg"; - * address.state = "VA"; - * address.zip = 93446; - * }); - * addresses.emplace(payer, [&](auto& address) { - * address.account_name = N(brendan); - * address.first_name = "Brendan"; - * address.last_name = "Blumer"; - * address.street = "1 EOS Way"; - * address.city = "Hong Kong"; - * address.state = "HK"; - * address.zip = 93445; - * }); - * uint32_t zipnumb = 93445; - * auto zip_index = addresses.get_index(); - * auto itr = zip_index.upper_bound(zipnumb); - * eosio_assert(itr->account_name == N(dan), "Incorrect First Upper Bound Record "); - * itr++; - * eosio_assert(itr == zip_index.end(), "Incorrect End of Iterator"); - * } - * } - * EOSIO_ABI( addressbook, (myaction) ) - * @endcode - */ - template - auto get_index()const { - using namespace _multi_index_detail; - - auto res = hana::find_if( _indices, []( auto&& in ) { - return std::integral_constant(in))::type>::type::index_name == IndexName>(); - }); - - static_assert( res != hana::nothing, "name provided is not the name of any secondary index within multi_index" ); - - return typename decltype(+hana::at_c<1>(res.value()))::type(this); - } - - /** - * Returns an iterator to the given object in a Multi-Index table. - * @brief Returns an iterator to the given object in a Multi-Index table. - * - * @param obj - A reference to the desired object - * - * @return An iterator to the given object - * - * Example: - * - * @code - * #include - * using namespace eosio; - * using namespace std; - * class addressbook: contract { - * struct address { - * uint64_t account_name; - * string first_name; - * string last_name; - * string street; - * string city; - * string state; - * uint32_t zip = 0; - * uint64_t primary_key() const { return account_name; } - * uint64_t by_zip() const { return zip; } - * EOSLIB_SERIALIZE( address, (account_name)(first_name)(last_name)(street)(city)(state)(zip) ) - * }; - * public: - * addressbook(account_name self):contract(self) {} - * typedef eosio::multi_index< N(address), address, indexed_by< N(zip), const_mem_fun > address_index; - * void myaction() { - * address_index addresses(_self, _self); // code, scope - * // add to table, first argument is account to bill for storage - * addresses.emplace(payer, [&](auto& address) { - * address.account_name = N(dan); - * address.first_name = "Daniel"; - * address.last_name = "Larimer"; - * address.street = "1 EOS Way"; - * address.city = "Blacksburg"; - * address.state = "VA"; - * address.zip = 93446; - * }); - * addresses.emplace(payer, [&](auto& address) { - * address.account_name = N(brendan); - * address.first_name = "Brendan"; - * address.last_name = "Blumer"; - * address.street = "1 EOS Way"; - * address.city = "Hong Kong"; - * address.state = "HK"; - * address.zip = 93445; - * }); - * auto user = addresses.get(N(dan)); - * auto itr = address.find(N(dan)); - * eosio_assert(iterator_to(user) == itr, "Invalid iterator"); - * } - * } - * EOSIO_ABI( addressbook, (myaction) ) - * @endcode - */ - const_iterator iterator_to( const T& obj )const { - const auto& objitem = static_cast(obj); - eosio_assert( objitem.__idx == this, "object passed to iterator_to is not in multi_index" ); - return {this, &objitem}; - } - /** - * Adds a new object (i.e., row) to the table. - * @brief Adds a new object (i.e., row) to the table. - * - * @param payer - Account name of the payer for the Storage usage of the new object - * @param constructor - Lambda function that does an in-place initialization of the object to be created in the table - * - * @pre A multi index table has been instantiated - * @post A new object is created in the Multi-Index table, with a unique primary key (as specified in the object). The object is serialized and written to the table. If the table does not exist, it is created. - * @post Secondary indices are updated to refer to the newly added object. If the secondary index tables do not exist, they are created. - * @post The payer is charged for the storage usage of the new object and, if the table (and secondary index tables) must be created, for the overhead of the table creation. - * - * @return A primary key iterator to the newly created object - * - * Exception - The account is not authorized to write to the table. - * - * Example: - * - * @code - * #include - * using namespace eosio; - * using namespace std; - * class addressbook: contract { - * struct address { - * uint64_t account_name; - * string first_name; - * string last_name; - * string street; - * string city; - * string state; - * uint64_t primary_key() const { return account_name; } - * EOSLIB_SERIALIZE( address, (account_name)(first_name)(last_name)(street)(city)(state) ) - * }; - * public: - * addressbook(account_name self):contract(self) {} - * typedef eosio::multi_index< N(address), address > address_index; - * void myaction() { - * address_index addresses(_self, _self); // code, scope - * // add to table, first argument is account to bill for storage - * addresses.emplace(_self, [&](auto& address) { - * address.account_name = N(dan); - * address.first_name = "Daniel"; - * address.last_name = "Larimer"; - * address.street = "1 EOS Way"; - * address.city = "Blacksburg"; - * address.state = "VA"; - * }); - * } - * } - * EOSIO_ABI( addressbook, (myaction) ) - * @endcode - */ - template - const_iterator emplace( uint64_t payer, Lambda&& constructor ) { - using namespace _multi_index_detail; - - eosio_assert( _code == current_receiver(), "cannot create objects in table of another contract" ); // Quick fix for mutating db using multi_index that shouldn't allow mutation. Real fix can come in RC2. - - auto itm = std::make_unique( this, [&]( auto& i ){ - T& obj = static_cast(i); - constructor( obj ); - - size_t size = pack_size( obj ); - - //using malloc/free here potentially is not exception-safe, although WASM doesn't support exceptions - void* buffer = max_stack_buffer_size < size ? malloc(size) : alloca(size); - - datastream ds( (char*)buffer, size ); - ds << obj; - - auto pk = obj.primary_key(); - - i.__primary_itr = db_store_i64( _scope, TableName, payer, pk, buffer, size ); - - if ( max_stack_buffer_size < size ) { - free(buffer); - } - - if( pk >= _next_primary_key ) - _next_primary_key = (pk >= no_available_primary_key) ? no_available_primary_key : (pk + 1); - - hana::for_each( _indices, [&]( auto& idx ) { - typedef typename decltype(+hana::at_c<0>(idx))::type index_type; - - i.__iters[index_type::number()] = secondary_index_db_functions::db_idx_store( _scope, index_type::name(), payer, obj.primary_key(), index_type::extract_secondary_key(obj) ); - }); - }); - - const item* ptr = itm.get(); - auto pk = itm->primary_key(); - auto pitr = itm->__primary_itr; - - _items_vector.emplace_back( std::move(itm), pk, pitr ); - - return {this, ptr}; - } - - /** - * Modifies an existing object in a table. - * @brief Modifies an existing object in a table. - * - * @param itr - an iterator pointing to the object to be updated - * @param payer - account name of the payer for the Storage usage of the updated row - * @param updater - lambda function that updates the target object - * - * @pre itr points to an existing element - * @pre payer is a valid account that is authorized to execute the action and be billed for storage usage. - * - * @post The modified object is serialized, then replaces the existing object in the table. - * @post Secondary indices are updated; the primary key of the updated object is not changed. - * @post The payer is charged for the storage usage of the updated object. - * @post If payer is the same as the existing payer, payer only pays for the usage difference between existing and updated object (and is refunded if this difference is negative). - * @post If payer is different from the existing payer, the existing payer is refunded for the storage usage of the existing object. - * - * Exceptions: - * If called with an invalid precondition, execution is aborted. - * - * Example: - * - * @code - * #include - * using namespace eosio; - * using namespace std; - * class addressbook: contract { - * struct address { - * uint64_t account_name; - * string first_name; - * string last_name; - * string street; - * string city; - * string state; - * uint64_t primary_key() const { return account_name; } - * EOSLIB_SERIALIZE( address, (account_name)(first_name)(last_name)(street)(city)(state) ) - * }; - * public: - * addressbook(account_name self):contract(self) {} - * typedef eosio::multi_index< N(address), address > address_index; - * void myaction() { - * address_index addresses(_self, _self); // code, scope - * // add to table, first argument is account to bill for storage - * addresses.emplace(_self, [&](auto& address) { - * address.account_name = N(dan); - * address.first_name = "Daniel"; - * address.last_name = "Larimer"; - * address.street = "1 EOS Way"; - * address.city = "Blacksburg"; - * address.state = "VA"; - * }); - * auto itr = addresses.find(N(dan)); - * eosio_assert(itr != addresses.end(), "Address for account not found"); - * addresses.modify( itr, account payer, [&]( auto& address ) { - * address.city = "San Luis Obispo"; - * address.state = "CA"; - * }); - * } - * } - * EOSIO_ABI( addressbook, (myaction) ) - * @endcode - */ - template - void modify( const_iterator itr, uint64_t payer, Lambda&& updater ) { - eosio_assert( itr != end(), "cannot pass end iterator to modify" ); - - modify( *itr, payer, std::forward(updater) ); - } - - /** - * Modifies an existing object in a table. - * @brief Modifies an existing object in a table. - * - * @param obj - a reference to the object to be updated - * @param payer - account name of the payer for the Storage usage of the updated row - * @param updater - lambda function that updates the target object - * - * @pre obj is an existing object in the table - * @pre payer is a valid account that is authorized to execute the action and be billed for storage usage. - * - * @post The modified object is serialized, then replaces the existing object in the table. - * @post Secondary indices are updated; the primary key of the updated object is not changed. - * @post The payer is charged for the storage usage of the updated object. - * @post If payer is the same as the existing payer, payer only pays for the usage difference between existing and updated object (and is refunded if this difference is negative). - * @post If payer is different from the existing payer, the existing payer is refunded for the storage usage of the existing object. - * - * Exceptions: - * If called with an invalid precondition, execution is aborted. - * - * Example: - * - * @code - * #include - * using namespace eosio; - * using namespace std; - * class addressbook: contract { - * struct address { - * uint64_t account_name; - * string first_name; - * string last_name; - * string street; - * string city; - * string state; - * uint64_t primary_key() const { return account_name; } - * EOSLIB_SERIALIZE( address, (account_name)(first_name)(last_name)(street)(city)(state) ) - * }; - * public: - * addressbook(account_name self):contract(self) {} - * typedef eosio::multi_index< N(address), address > address_index; - * void myaction() { - * address_index addresses(_self, _self); // code, scope - * // add to table, first argument is account to bill for storage - * addresses.emplace(_self, [&](auto& address) { - * address.account_name = N(dan); - * address.first_name = "Daniel"; - * address.last_name = "Larimer"; - * address.street = "1 EOS Way"; - * address.city = "Blacksburg"; - * address.state = "VA"; - * }); - * auto itr = addresses.find(N(dan)); - * eosio_assert(itr != addresses.end(), "Address for account not found"); - * addresses.modify( *itr, payer, [&]( auto& address ) { - * address.city = "San Luis Obispo"; - * address.state = "CA"; - * }); - * eosio_assert(itr->city == "San Luis Obispo", "Address not modified"); - * } - * } - * EOSIO_ABI( addressbook, (myaction) ) - * @endcode - */ - template - void modify( const T& obj, uint64_t payer, Lambda&& updater ) { - using namespace _multi_index_detail; - - const auto& objitem = static_cast(obj); - eosio_assert( objitem.__idx == this, "object passed to modify is not in multi_index" ); - auto& mutableitem = const_cast(objitem); - eosio_assert( _code == current_receiver(), "cannot modify objects in table of another contract" ); // Quick fix for mutating db using multi_index that shouldn't allow mutation. Real fix can come in RC2. - - auto secondary_keys = hana::transform( _indices, [&]( auto&& idx ) { - typedef typename decltype(+hana::at_c<0>(idx))::type index_type; - - return index_type::extract_secondary_key( obj ); - }); - - auto pk = obj.primary_key(); - - auto& mutableobj = const_cast(obj); // Do not forget the auto& otherwise it would make a copy and thus not update at all. - updater( mutableobj ); - - eosio_assert( pk == obj.primary_key(), "updater cannot change primary key when modifying an object" ); - - size_t size = pack_size( obj ); - //using malloc/free here potentially is not exception-safe, although WASM doesn't support exceptions - void* buffer = max_stack_buffer_size < size ? malloc(size) : alloca(size); - - datastream ds( (char*)buffer, size ); - ds << obj; - - db_update_i64( objitem.__primary_itr, payer, buffer, size ); - - if ( max_stack_buffer_size < size ) { - free( buffer ); - } - - if( pk >= _next_primary_key ) - _next_primary_key = (pk >= no_available_primary_key) ? no_available_primary_key : (pk + 1); - - hana::for_each( _indices, [&]( auto& idx ) { - typedef typename decltype(+hana::at_c<0>(idx))::type index_type; - - auto secondary = index_type::extract_secondary_key( obj ); - if( memcmp( &hana::at_c(secondary_keys), &secondary, sizeof(secondary) ) != 0 ) { - auto indexitr = mutableitem.__iters[index_type::number()]; - - if( indexitr < 0 ) { - typename index_type::secondary_key_type temp_secondary_key; - indexitr = mutableitem.__iters[index_type::number()] - = secondary_index_db_functions::db_idx_find_primary( _code, _scope, index_type::name(), pk, temp_secondary_key ); - } - - secondary_index_db_functions::db_idx_update( indexitr, payer, secondary ); - } - }); - } - - /** - * Retrieves an existing object from a table using its primary key. - * @brief Retrieves an existing object from a table using its primary key. - * - * @param primary - Primary key value of the object - * @return A constant reference to the object containing the specified primary key. - * - * Exception - No object matches the given key - * - * Example: - * - * @code - * #include - * using namespace eosio; - * using namespace std; - * class addressbook: contract { - * struct address { - * uint64_t account_name; - * string first_name; - * string last_name; - * string street; - * string city; - * string state; - * uint64_t primary_key() const { return account_name; } - * EOSLIB_SERIALIZE( address, (account_name)(first_name)(last_name)(street)(city)(state) ) - * }; - * public: - * addressbook(account_name self):contract(self) {} - * typedef eosio::multi_index< N(address), address > address_index; - * void myaction() { - * address_index addresses(_self, _self); // code, scope - * // add to table, first argument is account to bill for storage - * addresses.emplace(_self, [&](auto& address) { - * address.account_name = N(dan); - * address.first_name = "Daniel"; - * address.last_name = "Larimer"; - * address.street = "1 EOS Way"; - * address.city = "Blacksburg"; - * address.state = "VA"; - * }); - * auto user = addresses.get(N(dan)); - * eosio_assert(user.first_name == "Daniel", "Couldn't get him."); - * } - * } - * EOSIO_ABI( addressbook, (myaction) ) - * @endcode - */ - const T& get( uint64_t primary, const char* error_msg = "unable to find key" )const { - auto result = find( primary ); - eosio_assert( result != cend(), error_msg ); - return *result; - } - - /** - * Search for an existing object in a table using its primary key. - * @brief Search for an existing object in a table using its primary key. - * - * @param primary - Primary key value of the object - * @return An iterator to the found object which has a primary key equal to `primary` OR the `end` iterator of the referenced table if an object with primary key `primary` is not found. - * - * Example: - * - * @code - * #include - * using namespace eosio; - * using namespace std; - * class addressbook: contract { - * struct address { - * uint64_t account_name; - * string first_name; - * string last_name; - * string street; - * string city; - * string state; - * uint64_t primary_key() const { return account_name; } - * EOSLIB_SERIALIZE( address, (account_name)(first_name)(last_name)(street)(city)(state) ) - * }; - * public: - * addressbook(account_name self):contract(self) {} - * typedef eosio::multi_index< N(address), address > address_index; - * void myaction() { - * address_index addresses(_self, _self); // code, scope - * // add to table, first argument is account to bill for storage - * addresses.emplace(_self, [&](auto& address) { - * address.account_name = N(dan); - * address.first_name = "Daniel"; - * address.last_name = "Larimer"; - * address.street = "1 EOS Way"; - * address.city = "Blacksburg"; - * address.state = "VA"; - * }); - * auto itr = addresses.find(N(dan)); - * eosio_assert(itr != addresses.end(), "Couldn't get him."); - * } - * } - * EOSIO_ABI( addressbook, (myaction) ) - * @endcode - */ - const_iterator find( uint64_t primary )const { - auto itr2 = std::find_if(_items_vector.rbegin(), _items_vector.rend(), [&](const item_ptr& ptr) { - return ptr._item->primary_key() == primary; - }); - if( itr2 != _items_vector.rend() ) - return iterator_to(*(itr2->_item)); - - auto itr = db_find_i64( _code, _scope, TableName, primary ); - if( itr < 0 ) return end(); - - const item& i = load_object_by_primary_iterator( itr ); - return iterator_to(static_cast(i)); - } - - /** - * Search for an existing object in a table using its primary key. - * @brief Search for an existing object in a table using its primary key. - * - * @param primary - Primary key value of the object - * @param error_msg - error message if an object with primary key `primary` is not found. - * @return An iterator to the found object which has a primary key equal to `primary` OR throws an exception if an object with primary key `primary` is not found. - */ - - const_iterator require_find( uint64_t primary, const char* error_msg = "unable to find key" )const { - auto itr2 = std::find_if(_items_vector.rbegin(), _items_vector.rend(), [&](const item_ptr& ptr) { - return ptr._item->primary_key() == primary; - }); - if( itr2 != _items_vector.rend() ) - return iterator_to(*(itr2->_item)); - - auto itr = db_find_i64( _code, _scope, TableName, primary ); - eosio_assert( itr >= 0, error_msg ); - - const item& i = load_object_by_primary_iterator( itr ); - return iterator_to(static_cast(i)); - } - - /** - * Remove an existing object from a table using its primary key. - * @brief Remove an existing object from a table using its primary key. - * - * @param itr - An iterator pointing to the object to be removed - * - * @pre itr points to an existing element - * @post The object is removed from the table and all associated storage is reclaimed. - * @post Secondary indices associated with the table are updated. - * @post The existing payer for storage usage of the object is refunded for the table and secondary indices usage of the removed object, and if the table and indices are removed, for the associated overhead. - * - * @return For the signature with `const_iterator`, returns a pointer to the object following the removed object. - * - * Exceptions: - * The object to be removed is not in the table. - * The action is not authorized to modify the table. - * The given iterator is invalid. - * - * Example: - * - * @code - * #include - * using namespace eosio; - * using namespace std; - * class addressbook: contract { - * struct address { - * uint64_t account_name; - * string first_name; - * string last_name; - * string street; - * string city; - * string state; - * uint64_t primary_key() const { return account_name; } - * EOSLIB_SERIALIZE( address, (account_name)(first_name)(last_name)(street)(city)(state) ) - * }; - * public: - * addressbook(account_name self):contract(self) {} - * typedef eosio::multi_index< N(address), address > address_index; - * void myaction() { - * address_index addresses(_self, _self); // code, scope - * // add to table, first argument is account to bill for storage - * addresses.emplace(_self, [&](auto& address) { - * address.account_name = N(dan); - * address.first_name = "Daniel"; - * address.last_name = "Larimer"; - * address.street = "1 EOS Way"; - * address.city = "Blacksburg"; - * address.state = "VA"; - * }); - * auto itr = addresses.find(N(dan)); - * eosio_assert(itr != addresses.end(), "Address for account not found"); - * addresses.erase( itr ); - * eosio_assert(itr != addresses.end(), "Address not erased properly"); - * } - * } - * EOSIO_ABI( addressbook, (myaction) ) - * @endcode - */ - const_iterator erase( const_iterator itr ) { - eosio_assert( itr != end(), "cannot pass end iterator to erase" ); - - const auto& obj = *itr; - ++itr; - - erase(obj); - - return itr; - } - - /** - * Remove an existing object from a table using its primary key. - * @brief Remove an existing object from a table using its primary key. - * - * @param obj - Object to be removed - * - * @pre obj is an existing object in the table - * @post The object is removed from the table and all associated storage is reclaimed. - * @post Secondary indices associated with the table are updated. - * @post The existing payer for storage usage of the object is refunded for the table and secondary indices usage of the removed object, and if the table and indices are removed, for the associated overhead. - * - * Exceptions: - * The object to be removed is not in the table. - * The action is not authorized to modify the table. - * The given iterator is invalid. - * - * Example: - * - * @code - * #include - * using namespace eosio; - * using namespace std; - * class addressbook: contract { - * struct address { - * uint64_t account_name; - * string first_name; - * string last_name; - * string street; - * string city; - * string state; - * uint64_t primary_key() const { return account_name; } - * EOSLIB_SERIALIZE( address, (account_name)(first_name)(last_name)(street)(city)(state) ) - * }; - * public: - * addressbook(account_name self):contract(self) {} - * typedef eosio::multi_index< N(address), address > address_index; - * void myaction() { - * address_index addresses(_self, _self); // code, scope - * // add to table, first argument is account to bill for storage - * addresses.emplace(_self, [&](auto& address) { - * address.account_name = N(dan); - * address.first_name = "Daniel"; - * address.last_name = "Larimer"; - * address.street = "1 EOS Way"; - * address.city = "Blacksburg"; - * address.state = "VA"; - * }); - * auto itr = addresses.find(N(dan)); - * eosio_assert(itr != addresses.end(), "Record is not found"); - * addresses.erase(*itr); - * itr = addresses.find(N(dan)); - * eosio_assert(itr == addresses.end(), "Record is not deleted"); - * } - * } - * EOSIO_ABI( addressbook, (myaction) ) - * @endcode - */ - void erase( const T& obj ) { - using namespace _multi_index_detail; - - const auto& objitem = static_cast(obj); - eosio_assert( objitem.__idx == this, "object passed to erase is not in multi_index" ); - eosio_assert( _code == current_receiver(), "cannot erase objects in table of another contract" ); // Quick fix for mutating db using multi_index that shouldn't allow mutation. Real fix can come in RC2. - - auto pk = objitem.primary_key(); - auto itr2 = std::find_if(_items_vector.rbegin(), _items_vector.rend(), [&](const item_ptr& ptr) { - return ptr._item->primary_key() == pk; - }); - - eosio_assert( itr2 != _items_vector.rend(), "attempt to remove object that was not in multi_index" ); - - _items_vector.erase(--(itr2.base())); - - db_remove_i64( objitem.__primary_itr ); - - hana::for_each( _indices, [&]( auto& idx ) { - typedef typename decltype(+hana::at_c<0>(idx))::type index_type; - - auto i = objitem.__iters[index_type::number()]; - if( i < 0 ) { - typename index_type::secondary_key_type secondary; - i = secondary_index_db_functions::db_idx_find_primary( _code, _scope, index_type::name(), objitem.primary_key(), secondary ); - } - if( i >= 0 ) - secondary_index_db_functions::db_idx_remove( i ); - }); - } - -}; - /// @} -} /// eosio diff --git a/contracts/eosiolib/optional.hpp b/contracts/eosiolib/optional.hpp deleted file mode 100644 index fb3a404658f..00000000000 --- a/contracts/eosiolib/optional.hpp +++ /dev/null @@ -1,535 +0,0 @@ -#pragma once - -#include - -namespace eosio { - /** - * @defgroup optionaltype Optional Type - * @brief Defines otional type which is similar to boost::optional - * @ingroup types - * @{ - */ - - /** - * Provides stack-based nullable value similar to boost::optional - * - * @brief Provides stack-based nullable value similar to boost::optional - */ - template - class optional { - public: - typedef T value_type; - typedef typename std::aligned_storage::type storage_type; - - /** - * Default constructor - * - * @brief Construct a new optional object - */ - optional():_valid(false){} - - /** - * Destructor - * - * @brief Destroy the optional object - */ - ~optional(){ reset(); } - - /** - * Construct a new optional object from another optional object - * - * @brief Construct a new optional object - */ - optional( optional& o ) - :_valid(false) - { - if( o._valid ) new (ptr()) T( *o ); - _valid = o._valid; - } - - /** - * Copy constructor - * - * @brief Construct a new optional object - */ - optional( const optional& o ) - :_valid(false) - { - if( o._valid ) new (ptr()) T( *o ); - _valid = o._valid; - } - - /** - * Move constructor - * - * @brief Construct a new optional object - */ - optional( optional&& o ) - :_valid(false) - { - if( o._valid ) new (ptr()) T( std::move(*o) ); - _valid = o._valid; - o.reset(); - } - - /** - * Construct a new optional object from another type of optional object - * - * @brief Construct a new optional object from another type of optional object - */ - template - optional( const optional& o ) - :_valid(false) - { - if( o._valid ) new (ptr()) T( *o ); - _valid = o._valid; - } - - /** - * Construct a new optional object from another type of optional object - * - * @brief Construct a new optional object from another type of optional object - */ - template - optional( optional& o ) - :_valid(false) - { - if( o._valid ) - { - new (ptr()) T( *o ); - } - _valid = o._valid; - } - - /** - * Construct a new optional object from another type of optional object - * - * @brief Construct a new optional object from another type of optional object - */ - template - optional( optional&& o ) - :_valid(false) - { - if( o._valid ) new (ptr()) T( std::move(*o) ); - _valid = o._valid; - o.reset(); - } - - /** - * Construct a new optional object from another object - * - * @brief Construct a new optional object from another object - */ - template - optional( U&& u ) - :_valid(true) - { - new ((char*)ptr()) T( std::forward(u) ); - } - - /** - * Construct a new optional object from another object - * - * @brief Construct a new optional object from another object - */ - template - optional& operator=( U&& u ) - { - reset(); - new (ptr()) T( std::forward(u) ); - _valid = true; - return *this; - } - - /** - * Construct the contained value in place - * - * @brief Construct the contained value in place - * @tparam Args - Type of the contained value - * @param args - The value to be assigned as contained value - */ - template - void emplace(Args&& ... args) { - if (_valid) { - reset(); - } - - new ((char*)ptr()) T( std::forward(args)... ); - _valid = true; - } - - /** - * Assignment Operator - * - * @brief Assignment Operator - * @tparam U - Type of the contained value of the optional object to be assigned from - * @param o - The other optional object to be assigned from - * @return optional& - The reference to this object - */ - template - optional& operator=( optional& o ) { - if (this != &o) { - if( _valid && o._valid ) { - ref() = *o; - } else if( !_valid && o._valid ) { - new (ptr()) T( *o ); - _valid = true; - } else if (_valid) { - reset(); - } - } - return *this; - } - - /** - * Assignment Operator - * - * @brief Assignment Operator - * @tparam U - Type of the contained value of the optional object to be assigned from - * @param o - The other optional object to be assigned from - * @return optional& - The reference to this object - */ - template - optional& operator=( const optional& o ) { - if (this != &o) { - if( _valid && o._valid ) { - ref() = *o; - } else if( !_valid && o._valid ) { - new (ptr()) T( *o ); - _valid = true; - } else if (_valid) { - reset(); - } - } - return *this; - } - - /** - * Assignment Operator - * - * @brief Assignment Operator - * @param o - The other optional object to be assigned from - * @return optional& - The reference to this object - */ - optional& operator=( optional& o ) { - if (this != &o) { - if( _valid && o._valid ) { - ref() = *o; - } else if( !_valid && o._valid ) { - new (ptr()) T( *o ); - _valid = true; - } else if (_valid) { - reset(); - } - } - return *this; - } - - /** - * Assignment Operator - * - * @brief Assignment Operator - * @param o - The other optional object to be assigned from - * @return optional& - The reference to this object - */ - optional& operator=( const optional& o ) { - if (this != &o) { - if( _valid && o._valid ) { - ref() = *o; - } else if( !_valid && o._valid ) { - new (ptr()) T( *o ); - _valid = true; - } else if (_valid) { - reset(); - } - } - return *this; - } - - /** - * Assignment Operator - * - * @brief Assignment Operator - * @tparam U - Type of the contained value of the optional object to be assigned from - * @param o - The other optional object to be assigned from - * @return optional& - The reference to this object - */ - template - optional& operator=( optional&& o ) - { - if (this != &o) - { - if( _valid && o._valid ) - { - ref() = std::move(*o); - o.reset(); - } else if ( !_valid && o._valid ) { - *this = std::move(*o); - } else if (_valid) { - reset(); - } - } - return *this; - } - - /** - * Assignment Operator - * - * @brief Assignment Operator - * @param o - The other optional object to be assigned from - * @return optional& - The reference to this object - */ - optional& operator=( optional&& o ) - { - if (this != &o) - { - if( _valid && o._valid ) - { - ref() = std::move(*o); - o.reset(); - } else if ( !_valid && o._valid ) { - *this = std::move(*o); - } else if (_valid) { - reset(); - } - } - return *this; - } - - /** - * Check if this optional has valid contained value - * - * @brief Check if this optional has valid contained value - * @return true - if this optional has valid contained value - * @return false - otherwise - */ - bool valid()const { return _valid; } - - /** - * Logical Negation operator - * - * @brief Logical Negation Operator - * @return true - if this optional has invalid contained value - * @return false - otherwise - */ - bool operator!()const { return !_valid; } - - /** - * Similar to valid(). However, this operation is not safe and can result in unintential - * casts and comparisons, use valid() or !! - * - * @brief Check if this optional has valid contained value - * @return true - if this optional has valid contained value - * @return false - otherwise - */ - explicit operator bool()const { return _valid; } - - /** - * Get contained value of this optional - * - * @brief Pointer Dereference operator - * @return T& - Contained value - */ - T& operator*() { eosio_assert(_valid, "dereference of empty optional"); return ref(); } - - /** - * Get contained value of this optional - * - * @brief Pointer Dereference operator - * @return T& - Contained value - */ - const T& operator*()const { eosio_assert(_valid, "dereference of empty optional"); return ref(); } - - /** - * Get pointer to the contained value - * - * @brief Member Access Through Pointer Operator - * @return T& - The pointer to the contained value - */ - T* operator->() - { - eosio_assert(_valid, "dereference of empty optional"); - return ptr(); - } - - /** - * Get pointer to the contained value - * - * @brief Member Access Through Pointer Operator - * @return T& - The pointer to the contained value - */ - const T* operator->()const - { - eosio_assert(_valid, "dereference of empty optional"); - return ptr(); - } - - /** - * Assignment Operator with nullptr - * - * @brief Assignment Operator with nullptr - * @return optional& - The reference to this object - */ - optional& operator=(std::nullptr_t) - { - reset(); - return *this; - } - - /** - * Call the destructor fot he contained value and mark this optional as valid - * - * @brief Reset the optional object - */ - void reset() - { - if( _valid ) { - ref().~T(); // cal destructor - } - _valid = false; - } - - /** - * Check if a contained value is less than b contained value - * - * @brief Less than operator - * @param a - First object to compare - * @param b - Second object to compare - * @return true - if a contained value is less than b contained value - * @return false - otherwise - */ - friend bool operator < ( const optional a, optional b ) - { - if( a.valid() && b.valid() ) return *a < *b; - return a.valid() < b.valid(); - } - - /** - * Check if a contained value is equal to b contained value - * - * @brief Equality operator - * @param a - First object to compare - * @param b - Second object to compare - * @return true - if contained value is equal to b contained value - * @return false - otherwise - */ - friend bool operator == ( const optional a, optional b ) - { - if( a.valid() && b.valid() ) return *a == *b; - return a.valid() == b.valid(); - } - - /** - * Serialize an optional object - * - * @brief Serialize an optional object - * @param ds - The stream to write - * @param op - The value to serialize - * @tparam Stream - Type of datastream - * @return eosio::datastream& - Reference to the datastream - */ - template - friend inline eosio::datastream& operator>> (eosio::datastream& ds, optional& op) - { - char valid = 0; - ds >> valid; - if (valid) { - op._valid = true; - ds >> *op; - } - return ds; - } - - /** - * Deserialize an optional object - * - * @brief Deserialize an optional object - * @param ds - The stream to read - * @param op - The destination for deserialized value - * @tparam Stream - Type of datastream - * @return eosio::datastream& - Reference to the datastream - */ - template - friend inline eosio::datastream& operator<< (eosio::datastream& ds, const optional& op) - { - char valid = op._valid; - ds << valid; - if (valid) ds << *op; - return ds; - } - - private: - template friend class optional; - T& ref() { return *ptr(); } - const T& ref()const { return *ptr(); } - T* ptr() { return reinterpret_cast(&_value); } - const T* ptr()const { return reinterpret_cast(&_value); } - - bool _valid; - storage_type _value; - - }; - - /** - * Check equality between two optional object that shares same type of contained value - * - * @brief Equality Operator - * @tparam T - Type of contained value of the optional objects - * @param left - First object to be compared - * @param right - Second object to be compared - * @return true - if both optional objects are equal - * @return false - */ - template - bool operator == ( const optional& left, const optional& right ) { - return (!left == !right) || (!!left && *left == *right); - } - - /** - * Check equality between an optional object with another object - * - * @brief Equality Operator - * @tparam T - Type of contained value of the optional object - * @tparam U - Type of the other object to be compared - * @param left - First object to be compared - * @param u - Second object to be compared - * @return true - if the optional objects contained value is equal with the compared object - * @return false - */ - template - bool operator == ( const optional& left, const U& u ) { - return !!left && *left == u; - } - - /** - * Check inequality between two optional object that shares same type of contained value - * - * @brief Inquality Operator - * @tparam T - Type of contained value of the optional objects - * @param left - First object to be compared - * @param right - Second object to be compared - * @return true - if both optional objects are unequal - * @return false - */ - template - bool operator != ( const optional& left, const optional& right ) { - return (!left != !right) || (!!left && *left != *right); - } - - /** - * Check inequality between an optional object with another object - * - * @brief Inqquality Operator - * @tparam T - Type of contained value of the optional object - * @tparam U - Type of the other object to be compared - * @param left - First object to be compared - * @param u - Second object to be compared - * @return true - if the optional objects contained value is unequal with the compared object - * @return false - */ - template - bool operator != ( const optional& left, const U& u ) { - return !left || *left != u; - } -///@} optional -} // namespace eosio diff --git a/contracts/eosiolib/permission.h b/contracts/eosiolib/permission.h deleted file mode 100644 index 8acd07fd553..00000000000 --- a/contracts/eosiolib/permission.h +++ /dev/null @@ -1,68 +0,0 @@ -/** - * @file - * @copyright defined in eos/LICENSE.txt - */ -#pragma once -#include - -extern "C" { - /** - * @brief Checks if a transaction is authorized by a provided set of keys and permissions - * - * @param trx_data - pointer to the start of the serialized transaction - * @param trx_size - size (in bytes) of the serialized transaction - * @param pubkeys_data - pointer to the start of the serialized vector of provided public keys - * @param pubkeys_size - size (in bytes) of serialized vector of provided public keys (can be 0 if no public keys are to be provided) - * @param perms_data - pointer to the start of the serialized vector of provided permissions (empty permission name acts as wildcard) - * @param perms_size - size (in bytes) of the serialized vector of provided permissions - * - * @return 1 if the transaction is authorized, 0 otherwise - */ - int32_t - check_transaction_authorization( const char* trx_data, uint32_t trx_size, - const char* pubkeys_data, uint32_t pubkeys_size, - const char* perms_data, uint32_t perms_size - ); - - /** - * @brief Checks if a permission is authorized by a provided delay and a provided set of keys and permissions - * - * @param account - the account owner of the permission - * @param permission - the name of the permission to check for authorization - * @param pubkeys_data - pointer to the start of the serialized vector of provided public keys - * @param pubkeys_size - size (in bytes) of serialized vector of provided public keys (can be 0 if no public keys are to be provided) - * @param perms_data - pointer to the start of the serialized vector of provided permissions (empty permission name acts as wildcard) - * @param perms_size - size (in bytes) of the serialized vector of provided permissions - * @param delay_us - the provided delay in microseconds (cannot exceed INT64_MAX) - * - * @return 1 if the permission is authorized, 0 otherwise - */ - int32_t - check_permission_authorization( account_name account, - permission_name permission, - const char* pubkeys_data, uint32_t pubkeys_size, - const char* perms_data, uint32_t perms_size, - uint64_t delay_us - ); - - /** - * @brief Returns the last used time of a permission - * - * @param account - the account owner of the permission - * @param permission - the name of the permission - * - * @return the last used time (in microseconds since Unix epoch) of the permission - */ - int64_t get_permission_last_used( account_name account, permission_name permission ); - - - /** - * @brief Returns the creation time of an account - * - * @param account - the account - * - * @return the creation time (in microseconds since Unix epoch) of the account - */ - int64_t get_account_creation_time( account_name account ); - -} diff --git a/contracts/eosiolib/permission.hpp b/contracts/eosiolib/permission.hpp deleted file mode 100644 index a6956f5dd28..00000000000 --- a/contracts/eosiolib/permission.hpp +++ /dev/null @@ -1,98 +0,0 @@ -/** - * @file - * @copyright defined in eos/LICENSE.txt - */ -#pragma once - -#include -#include - -#include -#include - -namespace eosio { - - /** - * @brief Checks if a transaction is authorized by a provided set of keys and permissions - * - * @param trx - the transaction for which to check authorizations - * @param provided_permissions - the set of permissions which have authorized the transaction (empty permission name acts as wildcard) - * @param provided_keys - the set of public keys which have authorized the transaction - * - * @return whether the transaction was authorized by provided keys and permissions - */ - bool - check_transaction_authorization( const transaction& trx, - const std::set& provided_permissions , - const std::set& provided_keys = std::set() - ) - { - bytes packed_trx = pack(trx); - - bytes packed_keys; - auto nkeys = provided_keys.size(); - if( nkeys > 0 ) { - packed_keys = pack(provided_keys); - } - - bytes packed_perms; - auto nperms = provided_permissions.size(); - if( nperms > 0 ) { - packed_perms = pack(provided_permissions); - } - - auto res = ::check_transaction_authorization( packed_trx.data(), - packed_trx.size(), - (nkeys > 0) ? packed_keys.data() : (const char*)0, - (nkeys > 0) ? packed_keys.size() : 0, - (nperms > 0) ? packed_perms.data() : (const char*)0, - (nperms > 0) ? packed_perms.size() : 0 - ); - - return (res > 0); - } - - /** - * @brief Checks if a permission is authorized by a provided delay and a provided set of keys and permissions - * - * @param account - the account owner of the permission - * @param permission - the permission name to check for authorization - * @param provided_keys - the set of public keys which have authorized the transaction - * @param provided_permissions - the set of permissions which have authorized the transaction (empty permission name acts as wildcard) - * @param provided_delay_us - the provided delay in microseconds (cannot exceed INT64_MAX) - * - * @return whether the permission was authorized by provided delay, keys, and permissions - */ - bool - check_permission_authorization( account_name account, - permission_name permission, - const std::set& provided_keys, - const std::set& provided_permissions = std::set(), - uint64_t provided_delay_us = static_cast(std::numeric_limits::max()) - ) - { - bytes packed_keys; - auto nkeys = provided_keys.size(); - if( nkeys > 0 ) { - packed_keys = pack(provided_keys); - } - - bytes packed_perms; - auto nperms = provided_permissions.size(); - if( nperms > 0 ) { - packed_perms = pack(provided_permissions); - } - - auto res = ::check_permission_authorization( account, - permission, - (nkeys > 0) ? packed_keys.data() : (const char*)0, - (nkeys > 0) ? packed_keys.size() : 0, - (nperms > 0) ? packed_perms.data() : (const char*)0, - (nperms > 0) ? packed_perms.size() : 0, - provided_delay_us - ); - - return (res > 0); - } - -} diff --git a/contracts/eosiolib/print.h b/contracts/eosiolib/print.h deleted file mode 100644 index 63fd1da9d54..00000000000 --- a/contracts/eosiolib/print.h +++ /dev/null @@ -1,168 +0,0 @@ -/** - * @file - * @copyright defined in eos/LICENSE.txt - */ -#pragma once - -#include - -#ifdef __cplusplus -extern "C" { -#endif - /** - * @defgroup consoleapi Console API - * @brief Defines APIs to log/print text messages - * @ingroup contractdev - * - */ - - /** - * @defgroup consolecapi Console C API - * @brief Defnes %C API to log/print text messages - * @ingroup consoleapi - * @{ - */ - - /** - * Prints string - * @brief Prints string - * @param cstr - a null terminated string - * - * Example: -* - * @code - * prints("Hello World!"); // Output: Hello World! - * @endcode - */ - void prints( const char* cstr ); - - /** - * Prints string up to given length - * @brief Prints string - * @param cstr - pointer to string - * @param len - len of string to be printed - * - * Example: -* - * @code - * prints_l("Hello World!", 5); // Output: Hello - * @endcode - */ - void prints_l( const char* cstr, uint32_t len); - - /** - * Prints value as a 64 bit signed integer - * @brief Prints value as a 64 bit signed integer - * @param value of 64 bit signed integer to be printed - * - * Example: -* - * @code - * printi(-1e+18); // Output: -1000000000000000000 - * @endcode - */ - void printi( int64_t value ); - - /** - * Prints value as a 64 bit unsigned integer - * @brief Prints value as a 64 bit unsigned integer - * @param value of 64 bit unsigned integer to be printed - * - * Example: -* - * @code - * printui(1e+18); // Output: 1000000000000000000 - * @endcode - */ - void printui( uint64_t value ); - - /** - * Prints value as a 128 bit signed integer - * @brief Prints value as a 128 bit signed integer - * @param value is a pointer to the 128 bit signed integer to be printed - * - * Example: -* - * @code - * int128_t large_int(-87654323456); - * printi128(&large_int); // Output: -87654323456 - * @endcode - */ - void printi128( const int128_t* value ); - - /** - * Prints value as a 128 bit unsigned integer - * @brief Prints value as a 128 bit unsigned integer - * @param value is a pointer to the 128 bit unsigned integer to be printed - * - * Example: -* - * @code - * uint128_t large_int(87654323456); - * printui128(&large_int); // Output: 87654323456 - * @endcode - */ - void printui128( const uint128_t* value ); - - /** - * Prints value as single-precision floating point number - * @brief Prints value as single-precision floating point number (i.e. float) - * @param value of float to be printed - * - * Example: -* - * @code - * float value = 5.0 / 10.0; - * printsf(value); // Output: 0.5 - * @endcode - */ - void printsf(float value); - - /** - * Prints value as double-precision floating point number - * @brief Prints value as double-precision floating point number (i.e. double) - * @param value of double to be printed - * - * Example: -* - * @code - * double value = 5.0 / 10.0; - * printdf(value); // Output: 0.5 - * @endcode - */ - void printdf(double value); - - /** - * Prints value as quadruple-precision floating point number - * @brief Prints value as quadruple-precision floating point number (i.e. long double) - * @param value is a pointer to the long double to be printed - * - * Example: -* - * @code - * long double value = 5.0 / 10.0; - * printqf(value); // Output: 0.5 - * @endcode - */ - void printqf(const long double* value); - - /** - * Prints a 64 bit names as base32 encoded string - * @brief Prints a 64 bit names as base32 encoded string - * @param name - 64 bit name to be printed - * - * Example: - * @code - * printn(N(abcde)); // Output: abcde - * @endcode - */ - void printn( uint64_t name ); - - /** - */ - void printhex( const void* data, uint32_t datalen ); - - /// @} -#ifdef __cplusplus -} -#endif diff --git a/contracts/eosiolib/print.hpp b/contracts/eosiolib/print.hpp deleted file mode 100644 index a90a277cf47..00000000000 --- a/contracts/eosiolib/print.hpp +++ /dev/null @@ -1,321 +0,0 @@ -/** - * @file - * @copyright defined in eos/LICENSE.txt - */ -#pragma once -#include -#include -#include -#include -#include - -namespace eosio { - - static_assert( sizeof(long) == sizeof(int), "unexpected size difference" ); - - /** - * Prints string - * - * @brief Prints string - * @param ptr - a null terminated string - */ - inline void print( const char* ptr ) { - prints(ptr); - } - - inline void print( const std::string& s) { - prints_l( s.c_str(), s.size() ); - } - - inline void print( std::string& s) { - prints_l( s.c_str(), s.size() ); - } - - inline void print( const char c ) { - prints_l( &c, 1 ); - } - - /** - * Prints signed integer - * - * @brief Prints signed integer as a 64 bit signed integer - * @param num to be printed - */ - inline void print( int num ) { - printi(num); - } - - /** - * Prints 32 bit signed integer - * - * @brief Prints 32 bit signed integer as a 64 bit signed integer - * @param num to be printed - */ - inline void print( int32_t num ) { - printi(num); - } - - /** - * Prints 64 bit signed integer - * - * @brief Prints 64 bit signed integer as a 64 bit signed integer - * @param num to be printed - */ - inline void print( int64_t num ) { - printi(num); - } - - - /** - * Prints unsigned integer - * - * @brief Prints unsigned integer as a 64 bit unsigned integer - * @param num to be printed - */ - inline void print( unsigned int num ) { - printui(num); - } - - /** - * Prints 32 bit unsigned integer - * - * @brief Prints 32 bit unsigned integer as a 64 bit unsigned integer - * @param num to be printed - */ - inline void print( uint32_t num ) { - printui(num); - } - - /** - * Prints 64 bit unsigned integer - * - * @brief Prints 64 bit unsigned integer as a 64 bit unsigned integer - * @param num to be printed - */ - inline void print( uint64_t num ) { - printui(num); - } - - /** - * Prints 128 bit signed integer - * - * @brief Prints 128 bit signed integer - * @param num to be printed - */ - inline void print( int128_t num ) { - printi128(&num); - } - - /** - * Prints 128 bit unsigned integer - * - * @brief Prints 128 bit unsigned integer - * @param num to be printed - */ - inline void print( uint128_t num ) { - printui128(&num); - } - - - /** - * Prints single-precision floating point number - * - * @brief Prints single-precision floating point number (i.e. float) - * @param num to be printed - */ - inline void print( float num ) { printsf( num ); } - - /** - * Prints double-precision floating point number - * - * @brief Prints double-precision floating point number (i.e. double) - * @param num to be printed - */ - inline void print( double num ) { printdf( num ); } - - /** - * Prints quadruple-precision floating point number - * - * @brief Prints quadruple-precision floating point number (i.e. long double) - * @param num to be printed - */ - inline void print( long double num ) { printqf( &num ); } - - - /** - * Prints fixed_key as a hexidecimal string - * - * @brief Prints fixed_key as a hexidecimal string - * @param val to be printed - */ - template - inline void print( const fixed_key& val ) { - auto arr = val.extract_as_byte_array(); - prints("0x"); - printhex(static_cast(arr.data()), arr.size()); - } - - /** - * Prints fixed_key as a hexidecimal string - * - * @brief Prints fixed_key as a hexidecimal string - * @param val to be printed - */ - template - inline void print( fixed_key& val ) { - print(static_cast&>(val)); - } - - /** - * Prints a 64 bit names as base32 encoded string - * - * @brief Prints a 64 bit names as base32 encoded string - * @param name 64 bit name to be printed - */ - inline void print( name name ) { - printn(name.value); - } - - /** - * Prints bool - * - * @brief Prints bool - * @param val to be printed - */ - inline void print( bool val ) { - prints(val?"true":"false"); - } - - - /** - * Prints class object - * - * @brief Prints class object - * @param t to be printed - * @pre T must implements print() function - */ - template - inline void print( T&& t ) { - t.print(); - } - - /** - * Prints null terminated string - * - * @brief Prints null terminated string - * @param s null terminated string to be printed - */ - inline void print_f( const char* s ) { - prints(s); - } - - /** - * @defgroup consolecppapi Console C++ API - * @ingroup consoleapi - * @brief Defines C++ wrapper to log/print text messages - * - * This API uses C++ variadic templates and type detection to - * make it easy to print any native type. You can even overload - * the `print()` method for your own custom types. - * - * **Example:** - * ``` - * print( "hello world, this is a number: ", 5 ); - * ``` - * - * @section override Overriding Print for your Types - * - * There are two ways to overload print: - * 1. implement void print( const T& ) - * 2. implement T::print()const - * - * @{ - */ - - - /** - * Prints formatted string. It behaves similar to C printf/ - * - * @brief Prints formatted string - * @tparam Arg - Type of the value used to replace the format specifier - * @tparam Args - Type of the value used to replace the format specifier - * @param s - Null terminated string with to be printed (it can contains format specifier) - * @param val - The value used to replace the format specifier - * @param rest - The values used to replace the format specifier - * - * Example: - * @code - * print_f("Number of apples: %", 10); - * @endcode - */ - template - inline void print_f( const char* s, Arg val, Args... rest ) { - while ( *s != '\0' ) { - if ( *s == '%' ) { - print( val ); - print_f( s+1, rest... ); - return; - } - prints_l( s, 1 ); - s++; - } - } - - /** - * Print out value / list of values - * @brief Print out value / list of values - * @param a - The value to be printed - * @param args - The other values to be printed - * - * Example: -* - * @code - * const char *s = "Hello World!"; - * uint64_t unsigned_64_bit_int = 1e+18; - * uint128_t unsigned_128_bit_int (87654323456); - * uint64_t string_as_unsigned_64_bit = N(abcde); - * print(s , unsigned_64_bit_int, unsigned_128_bit_int, string_as_unsigned_64_bit); - * // Ouput: Hello World!100000000000000000087654323456abcde - * @endcode - */ - template - void print( Arg&& a, Args&&... args ) { - print(std::forward(a)); - print(std::forward(args)...); - } - - /** - * Simulate C++ style streams - */ - class iostream {}; - - /** - * Overload c++ iostream - * @brief Overload c++ iostream - * @param out - Output strem - * @param v - The value to be printed - * @return iostream& - Reference to the input output stream - * - * Example: -* - * @code - * const char *s = "Hello World!"; - * uint64_t unsigned_64_bit_int = 1e+18; - * uint128_t unsigned_128_bit_int (87654323456); - * uint64_t string_as_unsigned_64_bit = N(abcde); - * std::out << s << " " << unsigned_64_bit_int << " " << unsigned_128_bit_int << " " << string_as_unsigned_64_bit; - * // Output: Hello World! 1000000000000000000 87654323456 abcde - * @endcode - */ - template - inline iostream& operator<<( iostream& out, const T& v ) { - print( v ); - return out; - } - - static iostream cout; - - /// @} consolecppapi - - -} diff --git a/contracts/eosiolib/privileged.h b/contracts/eosiolib/privileged.h deleted file mode 100644 index 8943a09db23..00000000000 --- a/contracts/eosiolib/privileged.h +++ /dev/null @@ -1,105 +0,0 @@ -#pragma once - -#ifdef __cplusplus -extern "C" { -#endif - - /** - * @defgroup privilegedapi Privileged API - * @ingroup systemapi - * @brief Defines an API for accessing configuration of the chain that can only be done by privileged accounts - */ - - /** - * @defgroup privilegedcapi Privileged C API - * @ingroup privilegedapi - * @brief Defines %C Privileged API - * - * @{ - */ - - /** - * @brief Get the resource limits of an account - * Get the resource limits of an account - * @param account - name of the account whose resource limit to get - * @param ram_bytes - pointer to `int64_t` to hold retrieved ram limit in absolute bytes - * @param net_weight - pointer to `int64_t` to hold net limit - * @param cpu_weight - pointer to `int64_t` to hold cpu limit - */ - void get_resource_limits( account_name account, int64_t* ram_bytes, int64_t* net_weight, int64_t* cpu_weight ); - - /** - * @brief Set the resource limits of an account - * Set the resource limits of an account - * @param account - name of the account whose resource limit to be set - * @param ram_bytes - ram limit in absolute bytes - * @param net_weight - fractionally proportionate net limit of available resources based on (weight / total_weight_of_all_accounts) - * @param cpu_weight - fractionally proportionate cpu limit of available resources based on (weight / total_weight_of_all_accounts) - */ - void set_resource_limits( account_name account, int64_t ram_bytes, int64_t net_weight, int64_t cpu_weight ); - - /** - * Proposes a schedule change, once the block that contains the proposal becomes irreversible, the schedule is promoted to "pending" automatically. Once the block that promotes the schedule is irreversible, the schedule will become "active" - * @param producer_data - packed data of produce_keys in the appropriate producer schedule order - * @param producer_data_size - size of the data buffer - * - * @return -1 if proposing a new producer schedule was unsuccessful, otherwise returns the version of the new proposed schedule - */ - int64_t set_proposed_producers( char *producer_data, uint32_t producer_data_size ); - - /** - * @brief Set new active producers - * Set new active producers. Producers will only be activated once the block which starts the next round is irrreversible - * @param producer_data - pointer to producer schedule packed as bytes - * @param producer_data_size - size of the packed producer schedule - * @pre `producer_data` is a valid pointer to a range of memory at least `producer_data_size` bytes long that contains serialized produced schedule data - */ - void set_active_producers( char *producer_data, uint32_t producer_data_size ); - /** - * @brief Check if an account is privileged - * Check if an account is privileged - * @param account - name of the account to be checked - * @return true if the account is privileged - * @return false if the account is not privileged - */ - bool is_privileged( account_name account ); - - /** - * @brief Set the privileged status of an account - * Set the privileged status of an account - * @param account - name of the account whose privileged account to be set - * @param is_priv - privileged status - */ - void set_privileged( account_name account, bool is_priv ); - - /** - * @brief Set the blockchain parameters - * Set the blockchain parameters - * @param data - pointer to blockchain parameters packed as bytes - * @param datalen - size of the packed blockchain parameters - * @pre `data` is a valid pointer to a range of memory at least `datalen` bytes long that contains packed blockchain params data - */ - void set_blockchain_parameters_packed(char* data, uint32_t datalen); - - /** - * @brief Retrieve the blolckchain parameters - * Retrieve the blolckchain parameters - * @param data - output buffer of the blockchain parameters, only retrieved if sufficent size to hold packed data. - * @param datalen - size of the data buffer, 0 to report required size. - * @return size of the blockchain parameters - * @pre `data` is a valid pointer to a range of memory at least `datalen` bytes long - * @post `data` is filled with packed blockchain parameters - */ - uint32_t get_blockchain_parameters_packed(char* data, uint32_t datalen); - - /** - * @brief Activate new feature - * Activate new feature - * @param f - name (identifier) of the feature to be activated - */ - void activate_feature( int64_t f ); - - ///@ } privilegedcapi -#ifdef __cplusplus -} -#endif diff --git a/contracts/eosiolib/privileged.hpp b/contracts/eosiolib/privileged.hpp deleted file mode 100644 index 3091acf8b3b..00000000000 --- a/contracts/eosiolib/privileged.hpp +++ /dev/null @@ -1,162 +0,0 @@ -#pragma once -#include "privileged.h" -#include "serialize.hpp" -#include "types.h" - -namespace eosio { - - /** - * @defgroup privilegedcppapi Privileged C++ API - * @ingroup privilegedapi - * @brief Defines C++ Privileged API - * - * @{ - */ - - /** - * Tunable blockchain configuration that can be changed via consensus - * - * @brief Tunable blockchain configuration that can be changed via consensus - */ - struct blockchain_parameters { - - uint64_t max_block_net_usage; - - uint32_t target_block_net_usage_pct; - - uint32_t max_transaction_net_usage; - - /** - * The base amount of net usage billed for a transaction to cover incidentals - * @brief The base amount of net usage billed for a transaction to cover incidentals - */ - uint32_t base_per_transaction_net_usage; - - uint32_t net_usage_leeway; - - uint32_t context_free_discount_net_usage_num; - - uint32_t context_free_discount_net_usage_den; - - uint32_t max_block_cpu_usage; - - uint32_t target_block_cpu_usage_pct; - - uint32_t max_transaction_cpu_usage; - - uint32_t min_transaction_cpu_usage; - - - /** - * The numerator for the discount on cpu usage for CFA's - * - * @brief The numerator for the discount on cpu usage for CFA's - */ - uint64_t context_free_discount_cpu_usage_num; - - /** - * The denominator for the discount on cpu usage for CFA's - * - * @brief The denominator for the discount on cpu usage for CFA's - - */ - uint64_t context_free_discount_cpu_usage_den; - - /** - * Maximum lifetime of a transacton - * - * @brief Maximum lifetime of a transacton - */ - uint32_t max_transaction_lifetime; - - uint32_t deferred_trx_expiration_window; - - uint32_t max_transaction_delay; - - /** - * Maximum size of inline action - * - * @brief Maximum size of inline action - */ - uint32_t max_inline_action_size; - - /** - * Maximum depth of inline action - * - * @brief Maximum depth of inline action - */ - uint16_t max_inline_action_depth; - - /** - * Maximum authority depth - * - * @brief Maximum authority depth - */ - uint16_t max_authority_depth; - - - EOSLIB_SERIALIZE( blockchain_parameters, - (max_block_net_usage)(target_block_net_usage_pct) - (max_transaction_net_usage)(base_per_transaction_net_usage)(net_usage_leeway) - (context_free_discount_net_usage_num)(context_free_discount_net_usage_den) - - (max_block_cpu_usage)(target_block_cpu_usage_pct) - (max_transaction_cpu_usage)(min_transaction_cpu_usage) - - (max_transaction_lifetime)(deferred_trx_expiration_window)(max_transaction_delay) - (max_inline_action_size)(max_inline_action_depth)(max_authority_depth) - ) - }; - - /** - * @brief Set the blockchain parameters - * Set the blockchain parameters - * @param params - New blockchain parameters to set - */ - void set_blockchain_parameters(const eosio::blockchain_parameters& params); - - /** - * @brief Retrieve the blolckchain parameters - * Retrieve the blolckchain parameters - * @param params - It will be replaced with the retrieved blockchain params - */ - void get_blockchain_parameters(eosio::blockchain_parameters& params); - - ///@} priviledgedcppapi - - /** - * @defgroup producertype Producer Type - * @ingroup types - * @brief Defines producer type - * - * @{ - */ - - /** - * Maps producer with its signing key, used for producer schedule - * - * @brief Maps producer with its signing key - */ - struct producer_key { - - /** - * Name of the producer - * - * @brief Name of the producer - */ - account_name producer_name; - - /** - * Block signing key used by this producer - * - * @brief Block signing key used by this producer - */ - public_key block_signing_key; - - friend bool operator < ( const producer_key& a, const producer_key& b ) { - return a.producer_name < b.producer_name; - } - - EOSLIB_SERIALIZE( producer_key, (producer_name)(block_signing_key) ) - }; -} diff --git a/contracts/eosiolib/producer_schedule.hpp b/contracts/eosiolib/producer_schedule.hpp deleted file mode 100644 index 8fd2a26c973..00000000000 --- a/contracts/eosiolib/producer_schedule.hpp +++ /dev/null @@ -1,30 +0,0 @@ -#pragma once -#include - -#include - -namespace eosio { - - /** - * Defines both the order, account name, and signing keys of the active set of producers. - * - * @brief Defines both the order, account name, and signing keys of the active set of producers. - */ - struct producer_schedule { - /** - * Version number of the schedule. It is sequentially incrementing version number - * - * @brief Version number of the schedule - */ - uint32_t version; - - /** - * List of producers for this schedule, including its signing key - * - * @brief List of producers for this schedule, including its signing key - */ - std::vector producers; - }; - - /// @} producertype -} /// namespace eosio diff --git a/contracts/eosiolib/public_key.hpp b/contracts/eosiolib/public_key.hpp deleted file mode 100644 index e7061ef74c9..00000000000 --- a/contracts/eosiolib/public_key.hpp +++ /dev/null @@ -1,44 +0,0 @@ -#pragma once -#include -#include - -namespace eosio { - - /** - * @defgroup publickeytype Public Key Type - * @ingroup types - * @brief Specifies public key type - * - * @{ - */ - - /** - * EOSIO Public Key - * @brief EOSIO Public Key - */ - struct public_key { - /** - * Type of the public key, could be either K1 or R1 - * @brief Type of the public key - */ - unsigned_int type; - - /** - * Bytes of the public key - * - * @brief Bytes of the public key - */ - std::array data; - - friend bool operator == ( const public_key& a, const public_key& b ) { - return std::tie(a.type,a.data) == std::tie(b.type,b.data); - } - friend bool operator != ( const public_key& a, const public_key& b ) { - return std::tie(a.type,a.data) != std::tie(b.type,b.data); - } - EOSLIB_SERIALIZE( public_key, (type)(data) ) - }; - -} - -/// @} publickeytype diff --git a/contracts/eosiolib/reflect.hpp b/contracts/eosiolib/reflect.hpp deleted file mode 100644 index bea480ffc6e..00000000000 --- a/contracts/eosiolib/reflect.hpp +++ /dev/null @@ -1,186 +0,0 @@ -#pragma once -#include -#include -#include -#include -#include - -namespace eosio { - template - struct reflector { - typedef std::false_type is_reflected; - typedef std::false_type is_enum; - }; - -} /// eosio - - - -#define EOSLIB_REFLECT_VISIT_BASE(r, visitor, base) \ - eosio::reflector::visit( visitor ); - -#define EOSLIB_REFLECT_VISIT2_BASE(r, visitor, base) \ - eosio::reflector::visit( t, forward(visitor) ); - - -#define EOSLIB_REFLECT_VISIT_MEMBER( r, visitor, elem ) \ -{ typedef decltype((static_cast(nullptr))->elem) member_type; \ - visitor( &type::elem ); \ -} - -#define EOSLIB_REFLECT_VISIT2_MEMBER( r, visitor, elem ) \ -{ typedef decltype((static_cast(nullptr))->elem) member_type; \ - visitor( t.elem ); \ -} - - -#define EOSLIB_REFLECT_BASE_MEMBER_COUNT( r, OP, elem ) \ - OP eosio::reflector::total_member_count - -#define EOSLIB_REFLECT_MEMBER_COUNT( r, OP, elem ) \ - OP 1 - -#define EOSLIB_REFLECT_DERIVED_IMPL_INLINE( TYPE, INHERITS, MEMBERS ) \ -template\ -static inline void visit( Visitor&& v ) { \ - BOOST_PP_SEQ_FOR_EACH( EOSLIB_REFLECT_VISIT_BASE, v, INHERITS ) \ - BOOST_PP_SEQ_FOR_EACH( EOSLIB_REFLECT_VISIT_MEMBER, v, MEMBERS ) \ -} \ -template\ -static inline void visit( const type& t, Visitor&& v ) { \ - BOOST_PP_SEQ_FOR_EACH( EOSLIB_REFLECT_VISIT2_BASE, v, INHERITS ) \ - BOOST_PP_SEQ_FOR_EACH( EOSLIB_REFLECT_VISIT2_MEMBER, v, MEMBERS ) \ -} \ -template\ -static inline void visit( type& t, Visitor&& v ) { \ - BOOST_PP_SEQ_FOR_EACH( EOSLIB_REFLECT_VISIT2_BASE, v, INHERITS ) \ - BOOST_PP_SEQ_FOR_EACH( EOSLIB_REFLECT_VISIT2_MEMBER, v, MEMBERS ) \ -} - -#define EOSLIB_REFLECT_DERIVED_IMPL_EXT( TYPE, INHERITS, MEMBERS ) \ -template\ -void eosio::reflector::visit( Visitor&& v ) { \ - BOOST_PP_SEQ_FOR_EACH( EOSLIB_REFLECT_VISIT_BASE, v, INHERITS ) \ - BOOST_PP_SEQ_FOR_EACH( EOSLIB_REFLECT_VISIT_MEMBER, v, MEMBERS ) \ -} - - -/** - * @addtogroup serializecpp - * @{ - */ - -/** - * Perform class reflection - * - * @brief Specializes eosio::reflector for TYPE - * @param TYPE - the class template to be reflected - * @param MEMBERS - a sequence of member names. (field1)(field2)(field3) - * - * @see EOSLIB_REFLECT_DERIVED - */ -#define EOSLIB_REFLECT( TYPE, MEMBERS ) \ - EOSLIB_REFLECT_DERIVED( TYPE, BOOST_PP_SEQ_NIL, MEMBERS ) - -/** - * Perform class template reflection - * - * @brief Perform class template reflection - * @param TEMPLATE_ARGS - a sequence of template args. (args1)(args2)(args3) - * @param TYPE - the class template to be reflected - * @param MEMBERS - a sequence of member names. (field1)(field2)(field3) - */ -#define EOSLIB_REFLECT_TEMPLATE( TEMPLATE_ARGS, TYPE, MEMBERS ) \ - EOSLIB_REFLECT_DERIVED_TEMPLATE( TEMPLATE_ARGS, TYPE, BOOST_PP_SEQ_NIL, MEMBERS ) - -/** - * Perform class reflection on empty class - * - * @brief Perform class reflection on empty class - * @param TYPE - the class to be reflected - */ -#define EOSLIB_REFLECT_EMPTY( TYPE ) \ - EOSLIB_REFLECT_DERIVED( TYPE, BOOST_PP_SEQ_NIL, BOOST_PP_SEQ_NIL ) - -/** - * Perform forward declaration of class reflection - * - * @brief Perform forward declaration of class reflection - * @param TYPE - the class to be reflected - */ -#define EOSLIB_REFLECT_FWD( TYPE ) \ -namespace eosio { \ - template<> struct reflector {\ - typedef TYPE type; \ - typedef eosio::true_type is_reflected; \ - enum member_count_enum { \ - local_member_count = BOOST_PP_SEQ_SIZE(MEMBERS), \ - total_member_count = local_member_count BOOST_PP_SEQ_FOR_EACH( EOSLIB_REFLECT_BASE_MEMBER_COUNT, +, INHERITS )\ - }; \ - template static void visit( Visitor&& v ); \ - template static void visit( const type& t, Visitor&& v ); \ - template static void visit( type& t, Visitor&& v ); \ - }; } - -///@} - -#define EOSLIB_REFLECT_DERIVED_IMPL( TYPE, MEMBERS ) \ - EOSLIB_REFLECT_IMPL_DERIVED_EXT( TYPE, BOOST_PP_SEQ_NIL, MEMBERS ) - -#define EOSLIB_REFLECT_IMPL( TYPE, MEMBERS ) \ - EOSLIB_REFLECT_DERIVED_IMPL_EXT( TYPE, BOOST_PP_SEQ_NIL, MEMBERS ) - - -/** - * @addtogroup serializecpp - * @{ - */ - -/** - * Perform class reflection where TYPE inherits other reflected classes - * - * @brief Specializes eosio::reflector for TYPE where - * type inherits other reflected classes - * - * @param TYPE - the class to be reflected - * @param INHERITS - a sequence of base class names (basea)(baseb)(basec) - * @param MEMBERS - a sequence of member names. (field1)(field2)(field3) - */ -#define EOSLIB_REFLECT_DERIVED( TYPE, INHERITS, MEMBERS ) \ -namespace eosio { \ -template<> struct reflector {\ - typedef TYPE type; \ - typedef eosio::true_type is_reflected; \ - typedef eosio::false_type is_enum; \ - enum member_count_enum { \ - local_member_count = 0 BOOST_PP_SEQ_FOR_EACH( EOSLIB_REFLECT_MEMBER_COUNT, +, MEMBERS ),\ - total_member_count = local_member_count BOOST_PP_SEQ_FOR_EACH( EOSLIB_REFLECT_BASE_MEMBER_COUNT, +, INHERITS )\ - }; \ - EOSLIB_REFLECT_DERIVED_IMPL_INLINE( TYPE, INHERITS, MEMBERS ) \ -}; } - -/** - * Perform class template reflection where TYPE inherits other reflected classes - * - * @brief Perform class template reflection where TYPE inherits other reflected classes - * - * @param TEMPLATE_ARGS - a sequence of template args. (args1)(args2)(args3) - * @param TYPE - the class to be reflected - * @param INHERITS - a sequence of base class names (basea)(baseb)(basec) - * @param MEMBERS - a sequence of member names. (field1)(field2)(field3) - */ -#define EOSLIB_REFLECT_DERIVED_TEMPLATE( TEMPLATE_ARGS, TYPE, INHERITS, MEMBERS ) \ -namespace eosio { \ -template struct reflector {\ - typedef TYPE type; \ - typedef eosio::true_type is_defined; \ - typedef eosio::false_type is_enum; \ - enum member_count_enum { \ - local_member_count = 0 BOOST_PP_SEQ_FOR_EACH( EOSLIB_REFLECT_MEMBER_COUNT, +, MEMBERS ),\ - total_member_count = local_member_count BOOST_PP_SEQ_FOR_EACH( EOSLIB_REFLECT_BASE_MEMBER_COUNT, +, INHERITS )\ - }; \ - EOSLIB_REFLECT_DERIVED_IMPL_INLINE( TYPE, INHERITS, MEMBERS ) \ -}; } - - -///@} diff --git a/contracts/eosiolib/rpc.dox b/contracts/eosiolib/rpc.dox deleted file mode 100644 index 047250276eb..00000000000 --- a/contracts/eosiolib/rpc.dox +++ /dev/null @@ -1,544 +0,0 @@ -/** -@defgroup eosiorpc RPC Interface -@brief Describes how to interface with eosd over HTTP RPC - -@section tableofcontent Table Of Contents -- [Configuration](#configuration) -- [Chain API](#chainrpc) - - [get_info](#v1chaingetinfo) - - [get_block](#v1chaingetblock) - - [get_account](#v1chaingetaccount) - - [get_code](#v1chaingetcode) - - [get_table_rows](#v1chaingettablerows) - - [abi_json_to_bin](#v1chainabijsontobin) - - [abi_bin_to_json](#v1chainabibintojson) - - [push_transaction](#v1chainpushtransaction) - - [push_transactions](#v1chainpushtransactions) - - [get_required_keys](#v1chaingetrequiredkeys) -- [Wallet API](#walletrpc) - - [wallet_create](#v1walletcreate) - - [wallet_open](#v1walletopen) - - [wallet_lock](#v1walletlock) - - [wallet_lock_all](#v1walletlockall) - - [wallet_import_key](#v1walletimportkey) - - [wallet_list](#v1walletlist) - - [wallet_list_keys](#v1walletlistkeys) - - [wallet_get_public_keys](#v1walletgetpublickeys) - - [wallet_set_timeout](#v1walletsettimeout) - - [wallet_sign_trx](#v1walletsigntrx) - -@section configuration Configuration - -`eosd` uses a REST RPC interface where plugins can register their own endpoints with the API server. This page -will explain how to use some of the APIs to get information about the blockchain and send transactions. - -Before you can query `eosd` you must first enable the necessary API plugin(s). Depending on which API you want to enable, add the following line to your `eosd`'s `config.ini`: -``` -plugin = eosio::chain_api_plugin // Enable Chain API -plugin = eosio::wallet_api_plugin // Enable Wallet API -``` -Alternatively, for Wallet API, you can also have the wallet functionality separate from `eosd`, by running `eos-walletd` separately. - -For the following guide, we will assume that we have `eosd` running on `127.0.0.1:8888` (Chain API Plugin enabled, Wallet API Plugin disabled) and `eos-walletd` running on `127.0.0.1:8889`. - -=== - -@section chainrpc Chain API - - -@subsection v1chaingetinfo get_info - -Get latest information related to a node - -@subsubsection examplegetinfo Example get_info Usage - -``` -curl http://127.0.0.1:8888/v1/chain/get_info -``` - -@subsubsection examplegetinforesult Example get_info Result - -``` -{ - "server_version": "b2eb1667", - "head_block_num": 259590, - "last_irreversible_block_num": 259573, - "head_block_id": "0003f60677f3707f0704f16177bf5f007ebd45eb6efbb749fb1c468747f72046", - "head_block_time": "2017-12-10T17:05:36", - "head_block_producer": "initp", - "recent_slots": "1111111111111111111111111111111111111111111111111111111111111111", - "participation_rate": "1.00000000000000000" -} -``` - -@subsection v1chaingetblock get_block - -Get information related to a block. - -@subsubsection examplegetblock Example get_block Usage -``` -$ curl http://127.0.0.1:8888/v1/chain/get_block -X POST -d '{"block_num_or_id":5}' -$ curl http://127.0.0.1:8888/v1/chain/get_block -X POST -d '{"block_num_or_id":0000000445a9f27898383fd7de32835d5d6a978cc14ce40d9f327b5329de796b}' -``` - -@subsubsection examplegetblockresult Example get_block Result -``` -{ - "previous": "0000000445a9f27898383fd7de32835d5d6a978cc14ce40d9f327b5329de796b", - "timestamp": "2017-07-18T20:16:36", - "transaction_merkle_root": "0000000000000000000000000000000000000000000000000000000000000000", - "producer": "initf", - "producer_changes": [ ], - "producer_signature": "204cb94b3186c3b4a7f88be4e9db9f8af2ffdb7ef0f27a065c8177a5fcfacf876f684e59c39fb009903c0c59220b147bb07f1144df1c65d26c57b534a76dd29073", - "cycles": [ ], - "id":"000000050c0175cbf218a70131ddc3c3fab8b6e954edef77e0bfe7c36b599b1d", - "block_num":5, - "ref_block_prefix":27728114 -} -``` - - -@subsection v1chaingetaccount get_account - -Get information related to an account. - -@subsubsection examplegetaccount Example get_account Usage -``` -$ curl http://127.0.0.1:8888/v1/chain/get_account -X POST -d '{"account_name":"inita"}' -``` - -@subsubsection examplegetaccountresult Example get_account Result -``` -{ - "name": "inita", - "eos_balance": "999998.9574 EOS", - "staked_balance": "0.0000 EOS", - "unstaking_balance": "0.0000 EOS", - "last_unstaking_time": "2106-02-07T06:28:15", - "permissions": [ - { - "name": "active", - "parent": "owner", - "required_auth": { - "threshold": 1, - "keys": [ - { - "key": "EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV", - "weight": 1 - } - ], - "accounts": [] - } - }, - { - "name": "owner", - "parent": "owner", - "required_auth": { - "threshold": 1, - "keys": [ - { - "key": "EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV", - "weight": 1 - } - ], - "accounts": [] - } - } - ] -} -``` - - -@subsection v1chaingetcode get_code - -Fetch smart contract code. - -@subsubsection examplegetcode Example get_code Usage -``` -$ curl http://127.0.0.1:8888/v1/chain/get_code -X POST -d '{"account_name":"currency"}' -``` - -@subsubsection examplegetcoderesult Example get_code Result -``` -{ - "name":"currency", - "code_hash":"a1c8c84b4700c09c8edb83522237439e33cf011a4d7ace51075998bd002e04c9", - "wast":"(module\n (type $0 (func (param i64 i64 i32) (result i32)))\n ...truncated", - "abi": { - "types": [{ - "new_type_name": "account_name", - "type": "name" - } - ], - "structs": [{ - "name": "transfer", - "base": "", - "fields": [ - {"name":"from", "type":"account_name"}, - {"name":"to", "type":"account_name"}, - {"name":"quantity", "type":"uint64"} - ] - },{ - "name": "account", - "base": "", - "fields": [ - {"name":"key", "type":"name"}, - {"name":"balance", "type":"uint64"} - ] - } - ], - "actions": [{ - "name": "transfer", - "type": "transfer" - } - ], - "tables": [{ - "name": "account", - "type": "account", - "index_type": "i64", - "key_names" : ["key"], - "key_types" : ["name"] - } - ] -} -``` - - -@subsection v1chaingettablerows get_table_rows - -Fetch smart contract data from an account. - -@subsubsection examplegettablerows get_table_rows Usage -``` -$ curl http://127.0.0.1:8888/v1/chain/get_table_rows -X POST -d '{"scope":"inita", "code":"currency", "table":"account", "json": true}' -$ curl http://127.0.0.1:8888/v1/chain/get_table_rows -X POST -d '{"scope":"inita", "code":"currency", "table":"account", "json": true, "lower_bound":0, "upper_bound":-1, "limit":10}' -``` - -@subsubsection examplegettablerowsresult Example get_table_rows Result -``` -{ - "rows": [ - { - "account": "account", - "balance": 1000 - } - ], - "more": false -} -``` - - -@subsection v1chaingeabijsontobin abi_json_to_bin - -Serialize json to binary hex. The resulting binary hex is usually used for the data field in [push_transaction](#v1chainpushtransaction). - -@subsubsection exampleabijsontobin Example abi_json_to_bin Usage -``` -$ curl http://127.0.0.1:8888/v1/chain/abi_json_to_bin -X POST -d '{"code":"currency", "action":"transfer", "args":{"from":"initb", "to":"initc", "quantity":1000}}' -``` - -@subsubsection exampleabijsontobinresult Example abi_json_to_bin Result -``` -{ - "binargs": "000000008093dd74000000000094dd74e803000000000000", - "required_scope": [], - "required_auth": [] -} -``` - - -@subsection v1chaingeabibintojson abi_bin_to_json - -Serialize back binary hex to json. - -@subsubsection exampleabibintojson Example abi_bin_to_json Usage -``` -$ curl http://127.0.0.1:8888/v1/chain/abi_bin_to_json -X POST -d '{"code":"currency", "action":"transfer", "binargs":"000000008093dd74000000000094dd74e803000000000000"}' -``` - -@subsubsection exampleabibintojsonresult Example abi_bin_to_json Result -``` -{ - "args": { - "from": "initb", - "to": "initc", - "quantity": 1000 - }, - "required_scope": [], - "required_auth": [] -} -``` - - -@subsection v1chainpushtransaction push_transaction - -This method expects a transaction in JSON format and will attempt to apply it to the blockchain, - -Success Response -

-On success it will return HTTP 200 and the transaction ID. -

- -``` - -{ - 'transaction_id' : "..." -} - - -``` - -Just because the transaction is pushed locally does not mean that the transaction has been incorporated into a block. - - -Error Response -

-If an error occurs it will return either HTTP 400 (Invalid arguments) or 500 (Internal Server Error) -

- -``` - -HTTP/1.1 500 Internal Server Error -Content-Length: 1466 - -...error message... - -``` - -@subsubsection examplepushtrx Example push_transaction Usage -This example assumes a transfer operation. The `ref_block_num` and `ref_block_prefix` here are provided as a result of `/v1/chain/get_block` of the last_irreversible_block. -You also need to use /v1/wallet/sign_transaction to get the right signature. -``` -curl http://localhost:8888/v1/chain/push_transaction -X POST -d '{"ref_block_num":"100","ref_block_prefix":"137469861","expiration":"2017-09-25T06:28:49","scope":["initb","initc"],"actions":[{"code":"currency","type":"transfer","recipients":["initb","initc"],"authorization":[{"account":"initb","permission":"active"}],"data":"000000000041934b000000008041934be803000000000000"}],"signatures":[],"authorizations":[]}' -``` - - -@subsection v1chainpushtransactions push_transactions - -This method push multiple transactions at once. - -@subsubsection examplepushtrxs Example push_transactions Usage -``` -curl http://localhost:8888/v1/chain/push_transaction -X POST -d '[{"ref_block_num":"101","ref_block_prefix":"4159312339","expiration":"2017-09-25T06:28:49","scope":["initb","initc"],"actions":[{"code":"currency","type":"transfer","recipients":["initb","initc"],"authorization":[{"account":"initb","permission":"active"}],"data":"000000000041934b000000008041934be803000000000000"}],"signatures":[],"authorizations":[]}, {"ref_block_num":"101","ref_block_prefix":"4159312339","expiration":"2017-09-25T06:28:49","scope":["inita","initc"],"actions":[{"code":"currency","type":"transfer","recipients":["inita","initc"],"authorization":[{"account":"inita","permission":"active"}],"data":"000000008040934b000000008041934be803000000000000"}],"signatures":[],"authorizations":[]}]' -``` - - -@subsection v1chaingetrequiredkeys get_required_keys - -Get required keys to sign a transaction from list of your keys. - -@subsubsection examplegetrequiredkeys Example get_required_keys Usage -``` -curl http://localhost:8888/v1/chain/get_required_keys -X POST -d '{"transaction": {"ref_block_num":"100","ref_block_prefix":"137469861","expiration":"2017-09-25T06:28:49","scope":["initb","initc"],"actions":[{"code":"currency","type":"transfer","recipients":["initb","initc"],"authorization":[{"account":"initb","permission":"active"}],"data":"000000000041934b000000008041934be803000000000000"}],"signatures":[],"authorizations":[]}, "available_keys":["EOS4toFS3YXEQCkuuw1aqDLrtHim86Gz9u3hBdcBw5KNPZcursVHq","EOS7d9A3uLe6As66jzN8j44TXJUqJSK3bFjjEEqR4oTvNAB3iM9SA","EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV"]}' -``` - -@subsubsection examplegetrequiredkeysresult Example get_required_keys Result -``` -{ - "required_keys": [ - "EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV" - ] -} -``` - -@section walletrpc Wallet API - -@subsection v1walletcreate wallet_create - -Create a new wallet with the given name - -@subsubsection examplewalletcreate Example wallet_create Usage -``` -$ curl http://localhost:8888/v1/wallet/create -X POST -d '"default"' -``` - -@subsubsection examplewalletcreateresult Example wallet_create Result -This command will return the password that can be used to unlock the wallet in the future -``` -PW5KFWYKqvt63d4iNvedfDEPVZL227D3RQ1zpVFzuUwhMAJmRAYyX -``` - -@subsection v1walletcreatekey wallet_create_key - -Creates a key within the specified wallet, wallet must be opened and unlocked. -Param are: 1.name of the wallet to create key in; 2. type of key to create, currently we support two values: K1 and R1 - -@subsubsection examplewalletcreatekey Example wallet_create_key Usage -``` -$ curl http://localhost:8888/v1/wallet/create_key -X POST -d '["default","K1"]' -``` - -@subsubsection examplewalletcreatekeyresult Example wallet_create_key Result -This command will return the public key of the created key -``` -EOS6GZE1xeo6jX2AtP2Z6WTcxawQMH7cyYMNpG6Q3q7s514zyRhgo -``` - -@subsection v1walletopen wallet_open - -Open an existing wallet of the given name - -@subsubsection examplewalletopen Example wallet_open Usage -``` -$ curl http://localhost:8888/v1/wallet/open -X POST -d '"default"' -``` - -@subsubsection examplewalletopenresult Example wallet_open Result -``` -{} -``` - - -@subsection v1walletlock wallet_lock - -Lock a wallet of the given name - -@subsubsection examplewalletlock Example wallet_lock Usage -``` -$ curl http://localhost:8888/v1/wallet/lock -X POST -d '"default"' -``` - -@subsubsection examplewalletlockresult Example wallet_lock Result -``` -{} -``` - - -@subsection v1walletlockall wallet_lock_all - -Lock all wallets - -@subsubsection examplewalletlockall Example wallet_lock_all Usage -``` -$ curl http://localhost:8888/v1/wallet/lock_all -``` - -@subsubsection examplewalletlockallresult Example wallet_lock_all Result -``` -{} -``` - -@subsection v1walletunlock wallet_unlock - -Unlock a wallet with the given name and password - -@subsubsection examplewalletunlock Example wallet_unlock Usage -``` -$ curl http://localhost:8888/v1/wallet/unlock -X POST -d '["default", "PW5KFWYKqvt63d4iNvedfDEPVZL227D3RQ1zpVFzuUwhMAJmRAYyX"]' -``` - -@subsubsection examplewalletunlockresult Example wallet_unlock Result -``` -{} -``` - -@subsection v1walletimport wallet_import_key - -Import a private key to the wallet of the given name - -@subsubsection examplewalletimport Example wallet_import_key Usage -``` -$ curl http://localhost:8888/v1/wallet/import_key -X POST -d '["default","5KQwrPbwdL6PhXujxW37FSSQZ1JiwsST4cqQzDeyXtP79zkvFD3"]' -``` - -@subsubsection examplewalletimportresult Example wallet_import_key Result -``` -{} -``` - -@subsection v1walletlist wallet_list - -List all wallets - -@subsubsection examplewalletlist Example wallet_list Usage -``` -$ curl http://localhost:8888/v1/wallet/list_wallets -``` - -@subsubsection examplewalletlistresult Example wallet_list Result -``` -["default *"] -``` - -@subsection v1walletlistkeys wallet_list_keys - -List all key pairs across all wallets - -@subsubsection examplewalletlistkeys Example wallet_list_keys Usage -``` -$ curl http://localhost:8888/v1/wallet/list_keys -``` - -@subsubsection examplewalletlistkeysresult Example wallet_list_keys Result -``` -[["EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV","5KQwrPbwdL6PhXujxW37FSSQZ1JiwsST4cqQzDeyXtP79zkvFD3"]] -``` - -@subsection v1walletgetpublickeys wallet_get_public_keys - -List all public keys across all wallets - -@subsubsection examplewalletgetpublickeys Example wallet_get_public_keys Usage -``` -$ curl http://localhost:8888/v1/wallet/get_public_keys -``` - -@subsubsection examplewallegetpublickeysresult Example wallet_get_public_keys Result -``` -["EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV"] -``` - -@subsection v1walletsettimeout wallet_set_timeout - -Set wallet auto lock timeout (in seconds) - -@subsubsection examplewalletsettimeout Example wallet_set_timeout Usage -``` -$ curl http://localhost:8888/v1/wallet/set_timeout -X POST -d '10' -``` - -@subsubsection examplewalletsettimeoutresult Example wallet_set_timeout Result -``` -{} -``` - -@subsection v1walletsigntrx wallet_sign_trx - -Sign transaction given an array of transaction, require public keys, and chain id - -@subsubsection examplewalletsigntrx Example wallet_sign_trx Usage -``` -$ curl http://localhost:8888/v1/wallet/sign_transaction -X POST -d '[{"ref_block_num":21453,"ref_block_prefix":3165644999,"expiration":"2017-12-08T10:28:49","scope":["initb","initc"],"read_scope":[],"messages":[{"code":"currency","type":"transfer","authorization":[{"account":"initb","permission":"active"}],"data":"000000008093dd74000000000094dd74e803000000000000"}],"signatures":[]}, ["EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV"], ""]' -``` - -@subsubsection examplewalletsigntrxresult Example wallet_sign_trx Result -``` -{ - "ref_block_num": 21453, - "ref_block_prefix": 3165644999, - "expiration": "2017-12-08T10:28:49", - "scope": [ - "initb", - "initc" - ], - "read_scope": [], - "messages": [ - { - "code": "currency", - "type": "transfer", - "authorization": [ - { - "account": "initb", - "permission": "active" - } - ], - "data": "000000008093dd74000000000094dd74e803000000000000" - } - ], - "signatures": [ - "1f393cc5ce6a6951fb53b11812345bcf14ffd978b07be386fd639eaf440bca7dca16b14833ec661ca0703d15e55a2a599a36d55ce78c4539433f6ce8bcee0158c3" - ] -} -``` - -*/ diff --git a/contracts/eosiolib/serialize.hpp b/contracts/eosiolib/serialize.hpp deleted file mode 100644 index eff10d3cc60..00000000000 --- a/contracts/eosiolib/serialize.hpp +++ /dev/null @@ -1,63 +0,0 @@ -#include -#include -#include -#include -#include - -#define EOSLIB_REFLECT_MEMBER_OP( r, OP, elem ) \ - OP t.elem - -/** - * @defgroup serialize Serialize API - * @brief Defines functions to serialize and deserialize object - * @ingroup contractdev - */ - -/** - * @defgroup serializecpp Serialize C++ API - * @brief Defines C++ API to serialize and deserialize object - * @ingroup serialize - * @{ - */ - -/** - * Defines serialization and deserialization for a class - * - * @brief Defines serialization and deserialization for a class - * - * @param TYPE - the class to have its serialization and deserialization defined - * @param MEMBERS - a sequence of member names. (field1)(field2)(field3) - */ -#define EOSLIB_SERIALIZE( TYPE, MEMBERS ) \ - template \ - friend DataStream& operator << ( DataStream& ds, const TYPE& t ){ \ - return ds BOOST_PP_SEQ_FOR_EACH( EOSLIB_REFLECT_MEMBER_OP, <<, MEMBERS );\ - }\ - template \ - friend DataStream& operator >> ( DataStream& ds, TYPE& t ){ \ - return ds BOOST_PP_SEQ_FOR_EACH( EOSLIB_REFLECT_MEMBER_OP, >>, MEMBERS );\ - } - -/** - * Defines serialization and deserialization for a class which inherits from other classes that - * have their serialization and deserialization defined - * - * @brief Defines serialization and deserialization for a class which inherits from other classes that - * have their serialization and deserialization defined - * - * @param TYPE - the class to have its serialization and deserialization defined - * @param BASE - a sequence of base class names (basea)(baseb)(basec) - * @param MEMBERS - a sequence of member names. (field1)(field2)(field3) - */ -#define EOSLIB_SERIALIZE_DERIVED( TYPE, BASE, MEMBERS ) \ - template \ - friend DataStream& operator << ( DataStream& ds, const TYPE& t ){ \ - ds << static_cast(t); \ - return ds BOOST_PP_SEQ_FOR_EACH( EOSLIB_REFLECT_MEMBER_OP, <<, MEMBERS );\ - }\ - template \ - friend DataStream& operator >> ( DataStream& ds, TYPE& t ){ \ - ds >> static_cast(t); \ - return ds BOOST_PP_SEQ_FOR_EACH( EOSLIB_REFLECT_MEMBER_OP, >>, MEMBERS );\ - } -///@} serializecpp diff --git a/contracts/eosiolib/singleton.hpp b/contracts/eosiolib/singleton.hpp deleted file mode 100644 index 48e75126ed9..00000000000 --- a/contracts/eosiolib/singleton.hpp +++ /dev/null @@ -1,150 +0,0 @@ -#pragma once -#include -#include - -namespace eosio { - - /** - * @defgroup singleton Singleton Table - * @brief Defines EOSIO Singleton Table - * @ingroup databasecpp - * @{ - */ - - /** - * This wrapper uses a single table to store named objects various types. - * - * @tparam SingletonName - the name of this singleton variable - * @tparam T - the type of the singleton - */ - template - class singleton - { - /** - * Primary key of the data inside singleton table - * - * @brief Primary key of the data singleton table - */ - constexpr static uint64_t pk_value = SingletonName; - - /** - * Structure of data inside the singleton table - * - * @brief Structure of data inside the singleton table - */ - struct row { - /** - * Value to be stored inside the singleton table - * - * @brief Value to be stored inside the singleton table - */ - T value; - - /** - * Get primary key of the data - * - * @brief Get primary key of the data - * @return uint64_t - Primary Key - */ - uint64_t primary_key() const { return pk_value; } - - EOSLIB_SERIALIZE( row, (value) ) - }; - - typedef eosio::multi_index table; - - public: - - /** - * Construct a new singleton object given the table's owner and the scope - * - * @brief Construct a new singleton object - * @param code - The table's owner - * @param scope - The scope of the table - */ - singleton( account_name code, scope_name scope ) : _t( code, scope ) {} - - /** - * Check if the singleton table exists - * - * @brief Check if the singleton table exists - * @return true - if exists - * @return false - otherwise - */ - bool exists() { - return _t.find( pk_value ) != _t.end(); - } - - /** - * Get the value stored inside the singleton table. Will throw an exception if it doesn't exist - * - * @brief Get the value stored inside the singleton table - * @return T - The value stored - */ - T get() { - auto itr = _t.find( pk_value ); - eosio_assert( itr != _t.end(), "singleton does not exist" ); - return itr->value; - } - - /** - * Get the value stored inside the singleton table. If it doesn't exist, it will return the specified default value - * - * @brief Get the value stored inside the singleton table or return the specified default value if it doesn't exist - * @param def - The default value to be returned in case the data doesn't exist - * @return T - The value stored - */ - T get_or_default( const T& def = T() ) { - auto itr = _t.find( pk_value ); - return itr != _t.end() ? itr->value : def; - } - - /** - * Get the value stored inside the singleton table. If it doesn't exist, it will create a new one with the specified default value - * - * @brief Get the value stored inside the singleton table or create a new one with the specified default value if it doesn't exist - * @param bill_to_account - The account to bill for the newly created data if the data doesn't exist - * @param def - The default value to be created in case the data doesn't exist - * @return T - The value stored - */ - T get_or_create( account_name bill_to_account, const T& def = T() ) { - auto itr = _t.find( pk_value ); - return itr != _t.end() ? itr->value - : _t.emplace(bill_to_account, [&](row& r) { r.value = def; })->value; - } - - /** - * Set new value to the singleton table - * - * @brief Set new value to the singleton table - * - * @param value - New value to be set - * @param bill_to_account - Account to pay for the new value - */ - void set( const T& value, account_name bill_to_account ) { - auto itr = _t.find( pk_value ); - if( itr != _t.end() ) { - _t.modify(itr, bill_to_account, [&](row& r) { r.value = value; }); - } else { - _t.emplace(bill_to_account, [&](row& r) { r.value = value; }); - } - } - - /** - * Remove the only data inside singleton table - * - * @brief Remove the only data inside singleton table - */ - void remove( ) { - auto itr = _t.find( pk_value ); - if( itr != _t.end() ) { - _t.erase(itr); - } - } - - private: - table _t; - }; - -/// @} singleton -} /// namespace eosio diff --git a/contracts/eosiolib/stdlib.hpp b/contracts/eosiolib/stdlib.hpp deleted file mode 100644 index 7fd8f86d525..00000000000 --- a/contracts/eosiolib/stdlib.hpp +++ /dev/null @@ -1,5 +0,0 @@ -#pragma once - -#include -#include -#include diff --git a/contracts/eosiolib/symbol.hpp b/contracts/eosiolib/symbol.hpp deleted file mode 100644 index 8e63a0f18e5..00000000000 --- a/contracts/eosiolib/symbol.hpp +++ /dev/null @@ -1,227 +0,0 @@ -#pragma once -#include -#include -#include -#include -#include -#include - -namespace eosio { - - /** - * @defgroup symbolapi Symbol API - * @brief Defines API for managing symbols - * @ingroup contractdev - */ - - /** - * @defgroup symbolcppapi Symbol CPP API - * @brief Defines %CPP API for managing symbols - * @ingroup symbolapi - * @{ - */ - - /** - * Converts string to uint64_t representation of symbol - * - * @param precision - precision of symbol - * @param str - the string representation of the symbol - */ - static constexpr uint64_t string_to_symbol( uint8_t precision, const char* str ) { - uint32_t len = 0; - while( str[len] ) ++len; - - uint64_t result = 0; - for( uint32_t i = 0; i < len; ++i ) { - if( str[i] < 'A' || str[i] > 'Z' ) { - /// ERRORS? - } else { - result |= (uint64_t(str[i]) << (8*(1+i))); - } - } - - result |= uint64_t(precision); - return result; - } - - /** - * Macro for converting string to char representation of symbol - * - * @param precision - precision of symbol - * @param str - the string representation of the symbol - */ - #define S(P,X) ::eosio::string_to_symbol(P,#X) - - /** - * uint64_t representation of a symbol name - */ - typedef uint64_t symbol_name; - - /** - * Checks if provided symbol name is valid. - * - * @param sym - symbol name of type symbol_name - * @return true - if symbol is valid - */ - static constexpr bool is_valid_symbol( symbol_name sym ) { - sym >>= 8; - for( int i = 0; i < 7; ++i ) { - char c = (char)(sym & 0xff); - if( !('A' <= c && c <= 'Z') ) return false; - sym >>= 8; - if( !(sym & 0xff) ) { - do { - sym >>= 8; - if( (sym & 0xff) ) return false; - ++i; - } while( i < 7 ); - } - } - return true; - } - - /** - * Returns the character length of the provided symbol - * - * @param sym - symbol to retrieve length for (uint64_t) - * @return length - character length of the provided symbol - */ - static constexpr uint32_t symbol_name_length( symbol_name sym ) { - sym >>= 8; /// skip precision - uint32_t length = 0; - while( sym & 0xff && length <= 7) { - ++length; - sym >>= 8; - } - - return length; - } - - /** - * \struct Stores information about a symbol - * - * @brief Stores information about a symbol - */ - struct symbol_type { - /** - * The symbol name - */ - symbol_name value; - - symbol_type() { } - - /** - * What is the type of the symbol - */ - symbol_type(symbol_name s): value(s) { } - - /** - * Is this symbol valid - */ - bool is_valid()const { return is_valid_symbol( value ); } - - /** - * This symbol's precision - */ - uint64_t precision()const { return value & 0xff; } - - /** - * Returns uint64_t representation of symbol name - */ - uint64_t name()const { return value >> 8; } - - /** - * The length of this symbol - */ - uint32_t name_length()const { return symbol_name_length( value ); } - - /** - * - */ - operator symbol_name()const { return value; } - - /** - * %Print the symbol - * - * @brief %Print the symbol - */ - void print(bool show_precision=true)const { - if( show_precision ){ - ::eosio::print(precision()); - prints(","); - } - - auto sym = value; - sym >>= 8; - for( int i = 0; i < 7; ++i ) { - char c = (char)(sym & 0xff); - if( !c ) return; - prints_l(&c, 1 ); - sym >>= 8; - } - } - - EOSLIB_SERIALIZE( symbol_type, (value) ) - }; - - /** - * \struct Extended asset which stores the information of the owner of the symbol - * - */ - struct extended_symbol : public symbol_type - { - /** - * The owner of the symbol - * - * @brief The owner of the symbol - */ - account_name contract; - - extended_symbol( symbol_name sym = 0, account_name acc = 0 ):symbol_type{sym},contract(acc){} - - /** - * %Print the extended symbol - * - * @brief %Print the extended symbol - */ - void print()const { - symbol_type::print(); - prints("@"); - printn( contract ); - } - - - /** - * Equivalency operator. Returns true if a == b (are the same) - * - * @brief Subtraction operator - * @param a - The extended asset to be subtracted - * @param b - The extended asset used to subtract - * @return boolean - true if both provided symbols are the same - */ - friend bool operator == ( const extended_symbol& a, const extended_symbol& b ) { - return std::tie( a.value, a.contract ) == std::tie( b.value, b.contract ); - } - - /** - * Inverted equivalency operator. Returns true if a != b (are different) - * - * @brief Subtraction operator - * @param a - The extended asset to be subtracted - * @param b - The extended asset used to subtract - * @return boolean - true if both provided symbols are the same - */ - friend bool operator != ( const extended_symbol& a, const extended_symbol& b ) { - return std::tie( a.value, a.contract ) != std::tie( b.value, b.contract ); - } - - friend bool operator < ( const extended_symbol& a, const extended_symbol& b ) { - return std::tie( a.value, a.contract ) < std::tie( b.value, b.contract ); - } - - EOSLIB_SERIALIZE( extended_symbol, (value)(contract) ) - }; - - // }@ symbolapi - -} /// namespace eosio diff --git a/contracts/eosiolib/system.h b/contracts/eosiolib/system.h deleted file mode 100644 index 62a5cfeef51..00000000000 --- a/contracts/eosiolib/system.h +++ /dev/null @@ -1,92 +0,0 @@ -/** - * @file - * @copyright defined in eos/LICENSE.txt - */ -#pragma once -#include - -extern "C" { - - /** - * @defgroup systemapi System API - * @ingroup contractdev - * @brief Defines API for interacting with system level intrinsics - * - */ - - /** - * @defgroup systemcapi System C API - * @ingroup systemapi - * @brief Defines API for interacting with system level intrinsics - * - * @{ - */ - - /** - * Aborts processing of this action and unwinds all pending changes if the test condition is true - * @brief Aborts processing of this action and unwinds all pending changes - * @param test - 0 to abort, 1 to ignore - * - * Example: -* - * @code - * eosio_assert(1 == 2, "One is not equal to two."); - * eosio_assert(1 == 1, "One is not equal to one."); - * @endcode - * - * @param msg - a null terminated string explaining the reason for failure - */ - void eosio_assert( uint32_t test, const char* msg ); - - /** - * Aborts processing of this action and unwinds all pending changes if the test condition is true - * @brief Aborts processing of this action and unwinds all pending changes - * @param test - 0 to abort, 1 to ignore - * @param msg - a pointer to the start of string explaining the reason for failure - * @param msg_len - length of the string - */ - void eosio_assert_message( uint32_t test, const char* msg, uint32_t msg_len ); - - /** - * Aborts processing of this action and unwinds all pending changes if the test condition is true - * @brief Aborts processing of this action and unwinds all pending changes - * @param test - 0 to abort, 1 to ignore - * @param code - the error code - */ - void eosio_assert_code( uint32_t test, uint64_t code ); - - /** - * This method will abort execution of wasm without failing the contract. This is used to bypass all cleanup / destructors that would normally be called. - * @brief Aborts execution of wasm without failing the contract - * @param code - the exit code - * Example: -* - * @code - * eosio_exit(0); - * eosio_exit(1); - * eosio_exit(2); - * eosio_exit(3); - * @endcode - */ - [[noreturn]] void eosio_exit( int32_t code ); - - - /** - * Returns the time in microseconds from 1970 of the current block - * @brief Get time of the current block (i.e. the block including this action) - * @return time in microseconds from 1970 of the current block - */ - uint64_t current_time(); - - /** - * Returns the time in seconds from 1970 of the block including this action - * @brief Get time (rounded down to the nearest second) of the current block (i.e. the block including this action) - * @return time in seconds from 1970 of the current block - */ - uint32_t now() { - return (uint32_t)( current_time() / 1000000 ); - } - ///@ } systemcapi - - -} diff --git a/contracts/eosiolib/time.hpp b/contracts/eosiolib/time.hpp deleted file mode 100644 index ff9d0e47757..00000000000 --- a/contracts/eosiolib/time.hpp +++ /dev/null @@ -1,179 +0,0 @@ -#pragma once -#include -#include -#include - -namespace eosio { - class microseconds { - public: - explicit microseconds( int64_t c = 0) :_count(c){} - static microseconds maximum() { return microseconds(0x7fffffffffffffffll); } - friend microseconds operator + (const microseconds& l, const microseconds& r ) { return microseconds(l._count+r._count); } - friend microseconds operator - (const microseconds& l, const microseconds& r ) { return microseconds(l._count-r._count); } - - - bool operator==(const microseconds& c)const { return _count == c._count; } - bool operator!=(const microseconds& c)const { return _count != c._count; } - friend bool operator>(const microseconds& a, const microseconds& b){ return a._count > b._count; } - friend bool operator>=(const microseconds& a, const microseconds& b){ return a._count >= b._count; } - friend bool operator<(const microseconds& a, const microseconds& b){ return a._count < b._count; } - friend bool operator<=(const microseconds& a, const microseconds& b){ return a._count <= b._count; } - microseconds& operator+=(const microseconds& c) { _count += c._count; return *this; } - microseconds& operator-=(const microseconds& c) { _count -= c._count; return *this; } - int64_t count()const { return _count; } - int64_t to_seconds()const { return _count/1000000; } - - int64_t _count; - EOSLIB_SERIALIZE( microseconds, (_count) ) - private: - friend class time_point; - }; - - inline microseconds seconds( int64_t s ) { return microseconds( s * 1000000 ); } - inline microseconds milliseconds( int64_t s ) { return microseconds( s * 1000 ); } - inline microseconds minutes(int64_t m) { return seconds(60*m); } - inline microseconds hours(int64_t h) { return minutes(60*h); } - inline microseconds days(int64_t d) { return hours(24*d); } - - class time_point { - public: - explicit time_point( microseconds e = microseconds() ) :elapsed(e){} - operator std::string()const; - static time_point from_iso_string( const std::string& s ); - const microseconds& time_since_epoch()const { return elapsed; } - uint32_t sec_since_epoch()const { return uint32_t(elapsed.count() / 1000000); } - bool operator > ( const time_point& t )const { return elapsed._count > t.elapsed._count; } - bool operator >=( const time_point& t )const { return elapsed._count >=t.elapsed._count; } - bool operator < ( const time_point& t )const { return elapsed._count < t.elapsed._count; } - bool operator <=( const time_point& t )const { return elapsed._count <=t.elapsed._count; } - bool operator ==( const time_point& t )const { return elapsed._count ==t.elapsed._count; } - bool operator !=( const time_point& t )const { return elapsed._count !=t.elapsed._count; } - time_point& operator += ( const microseconds& m) { elapsed+=m; return *this; } - time_point& operator -= ( const microseconds& m) { elapsed-=m; return *this; } - time_point operator + (const microseconds& m) const { return time_point(elapsed+m); } - time_point operator + (const time_point& m) const { return time_point(elapsed+m.elapsed); } - time_point operator - (const microseconds& m) const { return time_point(elapsed-m); } - microseconds operator - (const time_point& m) const { return microseconds(elapsed.count() - m.elapsed.count()); } - microseconds elapsed; - EOSLIB_SERIALIZE( time_point, (elapsed) ) - }; - - /** - * A lower resolution time_point accurate only to seconds from 1970 - */ - class time_point_sec - { - public: - time_point_sec() - :utc_seconds(0){} - - explicit time_point_sec(uint32_t seconds ) - :utc_seconds(seconds){} - - time_point_sec( const time_point& t ) - :utc_seconds( uint32_t(t.time_since_epoch().count() / 1000000ll) ){} - - static time_point_sec maximum() { return time_point_sec(0xffffffff); } - static time_point_sec min() { return time_point_sec(0); } - - operator time_point()const { return time_point( eosio::seconds( utc_seconds) ); } - uint32_t sec_since_epoch()const { return utc_seconds; } - - time_point_sec operator = ( const eosio::time_point& t ) - { - utc_seconds = uint32_t(t.time_since_epoch().count() / 1000000ll); - return *this; - } - friend bool operator < ( const time_point_sec& a, const time_point_sec& b ) { return a.utc_seconds < b.utc_seconds; } - friend bool operator > ( const time_point_sec& a, const time_point_sec& b ) { return a.utc_seconds > b.utc_seconds; } - friend bool operator <= ( const time_point_sec& a, const time_point_sec& b ) { return a.utc_seconds <= b.utc_seconds; } - friend bool operator >= ( const time_point_sec& a, const time_point_sec& b ) { return a.utc_seconds >= b.utc_seconds; } - friend bool operator == ( const time_point_sec& a, const time_point_sec& b ) { return a.utc_seconds == b.utc_seconds; } - friend bool operator != ( const time_point_sec& a, const time_point_sec& b ) { return a.utc_seconds != b.utc_seconds; } - time_point_sec& operator += ( uint32_t m ) { utc_seconds+=m; return *this; } - time_point_sec& operator += ( microseconds m ) { utc_seconds+=m.to_seconds(); return *this; } - time_point_sec& operator += ( time_point_sec m ) { utc_seconds+=m.utc_seconds; return *this; } - time_point_sec& operator -= ( uint32_t m ) { utc_seconds-=m; return *this; } - time_point_sec& operator -= ( microseconds m ) { utc_seconds-=m.to_seconds(); return *this; } - time_point_sec& operator -= ( time_point_sec m ) { utc_seconds-=m.utc_seconds; return *this; } - time_point_sec operator +( uint32_t offset )const { return time_point_sec(utc_seconds + offset); } - time_point_sec operator -( uint32_t offset )const { return time_point_sec(utc_seconds - offset); } - - friend time_point operator + ( const time_point_sec& t, const microseconds& m ) { return time_point(t) + m; } - friend time_point operator - ( const time_point_sec& t, const microseconds& m ) { return time_point(t) - m; } - friend microseconds operator - ( const time_point_sec& t, const time_point_sec& m ) { return time_point(t) - time_point(m); } - friend microseconds operator - ( const time_point& t, const time_point_sec& m ) { return time_point(t) - time_point(m); } - uint32_t utc_seconds; - - EOSLIB_SERIALIZE( time_point_sec, (utc_seconds) ) - }; - - /** - * This class is used in the block headers to represent the block time - * It is a parameterised class that takes an Epoch in milliseconds and - * and an interval in milliseconds and computes the number of slots. - **/ - class block_timestamp { - public: - explicit block_timestamp( uint32_t s=0 ) :slot(s){} - - block_timestamp(const time_point& t) { - set_time_point(t); - } - - block_timestamp(const time_point_sec& t) { - set_time_point(t); - } - - static block_timestamp maximum() { return block_timestamp( 0xffff ); } - static block_timestamp min() { return block_timestamp(0); } - - block_timestamp next() const { - eosio_assert( std::numeric_limits::max() - slot >= 1, "block timestamp overflow" ); - auto result = block_timestamp(*this); - result.slot += 1; - return result; - } - - time_point to_time_point() const { - return (time_point)(*this); - } - - operator time_point() const { - int64_t msec = slot * (int64_t)block_interval_ms; - msec += block_timestamp_epoch; - return time_point(milliseconds(msec)); - } - - void operator = (const time_point& t ) { - set_time_point(t); - } - - bool operator > ( const block_timestamp& t )const { return slot > t.slot; } - bool operator >=( const block_timestamp& t )const { return slot >= t.slot; } - bool operator < ( const block_timestamp& t )const { return slot < t.slot; } - bool operator <=( const block_timestamp& t )const { return slot <= t.slot; } - bool operator ==( const block_timestamp& t )const { return slot == t.slot; } - bool operator !=( const block_timestamp& t )const { return slot != t.slot; } - uint32_t slot; - static constexpr int32_t block_interval_ms = 500; - static constexpr int64_t block_timestamp_epoch = 946684800000ll; // epoch is year 2000 - - EOSLIB_SERIALIZE( block_timestamp, (slot) ) - private: - - - void set_time_point(const time_point& t) { - int64_t micro_since_epoch = t.time_since_epoch().count(); - int64_t msec_since_epoch = micro_since_epoch / 1000; - slot = uint32_t(( msec_since_epoch - block_timestamp_epoch ) / int64_t(block_interval_ms)); - } - - void set_time_point(const time_point_sec& t) { - int64_t sec_since_epoch = t.sec_since_epoch(); - slot = uint32_t((sec_since_epoch * 1000 - block_timestamp_epoch) / block_interval_ms); - } - }; // block_timestamp - typedef block_timestamp block_timestamp_type; - -} // namespace eosio diff --git a/contracts/eosiolib/transaction.h b/contracts/eosiolib/transaction.h deleted file mode 100644 index dd7c05ded17..00000000000 --- a/contracts/eosiolib/transaction.h +++ /dev/null @@ -1,158 +0,0 @@ -/** - * @file - * @copyright defined in eos/LICENSE.txt - */ -#pragma once -#include - -extern "C" { - /** - * @defgroup transactionapi Transaction API - * @ingroup contractdev - * @brief Defines API for sending transactions and inline actions - * - * - * Deferred transactions will not be processed until a future block. They - * can therefore have no effect on the success or failure of their parent - * transaction so long as they appear well formed. If any other condition - * causes the parent transaction to be marked as failing, then the deferred - * transaction will never be processed. - * - * Deferred transactions must adhere to the permissions available to the - * parent transaction or, in the future, delegated to the contract account - * for future use. - * - * An inline message allows one contract to send another contract a message - * which is processed immediately after the current message's processing - * ends such that the success or failure of the parent transaction is - * dependent on the success of the message. If an inline message fails in - * processing then the whole tree of transactions and actions rooted in the - * block will be marked as failing and none of effects on the database will - * persist. - * - * Inline actions and Deferred transactions must adhere to the permissions - * available to the parent transaction or, in the future, delegated to the - * contract account for future use. - */ - - /** - * @defgroup transactioncapi Transaction C API - * @ingroup transactionapi - * @brief Defines API for sending transactions - * - * @{ - */ - - /** - * Sends a deferred transaction. - * - * @brief Sends a deferred transaction. - * @param sender_id - ID of sender - * @param payer - Account paying for RAM - * @param serialized_transaction - Pointer of serialized transaction to be deferred - * @param size - Size to reserve - * @param replace_existing - f this is `0` then if the provided sender_id is already in use by an in-flight transaction from this contract, which will be a failing assert. If `1` then transaction will atomically cancel/replace the inflight transaction - */ - void send_deferred(const uint128_t& sender_id, account_name payer, const char *serialized_transaction, size_t size, uint32_t replace_existing = 0); - - /** - * Cancels a deferred transaction. - * - * @brief Cancels a deferred transaction. - * @param sender_id - The id of the sender - * - * @pre The deferred transaction ID exists. - * @pre The deferred transaction ID has not yet been published. - * @post Deferred transaction canceled. - * - * @return 1 if transaction was canceled, 0 if transaction was not found - * - * Example: - * - * @code - * id = 0xffffffffffffffff - * cancel_deferred( id ); - * @endcode - */ - int cancel_deferred(const uint128_t& sender_id); - - /** - * Access a copy of the currently executing transaction. - * - * @brief Access a copy of the currently executing transaction. - * @param buffer - a buffer to write the current transaction to - * @param size - the size of the buffer, 0 to return required size - * @return the size of the transaction written to the buffer, or number of bytes that can be copied if size==0 passed - */ - size_t read_transaction(char *buffer, size_t size); - - /** - * Gets the size of the currently executing transaction. - * - * @brief Gets the size of the currently executing transaction. - * @return size of the currently executing transaction - */ - size_t transaction_size(); - - /** - * Gets the block number used for TAPOS on the currently executing transaction. - * - * @brief Gets the block number used for TAPOS on the currently executing transaction. - * @return block number used for TAPOS on the currently executing transaction - * Example: - * @code - * int tbn = tapos_block_num(); - * @endcode - */ - int tapos_block_num(); - - /** - * Gets the block prefix used for TAPOS on the currently executing transaction. - * - * @brief Gets the block prefix used for TAPOS on the currently executing transaction. - * @return block prefix used for TAPOS on the currently executing transaction - * Example: - * @code - * int tbp = tapos_block_prefix(); - * @endcode - */ - int tapos_block_prefix(); - - /** - * Gets the expiration of the currently executing transaction. - * - * @brief Gets the expiration of the currently executing transaction. - * @return expiration of the currently executing transaction - * Example: - * @code - * time tm = expiration(); - * eosio_print(tm); - * @endcode - */ - time expiration(); - - /** - * Retrieves the indicated action from the active transaction. - * - * @brief Retrieves the indicated action from the active transaction. - * @param type - 0 for context free action, 1 for action - * @param index - the index of the requested action - * @param buff - output packed buff of the action - * @param size - amount of buff read, pass 0 to have size returned - * @return the size of the action, -1 on failure - */ - int get_action( uint32_t type, uint32_t index, char* buff, size_t size ); - - /** - * Retrieve the signed_transaction.context_free_data[index]. - * - * @brief Retrieve the signed_transaction.context_free_data[index]. - * @param index - the index of the context_free_data entry to retrieve - * @param buff - output buff of the context_free_data entry - * @param size - amount of context_free_data[index] to retrieve into buff, 0 to report required size - * @return size copied, or context_free_data[index].size() if 0 passed for size, or -1 if index not valid - */ - int get_context_free_data( uint32_t index, char* buff, size_t size ); - - ///@ } transactioncapi -} diff --git a/contracts/eosiolib/transaction.hpp b/contracts/eosiolib/transaction.hpp deleted file mode 100644 index 1586b92b09b..00000000000 --- a/contracts/eosiolib/transaction.hpp +++ /dev/null @@ -1,97 +0,0 @@ -/** - * @file - * @copyright defined in eos/LICENSE.txt - */ -#pragma once -#include -#include -#include -#include -#include -#include - -namespace eosio { - - /** - * @defgroup transactioncppapi Transaction C++ API - * @ingroup transactionapi - * @brief Type-safe C++ wrappers for transaction C API - * - * @note There are some methods from the @ref transactioncapi that can be used directly from C++ - * - * @{ - */ - - class transaction_header { - public: - transaction_header( time_point_sec exp = time_point_sec(now() + 60) ) - :expiration(exp) - {} - - time_point_sec expiration; - uint16_t ref_block_num; - uint32_t ref_block_prefix; - unsigned_int net_usage_words = 0UL; /// number of 8 byte words this transaction can serialize into after compressions - uint8_t max_cpu_usage_ms = 0UL; /// number of CPU usage units to bill transaction for - unsigned_int delay_sec = 0UL; /// number of CPU usage units to bill transaction for - - EOSLIB_SERIALIZE( transaction_header, (expiration)(ref_block_num)(ref_block_prefix)(net_usage_words)(max_cpu_usage_ms)(delay_sec) ) - }; - - class transaction : public transaction_header { - public: - transaction(time_point_sec exp = time_point_sec(now() + 60)) : transaction_header( exp ) {} - - void send(const uint128_t& sender_id, account_name payer, bool replace_existing = false) const { - auto serialize = pack(*this); - send_deferred(sender_id, payer, serialize.data(), serialize.size(), replace_existing); - } - - vector context_free_actions; - vector actions; - extensions_type transaction_extensions; - - EOSLIB_SERIALIZE_DERIVED( transaction, transaction_header, (context_free_actions)(actions)(transaction_extensions) ) - }; - - /** - * - * - * - * - */ - struct onerror { - uint128_t sender_id; - bytes sent_trx; - - static onerror from_current_action() { - return unpack_action_data(); - } - - transaction unpack_sent_trx() const { - return unpack(sent_trx); - } - - EOSLIB_SERIALIZE( onerror, (sender_id)(sent_trx) ) - }; - - /** - * Retrieve the indicated action from the active transaction. - * @param type - 0 for context free action, 1 for action - * @param index - the index of the requested action - * @return the indicated action - */ - inline action get_action( uint32_t type, uint32_t index ) { - constexpr size_t max_stack_buffer_size = 512; - int s = ::get_action( type, index, nullptr, 0 ); - eosio_assert( s > 0, "get_action size failed" ); - size_t size = static_cast(s); - char* buffer = (char*)( max_stack_buffer_size < size ? malloc(size) : alloca(size) ); - auto size2 = ::get_action( type, index, buffer, size ); - eosio_assert( size == static_cast(size2), "get_action failed" ); - return eosio::unpack( buffer, size ); - } - - ///@} transactioncpp api - -} // namespace eos diff --git a/contracts/eosiolib/types.h b/contracts/eosiolib/types.h deleted file mode 100644 index 120c896cd87..00000000000 --- a/contracts/eosiolib/types.h +++ /dev/null @@ -1,123 +0,0 @@ -/** - * @file - * @copyright defined in eos/LICENSE.txt - */ -#pragma once - -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * @defgroup types Builtin Types - * @ingroup contractdev - * @brief Specifies builtin types, typedefs and aliases - * - * @{ - */ - -/** - * @brief Name of an account - * @details Name of an account - */ -typedef uint64_t account_name; - -/** - * @brief Name of a permission - * @details Name of a permission - */ -typedef uint64_t permission_name; - -/** - * @brief Name of a table - * @details Name of a table - */ -typedef uint64_t table_name; - -/** - * @brief Time - * @details Time - */ -typedef uint32_t time; - -/** - * @brief Name of a scope - * @details Name of a scope - */ -typedef uint64_t scope_name; - -/** - * @brief Name of an action - * @details Name of an action - */ -typedef uint64_t action_name; - -/** - * @brief Macro to align/overalign a type to ensure calls to intrinsics with pointers/references are properly aligned - * @details Macro to align/overalign a type to ensure calls to intrinsics with pointers/references are properly aligned - */ - -typedef uint16_t weight_type; - -/* macro to align/overalign a type to ensure calls to intrinsics with pointers/references are properly aligned */ -#define ALIGNED(X) __attribute__ ((aligned (16))) X - -/** - * @brief EOSIO Public Key - * @details EOSIO Public Key. It is 34 bytes. - */ -struct public_key { - char data[34]; -}; - -/** - * @brief EOSIO Signature - * @details EOSIO Signature. It is 66 bytes. - */ -struct signature { - uint8_t data[66]; -}; - -/** - * @brief 256-bit hash - * @details 256-bit hash - */ -struct ALIGNED(checksum256) { - uint8_t hash[32]; -}; - -/** - * @brief 160-bit hash - * @details 160-bit hash - */ -struct ALIGNED(checksum160) { - uint8_t hash[20]; -}; - -/** - * @brief 512-bit hash - * @details 512-bit hash - */ -struct ALIGNED(checksum512) { - uint8_t hash[64]; -}; - -/** - * @brief Type of EOSIO Transaction Id - * @details Type of EOSIO Transaction Id. It is 256-bit hash - */ -typedef struct checksum256 transaction_id_type; -typedef struct checksum256 block_id_type; - -struct account_permission { - account_name account; - permission_name permission; -}; - -#ifdef __cplusplus -} /// extern "C" -#endif -/// @} diff --git a/contracts/eosiolib/types.hpp b/contracts/eosiolib/types.hpp deleted file mode 100644 index d535f49e922..00000000000 --- a/contracts/eosiolib/types.hpp +++ /dev/null @@ -1,220 +0,0 @@ -/** - * @file - * @copyright defined in eos/LICENSE.txt - */ -#pragma once -#include -#include -#include -#include - -namespace eosio { - - typedef std::vector>> extensions_type; - - /** - * Converts a base32 symbol into its binary representation, used by string_to_name() - * - * @brief Converts a base32 symbol into its binary representation, used by string_to_name() - * @param c - Character to be converted - * @return constexpr char - Converted character - * @ingroup types - */ - static constexpr char char_to_symbol( char c ) { - if( c >= 'a' && c <= 'z' ) - return (c - 'a') + 6; - if( c >= '1' && c <= '5' ) - return (c - '1') + 1; - return 0; - } - - - /** - * Converts a base32 string to a uint64_t. This is a constexpr so that - * this method can be used in template arguments as well. - * - * @brief Converts a base32 string to a uint64_t. - * @param str - String representation of the name - * @return constexpr uint64_t - 64-bit unsigned integer representation of the name - * @ingroup types - */ - static constexpr uint64_t string_to_name( const char* str ) { - - uint32_t len = 0; - while( str[len] ) ++len; - - uint64_t value = 0; - - for( uint32_t i = 0; i <= 12; ++i ) { - uint64_t c = 0; - if( i < len && i <= 12 ) c = uint64_t(char_to_symbol( str[i] )); - - if( i < 12 ) { - c &= 0x1f; - c <<= 64-5*(i+1); - } - else { - c &= 0x0f; - } - - value |= c; - } - - return value; - } - - /** - * Used to generate a compile time uint64_t from the base32 encoded string interpretation of X - * - * @brief Used to generate a compile time uint64_t from the base32 encoded string interpretation of X - * @param X - String representation of the name - * @return constexpr uint64_t - 64-bit unsigned integer representation of the name - * @ingroup types - */ - #define N(X) ::eosio::string_to_name(#X) - - - static constexpr uint64_t name_suffix( uint64_t n ) { - uint32_t remaining_bits_after_last_actual_dot = 0; - uint32_t tmp = 0; - for( int32_t remaining_bits = 59; remaining_bits >= 4; remaining_bits -= 5 ) { // Note: remaining_bits must remain signed integer - // Get characters one-by-one in name in order from left to right (not including the 13th character) - auto c = (n >> remaining_bits) & 0x1Full; - if( !c ) { // if this character is a dot - tmp = static_cast(remaining_bits); - } else { // if this character is not a dot - remaining_bits_after_last_actual_dot = tmp; - } - } - - uint64_t thirteenth_character = n & 0x0Full; - if( thirteenth_character ) { // if 13th character is not a dot - remaining_bits_after_last_actual_dot = tmp; - } - - if( remaining_bits_after_last_actual_dot == 0 ) // there is no actual dot in the name other than potentially leading dots - return n; - - // At this point remaining_bits_after_last_actual_dot has to be within the range of 4 to 59 (and restricted to increments of 5). - - // Mask for remaining bits corresponding to characters after last actual dot, except for 4 least significant bits (corresponds to 13th character). - uint64_t mask = (1ull << remaining_bits_after_last_actual_dot) - 16; - uint32_t shift = 64 - remaining_bits_after_last_actual_dot; - - return ( ((n & mask) << shift) + (thirteenth_character << (shift-1)) ); - } - - /** - * Wraps a uint64_t to ensure it is only passed to methods that expect a Name and - * that no mathematical operations occur. It also enables specialization of print - * so that it is printed as a base32 string. - * - * @brief wraps a uint64_t to ensure it is only passed to methods that expect a Name - * @ingroup types - */ - struct name { - /** - * Conversion Operator to convert name to uint64_t - * - * @brief Conversion Operator - * @return uint64_t - Converted result - */ - operator uint64_t()const { return value; } - - // keep in sync with name::operator string() in eosio source code definition for name - std::string to_string() const { - static const char* charmap = ".12345abcdefghijklmnopqrstuvwxyz"; - - std::string str(13,'.'); - - uint64_t tmp = value; - for( uint32_t i = 0; i <= 12; ++i ) { - char c = charmap[tmp & (i == 0 ? 0x0f : 0x1f)]; - str[12-i] = c; - tmp >>= (i == 0 ? 4 : 5); - } - - trim_right_dots( str ); - return str; - } - - /** - * Equality Operator for name - * - * @brief Equality Operator for name - * @param a - First data to be compared - * @param b - Second data to be compared - * @return true - if equal - * @return false - if unequal - */ - friend bool operator==( const name& a, const name& b ) { return a.value == b.value; } - - /** - * Internal Representation of the account name - * - * @brief Internal Representation of the account name - */ - account_name value = 0; - - private: - static void trim_right_dots(std::string& str ) { - const auto last = str.find_last_not_of('.'); - if (last != std::string::npos) - str = str.substr(0, last + 1); - } - }; - -} // namespace eosio - -namespace std { - /** - * Provide less for checksum256 - * @brief Provide less for checksum256 - */ - template<> - struct less : binary_function { - bool operator()( const checksum256& lhs, const checksum256& rhs ) const { - return memcmp(&lhs, &rhs, sizeof(lhs)) < 0; - } - }; - -} // namespace std - -/** - * Equality Operator for checksum256 - * - * @brief Equality Operator for checksum256 - * @param lhs - First data to be compared - * @param rhs - Second data to be compared - * @return true - if equal - * @return false - if unequal - */ -bool operator==(const checksum256& lhs, const checksum256& rhs) { - return memcmp(&lhs, &rhs, sizeof(lhs)) == 0; -} - -/** - * Equality Operator for checksum160 - * - * @brief Equality Operator for checksum256 - * @param lhs - First data to be compared - * @param rhs - Second data to be compared - * @return true - if equal - * @return false - if unequal - */ -bool operator==(const checksum160& lhs, const checksum160& rhs) { - return memcmp(&lhs, &rhs, sizeof(lhs)) == 0; -} - -/** - * Equality Operator for checksum160 - * - * @brief Equality Operator for checksum256 - * @param lhs - First data to be compared - * @param rhs - Second data to be compared - * @return true - if unequal - * @return false - if equal - */ -bool operator!=(const checksum160& lhs, const checksum160& rhs) { - return memcmp(&lhs, &rhs, sizeof(lhs)) != 0; -} diff --git a/contracts/eosiolib/varint.hpp b/contracts/eosiolib/varint.hpp deleted file mode 100644 index b8240839aa0..00000000000 --- a/contracts/eosiolib/varint.hpp +++ /dev/null @@ -1,484 +0,0 @@ -/** - * @file - * @copyright defined in eos/LICENSE.txt - */ -#pragma once - - -/** - * @defgroup varint Variable Length Integer Type - * @brief Defines variable length integer type which provides more efficient serialization - * @ingroup types - * @{/ - */ - -/** - * Variable Length Unsigned Integer. This provides more efficient serialization of 32-bit unsigned int. - * It serialuzes a 32-bit unsigned integer in as few bytes as possible - * `varuint32` is unsigned and uses [VLQ or Base-128 encoding](https://en.wikipedia.org/wiki/Variable-length_quantity) - * - * @brief Variable Length Unsigned Integer - */ -struct unsigned_int { - /** - * Construct a new unsigned int object - * - * @brief Construct a new unsigned int object - * @param v - Source - */ - unsigned_int( uint32_t v = 0 ):value(v){} - - /** - * Construct a new unsigned int object from a type that is convertible to uint32_t - * - * @brief Construct a new unsigned int object - * @tparam T - Type of the source - * @param v - Source - * @pre T must be convertible to uint32_t - */ - template - unsigned_int( T v ):value(v){} - - //operator uint32_t()const { return value; } - //operator uint64_t()const { return value; } - - /** - * Convert unsigned_int as T - * @brief Conversion Operator - * @tparam T - Target type of conversion - * @return T - Converted target - */ - template - operator T()const { return static_cast(value); } - - /** - * Assign 32-bit unsigned integer - * - * @brief Assignment operator - * @param v - Soruce - * @return unsigned_int& - Reference to this object - */ - unsigned_int& operator=( uint32_t v ) { value = v; return *this; } - - /** - * Contained value - * - * @brief Contained value - */ - uint32_t value; - - /** - * Check equality between a unsigned_int object and 32-bit unsigned integer - * - * @brief Equality Operator - * @param i - unsigned_int object to compare - * @param v - 32-bit unsigned integer to compare - * @return true - if equal - * @return false - otherwise - */ - friend bool operator==( const unsigned_int& i, const uint32_t& v ) { return i.value == v; } - - /** - * Check equality between 32-bit unsigned integer and a unsigned_int object - * - * @brief Equality Operator - * @param i - 32-bit unsigned integer to compare - * @param v - unsigned_int object to compare - * @return true - if equal - * @return false - otherwise - */ - friend bool operator==( const uint32_t& i, const unsigned_int& v ) { return i == v.value; } - - /** - * Check equality between two unsigned_int objects - * - * @brief Equality Operator - * @param i - First unsigned_int object to compare - * @param v - Second unsigned_int object to compare - * @return true - if equal - * @return false - otherwise - */ - friend bool operator==( const unsigned_int& i, const unsigned_int& v ) { return i.value == v.value; } - - /** - * Check inequality between a unsigned_int object and 32-bit unsigned integer - * - * @brief Inequality Operator - * @param i - unsigned_int object to compare - * @param v - 32-bit unsigned integer to compare - * @return true - if inequal - * @return false - otherwise - */ - friend bool operator!=( const unsigned_int& i, const uint32_t& v ) { return i.value != v; } - - /** - * Check inequality between 32-bit unsigned integer and a unsigned_int object - * - * @brief Equality Operator - * @param i - 32-bit unsigned integer to compare - * @param v - unsigned_int object to compare - * @return true - if unequal - * @return false - otherwise - */ - friend bool operator!=( const uint32_t& i, const unsigned_int& v ) { return i != v.value; } - - /** - * Check inequality between two unsigned_int objects - * - * @brief Inequality Operator - * @param i - First unsigned_int object to compare - * @param v - Second unsigned_int object to compare - * @return true - if inequal - * @return false - otherwise - */ - friend bool operator!=( const unsigned_int& i, const unsigned_int& v ) { return i.value != v.value; } - - /** - * Check if the given unsigned_int object is less than the given 32-bit unsigned integer - * - * @brief Less than Operator - * @param i - unsigned_int object to compare - * @param v - 32-bit unsigned integer to compare - * @return true - if i less than v - * @return false - otherwise - */ - friend bool operator<( const unsigned_int& i, const uint32_t& v ) { return i.value < v; } - - /** - * Check if the given 32-bit unsigned integer is less than the given unsigned_int object - * - * @brief Less than Operator - * @param i - 32-bit unsigned integer to compare - * @param v - unsigned_int object to compare - * @return true - if i less than v - * @return false - otherwise - */ - friend bool operator<( const uint32_t& i, const unsigned_int& v ) { return i < v.value; } - - /** - * Check if the first given unsigned_int is less than the second given unsigned_int object - * - * @brief Less than Operator - * @param i - First unsigned_int object to compare - * @param v - Second unsigned_int object to compare - * @return true - if i less than v - * @return false - otherwise - */ - friend bool operator<( const unsigned_int& i, const unsigned_int& v ) { return i.value < v.value; } - - /** - * Check if the given unsigned_int object is greater or equal to the given 32-bit unsigned integer - * - * @brief Greater or Equal to Operator - * @param i - unsigned_int object to compare - * @param v - 32-bit unsigned integer to compare - * @return true - if i is greater or equal to v - * @return false - otherwise - */ - friend bool operator>=( const unsigned_int& i, const uint32_t& v ) { return i.value >= v; } - - /** - * Check if the given 32-bit unsigned integer is greater or equal to the given unsigned_int object - * - * @brief Greater or Equal to Operator - * @param i - 32-bit unsigned integer to compare - * @param v - unsigned_int object to compare - * @return true - if i is greater or equal to v - * @return false - otherwise - */ - friend bool operator>=( const uint32_t& i, const unsigned_int& v ) { return i >= v.value; } - - /** - * Check if the first given unsigned_int is greater or equal to the second given unsigned_int object - * - * @brief Greater or Equal to Operator - * @param i - First unsigned_int object to compare - * @param v - Second unsigned_int object to compare - * @return true - if i is greater or equal to v - * @return false - otherwise - */ - friend bool operator>=( const unsigned_int& i, const unsigned_int& v ) { return i.value >= v.value; } - - /** - * Serialize an unsigned_int object with as few bytes as possible - * - * @brief Serialize an unsigned_int object with as few bytes as possible - * @param ds - The stream to write - * @param v - The value to serialize - * @tparam DataStream - Type of datastream - * @return DataStream& - Reference to the datastream - */ - template - friend DataStream& operator << ( DataStream& ds, const unsigned_int& v ){ - uint64_t val = v.value; - do { - uint8_t b = uint8_t(val) & 0x7f; - val >>= 7; - b |= ((val > 0) << 7); - ds.write((char*)&b,1);//.put(b); - } while( val ); - return ds; - } - - /** - * Deserialize an unsigned_int object - * - * @brief Deserialize an unsigned_int object - * @param ds - The stream to read - * @param vi - The destination for deserialized value - * @tparam DataStream - Type of datastream - * @return DataStream& - Reference to the datastream - */ - template - friend DataStream& operator >> ( DataStream& ds, unsigned_int& vi ){ - uint64_t v = 0; char b = 0; uint8_t by = 0; - do { - ds.get(b); - v |= uint32_t(uint8_t(b) & 0x7f) << by; - by += 7; - } while( uint8_t(b) & 0x80 ); - vi.value = static_cast(v); - return ds; - } -}; - -/** - * Variable Length Signed Integer. This provides more efficient serialization of 32-bit signed int. - * It serializes a 32-bit signed integer in as few bytes as possible. - * `varint32' is signed and uses [Zig-Zag encoding](https://developers.google.com/protocol-buffers/docs/encoding#signed-integers) - * - * @brief Variable Length Signed Integer - */ -struct signed_int { - /** - * Construct a new signed int object - * - * @brief Construct a new signed int object - * @param v - Source - */ - signed_int( int32_t v = 0 ):value(v){} - - /** - * Convert signed_int to primitive 32-bit signed integer - * @brief Conversion operator - * - * @return int32_t - The converted result - */ - operator int32_t()const { return value; } - - - /** - * Assign an object that is convertible to int32_t - * - * @brief Assignment operator - * @tparam T - Type of the assignment object - * @param v - Source - * @return unsigned_int& - Reference to this object - */ - template - signed_int& operator=( const T& v ) { value = v; return *this; } - - /** - * Increment operator - * - * @brief Increment operator - * @return signed_int - New signed_int with value incremented from the current object's value - */ - signed_int operator++(int) { return value++; } - - /** - * Increment operator - * - * @brief Increment operator - * @return signed_int - Reference to current object - */ - signed_int& operator++(){ ++value; return *this; } - - /** - * Contained value - * - * @brief Contained value - */ - int32_t value; - - /** - * Check equality between a signed_int object and 32-bit integer - * - * @brief Equality Operator - * @param i - signed_int object to compare - * @param v - 32-bit integer to compare - * @return true - if equal - * @return false - otherwise - */ - friend bool operator==( const signed_int& i, const int32_t& v ) { return i.value == v; } - - /** - * Check equality between 32-bit integer and a signed_int object - * - * @brief Equality Operator - * @param i - 32-bit integer to compare - * @param v - signed_int object to compare - * @return true - if equal - * @return false - otherwise - */ - friend bool operator==( const int32_t& i, const signed_int& v ) { return i == v.value; } - - /** - * Check equality between two signed_int objects - * - * @brief Equality Operator - * @param i - First signed_int object to compare - * @param v - Second signed_int object to compare - * @return true - if equal - * @return false - otherwise - */ - friend bool operator==( const signed_int& i, const signed_int& v ) { return i.value == v.value; } - - - /** - * Check inequality between a signed_int object and 32-bit integer - * - * @brief Inequality Operator - * @param i - signed_int object to compare - * @param v - 32-bit integer to compare - * @return true - if inequal - * @return false - otherwise - */ - friend bool operator!=( const signed_int& i, const int32_t& v ) { return i.value != v; } - - /** - * Check inequality between 32-bit integer and a signed_int object - * - * @brief Equality Operator - * @param i - 32-bit integer to compare - * @param v - signed_int object to compare - * @return true - if unequal - * @return false - otherwise - */ - friend bool operator!=( const int32_t& i, const signed_int& v ) { return i != v.value; } - - /** - * Check inequality between two signed_int objects - * - * @brief Inequality Operator - * @param i - First signed_int object to compare - * @param v - Second signed_int object to compare - * @return true - if inequal - * @return false - otherwise - */ - friend bool operator!=( const signed_int& i, const signed_int& v ) { return i.value != v.value; } - - /** - * Check if the given signed_int object is less than the given 32-bit integer - * - * @brief Less than Operator - * @param i - signed_int object to compare - * @param v - 32-bit integer to compare - * @return true - if i less than v - * @return false - otherwise - */ - friend bool operator<( const signed_int& i, const int32_t& v ) { return i.value < v; } - - /** - * Check if the given 32-bit integer is less than the given signed_int object - * - * @brief Less than Operator - * @param i - 32-bit integer to compare - * @param v - signed_int object to compare - * @return true - if i less than v - * @return false - otherwise - */ - friend bool operator<( const int32_t& i, const signed_int& v ) { return i < v.value; } - - /** - * Check if the first given signed_int is less than the second given signed_int object - * - * @brief Less than Operator - * @param i - First signed_int object to compare - * @param v - Second signed_int object to compare - * @return true - if i less than v - * @return false - otherwise - */ - friend bool operator<( const signed_int& i, const signed_int& v ) { return i.value < v.value; } - - - /** - * Check if the given signed_int object is greater or equal to the given 32-bit integer - * - * @brief Greater or Equal to Operator - * @param i - signed_int object to compare - * @param v - 32-bit integer to compare - * @return true - if i is greater or equal to v - * @return false - otherwise - */ - friend bool operator>=( const signed_int& i, const int32_t& v ) { return i.value >= v; } - - /** - * Check if the given 32-bit integer is greater or equal to the given signed_int object - * - * @brief Greater or Equal to Operator - * @param i - 32-bit integer to compare - * @param v - signed_int object to compare - * @return true - if i is greater or equal to v - * @return false - otherwise - */ - friend bool operator>=( const int32_t& i, const signed_int& v ) { return i >= v.value; } - - /** - * Check if the first given signed_int is greater or equal to the second given signed_int object - * - * @brief Greater or Equal to Operator - * @param i - First signed_int object to compare - * @param v - Second signed_int object to compare - * @return true - if i is greater or equal to v - * @return false - otherwise - */ - friend bool operator>=( const signed_int& i, const signed_int& v ) { return i.value >= v.value; } - - - /** - * Serialize an signed_int object with as few bytes as possible - * - * @brief Serialize an signed_int object with as few bytes as possible - * @param ds - The stream to write - * @param v - The value to serialize - * @tparam DataStream - Type of datastream - * @return DataStream& - Reference to the datastream - */ - template - friend DataStream& operator << ( DataStream& ds, const signed_int& v ){ - uint32_t val = uint32_t((v.value<<1) ^ (v.value>>31)); - do { - uint8_t b = uint8_t(val) & 0x7f; - val >>= 7; - b |= ((val > 0) << 7); - ds.write((char*)&b,1);//.put(b); - } while( val ); - return ds; - } - - /** - * Deserialize an signed_int object - * - * @brief Deserialize an signed_int object - * @param ds - The stream to read - * @param vi - The destination for deserialized value - * @tparam DataStream - Type of datastream - * @return DataStream& - Reference to the datastream - */ - template - friend DataStream& operator >> ( DataStream& ds, signed_int& vi ){ - uint32_t v = 0; char b = 0; int by = 0; - do { - ds.get(b); - v |= uint32_t(uint8_t(b) & 0x7f) << by; - by += 7; - } while( uint8_t(b) & 0x80 ); - vi.value = ((v>>1) ^ (v>>31)) + (v&0x01); - vi.value = v&0x01 ? vi.value : -vi.value; - vi.value = -vi.value; - return ds; - } -}; - -/// @} diff --git a/contracts/eosiolib/vector.hpp b/contracts/eosiolib/vector.hpp deleted file mode 100644 index a6aa811d222..00000000000 --- a/contracts/eosiolib/vector.hpp +++ /dev/null @@ -1,12 +0,0 @@ -#pragma once -#include -#include -#include - -namespace eosio { - - using std::vector; - - typedef std::vector bytes; - -} /// namespace eosio diff --git a/contracts/hello/CMakeLists.txt b/contracts/hello/CMakeLists.txt index 5cd15332331..96c341ca950 100644 --- a/contracts/hello/CMakeLists.txt +++ b/contracts/hello/CMakeLists.txt @@ -1,8 +1,3 @@ -file(GLOB ABI_FILES "*.abi") -configure_file("${ABI_FILES}" "${CMAKE_CURRENT_BINARY_DIR}" COPYONLY) +set( CMAKE_CXX_STANDARD 17 ) -add_wast_executable(TARGET hello - INCLUDE_FOLDERS "${STANDARD_INCLUDE_FOLDERS}" - LIBRARIES libc libc++ eosiolib - DESTINATION_FOLDER ${CMAKE_CURRENT_BINARY_DIR} -) +add_contract( hello hello hello.cpp ) diff --git a/contracts/hello/hello.cpp b/contracts/hello/hello.cpp index 7c52afa9b60..77f5a54f388 100644 --- a/contracts/hello/hello.cpp +++ b/contracts/hello/hello.cpp @@ -1,14 +1,19 @@ +/** + * @file + * @copyright defined in eos/LICENSE.txt + */ + #include + using namespace eosio; -class hello : public eosio::contract { - public: - using contract::contract; +CONTRACT hello : public contract { +public: + using contract::contract; - /// @abi action - void hi( account_name user ) { - print( "Hello, ", name{user} ); - } + ACTION hi( name user ) { + print( "Hello, ", user ); + } }; -EOSIO_ABI( hello, (hi) ) +EOSIO_DISPATCH( hello, (hi) ) diff --git a/contracts/identity/CMakeLists.txt b/contracts/identity/CMakeLists.txt deleted file mode 100644 index 230adcda29c..00000000000 --- a/contracts/identity/CMakeLists.txt +++ /dev/null @@ -1,24 +0,0 @@ -file(GLOB ABI_FILES "*.abi") -configure_file("${ABI_FILES}" "${CMAKE_CURRENT_BINARY_DIR}" COPYONLY) - -add_wast_library(TARGET identity_common - SOURCE_FILES common.cpp - INCLUDE_FOLDERS "${STANDARD_INCLUDE_FOLDERS}" - LIBRARIES libc++ libc eosiolib - DESTINATION_FOLDER ${CMAKE_CURRENT_BINARY_DIR} -) - -add_wast_executable(TARGET identity - INCLUDE_FOLDERS "${STANDARD_INCLUDE_FOLDERS}" - LIBRARIES identity_common libc++ libc eosiolib - DESTINATION_FOLDER ${CMAKE_CURRENT_BINARY_DIR} -) - -add_wast_library(TARGET identity_interface - SOURCE_FILES interface.cpp - INCLUDE_FOLDERS "${STANDARD_INCLUDE_FOLDERS}" - LIBRARIES identity_common libc++ libc eosiolib - DESTINATION_FOLDER ${CMAKE_CURRENT_BINARY_DIR} -) - -add_subdirectory(test) diff --git a/contracts/identity/common.cpp b/contracts/identity/common.cpp deleted file mode 100644 index 68e48bc6adb..00000000000 --- a/contracts/identity/common.cpp +++ /dev/null @@ -1,27 +0,0 @@ -#include "common.hpp" - -#include - -namespace identity { - - bool identity_base::is_trusted_by( account_name trusted, account_name by ) { - trust_table t( _self, by ); - return t.find( trusted ) != t.end(); - } - - bool identity_base::is_trusted( account_name acnt ) { - account_name active_producers[21]; - auto active_prod_size = get_active_producers( active_producers, sizeof(active_producers) ); - auto count = active_prod_size / sizeof(account_name); - for( size_t i = 0; i < count; ++i ) { - if( active_producers[i] == acnt ) - return true; - } - for( size_t i = 0; i < count; ++i ) { - if( is_trusted_by( acnt, active_producers[i] ) ) - return true; - } - return false; - } - -} diff --git a/contracts/identity/common.hpp b/contracts/identity/common.hpp deleted file mode 100644 index 48d8cf39f9e..00000000000 --- a/contracts/identity/common.hpp +++ /dev/null @@ -1,84 +0,0 @@ -#pragma once - -#include -#include - -namespace identity { - - typedef uint64_t identity_name; - typedef uint64_t property_name; - typedef uint64_t property_type_name; - - struct certvalue { - property_name property; ///< name of property, base32 encoded i64 - std::string type; ///< defines type serialized in data - std::vector data; ///< - std::string memo; ///< meta data documenting basis of certification - uint8_t confidence = 1; ///< used to define liability for lies, - /// 0 to delete - - EOSLIB_SERIALIZE( certvalue, (property)(type)(data)(memo)(confidence) ) - }; - - struct certrow { - uint64_t id; - property_name property; - uint64_t trusted; - account_name certifier; - uint8_t confidence = 0; - std::string type; - std::vector data; - uint64_t primary_key() const { return id; } - /* constexpr */ static eosio::key256 key(uint64_t property, uint64_t trusted, uint64_t certifier) { - /* - key256 key; - key.uint64s[0] = property; - key.uint64s[1] = trusted; - key.uint64s[2] = certifier; - key.uint64s[3] = 0; - */ - return eosio::key256::make_from_word_sequence(property, trusted, certifier); - } - eosio::key256 get_key() const { return key(property, trusted, certifier); } - - EOSLIB_SERIALIZE( certrow , (property)(trusted)(certifier)(confidence)(type)(data)(id) ) - }; - - struct identrow { - uint64_t identity; - account_name creator; - - uint64_t primary_key() const { return identity; } - - EOSLIB_SERIALIZE( identrow , (identity)(creator) ) - }; - - struct trustrow { - account_name account; - - uint64_t primary_key() const { return account; } - - EOSLIB_SERIALIZE( trustrow, (account) ) - }; - - typedef eosio::multi_index > - > certs_table; - typedef eosio::multi_index idents_table; - typedef eosio::singleton accounts_table; - typedef eosio::multi_index trust_table; - - class identity_base { - public: - identity_base( account_name acnt) : _self( acnt ) {} - - bool is_trusted_by( account_name trusted, account_name by ); - - bool is_trusted( account_name acnt ); - - protected: - account_name _self; - }; - -} - diff --git a/contracts/identity/identity.abi b/contracts/identity/identity.abi deleted file mode 100644 index cbb3e2373bf..00000000000 --- a/contracts/identity/identity.abi +++ /dev/null @@ -1,118 +0,0 @@ -{ - "version": "eosio::abi/1.0", - "types": [{ - "new_type_name": "account_name", - "type": "name" - },{ - "new_type_name": "identity_name", - "type": "name" - },{ - "new_type_name": "property_name", - "type": "name" - } - ], - "structs": [{ - "name": "create", - "base": "", - "fields": [ - {"name":"creator", "type":"account_name"}, - {"name":"identity", "type":"uint64"} - ] - },{ - "name": "certvalue", - "base": "", - "fields": [ - {"name":"property", "type":"name"}, - {"name":"type", "type":"string"}, - {"name":"data", "type":"uint8[]"}, - {"name":"memo", "type":"string"}, - {"name":"confidence", "type":"uint8"} - ] - },{ - "name": "certprop", - "base": "", - "fields": [ - {"name":"bill_storage_to", "type":"account_name"}, - {"name":"certifier", "type":"account_name"}, - {"name":"identity", "type":"uint64"}, - {"name":"value", "type":"certvalue[]"} - ] - },{ - "name": "settrust", - "base": "", - "fields": [ - {"name":"trustor", "type":"account_name"}, - {"name":"trusting", "type":"account_name"}, - {"name":"trust", "type":"uint8"} - ] - },{ - "name": "certrow", - "base": "", - "fields": [ - {"name":"property", "type":"property_name"}, - {"name":"trusted", "type":"uint64"}, - {"name":"certifier", "type":"account_name"}, - {"name":"confidence", "type":"uint8"}, - {"name":"type", "type":"string"}, - {"name":"data", "type":"uint8[]"} - ] - },{ - "name": "identrow", - "base": "", - "fields": [ - {"name":"identity", "type":"uint64"}, - {"name":"creator", "type":"account_name"} - ] - },{ - "name": "accountrow", - "base": "", - "fields": [ - {"name":"identity", "type":"uint64"} - ] - } - ], - "actions": [{ - "name": "create", - "type": "create", - "ricardian_contract": "" - },{ - "name": "certprop", - "type": "certprop", - "ricardian_contract": "" - },{ - "name": "settrust", - "type": "settrust", - "ricardian_contract": "" - } - ], - "tables": [{ - "name": "certs", - "type": "certrow", - "index_type": "i64i64i64", - "key_names" : [ - "property", - "trusted", - "certifier" - ], - " key_types": [ - "uint64", - "uint64", - "uint64" - ] - },{ - "name": "idents", - "type": "identrow", - "index_type": "i64", - "key_names" : [ "identity" ], - "key_types": [ "uint64" ] - },{ - "name": "trust", - "type": "account_name", - "index_type": "i64", - "key_names" : [ "account" ], - "key_types": [ "account_name" ] - } - ], - "ricardian_clauses": [], - "abi_extensions": [] -} diff --git a/contracts/identity/identity.cpp b/contracts/identity/identity.cpp deleted file mode 100644 index c33cd66d526..00000000000 --- a/contracts/identity/identity.cpp +++ /dev/null @@ -1,188 +0,0 @@ -#include "common.hpp" - -#include -#include -#include - -namespace identity { - using eosio::action_meta; - using eosio::singleton; - using eosio::key256; - using std::string; - using std::vector; - - /** - * This contract maintains a graph database of certified statements about an - * identity. An identity is separated from the concept of an account because - * the mapping of identity to accounts is subject to community consensus. - * - * Some use cases need a global source of trust, this trust rooted in the voter - * who selects block producers. A block producer's opinion is "trusted" and so - * is the opinion of anyone the block producer marks as "trusted". - * - * When a block producer is voted out the implicit trust in every certification - * they made or those they trusted made is removed. All users are liable for - * making false certifications. - * - * An account needs to claim the identity and a trusted account must certify the - * claim. - * - * Data for an identity is stored: - * - * DeployToAccount / identity / certs / [property, trusted, certifier] => value - * - * Questions database is designed to answer: - * - * 1. has $identity.$unique been certified a "trusted" certifier - * 2. has $identity.$property been certified by $account - * 3. has $identity.$trusted been certified by a "trusted" certifier - * 4. what account has authority to speak on behalf of identity? - * - for each trusted owner certification - * check to see if the account has claimed it - * - * 5. what identity does account have authority to speak on behalf? - * - check what identity the account has self certified owner - * - verify that a trusted certifier has confirmed owner - * - * This database structure enables parallel opeartions on independent identities. - * - * When an account certs a property we check to see if that - */ - class contract : public identity_base { - public: - - using identity_base::identity_base; - - void settrust( const account_name trustor, ///< the account authorizing the trust - const account_name trusting, ///< the account receiving the trust - const uint8_t trust = 0 )/// 0 to remove, -1 to mark untrusted, 1 to mark trusted - { - require_auth( trustor ); - require_recipient( trusting ); - - trust_table table( _self, trustor ); - auto itr = table.find(trusting); - if( itr == table.end() && trust > 0 ) { - table.emplace( trustor, [&](trustrow& row) { - row.account = trusting; - }); - } else if( itr != table.end() && trust == 0 ) { - table.erase(itr); - } - } - - /** - * This action create a new globally unique 64 bit identifier, - * to minimize collisions each account is automatically assigned - * a 32 bit identity prefix based upon hash(account_name) ^ hash(tapos). - * - * With this method no two accounts are likely to be assigned the same - * 32 bit prefix consistantly due to the constantly changing tapos. This prevents - * abuse of 'creator' selection to generate intentional conflicts with other users. - * - * The creator can determine the last 32 bits using an algorithm of their choice. We - * presume the creator's algorithm can avoid collisions with itself. - * - * Even if two accounts get a collision in first 32 bits, a proper creator algorithm - * should generate randomness in last 32 bits that will minimize collisions. In event - * of collision transaction will fail and creator can try again. - * - * A 64 bit identity is used because the key is used frequently and it makes for more - * effecient tables/scopes/etc. - */ - void create( const account_name creator, const uint64_t identity ) { - require_auth( creator ); - idents_table t( _self, _self ); - auto itr = t.find( identity ); - eosio_assert( itr == t.end(), "identity already exists" ); - eosio_assert( identity != 0, "identity=0 is not allowed" ); - t.emplace(creator, [&](identrow& i) { - i.identity = identity; - i.creator = creator; - }); - } - - void certprop( const account_name bill_storage_to, ///< account which is paying for storage - const account_name certifier, - const identity_name identity, - const vector& values ) - { - require_auth( certifier ); - if( bill_storage_to != certifier ) - require_auth( bill_storage_to ); - - idents_table t( _self, _self ); - eosio_assert( t.find( identity ) != t.end(), "identity does not exist" ); - - /// the table exists in the scope of the identity - certs_table certs( _self, identity ); - bool trusted = is_trusted( certifier ); - - for( const auto& value : values ) { - auto idx = certs.template get_index(); - if (value.confidence) { - eosio_assert(value.type.size() <= 32, "certrow::type should be not longer than 32 bytes"); - auto itr = idx.lower_bound( certrow::key(value.property, trusted, certifier) ); - - if (itr != idx.end() && itr->property == value.property && itr->trusted == trusted && itr->certifier == certifier) { - idx.modify(itr, 0, [&](certrow& row) { - row.confidence = value.confidence; - row.type = value.type; - row.data = value.data; - }); - } else { - auto pk = certs.available_primary_key(); - certs.emplace(_self, [&](certrow& row) { - row.id = pk; - row.property = value.property; - row.trusted = trusted; - row.certifier = certifier; - row.confidence = value.confidence; - row.type = value.type; - row.data = value.data; - }); - } - - auto itr_old = idx.lower_bound( certrow::key(value.property, !trusted, certifier) ); - if (itr_old != idx.end() && itr_old->property == value.property && itr_old->trusted == !trusted && itr_old->certifier == certifier) { - idx.erase(itr_old); - } - - //special handling for owner - if (value.property == N(owner)) { - eosio_assert(sizeof(account_name) == value.data.size(), "data size doesn't match account_name size"); - account_name acnt = *reinterpret_cast(value.data.data()); - if (certifier == acnt) { //only self-certitication affects accounts_table - accounts_table( _self, acnt ).set( identity, acnt ); - } - } - } else { - bool removed = false; - auto itr = idx.lower_bound( certrow::key(value.property, trusted, certifier) ); - if (itr != idx.end() && itr->property == value.property && itr->trusted == trusted && itr->certifier == certifier) { - idx.erase(itr); - } else { - removed = true; - } - itr = idx.lower_bound( certrow::key(value.property, !trusted, certifier) ); - if (itr != idx.end() && itr->property == value.property && itr->trusted == !trusted && itr->certifier == certifier) { - idx.erase(itr); - } else { - removed = true; - } - //special handling for owner - if (value.property == N(owner)) { - eosio_assert(sizeof(account_name) == value.data.size(), "data size doesn't match account_name size"); - account_name acnt = *reinterpret_cast(value.data.data()); - if (certifier == acnt) { //only self-certitication affects accounts_table - accounts_table( _self, acnt ).remove(); - } - } - } - } - } - }; - -} /// namespace identity - -EOSIO_ABI( identity::contract, (create)(certprop)(settrust) ); diff --git a/contracts/identity/interface.cpp b/contracts/identity/interface.cpp deleted file mode 100644 index fb633bc52a8..00000000000 --- a/contracts/identity/interface.cpp +++ /dev/null @@ -1,82 +0,0 @@ -#include "interface.hpp" - -namespace identity { - -identity_name interface::get_claimed_identity( account_name acnt ) { - return accounts_table( _self, acnt ).get_or_default(0); -} - -account_name interface::get_owner_for_identity( uint64_t receiver, identity_name ident ) { - // for each trusted owner certification - // check to see if the certification is still trusted - // check to see if the account has claimed it - certs_table certs( _self, ident ); - auto idx = certs.template get_index(); - auto itr = idx.lower_bound(certrow::key(N(owner), 1, 0)); - account_name owner = 0; - while (itr != idx.end() && itr->property == N(owner) && itr->trusted) { - if (sizeof(account_name) == itr->data.size()) { - account_name account = *reinterpret_cast(itr->data.data()); - if (ident == get_claimed_identity(account)) { - if (is_trusted(itr->certifier) ) { - // the certifier is still trusted - if (!owner || owner == account) { - owner = account; - } else { - //contradiction found: different owners certified for the same identity - return 0; - } - } else if (_self == receiver){ - //the certifier is no longer trusted, need to unset the flag - idx.modify(itr, 0, [&](certrow& r) { - r.trusted = 0; - }); - } else { - // the certifier is no longer trusted, but the code runs in read-only mode - } - } - } else { - // bad row - skip it - } - ++itr; - } - if (owner) { - //owner found, no contradictions among certifications flaged as trusted - return owner; - } - // trusted certification not found - // let's see if any untrusted certifications became trusted - itr = idx.lower_bound(certrow::key(N(owner), 0, 0)); - while (itr != idx.end() && itr->property == N(owner) && !itr->trusted) { - if (sizeof(account_name) == itr->data.size()) { - account_name account = *reinterpret_cast(itr->data.data()); - if (ident == get_claimed_identity(account) && is_trusted(itr->certifier)) { - if (_self == receiver) { - // the certifier became trusted and we have permissions to update the flag - idx.modify(itr, 0, [&](certrow& r) { - r.trusted = 1; - }); - } - if (!owner || owner == account) { - owner = account; - } else { - //contradiction found: different owners certified for the same identity - return 0; - } - } - } else { - // bad row - skip it - } - ++itr; - } - return owner; -} - -identity_name interface::get_identity_for_account( uint64_t receiver, account_name acnt ) { - // check what identity the account has self certified owner - // verify that a trusted certifier has confirmed owner - auto identity = get_claimed_identity(acnt); - return (identity != 0 && acnt == get_owner_for_identity(receiver, identity)) ? identity : 0; -} - -} // namespace identity diff --git a/contracts/identity/interface.hpp b/contracts/identity/interface.hpp deleted file mode 100644 index 5415bbbdb57..00000000000 --- a/contracts/identity/interface.hpp +++ /dev/null @@ -1,18 +0,0 @@ -#pragma once - -#include "common.hpp" - -namespace identity { - - class interface : public identity_base { - public: - using identity_base::identity_base; - - identity_name get_claimed_identity( account_name acnt ); - - account_name get_owner_for_identity( uint64_t receiver, identity_name ident ); - - identity_name get_identity_for_account( uint64_t receiver, account_name acnt ); - }; - -} diff --git a/contracts/identity/test/CMakeLists.txt b/contracts/identity/test/CMakeLists.txt deleted file mode 100644 index 739341339a1..00000000000 --- a/contracts/identity/test/CMakeLists.txt +++ /dev/null @@ -1,7 +0,0 @@ -set(ABI_FILES "identity_test.abi") -configure_file("${ABI_FILES}" "${CMAKE_CURRENT_BINARY_DIR}" COPYONLY) -add_wast_executable(TARGET identity_test - INCLUDE_FOLDERS "${STANDARD_INCLUDE_FOLDERS}" - LIBRARIES identity_interface identity_common libc++ libc eosiolib - DESTINATION_FOLDER ${CMAKE_CURRENT_BINARY_DIR} -) diff --git a/contracts/identity/test/identity_test.abi b/contracts/identity/test/identity_test.abi deleted file mode 100644 index a0b450f8ac4..00000000000 --- a/contracts/identity/test/identity_test.abi +++ /dev/null @@ -1,35 +0,0 @@ -{ - "version": "eosio::abi/1.0", - "types": [{ - "new_type_name": "account_name", - "type": "name" - },{ - "new_type_name": "identity_name", - "type": "name" - } - ], - "structs": [{ - "name": "getowner", - "base": "", - "fields": [ - {"name":"identity", "type":"uint64"} - ] - },{ - "name": "getidentity", - "base": "", - "fields": [ - {"name":"account", "type":"account_name"} - ] - } - ], - "actions": [{ - "name": "getowner", - "type": "getowner" - },{ - "name": "getidentity", - "type": "getidentity" - } - ], - "tables": [ - ] -} diff --git a/contracts/identity/test/identity_test.cpp b/contracts/identity/test/identity_test.cpp deleted file mode 100644 index 4688d4db4db..00000000000 --- a/contracts/identity/test/identity_test.cpp +++ /dev/null @@ -1,35 +0,0 @@ -#include -#include -#include -#include - -namespace identity_test { - - using eosio::action_meta; - using eosio::singleton; - using std::string; - using std::vector; - - class contract : public eosio::contract { - public: - static constexpr uint64_t code = N(identitytest); - typedef singleton result_table; - - using eosio::contract::contract; - - void getowner( const uint64_t identity ) { - identity::interface iface( N(identity) ); - account_name owner = iface.get_owner_for_identity(current_receiver(), identity); - result_table( code, 0 ).set( owner, code ); //use scope = 0 for simplicity - } - - void getidentity( const account_name account ) { - identity::interface iface( N(identity) ); - identity::identity_name idnt = iface.get_identity_for_account(current_receiver(), account); - result_table( code, 0 ).set(idnt, code ); //use scope = 0 for simplicity - } - }; - -} /// namespace identity - -EOSIO_ABI( identity_test::contract, (getowner)(getidentity) ); diff --git a/contracts/infinite/CMakeLists.txt b/contracts/infinite/CMakeLists.txt index af3ec44f496..37daff9958a 100644 --- a/contracts/infinite/CMakeLists.txt +++ b/contracts/infinite/CMakeLists.txt @@ -1,5 +1,3 @@ -add_wast_executable(TARGET infinite - INCLUDE_FOLDERS "${STANDARD_INCLUDE_FOLDERS}" - LIBRARIES libc++ libc eosiolib - DESTINATION_FOLDER ${CMAKE_CURRENT_BINARY_DIR} -) +set( CMAKE_CXX_STANDARD 17 ) + +add_contract( infinite infinite infinite.cpp ) diff --git a/contracts/infinite/infinite.cpp b/contracts/infinite/infinite.cpp index 21a542c1a28..a8b4257bb7c 100644 --- a/contracts/infinite/infinite.cpp +++ b/contracts/infinite/infinite.cpp @@ -2,15 +2,17 @@ * @file * @copyright defined in eos/LICENSE.txt */ -#include /// defines transfer struct (abi) -extern "C" { +#include /// defines transfer struct (abi) + +using namespace eosio; - /// The apply method just prints forever - void apply( uint64_t, uint64_t, uint64_t ) { - int idx = 0; - while(true) { - eosio::print(idx++); - } - } +extern "C" { + /// The apply method just prints forever + void apply( uint64_t, uint64_t, uint64_t ) { + int idx = 0; + while(true) { + eosio::print(idx++); + } + } } diff --git a/contracts/integration_test/CMakeLists.txt b/contracts/integration_test/CMakeLists.txt index 6439a566f36..1a842fcd00a 100644 --- a/contracts/integration_test/CMakeLists.txt +++ b/contracts/integration_test/CMakeLists.txt @@ -1,8 +1,3 @@ -file(GLOB ABI_FILES "*.abi") -configure_file("${ABI_FILES}" "${CMAKE_CURRENT_BINARY_DIR}" COPYONLY) +set( CMAKE_CXX_STANDARD 17 ) -add_wast_executable(TARGET integration_test - INCLUDE_FOLDERS "${STANDARD_INCLUDE_FOLDERS}" - LIBRARIES libc libc++ eosiolib - DESTINATION_FOLDER ${CMAKE_CURRENT_BINARY_DIR} -) +add_contract( integration_test integration_test integration_test.cpp ) diff --git a/contracts/integration_test/integration_test.cpp b/contracts/integration_test/integration_test.cpp index 6b6997903b7..3b2e48e2eb3 100644 --- a/contracts/integration_test/integration_test.cpp +++ b/contracts/integration_test/integration_test.cpp @@ -1,37 +1,43 @@ +/** + * @file + * @copyright defined in eos/LICENSE.txt + */ + #include + using namespace eosio; -struct integration_test : public eosio::contract { - using contract::contract; +CONTRACT integration_test : public contract { + using contract::contract; - struct payload { - uint64_t key; - vector data; + TABLE payload { + uint64_t key; + std::vector data; - uint64_t primary_key()const { return key; } - }; - typedef eosio::multi_index payloads; + uint64_t primary_key() const { return key; } + }; + typedef eosio::multi_index<"payloads"_n, payload> payloads; - /// @abi action - void store( account_name from, - account_name to, - uint64_t num ) { - require_auth( from ); - eosio_assert( is_account( to ), "to account does not exist"); - eosio_assert( num < std::numeric_limits::max(), "num to large"); - payloads data ( _self, from ); - uint64_t key = 0; - const uint64_t num_keys = 5; - while (data.find( key ) != data.end()) { - key += num_keys; - } - for (size_t i = 0; i < num_keys; ++i) { - data.emplace(from, [&]( auto& g ) { - g.key = key + i; - g.data = vector( static_cast(num), 5); - }); - } +public: + ACTION store( name from, name to, uint64_t num ) { + require_auth( from ); + + eosio_assert( is_account( to ), "to account does not exist" ); + eosio_assert( num < std::numeric_limits::max(), "num to large" ); + + payloads data ( _self, from.value ); + uint64_t key = 0; + const uint64_t num_keys = 5; + + while ( data.find( key ) != data.end() ) { + key += num_keys; + } + for (size_t i = 0; i < num_keys; ++i) { + data.emplace(from, [&]( auto& g ) { + g.key = key + i; + g.data = std::vector( static_cast(num), 5); }); } + } }; -EOSIO_ABI( integration_test, (store) ) +EOSIO_DISPATCH( integration_test, (store) ) diff --git a/contracts/libc++/CMakeLists.txt b/contracts/libc++/CMakeLists.txt deleted file mode 100644 index 6fc747de469..00000000000 --- a/contracts/libc++/CMakeLists.txt +++ /dev/null @@ -1,18 +0,0 @@ -SET(SRC_FILENAMES algorithm.cpp any.cpp bind.cpp condition_variable.cpp exception.cpp functional.cpp - future.cpp ios.cpp iostream.cpp locale.cpp memory.cpp mutex.cpp new.cpp optional.cpp - regex.cpp shared_mutex.cpp stdexcept.cpp string.cpp strstream.cpp system_error.cpp - thread.cpp typeinfo.cpp utility.cpp valarray.cpp variant.cpp vector.cpp) - -#SET(SRC_FILENAMES exception.cpp) - -SET(SRC_FILES "") -FOREACH(FN ${SRC_FILENAMES}) - LIST(APPEND SRC_FILES "upstream/src/${FN}") -ENDFOREACH(FN) - -add_wast_library(TARGET libc++ - NOWARNINGS - SOURCE_FILES "${SRC_FILES}" - INCLUDE_FOLDERS "${STANDARD_INCLUDE_FOLDERS}" - DESTINATION_FOLDER ${CMAKE_CURRENT_BINARY_DIR} -) diff --git a/contracts/multi_index_test/CMakeLists.txt b/contracts/multi_index_test/CMakeLists.txt index 40a4eef16fd..bbf482292f4 100644 --- a/contracts/multi_index_test/CMakeLists.txt +++ b/contracts/multi_index_test/CMakeLists.txt @@ -1,8 +1,3 @@ -file(GLOB ABI_FILES "*.abi") -configure_file("${ABI_FILES}" "${CMAKE_CURRENT_BINARY_DIR}" COPYONLY) -add_wast_executable(TARGET multi_index_test - INCLUDE_FOLDERS "${STANDARD_INCLUDE_FOLDERS}" - LIBRARIES libc++ libc eosiolib - DESTINATION_FOLDER ${CMAKE_CURRENT_BINARY_DIR} -) +set( CMAKE_CXX_STANDARD 17 ) +add_contract( multi_index_test multi_index_test multi_index_test.cpp ) diff --git a/contracts/multi_index_test/multi_index_test.cpp b/contracts/multi_index_test/multi_index_test.cpp index 531984f28fe..60e7b537e6a 100644 --- a/contracts/multi_index_test/multi_index_test.cpp +++ b/contracts/multi_index_test/multi_index_test.cpp @@ -6,12 +6,12 @@ using namespace eosio; namespace multi_index_test { -struct limit_order { - uint64_t id; - uint64_t padding = 0; - uint128_t price; - uint64_t expiration; - account_name owner; + struct limit_order { + uint64_t id; + uint64_t padding = 0; + uint128_t price; + uint64_t expiration; + name owner; auto primary_key()const { return id; } uint64_t get_expiration()const { return expiration; } @@ -21,8 +21,8 @@ struct limit_order { }; struct test_k256 { - uint64_t id; - key256 val; + uint64_t id; + key256 val; auto primary_key()const { return id; } key256 get_val()const { return val; } @@ -30,137 +30,138 @@ struct limit_order { EOSLIB_SERIALIZE( test_k256, (id)(val) ) }; - class snapshot_test { - public: + CONTRACT snapshot_test : public contract { + public: + using contract::contract; - ACTION(N(multitest), trigger) { - trigger(): what(0) {} - trigger(uint32_t w): what(w) {} + struct trigger { + trigger( name user, uint32_t w = 0 ) + : account(user), what(w) + {} - uint32_t what; + name account; + uint32_t what; + }; - EOSLIB_SERIALIZE(trigger, (what)) - }; + ACTION multitest( name user, uint32_t w ) { + trigger t(user, w); - static void on(const trigger& act) + on(t); + } + + static void on(const trigger& act) + { + name payer = act.account; + print("Acting on trigger action.\n"); + switch(act.what) { - auto payer = act.get_account(); - print("Acting on trigger action.\n"); - switch(act.what) - { - case 0: - { - print("Testing uint128_t secondary index.\n"); - eosio::multi_index >, - indexed_by< N(byprice), const_mem_fun > - > orders( N(multitest), N(multitest) ); - - orders.emplace( payer, [&]( auto& o ) { - o.id = 1; - o.expiration = 300; - o.owner = N(dan); - }); - - auto order2 = orders.emplace( payer, [&]( auto& o ) { - o.id = 2; - o.expiration = 200; - o.owner = N(alice); - }); - - print("Items sorted by primary key:\n"); - for( const auto& item : orders ) { - print(" ID=", item.id, ", expiration=", item.expiration, ", owner=", name{item.owner}, "\n"); - } - - auto expidx = orders.get_index(); - - print("Items sorted by expiration:\n"); - for( const auto& item : expidx ) { - print(" ID=", item.id, ", expiration=", item.expiration, ", owner=", name{item.owner}, "\n"); - } - - print("Modifying expiration of order with ID=2 to 400.\n"); - orders.modify( order2, payer, [&]( auto& o ) { - o.expiration = 400; - }); - - print("Items sorted by expiration:\n"); - for( const auto& item : expidx ) { - print(" ID=", item.id, ", expiration=", item.expiration, ", owner=", name{item.owner}, "\n"); - } - - auto lower = expidx.lower_bound(100); - - print("First order with an expiration of at least 100 has ID=", lower->id, " and expiration=", lower->get_expiration(), "\n"); - - } - break; - case 1: // Test key265 secondary index - { - print("Testing key256 secondary index.\n"); - eosio::multi_index > - > testtable( N(multitest), N(exchange) ); // Code must be same as the receiver? Scope doesn't have to be. - - testtable.emplace( payer, [&]( auto& o ) { - o.id = 1; - o.val = key256::make_from_word_sequence(0ULL, 0ULL, 0ULL, 42ULL); - }); - - testtable.emplace( payer, [&]( auto& o ) { - o.id = 2; - o.val = key256::make_from_word_sequence(1ULL, 2ULL, 3ULL, 4ULL); - }); - - testtable.emplace( payer, [&]( auto& o ) { - o.id = 3; - o.val = key256::make_from_word_sequence(0ULL, 0ULL, 0ULL, 42ULL); - }); - - auto itr = testtable.find( 2 ); - - print("Items sorted by primary key:\n"); - for( const auto& item : testtable ) { - print(" ID=", item.primary_key(), ", val=", item.val, "\n"); - } - - auto validx = testtable.get_index(); - - auto lower1 = validx.lower_bound(key256::make_from_word_sequence(0ULL, 0ULL, 0ULL, 40ULL)); - print("First entry with a val of at least 40 has ID=", lower1->id, ".\n"); - - auto lower2 = validx.lower_bound(key256::make_from_word_sequence(0ULL, 0ULL, 0ULL, 50ULL)); - print("First entry with a val of at least 50 has ID=", lower2->id, ".\n"); - - if( testtable.iterator_to(*lower2) == itr ) { - print("Previously found entry is the same as the one found earlier with a primary key value of 2.\n"); - } - - print("Items sorted by val (secondary key):\n"); - for( const auto& item : validx ) { - print(" ID=", item.primary_key(), ", val=", item.val, "\n"); - } - - auto upper = validx.upper_bound(key256::make_from_word_sequence(0ULL, 0ULL, 0ULL, 42ULL)); - - print("First entry with a val greater than 42 has ID=", upper->id, ".\n"); - - print("Removed entry with ID=", lower1->id, ".\n"); - validx.erase( lower1 ); - - print("Items sorted by primary key:\n"); - for( const auto& item : testtable ) { - print(" ID=", item.primary_key(), ", val=", item.val, "\n"); - } - - } - break; - default: - eosio_assert(0, "Given what code is not supported."); - break; - } + case 0: + { + print("Testing uint128_t secondary index.\n"); + eosio::multi_index<"orders"_n, limit_order, + indexed_by< "byexp"_n, const_mem_fun >, + indexed_by< "byprice"_n, const_mem_fun > + > orders( name{"multitest"}, name{"multitest"}.value ); + + orders.emplace( payer, [&]( auto& o ) { + o.id = 1; + o.expiration = 300; + o.owner = "dan"_n; }); + + auto order2 = orders.emplace( payer, [&]( auto& o ) { + o.id = 2; + o.expiration = 200; + o.owner = "alice"_n; }); + + print("Items sorted by primary key:\n"); + for( const auto& item : orders ) { + print(" ID=", item.id, ", expiration=", item.expiration, ", owner=", name{item.owner}, "\n"); + } + + auto expidx = orders.get_index<"byexp"_n>(); + + print("Items sorted by expiration:\n"); + for( const auto& item : expidx ) { + print(" ID=", item.id, ", expiration=", item.expiration, ", owner=", name{item.owner}, "\n"); + } + + print("Modifying expiration of order with ID=2 to 400.\n"); + orders.modify( order2, payer, [&]( auto& o ) { + o.expiration = 400; }); + + print("Items sorted by expiration:\n"); + for( const auto& item : expidx ) { + print(" ID=", item.id, ", expiration=", item.expiration, ", owner=", name{item.owner}, "\n"); + } + + auto lower = expidx.lower_bound(100); + + print("First order with an expiration of at least 100 has ID=", lower->id, " and expiration=", lower->get_expiration(), "\n"); + + } + break; + case 1: // Test key265 secondary index + { + print("Testing key256 secondary index.\n"); + eosio::multi_index<"test1"_n, test_k256, + indexed_by< "byval"_n, const_mem_fun > + > testtable( "multitest"_n, "exchange"_n.value ); // Code must be same as the receiver? Scope doesn't have to be. + + testtable.emplace( payer, [&]( auto& o ) { + o.id = 1; + o.val = key256::make_from_word_sequence(0ULL, 0ULL, 0ULL, 42ULL); }); + + testtable.emplace( payer, [&]( auto& o ) { + o.id = 2; + o.val = key256::make_from_word_sequence(1ULL, 2ULL, 3ULL, 4ULL); }); + + testtable.emplace( payer, [&]( auto& o ) { + o.id = 3; + o.val = key256::make_from_word_sequence(0ULL, 0ULL, 0ULL, 42ULL); }); + + auto itr = testtable.find( 2 ); + + print("Items sorted by primary key:\n"); + for( const auto& item : testtable ) { + print(" ID=", item.primary_key(), ", val=", item.val, "\n"); + } + + auto validx = testtable.get_index<"byval"_n>(); + + auto lower1 = validx.lower_bound(key256::make_from_word_sequence(0ULL, 0ULL, 0ULL, 40ULL)); + print("First entry with a val of at least 40 has ID=", lower1->id, ".\n"); + + auto lower2 = validx.lower_bound(key256::make_from_word_sequence(0ULL, 0ULL, 0ULL, 50ULL)); + print("First entry with a val of at least 50 has ID=", lower2->id, ".\n"); + + if( testtable.iterator_to(*lower2) == itr ) { + print("Previously found entry is the same as the one found earlier with a primary key value of 2.\n"); + } + + print("Items sorted by val (secondary key):\n"); + for( const auto& item : validx ) { + print(" ID=", item.primary_key(), ", val=", item.val, "\n"); + } + + auto upper = validx.upper_bound(key256::make_from_word_sequence(0ULL, 0ULL, 0ULL, 42ULL)); + + print("First entry with a val greater than 42 has ID=", upper->id, ".\n"); + + print("Removed entry with ID=", lower1->id, ".\n"); + validx.erase( lower1 ); + + print("Items sorted by primary key:\n"); + for( const auto& item : testtable ) { + print(" ID=", item.primary_key(), ", val=", item.val, "\n"); + } + + } + break; + default: + eosio_assert(0, "Given what code is not supported."); + break; } + } }; } /// multi_index_test @@ -168,10 +169,27 @@ struct limit_order { namespace multi_index_test { extern "C" { /// The apply method implements the dispatch of events to this contract - void apply( uint64_t /* receiver */, uint64_t code, uint64_t action ) { - require_auth(code); - eosio_assert(eosio::dispatch(code, action), - "Could not dispatch"); + void apply( uint64_t receiver, uint64_t code, uint64_t action ) { + require_auth( code ); + if( code == receiver ) { + if( action == "multitest"_n.value ) { + size_t size = action_data_size(); + void* buffer = nullptr; + buffer = alloca( 512 ); + read_action_data( buffer, size ); + datastream ds( (char*)buffer, size ); + + name user; + uint32_t w; + ds >> user >> w; + + snapshot_test test( name{receiver}, name{code}, ds ); + test.multitest( user, w ); + } + else { + eosio_assert(false, "Could not dispatch"); + } + } } } } diff --git a/contracts/musl/CMakeLists.txt b/contracts/musl/CMakeLists.txt deleted file mode 100644 index d9794c311ed..00000000000 --- a/contracts/musl/CMakeLists.txt +++ /dev/null @@ -1,27 +0,0 @@ -file(GLOB CRYPT_SOURCES "upstream/src/crypt/*.c") -file(GLOB CTYPE_SOURCES "upstream/src/ctype/*.c") -file(GLOB ENV_SOURCES "upstream/src/env/*.c") -file(GLOB ERRNO_SOURCES "upstream/src/errno/*.c") -file(GLOB EXIT_SOURCES "upstream/src/exit/*.c") -file(GLOB LOCALE_SOURCES "upstream/src/locale/*.c") -file(GLOB MATH_SOURCES "upstream/src/math/*.c") -file(GLOB MBYTE_SOURCES "upstream/src/multibyte/*.c") -file(GLOB MISC_SOURCES "upstream/src/misc/*.c") -file(GLOB SEARCH_SOURCES "upstream/src/search/*.c") -file(GLOB STDIO_SOURCES "upstream/src/stdio/*.c") -file(GLOB STDLIB_SOURCES "upstream/src/stdlib/*.c") -file(GLOB STRING_SOURCES "upstream/src/string/*.c") -file(GLOB TIME_SOURCES "upstream/src/time/*.c") -file(GLOB THREAD_SOURCES "upstream/src/thread/*.c") #only for __lock __unlock -set(INTERNAL_SOURCES upstream/src/internal/floatscan.c upstream/src/internal/intscan.c upstream/src/internal/shgetc.c upstream/src/internal/libc.c) - -add_wast_library(TARGET libc - NOWARNINGS - SOURCE_FILES ${CRYPT_SOURCES} ${CTYPE_SOURCES} ${ENV_SOURCES} ${ERRNO_SOURCES} ${EXIT_SOURCES} ${INTERNAL_SOURCES} ${LOCALE_SOURCES} ${MATH_SOURCES} - ${MBYTE_SOURCES} ${MISC_SOURCES} ${SEARCH_SOURCES} ${STDIO_SOURCES} ${STDLIB_SOURCES} ${STRING_SOURCES} ${TIME_SOURCES} ${THREAD_SOURCES} - INCLUDE_FOLDERS ${CMAKE_SOURCE_DIR}/contracts/musl/upstream/include - ${CMAKE_SOURCE_DIR}/contracts/musl/upstream/src/internal - ${CMAKE_SOURCE_DIR}/contracts/musl/upstream/arch/eos - ${CMAKE_SOURCE_DIR}/contracts/ - DESTINATION_FOLDER ${CMAKE_CURRENT_BINARY_DIR} -) diff --git a/contracts/noop/CMakeLists.txt b/contracts/noop/CMakeLists.txt index 6aadc90d01b..dc65e5bbd76 100644 --- a/contracts/noop/CMakeLists.txt +++ b/contracts/noop/CMakeLists.txt @@ -1,8 +1,3 @@ -file(GLOB ABI_FILES "*.abi") -configure_file("${ABI_FILES}" "${CMAKE_CURRENT_BINARY_DIR}" COPYONLY) -add_wast_executable(TARGET noop - INCLUDE_FOLDERS "${STANDARD_INCLUDE_FOLDERS}" - LIBRARIES libc++ libc eosiolib - DESTINATION_FOLDER ${CMAKE_CURRENT_BINARY_DIR} -) +set( CMAKE_CXX_STANDARD 17 ) +add_contract( noop noop noop.cpp ) diff --git a/contracts/noop/noop.cpp b/contracts/noop/noop.cpp index 67f3f101f14..0db2101c6e5 100644 --- a/contracts/noop/noop.cpp +++ b/contracts/noop/noop.cpp @@ -4,20 +4,23 @@ */ #include +#include namespace eosio { - class noop: public contract { - public: - noop( account_name self ): contract( self ) { } - void anyaction( account_name from, - const std::string& /*type*/, - const std::string& /*data*/ ) - { - require_auth( from ); - } - }; + CONTRACT noop: public contract { + public: + using contract::contract; - EOSIO_ABI( noop, ( anyaction ) ) + // Ignore type in action + ACTION anyaction( name from, + const eosio::ignore& /*type*/, + const eosio::ignore& /*data*/ ) + { + require_auth( from ); + } + }; -} /// eosio + EOSIO_DISPATCH( noop, ( anyaction ) ) + +} /// namespace eosio diff --git a/contracts/payloadless/CMakeLists.txt b/contracts/payloadless/CMakeLists.txt index 16bad40cb27..1b0db6d79c3 100644 --- a/contracts/payloadless/CMakeLists.txt +++ b/contracts/payloadless/CMakeLists.txt @@ -1,8 +1,3 @@ -file(GLOB ABI_FILES "*.abi") -configure_file("${ABI_FILES}" "${CMAKE_CURRENT_BINARY_DIR}" COPYONLY) +set( CMAKE_CXX_STANDARD 17 ) -add_wast_executable(TARGET payloadless - INCLUDE_FOLDERS "${STANDARD_INCLUDE_FOLDERS}" - LIBRARIES libc libc++ eosiolib - DESTINATION_FOLDER ${CMAKE_CURRENT_BINARY_DIR} -) +add_contract( payloadless payloadless payloadless.cpp ) diff --git a/contracts/payloadless/payloadless.cpp b/contracts/payloadless/payloadless.cpp index b67c7e23b3a..cc9204ac22f 100644 --- a/contracts/payloadless/payloadless.cpp +++ b/contracts/payloadless/payloadless.cpp @@ -1,14 +1,19 @@ +/** + * @file + * @copyright defined in eos/LICENSE.txt + */ + #include -#include + using namespace eosio; -class payloadless : public eosio::contract { - public: - using contract::contract; +CONTRACT payloadless : public contract { +public: + using contract::contract; - void doit() { - print( "Im a payloadless action" ); - } + ACTION doit() { + print( "Im a payloadless action" ); + } }; -EOSIO_ABI( payloadless, (doit) ) +EOSIO_DISPATCH( payloadless, (doit) ) diff --git a/contracts/proxy/CMakeLists.txt b/contracts/proxy/CMakeLists.txt index ad554e4dd16..dd9729cdede 100644 --- a/contracts/proxy/CMakeLists.txt +++ b/contracts/proxy/CMakeLists.txt @@ -1,8 +1,7 @@ -file(GLOB ABI_FILES "*.abi") -configure_file("${ABI_FILES}" "${CMAKE_CURRENT_BINARY_DIR}" COPYONLY) +set( CMAKE_CXX_STANDARD 17 ) -add_wast_executable(TARGET proxy - INCLUDE_FOLDERS "${STANDARD_INCLUDE_FOLDERS}" ${Boost_INCLUDE_DIR} - LIBRARIES libc++ libc eosiolib - DESTINATION_FOLDER ${CMAKE_CURRENT_BINARY_DIR} -) +include_directories( ${MYPROJECT_DIR}../ ) + +add_contract_no_abi( proxy proxy proxy.cpp ) + +configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/proxy.abi ${CMAKE_CURRENT_BINARY_DIR}/proxy.abi COPYONLY ) diff --git a/contracts/proxy/proxy.cpp b/contracts/proxy/proxy.cpp index ff27e5d5af2..3a583c3731d 100644 --- a/contracts/proxy/proxy.cpp +++ b/contracts/proxy/proxy.cpp @@ -2,17 +2,18 @@ * @file * @copyright defined in eos/LICENSE.txt */ + #include #include -#include -namespace proxy { - using namespace eosio; +using namespace eosio; +namespace proxy { + namespace configs { - bool get(config &out, const account_name &self) { - auto it = db_find_i64(self, self, N(config), config::key); + bool get(config &out, const name &self) { + auto it = db_find_i64(self.value, self.value, name{"config"}.value, out.key.value); if (it != -1) { auto size = db_get_i64(it, (char*)&out, sizeof(config)); eosio_assert(size == sizeof(config), "Wrong record size"); @@ -22,37 +23,37 @@ namespace proxy { } } - void store(const config &in, const account_name &self) { - auto it = db_find_i64(self, self, N(config), config::key); + void store(const config &in, const name &self) { + auto it = db_find_i64(self.value, self.value, name{"config"}.value, in.key.value); if (it != -1) { - db_update_i64(it, self, (const char *)&in, sizeof(config)); + db_update_i64(it, self.value, (const char *)&in, sizeof(config)); } else { - db_store_i64(self, N(config), self, config::key, (const char *)&in, sizeof(config)); + db_store_i64(self.value, "config"_n.value, "self"_n.value, self.value, (const char *)&in, sizeof(config)); } } }; template - void apply_transfer(uint64_t receiver, account_name /* code */, const T& transfer) { + void apply_transfer(uint64_t receiver, name /* code */, const T& transfer) { config code_config; const auto self = receiver; - auto get_res = configs::get(code_config, self); + auto get_res = configs::get(code_config, "self"_n); eosio_assert(get_res, "Attempting to use unconfigured proxy"); - if (transfer.from == self) { + if (transfer.from == "self"_n) { eosio_assert(transfer.to == code_config.owner, "proxy may only pay its owner" ); } else { - eosio_assert(transfer.to == self, "proxy is not involved in this transfer"); + eosio_assert(transfer.to == "self"_n, "proxy is not involved in this transfer"); T new_transfer = T(transfer); - new_transfer.from = self; + new_transfer.from = "self"_n; new_transfer.to = code_config.owner; auto id = code_config.next_id++; - configs::store(code_config, self); + configs::store(code_config, "self"_n); transaction out; - out.actions.emplace_back(permission_level{self, N(active)}, N(eosio.token), N(transfer), new_transfer); + out.actions.emplace_back(permission_level{"self"_n, "active"_n}, "eosio.token"_n, "transfer"_n, new_transfer); out.delay_sec = code_config.delay; - out.send(id, self); + out.send(id, "self"_n); } } @@ -60,11 +61,11 @@ namespace proxy { const auto self = receiver; require_auth(params.owner); config code_config; - configs::get(code_config, self); + configs::get(code_config, "self"_n); code_config.owner = params.owner; code_config.delay = params.delay; eosio::print("Setting owner to: ", name{params.owner}, " with delay: ", params.delay, "\n"); - configs::store(code_config, self); + configs::store(code_config, "self"_n); } template @@ -72,34 +73,31 @@ namespace proxy { eosio::print("starting onerror\n"); const auto self = receiver; config code_config; - eosio_assert(configs::get(code_config, self), "Attempting use of unconfigured proxy"); + eosio_assert(configs::get(code_config, "self"_n), "Attempting use of unconfigured proxy"); auto id = code_config.next_id++; - configs::store(code_config, self); + configs::store(code_config, "self"_n); eosio::print("Resending Transaction: ", error.sender_id, " as ", id, "\n"); transaction dtrx = error.unpack_sent_trx(); dtrx.delay_sec = code_config.delay; - dtrx.send(id, self); + dtrx.send(id, "self"_n); } } -using namespace proxy; -using namespace eosio; - extern "C" { - /// The apply method implements the dispatch of events to this contract - void apply( uint64_t receiver, uint64_t code, uint64_t action ) { - if( code == N(eosio) && action == N(onerror) ) { - apply_onerror( receiver, onerror::from_current_action() ); - } else if( code == N(eosio.token) ) { - if( action == N(transfer) ) { - apply_transfer(receiver, code, unpack_action_data()); + /// The apply method implements the dispatch of events to this contract + void apply( uint64_t receiver, uint64_t code, uint64_t action ) { + if( code == "eosio"_n.value && action == "onerror"_n.value ) { + proxy::apply_onerror( receiver, onerror::from_current_action() ); + } else if( code ==( "eosio.token"_n.value ) ) { + if( action ==( "transfer"_n.value ) ) { + apply_transfer( receiver, name{code}, unpack_action_data() ); } } else if( code == receiver ) { - if( action == N(setowner) ) { - apply_setowner(receiver, unpack_action_data()); + if( action == "setowner"_n.value ) { + apply_setowner( receiver, unpack_action_data() ); } } } diff --git a/contracts/proxy/proxy.hpp b/contracts/proxy/proxy.hpp index fd439e3c274..19f41917366 100644 --- a/contracts/proxy/proxy.hpp +++ b/contracts/proxy/proxy.hpp @@ -2,27 +2,39 @@ * @file * @copyright defined in eos/LICENSE.txt */ + #pragma once #include +#include + +using namespace eosio; namespace proxy { - //@abi action - struct set_owner { - account_name owner; - uint32_t delay; + TABLE set_owner { + name owner; + uint32_t delay; EOSLIB_SERIALIZE( set_owner, (owner)(delay) ) }; - //@abi table - struct config { - config(){} - constexpr static uint64_t key = N(config); - account_name owner = 0; - uint32_t delay = 0; - uint32_t next_id = 0; + TABLE config { + name key; + name owner; + uint32_t delay = 0; + uint32_t next_id = 0; + + uint64_t primary_key() const { return key.value; } + + EOSLIB_SERIALIZE( config, (key)(owner)(delay)(next_id) ) + }; + + struct transfer_args { + name from; + name to; + asset quantity; + std::string memo; }; } /// namespace proxy diff --git a/contracts/simple.token/CMakeLists.txt b/contracts/simple.token/CMakeLists.txt index 1e755eabe2f..3c7b6aabfb6 100644 --- a/contracts/simple.token/CMakeLists.txt +++ b/contracts/simple.token/CMakeLists.txt @@ -1,9 +1,3 @@ +set( CMAKE_CXX_STANDARD 17 ) -file(GLOB ABI_FILES "*.abi") -configure_file("${ABI_FILES}" "${CMAKE_CURRENT_BINARY_DIR}" COPYONLY) - -add_wast_executable(TARGET simple.token - INCLUDE_FOLDERS "${STANDARD_INCLUDE_FOLDERS}" - LIBRARIES libc++ libc eosiolib - DESTINATION_FOLDER ${CMAKE_CURRENT_BINARY_DIR} -) +add_contract( simple.token simple.token simple.token.cpp ) diff --git a/contracts/simple.token/simple.token.cpp b/contracts/simple.token/simple.token.cpp index 1f2ab97feca..808ecb18057 100644 --- a/contracts/simple.token/simple.token.cpp +++ b/contracts/simple.token/simple.token.cpp @@ -1,49 +1,61 @@ +/** + * @file + * @copyright defined in eos/LICENSE.txt + */ + #include -class simpletoken : public eosio::contract { - public: - simpletoken( account_name self ) - :contract(self),_accounts( _self, _self){} +using namespace eosio; - void transfer( account_name from, account_name to, uint64_t quantity ) { - require_auth( from ); +CONTRACT simpletoken : public contract { +public: + using contract::contract; - const auto& fromacnt = _accounts.get( from ); - eosio_assert( fromacnt.balance >= quantity, "overdrawn balance" ); - _accounts.modify( fromacnt, from, [&]( auto& a ){ a.balance -= quantity; } ); + simpletoken(name self, name code, datastream ds) + : contract(self, code, ds), _accounts(self, self.value) + {} - add_balance( from, to, quantity ); - } + ACTION transfer( name from, name to, uint64_t quantity ) { + require_auth( from ); - void issue( account_name to, uint64_t quantity ) { - require_auth( _self ); - add_balance( _self, to, quantity ); - } + const auto& fromaccnt = _accounts.get( from.value ); + eosio_assert( fromaccnt.balance >= quantity, "overdrawn balance" ); + _accounts.modify( fromaccnt, from, [&]( auto& a ){ a.balance -= quantity; } ); + + add_balance( from, to, quantity ); + } + + ACTION issue( name to, uint64_t quantity ) { + require_auth( _self ); + add_balance( _self, to, quantity ); + } + +private: + TABLE account { + name owner; + uint64_t balance; + + uint64_t primary_key()const { return owner.value; } + + EOSLIB_SERIALIZE( account, (owner)(balance) ) + }; + + eosio::multi_index<"accounts"_n, account> _accounts; - private: - struct account { - account_name owner; - uint64_t balance; - - uint64_t primary_key()const { return owner; } - }; - - eosio::multi_index _accounts; - - void add_balance( account_name payer, account_name to, uint64_t q ) { - auto toitr = _accounts.find( to ); - if( toitr == _accounts.end() ) { - _accounts.emplace( payer, [&]( auto& a ) { - a.owner = to; - a.balance = q; - }); - } else { - _accounts.modify( toitr, 0, [&]( auto& a ) { - a.balance += q; - eosio_assert( a.balance >= q, "overflow detected" ); - }); - } + void add_balance( name payer, name to, uint64_t quantity ) { + auto toitr = _accounts.find( to.value ); + if( toitr == _accounts.end() ) { + _accounts.emplace( payer, [&]( auto& a ) { + a.owner = to; + a.balance = quantity; + }); + } else { + _accounts.modify( toitr, "0"_n, [&]( auto& a ) { + a.balance += quantity; + eosio_assert( a.balance >= quantity, "overflow detected" ); + }); } + } }; -EOSIO_ABI( simpletoken, (transfer)(issue) ) +EOSIO_DISPATCH( simpletoken, (transfer)(issue) ) diff --git a/contracts/skeleton/skeleton.cpp b/contracts/skeleton/skeleton.cpp deleted file mode 100644 index a4ad22e1f1b..00000000000 --- a/contracts/skeleton/skeleton.cpp +++ /dev/null @@ -1,15 +0,0 @@ -#include - -using namespace eosio; - -class hello : public eosio::contract { - public: - using contract::contract; - - /// @abi action - void hi( account_name user ) { - print( "Hello, ", name{user} ); - } -}; - -EOSIO_ABI( hello, (hi) ) diff --git a/contracts/skeleton/skeleton.hpp b/contracts/skeleton/skeleton.hpp deleted file mode 100644 index ec28c3d168b..00000000000 --- a/contracts/skeleton/skeleton.hpp +++ /dev/null @@ -1,7 +0,0 @@ -/** - * @file - * @copyright defined in eos/LICENSE.txt - */ -#include - - diff --git a/contracts/snapshot_test/CMakeLists.txt b/contracts/snapshot_test/CMakeLists.txt index 81af479e479..5bcf9117991 100644 --- a/contracts/snapshot_test/CMakeLists.txt +++ b/contracts/snapshot_test/CMakeLists.txt @@ -1,8 +1,3 @@ -file(GLOB ABI_FILES "*.abi") -configure_file("${ABI_FILES}" "${CMAKE_CURRENT_BINARY_DIR}" COPYONLY) -add_wast_executable(TARGET snapshot_test - INCLUDE_FOLDERS "${STANDARD_INCLUDE_FOLDERS}" - LIBRARIES libc++ libc eosiolib - DESTINATION_FOLDER ${CMAKE_CURRENT_BINARY_DIR} -) +set( CMAKE_CXX_STANDARD 17 ) +add_contract( snapshot_test snapshot_test snapshot_test.cpp ) diff --git a/contracts/snapshot_test/snapshot_test.cpp b/contracts/snapshot_test/snapshot_test.cpp index 0ef6939f07e..d307ce992a9 100644 --- a/contracts/snapshot_test/snapshot_test.cpp +++ b/contracts/snapshot_test/snapshot_test.cpp @@ -6,12 +6,12 @@ using namespace eosio; namespace snapshot_test { struct main_record { - uint64_t id; - double index_f64 = 0.0; - long double index_f128 = 0.0L; - uint64_t index_i64 = 0ULL; - uint128_t index_i128 = 0ULL; - key256 index_i256 = key256(); + uint64_t id; + double index_f64 = 0.0; + long double index_f128 = 0.0L; + uint64_t index_i64 = 0ULL; + uint128_t index_i128 = 0ULL; + key256 index_i256 = key256(); auto primary_key() const { return id; } @@ -33,19 +33,19 @@ namespace snapshot_test { EOSLIB_SERIALIZE(increment, (value)) }; - using multi_index_type = eosio::multi_index>, - indexed_by< N(byff), const_mem_fun>, - indexed_by< N(byi ), const_mem_fun>, - indexed_by< N(byii), const_mem_fun>, - indexed_by< N(byiiii), const_mem_fun> - >; + using multi_index_type = eosio::multi_index<"data"_n, main_record, + indexed_by< "byf"_n, const_mem_fun>, + indexed_by< "byff"_n, const_mem_fun>, + indexed_by< "byi"_n, const_mem_fun>, + indexed_by< "byii"_n, const_mem_fun>, + indexed_by< "byiiii"_n, const_mem_fun> + >; static void exec( uint64_t self, uint32_t value ) { - multi_index_type data(self, self); + multi_index_type data(name{self}, self); auto current = data.begin( ); if( current == data.end() ) { - data.emplace( self, [&]( auto& r ) { + data.emplace( name{self}, [&]( auto& r ) { r.id = value; r.index_f64 = value; r.index_f128 = value; @@ -55,7 +55,7 @@ namespace snapshot_test { }); } else { - data.modify( current, self, [&]( auto& r ) { + data.modify( current, name{self}, [&]( auto& r ) { r.index_f64 += value; r.index_f128 += value; r.index_i64 += value; @@ -72,7 +72,7 @@ namespace multi_index_test { /// The apply method implements the dispatch of events to this contract void apply( uint64_t self, uint64_t code, uint64_t action ) { require_auth(code); - eosio_assert(action == N(increment), "unsupported action"); + eosio_assert(action == "increment"_n.value, "unsupported action"); snapshot_test::exec(self, unpack_action_data().value); } } diff --git a/contracts/social/CMakeLists.txt b/contracts/social/CMakeLists.txt deleted file mode 100644 index 72d5d9e059e..00000000000 --- a/contracts/social/CMakeLists.txt +++ /dev/null @@ -1,5 +0,0 @@ -add_wast_executable(TARGET social - INCLUDE_FOLDERS "${STANDARD_INCLUDE_FOLDERS}" - LIBRARIES eosiolib - DESTINATION_FOLDER ${CMAKE_CURRENT_BINARY_DIR} -) diff --git a/contracts/social/social.cpp b/contracts/social/social.cpp deleted file mode 100644 index 7cee3dd1ddf..00000000000 --- a/contracts/social/social.cpp +++ /dev/null @@ -1,107 +0,0 @@ -/** - * @file - * @copyright defined in eos/LICENSE.txt - */ -#include - -/** - * The purpose of this contract is to implement something like Steem on EOS, this - * means this contract defines its own currency, allows people to create posts, vote - * on posts, and stake their voting power. - * - * Unlike Steem, the goal is to enable maximum parallelism and enable the currency to - * be easily integrated with an exchange contract. - */ - -struct post_action { - account_name author; - post_name postid; - account_name reply_to_author; - int32_t reply_to_id; - uint8_t author; /// index in notify list - char[] data; /// ignored, title is embedded within - - account_name get_author()const { return get_notify(author); } -}; - -struct vote_action { - account_name voter; - account_name author; - post_name postid; - int32_t vote_power; -}; - -struct post_record { - uint64_t total_votes = 0; - uint64_t claimed_votes = 0; - uint32_t created; - - post_record( uint32_t c = now() ):created(c){} - static Name table_id() { return Name("post"); } -}; - -struct account { - uint64_t social = 0; - uint64_t social_power = 0; - int32_t vote_power = 0; - uint32_t last_vote = 0; - - static Name table_id() { return Name("account"); } -}; - - -/** - * When a user posts we create a record that tracks the total votes and the time it - * was created. A user can submit this action multiple times, but subsequent calls do - * nothing. - * - * This method only does something when called in the context of the author, if - * any other contexts are notified - */ -void apply_social_post() { - const auto& post = current_action(); - require_auth( post.author ); - - eosio_assert( current_context() == post.author, "cannot call from any other context" ); - - static post_record& existing; - if( !Db::get( post.postid, existing ) ) - Db::store( post.postid, post_record( now() ) ); -} - -/** - * This action is called when a user casts a vote, it requires that this code is executed - * in the context of both the voter and the author. When executed in the author's context it - * updates the vote total. When executed - */ -void apply_social_vote() { - const auto& vote = current_action(); - require_recipient( vote.voter, vote.author ); - disable_context_code( vote.author() ); /// prevent the author's code from rejecting the potentially negative vote - - auto context = current_context(); - auto voter = vote.getVoter(); - - if( context == vote.author ) { - static post_record post; - eosio_assert( Db::get( vote.postid, post ) > 0, "unable to find post" ); - eosio_assert( now() - post.created < days(7), "cannot vote after 7 days" ); - post.votes += vote.vote_power; - Db::store( vote.postid, post ); - } - else if( context == vote.voter ) { - static account vote_account; - Db::get( "account", vote_account ); - auto abs_vote = abs(vote.vote_power); - vote_account.vote_power = min( vote_account.social_power, - vote_account.vote_power + (vote_account.social_power * (now()-last_vote)) / days(7)); - eosio_assert( abs_vote <= vote_account.vote_power, "insufficient vote power" ); - post.votes += vote.vote_power; - vote_account.vote_power -= abs_vote; - vote_account.last_vote = now(); - Db::store( "account", vote_account ); - } else { - eosio_assert( false, "invalid context for execution of this vote" ); - } -} - diff --git a/eosio_build.sh b/eosio_build.sh index b1988d74f0c..956994e8b43 100755 --- a/eosio_build.sh +++ b/eosio_build.sh @@ -261,7 +261,7 @@ CMAKE=$( command -v cmake ) fi - if ! "${CMAKE}" -DCMAKE_BUILD_TYPE="${CMAKE_BUILD_TYPE}" -DCMAKE_CXX_COMPILER="${CXX_COMPILER}" \ + if ! "${CMAKE}" -GNinja -DCMAKE_BUILD_TYPE="${CMAKE_BUILD_TYPE}" -DCMAKE_CXX_COMPILER="${CXX_COMPILER}" \ -DCMAKE_C_COMPILER="${C_COMPILER}" -DWASM_ROOT="${WASM_ROOT}" -DCORE_SYMBOL_NAME="${CORE_SYMBOL_NAME}" \ -DOPENSSL_ROOT_DIR="${OPENSSL_ROOT_DIR}" -DBUILD_MONGO_DB_PLUGIN=true \ -DENABLE_COVERAGE_TESTING="${ENABLE_COVERAGE_TESTING}" -DBUILD_DOXYGEN="${DOXYGEN}" \ @@ -277,7 +277,7 @@ fi if [ -z ${JOBS} ]; then JOBS=$CPU_CORE; fi # Future proofing: Ensure $JOBS is set (usually set in scripts/eosio_build_*.sh scripts) - if ! make -j"${JOBS}" + if ! ninja -j"${JOBS}" then printf "\\n\\t>>>>>>>>>>>>>>>>>>>> MAKE building EOSIO has exited with the above error.\\n\\n" exit -1 diff --git a/libraries/testing/CMakeLists.txt b/libraries/testing/CMakeLists.txt index 620c7fb4003..acf5a162149 100644 --- a/libraries/testing/CMakeLists.txt +++ b/libraries/testing/CMakeLists.txt @@ -14,8 +14,6 @@ target_include_directories( eosio_testing "${CMAKE_BINARY_DIR}/contracts" ) -add_dependencies( eosio_testing eosio.bios ) - if(MSVC) set_source_files_properties( db_init.cpp db_block.cpp database.cpp block_log.cpp PROPERTIES COMPILE_FLAGS "/bigobj" ) endif(MSVC) diff --git a/libraries/testing/tester.cpp b/libraries/testing/tester.cpp index b116d1a4969..1cb7bafa525 100644 --- a/libraries/testing/tester.cpp +++ b/libraries/testing/tester.cpp @@ -3,11 +3,12 @@ #include #include #include - -#include -#include #include +// Note: Associated with line 810 of this file +// #include +// #include + eosio::chain::asset core_from_string(const std::string& s) { return eosio::chain::asset::from_string(s + " " CORE_SYMBOL_NAME); } @@ -806,9 +807,9 @@ namespace eosio { namespace testing { } void base_tester::push_genesis_block() { - set_code(config::system_account_name, eosio_bios_wast); + // set_code(config::system_account_name, eosio_bios_wast); - set_abi(config::system_account_name, eosio_bios_abi); + // set_abi(config::system_account_name, eosio_bios_abi); //produce_block(); } diff --git a/plugins/txn_test_gen_plugin/CMakeLists.txt b/plugins/txn_test_gen_plugin/CMakeLists.txt index e765f3478e6..5ca2fd82d9f 100644 --- a/plugins/txn_test_gen_plugin/CMakeLists.txt +++ b/plugins/txn_test_gen_plugin/CMakeLists.txt @@ -3,8 +3,6 @@ add_library( txn_test_gen_plugin txn_test_gen_plugin.cpp ${HEADERS} ) -add_dependencies(txn_test_gen_plugin eosio.token) - target_link_libraries( txn_test_gen_plugin appbase fc http_plugin chain_plugin ) target_include_directories( txn_test_gen_plugin PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/include" ) target_include_directories( txn_test_gen_plugin PUBLIC ${CMAKE_BINARY_DIR}/contracts ) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index ad77d850285..c5e83d56962 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -21,8 +21,6 @@ target_link_libraries( plugin_test eosio_testing eosio_chain chainbase eos_utili target_include_directories( plugin_test PUBLIC ${CMAKE_SOURCE_DIR}/plugins/net_plugin/include ${CMAKE_SOURCE_DIR}/plugins/chain_plugin/include ) -add_dependencies(plugin_test asserter test_api test_api_mem test_api_db test_api_multi_index proxy identity identity_test stltest infinite eosio.system eosio.token eosio.bios test.inline multi_index_test noop eosio.msig) - # configure_file(${CMAKE_CURRENT_SOURCE_DIR}/core_symbol.py.in ${CMAKE_CURRENT_BINARY_DIR}/core_symbol.py) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/testUtils.py ${CMAKE_CURRENT_BINARY_DIR}/testUtils.py COPYONLY) @@ -39,7 +37,7 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/restart-scenarios-test.py ${CMAKE_CUR configure_file(${CMAKE_CURRENT_SOURCE_DIR}/nodeos_forked_chain_test.py ${CMAKE_CURRENT_BINARY_DIR}/nodeos_forked_chain_test.py COPYONLY) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/nodeos_run_test.py ${CMAKE_CURRENT_BINARY_DIR}/nodeos_run_test.py COPYONLY) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/nodeos_run_remote_test.py ${CMAKE_CURRENT_BINARY_DIR}/nodeos_run_remote_test.py COPYONLY) -configure_file(${CMAKE_CURRENT_SOURCE_DIR}/nodeos_under_min_avail_ram.py ${CMAKE_CURRENT_BINARY_DIR}/nodeos_under_min_avail_ram.py COPYONLY) +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/nodeos_under_min_avail_ram.py ${CMAKE_CURRENT_BINARY_DIR}/nodeos_under_min_avail_ram.py COPYONLY) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/nodeos_voting_test.py ${CMAKE_CURRENT_BINARY_DIR}/nodeos_voting_test.py COPYONLY) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/consensus-validation-malicious-producers.py ${CMAKE_CURRENT_BINARY_DIR}/consensus-validation-malicious-producers.py COPYONLY) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/validate-dirty-db.py ${CMAKE_CURRENT_BINARY_DIR}/validate-dirty-db.py COPYONLY) diff --git a/unittests/CMakeLists.txt b/unittests/CMakeLists.txt index 138c9c6afaf..c01b033673b 100644 --- a/unittests/CMakeLists.txt +++ b/unittests/CMakeLists.txt @@ -15,8 +15,9 @@ set( CMAKE_CXX_STANDARD 14 ) add_subdirectory(contracts) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/include/config.hpp.in ${CMAKE_CURRENT_BINARY_DIR}/include/config.hpp ESCAPE_QUOTES) +#configure_file(${CMAKE_CURRENT_SOURCE_DIR}/contracts.hpp.in ${CMAKE_CURRENT_BINARY_DIR}/include/contracts.hpp ESCAPE_QUOTES) -file(GLOB UNIT_TESTS "*.cpp") +file(GLOB UNIT_TESTS "main.cpp" "identity_tests.cpp") # "*.cpp") add_executable( unit_test ${UNIT_TESTS} ${WASM_UNIT_TESTS} ) target_link_libraries( unit_test eosio_chain chainbase eosio_testing eos_utilities abi_generator fc ${PLATFORM_SPECIFIC_LIBS} ) @@ -28,7 +29,6 @@ target_include_directories( unit_test PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/contracts ${CMAKE_CURRENT_BINARY_DIR}/contracts ${CMAKE_CURRENT_BINARY_DIR}/include ) -add_dependencies(unit_test asserter test_api test_api_mem test_api_db test_ram_limit test_api_multi_index eosio.token proxy identity identity_test stltest infinite eosio.system eosio.token eosio.bios test.inline multi_index_test noop eosio.msig payloadless tic_tac_toe deferred_test snapshot_test) #Manually run unit_test for all supported runtimes #To run unit_test with all log from blockchain displayed, put --verbose after --, i.e. unit_test -- --verbose diff --git a/unittests/contracts/CMakeLists.txt b/unittests/contracts/CMakeLists.txt index 24b1890d9a6..94a5e62beaa 100644 --- a/unittests/contracts/CMakeLists.txt +++ b/unittests/contracts/CMakeLists.txt @@ -4,4 +4,4 @@ set(DEFAULT_SYSTEM_INCLUDE_FOLDERS ${CMAKE_SOURCE_DIR}/contracts/libc++/upstream set(STANDARD_INCLUDE_FOLDERS ${CMAKE_SOURCE_DIR}/contracts ${CMAKE_SOURCE_DIR}/unittests/contracts ${CMAKE_SOURCE_DIR}/externals/magic_get/include) -add_subdirectory(deferred_test) +#add_subdirectory(deferred_test) diff --git a/unittests/identity_tests.cpp b/unittests/identity_tests.cpp index 0ddbcab3cb1..5b65619e898 100644 --- a/unittests/identity_tests.cpp +++ b/unittests/identity_tests.cpp @@ -6,10 +6,12 @@ #include #include -#include -#include -#include -#include +// #include +// #include +// #include +// #include + +#include #include From b864c6b83373ce5e5d6fe27cc1326cb74f901b87 Mon Sep 17 00:00:00 2001 From: John DeBord Date: Wed, 14 Nov 2018 10:37:31 -0500 Subject: [PATCH 002/342] Start refactoring contract tests and cleanup --- CMakeLists.txt | 6 +- contracts/CMakeLists.txt | 3 +- contracts/libc++/upstream | 1 - contracts/musl/upstream | 1 - contracts/simple.token/CMakeLists.txt | 2 - contracts/simple.token/simple.token.cpp | 2 +- eosio_build.sh | 12 +- unittests/CMakeLists.txt | 4 +- unittests/contracts.hpp.in | 13 + unittests/identity_tests.cpp | 685 ------------------------ unittests/payloadless_tests.cpp | 11 +- 11 files changed, 31 insertions(+), 709 deletions(-) delete mode 160000 contracts/libc++/upstream delete mode 160000 contracts/musl/upstream create mode 100644 unittests/contracts.hpp.in delete mode 100644 unittests/identity_tests.cpp diff --git a/CMakeLists.txt b/CMakeLists.txt index def3695cb8c..9d852d863fb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -218,11 +218,11 @@ message( STATUS "Using '${EOSIO_ROOT_KEY}' as public key for 'eosio' account" ) include(wasm) add_subdirectory( libraries ) add_subdirectory( contracts ) -add_subdirectory( plugins ) -add_subdirectory( programs ) +#add_subdirectory( plugins ) +#add_subdirectory( programs ) add_subdirectory( scripts ) add_subdirectory( unittests ) -add_subdirectory( tests ) +#add_subdirectory( tests ) add_subdirectory( tools ) add_subdirectory( debian ) diff --git a/contracts/CMakeLists.txt b/contracts/CMakeLists.txt index eac4281b3bd..d55862c0ff1 100644 --- a/contracts/CMakeLists.txt +++ b/contracts/CMakeLists.txt @@ -2,14 +2,13 @@ macro(add_contract_no_abi CONTRACT_NAME TARGET) add_executable( ${TARGET}.wasm ${ARGN} ) endmacro() -# ??? find_package(eosio.cdt) add_subdirectory( asserter ) add_subdirectory( hello ) add_subdirectory( infinite ) add_subdirectory( integration_test ) -#add_subdirectory( multi_index_test ) +add_subdirectory( multi_index_test ) add_subdirectory( noop ) add_subdirectory( payloadless ) add_subdirectory( proxy ) diff --git a/contracts/libc++/upstream b/contracts/libc++/upstream deleted file mode 160000 index 2880ac42909..00000000000 --- a/contracts/libc++/upstream +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 2880ac42909d4bb29687ed079f8bb4405c3b0869 diff --git a/contracts/musl/upstream b/contracts/musl/upstream deleted file mode 160000 index 8a34536ac97..00000000000 --- a/contracts/musl/upstream +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 8a34536ac9764c90c86cc0b62d0cda07449fd5d8 diff --git a/contracts/simple.token/CMakeLists.txt b/contracts/simple.token/CMakeLists.txt index 3c7b6aabfb6..18e11e92861 100644 --- a/contracts/simple.token/CMakeLists.txt +++ b/contracts/simple.token/CMakeLists.txt @@ -1,3 +1 @@ -set( CMAKE_CXX_STANDARD 17 ) - add_contract( simple.token simple.token simple.token.cpp ) diff --git a/contracts/simple.token/simple.token.cpp b/contracts/simple.token/simple.token.cpp index 808ecb18057..d11148f8ff6 100644 --- a/contracts/simple.token/simple.token.cpp +++ b/contracts/simple.token/simple.token.cpp @@ -50,7 +50,7 @@ CONTRACT simpletoken : public contract { a.balance = quantity; }); } else { - _accounts.modify( toitr, "0"_n, [&]( auto& a ) { + _accounts.modify( toitr, name{0}, [&]( auto& a ) { a.balance += quantity; eosio_assert( a.balance >= quantity, "overflow detected" ); }); diff --git a/eosio_build.sh b/eosio_build.sh index 956994e8b43..9ab1377f4be 100755 --- a/eosio_build.sh +++ b/eosio_build.sh @@ -127,12 +127,12 @@ pushd "${SOURCE_DIR}" &> /dev/null - STALE_SUBMODS=$(( $(git submodule status --recursive | grep -c "^[+\-]") )) - if [ $STALE_SUBMODS -gt 0 ]; then - printf "\\n\\tgit submodules are not up to date.\\n" - printf "\\tPlease run the command 'git submodule update --init --recursive'.\\n" - exit 1 - fi + # STALE_SUBMODS=$(( $(git submodule status --recursive | grep -c "^[+\-]") )) + # if [ $STALE_SUBMODS -gt 0 ]; then + # printf "\\n\\tgit submodules are not up to date.\\n" + # printf "\\tPlease run the command 'git submodule update --init --recursive'.\\n" + # exit 1 + # fi printf "\\n\\tBeginning build version: %s\\n" "${VERSION}" printf "\\t%s\\n" "$( date -u )" diff --git a/unittests/CMakeLists.txt b/unittests/CMakeLists.txt index c01b033673b..0c34d3a41e5 100644 --- a/unittests/CMakeLists.txt +++ b/unittests/CMakeLists.txt @@ -15,9 +15,9 @@ set( CMAKE_CXX_STANDARD 14 ) add_subdirectory(contracts) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/include/config.hpp.in ${CMAKE_CURRENT_BINARY_DIR}/include/config.hpp ESCAPE_QUOTES) -#configure_file(${CMAKE_CURRENT_SOURCE_DIR}/contracts.hpp.in ${CMAKE_CURRENT_BINARY_DIR}/include/contracts.hpp ESCAPE_QUOTES) +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/contracts.hpp.in ${CMAKE_CURRENT_BINARY_DIR}/include/contracts.hpp ESCAPE_QUOTES) -file(GLOB UNIT_TESTS "main.cpp" "identity_tests.cpp") # "*.cpp") +file(GLOB UNIT_TESTS "main.cpp" "payloadless_tests.cpp") # "*.cpp") add_executable( unit_test ${UNIT_TESTS} ${WASM_UNIT_TESTS} ) target_link_libraries( unit_test eosio_chain chainbase eosio_testing eos_utilities abi_generator fc ${PLATFORM_SPECIFIC_LIBS} ) diff --git a/unittests/contracts.hpp.in b/unittests/contracts.hpp.in new file mode 100644 index 00000000000..fe7e9e73226 --- /dev/null +++ b/unittests/contracts.hpp.in @@ -0,0 +1,13 @@ +#pragma once +#include + +namespace eosio { namespace testing { + +struct contracts { + static std::vector eosio_bios_wasm() { return read_wasm("${CMAKE_BINARY_DIR}/unittests/contracts/eosio.bios.wasm"); } + static std::vector eosio_bios_abi() { return read_abi("${CMAKE_BINARY_DIR}/unittests/contracts/eosio.bios.abi"); } + + static std::vector payloadless_wasm() { return read_wasm("${CMAKE_BINARY_DIR}/contracts/payloadless/payloadless.wasm"); } + static std::vector payloadless_abi() { return read_abi("${CMAKE_BINARY_DIR}/contracts/payloadless/payloadless.abi"); } +}; +}} //ns eosio::testing diff --git a/unittests/identity_tests.cpp b/unittests/identity_tests.cpp deleted file mode 100644 index 5b65619e898..00000000000 --- a/unittests/identity_tests.cpp +++ /dev/null @@ -1,685 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include - -// #include -// #include -// #include -// #include - -#include - -#include - -#include -#include - -#include - -#ifdef NON_VALIDATING_TEST -#define TESTER tester -#else -#define TESTER validating_tester -#endif - -using namespace eosio; -using namespace eosio::chain; -using namespace eosio::testing; -using namespace fc; - -class identity_tester : public TESTER { -public: - - identity_tester() { - produce_blocks(2); - - create_accounts( {N(identity), N(identitytest), N(alice), N(bob), N(carol)} ); - produce_blocks(1000); - - set_code(N(identity), identity_wast); - set_abi(N(identity), identity_abi); - set_code(N(identitytest), identity_test_wast); - set_abi(N(identitytest), identity_test_abi); - produce_blocks(1); - - const auto& accnt = control->db().get( N(identity) ); - abi_def abi; - BOOST_REQUIRE_EQUAL(abi_serializer::to_abi(accnt.abi, abi), true); - abi_ser.set_abi(abi, abi_serializer_max_time); - - const auto& acnt_test = control->db().get( N(identitytest) ); - abi_def abi_test; - BOOST_REQUIRE_EQUAL(abi_serializer::to_abi(acnt_test.abi, abi_test), true); - abi_ser_test.set_abi(abi_test, abi_serializer_max_time); - - const auto& ap = control->active_producers(); - FC_ASSERT(0 < ap.producers.size(), "No producers"); - producer_name = (string)ap.producers.front().producer_name; - } - - uint64_t get_result_uint64() { - const auto& db = control->db(); - const auto* t_id = db.find(boost::make_tuple(N(identitytest), 0, N(result))); - FC_ASSERT(t_id != 0, "Table id not found"); - - const auto& idx = db.get_index(); - - auto itr = idx.lower_bound(boost::make_tuple(t_id->id)); - FC_ASSERT( itr != idx.end() && itr->t_id == t_id->id, "lower_bound failed"); - - FC_ASSERT( N(result) == itr->primary_key, "row with result not found"); - FC_ASSERT( sizeof(uint64_t) == itr->value.size(), "unexpected result size"); - return *reinterpret_cast(itr->value.data()); - } - - uint64_t get_owner_for_identity(uint64_t identity) - { - action get_owner_act; - get_owner_act.account = N(identitytest); - get_owner_act.name = N(getowner); - get_owner_act.data = abi_ser_test.variant_to_binary("getowner", mutable_variant_object() - ("identity", identity), - abi_serializer_max_time - ); - BOOST_REQUIRE_EQUAL(success(), push_action(std::move(get_owner_act), N(alice))); - return get_result_uint64(); - } - - uint64_t get_identity_for_account(const string& account) - { - action get_identity_act; - get_identity_act.account = N(identitytest); - get_identity_act.name = N(getidentity); - get_identity_act.data = abi_ser_test.variant_to_binary("getidentity", mutable_variant_object() - ("account", account), - abi_serializer_max_time - ); - BOOST_REQUIRE_EQUAL(success(), push_action(std::move(get_identity_act), N(alice))); - return get_result_uint64(); - } - - action_result create_identity(const string& account_name, uint64_t identity, bool auth = true) { - action create_act; - create_act.account = N(identity); - create_act.name = N(create); - create_act.data = abi_ser.variant_to_binary("create", mutable_variant_object() - ("creator", account_name) - ("identity", identity), - abi_serializer_max_time - ); - return push_action( std::move(create_act), (auth ? string_to_name(account_name.c_str()) : (string_to_name(account_name.c_str()) == N(bob)) ? N(alice) : N(bob))); - } - - fc::variant get_identity(uint64_t idnt) { - const auto& db = control->db(); - const auto* t_id = db.find(boost::make_tuple(N(identity), N(identity), N(ident))); - FC_ASSERT(t_id != 0, "object not found"); - - const auto& idx = db.get_index(); - - auto itr = idx.lower_bound(boost::make_tuple(t_id->id, idnt)); - FC_ASSERT( itr != idx.end() && itr->t_id == t_id->id, "lower_bound failed"); - BOOST_REQUIRE_EQUAL(idnt, itr->primary_key); - - vector data; - copy_row(*itr, data); - return abi_ser.binary_to_variant("identrow", data, abi_serializer_max_time); - } - - action_result certify(const string& certifier, uint64_t identity, const vector& fields, bool auth = true) { - action cert_act; - cert_act.account = N(identity); - cert_act.name = N(certprop); - cert_act.data = abi_ser.variant_to_binary("certprop", mutable_variant_object() - ("bill_storage_to", certifier) - ("certifier", certifier) - ("identity", identity) - ("value", fields), - abi_serializer_max_time - ); - return push_action( std::move(cert_act), (auth ? string_to_name(certifier.c_str()) : (string_to_name(certifier.c_str()) == N(bob)) ? N(alice) : N(bob))); - } - - fc::variant get_certrow(uint64_t identity, const string& property, uint64_t trusted, const string& certifier) { - const auto& db = control->db(); - const auto* t_id = db.find(boost::make_tuple(N(identity), identity, N( certs ))); - if ( !t_id ) { - return fc::variant(nullptr); - } - - const auto& idx = db.get_index(); - auto key = key256::make_from_word_sequence(string_to_name(property.c_str()), trusted, string_to_name(certifier.c_str())); - - auto itr = idx.lower_bound(boost::make_tuple(t_id->id, key.get_array())); - if (itr != idx.end() && itr->t_id == t_id->id && itr->secondary_key == key.get_array()) { - auto primary_key = itr->primary_key; - const auto& idx = db.get_index(); - - auto itr = idx.lower_bound(boost::make_tuple(t_id->id, primary_key)); - FC_ASSERT( itr != idx.end() && itr->t_id == t_id->id && primary_key == itr->primary_key, - "Record found in secondary index, but not found in primary index." - ); - vector data; - copy_row(*itr, data); - return abi_ser.binary_to_variant("certrow", data, abi_serializer_max_time); - } else { - return fc::variant(nullptr); - } - } - - fc::variant get_accountrow(const string& account) { - const auto& db = control->db(); - uint64_t acnt = string_to_name(account.c_str()); - const auto* t_id = db.find(boost::make_tuple(N(identity), acnt, N(account))); - if (!t_id) { - return fc::variant(nullptr); - } - const auto& idx = db.get_index(); - auto itr = idx.lower_bound(boost::make_tuple(t_id->id, N(account))); - if( itr != idx.end() && itr->t_id == t_id->id && N(account) == itr->primary_key) { - vector data; - copy_row(*itr, data); - return abi_ser.binary_to_variant("accountrow", data, abi_serializer_max_time); - } else { - return fc::variant(nullptr); - } - } - - action_result settrust(const string& trustor, const string& trusting, uint64_t trust, bool auth = true) - { - signed_transaction trx; - action settrust_act; - settrust_act.account = N(identity); - settrust_act.name = N(settrust); - settrust_act.data = abi_ser.variant_to_binary("settrust", mutable_variant_object() - ("trustor", trustor) - ("trusting", trusting) - ("trust", trust), - abi_serializer_max_time - ); - auto tr = string_to_name(trustor.c_str()); - return push_action( std::move(settrust_act), (auth ? tr : 0) ); - } - - bool get_trust(const string& trustor, const string& trusting) { - const auto& db = control->db(); - const auto* t_id = db.find(boost::make_tuple(N(identity), string_to_name(trustor.c_str()), N(trust))); - if (!t_id) { - return false; - } - - uint64_t tng = string_to_name(trusting.c_str()); - const auto& idx = db.get_index(); - auto itr = idx.lower_bound(boost::make_tuple(t_id->id, tng)); - return ( itr != idx.end() && itr->t_id == t_id->id && tng == itr->primary_key ); //true if found - } - -public: - abi_serializer abi_ser; - abi_serializer abi_ser_test; - std::string producer_name; -}; - -constexpr uint64_t identity_val = 0xffffffffffffffff; //64-bit value - -BOOST_AUTO_TEST_SUITE(identity_tests) - -BOOST_FIXTURE_TEST_CASE( identity_create, identity_tester ) try { - - BOOST_REQUIRE_EQUAL(success(), create_identity("alice", identity_val)); - fc::variant idnt = get_identity(identity_val); - BOOST_REQUIRE_EQUAL( identity_val, idnt["identity"].as_uint64()); - BOOST_REQUIRE_EQUAL( "alice", idnt["creator"].as_string()); - - //attempts to create already existing identity should fail - BOOST_REQUIRE_EQUAL(wasm_assert_msg("identity already exists"), create_identity("alice", identity_val)); - BOOST_REQUIRE_EQUAL(wasm_assert_msg("identity already exists"), create_identity("bob", identity_val)); - - //alice can create more identities - BOOST_REQUIRE_EQUAL(success(), create_identity("alice", 2)); - fc::variant idnt2 = get_identity(2); - BOOST_REQUIRE_EQUAL( 2, idnt2["identity"].as_uint64()); - BOOST_REQUIRE_EQUAL( "alice", idnt2["creator"].as_string()); - - //bob can create an identity as well - BOOST_REQUIRE_EQUAL(success(), create_identity("bob", 1)); - - //identity == 0 has special meaning, should be impossible to create - BOOST_REQUIRE_EQUAL(wasm_assert_msg("identity=0 is not allowed"), create_identity("alice", 0)); - - //creating adentity without authentication is not allowed - BOOST_REQUIRE_EQUAL(error("missing authority of alice"), create_identity("alice", 3, false)); - - fc::variant idnt_bob = get_identity(1); - BOOST_REQUIRE_EQUAL( 1, idnt_bob["identity"].as_uint64()); - BOOST_REQUIRE_EQUAL( "bob", idnt_bob["creator"].as_string()); - - //previously created identity should still exist - idnt = get_identity(identity_val); - BOOST_REQUIRE_EQUAL( identity_val, idnt["identity"].as_uint64()); - - } FC_LOG_AND_RETHROW() //identity_create - -BOOST_FIXTURE_TEST_CASE( certify_decertify, identity_tester ) try { - BOOST_REQUIRE_EQUAL(success(), create_identity("alice", identity_val)); - - //alice (creator of the identity) certifies 1 property - BOOST_REQUIRE_EQUAL(success(), certify("alice", identity_val, vector{ mutable_variant_object() - ("property", "name") - ("type", "string") - ("data", to_uint8_vector("Alice Smith")) - ("memo", "") - ("confidence", 100) - })); - - auto obj = get_certrow(identity_val, "name", 0, "alice"); - BOOST_REQUIRE_EQUAL(true, obj.is_object()); - BOOST_REQUIRE_EQUAL( "name", obj["property"].as_string() ); - BOOST_REQUIRE_EQUAL( 0, obj["trusted"].as_uint64() ); - BOOST_REQUIRE_EQUAL( "alice", obj["certifier"].as_string() ); - BOOST_REQUIRE_EQUAL( 100, obj["confidence"].as_uint64() ); - BOOST_REQUIRE_EQUAL( "string", obj["type"].as_string() ); - BOOST_REQUIRE_EQUAL( "Alice Smith", to_string(obj["data"]) ); - - //check that there is no trusted row with the same data - BOOST_REQUIRE_EQUAL(true, get_certrow(identity_val, "name", 1, "alice").is_null()); - - //bob certifies 2 properties - vector fields = { mutable_variant_object() - ("property", "email") - ("type", "string") - ("data", to_uint8_vector("alice@alice.name")) - ("memo", "official email") - ("confidence", 95), - mutable_variant_object() - ("property", "address") - ("type", "string") - ("data", to_uint8_vector("1750 Kraft Drive SW, Blacksburg, VA 24060")) - ("memo", "official address") - ("confidence", 80) - }; - - //shouldn't be able to certify without authorization - BOOST_REQUIRE_EQUAL(error("missing authority of bob"), certify("bob", identity_val, fields, false)); - - //certifying non-existent identity is not allowed - uint64_t non_existent = 11; - BOOST_REQUIRE_EQUAL(wasm_assert_msg("identity does not exist"), - certify("alice", non_existent, vector{ mutable_variant_object() - ("property", "name") - ("type", "string") - ("data", to_uint8_vector("Alice Smith")) - ("memo", "") - ("confidence", 100) - }) - ); - - //parameter "type" should be not longer than 32 bytes - BOOST_REQUIRE_EQUAL(wasm_assert_msg("certrow::type should be not longer than 32 bytes"), - certify("alice", identity_val, vector{ mutable_variant_object() - ("property", "height") - ("type", "super_long_type_name_wich_is_not_allowed") - ("data", to_uint8_vector("Alice Smith")) - ("memo", "") - ("confidence", 100) - }) - ); - - //bob also should be able to certify - BOOST_REQUIRE_EQUAL(success(), certify("bob", identity_val, fields)); - - obj = get_certrow(identity_val, "email", 0, "bob"); - BOOST_REQUIRE_EQUAL(true, obj.is_object()); - BOOST_REQUIRE_EQUAL( "email", obj["property"].as_string() ); - BOOST_REQUIRE_EQUAL( 0, obj["trusted"].as_uint64() ); - BOOST_REQUIRE_EQUAL( "bob", obj["certifier"].as_string() ); - BOOST_REQUIRE_EQUAL( 95, obj["confidence"].as_uint64() ); - BOOST_REQUIRE_EQUAL( "string", obj["type"].as_string() ); - BOOST_REQUIRE_EQUAL( "alice@alice.name", to_string(obj["data"]) ); - - obj = get_certrow(identity_val, "address", 0, "bob"); - BOOST_REQUIRE_EQUAL(true, obj.is_object()); - BOOST_REQUIRE_EQUAL( "address", obj["property"].as_string() ); - BOOST_REQUIRE_EQUAL( 0, obj["trusted"].as_uint64() ); - BOOST_REQUIRE_EQUAL( "bob", obj["certifier"].as_string() ); - BOOST_REQUIRE_EQUAL( 80, obj["confidence"].as_uint64() ); - BOOST_REQUIRE_EQUAL( "string", obj["type"].as_string() ); - BOOST_REQUIRE_EQUAL( "1750 Kraft Drive SW, Blacksburg, VA 24060", to_string(obj["data"]) ); - - //now alice certifies another email - BOOST_REQUIRE_EQUAL(success(), certify("alice", identity_val, vector{ mutable_variant_object() - ("property", "email") - ("type", "string") - ("data", to_uint8_vector("alice.smith@gmail.com")) - ("memo", "") - ("confidence", 100) - })); - obj = get_certrow(identity_val, "email", 0, "alice"); - BOOST_REQUIRE_EQUAL(true, obj.is_object()); - BOOST_REQUIRE_EQUAL( "email", obj["property"].as_string() ); - BOOST_REQUIRE_EQUAL( 0, obj["trusted"].as_uint64() ); - BOOST_REQUIRE_EQUAL( "alice", obj["certifier"].as_string() ); - BOOST_REQUIRE_EQUAL( 100, obj["confidence"].as_uint64() ); - BOOST_REQUIRE_EQUAL( "string", obj["type"].as_string() ); - BOOST_REQUIRE_EQUAL( "alice.smith@gmail.com", to_string(obj["data"]) ); - - //email certification made by bob should be still in place - obj = get_certrow(identity_val, "email", 0, "bob"); - BOOST_REQUIRE_EQUAL( "bob", obj["certifier"].as_string() ); - BOOST_REQUIRE_EQUAL( "alice@alice.name", to_string(obj["data"]) ); - - //remove email certification made by alice - BOOST_REQUIRE_EQUAL(success(), certify("alice", identity_val, vector{ mutable_variant_object() - ("property", "email") - ("type", "string") - ("data", to_uint8_vector("")) - ("memo", "") - ("confidence", 0) - })); - BOOST_REQUIRE_EQUAL(true, get_certrow(identity_val, "email", 0, "alice").is_null()); - - //email certification made by bob should still be in place - obj = get_certrow(identity_val, "email", 0, "bob"); - BOOST_REQUIRE_EQUAL( "bob", obj["certifier"].as_string() ); - BOOST_REQUIRE_EQUAL( "alice@alice.name", to_string(obj["data"]) ); - - //name certification made by alice should still be in place - obj = get_certrow(identity_val, "name", 0, "alice"); - BOOST_REQUIRE_EQUAL(true, obj.is_object()); - BOOST_REQUIRE_EQUAL( "Alice Smith", to_string(obj["data"]) ); - -} FC_LOG_AND_RETHROW() //certify_decertify - -BOOST_FIXTURE_TEST_CASE( trust_untrust, identity_tester ) try { - BOOST_REQUIRE_EQUAL(success(), settrust("bob", "alice", 1)); - BOOST_REQUIRE_EQUAL(true, get_trust("bob", "alice")); - - //relation of trust in opposite direction should not exist - BOOST_REQUIRE_EQUAL(false, get_trust("alice", "bob")); - - //remove trust - BOOST_REQUIRE_EQUAL(success(), settrust("bob", "alice", 0)); - BOOST_REQUIRE_EQUAL(false, get_trust("bob", "alice")); - -} FC_LOG_AND_RETHROW() //trust_untrust - -BOOST_FIXTURE_TEST_CASE( certify_decertify_owner, identity_tester ) try { - BOOST_REQUIRE_EQUAL(success(), create_identity("alice", identity_val)); - - //bob certifies ownership for alice - BOOST_REQUIRE_EQUAL(success(), certify("bob", identity_val, vector{ mutable_variant_object() - ("property", "owner") - ("type", "account") - ("data", to_uint8_vector(N(alice))) - ("memo", "claiming onwership") - ("confidence", 100) - })); - BOOST_REQUIRE_EQUAL( true, get_certrow(identity_val, "owner", 0, "bob").is_object() ); - //it should not affect "account" singleton in alice's scope since it's not self-certification - BOOST_REQUIRE_EQUAL( true, get_accountrow("alice").is_null() ); - //it also shouldn't affect "account" singleton in bob's scope since he certified not himself - BOOST_REQUIRE_EQUAL( true, get_accountrow("bob").is_null() ); - - // alice certifies her ownership, should populate "account" singleton - BOOST_REQUIRE_EQUAL(success(), certify("alice", identity_val, vector{ mutable_variant_object() - ("property", "owner") - ("type", "account") - ("data", to_uint8_vector(N(alice))) - ("memo", "claiming onwership") - ("confidence", 100) - })); - fc::variant certrow = get_certrow(identity_val, "owner", 0, "alice"); - BOOST_REQUIRE_EQUAL( true, certrow.is_object() ); - BOOST_REQUIRE_EQUAL( "owner", certrow["property"].as_string() ); - BOOST_REQUIRE_EQUAL( 0, certrow["trusted"].as_uint64() ); - BOOST_REQUIRE_EQUAL( "alice", certrow["certifier"].as_string() ); - BOOST_REQUIRE_EQUAL( 100, certrow["confidence"].as_uint64() ); - BOOST_REQUIRE_EQUAL( "account", certrow["type"].as_string() ); - BOOST_REQUIRE_EQUAL( N(alice), to_uint64(certrow["data"]) ); - - //check that singleton "account" in the alice's scope contains the identity - fc::variant acntrow = get_accountrow("alice"); - BOOST_REQUIRE_EQUAL( true, certrow.is_object() ); - BOOST_REQUIRE_EQUAL( identity_val, acntrow["identity"].as_uint64() ); - - // ownership was certified by alice, but not by a block producer or someone trusted by a block producer - BOOST_REQUIRE_EQUAL(0, get_owner_for_identity(identity_val)); - BOOST_REQUIRE_EQUAL(0, get_identity_for_account("alice")); - - //remove bob's certification - BOOST_REQUIRE_EQUAL(success(), certify("bob", identity_val, vector{ mutable_variant_object() - ("property", "owner") - ("type", "account") - ("data", to_uint8_vector(N(alice))) - ("memo", "claiming onwership") - ("confidence", 0) - })); - //singleton "account" in the alice's scope still should contain the identity - acntrow = get_accountrow("alice"); - BOOST_REQUIRE_EQUAL( true, certrow.is_object() ); - BOOST_REQUIRE_EQUAL( identity_val, acntrow["identity"].as_uint64() ); - - //remove owner certification - BOOST_REQUIRE_EQUAL(success(), certify("alice", identity_val, vector{ mutable_variant_object() - ("property", "owner") - ("type", "account") - ("data", to_uint8_vector(N(alice))) - ("memo", "claiming onwership") - ("confidence", 0) - })); - certrow = get_certrow(identity_val, "owner", 0, "alice"); - BOOST_REQUIRE_EQUAL(true, certrow.is_null()); - - //check that singleton "account" in the alice's scope doesn't contain the identity - acntrow = get_accountrow("alice"); - BOOST_REQUIRE_EQUAL(true, certrow.is_null()); - -} FC_LOG_AND_RETHROW() //certify_decertify_owner - -BOOST_FIXTURE_TEST_CASE( owner_certified_by_producer, identity_tester ) try { - BOOST_REQUIRE_EQUAL(success(), create_identity("alice", identity_val)); - - // certify owner by a block producer, should result in trusted certification - BOOST_REQUIRE_EQUAL(success(), certify( producer_name, identity_val, vector{ mutable_variant_object() - ("property", "owner") - ("type", "account") - ("data", to_uint8_vector(N(alice))) - ("memo", "") - ("confidence", 100) - })); - fc::variant certrow = get_certrow(identity_val, "owner", 1, producer_name); - BOOST_REQUIRE_EQUAL( true, certrow.is_object() ); - BOOST_REQUIRE_EQUAL( "owner", certrow["property"].as_string() ); - BOOST_REQUIRE_EQUAL( 1, certrow["trusted"].as_uint64() ); - BOOST_REQUIRE_EQUAL( producer_name, certrow["certifier"].as_string() ); - BOOST_REQUIRE_EQUAL( N(alice), to_uint64(certrow["data"]) ); - - //uncertified copy of that row shouldn't exist - BOOST_REQUIRE_EQUAL( true, get_certrow(identity_val, "owner", 0, producer_name).is_null()); - - //alice still has not claimed the identity - she is not the official owner yet - BOOST_REQUIRE_EQUAL(0, get_owner_for_identity(identity_val)); - BOOST_REQUIRE_EQUAL(0, get_identity_for_account("alice")); - - - //alice claims it - BOOST_REQUIRE_EQUAL(success(), certify("alice", identity_val, vector{ mutable_variant_object() - ("property", "owner") - ("type", "account") - ("data", to_uint8_vector(N(alice))) - ("memo", "claiming onwership") - ("confidence", 100) - })); - BOOST_REQUIRE_EQUAL( true, get_certrow(identity_val, "owner", 0, "alice").is_object()); - - //now alice should be the official owner - BOOST_REQUIRE_EQUAL(N(alice), get_owner_for_identity(identity_val)); - BOOST_REQUIRE_EQUAL(identity_val, get_identity_for_account("alice")); - - //block producer decertifies ownership - BOOST_REQUIRE_EQUAL(success(), certify(producer_name, identity_val, vector{ mutable_variant_object() - ("property", "owner") - ("type", "account") - ("data", to_uint8_vector(N(alice))) - ("memo", "") - ("confidence", 0) - })); - //self-certification made by alice still exists - BOOST_REQUIRE_EQUAL( true, get_certrow(identity_val, "owner", 0, "alice").is_object()); - //but now she is not official owner - BOOST_REQUIRE_EQUAL(0, get_owner_for_identity(identity_val)); - BOOST_REQUIRE_EQUAL(0, get_identity_for_account("alice")); - -} FC_LOG_AND_RETHROW() //owner_certified_by_producer - -BOOST_FIXTURE_TEST_CASE( owner_certified_by_trusted_account, identity_tester ) try { - BOOST_REQUIRE_EQUAL(success(), create_identity("bob", identity_val)); - - //alice claims the identity created by bob - BOOST_REQUIRE_EQUAL(success(), certify("alice", identity_val, vector{ mutable_variant_object() - ("property", "owner") - ("type", "account") - ("data", to_uint8_vector(N(alice))) - ("memo", "claiming onwership") - ("confidence", 100) - })); - BOOST_REQUIRE_EQUAL( true, get_certrow(identity_val, "owner", 0, "alice").is_object()); - //alice claimed the identity, but it hasn't been certified yet - she is not the official owner - BOOST_REQUIRE_EQUAL(0, get_owner_for_identity(identity_val)); - BOOST_REQUIRE_EQUAL(0, get_identity_for_account("alice")); - - //block producer trusts bob - BOOST_REQUIRE_EQUAL(success(), settrust(producer_name, "bob", 1)); - BOOST_REQUIRE_EQUAL(true, get_trust(producer_name, "bob")); - - // bob (trusted account) certifies alice's ownership, it should result in trusted certification - BOOST_REQUIRE_EQUAL(success(), certify("bob", identity_val, vector{ mutable_variant_object() - ("property", "owner") - ("type", "account") - ("data", to_uint8_vector(N(alice))) - ("memo", "") - ("confidence", 100) - })); - BOOST_REQUIRE_EQUAL( true, get_certrow(identity_val, "owner", 1, "bob").is_object() ); - //no untrusted row should exist - BOOST_REQUIRE_EQUAL( true, get_certrow(identity_val, "owner", 0, "bob").is_null() ); - - //now alice should be the official owner - BOOST_REQUIRE_EQUAL(N(alice), get_owner_for_identity(identity_val)); - BOOST_REQUIRE_EQUAL(identity_val, get_identity_for_account("alice")); - - //block producer stops trusting bob - BOOST_REQUIRE_EQUAL(success(), settrust(producer_name, "bob", 0)); - BOOST_REQUIRE_EQUAL(false, get_trust(producer_name, "bob")); - - //certification made by bob is still flaged as trusted - BOOST_REQUIRE_EQUAL( true, get_certrow(identity_val, "owner", 1, "bob").is_object() ); - - //but now alice shouldn't be the official owner - BOOST_REQUIRE_EQUAL(0, get_owner_for_identity(identity_val)); - BOOST_REQUIRE_EQUAL(0, get_identity_for_account("alice")); - -} FC_LOG_AND_RETHROW() //owner_certified_by_trusted_account - -BOOST_FIXTURE_TEST_CASE( owner_certification_becomes_trusted, identity_tester ) try { - BOOST_REQUIRE_EQUAL(success(), create_identity("bob", identity_val)); - - // bob (not trusted so far) certifies alice's ownership, it should result in untrusted certification - BOOST_REQUIRE_EQUAL(success(), certify("bob", identity_val, vector{ mutable_variant_object() - ("property", "owner") - ("type", "account") - ("data", to_uint8_vector(N(alice))) - ("memo", "") - ("confidence", 100) - })); - BOOST_REQUIRE_EQUAL( true, get_certrow(identity_val, "owner", 0, "bob").is_object() ); - //no trusted row should exist - BOOST_REQUIRE_EQUAL( true, get_certrow(identity_val, "owner", 1, "bob").is_null() ); - - //alice claims the identity created by bob - BOOST_REQUIRE_EQUAL(success(), certify("alice", identity_val, vector{ mutable_variant_object() - ("property", "owner") - ("type", "account") - ("data", to_uint8_vector(N(alice))) - ("memo", "claiming onwership") - ("confidence", 100) - })); - BOOST_REQUIRE_EQUAL( true, get_certrow(identity_val, "owner", 0, "alice").is_object()); - //alice claimed the identity, but it is certified by untrusted accounts only - she is not the official owner - BOOST_REQUIRE_EQUAL(0, get_owner_for_identity(identity_val)); - BOOST_REQUIRE_EQUAL(0, get_identity_for_account("alice")); - - //block producer trusts bob - BOOST_REQUIRE_EQUAL(success(), settrust(producer_name, "bob", 1)); - BOOST_REQUIRE_EQUAL(true, get_trust(producer_name, "bob")); - - //old certification made by bob still shouldn't be flaged as trusted - BOOST_REQUIRE_EQUAL( true, get_certrow(identity_val, "owner", 0, "bob").is_object() ); - - //but effectively bob's certification should became trusted - BOOST_REQUIRE_EQUAL(N(alice), get_owner_for_identity(identity_val)); - BOOST_REQUIRE_EQUAL(identity_val, get_identity_for_account("alice")); - -} FC_LOG_AND_RETHROW() //owner_certification_becomes_trusted - -BOOST_FIXTURE_TEST_CASE( ownership_contradiction, identity_tester ) try { - BOOST_REQUIRE_EQUAL(success(), create_identity("alice", identity_val)); - - //alice claims identity - BOOST_REQUIRE_EQUAL(success(), certify("alice", identity_val, vector{ mutable_variant_object() - ("property", "owner") - ("type", "account") - ("data", to_uint8_vector(N(alice))) - ("memo", "claiming onwership") - ("confidence", 100) - })); - - // block producer certifies alice's ownership - BOOST_REQUIRE_EQUAL(success(), certify(producer_name, identity_val, vector{ mutable_variant_object() - ("property", "owner") - ("type", "account") - ("data", to_uint8_vector(N(alice))) - ("memo", "") - ("confidence", 100) - })); - BOOST_REQUIRE_EQUAL( true, get_certrow(identity_val, "owner", 1, producer_name).is_object() ); - - //now alice is the official owner of the identity - BOOST_REQUIRE_EQUAL(N(alice), get_owner_for_identity(identity_val)); - BOOST_REQUIRE_EQUAL(identity_val, get_identity_for_account("alice")); - - //bob claims identity - BOOST_REQUIRE_EQUAL(success(), certify("bob", identity_val, vector{ mutable_variant_object() - ("property", "owner") - ("type", "account") - ("data", to_uint8_vector(N(bob))) - ("memo", "claiming onwership") - ("confidence", 100) - })); - - - //block producer trusts carol - BOOST_REQUIRE_EQUAL(success(), settrust(producer_name, "carol", 1)); - BOOST_REQUIRE_EQUAL(true, get_trust(producer_name, "carol")); - - //another trusted delegate certifies bob's identity (to the identity already certified to alice) - BOOST_REQUIRE_EQUAL(success(), certify("carol", identity_val, vector{ mutable_variant_object() - ("property", "owner") - ("type", "account") - ("data", to_uint8_vector(N(bob))) - ("memo", "") - ("confidence", 100) - })); - BOOST_REQUIRE_EQUAL( true, get_certrow(identity_val, "owner", 1, producer_name).is_object() ); - - //now neither alice or bob are official owners, because we have 2 trusted certifications in contradiction to each other - BOOST_REQUIRE_EQUAL(0, get_owner_for_identity(identity_val)); - BOOST_REQUIRE_EQUAL(0, get_identity_for_account("alice")); - -} FC_LOG_AND_RETHROW() //ownership_contradiction - -BOOST_AUTO_TEST_SUITE_END() diff --git a/unittests/payloadless_tests.cpp b/unittests/payloadless_tests.cpp index 138ae887ecd..2018c51f00e 100644 --- a/unittests/payloadless_tests.cpp +++ b/unittests/payloadless_tests.cpp @@ -6,8 +6,7 @@ #include #include -#include -#include +#include #include @@ -34,8 +33,8 @@ BOOST_AUTO_TEST_SUITE(payloadless_tests) BOOST_FIXTURE_TEST_CASE( test_doit, payloadless_tester ) { create_accounts( {N(payloadless)} ); - set_code( N(payloadless), payloadless_wast ); - set_abi( N(payloadless), payloadless_abi ); + set_code( N(payloadless), contracts::payloadless_wasm() ); + set_abi( N(payloadless), contracts::payloadless_abi().data() ); auto trace = push_action(N(payloadless), N(doit), N(payloadless), mutable_variant_object()); auto msg = trace->action_traces.front().console; @@ -47,8 +46,8 @@ BOOST_FIXTURE_TEST_CASE( test_doit, payloadless_tester ) { BOOST_FIXTURE_TEST_CASE( test_abi_serializer, payloadless_tester ) { create_accounts( {N(payloadless)} ); - set_code( N(payloadless), payloadless_wast ); - set_abi( N(payloadless), payloadless_abi ); + set_code( N(payloadless), contracts::payloadless_wasm() ); + set_abi( N(payloadless), contracts::payloadless_abi().data() ); variant pretty_trx = fc::mutable_variant_object() ("actions", fc::variants({ From 7006e3ba445593e906d8c12466ccd696f2dd01c9 Mon Sep 17 00:00:00 2001 From: John DeBord Date: Wed, 14 Nov 2018 18:00:13 -0500 Subject: [PATCH 003/342] Finish `payloadless' test and make progress towards `deferred_transaction' test --- contracts/CMakeLists.txt | 1 + contracts/eosio.token/CMakeLists.txt | 8 + contracts/eosio.token/eosio.token.abi | 78 ++++++++ contracts/eosio.token/eosio.token.cpp | 170 ++++++++++++++++++ contracts/eosio.token/eosio.token.hpp | 77 ++++++++ unittests/CMakeLists.txt | 2 +- unittests/abi_tests.cpp | 4 +- unittests/contracts.hpp.in | 11 +- unittests/contracts/CMakeLists.txt | 2 +- .../contracts/deferred_test/CMakeLists.txt | 25 ++- .../contracts/deferred_test/deferred_test.cpp | 25 ++- unittests/payloadless_tests.cpp | 4 +- unittests/whitelist_blacklist_tests.cpp | 58 +++--- 13 files changed, 410 insertions(+), 55 deletions(-) create mode 100644 contracts/eosio.token/CMakeLists.txt create mode 100644 contracts/eosio.token/eosio.token.abi create mode 100644 contracts/eosio.token/eosio.token.cpp create mode 100644 contracts/eosio.token/eosio.token.hpp diff --git a/contracts/CMakeLists.txt b/contracts/CMakeLists.txt index d55862c0ff1..70f979f0346 100644 --- a/contracts/CMakeLists.txt +++ b/contracts/CMakeLists.txt @@ -5,6 +5,7 @@ endmacro() find_package(eosio.cdt) add_subdirectory( asserter ) +add_subdirectory( eosio.token ) add_subdirectory( hello ) add_subdirectory( infinite ) add_subdirectory( integration_test ) diff --git a/contracts/eosio.token/CMakeLists.txt b/contracts/eosio.token/CMakeLists.txt new file mode 100644 index 00000000000..d2fb009400a --- /dev/null +++ b/contracts/eosio.token/CMakeLists.txt @@ -0,0 +1,8 @@ +set( CMAKE_CXX_STANDARD 17 ) + +include_directories( ${MYPROJECT_DIR}../ ) + +add_contract_no_abi( eosio.token eosio.token eosio.token.cpp ) + +configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/eosio.token.abi ${CMAKE_CURRENT_BINARY_DIR}/eosio.token.abi COPYONLY ) + diff --git a/contracts/eosio.token/eosio.token.abi b/contracts/eosio.token/eosio.token.abi new file mode 100644 index 00000000000..3b7ba666eab --- /dev/null +++ b/contracts/eosio.token/eosio.token.abi @@ -0,0 +1,78 @@ +{ + "version": "eosio::abi/1.0", + "types": [{ + "new_type_name": "account_name", + "type": "name" + }], + "structs": [{ + "name": "transfer", + "base": "", + "fields": [ + {"name":"from", "type":"account_name"}, + {"name":"to", "type":"account_name"}, + {"name":"quantity", "type":"asset"}, + {"name":"memo", "type":"string"} + ] + },{ + "name": "create", + "base": "", + "fields": [ + {"name":"issuer", "type":"account_name"}, + {"name":"maximum_supply", "type":"asset"} + ] + },{ + "name": "issue", + "base": "", + "fields": [ + {"name":"to", "type":"account_name"}, + {"name":"quantity", "type":"asset"}, + {"name":"memo", "type":"string"} + ] + },{ + "name": "account", + "base": "", + "fields": [ + {"name":"balance", "type":"asset"} + ] + },{ + "name": "currency_stats", + "base": "", + "fields": [ + {"name":"supply", "type":"asset"}, + {"name":"max_supply", "type":"asset"}, + {"name":"issuer", "type":"account_name"} + ] + } + ], + "actions": [{ + "name": "transfer", + "type": "transfer", + "ricardian_contract": "" + },{ + "name": "issue", + "type": "issue", + "ricardian_contract": "" + }, { + "name": "create", + "type": "create", + "ricardian_contract": "" + } + + ], + "tables": [{ + "name": "accounts", + "type": "account", + "index_type": "i64", + "key_names" : ["currency"], + "key_types" : ["uint64"] + },{ + "name": "stat", + "type": "currency_stats", + "index_type": "i64", + "key_names" : ["currency"], + "key_types" : ["uint64"] + } + ], + "ricardian_clauses": [], + "abi_extensions": [] +} \ No newline at end of file diff --git a/contracts/eosio.token/eosio.token.cpp b/contracts/eosio.token/eosio.token.cpp new file mode 100644 index 00000000000..b18a68af5b1 --- /dev/null +++ b/contracts/eosio.token/eosio.token.cpp @@ -0,0 +1,170 @@ +/** + * @file + * @copyright defined in eos/LICENSE.txt + */ + +#include + +namespace eosio { + +void token::create( name issuer, + asset maximum_supply ) +{ + require_auth( _self ); + + auto sym = maximum_supply.symbol; + eosio_assert( sym.is_valid(), "invalid symbol name" ); + eosio_assert( maximum_supply.is_valid(), "invalid supply"); + eosio_assert( maximum_supply.amount > 0, "max-supply must be positive"); + + stats statstable( _self, sym.code().raw() ); + auto existing = statstable.find( sym.code().raw() ); + eosio_assert( existing == statstable.end(), "token with symbol already exists" ); + + statstable.emplace( _self, [&]( auto& s ) { + s.supply.symbol = maximum_supply.symbol; + s.max_supply = maximum_supply; + s.issuer = issuer; + }); +} + + +void token::issue( name to, asset quantity, string memo ) +{ + auto sym = quantity.symbol; + eosio_assert( sym.is_valid(), "invalid symbol name" ); + eosio_assert( memo.size() <= 256, "memo has more than 256 bytes" ); + + stats statstable( _self, sym.code().raw() ); + auto existing = statstable.find( sym.code().raw() ); + eosio_assert( existing != statstable.end(), "token with symbol does not exist, create token before issue" ); + const auto& st = *existing; + + require_auth( st.issuer ); + eosio_assert( quantity.is_valid(), "invalid quantity" ); + eosio_assert( quantity.amount > 0, "must issue positive quantity" ); + + eosio_assert( quantity.symbol == st.supply.symbol, "symbol precision mismatch" ); + eosio_assert( quantity.amount <= st.max_supply.amount - st.supply.amount, "quantity exceeds available supply"); + + statstable.modify( st, same_payer, [&]( auto& s ) { + s.supply += quantity; + }); + + add_balance( st.issuer, quantity, st.issuer ); + + if( to != st.issuer ) { + SEND_INLINE_ACTION( *this, transfer, { {st.issuer, "active"_n} }, + { st.issuer, to, quantity, memo } + ); + } +} + +void token::retire( asset quantity, string memo ) +{ + auto sym = quantity.symbol; + eosio_assert( sym.is_valid(), "invalid symbol name" ); + eosio_assert( memo.size() <= 256, "memo has more than 256 bytes" ); + + stats statstable( _self, sym.code().raw() ); + auto existing = statstable.find( sym.code().raw() ); + eosio_assert( existing != statstable.end(), "token with symbol does not exist" ); + const auto& st = *existing; + + require_auth( st.issuer ); + eosio_assert( quantity.is_valid(), "invalid quantity" ); + eosio_assert( quantity.amount > 0, "must retire positive quantity" ); + + eosio_assert( quantity.symbol == st.supply.symbol, "symbol precision mismatch" ); + + statstable.modify( st, same_payer, [&]( auto& s ) { + s.supply -= quantity; + }); + + sub_balance( st.issuer, quantity ); +} + +void token::transfer( name from, + name to, + asset quantity, + string memo ) +{ + eosio_assert( from != to, "cannot transfer to self" ); + require_auth( from ); + eosio_assert( is_account( to ), "to account does not exist"); + auto sym = quantity.symbol.code(); + stats statstable( _self, sym.raw() ); + const auto& st = statstable.get( sym.raw() ); + + require_recipient( from ); + require_recipient( to ); + + eosio_assert( quantity.is_valid(), "invalid quantity" ); + eosio_assert( quantity.amount > 0, "must transfer positive quantity" ); + eosio_assert( quantity.symbol == st.supply.symbol, "symbol precision mismatch" ); + eosio_assert( memo.size() <= 256, "memo has more than 256 bytes" ); + + auto payer = has_auth( to ) ? to : from; + + sub_balance( from, quantity ); + add_balance( to, quantity, payer ); +} + +void token::sub_balance( name owner, asset value ) { + accounts from_acnts( _self, owner.value ); + + const auto& from = from_acnts.get( value.symbol.code().raw(), "no balance object found" ); + eosio_assert( from.balance.amount >= value.amount, "overdrawn balance" ); + + from_acnts.modify( from, owner, [&]( auto& a ) { + a.balance -= value; + }); +} + +void token::add_balance( name owner, asset value, name ram_payer ) +{ + accounts to_acnts( _self, owner.value ); + auto to = to_acnts.find( value.symbol.code().raw() ); + if( to == to_acnts.end() ) { + to_acnts.emplace( ram_payer, [&]( auto& a ){ + a.balance = value; + }); + } else { + to_acnts.modify( to, same_payer, [&]( auto& a ) { + a.balance += value; + }); + } +} + +void token::open( name owner, const symbol& symbol, name ram_payer ) +{ + require_auth( ram_payer ); + + auto sym_code_raw = symbol.code().raw(); + + stats statstable( _self, sym_code_raw ); + const auto& st = statstable.get( sym_code_raw, "symbol does not exist" ); + eosio_assert( st.supply.symbol == symbol, "symbol precision mismatch" ); + + accounts acnts( _self, owner.value ); + auto it = acnts.find( sym_code_raw ); + if( it == acnts.end() ) { + acnts.emplace( ram_payer, [&]( auto& a ){ + a.balance = asset{0, symbol}; + }); + } +} + +void token::close( name owner, const symbol& symbol ) +{ + require_auth( owner ); + accounts acnts( _self, owner.value ); + auto it = acnts.find( symbol.code().raw() ); + eosio_assert( it != acnts.end(), "Balance row already deleted or never existed. Action won't have any effect." ); + eosio_assert( it->balance.amount == 0, "Cannot close because the balance is not zero." ); + acnts.erase( it ); +} + +} /// namespace eosio + +EOSIO_DISPATCH( eosio::token, (create)(issue)(transfer)(open)(close)(retire) ) diff --git a/contracts/eosio.token/eosio.token.hpp b/contracts/eosio.token/eosio.token.hpp new file mode 100644 index 00000000000..131ce83e8a2 --- /dev/null +++ b/contracts/eosio.token/eosio.token.hpp @@ -0,0 +1,77 @@ +/** + * @file + * @copyright defined in eos/LICENSE.txt + */ + +#pragma once + +#include +#include + +#include + +namespace eosiosystem { + class system_contract; +} + +namespace eosio { + + using std::string; + + CONTRACT token : public contract { + public: + using contract::contract; + + ACTION create( name issuer, + asset maximum_supply); + + ACTION issue( name to, asset quantity, string memo ); + + ACTION retire( asset quantity, string memo ); + + ACTION transfer( name from, + name to, + asset quantity, + string memo ); + + ACTION open( name owner, const symbol& symbol, name ram_payer ); + + ACTION close( name owner, const symbol& symbol ); + + static asset get_supply( name token_contract_account, symbol_code sym_code ) + { + stats statstable( token_contract_account, sym_code.raw() ); + const auto& st = statstable.get( sym_code.raw() ); + return st.supply; + } + + static asset get_balance( name token_contract_account, name owner, symbol_code sym_code ) + { + accounts accountstable( token_contract_account, owner.value ); + const auto& ac = accountstable.get( sym_code.raw() ); + return ac.balance; + } + + private: + struct [[eosio::table]] account { + asset balance; + + uint64_t primary_key()const { return balance.symbol.code().raw(); } + }; + + struct [[eosio::table]] currency_stats { + asset supply; + asset max_supply; + name issuer; + + uint64_t primary_key()const { return supply.symbol.code().raw(); } + }; + + typedef eosio::multi_index< "accounts"_n, account > accounts; + typedef eosio::multi_index< "stat"_n, currency_stats > stats; + + void sub_balance( name owner, asset value ); + void add_balance( name owner, asset value, name ram_payer ); + }; + +} /// namespace eosio diff --git a/unittests/CMakeLists.txt b/unittests/CMakeLists.txt index 0c34d3a41e5..e0b5848e407 100644 --- a/unittests/CMakeLists.txt +++ b/unittests/CMakeLists.txt @@ -17,7 +17,7 @@ add_subdirectory(contracts) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/include/config.hpp.in ${CMAKE_CURRENT_BINARY_DIR}/include/config.hpp ESCAPE_QUOTES) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/contracts.hpp.in ${CMAKE_CURRENT_BINARY_DIR}/include/contracts.hpp ESCAPE_QUOTES) -file(GLOB UNIT_TESTS "main.cpp" "payloadless_tests.cpp") # "*.cpp") +file(GLOB UNIT_TESTS "main.cpp" "whitelist_blacklist_tests.cpp") # "*.cpp") add_executable( unit_test ${UNIT_TESTS} ${WASM_UNIT_TESTS} ) target_link_libraries( unit_test eosio_chain chainbase eosio_testing eos_utilities abi_generator fc ${PLATFORM_SPECIFIC_LIBS} ) diff --git a/unittests/abi_tests.cpp b/unittests/abi_tests.cpp index c3b46d3f847..8e7460b6975 100644 --- a/unittests/abi_tests.cpp +++ b/unittests/abi_tests.cpp @@ -28,6 +28,8 @@ #include #include +//#include + using namespace eosio; using namespace chain; @@ -602,7 +604,7 @@ BOOST_FIXTURE_TEST_CASE(abigen_unknown_type, abi_gen_helper) { try { const char* unknown_type = R"=====( - #include + //#include //@abi action struct transfer { uint64_t param1; diff --git a/unittests/contracts.hpp.in b/unittests/contracts.hpp.in index fe7e9e73226..5bc148d84f8 100644 --- a/unittests/contracts.hpp.in +++ b/unittests/contracts.hpp.in @@ -6,8 +6,17 @@ namespace eosio { namespace testing { struct contracts { static std::vector eosio_bios_wasm() { return read_wasm("${CMAKE_BINARY_DIR}/unittests/contracts/eosio.bios.wasm"); } static std::vector eosio_bios_abi() { return read_abi("${CMAKE_BINARY_DIR}/unittests/contracts/eosio.bios.abi"); } - + + // For the payloadless contract static std::vector payloadless_wasm() { return read_wasm("${CMAKE_BINARY_DIR}/contracts/payloadless/payloadless.wasm"); } static std::vector payloadless_abi() { return read_abi("${CMAKE_BINARY_DIR}/contracts/payloadless/payloadless.abi"); } + + // For the deferred_test contract + static std::vector eosio_token_wasm() { return read_wasm("${CMAKE_BINARY_DIR}/contracts/eosio.token/eosio.token.wasm"); } + static std::vector eosio_token_abi() { return read_abi("${CMAKE_BINARY_DIR}/contracts/eosio.token/eosio.token.abi"); } + + // For the deferred_test contract + static std::vector deferred_test_wasm() { return read_wasm("${CMAKE_BINARY_DIR}/unittests/contracts/deferred_test/deferred_test.wasm"); } + static std::vector deferred_test_abi() { return read_abi("${CMAKE_BINARY_DIR}/unittests/contracts/deferred_test/deferred_test.abi"); } }; }} //ns eosio::testing diff --git a/unittests/contracts/CMakeLists.txt b/unittests/contracts/CMakeLists.txt index 94a5e62beaa..24b1890d9a6 100644 --- a/unittests/contracts/CMakeLists.txt +++ b/unittests/contracts/CMakeLists.txt @@ -4,4 +4,4 @@ set(DEFAULT_SYSTEM_INCLUDE_FOLDERS ${CMAKE_SOURCE_DIR}/contracts/libc++/upstream set(STANDARD_INCLUDE_FOLDERS ${CMAKE_SOURCE_DIR}/contracts ${CMAKE_SOURCE_DIR}/unittests/contracts ${CMAKE_SOURCE_DIR}/externals/magic_get/include) -#add_subdirectory(deferred_test) +add_subdirectory(deferred_test) diff --git a/unittests/contracts/deferred_test/CMakeLists.txt b/unittests/contracts/deferred_test/CMakeLists.txt index 9d0b08a7b4c..2ddd5f07df0 100644 --- a/unittests/contracts/deferred_test/CMakeLists.txt +++ b/unittests/contracts/deferred_test/CMakeLists.txt @@ -1,8 +1,17 @@ -file(GLOB ABI_FILES "*.abi") -configure_file("${ABI_FILES}" "${CMAKE_CURRENT_BINARY_DIR}" COPYONLY) - -add_wast_executable(TARGET deferred_test - INCLUDE_FOLDERS "${STANDARD_INCLUDE_FOLDERS}" ${Boost_INCLUDE_DIR} - LIBRARIES libc++ libc eosiolib - DESTINATION_FOLDER ${CMAKE_CURRENT_BINARY_DIR} -) +# file(GLOB ABI_FILES "*.abi") +# configure_file("${ABI_FILES}" "${CMAKE_CURRENT_BINARY_DIR}" COPYONLY) + +# add_wast_executable(TARGET deferred_test +# INCLUDE_FOLDERS "${STANDARD_INCLUDE_FOLDERS}" ${Boost_INCLUDE_DIR} +# LIBRARIES libc++ libc eosiolib +# DESTINATION_FOLDER ${CMAKE_CURRENT_BINARY_DIR} +# ) + +set( CMAKE_CXX_STANDARD 17 ) + +# include_directories( ${MYPROJECT_DIR}../ ) + +# add_contract_no_abi( asserter asserter asserter.cpp ) +add_contract( deferred_test deferred_test deferred_test.cpp ) + +# configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/asserter.abi ${CMAKE_CURRENT_BINARY_DIR}/asserter.abi COPYONLY ) diff --git a/unittests/contracts/deferred_test/deferred_test.cpp b/unittests/contracts/deferred_test/deferred_test.cpp index e216aa8483a..fe57908a17e 100644 --- a/unittests/contracts/deferred_test/deferred_test.cpp +++ b/unittests/contracts/deferred_test/deferred_test.cpp @@ -9,28 +9,27 @@ using namespace eosio; -class deferred_test : public eosio::contract { +CONTRACT deferred_test : public contract { public: using contract::contract; + deferred_test(name self) : contract(self, _code, _ds) {} struct deferfunc_args { uint64_t payload; }; - //@abi action - void defercall( account_name payer, uint64_t sender_id, account_name contract, uint64_t payload ) { + ACTION defercall( name payer, uint64_t sender_id, name contract, uint64_t payload ) { print( "defercall called on ", name{_self}, "\n" ); require_auth( payer ); print( "deferred send of deferfunc action to ", name{contract}, " by ", name{payer}, " with sender id ", sender_id ); transaction trx; deferfunc_args a = {.payload = payload}; - trx.actions.emplace_back(permission_level{_self, N(active)}, contract, N(deferfunc), a); - trx.send( (static_cast(payer) << 64) | sender_id, payer); + trx.actions.emplace_back(permission_level{_self, name{"active"}}, contract, name{"deferfunc"}, a); + trx.send( (static_cast(payer.value) << 64) | sender_id, payer); } - //@abi action - void deferfunc( uint64_t payload ) { + ACTION deferfunc( uint64_t payload ) { print("deferfunc called on ", name{_self}, " with payload = ", payload, "\n"); eosio_assert( payload != 13, "value 13 not allowed in payload" ); } @@ -45,14 +44,14 @@ void apply_onerror(uint64_t receiver, const onerror& error ) { extern "C" { /// The apply method implements the dispatch of events to this contract void apply( uint64_t receiver, uint64_t code, uint64_t action ) { - if( code == N(eosio) && action == N(onerror) ) { + if( code == name{"eosio"}.value && action == name{"onerror"}.value ) { apply_onerror( receiver, onerror::from_current_action() ); } else if( code == receiver ) { - deferred_test thiscontract(receiver); - if( action == N(defercall) ) { - execute_action( &thiscontract, &deferred_test::defercall ); - } else if( action == N(deferfunc) ) { - execute_action( &thiscontract, &deferred_test::deferfunc ); + deferred_test thiscontract(name{receiver}); + if( action == name{"defercall"}.value ) { + execute_action( name{receiver}, name{code}, &deferred_test::defercall ); + } else if( action == name{"deferfunc"}.value ) { + execute_action( name{receiver}, name{code}, &deferred_test::deferfunc ); } } } diff --git a/unittests/payloadless_tests.cpp b/unittests/payloadless_tests.cpp index 2018c51f00e..bf9e535b1df 100644 --- a/unittests/payloadless_tests.cpp +++ b/unittests/payloadless_tests.cpp @@ -6,13 +6,13 @@ #include #include -#include - #include #include #include +#include + #ifdef NON_VALIDATING_TEST #define TESTER tester #else diff --git a/unittests/whitelist_blacklist_tests.cpp b/unittests/whitelist_blacklist_tests.cpp index 9957b4ccccc..0204ff9f186 100644 --- a/unittests/whitelist_blacklist_tests.cpp +++ b/unittests/whitelist_blacklist_tests.cpp @@ -4,11 +4,13 @@ #include -#include -#include +// #include +// #include -#include -#include +// #include +// #include + +#include #ifdef NON_VALIDATING_TEST #define TESTER tester @@ -67,8 +69,8 @@ class whitelist_blacklist_tester { if( !bootstrap ) return; chain->create_accounts({N(eosio.token), N(alice), N(bob), N(charlie)}); - chain->set_code(N(eosio.token), eosio_token_wast); - chain->set_abi(N(eosio.token), eosio_token_abi); + chain->set_code(N(eosio.token), contracts::eosio_token_wasm() ); + chain->set_abi(N(eosio.token), contracts::eosio_token_abi().data() ); chain->push_action( N(eosio.token), N(create), N(eosio.token), mvo() ( "issuer", "eosio.token" ) ( "maximum_supply", "1000000.00 TOK" ) @@ -202,13 +204,13 @@ BOOST_AUTO_TEST_CASE( contract_whitelist ) { try { test.chain->produce_blocks(); - test.chain->set_code(N(bob), eosio_token_wast); - test.chain->set_abi(N(bob), eosio_token_abi); + test.chain->set_code(N(bob), contracts::eosio_token_wasm() ); + test.chain->set_abi(N(bob), contracts::eosio_token_abi().data() ); test.chain->produce_blocks(); - test.chain->set_code(N(charlie), eosio_token_wast); - test.chain->set_abi(N(charlie), eosio_token_abi); + test.chain->set_code(N(charlie), contracts::eosio_token_wasm() ); + test.chain->set_abi(N(charlie), contracts::eosio_token_abi().data() ); test.chain->produce_blocks(); @@ -251,13 +253,13 @@ BOOST_AUTO_TEST_CASE( contract_blacklist ) { try { test.chain->produce_blocks(); - test.chain->set_code(N(bob), eosio_token_wast); - test.chain->set_abi(N(bob), eosio_token_abi); + test.chain->set_code(N(bob), contracts::eosio_token_wasm() ); + test.chain->set_abi(N(bob), contracts::eosio_token_abi().data() ); test.chain->produce_blocks(); - test.chain->set_code(N(charlie), eosio_token_wast); - test.chain->set_abi(N(charlie), eosio_token_abi); + test.chain->set_code(N(charlie), contracts::eosio_token_wasm() ); + test.chain->set_abi(N(charlie), contracts::eosio_token_abi().data() ); test.chain->produce_blocks(); @@ -294,13 +296,13 @@ BOOST_AUTO_TEST_CASE( action_blacklist ) { try { test.chain->produce_blocks(); - test.chain->set_code(N(bob), eosio_token_wast); - test.chain->set_abi(N(bob), eosio_token_abi); + test.chain->set_code(N(bob), contracts::eosio_token_wasm() ); + test.chain->set_abi(N(bob), contracts::eosio_token_abi().data() ); test.chain->produce_blocks(); - test.chain->set_code(N(charlie), eosio_token_wast); - test.chain->set_abi(N(charlie), eosio_token_abi); + test.chain->set_code(N(charlie), contracts::eosio_token_wasm() ); + test.chain->set_abi(N(charlie), contracts::eosio_token_abi().data() ); test.chain->produce_blocks(); @@ -327,7 +329,7 @@ BOOST_AUTO_TEST_CASE( blacklist_eosio ) { try { whitelist_blacklist_tester tester1; tester1.init(); tester1.chain->produce_blocks(); - tester1.chain->set_code(config::system_account_name, eosio_token_wast); + tester1.chain->set_code(config::system_account_name, contracts::eosio_token_wasm() ); tester1.chain->produce_blocks(); tester1.shutdown(); tester1.contract_blacklist = {config::system_account_name}; @@ -353,10 +355,10 @@ BOOST_AUTO_TEST_CASE( deferred_blacklist_failure ) { try { whitelist_blacklist_tester tester1; tester1.init(); tester1.chain->produce_blocks(); - tester1.chain->set_code( N(bob), deferred_test_wast ); - tester1.chain->set_abi( N(bob), deferred_test_abi ); - tester1.chain->set_code( N(charlie), deferred_test_wast ); - tester1.chain->set_abi( N(charlie), deferred_test_abi ); + tester1.chain->set_code( N(bob), contracts::deferred_test_wasm() ); + tester1.chain->set_abi( N(bob), contracts::deferred_test_abi().data() ); + tester1.chain->set_code( N(charlie), contracts::deferred_test_wasm() ); + tester1.chain->set_abi( N(charlie), contracts::deferred_test_abi().data() ); tester1.chain->produce_blocks(); tester1.chain->push_action( N(bob), N(defercall), N(alice), mvo() @@ -404,12 +406,12 @@ BOOST_AUTO_TEST_CASE( blacklist_onerror ) { try { whitelist_blacklist_tester tester1; tester1.init(); tester1.chain->produce_blocks(); - tester1.chain->set_code( N(bob), deferred_test_wast ); - tester1.chain->set_abi( N(bob), deferred_test_abi ); - tester1.chain->set_code( N(charlie), deferred_test_wast ); - tester1.chain->set_abi( N(charlie), deferred_test_abi ); + tester1.chain->set_code( N(bob), contracts::deferred_test_wasm() ); + tester1.chain->set_abi( N(bob), contracts::deferred_test_abi().data() ); + tester1.chain->set_code( N(charlie), contracts::deferred_test_wasm() ); + tester1.chain->set_abi( N(charlie), contracts::deferred_test_abi().data() ); tester1.chain->produce_blocks(); - + tester1.chain->push_action( N(bob), N(defercall), N(alice), mvo() ( "payer", "alice" ) ( "sender_id", 0 ) From 3172a23ed41228774da9ceaa8b6112f8915131f4 Mon Sep 17 00:00:00 2001 From: John DeBord Date: Wed, 14 Nov 2018 18:12:39 -0500 Subject: [PATCH 004/342] Got `deferred_test' test working --- unittests/contracts/CMakeLists.txt | 6 +++--- unittests/contracts/deferred_test/CMakeLists.txt | 14 -------------- 2 files changed, 3 insertions(+), 17 deletions(-) diff --git a/unittests/contracts/CMakeLists.txt b/unittests/contracts/CMakeLists.txt index 24b1890d9a6..8502b827a72 100644 --- a/unittests/contracts/CMakeLists.txt +++ b/unittests/contracts/CMakeLists.txt @@ -1,7 +1,7 @@ # will be implictly used for any compilation unit if not overrided by SYSTEM_INCLUDE_FOLDERS parameter # these directories go as -isystem to avoid warnings from code of third-party libraries -set(DEFAULT_SYSTEM_INCLUDE_FOLDERS ${CMAKE_SOURCE_DIR}/contracts/libc++/upstream/include ${CMAKE_SOURCE_DIR}/contracts/musl/upstream/include ${Boost_INCLUDE_DIR}) +# set(DEFAULT_SYSTEM_INCLUDE_FOLDERS ${CMAKE_SOURCE_DIR}/contracts/libc++/upstream/include ${CMAKE_SOURCE_DIR}/contracts/musl/upstream/include ${Boost_INCLUDE_DIR}) -set(STANDARD_INCLUDE_FOLDERS ${CMAKE_SOURCE_DIR}/contracts ${CMAKE_SOURCE_DIR}/unittests/contracts ${CMAKE_SOURCE_DIR}/externals/magic_get/include) +# set(STANDARD_INCLUDE_FOLDERS ${CMAKE_SOURCE_DIR}/contracts ${CMAKE_SOURCE_DIR}/unittests/contracts ${CMAKE_SOURCE_DIR}/externals/magic_get/include) -add_subdirectory(deferred_test) +#add_subdirectory(deferred_test) diff --git a/unittests/contracts/deferred_test/CMakeLists.txt b/unittests/contracts/deferred_test/CMakeLists.txt index 2ddd5f07df0..7c4da3c57fe 100644 --- a/unittests/contracts/deferred_test/CMakeLists.txt +++ b/unittests/contracts/deferred_test/CMakeLists.txt @@ -1,17 +1,3 @@ -# file(GLOB ABI_FILES "*.abi") -# configure_file("${ABI_FILES}" "${CMAKE_CURRENT_BINARY_DIR}" COPYONLY) - -# add_wast_executable(TARGET deferred_test -# INCLUDE_FOLDERS "${STANDARD_INCLUDE_FOLDERS}" ${Boost_INCLUDE_DIR} -# LIBRARIES libc++ libc eosiolib -# DESTINATION_FOLDER ${CMAKE_CURRENT_BINARY_DIR} -# ) - set( CMAKE_CXX_STANDARD 17 ) -# include_directories( ${MYPROJECT_DIR}../ ) - -# add_contract_no_abi( asserter asserter asserter.cpp ) add_contract( deferred_test deferred_test deferred_test.cpp ) - -# configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/asserter.abi ${CMAKE_CURRENT_BINARY_DIR}/asserter.abi COPYONLY ) From 429c70bb5ff243f3152d6e81e9d80e819b3fb914 Mon Sep 17 00:00:00 2001 From: John DeBord Date: Thu, 15 Nov 2018 16:15:13 -0500 Subject: [PATCH 005/342] Partial porting of unit tests --- TAGS | 77869 ++++++++++++++++ libraries/testing/CMakeLists.txt | 1 + libraries/testing/tester.cpp | 15 +- unittests/CMakeLists.txt | 2 +- unittests/contracts.hpp.in | 17 +- unittests/contracts/CMakeLists.txt | 2 + unittests/contracts/eosio.bios/eosio.bios.abi | 256 + unittests/eosio.token_tests.cpp | 9 +- unittests/forked_tests.cpp | 9 +- unittests/multi_index_tests.cpp | 11 +- 10 files changed, 78161 insertions(+), 30 deletions(-) create mode 100644 TAGS create mode 100644 unittests/contracts/eosio.bios/eosio.bios.abi diff --git a/TAGS b/TAGS new file mode 100644 index 00000000000..c5632e0c702 --- /dev/null +++ b/TAGS @@ -0,0 +1,77869 @@ + +tools/CMakeLists.txt,68 +add_executable( print_floats print_floats.cpp )print_floats14,594 + +tools/ctestwrapper.sh,0 + +tools/llvm-gcov.sh,0 + +tools/print_floats.cpp,202 +int main(int argc, const char **argv) {main15,215 + auto print_triplet = [&]( double d, int left_padding = 0 ) {__anon04a79fc8010249,1339 + using nld = std::numeric_limits;nld83,2487 + +tools/mas_sign.sh,114 +cat > $FILENAME.app/Contents/Info.plist < $TMPFILE < {producer_plugin17,269 + struct runtime_options {runtime_options21,407 + fc::optional max_transaction_time;max_transaction_time22,435 + fc::optional max_irreversible_block_age;max_irreversible_block_age23,485 + fc::optional produce_time_offset_us;produce_time_offset_us24,541 + fc::optional last_block_time_offset_us;last_block_time_offset_us25,593 + fc::optional subjective_cpu_leeway_us;subjective_cpu_leeway_us26,648 + fc::optional incoming_defer_ratio;incoming_defer_ratio27,702 + struct whitelist_blacklist {whitelist_blacklist30,759 + fc::optional< flat_set > actor_whitelist;actor_whitelist31,791 + fc::optional< flat_set > actor_blacklist;actor_blacklist32,853 + fc::optional< flat_set > contract_whitelist;contract_whitelist33,915 + fc::optional< flat_set > contract_blacklist;contract_blacklist34,980 + fc::optional< flat_set< std::pair > > action_blacklist;action_blacklist35,1045 + fc::optional< flat_set > key_blacklist;key_blacklist36,1134 + struct greylist_params {greylist_params39,1204 + std::vector accounts;accounts40,1232 + struct integrity_hash_information {integrity_hash_information43,1281 + chain::block_id_type head_block_id;head_block_id44,1320 + chain::digest_type integrity_hash;integrity_hash45,1362 + struct snapshot_information {snapshot_information48,1412 + chain::block_id_type head_block_id;head_block_id49,1445 + std::string snapshot_name;snapshot_name50,1487 + signal confirmed_block;confirmed_block84,2715 + +plugins/producer_plugin/producer_plugin.cpp,11987 +namespace fc {fc46,1203 +const fc::string logger_name("producer_plugin");logger_name50,1289 +fc::logger _log;_log51,1338 +const fc::string trx_trace_logger_name("transaction_tracing");trx_trace_logger_name53,1356 +fc::logger _trx_trace_log;_trx_trace_log54,1419 +namespace eosio {eosio56,1447 +static appbase::abstract_plugin& _producer_plugin = app().register_plugin();_producer_plugin58,1466 +namespace {__anona77284b7011063,1640 + bool failure_is_subjective(const fc::exception& e, bool deadline_is_subjective) {failure_is_subjective64,1652 +struct transaction_id_with_expiry {transaction_id_with_expiry72,1980 + transaction_id_type trx_id;trx_id73,2016 + fc::time_point expiry;expiry74,2051 +using transaction_id_with_expiry_index = multi_index_container<transaction_id_with_expiry_index80,2123 +enum class pending_block_mode {pending_block_mode88,2477 + producing,producing89,2509 + speculatingspeculating90,2523 +#define CATCH_AND_CALL(CATCH_AND_CALL92,2541 +class producer_plugin_impl : public std::enable_shared_from_this {producer_plugin_impl109,3118 + producer_plugin_impl(boost::asio::io_service& io)producer_plugin_impl111,3218 + boost::program_options::variables_map _options;_options122,3646 + bool _production_enabled = false;_production_enabled123,3700 + bool _pause_production = false;_pause_production124,3760 + uint32_t _production_skip_flags = 0; //eosio::chain::skip_nothing;_production_skip_flags125,3820 + using signature_provider_type = std::function;signature_provider_type127,3907 + std::map _signature_providers;_signature_providers128,4003 + std::set _producers;_producers129,4089 + boost::asio::deadline_timer _timer;_timer130,4165 + std::map _producer_watermarks;_producer_watermarks131,4237 + pending_block_mode _pending_block_mode;_pending_block_mode132,4323 + transaction_id_with_expiry_index _persistent_transactions;_persistent_transactions133,4408 + int32_t _max_transaction_time_ms;_max_transaction_time_ms135,4499 + fc::microseconds _max_irreversible_block_age_us;_max_irreversible_block_age_us136,4589 + int32_t _produce_time_offset_us = 0;_produce_time_offset_us137,4685 + int32_t _last_block_time_offset_us = 0;_last_block_time_offset_us138,4778 + fc::time_point _irreversible_block_time;_irreversible_block_time139,4874 + fc::microseconds _keosd_provider_timeout_us;_keosd_provider_timeout_us140,4964 + time_point _last_signed_block_time;_last_signed_block_time142,5057 + time_point _start_time = fc::time_point::now();_start_time143,5099 + uint32_t _last_signed_block_num = 0;_last_signed_block_num144,5153 + producer_plugin* _self = nullptr;_self146,5199 + incoming::channels::block::channel_type::handle _incoming_block_subscription;_incoming_block_subscription148,5240 + incoming::channels::transaction::channel_type::handle _incoming_transaction_subscription_incoming_transaction_subscription149,5332 + compat::channels::transaction_ack::channel_type& _transaction_ack_channel;_transaction_ack_channel151,5431 + incoming::methods::block_sync::method_type::handle _incoming_block_sync_provider;_incoming_block_sync_provider153,5520 + incoming::methods::transaction_async::method_type::handle _incoming_transaction_async_prov_incoming_transaction_async_provider154,5615 + transaction_id_with_expiry_index _blacklisted_transactions;_blacklisted_transactions156,5718 + fc::optional _accepted_block_connection;_accepted_block_connection158,5809 + fc::optional _irreversible_block_connection;_irreversible_block_connection159,5900 + uint32_t _timer_corelation_id = 0;_timer_corelation_id171,6670 + double _incoming_trx_weight = 0.0;_incoming_trx_weight174,6778 + double _incoming_defer_ratio = 1.0; // 1:1_incoming_defer_ratio175,6819 + bfs::path _snapshots_dir;_snapshots_dir178,6909 + void on_block( const block_state_ptr& bsp ) {on_block181,6943 + {__anona77284b70202197,7797 + [&](const producer_key& k){ return k.producer_name == pr__anona77284b70302200,7979 + void on_irreversible_block( const signed_block_ptr& lib ) {on_irreversible_block244,10156 + auto publish_results_of(const Type &data, Channel& channel, F f) {publish_results_of249,10359 + auto publish_success = fc::make_scoped_exit([&, this](){__anona77284b70402250,10432 + void on_incoming_block(const signed_block_ptr& block) {on_incoming_block287,11905 + auto ensure = fc::make_scoped_exit([this](){__anona77284b70502304,12626 + std::deque>>_pending_incoming_transactions341,14179 + void on_incoming_transaction_async(const packed_transaction_ptr& trx, bool persist_until_eon_incoming_transaction_async343,14309 + auto send_response = [this, &trx, &chain, &next](const fc::static_variantnotifier([this](bo__anona77284b70702499,21731 + ("pause-on-startup,x", boost::program_options::bool_switch()->notifier([this](bool p){m__anona77284b70802500,21921 +bool producer_plugin::is_producer_key(const chain::public_key_type& key) constis_producer_key533,25214 +chain::signature_type producer_plugin::sign_compact(const chain::public_key_type& key, const fc:sign_compact541,25448 +T dejsonify(const string& s) {dejsonify555,25990 +#define LOAD_VALUE_SET(LOAD_VALUE_SET559,26068 +make_key_signature_provider(const private_key_type& key) {make_key_signature_provider566,26383 + return [key]( const chain::digest_type& digest ) {__anona77284b70902567,26442 +make_keosd_signature_provider(const std::shared_ptr& impl, const string& umake_keosd_signature_provider573,26589 + return [weak_impl, keosd_url, pubkey]( const chain::digest_type& digest ) {__anona77284b70a02583,27220 +void producer_plugin::plugin_initialize(const boost::program_options::variables_map& options)plugin_initialize596,27808 + my->_incoming_block_subscription = app().get_channel().subscribe([__anona77284b70b02672,31375 + my->_incoming_transaction_subscription = app().get_channel()__anona77284b70c02678,31595 + my->on_incoming_transaction_async(trx, false, [](const auto&){});__anona77284b70d02680,31757 + my->_incoming_block_sync_provider = app().get_method().registe__anona77284b70e02684,31867 + my->_incoming_transaction_async_provider = app().get_method_accepted_block_connection.emplace(chain.accepted_block.connect( [this]( const auto& bsp __anona77284b71002724,33716 + my->_irreversible_block_connection.emplace(chain.irreversible_block.connect( [this]( const au__anona77284b71102725,33842 +void producer_plugin::plugin_shutdown() {plugin_shutdown751,34754 +void producer_plugin::pause() {pause762,34999 +void producer_plugin::resume() {resume766,35067 +bool producer_plugin::paused() const {paused778,35483 +void producer_plugin::update_runtime_options(const runtime_options& options) {update_runtime_options782,35558 +producer_plugin::runtime_options producer_plugin::get_runtime_options() const {get_runtime_options818,36768 +void producer_plugin::add_greylist_accounts(const greylist_params& params) {add_greylist_accounts827,37093 +void producer_plugin::remove_greylist_accounts(const greylist_params& params) {remove_greylist_accounts834,37329 +producer_plugin::greylist_params producer_plugin::get_greylist() const {get_greylist841,37571 +producer_plugin::whitelist_blacklist producer_plugin::get_whitelist_blacklist() const {get_whitelist_blacklist852,37928 +void producer_plugin::set_whitelist_blacklist(const producer_plugin::whitelist_blacklist& paramsset_whitelist_blacklist864,38323 +producer_plugin::integrity_hash_information producer_plugin::get_integrity_hash() const {get_integrity_hash874,39053 + auto reschedule = fc::make_scoped_exit([this](){__anona77284b71202877,39216 +producer_plugin::snapshot_information producer_plugin::create_snapshot() const {create_snapshot891,39529 + auto reschedule = fc::make_scoped_exit([this](){__anona77284b71302894,39683 +optional producer_plugin_impl::calculate_next_block_time(const account_name& procalculate_next_block_time922,40579 + auto itr = std::find_if(active_schedule.begin(), active_schedule.end(), [&](const auto& asp){__anona77284b71402928,41004 +fc::time_point producer_plugin_impl::calculate_pending_block_time() const {calculate_pending_block_time978,43646 +enum class tx_category {tx_category992,44372 + PERSISTED,PERSISTED993,44397 + UNEXPIRED_UNPERSISTED,UNEXPIRED_UNPERSISTED994,44411 + EXPIRED,EXPIRED995,44437 +producer_plugin_impl::start_block_result producer_plugin_impl::start_block(bool &last_block) {start_block999,44454 + auto calculate_transaction_category = [&](const transaction_metadata_ptr& trx) {__anona77284b715021132,51682 +void producer_plugin_impl::schedule_production_loop() {schedule_production_loop1321,60443 + _timer.async_wait([weak_this,cid=++_timer_corelation_id](const boost::system::error_code& __anona77284b716021334,61000 + _timer.async_wait([&chain,weak_this,cid=++_timer_corelation_id](const boost::system::error__anona77284b717021372,63530 +void producer_plugin_impl::schedule_delayed_production_loop(const std::weak_ptr fc::optional {maybe_make_debug_time_logger1454,67155 +void producer_plugin_impl::produce_block() {produce_block1462,67378 + chain.sign_block( [&]( const digest_type& d ) {__anona77284b71b021475,68329 + +plugins/test_control_api_plugin/test_control_api_plugin.cpp,1127 +namespace eosio {eosio10,195 +static appbase::abstract_plugin& _test_control_api_plugin = app().register_plugin {async_result_visitor31,764 + std::string operator()(const T& v) const {operator ()33,852 +#define CALL(CALL38,944 +#define TEST_CONTROL_RW_CALL(TEST_CONTROL_RW_CALL50,1537 +void test_control_api_plugin::plugin_startup() {plugin_startup52,1687 +void test_control_api_plugin::plugin_shutdown() {}plugin_shutdown61,2015 + +plugins/test_control_api_plugin/CMakeLists.txt,66 +add_library( test_control_api_plugintest_control_api_plugin2,65 + +plugins/test_control_api_plugin/include/eosio/test_control_api_plugin/test_control_api_plugin.hpp,138 +namespace eosio {eosio12,254 + class test_control_api_plugin : public plugin {test_control_api_plugin17,362 + +plugins/mongo_db_plugin/CMakeLists.txt,219 + add_library( mongo_db_pluginmongo_db_plugin3,85 + set(EOS_LIBBSONCXX ${LIBBSONCXX_STATIC_LIBRARIES})EOS_LIBBSONCXX31,1487 + set(EOS_LIBMONGOCXX ${LIBMONGOCXX_STATIC_LIBRARIES})EOS_LIBMONGOCXX45,2194 + +plugins/mongo_db_plugin/include/eosio/mongo_db_plugin/mongo_db_plugin.hpp,264 +namespace eosio {eosio11,175 +using mongo_db_plugin_impl_ptr = std::shared_ptr;mongo_db_plugin_impl_ptr13,194 +class mongo_db_plugin : public plugin {mongo_db_plugin30,637 + mongo_db_plugin_impl_ptr my;my44,1019 + +plugins/mongo_db_plugin/mongo_db_plugin.cpp,12588 +namespace fc { class variant; }fc36,971 +namespace eosio {eosio38,1004 +static appbase::abstract_plugin& _mongo_db_plugin = app().register_plugin();_mongo_db_plugin50,1288 +struct filter_entry {filter_entry52,1383 + name receiver;receiver53,1405 + name action;action54,1423 + name actor;actor55,1439 + friend bool operator<( const filter_entry& a, const filter_entry& b ) {operator <57,1455 + bool match( const name& rr, const name& an, const name& ar ) const {match62,1690 +class mongo_db_plugin_impl {mongo_db_plugin_impl69,1927 + fc::optional accepted_block_connection;accepted_block_connection74,2020 + fc::optional irreversible_block_connection;irreversible_block_connection75,2099 + fc::optional accepted_transaction_connection;accepted_transaction_connection76,2182 + fc::optional applied_transaction_connection;applied_transaction_connection77,2267 + bool configured{false};configured124,4778 + bool wipe_database_on_startup{false};wipe_database_on_startup125,4805 + uint32_t start_block_num = 0;start_block_num126,4846 + std::atomic_bool start_block_reached{false};start_block_reached127,4879 + bool is_producer = false;is_producer129,4928 + bool filter_on_star = true;filter_on_star130,4957 + std::set filter_on;filter_on131,4988 + std::set filter_out;filter_out132,5025 + bool update_blocks_via_block_num = false;update_blocks_via_block_num133,5063 + bool store_blocks = true;store_blocks134,5108 + bool store_block_states = true;store_block_states135,5137 + bool store_transactions = true;store_transactions136,5172 + bool store_transaction_traces = true;store_transaction_traces137,5207 + bool store_action_traces = true;store_action_traces138,5248 + std::string db_name;db_name140,5285 + mongocxx::instance mongo_inst;mongo_inst141,5309 + fc::optional mongo_pool;mongo_pool142,5343 + mongocxx::collection _accounts;_accounts145,5408 + mongocxx::collection _trans;_trans146,5443 + mongocxx::collection _trans_traces;_trans_traces147,5475 + mongocxx::collection _action_traces;_action_traces148,5514 + mongocxx::collection _block_states;_block_states149,5554 + mongocxx::collection _blocks;_blocks150,5593 + mongocxx::collection _pub_keys;_pub_keys151,5626 + mongocxx::collection _account_controls;_account_controls152,5661 + size_t max_queue_size = 0;max_queue_size154,5705 + int queue_sleep_time = 0;queue_sleep_time155,5735 + size_t abi_cache_size = 0;abi_cache_size156,5764 + std::deque transaction_metadata_queue;transaction_metadata_queue157,5794 + std::deque transaction_metadata_process_queue;transaction_metadata_process_queue158,5869 + std::deque transaction_trace_queue;transaction_trace_queue159,5952 + std::deque transaction_trace_process_queue;transaction_trace_process_queue160,6021 + std::deque block_state_queue;block_state_queue161,6098 + std::deque block_state_process_queue;block_state_process_queue162,6155 + std::deque irreversible_block_state_queue;irreversible_block_state_queue163,6220 + std::deque irreversible_block_state_process_queue;irreversible_block_state_process_queue164,6290 + boost::mutex mtx;mtx165,6368 + boost::condition_variable condition;condition166,6389 + boost::thread consume_thread;consume_thread167,6429 + std::atomic_bool done{false};done168,6462 + std::atomic_bool startup{true};startup169,6495 + fc::optional chain_id;chain_id170,6530 + fc::microseconds abi_serializer_max_time;abi_serializer_max_time171,6578 + struct abi_cache {abi_cache176,6673 + account_name account;account177,6695 + fc::time_point last_accessed;last_accessed178,6743 + fc::optional serializer;serializer179,6797 + > abi_cache_index_t;abi_cache_index_t187,7159 + abi_cache_index_t abi_cache_index;abi_cache_index189,7184 + static const action_name newaccount;newaccount191,7223 + static const action_name setabi;setabi192,7263 + static const action_name updateauth;updateauth193,7299 + static const action_name deleteauth;deleteauth194,7339 + static const permission_name owner;owner195,7379 + static const permission_name active;active196,7418 + static const std::string block_states_col;block_states_col198,7459 + static const std::string blocks_col;blocks_col199,7505 + static const std::string trans_col;trans_col200,7545 + static const std::string trans_traces_col;trans_traces_col201,7584 + static const std::string action_traces_col;action_traces_col202,7630 + static const std::string accounts_col;accounts_col203,7677 + static const std::string pub_keys_col;pub_keys_col204,7719 + static const std::string account_controls_col;account_controls_col205,7761 +const action_name mongo_db_plugin_impl::newaccount = chain::newaccount::get_name();newaccount208,7815 +const action_name mongo_db_plugin_impl::setabi = chain::setabi::get_name();setabi209,7899 +const action_name mongo_db_plugin_impl::updateauth = chain::updateauth::get_name();updateauth210,7975 +const action_name mongo_db_plugin_impl::deleteauth = chain::deleteauth::get_name();deleteauth211,8059 +const permission_name mongo_db_plugin_impl::owner = chain::config::owner_name;owner212,8143 +const permission_name mongo_db_plugin_impl::active = chain::config::active_name;active213,8222 +const std::string mongo_db_plugin_impl::block_states_col = "block_states";block_states_col215,8304 +const std::string mongo_db_plugin_impl::blocks_col = "blocks";blocks_col216,8379 +const std::string mongo_db_plugin_impl::trans_col = "transactions";trans_col217,8442 +const std::string mongo_db_plugin_impl::trans_traces_col = "transaction_traces";trans_traces_col218,8510 +const std::string mongo_db_plugin_impl::action_traces_col = "action_traces";action_traces_col219,8591 +const std::string mongo_db_plugin_impl::accounts_col = "accounts";accounts_col220,8668 +const std::string mongo_db_plugin_impl::pub_keys_col = "pub_keys";pub_keys_col221,8735 +const std::string mongo_db_plugin_impl::account_controls_col = "account_controls";account_controls_col222,8802 +bool mongo_db_plugin_impl::filter_include( const account_name& receiver, const action_name& act_filter_include224,8886 + auto itr = std::find_if( filter_on.cbegin(), filter_on.cend(), [&receiver, &act_name]( con__anonc5ef62790102231,9179 + auto itr = std::find_if( filter_on.cbegin(), filter_on.cend(), [&receiver, &act_name__anonc5ef62790202238,9487 + auto itr = std::find_if( filter_out.cbegin(), filter_out.cend(), [&receiver, &act_name]( cons__anonc5ef62790302252,9915 + auto itr = std::find_if( filter_out.cbegin(), filter_out.cend(), [&receiver, &act_name, &a__anonc5ef62790402258,10185 +bool mongo_db_plugin_impl::filter_include( const transaction& trx ) constfilter_include267,10459 +void mongo_db_plugin_impl::queue( Queue& queue, const Entry& e ) {queue292,11121 +void mongo_db_plugin_impl::accepted_transaction( const chain::transaction_metadata_ptr& t ) {accepted_transaction312,11759 +void mongo_db_plugin_impl::applied_transaction( const chain::transaction_trace_ptr& t ) {applied_transaction326,12264 +void mongo_db_plugin_impl::applied_irreversible_block( const chain::block_state_ptr& bs ) {applied_irreversible_block361,14348 +void mongo_db_plugin_impl::accepted_block( const chain::block_state_ptr& bs ) {accepted_block375,14912 +void mongo_db_plugin_impl::consume_blocks() {consume_blocks394,15537 +namespace {__anonc5ef62790510515,21058 +auto find_account( mongocxx::collection& accounts, const account_name& name ) {find_account517,21071 +auto find_block( mongocxx::collection& blocks, const string& id ) {find_block523,21320 +void handle_mongo_exception( const std::string& desc, int line_num ) {handle_mongo_exception532,21669 +void mongo_db_plugin_impl::purge_abi_cache() {purge_abi_cache575,23761 +optional mongo_db_plugin_impl::get_abi_serializer( account_name n ) {get_abi_serializer586,24056 + abi_cache_index.modify( itr, []( auto& entry ) {__anonc5ef62790602594,24355 + []( const auto& s ) { return s.name == "setabi"; } );__anonc5ef62790702622,25619 + []( const auto& f ) { return f.name == "abi"; } )__anonc5ef62790802625,25854 + []( fc::datastream& stream, bool is_array, b__anonc5ef62790902632,26376 + []( const fc::variant& var, fc::datastream& ds, bo__anonc5ef62790a02638,26914 +fc::variant mongo_db_plugin_impl::to_variant_with_abi( const T& obj ) {to_variant_with_abi658,27650 + [&]( account_name n ) { return get_abi_serializer( n ); },__anonc5ef62790b02661,27803 +void mongo_db_plugin_impl::process_accepted_transaction( const chain::transaction_metadata_ptr& process_accepted_transaction666,27979 +void mongo_db_plugin_impl::process_applied_transaction( const chain::transaction_trace_ptr& t ) process_applied_transaction680,28558 +void mongo_db_plugin_impl::process_irreversible_block(const chain::block_state_ptr& bs) {process_irreversible_block693,29179 +void mongo_db_plugin_impl::process_accepted_block( const chain::block_state_ptr& bs ) {process_accepted_block707,29701 +void mongo_db_plugin_impl::_process_accepted_transaction( const chain::transaction_metadata_ptr&_process_accepted_transaction721,30225 +mongo_db_plugin_impl::add_action_trace( mongocxx::bulk_write& bulk_action_traces, const chain::aadd_action_trace801,33247 +void mongo_db_plugin_impl::_process_applied_transaction( const chain::transaction_trace_ptr& t )_process_applied_transaction855,35605 +void mongo_db_plugin_impl::_process_accepted_block( const chain::block_state_ptr& bs ) {_process_accepted_block929,38610 +void mongo_db_plugin_impl::_process_irreversible_block(const chain::block_state_ptr& bs)_process_irreversible_block1030,43249 +void mongo_db_plugin_impl::add_pub_keys( const vector& keys, const account_naadd_pub_keys1119,47211 +void mongo_db_plugin_impl::remove_pub_keys( const account_name& name, const permission_name& perremove_pub_keys1156,48671 +void mongo_db_plugin_impl::add_account_control( const vector& coadd_account_control1174,49385 +void mongo_db_plugin_impl::remove_account_control( const account_name& name, const permission_naremove_account_control1213,51041 +namespace {__anonc5ef62790c101231,51817 +void create_account( mongocxx::collection& accounts, const name& name, std::chrono::millisecondscreate_account1233,51830 +void mongo_db_plugin_impl::update_account(const chain::action& act)update_account1256,52663 +mongo_db_plugin_impl::mongo_db_plugin_impl()mongo_db_plugin_impl1332,56145 +mongo_db_plugin_impl::~mongo_db_plugin_impl() {~mongo_db_plugin_impl1336,56195 +void mongo_db_plugin_impl::wipe_database() {wipe_database1352,56645 +void mongo_db_plugin_impl::init() {init1378,57473 + consume_thread = boost::thread([this] { consume_blocks(); });__anonc5ef62790d021452,60852 +mongo_db_plugin::mongo_db_plugin()mongo_db_plugin1461,60987 +mongo_db_plugin::~mongo_db_plugin()~mongo_db_plugin1466,61057 +void mongo_db_plugin::set_program_options(options_description& cli, options_description& cfg)set_program_options1470,61098 +void mongo_db_plugin::plugin_initialize(const variables_map& options)plugin_initialize1505,63621 + my->accepted_block_connection.emplace( chain.accepted_block.connect( [&]( const chain::__anonc5ef62790e021605,68589 + chain.irreversible_block.connect( [&]( const chain::block_state_ptr& bs ) {__anonc5ef62790f021609,68814 + chain.accepted_transaction.connect( [&]( const chain::transaction_metadata_ptr& t__anonc5ef627910021613,69036 + chain.applied_transaction.connect( [&]( const chain::transaction_trace_ptr& t ) {__anonc5ef627911021617,69260 +void mongo_db_plugin::plugin_startup()plugin_startup1632,69723 +void mongo_db_plugin::plugin_shutdown()plugin_shutdown1636,69767 + +plugins/faucet_testnet_plugin/faucet_testnet_plugin.cpp,4623 +namespace eosio { namespace detail {eosio20,481 +namespace eosio { namespace detail {detail20,481 + struct faucet_testnet_empty {};faucet_testnet_empty21,518 + struct faucet_testnet_keys {faucet_testnet_keys23,553 + std::string owner;owner24,584 + std::string active;active25,608 + struct faucet_testnet_create_account_params {faucet_testnet_create_account_params28,639 + std::string account;account29,687 + faucet_testnet_keys keys;keys30,713 + struct faucet_testnet_create_account_alternates_response {faucet_testnet_create_account_alternates_response33,750 + std::vector alternates;alternates34,811 + std::string message;message35,861 + struct faucet_testnet_create_account_rate_limited_response {faucet_testnet_create_account_rate_limited_response38,893 + std::string message;message39,956 +namespace eosio {eosio49,1382 +static appbase::abstract_plugin& _faucet_testnet_plugin = app().register_plugin;key_pair55,1586 +using results_pair = std::pair;results_pair56,1640 +#define CALL(CALL58,1695 +struct faucet_testnet_plugin_impl {faucet_testnet_plugin_impl70,2228 + struct create_faucet_account_alternate_results {create_faucet_account_alternate_results71,2264 + std::vector alternates;alternates72,2316 + faucet_testnet_plugin_impl(appbase::application& app)faucet_testnet_plugin_impl75,2366 + void timer_fired() {timer_fired81,2483 + enum http_return_codes {http_return_codes85,2547 + account_created = 201,account_created86,2575 + conflict_with_alternates = 409,conflict_with_alternates87,2604 + too_many_requests = 429too_many_requests88,2642 + class extension {extension91,2679 + explicit extension(uint32_t capacity)extension94,2712 + bool increment() {increment99,2804 + std::string to_string() {to_string134,3765 + static const uint32_t max_allowed_name_length = 13;max_allowed_name_length139,3965 + bool increment(char& c) {increment143,4144 + const uint32_t max_capacity;max_capacity158,4465 + std::string ext;ext159,4500 + const char init_char = '1';init_char160,4523 + results_pair find_alternates(const std::string& new_account_name) {find_alternates163,4564 + results_pair create_account(const std::string& new_account_name, const fc::crypto::public_keycreate_account195,5995 + results_pair create_faucet_account(const std::string& body) {create_faucet_account249,8590 + const chainbase::database& database() {database254,8953 + appbase::application& _app;_app262,9161 + boost::asio::deadline_timer _timer;_timer263,9192 + bool _blocking_accounts = false;_blocking_accounts264,9231 + static const uint32_t _default_create_interval_msec;_default_create_interval_msec266,9268 + uint32_t _create_interval_msec;_create_interval_msec267,9324 + static const uint32_t _default_create_alternates_to_return;_default_create_alternates_to_return268,9359 + static const std::string _default_create_account_name;_default_create_account_name269,9422 + chain::account_name _create_account_name;_create_account_name270,9480 + static const key_pair _default_key_pair;_default_key_pair271,9525 + fc::crypto::private_key _create_account_private_key;_create_account_private_key272,9569 + public_key_type _create_account_public_key;_create_account_public_key273,9625 +const uint32_t faucet_testnet_plugin_impl::_default_create_interval_msec = 1000;_default_create_interval_msec276,9676 +const uint32_t faucet_testnet_plugin_impl::_default_create_alternates_to_return = 3;_default_create_alternates_to_return277,9757 +const std::string faucet_testnet_plugin_impl::_default_create_account_name = "faucet";_default_create_account_name278,9842 +const key_pair faucet_testnet_plugin_impl::_default_key_pair = {"EOS6MRyAjQq8ud7hVNYcfnVPJqcVpsc_default_key_pair280,10016 +faucet_testnet_plugin::faucet_testnet_plugin()faucet_testnet_plugin283,10195 +faucet_testnet_plugin::~faucet_testnet_plugin() {}~faucet_testnet_plugin288,10291 +void faucet_testnet_plugin::set_program_options(options_description&, options_description& cfg) set_program_options290,10343 +void faucet_testnet_plugin::plugin_initialize(const variables_map& options) {plugin_initialize301,11136 +void faucet_testnet_plugin::plugin_startup() {plugin_startup314,11845 +void faucet_testnet_plugin::plugin_shutdown() {plugin_shutdown320,12038 + +plugins/faucet_testnet_plugin/CMakeLists.txt,62 +add_library( faucet_testnet_pluginfaucet_testnet_plugin2,63 + +plugins/faucet_testnet_plugin/include/eosio/faucet_testnet_plugin/faucet_testnet_plugin.hpp,137 +namespace eosio {eosio9,154 +class faucet_testnet_plugin : public appbase::plugin {faucet_testnet_plugin13,199 + +plugins/CMakeLists.txt,115 +set(CPACK_DEBIAN_PACKAGE_DEPENDS ${CPACK_DEBIAN_PACKAGE_DEPENDS} PARENT_SCOPE)CPACK_DEBIAN_PACKAGE_DEPENDS24,758 + +plugins/COMMUNITY.md,84 +# Community Plugin ListCommunity Plugin List1,0 +## DISCLAIMER:DISCLAIMER:17,820 + +plugins/eosio-make_new_plugin.sh,0 + +plugins/db_size_api_plugin/db_size_api_plugin.cpp,338 +namespace eosio {eosio9,172 +static appbase::abstract_plugin& _db_size_api_plugin = app().register_plugin_db_size_api_plugin11,191 +#define CALL(CALL15,316 +#define INVOKE_R_V(INVOKE_R_V27,802 +void db_size_api_plugin::plugin_startup() {plugin_startup31,892 +db_size_stats db_size_api_plugin::get() {get38,1064 + +plugins/db_size_api_plugin/CMakeLists.txt,56 +add_library( db_size_api_plugindb_size_api_plugin2,60 + +plugins/db_size_api_plugin/include/eosio/db_size_api_plugin/db_size_api_plugin.hpp,775 +namespace eosio {eosio12,203 +struct db_size_index_count {db_size_index_count16,248 + string index;index17,277 + uint64_t row_count;row_count18,296 +struct db_size_stats {db_size_stats21,323 + uint64_t free_bytes;free_bytes22,346 + uint64_t used_bytes;used_bytes23,389 + uint64_t size;size24,432 + vector indices;indices25,469 +class db_size_api_plugin : public plugin {db_size_api_plugin28,513 + virtual void set_program_options(options_description& cli, options_description& cfg) overrideset_program_options39,979 + void plugin_initialize(const variables_map& vm) {}plugin_initialize40,1079 + void plugin_shutdown() {}plugin_shutdown42,1159 + +plugins/test_control_plugin/test_control_plugin.cpp,2707 +namespace fc { class variant; }fc9,167 +namespace eosio {eosio11,200 +static appbase::abstract_plugin& _test_control_plugin = app().register_plugin _accepted_block_connection;_accepted_block_connection29,879 + fc::optional _irreversible_block_connection;_irreversible_block_connection30,959 + chain::controller& _chain;_chain31,1043 + account_name _producer;_producer32,1074 + int32_t _where_in_sequence;_where_in_sequence33,1108 + int32_t _producer_sequence;_producer_sequence34,1151 + bool _clean_producer_sequence;_clean_producer_sequence35,1194 + std::atomic_bool _track_lib;_track_lib36,1243 + std::atomic_bool _track_head;_track_head37,1278 +void test_control_plugin_impl::connect() {connect40,1318 + _chain.irreversible_block.connect( [&]( const chain::block_state_ptr& bs ) {__anondba4a3ef010242,1404 + _chain.accepted_block.connect( [&]( const chain::block_state_ptr& bs ) {__anondba4a3ef020246,1583 +void test_control_plugin_impl::disconnect() {disconnect51,1716 +void test_control_plugin_impl::applied_irreversible_block(const chain::block_state_ptr& bsp) {applied_irreversible_block56,1847 +void test_control_plugin_impl::accepted_block(const chain::block_state_ptr& bsp) {accepted_block61,2002 +void test_control_plugin_impl::retrieve_next_block_state(const chain::block_state_ptr& bsp) {retrieve_next_block_state66,2146 +void test_control_plugin_impl::process_next_block_state(const chain::block_header_state& bhs) {process_next_block_state75,2528 +void test_control_plugin_impl::kill_on_lib(account_name prod, uint32_t where_in_seq) {kill_on_lib92,3240 +void test_control_plugin_impl::kill_on_head(account_name prod, uint32_t where_in_seq) {kill_on_head101,3523 +test_control_plugin::test_control_plugin()test_control_plugin110,3807 +void test_control_plugin::set_program_options(options_description& cli, options_description& cfgset_program_options114,3855 +void test_control_plugin::plugin_initialize(const variables_map& options) {plugin_initialize117,3958 +void test_control_plugin::plugin_startup() {plugin_startup120,4037 +void test_control_plugin::plugin_shutdown() {plugin_shutdown125,4188 +namespace test_control_apis {test_control_apis129,4258 +read_write::kill_node_on_producer_results read_write::kill_node_on_producer(const read_write::kikill_node_on_producer130,4288 + +plugins/test_control_plugin/CMakeLists.txt,58 +add_library( test_control_plugintest_control_plugin3,62 + +plugins/test_control_plugin/include/eosio/test_control_plugin/test_control_plugin.hpp,985 +namespace fc { class variant; }fc11,200 +namespace eosio {eosio13,233 + typedef std::shared_ptr test_control_ptr;test_control_ptr15,279 +namespace test_control_apis {test_control_apis17,357 +struct empty{};empty18,387 +class read_write {read_write20,404 + read_write(const test_control_ptr& test_control)read_write23,435 + struct kill_node_on_producer_params {kill_node_on_producer_params26,522 + name producer;producer27,566 + uint32_t where_in_sequence;where_in_sequence28,595 + bool based_on_lib;based_on_lib29,633 + using kill_node_on_producer_results = empty;kill_node_on_producer_results31,675 + test_control_ptr my;my35,848 +class test_control_plugin : public plugin {test_control_plugin42,915 + test_control_apis::read_write get_read_write_api() const { return test_control_apis::read_wriget_read_write_api58,1578 + test_control_ptr my;my61,1694 + +plugins/chain_interface/include/eosio/chain/plugin_interface.hpp,2838 +namespace eosio { namespace chain { namespace plugin_interface {eosio15,290 +namespace eosio { namespace chain { namespace plugin_interface {chain15,290 +namespace eosio { namespace chain { namespace plugin_interface {plugin_interface15,290 + using next_function = std::function&)>;next_function20,441 + namespace channels {channels24,572 + using pre_accepted_block = channel_decl;get_head_block_id39,1698 + using get_lib_block_id = method_decl;get_lib_block_id40,1790 + using get_last_irreversible_block_number = method_decl;block47,2039 + using transaction = channel_decl {login_plugin14,259 + struct start_login_request_params {start_login_request_params26,617 + chain::time_point_sec expiration_time;expiration_time27,656 + struct start_login_request_results {start_login_request_results30,708 + chain::public_key_type server_ephemeral_pub_key;server_ephemeral_pub_key31,748 + struct finalize_login_request_params {finalize_login_request_params34,810 + chain::public_key_type server_ephemeral_pub_key;server_ephemeral_pub_key35,852 + chain::public_key_type client_ephemeral_pub_key;client_ephemeral_pub_key36,907 + chain::permission_level permission;permission37,962 + std::string data;data38,1004 + std::vector signatures;signatures39,1028 + struct finalize_login_request_results {finalize_login_request_results42,1088 + chain::sha256 digest{};digest43,1131 + flat_set recovered_keys{};recovered_keys44,1161 + bool permission_satisfied = false;permission_satisfied45,1218 + std::string error{};error46,1259 + struct do_not_use_gen_r1_key_params {};do_not_use_gen_r1_key_params49,1293 + struct do_not_use_gen_r1_key_results {do_not_use_gen_r1_key_results51,1337 + chain::public_key_type pub_key;pub_key52,1379 + chain::private_key_type priv_key;priv_key53,1417 + struct do_not_use_sign_params {do_not_use_sign_params56,1464 + chain::private_key_type priv_key;priv_key57,1499 + chain::bytes data;data58,1539 + struct do_not_use_sign_results {do_not_use_sign_results61,1571 + chain::signature_type sig;sig62,1607 + struct do_not_use_get_secret_params {do_not_use_get_secret_params65,1647 + chain::public_key_type pub_key;pub_key66,1688 + chain::private_key_type priv_key;priv_key67,1726 + struct do_not_use_get_secret_results {do_not_use_get_secret_results70,1773 + chain::sha512 secret;secret71,1815 + +plugins/login_plugin/login_plugin.cpp,2141 +namespace eosio {eosio11,222 +static appbase::abstract_plugin& _login_plugin = app().register_plugin();_login_plugin13,241 +struct login_request {login_request17,354 + chain::private_key_type server_ephemeral_priv_key{};server_ephemeral_priv_key18,377 + chain::public_key_type server_ephemeral_pub_key{};server_ephemeral_pub_key19,433 + chain::time_point_sec expiration_time;expiration_time20,487 +struct login_request_pub_key_index {};login_request_pub_key_index23,533 +struct login_request_time_index {};login_request_time_index24,572 +using login_request_container = boost::multi_index_container<login_request_container26,609 +class login_plugin_impl {login_plugin_impl35,1059 + login_request_container requests{};requests37,1094 + uint32_t max_login_requests = 1000000;max_login_requests38,1133 + uint32_t max_login_timeout = 60;max_login_timeout39,1175 + void expire_requests() {expire_requests41,1212 +login_plugin::login_plugin() : my{std::make_unique()} {}login_plugin49,1468 +login_plugin::~login_plugin() {}~login_plugin50,1544 +void login_plugin::set_program_options(options_description&, options_description& cfg) {set_program_options52,1578 +void login_plugin::plugin_initialize(const variables_map& options) {plugin_initialize60,1975 +#define CALL(CALL65,2199 +void login_plugin::plugin_startup() {plugin_startup79,3657 +void login_plugin::plugin_shutdown() {}plugin_shutdown90,4012 +login_plugin::start_login_request(const login_plugin::start_login_request_params& params) {start_login_request93,4095 +login_plugin::finalize_login_request(const login_plugin::finalize_login_request_params& params) finalize_login_request109,5013 + auto noop_checktime = [] {};__anon12dbb4210102135,6087 +login_plugin::do_not_use_gen_r1_key(const login_plugin::do_not_use_gen_r1_key_params& params) {do_not_use_gen_r1_key149,6581 +login_plugin::do_not_use_sign(const login_plugin::do_not_use_sign_params& params) {do_not_use_sign155,6814 +login_plugin::do_not_use_get_secret(const login_plugin::do_not_use_get_secret_params& params) {do_not_use_get_secret160,7013 + +plugins/net_api_plugin/net_api_plugin.cpp,741 +namespace eosio { namespace detail {eosio14,261 +namespace eosio { namespace detail {detail14,261 + struct net_api_plugin_empty {};net_api_plugin_empty15,298 +namespace eosio {eosio20,388 +static appbase::abstract_plugin& _net_api_plugin = app().register_plugin();_net_api_plugin22,407 +#define CALL(CALL26,524 +#define INVOKE_R_R(INVOKE_R_R38,1011 +#define INVOKE_R_R_R_R(INVOKE_R_R_R_R41,1151 +#define INVOKE_R_V(INVOKE_R_V45,1430 +#define INVOKE_V_R(INVOKE_V_R48,1518 +#define INVOKE_V_R_R(INVOKE_V_R_R52,1695 +#define INVOKE_V_V(INVOKE_V_V57,1972 +void net_api_plugin::plugin_startup() {plugin_startup62,2098 +void net_api_plugin::plugin_initialize(const variables_map& options) {plugin_initialize85,3099 + +plugins/net_api_plugin/CMakeLists.txt,48 +add_library( net_api_pluginnet_api_plugin2,56 + +plugins/net_api_plugin/include/eosio/net_api_plugin/net_api_plugin.hpp,284 +namespace eosio {eosio12,199 +class net_api_plugin : public plugin {net_api_plugin16,244 + virtual void set_program_options(options_description& cli, options_description& cfg) overrideset_program_options27,660 + void plugin_shutdown() {}plugin_shutdown30,838 + +plugins/wallet_api_plugin/CMakeLists.txt,54 +add_library( wallet_api_pluginwallet_api_plugin2,59 + +plugins/wallet_api_plugin/wallet_api_plugin.cpp,852 +namespace eosio { namespace detail {eosio15,317 +namespace eosio { namespace detail {detail15,317 + struct wallet_api_plugin_empty {};wallet_api_plugin_empty16,354 +namespace eosio {eosio21,450 +static appbase::abstract_plugin& _wallet_api_plugin = app().register_plugin()_wallet_api_plugin23,469 +#define CALL(CALL27,592 +#define INVOKE_R_R(INVOKE_R_R39,1079 +#define INVOKE_R_R_R(INVOKE_R_R_R42,1219 +#define INVOKE_R_R_R_R(INVOKE_R_R_R_R46,1459 +#define INVOKE_R_V(INVOKE_R_V50,1738 +#define INVOKE_V_R(INVOKE_V_R53,1826 +#define INVOKE_V_R_R(INVOKE_V_R_R57,2006 +#define INVOKE_V_R_R_R(INVOKE_V_R_R_R62,2286 +#define INVOKE_V_V(INVOKE_V_V67,2605 +void wallet_api_plugin::plugin_startup() {plugin_startup72,2734 +void wallet_api_plugin::plugin_initialize(const variables_map& options) {plugin_initialize109,4679 + +plugins/wallet_api_plugin/include/eosio/wallet_api_plugin/wallet_api_plugin.hpp,293 +namespace eosio {eosio12,205 +class wallet_api_plugin : public plugin {wallet_api_plugin16,250 + virtual void set_program_options(options_description& cli, options_description& cfg) overrideset_program_options27,705 + void plugin_shutdown() {}plugin_shutdown30,883 + +plugins/bnet_plugin/CMakeLists.txt,42 +add_library( bnet_pluginbnet_plugin2,53 + +plugins/bnet_plugin/include/eosio/bnet_plugin/bnet_plugin.hpp,333 +namespace fc { class variant; }fc10,157 +namespace eosio {eosio12,190 + typedef shared_ptr bnet_ptr;bnet_ptr20,372 + typedef shared_ptr bnet_const_ptr;bnet_const_ptr21,428 +class bnet_plugin : public plugin {bnet_plugin35,902 + bnet_ptr my;my49,1295 + +plugins/bnet_plugin/bnet_plugin.cpp,18673 +using tcp = boost::asio::ip::tcp;tcp66,2723 +namespace eosio {eosio69,2799 + static appbase::abstract_plugin& _bnet_plugin = app().register_plugin();_bnet_plugin72,2844 +namespace fc {fc76,2957 +const fc::string logger_name("bnet_plugin");logger_name80,3043 +fc::logger plugin_logger;plugin_logger81,3088 +std::string peer_log_format;peer_log_format82,3114 +#define peer_dlog(peer_dlog84,3144 +#define peer_ilog(peer_ilog90,3422 +#define peer_wlog(peer_wlog96,3698 +#define peer_elog(peer_elog102,3974 +struct hello {hello119,4501 + public_key_type peer_id;peer_id120,4516 + string network_version;network_version121,4558 + string agent;agent122,4608 + string protocol_version = "1.0.1";protocol_version123,4648 + string user;user124,4709 + string password;password125,4748 + chain_id_type chain_id;chain_id126,4791 + bool request_transactions = false;request_transactions127,4834 + uint32_t last_irr_block_num = 0;last_irr_block_num128,4897 + vector pending_block_ids;pending_block_ids129,4954 +struct hello_extension_irreversible_only {};hello_extension_irreversible_only133,5170 +using hello_extension = fc::static_variant;hello_extension137,5283 +struct trx_notice {trx_notice143,5500 + vector signed_trx_id; ///< hash of trx + sigssigned_trx_id144,5520 +struct block_notice {block_notice153,5792 + vector block_ids;block_ids154,5814 +struct ping {ping159,5896 + fc::time_point sent;sent160,5910 + fc::sha256 code;code161,5934 + uint32_t lib; ///< the last irreversible blocklib162,5958 +struct pong {pong166,6056 + fc::time_point sent;sent167,6070 + fc::sha256 code;code168,6094 +using bnet_message = fc::static_variantsession203,7086 + enum session_state {session_state206,7166 + hello_state,hello_state207,7195 + sending_state,sending_state208,7219 + idle_stateidle_state209,7245 + struct block_status {block_status212,7279 + block_status( block_id_type i, bool kby_peer, bool rfrom_peer)block_status213,7309 + bool known_by_peer = false; ///< we sent block to peer or peer sent us noticknown_by_peer220,7524 + bool received_from_peer = false; ///< peer sent us this block and considers full received_from_peer221,7622 + block_id_type id; ///< the block id;id222,7730 + uint32_t block_num()const { return block_header::num_from_id(id); }block_num227,7964 + > block_status_index;block_status_index235,8361 + struct transaction_status {transaction_status238,8393 + time_point received;received239,8429 + time_point expired; /// 5 seconds from last acceptedexpired240,8477 + transaction_id_type id;id241,8557 + transaction_metadata_ptr trx;trx242,8599 + void mark_known_by_peer() { received = fc::time_point::maximum(); trx.reset(); }mark_known_by_peer244,8643 + bool known_by_peer()const { return received == fc::time_point::maximum(); }known_by_peer245,8736 + > transaction_status_index;transaction_status_index254,9298 + block_status_index _block_status;_block_status256,9335 + transaction_status_index _transaction_status;_transaction_status257,9384 + const uint32_t _max_block_status_range = 2048; // limit tracked block_status _max_block_status_range258,9439 + public_key_type _local_peer_id;_local_peer_id260,9550 + uint32_t _local_lib = 0;_local_lib261,9593 + block_id_type _local_lib_id;_local_lib_id262,9648 + uint32_t _local_head_block_num = 0;_local_head_block_num263,9690 + block_id_type _local_head_block_id; /// the last block id received on local channel_local_head_block_id264,9745 + public_key_type _remote_peer_id;_remote_peer_id267,9844 + uint32_t _remote_lib = 0;_remote_lib268,9888 + block_id_type _remote_lib_id;_remote_lib_id269,9943 + bool _remote_request_trx = false;_remote_request_trx270,9986 + bool _remote_request_irreversible_only = false;_remote_request_irreversible_only271,10045 + uint32_t _last_sent_block_num = 0;_last_sent_block_num273,10116 + block_id_type _last_sent_block_id; /// the id of the last block sent_last_sent_block_id274,10171 + bool _recv_remote_hello = false;_recv_remote_hello275,10253 + bool _sent_remote_hello = false;_sent_remote_hello276,10312 + fc::sha256 _current_code;_current_code279,10373 + fc::time_point _last_recv_ping_time = fc::time_point::now();_last_recv_ping_time280,10415 + ping _last_recv_ping;_last_recv_ping281,10488 + ping _last_sent_ping;_last_sent_ping282,10532 + int _session_num = 0;_session_num285,10578 + session_state _state = hello_state;_state286,10667 + tcp::resolver _resolver;_resolver287,10760 + bnet_ptr _net_plugin;_net_plugin288,10842 + boost::asio::io_service& _ios;_ios289,10926 + unique_ptr> _ws;_ws290,11003 + boost::asio::strand< boost::asio::io_context::executor_type> _strand;_strand291,11079 + boost::asio::io_service& _app_ios;_app_ios292,11159 + methods::get_block_by_number::method_type& _get_block_by_number;_get_block_by_number294,11241 + string _peer;_peer297,11316 + string _remote_host;_remote_host298,11394 + string _remote_port;_remote_port299,11479 + vector _out_buffer;_out_buffer301,11565 + boost::beast::flat_buffer _in_buffer;_in_buffer303,11730 + flat_set _block_header_notices;_block_header_notices304,11812 + fc::optional _logger_variant;_logger_variant305,11905 + int next_session_id()const {next_session_id308,11994 + explicit session( tcp::socket socket, bnet_ptr net_plug )session316,12200 + explicit session( boost::asio::io_context& ioc, bnet_ptr net_plug )session335,12876 + void set_socket_options() {set_socket_options352,13437 + void run() {run368,14210 + void run( const string& peer ) {run376,14527 + void on_resolve( boost::system::error_code ec,on_resolve393,15216 + void on_connect( boost::system::error_code ec ) {on_connect405,15836 + void on_handshake( boost::system::error_code ec ) {on_handshake417,16316 + void on_accepted_transaction( transaction_metadata_ptr t ) {on_accepted_transaction438,17347 + _transaction_status.modify( itr, [&]( auto& stat ) {__anon464914810102443,17620 + void purge_transaction_cache() {purge_transaction_cache463,18287 + void on_new_lib( block_state_ptr s ) {on_new_lib477,18789 + void on_bad_block( signed_block_ptr b ) {on_bad_block502,19607 + void on_accepted_block_header( const block_state_ptr& s ) {on_accepted_block_header518,20263 + void on_accepted_block( const block_state_ptr& s ) {on_accepted_block535,21100 + void async_get_pending_block_ids( L&& callback ) {async_get_pending_block_ids571,22568 + _app_ios.post( [self = shared_from_this(),callback]{__anon464914810202573,22705 + [callback,ids,lib](){__anon464914810302589,23427 + void async_get_block_num( uint32_t blocknum, L&& callback ) {async_get_block_num597,23672 + _app_ios.post( [self = shared_from_this(), blocknum, callback]{__anon464914810402598,23742 + [callback,sblockptr](){__anon464914810502610,24296 + void send( const bnet_message& msg ) { try {send620,24477 + void send( const bnet_message& msg, const T& ex ) { try {send629,24786 + void send() { try {send640,25279 + void mark_block_status( const block_id_type& id, bool known_by_peer, bool recv_from_peermark_block_status653,25868 + _block_status.modify( itr, [&]( auto& item ) {__anon464914810602664,26700 + void maybe_send_next_message() {maybe_send_next_message676,27125 + bool send_block_notice() {send_block_notice694,27842 + bool send_pong() {send_pong707,28260 + bool send_ping() {send_ping716,28525 + bool is_known_by_peer( block_id_type id ) {is_known_by_peer744,30048 + void clear_expired_trx() {clear_expired_trx750,30253 + bool send_next_trx() { try {send_next_trx759,30551 + idx.modify( start, [&]( auto& stat ) {__anon464914810702770,30926 + void on_async_get_block( const signed_block_ptr& nextblock ) {on_async_get_block781,31180 + bool send_next_block() {send_next_block833,33122 + [self=shared_from_this()]( auto sblockptr ) {__anon464914810802845,33584 + void on_fail( boost::system::error_code ec, const char* what ) {on_fail852,33758 + void on_accept( boost::system::error_code ec ) {on_accept862,34137 + void do_read() {do_read871,34332 + void on_read( boost::system::error_code ec, std::size_t bytes_transferred ) {on_read881,34754 + void wait_on_app() {wait_on_app921,36162 + boost::asio::bind_executor( _strand, [self=shared_from_this()]{ self->do_read();__anon464914810902923,36233 + void on_message( const bnet_message& msg, fc::datastream& ds ) {on_message927,36360 + void on( const block_notice& notice ) {on960,37780 + void on( const ping& p ) {on970,38175 + void on( const pong& p ) {on977,38391 + void do_goodbye( const string& reason ) {do_goodbye986,38712 + void on( const signed_block_ptr& b ) {on997,39021 + void mark_block_transactions_known_by_peer( const signed_block_ptr& b ) {mark_block_transactions_known_by_peer1013,39646 + bool mark_transaction_known_by_peer( const transaction_id_type& id ) {mark_transaction_known_by_peer1027,40271 + _transaction_status.modify( itr, [&]( auto& stat ) {__anon464914810a021030,40456 + void on( const packed_transaction_ptr& p ) {on1044,40904 + void on_write( boost::system::error_code ec, std::size_t bytes_transferred ) {on_write1065,41763 + void status( const string& msg ) {status1077,42208 + const fc::variant_object& get_logger_variant() {get_logger_variant1081,42391 + class listener : public std::enable_shared_from_this {listener1109,43384 + tcp::acceptor _acceptor;_acceptor1111,43465 + tcp::socket _socket;_socket1112,43506 + bnet_ptr _net_plugin;_net_plugin1113,43545 + listener( boost::asio::io_context& ioc, tcp::endpoint endpoint, bnet_ptr np )listener1116,43602 + void run() {run1133,44240 + void do_accept() {do_accept1138,44393 + _acceptor.async_accept( _socket, [self=shared_from_this()]( auto ec ){ self->on_accep__anon464914810b021139,44420 + void on_fail( boost::system::error_code ec, const char* what ) {on_fail1142,44539 + class bnet_plugin_impl : public std::enable_shared_from_this {bnet_plugin_impl1150,44752 + const private_key_type _peer_pk = fc::crypto::private_key::generate(); /// one time ra_peer_pk1154,44890 + public_key_type _peer_id = _peer_pk.get_public_key();_peer_id1155,45020 + string _bnet_endpoint_address = "0.0.0._bnet_endpoint_address1156,45091 + uint16_t _bnet_endpoint_port = 4321;_bnet_endpoint_port1157,45191 + bool _request_trx = true;_request_trx1158,45283 + bool _follow_irreversible = false;_follow_irreversible1159,45368 + std::vector _connect_to_peers; /// list of p_connect_to_peers1161,45463 + std::vector _socket_threads;_socket_threads1162,45578 + int32_t _num_threads = 1;_num_threads1163,45659 + std::unique_ptr _ioc; // lifetime guarded by sha_ioc1165,45742 + std::shared_ptr _listener;_listener1166,45866 + std::shared_ptr _timer; // only access on app_timer1167,45941 + std::map > _sessions; // only access on app_sessions1168,46049 + channels::irreversible_block::channel_type::handle _on_irb_handle;_on_irb_handle1170,46158 + channels::accepted_block::channel_type::handle _on_accepted_block_handle;_on_accepted_block_handle1171,46238 + channels::accepted_block_header::channel_type::handle _on_accepted_block_header_handle_on_accepted_block_header_handle1172,46329 + channels::rejected_block::channel_type::handle _on_bad_block_handle;_on_bad_block_handle1173,46427 + channels::accepted_transaction::channel_type::handle _on_appled_trx_handle;_on_appled_trx_handle1174,46513 + void async_add_session( std::weak_ptr wp ) {async_add_session1176,46601 + app().get_io_service().post( [wp,this]{__anon464914810c021177,46664 + void on_session_close( const session* s ) {on_session_close1184,46846 + void for_each_session( Call callback ) {for_each_session1192,47165 + app().get_io_service().post([this, callback = callback] {__anon464914810d021193,47215 + [ses, cb = callback]() { cb(ses); }__anon464914810e021198,47497 + void on_accepted_transaction( transaction_metadata_ptr trx ) {on_accepted_transaction1205,47650 + for_each_session( [trx]( auto ses ){ ses->on_accepted_transaction( trx ); } );__anon464914810f021207,47780 + void on_irreversible_block( block_state_ptr s ) {on_irreversible_block1214,48028 + for_each_session( [s]( auto ses ){ ses->on_new_lib( s ); } );__anon4649148110021215,48087 + void on_accepted_block( block_state_ptr s ) {on_accepted_block1224,48433 + _ioc->post( [s,this] { /// post this to the thread pool because packing can be inten__anon4649148111021225,48488 + for_each_session( [s]( auto ses ){ ses->on_accepted_block( s ); } );__anon4649148112021226,48589 + void on_accepted_block_header( block_state_ptr s ) {on_accepted_block_header1230,48701 + _ioc->post( [s,this] { /// post this to the thread pool because packing can be inten__anon4649148113021231,48763 + for_each_session( [s]( auto ses ){ ses->on_accepted_block_header( s ); } );__anon4649148114021232,48864 + void on_bad_block( signed_block_ptr s ) {on_bad_block1244,49279 + for_each_session( [s]( auto ses ) { ses->on_bad_block(s); } );__anon4649148115021245,49330 + void on_reconnect_peers() {on_reconnect_peers1248,49418 + void start_reconnect_timer() {start_reconnect_timer1273,50310 + _timer->async_wait([=](const boost::system::error_code& ec) {__anon4649148116021277,50595 + void listener::on_accept( boost::system::error_code ec ) {on_accept1285,50779 + bnet_plugin::bnet_plugin()bnet_plugin1309,51556 + bnet_plugin::~bnet_plugin() {~bnet_plugin1313,51639 + void bnet_plugin::set_program_options(options_description& cli, options_description& cfg) {set_program_options1316,51678 + void bnet_plugin::plugin_initialize(const variables_map& options) {plugin_initialize1335,53155 + void bnet_plugin::plugin_startup() {plugin_startup1369,54505 + .subscribe( [this]( transaction_metadata_ptr t ){__anon4649148117021379,55003 + .subscribe( [this]( block_state_ptr s ){__anon4649148118021384,55270 + .subscribe( [this]( block_state_ptr s ){__anon4649148119021389,55533 + .subscribe( [this]( block_state_ptr s ){__anon464914811a021394,55833 + .subscribe( [this]( signed_block_ptr b ){__anon464914811b021399,56121 + my->_socket_threads.emplace_back( [&ioc]{ wlog( "start thread" ); ioc.run(); wlog( "end__anon464914811c021425,57182 + void bnet_plugin::plugin_shutdown() {plugin_shutdown1436,57535 + my->for_each_session([](auto ses){__anon464914811d021446,57795 + my->for_each_session([](auto ses){__anon464914811e021459,58095 + session::~session() {~session1467,58332 + _app_ios.post( [netp,ses=this]{__anon464914811f021470,58468 + void session::do_hello() {do_hello1476,58596 + async_get_pending_block_ids( [self = shared_from_this() ]( const vector& id__anon4649148120021478,58710 + void session::check_for_redundant_connection() {check_for_redundant_connection1496,59531 + app().get_io_service().post( [self=shared_from_this()]{__anon4649148121021497,59583 + self->_net_plugin->for_each_session( [self]( auto ses ){__anon4649148122021498,59644 + void session::on( const hello& hi, fc::datastream& ds ) {on1506,59878 + +plugins/chain_api_plugin/CMakeLists.txt,52 +add_library( chain_api_pluginchain_api_plugin2,58 + +plugins/chain_api_plugin/include/eosio/chain_api_plugin/chain_api_plugin.hpp,117 +namespace eosio {eosio12,240 + class chain_api_plugin : public plugin {chain_api_plugin17,348 + +plugins/chain_api_plugin/chain_api_plugin.cpp,1206 +namespace eosio {eosio10,181 +static appbase::abstract_plugin& _chain_api_plugin = app().register_plugin();_chain_api_plugin12,200 +class chain_api_plugin_impl {chain_api_plugin_impl16,321 + chain_api_plugin_impl(controller& db)chain_api_plugin_impl18,359 + controller& db;db21,419 +chain_api_plugin::chain_api_plugin(){}chain_api_plugin25,443 +chain_api_plugin::~chain_api_plugin(){}~chain_api_plugin26,482 +void chain_api_plugin::set_program_options(options_description&, options_description&) {}set_program_options28,523 +void chain_api_plugin::plugin_initialize(const variables_map&) {}plugin_initialize29,613 +struct async_result_visitor : public fc::visitor {async_result_visitor31,680 + std::string operator()(const T& v) const {operator ()33,768 +#define CALL(CALL38,860 +#define CALL_ASYNC(CALL_ASYNC51,1488 +#define CHAIN_RO_CALL(CHAIN_RO_CALL71,2402 +#define CHAIN_RW_CALL(CHAIN_RW_CALL72,2529 +#define CHAIN_RO_CALL_ASYNC(CHAIN_RO_CALL_ASYNC73,2657 +#define CHAIN_RW_CALL_ASYNC(CHAIN_RW_CALL_ASYNC74,2822 +void chain_api_plugin::plugin_startup() {plugin_startup76,2989 +void chain_api_plugin::plugin_shutdown() {}plugin_shutdown112,4613 + +plugins/http_client_plugin/CMakeLists.txt,56 +add_library( http_client_pluginhttp_client_plugin2,60 + +plugins/http_client_plugin/include/eosio/http_client_plugin/http_client_plugin.hpp,234 +namespace eosio {eosio9,152 + class http_client_plugin : public appbase::pluginhttp_client_plugin13,225 + http_client& get_client() {get_client26,647 + std::unique_ptr my;my31,732 + +plugins/http_client_plugin/http_client_plugin.cpp,551 +namespace eosio {eosio10,225 +http_client_plugin::http_client_plugin():my(new http_client()){}http_client_plugin12,244 +http_client_plugin::~http_client_plugin(){}~http_client_plugin13,309 +void http_client_plugin::set_program_options(options_description&, options_description& cfg) {set_program_options15,354 +void http_client_plugin::plugin_initialize(const variables_map& options) {plugin_initialize25,945 +void http_client_plugin::plugin_startup() {plugin_startup57,2405 +void http_client_plugin::plugin_shutdown() {plugin_shutdown61,2453 + +plugins/template_plugin/template_plugin.cpp,704 +namespace eosio {eosio7,114 + static appbase::abstract_plugin& _template_plugin = app().register_plugin();_template_plugin8,132 +class template_plugin_impl {template_plugin_impl10,230 +template_plugin::template_plugin():my(new template_plugin_impl()){}template_plugin14,274 +template_plugin::~template_plugin(){}~template_plugin15,342 +void template_plugin::set_program_options(options_description&, options_description& cfg) {set_program_options17,381 +void template_plugin::plugin_initialize(const variables_map& options) {plugin_initialize24,619 +void template_plugin::plugin_startup() {plugin_startup33,814 +void template_plugin::plugin_shutdown() {plugin_shutdown37,886 + +plugins/template_plugin/CMakeLists.txt,50 +add_library( template_plugintemplate_plugin2,57 + +plugins/template_plugin/include/eosio/template_plugin/template_plugin.hpp,119 +namespace eosio {eosio8,109 +class template_plugin : public appbase::plugin {template_plugin15,254 + +plugins/net_plugin/CMakeLists.txt,40 +add_library( net_pluginnet_plugin2,53 + +plugins/net_plugin/include/eosio/net_plugin/protocol.hpp,4829 +namespace eosio {eosio10,158 + typedef std::chrono::system_clock::duration::rep tstamp;tstamp15,350 + struct chain_size_message {chain_size_message17,411 + uint32_t last_irreversible_block_num = 0;last_irreversible_block_num18,442 + block_id_type last_irreversible_block_id;last_irreversible_block_id19,508 + uint32_t head_num = 0;head_num20,569 + block_id_type head_id;head_id21,616 + struct handshake_message {handshake_message24,665 + uint16_t network_version = 0; ///< incremental value above a computed banetwork_version25,695 + chain_id_type chain_id; ///< used to identify chainchain_id26,794 + fc::sha256 node_id; ///< used to identify peers and prevent self-connectnode_id27,865 + chain::public_key_type key; ///< authentication key; may be a producer or peer key, orkey28,960 + tstamp time;time29,1063 + fc::sha256 token; ///< digest of time to prove we own the private key of ttoken30,1102 + chain::signature_type sig; ///< signature for the digestsig31,1211 + string p2p_address;p2p_address32,1279 + uint32_t last_irreversible_block_num = 0;last_irreversible_block_num33,1325 + block_id_type last_irreversible_block_id;last_irreversible_block_id34,1391 + uint32_t head_num = 0;head_num35,1452 + block_id_type head_id;head_id36,1499 + string os;os37,1541 + string agent;agent38,1578 + int16_t generation;generation39,1618 + enum go_away_reason {go_away_reason43,1671 + no_reason, ///< no reason to go awayno_reason44,1695 + self, ///< the connection is to itselfself45,1736 + duplicate, ///< the connection is redundantduplicate46,1779 + wrong_chain, ///< the peer's chain id doesn't matchwrong_chain47,1827 + wrong_version, ///< the peer's network version doesn't matchwrong_version48,1883 + forked, ///< the peer's irreversible blocks are differentforked49,1948 + unlinkable, ///< the peer sent a block we couldn't useunlinkable50,2010 + bad_transaction, ///< the peer sent a transaction that failed verificationbad_transaction51,2069 + validation, ///< the peer sent a block that failed validationvalidation52,2148 + benign_other, ///< reasons such as a timeout. not fatal but warrant resettingbenign_other53,2214 + fatal_other, ///< a catch-all for errors we don't have discriminatedfatal_other54,2296 + authentication ///< peer failed authenicatioauthentication55,2369 + constexpr auto reason_str( go_away_reason rsn ) {reason_str58,2424 + struct go_away_message {go_away_message76,3141 + go_away_message (go_away_reason r = no_reason) : reason(r), node_id() {}go_away_message77,3168 + go_away_reason reason;reason78,3245 + fc::sha256 node_id; ///< for duplicate notificationnode_id79,3272 + struct time_message {time_message82,3334 + tstamp org; //!< origin timestamporg83,3358 + tstamp rec; //!< receive timestamprec84,3411 + tstamp xmt; //!< transmit timestampxmt85,3465 + mutable tstamp dst; //!< destination timestampdst86,3520 + enum id_list_modes {id_list_modes89,3584 + none,none90,3607 + catch_up,catch_up91,3617 + last_irr_catch_up,last_irr_catch_up92,3631 + normalnormal93,3654 + constexpr auto modes_str( id_list_modes m ) {modes_str96,3671 + struct select_ids {select_ids107,3971 + select_ids () : mode(none),pending(0),ids() {}select_ids108,3993 + id_list_modes mode;mode109,4044 + uint32_t pending;pending110,4069 + vector ids;ids111,4097 + bool empty () const { return (mode == none || ids.empty()); }empty112,4121 + using ordered_txn_ids = select_ids;ordered_txn_ids115,4203 + using ordered_blk_ids = select_ids;ordered_blk_ids116,4262 + struct notice_message {notice_message118,4316 + notice_message () : known_trx(), known_blocks() {}notice_message119,4342 + ordered_txn_ids known_trx;known_trx120,4397 + ordered_blk_ids known_blocks;known_blocks121,4428 + struct request_message {request_message124,4468 + request_message () : req_trx(), req_blocks() {}request_message125,4495 + ordered_txn_ids req_trx;req_trx126,4547 + ordered_blk_ids req_blocks;req_blocks127,4576 + struct sync_request_message {sync_request_message130,4614 + uint32_t start_block;start_block131,4647 + uint32_t end_block;end_block132,4675 + using net_message = static_variantnet_plugin20,439 + +plugins/net_plugin/net_plugin.cpp,24916 +namespace fc {fc34,965 +namespace eosio {eosio38,1051 + static appbase::abstract_plugin& _net_plugin = app().register_plugin();_net_plugin39,1069 + using connection_ptr = std::shared_ptr;connection_ptr59,1573 + using connection_wptr = std::weak_ptr;connection_wptr60,1628 + using socket_ptr = std::shared_ptr;socket_ptr62,1683 + using net_message_ptr = shared_ptr;net_message_ptr64,1736 + struct node_transaction_state {node_transaction_state66,1789 + transaction_id_type id;id67,1824 + time_point_sec expires; /// time after which this may be purged.expires68,1854 + packed_transaction packed_txn;packed_txn71,2061 + vector serialized_txn; /// the received raw bundleserialized_txn72,2098 + uint32_t block_num = 0; /// block transaction was included inblock_num73,2164 + uint32_t true_block = 0; /// used to reset block_uum when request is 0true_block74,2239 + uint16_t requests = 0; /// the number of "in flight" requests for this txnrequests75,2323 + struct update_in_flight {update_in_flight78,2418 + int32_t incr;incr79,2447 + update_in_flight (int32_t delta) : incr (delta) {}update_in_flight80,2467 + void operator() (node_transaction_state& nts) {operator () 81,2524 + } incr_in_flight(1), decr_in_flight(-1);incr_in_flight93,2943 + } incr_in_flight(1), decr_in_flight(-1);decr_in_flight93,2943 + node_transaction_index;node_transaction_index119,3733 + class net_plugin_impl {net_plugin_impl121,3761 + unique_ptr acceptor;acceptor123,3799 + tcp::endpoint listen_endpoint;listen_endpoint124,3848 + string p2p_address;p2p_address125,3904 + uint32_t max_client_count = 0;max_client_count126,3956 + uint32_t max_nodes_per_host = 1;max_nodes_per_host127,4017 + uint32_t num_clients = 0;num_clients128,4080 + vector supplied_peers;supplied_peers130,4137 + vector allowed_peers; ///< peer keys allowed to connectallowed_peers131,4192 + chain::private_key_type> private_keys; ///< overlapping with producer keys, also private_keys133,4319 + enum possible_connections : char {possible_connections135,4451 + None = 0,None136,4492 + Producers = 1 << 0,Producers137,4511 + Specified = 1 << 1,Specified138,4543 + Any = 1 << 2Any139,4575 + possible_connections allowed_connections{None};allowed_connections141,4615 + std::set< connection_ptr > connections;connections145,4741 + bool done = false;done146,4793 + unique_ptr< sync_manager > sync_master;sync_master147,4846 + unique_ptr< dispatch_manager > dispatcher;dispatcher148,4898 + unique_ptr connector_check;connector_check150,4950 + unique_ptr transaction_check;transaction_check151,5011 + unique_ptr keepalive_timer;keepalive_timer152,5074 + boost::asio::steady_timer::duration connector_period;connector_period153,5135 + boost::asio::steady_timer::duration txn_exp_period;txn_exp_period154,5197 + boost::asio::steady_timer::duration resp_expected_period;resp_expected_period155,5257 + boost::asio::steady_timer::duration keepalive_interval{std::chrono::seconds{32}};keepalive_interval156,5323 + int max_cleanup_time_ms = 0;max_cleanup_time_ms157,5413 + const std::chrono::system_clock::duration peer_authentication_interval{std::chrono::secondpeer_authentication_interval159,5475 + bool network_version_match = false;network_version_match161,5674 + chain_id_type chain_id;chain_id162,5741 + fc::sha256 node_id;node_id163,5787 + string user_agent_name;user_agent_name165,5833 + chain_plugin* chain_plug = nullptr;chain_plug166,5886 + int started_sessions = 0;started_sessions167,5944 + node_transaction_index local_txns;local_txns169,6003 + shared_ptr resolver;resolver171,6052 + bool use_socket_read_watermark = false;use_socket_read_watermark173,6099 + channels::transaction_ack::channel_type::handle incoming_transaction_ack_subscription;incoming_transaction_ack_subscription175,6171 + const fc::string logger_name("net_plugin_impl");logger_name265,10155 + fc::logger logger;logger266,10207 + std::string peer_log_format;peer_log_format267,10229 +#define peer_dlog(peer_dlog269,10262 +#define peer_ilog(peer_ilog275,10526 +#define peer_wlog(peer_wlog281,10788 +#define peer_elog(peer_elog287,11050 + inline enum_type& operator|=(enum_type& lhs, const enum_type& rhs)operator |=295,11412 + using T = std::underlying_type_t ;T297,11487 + static net_plugin_impl *my_impl;my_impl301,11631 + constexpr auto def_send_buffer_size_mb = 4;def_send_buffer_size_mb306,11715 + constexpr auto def_send_buffer_size = 1024*1024*def_send_buffer_size_mb;def_send_buffer_size307,11766 + constexpr auto def_max_clients = 25; // 0 for unlimited clientsdef_max_clients308,11846 + constexpr auto def_max_nodes_per_host = 1;def_max_nodes_per_host309,11917 + constexpr auto def_conn_retry_wait = 30;def_conn_retry_wait310,11967 + constexpr auto def_txn_expire_wait = std::chrono::seconds(3);def_txn_expire_wait311,12015 + constexpr auto def_resp_expected_wait = std::chrono::seconds(5);def_resp_expected_wait312,12084 + constexpr auto def_sync_fetch_span = 100;def_sync_fetch_span313,12156 + constexpr uint32_t def_max_just_send = 1500; // roughly 1 "mtu"def_max_just_send314,12205 + constexpr bool large_msg_notify = false;large_msg_notify315,12273 + constexpr auto message_header_size = 4;message_header_size317,12322 + constexpr uint16_t net_version_base = 0x04b5;net_version_base331,13107 + constexpr uint16_t net_version_range = 106;net_version_range332,13156 + constexpr uint16_t proto_base = 0;proto_base337,13352 + constexpr uint16_t proto_explicit_sync = 1;proto_explicit_sync338,13390 + constexpr uint16_t net_version = proto_explicit_sync;net_version340,13438 + struct transaction_state {transaction_state349,13683 + transaction_id_type id;id350,13713 + bool is_known_by_peer = false; ///< true if we sent or received this trx tois_known_by_peer351,13743 + bool is_noticed_to_peer = false; ///< have we sent peer notice we know it (is_noticed_to_peer352,13879 + uint32_t block_num = 0; ///< the block number the transaction was included inblock_num353,14010 + time_point_sec expires;expires354,14105 + time_point requested_time; /// in case we fetch large trxrequested_time355,14140 + struct update_txn_expiry {update_txn_expiry358,14220 + time_point_sec new_expiry;new_expiry359,14250 + update_txn_expiry(time_point_sec e) : new_expiry(e) {}update_txn_expiry360,14283 + void operator() (transaction_state& ts) {operator () 361,14344 + > transaction_state_index;transaction_state_index378,14949 + struct peer_block_state {peer_block_state383,15003 + block_id_type id;id384,15032 + uint32_t block_num;block_num385,15056 + bool is_known;is_known386,15087 + bool is_noticed;is_noticed387,15117 + time_point requested_time;requested_time388,15149 + struct update_request_time {update_request_time391,15192 + void operator() (struct transaction_state &ts) {operator () 392,15224 + void operator () (struct eosio::peer_block_state &bs) {operator () 395,15335 + } set_request_time;set_request_time398,15453 + > peer_block_state_index;peer_block_state_index406,15815 + struct update_known_by_peer {update_known_by_peer409,15849 + void operator() (eosio::peer_block_state& bs) {operator () 410,15882 + void operator() (transaction_state& ts) {operator () 413,15973 + } set_is_known;set_is_known416,16066 + struct update_block_num {update_block_num419,16087 + uint32_t new_bnum;new_bnum420,16116 + update_block_num(uint32_t bnum) : new_bnum(bnum) {}update_block_num421,16141 + void operator() (node_transaction_state& nts) {operator () 422,16199 + void operator() (transaction_state& ts) {operator () 430,16406 + void operator() (peer_block_state& pbs) {operator () 433,16496 + struct sync_state {sync_state441,16639 + sync_state(uint32_t start = 0, uint32_t end = 0, uint32_t last_acted = 0)sync_state442,16662 + uint32_t start_block;start_block446,16861 + uint32_t end_block;end_block447,16893 + uint32_t last; ///< last sent or receivedlast448,16923 + time_point start_time; ///< time request made or receivedstart_time449,16975 + struct handshake_initializer {handshake_initializer452,17048 + class connection : public std::enable_shared_from_this {connection456,17143 + peer_block_state_index blk_state;blk_state464,17363 + transaction_state_index trx_state;trx_state465,17404 + optional peer_requested; // this peer is requesting info from uspeer_requested466,17445 + socket_ptr socket;socket467,17532 + fc::message_buffer<1024*1024> pending_message_buffer;pending_message_buffer469,17571 + fc::optional outstanding_read_bytes;outstanding_read_bytes470,17634 + vector blk_buffer;blk_buffer471,17697 + struct queued_write {queued_write473,17740 + std::shared_ptr> buff;buff474,17768 + std::function callback;callback475,17813 + deque write_queue;write_queue477,17901 + deque out_queue;out_queue478,17944 + fc::sha256 node_id;node_id479,17985 + handshake_message last_handshake_recv;last_handshake_recv480,18024 + handshake_message last_handshake_sent;last_handshake_sent481,18075 + int16_t sent_handshake_count = 0;sent_handshake_count482,18126 + bool connecting = false;connecting483,18182 + bool syncing = false;syncing484,18232 + uint16_t protocol_version = 0;protocol_version485,18279 + string peer_addr;peer_addr486,18332 + unique_ptr response_expected;response_expected487,18373 + optional pending_fetch;pending_fetch488,18436 + go_away_reason no_retry = no_reason;no_retry489,18483 + block_id_type fork_head;fork_head490,18534 + uint32_t fork_head_num = 0;fork_head_num491,18574 + optional last_req;last_req492,18622 + connection_status get_status()const {get_status494,18665 + tstamp org{0}; //!< originate timestamporg508,19055 + tstamp rec{0}; //!< receive timestamprec509,19134 + tstamp dst{0}; //!< destination timestampdst510,19211 + tstamp xmt{0}; //!< transmit timestampxmt511,19292 + double offset{0}; //!< peer offsetoffset514,19394 + static const size_t ts_buffer_size{32};ts_buffer_size516,19466 + char ts[ts_buffer_size]; //!< working buffer for makingts517,19523 + tstamp get_time()get_time546,20599 + fc::optional _logger_variant;_logger_variant591,22266 + const fc::variant_object& get_logger_variant() {get_logger_variant592,22322 + struct msgHandler : public fc::visitor {msgHandler617,23232 + net_plugin_impl &impl;impl618,23282 + connection_ptr c;c619,23311 + msgHandler( net_plugin_impl &imp, connection_ptr conn) : impl(imp), c(conn) {}msgHandler620,23335 + void operator()(const T &msg) constoperator ()623,23449 + class sync_manager {sync_manager629,23553 + enum stages {stages631,23589 + lib_catchup,lib_catchup632,23609 + head_catchup,head_catchup633,23631 + in_syncin_sync634,23654 + uint32_t sync_known_lib_num;sync_known_lib_num637,23681 + uint32_t sync_last_requested_num;sync_last_requested_num638,23722 + uint32_t sync_next_expected_num;sync_next_expected_num639,23768 + uint32_t sync_req_span;sync_req_span640,23813 + connection_ptr source;source641,23849 + stages state;state642,23878 + chain_plugin* chain_plug = nullptr;chain_plug644,23907 + class dispatch_manager {dispatch_manager665,24806 + uint32_t just_send_it_max = 0;just_send_it_max667,24845 + vector req_trx;req_trx669,24883 + std::multimap received_blocks;received_blocks671,24927 + std::multimap received_transactions;received_transactions672,24995 + connection::connection( string endpoint )connection688,25700 + connection::connection( socket_ptr s )connection712,26362 + connection::~connection() {}~connection736,26932 + void connection::initialize() {initialize738,26965 + bool connection::connected() {connected744,27144 + bool connection::current() {current748,27243 + void connection::reset() {reset752,27321 + void connection::flush_queues() {flush_queues758,27437 + void connection::close() {close762,27507 + void connection::txn_send_pending(const vector &ids) {txn_send_pending785,28156 + [tx_id=tx->id](boost::system::error_code ec, std::size_t ) {__anon248c207d0102799,28781 + void connection::txn_send(const vector &ids) {txn_send813,29402 + [t](boost::system::error_code ec, std::size_t ) {__anon248c207d0202820,29803 + void connection::blk_send_branch() {blk_send_branch833,30360 + void connection::blk_send(const vector &ids) {blk_send914,33093 + void connection::stop_send() {stop_send945,34284 + void connection::send_handshake( ) {send_handshake949,34347 + char* connection::convert_tstamp(const tstamp& t)convert_tstamp957,34692 + void connection::send_time() {send_time966,34991 + void connection::send_time(const time_message& msg) {send_time975,35172 + void connection::queue_write(std::shared_ptr> buff,queue_write983,35362 + void connection::do_queue_write() {do_queue_write991,35709 + boost::asio::async_write(*socket, bufs, [c](boost::system::error_code ec, std::size_t w) {__anon248c207d03021007,36283 + void connection::cancel_sync(go_away_reason reason) {cancel_sync1052,38091 + bool connection::enqueue_sync_block() {enqueue_sync_block1070,38717 + void connection::enqueue( const net_message &m, bool trigger_send ) {enqueue1091,39338 + [weak_this, close_after_send](boost::system::error_code ec, std::size_t ) {__anon248c207d04021109,40102 + void connection::cancel_wait() {cancel_wait1123,40804 + void connection::sync_wait( ) {sync_wait1128,40913 + response_expected->async_wait( [c]( boost::system::error_code ec){__anon248c207d05021131,41068 + void connection::fetch_wait( ) {fetch_wait1142,41380 + response_expected->async_wait( [c]( boost::system::error_code ec){__anon248c207d06021145,41536 + void connection::sync_timeout( boost::system::error_code ec ) {sync_timeout1156,41849 + const string connection::peer_name() {peer_name1167,42207 + void connection::fetch_timeout( boost::system::error_code ec ) {fetch_timeout1177,42469 + void connection::request_sync_blocks (uint32_t start, uint32_t end) {request_sync_blocks1193,43074 + bool connection::process_next_message(net_plugin_impl& impl, uint32_t message_length) {process_next_message1199,43252 + bool connection::add_peer_block(const peer_block_state &entry) {add_peer_block1230,44531 + sync_manager::sync_manager( uint32_t req_span )sync_manager1250,45119 + constexpr auto sync_manager::stage_str(stages s ) {stage_str1262,45487 + void sync_manager::set_state(stages newstate) {set_state1271,45729 + bool sync_manager::is_active(connection_ptr c) {is_active1279,45975 + void sync_manager::reset_lib_num(connection_ptr c) {reset_lib_num1289,46413 + bool sync_manager::sync_required( ) {sync_required1303,46857 + void sync_manager::request_next_chunk( connection_ptr conn ) {request_next_chunk1311,47319 + void sync_manager::send_handshakes ()send_handshakes1394,50692 + void sync_manager::start_sync( connection_ptr c, uint32_t target) {start_sync1403,50873 + void sync_manager::reassign_fetch(connection_ptr c, go_away_reason reason) {reassign_fetch1427,51759 + void sync_manager::recv_handshake (connection_ptr c, const handshake_message &msg) {recv_handshake1438,52176 + void sync_manager::verify_catchup(connection_ptr c, uint32_t num, block_id_type id) {verify_catchup1512,55006 + void sync_manager::recv_notice (connection_ptr c, const notice_message &msg) {recv_notice1537,55914 + void sync_manager::rejected_block (connection_ptr c, uint32_t blk_num) {rejected_block1554,56568 + void sync_manager::recv_block (connection_ptr c, const block_id_type &blk_id, uint32_t blk_nurecv_block1564,56936 + void dispatch_manager::bcast_block (const signed_block &bsum) {bcast_block1611,58616 + my_impl->send_all(pending_notify, [&skips, pbstate](connection_ptr c) -> bool {__anon248c207d07021633,59650 + void dispatch_manager::recv_block (connection_ptr c, const block_id_type& id, uint32_t bnum) recv_block1656,60391 + void dispatch_manager::rejected_block (const block_id_type& id) {rejected_block1671,60938 + void dispatch_manager::bcast_transaction (const packed_transaction& trx) {bcast_transaction1677,61197 + my_impl->send_all( trx, [id, &skips, trx_expiration](connection_ptr c) -> bool {__anon248c207d08021718,62687 + my_impl->send_all(pending_notify, [id, &skips, trx_expiration](connection_ptr c) -> boo__anon248c207d09021739,63634 + void dispatch_manager::recv_transaction (connection_ptr c, const transaction_id_type& id) {recv_transaction1758,64388 + void dispatch_manager::rejected_transaction (const transaction_id_type& id) {rejected_transaction1772,64867 + void dispatch_manager::recv_notice (connection_ptr c, const notice_message& msg, bool generatrecv_notice1778,65150 + void dispatch_manager::retry_fetch( connection_ptr c ) {retry_fetch1848,68017 + void net_plugin_impl::connect( connection_ptr c ) {connect1898,69744 + tcp::resolver::iterator endpoint_itr ){__anon248c207d0a021928,70852 + void net_plugin_impl::connect( connection_ptr c, tcp::resolver::iterator endpoint_itr ) {connect1940,71468 + c->socket->async_connect( current_endpoint, [weak_conn, endpoint_itr, this] ( const boost:__anon248c207d0b021949,71819 + bool net_plugin_impl::start_session( connection_ptr con ) {start_session1971,72627 + void net_plugin_impl::start_listen_loop( ) {start_listen_loop1993,73397 + acceptor->async_accept( *socket, [socket,this]( boost::system::error_code ec ) {__anon248c207d0c021995,73534 + void net_plugin_impl::start_read_message( connection_ptr conn ) {start_read_message2057,76127 + auto completion_handler = [minimum_read](boost::system::error_code ec, std::size_t byte__anon248c207d0d022074,76820 + [this,weak_conn]( boost::system::error_code ec, std::size_t bytes_transferred ) {__anon248c207d0e022084,77290 + size_t net_plugin_impl::count_open_sockets() constcount_open_sockets2170,81953 + void net_plugin_impl::send_all( const net_message &msg, VerifierFunc verify) {send_all2182,82197 + bool net_plugin_impl::is_valid( const handshake_message &msg) {is_valid2190,82414 + void net_plugin_impl::handle_message( connection_ptr c, const chain_size_message &msg) {handle_message2215,83490 + void net_plugin_impl::handle_message( connection_ptr c, const handshake_message &msg) {handle_message2220,83640 + void net_plugin_impl::handle_message( connection_ptr c, const go_away_message &msg ) {handle_message2327,87991 + void net_plugin_impl::handle_message(connection_ptr c, const time_message &msg) {handle_message2340,88446 + void net_plugin_impl::handle_message( connection_ptr c, const notice_message &msg) {handle_message2373,89533 + void net_plugin_impl::handle_message( connection_ptr c, const request_message &msg) {handle_message2440,91708 + void net_plugin_impl::handle_message( connection_ptr c, const sync_request_message &msg) {handle_message2470,92455 + void net_plugin_impl::handle_message( connection_ptr c, const packed_transaction &msg) {handle_message2480,92799 + chain_plug->accept_transaction(msg, [=](const static_variantasync_wait( [this, from_connection](boost::system::error_code ec) {__anon248c207d10022585,97400 + void net_plugin_impl::start_txn_timer() {start_txn_timer2596,97801 + transaction_check->async_wait( [this](boost::system::error_code ec) {__anon248c207d11022598,97906 + void net_plugin_impl::ticker() {ticker2609,98226 + keepalive_timer->async_wait ([this](boost::system::error_code ec) {__anon248c207d12022611,98324 + void net_plugin_impl::start_monitors() {start_monitors2624,98722 + void net_plugin_impl::expire_txns() {expire_txns2631,99040 + void net_plugin_impl::connection_monitor(std::weak_ptr from_connection) {connection_monitor2652,100031 + void net_plugin_impl::close( connection_ptr c ) {close2677,100970 + void net_plugin_impl::accepted_block_header(const block_state_ptr& block) {accepted_block_header2689,101271 + void net_plugin_impl::accepted_block(const block_state_ptr& block) {accepted_block2693,101420 + void net_plugin_impl::irreversible_block(const block_state_ptr&block) {irreversible_block2698,101608 + void net_plugin_impl::accepted_transaction(const transaction_metadata_ptr& md) {accepted_transaction2702,101753 + void net_plugin_impl::applied_transaction(const transaction_trace_ptr& txn) {applied_transaction2707,101959 + void net_plugin_impl::accepted_confirmation(const header_confirmation& head) {accepted_confirmation2711,102108 + void net_plugin_impl::transaction_ack(const std::pair net_plugin::status( const string& host )const {status3099,120480 + vector net_plugin::connections()const {connections3106,120706 + connection_ptr net_plugin_impl::find_connection( string host )const {find_connection3114,120983 + uint16_t net_plugin_impl::to_protocol_version (uint16_t v) {to_protocol_version3120,121180 + +plugins/http_plugin/CMakeLists.txt,42 +add_library( http_pluginhttp_plugin2,53 + +plugins/http_plugin/http_plugin.cpp,8905 +namespace eosio {eosio29,701 + static appbase::abstract_plugin& _http_plugin = app().register_plugin();_http_plugin31,720 + static http_plugin_defaults current_http_plugin_defaults;current_http_plugin_defaults47,1145 + void http_plugin::set_defaults(const http_plugin_defaults config) {set_defaults49,1207 + namespace detail {detail53,1329 + struct asio_with_stub_log : public websocketpp::config::asio {asio_with_stub_log56,1376 + typedef asio_with_stub_log type;type57,1445 + typedef asio base;base58,1488 + typedef base::concurrency_type concurrency_type;concurrency_type60,1518 + typedef base::request_type request_type;request_type62,1578 + typedef base::response_type response_type;response_type63,1629 + typedef base::message_type message_type;message_type65,1683 + typedef base::con_msg_manager_type con_msg_manager_type;con_msg_manager_type66,1734 + typedef base::endpoint_msg_manager_type endpoint_msg_manager_type;endpoint_msg_manager_type67,1801 + typedef websocketpp::log::stub elog_type;elog_type69,1879 + typedef websocketpp::log::stub alog_type;alog_type70,1931 + typedef base::rng_type rng_type;rng_type72,1984 + struct transport_config : public base::transport_config {transport_config74,2028 + typedef type::concurrency_type concurrency_type;concurrency_type75,2096 + typedef type::alog_type alog_type;alog_type76,2159 + typedef type::elog_type elog_type;elog_type77,2208 + typedef type::request_type request_type;request_type78,2257 + typedef type::response_type response_type;response_type79,2312 + typedef T socket_type;socket_type80,2369 + transport_type;transport_type84,2495 + static const long timeout_open_handshake = 0;timeout_open_handshake86,2526 + struct asio_local_with_stub_log : public websocketpp::config::asio {asio_local_with_stub_log89,2592 + typedef asio_local_with_stub_log type;type90,2667 + typedef asio base;base91,2716 + typedef base::concurrency_type concurrency_type;concurrency_type93,2746 + typedef base::request_type request_type;request_type95,2806 + typedef base::response_type response_type;response_type96,2857 + typedef base::message_type message_type;message_type98,2911 + typedef base::con_msg_manager_type con_msg_manager_type;con_msg_manager_type99,2962 + typedef base::endpoint_msg_manager_type endpoint_msg_manager_type;endpoint_msg_manager_type100,3029 + typedef websocketpp::log::stub elog_type;elog_type102,3107 + typedef websocketpp::log::stub alog_type;alog_type103,3159 + typedef base::rng_type rng_type;rng_type105,3212 + struct transport_config : public base::transport_config {transport_config107,3256 + typedef type::concurrency_type concurrency_type;concurrency_type108,3324 + typedef type::alog_type alog_type;alog_type109,3387 + typedef type::elog_type elog_type;elog_type110,3436 + typedef type::request_type request_type;request_type111,3485 + typedef type::response_type response_type;response_type112,3540 + typedef websocketpp::transport::asio::basic_socket::local_endpoint socket_type;socket_type113,3597 + typedef websocketpp::transport::asio::local_endpoint transport_type;transport_type116,3705 + static const long timeout_open_handshake = 0;timeout_open_handshake118,3803 + using websocket_server_type = websocketpp::server;websocket_local_server_type123,4010 + using websocket_server_tls_type = websocketpp::server;ssl_context_ptr125,4243 + static bool verbose_http_errors = false;verbose_http_errors127,4340 + class http_plugin_impl {http_plugin_impl129,4385 + map url_handlers;url_handlers131,4427 + optional listen_endpoint;listen_endpoint132,4475 + string access_control_allow_origin;access_control_allow_origin133,4526 + string access_control_allow_headers;access_control_allow_headers134,4589 + string access_control_max_age;access_control_max_age135,4653 + bool access_control_allow_credentials = false;access_control_allow_credentials136,4711 + size_t max_body_size;max_body_size137,4787 + websocket_server_type server;server139,4837 + optional https_listen_endpoint;https_listen_endpoint141,4880 + string https_cert_chain;https_cert_chain142,4937 + string https_key;https_key143,4989 + websocket_server_tls_type https_server;https_server145,5035 + optional unix_endpoint;unix_endpoint147,5085 + websocket_local_server_type unix_server;unix_server148,5158 + bool validate_host;validate_host150,5209 + set valid_hosts;valid_hosts151,5258 + string unix_socket_path_option_name = "unix-socket-path";unix_socket_path_option_name153,5306 + string http_server_address_option_name = "http-server-address";http_server_address_option_name154,5395 + string https_server_address_option_name = "https-server-address";https_server_address_option_name155,5487 + bool host_port_is_valid( const std::string& header_host_port, const string& endpoint_lohost_port_is_valid157,5581 + bool host_is_valid( const std::string& host, const string& endpoint_local_host_port, bohost_is_valid161,5849 + ssl_context_ptr on_tls_init(websocketpp::connection_hdl hdl) {on_tls_init176,6745 + static void handle_exception(typename websocketpp::server::connection_ptr con) {handle_exception212,8661 + bool allow_host(const typename T::request_type& req, typename websocketpp::server::callow_host244,10575 + void handle_http_request(typename websocketpp::server::connection_ptr con) {handle_http_request258,11312 + handler_itr->second( resource, body, [con]( auto code, auto&& body ) {__anonc9a8d9af0102289,12733 + void create_server_for_endpoint(const tcp::endpoint& ep, websocketpp::server()->notifier([this](const string& __anonc9a8d9af0302375,17248 + ("access-control-allow-headers", bpo::value()->notifier([this](const string&__anonc9a8d9af0402381,17628 + ("access-control-max-age", bpo::value()->notifier([this](const string& v) {__anonc9a8d9af0502387,18014 + bpo::bool_switch()->notifier([this](bool v) {__anonc9a8d9af0602394,18419 + void http_plugin::plugin_initialize(const variables_map& options) {plugin_initialize406,19462 + void http_plugin::plugin_startup() {plugin_startup481,23479 + my->unix_server.set_http_handler([&](connection_hdl hdl) {__anonc9a8d9af0702507,24516 + my->https_server.set_tls_init_handler([this](websocketpp::connection_hdl hdl) -> ssl__anonc9a8d9af0802526,25331 + void http_plugin::plugin_shutdown() {plugin_shutdown546,26082 + void http_plugin::add_handler(const string& url, const url_handler& handler) {add_handler553,26289 + app().get_io_service().post([=](){__anonc9a8d9af0902555,26417 + void http_plugin::handle_exception( const char *api_name, const char *call_name, const stringhandle_exception560,26536 + bool http_plugin::is_on_loopback() const {is_on_loopback601,29128 + bool http_plugin::is_secure() const {is_secure605,29351 + bool http_plugin::verbose_errors()const {verbose_errors609,29483 + +plugins/http_plugin/include/eosio/http_plugin/local_endpoint.hpp,6665 +namespace websocketpp {websocketpp15,332 +namespace transport {transport16,356 +namespace asio {asio17,378 +namespace basic_socket {basic_socket19,396 +class local_connection : public lib::enable_shared_from_this {local_connection21,422 + typedef local_connection type;type24,560 + typedef lib::shared_ptr ptr;ptr26,664 + typedef lib::asio::io_service* io_service_ptr;io_service_ptr29,764 + typedef lib::shared_ptr strand_ptr;strand_ptr31,882 + typedef lib::asio::local::stream_protocol::socket socket_type;socket_type33,996 + typedef lib::shared_ptr socket_ptr;socket_ptr35,1122 + explicit local_connection() : m_state(UNINITIALIZED) {local_connection37,1176 + ptr get_shared() {get_shared40,1242 + bool is_secure() const {is_secure44,1307 + lib::asio::local::stream_protocol::socket & get_socket() {get_socket48,1365 + lib::asio::local::stream_protocol::socket & get_next_layer() {get_next_layer52,1461 + lib::asio::local::stream_protocol::socket & get_raw_socket() {get_raw_socket56,1561 + std::string get_remote_endpoint(lib::error_code & ec) const {get_remote_endpoint60,1661 + void pre_init(init_handler callback) {pre_init64,1773 + void post_init(init_handler callback) {post_init75,2012 + lib::error_code init_asio (io_service_ptr service, strand_ptr, bool)init_asio79,2108 + void set_handle(connection_hdl hdl) {set_handle93,2493 + lib::asio::error_code cancel_socket() {cancel_socket97,2563 + void async_shutdown(socket::shutdown_handler h) {async_shutdown103,2697 + lib::error_code get_ec() const {get_ec109,2882 + lib::error_code translate_ec(ErrorCodeType) {translate_ec114,2998 + lib::error_code translate_ec(lib::error_code ec) {translate_ec118,3123 + enum state {state122,3212 + UNINITIALIZED = 0,UNINITIALIZED123,3229 + READY = 1,READY124,3256 + READING = 2READING125,3275 + socket_ptr m_socket;m_socket128,3303 + state m_state;m_state129,3337 + connection_hdl m_hdl;m_hdl131,3371 + socket_init_handler m_socket_init_handler;m_socket_init_handler132,3402 +class local_endpoint {local_endpoint135,3453 + typedef local_endpoint type;type138,3535 + typedef local_connection socket_con_type;socket_con_type141,3635 + typedef socket_con_type::ptr socket_con_ptr;socket_con_ptr144,3776 + explicit local_endpoint() {}local_endpoint146,3826 + bool is_secure() const {is_secure148,3860 +class local_endpoint : public config::socket_type {local_endpoint160,4089 + typedef local_endpoint type;type163,4199 + typedef typename config::concurrency_type concurrency_type;concurrency_type166,4280 + typedef typename config::socket_type socket_type;socket_type168,4378 + typedef typename config::elog_type elog_type;elog_type170,4473 + typedef typename config::alog_type alog_type;alog_type172,4565 + typedef typename socket_type::socket_con_type socket_con_type;socket_con_type175,4664 + typedef typename socket_con_type::ptr socket_con_ptr;socket_con_ptr177,4799 + typedef asio::connection transport_con_type;transport_con_type181,4967 + typedef typename transport_con_type::ptr transport_con_ptr;transport_con_ptr184,5153 + typedef lib::asio::io_service * io_service_ptr;io_service_ptr187,5278 + typedef lib::shared_ptr acceptor_ptr;acceptor_ptr189,5390 + typedef lib::shared_ptr timer_ptr;timer_ptr191,5506 + typedef lib::shared_ptr work_ptr;work_ptr193,5632 + explicit local_endpoint()local_endpoint196,5746 + ~local_endpoint() {~local_endpoint203,5924 + local_endpoint (local_endpoint && src)local_endpoint226,6745 + bool is_secure() const {is_secure244,7335 + void init_asio(io_service_ptr ptr, lib::error_code & ec) {init_asio257,7859 + void init_asio(io_service_ptr ptr) {init_asio284,8874 + void set_tcp_pre_init_handler(tcp_init_handler h) {set_tcp_pre_init_handler300,9359 + void set_tcp_init_handler(tcp_init_handler h) {set_tcp_init_handler314,9848 + void set_tcp_post_init_handler(tcp_init_handler h) {set_tcp_post_init_handler329,10385 + lib::asio::io_service & get_io_service() {get_io_service344,10939 + void listen(lib::asio::local::stream_protocol::endpoint const & ep, lib::error_code & ec)listen356,11373 + void listen(lib::asio::local::stream_protocol::endpoint const & ep) {listen412,13393 + void stop_listening(lib::error_code & ec) {stop_listening426,13820 + void stop_listening() {stop_listening448,14501 + bool is_listening() const {is_listening458,14749 + std::size_t run() {run463,14890 + std::size_t run_one() {run_one471,15067 + void stop() {stop476,15206 + std::size_t poll() {poll481,15325 + std::size_t poll_one() {poll_one486,15462 + void reset() {reset491,15604 + bool stopped() const {stopped496,15728 + void start_perpetual() {start_perpetual512,16301 + void stop_perpetual() {stop_perpetual526,16802 + timer_ptr set_timer(long duration, timer_handler callback) {set_timer542,17450 + void handle_timer(timer_ptr, timer_handler callback,handle_timer570,18248 + void async_accept(transport_con_ptr tcon, accept_handler callback,async_accept593,19114 + void async_accept(transport_con_ptr tcon, accept_handler callback) {async_accept632,20359 + void init_logging(alog_type* a, elog_type* e) {init_logging648,21116 + void handle_accept(accept_handler callback, lib::asio::error_code const & handle_accept653,21215 + void handle_connect_timeout(transport_con_ptr tcon, timer_ptr,handle_connect_timeout682,22187 + void handle_connect(transport_con_ptr tcon, timer_ptr con_timer,handle_connect705,22922 + lib::error_code init(transport_con_ptr tcon) {init742,24173 + void log_err(log::level l, char const * msg, error_type const & ec) {log_err758,24689 + enum state {state764,24902 + UNINITIALIZED = 0,UNINITIALIZED765,24919 + READY = 1,READY766,24946 + LISTENING = 2LISTENING767,24965 + tcp_init_handler m_tcp_pre_init_handler;m_tcp_pre_init_handler771,25011 + tcp_init_handler m_tcp_post_init_handler;m_tcp_post_init_handler772,25059 + io_service_ptr m_io_service;m_io_service775,25134 + acceptor_ptr m_acceptor;m_acceptor776,25172 + work_ptr m_work;m_work777,25208 + elog_type* m_elog;m_elog779,25241 + alog_type* m_alog;m_alog780,25264 + state m_state;m_state783,25311 + +plugins/http_plugin/include/eosio/http_plugin/http_plugin.hpp,1530 +namespace eosio {eosio11,182 + using url_response_callback = std::function;url_response_callback20,415 + using url_handler = std::function;url_handler32,792 + using api_description = std::map;api_description41,1164 + struct http_plugin_defaults {http_plugin_defaults43,1223 + string address_config_prefix;address_config_prefix46,1379 + string default_unix_socket_path;default_unix_socket_path50,1607 + uint16_t default_http_port{0};default_http_port53,1773 + class http_plugin : public appbase::pluginhttp_plugin70,2463 + void add_api(const api_description& api) {add_api87,3035 + struct error_results {error_results107,3631 + uint16_t code;code108,3657 + string message;message109,3678 + struct error_info {error_info111,3701 + int64_t code;code112,3727 + string name;name113,3750 + string what;what114,3772 + struct error_detail {error_detail116,3795 + string message;message117,3826 + string file;file118,3854 + uint64_t line_number;line_number119,3879 + string method;method120,3913 + vector details;details123,3953 + static const uint8_t details_limit = 10;details_limit125,3993 + error_info() {};error_info127,4044 + error_info(const fc::exception& exc, bool include_log) {error_info129,4071 + error_info error;error148,4844 + +plugins/wallet_plugin/CMakeLists.txt,128 + set(SE_WALLET_SOURCES se_wallet.cpp macos_user_auth.m)SE_WALLET_SOURCES4,66 +add_library( wallet_pluginwallet_plugin17,555 + +plugins/wallet_plugin/wallet_manager.cpp,1961 +namespace eosio {eosio10,273 +namespace wallet {wallet11,291 +constexpr auto file_ext = ".wallet";file_ext13,311 +constexpr auto password_prefix = "PW";password_prefix14,348 +std::string gen_password() {gen_password16,388 +bool valid_filename(const string& name) {valid_filename22,506 +wallet_manager::wallet_manager() {wallet_manager28,800 +wallet_manager::~wallet_manager() {~wallet_manager36,973 +void wallet_manager::set_timeout(const std::chrono::seconds& t) {set_timeout42,1125 +void wallet_manager::check_timeout() {check_timeout50,1619 +std::string wallet_manager::create(const std::string& name) {create60,1867 +void wallet_manager::open(const std::string& name) {open94,3036 +std::vector wallet_manager::list_wallets() {list_wallets116,3888 +map wallet_manager::list_keys(const string& name, const stringlist_keys129,4206 +flat_set wallet_manager::get_public_keys() {get_public_keys141,4679 +void wallet_manager::lock_all() {lock_all157,5244 +void wallet_manager::lock(const std::string& name) {lock166,5449 +void wallet_manager::unlock(const std::string& name, const std::string& password) {unlock178,5747 +void wallet_manager::import_key(const std::string& name, const std::string& wif_key) {import_key191,6114 +void wallet_manager::remove_key(const std::string& name, const std::string& password, const std:remove_key203,6533 +string wallet_manager::create_key(const std::string& name, const std::string& key_type) {create_key216,7030 +wallet_manager::sign_transaction(const chain::signed_transaction& txn, const flat_set&& walletown_and_use_wallet272,8886 +void wallet_manager::initialize_lock() {initialize_lock278,9141 + +plugins/wallet_plugin/yubihsm_wallet.cpp,3180 +namespace eosio { namespace wallet {eosio20,457 +namespace eosio { namespace wallet {wallet20,457 +namespace detail {detail24,528 +struct yubihsm_api {yubihsm_api27,594 + struct func_ptr {func_ptr28,615 + explicit func_ptr(void* ptr) : _ptr(ptr) {}func_ptr29,636 + void* _ptr;_ptr33,789 + struct yubihsm_shlib {yubihsm_shlib36,814 + yubihsm_shlib() {yubihsm_shlib37,840 + ~yubihsm_shlib() {~yubihsm_shlib48,1185 + func_ptr operator[](const char* import_name) const {__anoncd99b8f3010252,1246 + yubihsm_shlib _shlib;_shlib63,1598 +#define LOAD_IMPORT(LOAD_IMPORT65,1624 +struct yubihsm_wallet_impl {yubihsm_wallet_impl86,2263 + using key_map_type = map;key_map_type87,2292 + yubihsm_wallet_impl(const string& ep, const uint16_t ak) : endpoint(ep), authkey(ak) {yubihsm_wallet_impl89,2348 + ~yubihsm_wallet_impl() {~yubihsm_wallet_impl95,2562 + bool is_locked() const {is_locked103,2771 + key_map_type::iterator populate_key_map_with_keyid(const uint16_t key_id) {populate_key_map_with_keyid107,2830 + void unlock(const string& password) {unlock129,3847 + void lock() {lock171,6087 + void prime_keepalive_timer() {prime_keepalive_timer187,6567 + keepalive_timer.async_wait([this](auto ec){__anoncd99b8f30202189,6696 + optional try_sign_digest(const digest_type d, const public_key_type public_ketry_sign_digest203,7056 + public_key_type create() {create241,8629 + yh_connector* connector = nullptr;connector262,9512 + yh_session* session = nullptr;session263,9550 + string endpoint;endpoint264,9584 + uint16_t authkey;authkey265,9604 + map _keys;_keys267,9626 + yh_capabilities authkey_caps;authkey_caps269,9667 + uint16_t authkey_domains;authkey_domains270,9700 + boost::asio::steady_timer keepalive_timer{appbase::app().get_io_service()};keepalive_timer272,9730 + fc::ec_key key = EC_KEY_new_by_curve_name(NID_X9_62_prime256v1);key273,9809 + yubihsm_api api;api275,9878 +yubihsm_wallet::yubihsm_wallet(const string& connector, const uint16_t authkey) : my(new detail:yubihsm_wallet281,9906 +yubihsm_wallet::~yubihsm_wallet() {~yubihsm_wallet284,10049 +private_key_type yubihsm_wallet::get_private_key(public_key_type pubkey) const {get_private_key287,10088 +bool yubihsm_wallet::is_locked() const {is_locked291,10287 +void yubihsm_wallet::lock() {lock294,10357 +void yubihsm_wallet::unlock(string password) {unlock299,10433 +void yubihsm_wallet::check_password(string password) {check_password302,10507 +void yubihsm_wallet::set_password(string password) {set_password305,10650 +map yubihsm_wallet::list_keys() {list_keys309,10799 +flat_set yubihsm_wallet::list_public_keys() {list_public_keys312,10984 +bool yubihsm_wallet::import_key(string wif_key) {import_key318,11189 +string yubihsm_wallet::create_key(string key_type) {create_key322,11353 +bool yubihsm_wallet::remove_key(string key) {remove_key326,11441 +optional yubihsm_wallet::try_sign_digest(const digest_type digest, const public_try_sign_digest331,11534 + +plugins/wallet_plugin/include/eosio/wallet_plugin/wallet_api.hpp,186 +namespace eosio { namespace wallet {eosio13,199 +namespace eosio { namespace wallet {wallet13,199 +class wallet_apiwallet_api15,237 + virtual ~wallet_api() {}~wallet_api18,267 + +plugins/wallet_plugin/include/eosio/wallet_plugin/wallet.hpp,625 +namespace eosio { namespace wallet {eosio16,265 +namespace eosio { namespace wallet {wallet16,265 +typedef uint16_t transaction_handle_type;transaction_handle_type18,303 +struct wallet_datawallet_data20,346 + vector cipher_keys; /** encrypted keys */cipher_keys22,367 +namespace detail {detail25,435 +class soft_wallet final : public wallet_apisoft_wallet33,630 + std::shared_ptr my;my186,6452 +struct plain_keys {plain_keys190,6535 + fc::sha512 checksum;checksum191,6555 + map keys;keys192,6606 + +plugins/wallet_plugin/include/eosio/wallet_plugin/se_wallet.hpp,254 +namespace eosio { namespace wallet {eosio9,146 +namespace eosio { namespace wallet {wallet9,146 +namespace detail {detail11,184 +class se_wallet final : public wallet_api {se_wallet15,229 + std::unique_ptr my;my38,1024 + +plugins/wallet_plugin/include/eosio/wallet_plugin/wallet_plugin.hpp,367 +namespace fc { class variant; }fc11,216 +namespace eosio {eosio13,249 + namespace wallet {wallet16,296 +class wallet_plugin : public plugin {wallet_plugin21,379 + void plugin_startup() {}plugin_startup34,902 + void plugin_shutdown() {}plugin_shutdown35,930 + std::unique_ptr wallet_manager_ptr;wallet_manager_ptr41,1040 + +plugins/wallet_plugin/include/eosio/wallet_plugin/wallet_manager.hpp,940 +namespace fc { class variant; }fc12,263 +namespace eosio {eosio14,296 +namespace wallet {wallet15,314 +class wallet_manager {wallet_manager21,613 + void set_dir(const boost::filesystem::path& p) {set_dir32,1024 + void set_timeout(int64_t secs) { set_timeout(std::chrono::seconds(secs)); }set_timeout44,1471 + using timepoint_t = std::chrono::time_point;timepoint_t137,6384 + std::map> wallets;wallets138,6459 + std::chrono::seconds timeout = std::chrono::seconds::max(); ///< how long to wait before calltimeout139,6522 + mutable timepoint_t timeout_time = timepoint_t::max(); ///< when to call lock_all()timeout_time140,6633 + boost::filesystem::path dir = ".";dir141,6720 + boost::filesystem::path lock_path = dir / "wallet.lock";lock_path142,6758 + std::unique_ptr wallet_dir_lock;wallet_dir_lock143,6818 + +plugins/wallet_plugin/include/eosio/wallet_plugin/yubihsm_wallet.hpp,269 +namespace eosio { namespace wallet {eosio9,146 +namespace eosio { namespace wallet {wallet9,146 +namespace detail {detail11,184 +class yubihsm_wallet final : public wallet_api {yubihsm_wallet15,234 + std::unique_ptr my;my38,1091 + +plugins/wallet_plugin/include/eosio/wallet_plugin/yubihsm.h,12383 +#define YUBIHSM_HYUBIHSM_H94,3376 +#define YH_CONTEXT_LEN YH_CONTEXT_LEN102,3523 +#define YH_HOST_CHAL_LEN YH_HOST_CHAL_LEN104,3597 +#define YH_MSG_BUF_SIZE YH_MSG_BUF_SIZE106,3661 +#define YH_KEY_LEN YH_KEY_LEN108,3724 +#define YH_VID YH_VID110,3767 +#define YH_PID YH_PID112,3811 +#define YH_CMD_RESP_FLAG YH_CMD_RESP_FLAG114,3864 +#define YH_MAX_ITEMS_COUNT YH_MAX_ITEMS_COUNT116,3928 +#define YH_MAX_SESSIONS YH_MAX_SESSIONS119,4103 +#define YH_DEFAULT_ENC_KEY YH_DEFAULT_ENC_KEY121,4201 +#define YH_DEFAULT_MAC_KEY YH_DEFAULT_MAC_KEY124,4371 +#define YH_DEFAULT_PASSWORD YH_DEFAULT_PASSWORD127,4561 +#define YH_DEFAULT_SALT YH_DEFAULT_SALT129,4646 +#define YH_DEFAULT_ITERS YH_DEFAULT_ITERS131,4730 +#define YH_CAPABILITIES_LEN YH_CAPABILITIES_LEN133,4794 +#define YH_MAX_LOG_ENTRIES YH_MAX_LOG_ENTRIES135,4864 +#define YH_OBJ_LABEL_LEN YH_OBJ_LABEL_LEN137,4955 +#define YH_MAX_DOMAINS YH_MAX_DOMAINS139,5009 +#define YH_VERB_QUIET YH_VERB_QUIET143,5068 +#define YH_VERB_INTERMEDIATE YH_VERB_INTERMEDIATE145,5120 +#define YH_VERB_CRYPTO YH_VERB_CRYPTO147,5173 +#define YH_VERB_RAW YH_VERB_RAW149,5218 +#define YH_VERB_INFO YH_VERB_INFO151,5260 +#define YH_VERB_ERR YH_VERB_ERR153,5305 +#define YH_VERB_ALL YH_VERB_ALL155,5363 +#define YH_CCM_WRAP_OVERHEAD YH_CCM_WRAP_OVERHEAD159,5498 +typedef struct yh_connector yh_connector;yh_connector166,5611 +typedef struct yh_session yh_session;yh_session169,5681 +typedef struct {__anona0289f370108172,5753 + uint8_t capabilities[YH_CAPABILITIES_LEN];capabilities174,5831 +} yh_capabilities;yh_capabilities175,5876 +typedef enum {__anona0289f370203180,5922 + YHR_SUCCESS = 0,YHR_SUCCESS182,5951 + YHR_MEMORY = -1,YHR_MEMORY184,5989 + YHR_INIT_ERROR = -2,YHR_INIT_ERROR186,6025 + YHR_NET_ERROR = -3,YHR_NET_ERROR188,6064 + YHR_CONNECTOR_NOT_FOUND = -4,YHR_CONNECTOR_NOT_FOUND190,6112 + YHR_INVALID_PARAMS = -5,YHR_INVALID_PARAMS192,6169 + YHR_WRONG_LENGTH = -6,YHR_WRONG_LENGTH194,6215 + YHR_BUFFER_TOO_SMALL = -7,YHR_BUFFER_TOO_SMALL196,6263 + YHR_CRYPTOGRAM_MISMATCH = -8,YHR_CRYPTOGRAM_MISMATCH198,6315 + YHR_AUTH_SESSION_ERROR = -9,YHR_AUTH_SESSION_ERROR200,6380 + YHR_MAC_MISMATCH = -10,YHR_MAC_MISMATCH202,6434 + YHR_DEVICE_OK = -11,YHR_DEVICE_OK204,6481 + YHR_DEVICE_INV_COMMAND = -12,YHR_DEVICE_INV_COMMAND206,6526 + YHR_DEVICE_INV_DATA = -13,YHR_DEVICE_INV_DATA208,6597 + YHR_DEVICE_INV_SESSION = -14,YHR_DEVICE_INV_SESSION210,6648 + YHR_DEVICE_AUTH_FAIL = -15,YHR_DEVICE_AUTH_FAIL212,6727 + YHR_DEVICE_SESSIONS_FULL = -16,YHR_DEVICE_SESSIONS_FULL214,6790 + YHR_DEVICE_SESSION_FAILED = -17,YHR_DEVICE_SESSION_FAILED216,6854 + YHR_DEVICE_STORAGE_FAILED = -18,YHR_DEVICE_STORAGE_FAILED218,6911 + YHR_DEVICE_WRONG_LENGTH = -19,YHR_DEVICE_WRONG_LENGTH220,6965 + YHR_DEVICE_INV_PERMISSION = -20,YHR_DEVICE_INV_PERMISSION222,7036 + YHR_DEVICE_LOG_FULL = -21,YHR_DEVICE_LOG_FULL224,7120 + YHR_DEVICE_OBJ_NOT_FOUND = -22,YHR_DEVICE_OBJ_NOT_FOUND226,7172 + YHR_DEVICE_ID_ILLEGAL = -23,YHR_DEVICE_ID_ILLEGAL228,7230 + YHR_DEVICE_INVALID_OTP = -24,YHR_DEVICE_INVALID_OTP230,7292 + YHR_DEVICE_DEMO_MODE = -25,YHR_DEVICE_DEMO_MODE232,7380 + YHR_DEVICE_CMD_UNEXECUTED = -26,YHR_DEVICE_CMD_UNEXECUTED234,7457 + YHR_GENERIC_ERROR = -27,YHR_GENERIC_ERROR236,7512 + YHR_DEVICE_OBJECT_EXISTS = -28,YHR_DEVICE_OBJECT_EXISTS238,7580 + YHR_CONNECTOR_ERROR = -29YHR_CONNECTOR_ERROR240,7647 +} yh_rc;yh_rc241,7675 +#define ADD_COMMAND(ADD_COMMAND244,7734 +typedef enum {__anona0289f370303249,7828 + ADD_COMMAND(YHC_ECHO, 0x01),ADD_COMMAND251,7854 + ADD_COMMAND(YHC_CREATE_SES, 0x03),ADD_COMMAND253,7906 + ADD_COMMAND(YHC_AUTH_SES, 0x04),ADD_COMMAND255,7970 + ADD_COMMAND(YHC_SES_MSG, 0x05),ADD_COMMAND257,8027 + ADD_COMMAND(YHC_GET_DEVICE_INFO, 0x06),ADD_COMMAND259,8083 + ADD_COMMAND(YHC_BSL, 0x07),ADD_COMMAND261,8135 + ADD_COMMAND(YHC_RESET, 0x08),ADD_COMMAND263,8177 + ADD_COMMAND(YHC_CLOSE_SES, 0x40),ADD_COMMAND265,8229 + ADD_COMMAND(YHC_STATS, 0x041),ADD_COMMAND267,8290 + ADD_COMMAND(YHC_PUT_OPAQUE, 0x42),ADD_COMMAND269,8340 + ADD_COMMAND(YHC_GET_OPAQUE, 0x43),ADD_COMMAND271,8394 + ADD_COMMAND(YHC_PUT_AUTHKEY, 0x44),ADD_COMMAND273,8460 + ADD_COMMAND(YHC_PUT_ASYMMETRIC_KEY, 0x45),ADD_COMMAND275,8523 + ADD_COMMAND(YHC_GEN_ASYMMETRIC_KEY, 0x46),ADD_COMMAND277,8598 + ADD_COMMAND(YHC_SIGN_DATA_PKCS1, 0x47),ADD_COMMAND279,8670 + ADD_COMMAND(YHC_LIST, 0x48),ADD_COMMAND281,8731 + ADD_COMMAND(YHC_DECRYPT_PKCS1, 0x49),ADD_COMMAND283,8792 + ADD_COMMAND(YHC_EXPORT_WRAPPED, 0x4a),ADD_COMMAND285,8863 + ADD_COMMAND(YHC_IMPORT_WRAPPED, 0x4b),ADD_COMMAND287,8934 + ADD_COMMAND(YHC_PUT_WRAP_KEY, 0x4c),ADD_COMMAND289,8994 + ADD_COMMAND(YHC_GET_LOGS, 0x4d),ADD_COMMAND291,9054 + ADD_COMMAND(YHC_GET_OBJECT_INFO, 0x4e),ADD_COMMAND293,9118 + ADD_COMMAND(YHC_PUT_OPTION, 0x4f),ADD_COMMAND295,9186 + ADD_COMMAND(YHC_GET_OPTION, 0x50),ADD_COMMAND297,9249 + ADD_COMMAND(YHC_GET_PSEUDO_RANDOM, 0x51),ADD_COMMAND299,9315 + ADD_COMMAND(YHC_PUT_HMAC_KEY, 0x52),ADD_COMMAND301,9378 + ADD_COMMAND(YHC_HMAC_DATA, 0x53),ADD_COMMAND303,9433 + ADD_COMMAND(YHC_GET_PUBKEY, 0x54),ADD_COMMAND305,9492 + ADD_COMMAND(YHC_SIGN_DATA_PSS, 0x55),ADD_COMMAND307,9554 + ADD_COMMAND(YHC_SIGN_DATA_ECDSA, 0x56),ADD_COMMAND309,9621 + ADD_COMMAND(YHC_DECRYPT_ECDH, 0x57),ADD_COMMAND311,9693 + ADD_COMMAND(YHC_DELETE_OBJECT, 0x58),ADD_COMMAND313,9755 + ADD_COMMAND(YHC_DECRYPT_OAEP, 0x59),ADD_COMMAND315,9824 + ADD_COMMAND(YHC_GENERATE_HMAC_KEY, 0x5a),ADD_COMMAND317,9887 + ADD_COMMAND(YHC_GENERATE_WRAP_KEY, 0x5b),ADD_COMMAND319,9955 + ADD_COMMAND(YHC_VERIFY_HMAC, 0x5c),ADD_COMMAND321,10022 + ADD_COMMAND(YHC_SSH_CERTIFY, 0x5d),ADD_COMMAND323,10078 + ADD_COMMAND(YHC_PUT_TEMPLATE, 0x5e),ADD_COMMAND325,10135 + ADD_COMMAND(YHC_GET_TEMPLATE, 0x5f),ADD_COMMAND327,10193 + ADD_COMMAND(YHC_OTP_DECRYPT, 0x60),ADD_COMMAND329,10250 + ADD_COMMAND(YHC_OTP_AEAD_CREATE, 0x61),ADD_COMMAND331,10310 + ADD_COMMAND(YHC_OTP_AEAD_RANDOM, 0x62),ADD_COMMAND333,10386 + ADD_COMMAND(YHC_OTP_AEAD_REWRAP, 0x63),ADD_COMMAND335,10450 + ADD_COMMAND(YHC_ATTEST_ASYMMETRIC, 0x64),ADD_COMMAND337,10523 + ADD_COMMAND(YHC_PUT_OTP_AEAD_KEY, 0x65),ADD_COMMAND339,10590 + ADD_COMMAND(YHC_GENERATE_OTP_AEAD_KEY, 0x66),ADD_COMMAND341,10661 + ADD_COMMAND(YHC_SET_LOG_INDEX, 0x67),ADD_COMMAND343,10729 + ADD_COMMAND(YHC_WRAP_DATA, 0x68),ADD_COMMAND345,10785 + ADD_COMMAND(YHC_UNWRAP_DATA, 0x69),ADD_COMMAND347,10839 + ADD_COMMAND(YHC_SIGN_DATA_EDDSA, 0x6a),ADD_COMMAND349,10904 + ADD_COMMAND(YHC_BLINK, 0x6b),ADD_COMMAND351,10969 + YHC_ERROR = 0x7f,YHC_ERROR353,11013 +} yh_cmd;yh_cmd354,11033 +typedef enum {__anona0289f370403361,11088 + YH_OPAQUE = 0x01,YH_OPAQUE363,11123 + YH_AUTHKEY = 0x02,YH_AUTHKEY365,11168 + YH_ASYMMETRIC = 0x03,YH_ASYMMETRIC367,11210 + YH_WRAPKEY = 0x04,YH_WRAPKEY369,11249 + YH_HMACKEY = 0x05,YH_HMACKEY371,11285 + YH_TEMPLATE = 0x06,YH_TEMPLATE373,11321 + YH_OTP_AEAD_KEY = 0x07,YH_OTP_AEAD_KEY375,11362 + YH_PUBLIC = 0x83,YH_PUBLIC377,11417 +} yh_object_type;yh_object_type378,11437 +#define YH_MAX_ALGORITHM_COUNT YH_MAX_ALGORITHM_COUNT381,11498 +typedef enum {__anona0289f370503385,11556 + YH_ALGO_RSA_PKCS1_SHA1 = 1,YH_ALGO_RSA_PKCS1_SHA1386,11571 + YH_ALGO_RSA_PKCS1_SHA256 = 2,YH_ALGO_RSA_PKCS1_SHA256387,11601 + YH_ALGO_RSA_PKCS1_SHA384 = 3,YH_ALGO_RSA_PKCS1_SHA384388,11633 + YH_ALGO_RSA_PKCS1_SHA512 = 4,YH_ALGO_RSA_PKCS1_SHA512389,11665 + YH_ALGO_RSA_PSS_SHA1 = 5,YH_ALGO_RSA_PSS_SHA1390,11697 + YH_ALGO_RSA_PSS_SHA256 = 6,YH_ALGO_RSA_PSS_SHA256391,11725 + YH_ALGO_RSA_PSS_SHA384 = 7,YH_ALGO_RSA_PSS_SHA384392,11755 + YH_ALGO_RSA_PSS_SHA512 = 8,YH_ALGO_RSA_PSS_SHA512393,11785 + YH_ALGO_RSA_2048 = 9,YH_ALGO_RSA_2048394,11815 + YH_ALGO_RSA_3072 = 10,YH_ALGO_RSA_3072395,11839 + YH_ALGO_RSA_4096 = 11,YH_ALGO_RSA_4096396,11864 + YH_ALGO_EC_P256 = 12,YH_ALGO_EC_P256397,11889 + YH_ALGO_EC_P384 = 13,YH_ALGO_EC_P384398,11913 + YH_ALGO_EC_P521 = 14,YH_ALGO_EC_P521399,11937 + YH_ALGO_EC_K256 = 15,YH_ALGO_EC_K256400,11961 + YH_ALGO_EC_BP256 = 16,YH_ALGO_EC_BP256401,11985 + YH_ALGO_EC_BP384 = 17,YH_ALGO_EC_BP384402,12010 + YH_ALGO_EC_BP512 = 18,YH_ALGO_EC_BP512403,12035 + YH_ALGO_HMAC_SHA1 = 19,YH_ALGO_HMAC_SHA1404,12060 + YH_ALGO_HMAC_SHA256 = 20,YH_ALGO_HMAC_SHA256405,12086 + YH_ALGO_HMAC_SHA384 = 21,YH_ALGO_HMAC_SHA384406,12114 + YH_ALGO_HMAC_SHA512 = 22,YH_ALGO_HMAC_SHA512407,12142 + YH_ALGO_EC_ECDSA_SHA1 = 23,YH_ALGO_EC_ECDSA_SHA1408,12170 + YH_ALGO_EC_ECDH = 24,YH_ALGO_EC_ECDH409,12200 + YH_ALGO_RSA_OAEP_SHA1 = 25,YH_ALGO_RSA_OAEP_SHA1410,12224 + YH_ALGO_RSA_OAEP_SHA256 = 26,YH_ALGO_RSA_OAEP_SHA256411,12254 + YH_ALGO_RSA_OAEP_SHA384 = 27,YH_ALGO_RSA_OAEP_SHA384412,12286 + YH_ALGO_RSA_OAEP_SHA512 = 28,YH_ALGO_RSA_OAEP_SHA512413,12318 + YH_ALGO_AES128_CCM_WRAP = 29,YH_ALGO_AES128_CCM_WRAP414,12350 + YH_ALGO_OPAQUE_DATA = 30,YH_ALGO_OPAQUE_DATA415,12382 + YH_ALGO_OPAQUE_X509_CERT = 31,YH_ALGO_OPAQUE_X509_CERT416,12410 + YH_ALGO_MGF1_SHA1 = 32,YH_ALGO_MGF1_SHA1417,12443 + YH_ALGO_MGF1_SHA256 = 33,YH_ALGO_MGF1_SHA256418,12469 + YH_ALGO_MGF1_SHA384 = 34,YH_ALGO_MGF1_SHA384419,12497 + YH_ALGO_MGF1_SHA512 = 35,YH_ALGO_MGF1_SHA512420,12525 + YH_ALGO_TEMPL_SSH = 36,YH_ALGO_TEMPL_SSH421,12553 + YH_ALGO_YUBICO_OTP_AES128 = 37,YH_ALGO_YUBICO_OTP_AES128422,12579 + YH_ALGO_YUBICO_AES_AUTH = 38,YH_ALGO_YUBICO_AES_AUTH423,12613 + YH_ALGO_YUBICO_OTP_AES192 = 39,YH_ALGO_YUBICO_OTP_AES192424,12645 + YH_ALGO_YUBICO_OTP_AES256 = 40,YH_ALGO_YUBICO_OTP_AES256425,12679 + YH_ALGO_AES192_CCM_WRAP = 41,YH_ALGO_AES192_CCM_WRAP426,12713 + YH_ALGO_AES256_CCM_WRAP = 42,YH_ALGO_AES256_CCM_WRAP427,12745 + YH_ALGO_EC_ECDSA_SHA256 = 43,YH_ALGO_EC_ECDSA_SHA256428,12777 + YH_ALGO_EC_ECDSA_SHA384 = 44,YH_ALGO_EC_ECDSA_SHA384429,12809 + YH_ALGO_EC_ECDSA_SHA512 = 45,YH_ALGO_EC_ECDSA_SHA512430,12841 + YH_ALGO_EC_ED25519 = 46,YH_ALGO_EC_ED25519431,12873 + YH_ALGO_EC_P224 = 47,YH_ALGO_EC_P224432,12900 +} yh_algorithm;yh_algorithm433,12924 +typedef enum {__anona0289f370603438,12967 + YH_OPTION_FORCE_AUDIT = 1,YH_OPTION_FORCE_AUDIT440,13006 + YH_OPTION_COMMAND_AUDIT = 3,YH_OPTION_COMMAND_AUDIT442,13067 +} yh_option;yh_option443,13098 +typedef enum {__anona0289f370703448,13185 + YH_CONNECTOR_HTTPS_CA = 1,YH_CONNECTOR_HTTPS_CA451,13310 + YH_CONNECTOR_PROXY_SERVER = 2,YH_CONNECTOR_PROXY_SERVER454,13445 +} yh_connector_option;yh_connector_option455,13478 +#define YH_LOG_DIGEST_SIZE YH_LOG_DIGEST_SIZE458,13547 +typedef struct {__anona0289f370808463,13647 + uint16_t number;number465,13701 + uint8_t command;command467,13764 + uint16_t length;length469,13807 + uint16_t session_key;session_key471,13862 + uint16_t target_key;target_key473,13916 + uint16_t second_key;second_key475,13970 + uint8_t result;result477,14026 + uint32_t systick;systick479,14079 + uint8_t digest[YH_LOG_DIGEST_SIZE];digest481,14162 +} yh_log_entry;yh_log_entry482,14200 +typedef struct {__anona0289f370908487,14246 + yh_capabilities capabilities;capabilities489,14310 + uint16_t id;id491,14358 + uint16_t len;len493,14393 + uint16_t domains;domains495,14430 + yh_object_type type;type497,14468 + yh_algorithm algorithm;algorithm499,14514 + uint8_t sequence;sequence501,14562 + uint8_t origin;origin503,14602 + char label[YH_OBJ_LABEL_LEN + 1];label505,14639 + yh_capabilities delegated_capabilities;delegated_capabilities507,14711 +} yh_object_descriptor;yh_object_descriptor508,14753 +static const struct {__anona0289f370a08511,14796 + const char *name;name512,14818 + int bit;bit513,14838 +} yh_capability[] = {yh_capability514,14849 +static const struct {__anona0289f370b08563,16174 + const char *name;name564,16196 + yh_algorithm algorithm;algorithm565,16216 +} yh_algorithms[] = {yh_algorithms566,16242 +static const struct {__anona0289f370c08616,18202 + const char *name;name617,18224 + yh_object_type type;type618,18244 +} yh_types[] = {yh_types619,18267 +static const struct {__anona0289f370d08626,18501 + const char *name;name627,18523 + yh_option option;option628,18543 +} yh_options[] = {yh_options629,18563 +#define YH_ORIGIN_GENERATED YH_ORIGIN_GENERATED635,18698 +#define YH_ORIGIN_IMPORTED YH_ORIGIN_IMPORTED637,18754 +#define YH_ORIGIN_IMPORTED_WRAPPED YH_ORIGIN_IMPORTED_WRAPPED640,18877 + +plugins/wallet_plugin/include/eosio/wallet_plugin/macos_user_auth.h,0 + +plugins/wallet_plugin/macos_user_auth.m,107 +void macos_user_auth(void(*cb)(int, void*), void* cb_userdata, CFStringRef message) {macos_user_auth3,53 + +plugins/wallet_plugin/wallet_plugin.cpp,537 +namespace fc { class variant; }fc14,330 +namespace eosio {eosio16,363 +static appbase::abstract_plugin& _wallet_plugin = app().register_plugin();_wallet_plugin18,382 +wallet_plugin::wallet_plugin() {}wallet_plugin20,473 +wallet_manager& wallet_plugin::get_wallet_manager() {get_wallet_manager22,508 +void wallet_plugin::set_program_options(options_description& cli, options_description& cfg) {set_program_options26,596 +void wallet_plugin::plugin_initialize(const variables_map& options) {plugin_initialize41,1516 + +plugins/wallet_plugin/wallet.cpp,3842 +namespace eosio { namespace wallet {eosio34,662 +namespace eosio { namespace wallet {wallet34,662 +namespace detail {detail36,700 +private_key_type derive_private_key( const std::string& prefix_string,derive_private_key38,720 +class soft_wallet_implsoft_wallet_impl46,1088 + void enable_umask_protection() {enable_umask_protection49,1125 + void disable_umask_protection() {disable_umask_protection55,1246 + soft_wallet& self;self62,1356 + soft_wallet_impl( soft_wallet& s, const wallet_data& initial_data )soft_wallet_impl63,1378 + virtual ~soft_wallet_impl()~soft_wallet_impl68,1478 + void encrypt_keys()encrypt_keys71,1516 + bool copy_wallet_file( string destination_filename )copy_wallet_file83,1804 + bool is_locked()constis_locked116,2780 + string get_wallet_filename() const { return _wallet_filename; }get_wallet_filename121,2856 + optional try_get_private_key(const public_key_type& id)consttry_get_private_key123,2924 + optional try_sign_digest( const digest_type digest, const public_key_type pubtry_sign_digest131,3152 + private_key_type get_private_key(const public_key_type& id)constget_private_key138,3418 + bool import_key(string wif_key)import_key150,3924 + bool remove_key(string key)remove_key166,4487 + string create_key(string key_type)create_key177,4759 + bool load_wallet_file(string wallet_filename = "")load_wallet_file194,5370 + void save_wallet_file(string wallet_filename = "")save_wallet_file209,5779 + string _wallet_filename;_wallet_filename252,7038 + wallet_data _wallet;_wallet253,7099 + map _keys;_keys255,7152 + fc::sha512 _checksum;_checksum256,7202 + mode_t _old_umask;_old_umask259,7273 + const string _wallet_filename_extension = ".wallet";_wallet_filename_extension261,7319 + const string _default_key_type = "K1";_default_key_type262,7375 +namespace eosio { namespace wallet {eosio269,7455 +namespace eosio { namespace wallet {wallet269,7455 +soft_wallet::soft_wallet(const wallet_data& initial_data)soft_wallet271,7493 +soft_wallet::~soft_wallet() {}~soft_wallet275,7614 +bool soft_wallet::copy_wallet_file(string destination_filename)copy_wallet_file277,7646 +string soft_wallet::get_wallet_filename() constget_wallet_filename282,7769 +bool soft_wallet::import_key(string wif_key)import_key287,7859 +bool soft_wallet::remove_key(string key)remove_key299,8112 +string soft_wallet::create_key(string key_type)create_key311,8359 +bool soft_wallet::load_wallet_file( string wallet_filename )load_wallet_file320,8590 +void soft_wallet::save_wallet_file( string wallet_filename )save_wallet_file325,8707 +bool soft_wallet::is_locked() constis_locked330,8817 +bool soft_wallet::is_new() constis_new335,8885 +void soft_wallet::encrypt_keys()encrypt_keys340,8970 +void soft_wallet::lock()lock345,9031 +void soft_wallet::unlock(string password)unlock356,9329 +void soft_wallet::check_password(string password)check_password368,9894 +void soft_wallet::set_password( string password )set_password378,10400 +map soft_wallet::list_keys()list_keys386,10680 +flat_set soft_wallet::list_public_keys() {list_public_keys392,10873 +private_key_type soft_wallet::get_private_key( public_key_type pubkey )constget_private_key399,11179 +optional soft_wallet::try_sign_digest( const digest_type digest, const public_ketry_sign_digest404,11302 +pair soft_wallet::get_private_key_from_password( string accounget_private_key_from_password408,11474 +void soft_wallet::set_wallet_filename(string wallet_filename)set_wallet_filename416,11936 + +plugins/wallet_plugin/se_wallet.cpp,2147 +namespace eosio { namespace wallet {eosio18,360 +namespace eosio { namespace wallet {wallet18,360 +namespace detail {detail22,431 +static void auth_callback(int success, void* data) {auth_callback24,451 +struct se_wallet_impl {se_wallet_impl29,583 + static public_key_data get_public_key_data(SecKeyRef key) {get_public_key_data31,608 + static public_key_type get_public_key(SecKeyRef key) {get_public_key57,1410 + static string string_for_cferror(CFErrorRef error) {string_for_cferror71,1889 +#define XSTR(XSTR83,2271 +#define STR(STR84,2294 + void populate_existing_keys() {populate_existing_keys86,2313 + public_key_type create() {create126,3581 + optional try_sign_digest(const digest_type d, const public_key_type public_ketry_sign_digest189,5749 + bool remove_key(string public_key) {remove_key234,7475 + ~se_wallet_impl() {~se_wallet_impl259,8462 + map _keys;_keys264,8548 + fc::ec_key key = EC_KEY_new_by_curve_name(NID_X9_62_prime256v1);key265,8589 + bool locked = true;locked266,8657 +static void check_signed() {check_signed269,8684 +se_wallet::se_wallet() : my(new detail::se_wallet_impl()) {se_wallet290,9455 +se_wallet::~se_wallet() {~se_wallet313,10180 +private_key_type se_wallet::get_private_key(public_key_type pubkey) const {get_private_key316,10209 +bool se_wallet::is_locked() const {is_locked320,10410 +void se_wallet::lock() {lock323,10470 +void se_wallet::unlock(string password) {unlock328,10619 +void se_wallet::check_password(string password) {check_password336,10957 +void se_wallet::set_password(string password) {set_password339,11095 +map se_wallet::list_keys() {list_keys343,11246 +flat_set se_wallet::list_public_keys() {list_public_keys346,11433 +bool se_wallet::import_key(string wif_key) {import_key352,11633 +string se_wallet::create_key(string key_type) {create_key356,11799 +bool se_wallet::remove_key(string key) {remove_key360,11882 +optional se_wallet::try_sign_digest(const digest_type digest, const public_key_ttry_sign_digest365,12060 + +plugins/chain_plugin/CMakeLists.txt,44 +add_library( chain_pluginchain_plugin2,54 + +plugins/chain_plugin/include/eosio/chain_plugin/chain_plugin.hpp,14121 +namespace fc { class variant; }fc24,662 +namespace eosio {eosio26,695 +namespace chain_apis {chain_apis46,1214 +struct empty{};empty47,1237 +struct permission {permission49,1254 + name perm_name;perm_name50,1274 + name parent;parent51,1306 + authority required_auth;required_auth52,1335 +Type convert_to_type(const string& str, const string& desc) {convert_to_type60,1494 +class read_only {read_only69,1806 + const controller& db;db70,1824 + const fc::microseconds abi_serializer_max_time;abi_serializer_max_time71,1849 + bool shorten_abi_errors = true;shorten_abi_errors72,1900 + static const string KEYi64;KEYi6475,1945 + read_only(const controller& db, const fc::microseconds& abi_serializer_max_time)read_only77,1977 + void validate() const {}validate80,2130 + void set_shorten_abi_errors( bool f ) { shorten_abi_errors = f; }set_shorten_abi_errors82,2159 + using get_info_params = empty;get_info_params84,2229 + struct get_info_results {get_info_results86,2264 + string server_version;server_version87,2293 + chain::chain_id_type chain_id;chain_id88,2339 + uint32_t head_block_num = 0;head_block_num89,2379 + uint32_t last_irreversible_block_num = 0;last_irreversible_block_num90,2429 + chain::block_id_type last_irreversible_block_id;last_irreversible_block_id91,2492 + chain::block_id_type head_block_id;head_block_id92,2550 + fc::time_point head_block_time;head_block_time93,2595 + account_name head_block_producer;head_block_producer94,2642 + uint64_t virtual_block_cpu_limit = 0;virtual_block_cpu_limit96,2694 + uint64_t virtual_block_net_limit = 0;virtual_block_net_limit97,2753 + uint64_t block_cpu_limit = 0;block_cpu_limit99,2813 + uint64_t block_net_limit = 0;block_net_limit100,2864 + optional server_version_string;server_version_string103,3017 + struct producer_info {producer_info107,3137 + name producer_name;producer_name108,3163 + using account_resource_limit = chain::resource_limits::account_resource_limit;account_resource_limit111,3218 + struct get_account_results {get_account_results113,3301 + name account_name;account_name114,3333 + uint32_t head_block_num = 0;head_block_num115,3380 + fc::time_point head_block_time;head_block_time116,3433 + bool privileged = false;privileged118,3484 + fc::time_point last_code_update;last_code_update119,3537 + fc::time_point created;created120,3588 + optional core_liquid_balance;core_liquid_balance122,3631 + int64_t ram_quota = 0;ram_quota124,3686 + int64_t net_weight = 0;net_weight125,3735 + int64_t cpu_weight = 0;cpu_weight126,3784 + account_resource_limit net_limit;net_limit128,3834 + account_resource_limit cpu_limit;cpu_limit129,3878 + int64_t ram_usage = 0;ram_usage130,3922 + vector permissions;permissions132,3971 + fc::variant total_resources;total_resources134,4018 + fc::variant self_delegated_bandwidth;self_delegated_bandwidth135,4068 + fc::variant refund_request;refund_request136,4127 + fc::variant voter_info;voter_info137,4176 + struct get_account_params {get_account_params140,4228 + name account_name;account_name141,4259 + optional expected_core_symbol;expected_core_symbol142,4296 + struct get_code_results {get_code_results147,4426 + name account_name;account_name148,4455 + string wast;wast149,4498 + string wasm;wasm150,4533 + fc::sha256 code_hash;code_hash151,4568 + optional abi;abi152,4608 + struct get_code_params {get_code_params155,4649 + name account_name;account_name156,4677 + bool code_as_wasm = false;code_as_wasm157,4702 + struct get_code_hash_results {get_code_hash_results160,4742 + name account_name;account_name161,4776 + fc::sha256 code_hash;code_hash162,4819 + struct get_code_hash_params {get_code_hash_params165,4866 + name account_name;account_name166,4899 + struct get_abi_results {get_abi_results169,4931 + name account_name;account_name170,4959 + optional abi;abi171,5002 + struct get_abi_params {get_abi_params174,5043 + name account_name;account_name175,5070 + struct get_raw_code_and_abi_results {get_raw_code_and_abi_results178,5102 + name account_name;account_name179,5143 + chain::blob wasm;wasm180,5186 + chain::blob abi;abi181,5221 + struct get_raw_code_and_abi_params {get_raw_code_and_abi_params184,5262 + name account_name;account_name185,5302 + struct get_raw_abi_params {get_raw_abi_params188,5352 + name account_name;account_name189,5383 + optional abi_hash;abi_hash190,5426 + struct get_raw_abi_results {get_raw_abi_results193,5472 + name account_name;account_name194,5504 + fc::sha256 code_hash;code_hash195,5547 + fc::sha256 abi_hash;abi_hash196,5587 + optional abi;abi197,5626 + struct abi_json_to_bin_params {abi_json_to_bin_params209,6066 + name code;code210,6101 + name action;action211,6126 + fc::variant args;args212,6153 + struct abi_json_to_bin_result {abi_json_to_bin_result214,6184 + vector binargs;binargs215,6219 + struct abi_bin_to_json_params {abi_bin_to_json_params221,6346 + name code;code222,6381 + name action;action223,6406 + vector binargs;binargs224,6433 + struct abi_bin_to_json_result {abi_bin_to_json_result226,6467 + fc::variant args;args227,6502 + struct get_required_keys_params {get_required_keys_params233,6626 + fc::variant transaction;transaction234,6663 + flat_set available_keys;available_keys235,6694 + struct get_required_keys_result {get_required_keys_result237,6748 + flat_set required_keys;required_keys238,6785 + using get_transaction_id_params = transaction;get_transaction_id_params243,6933 + using get_transaction_id_result = transaction_id_type;get_transaction_id_result244,6983 + struct get_block_params {get_block_params248,7139 + string block_num_or_id;block_num_or_id249,7168 + struct get_block_header_state_params {get_block_header_state_params254,7270 + string block_num_or_id;block_num_or_id255,7312 + struct get_table_rows_params {get_table_rows_params260,7440 + bool json = false;json261,7474 + name code;code262,7506 + string scope;scope263,7530 + name table;table264,7555 + string table_key;table_key265,7580 + string lower_bound;lower_bound266,7609 + string upper_bound;upper_bound267,7640 + uint32_t limit = 10;limit268,7671 + string key_type; // type of key specified by index_positionkey_type269,7701 + string index_position; // 1 - primary (first), 2 - secondary index (in order defined index_position270,7773 + string encode_type{"dec"}; //dec, hex , default=decencode_type271,7907 + struct get_table_rows_result {get_table_rows_result274,7978 + vector rows; ///< one row per item, either encoded as hex String or JSON objerows275,8012 + bool more = false; ///< true if last element in data is not the end and sizmore276,8111 + struct get_table_by_scope_params {get_table_by_scope_params281,8319 + name code; // mandatorycode282,8357 + name table = 0; // optional, act as filtertable283,8394 + string lower_bound; // lower bound of scope, optionallower_bound284,8450 + string upper_bound; // upper bound of scope, optionalupper_bound285,8515 + uint32_t limit = 10;limit286,8580 + struct get_table_by_scope_result_row {get_table_by_scope_result_row288,8616 + name code;code289,8658 + name scope;scope290,8682 + name table;table291,8707 + name payer;payer292,8732 + uint32_t count;count293,8757 + struct get_table_by_scope_result {get_table_by_scope_result295,8788 + vector rows;rows296,8826 + string more; ///< fill lower_bound with this value to fetch more rowsmore297,8876 + struct get_currency_balance_params {get_currency_balance_params302,9062 + name code;code303,9102 + name account;account304,9131 + optional symbol;symbol305,9163 + struct get_currency_stats_params {get_currency_stats_params310,9291 + name code;code311,9329 + string symbol;symbol312,9356 + struct get_currency_stats_result {get_currency_stats_result316,9393 + asset supply;supply317,9431 + asset max_supply;max_supply318,9460 + account_name issuer;issuer319,9493 + struct get_producers_params {get_producers_params324,9613 + bool json = false;json325,9646 + string lower_bound;lower_bound326,9678 + uint32_t limit = 50;limit327,9709 + struct get_producers_result {get_producers_result330,9746 + vector rows; ///< one row per item, either encoded as hex string or JSON objerows331,9779 + double total_producer_vote_weight;total_producer_vote_weight332,9878 + string more; ///< fill lower_bound with this value to fetch more rowsmore333,9932 + struct get_producer_schedule_params {get_producer_schedule_params338,10111 + struct get_producer_schedule_result {get_producer_schedule_result341,10159 + fc::variant active;active342,10200 + fc::variant pending;pending343,10226 + fc::variant proposed;proposed344,10253 + struct get_scheduled_transactions_params {get_scheduled_transactions_params349,10395 + bool json = false;json350,10441 + string lower_bound; /// timestamp OR transaction IDlower_bound351,10473 + uint32_t limit = 50;limit352,10537 + struct get_scheduled_transactions_result {get_scheduled_transactions_result355,10574 + fc::variants transactions;transactions356,10620 + string more; ///< fill lower_bound with this to fetch next set of transactionsmore357,10654 + static void copy_inline_row(const chain::key_value_object& obj, vector& data) {copy_inline_row362,10876 + void walk_key_value_table(const name& code, const name& scope, const name& table, Function f)walk_key_value_table368,11106 + read_only::get_table_rows_result get_table_rows_by_seckey( const read_only::get_table_rows_paget_table_rows_by_seckey389,11997 + read_only::get_table_rows_result get_table_rows_ex( const read_only::get_table_rows_params& pget_table_rows_ex459,15182 +class read_write {read_write525,17705 + controller& db;db526,17724 + const fc::microseconds abi_serializer_max_time;abi_serializer_max_time527,17743 + using push_block_params = chain::signed_block;push_block_params532,17909 + using push_block_results = empty;push_block_results533,17959 + using push_transaction_params = fc::variant_object;push_transaction_params536,18115 + struct push_transaction_results {push_transaction_results537,18170 + chain::transaction_id_type transaction_id;transaction_id538,18207 + fc::variant processed;processed539,18257 + using push_transactions_params = vector;push_transactions_params544,18446 + using push_transactions_results = vector;push_transactions_results545,18516 + constexpr const char i64[] = "i64";i64552,18842 + constexpr const char i128[] = "i128";i128553,18885 + constexpr const char i256[] = "i256";i256554,18929 + constexpr const char float64[] = "float64";float64555,18973 + constexpr const char float128[] = "float128";float128556,19020 + constexpr const char sha256[] = "sha256";sha256557,19068 + constexpr const char ripemd160[] = "ripemd160";ripemd160558,19114 + constexpr const char dec[] = "dec";dec559,19163 + constexpr const char hex[] = "hex";hex560,19206 + struct keytype_converter {keytype_converter567,19362 + using input_type = chain::checksum256_type;input_type568,19427 + using index_type = chain::index256_index;index_type569,19476 + static auto function() {function570,19523 + return [](const input_type& v) {__anon7c77027b0102571,19553 + struct keytype_converter {keytype_converter582,19852 + using input_type = chain::checksum160_type;input_type583,19920 + using index_type = chain::index256_index;index_type584,19969 + static auto function() {function585,20016 + return [](const input_type& v) {__anon7c77027b0202586,20046 + struct keytype_converter {keytype_converter596,20275 + using input_type = boost::multiprecision::uint256_t;input_type597,20321 + using index_type = chain::index256_index;index_type598,20379 + static auto function() {function599,20426 + return [](const input_type v) {__anon7c77027b0302600,20456 +class chain_plugin : public plugin {chain_plugin611,20699 + chain_apis::read_only get_read_only_api() const { return chain_apis::read_only(chain(), get_aget_read_only_api624,21046 + +plugins/chain_plugin/chain_plugin.cpp,13915 +namespace eosio {eosio34,990 +namespace chain {chain37,1108 +std::ostream& operator<<(std::ostream& osm, eosio::chain::db_read_mode m) {operator <<39,1127 +void validate(boost::any& v,validate53,1572 +std::ostream& operator<<(std::ostream& osm, eosio::chain::validation_mode m) {operator <<80,2531 +void validate(boost::any& v,validate90,2791 +using vm_type = wasm_interface::vm_type;vm_type119,3693 +#define CATCH_AND_CALL(CATCH_AND_CALL126,3862 +class chain_plugin_impl {chain_plugin_impl144,4440 + chain_plugin_impl()chain_plugin_impl146,4474 + bfs::path blocks_dir;blocks_dir159,5341 + bool readonly = false;readonly160,5389 + flat_map loaded_checkpoints;loaded_checkpoints161,5443 + fc::optional fork_db;fork_db163,5500 + fc::optional block_logger;block_logger164,5545 + fc::optional chain_config;chain_config165,5595 + fc::optional chain;chain166,5645 + fc::optional chain_id;chain_id167,5688 + fc::optional wasm_runtime;wasm_runtime169,5785 + fc::microseconds abi_serializer_max_time_ms;abi_serializer_max_time_ms170,5835 + fc::optional snapshot_path;snapshot_path171,5899 + channels::pre_accepted_block::channel_type& pre_accepted_block_channel;pre_accepted_block_channel175,6011 + channels::accepted_block_header::channel_type& accepted_block_header_channel;accepted_block_header_channel176,6090 + channels::accepted_block::channel_type& accepted_block_channel;accepted_block_channel177,6172 + channels::irreversible_block::channel_type& irreversible_block_channel;irreversible_block_channel178,6247 + channels::accepted_transaction::channel_type& accepted_transaction_channel;accepted_transaction_channel179,6326 + channels::applied_transaction::channel_type& applied_transaction_channel;applied_transaction_channel180,6407 + channels::accepted_confirmation::channel_type& accepted_confirmation_channel;accepted_confirmation_channel181,6487 + incoming::channels::block::channel_type& incoming_block_channel;incoming_block_channel182,6569 + incoming::methods::block_sync::method_type& incoming_block_sync_method;incoming_block_sync_method185,6700 + incoming::methods::transaction_async::method_type& incoming_transaction_async_method;incoming_transaction_async_method186,6782 + methods::get_block_by_number::method_type::handle get_block_by_number_provideget_block_by_number_provider189,6902 + methods::get_block_by_id::method_type::handle get_block_by_id_provider;get_block_by_id_provider190,7001 + methods::get_head_block_id::method_type::handle get_head_block_id_provider;get_head_block_id_provider191,7096 + methods::get_last_irreversible_block_number::method_type::handle get_last_irreversible_blockget_last_irreversible_block_number_provider192,7193 + fc::optional pre_accepted_block_connectipre_accepted_block_connection195,7354 + fc::optional accepted_block_header_conneaccepted_block_header_connection196,7454 + fc::optional accepted_block_connection;accepted_block_connection197,7557 + fc::optional irreversible_block_connectiirreversible_block_connection198,7653 + fc::optional accepted_transaction_connecaccepted_transaction_connection199,7753 + fc::optional applied_transaction_connectapplied_transaction_connection200,7855 + fc::optional accepted_confirmation_conneaccepted_confirmation_connection201,7956 +chain_plugin::chain_plugin()chain_plugin206,8065 +chain_plugin::~chain_plugin(){}~chain_plugin210,8128 +void chain_plugin::set_program_options(options_description& cli, options_description& cfg)set_program_options212,8161 +#define LOAD_VALUE_SET(LOAD_VALUE_SET295,16015 +fc::time_point calculate_genesis_timestamp( string tstr ) {calculate_genesis_timestamp301,16271 +void clear_directory_contents( const fc::path& p ) {clear_directory_contents321,17015 +void chain_plugin::plugin_initialize(const variables_map& options) {plugin_initialize332,17277 + reader->read_section([this]( auto §ion ){__anon3c7236750102546,28818 + [this]( uint32_t block_num ) -> signed_block_ptr {__anon3c7236750202623,32706 + [this]( block_id_type id ) -> signed_block_ptr {__anon3c7236750302628,32957 + my->get_head_block_id_provider = app().get_method().register_p__anon3c7236750402632,33094 + [this]() {__anon3c7236750502637,33405 + my->pre_accepted_block_connection = my->chain->pre_accepted_block.connect([this](const sig__anon3c7236750602642,33545 + [this]( const block_state_ptr& blk ) {__anon3c7236750702656,34269 + my->accepted_block_connection = my->chain->accepted_block.connect( [this]( const block_sta__anon3c7236750802660,34403 + my->irreversible_block_connection = my->chain->irreversible_block.connect( [this]( const b__anon3c7236750902664,34579 + [this]( const transaction_metadata_ptr& meta ) {__anon3c7236750a02669,34852 + [this]( const transaction_trace_ptr& trace ) {__anon3c7236750b02674,35079 + [this]( const header_confirmation& conf ) {__anon3c7236750c02679,35308 +void chain_plugin::plugin_startup()plugin_startup688,35510 +void chain_plugin::plugin_shutdown() {plugin_shutdown716,36391 +chain_apis::read_write::read_write(controller& db, const fc::microseconds& abi_serializer_max_tiread_write727,36782 +void chain_apis::read_write::validate() const {validate733,36947 +chain_apis::read_write chain_plugin::get_read_write_api() {get_read_write_api737,37144 +void chain_plugin::accept_block(const signed_block_ptr& block ) {accept_block741,37281 +void chain_plugin::accept_transaction(const chain::packed_transaction& trx, next_function( [&]( auto& ubo ) {__anon3c7236750d02832,41500 +bool chain_plugin::import_reversible_blocks( const fc::path& reversible_dir,import_reversible_blocks859,42587 + new_reversible.create( [&]( auto& ubo ) {__anon3c7236750e02889,43800 +bool chain_plugin::export_reversible_blocks( const fc::path& reversible_dir,export_reversible_blocks908,44348 +controller& chain_plugin::chain() { return *my->chain; }chain954,46310 +const controller& chain_plugin::chain() const { return *my->chain; }chain955,46367 +chain::chain_id_type chain_plugin::get_chain_id()const {get_chain_id957,46437 +fc::microseconds chain_plugin::get_abi_serializer_max_time() const {get_abi_serializer_max_time962,46627 +void chain_plugin::log_guard_exception(const chain::guard_exception&e ) const {log_guard_exception966,46741 +void chain_plugin::handle_guard_exception(const chain::guard_exception& e) const {handle_guard_exception978,47483 +void chain_plugin::handle_db_exhaustion() {handle_db_exhaustion985,47633 +namespace chain_apis {chain_apis991,47879 +const string read_only::KEYi64 = "i64";KEYi64993,47903 +read_only::get_info_results read_only::get_info(const read_only::get_info_params&) const {get_info995,47944 +uint64_t read_only::get_table_index_name(const read_only::get_table_rows_params& p, bool& primarget_table_index_name1016,48797 +uint64_t convert_to_type(const string& str, const string& desc) {convert_to_type1062,50632 +abi_def get_abi( const controller& db, const name& account ) {get_abi1090,51592 +string get_table_type( const abi_def& abi, const name& table_name ) {get_table_type1099,51982 +read_only::get_table_rows_result read_only::get_table_rows( const read_only::get_table_rows_paraget_table_rows1108,52302 + return get_table_rows_by_seckey(p, abi, [](uint64_t v)->uint64__anon3c7236750f021124,53254 + return get_table_rows_by_seckey(p, abi, [](uint128_t v)->uin__anon3c72367510021129,53447 + using conv = keytype_converter;conv1135,53694 + using conv = keytype_converter;conv1138,53893 + return get_table_rows_by_seckey(p, abi, [](double v)->float__anon3c72367511021142,54117 + return get_table_rows_by_seckey(p, abi, [](double v)->__anon3c72367512021148,54360 + using conv = keytype_converter;conv1156,54674 + using conv = keytype_converter;conv1160,54917 +read_only::get_table_by_scope_result read_only::get_table_by_scope( const read_only::get_table_bget_table_by_scope1167,55244 +vector read_only::get_currency_balance( const read_only::get_currency_balance_params& p )get_currency_balance1209,56826 + walk_key_value_table(p.code, p.account, N(accounts), [&](const key_value_object& obj){__anon3c72367513021215,57079 +fc::variant read_only::get_currency_stats( const read_only::get_currency_stats_params& p )const get_currency_stats1235,57810 + walk_key_value_table(p.code, scope, N(stat), [&](const key_value_object& obj){__anon3c72367514021243,58184 +static float64_t to_softfloat64( double d ) {to_softfloat641262,58891 +fc::variant get_global_row( const database& db, const abi_def& abi, const abi_serializer& abis, get_global_row1266,58985 +read_only::get_producers_result read_only::get_producers( const read_only::get_producers_params&get_producers1282,60097 + auto it = [&]{__anon3c72367515021307,61688 +read_only::get_producer_schedule_result read_only::get_producer_schedule( const read_only::get_pget_producer_schedule1333,62875 +struct resolver_factory {resolver_factory1345,63401 + static auto make(const Api* api, const fc::microseconds& max_serialization_time) {make1346,63427 + return [api, max_serialization_time](const account_name &name) -> optional__anon3c72367516021347,63513 +auto make_resolver(const Api* api, const fc::microseconds& max_serialization_time) {make_resolver1362,63995 +read_only::get_scheduled_transactions( const read_only::get_scheduled_transactions_params& p ) cget_scheduled_transactions1368,64197 + auto itr = ([&](){__anon3c72367517021372,64418 +fc::variant read_only::get_block(const read_only::get_block_params& params) const {get_block1440,66730 +fc::variant read_only::get_block_header_state(const get_block_header_state_params& params) constget_block_header_state1464,67924 +void read_write::push_block(const read_write::push_block_params& params, next_function()(pretty_input, true, [this, next](__anon3c72367518021505,69684 +static void push_recurse(read_write* rw, int index, const std::shared_ptr( params.code );code_account1792,82279 + abi_def abi;abi1793,82361 +read_only::get_required_keys_result read_only::get_required_keys( const get_required_keys_paramsget_required_keys1803,82786 +read_only::get_transaction_id_result read_only::get_transaction_id( const read_only::get_transacget_transaction_id1816,83452 +namespace detail {detail1820,83605 + struct ram_market_exchange_state_t {ram_market_exchange_state_t1821,83624 + asset ignore1;ignore11822,83664 + asset ignore2;ignore21823,83686 + double ignore3;ignore31824,83708 + asset core_symbol;core_symbol1825,83730 + double ignore4;ignore41826,83756 +chain::symbol read_only::extract_core_symbol()const {extract_core_symbol1830,83787 + +plugins/history_plugin/CMakeLists.txt,48 +add_library( history_pluginhistory_plugin2,56 + +plugins/history_plugin/include/eosio/history_plugin/history_plugin.hpp,3145 +namespace fc { class variant; }fc10,157 +namespace eosio {eosio12,190 + typedef shared_ptr history_ptr;history_ptr20,372 + typedef shared_ptr history_const_ptr;history_const_ptr21,434 +namespace history_apis {history_apis23,509 +class read_only {read_only25,535 + history_const_ptr history;history26,553 + read_only(history_const_ptr&& history)read_only29,595 + struct get_actions_params {get_actions_params33,673 + chain::account_name account_name;account_name34,707 + optional pos; /// a absolute sequence positon -1 is the end/last actionpos35,750 + optional offset; ///< the number of actions relative to pos, negative numberoffset36,842 + struct ordered_action_result {ordered_action_result39,1016 + uint64_t global_action_seq = 0;global_action_seq40,1053 + int32_t account_action_seq = 0;account_action_seq41,1114 + uint32_t block_num;block_num42,1176 + chain::block_timestamp_type block_time;block_time43,1225 + fc::variant action_trace;action_trace44,1275 + struct get_actions_result {get_actions_result47,1337 + vector actions;actions48,1371 + uint32_t last_irreversible_block;last_irreversible_block49,1419 + optional time_limit_exceeded_error;time_limit_exceeded_error50,1483 + struct get_transaction_params {get_transaction_params57,1634 + string id;id58,1672 + optional block_num_hint;block_num_hint59,1715 + struct get_transaction_result {get_transaction_result62,1780 + transaction_id_type id;id63,1818 + fc::variant trx;trx64,1869 + chain::block_timestamp_type block_time;block_time65,1921 + uint32_t block_num = 0;block_num66,1980 + uint32_t last_irreversible_block = 0;last_irreversible_block67,2042 + vector traces;traces68,2118 + struct get_key_accounts_params {get_key_accounts_params87,2587 + chain::public_key_type public_key;public_key88,2626 + struct get_key_accounts_results {get_key_accounts_results90,2683 + vector account_names;account_names91,2723 + struct get_controlled_accounts_params {get_controlled_accounts_params96,2880 + chain::account_name controlling_account;controlling_account97,2926 + struct get_controlled_accounts_results {get_controlled_accounts_results99,2989 + vector controlled_accounts;controlled_accounts100,3036 +class history_plugin : public plugin {history_plugin119,3659 + history_apis::read_only get_read_only_api()const { return history_apis::read_only(historyget_read_only_api132,4052 + history_ptr my;my135,4180 + +plugins/history_plugin/include/eosio/history_plugin/public_key_history_object.hpp,544 +namespace eosio {eosio10,134 +class public_key_history_object : public chainbase::object public_key_history_index;public_key_history_index48,1675 + +plugins/history_plugin/include/eosio/history_plugin/account_control_history_object.hpp,689 +namespace eosio {eosio10,143 +class account_control_history_object : public chainbase::object account_control_history_inaccount_control_history_index49,1964 + +plugins/history_plugin/history_plugin.cpp,4890 +namespace eosio {eosio13,406 + static appbase::abstract_plugin& _history_plugin = app().register_plugin();_history_plugin17,496 + struct account_history_object : public chainbase::object& keys, const account_name& add102,3941 + db.create([&](public_key_history_object& obj) {__anon775768f30102105,4125 + static void add(chainbase::database& db, const vector& controlling_aadd113,4355 + db.create([&](account_control_history_object& obj) {__anon775768f30202116,4597 + struct filter_entry {filter_entry124,4897 + name receiver;receiver125,4922 + name action;action126,4943 + name actor;actor127,4962 + std::tuple key() const {key129,4981 + friend bool operator<( const filter_entry& a, const filter_entry& b ) {operator <133,5097 + class history_plugin_impl {history_plugin_impl138,5225 + bool bypass_filter = false;bypass_filter140,5270 + std::set filter_on;filter_on141,5307 + std::set filter_out;filter_out142,5350 + chain_plugin* chain_plug = nullptr;chain_plug143,5394 + fc::optional applied_transaction_connection;applied_transaction_connection144,5448 + bool filter(const action_trace& act) {filter146,5522 + set account_set( const action_trace& act ) {account_set186,7037 + void record_account_action( account_name n, const base_action_trace& act ) {record_account_action207,8218 + const auto& a = db.create( [&]( auto& aho ) {__anon775768f30302220,8911 + void on_system_action( const action_trace& at ) {on_system_action228,9247 + void on_action_trace( const action_trace& at ) {on_action_trace255,10877 + db.create( [&]( auto& aho ) {__anon775768f30402261,11240 + void on_applied_transaction( const transaction_trace_ptr& trace ) {on_applied_transaction284,12217 + history_plugin::history_plugin()history_plugin294,12641 + history_plugin::~history_plugin() {~history_plugin298,12733 + void history_plugin::set_program_options(options_description& cli, options_description& cfg) set_program_options303,12780 + void history_plugin::plugin_initialize(const variables_map& options) {plugin_initialize314,13487 + chain.applied_transaction.connect( [&]( const transaction_trace_ptr& p ) {__anon775768f30502358,15852 + void history_plugin::plugin_startup() {plugin_startup364,16049 + void history_plugin::plugin_shutdown() {plugin_shutdown367,16098 + namespace history_apis {history_apis374,16201 + read_only::get_actions_result read_only::get_actions( const read_only::get_actions_params&get_actions375,16229 + read_only::get_transaction_result read_only::get_transaction( const read_only::get_transacget_transaction445,18971 + {__anon775768f30602459,20024 + read_only::get_key_accounts_results read_only::get_key_accounts(const get_key_accounts_parget_key_accounts567,24853 + read_only::get_controlled_accounts_results read_only::get_controlled_accounts(const get_coget_controlled_accounts577,25425 + +plugins/history_api_plugin/CMakeLists.txt,56 +add_library( history_api_pluginhistory_api_plugin2,62 + +plugins/history_api_plugin/include/eosio/history_api_plugin/history_api_plugin.hpp,123 +namespace eosio {eosio13,254 + class history_api_plugin : public plugin {history_api_plugin17,302 + +plugins/history_api_plugin/history_api_plugin.cpp,715 +namespace eosio {eosio10,185 +static appbase::abstract_plugin& _history_api_plugin = app().register_plugin_history_api_plugin14,228 +history_api_plugin::history_api_plugin(){}history_api_plugin16,329 +history_api_plugin::~history_api_plugin(){}~history_api_plugin17,372 +void history_api_plugin::set_program_options(options_description&, options_description&) {}set_program_options19,417 +void history_api_plugin::plugin_initialize(const variables_map&) {}plugin_initialize20,509 +#define CALL(CALL22,578 +#define CHAIN_RO_CALL(CHAIN_RO_CALL34,1136 +void history_api_plugin::plugin_startup() {plugin_startup37,1322 +void history_api_plugin::plugin_shutdown() {}plugin_shutdown51,1809 + +plugins/producer_api_plugin/producer_api_plugin.cpp,814 +namespace eosio { namespace detail {eosio13,232 +namespace eosio { namespace detail {detail13,232 + struct producer_api_plugin_response {producer_api_plugin_response14,269 + std::string result;result15,309 +namespace eosio {eosio21,411 +static appbase::abstract_plugin& _producer_api_plugin = app().register_plugin {producer_api_plugin16,254 + virtual void set_program_options(options_description& cli, options_description& cfg) overrset_program_options27,759 + void plugin_shutdown() {}plugin_shutdown30,946 + +plugins/txn_test_gen_plugin/txn_test_gen_plugin.cpp,2588 +namespace eosio { namespace detail {eosio29,735 +namespace eosio { namespace detail {detail29,735 + struct txn_test_gen_empty {};txn_test_gen_empty30,772 +namespace eosio {eosio35,858 +static appbase::abstract_plugin& _txn_test_gen_plugin = app().register_plugin>& trxpush_next_transaction91,3163 + cp.accept_transaction( packed_transaction(trxs->at(index)), [=](const fc::static_variant&& trxs, const std::function next) {send_transaction292,13527 + void stop_generation() {stop_generation349,16062 + boost::asio::high_resolution_timer timer{app().get_io_service()};timer357,16280 + bool running{false};running358,16349 + unsigned timer_timeout;timer_timeout360,16374 + unsigned batch;batch361,16401 + action act_a_to_b;act_a_to_b363,16421 + action act_b_to_a;act_b_to_a364,16443 + int32_t txn_reference_block_lag;txn_reference_block_lag366,16466 +txn_test_gen_plugin::txn_test_gen_plugin() {}txn_test_gen_plugin369,16506 +txn_test_gen_plugin::~txn_test_gen_plugin() {}~txn_test_gen_plugin370,16552 +void txn_test_gen_plugin::set_program_options(options_description&, options_description& cfg) {set_program_options372,16600 +void txn_test_gen_plugin::plugin_initialize(const variables_map& options) {plugin_initialize378,16934 +void txn_test_gen_plugin::plugin_startup() {plugin_startup385,17187 +void txn_test_gen_plugin::plugin_shutdown() {plugin_shutdown393,17628 + +plugins/txn_test_gen_plugin/CMakeLists.txt,58 +add_library( txn_test_gen_plugintxn_test_gen_plugin2,61 + +plugins/txn_test_gen_plugin/include/eosio/txn_test_gen_plugin/txn_test_gen_plugin.hpp,132 +namespace eosio {eosio10,201 +class txn_test_gen_plugin : public appbase::plugin {txn_test_gen_plugin14,246 + +plugins/txn_test_gen_plugin/README.md,894 +# txn\_test\_gen\_plugintxn\_test\_gen\_plugin1,0 +## Performance testingPerformance testing7,317 +### Create config and data directoriesCreate config and data directories11,492 +### Launch producerLaunch producer52,1368 +### Launch non-producer that will generate transactionsLaunch non-producer that will generate transactions57,1542 +### Create a wallet on the non-producer and set bios contractCreate a wallet on the non-producer and set bios contract62,1857 +### Initialize the accounts txn_test_gen_plugin usesInitialize the accounts txn_test_gen_plugin uses69,2131 +### Start transaction generation, this will submit 20 transactions evey 20ms (total of 1000TPS)Start transaction generation, this will submit 20 transactions evey 20ms (total of 1000TPS)74,2344 +### Note the producer console printsNote the producer console prints79,2544 +### DemonstrationDemonstration88,3014 + +contracts/asserter/asserter.cpp,144 +static int global_variable = 45;global_variable11,181 + void apply( uint64_t /* receiver */, uint64_t code, uint64_t action ) {apply15,303 + +contracts/asserter/CMakeLists.txt,52 +set( CMAKE_CXX_STANDARD 17 )CMAKE_CXX_STANDARD1,0 + +contracts/asserter/asserter.hpp,72 +namespace asserter {asserter8,92 + TABLE assertdef {assertdef9,113 + +contracts/integration_test/integration_test.cpp,0 + +contracts/integration_test/CMakeLists.txt,52 +set( CMAKE_CXX_STANDARD 17 )CMAKE_CXX_STANDARD1,0 + +contracts/simple.token/CMakeLists.txt,0 + +contracts/simple.token/simple.token.cpp,0 + +contracts/test_ram_limit/CMakeLists.txt,0 + +contracts/test_ram_limit/test_ram_limit.cpp,886 +class test_ram_limit : public eosio::contract {test_ram_limit16,367 + const uint32_t FIVE_MINUTES = 5*60;FIVE_MINUTES18,426 + test_ram_limit(account_name self)test_ram_limit20,469 + void setentry(account_name payer, uint64_t from, uint64_t to, uint64_t size) {setentry25,568 + table.modify(itr, payer, [size](test& t) {__anon77bf46fc010232,935 + table.emplace(payer, [key,size](test& t) {__anon77bf46fc020236,1086 + void rmentry(uint64_t from, uint64_t to) {rmentry45,1301 + void printentry(uint64_t from, uint64_t to) {printentry57,1745 + struct test {test70,2249 + uint64_t key;key71,2269 + std::vector data;data72,2303 + uint64_t primary_key()const { return key; }primary_key74,2339 + typedef eosio::multi_index< N(test.table), test> test_table;test_table78,2449 + +contracts/noop/CMakeLists.txt,52 +set( CMAKE_CXX_STANDARD 17 )CMAKE_CXX_STANDARD1,0 + +contracts/noop/noop.cpp,60 +namespace eosio {eosio9,123 +namespace eosio {eosio9,123 + +contracts/CMakeLists.txt,72 +macro(add_contract_no_abi CONTRACT_NAME TARGET)add_contract_no_abi1,0 + +contracts/proxy/CMakeLists.txt,52 +set( CMAKE_CXX_STANDARD 17 )CMAKE_CXX_STANDARD1,0 + +contracts/proxy/proxy.cpp,555 +namespace proxy {proxy11,149 + namespace configs {configs13,172 + bool get(config &out, const name &self) {get15,196 + void store(const config &in, const name &self) {store26,591 + void apply_transfer(uint64_t receiver, name /* code */, const T& transfer) {apply_transfer37,1028 + void apply_setowner(uint64_t receiver, set_owner params) {apply_setowner60,1983 + void apply_onerror(uint64_t receiver, const onerror& error ) {apply_onerror72,2440 + void apply( uint64_t receiver, uint64_t code, uint64_t action ) {apply91,3093 + +contracts/proxy/proxy.hpp,296 +namespace proxy {proxy13,160 + TABLE set_owner {set_owner15,179 + TABLE config {config22,304 + struct transfer_args {transfer_args33,547 + name from;from34,573 + name to;to35,597 + asset quantity;quantity36,619 + std::string memo;memo37,647 + +contracts/test.inline/CMakeLists.txt,0 + +contracts/test.inline/test.inline.hpp,333 +namespace eosio {eosio5,106 + class testinline : public contract {testinline7,125 + testinline( action_name self ):contract(self){}testinline9,179 + void reqauth( account_name from ) {reqauth11,237 + void forward( action_name reqauth, account_name forward_code, account_name forward_authforward15,328 + +contracts/test.inline/test.inline.cpp,0 + +contracts/multi_index_test/multi_index_test.cpp,1446 +namespace multi_index_test {multi_index_test7,126 + struct limit_order {limit_order9,156 + uint64_t id;id10,180 + uint64_t padding = 0;padding11,200 + uint128_t price;price12,229 + uint64_t expiration;expiration13,252 + name owner;owner14,280 + auto primary_key()const { return id; }primary_key16,304 + uint64_t get_expiration()const { return expiration; }get_expiration17,349 + uint128_t get_price()const { return price; }get_price18,409 + struct test_k256 {test_k25623,538 + uint64_t id;id24,560 + key256 val;val25,580 + auto primary_key()const { return id; }primary_key27,601 + key256 get_val()const { return val; }get_val28,646 +namespace multi_index_test {multi_index_test7,126 + struct limit_order {limit_order9,156 + uint64_t id;id10,180 + uint64_t padding = 0;padding11,200 + uint128_t price;price12,229 + uint64_t expiration;expiration13,252 + name owner;owner14,280 + auto primary_key()const { return id; }primary_key16,304 + uint64_t get_expiration()const { return expiration; }get_expiration17,349 + uint128_t get_price()const { return price; }get_price18,409 + struct test_k256 {test_k25623,538 + uint64_t id;id24,560 + key256 val;val25,580 + auto primary_key()const { return id; }primary_key27,601 + key256 get_val()const { return val; }get_val28,646 + +contracts/multi_index_test/CMakeLists.txt,52 +set( CMAKE_CXX_STANDARD 17 )CMAKE_CXX_STANDARD1,0 + +contracts/tic_tac_toe/CMakeLists.txt,0 + +contracts/tic_tac_toe/tic_tac_toe.hpp,974 +class tic_tac_toe : public eosio::contract {tic_tac_toe45,1846 + tic_tac_toe( account_name self ):contract(self){}tic_tac_toe47,1902 + struct game {game52,2054 + static const uint16_t board_width = 3;board_width53,2074 + static const uint16_t board_height = board_width;board_height54,2122 + game() { game55,2181 + account_name challenger;challenger58,2244 + account_name host;host59,2287 + account_name turn; // = account name of host/ challengerturn60,2324 + account_name winner = N(none); // = none/ draw/ name of host/ name of challengwinner61,2399 + std::vector board;board62,2498 + void initialize_board() {initialize_board65,2582 + void reset_game() {reset_game70,2725 + auto primary_key() const { return challenger; }primary_key76,2853 + typedef eosio::multi_index< N(games), game> games;games83,3105 + +contracts/tic_tac_toe/tic_tac_toe.cpp,955 +bool is_empty_cell(const uint8_t& cell) {is_empty_cell14,251 +bool is_valid_movement(const uint16_t& row, const uint16_t& column, const vector& boardis_valid_movement26,666 +account_name get_winner(const tic_tac_toe::game& current_game) {get_winner40,1390 +void tic_tac_toe::create(const account_name& challenger, const account_name& host) {create89,3427 + existing_host_games.emplace(host, [&]( auto& g ) {__anon232826fe010298,3824 +void tic_tac_toe::restart(const account_name& challenger, const account_name& host, const accounrestart108,4002 + existing_host_games.modify(itr, itr->host, []( auto& g ) {__anon232826fe0202120,4490 +void tic_tac_toe::close(const account_name& challenger, const account_name& host) {close128,4621 +void tic_tac_toe::move(const account_name& challenger, const account_name& host, const account_nmove143,5020 + existing_host_games.modify(itr, itr->host, [&]( auto& g ) {__anon232826fe0302165,6068 + +contracts/eosio.token/eosio.token.cpp,1141 +namespace eosio {eosio8,101 +void token::create( name issuer,create10,120 + statstable.emplace( _self, [&]( auto& s ) {__anonf6500f1e010224,661 +void token::issue( name to, asset quantity, string memo )issue32,843 + statstable.modify( st, same_payer, [&]( auto& s ) {__anonf6500f1e020250,1688 +void token::retire( asset quantity, string memo )retire63,2012 + statstable.modify( st, same_payer, [&]( auto& s ) {__anonf6500f1e030280,2707 +void token::transfer( name from,transfer87,2844 +void token::sub_balance( name owner, asset value ) {sub_balance113,3757 + from_acnts.modify( from, owner, [&]( auto& a ) {__anonf6500f1e0402119,4029 +void token::add_balance( name owner, asset value, name ram_payer )add_balance124,4123 + to_acnts.emplace( ram_payer, [&]( auto& a ){__anonf6500f1e0502129,4325 + to_acnts.modify( to, same_payer, [&]( auto& a ) {__anonf6500f1e0602133,4425 +void token::open( name owner, const symbol& symbol, name ram_payer )open139,4527 + acnts.emplace( ram_payer, [&]( auto& a ){__anonf6500f1e0702152,4983 +void token::close( name owner, const symbol& symbol )close158,5087 + +contracts/eosio.token/CMakeLists.txt,52 +set( CMAKE_CXX_STANDARD 17 )CMAKE_CXX_STANDARD1,0 + +contracts/eosio.token/eosio.token.hpp,148 +namespace eosiosystem {eosiosystem13,155 +namespace eosio {eosio17,208 +namespace eosiosystem {eosiosystem13,155 +namespace eosio {eosio17,208 + +contracts/test_api_mem/CMakeLists.txt,0 + +contracts/test_api_mem/test_memory.cpp,1694 +void verify_mem(const void* const ptr, const uint32_t val, const uint32_t size)verify_mem9,94 +void test_memory::test_memory_allocs()test_memory_allocs37,976 +void test_memory::test_memory_hunk()test_memory_hunk113,5567 +void test_memory::test_memory_hunks()test_memory_hunks120,5861 +void test_memory::test_memory_hunks_disjoint()test_memory_hunks_disjoint162,7861 +void test_memory::test_memset_memcpy()test_memset_memcpy239,11444 +void test_memory::test_memcpy_overlap_start()test_memcpy_overlap_start279,12391 +void test_memory::test_memcpy_overlap_end()test_memcpy_overlap_end288,12557 +void test_memory::test_memcmp()test_memcmp296,12720 +void test_memory::test_outofbound_0()test_outofbound_0314,13262 +void test_memory::test_outofbound_1()test_outofbound_1319,13368 +void test_memory::test_outofbound_2()test_outofbound_2324,13475 +void test_memory::test_outofbound_3()test_outofbound_3331,13645 +void test_memory_store() {test_memory_store338,13807 +void test_memory_load() {test_memory_load344,13915 +void test_memory::test_outofbound_4()test_outofbound_4350,14025 +void test_memory::test_outofbound_5()test_outofbound_5354,14098 +void test_memory::test_outofbound_6()test_outofbound_6358,14172 +void test_memory::test_outofbound_7()test_outofbound_7362,14244 +void test_memory::test_outofbound_8()test_outofbound_8366,14319 +void test_memory::test_outofbound_9()test_outofbound_9370,14391 +void test_memory::test_outofbound_10()test_outofbound_10374,14464 +void test_memory::test_outofbound_11()test_outofbound_11378,14536 +void test_memory::test_outofbound_12()test_outofbound_12383,14612 +void test_memory::test_outofbound_13()test_outofbound_13390,14771 + +contracts/test_api_mem/test_api_mem.cpp,86 + void apply( uint64_t /*receiver*/, uint64_t code, uint64_t action ) {apply12,204 + +contracts/test_api_mem/test_extended_memory.cpp,473 +void verify( const void* const ptr, const uint32_t val, const uint32_t size) {verify7,124 +#define PRINT_PTR(PRINT_PTR13,401 +void test_extended_memory::test_page_memory() {test_page_memory15,478 +void test_extended_memory::test_page_memory_exceeded() {test_page_memory_exceeded74,3193 +void test_extended_memory::test_page_memory_negative_bytes() {test_page_memory_negative_bytes92,4049 +void test_extended_memory::test_initial_buffer() {test_initial_buffer96,4236 + +contracts/payloadless/payloadless_rc.md,997 +### CLAUSE NAME: WarrantyCLAUSE NAME: Warranty1,0 +### CLAUSE NAME: DefaultCLAUSE NAME: Default4,311 +### CLAUSE NAME: RemediesCLAUSE NAME: Remedies7,443 +### CLAUSE NAME: Force MajeureCLAUSE NAME: Force Majeure10,987 +### CLAUSE NAME: Dispute ResolutionCLAUSE NAME: Dispute Resolution13,2145 +### CLAUSE NAME: Entire AgreementCLAUSE NAME: Entire Agreement16,2494 +### CLAUSE NAME: SeverabilityCLAUSE NAME: Severability19,2832 +### CLAUSE NAME: AmendmentCLAUSE NAME: Amendment22,3286 +### CLAUSE NAME: Governing LawCLAUSE NAME: Governing Law25,3488 +### CLAUSE NAME: NoticeCLAUSE NAME: Notice28,3610 +### CLAUSE NAME: Waiver of Contractual RightCLAUSE NAME: Waiver of Contractual Right30,3981 +### CLAUSE NAME: Arbitrator's Fees to Prevailing PartyCLAUSE NAME: Arbitrator's Fees to Prevailing Party33,4290 +### CLAUSE NAME: Construction and InterpretationCLAUSE NAME: Construction and Interpretation36,4629 +### CLAUSE NAME: In Witness WhereofCLAUSE NAME: In Witness Whereof39,4883 + +contracts/payloadless/CMakeLists.txt,52 +set( CMAKE_CXX_STANDARD 17 )CMAKE_CXX_STANDARD1,0 + +contracts/payloadless/payloadless.doit_rc.md,189 +# CONTRACT FOR payloadless::doitCONTRACT FOR payloadless::doit1,0 +## ACTION NAME: doitACTION NAME: doit3,34 +### ParametersParameters5,56 +### IntentIntent10,111 +### TermTerm13,243 + +contracts/payloadless/payloadless.cpp,0 + +contracts/stltest/CMakeLists.txt,44 +set(ABI_FILES "stltest.abi")ABI_FILES2,30 + +contracts/stltest/stltest.cpp,1249 +namespace stltest {stltest147,2663 + struct MSTR {MSTR149,2684 + MSTR() : x(7891) {MSTR150,2701 + int x;x153,2781 + ~MSTR() {~MSTR154,2794 + class contract {contract159,2855 + static const uint64_t sent_table_name = N(sent);sent_table_name161,2888 + static const uint64_t received_table_name = N(received);received_table_name162,2945 + struct message {message164,3011 + account_name from;from165,3036 + account_name to;to166,3067 + static uint64_t get_account() { return N(stltest); }get_account169,3122 + static uint64_t get_name() { return N(message); }get_name170,3187 + friend DataStream& operator << ( DataStream& ds, const message& m ){operator <<173,3293 + friend DataStream& operator >> ( DataStream& ds, message& m ){operator >>177,3486 + static void f(const char* __restrict, ...) {f182,3643 + static void on( const message& ) {on186,3739 + find_if(l.begin(), l.end(), [](uint32_t f) { return f < 10; });__anon680bdba80102250,5485 + static void apply( account_name c, action_name act) {apply255,5667 +void apply( uint64_t receiver, uint64_t code, uint64_t action ) {apply265,5920 + +contracts/snapshot_test/CMakeLists.txt,52 +set( CMAKE_CXX_STANDARD 17 )CMAKE_CXX_STANDARD1,0 + +contracts/snapshot_test/snapshot_test.cpp,1510 +namespace snapshot_test {snapshot_test6,91 + struct main_record {main_record8,118 + uint64_t id;id9,142 + double index_f64 = 0.0;index_f6410,164 + long double index_f128 = 0.0L;index_f12811,200 + uint64_t index_i64 = 0ULL;index_i6412,237 + uint128_t index_i128 = 0ULL;index_i12813,274 + key256 index_i256 = key256();index_i25614,311 + auto primary_key() const { return id; }primary_key16,353 + auto get_index_f64 () const { return index_f64 ; }get_index_f6418,400 + auto get_index_f128 () const { return index_f128; }get_index_f12819,458 + auto get_index_i64 () const { return index_i64 ; }get_index_i6420,516 + auto get_index_i128 () const { return index_i128; }get_index_i12821,574 + const key256& get_index_i256 () const { return index_i256; }get_index_i25622,632 + struct increment {increment27,809 + increment(): value(0) {}increment28,831 + increment(uint32_t v): value(v) {}increment29,862 + uint32_t value;value31,904 + using multi_index_type = eosio::multi_index<"data"_n, main_record,multi_index_type36,977 + static void exec( uint64_t self, uint32_t value ) {exec44,1579 + data.emplace( name{self}, [&]( auto& r ) {__anonaec09920010248,1753 + data.modify( current, name{self}, [&]( auto& r ) {__anonaec09920020258,2048 +namespace multi_index_test {multi_index_test70,2344 + void apply( uint64_t self, uint64_t code, uint64_t action ) {apply73,2467 + +contracts/test_api/test_transaction.cpp,3449 +struct test_action_action {test_action_action13,247 + static account_name get_account() {get_account14,275 + static action_name get_name() {get_name18,356 + eosio::vector data;data22,429 + friend DataStream& operator << ( DataStream& ds, const test_action_action& a ) {operator <<25,493 +struct test_dummy_action {test_dummy_action40,840 + static account_name get_account() {get_account41,867 + static action_name get_name() {get_name45,948 + char a;a48,1020 + unsigned long long b;b49,1031 + int32_t c;c50,1056 + friend DataStream& operator << ( DataStream& ds, const test_dummy_action& da ) {operator <<53,1105 + friend DataStream& operator >> ( DataStream& ds, test_dummy_action& da ) {operator >>61,1300 +void copy_data(char* data, size_t data_len, eosio::vector& data_out) {copy_data70,1476 +void test_transaction::send_action() {send_action75,1636 +void test_transaction::send_action_empty() {send_action_empty82,1981 +void test_transaction::send_action_large() {send_action_large94,2308 +void test_transaction::send_action_recurse() {send_action_recurse107,2791 +void test_transaction::send_action_inline_fail() {send_action_inline_fail122,3224 +void test_transaction::test_tapos_block_prefix() {test_tapos_block_prefix131,3496 +void test_transaction::test_tapos_block_num() {test_tapos_block_num138,3722 +void test_transaction::test_read_transaction() {test_read_transaction146,3940 +void test_transaction::test_transaction_size() {test_transaction_size157,4255 +void test_transaction::send_transaction(uint64_t receiver, uint64_t, uint64_t) {send_transaction165,4552 +void test_transaction::send_action_sender(uint64_t receiver, uint64_t, uint64_t) {send_action_sender177,5085 +void test_transaction::send_transaction_empty(uint64_t receiver, uint64_t, uint64_t) {send_transaction_empty189,5603 +void test_transaction::send_transaction_trigger_error_handler(uint64_t receiver, uint64_t, uint6send_transaction_trigger_error_handler197,5853 +void test_transaction::assert_false_error_handler(const eosio::transaction& dtrx) {assert_false_error_handler205,6229 +void test_transaction::send_transaction_large(uint64_t receiver, uint64_t, uint64_t) {send_transaction_large217,7005 +void test_transaction::deferred_print() {deferred_print235,7617 +void test_transaction::send_deferred_transaction(uint64_t receiver, uint64_t, uint64_t) {send_deferred_transaction239,7702 +void test_transaction::send_deferred_transaction_replace(uint64_t receiver, uint64_t, uint64_t) send_deferred_transaction_replace248,8113 +void test_transaction::send_deferred_tx_with_dtt_action() {send_deferred_tx_with_dtt_action257,8538 +void test_transaction::cancel_deferred_transaction_success() {cancel_deferred_transaction_success275,9205 +void test_transaction::cancel_deferred_transaction_not_found() {cancel_deferred_transaction_not_found281,9459 +void test_transaction::send_cf_action() {send_cf_action287,9736 +void test_transaction::send_cf_action_fail() {send_cf_action_fail294,9903 +void test_transaction::stateful_api() {stateful_api302,10200 +void test_transaction::context_free_api() {context_free_api307,10345 +void test_transaction::new_feature() {new_feature313,10510 +void test_transaction::active_new_feature() {active_new_feature317,10672 +void test_transaction::repeat_deferred_transaction(uint64_t receiver, uint64_t code, uint64_t acrepeat_deferred_transaction321,10766 + +contracts/test_api/test_chain.cpp,170 +struct producers {producers11,194 + char len;len12,213 + account_name producers[21];producers13,226 +void test_chain::test_activeprods() {test_activeprods17,279 + +contracts/test_api/test_api.cpp,135 +account_name global_receiver;global_receiver21,477 + void apply( uint64_t receiver, uint64_t code, uint64_t action ) {apply24,521 + +contracts/test_api/CMakeLists.txt,0 + +contracts/test_api/test_compiler_builtins.cpp,1212 + __int128 ret = 0;ret13,275 + size_t i = 0;i14,299 + bool sign = false;sign15,321 + const char c = lit[i];c26,500 + __int128 ret = 0;ret38,710 + size_t i = 0;i39,734 + bool sign = false;sign40,756 + const char c = lit[i];c51,935 +void test_compiler_builtins::test_multi3() {test_multi362,1079 +void test_compiler_builtins::test_divti3() {test_divti397,2327 +void test_compiler_builtins::test_divti3_by_0() {test_divti3_by_0141,3940 +void test_compiler_builtins::test_udivti3() {test_udivti3148,4105 +void test_compiler_builtins::test_udivti3_by_0() {test_udivti3_by_0192,5872 +void test_compiler_builtins::test_lshlti3() {test_lshlti3200,6049 +void test_compiler_builtins::test_ashlti3() {test_ashlti3235,7290 +void test_compiler_builtins::test_lshrti3() {test_lshrti3270,8501 +void test_compiler_builtins::test_ashrti3() {test_ashrti3297,9614 +void test_compiler_builtins::test_modti3() {test_modti3324,10685 +void test_compiler_builtins::test_modti3_by_0() {test_modti3_by_0353,11979 +void test_compiler_builtins::test_umodti3() {test_umodti3361,12196 +void test_compiler_builtins::test_umodti3_by_0() {test_umodti3_by_0390,13619 + +contracts/test_api/test_permission.cpp,818 +struct check_auth_msg {check_auth_msg18,343 + account_name account;account19,367 + permission_name permission;permission20,400 + std::vector pubkeys;pubkeys21,436 +void test_permission::check_authorization(uint64_t receiver, uint64_t code, uint64_t action) {check_authorization26,550 +struct test_permission_last_used_msg {test_permission_last_used_msg53,1715 + account_name account;account54,1754 + permission_name permission;permission55,1783 + int64_t last_used_time;last_used_time56,1815 +void test_permission::test_permission_last_used(uint64_t /* receiver */, uint64_t code, uint64_ttest_permission_last_used61,1948 +void test_permission::test_account_creation_time(uint64_t /* receiver */, uint64_t code, uint64_test_account_creation_time71,2333 + +contracts/test_api/test_checktime.cpp,897 +void test_checktime::checktime_pass() {checktime_pass13,190 +void test_checktime::checktime_failure() {checktime_failure21,319 +constexpr size_t size = 20000000;size31,563 +void test_checktime::checktime_sha1_failure() {checktime_sha1_failure33,598 +void test_checktime::checktime_assert_sha1_failure() {checktime_assert_sha1_failure39,728 +void test_checktime::checktime_sha256_failure() {checktime_sha256_failure45,872 +void test_checktime::checktime_assert_sha256_failure() {checktime_assert_sha256_failure51,1006 +void test_checktime::checktime_sha512_failure() {checktime_sha512_failure57,1154 +void test_checktime::checktime_assert_sha512_failure() {checktime_assert_sha512_failure63,1288 +void test_checktime::checktime_ripemd160_failure() {checktime_ripemd160_failure69,1436 +void test_checktime::checktime_assert_ripemd160_failure() {checktime_assert_ripemd160_failure75,1576 + +contracts/test_api/test_api_common.hpp,1682 +#define EOSLIB_SERIALIZE(EOSLIB_SERIALIZE10,164 +static constexpr unsigned int DJBH(const char* cp)DJBH13,202 +static constexpr unsigned long long WASM_TEST_ACTION(const char* cls, const char* method)WASM_TEST_ACTION21,363 +struct dummy_action {dummy_action27,587 + static uint64_t get_name() {get_name28,609 + static uint64_t get_account() {get_account31,676 + char a; //1a35,742 + uint64_t b; //8b36,756 + int32_t c; //4c37,774 +struct u128_action {u128_action42,843 + unsigned __int128 values[3]; //16*3values43,864 +struct cf_action {cf_action48,952 + static uint64_t get_name() {get_name49,971 + static uint64_t get_account() {get_account52,1035 + uint32_t payload = 100;payload56,1101 + uint32_t cfd_idx = 0; // context free data indexcfd_idx57,1134 +struct dtt_action {dtt_action63,1289 + static uint64_t get_name() {get_name64,1309 + static uint64_t get_account() {get_account67,1433 + uint64_t payer = N(testapi);payer71,1499 + uint64_t deferred_account = N(testapi);deferred_account72,1537 + uint64_t deferred_action = WASM_TEST_ACTION("test_transaction", "deferred_print");deferred_action73,1586 + uint64_t permission_name = N(active);permission_name74,1678 + uint32_t delay_sec = 2;delay_sec75,1725 +#define DUMMY_ACTION_DEFAULT_A DUMMY_ACTION_DEFAULT_A85,2026 +#define DUMMY_ACTION_DEFAULT_B DUMMY_ACTION_DEFAULT_B86,2062 +#define DUMMY_ACTION_DEFAULT_C DUMMY_ACTION_DEFAULT_C87,2112 +struct invalid_access_action {invalid_access_action89,2155 + uint64_t code;code90,2186 + uint64_t val;val91,2204 + uint32_t index;index92,2221 + bool store;store93,2240 + +contracts/test_api/test_types.cpp,217 +void test_types::types_size() {types_size9,116 +void test_types::char_to_symbol() {char_to_symbol25,866 +void test_types::string_to_name() {string_to_name65,3841 +void test_types::name_class() {name_class88,5831 + +contracts/test_api/test_action.cpp,1304 +void test_action::read_action_normal() {read_action_normal17,416 +void test_action::test_dummy_action() {test_dummy_action43,1425 +void test_action::read_action_to_0() {read_action_to_070,2681 +void test_action::read_action_to_64k() {read_action_to_64k74,2775 +void test_action::test_cf_action() {test_cf_action78,2882 +void test_action::require_notice(uint64_t receiver, uint64_t code, uint64_t action) {require_notice164,6582 +void test_action::require_notice_tests(uint64_t receiver, uint64_t code, uint64_t action) {require_notice_tests177,7043 +void test_action::require_auth() {require_auth188,7466 +void test_action::assert_false() {assert_false194,7601 +void test_action::assert_true() {assert_true198,7692 +void test_action::assert_true_cf() {assert_true_cf202,7780 +void test_action::test_abort() {test_abort206,7871 +void test_action::test_publication_time() {test_publication_time211,7966 +void test_action::test_current_receiver(uint64_t receiver, uint64_t code, uint64_t action) {test_current_receiver218,8265 +void test_action::test_current_time() {test_current_time226,8547 +void test_action::test_assert_code() {test_assert_code233,8814 +void test_action::test_ram_billing_in_notify(uint64_t receiver, uint64_t code, uint64_t action) test_ram_billing_in_notify240,9052 + +contracts/test_api/test_print.cpp,617 +void test_print::test_prints_l() {test_prints_l11,142 +void test_print::test_prints() {test_prints20,329 +void test_print::test_printi() {test_printi29,477 +void test_print::test_printui() {test_printui35,561 +void test_print::test_printi128() {test_printi12841,659 +void test_print::test_printui128() {test_printui12856,947 +void test_print::test_printn() {test_printn68,1165 +void test_print::test_printsf() {test_printsf81,1450 +void test_print::test_printdf() {test_printdf93,1664 +void test_print::test_printqf() {test_printqf105,1875 +void test_print::test_print_simple() {test_print_simple117,2110 + +contracts/test_api/test_api.hpp,908 +namespace eosio {eosio10,124 +#define WASM_TEST_HANDLER(WASM_TEST_HANDLER20,390 +#define WASM_TEST_HANDLER_EX(WASM_TEST_HANDLER_EX26,533 +#define WASM_TEST_ERROR_HANDLER(WASM_TEST_ERROR_HANDLER32,701 +struct test_types {test_types38,946 +struct test_print {test_print45,1090 +struct test_action {test_action59,1452 +struct test_db {test_db79,2284 +struct test_multi_index {test_multi_index97,3274 +struct test_crypto {test_crypto132,6322 +struct test_transaction {test_transaction155,7063 +struct test_chain {test_chain188,8692 +struct test_fixedpoint {test_fixedpoint192,8750 +struct test_compiler_builtins {test_compiler_builtins201,8988 +struct test_extended_memory {test_extended_memory217,9442 +struct test_memory {test_memory224,9635 +struct test_checktime {test_checktime249,10474 +struct test_permission {test_permission271,11133 +struct test_datastream {test_datastream277,11433 + +contracts/test_api/test_crypto.cpp,3336 +#define WASM_TEST_FAIL WASM_TEST_FAIL10,174 +static const char test1[] = "abc";test112,200 +static const unsigned char test1_ok_1[] = {test1_ok_113,235 +static const unsigned char test1_ok_256[] = { test1_ok_25619,411 +static const unsigned char test1_ok_512[] = {test1_ok_51226,661 +static const unsigned char test1_ok_ripe[] = {test1_ok_ripe37,1125 +const char test2[] = "";test243,1306 +static const unsigned char test2_ok_1[] = {test2_ok_144,1331 +const unsigned char test2_ok_256[] = { test2_ok_25650,1507 +const unsigned char test2_ok_512[] = {test2_ok_51257,1750 +const unsigned char test2_ok_ripe[] = {test2_ok_ripe68,2207 +static const char test3[] = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq";test374,2381 +static const unsigned char test3_ok_1[] = {test3_ok_175,2469 +static const unsigned char test3_ok_256[] = { test3_ok_25681,2645 +static const unsigned char test3_ok_512[] = {test3_ok_51288,2895 +static const unsigned char test3_ok_ripe[] = {test3_ok_ripe99,3359 +static const char test4[] = "abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmnhijklmnoijktest4105,3540 +static const unsigned char test4_ok_1[] = {test4_ok_1106,3684 +static const unsigned char test4_ok_256[] = {test4_ok_256112,3860 +static const unsigned char test4_ok_512[] = {test4_ok_512119,4109 +static const unsigned char test4_ok_ripe[] = {test4_ok_ripe130,4573 +static const char test5[] = "message digest";test5136,4754 +static const unsigned char test5_ok_1[] = {test5_ok_1137,4800 +static const unsigned char test5_ok_256[] = { test5_ok_256143,4976 +static const unsigned char test5_ok_512[] = {test5_ok_512150,5226 +static const unsigned char test5_ok_ripe[] = {test5_ok_ripe161,5690 + uint32_t my_strlen(const char *str) {my_strlen168,5883 + bool my_memcmp(void *s1, void *s2, uint32_t n)my_memcmp174,5993 +struct sig_hash_key {sig_hash_key188,6264 + checksum256 hash;hash189,6286 + public_key pk;pk190,6307 + signature sig;sig191,6325 +void test_crypto::test_recover_key_assert_true() {test_recover_key_assert_true194,6347 +void test_crypto::test_recover_key_assert_false() {test_recover_key_assert_false200,6577 +void test_crypto::test_recover_key() {test_recover_key207,6865 +void test_crypto::test_sha1() {test_sha1217,7226 +void test_crypto::test_sha256() {test_sha256233,7840 +void test_crypto::test_sha512() {test_sha512250,8481 +void test_crypto::test_ripemd160() {test_ripemd160267,9122 +void test_crypto::sha256_null() {sha256_null284,9794 +void test_crypto::sha1_no_data() {sha1_no_data290,9937 +void test_crypto::sha256_no_data() {sha256_no_data298,10135 +void test_crypto::sha512_no_data() {sha512_no_data306,10341 +void test_crypto::ripemd160_no_data() {ripemd160_no_data314,10547 +void test_crypto::assert_sha256_false() {assert_sha256_false323,10764 +void test_crypto::assert_sha256_true() {assert_sha256_true334,11022 +void test_crypto::assert_sha1_false() {assert_sha1_false351,11524 +void test_crypto::assert_sha1_true() {assert_sha1_true363,11777 +void test_crypto::assert_sha512_false() {assert_sha512_false380,12261 +void test_crypto::assert_sha512_true() {assert_sha512_true392,12520 +void test_crypto::assert_ripemd160_false() {assert_ripemd160_false409,13022 +void test_crypto::assert_ripemd160_true() {assert_ripemd160_true421,13290 + +contracts/test_api/test_datastream.cpp,778 +struct testtype {testtype9,131 + static void run(const T &v, const char *errmsg = "") {run10,149 +struct testtype {testtype22,430 + static void run(const double &v, const char *errmsg = "") {run23,456 +struct testtype {testtype35,736 + static void run(const float &v, const char *errmsg = "") {run36,761 +void test_datastream::test_basic()test_basic47,1034 + struct Pair {Pair66,1785 + int a;a67,1803 + double d;d68,1818 + bool operator==(const Pair &p) const { return a == p.a && std::abs(d - p.d) < 1e-20;} operator ==69,1836 + struct StaticArray {StaticArray73,1990 + int a[2];a74,2015 + bool operator==(const StaticArray &o) const { return a[0] == o.a[0] && a[1] == o.a[1]; }operator ==75,2033 + +contracts/test_api/test_fixedpoint.cpp,393 +void test_fixedpoint::create_instances()create_instances6,91 +void test_fixedpoint::test_addition()test_addition36,1285 +void test_fixedpoint::test_subtraction()test_subtraction56,1937 +void test_fixedpoint::test_multiplication()test_multiplication88,3072 +void test_fixedpoint::test_division()test_division109,3759 +void test_fixedpoint::test_division_by_0()test_division_by_0139,4654 + +contracts/hello/CMakeLists.txt,52 +set( CMAKE_CXX_STANDARD 17 )CMAKE_CXX_STANDARD1,0 + +contracts/hello/hello.hi_rc.md,169 +# CONTRACT FOR hello::hiCONTRACT FOR hello::hi1,0 +## ACTION NAME: hiACTION NAME: hi3,26 +### ParametersParameters5,46 +### IntentIntent14,218 +### TermTerm17,350 + +contracts/hello/hello.cpp,0 + +contracts/hello/hello_rc.md,997 +### CLAUSE NAME: WarrantyCLAUSE NAME: Warranty1,0 +### CLAUSE NAME: DefaultCLAUSE NAME: Default4,311 +### CLAUSE NAME: RemediesCLAUSE NAME: Remedies7,443 +### CLAUSE NAME: Force MajeureCLAUSE NAME: Force Majeure10,987 +### CLAUSE NAME: Dispute ResolutionCLAUSE NAME: Dispute Resolution13,2145 +### CLAUSE NAME: Entire AgreementCLAUSE NAME: Entire Agreement16,2494 +### CLAUSE NAME: SeverabilityCLAUSE NAME: Severability19,2832 +### CLAUSE NAME: AmendmentCLAUSE NAME: Amendment22,3286 +### CLAUSE NAME: Governing LawCLAUSE NAME: Governing Law25,3488 +### CLAUSE NAME: NoticeCLAUSE NAME: Notice28,3610 +### CLAUSE NAME: Waiver of Contractual RightCLAUSE NAME: Waiver of Contractual Right30,3981 +### CLAUSE NAME: Arbitrator's Fees to Prevailing PartyCLAUSE NAME: Arbitrator's Fees to Prevailing Party33,4290 +### CLAUSE NAME: Construction and InterpretationCLAUSE NAME: Construction and Interpretation36,4629 +### CLAUSE NAME: In Witness WhereofCLAUSE NAME: In Witness Whereof39,4883 + +contracts/test_api_db/test_db.cpp,3395 +int primary[11] = {0,1,2,3,4,5,6,7,8,9,10};primary10,259 +int secondary[11] = {7,0,1,3,6,9,10,2,4,5,8};secondary11,308 +int tertiary[11] = {0,10,1,2,4,3,5,6,7,8,9};tertiary12,357 +int primary_lb[11] = {0,0,0,3,3,3,6,7,7,9,9};primary_lb14,407 +int secondary_lb[11] = {0,0,10,0,10,10,0,7,8,0,10};secondary_lb15,455 +int tertiary_lb[11] = {0,1,2,3,2,5,6,7,8,9,0};tertiary_lb16,507 +int primary_ub[11] = {3,3,3,6,6,6,7,9,9,-1,-1};primary_ub18,556 +int secondary_ub[11] = {10,10,8,10,8,8,10,0,-1,10,8};secondary_ub19,606 +int tertiary_ub[11] = {1,2,3,5,3,6,7,8,9,-1,1};tertiary_ub20,660 +struct test_model {test_model23,732 + account_name name;name24,752 + unsigned char age;age25,775 + uint64_t phone;phone26,797 +struct test_model_v2 : test_model {test_model_v229,825 + test_model_v2() : new_field(0) {}test_model_v230,861 + uint64_t new_field;new_field31,897 +struct test_model_v3 : test_model_v2 {test_model_v334,923 + uint64_t another_field;another_field35,962 +struct TestModel128x2 {TestModel128x238,992 + uint128_t number;number39,1016 + uint128_t price;price40,1036 + uint64_t extra;extra41,1055 + uint64_t table_name;table_name42,1074 +struct TestModel128x2_V2 : TestModel128x2 {TestModel128x2_V245,1102 + uint64_t new_field;new_field46,1146 +struct TestModel3xi64 {TestModel3xi6449,1173 + uint64_t a;a50,1197 + uint64_t b;b51,1211 + uint64_t c;c52,1225 + uint64_t table;table53,1239 +struct TestModel3xi64_V2 : TestModel3xi64 {TestModel3xi64_V256,1261 + uint64_t new_field;new_field57,1305 +#define STRLEN(STRLEN62,1350 + void my_memset(void *vptr, unsigned char val, unsigned int size) {my_memset65,1395 + uint32_t my_strlen(const char *str) {my_strlen69,1540 + bool my_memcmp(void *s1, void *s2, uint32_t n) {my_memcmp74,1652 +void test_db::primary_i64_general(uint64_t receiver, uint64_t code, uint64_t action)primary_i64_general86,1930 +void test_db::primary_i64_lowerbound(uint64_t receiver, uint64_t code, uint64_t action)primary_i64_lowerbound183,5918 +void test_db::primary_i64_upperbound(uint64_t receiver, uint64_t code, uint64_t action)primary_i64_upperbound218,7485 +void test_db::idx64_general(uint64_t receiver, uint64_t code, uint64_t action)idx64_general245,8437 + typedef uint64_t secondary_type;secondary_type250,8586 + struct record {record252,8623 + uint64_t ssn;ssn253,8642 + secondary_type name;name254,8662 +void test_db::idx64_lowerbound(uint64_t receiver, uint64_t code, uint64_t action)idx64_lowerbound364,13672 + typedef uint64_t secondary_type;secondary_type368,13823 +void test_db::idx64_upperbound(uint64_t receiver, uint64_t code, uint64_t action)idx64_upperbound403,15262 + typedef uint64_t secondary_type;secondary_type407,15413 +void test_db::test_invalid_access(uint64_t receiver, uint64_t code, uint64_t action)test_invalid_access441,16785 +void test_db::idx_double_nan_create_fail(uint64_t receiver, uint64_t, uint64_t) {idx_double_nan_create_fail501,18720 +void test_db::idx_double_nan_modify_fail(uint64_t receiver, uint64_t, uint64_t) {idx_double_nan_modify_fail507,18927 +void test_db::idx_double_nan_lookup_fail(uint64_t receiver, uint64_t, uint64_t) {idx_double_nan_lookup_fail516,19258 +void test_db::misaligned_secondary_key256_tests(uint64_t /* receiver */, uint64_t, uint64_t) {misaligned_secondary_key256_tests542,20108 + +contracts/test_api_db/CMakeLists.txt,0 + +contracts/test_api_db/test_api_db.cpp,82 + void apply( uint64_t receiver, uint64_t code, uint64_t action ) {apply11,164 + +contracts/infinite/CMakeLists.txt,52 +set( CMAKE_CXX_STANDARD 17 )CMAKE_CXX_STANDARD1,0 + +contracts/infinite/infinite.cpp,61 + void apply( uint64_t, uint64_t, uint64_t ) {apply12,207 + +contracts/test_api_multi_index/CMakeLists.txt,0 + +contracts/test_api_multi_index/test_api_multi_index.cpp,82 + void apply( uint64_t receiver, uint64_t code, uint64_t action ) {apply12,174 + +contracts/test_api_multi_index/test_multi_index.cpp,8707 +namespace _test_multi_index {_test_multi_index11,261 + struct record_idx64 {record_idx6415,317 + uint64_t id;id16,342 + uint64_t sec;sec17,361 + auto primary_key()const { return id; }primary_key19,382 + uint64_t get_secondary()const { return sec; }get_secondary20,427 + struct record_idx128 {record_idx12825,537 + uint64_t id;id26,563 + uint128_t sec;sec27,583 + auto primary_key()const { return id; }primary_key29,605 + uint128_t get_secondary()const { return sec; }get_secondary30,650 + struct record_idx256 {record_idx25635,762 + uint64_t id;id36,788 + key256 sec;sec37,807 + auto primary_key()const { return id; }primary_key39,828 + const key256& get_secondary()const { return sec; }get_secondary40,873 + struct record_idx_double {record_idx_double45,989 + uint64_t id;id46,1019 + double sec;sec47,1038 + auto primary_key()const { return id; }primary_key49,1059 + double get_secondary()const { return sec; }get_secondary50,1104 + struct record_idx_long_double {record_idx_long_double55,1217 + uint64_t id;id56,1252 + long double sec;sec57,1271 + auto primary_key()const { return id; }primary_key59,1297 + long double get_secondary()const { return sec; }get_secondary60,1342 + void idx64_store_only(uint64_t receiver)idx64_store_only66,1497 + typedef record_idx64 record;record70,1576 + table.emplace( payer, [&]( auto& r ) {__anone7df4a9d010290,2284 + void idx64_check_without_storing(uint64_t receiver)idx64_check_without_storing98,2461 + typedef record_idx64 record;record102,2551 + auto new_person = table.emplace( payer, [&]( auto& r ) {__anone7df4a9d0202192,6506 + table.modify(new_person, payer, [&]( auto& r ) {__anone7df4a9d0302197,6638 + void idx64_require_find_fail(uint64_t receiver)idx64_require_find_fail211,7072 + typedef record_idx64 record;record214,7157 + void idx64_require_find_fail_with_msg(uint64_t receiver)idx64_require_find_fail_with_msg229,7612 + typedef record_idx64 record;record232,7706 + void idx64_require_find_sk_fail(uint64_t receiver)idx64_require_find_sk_fail247,8201 + typedef record_idx64 record;record250,8289 + void idx64_require_find_sk_fail_with_msg(uint64_t receiver)idx64_require_find_sk_fail_with_msg266,8922 + typedef record_idx64 record;record269,9019 + void idx128_store_only(uint64_t receiver)idx128_store_only285,9677 + typedef record_idx128 record;record289,9757 + table.emplace( payer, [&]( auto& r ) {__anone7df4a9d0402300,10089 + void idx128_check_without_storing(uint64_t receiver)idx128_check_without_storing308,10278 + typedef record_idx128 record;record312,10369 + table.modify(table.get(3), payer, [&]( auto& r ) {__anone7df4a9d0502323,10719 + auto idx64_table(uint64_t receiver)idx64_table347,11797 + typedef record_idx64 record;record350,11870 +void test_multi_index::idx64_store_only(uint64_t receiver, uint64_t code, uint64_t action)idx64_store_only360,12171 +void test_multi_index::idx64_check_without_storing(uint64_t receiver, uint64_t code, uint64_t acidx64_check_without_storing365,12333 +void test_multi_index::idx64_general(uint64_t receiver, uint64_t code, uint64_t action)idx64_general370,12517 +void test_multi_index::idx128_store_only(uint64_t receiver, uint64_t code, uint64_t action)idx128_store_only376,12753 +void test_multi_index::idx128_check_without_storing(uint64_t receiver, uint64_t code, uint64_t aidx128_check_without_storing381,12917 +void test_multi_index::idx128_general(uint64_t receiver, uint64_t code, uint64_t action)idx128_general386,13103 +void test_multi_index::idx64_require_find_fail(uint64_t receiver, uint64_t code, uint64_t actionidx64_require_find_fail392,13342 +void test_multi_index::idx64_require_find_fail_with_msg(uint64_t receiver, uint64_t code, uint64idx64_require_find_fail_with_msg398,13584 +void test_multi_index::idx64_require_find_sk_fail(uint64_t receiver, uint64_t code, uint64_t actidx64_require_find_sk_fail404,13844 +void test_multi_index::idx64_require_find_sk_fail_with_msg(uint64_t receiver, uint64_t code, uinidx64_require_find_sk_fail_with_msg410,14092 +void test_multi_index::idx128_autoincrement_test(uint64_t receiver, uint64_t code, uint64_t actiidx128_autoincrement_test416,14358 + typedef record_idx128 record;record421,14525 + table.emplace( payer, [&]( auto& r ) {__anone7df4a9d0602431,14830 + table.emplace( payer, [&]( auto& r) {__anone7df4a9d0702455,15646 +void test_multi_index::idx128_autoincrement_test_part1(uint64_t receiver, uint64_t code, uint64_idx128_autoincrement_test_part1464,15903 + typedef record_idx128 record;record469,16076 + table.emplace( payer, [&]( auto& r ) {__anone7df4a9d0802479,16381 +void test_multi_index::idx128_autoincrement_test_part2(uint64_t receiver, uint64_t code, uint64_idx128_autoincrement_test_part2497,16939 + typedef record_idx128 record;record502,17112 + table.emplace( payer, [&]( auto& r) {__anone7df4a9d0902519,17702 + table.emplace( payer, [&]( auto& r ) {__anone7df4a9d0a02526,17912 + table.emplace( payer, [&]( auto& r) {__anone7df4a9d0b02544,18635 +void test_multi_index::idx256_general(uint64_t receiver, uint64_t code, uint64_t action)idx256_general553,18898 + typedef record_idx256 record;record558,19054 + table.emplace( payer, [&]( auto& o ) {__anone7df4a9d0c02572,19647 + table.emplace( payer, [&]( auto& o ) {__anone7df4a9d0d02577,19738 + table.emplace( payer, [&]( auto& o ) {__anone7df4a9d0e02582,19835 +void test_multi_index::idx_double_general(uint64_t receiver, uint64_t code, uint64_t action)idx_double_general659,23061 + typedef record_idx_double record;record664,23221 + table.emplace( payer, [&]( auto& o ) {__anone7df4a9d0f02680,23740 +void test_multi_index::idx_long_double_general(uint64_t receiver, uint64_t code, uint64_t actionidx_long_double_general714,24943 + typedef record_idx_long_double record;record719,25108 + table.emplace( payer, [&]( auto& o ) {__anone7df4a9d1002737,25810 +void test_multi_index::idx64_pk_iterator_exceed_end(uint64_t receiver, uint64_t code, uint64_t aidx64_pk_iterator_exceed_end771,27058 +void test_multi_index::idx64_sk_iterator_exceed_end(uint64_t receiver, uint64_t code, uint64_t aidx64_sk_iterator_exceed_end779,27319 +void test_multi_index::idx64_pk_iterator_exceed_begin(uint64_t receiver, uint64_t code, uint64_tidx64_pk_iterator_exceed_begin787,27608 +void test_multi_index::idx64_sk_iterator_exceed_begin(uint64_t receiver, uint64_t code, uint64_tidx64_sk_iterator_exceed_begin795,27877 +void test_multi_index::idx64_pass_pk_ref_to_other_table(uint64_t receiver, uint64_t code, uint64idx64_pass_pk_ref_to_other_table803,28174 +void test_multi_index::idx64_pass_sk_ref_to_other_table(uint64_t receiver, uint64_t code, uint64idx64_pass_sk_ref_to_other_table815,28724 +void test_multi_index::idx64_pass_pk_end_itr_to_iterator_to(uint64_t receiver, uint64_t code, uiidx64_pass_pk_end_itr_to_iterator_to828,29347 +void test_multi_index::idx64_pass_pk_end_itr_to_modify(uint64_t receiver, uint64_t code, uint64_idx64_pass_pk_end_itr_to_modify836,29634 + table.modify(end_itr, payer, [](auto&){});__anone7df4a9d1102843,29908 +void test_multi_index::idx64_pass_pk_end_itr_to_erase(uint64_t receiver, uint64_t code, uint64_tidx64_pass_pk_end_itr_to_erase846,29957 +void test_multi_index::idx64_pass_sk_end_itr_to_iterator_to(uint64_t receiver, uint64_t code, uiidx64_pass_sk_end_itr_to_iterator_to855,30232 +void test_multi_index::idx64_pass_sk_end_itr_to_modify(uint64_t receiver, uint64_t code, uint64_idx64_pass_sk_end_itr_to_modify865,30583 + sec_index.modify(end_itr, payer, [](auto&){});__anone7df4a9d1202873,30916 +void test_multi_index::idx64_pass_sk_end_itr_to_erase(uint64_t receiver, uint64_t code, uint64_tidx64_pass_sk_end_itr_to_erase877,30970 +void test_multi_index::idx64_modify_primary_key(uint64_t receiver, uint64_t code, uint64_t actioidx64_modify_primary_key887,31308 + table.modify(pk_itr, payer, [](auto& r){__anone7df4a9d1302897,31712 +void test_multi_index::idx64_run_out_of_avl_pk(uint64_t receiver, uint64_t code, uint64_t actionidx64_run_out_of_avl_pk902,31785 + table.emplace( payer, [&]( auto& r ) {__anone7df4a9d1402911,32170 + table.emplace( payer, [&]( auto& r ) {__anone7df4a9d1502917,32422 +void test_multi_index::idx64_sk_cache_pk_lookup(uint64_t receiver, uint64_t code, uint64_t actioidx64_sk_cache_pk_lookup926,32593 +void test_multi_index::idx64_pk_cache_sk_lookup(uint64_t receiver, uint64_t code, uint64_t actioidx64_pk_cache_sk_lookup939,33210 + +externals/magic_get/misc/generate_cpp17.py,472 +ascii_letters = string.ascii_letters.replace("o", "").replace("O", "").replace("i", "").replace(ascii_letters14,468 +PROLOGUE = """// Copyright (c) 2016-2017 Antony PolukhinPROLOGUE16,591 +EPILOGUE = """EPILOGUE66,2395 +generate_sfinae_attempts = Falsegenerate_sfinae_attempts81,2943 +indexes = " a"indexes93,3188 +funcs_count = 100 if len(sys.argv) == 1 else int(sys.argv[1])funcs_count95,3221 +max_args_on_a_line = len(ascii_letters)max_args_on_a_line96,3283 + +externals/magic_get/test/flat/flat_tuple_size.cpp,152 +int main() {main8,236 + struct foo { int i; char c;};foo9,249 + struct foo { int i; char c;};i9,249 + struct foo { int i; char c;};c9,249 + +externals/magic_get/test/flat/flat_motivating_example.cpp,152 +struct my_struct { // no ostream operator defined!my_struct5,65 + int i;i6,116 + char c;c7,127 + double d;d8,139 +int main() {main11,157 + +externals/magic_get/test/flat/flat_for_each_field.cpp,523 +int main() {main9,279 + struct nested { int i; short data[3]; };nested10,292 + struct nested { int i; short data[3]; };i10,292 + struct nested { int i; short data[3]; };data10,292 + struct foo { int i; nested n; };foo11,337 + struct foo { int i; nested n; };i11,337 + struct foo { int i; nested n; };n11,337 + boost::pfr::flat_for_each_field(foo{1, {2, {3, 4, 5}}}, [&sum](auto v) {__anonaffb7b8c010213,399 + boost::pfr::flat_for_each_field(array, [&sum](auto v) {__anonaffb7b8c020220,589 + +externals/magic_get/test/flat/core.cpp,6381 +void print(T& f) {print24,600 +struct make_my_life_harder { int a0; short a1; };make_my_life_harder31,740 +struct make_my_life_harder { int a0; short a1; };a031,740 +struct make_my_life_harder { int a0; short a1; };a131,740 +struct make_my_life_even_more_harder { unsigned int b0; unsigned short b1; make_my_life_harder cmake_my_life_even_more_harder32,790 +struct make_my_life_even_more_harder { unsigned int b0; unsigned short b1; make_my_life_harder cb032,790 +struct make_my_life_even_more_harder { unsigned int b0; unsigned short b1; make_my_life_harder cb132,790 +struct make_my_life_even_more_harder { unsigned int b0; unsigned short b1; make_my_life_harder ccr32,790 +struct foo {foo33,891 + unsigned char v0;v034,904 + unsigned int v1;v135,926 + unsigned short v2;v236,947 + unsigned long long v3;v337,970 + unsigned char v4and5[2];v4and538,997 + int v6;v639,1026 + std::size_t v7;v740,1038 + int* v8;v841,1058 + const void* v9;v942,1071 + int const**const volatile**volatile** v10;v1043,1091 + const double v11;v1144,1138 + make_my_life_harder v12and13;v12and1345,1160 + make_my_life_even_more_harder v14and15andv16and17;v14and15andv16and1746,1194 +void test_print() {test_print49,1253 +void test_runtime(const foo& f) {test_runtime73,1993 +void test_compiletime() {test_compiletime95,2985 +constexpr void test_compiletime_array() {test_compiletime_array119,5148 +void test_with_enums() {test_with_enums140,6245 + enum class my_enum: unsigned {my_enum141,6270 + VALUE1 = 17, VALUE2, VALUE3VALUE1142,6305 + VALUE1 = 17, VALUE2, VALUE3VALUE2142,6305 + VALUE1 = 17, VALUE2, VALUE3VALUE3142,6305 + struct my_struct { my_enum e; int i; short s; };my_struct144,6348 + struct my_struct { my_enum e; int i; short s; };e144,6348 + struct my_struct { my_enum e; int i; short s; };i144,6348 + struct my_struct { my_enum e; int i; short s; };s144,6348 +void test_comparable_struct() {test_comparable_struct191,7757 + struct comparable_struct {comparable_struct192,7789 + int i; short s; char data[50]; bool bl; int a,b,c,d,e,f;i193,7820 + int i; short s; char data[50]; bool bl; int a,b,c,d,e,f;s193,7820 + int i; short s; char data[50]; bool bl; int a,b,c,d,e,f;data193,7820 + int i; short s; char data[50]; bool bl; int a,b,c,d,e,f;bl193,7820 + int i; short s; char data[50]; bool bl; int a,b,c,d,e,f;a193,7820 + int i; short s; char data[50]; bool bl; int a,b,c,d,e,f;b193,7820 + int i; short s; char data[50]; bool bl; int a,b,c,d,e,f;c193,7820 + int i; short s; char data[50]; bool bl; int a,b,c,d,e,f;d193,7820 + int i; short s; char data[50]; bool bl; int a,b,c,d,e,f;e193,7820 + int i; short s; char data[50]; bool bl; int a,b,c,d,e,f;f193,7820 +void test_empty_struct() {test_empty_struct224,8615 + struct empty {};empty225,8642 +void test_pods_with_int_operators() {test_pods_with_int_operators234,8774 +void test_struct_with_single_field() {test_struct_with_single_field246,8989 + struct f1 { int i; };f1247,9028 + struct f1 { int i; };i247,9028 +void test_with_contatiners() {test_with_contatiners268,9495 + struct testing { bool b1, b2; int i; };testing269,9526 + struct testing { bool b1, b2; int i; };b1269,9526 + struct testing { bool b1, b2; int i; };b2269,9526 + struct testing { bool b1, b2; int i; };i269,9526 + struct testing2 { bool b1, b2; int i; };testing2270,9570 + struct testing2 { bool b1, b2; int i; };b1270,9570 + struct testing2 { bool b1, b2; int i; };b2270,9570 + struct testing2 { bool b1, b2; int i; };i270,9570 +void test_with_user_defined_constructor() {test_with_user_defined_constructor299,10457 + struct pr {pr300,10501 + int i;i301,10517 + short s;s302,10532 + pr(int ii, short is) noexceptpr307,10635 +void test_hash() {test_hash317,10795 + struct almost_pair { int i; short s; };almost_pair318,10814 + struct almost_pair { int i; short s; };i318,10814 + struct almost_pair { int i; short s; };s318,10814 + struct single_field { int i; };single_field331,11243 + struct single_field { int i; };i331,11243 +void test_alignment_with_nested_structure() {test_alignment_with_nested_structure337,11462 + struct A0 {A0338,11508 + short s;s339,11524 + char c;c340,11541 + struct B0 {B0343,11565 + A0 a;a344,11581 + char c1;c1345,11595 + char c2;c2346,11612 +void test_and_debug_internals(std::index_sequence) {test_and_debug_internals364,12047 + struct A0 {A0365,12106 + short s;s366,12122 + char c;c367,12139 + struct A1 {A1374,12290 + int i;i375,12306 + struct B1 {B1378,12329 + A1 a;a379,12345 + int j;j380,12359 +void another_test_with_unusual_alignment() {another_test_with_unusual_alignment436,14347 + struct nested {nested437,14392 + char c0;c0438,14412 + char c1;c1439,14429 + int i0;i0440,14446 + short s0;s0441,14462 + char c2;c2442,14480 + struct pair {pair445,14505 + nested n0;n0446,14523 + nested n1;n1447,14542 +void test_structure_with_default_values() {test_structure_with_default_values493,16157 + struct test_me {test_me494,16201 + int i = 2;i495,16222 + short s = 14;s496,16241 +void test_st_layout_structure_with_non_constexpr_type() {test_st_layout_structure_with_non_constexpr_type506,16402 +void test_structure_with_user_provided_default_constructor() {test_structure_with_user_provided_default_constructor534,17267 + struct test_me {test_me535,17330 + short s = 2;s536,17351 + constexpr test_me(short){}test_me537,17372 +int main() {main625,19597 + struct non_pod1 {non_pod1663,20550 + std::string s;s664,20572 + std::vector v;v665,20595 + int i;i666,20623 + struct foo {foo668,20639 + std::string s2;s2669,20660 + } f;f670,20688 + struct non_pod2 {non_pod2675,20794 + unsigned ui1: 1;ui1676,20816 + unsigned ui2: 2;ui2677,20841 + std::string s;s679,20867 + std::vector v;v680,20890 + int i;i681,20918 + struct foo {foo683,20934 + std::string s2;s2684,20955 + } f;f685,20983 + +externals/magic_get/test/flat/flat_motivating_example2.cpp,135 +struct my_struct { // no ostream operator defined!my_struct4,46 + std::string s;s5,97 + int i;i6,116 +int main() {main9,131 + +externals/magic_get/test/flat/flat_tuple_size_on_bitfields.cpp,250 +struct bf {bf9,279 + unsigned int i1: 1;i110,291 + unsigned int i2: 1;i211,315 + unsigned int i3: 1;i312,339 + unsigned int i4: 1;i413,363 + unsigned int i5: 1;i514,387 + unsigned int i6: 1;i615,411 +int main() {main18,439 + +externals/magic_get/test/flat/flat_tuple_size_on_non_aggregate.cpp,25 +int main() {main11,297 + +externals/magic_get/test/precise/motivating_example2.cpp,136 +struct my_struct { // no ostream operator defined!my_struct4,54 + std::string s;s5,105 + int i;i6,124 +int main() {main9,139 + +externals/magic_get/test/precise/motivating_example0.cpp,137 +struct some_person {some_person5,72 + std::string name;name6,93 + unsigned birth_year;birth_year7,115 +int main() {main10,144 + +externals/magic_get/test/precise/tuple_size.cpp,602 +int main() {main8,239 + struct nested { int i; char data[20]; };nested9,252 + struct nested { int i; char data[20]; };i9,252 + struct nested { int i; char data[20]; };data9,252 + struct foo { int i; char c; nested n; };foo10,297 + struct foo { int i; char c; nested n; };i10,297 + struct foo { int i; char c; nested n; };c10,297 + struct foo { int i; char c; nested n; };n10,297 + struct with_reference { int& i; char data; };with_reference13,402 + struct with_reference { int& i; char data; };i13,402 + struct with_reference { int& i; char data; };data13,402 + +externals/magic_get/test/precise/bitfields.cpp,250 +struct bf {bf9,282 + unsigned int i1: 1;i110,294 + unsigned int i2: 1;i211,318 + unsigned int i3: 1;i312,342 + unsigned int i4: 1;i413,366 + unsigned int i5: 1;i514,390 + unsigned int i6: 1;i615,414 +int main() {main18,442 + +externals/magic_get/test/precise/motivating_example.cpp,152 +struct my_struct { // no ostream operator defined!my_struct5,73 + int i;i6,124 + char c;c7,135 + double d;d8,147 +int main() {main11,165 + +externals/magic_get/test/precise/get_non_default_constructible.cpp,279 +struct non_default_constructible {non_default_constructible10,291 + T val_;val_11,326 + template non_default_constructible(U&& v){}non_default_constructible14,381 +struct Foo {Foo17,443 + non_default_constructible a;a18,456 +int main() {main21,498 + +externals/magic_get/test/precise/optional_like.cpp,219 +struct optional_like {optional_like10,291 + T val_;val_11,314 + template optional_like(U&& v){}optional_like14,358 +struct Foo {Foo17,408 + optional_like a;a18,421 +int main() {main21,451 + +externals/magic_get/test/precise/non_aggregate.cpp,25 +int main() {main11,300 + +externals/magic_get/test/precise/for_each_field.cpp,1306 +enum class color {color12,352 + red,red13,371 + green,green14,380 + blueblue15,391 +std::ostream& operator <<(std::ostream& os, color c) {operator <<18,404 +struct my_constexpr {my_constexpr35,715 + constexpr my_constexpr() {}my_constexpr36,737 +std::ostream& operator <<(std::ostream& os, my_constexpr) {operator <<39,773 +struct reg {reg43,859 + const int a;a44,872 + char b;b45,889 + const my_constexpr d;d46,901 + const color f;f47,927 + const char* g;g48,946 +struct simple {simple51,969 + int a;a52,985 + char b;b53,996 + short d;d54,1008 +int main () {main58,1026 + boost::pfr::for_each_field(v, [&control](auto&& val, std::size_t i) {__anonb167d7aa010262,1086 + boost::pfr::for_each_field(array, [&control](auto&& val, std::size_t i) {__anonb167d7aa020271,1315 + boost::pfr::for_each_field(reg{42, 'a', {}, color::green, "hello world!"}, [&ss](auto&& val,__anonb167d7aa030279,1534 + boost::pfr::for_each_field(reg{42, 'a', {}, color::green, "hello world!"}, [&ss, &control](a__anonb167d7aa040289,1836 + boost::pfr::for_each_field(reg{42, 'a', {}, color::green, "hello world!"}, [&ss](auto&& val)__anonb167d7aa0502100,2215 + boost::pfr::for_each_field(simple{42, 'a', 3}, [&ss](auto&& val) {__anonb167d7aa0602107,2461 + +externals/magic_get/test/common/functions_for.cpp,1446 +# define BOOST_PFR_TEST_FUNCTIONS_FOR BOOST_PFR_TEST_FUNCTIONS_FOR8,274 +# define BOOST_PFR_TEST_FUNCTIONS_FOR BOOST_PFR_TEST_FUNCTIONS_FOR11,431 +struct adl_hash {adl_hash28,757 + std::size_t operator()(const T& val) const {operator ()30,798 +struct comparable_struct {comparable_struct36,920 + int i; short s; bool bl; int a,b,c,d,e,f;i37,947 + int i; short s; bool bl; int a,b,c,d,e,f;s37,947 + int i; short s; bool bl; int a,b,c,d,e,f;bl37,947 + int i; short s; bool bl; int a,b,c,d,e,f;a37,947 + int i; short s; bool bl; int a,b,c,d,e,f;b37,947 + int i; short s; bool bl; int a,b,c,d,e,f;c37,947 + int i; short s; bool bl; int a,b,c,d,e,f;d37,947 + int i; short s; bool bl; int a,b,c,d,e,f;e37,947 + int i; short s; bool bl; int a,b,c,d,e,f;f37,947 +BOOST_PFR_TEST_FUNCTIONS_FOR(comparable_struct)BOOST_PFR_TEST_FUNCTIONS_FOR40,997 +struct empty { operator std::string() { return "empty{}"; } };empty70,1754 +BOOST_PFR_TEST_FUNCTIONS_FOR(empty)BOOST_PFR_TEST_FUNCTIONS_FOR71,1817 +namespace foo {foo77,1921 + struct testing { bool b1, b2; int i; };testing78,1937 + struct testing { bool b1, b2; int i; };b178,1937 + struct testing { bool b1, b2; int i; };b278,1937 + struct testing { bool b1, b2; int i; };i78,1937 +void test_with_contatiners() {test_with_contatiners83,2055 +void test_implicit_conversions() {test_implicit_conversions98,2466 +int main() {main108,2783 + +externals/magic_get/test/common/ops.cpp,1573 +#define BOOST_PFR_TEST_NAMESPECE BOOST_PFR_TEST_NAMESPECE18,416 +#define BOOST_PFR_TEST_NAMESPECE BOOST_PFR_TEST_NAMESPECE23,545 +void test_comparable_struct() {test_comparable_struct28,622 +void test_empty_struct() {test_empty_struct57,1310 + struct empty {};empty58,1337 +void test_implicit_conversions() {test_implicit_conversions64,1469 +namespace foo {foo72,1681 +struct comparable_struct {comparable_struct73,1697 + int i; short s; bool bl; int a,b,c,d,e,f;i74,1724 + int i; short s; bool bl; int a,b,c,d,e,f;s74,1724 + int i; short s; bool bl; int a,b,c,d,e,f;bl74,1724 + int i; short s; bool bl; int a,b,c,d,e,f;a74,1724 + int i; short s; bool bl; int a,b,c,d,e,f;b74,1724 + int i; short s; bool bl; int a,b,c,d,e,f;c74,1724 + int i; short s; bool bl; int a,b,c,d,e,f;d74,1724 + int i; short s; bool bl; int a,b,c,d,e,f;e74,1724 + int i; short s; bool bl; int a,b,c,d,e,f;f74,1724 +int main() {main78,1776 + struct local_comparable_struct {local_comparable_struct81,1844 + int i; short s; bool bl; int a,b,c,d,e,f;i82,1881 + int i; short s; bool bl; int a,b,c,d,e,f;s82,1881 + int i; short s; bool bl; int a,b,c,d,e,f;bl82,1881 + int i; short s; bool bl; int a,b,c,d,e,f;a82,1881 + int i; short s; bool bl; int a,b,c,d,e,f;b82,1881 + int i; short s; bool bl; int a,b,c,d,e,f;c82,1881 + int i; short s; bool bl; int a,b,c,d,e,f;d82,1881 + int i; short s; bool bl; int a,b,c,d,e,f;e82,1881 + int i; short s; bool bl; int a,b,c,d,e,f;f82,1881 + +externals/magic_get/test/common/std_interactions.cpp,368 +# define BOOST_PFR_TEST_FUNCTION(BOOST_PFR_TEST_FUNCTION9,272 +# define BOOST_PFR_TEST_FUNCTION(BOOST_PFR_TEST_FUNCTION12,405 +namespace helper {helper19,551 + decltype(auto) get(T&& v) {get21,608 +int main() {main26,709 + struct foo { int i; short s;};foo29,775 + struct foo { int i; short s;};i29,775 + struct foo { int i; short s;};s29,775 + +externals/magic_get/test/common/non_default_constructible.cpp,2805 +struct X {X14,388 + X(int) {}X15,399 +struct S { X x0; X x1; int x2; X x3; };S17,416 +struct S { X x0; X x1; int x2; X x3; };x017,416 +struct S { X x0; X x1; int x2; X x3; };x117,416 +struct S { X x0; X x1; int x2; X x3; };x217,416 +struct S { X x0; X x1; int x2; X x3; };x317,416 +int main() {main19,457 + struct S5_0 { int x0; int x1; int x2; int x3; X x4; };S5_023,558 + struct S5_0 { int x0; int x1; int x2; int x3; X x4; };x023,558 + struct S5_0 { int x0; int x1; int x2; int x3; X x4; };x123,558 + struct S5_0 { int x0; int x1; int x2; int x3; X x4; };x223,558 + struct S5_0 { int x0; int x1; int x2; int x3; X x4; };x323,558 + struct S5_0 { int x0; int x1; int x2; int x3; X x4; };x423,558 + struct S5_1 { X x0; int x1; int x2; int x3; int x4; };S5_126,678 + struct S5_1 { X x0; int x1; int x2; int x3; int x4; };x026,678 + struct S5_1 { X x0; int x1; int x2; int x3; int x4; };x126,678 + struct S5_1 { X x0; int x1; int x2; int x3; int x4; };x226,678 + struct S5_1 { X x0; int x1; int x2; int x3; int x4; };x326,678 + struct S5_1 { X x0; int x1; int x2; int x3; int x4; };x426,678 + struct S5_2 { int x0; int x1; X x2; int x3; int x4; };S5_229,798 + struct S5_2 { int x0; int x1; X x2; int x3; int x4; };x029,798 + struct S5_2 { int x0; int x1; X x2; int x3; int x4; };x129,798 + struct S5_2 { int x0; int x1; X x2; int x3; int x4; };x229,798 + struct S5_2 { int x0; int x1; X x2; int x3; int x4; };x329,798 + struct S5_2 { int x0; int x1; X x2; int x3; int x4; };x429,798 + struct S5_3 { int x0; int x1; X x2; int x3; X x4; };S5_332,918 + struct S5_3 { int x0; int x1; X x2; int x3; X x4; };x032,918 + struct S5_3 { int x0; int x1; X x2; int x3; X x4; };x132,918 + struct S5_3 { int x0; int x1; X x2; int x3; X x4; };x232,918 + struct S5_3 { int x0; int x1; X x2; int x3; X x4; };x332,918 + struct S5_3 { int x0; int x1; X x2; int x3; X x4; };x432,918 + struct S5_4 { X x0; X x1; X x2; X x3; X x4; };S5_435,1036 + struct S5_4 { X x0; X x1; X x2; X x3; X x4; };x035,1036 + struct S5_4 { X x0; X x1; X x2; X x3; X x4; };x135,1036 + struct S5_4 { X x0; X x1; X x2; X x3; X x4; };x235,1036 + struct S5_4 { X x0; X x1; X x2; X x3; X x4; };x335,1036 + struct S5_4 { X x0; X x1; X x2; X x3; X x4; };x435,1036 + struct S6 { X x0; X x1; X x2; X x3; X x4; X x5;};S638,1148 + struct S6 { X x0; X x1; X x2; X x3; X x4; X x5;};x038,1148 + struct S6 { X x0; X x1; X x2; X x3; X x4; X x5;};x138,1148 + struct S6 { X x0; X x1; X x2; X x3; X x4; X x5;};x238,1148 + struct S6 { X x0; X x1; X x2; X x3; X x4; X x5;};x338,1148 + struct S6 { X x0; X x1; X x2; X x3; X x4; X x5;};x438,1148 + struct S6 { X x0; X x1; X x2; X x3; X x4; X x5;};x538,1148 + +externals/magic_get/test/common/non_std_layout.cpp,295 +struct non_standard_layout_member {non_standard_layout_member15,389 + int i = 0;i17,434 + int j = 1;j20,458 +struct test_with_non_st_layout {test_with_non_st_layout23,477 + non_standard_layout_member m;m24,510 + double d;d25,544 + float f;f26,558 +int main() {main29,575 + +externals/magic_get/test/common/fields_count_on_const.cpp,103 +struct some_struct {some_struct8,241 + int i;i9,262 + int j;j10,273 +int main() {main13,288 + +externals/magic_get/test/common/private_fields.cpp,161 +class test_with_private {test_with_private9,281 + int i;i11,316 + char c;c12,327 + double d;d15,348 + float f;f16,362 +int main() {main19,379 + +externals/magic_get/test/common/protected_fields.cpp,165 +class test_with_protected {test_with_protected9,281 + int i;i11,320 + char c;c12,331 + double d;d15,352 + float f;f16,366 +int main() {main19,383 + +externals/magic_get/test/common/test_tuple_sizes_on.cpp,3484 +void test_counts_on_multiple_chars_impl_1() {test_counts_on_multiple_chars_impl_110,342 + struct t1_c { T1 v1; char c[CountHelpers]; };t1_c14,466 + struct t1_c { T1 v1; char c[CountHelpers]; };v114,466 + struct t1_c { T1 v1; char c[CountHelpers]; };c14,466 + struct t1_s { T1 v1; short s[CountHelpers]; };t1_s17,592 + struct t1_s { T1 v1; short s[CountHelpers]; };v117,592 + struct t1_s { T1 v1; short s[CountHelpers]; };s17,592 + struct t1_i { T1 v1; const int i[CountHelpers]; };t1_i20,719 + struct t1_i { T1 v1; const int i[CountHelpers]; };v120,719 + struct t1_i { T1 v1; const int i[CountHelpers]; };i20,719 + struct t1_p { T1 v1; void* p[CountHelpers]; };t1_p23,850 + struct t1_p { T1 v1; void* p[CountHelpers]; };v123,850 + struct t1_p { T1 v1; void* p[CountHelpers]; };p23,850 + struct t1_ll { T1 v1; long long ll[CountHelpers]; };t1_ll26,977 + struct t1_ll { T1 v1; long long ll[CountHelpers]; };v126,977 + struct t1_ll { T1 v1; long long ll[CountHelpers]; };ll26,977 + struct rt1_c { char c[CountHelpers]; T1 v1; };rt1_c30,1112 + struct rt1_c { char c[CountHelpers]; T1 v1; };c30,1112 + struct rt1_c { char c[CountHelpers]; T1 v1; };v130,1112 + struct rt1_s { const short s[CountHelpers]; T1 v1; };rt1_s33,1240 + struct rt1_s { const short s[CountHelpers]; T1 v1; };s33,1240 + struct rt1_s { const short s[CountHelpers]; T1 v1; };v133,1240 + struct rt1_i { int i[CountHelpers]; T1 v1; };rt1_i36,1375 + struct rt1_i { int i[CountHelpers]; T1 v1; };i36,1375 + struct rt1_i { int i[CountHelpers]; T1 v1; };v136,1375 + struct rt1_p { void* p[CountHelpers]; T1 v1; };rt1_p39,1502 + struct rt1_p { void* p[CountHelpers]; T1 v1; };p39,1502 + struct rt1_p { void* p[CountHelpers]; T1 v1; };v139,1502 + struct rt1_ll { long long ll[CountHelpers]; T1 v1; };rt1_ll42,1631 + struct rt1_ll { long long ll[CountHelpers]; T1 v1; };ll42,1631 + struct rt1_ll { long long ll[CountHelpers]; T1 v1; };v142,1631 + struct rt1_ll_1 { rt1_ll v1; };rt1_ll_145,1767 + struct rt1_ll_1 { rt1_ll v1; };v145,1767 +void test_counts_on_multiple_chars_impl() {test_counts_on_multiple_chars_impl51,1979 + struct t1_0 { T1 v1; };t1_055,2101 + struct t1_0 { T1 v1; };v155,2101 + struct t1_0_1 { t1_0 t1; };t1_0_161,2407 + struct t1_0_1 { t1_0 t1; };t161,2407 + struct t1_0_2 { t1_0 t1; t1_0 t2; };t1_0_265,2552 + struct t1_0_2 { t1_0 t1; t1_0 t2; };t165,2552 + struct t1_0_2 { t1_0 t1; t1_0 t2; };t265,2552 +void test_counts_on_multiple_chars() {test_counts_on_multiple_chars98,4192 + struct t2 { T v1; T v2; };t2103,4317 + struct t2 { T v1; T v2; };v1103,4317 + struct t2 { T v1; T v2; };v2103,4317 + struct t8 { T v1; T v2; T v3; T v4; T v5; T v6; T v7; T v8; };t8112,4599 + struct t8 { T v1; T v2; T v3; T v4; T v5; T v6; T v7; T v8; };v1112,4599 + struct t8 { T v1; T v2; T v3; T v4; T v5; T v6; T v7; T v8; };v2112,4599 + struct t8 { T v1; T v2; T v3; T v4; T v5; T v6; T v7; T v8; };v3112,4599 + struct t8 { T v1; T v2; T v3; T v4; T v5; T v6; T v7; T v8; };v4112,4599 + struct t8 { T v1; T v2; T v3; T v4; T v5; T v6; T v7; T v8; };v5112,4599 + struct t8 { T v1; T v2; T v3; T v4; T v5; T v6; T v7; T v8; };v6112,4599 + struct t8 { T v1; T v2; T v3; T v4; T v5; T v6; T v7; T v8; };v7112,4599 + struct t8 { T v1; T v2; T v3; T v4; T v5; T v6; T v7; T v8; };v8112,4599 +int main() {main116,4718 + +externals/magic_get/test/common/fields_count_on_reference.cpp,103 +struct some_struct {some_struct8,241 + int i;i9,262 + int j;j10,273 +int main() {main13,288 + +externals/magic_get/test/common/virtual_functions.cpp,253 +struct test_with_virtual {test_with_virtual9,281 + int i = 0;i10,308 + char c = 'a';c11,323 + double d = 3.4;d12,341 + float f = 3.5f;f13,361 + virtual double sum() const { return i + d + c + f; }sum15,382 +int main() {main18,443 + +externals/magic_get/test/common/global_ops.cpp,1841 +void test_comparable_struct() {test_comparable_struct29,631 +void test_empty_struct() {test_empty_struct57,1273 + struct empty {};empty58,1300 +struct adl_hash {adl_hash64,1387 + std::size_t operator()(const T& val) const {operator ()66,1428 +void test_with_contatiners() {test_with_contatiners73,1578 + struct testing { bool b1, b2; int i; };testing74,1609 + struct testing { bool b1, b2; int i; };b174,1609 + struct testing { bool b1, b2; int i; };b274,1609 + struct testing { bool b1, b2; int i; };i74,1609 +namespace foo {foo91,2025 +struct comparable_struct {comparable_struct92,2041 + int i; short s; bool bl; int a,b,c,d,e,f;i93,2068 + int i; short s; bool bl; int a,b,c,d,e,f;s93,2068 + int i; short s; bool bl; int a,b,c,d,e,f;bl93,2068 + int i; short s; bool bl; int a,b,c,d,e,f;a93,2068 + int i; short s; bool bl; int a,b,c,d,e,f;b93,2068 + int i; short s; bool bl; int a,b,c,d,e,f;c93,2068 + int i; short s; bool bl; int a,b,c,d,e,f;d93,2068 + int i; short s; bool bl; int a,b,c,d,e,f;e93,2068 + int i; short s; bool bl; int a,b,c,d,e,f;f93,2068 +void test_implicit_conversions() {test_implicit_conversions98,2121 +int main() {main104,2281 + struct local_comparable_struct {local_comparable_struct107,2349 + int i; short s; bool bl; int a,b,c,d,e,f;i108,2386 + int i; short s; bool bl; int a,b,c,d,e,f;s108,2386 + int i; short s; bool bl; int a,b,c,d,e,f;bl108,2386 + int i; short s; bool bl; int a,b,c,d,e,f;a108,2386 + int i; short s; bool bl; int a,b,c,d,e,f;b108,2386 + int i; short s; bool bl; int a,b,c,d,e,f;c108,2386 + int i; short s; bool bl; int a,b,c,d,e,f;d108,2386 + int i; short s; bool bl; int a,b,c,d,e,f;e108,2386 + int i; short s; bool bl; int a,b,c,d,e,f;f108,2386 + +externals/magic_get/test/common/read_write.cpp,1716 +namespace boost { namespace test {boost14,343 +namespace boost { namespace test {test14,343 + void read(std::basic_istream& in, T& value) {read16,427 + void write(std::basic_ostream& out, const T& value) {write21,591 +namespace boost { namespace test {boost30,793 +namespace boost { namespace test {test30,793 +bool five_field_eq(const T0& lhs, const T1& rhs) {five_field_eq37,926 +void test_write_read(const T& value) {test_write_read49,1147 +void to_string_test(const T& value, const char* ethalon) {to_string_test58,1364 +void test_type(const T& value, const char* ethalon) {test_type65,1544 +struct with_operator{};with_operator72,1667 +inline bool operator==(with_operator, with_operator) {operator ==73,1691 +std::ostream& operator<<(std::ostream& os, with_operator) {operator <<76,1765 +std::istream& operator>>(std::istream& is, with_operator&) {operator >>79,1863 +int main() {main85,1974 + struct test1 {test186,1987 + int f0;f087,2006 + int f1;f188,2022 + char f2;f289,2038 + int f3;f390,2055 + short f4;f491,2071 + struct test2 {test297,2259 + with_operator f0;f098,2278 + with_operator f1;f199,2304 + with_operator f2;f2100,2330 + with_operator f3;f3101,2356 + with_operator f4;f4102,2382 + struct test3 {test3106,2529 + int f0;f0107,2548 + int f1;f1108,2564 + char f2;f2109,2580 + int f3;f3110,2597 + with_operator f4;f4111,2613 + struct test4 {test4120,2793 + int f0;f0121,2812 + std::string f1;f1122,2828 + char f2;f2123,2852 + int f3;f3124,2869 + std::string f4;f4125,2885 + +externals/magic_get/example/quick_examples.cpp,1004 +struct foo {foo17,378 + int integer;integer18,391 + double real;real19,408 + void operator +=(int v) {operator +=21,430 +struct bar {bar27,522 + char character;character28,535 + foo f;f29,555 +bar var{'A', {777, 3.141593}};var32,570 +inline std::ostream& operator<<(std::ostream& os, const bar& b) {operator <<35,610 +void test_examples() {test_examples39,768 + struct test { std::string f1; std::string_view f2; };test71,1590 + struct test { std::string f1; std::string_view f2; };f171,1590 + struct test { std::string f1; std::string_view f2; };f271,1590 + boost::pfr::flat_for_each_field(var, [](auto& field) {__anon36bfd39d010283,1894 + boost::pfr::for_each_field(var, [](auto& field) {__anon36bfd39d020296,2229 + boost::pfr::flat_for_each_field(var, [](const auto& field, std::size_t idx) {__anon36bfd39d0302111,2482 + boost::pfr::for_each_field(var, [](const auto& field, std::size_t idx) {__anon36bfd39d0402121,2748 +int main() {main217,5301 + +externals/magic_get/example/examples.cpp,1423 +struct nested_t { char c; };nested_t13,266 +struct nested_t { char c; };c13,266 +struct foo_t { int i; nested_t nested; };foo_t14,295 +struct foo_t { int i; nested_t nested; };i14,295 +struct foo_t { int i; nested_t nested; };nested14,295 +struct foo { // defining structurefoo42,957 + int some_integer;some_integer43,1003 + char c;c44,1025 +foo f {777, '!'};f50,1101 +auto& r1 = boost::pfr::get<0>(f); // accessing field with index 0, returns reference to `foo::sor151,1119 +auto& r2 = boost::pfr::get<1>(f); // accessing field with index 1, returns reference to `foo::c`r252,1227 +struct foo2 { // defining structurefoo261,1513 + int some_integer;some_integer62,1560 + char c;c63,1582 + short some_other_field;some_other_field64,1594 +struct my_struct_nested { short a1; int a2; };my_struct_nested89,2157 +struct my_struct_nested { short a1; int a2; };a189,2157 +struct my_struct_nested { short a1; int a2; };a289,2157 +struct my_struct {my_struct91,2205 + int a0;a092,2224 + static const int cvalue = 1000;cvalue93,2236 + my_struct_nested nested;nested94,2272 + short a3_a4[2];a3_a495,2301 +struct my_struct_flat {my_struct_flat100,2374 + int a0;a0101,2398 + short a1;a1102,2414 + int a2;a2103,2430 + short a3;a3104,2446 + short a4;a4105,2462 +void example_get() {example_get109,2512 +int main() {main127,2959 + +externals/magic_get/include/boost/pfr.hpp,42 +#define BOOST_PFR_HPPBOOST_PFR_HPP7,222 + +externals/magic_get/include/boost/pfr/flat/global_ops.hpp,1412 +#define BOOST_PFR_FLAT_GLOBAL_OPS_HPPBOOST_PFR_FLAT_GLOBAL_OPS_HPP7,238 +namespace boost { namespace pfr { namespace detail {boost40,1392 +namespace boost { namespace pfr { namespace detail {pfr40,1392 +namespace boost { namespace pfr { namespace detail {detail40,1392 + using enable_flat_comparisons = std::enable_if_t<enable_flat_comparisons43,1478 + static boost::pfr::detail::enable_flat_comparisons operator==(const T& lhs, const U& roperator ==69,2653 + static boost::pfr::detail::enable_flat_comparisons operator!=(const T& lhs, const U& roperator !=74,2862 + static boost::pfr::detail::enable_flat_comparisons operator<(const T& lhs, const U& rhoperator <79,3072 + static boost::pfr::detail::enable_flat_comparisons operator>(const T& lhs, const U& rhoperator >84,3276 + static boost::pfr::detail::enable_flat_comparisons operator<=(const T& lhs, const U& roperator <=89,3483 + static boost::pfr::detail::enable_flat_comparisons operator>=(const T& lhs, const U& roperator >=94,3694 + static std::enable_if_t::value, std::basic_ostream&> operator<<operator <<99,3925 + static std::enable_if_t::value, std::basic_istream&> operator>>operator >>105,4201 + static std::enable_if_t::value, std::size_t> hash_value(const T& value) noexchash_value111,4441 + +externals/magic_get/include/boost/pfr/flat/functors.hpp,2829 +#define BOOST_PFR_FLAT_FUNCTORS_HPPBOOST_PFR_FLAT_FUNCTORS_HPP7,236 +namespace boost { namespace pfr {boost21,626 +namespace boost { namespace pfr {pfr21,626 +template struct flat_equal_to {flat_equal_to25,747 + bool operator()(const T& x, const T& y) const noexcept {operator ()29,907 + typedef std::true_type is_transparent;is_transparent35,1183 +template <> struct flat_equal_to {flat_equal_to44,1461 + bool operator()(const T& x, const U& y) const noexcept {operator ()46,1534 +template struct flat_not_equal {flat_not_equal57,1871 + bool operator()(const T& x, const T& y) const noexcept {operator ()61,2041 + typedef std::true_type is_transparent;is_transparent67,2321 +template <> struct flat_not_equal {flat_not_equal76,2599 + bool operator()(const T& x, const U& y) const noexcept {operator ()78,2673 + typedef std::true_type is_transparent;is_transparent82,2871 +template struct flat_greater {flat_greater87,2982 + bool operator()(const T& x, const T& y) const noexcept {operator ()91,3207 + typedef std::true_type is_transparent;is_transparent97,3485 +template <> struct flat_greater {flat_greater106,3763 + bool operator()(const T& x, const U& y) const noexcept {operator ()108,3835 + typedef std::true_type is_transparent;is_transparent115,4104 +template struct flat_less {flat_less120,4212 + bool operator()(const T& x, const T& y) const noexcept {operator ()124,4431 + typedef std::true_type is_transparent;is_transparent130,4706 +template <> struct flat_less {flat_less139,4984 + bool operator()(const T& x, const U& y) const noexcept {operator ()141,5053 + typedef std::true_type is_transparent;is_transparent148,5319 +template struct flat_greater_equal {flat_greater_equal153,5436 + bool operator()(const T& x, const T& y) const noexcept {operator ()158,5742 + typedef std::true_type is_transparent;is_transparent164,6026 +template <> struct flat_greater_equal {flat_greater_equal173,6304 + bool operator()(const T& x, const U& y) const noexcept {operator ()175,6382 + typedef std::true_type is_transparent;is_transparent182,6657 +template struct flat_less_equal {flat_less_equal187,6771 + bool operator()(const T& x, const T& y) const noexcept {operator ()192,7071 + typedef std::true_type is_transparent;is_transparent198,7352 +template <> struct flat_less_equal {flat_less_equal207,7630 + bool operator()(const T& x, const U& y) const noexcept {operator ()209,7705 + typedef std::true_type is_transparent;is_transparent216,7977 +template struct flat_hash {flat_hash222,8083 + std::size_t operator()(const T& x) const noexcept {operator ()226,8180 + +externals/magic_get/include/boost/pfr/flat/io.hpp,324 +#define BOOST_PFR_FLAT_IO_HPPBOOST_PFR_FLAT_IO_HPP7,230 +namespace boost { namespace pfr {boost20,550 +namespace boost { namespace pfr {pfr20,550 +void flat_write(std::basic_ostream& out, const T& value) {flat_write33,883 +void flat_read(std::basic_istream& in, T& value) {flat_read54,1450 + +externals/magic_get/include/boost/pfr/flat/functions_for.hpp,155 +#define BOOST_PFR_FLAT_FUNCTIONS_FOR_HPPBOOST_PFR_FLAT_FUNCTIONS_FOR_HPP7,241 +#define BOOST_PFR_FLAT_FUNCTIONS_FOR(BOOST_PFR_FLAT_FUNCTIONS_FOR57,2163 + +externals/magic_get/include/boost/pfr/flat/ops.hpp,1325 +#define BOOST_PFR_FLAT_OPS_HPPBOOST_PFR_FLAT_OPS_HPP7,231 +namespace boost { namespace pfr { boost43,1489 +namespace boost { namespace pfr { pfr43,1489 +namespace detail {detail45,1525 + using enable_flat_not_comp_base_t = typename std::enable_if<enable_flat_not_comp_base_t49,1694 + template using enable_flat_not_eq_comp_t = enable_flat_not_comp_base_t using enable_flat_not_ne_comp_t = enable_flat_not_comp_base_t using enable_flat_not_lt_comp_t = enable_flat_not_comp_base_t using enable_flat_not_le_comp_t = enable_flat_not_comp_base_t using enable_flat_not_gt_comp_t = enable_flat_not_comp_base_t using enable_flat_not_ge_comp_t = enable_flat_not_comp_base_t::value;flat_tuple_size_v36,1133 + +externals/magic_get/include/boost/pfr/flat/core.hpp,798 +#define BOOST_PFR_FLAT_CORE_HPPBOOST_PFR_FLAT_CORE_HPP7,232 +namespace boost { namespace pfr {boost21,612 +namespace boost { namespace pfr {pfr21,612 +decltype(auto) flat_get(const T& val) noexcept {flat_get35,1008 +decltype(auto) flat_get(T& val /* @cond */, std::enable_if_t< std::is_trivially_assignableflat_get42,1219 +using flat_tuple_element = std::remove_reference<flat_tuple_element54,1733 +using flat_tuple_element_t = typename flat_tuple_element::type;flat_tuple_element_t66,2165 +auto flat_structure_to_tuple(const T& val) noexcept {flat_structure_to_tuple81,2551 +auto flat_structure_tie(T& val /* @cond */, std::enable_if_t< std::is_trivially_assignableflat_structure_tie103,3150 +void flat_for_each_field(T&& value, F&& func) {flat_for_each_field129,4237 + +externals/magic_get/include/boost/pfr/flat.hpp,52 +#define BOOST_PFR_FLAT_HPPBOOST_PFR_FLAT_HPP7,227 + +externals/magic_get/include/boost/pfr/precise/global_ops.hpp,1361 +#define BOOST_PFR_PRECISE_GLOBAL_OPS_HPPBOOST_PFR_PRECISE_GLOBAL_OPS_HPP7,241 +namespace boost { namespace pfr { namespace detail {boost40,1412 +namespace boost { namespace pfr { namespace detail {pfr40,1412 +namespace boost { namespace pfr { namespace detail {detail40,1412 + using enable_comparisons = std::enable_if_t<enable_comparisons43,1498 + static boost::pfr::detail::enable_comparisons operator==(const T& lhs, const U& rhs) {operator ==69,2580 + static boost::pfr::detail::enable_comparisons operator!=(const T& lhs, const U& rhs) {operator !=74,2770 + static boost::pfr::detail::enable_comparisons operator<(const T& lhs, const U& rhs) {operator <79,2961 + static boost::pfr::detail::enable_comparisons operator>(const T& lhs, const U& rhs) {operator >84,3146 + static boost::pfr::detail::enable_comparisons operator<=(const T& lhs, const U& rhs) {operator <=89,3334 + static boost::pfr::detail::enable_comparisons operator>=(const T& lhs, const U& rhs) {operator >=94,3526 + static std::enable_if_t::value, std::basic_ostream&> operator<<operator <<99,3738 + static std::enable_if_t::value, std::basic_istream&> operator>>operator >>105,4009 + static std::size_t hash_value(const T& value) {hash_value111,4244 + +externals/magic_get/include/boost/pfr/precise/functors.hpp,3256 +#define BOOST_PFR_PRECISE_FUNCTORS_HPPBOOST_PFR_PRECISE_FUNCTORS_HPP7,239 +namespace boost { namespace pfr {boost26,756 +namespace boost { namespace pfr {pfr26,756 +namespace detail {detail28,791 + bool binary_visit(const T& x, const U& y) {binary_visit31,894 + typedef Visitor<0, fields_count_min> visitor_t;visitor_t35,1247 + [&result, &y](const auto& lhs) {__anoncd3fcbba010243,1515 + [&result, &lhs](const auto& rhs) {__anoncd3fcbba020246,1648 + std::make_index_sequence{}__anoncd3fcbba030249,1785 + std::make_index_sequence{}__anoncd3fcbba040252,1884 +template struct equal_to {equal_to64,2089 + bool operator()(const T& x, const T& y) const {operator ()68,2246 + typedef std::true_type is_transparent;is_transparent74,2450 +template <> struct equal_to {equal_to83,2719 + bool operator()(const T& x, const U& y) const {operator ()85,2787 +template struct not_equal {not_equal93,2968 + bool operator()(const T& x, const T& y) const {operator ()97,3135 + typedef std::true_type is_transparent;is_transparent103,3343 +template <> struct not_equal {not_equal112,3612 + bool operator()(const T& x, const U& y) const {operator ()114,3681 + typedef std::true_type is_transparent;is_transparent118,3807 +template struct greater {greater123,3907 + bool operator()(const T& x, const T& y) const {operator ()127,4129 + typedef std::true_type is_transparent;is_transparent133,4335 +template <> struct greater {greater142,4604 + bool operator()(const T& x, const U& y) const {operator ()144,4671 + typedef std::true_type is_transparent;is_transparent148,4795 +template struct less {less153,4892 + bool operator()(const T& x, const T& y) const {operator ()157,5108 + typedef std::true_type is_transparent;is_transparent163,5311 +template <> struct less {less172,5580 + bool operator()(const T& x, const U& y) const {operator ()174,5644 + typedef std::true_type is_transparent;is_transparent178,5765 +template struct greater_equal {greater_equal183,5871 + bool operator()(const T& x, const T& y) const {operator ()188,6174 + typedef std::true_type is_transparent;is_transparent194,6386 +template <> struct greater_equal {greater_equal203,6655 + bool operator()(const T& x, const U& y) const {operator ()205,6728 + typedef std::true_type is_transparent;is_transparent209,6858 +template struct less_equal {less_equal214,6961 + bool operator()(const T& x, const T& y) const {operator ()219,7258 + typedef std::true_type is_transparent;is_transparent225,7467 +template <> struct less_equal {less_equal234,7736 + bool operator()(const T& x, const U& y) const {operator ()236,7806 + typedef std::true_type is_transparent;is_transparent240,7933 +template struct hash {hash246,8028 + std::size_t operator()(const T& x) const {operator ()250,8122 + [&result](const auto& lhs) {__anoncd3fcbba0502258,8505 + std::make_index_sequence{}__anoncd3fcbba0602261,8640 + +externals/magic_get/include/boost/pfr/precise/io.hpp,592 +#define BOOST_PFR_PRECISE_IO_HPPBOOST_PFR_PRECISE_IO_HPP8,234 +namespace boost { namespace pfr {boost26,643 +namespace boost { namespace pfr {pfr26,643 +void write(std::basic_ostream& out, const T& value) {write41,1045 + [&out](const auto& val) {__anon8b0b377e010249,1422 + std::make_index_sequence{}__anon8b0b377e020252,1537 +void read(std::basic_istream& in, T& value) {read75,2060 + [&in](const auto& val) {__anon8b0b377e030291,2763 + std::make_index_sequence{}__anon8b0b377e040294,2874 + +externals/magic_get/include/boost/pfr/precise/functions_for.hpp,167 +#define BOOST_PFR_PRECISE_FUNCTIONS_FOR_HPPBOOST_PFR_PRECISE_FUNCTIONS_FOR_HPP7,244 +#define BOOST_PFR_PRECISE_FUNCTIONS_FOR(BOOST_PFR_PRECISE_FUNCTIONS_FOR57,2126 + +externals/magic_get/include/boost/pfr/precise/ops.hpp,1259 +#define BOOST_PFR_PRECISE_OPS_HPPBOOST_PFR_PRECISE_OPS_HPP7,234 +namespace boost { namespace pfr {boost46,1621 +namespace boost { namespace pfr {pfr46,1621 +namespace detail {detail48,1656 + using enable_not_comp_base_t = typename std::enable_if<enable_not_comp_base_t52,1820 + template using enable_not_eq_comp_t = enable_not_comp_base_t;enable_not_eq_comp_t59,2086 + template using enable_not_ne_comp_t = enable_not_comp_base_t;enable_not_ne_comp_t60,2183 + template using enable_not_lt_comp_t = enable_not_comp_base_t;enable_not_lt_comp_t61,2280 + template using enable_not_le_comp_t = enable_not_comp_base_t;enable_not_le_comp_t62,2377 + template using enable_not_gt_comp_t = enable_not_comp_base_t;enable_not_gt_comp_t63,2474 + template using enable_not_ge_comp_t = enable_not_comp_base_t;enable_not_ge_comp_t64,2571 + using enable_not_ostreamable_t = typename std::enable_if<enable_not_ostreamable_t67,2709 + using enable_not_istreamable_t = typename std::enable_if<enable_not_istreamable_t73,2915 +namespace ops {ops79,3097 + +externals/magic_get/include/boost/pfr/precise/tuple_size.hpp,347 +#define BOOST_PFR_PRECISE_TUPLE_SIZE_HPPBOOST_PFR_PRECISE_TUPLE_SIZE_HPP8,242 +namespace boost { namespace pfr {boost19,503 +namespace boost { namespace pfr {pfr19,503 +using tuple_size = detail::size_t_< boost::pfr::detail::fields_count() >;tuple_size32,927 +constexpr std::size_t tuple_size_v = tuple_size::value;tuple_size_v46,1388 + +externals/magic_get/include/boost/pfr/precise/core.hpp,878 +#define BOOST_PFR_PRECISE_CORE_HPPBOOST_PFR_PRECISE_CORE_HPP7,235 +namespace boost { namespace pfr {boost26,704 +namespace boost { namespace pfr {pfr26,704 +constexpr decltype(auto) get(const T& val) noexcept {get42,1171 +constexpr decltype(auto) get(T& val) noexcept {get49,1353 +using tuple_element = detail::sequence_tuple::tuple_element::type;tuple_element_t75,2253 +constexpr auto structure_to_tuple(const T& val) noexcept {structure_to_tuple92,2701 +constexpr auto structure_tie(T& val) noexcept {structure_tie114,3309 +void for_each_field(T&& value, F&& func) {for_each_field142,4333 + [f = std::forward(func)](auto&& t) mutable {__anon8f704ecf0102147,4554 + std::make_index_sequence{}__anon8f704ecf0202159,5090 + +externals/magic_get/include/boost/pfr/precise.hpp,58 +#define BOOST_PFR_PRECISE_HPPBOOST_PFR_PRECISE_HPP7,230 + +externals/magic_get/include/boost/pfr/detail/sequence_tuple.hpp,1500 +#define BOOST_PFR_DETAIL_SEQUENCE_TUPLE_HPPBOOST_PFR_DETAIL_SEQUENCE_TUPLE_HPP7,244 +namespace boost { namespace pfr { namespace detail { namespace sequence_tuple {boost16,504 +namespace boost { namespace pfr { namespace detail { namespace sequence_tuple {pfr16,504 +namespace boost { namespace pfr { namespace detail { namespace sequence_tuple {detail16,504 +namespace boost { namespace pfr { namespace detail { namespace sequence_tuple {sequence_tuple16,504 +struct base_from_member {base_from_member19,619 + T value;value20,645 +struct tuple_base< std::index_sequence, Tail... >tuple_base29,761 + static constexpr std::size_t size_v = sizeof...(I);size_v32,855 + constexpr tuple_base(Tail... v) noexcepttuple_base40,1301 +#define BOOST_PFR_DETAIL_SEQUENCE_TUPLE_HPPBOOST_PFR_DETAIL_SEQUENCE_TUPLE_HPP7,244 +namespace boost { namespace pfr { namespace detail { namespace sequence_tuple {boost16,504 +namespace boost { namespace pfr { namespace detail { namespace sequence_tuple {pfr16,504 +namespace boost { namespace pfr { namespace detail { namespace sequence_tuple {detail16,504 +namespace boost { namespace pfr { namespace detail { namespace sequence_tuple {sequence_tuple16,504 +struct base_from_member {base_from_member19,619 + T value;value20,645 +struct tuple_base< std::index_sequence, Tail... >tuple_base29,761 + static constexpr std::size_t size_v = sizeof...(I);size_v32,855 + constexpr tuple_base(Tail... v) noexcepttuple_base40,1301 + +externals/magic_get/include/boost/pfr/detail/core17_generated.hpp,8909 +#define BOOST_PFR_DETAIL_CORE17_GENERATED_HPPBOOST_PFR_DETAIL_CORE17_GENERATED_HPP12,623 +namespace boost { namespace pfr { namespace detail {boost24,894 +namespace boost { namespace pfr { namespace detail {pfr24,894 +namespace boost { namespace pfr { namespace detail {detail24,894 +constexpr auto make_tuple_of_references(Args&&... args) noexcept {make_tuple_of_references27,973 +constexpr auto tie_as_tuple(T& /*val*/, size_t_<0>) noexcept {tie_as_tuple32,1115 +constexpr auto tie_as_tuple(T& val, size_t_<1>, std::enable_if_t) noexcept {tie_as_tuple50,1680 +constexpr auto tie_as_tuple(T& val, size_t_<3>) noexcept {tie_as_tuple56,1844 +constexpr auto tie_as_tuple(T& val, size_t_<4>) noexcept {tie_as_tuple62,2012 +constexpr auto tie_as_tuple(T& val, size_t_<5>) noexcept {tie_as_tuple68,2184 +constexpr auto tie_as_tuple(T& val, size_t_<6>) noexcept {tie_as_tuple74,2360 +constexpr auto tie_as_tuple(T& val, size_t_<7>) noexcept {tie_as_tuple80,2540 +constexpr auto tie_as_tuple(T& val, size_t_<8>) noexcept {tie_as_tuple86,2724 +constexpr auto tie_as_tuple(T& val, size_t_<9>) noexcept {tie_as_tuple92,2912 +constexpr auto tie_as_tuple(T& val, size_t_<10>) noexcept {tie_as_tuple98,3104 +constexpr auto tie_as_tuple(T& val, size_t_<11>) noexcept {tie_as_tuple104,3301 +constexpr auto tie_as_tuple(T& val, size_t_<12>) noexcept {tie_as_tuple110,3502 +constexpr auto tie_as_tuple(T& val, size_t_<13>) noexcept {tie_as_tuple116,3707 +constexpr auto tie_as_tuple(T& val, size_t_<14>) noexcept {tie_as_tuple122,3916 +constexpr auto tie_as_tuple(T& val, size_t_<15>) noexcept {tie_as_tuple128,4129 +constexpr auto tie_as_tuple(T& val, size_t_<16>) noexcept {tie_as_tuple134,4346 +constexpr auto tie_as_tuple(T& val, size_t_<17>) noexcept {tie_as_tuple140,4567 +constexpr auto tie_as_tuple(T& val, size_t_<18>) noexcept {tie_as_tuple146,4792 +constexpr auto tie_as_tuple(T& val, size_t_<19>) noexcept {tie_as_tuple152,5021 +constexpr auto tie_as_tuple(T& val, size_t_<20>) noexcept {tie_as_tuple158,5254 +constexpr auto tie_as_tuple(T& val, size_t_<21>) noexcept {tie_as_tuple164,5491 +constexpr auto tie_as_tuple(T& val, size_t_<22>) noexcept {tie_as_tuple170,5732 +constexpr auto tie_as_tuple(T& val, size_t_<23>) noexcept {tie_as_tuple176,5977 +constexpr auto tie_as_tuple(T& val, size_t_<24>) noexcept {tie_as_tuple182,6226 +constexpr auto tie_as_tuple(T& val, size_t_<25>) noexcept {tie_as_tuple188,6479 +constexpr auto tie_as_tuple(T& val, size_t_<26>) noexcept {tie_as_tuple194,6736 +constexpr auto tie_as_tuple(T& val, size_t_<27>) noexcept {tie_as_tuple200,6997 +constexpr auto tie_as_tuple(T& val, size_t_<28>) noexcept {tie_as_tuple206,7262 +constexpr auto tie_as_tuple(T& val, size_t_<29>) noexcept {tie_as_tuple212,7531 +constexpr auto tie_as_tuple(T& val, size_t_<30>) noexcept {tie_as_tuple218,7804 +constexpr auto tie_as_tuple(T& val, size_t_<31>) noexcept {tie_as_tuple224,8081 +constexpr auto tie_as_tuple(T& val, size_t_<32>) noexcept {tie_as_tuple230,8362 +constexpr auto tie_as_tuple(T& val, size_t_<33>) noexcept {tie_as_tuple236,8647 +constexpr auto tie_as_tuple(T& val, size_t_<34>) noexcept {tie_as_tuple242,8936 +constexpr auto tie_as_tuple(T& val, size_t_<35>) noexcept {tie_as_tuple248,9229 +constexpr auto tie_as_tuple(T& val, size_t_<36>) noexcept {tie_as_tuple254,9526 +constexpr auto tie_as_tuple(T& val, size_t_<37>) noexcept {tie_as_tuple260,9827 +constexpr auto tie_as_tuple(T& val, size_t_<38>) noexcept {tie_as_tuple266,10132 +constexpr auto tie_as_tuple(T& val, size_t_<39>) noexcept {tie_as_tuple272,10441 +constexpr auto tie_as_tuple(T& val, size_t_<40>) noexcept {tie_as_tuple278,10754 +constexpr auto tie_as_tuple(T& val, size_t_<41>) noexcept {tie_as_tuple284,11071 +constexpr auto tie_as_tuple(T& val, size_t_<42>) noexcept {tie_as_tuple290,11392 +constexpr auto tie_as_tuple(T& val, size_t_<43>) noexcept {tie_as_tuple296,11717 +constexpr auto tie_as_tuple(T& val, size_t_<44>) noexcept {tie_as_tuple302,12046 +constexpr auto tie_as_tuple(T& val, size_t_<45>) noexcept {tie_as_tuple308,12379 +constexpr auto tie_as_tuple(T& val, size_t_<46>) noexcept {tie_as_tuple314,12716 +constexpr auto tie_as_tuple(T& val, size_t_<47>) noexcept {tie_as_tuple320,13057 +constexpr auto tie_as_tuple(T& val, size_t_<48>) noexcept {tie_as_tuple326,13402 +constexpr auto tie_as_tuple(T& val, size_t_<49>) noexcept {tie_as_tuple339,13780 +constexpr auto tie_as_tuple(T& val, size_t_<50>) noexcept {tie_as_tuple352,14164 +constexpr auto tie_as_tuple(T& val, size_t_<51>) noexcept {tie_as_tuple365,14554 +constexpr auto tie_as_tuple(T& val, size_t_<52>) noexcept {tie_as_tuple378,14950 +constexpr auto tie_as_tuple(T& val, size_t_<53>) noexcept {tie_as_tuple391,15352 +constexpr auto tie_as_tuple(T& val, size_t_<54>) noexcept {tie_as_tuple404,15760 +constexpr auto tie_as_tuple(T& val, size_t_<55>) noexcept {tie_as_tuple417,16174 +constexpr auto tie_as_tuple(T& val, size_t_<56>) noexcept {tie_as_tuple430,16594 +constexpr auto tie_as_tuple(T& val, size_t_<57>) noexcept {tie_as_tuple443,17020 +constexpr auto tie_as_tuple(T& val, size_t_<58>) noexcept {tie_as_tuple456,17452 +constexpr auto tie_as_tuple(T& val, size_t_<59>) noexcept {tie_as_tuple469,17890 +constexpr auto tie_as_tuple(T& val, size_t_<60>) noexcept {tie_as_tuple482,18334 +constexpr auto tie_as_tuple(T& val, size_t_<61>) noexcept {tie_as_tuple495,18784 +constexpr auto tie_as_tuple(T& val, size_t_<62>) noexcept {tie_as_tuple508,19240 +constexpr auto tie_as_tuple(T& val, size_t_<63>) noexcept {tie_as_tuple521,19702 +constexpr auto tie_as_tuple(T& val, size_t_<64>) noexcept {tie_as_tuple534,20170 +constexpr auto tie_as_tuple(T& val, size_t_<65>) noexcept {tie_as_tuple547,20644 +constexpr auto tie_as_tuple(T& val, size_t_<66>) noexcept {tie_as_tuple560,21124 +constexpr auto tie_as_tuple(T& val, size_t_<67>) noexcept {tie_as_tuple573,21610 +constexpr auto tie_as_tuple(T& val, size_t_<68>) noexcept {tie_as_tuple586,22102 +constexpr auto tie_as_tuple(T& val, size_t_<69>) noexcept {tie_as_tuple599,22600 +constexpr auto tie_as_tuple(T& val, size_t_<70>) noexcept {tie_as_tuple612,23104 +constexpr auto tie_as_tuple(T& val, size_t_<71>) noexcept {tie_as_tuple625,23614 +constexpr auto tie_as_tuple(T& val, size_t_<72>) noexcept {tie_as_tuple638,24130 +constexpr auto tie_as_tuple(T& val, size_t_<73>) noexcept {tie_as_tuple651,24652 +constexpr auto tie_as_tuple(T& val, size_t_<74>) noexcept {tie_as_tuple664,25180 +constexpr auto tie_as_tuple(T& val, size_t_<75>) noexcept {tie_as_tuple677,25714 +constexpr auto tie_as_tuple(T& val, size_t_<76>) noexcept {tie_as_tuple690,26254 +constexpr auto tie_as_tuple(T& val, size_t_<77>) noexcept {tie_as_tuple703,26800 +constexpr auto tie_as_tuple(T& val, size_t_<78>) noexcept {tie_as_tuple716,27352 +constexpr auto tie_as_tuple(T& val, size_t_<79>) noexcept {tie_as_tuple729,27910 +constexpr auto tie_as_tuple(T& val, size_t_<80>) noexcept {tie_as_tuple742,28474 +constexpr auto tie_as_tuple(T& val, size_t_<81>) noexcept {tie_as_tuple755,29044 +constexpr auto tie_as_tuple(T& val, size_t_<82>) noexcept {tie_as_tuple768,29620 +constexpr auto tie_as_tuple(T& val, size_t_<83>) noexcept {tie_as_tuple781,30202 +constexpr auto tie_as_tuple(T& val, size_t_<84>) noexcept {tie_as_tuple794,30790 +constexpr auto tie_as_tuple(T& val, size_t_<85>) noexcept {tie_as_tuple807,31384 +constexpr auto tie_as_tuple(T& val, size_t_<86>) noexcept {tie_as_tuple820,31984 +constexpr auto tie_as_tuple(T& val, size_t_<87>) noexcept {tie_as_tuple833,32590 +constexpr auto tie_as_tuple(T& val, size_t_<88>) noexcept {tie_as_tuple846,33202 +constexpr auto tie_as_tuple(T& val, size_t_<89>) noexcept {tie_as_tuple859,33820 +constexpr auto tie_as_tuple(T& val, size_t_<90>) noexcept {tie_as_tuple872,34444 +constexpr auto tie_as_tuple(T& val, size_t_<91>) noexcept {tie_as_tuple885,35074 +constexpr auto tie_as_tuple(T& val, size_t_<92>) noexcept {tie_as_tuple898,35710 +constexpr auto tie_as_tuple(T& val, size_t_<93>) noexcept {tie_as_tuple911,36352 +constexpr auto tie_as_tuple(T& val, size_t_<94>) noexcept {tie_as_tuple924,37000 +constexpr auto tie_as_tuple(T& val, size_t_<95>) noexcept {tie_as_tuple937,37654 +constexpr auto tie_as_tuple(T& val, size_t_<96>) noexcept {tie_as_tuple952,38324 +constexpr auto tie_as_tuple(T& val, size_t_<97>) noexcept {tie_as_tuple967,39000 +constexpr auto tie_as_tuple(T& val, size_t_<98>) noexcept {tie_as_tuple982,39682 +constexpr auto tie_as_tuple(T& val, size_t_<99>) noexcept {tie_as_tuple997,40370 +constexpr auto tie_as_tuple(T& val, size_t_<100>) noexcept {tie_as_tuple1012,41064 +constexpr auto tie_as_tuple(T& val) noexcept {tie_as_tuple1030,41892 + typedef size_t_()> fields_count_tag;fields_count_tag1031,41939 + +externals/magic_get/include/boost/pfr/detail/stdtuple.hpp,535 +#define BOOST_PFR_DETAIL_STDTUPLE_HPPBOOST_PFR_DETAIL_STDTUPLE_HPP7,238 +namespace boost { namespace pfr { namespace detail {boost17,445 +namespace boost { namespace pfr { namespace detail {pfr17,445 +namespace boost { namespace pfr { namespace detail {detail17,445 +constexpr auto make_stdtuple_from_tietuple(const T& t, std::index_sequence) noexcept {make_stdtuple_from_tietuple20,536 +constexpr auto make_stdtiedtuple_from_tietuple(const T& t, std::index_sequence) noexcept {make_stdtiedtuple_from_tietuple27,761 + +externals/magic_get/include/boost/pfr/detail/offset_based_getter.hpp,1526 +#define BOOST_PFR_DETAIL_OFFSET_BASED_GETTER_HPPBOOST_PFR_DETAIL_OFFSET_BASED_GETTER_HPP7,239 +namespace boost { namespace pfr { namespace detail {boost18,474 +namespace boost { namespace pfr { namespace detail {pfr18,474 +namespace boost { namespace pfr { namespace detail {detail18,474 +using size_t_ = std::integral_constant;size_t_21,557 +struct internal_aligned_storage {internal_aligned_storage27,841 +using tuple_of_aligned_storage_t = typename tuple_of_aligned_storage::type;tuple_of_aligned_storage_t48,1576 +class offset_based_getter {offset_based_getter60,2015 + using this_t = offset_based_getter;this_t61,2043 + using index_t = typename sequence_tuple::tuple_element::type;index_t72,3011 + static constexpr std::ptrdiff_t offset() noexcept {offset78,3296 + static index_t * get_pointer(U * u) noexcept {get_pointer85,3599 + static const index_t * get_pointer(const U * u) noexcept {get_pointer90,3785 + static volatile index_t * get_pointer(volatile U * u) noexcept {get_pointer95,3995 + static const volatile index_t * get_pointer(const volatile U * u) noexcept {get_pointer100,4217 + index_t & get(U & u, size_t_) const noexcept {get106,4471 + index_t const & get(U const & u, size_t_) const noexcept {get111,4621 + index_t volatile & get(U volatile & u, size_t_) const noexcept {get116,4783 + index_t const volatile & get(U const volatile & u, size_t_) const noexcept {get121,4951 + +externals/magic_get/include/boost/pfr/detail/rvalue_t.hpp,309 +#define BOOST_PFR_DETAIL_RVALUE_T_HPPBOOST_PFR_DETAIL_RVALUE_T_HPP7,238 +namespace boost { namespace pfr { namespace detail {boost21,697 +namespace boost { namespace pfr { namespace detail {pfr21,697 +namespace boost { namespace pfr { namespace detail {detail21,697 +using rvalue_t = T&&;rvalue_t29,940 + +externals/magic_get/include/boost/pfr/detail/io.hpp,1076 +#define BOOST_PFR_DETAIL_IO_HPPBOOST_PFR_DETAIL_IO_HPP7,232 +namespace boost { namespace pfr { namespace detail {boost22,563 +namespace boost { namespace pfr { namespace detail {pfr22,563 +namespace boost { namespace pfr { namespace detail {detail22,563 +inline auto quoted_helper(const std::string& s) noexcept {quoted_helper24,617 +inline auto quoted_helper(std::basic_string_view s) noexcept {quoted_helper31,829 +inline auto quoted_helper(std::string& s) noexcept {quoted_helper37,954 +inline decltype(auto) quoted_helper(T&& v) noexcept {quoted_helper42,1056 +struct print_impl {print_impl47,1184 + static void print (Stream& out, const T& value) {print49,1241 +struct print_impl {print_impl57,1490 + template static void print (Stream&, const T&) noexcept {}print58,1516 +struct read_impl {read_impl63,1648 + static void read (Stream& in, const T& value) {read65,1704 +struct read_impl {read_impl79,2149 + template static void read (Stream&, const T&) {}read80,2174 + +externals/magic_get/include/boost/pfr/detail/config.hpp,326 +#define BOOST_PFR_DETAIL_CONFIG_HPPBOOST_PFR_DETAIL_CONFIG_HPP7,236 +# define BOOST_PFR_USE_LOOPHOLE BOOST_PFR_USE_LOOPHOLE24,740 +# define BOOST_PFR_USE_CPP17 BOOST_PFR_USE_CPP1729,848 +# define BOOST_PFR_USE_CPP17 BOOST_PFR_USE_CPP1732,1098 +# define BOOST_PFR_USE_CPP17 BOOST_PFR_USE_CPP1734,1144 + +externals/magic_get/include/boost/pfr/detail/make_flat_tuple_of_references.hpp,1536 +#define BOOST_PFR_DETAIL_MAKE_FLAT_TUPLE_OF_REFERENCES_HPPBOOST_PFR_DETAIL_MAKE_FLAT_TUPLE_OF_REFERENCES_HPP7,259 +namespace boost { namespace pfr { namespace detail {boost17,511 +namespace boost { namespace pfr { namespace detail {pfr17,511 +namespace boost { namespace pfr { namespace detail {detail17,511 +using size_t_ = std::integral_constant;size_t_20,594 +struct sequence_tuple_getter {sequence_tuple_getter24,802 + decltype(auto) get(const TupleOfReferences& t, size_t_) const noexcept {get26,890 +constexpr auto tie_as_tuple_with_references(T&... args) noexcept {tie_as_tuple_with_references42,1630 +constexpr decltype(auto) tie_as_tuple_with_references(detail::sequence_tuple::tuple& t) notie_as_tuple_with_references47,1774 +constexpr decltype(auto) tie_as_tuple_with_references(const detail::sequence_tuple::tuple&tie_as_tuple_with_references52,2036 +constexpr auto my_tuple_cat_impl(const Tuple1& t1, std::index_sequence, const Tuple2& t2,my_tuple_cat_impl57,2358 +constexpr auto my_tuple_cat(const Tuple1& t1, const Tuple2& t2) noexcept {my_tuple_cat65,2662 +constexpr auto make_flat_tuple_of_references(TupleOrUserType& t, const Getter& g, size_t_make_flat_tuple_of_references73,2976 +constexpr sequence_tuple::tuple<> make_flat_tuple_of_references(TupleOrUserType&, const Getter&,make_flat_tuple_of_references82,3436 +constexpr auto make_flat_tuple_of_references(TupleOrUserType& t, const Getter& g, size_t_make_flat_tuple_of_references87,3656 + +externals/magic_get/include/boost/pfr/detail/cast_to_layout_compatible.hpp,921 +#define BOOST_PFR_DETAIL_CAST_TO_LAYOUT_COMPATIBLE_HPPBOOST_PFR_DETAIL_CAST_TO_LAYOUT_COMPATIBLE_HPP7,255 +namespace boost { namespace pfr { namespace detail {boost16,478 +namespace boost { namespace pfr { namespace detail {pfr16,478 +namespace boost { namespace pfr { namespace detail {detail16,478 +constexpr void static_assert_layout_compatible() noexcept {static_assert_layout_compatible19,560 +#define MAY_ALIAS MAY_ALIAS29,1009 +#define MAY_ALIASMAY_ALIAS31,1064 +MAY_ALIAS const To& cast_to_layout_compatible(const From& val) noexcept {cast_to_layout_compatible36,1135 +MAY_ALIAS const volatile To& cast_to_layout_compatible(const volatile From& val) noexcept {cast_to_layout_compatible43,1394 +MAY_ALIAS volatile To& cast_to_layout_compatible(volatile From& val) noexcept {cast_to_layout_compatible51,1690 +MAY_ALIAS To& cast_to_layout_compatible(From& val) noexcept {cast_to_layout_compatible59,1962 + +externals/magic_get/include/boost/pfr/detail/functional.hpp,2418 +#define BOOST_PFR_DETAIL_FUNCTIONAL_HPPBOOST_PFR_DETAIL_FUNCTIONAL_HPP7,240 +namespace boost { namespace pfr { namespace detail {boost16,405 +namespace boost { namespace pfr { namespace detail {pfr16,405 +namespace boost { namespace pfr { namespace detail {detail16,405 + struct equal_impl {equal_impl18,502 + constexpr static bool cmp(const T& v1, const U& v2) noexcept {cmp20,562 + struct equal_impl {equal_impl27,854 + constexpr static bool cmp(const T&, const U&) noexcept {cmp29,920 + struct not_equal_impl {not_equal_impl35,1090 + constexpr static bool cmp(const T& v1, const U& v2) noexcept {cmp37,1154 + struct not_equal_impl {not_equal_impl44,1450 + constexpr static bool cmp(const T&, const U&) noexcept {cmp46,1520 + struct less_impl {less_impl52,1690 + constexpr static bool cmp(const T& v1, const U& v2) noexcept {cmp54,1749 + struct less_impl {less_impl62,2054 + constexpr static bool cmp(const T&, const U&) noexcept {cmp64,2119 + struct less_equal_impl {less_equal_impl70,2288 + constexpr static bool cmp(const T& v1, const U& v2) noexcept {cmp72,2353 + struct less_equal_impl {less_equal_impl80,2664 + constexpr static bool cmp(const T&, const U&) noexcept {cmp82,2735 + struct greater_impl {greater_impl88,2905 + constexpr static bool cmp(const T& v1, const U& v2) noexcept {cmp90,2967 + struct greater_impl {greater_impl98,3275 + constexpr static bool cmp(const T&, const U&) noexcept {cmp100,3343 + struct greater_equal_impl {greater_equal_impl106,3512 + constexpr static bool cmp(const T& v1, const U& v2) noexcept {cmp108,3580 + struct greater_equal_impl {greater_equal_impl116,3894 + constexpr static bool cmp(const T&, const U&) noexcept {cmp118,3968 + constexpr void hash_combine(SizeT& seed, SizeT value) noexcept {hash_combine124,4124 + struct hash_impl {hash_impl129,4304 + constexpr static std::size_t compute(const T& val) noexcept {compute131,4354 + typedef std::decay_t::type> eleelem_t132,4424 + struct hash_impl {hash_impl140,4761 + constexpr static std::size_t compute(const T&) noexcept {compute142,4817 + constexpr std::size_t min_size(std::size_t x, std::size_t y) noexcept {min_size148,5002 + +externals/magic_get/include/boost/pfr/detail/for_each_field_impl.hpp,804 +#define BOOST_PFR_DETAIL_FOR_EACH_FIELD_IMPL_HPPBOOST_PFR_DETAIL_FOR_EACH_FIELD_IMPL_HPP7,249 +namespace boost { namespace pfr { namespace detail {boost17,491 +namespace boost { namespace pfr { namespace detail {pfr17,491 +namespace boost { namespace pfr { namespace detail {detail17,491 +using size_t_ = std::integral_constant;size_t_20,574 +void for_each_field_impl_apply(T&& v, F&& f, I i, long) {for_each_field_impl_apply23,734 +void for_each_field_impl_apply(T&& v, F&& f, I /*i*/, int) {for_each_field_impl_apply28,879 +void for_each_field_impl(T& t, F&& f, std::index_sequence, std::false_type /*move_values*/for_each_field_impl33,1033 +void for_each_field_impl(T& t, F&& f, std::index_sequence, std::true_type /*move_values*/)for_each_field_impl43,1345 + +externals/magic_get/include/boost/pfr/detail/core14.hpp,70 +#define BOOST_PFR_DETAIL_CORE14_HPPBOOST_PFR_DETAIL_CORE14_HPP7,236 + +externals/magic_get/include/boost/pfr/detail/core14_loophole.hpp,1916 +#define BOOST_PFR_DETAIL_CORE14_LOOPHOLE_HPPBOOST_PFR_DETAIL_CORE14_LOOPHOLE_HPP21,1034 +namespace boost { namespace pfr { namespace detail {boost48,1906 +namespace boost { namespace pfr { namespace detail {pfr48,1906 +namespace boost { namespace pfr { namespace detail {detail48,1906 +struct tag {tag56,2275 +template constexpr T& unsafe_declval_like() noexcept {unsafe_declval_like61,2499 +struct fn_def {fn_def68,2697 + friend auto loophole(tag) { return boost::pfr::detail::unsafe_declval_like< std::removeloophole69,2713 +struct fn_def {};fn_def74,2944 +struct loophole_ubiq {loophole_ubiq82,3352 +struct loophole_type_list< T, std::index_sequence >loophole_type_list96,3961 + using type = sequence_tuple::tuple< decltype(loophole(tag{}))... >;type100,4128 +auto tie_as_tuple_loophole_impl(T& lvalue) noexcept {tie_as_tuple_loophole_impl105,4230 + using type = std::remove_cv_t>;type106,4284 + using indexes = std::make_index_sequence()>;indexes107,4347 + using tuple_type = typename loophole_type_list::type;tuple_type108,4415 +auto tie_or_value(T& val, std::enable_if_t >::value>* tie_or_value122,4807 +decltype(auto) tie_or_value(T& val, std::enable_if_t>::vtie_or_value129,5065 +auto tie_as_tuple_recursively_impl(T& tup, std::index_sequence ) noexcepttie_as_tuple_recursively_impl147,5871 +auto tie_as_tuple_recursively(rvalue_t tup) noexcept {tie_as_tuple_recursively162,6248 + using indexes = std::make_index_sequence;indexes163,6306 +auto tie_as_flat_tuple(T& t) {tie_as_flat_tuple168,6463 +auto tie_as_tuple(T& val) noexcept {tie_as_tuple181,6844 +void for_each_field_dispatcher(T& t, F&& f, std::index_sequence) {for_each_field_dispatcher188,7008 + +externals/magic_get/include/boost/pfr/detail/core17.hpp,630 +#define BOOST_PFR_DETAIL_CORE17_HPPBOOST_PFR_DETAIL_CORE17_HPP8,237 +namespace boost { namespace pfr { namespace detail {boost14,417 +namespace boost { namespace pfr { namespace detail {pfr14,417 +namespace boost { namespace pfr { namespace detail {detail14,417 +struct do_not_define_std_tuple_size_for_me {do_not_define_std_tuple_size_for_me18,595 + bool test1 = true;test119,640 +constexpr bool do_structured_bindings_work() noexcept { // *************************************do_structured_bindings_work23,686 +void for_each_field_dispatcher(T& t, F&& f, std::index_sequence) {for_each_field_dispatcher50,1767 + +externals/magic_get/include/boost/pfr/detail/core14_classic.hpp,7559 +#define BOOST_PFR_DETAIL_CORE14_CLASSIC_HPPBOOST_PFR_DETAIL_CORE14_CLASSIC_HPP7,244 +namespace boost { namespace pfr { namespace detail {boost30,1002 +namespace boost { namespace pfr { namespace detail {pfr30,1002 +namespace boost { namespace pfr { namespace detail {detail30,1002 +template struct identity{identity34,1101 + typedef T type;type35,1137 +constexpr T construct_helper() noexcept { // adding const here allows to deal with copyable onlyconstruct_helper39,1180 +namespace typeid_conversions {typeid_conversions47,1580 +constexpr std::size_t native_types_mask = 31;native_types_mask57,1851 +constexpr std::size_t bits_per_extension = 3;bits_per_extension58,1897 +constexpr std::size_t extension_maks = (extension_maks59,1943 +constexpr std::size_t native_ptr_type = (native_ptr_type63,2129 +constexpr std::size_t native_const_ptr_type = (native_const_ptr_type67,2288 +constexpr std::size_t native_const_volatile_ptr_type = (native_const_volatile_ptr_type72,2454 +constexpr std::size_t native_volatile_ptr_type = (native_volatile_ptr_type77,2629 +constexpr std::size_t native_ref_type = (native_ref_type82,2798 +using if_extension = std::enable_if_t< (Index & extension_maks) == Extension >*;if_extension88,3010 +constexpr std::size_t type_to_id_extension_apply(std::size_t ext) noexcept {type_to_id_extension_apply92,3160 +using remove_1_ext = size_t_<remove_1_ext104,3689 +#define BOOST_MAGIC_GET_REGISTER_TYPE(BOOST_MAGIC_GET_REGISTER_TYPE132,5535 +constexpr std::size_t tuple_end_tag = 25;tuple_end_tag168,7436 +constexpr std::size_t type_to_id(identity) noexcept {type_to_id174,7661 +constexpr std::size_t type_to_id(identity) noexcept {type_to_id184,8018 +constexpr std::size_t type_to_id(identity) noexcept {type_to_id194,8393 +constexpr std::size_t type_to_id(identity) noexcept {type_to_id204,8795 +constexpr std::size_t type_to_id(identity) noexcept {type_to_id214,9179 +constexpr std::size_t type_to_id(identity, std::enable_if_t::value>*) ntype_to_id224,9538 +constexpr std::size_t type_to_id(identity, std::enable_if_t::value>*) type_to_id229,9748 + constexpr auto t = flat_array_of_type_ids();t236,10155 + constexpr bool requires_tuplening = (requires_tuplening238,10271 + for (std::size_t i = 0; i < t.size(); ++i)i243,10497 + for (std::size_t i = 0; i < t.size(); ++i)i247,10661 +constexpr auto id_to_type(size_t_, if_extension) noexcept {id_to_type256,10811 + typedef decltype( id_to_type(remove_1_ext()) )* res_t;res_t257,10903 +constexpr auto id_to_type(size_t_, if_extension) noexcept id_to_type262,11039 + typedef const decltype( id_to_type(remove_1_ext()) )* res_t;res_t263,11137 +constexpr auto id_to_type(size_t_, if_extension) id_to_type268,11279 + typedef const volatile decltype( id_to_type(remove_1_ext()) )* res_t;res_t269,11386 +constexpr auto id_to_type(size_t_, if_extension) noexceid_to_type275,11538 + typedef volatile decltype( id_to_type(remove_1_ext()) )* res_t;res_t276,11639 +constexpr auto id_to_type(size_t_, if_extension) noexcept {id_to_type282,11785 +struct ubiq_val {ubiq_val290,12097 + std::size_t* ref_;ref_291,12115 + constexpr void assign(const T& typeids) const noexcept {assign294,12162 + constexpr void assign(std::size_t val) const noexcept {assign299,12321 + constexpr auto typeids = typeid_conversions::type_to_id(identity{});typeids305,12484 +struct ubiq_sizes {ubiq_sizes312,12745 + std::size_t& ref_;ref_313,12765 +constexpr size_array get_type_offsets() noexcept {get_type_offsets324,13122 + typedef size_array array_t;array_t325,13176 +constexpr auto flat_type_to_array_of_type_ids(std::size_t* types, std::index_sequence) noeflat_type_to_array_of_type_ids339,13645 +constexpr size_array fields_count_and_type_ids_with_zeros() noexcept {fields_count_and_type_ids_with_zeros357,14225 +constexpr auto flat_array_of_type_ids() noexcept {flat_array_of_type_ids366,14585 +constexpr sequence_tuple::tuple<> as_flat_tuple_impl(std::index_sequence<>) noexcept {as_flat_tuple_impl387,15233 +constexpr auto increment_index_sequence(std::index_sequence) noexcept {increment_index_sequence392,15412 +constexpr auto prepare_subtuples(size_t_, size_t_, size_t_) noexcept {prepare_subtuples397,15622 +constexpr auto prepare_subtuples(size_t_, size_t_, size_t_prepare_subtuples403,15936 +constexpr auto prepare_subtuples(size_t_, size_t_, size_prepare_subtuples409,16238 +constexpr Array remove_subtuples(Array indexes_plus_1, const Array& subtuple_lengths) noexcept {remove_subtuples417,16637 +constexpr size_array resize_dropping_zeros_and_decrementing(size_t_, const Array& a) noexcresize_dropping_zeros_and_decrementing431,17152 +constexpr auto as_flat_tuple_impl_drop_helpers(std::index_sequence, std::index_sequas_flat_tuple_impl_drop_helpers445,17613 + > subtuples_uncleanuped_t;subtuples_uncleanuped_t464,19020 +constexpr std::size_t count_skips_in_array(std::size_t begin_index, std::size_t end_index, constcount_skips_in_array470,19116 +constexpr auto as_flat_tuple_impl(std::index_sequence) noexcept {as_flat_tuple_impl484,19732 +constexpr auto internal_tuple_with_same_alignment() noexcept {internal_tuple_with_same_alignment495,20143 + typedef typename std::remove_cv::type type;type496,20206 +using internal_tuple_with_same_alignment_t = decltype( internal_tuple_with_same_alignment() )internal_tuple_with_same_alignment_t508,20621 +struct ubiq_is_flat_refelectable {ubiq_is_flat_refelectable512,20754 + bool& is_flat_refelectable;is_flat_refelectable513,20789 +constexpr bool is_flat_refelectable(std::index_sequence) noexcept {is_flat_refelectable523,21026 +auto tie_as_flat_tuple(T& lvalue) noexcept {tie_as_flat_tuple539,21429 + using type = std::remove_cv_t;type540,21474 + using tuple_type = internal_tuple_with_same_alignment_t;tuple_type541,21512 +auto tie_as_tuple(T& val) noexcept {tie_as_tuple550,21801 + typedef T type;type551,21838 +struct ubiq_constructor_constexpr_copy {ubiq_constructor_constexpr_copy564,22461 + std::size_t ignore;ignore565,22502 +struct is_constexpr_aggregate_initializable { // TODO: try to fix itis_constexpr_aggregate_initializable582,22905 +struct next_step {next_step599,23557 + T& t;t600,23576 + F& f;f601,23586 +void for_each_field_in_depth(T& t, F&& f, std::index_sequence, identity...) {for_each_field_in_depth618,23970 +void for_each_field_in_depth(T& lvalue, F&& f, std::index_sequence<>, identity...) {for_each_field_in_depth627,24313 + using tuple_type = sequence_tuple::tuple;tuple_type628,24406 +void for_each_field_dispatcher_1(T& t, F&& f, std::index_sequence, std::true_type /*is_flafor_each_field_dispatcher_1637,24752 +void for_each_field_dispatcher_1(T& t, F&& f, std::index_sequence, std::false_type /*is_flfor_each_field_dispatcher_1645,24998 +void for_each_field_dispatcher(T& t, F&& f, std::index_sequence) {for_each_field_dispatcher654,25295 + +externals/magic_get/include/boost/pfr/detail/size_array.hpp,1185 +#define BOOST_PFR_DETAIL_SIZE_ARRAY_HPPBOOST_PFR_DETAIL_SIZE_ARRAY_HPP7,240 +namespace boost { namespace pfr { namespace detail {boost14,384 +namespace boost { namespace pfr { namespace detail {pfr14,384 +namespace boost { namespace pfr { namespace detail {detail14,384 +struct size_array { // libc++ misses constexpr on operator[]size_array18,514 + typedef std::size_t type;type19,599 + std::size_t data[N];data20,629 + static constexpr std::size_t size() noexcept { return N; }size22,655 + constexpr std::size_t count_nonzeros() const noexcept {count_nonzeros24,719 + constexpr std::size_t count_from_opening_till_matching_parenthis_seq(std::size_t from, std::count_from_opening_till_matching_parenthis_seq34,967 +struct size_array<0> { // libc++ misses constexpr on operator[]size_array58,1688 + typedef std::size_t type;type59,1776 + std::size_t data[1];data60,1806 + static constexpr std::size_t size() noexcept { return 0; }size62,1832 + constexpr std::size_t count_nonzeros() const noexcept {count_nonzeros64,1896 +constexpr std::size_t get(const size_array& a) noexcept {get70,2024 + +externals/magic_get/include/boost/pfr/detail/fields_count.hpp,2476 +#define BOOST_PFR_DETAIL_FIELDS_COUNT_HPPBOOST_PFR_DETAIL_FIELDS_COUNT_HPP7,242 +namespace boost { namespace pfr { namespace detail {boost23,707 +namespace boost { namespace pfr { namespace detail {pfr23,707 +namespace boost { namespace pfr { namespace detail {detail23,707 +using size_t_ = std::integral_constant;size_t_27,834 +struct ubiq_constructor {ubiq_constructor30,975 + std::size_t ignore;ignore31,1001 +struct ubiq_constructor_except {ubiq_constructor_except38,1447 +template struct is_single_field_and_aggregate_initializable: std::falseis_single_field_and_aggregate_initializable45,1810 +template struct is_single_field_and_aggregate_initializable<1, T>: std::integral_constis_single_field_and_aggregate_initializable46,1916 +struct is_aggregate_initializable_n {is_aggregate_initializable_n54,2449 + static constexpr bool is_not_constructible_n(std::index_sequence) noexcept {is_not_constructible_n56,2519 + static constexpr bool value =value62,2777 +using enable_if_constructible_helper_t = std::size_t;enable_if_constructible_helper_t75,3349 +constexpr std::size_t detect_fields_count(size_t_, size_t_, long) noexcept {detect_fields_count79,3590 +constexpr auto detect_fields_count(size_t_, size_t_, long) noexceptdetect_fields_count87,3897 + using next_t = size_t_;next_t90,4033 +constexpr std::size_t detect_fields_count(size_t_, size_t_, int) noexcept {detect_fields_count95,4225 + using next_t = size_t_<(Begin + Middle) / 2>;next_t96,4316 +constexpr auto detect_fields_count_greedy_remember(size_t_, long) noexceptdetect_fields_count_greedy_remember102,4621 +constexpr std::size_t detect_fields_count_greedy_remember(size_t_, int) noexcept {detect_fields_count_greedy_remember109,4798 +constexpr std::size_t detect_fields_count_greedy(size_t_, size_t_) noexcept {detect_fields_count_greedy114,4935 +constexpr std::size_t detect_fields_count_greedy(size_t_, size_t_) noexcept {detect_fields_count_greedy119,5147 +constexpr auto detect_fields_count_dispatch(size_t_, long) noexceptdetect_fields_count_dispatch128,5734 +constexpr std::size_t detect_fields_count_dispatch(size_t_, int) noexcept {detect_fields_count_dispatch135,5948 +constexpr std::size_t fields_count() noexcept {fields_count144,6480 + using type = std::remove_cv_t;type145,6528 + +externals/magic_get/include/boost/pfr/detail/detectors.hpp,1403 +#define BOOST_PFR_DETAIL_DETECTORS_HPPBOOST_PFR_DETAIL_DETECTORS_HPP7,239 +namespace boost { namespace pfr { namespace detail {boost12,332 +namespace boost { namespace pfr { namespace detail {pfr12,332 +namespace boost { namespace pfr { namespace detail {detail12,332 + struct success{};success14,476 + struct not_appliable {not_appliable16,576 + static constexpr bool value = std::is_same<value17,603 + template using comp_eq_detector = decltype(comp_eq_detector_msvc_helpercomp_eq_detector26,994 + template using comp_ne_detector = decltype(comp_ne_detector_msvc_helpecomp_ne_detector30,1305 + template using comp_lt_detector = decltype(comp_lt_detector_msvc_helpecomp_lt_detector34,1616 + template using comp_le_detector = decltype(comp_le_detector_msvc_helpecomp_le_detector38,1928 + template using comp_gt_detector = decltype(comp_gt_detector_msvc_helpcomp_gt_detector42,2239 + template using comp_ge_detector = decltype(comp_ge_detector_msvc_helpcomp_ge_detector46,2552 + template using ostreamable_detector = decltype(ostreamable_detector_msvc_ostreamable_detector51,2874 + template using istreamable_detector = decltype(istreamable_detector_msvc_istreamable_detector55,3197 + +externals/magic_get/README.md,445 +# Precise and Flat Reflection (ex Magic Get, ex PODs Flat Reflection)Precise and Flat Reflection (ex Magic Get, ex PODs Flat Reflection)1,0 +### Test resultsTest results8,323 +### Motivating Example #0Motivating Example #015,1603 +### Motivating Example #1Motivating Example #140,2086 +### Motivating Example #2Motivating Example #267,2604 +### Requirements and LimitationsRequirements and Limitations95,3157 +### LicenseLicense102,3429 + +externals/binaryen/CMakeLists.txt,1112 +PROJECT(binaryen C CXX)binaryen1,0 +set(BUILD_STATIC_LIB ON)BUILD_STATIC_LIB5,87 +FUNCTION(ADD_COMPILE_FLAG value)ADD_COMPILE_FLAG9,139 +FUNCTION(ADD_CXX_FLAG value)ADD_CXX_FLAG16,372 + SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${value}" PARENT_SCOPE)CMAKE_CXX_FLAGS18,453 +FUNCTION(ADD_DEBUG_COMPILE_FLAG value)ADD_DEBUG_COMPILE_FLAG21,534 +FUNCTION(ADD_NONDEBUG_COMPILE_FLAG value)ADD_NONDEBUG_COMPILE_FLAG30,841 +FUNCTION(ADD_LINK_FLAG value)ADD_LINK_FLAG39,1271 +SET(all_passes passes)all_passes57,2032 + SET(THREADS_PREFER_PTHREAD_FLAG ON)THREADS_PREFER_PTHREAD_FLAG94,3491 + SET(CMAKE_THREAD_PREFER_PTHREAD ON)CMAKE_THREAD_PREFER_PTHREAD95,3529 + set(TARGET_ARCH "x86-64")TARGET_ARCH119,4294 + set(TARGET_ARCH "i386")TARGET_ARCH121,4384 + set(TARGET_ARCH "ARM")TARGET_ARCH123,4464 +SET(binaryen_SOURCESbinaryen_SOURCES181,6142 + ADD_LIBRARY(binaryen STATIC ${binaryen_SOURCES}) binaryen196,6486 + ADD_LIBRARY(binaryen SHARED ${binaryen_SOURCES})binaryen198,6548 +SET(s2wasm_SOURCESs2wasm_SOURCES201,6608 +ADD_EXECUTABLE(eosio-s2wasmeosio-s2wasm206,6700 + +externals/binaryen/check.py,9960 +import scripts.test.s2wasm as s2wasms2wasm33,1179 +not_executable_suffix = ['.txt', '.js', '.ilk', '.pdb', '.dll']not_executable_suffix43,1432 +executables = sorted(filter(lambda x: not any(x.endswith(s) for s inexecutables44,1496 + out, err = subprocess.Popen([os.path.join(options.binaryen_bin, e), '--help'],out49,1769 + out, err = subprocess.Popen([os.path.join(options.binaryen_bin, e), '--help'],err49,1769 +wast = os.path.join(options.binaryen_test, 'hello_world.wast')wast58,2251 +cmd = WASM_OPT + [wast, '-o', 'a.wast', '-S']cmd60,2342 + binary = '.wasm' in tbinary79,3100 + passname = os.path.basename(t).replace('.wast', '').replace('.wasm', '')passname80,3126 + opts = ['-' + passname] if passname.startswith('O') else ['--' + p for p in passname.split('opts81,3203 + t = os.path.join(options.binaryen_test, 'passes', t)t82,3304 + actual = ''actual83,3361 + cmd = WASM_OPT + opts + ['split.wast', '--print']cmd87,3507 + curr = run_command(cmd)curr88,3563 + debugged = run_command(cmd + ['--debug'], stderr=subprocess.PIPE)debugged91,3660 + old_pass_debug = os.environ.get('BINARYEN_PASS_DEBUG')old_pass_debug94,3813 + pass_debug = run_command(cmd)pass_debug97,3933 + cmd = ASM2WASM + [os.path.join(options.binaryen_test, asm)]cmd114,4533 + wasm = asm.replace('.asm.js', '.fromasm')wasm115,4601 + wasm = os.path.join(options.binaryen_test, wasm)wasm140,5490 + def do_asm2wasm_test():do_asm2wasm_test143,5578 + old_pass_debug = os.environ.get('BINARYEN_PASS_DEBUG')old_pass_debug156,6053 + proc = subprocess.Popen([options.interpreter, 'ztemp.wast'], stderr=subprocess.PIPE)proc173,6790 + out, err = proc.communicate()out174,6885 + out, err = proc.communicate()err174,6885 + start, end = reported.split('-')start178,7041 + start, end = reported.split('-')end178,7041 + start_line, start_col = map(int, start.split('.'))start_line179,7088 + start_line, start_col = map(int, start.split('.'))start_col179,7088 + lines = open('ztemp.wast').read().split('\n')lines180,7153 + jsmap = 'a.wasm.map'jsmap194,7682 + url_section_name = bytearray([16]) + bytearray('sourceMappingURL')url_section_name205,8209 + payload = 'http://example.org/' + jsmappayload206,8288 + url_section_contents = bytearray([len(payload)]) + bytearray(payload)url_section_contents208,8395 + binary_contents = bytearray(binary.read())binary_contents210,8512 +asmjs = os.path.join(options.binaryen_test, 'hello_world.asm.js')asmjs219,8937 + wasm = os.path.basename(t).replace('.wast', '')wasm232,9483 + cmd = WASM_OPT + [os.path.join(options.binaryen_test, 'print', t), '--print']cmd233,9535 + actual, err = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE).communicactual235,9649 + actual, err = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE).communicerr235,9649 + cmd = WASM_OPT + [os.path.join(options.binaryen_test, 'print', t), '--print-minified']cmd237,9859 + actual, err = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE).communicactual239,9982 + actual, err = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE).communicerr239,9982 + t = os.path.join(options.binaryen_test, t)t247,10355 + f = t + '.from-wast'f248,10402 + cmd = WASM_OPT + [t, '--print']cmd249,10427 + actual = run_command(cmd)actual250,10463 + actual = actual.replace('printing before:\n', '')actual251,10493 + expected = open(f, 'rb').read()expected253,10548 + t = os.path.join(options.binaryen_test, t)t267,10991 + cmd = WASM_DIS + [t]cmd268,11038 + actual = run_command(cmd)actual271,11135 + expected = f.read()expected274,11205 + t = os.path.join('test', 'merge', t)t283,11439 + u = t + '.toMerge'u284,11480 + cmd = WASM_MERGE + [t, u, '-o', 'a.wast', '-S', '--verbose']cmd287,11556 + stdout = run_command(cmd)stdout290,11742 + actual = open('a.wast').read()actual291,11776 + out = t + '.combined'out292,11815 + t = os.path.join('test', 'ctor-eval', t)t305,12242 + ctors = open(t + '.ctors').read().strip()ctors306,12287 + cmd = WASM_CTOR_EVAL + [t, '-o', 'a.wast', '-S', '--ctors', ctors]cmd307,12333 + stdout = run_command(cmd)stdout308,12404 + actual = open('a.wast').read()actual309,12434 + out = t + '.out'out310,12469 + BLACKLIST = ['memory.wast', 'binary.wast'] # FIXME we support old and new memory formats, for BLACKLIST317,12641 + spec_tests = [os.path.join('spec', t) for t in sorted(os.listdir(os.path.join(options.binaryenspec_tests319,12884 + wast = os.path.join(options.binaryen_test, t)wast326,13145 + def run_spec_test(wast):run_spec_test332,13363 + def run_opt_test(wast):run_opt_test340,13651 + def check_expected(actual, expected):check_expected345,13777 + def fix(x):fix349,13997 + expected = os.path.join(options.binaryen_test, 'spec', 'expected-output', os.path.basename(wexpected362,14453 + splits_to_skip = {splits_to_skip381,15227 + split_num = 0split_num387,15422 + actual = ''actual389,15547 + skip = splits_to_skip.get(os.path.basename(wast)) or []skip391,15612 + result_wast = binary_format_check('split.wast', verify_final_result=False)result_wast401,16147 + f = open('a.js', 'w')f414,16783 + cmd = [MOZJS, 'a.js']cmd418,16979 + out = run_command(cmd, stderr=subprocess.STDOUT)out419,17005 + expected = open(os.path.join(options.binaryen_test, 'binaryen.js', s + '.txt')).read()expected420,17058 +cmd = WASM_AS + [os.path.join(options.binaryen_test, 'validator', 'invalid_export.wast')]cmd429,17330 +cmd = WASM_AS + [os.path.join(options.binaryen_test, 'validator', 'invalid_import.wast')]cmd431,17437 +cmd = WASM_AS + ['--validate=web', os.path.join(options.binaryen_test, 'validator', 'invalid_expcmd433,17544 +cmd = WASM_AS + ['--validate=web', os.path.join(options.binaryen_test, 'validator', 'invalid_impcmd435,17688 +cmd = WASM_AS + ['--validate=none', os.path.join(options.binaryen_test, 'validator', 'invalid_recmd437,17832 + unexpected_result_count = 0unexpected_result_count444,18056 + import test.waterfall.src.link_assembly_files as link_assembly_fileslink_assembly_files446,18087 + s2wasm_torture_out = os.path.abspath(os.path.join(options.binaryen_test, 's2wasm-torture-out')s2wasm_torture_out447,18158 + import test.waterfall.src.execute_files as execute_filesexecute_files458,18778 + VANILLA_EMCC = os.path.join(options.binaryen_test, 'emscripten', 'emcc')VANILLA_EMCC482,19794 + command = [VANILLA_EMCC, '-v']command484,19954 + base = c.replace('.cpp', '').replace('.c', '')base491,20209 + expected = open(os.path.join(options.binaryen_test, 'wasm_backend', base + '.txt')).read()expected492,20262 + only = [] if opts != ['-O1'] or '_only' not in base else ['-s', 'ONLY_MY_CODE=1'] # onlyonly494,20401 + command = [VANILLA_EMCC, '-o', 'a.wasm.js', os.path.join(options.binaryen_test, 'wasm_bacommand495,20591 + cmd = [NODEJS, 'a.wasm.js']cmd501,20911 + out = run_command(cmd)out502,20949 + output_file = os.path.join(options.binaryen_bin, 'example')output_file519,21504 + cmd = ['-I' + os.path.join(options.binaryen_root, 'src'), '-g', '-lasmjs', '-lsupport', '-cmd520,21570 + out = subprocess.Popen([os.path.join('scripts', 'clean_c_api_trace.py'), os.path.join(opout523,21855 + src = 'trace.cpp'src528,22164 + expected = os.path.join(options.binaryen_test, 'example', t + '.txt')expected530,22237 + expected = os.path.join(options.binaryen_test, 'example', '.'.join(t.split('.')[:-1]) + expected533,22391 + extra = [NATIVECC, src, '-c', '-o', 'example.o',extra536,22572 + cmd = ['example.o', '-lbinaryen'] + cmd + ['-Wl,-rpath=$ORIGIN/../lib']cmd541,22935 + cmd = [NATIVEXX, '-std=c++11'] + cmdcmd548,23208 + proc = subprocess.Popen([output_file], stdout=subprocess.PIPE, stderr=subprocess.PIPE)proc553,23371 + actual, err = proc.communicate()actual554,23466 + actual, err = proc.communicate()err554,23466 + expected = open(expected).read()expected562,23766 + command = [EMCC, '-o', 'a.wasm.js', '-s', 'BINARYEN=1', os.path.join(options.binaryen_test, command572,23945 + cmd = [MOZJS, 'a.wasm.js']cmd576,24207 + out = run_command(cmd)out577,24238 + proc = subprocess.Popen([NODEJS, 'a.wasm.js'], stdout=subprocess.PIPE, stderr=subprocess.PIPproc580,24305 + out, err = proc.communicate()out581,24404 + out, err = proc.communicate()err581,24404 + method = method_initmethod590,24907 + command = [EMCC, '-o', 'a.wasm.js', '-s', 'BINARYEN=1', os.path.join(options.binaryen_testcommand591,24934 + see_polyfill = 'var WasmJS = ' in open('a.wasm.js').read()see_polyfill596,25211 + def break_cashew():break_cashew603,25504 + proc = subprocess.Popen([NODEJS, 'a.wasm.js'], stdout=subprocess.PIPE, stderr=subprocessproc629,26773 + out, err = proc.communicate()out630,26876 + out, err = proc.communicate()err630,26876 + base = c.replace('.cpp', '').replace('.c', '')base643,27251 + post = base + '.post.js'post644,27304 + expected = open(os.path.join(options.binaryen_test, base + '.txt')).read()expected649,27450 + emcc = os.path.join(options.binaryen_test, base + '.emcc')emcc650,27531 + extra = []extra651,27596 + extra = json.loads(open(emcc).read())extra653,27644 + command = [EMCC, '-o', 'a.wasm.js', '-s', 'BINARYEN=1', os.path.join(options.binaryen_command657,27901 + def execute():execute674,28654 + recreated = binary_format_check('a.wasm.wast', verify_final_result=False)recreated686,29067 + +externals/binaryen/build-js.sh,0 + +externals/binaryen/test/printf.c,23 +int main() {main3,20 + +externals/binaryen/test/dynamicLibrary.asm.js,629 +function stackAlloc(size) {stackAlloc64,2025 +function stackSave() {stackSave74,2255 +function stackRestore(top) {stackRestore77,2301 +function establishStackSpace(stackBase, stackMax) {establishStackSpace81,2365 +function setThrew(threw, value) {setThrew88,2520 +function ___cxx_global_var_init() {___cxx_global_var_init97,2674 +function __ZN3FooC2Ev($0) {__ZN3FooC2Ev103,2806 +function __GLOBAL__sub_I_liblib_cpp() {__GLOBAL__sub_I_liblib_cpp112,3059 +function runPostSets() {runPostSets118,3177 +function __post_instantiate() {__post_instantiate121,3219 +Module["asm"] = (function(global, env, buffer) {Module1,0 + +externals/binaryen/test/hello_libcxx.cpp,21 +int main()main3,21 + +externals/binaryen/test/unit.2asm.js,0 + +externals/binaryen/test/address.2asm.js,117 + function good(i) {good16,588 + function bad2(i) {bad234,2081 +function asmFunc(global, env, buffer) {asmFunc1,0 + +externals/binaryen/test/two_sides.asm.js,109 + function _test(i1, i2, i3, i4, i5) {_test4,96 +Module["asm"] = (function(global, env, buffer) {Module1,0 + +externals/binaryen/test/linker/main.s,179 +foo: # @foofoo7,134 +.Lfunc_end0:Lfunc_end014,300 +main: # @mainmain21,427 +.Lfunc_end1:Lfunc_end130,647 + +externals/binaryen/test/linker/quux.c,24 +void quux() {}quux1,0 + +externals/binaryen/test/linker/archive/bar.s,88 +bar: # @barbar7,115 +.Lfunc_end0:Lfunc_end012,253 + +externals/binaryen/test/linker/archive/foo.s,88 +foo: # @foofoo7,133 +.Lfunc_end0:Lfunc_end014,299 + +externals/binaryen/test/linker/archive/baz.s,88 +baz: # @bazbaz7,133 +.Lfunc_end0:Lfunc_end011,247 + +externals/binaryen/test/linker/archive/bar_with_very_long_filename.s,88 +bar: # @barbar7,141 +.Lfunc_end0:Lfunc_end011,255 + +externals/binaryen/test/linker/baz.c,21 +void baz() {baz1,0 + +externals/binaryen/test/linker/foo.c,20 +int foo() {foo1,0 + +externals/binaryen/test/linker/main.c,43 +int foo() {foo1,0 +int main() {main7,41 + +externals/binaryen/test/linker/bar.c,32 +void bar() { quux(); }bar2,13 + +externals/binaryen/test/llvm_autogenerated/immediates.s,1765 +zero_i32:zero_i325,120 +.Lfunc_end0:Lfunc_end010,192 +one_i32:one_i3215,285 +.Lfunc_end1:Lfunc_end120,356 +max_i32:max_i3225,447 +.Lfunc_end2:Lfunc_end230,527 +min_i32:min_i3235,618 +.Lfunc_end3:Lfunc_end340,699 +zero_i64:zero_i6445,792 +.Lfunc_end4:Lfunc_end450,864 +one_i64:one_i6455,957 +.Lfunc_end5:Lfunc_end560,1028 +max_i64:max_i6465,1119 +.Lfunc_end6:Lfunc_end670,1208 +min_i64:min_i6475,1299 +.Lfunc_end7:Lfunc_end780,1389 +negzero_f32:negzero_f3285,1488 +.Lfunc_end8:Lfunc_end890,1568 +zero_f32:zero_f3295,1669 +.Lfunc_end9:Lfunc_end9100,1745 +one_f32:one_f32105,1838 +.Lfunc_end10:Lfunc_end10110,1913 +two_f32:two_f32115,2006 +.Lfunc_end11:Lfunc_end11120,2081 +nan_f32:nan_f32125,2174 +.Lfunc_end12:Lfunc_end12130,2247 +negnan_f32:negnan_f32135,2346 +.Lfunc_end13:Lfunc_end13140,2423 +inf_f32:inf_f32145,2522 +.Lfunc_end14:Lfunc_end14150,2600 +neginf_f32:neginf_f32155,2699 +.Lfunc_end15:Lfunc_end15160,2781 +custom_nan_f32:custom_nan_f32165,2894 +.Lfunc_end16:Lfunc_end16170,2984 +custom_nans_f32:custom_nans_f32175,3107 +.Lfunc_end17:Lfunc_end17180,3198 +negzero_f64:negzero_f64185,3315 +.Lfunc_end18:Lfunc_end18190,3395 +zero_f64:zero_f64195,3498 +.Lfunc_end19:Lfunc_end19200,3574 +one_f64:one_f64205,3669 +.Lfunc_end20:Lfunc_end20210,3744 +two_f64:two_f64215,3837 +.Lfunc_end21:Lfunc_end21220,3912 +nan_f64:nan_f64225,4005 +.Lfunc_end22:Lfunc_end22230,4078 +negnan_f64:negnan_f64235,4177 +.Lfunc_end23:Lfunc_end23240,4254 +inf_f64:inf_f64245,4353 +.Lfunc_end24:Lfunc_end24250,4431 +neginf_f64:neginf_f64255,4530 +.Lfunc_end25:Lfunc_end25260,4612 +custom_nan_f64:custom_nan_f64265,4725 +.Lfunc_end26:Lfunc_end26270,4822 +custom_nans_f64:custom_nans_f64275,4945 +.Lfunc_end27:Lfunc_end27280,5043 + +externals/binaryen/test/llvm_autogenerated/llvm-to-s.py,319 +ROOT_DIR = os.path.dirname(os.path.abspath(__file__))ROOT_DIR11,103 +LLVM_TEST_DIR = os.path.join('test', 'CodeGen', 'WebAssembly')LLVM_TEST_DIR12,157 +S_TEST_DIR = ROOT_DIRS_TEST_DIR13,220 +def FindTestFiles(directory, ext):FindTestFiles16,244 +def GetRunLine(test):GetRunLine27,525 +def main(args):main45,1071 + +externals/binaryen/test/llvm_autogenerated/mem-intrinsics.s,708 +copy_yes:copy_yes5,124 +.Lfunc_end0:Lfunc_end011,245 +copy_no:copy_no16,338 +.Lfunc_end1:Lfunc_end121,435 +move_yes:move_yes26,528 +.Lfunc_end2:Lfunc_end232,650 +move_no:move_no37,743 +.Lfunc_end3:Lfunc_end342,841 +set_yes:set_yes47,932 +.Lfunc_end4:Lfunc_end453,1052 +set_no:set_no58,1141 +.Lfunc_end5:Lfunc_end563,1237 +frame_index:frame_index68,1334 +.Lfunc_end6:Lfunc_end691,1982 +drop_result:drop_result96,2089 +.LBB7_2:LBB7_2106,2264 +.LBB7_3:LBB7_3110,2325 +.LBB7_4:LBB7_4114,2392 +.Lfunc_end7:Lfunc_end7120,2515 +tail_dup_to_reuse_result:tail_dup_to_reuse_result125,2648 +.LBB8_2:LBB8_2135,2836 +.LBB8_3:LBB8_3139,2897 +.LBB8_4:LBB8_4142,2930 +.Lfunc_end8:Lfunc_end8147,3023 + +externals/binaryen/test/llvm_autogenerated/fast-isel-noreg.s,151 +a:a6,122 +.Lfunc_end0:Lfunc_end011,187 +b:b17,265 +.LBB1_2:LBB1_223,347 +.Lfunc_end1:Lfunc_end128,415 +c:c34,493 +.Lfunc_end2:Lfunc_end242,629 + +externals/binaryen/test/llvm_autogenerated/cpus.s,42 +f:f5,100 +.Lfunc_end0:Lfunc_end010,165 + +externals/binaryen/test/llvm_autogenerated/comparisons_i64.s,557 +eq_i64:eq_i645,121 +.Lfunc_end0:Lfunc_end011,214 +ne_i64:ne_i6416,301 +.Lfunc_end1:Lfunc_end122,394 +slt_i64:slt_i6427,483 +.Lfunc_end2:Lfunc_end233,577 +sle_i64:sle_i6438,668 +.Lfunc_end3:Lfunc_end344,762 +ult_i64:ult_i6449,853 +.Lfunc_end4:Lfunc_end455,947 +ule_i64:ule_i6460,1038 +.Lfunc_end5:Lfunc_end566,1132 +sgt_i64:sgt_i6471,1223 +.Lfunc_end6:Lfunc_end677,1317 +sge_i64:sge_i6482,1408 +.Lfunc_end7:Lfunc_end788,1502 +ugt_i64:ugt_i6493,1593 +.Lfunc_end8:Lfunc_end899,1687 +uge_i64:uge_i64104,1778 +.Lfunc_end9:Lfunc_end9110,1872 + +externals/binaryen/test/llvm_autogenerated/signext-zeroext.s,228 +z2s_func:z2s_func5,125 +.Lfunc_end0:Lfunc_end014,297 +s2z_func:s2z_func19,392 +.Lfunc_end1:Lfunc_end126,509 +z2s_call:z2s_call31,604 +.Lfunc_end2:Lfunc_end239,765 +s2z_call:s2z_call44,860 +.Lfunc_end3:Lfunc_end358,1187 + +externals/binaryen/test/llvm_autogenerated/i32.s,1337 +add32:add325,107 +.Lfunc_end0:Lfunc_end011,199 +sub32:sub3216,282 +.Lfunc_end1:Lfunc_end122,374 +mul32:mul3227,457 +.Lfunc_end2:Lfunc_end233,549 +sdiv32:sdiv3238,634 +.Lfunc_end3:Lfunc_end344,728 +udiv32:udiv3249,815 +.Lfunc_end4:Lfunc_end455,909 +srem32:srem3260,996 +.Lfunc_end5:Lfunc_end566,1090 +urem32:urem3271,1177 +.Lfunc_end6:Lfunc_end677,1271 +and32:and3282,1356 +.Lfunc_end7:Lfunc_end788,1448 +or32:or3293,1529 +.Lfunc_end8:Lfunc_end899,1620 +xor32:xor32104,1701 +.Lfunc_end9:Lfunc_end9110,1793 +shl32:shl32115,1876 +.Lfunc_end10:Lfunc_end10121,1968 +shr32:shr32126,2053 +.Lfunc_end11:Lfunc_end11132,2146 +sar32:sar32137,2231 +.Lfunc_end12:Lfunc_end12143,2324 +clz32:clz32148,2409 +.Lfunc_end13:Lfunc_end13154,2492 +clz32_zero_undef:clz32_zero_undef159,2599 +.Lfunc_end14:Lfunc_end14165,2693 +ctz32:ctz32170,2800 +.Lfunc_end15:Lfunc_end15176,2883 +ctz32_zero_undef:ctz32_zero_undef181,2990 +.Lfunc_end16:Lfunc_end16187,3084 +popcnt32:popcnt32192,3197 +.Lfunc_end17:Lfunc_end17198,3285 +eqz32:eqz32203,3376 +.Lfunc_end18:Lfunc_end18209,3459 +rotl:rotl214,3542 +.Lfunc_end19:Lfunc_end19220,3633 +masked_rotl:masked_rotl225,3728 +.Lfunc_end20:Lfunc_end20231,3826 +rotr:rotr236,3921 +.Lfunc_end21:Lfunc_end21242,4012 +masked_rotr:masked_rotr247,4107 +.Lfunc_end22:Lfunc_end22253,4205 + +externals/binaryen/test/llvm_autogenerated/negative-base-reg.s,89 +main:main6,133 +.LBB0_1:LBB0_110,188 +.Lfunc_end0:Lfunc_end024,474 +args:args32,583 + +externals/binaryen/test/llvm_autogenerated/lower-em-ehsjlj-options.s,650 +exception: # @exceptionexception6,154 +.LBB0_2: # %try.contLBB0_228,883 +.Lfunc_end0:Lfunc_end032,1049 +setjmp_longjmp: # @setjmp_longjmpsetjmp_longjmp38,1182 +.Lfunc_end1:Lfunc_end153,1638 +setThrew: # @setThrewsetThrew58,1745 +.LBB2_2: # %if.endLBB2_270,2142 +.Lfunc_end2:Lfunc_end274,2306 +setTempRet0: # @setTempRet0setTempRet079,2407 +.Lfunc_end3:Lfunc_end386,2651 +__THREW__:__THREW__93,2789 +__threwValue:__threwValue100,2939 +__tempRet0:__tempRet0107,3091 + +externals/binaryen/test/llvm_autogenerated/load.s,203 +ldi32:ldi325,108 +.Lfunc_end0:Lfunc_end011,194 +ldi64:ldi6416,277 +.Lfunc_end1:Lfunc_end122,363 +ldf32:ldf3227,446 +.Lfunc_end2:Lfunc_end233,532 +ldf64:ldf6438,615 +.Lfunc_end3:Lfunc_end344,701 + +externals/binaryen/test/llvm_autogenerated/cfg-stackify.s,3423 +test0:test05,116 +.LBB0_1:LBB0_19,169 +.LBB0_3:LBB0_315,253 +.LBB0_4:LBB0_421,361 +.Lfunc_end0:Lfunc_end024,390 +test1:test129,473 +.LBB1_1:LBB1_133,526 +.LBB1_3:LBB1_339,610 +.LBB1_4:LBB1_445,718 +.Lfunc_end1:Lfunc_end148,747 +test2:test253,830 +.LBB2_2:LBB2_259,937 +.LBB2_3:LBB2_371,1227 +.Lfunc_end2:Lfunc_end276,1275 +doublediamond:doublediamond81,1374 +.LBB3_2:LBB3_292,1569 +.LBB3_4:LBB3_4101,1720 +.LBB3_5:LBB3_5105,1786 +.Lfunc_end3:Lfunc_end3112,1900 +triangle:triangle117,2005 +.LBB4_2:LBB4_2126,2167 +.Lfunc_end4:Lfunc_end4133,2281 +diamond:diamond138,2374 +.LBB5_2:LBB5_2149,2558 +.LBB5_3:LBB5_3153,2624 +.Lfunc_end5:Lfunc_end5160,2738 +single_block:single_block165,2839 +.Lfunc_end6:Lfunc_end6173,2975 +minimal_loop:minimal_loop178,3086 +.LBB7_1:LBB7_1183,3174 +.LBB7_2:LBB7_2188,3255 +.Lfunc_end7:Lfunc_end7191,3284 +simple_loop:simple_loop196,3393 +.LBB8_1:LBB8_1201,3485 +.Lfunc_end8:Lfunc_end8213,3696 +doubletriangle:doubletriangle218,3809 +.LBB9_3:LBB9_3231,4055 +.LBB9_4:LBB9_4235,4121 +.Lfunc_end9:Lfunc_end9242,4235 +ifelse_earlyexits:ifelse_earlyexits247,4360 +.LBB10_2:LBB10_2258,4559 +.LBB10_4:LBB10_4265,4688 +.Lfunc_end10:Lfunc_end10272,4803 +doublediamond_in_a_loop:doublediamond_in_a_loop277,4948 +.LBB11_1:LBB11_1280,5011 +.LBB11_3:LBB11_3291,5212 +.LBB11_5:LBB11_5302,5410 +.LBB11_6:LBB11_6309,5535 +.Lfunc_end11:Lfunc_end11312,5565 +test3:test3317,5686 +.LBB12_2:LBB12_2323,5781 +.LBB12_3:LBB12_3327,5829 +.LBB12_5:LBB12_5334,5936 +.LBB12_6:LBB12_6338,5980 +.Lfunc_end12:Lfunc_end12342,6019 +test4:test4347,6104 +.LBB13_3:LBB13_3359,6320 +.LBB13_5:LBB13_5368,6494 +.LBB13_6:LBB13_6371,6523 +.Lfunc_end13:Lfunc_end13375,6562 +test5:test5380,6647 +.LBB14_1:LBB14_1386,6767 +.LBB14_4:LBB14_4403,7089 +.Lfunc_end14:Lfunc_end14410,7199 +test6:test6415,7284 +.LBB15_1:LBB15_1420,7371 +.LBB15_5:LBB15_5446,7915 +.LBB15_6:LBB15_6451,8007 +.Lfunc_end15:Lfunc_end15458,8117 +test7:test7463,8202 +.LBB16_1:LBB16_1470,8346 +.LBB16_4:LBB16_4487,8698 +.Lfunc_end16:Lfunc_end16501,8970 +test8:test8506,9055 +.LBB17_1:LBB17_1508,9076 +.LBB17_2:LBB17_2513,9153 +.Lfunc_end17:Lfunc_end17516,9183 +test9:test9521,9268 +.LBB18_1:LBB18_1525,9350 +.LBB18_2:LBB18_2536,9589 +.LBB18_4:LBB18_4556,10047 +.LBB18_5:LBB18_5567,10287 +.Lfunc_end18:Lfunc_end18576,10417 +test10:test10581,10504 +.LBB19_1:LBB19_1584,10564 +.LBB19_3:LBB19_3592,10695 +.LBB19_4:LBB19_4597,10767 +.LBB19_6:LBB19_6607,10979 +.LBB19_7:LBB19_7612,11028 +.LBB19_8:LBB19_8616,11079 +.Lfunc_end19:Lfunc_end19619,11109 +test11:test11624,11198 +.LBB20_3:LBB20_3645,11609 +.LBB20_4:LBB20_4651,11713 +.LBB20_6:LBB20_6664,11993 +.LBB20_7:LBB20_7670,12093 +.LBB20_8:LBB20_8676,12193 +.Lfunc_end20:Lfunc_end20683,12305 +test12:test12688,12394 +.LBB21_1:LBB21_1691,12430 +.LBB21_4:LBB21_4708,12772 +.LBB21_6:LBB21_6716,12941 +.LBB21_7:LBB21_7721,13023 +.Lfunc_end21:Lfunc_end21726,13072 +test13:test13731,13161 +.LBB22_3:LBB22_3742,13334 +.LBB22_4:LBB22_4748,13437 +.LBB22_5:LBB22_5751,13466 +.Lfunc_end22:Lfunc_end22755,13510 +test14:test14760,13599 +.LBB23_1:LBB23_1761,13607 +.LBB23_3:LBB23_3766,13679 +.Lfunc_end23:Lfunc_end23773,13769 +test15:test15778,13858 +.LBB24_2:LBB24_2785,13966 +.LBB24_4:LBB24_4797,14182 +.LBB24_5:LBB24_5801,14231 +.LBB24_7:LBB24_7807,14335 +.LBB24_8:LBB24_8810,14390 +.Lfunc_end24:Lfunc_end24814,14429 + +externals/binaryen/test/llvm_autogenerated/global.s,516 +foo:foo5,106 +.Lfunc_end0:Lfunc_end011,206 +call_memcpy:call_memcpy16,297 +.Lfunc_end1:Lfunc_end122,421 +.Lg:Lg28,517 +ud:ud34,580 +one:one44,704 +answer:answer50,768 +u32max:u32max56,839 +ud64:ud6462,916 +twoP32:twoP3272,1055 +u64max:u64max78,1134 +f32ud:f32ud84,1204 +f32nz:f32nz94,1348 +f32two:f32two100,1425 +f64ud:f64ud106,1503 +f64nz:f64nz116,1647 +f64two:f64two122,1734 +arr:arr130,1837 +ptr:ptr138,1920 +rom:rom146,2030 +array:array151,2084 +pointer_to_array:pointer_to_array159,2224 + +externals/binaryen/test/llvm_autogenerated/offset.s,3776 +load_i32_with_folded_offset:load_i32_with_folded_offset5,154 +.Lfunc_end0:Lfunc_end010,247 +load_i32_with_folded_gep_offset:load_i32_with_folded_gep_offset15,426 +.Lfunc_end1:Lfunc_end120,523 +load_i32_with_unfolded_gep_negative_offset:load_i32_with_unfolded_gep_negative_offset25,732 +.Lfunc_end2:Lfunc_end232,895 +load_i32_with_unfolded_offset:load_i32_with_unfolded_offset37,1100 +.Lfunc_end3:Lfunc_end344,1249 +load_i32_with_unfolded_gep_offset:load_i32_with_unfolded_gep_offset49,1436 +.Lfunc_end4:Lfunc_end456,1589 +load_i64_with_folded_offset:load_i64_with_folded_offset61,1772 +.Lfunc_end5:Lfunc_end566,1865 +load_i64_with_folded_gep_offset:load_i64_with_folded_gep_offset71,2044 +.Lfunc_end6:Lfunc_end676,2141 +load_i64_with_unfolded_gep_negative_offset:load_i64_with_unfolded_gep_negative_offset81,2350 +.Lfunc_end7:Lfunc_end788,2513 +load_i64_with_unfolded_offset:load_i64_with_unfolded_offset93,2718 +.Lfunc_end8:Lfunc_end8100,2867 +load_i64_with_unfolded_gep_offset:load_i64_with_unfolded_gep_offset105,3054 +.Lfunc_end9:Lfunc_end9112,3207 +load_i32_with_folded_or_offset:load_i32_with_folded_or_offset117,3396 +.Lfunc_end10:Lfunc_end10124,3549 +store_i32_with_folded_offset:store_i32_with_folded_offset129,3730 +.Lfunc_end11:Lfunc_end11134,3831 +store_i32_with_folded_gep_offset:store_i32_with_folded_gep_offset139,4016 +.Lfunc_end12:Lfunc_end12144,4121 +store_i32_with_unfolded_gep_negative_offset:store_i32_with_unfolded_gep_negative_offset149,4336 +.Lfunc_end13:Lfunc_end13156,4507 +store_i32_with_unfolded_offset:store_i32_with_unfolded_offset161,4718 +.Lfunc_end14:Lfunc_end14168,4875 +store_i32_with_unfolded_gep_offset:store_i32_with_unfolded_gep_offset173,5068 +.Lfunc_end15:Lfunc_end15180,5229 +store_i64_with_folded_offset:store_i64_with_folded_offset185,5418 +.Lfunc_end16:Lfunc_end16190,5519 +store_i64_with_folded_gep_offset:store_i64_with_folded_gep_offset195,5704 +.Lfunc_end17:Lfunc_end17200,5809 +store_i64_with_unfolded_gep_negative_offset:store_i64_with_unfolded_gep_negative_offset205,6024 +.Lfunc_end18:Lfunc_end18212,6195 +store_i64_with_unfolded_offset:store_i64_with_unfolded_offset217,6406 +.Lfunc_end19:Lfunc_end19224,6563 +store_i64_with_unfolded_gep_offset:store_i64_with_unfolded_gep_offset229,6756 +.Lfunc_end20:Lfunc_end20236,6917 +store_i32_with_folded_or_offset:store_i32_with_folded_or_offset241,7112 +.Lfunc_end21:Lfunc_end21248,7271 +load_i32_from_numeric_address:load_i32_from_numeric_address253,7456 +.Lfunc_end22:Lfunc_end22258,7562 +load_i32_from_global_address:load_i32_from_global_address263,7741 +.Lfunc_end23:Lfunc_end23268,7846 +store_i32_to_numeric_address:store_i32_to_numeric_address273,8023 +.Lfunc_end24:Lfunc_end24278,8135 +store_i32_to_global_address:store_i32_to_global_address283,8310 +.Lfunc_end25:Lfunc_end25288,8421 +load_i8_s_with_folded_offset:load_i8_s_with_folded_offset293,8596 +.Lfunc_end26:Lfunc_end26298,8693 +load_i8_s_with_folded_gep_offset:load_i8_s_with_folded_gep_offset303,8878 +.Lfunc_end27:Lfunc_end27308,8979 +load_i8_u_with_folded_offset:load_i8_u_with_folded_offset313,9164 +.Lfunc_end28:Lfunc_end28318,9261 +load_i8_u_with_folded_gep_offset:load_i8_u_with_folded_gep_offset323,9446 +.Lfunc_end29:Lfunc_end29328,9547 +store_i8_with_folded_offset:store_i8_with_folded_offset333,9730 +.Lfunc_end30:Lfunc_end30338,9831 +store_i8_with_folded_gep_offset:store_i8_with_folded_gep_offset343,10012 +.Lfunc_end31:Lfunc_end31348,10117 +aggregate_load_store:aggregate_load_store353,10284 +.Lfunc_end32:Lfunc_end32365,10536 +aggregate_return:aggregate_return370,10673 +.Lfunc_end33:Lfunc_end33377,10827 +aggregate_return_without_merge:aggregate_return_without_merge382,10984 +.Lfunc_end34:Lfunc_end34393,11229 +gv:gv400,11374 + +externals/binaryen/test/llvm_autogenerated/load-store-i1.s,402 +load_u_i1_i32:load_u_i1_i325,133 +.Lfunc_end0:Lfunc_end011,230 +load_s_i1_i32:load_s_i1_i3216,345 +.Lfunc_end1:Lfunc_end126,550 +load_u_i1_i64:load_u_i1_i6431,665 +.Lfunc_end2:Lfunc_end237,762 +load_s_i1_i64:load_s_i1_i6442,877 +.Lfunc_end3:Lfunc_end352,1082 +store_i32_i1:store_i32_i157,1195 +.Lfunc_end4:Lfunc_end464,1322 +store_i64_i1:store_i64_i169,1433 +.Lfunc_end5:Lfunc_end576,1560 + +externals/binaryen/test/llvm_autogenerated/copysign-casts.s,127 +fold_promote:fold_promote5,132 +.Lfunc_end0:Lfunc_end011,251 +fold_demote:fold_demote16,360 +.Lfunc_end1:Lfunc_end122,477 + +externals/binaryen/test/llvm_autogenerated/i32-load-store-alignment.s,1191 +ldi32_a1:ldi32_a15,134 +.Lfunc_end0:Lfunc_end011,233 +ldi32_a2:ldi32_a216,328 +.Lfunc_end1:Lfunc_end122,427 +ldi32_a4:ldi32_a427,522 +.Lfunc_end2:Lfunc_end233,611 +ldi32:ldi3238,700 +.Lfunc_end3:Lfunc_end344,786 +ldi32_a8:ldi32_a849,875 +.Lfunc_end4:Lfunc_end455,964 +ldi8_a1:ldi8_a160,1057 +.Lfunc_end5:Lfunc_end566,1148 +ldi8_a2:ldi8_a271,1239 +.Lfunc_end6:Lfunc_end677,1330 +ldi16_a1:ldi16_a182,1423 +.Lfunc_end7:Lfunc_end788,1526 +ldi16_a2:ldi16_a293,1621 +.Lfunc_end8:Lfunc_end899,1714 +ldi16_a4:ldi16_a4104,1809 +.Lfunc_end9:Lfunc_end9110,1902 +sti32_a1:sti32_a1115,1997 +.Lfunc_end10:Lfunc_end10120,2075 +sti32_a2:sti32_a2125,2172 +.Lfunc_end11:Lfunc_end11130,2250 +sti32_a4:sti32_a4135,2347 +.Lfunc_end12:Lfunc_end12140,2415 +sti32:sti32145,2506 +.Lfunc_end13:Lfunc_end13150,2571 +sti32_a8:sti32_a8155,2662 +.Lfunc_end14:Lfunc_end14160,2730 +sti8_a1:sti8_a1165,2825 +.Lfunc_end15:Lfunc_end15170,2893 +sti8_a2:sti8_a2175,2986 +.Lfunc_end16:Lfunc_end16180,3054 +sti16_a1:sti16_a1185,3149 +.Lfunc_end17:Lfunc_end17190,3229 +sti16_a2:sti16_a2195,3326 +.Lfunc_end18:Lfunc_end18200,3396 +sti16_a4:sti16_a4205,3493 +.Lfunc_end19:Lfunc_end19210,3563 + +externals/binaryen/test/llvm_autogenerated/load-ext.s,654 +sext_i8_i32:sext_i8_i325,124 +.Lfunc_end0:Lfunc_end011,219 +zext_i8_i32:zext_i8_i3216,326 +.Lfunc_end1:Lfunc_end122,421 +sext_i16_i32:sext_i16_i3227,530 +.Lfunc_end2:Lfunc_end233,627 +zext_i16_i32:zext_i16_i3238,738 +.Lfunc_end3:Lfunc_end344,835 +sext_i8_i64:sext_i8_i6449,944 +.Lfunc_end4:Lfunc_end455,1039 +zext_i8_i64:zext_i8_i6460,1146 +.Lfunc_end5:Lfunc_end566,1241 +sext_i16_i64:sext_i16_i6471,1350 +.Lfunc_end6:Lfunc_end677,1447 +zext_i16_i64:zext_i16_i6482,1558 +.Lfunc_end7:Lfunc_end788,1655 +sext_i32_i64:sext_i32_i6493,1766 +.Lfunc_end8:Lfunc_end899,1863 +zext_i32_i64:zext_i32_i64104,1974 +.Lfunc_end9:Lfunc_end9110,2071 + +externals/binaryen/test/llvm_autogenerated/f64.s,935 +fadd64:fadd645,109 +.Lfunc_end0:Lfunc_end011,202 +fsub64:fsub6416,289 +.Lfunc_end1:Lfunc_end122,382 +fmul64:fmul6427,469 +.Lfunc_end2:Lfunc_end233,562 +fdiv64:fdiv6438,649 +.Lfunc_end3:Lfunc_end344,742 +fabs64:fabs6449,829 +.Lfunc_end4:Lfunc_end455,913 +fneg64:fneg6460,1000 +.Lfunc_end5:Lfunc_end566,1084 +copysign64:copysign6471,1179 +.Lfunc_end6:Lfunc_end677,1280 +sqrt64:sqrt6482,1375 +.Lfunc_end7:Lfunc_end788,1459 +ceil64:ceil6493,1546 +.Lfunc_end8:Lfunc_end899,1630 +floor64:floor64104,1719 +.Lfunc_end9:Lfunc_end9110,1805 +trunc64:trunc64115,1896 +.Lfunc_end10:Lfunc_end10121,1982 +nearest64:nearest64126,2079 +.Lfunc_end11:Lfunc_end11132,2169 +nearest64_via_rint:nearest64_via_rint137,2288 +.Lfunc_end12:Lfunc_end12143,2387 +fmin64:fmin64148,2500 +.Lfunc_end13:Lfunc_end13155,2617 +fmax64:fmax64160,2706 +.Lfunc_end14:Lfunc_end14167,2823 +fma64:fma64172,2910 +.Lfunc_end15:Lfunc_end15178,3025 + +externals/binaryen/test/llvm_autogenerated/memory-addr32.s,131 +current_memory:current_memory5,135 +.Lfunc_end0:Lfunc_end010,215 +grow_memory:grow_memory15,328 +.Lfunc_end1:Lfunc_end120,389 + +externals/binaryen/test/llvm_autogenerated/call.s,1142 +call_i32_nullary:call_i32_nullary5,130 +.Lfunc_end0:Lfunc_end010,228 +call_i64_nullary:call_i64_nullary15,355 +.Lfunc_end1:Lfunc_end120,453 +call_float_nullary:call_float_nullary25,584 +.Lfunc_end2:Lfunc_end230,686 +call_double_nullary:call_double_nullary35,823 +.Lfunc_end3:Lfunc_end340,927 +call_void_nullary:call_void_nullary45,1062 +.Lfunc_end4:Lfunc_end449,1131 +call_i32_unary:call_i32_unary54,1256 +.Lfunc_end5:Lfunc_end560,1368 +call_i32_binary:call_i32_binary65,1489 +.Lfunc_end6:Lfunc_end671,1612 +call_indirect_void:call_indirect_void76,1741 +.Lfunc_end7:Lfunc_end781,1811 +call_indirect_i32:call_indirect_i3286,1944 +.Lfunc_end8:Lfunc_end892,2048 +call_indirect_arg:call_indirect_arg97,2179 +.Lfunc_end9:Lfunc_end9102,2257 +call_indirect_arg_2:call_indirect_arg_2107,2392 +.Lfunc_end10:Lfunc_end10112,2493 +tail_call_void_nullary:tail_call_void_nullary117,2640 +.Lfunc_end11:Lfunc_end11121,2714 +fastcc_tail_call_void_nullary:fastcc_tail_call_void_nullary126,2881 +.Lfunc_end12:Lfunc_end12130,2962 +coldcc_tail_call_void_nullary:coldcc_tail_call_void_nullary135,3143 +.Lfunc_end13:Lfunc_end13139,3224 + +externals/binaryen/test/llvm_autogenerated/comparisons_f32.s,807 +ord_f32:ord_f325,123 +.Lfunc_end0:Lfunc_end013,275 +uno_f32:uno_f3218,366 +.Lfunc_end1:Lfunc_end126,518 +oeq_f32:oeq_f3231,609 +.Lfunc_end2:Lfunc_end237,703 +une_f32:une_f3242,794 +.Lfunc_end3:Lfunc_end348,888 +olt_f32:olt_f3253,979 +.Lfunc_end4:Lfunc_end459,1073 +ole_f32:ole_f3264,1164 +.Lfunc_end5:Lfunc_end570,1258 +ogt_f32:ogt_f3275,1349 +.Lfunc_end6:Lfunc_end681,1443 +oge_f32:oge_f3286,1534 +.Lfunc_end7:Lfunc_end792,1628 +ueq_f32:ueq_f3297,1719 +.Lfunc_end8:Lfunc_end8107,1929 +one_f32:one_f32112,2020 +.Lfunc_end9:Lfunc_end9122,2230 +ult_f32:ult_f32127,2321 +.Lfunc_end10:Lfunc_end10137,2531 +ule_f32:ule_f32142,2624 +.Lfunc_end11:Lfunc_end11152,2834 +ugt_f32:ugt_f32157,2927 +.Lfunc_end12:Lfunc_end12167,3137 +uge_f32:uge_f32172,3230 +.Lfunc_end13:Lfunc_end13182,3440 + +externals/binaryen/test/llvm_autogenerated/frem.s,105 +frem32:frem325,110 +.Lfunc_end0:Lfunc_end011,219 +frem64:frem6416,306 +.Lfunc_end1:Lfunc_end122,414 + +externals/binaryen/test/llvm_autogenerated/i64.s,1337 +add64:add645,107 +.Lfunc_end0:Lfunc_end011,199 +sub64:sub6416,282 +.Lfunc_end1:Lfunc_end122,374 +mul64:mul6427,457 +.Lfunc_end2:Lfunc_end233,549 +sdiv64:sdiv6438,634 +.Lfunc_end3:Lfunc_end344,728 +udiv64:udiv6449,815 +.Lfunc_end4:Lfunc_end455,909 +srem64:srem6460,996 +.Lfunc_end5:Lfunc_end566,1090 +urem64:urem6471,1177 +.Lfunc_end6:Lfunc_end677,1271 +and64:and6482,1356 +.Lfunc_end7:Lfunc_end788,1448 +or64:or6493,1529 +.Lfunc_end8:Lfunc_end899,1620 +xor64:xor64104,1701 +.Lfunc_end9:Lfunc_end9110,1793 +shl64:shl64115,1876 +.Lfunc_end10:Lfunc_end10121,1968 +shr64:shr64126,2053 +.Lfunc_end11:Lfunc_end11132,2146 +sar64:sar64137,2231 +.Lfunc_end12:Lfunc_end12143,2324 +clz64:clz64148,2409 +.Lfunc_end13:Lfunc_end13154,2492 +clz64_zero_undef:clz64_zero_undef159,2599 +.Lfunc_end14:Lfunc_end14165,2693 +ctz64:ctz64170,2800 +.Lfunc_end15:Lfunc_end15176,2883 +ctz64_zero_undef:ctz64_zero_undef181,2990 +.Lfunc_end16:Lfunc_end16187,3084 +popcnt64:popcnt64192,3197 +.Lfunc_end17:Lfunc_end17198,3285 +eqz64:eqz64203,3376 +.Lfunc_end18:Lfunc_end18209,3459 +rotl:rotl214,3542 +.Lfunc_end19:Lfunc_end19220,3633 +masked_rotl:masked_rotl225,3728 +.Lfunc_end20:Lfunc_end20231,3826 +rotr:rotr236,3921 +.Lfunc_end21:Lfunc_end21242,4012 +masked_rotr:masked_rotr247,4107 +.Lfunc_end22:Lfunc_end22253,4205 + +externals/binaryen/test/llvm_autogenerated/reg-stackify.s,3546 +no0:no05,112 +.Lfunc_begin0:Lfunc_begin06,117 +.Lfunc_end0:Lfunc_end014,255 +no1:no119,330 +.Lfunc_begin1:Lfunc_begin120,335 +.Lfunc_end1:Lfunc_end128,473 +yes0:yes033,550 +.Lfunc_begin2:Lfunc_begin234,556 +.Lfunc_end2:Lfunc_end242,701 +yes1:yes147,780 +.Lfunc_begin3:Lfunc_begin348,786 +.Lfunc_end3:Lfunc_end354,880 +sink_trap:sink_trap59,969 +.Lfunc_begin4:Lfunc_begin460,980 +.Lfunc_end4:Lfunc_end468,1132 +sink_readnone_call:sink_readnone_call73,1249 +.Lfunc_begin5:Lfunc_begin574,1269 +.Lfunc_end5:Lfunc_end582,1438 +no_sink_readonly_call:no_sink_readonly_call87,1579 +.Lfunc_begin6:Lfunc_begin688,1602 +.Lfunc_end6:Lfunc_end697,1778 +stack_uses:stack_uses102,1903 +.Lfunc_begin7:Lfunc_begin7103,1915 +.LBB7_2:LBB7_2123,2403 +.Lfunc_end7:Lfunc_end7128,2473 +multiple_uses:multiple_uses133,2582 +.Lfunc_begin8:Lfunc_begin8134,2597 +.LBB8_3:LBB8_3145,2831 +.Lfunc_end8:Lfunc_end8149,2869 +stackify_store_across_side_effects:stackify_store_across_side_effects155,3070 +.Lfunc_begin9:Lfunc_begin9156,3106 +.Lfunc_end9:Lfunc_end9166,3357 +div_tree:div_tree171,3504 +.Lfunc_begin10:Lfunc_begin10172,3514 +.Lfunc_end10:Lfunc_end10192,4122 +simple_multiple_use:simple_multiple_use197,4241 +.Lfunc_begin11:Lfunc_begin11198,4262 +.Lfunc_end11:Lfunc_end11206,4433 +multiple_uses_in_same_insn:multiple_uses_in_same_insn211,4588 +.Lfunc_begin12:Lfunc_begin12212,4616 +.Lfunc_end12:Lfunc_end12219,4762 +commute:commute224,4893 +.Lfunc_begin13:Lfunc_begin13225,4902 +.Lfunc_end13:Lfunc_end13234,5121 +no_stackify_past_use:no_stackify_past_use239,5240 +.Lfunc_begin14:Lfunc_begin14240,5262 +.Lfunc_end14:Lfunc_end14252,5533 +commute_to_fix_ordering:commute_to_fix_ordering257,5684 +.Lfunc_begin15:Lfunc_begin15258,5709 +.Lfunc_end15:Lfunc_end15271,6017 +multiple_defs:multiple_defs276,6154 +.Lfunc_begin16:Lfunc_begin16277,6169 +.LBB16_1:LBB16_1293,6619 +.LBB16_3:LBB16_3302,6819 +.LBB16_5:LBB16_5315,7149 +.LBB16_6:LBB16_6321,7284 +.LBB16_7:LBB16_7327,7380 +.Lfunc_end16:Lfunc_end16330,7410 +no_stackify_call_past_load:no_stackify_call_past_load335,7553 +.Lfunc_begin17:Lfunc_begin17336,7581 +.Lfunc_end17:Lfunc_end17345,7769 +no_stackify_store_past_load:no_stackify_store_past_load350,7940 +.Lfunc_begin18:Lfunc_begin18351,7969 +.Lfunc_end18:Lfunc_end18359,8126 +store_past_invar_load:store_past_invar_load364,8287 +.Lfunc_begin19:Lfunc_begin19365,8310 +.Lfunc_end19:Lfunc_end19373,8474 +ignore_dbg_value:ignore_dbg_value378,8613 +.Lfunc_begin20:Lfunc_begin20379,8631 +.Lfunc_end20:Lfunc_end20382,8670 +no_stackify_past_epilogue:no_stackify_past_epilogue387,8817 +.Lfunc_begin21:Lfunc_begin21388,8844 +.Lfunc_end21:Lfunc_end21407,9340 +stackify_indvar:stackify_indvar412,9485 +.Lfunc_begin22:Lfunc_begin22413,9502 +.LBB22_1:LBB22_1417,9569 +.Lfunc_end22:Lfunc_end22430,9826 +stackpointer_dependency:stackpointer_dependency435,9967 +.Lfunc_begin23:Lfunc_begin23436,9992 +.Lfunc_end23:Lfunc_end23449,10310 +call_indirect_stackify:call_indirect_stackify454,10465 +.Lfunc_begin24:Lfunc_begin24455,10489 +.Lfunc_end24:Lfunc_end24465,10718 +count:count473,10868 +.Linfo_string0:Linfo_string0478,10940 +.Linfo_string1:Linfo_string1480,11021 +.Linfo_string2:Linfo_string2482,11054 +.Lsection_abbrev:Lsection_abbrev486,11153 +.Lsection_info:Lsection_info504,11359 +.Lcu_begin0:Lcu_begin0505,11375 +.Ldebug_range:Ldebug_range517,11597 +.Ldebug_macinfo:Ldebug_macinfo519,11650 +.Lcu_macro_begin0:Lcu_macro_begin0520,11667 +.Lline_table_start0:Lline_table_start0536,12089 + +externals/binaryen/test/llvm_autogenerated/i128.s,1404 +add128:add1285,110 +.Lfunc_end0:Lfunc_end023,551 +sub128:sub12828,638 +.Lfunc_end1:Lfunc_end141,943 +mul128:mul12846,1030 +.Lfunc_end2:Lfunc_end271,1696 +sdiv128:sdiv12876,1785 +.Lfunc_end3:Lfunc_end3101,2452 +udiv128:udiv128106,2543 +.Lfunc_end4:Lfunc_end4131,3211 +srem128:srem128136,3302 +.Lfunc_end5:Lfunc_end5161,3969 +urem128:urem128166,4060 +.Lfunc_end6:Lfunc_end6191,4728 +and128:and128196,4817 +.Lfunc_end7:Lfunc_end7206,5031 +or128:or128211,5116 +.Lfunc_end8:Lfunc_end8221,5329 +xor128:xor128226,5414 +.Lfunc_end9:Lfunc_end9236,5628 +shl128:shl128241,5715 +.Lfunc_end10:Lfunc_end10267,6409 +shr128:shr128272,6498 +.Lfunc_end11:Lfunc_end11298,7192 +sar128:sar128303,7281 +.Lfunc_end12:Lfunc_end12329,7975 +clz128:clz128334,8064 +.Lfunc_end13:Lfunc_end13350,8429 +clz128_zero_undef:clz128_zero_undef355,8540 +.Lfunc_end14:Lfunc_end14371,8916 +ctz128:ctz128376,9027 +.Lfunc_end15:Lfunc_end15392,9392 +ctz128_zero_undef:ctz128_zero_undef397,9503 +.Lfunc_end16:Lfunc_end16413,9879 +popcnt128:popcnt128418,9996 +.Lfunc_end17:Lfunc_end17430,10253 +eqz128:eqz128435,10348 +.Lfunc_end18:Lfunc_end18442,10466 +rotl:rotl447,10551 +.Lfunc_end19:Lfunc_end19487,11678 +masked_rotl:masked_rotl492,11773 +.Lfunc_end20:Lfunc_end20535,13000 +rotr:rotr540,13095 +.Lfunc_end21:Lfunc_end21580,14222 +masked_rotr:masked_rotr585,14317 +.Lfunc_end22:Lfunc_end22628,15544 + +externals/binaryen/test/llvm_autogenerated/irreducible-cfg.s,613 +test0:test05,119 +.LBB0_3:LBB0_314,260 +.LBB0_5:LBB0_521,412 +.LBB0_6:LBB0_631,538 +.LBB0_8:LBB0_837,633 +.LBB0_10:LBB0_1050,977 +.LBB0_11:LBB0_1161,1251 +.LBB0_12:LBB0_1264,1280 +.LBB0_13:LBB0_1368,1331 +.LBB0_14:LBB0_1472,1382 +.Lfunc_end0:Lfunc_end075,1412 +test1:test180,1495 +.LBB1_3:LBB1_389,1636 +.LBB1_5:LBB1_596,1788 +.LBB1_6:LBB1_6108,1939 +.LBB1_8:LBB1_8114,2034 +.LBB1_10:LBB1_10128,2396 +.LBB1_12:LBB1_12138,2612 +.LBB1_13:LBB1_13149,2888 +.LBB1_14:LBB1_14152,2917 +.LBB1_15:LBB1_15156,2968 +.LBB1_16:LBB1_16160,3019 +.LBB1_17:LBB1_17164,3070 +.Lfunc_end1:Lfunc_end1167,3100 + +externals/binaryen/test/llvm_autogenerated/i64-load-store-alignment.s,1825 +ldi64_a1:ldi64_a15,134 +.Lfunc_end0:Lfunc_end011,233 +ldi64_a2:ldi64_a216,328 +.Lfunc_end1:Lfunc_end122,427 +ldi64_a4:ldi64_a427,522 +.Lfunc_end2:Lfunc_end233,621 +ldi64_a8:ldi64_a838,716 +.Lfunc_end3:Lfunc_end344,805 +ldi64:ldi6449,894 +.Lfunc_end4:Lfunc_end455,980 +ldi64_a16:ldi64_a1660,1071 +.Lfunc_end5:Lfunc_end566,1161 +ldi8_a1:ldi8_a171,1256 +.Lfunc_end6:Lfunc_end677,1347 +ldi8_a2:ldi8_a282,1438 +.Lfunc_end7:Lfunc_end788,1529 +ldi16_a1:ldi16_a193,1622 +.Lfunc_end8:Lfunc_end899,1725 +ldi16_a2:ldi16_a2104,1820 +.Lfunc_end9:Lfunc_end9110,1913 +ldi16_a4:ldi16_a4115,2008 +.Lfunc_end10:Lfunc_end10121,2101 +ldi32_a1:ldi32_a1126,2198 +.Lfunc_end11:Lfunc_end11132,2301 +ldi32_a2:ldi32_a2137,2398 +.Lfunc_end12:Lfunc_end12143,2501 +ldi32_a4:ldi32_a4148,2598 +.Lfunc_end13:Lfunc_end13154,2691 +ldi32_a8:ldi32_a8159,2788 +.Lfunc_end14:Lfunc_end14165,2881 +sti64_a1:sti64_a1170,2978 +.Lfunc_end15:Lfunc_end15175,3056 +sti64_a2:sti64_a2180,3153 +.Lfunc_end16:Lfunc_end16185,3231 +sti64_a4:sti64_a4190,3328 +.Lfunc_end17:Lfunc_end17195,3406 +sti64_a8:sti64_a8200,3503 +.Lfunc_end18:Lfunc_end18205,3571 +sti64:sti64210,3662 +.Lfunc_end19:Lfunc_end19215,3727 +sti64_a16:sti64_a16220,3820 +.Lfunc_end20:Lfunc_end20225,3889 +sti8_a1:sti8_a1230,3986 +.Lfunc_end21:Lfunc_end21235,4054 +sti8_a2:sti8_a2240,4147 +.Lfunc_end22:Lfunc_end22245,4215 +sti16_a1:sti16_a1250,4310 +.Lfunc_end23:Lfunc_end23255,4390 +sti16_a2:sti16_a2260,4487 +.Lfunc_end24:Lfunc_end24265,4557 +sti16_a4:sti16_a4270,4654 +.Lfunc_end25:Lfunc_end25275,4724 +sti32_a1:sti32_a1280,4821 +.Lfunc_end26:Lfunc_end26285,4901 +sti32_a2:sti32_a2290,4998 +.Lfunc_end27:Lfunc_end27295,5078 +sti32_a4:sti32_a4300,5175 +.Lfunc_end28:Lfunc_end28305,5245 +sti32_a8:sti32_a8310,5342 +.Lfunc_end29:Lfunc_end29315,5412 + +externals/binaryen/test/llvm_autogenerated/store-trunc.s,329 +trunc_i8_i32:trunc_i8_i325,129 +.Lfunc_end0:Lfunc_end09,194 +trunc_i16_i32:trunc_i16_i3214,307 +.Lfunc_end1:Lfunc_end118,374 +trunc_i8_i64:trunc_i8_i6423,487 +.Lfunc_end2:Lfunc_end227,552 +trunc_i16_i64:trunc_i16_i6432,665 +.Lfunc_end3:Lfunc_end336,732 +trunc_i32_i64:trunc_i32_i6441,847 +.Lfunc_end4:Lfunc_end445,914 + +externals/binaryen/test/llvm_autogenerated/comparisons_i32.s,557 +eq_i32:eq_i325,121 +.Lfunc_end0:Lfunc_end011,214 +ne_i32:ne_i3216,301 +.Lfunc_end1:Lfunc_end122,394 +slt_i32:slt_i3227,483 +.Lfunc_end2:Lfunc_end233,577 +sle_i32:sle_i3238,668 +.Lfunc_end3:Lfunc_end344,762 +ult_i32:ult_i3249,853 +.Lfunc_end4:Lfunc_end455,947 +ule_i32:ule_i3260,1038 +.Lfunc_end5:Lfunc_end566,1132 +sgt_i32:sgt_i3271,1223 +.Lfunc_end6:Lfunc_end677,1317 +sge_i32:sge_i3282,1408 +.Lfunc_end7:Lfunc_end788,1502 +ugt_i32:ugt_i3293,1593 +.Lfunc_end8:Lfunc_end899,1687 +uge_i32:uge_i32104,1778 +.Lfunc_end9:Lfunc_end9110,1872 + +externals/binaryen/test/llvm_autogenerated/phi.s,147 +test0:test05,107 +.LBB0_2:LBB0_214,272 +.Lfunc_end0:Lfunc_end018,315 +test1:test123,398 +.LBB1_1:LBB1_130,516 +.Lfunc_end1:Lfunc_end143,759 + +externals/binaryen/test/llvm_autogenerated/return-void.s,159 +return_void:return_void5,127 +.Lfunc_end0:Lfunc_end07,150 +return_void_twice:return_void_twice12,269 +.LBB1_2:LBB1_221,433 +.Lfunc_end1:Lfunc_end127,534 + +externals/binaryen/test/llvm_autogenerated/unused-argument.s,200 +unused_first:unused_first5,133 +.Lfunc_end0:Lfunc_end010,203 +unused_second:unused_second15,316 +.Lfunc_end1:Lfunc_end120,387 +call_something:call_something25,504 +.Lfunc_end2:Lfunc_end229,582 + +externals/binaryen/test/llvm_autogenerated/ident.s,0 + +externals/binaryen/test/llvm_autogenerated/varargs.s,516 +start:start5,111 +.Lfunc_end0:Lfunc_end010,176 +.Lfunc_end1:Lfunc_end119,292 +copy:copy24,369 +.Lfunc_end2:Lfunc_end230,461 +arg_i8:arg_i835,544 +.Lfunc_end3:Lfunc_end347,779 +arg_i32:arg_i3252,868 +.Lfunc_end4:Lfunc_end468,1213 +arg_i128:arg_i12873,1306 +.Lfunc_end5:Lfunc_end597,1880 +caller_none:caller_none102,1981 +.Lfunc_end6:Lfunc_end6107,2067 +caller_some:caller_some112,2174 +.Lfunc_end7:Lfunc_end7132,2689 +startbb:startbb137,2788 +.LBB8_2:LBB8_2145,2935 +.Lfunc_end8:Lfunc_end8150,2994 + +externals/binaryen/test/llvm_autogenerated/globl.s,45 +foo:foo5,105 +.Lfunc_end0:Lfunc_end07,120 + +externals/binaryen/test/llvm_autogenerated/legalize.s,387 +shl_i3:shl_i35,114 +.Lfunc_end0:Lfunc_end013,266 +shl_i53:shl_i5318,355 +.Lfunc_end1:Lfunc_end126,523 +sext_in_reg_i32_i64:sext_in_reg_i32_i6431,638 +.Lfunc_end2:Lfunc_end240,821 +fpext_f32_f64:fpext_f32_f6445,948 +.Lfunc_end3:Lfunc_end352,1074 +fpconv_f64_f32:fpconv_f64_f3257,1191 +.Lfunc_end4:Lfunc_end464,1317 +bigshift:bigshift69,1424 +.Lfunc_end5:Lfunc_end51076,35874 + +externals/binaryen/test/llvm_autogenerated/func.s,291 +f0:f05,102 +.Lfunc_end0:Lfunc_end08,124 +f1:f113,195 +.Lfunc_end1:Lfunc_end118,261 +f2:f223,332 +.Lfunc_end2:Lfunc_end229,417 +f3:f334,488 +.Lfunc_end3:Lfunc_end338,529 +f4:f443,600 +.LBB4_2:LBB4_253,776 +.Lfunc_end4:Lfunc_end458,844 +f5:f563,915 +.Lfunc_end5:Lfunc_end567,956 + +externals/binaryen/test/llvm_autogenerated/dead-vreg.s,138 +foo:foo5,109 +.LBB0_2:LBB0_217,370 +.LBB0_4:LBB0_424,475 +.LBB0_5:LBB0_534,687 +.LBB0_6:LBB0_643,873 +.Lfunc_end0:Lfunc_end047,913 + +externals/binaryen/test/llvm_autogenerated/indirect-import.s,47 +bar:bar6,128 +.Lfunc_end0:Lfunc_end043,1202 + +externals/binaryen/test/llvm_autogenerated/comparisons_f64.s,807 +ord_f64:ord_f645,123 +.Lfunc_end0:Lfunc_end013,275 +uno_f64:uno_f6418,366 +.Lfunc_end1:Lfunc_end126,518 +oeq_f64:oeq_f6431,609 +.Lfunc_end2:Lfunc_end237,703 +une_f64:une_f6442,794 +.Lfunc_end3:Lfunc_end348,888 +olt_f64:olt_f6453,979 +.Lfunc_end4:Lfunc_end459,1073 +ole_f64:ole_f6464,1164 +.Lfunc_end5:Lfunc_end570,1258 +ogt_f64:ogt_f6475,1349 +.Lfunc_end6:Lfunc_end681,1443 +oge_f64:oge_f6486,1534 +.Lfunc_end7:Lfunc_end792,1628 +ueq_f64:ueq_f6497,1719 +.Lfunc_end8:Lfunc_end8107,1929 +one_f64:one_f64112,2020 +.Lfunc_end9:Lfunc_end9122,2230 +ult_f64:ult_f64127,2321 +.Lfunc_end10:Lfunc_end10137,2531 +ule_f64:ule_f64142,2624 +.Lfunc_end11:Lfunc_end11152,2834 +ugt_f64:ugt_f64157,2927 +.Lfunc_end12:Lfunc_end12167,3137 +uge_f64:uge_f64172,3230 +.Lfunc_end13:Lfunc_end13182,3440 + +externals/binaryen/test/llvm_autogenerated/divrem-constant.s,510 +test_udiv_2:test_udiv_25,131 +.Lfunc_end0:Lfunc_end011,234 +test_udiv_5:test_udiv_516,341 +.Lfunc_end1:Lfunc_end122,444 +test_sdiv_2:test_sdiv_227,551 +.Lfunc_end2:Lfunc_end233,654 +test_sdiv_5:test_sdiv_538,761 +.Lfunc_end3:Lfunc_end344,864 +test_urem_2:test_urem_249,971 +.Lfunc_end4:Lfunc_end455,1073 +test_urem_5:test_urem_560,1180 +.Lfunc_end5:Lfunc_end566,1283 +test_srem_2:test_srem_271,1390 +.Lfunc_end6:Lfunc_end677,1493 +test_srem_5:test_srem_582,1600 +.Lfunc_end7:Lfunc_end788,1703 + +externals/binaryen/test/llvm_autogenerated/switch.s,431 +bar32:bar325,110 +.LBB0_2:LBB0_218,368 +.LBB0_3:LBB0_322,420 +.LBB0_4:LBB0_426,472 +.LBB0_5:LBB0_530,524 +.LBB0_6:LBB0_634,576 +.LBB0_7:LBB0_738,628 +.LBB0_8:LBB0_841,672 +.Lfunc_end0:Lfunc_end045,710 +bar64:bar6450,793 +.LBB1_2:LBB1_264,1080 +.LBB1_3:LBB1_368,1132 +.LBB1_4:LBB1_472,1184 +.LBB1_5:LBB1_576,1236 +.LBB1_6:LBB1_680,1288 +.LBB1_7:LBB1_784,1340 +.LBB1_8:LBB1_887,1384 +.Lfunc_end1:Lfunc_end191,1422 + +externals/binaryen/test/llvm_autogenerated/byval.s,496 +byval_arg:byval_arg5,117 +.Lfunc_end0:Lfunc_end026,649 +byval_arg_align8:byval_arg_align831,762 +.Lfunc_end1:Lfunc_end152,1306 +byval_arg_double:byval_arg_double57,1433 +.Lfunc_end2:Lfunc_end282,2093 +byval_param:byval_param87,2210 +.Lfunc_end3:Lfunc_end392,2287 +byval_empty_caller:byval_empty_caller97,2408 +.Lfunc_end4:Lfunc_end4102,2504 +byval_empty_callee:byval_empty_callee107,2639 +.Lfunc_end5:Lfunc_end5112,2729 +big_byval:big_byval117,2846 +.Lfunc_end6:Lfunc_end6137,3394 + +externals/binaryen/test/llvm_autogenerated/f32.s,935 +fadd32:fadd325,109 +.Lfunc_end0:Lfunc_end011,202 +fsub32:fsub3216,289 +.Lfunc_end1:Lfunc_end122,382 +fmul32:fmul3227,469 +.Lfunc_end2:Lfunc_end233,562 +fdiv32:fdiv3238,649 +.Lfunc_end3:Lfunc_end344,742 +fabs32:fabs3249,829 +.Lfunc_end4:Lfunc_end455,913 +fneg32:fneg3260,1000 +.Lfunc_end5:Lfunc_end566,1084 +copysign32:copysign3271,1179 +.Lfunc_end6:Lfunc_end677,1280 +sqrt32:sqrt3282,1375 +.Lfunc_end7:Lfunc_end788,1459 +ceil32:ceil3293,1546 +.Lfunc_end8:Lfunc_end899,1630 +floor32:floor32104,1719 +.Lfunc_end9:Lfunc_end9110,1805 +trunc32:trunc32115,1896 +.Lfunc_end10:Lfunc_end10121,1982 +nearest32:nearest32126,2079 +.Lfunc_end11:Lfunc_end11132,2169 +nearest32_via_rint:nearest32_via_rint137,2288 +.Lfunc_end12:Lfunc_end12143,2387 +fmin32:fmin32148,2500 +.Lfunc_end13:Lfunc_end13155,2617 +fmax32:fmax32160,2706 +.Lfunc_end14:Lfunc_end14167,2823 +fma32:fma32172,2910 +.Lfunc_end15:Lfunc_end15178,3026 + +externals/binaryen/test/llvm_autogenerated/non-executable-stack.s,0 + +externals/binaryen/test/llvm_autogenerated/conv.s,2009 +i32_wrap_i64:i32_wrap_i645,122 +.Lfunc_end0:Lfunc_end011,216 +i64_extend_s_i32:i64_extend_s_i3216,335 +.Lfunc_end1:Lfunc_end122,437 +i64_extend_u_i32:i64_extend_u_i3227,564 +.Lfunc_end2:Lfunc_end233,666 +i32_trunc_s_f32:i32_trunc_s_f3238,791 +.Lfunc_end3:Lfunc_end344,891 +i32_trunc_u_f32:i32_trunc_u_f3249,1014 +.Lfunc_end4:Lfunc_end455,1114 +i32_trunc_s_f64:i32_trunc_s_f6460,1237 +.Lfunc_end5:Lfunc_end566,1337 +i32_trunc_u_f64:i32_trunc_u_f6471,1460 +.Lfunc_end6:Lfunc_end677,1560 +i64_trunc_s_f32:i64_trunc_s_f3282,1683 +.Lfunc_end7:Lfunc_end788,1783 +i64_trunc_u_f32:i64_trunc_u_f3293,1906 +.Lfunc_end8:Lfunc_end899,2006 +i64_trunc_s_f64:i64_trunc_s_f64104,2129 +.Lfunc_end9:Lfunc_end9110,2229 +i64_trunc_u_f64:i64_trunc_u_f64115,2352 +.Lfunc_end10:Lfunc_end10121,2452 +f32_convert_s_i32:f32_convert_s_i32126,2581 +.Lfunc_end11:Lfunc_end11132,2685 +f32_convert_u_i32:f32_convert_u_i32137,2818 +.Lfunc_end12:Lfunc_end12143,2922 +f64_convert_s_i32:f64_convert_s_i32148,3055 +.Lfunc_end13:Lfunc_end13154,3159 +f64_convert_u_i32:f64_convert_u_i32159,3292 +.Lfunc_end14:Lfunc_end14165,3396 +f32_convert_s_i64:f32_convert_s_i64170,3529 +.Lfunc_end15:Lfunc_end15176,3633 +f32_convert_u_i64:f32_convert_u_i64181,3766 +.Lfunc_end16:Lfunc_end16187,3870 +f64_convert_s_i64:f64_convert_s_i64192,4003 +.Lfunc_end17:Lfunc_end17198,4107 +f64_convert_u_i64:f64_convert_u_i64203,4240 +.Lfunc_end18:Lfunc_end18209,4344 +f64_promote_f32:f64_promote_f32214,4473 +.Lfunc_end19:Lfunc_end19220,4573 +f32_demote_f64:f32_demote_f64225,4696 +.Lfunc_end20:Lfunc_end20231,4794 +anyext:anyext236,4899 +.Lfunc_end21:Lfunc_end21244,5046 +bitcast_i32_to_float:bitcast_i32_to_float249,5163 +.Lfunc_end22:Lfunc_end22255,5272 +bitcast_float_to_i32:bitcast_float_to_i32260,5417 +.Lfunc_end23:Lfunc_end23266,5526 +bitcast_i64_to_double:bitcast_i64_to_double271,5673 +.Lfunc_end24:Lfunc_end24277,5783 +bitcast_double_to_i64:bitcast_double_to_i64282,5932 +.Lfunc_end25:Lfunc_end25288,6042 + +externals/binaryen/test/llvm_autogenerated/fast-isel.s,419 +immediate_f32:immediate_f325,129 +.Lfunc_end0:Lfunc_end09,196 +immediate_f64:immediate_f6414,311 +.Lfunc_end1:Lfunc_end118,378 +bitcast_i32_f32:bitcast_i32_f3223,497 +.Lfunc_end2:Lfunc_end228,585 +bitcast_f32_i32:bitcast_f32_i3233,708 +.Lfunc_end3:Lfunc_end338,796 +bitcast_i64_f64:bitcast_i64_f6443,919 +.Lfunc_end4:Lfunc_end448,1007 +bitcast_f64_i64:bitcast_f64_i6453,1130 +.Lfunc_end5:Lfunc_end558,1218 + +externals/binaryen/test/llvm_autogenerated/unreachable.s,134 +f1:f15,109 +.Lfunc_end0:Lfunc_end010,175 +f2:f215,246 +.Lfunc_end1:Lfunc_end118,273 +f3:f323,344 +.Lfunc_end2:Lfunc_end226,371 + +externals/binaryen/test/llvm_autogenerated/select.s,845 +select_i32_bool:select_i32_bool5,130 +.Lfunc_end0:Lfunc_end011,243 +select_i32_eq:select_i32_eq16,362 +.Lfunc_end1:Lfunc_end122,473 +select_i32_ne:select_i32_ne27,588 +.Lfunc_end2:Lfunc_end233,699 +select_i64_bool:select_i64_bool38,818 +.Lfunc_end3:Lfunc_end344,931 +select_i64_eq:select_i64_eq49,1050 +.Lfunc_end4:Lfunc_end455,1161 +select_i64_ne:select_i64_ne60,1276 +.Lfunc_end5:Lfunc_end566,1387 +select_f32_bool:select_f32_bool71,1506 +.Lfunc_end6:Lfunc_end677,1619 +select_f32_eq:select_f32_eq82,1738 +.Lfunc_end7:Lfunc_end788,1849 +select_f32_ne:select_f32_ne93,1964 +.Lfunc_end8:Lfunc_end899,2075 +select_f64_bool:select_f64_bool104,2194 +.Lfunc_end9:Lfunc_end9110,2307 +select_f64_eq:select_f64_eq115,2426 +.Lfunc_end10:Lfunc_end10121,2537 +select_f64_ne:select_f64_ne126,2654 +.Lfunc_end11:Lfunc_end11132,2765 + +externals/binaryen/test/llvm_autogenerated/store.s,203 +sti32:sti325,109 +.Lfunc_end0:Lfunc_end010,174 +sti64:sti6415,257 +.Lfunc_end1:Lfunc_end120,322 +stf32:stf3225,405 +.Lfunc_end2:Lfunc_end230,470 +stf64:stf6435,553 +.Lfunc_end3:Lfunc_end340,618 + +externals/binaryen/test/llvm_autogenerated/return-int32.s,156 +return_i32:return_i325,126 +.Lfunc_end0:Lfunc_end010,200 +return_i32_twice:return_i32_twice15,315 +.LBB1_2:LBB1_226,522 +.Lfunc_end1:Lfunc_end133,645 + +externals/binaryen/test/llvm_autogenerated/userstack.s,1059 +alloca32:alloca325,119 +.Lfunc_end0:Lfunc_end022,536 +alloca3264:alloca326427,635 +.Lfunc_end1:Lfunc_end140,925 +allocarray:allocarray45,1028 +.Lfunc_end2:Lfunc_end266,1556 +non_mem_use:non_mem_use71,1661 +.Lfunc_end3:Lfunc_end394,2248 +allocarray_inbounds:allocarray_inbounds99,2371 +.Lfunc_end4:Lfunc_end4120,2907 +dynamic_alloca:dynamic_alloca125,3036 +.Lfunc_end5:Lfunc_end5148,3641 +dynamic_alloca_redzone:dynamic_alloca_redzone153,3776 +.Lfunc_end6:Lfunc_end6173,4265 +dynamic_static_alloca:dynamic_static_alloca178,4414 +.Lfunc_end7:Lfunc_end7226,5737 +llvm_stack_builtins:llvm_stack_builtins231,5880 +.Lfunc_end8:Lfunc_end8253,6436 +dynamic_alloca_nouse:dynamic_alloca_nouse258,6577 +.Lfunc_end9:Lfunc_end9278,7086 +copytoreg_fi:copytoreg_fi283,7213 +.LBB10_1:LBB10_1295,7504 +.Lfunc_end10:Lfunc_end10304,7635 +frameaddress_0:frameaddress_0309,7752 +.Lfunc_end11:Lfunc_end11320,8020 +frameaddress_1:frameaddress_1325,8141 +.Lfunc_end12:Lfunc_end12330,8235 +inline_asm:inline_asm335,8348 +.Lfunc_end13:Lfunc_end13349,8610 + +externals/binaryen/test/example/c-api-hello-world.c,24 +int main() {main6,118 + +externals/binaryen/test/example/c-api-unused-mem.cpp,24 +int main() {main6,110 + +externals/binaryen/test/example/relooper-fuzz1.c,25 +int main() {main11,136 + +externals/binaryen/test/example/c-api-kitchen-sink.c,1203 +BinaryenExpressionRef makeUnary(BinaryenModuleRef module, BinaryenOp op, BinaryenType inputType)makeUnary18,209 +BinaryenExpressionRef makeBinary(BinaryenModuleRef module, BinaryenOp op, BinaryenType type) {makeBinary26,821 +BinaryenExpressionRef makeInt32(BinaryenModuleRef module, int x) {makeInt3247,1927 +BinaryenExpressionRef makeFloat32(BinaryenModuleRef module, float x) {makeFloat3251,2054 +BinaryenExpressionRef makeInt64(BinaryenModuleRef module, int64_t x) {makeInt6455,2187 +BinaryenExpressionRef makeFloat64(BinaryenModuleRef module, double x) {makeFloat6459,2318 +BinaryenExpressionRef makeSomething(BinaryenModuleRef module) {makeSomething63,2452 +BinaryenExpressionRef makeDroppedInt32(BinaryenModuleRef module, int x) {makeDroppedInt3267,2553 +void test_types() {test_types73,2719 +void test_core() {test_core81,2998 +BinaryenExpressionRef makeCallCheck(BinaryenModuleRef module, int x) {makeCallCheck281,12907 +void test_relooper() {test_relooper286,13127 +void test_binaries() {test_binaries484,24987 +void test_interpret() {test_interpret513,26132 +void test_nonvalid() {test_nonvalid533,27081 +void test_tracing() {test_tracing549,27637 +int main() {main556,27752 + +externals/binaryen/test/example/relooper-fuzz.c,25 +int main() {main11,136 + +externals/binaryen/test/example/c-api-relooper-unreachable-if.cpp,23 +int main() {main5,91 + +externals/binaryen/test/control_flow.post.js,66 + function doTest(x) {doTest4,45 +function test(name) {test2,1 + +externals/binaryen/test/debugInfo.asm.js,230 + function add(x, y) {add4,47 + function ret(x) {ret12,261 + function opts(x, y) {opts17,387 + function fib($0) {fib25,612 + function switch_reach($p) {switch_reach49,1328 +function () {AnonymousFunction777b7a6a01001,0 + +externals/binaryen/test/memorygrowth.asm.js,1406 + function Aa(newBuffer) {Aa75,1819 +function eb(a) {eb91,2208 +function fb(a) {fb1318,29852 +function Ra(a, b, c) {Ra1725,38095 +function Wa(a, b, c) {Wa1819,39821 +function Za(a) {Za1878,40874 +function _a(a) {_a1927,41633 +function ab(a, b) {ab1965,42368 +function $a(a) {$a2001,43026 +function jb(a, b, c) {jb2026,43582 +function gb() {}gb2057,44117 +function hb(a, b, c) {hb2058,44134 +function db(a) {db2088,44616 +function Xa(a) {Xa2110,45091 +function bb(a, b, c, d) {bb2132,45475 +function Ua(a, b, c) {Ua2151,45851 +function Va(a, b, c) {Va2173,46226 +function Ka(a) {Ka2193,46562 +function Oa(a) {Oa2205,46842 +function Pa(a) {Pa2217,47009 +function Ja(a) {Ja2228,47166 +function Qa() {Qa2236,47318 +function lb(a, b, c, d) {lb2245,47459 +function Ea(a) {Ea2252,47579 +function cb(a, b) {cb2261,47681 +function ob(a, b, c) {ob2267,47775 +function Ia(a, b) {Ia2275,47856 +function kb(a, b) {kb2284,47935 +function Sa(a) {Sa2290,48012 +function mb(a, b) {mb2296,48088 +function Ha(a, b) {Ha2302,48154 +function nb(a) {nb2309,48217 +function Na() {Na2315,48268 +function Ya(a) {Ya2320,48313 +function Ta(a) {Ta2325,48356 +function pb(a) {pb2330,48397 +function La(a) {La2335,48437 +function Ga(a) {Ga2340,48477 +function Ma() {Ma2345,48517 +function Fa() {Fa2349,48551 +function ib() {ib2353,48585 +Module["asm"] = (function(global,env,buffer) {Module1,0 + +externals/binaryen/test/torture-s/20060905-1.c.s,318 +main: # @mainmain7,211 +.LBB0_1: # %for.body.iLBB0_114,404 +.LBB0_3: # %for.inc.iLBB0_328,932 +.LBB0_6: # %if.thenLBB0_648,1599 +.Lfunc_end0:Lfunc_end053,1741 +s:s61,1892 +g:g69,2016 + +externals/binaryen/test/torture-s/packed-2.c.s,102 +main: # @mainmain7,209 +.Lfunc_end0:Lfunc_end016,503 +t:t24,654 + +externals/binaryen/test/torture-s/20000412-3.c.s,326 +z: # @zz7,199 +.Lfunc_end0:Lfunc_end013,409 +main: # @mainmain20,532 +.Lfunc_end1:Lfunc_end127,720 +f: # @ff34,837 +.LBB2_2: # %returnLBB2_249,1276 +.Lfunc_end2:Lfunc_end254,1471 + +externals/binaryen/test/torture-s/20040705-1.c.s,17716 +ret1: # @ret1ret17,211 +.Lfunc_end0:Lfunc_end016,507 +ret2: # @ret2ret223,636 +.Lfunc_end1:Lfunc_end134,989 +ret3: # @ret3ret341,1118 +.Lfunc_end2:Lfunc_end250,1415 +ret4: # @ret4ret457,1544 +.Lfunc_end3:Lfunc_end366,1840 +ret5: # @ret5ret573,1969 +.Lfunc_end4:Lfunc_end484,2319 +ret6: # @ret6ret691,2448 +.Lfunc_end5:Lfunc_end5100,2744 +ret7: # @ret7ret7107,2873 +.Lfunc_end6:Lfunc_end6114,3118 +ret8: # @ret8ret8121,3247 +.Lfunc_end7:Lfunc_end7128,3492 +ret9: # @ret9ret9135,3621 +.Lfunc_end8:Lfunc_end8142,3866 +fn1_1: # @fn1_1fn1_1149,3999 +.Lfunc_end9:Lfunc_end9166,4499 +fn2_1: # @fn2_1fn2_1173,4634 +.Lfunc_end10:Lfunc_end10192,5200 +fn3_1: # @fn3_1fn3_1199,5337 +.Lfunc_end11:Lfunc_end11211,5707 +fn4_1: # @fn4_1fn4_1218,5844 +.Lfunc_end12:Lfunc_end12235,6344 +fn5_1: # @fn5_1fn5_1242,6481 +.Lfunc_end13:Lfunc_end13261,7039 +fn6_1: # @fn6_1fn6_1268,7176 +.Lfunc_end14:Lfunc_end14280,7545 +fn7_1: # @fn7_1fn7_1287,7682 +.Lfunc_end15:Lfunc_end15297,7999 +fn8_1: # @fn8_1fn8_1304,8136 +.Lfunc_end16:Lfunc_end16318,8564 +fn9_1: # @fn9_1fn9_1325,8701 +.Lfunc_end17:Lfunc_end17337,9071 +fn1_2: # @fn1_2fn1_2344,9208 +.Lfunc_end18:Lfunc_end18362,9735 +fn2_2: # @fn2_2fn2_2369,9872 +.Lfunc_end19:Lfunc_end19387,10408 +fn3_2: # @fn3_2fn3_2394,10545 +.Lfunc_end20:Lfunc_end20405,10890 +fn4_2: # @fn4_2fn4_2412,11027 +.Lfunc_end21:Lfunc_end21430,11554 +fn5_2: # @fn5_2fn5_2437,11691 +.Lfunc_end22:Lfunc_end22448,12032 +fn6_2: # @fn6_2fn6_2455,12169 +.Lfunc_end23:Lfunc_end23466,12510 +fn7_2: # @fn7_2fn7_2473,12647 +.Lfunc_end24:Lfunc_end24484,12989 +fn8_2: # @fn8_2fn8_2491,13126 +.Lfunc_end25:Lfunc_end25504,13528 +fn9_2: # @fn9_2fn9_2511,13665 +.Lfunc_end26:Lfunc_end26522,14012 +fn1_3: # @fn1_3fn1_3529,14149 +.Lfunc_end27:Lfunc_end27547,14676 +fn2_3: # @fn2_3fn2_3554,14813 +.Lfunc_end28:Lfunc_end28572,15349 +fn3_3: # @fn3_3fn3_3579,15486 +.Lfunc_end29:Lfunc_end29590,15831 +fn4_3: # @fn4_3fn4_3597,15968 +.Lfunc_end30:Lfunc_end30615,16495 +fn5_3: # @fn5_3fn5_3622,16632 +.Lfunc_end31:Lfunc_end31633,16973 +fn6_3: # @fn6_3fn6_3640,17110 +.Lfunc_end32:Lfunc_end32651,17451 +fn7_3: # @fn7_3fn7_3658,17588 +.Lfunc_end33:Lfunc_end33669,17930 +fn8_3: # @fn8_3fn8_3676,18067 +.Lfunc_end34:Lfunc_end34689,18469 +fn9_3: # @fn9_3fn9_3696,18606 +.Lfunc_end35:Lfunc_end35707,18953 +fn1_4: # @fn1_4fn1_4714,19090 +.Lfunc_end36:Lfunc_end36731,19590 +fn2_4: # @fn2_4fn2_4738,19727 +.Lfunc_end37:Lfunc_end37757,20293 +fn3_4: # @fn3_4fn3_4764,20430 +.Lfunc_end38:Lfunc_end38783,20997 +fn4_4: # @fn4_4fn4_4790,21134 +.Lfunc_end39:Lfunc_end39807,21634 +fn5_4: # @fn5_4fn5_4814,21771 +.Lfunc_end40:Lfunc_end40833,22329 +fn6_4: # @fn6_4fn6_4840,22466 +.Lfunc_end41:Lfunc_end41859,23024 +fn7_4: # @fn7_4fn7_4866,23161 +.Lfunc_end42:Lfunc_end42876,23478 +fn8_4: # @fn8_4fn8_4883,23615 +.Lfunc_end43:Lfunc_end43897,24043 +fn9_4: # @fn9_4fn9_4904,24180 +.Lfunc_end44:Lfunc_end44918,24608 +fn1_5: # @fn1_5fn1_5925,24745 +.Lfunc_end45:Lfunc_end45943,25273 +fn2_5: # @fn2_5fn2_5950,25410 +.Lfunc_end46:Lfunc_end46968,25950 +fn3_5: # @fn3_5fn3_5975,26087 +.Lfunc_end47:Lfunc_end47986,26433 +fn4_5: # @fn4_5fn4_5993,26570 +.Lfunc_end48:Lfunc_end481011,27098 +fn5_5: # @fn5_5fn5_51018,27235 +.Lfunc_end49:Lfunc_end491029,27576 +fn6_5: # @fn6_5fn6_51036,27713 +.Lfunc_end50:Lfunc_end501047,28055 +fn7_5: # @fn7_5fn7_51054,28192 +.Lfunc_end51:Lfunc_end511065,28538 +fn8_5: # @fn8_5fn8_51072,28675 +.Lfunc_end52:Lfunc_end521085,29080 +fn9_5: # @fn9_5fn9_51092,29217 +.Lfunc_end53:Lfunc_end531103,29565 +fn1_6: # @fn1_6fn1_61110,29702 +.Lfunc_end54:Lfunc_end541128,30230 +fn2_6: # @fn2_6fn2_61135,30367 +.Lfunc_end55:Lfunc_end551153,30907 +fn3_6: # @fn3_6fn3_61160,31044 +.Lfunc_end56:Lfunc_end561171,31390 +fn4_6: # @fn4_6fn4_61178,31527 +.Lfunc_end57:Lfunc_end571196,32055 +fn5_6: # @fn5_6fn5_61203,32192 +.Lfunc_end58:Lfunc_end581214,32533 +fn6_6: # @fn6_6fn6_61221,32670 +.Lfunc_end59:Lfunc_end591232,33012 +fn7_6: # @fn7_6fn7_61239,33149 +.Lfunc_end60:Lfunc_end601250,33495 +fn8_6: # @fn8_6fn8_61257,33632 +.Lfunc_end61:Lfunc_end611270,34037 +fn9_6: # @fn9_6fn9_61277,34174 +.Lfunc_end62:Lfunc_end621288,34522 +fn1_7: # @fn1_7fn1_71295,34659 +.Lfunc_end63:Lfunc_end631307,35030 +fn2_7: # @fn2_7fn2_71314,35167 +.Lfunc_end64:Lfunc_end641328,35596 +fn3_7: # @fn3_7fn3_71335,35733 +.Lfunc_end65:Lfunc_end651349,36162 +fn4_7: # @fn4_7fn4_71356,36299 +.Lfunc_end66:Lfunc_end661368,36670 +fn5_7: # @fn5_7fn5_71375,36807 +.Lfunc_end67:Lfunc_end671389,37232 +fn6_7: # @fn6_7fn6_71396,37369 +.Lfunc_end68:Lfunc_end681410,37793 +fn7_7: # @fn7_7fn7_71417,37930 +.Lfunc_end69:Lfunc_end691429,38304 +fn8_7: # @fn8_7fn8_71436,38441 +.Lfunc_end70:Lfunc_end701450,38873 +fn9_7: # @fn9_7fn9_71457,39010 +.Lfunc_end71:Lfunc_end711471,39441 +fn1_8: # @fn1_8fn1_81478,39578 +.Lfunc_end72:Lfunc_end721490,39948 +fn2_8: # @fn2_8fn2_81497,40085 +.Lfunc_end73:Lfunc_end731511,40513 +fn3_8: # @fn3_8fn3_81518,40650 +.Lfunc_end74:Lfunc_end741537,41217 +fn4_8: # @fn4_8fn4_81544,41354 +.Lfunc_end75:Lfunc_end751556,41724 +fn5_8: # @fn5_8fn5_81563,41861 +.Lfunc_end76:Lfunc_end761577,42285 +fn6_8: # @fn6_8fn6_81584,42422 +.Lfunc_end77:Lfunc_end771603,42980 +fn7_8: # @fn7_8fn7_81610,43117 +.Lfunc_end78:Lfunc_end781622,43490 +fn8_8: # @fn8_8fn8_81629,43627 +.Lfunc_end79:Lfunc_end791643,44058 +fn9_8: # @fn9_8fn9_81650,44195 +.Lfunc_end80:Lfunc_end801664,44623 +fn1_9: # @fn1_9fn1_91671,44760 +.Lfunc_end81:Lfunc_end811683,45130 +fn2_9: # @fn2_9fn2_91690,45267 +.Lfunc_end82:Lfunc_end821704,45695 +fn3_9: # @fn3_9fn3_91711,45832 +.Lfunc_end83:Lfunc_end831730,46399 +fn4_9: # @fn4_9fn4_91737,46536 +.Lfunc_end84:Lfunc_end841749,46906 +fn5_9: # @fn5_9fn5_91756,47043 +.Lfunc_end85:Lfunc_end851770,47467 +fn6_9: # @fn6_9fn6_91777,47604 +.Lfunc_end86:Lfunc_end861796,48162 +fn7_9: # @fn7_9fn7_91803,48299 +.Lfunc_end87:Lfunc_end871815,48672 +fn8_9: # @fn8_9fn8_91822,48809 +.Lfunc_end88:Lfunc_end881836,49240 +fn9_9: # @fn9_9fn9_91843,49377 +.Lfunc_end89:Lfunc_end891857,49805 +fn1_a: # @fn1_afn1_a1864,49942 +.Lfunc_end90:Lfunc_end901881,50443 +fn2_a: # @fn2_afn2_a1888,50580 +.Lfunc_end91:Lfunc_end911909,51204 +fn3_a: # @fn3_afn3_a1916,51341 +.Lfunc_end92:Lfunc_end921935,51905 +fn4_a: # @fn4_afn4_a1942,52042 +.Lfunc_end93:Lfunc_end931959,52543 +fn5_a: # @fn5_afn5_a1966,52680 +.Lfunc_end94:Lfunc_end941987,53297 +fn6_a: # @fn6_afn6_a1994,53434 +.Lfunc_end95:Lfunc_end952013,53992 +fn7_a: # @fn7_afn7_a2020,54129 +.Lfunc_end96:Lfunc_end962030,54451 +fn8_a: # @fn8_afn8_a2037,54588 +.Lfunc_end97:Lfunc_end972047,54910 +fn9_a: # @fn9_afn9_a2054,55047 +.Lfunc_end98:Lfunc_end982064,55369 +fn1_b: # @fn1_bfn1_b2071,55506 +.Lfunc_end99:Lfunc_end992088,56007 +fn2_b: # @fn2_bfn2_b2095,56144 +.Lfunc_end100:Lfunc_end1002116,56768 +fn3_b: # @fn3_bfn3_b2123,56907 +.Lfunc_end101:Lfunc_end1012142,57471 +fn4_b: # @fn4_bfn4_b2149,57610 +.Lfunc_end102:Lfunc_end1022166,58111 +fn5_b: # @fn5_bfn5_b2173,58250 +.Lfunc_end103:Lfunc_end1032194,58867 +fn6_b: # @fn6_bfn6_b2201,59006 +.Lfunc_end104:Lfunc_end1042220,59564 +fn7_b: # @fn7_bfn7_b2227,59703 +.Lfunc_end105:Lfunc_end1052237,60025 +fn8_b: # @fn8_bfn8_b2244,60164 +.Lfunc_end106:Lfunc_end1062254,60486 +fn9_b: # @fn9_bfn9_b2261,60625 +.Lfunc_end107:Lfunc_end1072271,60947 +fn1_c: # @fn1_cfn1_c2278,61086 +.Lfunc_end108:Lfunc_end1082296,61613 +fn2_c: # @fn2_cfn2_c2303,61752 +.Lfunc_end109:Lfunc_end1092321,62289 +fn3_c: # @fn3_cfn3_c2328,62428 +.Lfunc_end110:Lfunc_end1102339,62773 +fn4_c: # @fn4_cfn4_c2346,62912 +.Lfunc_end111:Lfunc_end1112364,63439 +fn5_c: # @fn5_cfn5_c2371,63578 +.Lfunc_end112:Lfunc_end1122382,63919 +fn6_c: # @fn6_cfn6_c2389,64058 +.Lfunc_end113:Lfunc_end1132400,64400 +fn7_c: # @fn7_cfn7_c2407,64539 +.Lfunc_end114:Lfunc_end1142418,64881 +fn8_c: # @fn8_cfn8_c2425,65020 +.Lfunc_end115:Lfunc_end1152438,65423 +fn9_c: # @fn9_cfn9_c2445,65562 +.Lfunc_end116:Lfunc_end1162456,65909 +fn1_d: # @fn1_dfn1_d2463,66048 +.Lfunc_end117:Lfunc_end1172481,66576 +fn2_d: # @fn2_dfn2_d2488,66715 +.Lfunc_end118:Lfunc_end1182506,67255 +fn3_d: # @fn3_dfn3_d2513,67394 +.Lfunc_end119:Lfunc_end1192524,67740 +fn4_d: # @fn4_dfn4_d2531,67879 +.Lfunc_end120:Lfunc_end1202549,68407 +fn5_d: # @fn5_dfn5_d2556,68546 +.Lfunc_end121:Lfunc_end1212567,68887 +fn6_d: # @fn6_dfn6_d2574,69026 +.Lfunc_end122:Lfunc_end1222585,69369 +fn7_d: # @fn7_dfn7_d2592,69508 +.Lfunc_end123:Lfunc_end1232603,69854 +fn8_d: # @fn8_dfn8_d2610,69993 +.Lfunc_end124:Lfunc_end1242623,70398 +fn9_d: # @fn9_dfn9_d2630,70537 +.Lfunc_end125:Lfunc_end1252641,70886 +fn1_e: # @fn1_efn1_e2648,71025 +.Lfunc_end126:Lfunc_end1262659,71367 +fn2_e: # @fn2_efn2_e2666,71506 +.Lfunc_end127:Lfunc_end1272677,71852 +fn3_e: # @fn3_efn3_e2684,71991 +.Lfunc_end128:Lfunc_end1282695,72337 +fn4_e: # @fn4_efn4_e2702,72476 +.Lfunc_end129:Lfunc_end1292713,72818 +fn5_e: # @fn5_efn5_e2720,72957 +.Lfunc_end130:Lfunc_end1302725,73140 +fn6_e: # @fn6_efn6_e2732,73279 +.Lfunc_end131:Lfunc_end1312743,73622 +fn7_e: # @fn7_efn7_e2750,73761 +.Lfunc_end132:Lfunc_end1322761,74106 +fn8_e: # @fn8_efn8_e2768,74245 +.Lfunc_end133:Lfunc_end1332779,74593 +fn9_e: # @fn9_efn9_e2786,74732 +.Lfunc_end134:Lfunc_end1342797,75080 +fn1_f: # @fn1_ffn1_f2804,75219 +.Lfunc_end135:Lfunc_end1352815,75560 +fn2_f: # @fn2_ffn2_f2822,75699 +.Lfunc_end136:Lfunc_end1362833,76042 +fn3_f: # @fn3_ffn3_f2840,76181 +.Lfunc_end137:Lfunc_end1372851,76527 +fn4_f: # @fn4_ffn4_f2858,76666 +.Lfunc_end138:Lfunc_end1382869,77007 +fn5_f: # @fn5_ffn5_f2876,77146 +.Lfunc_end139:Lfunc_end1392887,77487 +fn6_f: # @fn6_ffn6_f2894,77626 +.Lfunc_end140:Lfunc_end1402905,77969 +fn7_f: # @fn7_ffn7_f2912,78108 +.Lfunc_end141:Lfunc_end1412923,78449 +fn8_f: # @fn8_ffn8_f2930,78588 +.Lfunc_end142:Lfunc_end1422941,78934 +fn9_f: # @fn9_ffn9_f2948,79073 +.Lfunc_end143:Lfunc_end1432959,79421 +fn1_g: # @fn1_gfn1_g2966,79560 +.Lfunc_end144:Lfunc_end1442977,79901 +fn2_g: # @fn2_gfn2_g2984,80040 +.Lfunc_end145:Lfunc_end1452995,80383 +fn3_g: # @fn3_gfn3_g3002,80522 +.Lfunc_end146:Lfunc_end1463013,80868 +fn4_g: # @fn4_gfn4_g3020,81007 +.Lfunc_end147:Lfunc_end1473031,81347 +fn5_g: # @fn5_gfn5_g3038,81486 +.Lfunc_end148:Lfunc_end1483049,81827 +fn6_g: # @fn6_gfn6_g3056,81966 +.Lfunc_end149:Lfunc_end1493067,82309 +fn7_g: # @fn7_gfn7_g3074,82448 +.Lfunc_end150:Lfunc_end1503085,82789 +fn8_g: # @fn8_gfn8_g3092,82928 +.Lfunc_end151:Lfunc_end1513103,83274 +fn9_g: # @fn9_gfn9_g3110,83413 +.Lfunc_end152:Lfunc_end1523121,83761 +fn1_h: # @fn1_hfn1_h3128,83900 +.Lfunc_end153:Lfunc_end1533146,84429 +fn2_h: # @fn2_hfn2_h3153,84568 +.Lfunc_end154:Lfunc_end1543175,85220 +fn3_h: # @fn3_hfn3_h3182,85359 +.Lfunc_end155:Lfunc_end1553200,85896 +fn4_h: # @fn4_hfn4_h3207,86035 +.Lfunc_end156:Lfunc_end1563225,86564 +fn5_h: # @fn5_hfn5_h3232,86703 +.Lfunc_end157:Lfunc_end1573243,87045 +fn6_h: # @fn6_hfn6_h3250,87184 +.Lfunc_end158:Lfunc_end1583268,87713 +fn7_h: # @fn7_hfn7_h3275,87852 +.Lfunc_end159:Lfunc_end1593286,88200 +fn8_h: # @fn8_hfn8_h3293,88339 +.Lfunc_end160:Lfunc_end1603304,88687 +fn9_h: # @fn9_hfn9_h3311,88826 +.Lfunc_end161:Lfunc_end1613322,89177 +fn1_i: # @fn1_ifn1_i3329,89316 +.Lfunc_end162:Lfunc_end1623347,89845 +fn2_i: # @fn2_ifn2_i3354,89984 +.Lfunc_end163:Lfunc_end1633376,90636 +fn3_i: # @fn3_ifn3_i3383,90775 +.Lfunc_end164:Lfunc_end1643403,91367 +fn4_i: # @fn4_ifn4_i3410,91506 +.Lfunc_end165:Lfunc_end1653428,92035 +fn5_i: # @fn5_ifn5_i3435,92174 +.Lfunc_end166:Lfunc_end1663457,92819 +fn6_i: # @fn6_ifn6_i3464,92958 +.Lfunc_end167:Lfunc_end1673484,93544 +fn7_i: # @fn7_ifn7_i3491,93683 +.Lfunc_end168:Lfunc_end1683502,94031 +fn8_i: # @fn8_ifn8_i3509,94170 +.Lfunc_end169:Lfunc_end1693520,94518 +fn9_i: # @fn9_ifn9_i3527,94657 +.Lfunc_end170:Lfunc_end1703538,95005 +main: # @mainmain3545,95140 +.Lfunc_end171:Lfunc_end1713560,95600 +b:b3568,95755 +c:c3577,95889 +d:d3586,96023 + +externals/binaryen/test/torture-s/20001121-1.c.s,282 +foo: # @foofoo7,207 +.Lfunc_end0:Lfunc_end014,445 +bar: # @barbar21,568 +.Lfunc_end1:Lfunc_end127,778 +main: # @mainmain34,905 +.Lfunc_end2:Lfunc_end241,1092 +d:d49,1243 + +externals/binaryen/test/torture-s/p18298.c.s,260 +foo: # @foofoo7,203 +.Lfunc_end0:Lfunc_end016,498 +main: # @mainmain23,625 +.LBB1_2: # %while.endLBB1_235,997 +.Lfunc_end1:Lfunc_end140,1193 +s:s48,1347 + +externals/binaryen/test/torture-s/20000121-1.c.s,271 +big: # @bigbig7,207 +.Lfunc_end0:Lfunc_end012,388 +doit: # @doitdoit19,515 +.Lfunc_end1:Lfunc_end124,707 +main: # @mainmain31,836 +.Lfunc_end2:Lfunc_end237,1047 + +externals/binaryen/test/torture-s/pr42614.c.s,355 +init: # @initinit7,208 +.Lfunc_end0:Lfunc_end014,461 +expect_func: # @expect_funcexpect_func21,618 +.LBB1_3: # %if.then5LBB1_332,997 +.Lfunc_end1:Lfunc_end137,1140 +main: # @mainmain44,1283 +.Lfunc_end2:Lfunc_end268,2011 + +externals/binaryen/test/torture-s/941101-1.c.s,175 +f: # @ff7,197 +.Lfunc_end0:Lfunc_end013,405 +main: # @mainmain20,528 +.Lfunc_end1:Lfunc_end127,715 + +externals/binaryen/test/torture-s/20020216-1.c.s,259 +foo: # @foofoo7,207 +.Lfunc_end0:Lfunc_end018,563 +main: # @mainmain25,690 +.LBB1_2: # %if.thenLBB1_240,1143 +.Lfunc_end1:Lfunc_end145,1285 +c:c52,1427 + +externals/binaryen/test/torture-s/loop-4.c.s,175 +f: # @ff7,195 +.Lfunc_end0:Lfunc_end013,406 +main: # @mainmain20,529 +.Lfunc_end1:Lfunc_end127,717 + +externals/binaryen/test/torture-s/va-arg-15.c.s,529 +vafunction: # @vafunctionvafunction7,234 +.LBB0_1: # %for.bodyLBB0_120,646 +.LBB0_3: # %if.thenLBB0_343,1407 +.LBB0_4: # %for.incLBB0_459,1970 +.LBB0_6: # %if.then9LBB0_675,2517 +.LBB0_7: # %if.then4LBB0_779,2650 +.Lfunc_end0:Lfunc_end084,2793 +main: # @mainmain91,2934 +.Lfunc_end1:Lfunc_end1175,5360 + +externals/binaryen/test/torture-s/bf-pack-1.c.s,244 +f: # @ff7,198 +.LBB0_3: # %if.then5LBB0_328,864 +.Lfunc_end0:Lfunc_end033,1007 +main: # @mainmain40,1130 +.Lfunc_end1:Lfunc_end160,1690 + +externals/binaryen/test/torture-s/931004-4.c.s,444 +f: # @ff7,197 +.LBB0_2: # %for.bodyLBB0_231,886 +.LBB0_4: # %for.endLBB0_451,1603 +.LBB0_6: # %if.thenLBB0_664,2020 +.LBB0_7: # %if.then9LBB0_768,2152 +.Lfunc_end0:Lfunc_end073,2295 +main: # @mainmain80,2418 +.Lfunc_end1:Lfunc_end1101,3007 + +externals/binaryen/test/torture-s/20010106-1.c.s,245 +f: # @ff7,199 +.LBB0_2: # %sw.defaultLBB0_225,733 +.Lfunc_end0:Lfunc_end030,878 +main: # @mainmain37,1001 +.Lfunc_end1:Lfunc_end144,1189 + +externals/binaryen/test/torture-s/loop-11.c.s,304 +main: # @mainmain7,208 +.LBB0_1: # %for.body.iLBB0_113,380 +.LBB0_3: # %for.bodyLBB0_329,904 +.LBB0_6: # %if.thenLBB0_650,1643 +.Lfunc_end0:Lfunc_end055,1785 +a:a61,1907 + +externals/binaryen/test/torture-s/pr31605.c.s,257 +put_field: # @put_fieldput_field7,228 +.LBB0_2: # %if.thenLBB0_219,600 +.Lfunc_end0:Lfunc_end025,770 +main: # @mainmain32,909 +.Lfunc_end1:Lfunc_end141,1155 + +externals/binaryen/test/torture-s/20030401-1.c.s,269 +bar: # @barbar7,207 +.Lfunc_end0:Lfunc_end013,417 +foo: # @foofoo20,540 +.Lfunc_end1:Lfunc_end125,721 +main: # @mainmain32,848 +.Lfunc_end2:Lfunc_end238,1059 + +externals/binaryen/test/torture-s/pr42833.c.s,1053 +helper_neon_rshl_s8: # @helper_neon_rshl_s8helper_neon_rshl_s87,268 +.LBB0_3: # %if.else18LBB0_332,1064 +.LBB0_6: # %if.then38LBB0_651,1705 +.LBB0_7: # %if.end57LBB0_761,2024 +.LBB0_10: # %if.else78LBB0_1083,2747 +.LBB0_13: # %if.then100LBB0_1398,3282 +.LBB0_14: # %if.end122LBB0_14108,3608 +.LBB0_17: # %if.else143LBB0_17132,4368 +.LBB0_20: # %if.then165LBB0_20148,4923 +.LBB0_21: # %if.end187LBB0_21158,5249 +.LBB0_24: # %if.else209LBB0_24176,5873 +.LBB0_27: # %if.then231LBB0_27191,6414 +.LBB0_28: # %if.end253LBB0_28201,6743 +.Lfunc_end0:Lfunc_end0220,7370 +main: # @mainmain227,7529 +.Lfunc_end1:Lfunc_end1233,7741 + +externals/binaryen/test/torture-s/921123-1.c.s,175 +f: # @ff7,197 +.Lfunc_end0:Lfunc_end020,595 +main: # @mainmain27,718 +.Lfunc_end1:Lfunc_end134,906 + +externals/binaryen/test/torture-s/990127-1.c.s,1456 +main: # @mainmain7,209 +.LBB0_1: # %while.body.1LBB0_128,806 +.LBB0_3: # %while.end.1LBB0_346,1491 +.LBB0_4: # %while.cond.2LBB0_452,1678 +.LBB0_6: # %while.end.2LBB0_673,2422 +.LBB0_7: # %while.cond.3LBB0_781,2658 +.LBB0_9: # %while.end.3LBB0_9102,3402 +.LBB0_10: # %while.cond.4LBB0_10110,3638 +.LBB0_12: # %while.end.4LBB0_12131,4384 +.LBB0_13: # %while.cond.5LBB0_13139,4620 +.LBB0_15: # %while.end.5LBB0_15160,5368 +.LBB0_16: # %while.cond.6LBB0_16168,5604 +.LBB0_18: # %while.end.6LBB0_18189,6355 +.LBB0_19: # %while.cond.7LBB0_19197,6594 +.LBB0_21: # %while.end.7LBB0_21218,7355 +.LBB0_22: # %while.cond.8LBB0_22226,7594 +.LBB0_24: # %while.end.8LBB0_24247,8355 +.LBB0_25: # %while.cond.9LBB0_25255,8594 +.LBB0_27: # %while.end.9LBB0_27276,9355 +.LBB0_30: # %if.then12LBB0_30292,9884 +.Lfunc_end0:Lfunc_end0297,10029 + +externals/binaryen/test/torture-s/pr54937.c.s,423 +t: # @tt7,201 +.LBB0_2: # %for.bodyLBB0_218,525 +.LBB0_4: # %if.endLBB0_430,1005 +.LBB0_5: # %for.endLBB0_543,1450 +.Lfunc_end0:Lfunc_end049,1658 +main: # @mainmain56,1781 +.Lfunc_end1:Lfunc_end167,2094 +terminate_me:terminate_me75,2289 +a:a84,2444 + +externals/binaryen/test/torture-s/20020911-1.c.s,169 +main: # @mainmain7,211 +.LBB0_3: # %if.thenLBB0_329,900 +.Lfunc_end0:Lfunc_end034,1042 +c:c42,1196 + +externals/binaryen/test/torture-s/20090113-1.c.s,620 +msum_i4: # @msum_i4msum_i47,228 +.LBB0_2: # %for.bodyLBB0_252,1627 +.LBB0_3: # %for.endLBB0_371,2251 +.LBB0_4: # %do.bodyLBB0_480,2495 +.LBB0_6: # %for.body18LBB0_692,2987 +.LBB0_8: # in Loop: Header=BB0_4 Depth=1LBB0_8110,3699 +.LBB0_9: # %for.end22LBB0_9113,3834 +.Lfunc_end0:Lfunc_end0135,4571 +main: # @mainmain142,4706 +.Lfunc_end1:Lfunc_end1148,4926 + +externals/binaryen/test/torture-s/20100209-1.c.s,179 +bar: # @barbar7,207 +.Lfunc_end0:Lfunc_end015,461 +main: # @mainmain22,588 +.Lfunc_end1:Lfunc_end128,800 + +externals/binaryen/test/torture-s/pr27073.c.s,387 +foo: # @foofoo7,204 +.LBB0_2: # %while.bodyLBB0_216,550 +.LBB0_3: # %while.endLBB0_338,1219 +.Lfunc_end0:Lfunc_end043,1396 +main: # @mainmain50,1523 +.LBB1_11: # %if.thenLBB1_11122,4034 +.Lfunc_end1:Lfunc_end1127,4176 + +externals/binaryen/test/torture-s/961017-1.c.s,90 +main: # @mainmain7,209 +.Lfunc_end0:Lfunc_end014,396 + +externals/binaryen/test/torture-s/pr42006.c.s,90 +main: # @mainmain7,208 +.Lfunc_end0:Lfunc_end013,419 + +externals/binaryen/test/torture-s/zerolen-1.c.s,267 +main: # @mainmain7,210 +.Lfunc_end0:Lfunc_end017,484 + .hidden sethidden21,563 + .globl setglobl22,576 + .type set,@functiontype23,588 +.Lfunc_end1:Lfunc_end131,848 + .size set, .Lfunc_end1-setsize32,861 +entry:entry38,1001 + +externals/binaryen/test/torture-s/memcpy-1.c.s,1088 +copy: # @copycopy7,209 +.Lfunc_end0:Lfunc_end014,469 +main: # @mainmain21,598 +.LBB1_1: # %for.bodyLBB1_136,1085 +.LBB1_3: # %for.body6LBB1_356,1772 +.LBB1_6: # %for.cond17LBB1_682,2659 +.LBB1_9: # %for.end29LBB1_9103,3418 +.LBB1_10: # %for.body35LBB1_10110,3670 +.LBB1_13: # %for.cond48LBB1_13133,4539 +.LBB1_16: # %for.end60LBB1_16153,5270 +.LBB1_17: # %for.body66LBB1_17160,5520 +.LBB1_20: # %for.body85LBB1_20184,6428 +.LBB1_23: # %if.then92LBB1_23207,7259 +.LBB1_24: # %if.thenLBB1_24211,7394 +.LBB1_25: # %if.then42LBB1_25215,7526 +.LBB1_26: # %if.then73LBB1_26219,7660 +.Lfunc_end1:Lfunc_end1224,7804 + +externals/binaryen/test/torture-s/930408-1.c.s,338 +p: # @pp7,197 +.Lfunc_end0:Lfunc_end013,353 +f: # @ff20,464 +.LBB1_2: # %sw.bbLBB1_231,784 +.Lfunc_end1:Lfunc_end136,928 +main: # @mainmain43,1051 +.Lfunc_end2:Lfunc_end254,1338 +s:s62,1489 + +externals/binaryen/test/torture-s/pr53645.c.s,2802 +uq4444: # @uq4444uq44447,216 +.Lfunc_end0:Lfunc_end040,1175 +ur4444: # @ur4444ur444447,1316 +.Lfunc_end1:Lfunc_end180,2271 +sq4444: # @sq4444sq444487,2412 +.Lfunc_end2:Lfunc_end2120,3371 +sr4444: # @sr4444sr4444127,3512 +.Lfunc_end3:Lfunc_end3160,4471 +uq1428: # @uq1428uq1428167,4612 +.Lfunc_end4:Lfunc_end4198,5512 +ur1428: # @ur1428ur1428205,5653 +.Lfunc_end5:Lfunc_end5236,6547 +sq1428: # @sq1428sq1428243,6688 +.Lfunc_end6:Lfunc_end6274,7588 +sr1428: # @sr1428sr1428281,7729 +.Lfunc_end7:Lfunc_end7314,8688 +uq3333: # @uq3333uq3333321,8829 +.Lfunc_end8:Lfunc_end8354,9788 +ur3333: # @ur3333ur3333361,9929 +.Lfunc_end9:Lfunc_end9394,10888 +sq3333: # @sq3333sq3333401,11029 +.Lfunc_end10:Lfunc_end10434,11988 +sr3333: # @sr3333sr3333441,12131 +.Lfunc_end11:Lfunc_end11474,13090 +uq6565: # @uq6565uq6565481,13233 +.Lfunc_end12:Lfunc_end12514,14192 +ur6565: # @ur6565ur6565521,14335 +.Lfunc_end13:Lfunc_end13554,15294 +sq6565: # @sq6565sq6565561,15437 +.Lfunc_end14:Lfunc_end14594,16396 +sr6565: # @sr6565sr6565601,16539 +.Lfunc_end15:Lfunc_end15634,17498 +uq1414146: # @uq1414146uq1414146641,17653 +.Lfunc_end16:Lfunc_end16674,18618 +ur1414146: # @ur1414146ur1414146681,18779 +.Lfunc_end17:Lfunc_end17714,19744 +sq1414146: # @sq1414146sq1414146721,19905 +.Lfunc_end18:Lfunc_end18754,20870 +sr1414146: # @sr1414146sr1414146761,21031 +.Lfunc_end19:Lfunc_end19794,21996 +uq7777: # @uq7777uq7777801,22145 +.Lfunc_end20:Lfunc_end20834,23104 +ur7777: # @ur7777ur7777841,23247 +.Lfunc_end21:Lfunc_end21874,24206 +sq7777: # @sq7777sq7777881,24349 +.Lfunc_end22:Lfunc_end22914,25308 +sr7777: # @sr7777sr7777921,25451 +.Lfunc_end23:Lfunc_end23954,26410 +main: # @mainmain961,26545 +.LBB24_1: # %for.bodyLBB24_1974,26973 +.LBB24_51: # %for.body319LBB24_511533,46913 +.LBB24_101: # %if.then642LBB24_1012023,64932 +.Lfunc_end24:Lfunc_end242028,65077 +u:u2036,65233 +s:s2052,65686 + +externals/binaryen/test/torture-s/20031010-1.c.s,335 +foo: # @foofoo7,207 +.LBB0_3:LBB0_323,724 +.LBB0_4: # %if.end9LBB0_427,818 +.Lfunc_end0:Lfunc_end032,960 +main: # @mainmain39,1087 +.LBB1_2: # %if.thenLBB1_254,1545 +.Lfunc_end1:Lfunc_end159,1687 + +externals/binaryen/test/torture-s/builtin-prefetch-6.c.s,634 +init_addrs: # @init_addrsinit_addrs7,243 +.Lfunc_end0:Lfunc_end095,2958 +prefetch_for_read: # @prefetch_for_readprefetch_for_read102,3151 +.LBB1_1: # %for.bodyLBB1_1106,3296 +.Lfunc_end1:Lfunc_end1117,3718 +prefetch_for_write: # @prefetch_for_writeprefetch_for_write124,3929 +.LBB2_1: # %for.bodyLBB2_1128,4075 +.Lfunc_end2:Lfunc_end2139,4497 +main: # @mainmain146,4654 +.Lfunc_end3:Lfunc_end3156,4946 +bad_addr:bad_addr164,5125 +arr_used:arr_used173,5303 + +externals/binaryen/test/torture-s/20020506-1.c.s,2477 +test1: # @test1test17,215 +.LBB0_3: # %if.elseLBB0_322,671 +.LBB0_4: # %if.end45LBB0_426,833 +.LBB0_5: # %if.then4LBB0_529,936 +.Lfunc_end0:Lfunc_end034,1079 +test2: # @test2test241,1214 +.LBB1_3: # %if.elseLBB1_360,1781 +.LBB1_4: # %if.end45LBB1_464,1943 +.LBB1_5: # %if.then4LBB1_567,2046 +.Lfunc_end1:Lfunc_end172,2189 +test3: # @test3test379,2324 +.LBB2_3: # %if.elseLBB2_394,2780 +.LBB2_4: # %if.end45LBB2_498,2942 +.LBB2_5: # %if.then4LBB2_5101,3045 +.Lfunc_end2:Lfunc_end2106,3188 +test4: # @test4test4113,3323 +.LBB3_3: # %if.elseLBB3_3132,3892 +.LBB3_4: # %if.end45LBB3_4136,4055 +.LBB3_5: # %if.then4LBB3_5139,4159 +.Lfunc_end3:Lfunc_end3144,4302 +test5: # @test5test5151,4437 +.LBB4_3: # %if.elseLBB4_3166,4895 +.LBB4_4: # %if.end38LBB4_4170,5059 +.LBB4_5: # %if.then3LBB4_5173,5163 +.Lfunc_end4:Lfunc_end4178,5307 +test6: # @test6test6185,5442 +.LBB5_3: # %if.elseLBB5_3200,5900 +.LBB5_4: # %if.end38LBB5_4204,6064 +.LBB5_5: # %if.then3LBB5_5207,6168 +.Lfunc_end5:Lfunc_end5212,6312 +test7: # @test7test7219,6447 +.LBB6_3: # %if.elseLBB6_3234,6905 +.LBB6_4: # %if.end38LBB6_4238,7069 +.LBB6_5: # %if.then3LBB6_5241,7173 +.Lfunc_end6:Lfunc_end6246,7317 +test8: # @test8test8253,7452 +.LBB7_3: # %if.elseLBB7_3268,7910 +.LBB7_4: # %if.end38LBB7_4272,8074 +.LBB7_5: # %if.then3LBB7_5275,8178 +.Lfunc_end7:Lfunc_end7280,8322 +main: # @mainmain287,8453 +.Lfunc_end8:Lfunc_end8293,8664 + +externals/binaryen/test/torture-s/pr42269-2.c.s,192 +main: # @mainmain7,210 +.Lfunc_end0:Lfunc_end017,547 +foo: # @foofoo22,647 +.Lfunc_end1:Lfunc_end133,990 +s:s41,1142 + +externals/binaryen/test/torture-s/20040625-1.c.s,324 +maybe_next: # @maybe_nextmaybe_next7,235 +.LBB0_2: # %if.endLBB0_216,532 +.Lfunc_end0:Lfunc_end021,727 +main: # @mainmain28,868 +.LBB1_2: # %if.thenLBB1_251,1559 +.Lfunc_end1:Lfunc_end156,1701 + +externals/binaryen/test/torture-s/pr39339.c.s,385 +foo: # @foofoo7,204 +.LBB0_2: # %for.bodyLBB0_241,1211 +.LBB0_3: # %for.endLBB0_358,1781 +.Lfunc_end0:Lfunc_end063,1956 +main: # @mainmain70,2083 +.LBB1_3: # %if.then12LBB1_3137,4041 +.Lfunc_end1:Lfunc_end1142,4185 + +externals/binaryen/test/torture-s/string-opt-17.c.s,579 +test1: # @test1test17,218 +.Lfunc_end0:Lfunc_end018,579 +check2: # @check2check225,718 +.LBB1_2: # %if.thenLBB1_240,1165 +.Lfunc_end1:Lfunc_end145,1307 +test2: # @test2test252,1444 +.LBB2_2: # %if.then.iLBB2_268,1927 +.Lfunc_end2:Lfunc_end273,2071 +main: # @mainmain80,2202 +.LBB3_4: # %if.then7LBB3_4123,3575 +.Lfunc_end3:Lfunc_end3128,3718 + +externals/binaryen/test/torture-s/941021-1.c.s,202 +f: # @ff7,197 +.Lfunc_end0:Lfunc_end017,514 +main: # @mainmain24,637 +.Lfunc_end1:Lfunc_end134,921 +glob_dbl:glob_dbl42,1100 + +externals/binaryen/test/torture-s/930614-1.c.s,175 +f: # @ff7,197 +.Lfunc_end0:Lfunc_end016,486 +main: # @mainmain23,609 +.Lfunc_end1:Lfunc_end130,797 + +externals/binaryen/test/torture-s/pr55750.c.s,263 +foo: # @foofoo7,204 +.Lfunc_end0:Lfunc_end021,633 +main: # @mainmain28,760 +.LBB1_3: # %if.thenLBB1_356,1603 +.Lfunc_end1:Lfunc_end161,1745 +arr:arr69,1904 + +externals/binaryen/test/torture-s/pr63209.c.s,193 +Predictor: # @PredictorPredictor7,228 +.Lfunc_end0:Lfunc_end031,969 +main: # @mainmain38,1108 +.Lfunc_end1:Lfunc_end148,1468 + +externals/binaryen/test/torture-s/pr24142.c.s,175 +f: # @ff7,196 +.Lfunc_end0:Lfunc_end020,589 +main: # @mainmain27,712 +.Lfunc_end1:Lfunc_end133,924 + +externals/binaryen/test/torture-s/pr28778.c.s,507 +find: # @findfind7,208 +.LBB0_2: # %if.endLBB0_224,727 +.LBB0_4: # %if.then.iLBB0_437,1153 +.Lfunc_end0:Lfunc_end042,1297 +aglChoosePixelFormat: # @aglChoosePixelFormataglChoosePixelFormat49,1490 +.LBB1_2: # %if.thenLBB1_259,1813 +.Lfunc_end1:Lfunc_end164,1955 +main: # @mainmain71,2116 +.Lfunc_end2:Lfunc_end277,2331 + +externals/binaryen/test/torture-s/pr60072.c.s,102 +main: # @mainmain7,208 +.Lfunc_end0:Lfunc_end016,490 +c:c24,644 + +externals/binaryen/test/torture-s/20050929-1.c.s,214 +main: # @mainmain7,211 +.LBB0_7: # %if.then16LBB0_754,1791 +.Lfunc_end0:Lfunc_end059,1935 +.compoundliteral:compoundliteral65,2091 +e:e99,3031 + +externals/binaryen/test/torture-s/pr44852.c.s,393 +sf: # @sfsf7,200 +.LBB0_1: # %while.condLBB0_114,362 +.LBB0_4: # %while.end.loopexitLBB0_439,1223 +.Lfunc_end0:Lfunc_end049,1563 +main: # @mainmain56,1688 +.LBB1_3: # %if.thenLBB1_3107,3291 +.Lfunc_end1:Lfunc_end1112,3433 + +externals/binaryen/test/torture-s/pr37102.c.s,352 +foo: # @foofoo7,204 +.LBB0_2: # %if.thenLBB0_216,480 +.Lfunc_end0:Lfunc_end021,622 +main: # @mainmain28,749 +.LBB1_2: # %for.inc.3LBB1_242,1154 +.Lfunc_end1:Lfunc_end158,1660 +b:b66,1814 +c:c75,1975 +a:a84,2136 + +externals/binaryen/test/torture-s/simd-6.c.s,182 +foo: # @foofoo7,203 +.Lfunc_end0:Lfunc_end042,1281 +main: # @mainmain49,1408 +.Lfunc_end1:Lfunc_end155,1620 + +externals/binaryen/test/torture-s/pr23604.c.s,306 +g: # @gg7,196 +.LBB0_3: # %if.end9LBB0_322,682 +.LBB0_4: # %returnLBB0_425,794 +.Lfunc_end0:Lfunc_end030,989 +main: # @mainmain37,1112 +.Lfunc_end1:Lfunc_end143,1324 + +externals/binaryen/test/torture-s/pr20187-1.c.s,208 +test: # @testtest7,210 +.Lfunc_end0:Lfunc_end025,750 +main: # @mainmain32,879 +.Lfunc_end1:Lfunc_end151,1450 +a:a59,1604 +b:b68,1770 + +externals/binaryen/test/torture-s/pr41917.c.s,167 +main: # @mainmain7,208 +.LBB0_2: # %if.thenLBB0_223,696 +.Lfunc_end0:Lfunc_end028,838 +a:a36,992 + +externals/binaryen/test/torture-s/pr33779-2.c.s,179 +foo: # @foofoo7,206 +.Lfunc_end0:Lfunc_end019,568 +main: # @mainmain26,695 +.Lfunc_end1:Lfunc_end132,907 + +externals/binaryen/test/torture-s/struct-ini-1.c.s,180 +main: # @mainmain7,213 +.LBB0_4: # %if.thenLBB0_432,1028 +.Lfunc_end0:Lfunc_end037,1170 +object:object45,1344 + +externals/binaryen/test/torture-s/991023-1.c.s,198 +foo: # @foofoo7,205 +.Lfunc_end0:Lfunc_end016,495 +main: # @mainmain23,622 +.Lfunc_end1:Lfunc_end133,887 +blah:blah41,1050 + +externals/binaryen/test/torture-s/ipa-sra-1.c.s,90 +main: # @mainmain7,210 +.Lfunc_end0:Lfunc_end014,440 + +externals/binaryen/test/torture-s/stdarg-4.c.s,1445 +f1i: # @f1if1i7,205 +.Lfunc_end0:Lfunc_end031,938 +f1: # @f1f138,1057 +.Lfunc_end1:Lfunc_end167,1946 +f2i: # @f2if2i74,2067 +.Lfunc_end2:Lfunc_end2107,3072 +f2: # @f2f2114,3191 +.Lfunc_end3:Lfunc_end3153,4366 +f3h: # @f3hf3h160,4487 +.Lfunc_end4:Lfunc_end4170,4822 +f3: # @f3f3177,4941 +.LBB5_2: # %sw.bb2LBB5_2206,5852 +.LBB5_3: # %sw.bb4LBB5_3217,6214 +.LBB5_4: # %sw.bb18LBB5_4233,6708 +.LBB5_5: # %sw.bb10LBB5_5253,7311 +.LBB5_6: # %sw.epilogLBB5_6270,7822 +.LBB5_7: # %sw.defaultLBB5_7277,8052 +.Lfunc_end5:Lfunc_end5282,8197 +f4: # @f4f4289,8314 +.LBB6_3: # %sw.bb2LBB6_3324,9385 +.LBB6_4: # %sw.epilogLBB6_4344,9994 +.LBB6_5: # %sw.defaultLBB6_5373,10873 +.Lfunc_end6:Lfunc_end6378,11018 +main: # @mainmain385,11143 +.LBB7_13: # %if.then32LBB7_13564,16949 +.Lfunc_end7:Lfunc_end7569,17093 +x:x577,17244 +y:y586,17405 + +externals/binaryen/test/torture-s/950612-1.c.s,445 +f1: # @f1f17,201 +.Lfunc_end0:Lfunc_end019,558 +f2: # @f2f226,675 +.Lfunc_end1:Lfunc_end138,1032 +f3: # @f3f345,1149 +.Lfunc_end2:Lfunc_end257,1506 +f4: # @f4f464,1623 +.Lfunc_end3:Lfunc_end376,1980 +main: # @mainmain83,2105 +.Lfunc_end4:Lfunc_end490,2298 + +externals/binaryen/test/torture-s/930630-1.c.s,240 +main: # @mainmain7,209 +.Lfunc_end0:Lfunc_end014,396 +f: # @ff21,513 +.LBB1_2: # %if.thenLBB1_231,806 +.Lfunc_end1:Lfunc_end136,948 + +externals/binaryen/test/torture-s/931004-5.c.s,246 +f: # @ff7,197 +.LBB0_8: # %if.then33LBB0_847,1619 +.Lfunc_end0:Lfunc_end052,1763 +main: # @mainmain59,1886 +.Lfunc_end1:Lfunc_end196,2918 + +externals/binaryen/test/torture-s/loop-10.c.s,176 +main: # @mainmain7,208 +.LBB0_2: # %if.then3LBB0_223,675 +.Lfunc_end0:Lfunc_end028,818 +count:count34,948 + +externals/binaryen/test/torture-s/pr15262-2.c.s,193 +foo: # @foofoo7,206 +.Lfunc_end0:Lfunc_end026,750 +main: # @mainmain33,877 +.Lfunc_end1:Lfunc_end146,1262 +X:X54,1413 + +externals/binaryen/test/torture-s/20020402-1.c.s,90 +main: # @mainmain7,211 +.Lfunc_end0:Lfunc_end014,401 + +externals/binaryen/test/torture-s/va-arg-14.c.s,278 +vat: # @vatvat7,206 +.LBB0_8: # %if.then35LBB0_8107,3284 +.Lfunc_end0:Lfunc_end0112,3428 +main: # @mainmain119,3555 +.Lfunc_end1:Lfunc_end1137,4046 +global:global145,4217 + +externals/binaryen/test/torture-s/20051110-2.c.s,593 +add_unwind_adjustsp: # @add_unwind_adjustspadd_unwind_adjustsp7,271 +.LBB0_1: # %aLBB0_118,593 +.LBB0_4: # %do.endLBB0_442,1518 +.Lfunc_end0:Lfunc_end052,1828 +main: # @mainmain59,1987 +.LBB1_1: # %a.iLBB1_167,2216 +.LBB1_4: # %add_unwind_adjustsp.exitLBB1_491,3147 +.LBB1_7: # %if.thenLBB1_7116,3958 +.Lfunc_end1:Lfunc_end1121,4100 +bytes:bytes128,4255 +flag:flag137,4407 + +externals/binaryen/test/torture-s/pr49768.c.s,90 +main: # @mainmain7,208 +.Lfunc_end0:Lfunc_end013,419 + +externals/binaryen/test/torture-s/loop-5.c.s,187 +main: # @mainmain7,207 +.LBB0_9: # %if.then8LBB0_999,3071 +.Lfunc_end0:Lfunc_end0104,3214 +a:a110,3336 +t:t117,3441 + +externals/binaryen/test/torture-s/pr59221.c.s,274 +main: # @mainmain7,208 +.LBB0_2: # %for.endLBB0_220,604 +.LBB0_4: # %if.thenLBB0_445,1353 +.Lfunc_end0:Lfunc_end050,1495 +a:a58,1649 +b:b67,1810 +e:e76,1971 +d:d85,2132 + +externals/binaryen/test/torture-s/multdi-1.c.s,204 +mpy: # @mpympy7,205 +.Lfunc_end0:Lfunc_end016,504 +main: # @mainmain23,631 +.Lfunc_end1:Lfunc_end132,921 +mpy_res:mpy_res40,1096 + +externals/binaryen/test/torture-s/20060127-1.c.s,322 +f: # @ff7,199 +.LBB0_2: # %if.thenLBB0_215,448 +.Lfunc_end0:Lfunc_end020,590 +main: # @mainmain27,713 +.LBB1_2: # %if.then.iLBB1_237,1019 +.Lfunc_end1:Lfunc_end142,1163 +a:a50,1317 + +externals/binaryen/test/torture-s/20061101-2.c.s,473 +tar: # @tartar7,207 +.LBB0_2: # %if.thenLBB0_218,532 +.Lfunc_end0:Lfunc_end023,674 +bug: # @bugbug30,797 +.LBB1_1: # %while.condLBB1_138,1015 +.LBB1_4: # %while.endLBB1_462,1841 +.Lfunc_end1:Lfunc_end166,2008 +main: # @mainmain73,2135 +.Lfunc_end2:Lfunc_end279,2349 + +externals/binaryen/test/torture-s/20031215-1.c.s,399 +test1: # @test1test17,215 +.Lfunc_end0:Lfunc_end011,384 +test2: # @test2test218,519 +.Lfunc_end1:Lfunc_end122,688 +test3: # @test3test329,823 +.Lfunc_end2:Lfunc_end233,992 +main: # @mainmain40,1123 +.Lfunc_end3:Lfunc_end346,1334 +ao:ao54,1493 +a:a66,1721 + +externals/binaryen/test/torture-s/pr38422.c.s,193 +foo: # @foofoo7,204 +.Lfunc_end0:Lfunc_end024,727 +main: # @mainmain31,854 +.Lfunc_end1:Lfunc_end145,1284 +s:s53,1435 + +externals/binaryen/test/torture-s/pr21173.c.s,272 +foo: # @foofoo7,204 +.Lfunc_end0:Lfunc_end025,732 +main: # @mainmain32,859 +.LBB1_2: # %if.thenLBB1_245,1253 +.Lfunc_end1:Lfunc_end150,1395 +q:q57,1534 +a:a66,1694 + +externals/binaryen/test/torture-s/20070201-1.c.s,181 +foo: # @foofoo7,207 +.Lfunc_end0:Lfunc_end030,909 +main: # @mainmain37,1036 +.Lfunc_end1:Lfunc_end162,1808 + +externals/binaryen/test/torture-s/20000412-2.c.s,375 +f: # @ff7,199 +.LBB0_2: # %if.thenLBB0_231,912 +.LBB0_3: # %cleanupLBB0_334,1027 +.Lfunc_end0:Lfunc_end043,1340 +main: # @mainmain50,1463 +.LBB1_2: # %if.thenLBB1_265,1910 +.Lfunc_end1:Lfunc_end170,2052 + +externals/binaryen/test/torture-s/strct-stdarg-1.c.s,453 +f: # @ff7,203 +.LBB0_2: # %for.bodyLBB0_230,857 +.LBB0_9: # %for.endLBB0_990,3104 +.LBB0_11: # %if.then33LBB0_11105,3596 +.LBB0_12: # %if.then26LBB0_12109,3730 +.Lfunc_end0:Lfunc_end0114,3874 +main: # @mainmain121,3997 +.Lfunc_end1:Lfunc_end1219,6715 + +externals/binaryen/test/torture-s/20010924-1.c.s,224 +main: # @mainmain7,211 +.LBB0_14: # %if.then62LBB0_1490,3118 +.Lfunc_end0:Lfunc_end095,3262 +a1:a1109,3541 +a2:a2119,3723 +a3:a3128,3894 +a4:a4137,4065 + +externals/binaryen/test/torture-s/20041210-1.c.s,169 +main: # @mainmain7,211 +.LBB0_3: # %if.end3LBB0_329,896 +.Lfunc_end0:Lfunc_end035,1068 +x:x43,1222 + +externals/binaryen/test/torture-s/pr49218.c.s,235 +main: # @mainmain7,208 +.LBB0_2: # %do.bodyLBB0_236,1136 +.LBB0_3: # %if.endLBB0_358,1821 +.Lfunc_end0:Lfunc_end068,2147 +f:f76,2298 + +externals/binaryen/test/torture-s/991202-1.c.s,114 +main: # @mainmain7,209 +.Lfunc_end0:Lfunc_end020,540 +x:x28,691 +y:y37,852 + +externals/binaryen/test/torture-s/20011223-1.c.s,90 +main: # @mainmain7,211 +.Lfunc_end0:Lfunc_end014,398 + +externals/binaryen/test/torture-s/20040917-1.c.s,293 +not_inlinable: # @not_inlinablenot_inlinable7,247 +.Lfunc_end0:Lfunc_end014,504 +main: # @mainmain21,651 +.LBB1_2: # %if.thenLBB1_237,1131 +.Lfunc_end1:Lfunc_end142,1273 +test_var:test_var48,1409 + +externals/binaryen/test/torture-s/packed-1.c.s,269 +f: # @ff7,197 +.LBB0_2: # %if.thenLBB0_222,628 +.Lfunc_end0:Lfunc_end027,770 +main: # @mainmain34,893 +.Lfunc_end1:Lfunc_end142,1109 +x1:x150,1267 +t:t59,1431 + +externals/binaryen/test/torture-s/pr59747.c.s,365 +fn1: # @fn1fn17,204 +.Lfunc_end0:Lfunc_end018,539 +main: # @mainmain25,666 +.LBB1_2: # %if.endLBB1_245,1242 +.LBB1_4: # %if.then4LBB1_466,1886 +.Lfunc_end1:Lfunc_end171,2029 +c:c79,2183 +a:a88,2344 +e:e97,2478 +d:d106,2639 + +externals/binaryen/test/torture-s/pr23941.c.s,167 +main: # @mainmain7,208 +.LBB0_2: # %if.thenLBB0_219,575 +.Lfunc_end0:Lfunc_end024,717 +d:d32,871 + +externals/binaryen/test/torture-s/950906-1.c.s,261 +g: # @gg7,197 +.Lfunc_end0:Lfunc_end015,435 +f: # @ff22,546 +.Lfunc_end1:Lfunc_end130,784 +main: # @mainmain37,907 +.Lfunc_end2:Lfunc_end244,1094 + +externals/binaryen/test/torture-s/991202-3.c.s,348 +f: # @ff7,197 +.Lfunc_end0:Lfunc_end017,511 +g: # @gg24,622 +.Lfunc_end1:Lfunc_end132,874 +h: # @hh39,985 +.Lfunc_end2:Lfunc_end247,1237 +main: # @mainmain54,1360 +.Lfunc_end3:Lfunc_end361,1548 + +externals/binaryen/test/torture-s/pr47237.c.s,245 +main: # @mainmain7,208 +.Lfunc_end0:Lfunc_end017,588 +foo: # @foofoo22,688 +.LBB1_2: # %if.thenLBB1_231,964 +.Lfunc_end1:Lfunc_end136,1106 + +externals/binaryen/test/torture-s/20030910-1.c.s,90 +main: # @mainmain7,211 +.Lfunc_end0:Lfunc_end014,398 + +externals/binaryen/test/torture-s/20111208-1.c.s,1018 +pack_unpack: # @pack_unpackpack_unpack7,244 +.LBB0_1: # %while.bodyLBB0_118,592 +.LBB0_4: # %while.condLBB0_443,1516 +.LBB0_5: # %sw.bb7LBB0_549,1803 +.LBB0_6: # %while.endLBB0_660,2225 +.Lfunc_end0:Lfunc_end066,2437 +do_something: # @do_somethingdo_something71,2569 +.Lfunc_end1:Lfunc_end178,2805 +main: # @mainmain85,2950 +.LBB2_1: # %while.body.iLBB2_196,3289 +.LBB2_3: # %while.body.iLBB2_3117,4021 +.LBB2_4: # %while.cond.iLBB2_4124,4315 +.LBB2_5: # %sw.bb4.iLBB2_5131,4640 +.LBB2_6: # %pack_unpack.exitLBB2_6143,5104 +.LBB2_8: # %if.thenLBB2_8152,5390 +.Lfunc_end2:Lfunc_end2157,5532 +a:a176,5910 + +externals/binaryen/test/torture-s/20081112-1.c.s,90 +main: # @mainmain7,211 +.Lfunc_end0:Lfunc_end013,422 + +externals/binaryen/test/torture-s/pr36343.c.s,469 +bar: # @barbar7,204 +.Lfunc_end0:Lfunc_end014,431 +foo: # @foofoo21,554 +.LBB1_2: # %if.end3LBB1_253,1507 +.LBB1_3: # %cleanupLBB1_356,1622 +.Lfunc_end1:Lfunc_end165,1937 +main: # @mainmain72,2064 +.LBB2_2: # %if.thenLBB2_284,2439 +.Lfunc_end2:Lfunc_end289,2581 + +externals/binaryen/test/torture-s/20040705-2.c.s,17716 +ret1: # @ret1ret17,211 +.Lfunc_end0:Lfunc_end016,505 +ret2: # @ret2ret223,634 +.Lfunc_end1:Lfunc_end134,985 +ret3: # @ret3ret341,1114 +.Lfunc_end2:Lfunc_end250,1409 +ret4: # @ret4ret457,1538 +.Lfunc_end3:Lfunc_end366,1832 +ret5: # @ret5ret573,1961 +.Lfunc_end4:Lfunc_end484,2309 +ret6: # @ret6ret691,2438 +.Lfunc_end5:Lfunc_end5100,2732 +ret7: # @ret7ret7107,2861 +.Lfunc_end6:Lfunc_end6114,3104 +ret8: # @ret8ret8121,3233 +.Lfunc_end7:Lfunc_end7128,3477 +ret9: # @ret9ret9135,3606 +.Lfunc_end8:Lfunc_end8142,3850 +fn1_1: # @fn1_1fn1_1149,3983 +.Lfunc_end9:Lfunc_end9166,4479 +fn2_1: # @fn2_1fn2_1173,4614 +.Lfunc_end10:Lfunc_end10192,5176 +fn3_1: # @fn3_1fn3_1199,5313 +.Lfunc_end11:Lfunc_end11211,5679 +fn4_1: # @fn4_1fn4_1218,5816 +.Lfunc_end12:Lfunc_end12235,6312 +fn5_1: # @fn5_1fn5_1242,6449 +.Lfunc_end13:Lfunc_end13261,7003 +fn6_1: # @fn6_1fn6_1268,7140 +.Lfunc_end14:Lfunc_end14280,7505 +fn7_1: # @fn7_1fn7_1287,7642 +.Lfunc_end15:Lfunc_end15297,7955 +fn8_1: # @fn8_1fn8_1304,8092 +.Lfunc_end16:Lfunc_end16318,8517 +fn9_1: # @fn9_1fn9_1325,8654 +.Lfunc_end17:Lfunc_end17337,9020 +fn1_2: # @fn1_2fn1_2344,9157 +.Lfunc_end18:Lfunc_end18362,9680 +fn2_2: # @fn2_2fn2_2369,9817 +.Lfunc_end19:Lfunc_end19387,10349 +fn3_2: # @fn3_2fn3_2394,10486 +.Lfunc_end20:Lfunc_end20405,10827 +fn4_2: # @fn4_2fn4_2412,10964 +.Lfunc_end21:Lfunc_end21430,11487 +fn5_2: # @fn5_2fn5_2437,11624 +.Lfunc_end22:Lfunc_end22448,11961 +fn6_2: # @fn6_2fn6_2455,12098 +.Lfunc_end23:Lfunc_end23466,12435 +fn7_2: # @fn7_2fn7_2473,12572 +.Lfunc_end24:Lfunc_end24484,12910 +fn8_2: # @fn8_2fn8_2491,13047 +.Lfunc_end25:Lfunc_end25504,13446 +fn9_2: # @fn9_2fn9_2511,13583 +.Lfunc_end26:Lfunc_end26522,13926 +fn1_3: # @fn1_3fn1_3529,14063 +.Lfunc_end27:Lfunc_end27547,14586 +fn2_3: # @fn2_3fn2_3554,14723 +.Lfunc_end28:Lfunc_end28572,15255 +fn3_3: # @fn3_3fn3_3579,15392 +.Lfunc_end29:Lfunc_end29590,15733 +fn4_3: # @fn4_3fn4_3597,15870 +.Lfunc_end30:Lfunc_end30615,16393 +fn5_3: # @fn5_3fn5_3622,16530 +.Lfunc_end31:Lfunc_end31633,16867 +fn6_3: # @fn6_3fn6_3640,17004 +.Lfunc_end32:Lfunc_end32651,17341 +fn7_3: # @fn7_3fn7_3658,17478 +.Lfunc_end33:Lfunc_end33669,17816 +fn8_3: # @fn8_3fn8_3676,17953 +.Lfunc_end34:Lfunc_end34689,18352 +fn9_3: # @fn9_3fn9_3696,18489 +.Lfunc_end35:Lfunc_end35707,18832 +fn1_4: # @fn1_4fn1_4714,18969 +.Lfunc_end36:Lfunc_end36731,19465 +fn2_4: # @fn2_4fn2_4738,19602 +.Lfunc_end37:Lfunc_end37757,20164 +fn3_4: # @fn3_4fn3_4764,20301 +.Lfunc_end38:Lfunc_end38783,20864 +fn4_4: # @fn4_4fn4_4790,21001 +.Lfunc_end39:Lfunc_end39807,21497 +fn5_4: # @fn5_4fn5_4814,21634 +.Lfunc_end40:Lfunc_end40833,22188 +fn6_4: # @fn6_4fn6_4840,22325 +.Lfunc_end41:Lfunc_end41859,22879 +fn7_4: # @fn7_4fn7_4866,23016 +.Lfunc_end42:Lfunc_end42876,23329 +fn8_4: # @fn8_4fn8_4883,23466 +.Lfunc_end43:Lfunc_end43897,23891 +fn9_4: # @fn9_4fn9_4904,24028 +.Lfunc_end44:Lfunc_end44918,24453 +fn1_5: # @fn1_5fn1_5925,24590 +.Lfunc_end45:Lfunc_end45943,25114 +fn2_5: # @fn2_5fn2_5950,25251 +.Lfunc_end46:Lfunc_end46968,25787 +fn3_5: # @fn3_5fn3_5975,25924 +.Lfunc_end47:Lfunc_end47986,26266 +fn4_5: # @fn4_5fn4_5993,26403 +.Lfunc_end48:Lfunc_end481011,26927 +fn5_5: # @fn5_5fn5_51018,27064 +.Lfunc_end49:Lfunc_end491029,27401 +fn6_5: # @fn6_5fn6_51036,27538 +.Lfunc_end50:Lfunc_end501047,27876 +fn7_5: # @fn7_5fn7_51054,28013 +.Lfunc_end51:Lfunc_end511065,28355 +fn8_5: # @fn8_5fn8_51072,28492 +.Lfunc_end52:Lfunc_end521085,28894 +fn9_5: # @fn9_5fn9_51092,29031 +.Lfunc_end53:Lfunc_end531103,29375 +fn1_6: # @fn1_6fn1_61110,29512 +.Lfunc_end54:Lfunc_end541128,30036 +fn2_6: # @fn2_6fn2_61135,30173 +.Lfunc_end55:Lfunc_end551153,30709 +fn3_6: # @fn3_6fn3_61160,30846 +.Lfunc_end56:Lfunc_end561171,31188 +fn4_6: # @fn4_6fn4_61178,31325 +.Lfunc_end57:Lfunc_end571196,31849 +fn5_6: # @fn5_6fn5_61203,31986 +.Lfunc_end58:Lfunc_end581214,32323 +fn6_6: # @fn6_6fn6_61221,32460 +.Lfunc_end59:Lfunc_end591232,32798 +fn7_6: # @fn7_6fn7_61239,32935 +.Lfunc_end60:Lfunc_end601250,33277 +fn8_6: # @fn8_6fn8_61257,33414 +.Lfunc_end61:Lfunc_end611270,33816 +fn9_6: # @fn9_6fn9_61277,33953 +.Lfunc_end62:Lfunc_end621288,34297 +fn1_7: # @fn1_7fn1_71295,34434 +.Lfunc_end63:Lfunc_end631307,34801 +fn2_7: # @fn2_7fn2_71314,34938 +.Lfunc_end64:Lfunc_end641328,35363 +fn3_7: # @fn3_7fn3_71335,35500 +.Lfunc_end65:Lfunc_end651349,35925 +fn4_7: # @fn4_7fn4_71356,36062 +.Lfunc_end66:Lfunc_end661368,36429 +fn5_7: # @fn5_7fn5_71375,36566 +.Lfunc_end67:Lfunc_end671389,36987 +fn6_7: # @fn6_7fn6_71396,37124 +.Lfunc_end68:Lfunc_end681410,37544 +fn7_7: # @fn7_7fn7_71417,37681 +.Lfunc_end69:Lfunc_end691429,38051 +fn8_7: # @fn8_7fn8_71436,38188 +.Lfunc_end70:Lfunc_end701450,38616 +fn9_7: # @fn9_7fn9_71457,38753 +.Lfunc_end71:Lfunc_end711471,39180 +fn1_8: # @fn1_8fn1_81478,39317 +.Lfunc_end72:Lfunc_end721490,39683 +fn2_8: # @fn2_8fn2_81497,39820 +.Lfunc_end73:Lfunc_end731511,40244 +fn3_8: # @fn3_8fn3_81518,40381 +.Lfunc_end74:Lfunc_end741537,40944 +fn4_8: # @fn4_8fn4_81544,41081 +.Lfunc_end75:Lfunc_end751556,41447 +fn5_8: # @fn5_8fn5_81563,41584 +.Lfunc_end76:Lfunc_end761577,42004 +fn6_8: # @fn6_8fn6_81584,42141 +.Lfunc_end77:Lfunc_end771603,42695 +fn7_8: # @fn7_8fn7_81610,42832 +.Lfunc_end78:Lfunc_end781622,43201 +fn8_8: # @fn8_8fn8_81629,43338 +.Lfunc_end79:Lfunc_end791643,43765 +fn9_8: # @fn9_8fn9_81650,43902 +.Lfunc_end80:Lfunc_end801664,44327 +fn1_9: # @fn1_9fn1_91671,44464 +.Lfunc_end81:Lfunc_end811683,44830 +fn2_9: # @fn2_9fn2_91690,44967 +.Lfunc_end82:Lfunc_end821704,45391 +fn3_9: # @fn3_9fn3_91711,45528 +.Lfunc_end83:Lfunc_end831730,46091 +fn4_9: # @fn4_9fn4_91737,46228 +.Lfunc_end84:Lfunc_end841749,46594 +fn5_9: # @fn5_9fn5_91756,46731 +.Lfunc_end85:Lfunc_end851770,47151 +fn6_9: # @fn6_9fn6_91777,47288 +.Lfunc_end86:Lfunc_end861796,47842 +fn7_9: # @fn7_9fn7_91803,47979 +.Lfunc_end87:Lfunc_end871815,48348 +fn8_9: # @fn8_9fn8_91822,48485 +.Lfunc_end88:Lfunc_end881836,48912 +fn9_9: # @fn9_9fn9_91843,49049 +.Lfunc_end89:Lfunc_end891857,49474 +fn1_a: # @fn1_afn1_a1864,49611 +.Lfunc_end90:Lfunc_end901881,50108 +fn2_a: # @fn2_afn2_a1888,50245 +.Lfunc_end91:Lfunc_end911909,50865 +fn3_a: # @fn3_afn3_a1916,51002 +.Lfunc_end92:Lfunc_end921935,51562 +fn4_a: # @fn4_afn4_a1942,51699 +.Lfunc_end93:Lfunc_end931959,52196 +fn5_a: # @fn5_afn5_a1966,52333 +.Lfunc_end94:Lfunc_end941987,52946 +fn6_a: # @fn6_afn6_a1994,53083 +.Lfunc_end95:Lfunc_end952013,53637 +fn7_a: # @fn7_afn7_a2020,53774 +.Lfunc_end96:Lfunc_end962030,54092 +fn8_a: # @fn8_afn8_a2037,54229 +.Lfunc_end97:Lfunc_end972047,54549 +fn9_a: # @fn9_afn9_a2054,54686 +.Lfunc_end98:Lfunc_end982064,55006 +fn1_b: # @fn1_bfn1_b2071,55143 +.Lfunc_end99:Lfunc_end992088,55640 +fn2_b: # @fn2_bfn2_b2095,55777 +.Lfunc_end100:Lfunc_end1002116,56397 +fn3_b: # @fn3_bfn3_b2123,56536 +.Lfunc_end101:Lfunc_end1012142,57096 +fn4_b: # @fn4_bfn4_b2149,57235 +.Lfunc_end102:Lfunc_end1022166,57732 +fn5_b: # @fn5_bfn5_b2173,57871 +.Lfunc_end103:Lfunc_end1032194,58484 +fn6_b: # @fn6_bfn6_b2201,58623 +.Lfunc_end104:Lfunc_end1042220,59177 +fn7_b: # @fn7_bfn7_b2227,59316 +.Lfunc_end105:Lfunc_end1052237,59634 +fn8_b: # @fn8_bfn8_b2244,59773 +.Lfunc_end106:Lfunc_end1062254,60093 +fn9_b: # @fn9_bfn9_b2261,60232 +.Lfunc_end107:Lfunc_end1072271,60552 +fn1_c: # @fn1_cfn1_c2278,60691 +.Lfunc_end108:Lfunc_end1082296,61214 +fn2_c: # @fn2_cfn2_c2303,61353 +.Lfunc_end109:Lfunc_end1092321,61886 +fn3_c: # @fn3_cfn3_c2328,62025 +.Lfunc_end110:Lfunc_end1102339,62366 +fn4_c: # @fn4_cfn4_c2346,62505 +.Lfunc_end111:Lfunc_end1112364,63028 +fn5_c: # @fn5_cfn5_c2371,63167 +.Lfunc_end112:Lfunc_end1122382,63504 +fn6_c: # @fn6_cfn6_c2389,63643 +.Lfunc_end113:Lfunc_end1132400,63981 +fn7_c: # @fn7_cfn7_c2407,64120 +.Lfunc_end114:Lfunc_end1142418,64458 +fn8_c: # @fn8_cfn8_c2425,64597 +.Lfunc_end115:Lfunc_end1152438,64997 +fn9_c: # @fn9_cfn9_c2445,65136 +.Lfunc_end116:Lfunc_end1162456,65479 +fn1_d: # @fn1_dfn1_d2463,65618 +.Lfunc_end117:Lfunc_end1172481,66142 +fn2_d: # @fn2_dfn2_d2488,66281 +.Lfunc_end118:Lfunc_end1182506,66817 +fn3_d: # @fn3_dfn3_d2513,66956 +.Lfunc_end119:Lfunc_end1192524,67298 +fn4_d: # @fn4_dfn4_d2531,67437 +.Lfunc_end120:Lfunc_end1202549,67961 +fn5_d: # @fn5_dfn5_d2556,68100 +.Lfunc_end121:Lfunc_end1212567,68437 +fn6_d: # @fn6_dfn6_d2574,68576 +.Lfunc_end122:Lfunc_end1222585,68915 +fn7_d: # @fn7_dfn7_d2592,69054 +.Lfunc_end123:Lfunc_end1232603,69396 +fn8_d: # @fn8_dfn8_d2610,69535 +.Lfunc_end124:Lfunc_end1242623,69937 +fn9_d: # @fn9_dfn9_d2630,70076 +.Lfunc_end125:Lfunc_end1252641,70421 +fn1_e: # @fn1_efn1_e2648,70560 +.Lfunc_end126:Lfunc_end1262659,70898 +fn2_e: # @fn2_efn2_e2666,71037 +.Lfunc_end127:Lfunc_end1272677,71379 +fn3_e: # @fn3_efn3_e2684,71518 +.Lfunc_end128:Lfunc_end1282695,71860 +fn4_e: # @fn4_efn4_e2702,71999 +.Lfunc_end129:Lfunc_end1292713,72337 +fn5_e: # @fn5_efn5_e2720,72476 +.Lfunc_end130:Lfunc_end1302725,72659 +fn6_e: # @fn6_efn6_e2732,72798 +.Lfunc_end131:Lfunc_end1312743,73137 +fn7_e: # @fn7_efn7_e2750,73276 +.Lfunc_end132:Lfunc_end1322761,73617 +fn8_e: # @fn8_efn8_e2768,73756 +.Lfunc_end133:Lfunc_end1332779,74100 +fn9_e: # @fn9_efn9_e2786,74239 +.Lfunc_end134:Lfunc_end1342797,74583 +fn1_f: # @fn1_ffn1_f2804,74722 +.Lfunc_end135:Lfunc_end1352815,75059 +fn2_f: # @fn2_ffn2_f2822,75198 +.Lfunc_end136:Lfunc_end1362833,75537 +fn3_f: # @fn3_ffn3_f2840,75676 +.Lfunc_end137:Lfunc_end1372851,76018 +fn4_f: # @fn4_ffn4_f2858,76157 +.Lfunc_end138:Lfunc_end1382869,76494 +fn5_f: # @fn5_ffn5_f2876,76633 +.Lfunc_end139:Lfunc_end1392887,76970 +fn6_f: # @fn6_ffn6_f2894,77109 +.Lfunc_end140:Lfunc_end1402905,77448 +fn7_f: # @fn7_ffn7_f2912,77587 +.Lfunc_end141:Lfunc_end1412923,77924 +fn8_f: # @fn8_ffn8_f2930,78063 +.Lfunc_end142:Lfunc_end1422941,78405 +fn9_f: # @fn9_ffn9_f2948,78544 +.Lfunc_end143:Lfunc_end1432959,78888 +fn1_g: # @fn1_gfn1_g2966,79027 +.Lfunc_end144:Lfunc_end1442977,79364 +fn2_g: # @fn2_gfn2_g2984,79503 +.Lfunc_end145:Lfunc_end1452995,79842 +fn3_g: # @fn3_gfn3_g3002,79981 +.Lfunc_end146:Lfunc_end1463013,80323 +fn4_g: # @fn4_gfn4_g3020,80462 +.Lfunc_end147:Lfunc_end1473031,80798 +fn5_g: # @fn5_gfn5_g3038,80937 +.Lfunc_end148:Lfunc_end1483049,81274 +fn6_g: # @fn6_gfn6_g3056,81413 +.Lfunc_end149:Lfunc_end1493067,81752 +fn7_g: # @fn7_gfn7_g3074,81891 +.Lfunc_end150:Lfunc_end1503085,82228 +fn8_g: # @fn8_gfn8_g3092,82367 +.Lfunc_end151:Lfunc_end1513103,82709 +fn9_g: # @fn9_gfn9_g3110,82848 +.Lfunc_end152:Lfunc_end1523121,83192 +fn1_h: # @fn1_hfn1_h3128,83331 +.Lfunc_end153:Lfunc_end1533146,83856 +fn2_h: # @fn2_hfn2_h3153,83995 +.Lfunc_end154:Lfunc_end1543175,84643 +fn3_h: # @fn3_hfn3_h3182,84782 +.Lfunc_end155:Lfunc_end1553200,85315 +fn4_h: # @fn4_hfn4_h3207,85454 +.Lfunc_end156:Lfunc_end1563225,85979 +fn5_h: # @fn5_hfn5_h3232,86118 +.Lfunc_end157:Lfunc_end1573243,86456 +fn6_h: # @fn6_hfn6_h3250,86595 +.Lfunc_end158:Lfunc_end1583268,87120 +fn7_h: # @fn7_hfn7_h3275,87259 +.Lfunc_end159:Lfunc_end1593286,87603 +fn8_h: # @fn8_hfn8_h3293,87742 +.Lfunc_end160:Lfunc_end1603304,88088 +fn9_h: # @fn9_hfn9_h3311,88227 +.Lfunc_end161:Lfunc_end1613322,88575 +fn1_i: # @fn1_ifn1_i3329,88714 +.Lfunc_end162:Lfunc_end1623347,89239 +fn2_i: # @fn2_ifn2_i3354,89378 +.Lfunc_end163:Lfunc_end1633376,90026 +fn3_i: # @fn3_ifn3_i3383,90165 +.Lfunc_end164:Lfunc_end1643403,90753 +fn4_i: # @fn4_ifn4_i3410,90892 +.Lfunc_end165:Lfunc_end1653428,91417 +fn5_i: # @fn5_ifn5_i3435,91556 +.Lfunc_end166:Lfunc_end1663457,92197 +fn6_i: # @fn6_ifn6_i3464,92336 +.Lfunc_end167:Lfunc_end1673484,92918 +fn7_i: # @fn7_ifn7_i3491,93057 +.Lfunc_end168:Lfunc_end1683502,93401 +fn8_i: # @fn8_ifn8_i3509,93540 +.Lfunc_end169:Lfunc_end1693520,93886 +fn9_i: # @fn9_ifn9_i3527,94025 +.Lfunc_end170:Lfunc_end1703538,94371 +main: # @mainmain3545,94506 +.Lfunc_end171:Lfunc_end1713560,94960 +b:b3568,95115 +c:c3577,95249 +d:d3586,95383 + +externals/binaryen/test/torture-s/pr57568.c.s,259 +main: # @mainmain7,208 +.LBB0_2: # %if.endLBB0_227,798 +.LBB0_3: # %if.thenLBB0_331,929 +.Lfunc_end0:Lfunc_end036,1071 +a:a44,1222 +b:b53,1361 +c:c62,1525 + +externals/binaryen/test/torture-s/20010221-1.c.s,237 +main: # @mainmain7,211 +.LBB0_2: # %for.bodyLBB0_221,637 +.LBB0_5: # %if.then4LBB0_539,1263 +.Lfunc_end0:Lfunc_end044,1406 +n:n52,1560 + +externals/binaryen/test/torture-s/20041113-1.c.s,267 +test: # @testtest7,211 +.LBB0_5: # %if.then15LBB0_560,1866 +.Lfunc_end0:Lfunc_end065,2010 +main: # @mainmain72,2139 +.Lfunc_end1:Lfunc_end1101,2919 +a:a109,3073 + +externals/binaryen/test/torture-s/pr34971.c.s,263 +test1: # @test1test17,212 +.LBB0_2: # %if.thenLBB0_226,770 +.Lfunc_end0:Lfunc_end031,912 +main: # @mainmain38,1043 +.Lfunc_end1:Lfunc_end152,1435 +x:x60,1586 + +externals/binaryen/test/torture-s/va-arg-16.c.s,269 +vafunction: # @vafunctionvafunction7,234 +.LBB0_12: # %if.then46LBB0_12119,3926 +.Lfunc_end0:Lfunc_end0124,4070 +main: # @mainmain131,4211 +.Lfunc_end1:Lfunc_end1181,5737 + +externals/binaryen/test/torture-s/980716-1.c.s,322 +stub: # @stubstub7,209 +.LBB0_1: # %while.condLBB0_118,549 +.LBB0_3: # %while.cond.1LBB0_331,992 +.Lfunc_end0:Lfunc_end045,1490 +main: # @mainmain52,1619 +.Lfunc_end1:Lfunc_end176,2271 + +externals/binaryen/test/torture-s/921204-1.c.s,175 +f: # @ff7,197 +.Lfunc_end0:Lfunc_end022,671 +main: # @mainmain29,794 +.Lfunc_end1:Lfunc_end136,982 + +externals/binaryen/test/torture-s/loop-7.c.s,381 +foo: # @foofoo7,203 +.LBB0_1: # %for.bodyLBB0_113,369 +.LBB0_3: # %for.endLBB0_332,1062 +.LBB0_5: # %if.then4LBB0_541,1334 +.Lfunc_end0:Lfunc_end046,1477 +main: # @mainmain53,1604 +.Lfunc_end1:Lfunc_end162,1844 + +externals/binaryen/test/torture-s/20020402-3.c.s,534 +blockvector_for_pc_sect: # @blockvector_for_pc_sectblockvector_for_pc_sect7,292 +.LBB0_2: # %while.bodyLBB0_225,847 +.LBB0_4: # %while.body10.preheaderLBB0_457,1904 +.LBB0_5: # %while.body10LBB0_566,2200 +.LBB0_8: # %cleanupLBB0_888,2939 +.LBB0_9:LBB0_991,3046 +.Lfunc_end0:Lfunc_end096,3200 +main: # @mainmain103,3367 +.Lfunc_end1:Lfunc_end1109,3578 + +externals/binaryen/test/torture-s/loop-12.c.s,610 +foo: # @foofoo7,204 +.LBB0_1: # %while.condLBB0_112,365 +.LBB0_3: # %while.bodyLBB0_335,1209 +.LBB0_4: # %while.endLBB0_444,1559 +.Lfunc_end0:Lfunc_end049,1736 +main: # @mainmain56,1863 +.LBB1_1: # %while.cond.iLBB1_161,2016 +.LBB1_3: # %while.body.iLBB1_386,2910 +.LBB1_4: # %foo.exitLBB1_492,3174 +.Lfunc_end1:Lfunc_end198,3379 +p:p106,3530 + +externals/binaryen/test/torture-s/pr20100-1.c.s,548 +frob: # @frobfrob7,210 +.Lfunc_end0:Lfunc_end030,893 +get_n: # @get_nget_n37,1026 +.LBB1_2: # %while.bodyLBB1_257,1640 +.LBB1_4: # %while.cond.while.end_crit_edgeLBB1_483,2560 +.LBB1_5: # %while.endLBB1_588,2735 +.Lfunc_end1:Lfunc_end194,2968 +main: # @mainmain101,3099 +.Lfunc_end2:Lfunc_end2117,3505 +g:g123,3627 +p:p130,3759 +e:e138,3908 + +externals/binaryen/test/torture-s/931004-7.c.s,246 +f: # @ff7,197 +.LBB0_5: # %if.then18LBB0_535,1136 +.Lfunc_end0:Lfunc_end040,1280 +main: # @mainmain47,1403 +.Lfunc_end1:Lfunc_end154,1590 + +externals/binaryen/test/torture-s/20041212-1.c.s,175 +f: # @ff7,199 +.Lfunc_end0:Lfunc_end013,416 +main: # @mainmain20,539 +.Lfunc_end1:Lfunc_end127,726 + +externals/binaryen/test/torture-s/20140326-1.c.s,102 +main: # @mainmain7,211 +.Lfunc_end0:Lfunc_end013,422 +a:a21,573 + +externals/binaryen/test/torture-s/20000801-4.c.s,193 +foo: # @foofoo7,207 +.Lfunc_end0:Lfunc_end013,417 +main: # @mainmain20,544 +.Lfunc_end1:Lfunc_end139,1059 +t:t47,1210 + +externals/binaryen/test/torture-s/20090113-2.c.s,2672 +main: # @mainmain7,216 +.Lfunc_end0:Lfunc_end051,1524 +foobar: # @foobarfoobar56,1630 +.LBB1_1: # %for.condLBB1_178,2341 +.LBB1_3: # %while.body.iLBB1_397,3078 +.LBB1_4: # %while.end.iLBB1_4110,3582 +.LBB1_5: # %if.end.iLBB1_5116,3832 +.LBB1_7: # in Loop: Header=BB1_1 Depth=1LBB1_7138,4583 +.LBB1_8: # in Loop: Header=BB1_1 Depth=1LBB1_8142,4764 +.LBB1_9: # Parent Loop BB1_1 Depth=1LBB1_9145,4899 +.LBB1_10: # %if.end25.iLBB1_10171,5770 +.LBB1_12: # %while.body9.i.preheaderLBB1_12189,6415 +.LBB1_14: # %while.body9.iLBB1_14204,6971 +.LBB1_16: # %if.end17.iLBB1_16213,7389 +.LBB1_18: # %while.end21.i.loopexitLBB1_18231,8030 +.LBB1_20: # %while.end21.iLBB1_20239,8398 +.LBB1_21: # %if.then15.iLBB1_21246,8726 +.LBB1_22: # %for.endLBB1_22258,9173 +.LBB1_23: # in Loop: Header=BB1_9 Depth=2LBB1_23265,9397 +.LBB1_24: # in Loop: Header=BB1_9 Depth=2LBB1_24269,9577 +.LBB1_25: # in Loop: Header=BB1_9 Depth=2LBB1_25273,9757 +.LBB1_26: # in Loop: Header=BB1_9 Depth=2LBB1_26277,9937 +.LBB1_27: # in Loop: Header=BB1_9 Depth=2LBB1_27281,10117 +.LBB1_28: # %for.bodyLBB1_28285,10296 +.LBB1_29:LBB1_29296,10709 +.Lfunc_end1:Lfunc_end1299,10739 +bmp_iter_set_init: # @bmp_iter_set_initbmp_iter_set_init304,10871 +.LBB2_2: # %while.endLBB2_2319,11348 +.Lfunc_end2:Lfunc_end2334,11805 +catchme: # @catchmecatchme339,11939 +.LBB3_2: # %if.thenLBB3_2350,12276 +.Lfunc_end3:Lfunc_end3355,12419 +bmp_iter_next: # @bmp_iter_nextbmp_iter_next360,12545 +.Lfunc_end4:Lfunc_end4373,12950 +bmp_iter_set_tail: # @bmp_iter_set_tailbmp_iter_set_tail378,13096 +.LBB5_2: # %while.bodyLBB5_2390,13494 +.LBB5_4: # %while.endLBB5_4408,14101 +.Lfunc_end5:Lfunc_end5412,14269 +bitmap_zero_bits:bitmap_zero_bits431,14777 + +externals/binaryen/test/torture-s/921123-2.c.s,214 +f: # @ff7,197 +.Lfunc_end0:Lfunc_end018,532 +main: # @mainmain25,655 +.Lfunc_end1:Lfunc_end138,986 +b:b46,1137 +a:a55,1298 +x:x64,1459 + +externals/binaryen/test/torture-s/990127-2.c.s,412 +fpEq: # @fpEqfpEq7,209 +.LBB0_2: # %if.thenLBB0_215,466 +.Lfunc_end0:Lfunc_end020,608 +fpTest: # @fpTestfpTest27,745 +.LBB1_2: # %if.then.iLBB1_239,1139 +.Lfunc_end1:Lfunc_end144,1283 +main: # @mainmain51,1416 +.Lfunc_end2:Lfunc_end261,1712 + +externals/binaryen/test/torture-s/pr31448-2.c.s,282 +g: # @gg7,198 +.Lfunc_end0:Lfunc_end012,328 +f: # @ff19,439 +.Lfunc_end1:Lfunc_end142,1148 +main: # @mainmain49,1271 +.Lfunc_end2:Lfunc_end263,1709 +next:next71,1872 + +externals/binaryen/test/torture-s/arith-rand-ll.c.s,1604 +simple_rand: # @simple_randsimple_rand7,242 +.Lfunc_end0:Lfunc_end024,785 +random_bitstring: # @random_bitstringrandom_bitstring31,976 +.LBB1_1: # %for.condLBB1_139,1232 +.LBB1_4: # %if.endLBB1_476,2506 +.LBB1_5: # %cleanupLBB1_582,2771 +.Lfunc_end1:Lfunc_end190,3040 +main: # @mainmain97,3193 +.LBB2_1: # %for.bodyLBB2_1104,3454 +.LBB2_2: # %for.cond.iLBB2_2115,3835 +.LBB2_5: # %if.end.iLBB2_5153,5193 +.LBB2_6: # %random_bitstring.exitLBB2_6159,5462 +.LBB2_7: # %for.cond.i452LBB2_7165,5692 +.LBB2_10: # %if.end.i465LBB2_10203,7088 +.LBB2_11: # %random_bitstring.exit467LBB2_11209,7364 +.LBB2_14: # %if.end17LBB2_14229,8199 +.LBB2_18: # %if.end79LBB2_18265,9664 +.LBB2_21: # %cleanup.cont118LBB2_21293,10785 +.LBB2_27: # %cleanup301LBB2_27396,14578 +.LBB2_29: # %if.then32LBB2_29412,15145 +.LBB2_30: # %if.then111LBB2_30418,15342 +.LBB2_31: # %if.then208LBB2_31424,15540 +.LBB2_32: # %if.then299LBB2_32430,15738 +.Lfunc_end2:Lfunc_end2437,15946 + +externals/binaryen/test/torture-s/zerolen-2.c.s,90 +main: # @mainmain7,215 +.Lfunc_end0:Lfunc_end013,426 + +externals/binaryen/test/torture-s/20000717-4.c.s,187 +x: # @xx7,199 +.Lfunc_end0:Lfunc_end014,437 +main: # @mainmain21,560 +.Lfunc_end1:Lfunc_end127,771 +s:s35,922 + +externals/binaryen/test/torture-s/961017-2.c.s,155 +main: # @mainmain7,209 +.LBB0_1: # %do.condLBB0_112,352 +.Lfunc_end0:Lfunc_end025,781 + +externals/binaryen/test/torture-s/memcpy-2.c.s,811 +main: # @mainmain7,214 +.LBB0_1: # %for.cond1.preheaderLBB0_112,397 +.LBB0_2: # %for.cond4.preheaderLBB0_224,1015 +.LBB0_3: # %for.cond7.preheaderLBB0_337,1673 +.LBB0_4: # %for.body9LBB0_451,2380 +.LBB0_7: # %for.body23LBB0_787,3757 +.LBB0_10: # in Loop: Header=BB0_3 Depth=3LBB0_10110,4818 +.LBB0_11: # %for.body36.preheaderLBB0_11113,4954 +.LBB0_12: # %for.body36LBB0_12118,5173 +.LBB0_26: # %if.then60LBB0_26244,10076 +.Lfunc_end0:Lfunc_end0249,10220 +u1:u1255,10344 +u2:u2262,10453 + +externals/binaryen/test/torture-s/pr47155.c.s,114 +main: # @mainmain7,208 +.Lfunc_end0:Lfunc_end016,490 +c:c24,644 +a:a33,805 + +externals/binaryen/test/torture-s/builtin-prefetch-5.c.s,553 +arg_ptr: # @arg_ptrarg_ptr7,231 +.Lfunc_end0:Lfunc_end012,416 +arg_idx: # @arg_idxarg_idx19,563 +.Lfunc_end1:Lfunc_end124,753 +glob_ptr: # @glob_ptrglob_ptr31,904 +.Lfunc_end2:Lfunc_end235,1076 +glob_idx: # @glob_idxglob_idx42,1229 +.Lfunc_end3:Lfunc_end346,1401 +main: # @mainmain53,1538 +.Lfunc_end4:Lfunc_end476,2140 +arr:arr84,2299 +ptr:ptr93,2450 +idx:idx102,2600 +s:s111,2765 + +externals/binaryen/test/torture-s/bcp-1.c.s,2369 +bad0: # @bad0bad07,211 +.Lfunc_end0:Lfunc_end013,422 +bad1: # @bad1bad120,551 +.Lfunc_end1:Lfunc_end126,762 +bad2: # @bad2bad233,891 +.Lfunc_end2:Lfunc_end240,1116 +bad3: # @bad3bad347,1245 +.Lfunc_end3:Lfunc_end354,1470 +bad4: # @bad4bad461,1599 +.Lfunc_end4:Lfunc_end468,1824 +bad5: # @bad5bad575,1953 +.Lfunc_end5:Lfunc_end581,2164 +bad6: # @bad6bad688,2293 +.Lfunc_end6:Lfunc_end695,2518 +bad7: # @bad7bad7102,2647 +.Lfunc_end7:Lfunc_end7108,2858 +bad8: # @bad8bad8115,2987 +.Lfunc_end8:Lfunc_end8121,3198 +bad9: # @bad9bad9128,3327 +.Lfunc_end9:Lfunc_end9135,3552 +bad10: # @bad10bad10142,3685 +.Lfunc_end10:Lfunc_end10148,3897 +good0: # @good0good0155,4034 +.Lfunc_end11:Lfunc_end11161,4246 +good1: # @good1good1168,4383 +.Lfunc_end12:Lfunc_end12174,4595 +good2: # @good2good2181,4732 +.Lfunc_end13:Lfunc_end13187,4944 +opt0: # @opt0opt0194,5077 +.Lfunc_end14:Lfunc_end14200,5288 +opt1: # @opt1opt1207,5419 +.Lfunc_end15:Lfunc_end15213,5630 +opt2: # @opt2opt2220,5761 +.Lfunc_end16:Lfunc_end16226,5972 +main: # @mainmain233,6103 +.LBB17_14: # %if.then29LBB17_14317,9164 +.LBB17_15: # %if.thenLBB17_15321,9298 +.LBB17_16: # %if.then7LBB17_16325,9430 +.LBB17_17: # %if.then18LBB17_17329,9563 +.LBB17_18: # %for.cond23.2LBB17_18333,9697 +.LBB17_21: # %if.then40LBB17_21353,10406 +.LBB17_22: # %for.cond34.2LBB17_22357,10540 +.Lfunc_end17:Lfunc_end17363,10717 +bad_t0:bad_t0371,10893 +bad_t1:bad_t1385,11183 +bad_t2:bad_t2396,11406 +good_t0:good_t0406,11610 +opt_t0:opt_t0417,11838 +global:global434,12179 + +externals/binaryen/test/torture-s/20001027-1.c.s,181 +main: # @mainmain7,211 +.LBB0_2: # %if.thenLBB0_227,769 +.Lfunc_end0:Lfunc_end032,911 +x:x40,1062 +p:p49,1226 + +externals/binaryen/test/torture-s/pr54471.c.s,314 +foo: # @foofoo7,204 +.LBB0_2: # %for.bodyLBB0_224,752 +.LBB0_5: # %if.thenLBB0_565,2040 +.Lfunc_end0:Lfunc_end070,2182 +main: # @mainmain77,2309 +.Lfunc_end1:Lfunc_end199,2982 + +externals/binaryen/test/torture-s/pr40404.c.s,102 +main: # @mainmain7,208 +.Lfunc_end0:Lfunc_end019,577 +s:s27,728 + +externals/binaryen/test/torture-s/950511-1.c.s,90 +main: # @mainmain7,209 +.Lfunc_end0:Lfunc_end014,396 + +externals/binaryen/test/torture-s/struct-ini-3.c.s,112 +main: # @mainmain7,213 +.Lfunc_end0:Lfunc_end014,400 +result:result22,574 + +externals/binaryen/test/torture-s/920409-1.c.s,175 +x: # @xx7,197 +.Lfunc_end0:Lfunc_end013,405 +main: # @mainmain20,528 +.Lfunc_end1:Lfunc_end127,715 + +externals/binaryen/test/torture-s/pr57144.c.s,179 +foo: # @foofoo7,204 +.Lfunc_end0:Lfunc_end014,390 +main: # @mainmain21,517 +.Lfunc_end1:Lfunc_end128,703 + +externals/binaryen/test/torture-s/20070824-1.c.s,90 +main: # @mainmain7,211 +.Lfunc_end0:Lfunc_end013,424 + +externals/binaryen/test/torture-s/930614-2.c.s,90 +main: # @mainmain7,209 +.Lfunc_end0:Lfunc_end014,396 + +externals/binaryen/test/torture-s/multi-ix.c.s,1030 +f: # @ff7,197 +.LBB0_2: # %for.bodyLBB0_223,926 +.LBB0_3: # %for.endLBB0_31040,31900 +.Lfunc_end0:Lfunc_end01049,32206 +s: # @ss1056,32317 +.LBB1_2: # %while.bodyLBB1_21072,32811 +.LBB1_3: # %while.endLBB1_31088,33356 +.Lfunc_end1:Lfunc_end11093,33533 +z: # @zz1100,33644 +.LBB2_2: # %while.bodyLBB2_21117,34177 +.LBB2_3: # %while.endLBB2_31133,34739 +.Lfunc_end2:Lfunc_end21142,35031 +c: # @cc1149,35142 +.LBB3_1: # %while.condLBB3_11165,35619 +.LBB3_4: # %while.endLBB3_41193,36551 +.Lfunc_end3:Lfunc_end31201,36839 +main: # @mainmain1208,36962 +.Lfunc_end4:Lfunc_end41217,37199 + +externals/binaryen/test/torture-s/20030606-1.c.s,203 +foo: # @foofoo7,207 +.LBB0_2:LBB0_223,655 +.Lfunc_end0:Lfunc_end029,836 +main: # @mainmain36,963 +.Lfunc_end1:Lfunc_end143,1151 + +externals/binaryen/test/torture-s/pr24141.c.s,341 +g: # @gg7,196 +.Lfunc_end0:Lfunc_end014,432 +f: # @ff21,543 +.LBB1_3: # %cleanupLBB1_333,954 +.Lfunc_end1:Lfunc_end137,1119 +main: # @mainmain44,1242 +.Lfunc_end2:Lfunc_end253,1525 +i:i61,1676 + +externals/binaryen/test/torture-s/simd-4.c.s,106 +main: # @mainmain7,207 +.Lfunc_end0:Lfunc_end016,501 +s64:s6424,660 + +externals/binaryen/test/torture-s/20021011-1.c.s,179 +main: # @mainmain7,211 +.LBB0_18: # %if.then7LBB0_18219,7707 +.Lfunc_end0:Lfunc_end0224,7850 +buf:buf232,8009 + +externals/binaryen/test/torture-s/990827-1.c.s,181 +test: # @testtest7,209 +.Lfunc_end0:Lfunc_end022,661 +main: # @mainmain29,790 +.Lfunc_end1:Lfunc_end136,979 + +externals/binaryen/test/torture-s/fprintf-chk-1.c.s,385 +__fprintf_chk: # @__fprintf_chk__fprintf_chk7,255 +.LBB0_2: # %if.thenLBB0_234,1088 +.Lfunc_end0:Lfunc_end039,1230 +main: # @mainmain46,1377 +.LBB1_34: # %if.then115LBB1_34389,13759 +.Lfunc_end1:Lfunc_end1394,13904 +should_optimize:should_optimize402,14111 + +externals/binaryen/test/torture-s/simd-5.c.s,662 +func0: # @func0func07,211 +.Lfunc_end0:Lfunc_end014,455 +func1: # @func1func121,590 +.Lfunc_end1:Lfunc_end1107,3181 +func2: # @func2func2114,3316 +.Lfunc_end2:Lfunc_end2200,5907 +main: # @mainmain207,6038 +.LBB3_5: # %if.then11LBB3_5242,7168 +.Lfunc_end3:Lfunc_end3247,7312 +q1:q1255,7470 +q2:q2267,7754 +q3:q3279,8038 +q4:q4291,8322 +dummy:dummy303,8615 +w1:w1312,8788 +w2:w2321,8926 +w3:w3330,9064 +w4:w4339,9202 +z1:z1348,9340 +z2:z2357,9478 +z3:z3366,9616 +z4:z4375,9754 + +externals/binaryen/test/torture-s/20031012-1.c.s,159 +main: # @mainmain7,211 +.LBB0_2: # %if.then.iLBB0_237,1137 +.Lfunc_end0:Lfunc_end042,1281 + +externals/binaryen/test/torture-s/usmul.c.s,338 +foo: # @foofoo7,202 +.Lfunc_end0:Lfunc_end014,435 +bar: # @barbar21,558 +.Lfunc_end1:Lfunc_end128,791 +main: # @mainmain35,918 +.LBB2_9: # %if.then27LBB2_998,3206 +.Lfunc_end2:Lfunc_end2103,3350 + +externals/binaryen/test/torture-s/pr37882.c.s,102 +main: # @mainmain7,208 +.Lfunc_end0:Lfunc_end021,632 +s:s28,771 + +externals/binaryen/test/torture-s/pr49390.c.s,1219 +foo: # @foofoo7,209 +.LBB0_3: # %if.thenLBB0_326,798 +.Lfunc_end0:Lfunc_end031,940 +bar: # @barbar38,1063 +.Lfunc_end1:Lfunc_end149,1392 +baz: # @bazbaz56,1515 +.Lfunc_end2:Lfunc_end275,2040 +test: # @testtest82,2167 +.LBB3_3: # %if.then5LBB3_3119,3291 +.LBB3_4:LBB3_4128,3638 +.LBB3_5: # %if.end7LBB3_5133,3768 +.LBB3_6: # %if.end9LBB3_6138,3972 +.LBB3_9: # %if.then15LBB3_9170,5019 +.LBB3_10: # %if.end24LBB3_10178,5273 +.LBB3_13: # %if.end34LBB3_13200,6039 +.LBB3_16: # %if.then53LBB3_16226,6942 +.LBB3_17: # %cleanupLBB3_17230,7104 +.Lfunc_end3:Lfunc_end3238,7390 +main: # @mainmain245,7519 +.LBB4_2: # %if.thenLBB4_2269,8129 +.Lfunc_end4:Lfunc_end4274,8272 +u:u282,8423 +v:v291,8557 +a:a300,8718 +b:b309,8850 + +externals/binaryen/test/torture-s/pr48717.c.s,363 +foo: # @foofoo7,204 +.Lfunc_end0:Lfunc_end016,495 +bar: # @barbar23,618 +.Lfunc_end1:Lfunc_end138,1071 +main: # @mainmain45,1198 +.LBB2_2: # %if.thenLBB2_267,1832 +.Lfunc_end2:Lfunc_end272,1974 +v:v80,2128 +w:w89,2289 + +externals/binaryen/test/torture-s/991118-1.c.s,606 +sub: # @subsub7,205 +.Lfunc_end0:Lfunc_end016,513 +sub2: # @sub2sub223,640 +.Lfunc_end1:Lfunc_end132,945 +sub3: # @sub3sub339,1074 +.Lfunc_end2:Lfunc_end248,1383 +sub4: # @sub4sub455,1512 +.Lfunc_end3:Lfunc_end364,1817 +main: # @mainmain71,1946 +.LBB4_9: # %if.then46LBB4_9167,5189 +.Lfunc_end4:Lfunc_end4172,5333 +tmp:tmp180,5495 +tmp2:tmp2196,5941 +tmp3:tmp3212,6389 +tmp4:tmp4228,6832 + +externals/binaryen/test/torture-s/struct-ini-2.c.s,172 +main: # @mainmain7,213 +.LBB0_4: # %if.then12LBB0_436,1134 +.Lfunc_end0:Lfunc_end041,1278 +x:x49,1432 + +externals/binaryen/test/torture-s/20030313-1.c.s,266 +foo: # @foofoo7,207 +.LBB0_14: # %if.then39LBB0_1476,2712 +.Lfunc_end0:Lfunc_end081,2856 +main: # @mainmain88,2983 +.Lfunc_end1:Lfunc_end1129,4086 +x:x137,4240 + +externals/binaryen/test/torture-s/pr33779-1.c.s,179 +foo: # @foofoo7,206 +.Lfunc_end0:Lfunc_end017,531 +main: # @mainmain24,658 +.Lfunc_end1:Lfunc_end130,870 + +externals/binaryen/test/torture-s/ipa-sra-2.c.s,180 +main: # @mainmain7,210 +.Lfunc_end0:Lfunc_end023,705 +foo: # @foofoo28,805 +.Lfunc_end1:Lfunc_end141,1210 + +externals/binaryen/test/torture-s/postmod-1.c.s,617 +foo: # @foofoo7,206 +.LBB0_1: # %do.bodyLBB0_116,523 +.Lfunc_end0:Lfunc_end0365,10887 +main: # @mainmain372,11014 +.Lfunc_end1:Lfunc_end1444,13255 +counter0:counter0452,13434 +counter1:counter1461,13641 +counter2:counter2470,13848 +counter3:counter3479,14055 +counter4:counter4488,14262 +counter5:counter5497,14469 +stop:stop506,14663 +array0:array0515,14850 +array1:array1524,15014 +array2:array2533,15178 +array3:array3542,15342 +array4:array4551,15506 +array5:array5560,15670 +vol:vol569,15822 + +externals/binaryen/test/torture-s/pr49186.c.s,90 +main: # @mainmain7,208 +.Lfunc_end0:Lfunc_end013,419 + +externals/binaryen/test/torture-s/20011024-1.c.s,176 +main: # @mainmain7,211 +.LBB0_2: # %if.then1.iLBB0_229,886 +.Lfunc_end0:Lfunc_end034,1031 +buf:buf42,1190 + +externals/binaryen/test/torture-s/builtin-prefetch-4.c.s,3092 +assign_arg_ptr: # @assign_arg_ptrassign_arg_ptr7,259 +.Lfunc_end0:Lfunc_end014,494 +assign_glob_ptr: # @assign_glob_ptrassign_glob_ptr21,687 +.Lfunc_end1:Lfunc_end131,1013 +assign_arg_idx: # @assign_arg_idxassign_arg_idx38,1204 +.Lfunc_end2:Lfunc_end245,1444 +assign_glob_idx: # @assign_glob_idxassign_glob_idx52,1637 +.Lfunc_end3:Lfunc_end362,1968 +preinc_arg_ptr: # @preinc_arg_ptrpreinc_arg_ptr69,2159 +.Lfunc_end4:Lfunc_end476,2394 +preinc_glob_ptr: # @preinc_glob_ptrpreinc_glob_ptr83,2587 +.Lfunc_end5:Lfunc_end595,2966 +postinc_arg_ptr: # @postinc_arg_ptrpostinc_arg_ptr102,3161 +.Lfunc_end6:Lfunc_end6109,3397 +postinc_glob_ptr: # @postinc_glob_ptrpostinc_glob_ptr116,3596 +.Lfunc_end7:Lfunc_end7128,3976 +predec_arg_ptr: # @predec_arg_ptrpredec_arg_ptr135,4169 +.Lfunc_end8:Lfunc_end8142,4404 +predec_glob_ptr: # @predec_glob_ptrpredec_glob_ptr149,4597 +.Lfunc_end9:Lfunc_end9161,4977 +postdec_arg_ptr: # @postdec_arg_ptrpostdec_arg_ptr168,5172 +.Lfunc_end10:Lfunc_end10175,5408 +postdec_glob_ptr: # @postdec_glob_ptrpostdec_glob_ptr182,5609 +.Lfunc_end11:Lfunc_end11194,5990 +preinc_arg_idx: # @preinc_arg_idxpreinc_arg_idx201,6185 +.Lfunc_end12:Lfunc_end12208,6425 +preinc_glob_idx: # @preinc_glob_idxpreinc_glob_idx215,6620 +.Lfunc_end13:Lfunc_end13227,7009 +postinc_arg_idx: # @postinc_arg_idxpostinc_arg_idx234,7206 +.Lfunc_end14:Lfunc_end14241,7447 +postinc_glob_idx: # @postinc_glob_idxpostinc_glob_idx248,7648 +.Lfunc_end15:Lfunc_end15260,8038 +predec_arg_idx: # @predec_arg_idxpredec_arg_idx267,8233 +.Lfunc_end16:Lfunc_end16274,8473 +predec_glob_idx: # @predec_glob_idxpredec_glob_idx281,8668 +.Lfunc_end17:Lfunc_end17293,9058 +postdec_arg_idx: # @postdec_arg_idxpostdec_arg_idx300,9255 +.Lfunc_end18:Lfunc_end18307,9496 +postdec_glob_idx: # @postdec_glob_idxpostdec_glob_idx314,9697 +.Lfunc_end19:Lfunc_end19326,10088 +getptr: # @getptrgetptr333,10251 +.Lfunc_end20:Lfunc_end20347,10676 +funccall_arg_ptr: # @funccall_arg_ptrfunccall_arg_ptr354,10859 +.Lfunc_end21:Lfunc_end21369,11310 +getint: # @getintgetint376,11473 +.Lfunc_end22:Lfunc_end22390,11898 +funccall_arg_idx: # @funccall_arg_idxfunccall_arg_idx397,12081 +.Lfunc_end23:Lfunc_end23413,12566 +main: # @mainmain420,12721 +.LBB24_9: # %if.then83LBB24_9487,14931 +.Lfunc_end24:Lfunc_end24492,15075 +arr:arr500,15236 +ptr:ptr509,15387 +arrindex:arrindex518,15560 +getptrcnt:getptrcnt527,15767 +getintcnt:getintcnt536,15976 + +externals/binaryen/test/torture-s/anon-1.c.s,106 +main: # @mainmain7,207 +.Lfunc_end0:Lfunc_end017,532 +foo:foo25,691 + +externals/binaryen/test/torture-s/980612-1.c.s,339 +g: # @gg7,197 +.Lfunc_end0:Lfunc_end013,405 +h: # @hh20,516 +.Lfunc_end1:Lfunc_end126,725 +main: # @mainmain33,848 +.LBB2_2: # %if.endLBB2_250,1344 +.Lfunc_end2:Lfunc_end256,1513 +f:f63,1655 + +externals/binaryen/test/torture-s/960209-1.c.s,376 +f: # @ff7,197 +.LBB0_2: # %cleanupLBB0_225,733 +.Lfunc_end0:Lfunc_end030,929 +main: # @mainmain37,1052 +.LBB1_2: # %if.endLBB1_248,1412 +.Lfunc_end1:Lfunc_end154,1581 +yabba:yabba62,1751 +an_array:an_array70,1936 +a_ptr:a_ptr79,2098 + +externals/binaryen/test/torture-s/20030909-1.c.s,337 +test: # @testtest7,211 +.LBB0_2: # %if.thenLBB0_215,468 +.Lfunc_end0:Lfunc_end020,610 +foo: # @foofoo27,735 +.Lfunc_end1:Lfunc_end132,921 +main: # @mainmain39,1048 +.Lfunc_end2:Lfunc_end246,1235 + +externals/binaryen/test/torture-s/20010325-1.c.s,90 +main: # @mainmain7,211 +.Lfunc_end0:Lfunc_end014,398 + +externals/binaryen/test/torture-s/20000717-5.c.s,408 +bar: # @barbar7,207 +.LBB0_7: # %if.thenLBB0_740,1382 +.Lfunc_end0:Lfunc_end045,1524 +foo: # @foofoo52,1647 +.LBB1_7: # %if.then.iLBB1_785,2824 +.Lfunc_end1:Lfunc_end190,2968 +main: # @mainmain97,3095 +.Lfunc_end2:Lfunc_end2126,3940 + +externals/binaryen/test/torture-s/strct-varg-1.c.s,247 +f: # @ff7,201 +.LBB0_7: # %if.then18LBB0_769,2201 +.Lfunc_end0:Lfunc_end074,2345 +main: # @mainmain81,2468 +.Lfunc_end1:Lfunc_end1118,3499 + +externals/binaryen/test/torture-s/20040811-1.c.s,165 +main: # @mainmain7,211 +.LBB0_1: # %labLBB0_116,490 +.Lfunc_end0:Lfunc_end051,1578 +p:p59,1729 + +externals/binaryen/test/torture-s/20040707-1.c.s,179 +foo: # @foofoo7,207 +.Lfunc_end0:Lfunc_end012,388 +main: # @mainmain19,515 +.Lfunc_end1:Lfunc_end126,702 + +externals/binaryen/test/torture-s/pr38151.c.s,508 +check2848va: # @check2848vacheck2848va7,236 +.LBB0_2: # %if.endLBB0_240,1216 +.LBB0_4: # %if.then2LBB0_453,1653 +.LBB0_5: # %if.end4LBB0_561,1919 +.Lfunc_end0:Lfunc_end065,2084 +main: # @mainmain72,2227 +.LBB1_2: # %if.thenLBB1_2113,3448 +.Lfunc_end1:Lfunc_end1118,3590 +s2848:s2848126,3757 +fails:fails135,3915 + +externals/binaryen/test/torture-s/20090113-3.c.s,2857 +main: # @mainmain7,216 +.Lfunc_end0:Lfunc_end051,1524 +foobar: # @foobarfoobar56,1630 +.LBB1_2:LBB1_283,2444 +.LBB1_3: # =>This Inner Loop Header: Depth=1LBB1_386,2514 +.LBB1_4: # %for.incLBB1_4131,3913 +.LBB1_6: # %while.cond.preheader.iLBB1_6147,4521 +.LBB1_8: # %while.body.iLBB1_8156,4944 +.LBB1_10: # %while.cond.return.loopexit62_crit_edge.iLBB1_10169,5474 +.LBB1_11: # %if.end.iLBB1_11178,5861 +.LBB1_13: # %while.body6.iLBB1_13187,6245 +.LBB1_15: # %while.body9.i.preheaderLBB1_15196,6657 +.LBB1_17: # %while.body9.iLBB1_17207,7114 +.LBB1_19: # %if.end26.iLBB1_19216,7532 +.LBB1_21: # %while.end30.i.loopexitLBB1_21230,8083 +.LBB1_23: # %while.end30.iLBB1_23242,8571 +.LBB1_24: # %while.cond16.preheader.iLBB1_24250,8916 +.LBB1_26: # %while.body21.iLBB1_26266,9532 +.LBB1_28: # %while.cond16.return.loopexit_crit_edge.iLBB1_28279,10063 +.LBB1_29: # %for.endLBB1_29284,10333 +.LBB1_30: # in Loop: Header=BB1_3 Depth=1LBB1_30291,10557 +.LBB1_31: # in Loop: Header=BB1_3 Depth=1LBB1_31295,10738 +.LBB1_32: # in Loop: Header=BB1_3 Depth=1LBB1_32299,10919 +.LBB1_33: # in Loop: Header=BB1_3 Depth=1LBB1_33303,11099 +.LBB1_34: # in Loop: Header=BB1_3 Depth=1LBB1_34307,11279 +.LBB1_35: # in Loop: Header=BB1_3 Depth=1LBB1_35311,11459 +.LBB1_36: # in Loop: Header=BB1_3 Depth=1LBB1_36315,11639 +.LBB1_37: # in Loop: Header=BB1_3 Depth=1LBB1_37319,11818 +.LBB1_38: # in Loop: Header=BB1_3 Depth=1LBB1_38323,11998 +.LBB1_39: # in Loop: Header=BB1_3 Depth=1LBB1_39327,12177 +.LBB1_40: # in Loop: Header=BB1_3 Depth=1LBB1_40331,12356 +.LBB1_41: # in Loop: Header=BB1_3 Depth=1LBB1_41335,12535 +.LBB1_42:LBB1_42339,12715 +.Lfunc_end1:Lfunc_end1342,12745 +bmp_iter_set_init: # @bmp_iter_set_initbmp_iter_set_init347,12877 +.LBB2_2: # %while.endLBB2_2362,13354 +.Lfunc_end2:Lfunc_end2377,13811 +bitmap_zero_bits:bitmap_zero_bits396,14319 + +externals/binaryen/test/torture-s/pr57344-4.c.s,426 +foo: # @foofoo7,206 +.LBB0_2: # %if.thenLBB0_218,513 +.Lfunc_end0:Lfunc_end023,655 +main: # @mainmain30,782 +.LBB1_3: # %for.body.for.body_crit_edgeLBB1_362,1823 +.LBB1_4: # %for.endLBB1_499,3021 +.Lfunc_end1:Lfunc_end1105,3227 +s:s134,4090 +i:i143,4224 + +externals/binaryen/test/torture-s/pr33992.c.s,484 +bar: # @barbar7,204 +.LBB0_2: # %if.thenLBB0_216,476 +.Lfunc_end0:Lfunc_end021,618 +do_test: # @do_testdo_test28,757 +.LBB1_1: # %for.cond.iLBB1_135,968 +.LBB1_3: # %for.cond.i.1LBB1_358,1691 +.Lfunc_end1:Lfunc_end180,2425 +main: # @mainmain87,2560 +.Lfunc_end2:Lfunc_end2110,3269 + +externals/binaryen/test/torture-s/pr39501.c.s,1085 +float_min1: # @float_min1float_min17,232 +.Lfunc_end0:Lfunc_end015,507 +float_min2: # @float_min2float_min222,672 +.Lfunc_end1:Lfunc_end130,947 +float_max1: # @float_max1float_max137,1112 +.Lfunc_end2:Lfunc_end245,1387 +float_max2: # @float_max2float_max252,1552 +.Lfunc_end3:Lfunc_end360,1827 +double_min1: # @double_min1double_min167,1996 +.Lfunc_end4:Lfunc_end475,2272 +double_min2: # @double_min2double_min282,2443 +.Lfunc_end5:Lfunc_end590,2719 +double_max1: # @double_max1double_max197,2890 +.Lfunc_end6:Lfunc_end6105,3166 +double_max2: # @double_max2double_max2112,3337 +.Lfunc_end7:Lfunc_end7120,3613 +main: # @mainmain127,3756 +.LBB8_48: # %if.then187LBB8_48467,17154 +.LBB8_49: # %if.end188LBB8_49471,17289 +.Lfunc_end8:Lfunc_end8477,17463 + +externals/binaryen/test/torture-s/pure-1.c.s,290 +main: # @mainmain7,207 +.Lfunc_end0:Lfunc_end013,418 +func0: # @func0func020,551 +.Lfunc_end1:Lfunc_end129,834 +func1: # @func1func136,969 +.Lfunc_end2:Lfunc_end243,1195 +i:i51,1351 + +externals/binaryen/test/torture-s/loop-13.c.s,337 +scale: # @scalescale7,212 +.LBB0_4: # %for.body.for.body_crit_edgeLBB0_436,1168 +.LBB0_5: # %if.endLBB0_556,1849 +.Lfunc_end0:Lfunc_end061,2023 +main: # @mainmain68,2154 +.Lfunc_end1:Lfunc_end174,2366 + +externals/binaryen/test/torture-s/920410-1.c.s,90 +main: # @mainmain7,209 +.Lfunc_end0:Lfunc_end014,396 + +externals/binaryen/test/torture-s/930106-1.c.s,261 +g: # @gg7,197 +.Lfunc_end0:Lfunc_end013,409 +f: # @ff20,520 +.Lfunc_end1:Lfunc_end126,728 +main: # @mainmain33,851 +.Lfunc_end2:Lfunc_end240,1038 + +externals/binaryen/test/torture-s/pr15262-1.c.s,179 +foo: # @foofoo7,206 +.Lfunc_end0:Lfunc_end013,416 +main: # @mainmain20,543 +.Lfunc_end1:Lfunc_end126,754 + +externals/binaryen/test/torture-s/20020402-2.c.s,808 +InitCache: # @InitCacheInitCache7,231 +.Lfunc_end0:Lfunc_end0128,3818 +main: # @mainmain135,3957 +.Lfunc_end1:Lfunc_end1256,7545 +Local1:Local1264,7716 +Local2:Local2273,7879 +Local3:Local3282,8042 +RDbf1:RDbf1291,8201 +RDbf2:RDbf2300,8358 +RDbf3:RDbf3309,8515 +IntVc1:IntVc1318,8676 +IntVc2:IntVc2327,8839 +IntCode3:IntCode3336,9010 +IntCode4:IntCode4345,9185 +IntCode5:IntCode5354,9360 +IntCode6:IntCode6363,9535 +Lom1:Lom1372,9694 +Lom2:Lom2381,9845 +Lom3:Lom3390,9996 +Lom4:Lom4399,10147 +Lom5:Lom5408,10298 +Lom6:Lom6417,10449 +Lom7:Lom7426,10600 +Lom8:Lom8435,10751 +Lom9:Lom9444,10902 +Lom10:Lom10453,11057 +RDbf11:RDbf11462,11218 +RDbf12:RDbf12471,11381 +Workspace:Workspace480,11556 +MyPte:MyPte489,11722 + +externals/binaryen/test/torture-s/931004-6.c.s,446 +f: # @ff7,197 +.LBB0_2: # %for.bodyLBB0_231,886 +.LBB0_5: # %for.endLBB0_560,1945 +.LBB0_7: # %if.then8LBB0_773,2367 +.LBB0_8: # %if.then15LBB0_877,2500 +.Lfunc_end0:Lfunc_end082,2644 +main: # @mainmain89,2767 +.Lfunc_end1:Lfunc_end1131,3903 + +externals/binaryen/test/torture-s/mod-1.c.s,240 +f: # @ff7,194 +.LBB0_2: # %if.thenLBB0_216,468 +.Lfunc_end0:Lfunc_end021,610 +main: # @mainmain28,733 +.Lfunc_end1:Lfunc_end135,920 + +externals/binaryen/test/torture-s/loop-6.c.s,90 +main: # @mainmain7,207 +.Lfunc_end0:Lfunc_end014,396 + +externals/binaryen/test/torture-s/20100316-1.c.s,259 +foo: # @foofoo7,207 +.Lfunc_end0:Lfunc_end016,495 +main: # @mainmain23,622 +.LBB1_2: # %if.thenLBB1_244,1239 +.Lfunc_end1:Lfunc_end149,1381 +f:f57,1532 + +externals/binaryen/test/torture-s/20051110-1.c.s,371 +add_unwind_adjustsp: # @add_unwind_adjustspadd_unwind_adjustsp7,271 +.LBB0_2: # %while.bodyLBB0_221,725 +.LBB0_3: # %while.endLBB0_337,1265 +.Lfunc_end0:Lfunc_end042,1442 +main: # @mainmain49,1601 +.Lfunc_end1:Lfunc_end158,1903 +bytes:bytes65,2058 + +externals/binaryen/test/torture-s/va-arg-17.c.s,269 +vafunction: # @vafunctionvafunction7,234 +.LBB0_10: # %if.then40LBB0_10110,3571 +.Lfunc_end0:Lfunc_end0115,3715 +main: # @mainmain122,3856 +.Lfunc_end1:Lfunc_end1170,5309 + +externals/binaryen/test/torture-s/pr46316.c.s,246 +foo: # @foofoo7,204 +.Lfunc_end0:Lfunc_end025,745 +main: # @mainmain32,872 +.LBB1_2: # %if.thenLBB1_244,1244 +.Lfunc_end1:Lfunc_end149,1386 + +externals/binaryen/test/torture-s/20061101-1.c.s,473 +tar: # @tartar7,207 +.LBB0_2: # %if.thenLBB0_218,532 +.Lfunc_end0:Lfunc_end023,674 +bug: # @bugbug30,797 +.LBB1_1: # %while.condLBB1_138,1015 +.LBB1_4: # %while.endLBB1_462,1841 +.Lfunc_end1:Lfunc_end166,2008 +main: # @mainmain73,2135 +.Lfunc_end2:Lfunc_end279,2349 + +externals/binaryen/test/torture-s/920711-1.c.s,175 +f: # @ff7,197 +.Lfunc_end0:Lfunc_end015,448 +main: # @mainmain22,571 +.Lfunc_end1:Lfunc_end128,732 + +externals/binaryen/test/torture-s/20011019-1.c.s,205 +foo: # @foofoo7,207 +.Lfunc_end0:Lfunc_end018,556 +main: # @mainmain25,683 +.Lfunc_end1:Lfunc_end135,943 +y:y43,1094 +x:x52,1227 + +externals/binaryen/test/torture-s/pr19606.c.s,350 +foo: # @foofoo7,204 +.Lfunc_end0:Lfunc_end016,500 +bar: # @barbar23,623 +.Lfunc_end1:Lfunc_end132,919 +main: # @mainmain39,1046 +.LBB2_3: # %if.then6LBB2_362,1753 +.Lfunc_end2:Lfunc_end267,1896 +a:a74,2038 + +externals/binaryen/test/torture-s/990923-1.c.s,179 +foo: # @foofoo7,205 +.Lfunc_end0:Lfunc_end021,645 +main: # @mainmain28,772 +.Lfunc_end1:Lfunc_end135,960 + +externals/binaryen/test/torture-s/20030403-1.c.s,90 +main: # @mainmain7,211 +.Lfunc_end0:Lfunc_end013,422 + +externals/binaryen/test/torture-s/941202-1.c.s,240 +g: # @gg7,197 +.LBB0_2: # %if.thenLBB0_217,495 +.Lfunc_end0:Lfunc_end022,637 +main: # @mainmain29,760 +.Lfunc_end1:Lfunc_end136,947 + +externals/binaryen/test/torture-s/950714-1.c.s,323 +main: # @mainmain7,209 +.LBB0_1: # %for.cond1.preheaderLBB0_130,887 +.LBB0_11: # %labelLBB0_1178,3192 +.LBB0_13: # %if.then8LBB0_1388,3513 +.Lfunc_end0:Lfunc_end093,3656 +array:array101,3826 + +externals/binaryen/test/torture-s/20000412-1.c.s,286 +foo: # @foofoo7,207 +.Lfunc_end0:Lfunc_end018,568 +main: # @mainmain25,695 +.LBB1_2: # %if.thenLBB1_238,1091 +.Lfunc_end1:Lfunc_end143,1233 +i:i51,1387 +wordlist:wordlist60,1583 + +externals/binaryen/test/torture-s/991202-2.c.s,177 +f1: # @f1f17,201 +.Lfunc_end0:Lfunc_end013,410 +main: # @mainmain20,535 +.Lfunc_end1:Lfunc_end127,722 + +externals/binaryen/test/torture-s/20030626-1.c.s,106 +main: # @mainmain7,211 +.Lfunc_end0:Lfunc_end016,501 +buf:buf24,660 + +externals/binaryen/test/torture-s/pr37931.c.s,179 +foo: # @foofoo7,204 +.Lfunc_end0:Lfunc_end016,491 +main: # @mainmain23,618 +.Lfunc_end1:Lfunc_end129,832 + +externals/binaryen/test/torture-s/920429-1.c.s,202 +f: # @ff7,197 +.Lfunc_end0:Lfunc_end030,841 +main: # @mainmain37,964 +.Lfunc_end1:Lfunc_end150,1294 +i:i58,1445 +j:j67,1606 + +externals/binaryen/test/torture-s/930513-1.c.s,260 +f: # @ff7,202 +.Lfunc_end0:Lfunc_end031,937 +main: # @mainmain38,1060 +.LBB1_3: # %if.thenLBB1_370,2073 +.Lfunc_end1:Lfunc_end175,2215 +buf:buf82,2362 + +externals/binaryen/test/torture-s/20120105-1.c.s,203 +main: # @mainmain7,211 +.Lfunc_end0:Lfunc_end040,1187 +extract: # @extractextract45,1295 +.Lfunc_end1:Lfunc_end152,1536 +i:i60,1693 + +externals/binaryen/test/torture-s/20000412-5.c.s,90 +main: # @mainmain7,211 +.Lfunc_end0:Lfunc_end014,398 + +externals/binaryen/test/torture-s/20050604-1.c.s,280 +foo: # @foofoo7,207 +.Lfunc_end0:Lfunc_end056,1637 +main: # @mainmain63,1764 +.LBB1_8: # %if.then25LBB1_8157,4753 +.Lfunc_end1:Lfunc_end1162,4897 +u:u170,5048 +v:v179,5180 + +externals/binaryen/test/torture-s/va-arg-13.c.s,412 +dummy: # @dummydummy7,214 +.LBB0_2: # %if.thenLBB0_217,523 +.Lfunc_end0:Lfunc_end022,665 +test: # @testtest29,796 +.LBB1_3: # %if.then.i14LBB1_361,1779 +.Lfunc_end1:Lfunc_end166,1925 +main: # @mainmain73,2054 +.Lfunc_end2:Lfunc_end291,2549 + +externals/binaryen/test/torture-s/pr58662.c.s,209 +main: # @mainmain7,208 +.LBB0_2: # %if.thenLBB0_237,1055 +.Lfunc_end0:Lfunc_end042,1197 +a:a50,1348 +d:d59,1509 +c:c68,1670 +b:b77,1831 + +externals/binaryen/test/torture-s/pr48973-2.c.s,182 +main: # @mainmain7,210 +.LBB0_2: # %if.thenLBB0_230,867 +.Lfunc_end0:Lfunc_end035,1009 +v:v43,1163 +s:s52,1331 + +externals/binaryen/test/torture-s/loop-2.c.s,322 +f: # @ff7,195 +.LBB0_2: # %for.bodyLBB0_218,513 +.LBB0_3: # %for.endLBB0_331,955 +.Lfunc_end0:Lfunc_end037,1161 +main: # @mainmain44,1284 +.Lfunc_end1:Lfunc_end154,1554 +a:a62,1705 + +externals/binaryen/test/torture-s/20000801-1.c.s,384 +foo: # @foofoo7,207 +.LBB0_2: # %while.bodyLBB0_217,540 +.LBB0_3: # %while.endLBB0_342,1328 +.Lfunc_end0:Lfunc_end047,1505 +main: # @mainmain54,1632 +.LBB1_2: # %if.thenLBB1_280,2373 +.Lfunc_end1:Lfunc_end185,2515 + +externals/binaryen/test/torture-s/20091229-1.c.s,179 +foo: # @foofoo7,207 +.Lfunc_end0:Lfunc_end015,471 +main: # @mainmain22,598 +.Lfunc_end1:Lfunc_end128,772 + +externals/binaryen/test/torture-s/931004-2.c.s,444 +f: # @ff7,197 +.LBB0_2: # %for.bodyLBB0_234,959 +.LBB0_4: # %for.endLBB0_455,1693 +.LBB0_6: # %if.thenLBB0_667,2081 +.LBB0_7: # %if.then7LBB0_771,2213 +.Lfunc_end0:Lfunc_end076,2356 +main: # @mainmain83,2479 +.Lfunc_end1:Lfunc_end1104,3068 + +externals/binaryen/test/torture-s/920501-8.c.s,267 +va: # @vava7,201 +.Lfunc_end0:Lfunc_end093,2623 +main: # @mainmain100,2748 +.LBB1_2: # %if.thenLBB1_2148,4183 +.Lfunc_end1:Lfunc_end1153,4325 +buf:buf161,4484 + +externals/binaryen/test/torture-s/pr7284-1.c.s,255 +f: # @ff7,197 +.Lfunc_end0:Lfunc_end017,510 +main: # @mainmain24,633 +.LBB1_2: # %if.thenLBB1_239,1079 +.Lfunc_end1:Lfunc_end144,1221 +x:x52,1375 + +externals/binaryen/test/torture-s/921202-2.c.s,175 +f: # @ff7,197 +.Lfunc_end0:Lfunc_end018,534 +main: # @mainmain25,657 +.Lfunc_end1:Lfunc_end132,845 + +externals/binaryen/test/torture-s/20000731-2.c.s,90 +main: # @mainmain7,211 +.Lfunc_end0:Lfunc_end014,399 + +externals/binaryen/test/torture-s/20000717-1.c.s,405 +bar: # @barbar7,207 +.LBB0_3: # %if.thenLBB0_324,740 +.Lfunc_end0:Lfunc_end029,882 +foo: # @foofoo36,1005 +.LBB1_3: # %if.then.iLBB1_353,1532 +.Lfunc_end1:Lfunc_end158,1676 +main: # @mainmain65,1803 +.Lfunc_end2:Lfunc_end291,2559 + +externals/binaryen/test/torture-s/printf-chk-1.c.s,383 +__printf_chk: # @__printf_chk__printf_chk7,245 +.LBB0_2: # %if.thenLBB0_234,1067 +.Lfunc_end0:Lfunc_end039,1209 +main: # @mainmain46,1354 +.LBB1_34: # %if.then115LBB1_34386,13521 +.Lfunc_end1:Lfunc_end1391,13666 +should_optimize:should_optimize399,13873 + +externals/binaryen/test/torture-s/970217-1.c.s,179 +sub: # @subsub7,205 +.Lfunc_end0:Lfunc_end015,463 +main: # @mainmain22,590 +.Lfunc_end1:Lfunc_end129,777 + +externals/binaryen/test/torture-s/20021111-1.c.s,338 +aim_callhandler: # @aim_callhandleraim_callhandler7,255 +.LBB0_4: # %returnLBB0_431,1064 +.LBB0_5: # %if.then6LBB0_535,1195 +.Lfunc_end0:Lfunc_end040,1338 +main: # @mainmain47,1489 +.Lfunc_end1:Lfunc_end159,1835 + +externals/binaryen/test/torture-s/vla-dealloc-1.c.s,168 +main: # @mainmain7,214 +.LBB0_1: # %if.endLBB0_116,493 +.Lfunc_end0:Lfunc_end051,1584 +p:p59,1735 + +externals/binaryen/test/torture-s/stdarg-3.c.s,2260 +bar: # @barbar7,205 +.Lfunc_end0:Lfunc_end014,438 +f1: # @f1f121,557 +.LBB1_2: # %while.bodyLBB1_239,1106 +.LBB1_3: # %while.endLBB1_356,1670 +.Lfunc_end1:Lfunc_end161,1847 +f2: # @f2f268,1964 +.LBB2_2: # %while.bodyLBB2_286,2506 +.LBB2_4: # %while.endLBB2_4108,3228 +.Lfunc_end2:Lfunc_end2112,3395 +f3: # @f3f3119,3512 +.LBB3_2: # %while.bodyLBB3_2136,4031 +.LBB3_3: # %while.endLBB3_3153,4591 +.Lfunc_end3:Lfunc_end3158,4768 +f4: # @f4f4165,4885 +.LBB4_2: # %while.bodyLBB4_2187,5554 +.LBB4_3: # %while.endLBB4_3208,6230 +.Lfunc_end4:Lfunc_end4213,6407 +f5: # @f5f5220,6524 +.LBB5_2: # %while.bodyLBB5_2238,7078 +.LBB5_4: # %while.endLBB5_4275,8211 +.Lfunc_end5:Lfunc_end5279,8378 +f6: # @f6f6286,8495 +.LBB6_2: # %while.bodyLBB6_2304,9042 +.LBB6_4: # %while.endLBB6_4331,9903 +.Lfunc_end6:Lfunc_end6335,10071 +f7: # @f7f7342,10188 +.LBB7_2: # %while.bodyLBB7_2376,11185 +.LBB7_3: # %while.endLBB7_3415,12346 +.Lfunc_end7:Lfunc_end7420,12524 +f8: # @f8f8427,12641 +.LBB8_2: # %while.bodyLBB8_2453,13419 +.LBB8_3: # %while.endLBB8_3483,14329 +.Lfunc_end8:Lfunc_end8488,14507 +main: # @mainmain495,14632 +.LBB9_26: # %if.then62LBB9_261187,36488 +.Lfunc_end9:Lfunc_end91192,36633 +bar_arg:bar_arg1200,36808 +x:x1209,36981 +d:d1218,37142 +s1:s11227,37312 +s2:s21236,37452 +y:y1245,37588 +foo_arg:foo_arg1254,37773 +gap:gap1263,37954 + +externals/binaryen/test/torture-s/950710-1.c.s,241 +g: # @gg7,197 +.Lfunc_end0:Lfunc_end012,376 +main: # @mainmain19,499 +.LBB1_2: # %f.exitLBB1_246,1313 +.Lfunc_end1:Lfunc_end152,1482 + +externals/binaryen/test/torture-s/20011126-2.c.s,741 +main: # @mainmain7,211 +.LBB0_1: # %while.body.outer.outer.iLBB0_119,608 +.LBB0_2: # %while.body.outer.iLBB0_229,1094 +.LBB0_4: # %while.cond2.iLBB0_444,1755 +.LBB0_9: # %while.body14.while.body14_crit_edge.iLBB0_993,3637 +.LBB0_11: # in Loop: Header=BB0_1 Depth=1LBB0_11111,4335 +.LBB0_12: # %while.body.outer.loopexit.iLBB0_12114,4472 +.LBB0_13: # %while.body.iLBB0_13121,4784 +.LBB0_14: # %test.exitLBB0_14127,5049 +.Lfunc_end0:Lfunc_end0133,5255 + +externals/binaryen/test/torture-s/va-arg-pack-1.c.s,999 +foo1: # @foo1foo17,214 +.LBB0_13: # %if.then42LBB0_13139,4492 +.LBB0_14: # %sw.bb44LBB0_14143,4626 +.LBB0_18: # %sw.epilogLBB0_18187,6155 +.LBB0_19: # %sw.defaultLBB0_19194,6385 +.Lfunc_end0:Lfunc_end0199,6530 +foo2: # @foo2foo2206,6659 +.LBB1_12: # %sw.epilogLBB1_12370,12010 +.LBB1_13: # %sw.defaultLBB1_13379,12298 +.Lfunc_end1:Lfunc_end1384,12443 +foo3: # @foo3foo3391,12572 +.Lfunc_end2:Lfunc_end2397,12783 +main: # @mainmain404,12912 +.LBB3_6: # %if.then18LBB3_6607,19172 +.Lfunc_end3:Lfunc_end3612,19316 +v1:v1620,19474 +v2:v2629,19644 +v3:v3638,19814 +v4:v4646,19945 +v5:v5655,20140 +seen:seen665,20349 +cnt:cnt674,20497 + +externals/binaryen/test/torture-s/pr49419.c.s,1183 +foo: # @foofoo7,209 +.LBB0_4: # %for.bodyLBB0_435,1074 +.LBB0_6: # %for.endLBB0_656,1870 +.LBB0_9: # %for.body10LBB0_972,2402 +.LBB0_10: # %for.end16LBB0_1090,3003 +.LBB0_11:LBB0_1197,3201 +.LBB0_12: # %if.then6LBB0_12101,3294 +.Lfunc_end0:Lfunc_end0106,3437 +main: # @mainmain113,3564 +.LBB1_2: # %for.body.i.for.body.i_crit_edgeLBB1_2144,4539 +.LBB1_4: # %for.end.i.loopexitLBB1_4170,5473 +.LBB1_5: # %for.end.iLBB1_5175,5637 +.LBB1_9: # %for.body10.i.for.body10.i_crit_edgeLBB1_9205,6603 +.LBB1_10: # %foo.exitLBB1_10223,7231 +.LBB1_14: # %if.then6.iLBB1_14244,7955 +.LBB1_15: # %foo.exit.threadLBB1_15248,8091 +.LBB1_16: # %if.then5LBB1_16252,8243 +.Lfunc_end1:Lfunc_end1257,8386 +t:t265,8537 + +externals/binaryen/test/torture-s/20031211-2.c.s,244 +main: # @mainmain7,211 +.Lfunc_end0:Lfunc_end014,398 +foo: # @foofoo21,523 +.LBB1_2: # %if.thenLBB1_231,818 +.Lfunc_end1:Lfunc_end136,960 + +externals/binaryen/test/torture-s/pr42570.c.s,106 +main: # @mainmain7,208 +.Lfunc_end0:Lfunc_end013,419 +foo:foo20,566 + +externals/binaryen/test/torture-s/20120615-1.c.s,249 +test1: # @test1test17,215 +.LBB0_3: # %if.end5LBB0_323,725 +.Lfunc_end0:Lfunc_end028,867 +main: # @mainmain35,998 +.Lfunc_end1:Lfunc_end143,1264 + +externals/binaryen/test/torture-s/simd-1.c.s,319 +verify: # @verifyverify7,215 +.LBB0_5: # %if.thenLBB0_524,867 +.Lfunc_end0:Lfunc_end029,1009 +main: # @mainmain36,1142 +.Lfunc_end1:Lfunc_end1396,11902 +i:i404,12056 +j:j416,12339 +k:k428,12617 +res:res437,12759 + +externals/binaryen/test/torture-s/20050215-1.c.s,308 +main: # @mainmain7,211 +.LBB0_2: # %lor.lhs.falseLBB0_224,729 +.LBB0_3: # %if.end3LBB0_338,1168 +.LBB0_4: # %if.then2LBB0_442,1302 +.Lfunc_end0:Lfunc_end047,1445 +v:v54,1584 + +externals/binaryen/test/torture-s/20040703-1.c.s,1581 +num_lshift: # @num_lshiftnum_lshift7,235 +.LBB0_3: # %if.endLBB0_346,1317 +.LBB0_5: # %if.thenLBB0_564,1938 +.LBB0_7:LBB0_772,2264 +.LBB0_8: # %if.end18LBB0_875,2337 +.LBB0_11: # %if.else.iLBB0_1199,3134 +.LBB0_13: # %num_trim.exitLBB0_13111,3544 +.LBB0_15: # %land.rhsLBB0_15124,3994 +.LBB0_16: # %land.endLBB0_16133,4275 +.LBB0_17: # %if.else3.iLBB0_17139,4494 +.LBB0_19: # %if.else8.iLBB0_19170,5429 +.LBB0_21: # %if.end15.sink.split.iLBB0_21182,5836 +.LBB0_22: # %if.end15.iLBB0_22187,6030 +.LBB0_24: # %if.end22.iLBB0_24199,6422 +.LBB0_26: # %if.end22.if.end38_crit_edge.iLBB0_26223,7228 +.LBB0_27: # %if.end38.iLBB0_27227,7389 +.LBB0_30: # %if.else.i.iLBB0_30248,8107 +.LBB0_32: # %num_rshift.exitLBB0_32260,8521 +.LBB0_33: # %if.end37LBB0_33268,8797 +.Lfunc_end0:Lfunc_end0280,9223 +main: # @mainmain287,9364 +.LBB1_4: # %if.then5LBB1_4337,10902 +.Lfunc_end1:Lfunc_end1342,11046 +precision:precision350,11232 +n:n359,11413 +num:num368,11586 + +externals/binaryen/test/torture-s/20051215-1.c.s,403 +foo: # @foofoo7,212 +.LBB0_2: # %for.bodyLBB0_220,590 +.LBB0_4: # %if.endLBB0_430,1009 +.LBB0_6:LBB0_647,1577 +.Lfunc_end0:Lfunc_end052,1729 +main: # @mainmain59,1856 +.LBB1_2: # %if.thenLBB1_271,2231 +.Lfunc_end1:Lfunc_end176,2373 + +externals/binaryen/test/torture-s/950221-1.c.s,577 +g1: # @g1g17,201 +.Lfunc_end0:Lfunc_end015,445 +g2: # @g2g222,562 +.LBB1_2: # %if.thenLBB1_234,918 +.Lfunc_end1:Lfunc_end139,1060 +f: # @ff46,1173 +.LBB2_3: # %alabelLBB2_363,1703 +.Lfunc_end2:Lfunc_end268,1853 +main: # @mainmain75,1976 +.Lfunc_end3:Lfunc_end389,2369 +basepf:basepf97,2540 +parsefile:parsefile106,2717 +el:el115,2875 +filler:filler124,3058 + +externals/binaryen/test/torture-s/20101013-1.c.s,534 +main: # @mainmain7,211 +.Lfunc_end0:Lfunc_end014,462 +build_ref_for_offset: # @build_ref_for_offsetbuild_ref_for_offset19,596 +.Lfunc_end1:Lfunc_end142,1356 +get_addr_base_and_unit_offset: # @get_addr_base_and_unit_offsetget_addr_base_and_unit_offset47,1540 +.Lfunc_end2:Lfunc_end254,1793 +build_int_cst: # @build_int_cstbuild_int_cst59,1963 +.LBB3_2: # %if.thenLBB3_268,2249 +.Lfunc_end3:Lfunc_end373,2391 + +externals/binaryen/test/torture-s/931102-1.c.s,314 +f: # @ff7,197 +.LBB0_2: # %while.bodyLBB0_219,541 +.LBB0_3: # %while.endLBB0_333,1017 +.Lfunc_end0:Lfunc_end039,1227 +main: # @mainmain46,1350 +.Lfunc_end1:Lfunc_end153,1538 + +externals/binaryen/test/torture-s/20010904-2.c.s,102 +main: # @mainmain7,211 +.Lfunc_end0:Lfunc_end014,398 +y:y22,549 + +externals/binaryen/test/torture-s/pr39100.c.s,544 +foo: # @foofoo7,204 +.LBB0_2: # %while.bodyLBB0_234,988 +.LBB0_4: # %if.thenLBB0_458,1789 +.LBB0_5: # %if.endLBB0_567,2108 +.LBB0_7:LBB0_777,2499 +.LBB0_8: # %while.endLBB0_886,2726 +.Lfunc_end0:Lfunc_end096,3045 +main: # @mainmain103,3172 +.LBB1_6: # %if.then23LBB1_6158,4941 +.Lfunc_end1:Lfunc_end1163,5085 + +externals/binaryen/test/torture-s/990628-1.c.s,826 +num_records: # @num_recordsnum_records7,237 +.Lfunc_end0:Lfunc_end013,455 +fetch: # @fetchfetch20,602 +.Lfunc_end1:Lfunc_end143,1333 +load_data: # @load_dataload_data50,1484 +.LBB2_1: # %while.bodyLBB2_182,2523 +.LBB2_3: # %while.endLBB2_3107,3387 +.Lfunc_end2:Lfunc_end2111,3554 +main: # @mainmain118,3693 +.LBB3_2: # %while.body.iLBB3_2153,4820 +.LBB3_4: # %load_data.exitLBB3_4177,5657 +.LBB3_6: # %if.thenLBB3_6188,6026 +.Lfunc_end3:Lfunc_end3193,6168 +data_tmp:data_tmp208,6545 +sqlca:sqlca217,6711 +data_ptr:data_ptr226,6879 + +externals/binaryen/test/torture-s/pr38236.c.s,247 +foo: # @foofoo7,204 +.Lfunc_end0:Lfunc_end030,903 +main: # @mainmain37,1030 +.LBB1_2: # %if.thenLBB1_252,1477 +.Lfunc_end1:Lfunc_end157,1619 + +externals/binaryen/test/torture-s/pr57829.c.s,423 +f1: # @f1f17,200 +.Lfunc_end0:Lfunc_end019,563 +f2: # @f2f226,680 +.Lfunc_end1:Lfunc_end138,1043 +f3: # @f3f345,1160 +.Lfunc_end2:Lfunc_end259,1576 +main: # @mainmain66,1701 +.LBB3_5: # %if.thenLBB3_596,2738 +.Lfunc_end3:Lfunc_end3101,2880 + +externals/binaryen/test/torture-s/20000715-2.c.s,179 +foo: # @foofoo7,207 +.Lfunc_end0:Lfunc_end019,571 +main: # @mainmain26,698 +.Lfunc_end1:Lfunc_end133,886 + +externals/binaryen/test/torture-s/20000818-1.c.s,227 +main: # @mainmain7,211 +.Lfunc_end0:Lfunc_end014,398 +yylex: # @yylexyylex21,531 +.Lfunc_end1:Lfunc_end127,743 +temporary_obstack:temporary_obstack35,960 + +externals/binaryen/test/torture-s/20030914-1.c.s,184 +f: # @ff7,199 +.Lfunc_end0:Lfunc_end0328,10623 +main: # @mainmain335,10746 +.Lfunc_end1:Lfunc_end1342,10934 + +externals/binaryen/test/torture-s/pr34154.c.s,179 +foo: # @foofoo7,204 +.Lfunc_end0:Lfunc_end020,635 +main: # @mainmain27,762 +.Lfunc_end1:Lfunc_end133,974 + +externals/binaryen/test/torture-s/20020404-1.c.s,90 +main: # @mainmain7,211 +.Lfunc_end0:Lfunc_end029,968 + +externals/binaryen/test/torture-s/930126-1.c.s,242 +f: # @ff7,197 +.Lfunc_end0:Lfunc_end020,601 +main: # @mainmain27,724 +.LBB1_2: # %if.thenLBB1_251,1446 +.Lfunc_end1:Lfunc_end156,1588 + +externals/binaryen/test/torture-s/builtin-prefetch-1.c.s,522 +good_const: # @good_constgood_const7,243 +.Lfunc_end0:Lfunc_end012,431 +good_enum: # @good_enumgood_enum19,592 +.Lfunc_end1:Lfunc_end124,779 +good_expr: # @good_exprgood_expr31,938 +.Lfunc_end2:Lfunc_end236,1125 +good_vararg: # @good_vararggood_vararg43,1292 +.Lfunc_end3:Lfunc_end348,1481 +main: # @mainmain55,1624 +.Lfunc_end4:Lfunc_end470,2054 +arr:arr78,2213 + +externals/binaryen/test/torture-s/stdarg-2.c.s,3299 +foo: # @foofoo7,205 +.LBB0_4: # %sw.bb18LBB0_452,1605 +.LBB0_5: # %sw.bb9LBB0_581,2550 +.LBB0_6: # %sw.epilogLBB0_696,3032 +.LBB0_7: # %sw.defaultLBB0_7105,3311 +.Lfunc_end0:Lfunc_end0110,3456 +bar: # @barbar117,3579 +.LBB1_3: # %if.end6LBB1_3153,4683 +.LBB1_4: # %if.then5LBB1_4158,4839 +.Lfunc_end1:Lfunc_end1163,4982 +f1: # @f1f1170,5101 +.Lfunc_end2:Lfunc_end2184,5510 +f2: # @f2f2191,5627 +.LBB3_3: # %bar.exitLBB3_3229,6784 +.LBB3_4: # %if.then5.iLBB3_4234,6941 +.Lfunc_end3:Lfunc_end3239,7086 +f3: # @f3f3246,7203 +.Lfunc_end4:Lfunc_end4264,7727 +f4: # @f4f4271,7844 +.LBB5_3: # %bar.exitLBB5_3315,9203 +.LBB5_4: # %if.then5.iLBB5_4324,9481 +.Lfunc_end5:Lfunc_end5329,9626 +f5: # @f5f5336,9743 +.LBB6_4: # %sw.bb18.iLBB6_4382,11170 +.LBB6_5: # %sw.bb9.iLBB6_5411,12119 +.LBB6_6: # %foo.exitLBB6_6426,12604 +.LBB6_7: # %sw.default.iLBB6_7435,12883 +.Lfunc_end6:Lfunc_end6440,13031 +f6: # @f6f6447,13148 +.Lfunc_end7:Lfunc_end7465,13670 +f7: # @f7f7472,13787 +.LBB8_3: # %bar.exitLBB8_3516,15148 +.LBB8_4: # %if.then5.iLBB8_4525,15427 +.Lfunc_end8:Lfunc_end8530,15573 +f8: # @f8f8537,15690 +.LBB9_4: # %sw.bb18.iLBB9_4583,17117 +.LBB9_5: # %sw.bb9.iLBB9_5612,18066 +.LBB9_6: # %foo.exitLBB9_6627,18551 +.LBB9_7: # %sw.default.iLBB9_7636,18830 +.Lfunc_end9:Lfunc_end9641,18978 +f10: # @f10f10648,19099 +.Lfunc_end10:Lfunc_end10668,19679 +f11: # @f11f11675,19804 +.LBB11_3: # %bar.exitLBB11_3721,21225 +.LBB11_4: # %if.then5.iLBB11_4730,21504 +.Lfunc_end11:Lfunc_end11735,21650 +f12: # @f12f12742,21775 +.LBB12_4: # %sw.bb18.iLBB12_4790,23257 +.LBB12_5: # %sw.bb9.iLBB12_5819,24210 +.LBB12_6: # %foo.exitLBB12_6834,24695 +.LBB12_7: # %sw.default.iLBB12_7843,24974 +.Lfunc_end12:Lfunc_end12848,25122 +main: # @mainmain855,25251 +.LBB13_12: # %if.then29LBB13_121009,30124 +.Lfunc_end13:Lfunc_end131014,30269 +foo_arg:foo_arg1022,30446 +gap:gap1031,30627 +bar_arg:bar_arg1040,30788 +x:x1049,30961 +d:d1058,31122 + +externals/binaryen/test/torture-s/pr19005.c.s,995 +bar: # @barbar7,204 +.LBB0_3: # %if.then19LBB0_335,1034 +.LBB0_4: # %if.thenLBB0_439,1168 +.LBB0_6: # %if.end21LBB0_646,1457 +.LBB0_7: # %if.then8LBB0_753,1662 +.Lfunc_end0:Lfunc_end058,1805 +foo: # @foofoo65,1928 +.LBB1_6: # %if.then8.i34LBB1_6115,3490 +.LBB1_7: # %if.then.iLBB1_7119,3627 +.LBB1_10: # %if.else.i38LBB1_10131,4083 +.LBB1_12: # %bar.exit41LBB1_12138,4382 +.LBB1_13: # %if.then8.iLBB1_13144,4567 +.Lfunc_end1:Lfunc_end1149,4712 +main: # @mainmain156,4839 +.LBB2_1: # %for.bodyLBB2_1164,5057 +.Lfunc_end2:Lfunc_end2183,5700 +v:v191,5851 +s:s200,6012 + +externals/binaryen/test/torture-s/920731-1.c.s,309 +f: # @ff7,197 +.LBB0_2: # %for.incLBB0_219,538 +.LBB0_4: # %for.endLBB0_437,1219 +.Lfunc_end0:Lfunc_end043,1427 +main: # @mainmain50,1550 +.Lfunc_end1:Lfunc_end157,1738 + +externals/binaryen/test/torture-s/pr45034.c.s,778 +foo: # @foofoo7,204 +.LBB0_2: # %if.thenLBB0_218,548 +.Lfunc_end0:Lfunc_end023,690 +test_neg: # @test_negtest_neg30,833 +.LBB1_1: # %for.condLBB1_135,997 +.LBB1_3: # %cond.false.iLBB1_358,1794 +.LBB1_4: # %fixnum_neg.exitLBB1_467,2139 +.Lfunc_end1:Lfunc_end181,2659 +main: # @mainmain88,2796 +.LBB2_1: # %for.cond.iLBB2_193,2956 +.LBB2_3: # %cond.false.i.iLBB2_3116,3757 +.LBB2_4: # %fixnum_neg.exit.iLBB2_4125,4104 +.Lfunc_end2:Lfunc_end2139,4625 + +externals/binaryen/test/torture-s/pr48814-1.c.s,286 +incr: # @incrincr7,210 +.Lfunc_end0:Lfunc_end021,629 +main: # @mainmain28,758 +.LBB1_3: # %if.thenLBB1_359,1686 +.Lfunc_end1:Lfunc_end164,1828 +arr:arr72,1990 +count:count84,2286 + +externals/binaryen/test/torture-s/931004-3.c.s,246 +f: # @ff7,197 +.LBB0_5: # %if.then18LBB0_535,1142 +.Lfunc_end0:Lfunc_end040,1286 +main: # @mainmain47,1409 +.Lfunc_end1:Lfunc_end154,1596 + +externals/binaryen/test/torture-s/pr58277-2.c.s,354 +main: # @mainmain7,210 +.LBB0_2: # %for.body4.preheader.iLBB0_223,693 +.LBB0_3: # %if.endLBB0_332,976 +.Lfunc_end0:Lfunc_end044,1348 +n:n51,1487 +d:d60,1647 +r:r69,1808 +f:f78,1941 +g:g87,2102 +o:o96,2263 +x:x105,2424 +h:h112,2559 +s:s119,2666 + +externals/binaryen/test/torture-s/920501-9.c.s,880 +proc1: # @proc1proc17,213 +.Lfunc_end0:Lfunc_end013,425 +proc2: # @proc2proc220,560 +.Lfunc_end1:Lfunc_end126,780 +proc3: # @proc3proc333,915 +.Lfunc_end2:Lfunc_end239,1146 +proc4: # @proc4proc446,1281 +.Lfunc_end3:Lfunc_end352,1494 +proc5: # @proc5proc559,1629 +.Lfunc_end4:Lfunc_end465,1850 +print_longlong: # @print_longlongprint_longlong72,2021 +.LBB5_2: # %if.elseLBB5_2101,2912 +.LBB5_3: # %if.endLBB5_3106,3106 +.Lfunc_end5:Lfunc_end5115,3420 +main: # @mainmain122,3569 +.LBB6_6: # %if.then34LBB6_6205,6368 +.Lfunc_end6:Lfunc_end6210,6512 + +externals/binaryen/test/torture-s/20021015-1.c.s,330 +g: # @gg7,199 +.LBB0_2: # %if.thenLBB0_220,603 +.Lfunc_end0:Lfunc_end025,745 +main: # @mainmain32,868 +.LBB1_2: # %for.endLBB1_244,1246 +.Lfunc_end1:Lfunc_end149,1440 +g_list:g_list56,1602 + +externals/binaryen/test/torture-s/pr57344-1.c.s,424 +foo: # @foofoo7,206 +.LBB0_2: # %if.thenLBB0_218,501 +.Lfunc_end0:Lfunc_end023,643 +main: # @mainmain30,770 +.LBB1_3: # %for.body.for.body_crit_edgeLBB1_357,1635 +.LBB1_4: # %for.endLBB1_485,2559 +.Lfunc_end1:Lfunc_end191,2765 +s:s99,2916 +i:i108,3050 + +externals/binaryen/test/torture-s/20040831-1.c.s,90 +main: # @mainmain7,211 +.Lfunc_end0:Lfunc_end014,398 + +externals/binaryen/test/torture-s/loop-3.c.s,342 +g: # @gg7,195 +.Lfunc_end0:Lfunc_end021,586 +f: # @ff28,697 +.Lfunc_end1:Lfunc_end149,1309 +main: # @mainmain56,1432 +.LBB2_2: # %if.thenLBB2_273,1914 +.Lfunc_end2:Lfunc_end278,2056 +n:n86,2207 + +externals/binaryen/test/torture-s/va-arg-12.c.s,246 +f: # @ff7,198 +.LBB0_4: # %if.then10LBB0_456,1770 +.Lfunc_end0:Lfunc_end061,1914 +main: # @mainmain68,2037 +.Lfunc_end1:Lfunc_end192,2750 + +externals/binaryen/test/torture-s/990324-1.c.s,241 +f: # @ff7,197 +.LBB0_2: # %if.elseLBB0_219,557 +.Lfunc_end0:Lfunc_end025,727 +main: # @mainmain32,850 +.Lfunc_end1:Lfunc_end139,1037 + +externals/binaryen/test/torture-s/20020314-1.c.s,261 +f: # @ff7,199 +.Lfunc_end0:Lfunc_end012,383 +g: # @gg19,494 +.Lfunc_end1:Lfunc_end130,851 +main: # @mainmain37,974 +.Lfunc_end2:Lfunc_end244,1163 + +externals/binaryen/test/torture-s/20000412-4.c.s,388 +f: # @ff7,199 +.LBB0_2: # %for.bodyLBB0_231,928 +.LBB0_4: # %for.cond6.preheaderLBB0_447,1571 +.LBB0_5: # %if.thenLBB0_551,1695 +.Lfunc_end0:Lfunc_end056,1837 +main: # @mainmain63,1960 +.Lfunc_end1:Lfunc_end171,2175 + +externals/binaryen/test/torture-s/960419-1.c.s,248 +check: # @checkcheck7,213 +.LBB0_2: # %if.thenLBB0_215,462 +.Lfunc_end0:Lfunc_end020,604 +main: # @mainmain27,735 +.Lfunc_end1:Lfunc_end134,922 + +externals/binaryen/test/torture-s/20070517-1.c.s,330 +main: # @mainmain7,211 +.LBB0_3: # %example.exitLBB0_331,965 +.LBB0_4: # %if.else.iLBB0_435,1104 +.Lfunc_end0:Lfunc_end040,1248 +get_kind: # @get_kindget_kind45,1358 +.Lfunc_end1:Lfunc_end159,1792 + +externals/binaryen/test/torture-s/pr37924.c.s,304 +test1: # @test1test17,212 +.Lfunc_end0:Lfunc_end018,570 +test2: # @test2test225,705 +.Lfunc_end1:Lfunc_end131,923 +main: # @mainmain38,1054 +.Lfunc_end2:Lfunc_end250,1416 +a:a57,1555 +b:b65,1703 + +externals/binaryen/test/torture-s/20010119-1.c.s,269 +bar: # @barbar7,207 +.Lfunc_end0:Lfunc_end012,388 +baz: # @bazbaz19,511 +.Lfunc_end1:Lfunc_end124,692 +main: # @mainmain31,819 +.Lfunc_end2:Lfunc_end238,1006 + +externals/binaryen/test/torture-s/20020108-1.c.s,19967 +ashift_qi_0: # @ashift_qi_0ashift_qi_07,239 +.Lfunc_end0:Lfunc_end014,473 +ashift_qi_1: # @ashift_qi_1ashift_qi_121,644 +.Lfunc_end1:Lfunc_end131,961 +ashift_qi_2: # @ashift_qi_2ashift_qi_238,1132 +.Lfunc_end2:Lfunc_end248,1449 +ashift_qi_3: # @ashift_qi_3ashift_qi_355,1620 +.Lfunc_end3:Lfunc_end365,1937 +ashift_qi_4: # @ashift_qi_4ashift_qi_472,2108 +.Lfunc_end4:Lfunc_end482,2425 +ashift_qi_5: # @ashift_qi_5ashift_qi_589,2596 +.Lfunc_end5:Lfunc_end599,2913 +ashift_qi_6: # @ashift_qi_6ashift_qi_6106,3084 +.Lfunc_end6:Lfunc_end6116,3401 +ashift_qi_7: # @ashift_qi_7ashift_qi_7123,3572 +.Lfunc_end7:Lfunc_end7133,3889 +lshiftrt_qi_0: # @lshiftrt_qi_0lshiftrt_qi_0140,4068 +.Lfunc_end8:Lfunc_end8147,4304 +lshiftrt_qi_1: # @lshiftrt_qi_1lshiftrt_qi_1154,4487 +.Lfunc_end9:Lfunc_end9162,4751 +lshiftrt_qi_2: # @lshiftrt_qi_2lshiftrt_qi_2169,4934 +.Lfunc_end10:Lfunc_end10177,5198 +lshiftrt_qi_3: # @lshiftrt_qi_3lshiftrt_qi_3184,5383 +.Lfunc_end11:Lfunc_end11192,5647 +lshiftrt_qi_4: # @lshiftrt_qi_4lshiftrt_qi_4199,5832 +.Lfunc_end12:Lfunc_end12207,6096 +lshiftrt_qi_5: # @lshiftrt_qi_5lshiftrt_qi_5214,6281 +.Lfunc_end13:Lfunc_end13222,6545 +lshiftrt_qi_6: # @lshiftrt_qi_6lshiftrt_qi_6229,6730 +.Lfunc_end14:Lfunc_end14237,6994 +lshiftrt_qi_7: # @lshiftrt_qi_7lshiftrt_qi_7244,7179 +.Lfunc_end15:Lfunc_end15252,7443 +ashiftrt_qi_0: # @ashiftrt_qi_0ashiftrt_qi_0259,7628 +.Lfunc_end16:Lfunc_end16266,7864 +ashiftrt_qi_1: # @ashiftrt_qi_1ashiftrt_qi_1273,8049 +.Lfunc_end17:Lfunc_end17281,8313 +ashiftrt_qi_2: # @ashiftrt_qi_2ashiftrt_qi_2288,8498 +.Lfunc_end18:Lfunc_end18296,8762 +ashiftrt_qi_3: # @ashiftrt_qi_3ashiftrt_qi_3303,8947 +.Lfunc_end19:Lfunc_end19311,9211 +ashiftrt_qi_4: # @ashiftrt_qi_4ashiftrt_qi_4318,9396 +.Lfunc_end20:Lfunc_end20326,9660 +ashiftrt_qi_5: # @ashiftrt_qi_5ashiftrt_qi_5333,9845 +.Lfunc_end21:Lfunc_end21341,10109 +ashiftrt_qi_6: # @ashiftrt_qi_6ashiftrt_qi_6348,10294 +.Lfunc_end22:Lfunc_end22356,10558 +ashiftrt_qi_7: # @ashiftrt_qi_7ashiftrt_qi_7363,10743 +.Lfunc_end23:Lfunc_end23371,11007 +ashift_hi_0: # @ashift_hi_0ashift_hi_0378,11184 +.Lfunc_end24:Lfunc_end24385,11418 +ashift_hi_1: # @ashift_hi_1ashift_hi_1392,11591 +.Lfunc_end25:Lfunc_end25402,11910 +ashift_hi_2: # @ashift_hi_2ashift_hi_2409,12083 +.Lfunc_end26:Lfunc_end26419,12402 +ashift_hi_3: # @ashift_hi_3ashift_hi_3426,12575 +.Lfunc_end27:Lfunc_end27436,12894 +ashift_hi_4: # @ashift_hi_4ashift_hi_4443,13067 +.Lfunc_end28:Lfunc_end28453,13386 +ashift_hi_5: # @ashift_hi_5ashift_hi_5460,13559 +.Lfunc_end29:Lfunc_end29470,13878 +ashift_hi_6: # @ashift_hi_6ashift_hi_6477,14051 +.Lfunc_end30:Lfunc_end30487,14370 +ashift_hi_7: # @ashift_hi_7ashift_hi_7494,14543 +.Lfunc_end31:Lfunc_end31504,14862 +ashift_hi_8: # @ashift_hi_8ashift_hi_8511,15035 +.Lfunc_end32:Lfunc_end32521,15354 +ashift_hi_9: # @ashift_hi_9ashift_hi_9528,15527 +.Lfunc_end33:Lfunc_end33538,15846 +ashift_hi_10: # @ashift_hi_10ashift_hi_10545,16023 +.Lfunc_end34:Lfunc_end34555,16344 +ashift_hi_11: # @ashift_hi_11ashift_hi_11562,16523 +.Lfunc_end35:Lfunc_end35572,16844 +ashift_hi_12: # @ashift_hi_12ashift_hi_12579,17023 +.Lfunc_end36:Lfunc_end36589,17344 +ashift_hi_13: # @ashift_hi_13ashift_hi_13596,17523 +.Lfunc_end37:Lfunc_end37606,17844 +ashift_hi_14: # @ashift_hi_14ashift_hi_14613,18023 +.Lfunc_end38:Lfunc_end38623,18344 +ashift_hi_15: # @ashift_hi_15ashift_hi_15630,18523 +.Lfunc_end39:Lfunc_end39640,18844 +lshiftrt_hi_0: # @lshiftrt_hi_0lshiftrt_hi_0647,19027 +.Lfunc_end40:Lfunc_end40654,19263 +lshiftrt_hi_1: # @lshiftrt_hi_1lshiftrt_hi_1661,19448 +.Lfunc_end41:Lfunc_end41669,19712 +lshiftrt_hi_2: # @lshiftrt_hi_2lshiftrt_hi_2676,19897 +.Lfunc_end42:Lfunc_end42684,20161 +lshiftrt_hi_3: # @lshiftrt_hi_3lshiftrt_hi_3691,20346 +.Lfunc_end43:Lfunc_end43699,20610 +lshiftrt_hi_4: # @lshiftrt_hi_4lshiftrt_hi_4706,20795 +.Lfunc_end44:Lfunc_end44714,21059 +lshiftrt_hi_5: # @lshiftrt_hi_5lshiftrt_hi_5721,21244 +.Lfunc_end45:Lfunc_end45729,21508 +lshiftrt_hi_6: # @lshiftrt_hi_6lshiftrt_hi_6736,21693 +.Lfunc_end46:Lfunc_end46744,21957 +lshiftrt_hi_7: # @lshiftrt_hi_7lshiftrt_hi_7751,22142 +.Lfunc_end47:Lfunc_end47759,22406 +lshiftrt_hi_8: # @lshiftrt_hi_8lshiftrt_hi_8766,22591 +.Lfunc_end48:Lfunc_end48774,22855 +lshiftrt_hi_9: # @lshiftrt_hi_9lshiftrt_hi_9781,23040 +.Lfunc_end49:Lfunc_end49789,23304 +lshiftrt_hi_10: # @lshiftrt_hi_10lshiftrt_hi_10796,23493 +.Lfunc_end50:Lfunc_end50804,23759 +lshiftrt_hi_11: # @lshiftrt_hi_11lshiftrt_hi_11811,23950 +.Lfunc_end51:Lfunc_end51819,24216 +lshiftrt_hi_12: # @lshiftrt_hi_12lshiftrt_hi_12826,24407 +.Lfunc_end52:Lfunc_end52834,24673 +lshiftrt_hi_13: # @lshiftrt_hi_13lshiftrt_hi_13841,24864 +.Lfunc_end53:Lfunc_end53849,25130 +lshiftrt_hi_14: # @lshiftrt_hi_14lshiftrt_hi_14856,25321 +.Lfunc_end54:Lfunc_end54864,25587 +lshiftrt_hi_15: # @lshiftrt_hi_15lshiftrt_hi_15871,25778 +.Lfunc_end55:Lfunc_end55879,26044 +ashiftrt_hi_0: # @ashiftrt_hi_0ashiftrt_hi_0886,26231 +.Lfunc_end56:Lfunc_end56893,26467 +ashiftrt_hi_1: # @ashiftrt_hi_1ashiftrt_hi_1900,26652 +.Lfunc_end57:Lfunc_end57908,26916 +ashiftrt_hi_2: # @ashiftrt_hi_2ashiftrt_hi_2915,27101 +.Lfunc_end58:Lfunc_end58923,27365 +ashiftrt_hi_3: # @ashiftrt_hi_3ashiftrt_hi_3930,27550 +.Lfunc_end59:Lfunc_end59938,27814 +ashiftrt_hi_4: # @ashiftrt_hi_4ashiftrt_hi_4945,27999 +.Lfunc_end60:Lfunc_end60953,28263 +ashiftrt_hi_5: # @ashiftrt_hi_5ashiftrt_hi_5960,28448 +.Lfunc_end61:Lfunc_end61968,28712 +ashiftrt_hi_6: # @ashiftrt_hi_6ashiftrt_hi_6975,28897 +.Lfunc_end62:Lfunc_end62983,29161 +ashiftrt_hi_7: # @ashiftrt_hi_7ashiftrt_hi_7990,29346 +.Lfunc_end63:Lfunc_end63998,29610 +ashiftrt_hi_8: # @ashiftrt_hi_8ashiftrt_hi_81005,29795 +.Lfunc_end64:Lfunc_end641013,30059 +ashiftrt_hi_9: # @ashiftrt_hi_9ashiftrt_hi_91020,30244 +.Lfunc_end65:Lfunc_end651028,30508 +ashiftrt_hi_10: # @ashiftrt_hi_10ashiftrt_hi_101035,30697 +.Lfunc_end66:Lfunc_end661043,30963 +ashiftrt_hi_11: # @ashiftrt_hi_11ashiftrt_hi_111050,31154 +.Lfunc_end67:Lfunc_end671058,31420 +ashiftrt_hi_12: # @ashiftrt_hi_12ashiftrt_hi_121065,31611 +.Lfunc_end68:Lfunc_end681073,31877 +ashiftrt_hi_13: # @ashiftrt_hi_13ashiftrt_hi_131080,32068 +.Lfunc_end69:Lfunc_end691088,32334 +ashiftrt_hi_14: # @ashiftrt_hi_14ashiftrt_hi_141095,32525 +.Lfunc_end70:Lfunc_end701103,32791 +ashiftrt_hi_15: # @ashiftrt_hi_15ashiftrt_hi_151110,32982 +.Lfunc_end71:Lfunc_end711118,33248 +ashift_si_0: # @ashift_si_0ashift_si_01125,33427 +.Lfunc_end72:Lfunc_end721132,33661 +ashift_si_1: # @ashift_si_1ashift_si_11139,33834 +.Lfunc_end73:Lfunc_end731147,34095 +ashift_si_2: # @ashift_si_2ashift_si_21154,34268 +.Lfunc_end74:Lfunc_end741162,34529 +ashift_si_3: # @ashift_si_3ashift_si_31169,34702 +.Lfunc_end75:Lfunc_end751177,34963 +ashift_si_4: # @ashift_si_4ashift_si_41184,35136 +.Lfunc_end76:Lfunc_end761192,35397 +ashift_si_5: # @ashift_si_5ashift_si_51199,35570 +.Lfunc_end77:Lfunc_end771207,35831 +ashift_si_6: # @ashift_si_6ashift_si_61214,36004 +.Lfunc_end78:Lfunc_end781222,36265 +ashift_si_7: # @ashift_si_7ashift_si_71229,36438 +.Lfunc_end79:Lfunc_end791237,36699 +ashift_si_8: # @ashift_si_8ashift_si_81244,36872 +.Lfunc_end80:Lfunc_end801252,37133 +ashift_si_9: # @ashift_si_9ashift_si_91259,37306 +.Lfunc_end81:Lfunc_end811267,37567 +ashift_si_10: # @ashift_si_10ashift_si_101274,37744 +.Lfunc_end82:Lfunc_end821282,38007 +ashift_si_11: # @ashift_si_11ashift_si_111289,38186 +.Lfunc_end83:Lfunc_end831297,38449 +ashift_si_12: # @ashift_si_12ashift_si_121304,38628 +.Lfunc_end84:Lfunc_end841312,38891 +ashift_si_13: # @ashift_si_13ashift_si_131319,39070 +.Lfunc_end85:Lfunc_end851327,39333 +ashift_si_14: # @ashift_si_14ashift_si_141334,39512 +.Lfunc_end86:Lfunc_end861342,39775 +ashift_si_15: # @ashift_si_15ashift_si_151349,39954 +.Lfunc_end87:Lfunc_end871357,40217 +ashift_si_16: # @ashift_si_16ashift_si_161364,40396 +.Lfunc_end88:Lfunc_end881372,40659 +ashift_si_17: # @ashift_si_17ashift_si_171379,40838 +.Lfunc_end89:Lfunc_end891387,41101 +ashift_si_18: # @ashift_si_18ashift_si_181394,41280 +.Lfunc_end90:Lfunc_end901402,41543 +ashift_si_19: # @ashift_si_19ashift_si_191409,41722 +.Lfunc_end91:Lfunc_end911417,41985 +ashift_si_20: # @ashift_si_20ashift_si_201424,42164 +.Lfunc_end92:Lfunc_end921432,42427 +ashift_si_21: # @ashift_si_21ashift_si_211439,42606 +.Lfunc_end93:Lfunc_end931447,42869 +ashift_si_22: # @ashift_si_22ashift_si_221454,43048 +.Lfunc_end94:Lfunc_end941462,43311 +ashift_si_23: # @ashift_si_23ashift_si_231469,43490 +.Lfunc_end95:Lfunc_end951477,43753 +ashift_si_24: # @ashift_si_24ashift_si_241484,43932 +.Lfunc_end96:Lfunc_end961492,44195 +ashift_si_25: # @ashift_si_25ashift_si_251499,44374 +.Lfunc_end97:Lfunc_end971507,44637 +ashift_si_26: # @ashift_si_26ashift_si_261514,44816 +.Lfunc_end98:Lfunc_end981522,45079 +ashift_si_27: # @ashift_si_27ashift_si_271529,45258 +.Lfunc_end99:Lfunc_end991537,45521 +ashift_si_28: # @ashift_si_28ashift_si_281544,45700 +.Lfunc_end100:Lfunc_end1001552,45963 +ashift_si_29: # @ashift_si_29ashift_si_291559,46144 +.Lfunc_end101:Lfunc_end1011567,46407 +ashift_si_30: # @ashift_si_30ashift_si_301574,46588 +.Lfunc_end102:Lfunc_end1021582,46851 +ashift_si_31: # @ashift_si_31ashift_si_311589,47032 +.Lfunc_end103:Lfunc_end1031597,47295 +lshiftrt_si_0: # @lshiftrt_si_0lshiftrt_si_01604,47480 +.Lfunc_end104:Lfunc_end1041611,47716 +lshiftrt_si_1: # @lshiftrt_si_1lshiftrt_si_11618,47903 +.Lfunc_end105:Lfunc_end1051626,48167 +lshiftrt_si_2: # @lshiftrt_si_2lshiftrt_si_21633,48354 +.Lfunc_end106:Lfunc_end1061641,48618 +lshiftrt_si_3: # @lshiftrt_si_3lshiftrt_si_31648,48805 +.Lfunc_end107:Lfunc_end1071656,49069 +lshiftrt_si_4: # @lshiftrt_si_4lshiftrt_si_41663,49256 +.Lfunc_end108:Lfunc_end1081671,49520 +lshiftrt_si_5: # @lshiftrt_si_5lshiftrt_si_51678,49707 +.Lfunc_end109:Lfunc_end1091686,49971 +lshiftrt_si_6: # @lshiftrt_si_6lshiftrt_si_61693,50158 +.Lfunc_end110:Lfunc_end1101701,50422 +lshiftrt_si_7: # @lshiftrt_si_7lshiftrt_si_71708,50609 +.Lfunc_end111:Lfunc_end1111716,50873 +lshiftrt_si_8: # @lshiftrt_si_8lshiftrt_si_81723,51060 +.Lfunc_end112:Lfunc_end1121731,51324 +lshiftrt_si_9: # @lshiftrt_si_9lshiftrt_si_91738,51511 +.Lfunc_end113:Lfunc_end1131746,51775 +lshiftrt_si_10: # @lshiftrt_si_10lshiftrt_si_101753,51966 +.Lfunc_end114:Lfunc_end1141761,52232 +lshiftrt_si_11: # @lshiftrt_si_11lshiftrt_si_111768,52425 +.Lfunc_end115:Lfunc_end1151776,52691 +lshiftrt_si_12: # @lshiftrt_si_12lshiftrt_si_121783,52884 +.Lfunc_end116:Lfunc_end1161791,53150 +lshiftrt_si_13: # @lshiftrt_si_13lshiftrt_si_131798,53343 +.Lfunc_end117:Lfunc_end1171806,53609 +lshiftrt_si_14: # @lshiftrt_si_14lshiftrt_si_141813,53802 +.Lfunc_end118:Lfunc_end1181821,54068 +lshiftrt_si_15: # @lshiftrt_si_15lshiftrt_si_151828,54261 +.Lfunc_end119:Lfunc_end1191836,54527 +lshiftrt_si_16: # @lshiftrt_si_16lshiftrt_si_161843,54720 +.Lfunc_end120:Lfunc_end1201851,54986 +lshiftrt_si_17: # @lshiftrt_si_17lshiftrt_si_171858,55179 +.Lfunc_end121:Lfunc_end1211866,55445 +lshiftrt_si_18: # @lshiftrt_si_18lshiftrt_si_181873,55638 +.Lfunc_end122:Lfunc_end1221881,55904 +lshiftrt_si_19: # @lshiftrt_si_19lshiftrt_si_191888,56097 +.Lfunc_end123:Lfunc_end1231896,56363 +lshiftrt_si_20: # @lshiftrt_si_20lshiftrt_si_201903,56556 +.Lfunc_end124:Lfunc_end1241911,56822 +lshiftrt_si_21: # @lshiftrt_si_21lshiftrt_si_211918,57015 +.Lfunc_end125:Lfunc_end1251926,57281 +lshiftrt_si_22: # @lshiftrt_si_22lshiftrt_si_221933,57474 +.Lfunc_end126:Lfunc_end1261941,57740 +lshiftrt_si_23: # @lshiftrt_si_23lshiftrt_si_231948,57933 +.Lfunc_end127:Lfunc_end1271956,58199 +lshiftrt_si_24: # @lshiftrt_si_24lshiftrt_si_241963,58392 +.Lfunc_end128:Lfunc_end1281971,58658 +lshiftrt_si_25: # @lshiftrt_si_25lshiftrt_si_251978,58851 +.Lfunc_end129:Lfunc_end1291986,59117 +lshiftrt_si_26: # @lshiftrt_si_26lshiftrt_si_261993,59310 +.Lfunc_end130:Lfunc_end1302001,59576 +lshiftrt_si_27: # @lshiftrt_si_27lshiftrt_si_272008,59769 +.Lfunc_end131:Lfunc_end1312016,60035 +lshiftrt_si_28: # @lshiftrt_si_28lshiftrt_si_282023,60228 +.Lfunc_end132:Lfunc_end1322031,60494 +lshiftrt_si_29: # @lshiftrt_si_29lshiftrt_si_292038,60687 +.Lfunc_end133:Lfunc_end1332046,60953 +lshiftrt_si_30: # @lshiftrt_si_30lshiftrt_si_302053,61146 +.Lfunc_end134:Lfunc_end1342061,61412 +lshiftrt_si_31: # @lshiftrt_si_31lshiftrt_si_312068,61605 +.Lfunc_end135:Lfunc_end1352076,61871 +ashiftrt_si_0: # @ashiftrt_si_0ashiftrt_si_02083,62060 +.Lfunc_end136:Lfunc_end1362090,62296 +ashiftrt_si_1: # @ashiftrt_si_1ashiftrt_si_12097,62483 +.Lfunc_end137:Lfunc_end1372105,62747 +ashiftrt_si_2: # @ashiftrt_si_2ashiftrt_si_22112,62934 +.Lfunc_end138:Lfunc_end1382120,63198 +ashiftrt_si_3: # @ashiftrt_si_3ashiftrt_si_32127,63385 +.Lfunc_end139:Lfunc_end1392135,63649 +ashiftrt_si_4: # @ashiftrt_si_4ashiftrt_si_42142,63836 +.Lfunc_end140:Lfunc_end1402150,64100 +ashiftrt_si_5: # @ashiftrt_si_5ashiftrt_si_52157,64287 +.Lfunc_end141:Lfunc_end1412165,64551 +ashiftrt_si_6: # @ashiftrt_si_6ashiftrt_si_62172,64738 +.Lfunc_end142:Lfunc_end1422180,65002 +ashiftrt_si_7: # @ashiftrt_si_7ashiftrt_si_72187,65189 +.Lfunc_end143:Lfunc_end1432195,65453 +ashiftrt_si_8: # @ashiftrt_si_8ashiftrt_si_82202,65640 +.Lfunc_end144:Lfunc_end1442210,65904 +ashiftrt_si_9: # @ashiftrt_si_9ashiftrt_si_92217,66091 +.Lfunc_end145:Lfunc_end1452225,66355 +ashiftrt_si_10: # @ashiftrt_si_10ashiftrt_si_102232,66546 +.Lfunc_end146:Lfunc_end1462240,66812 +ashiftrt_si_11: # @ashiftrt_si_11ashiftrt_si_112247,67005 +.Lfunc_end147:Lfunc_end1472255,67271 +ashiftrt_si_12: # @ashiftrt_si_12ashiftrt_si_122262,67464 +.Lfunc_end148:Lfunc_end1482270,67730 +ashiftrt_si_13: # @ashiftrt_si_13ashiftrt_si_132277,67923 +.Lfunc_end149:Lfunc_end1492285,68189 +ashiftrt_si_14: # @ashiftrt_si_14ashiftrt_si_142292,68382 +.Lfunc_end150:Lfunc_end1502300,68648 +ashiftrt_si_15: # @ashiftrt_si_15ashiftrt_si_152307,68841 +.Lfunc_end151:Lfunc_end1512315,69107 +ashiftrt_si_16: # @ashiftrt_si_16ashiftrt_si_162322,69300 +.Lfunc_end152:Lfunc_end1522330,69566 +ashiftrt_si_17: # @ashiftrt_si_17ashiftrt_si_172337,69759 +.Lfunc_end153:Lfunc_end1532345,70025 +ashiftrt_si_18: # @ashiftrt_si_18ashiftrt_si_182352,70218 +.Lfunc_end154:Lfunc_end1542360,70484 +ashiftrt_si_19: # @ashiftrt_si_19ashiftrt_si_192367,70677 +.Lfunc_end155:Lfunc_end1552375,70943 +ashiftrt_si_20: # @ashiftrt_si_20ashiftrt_si_202382,71136 +.Lfunc_end156:Lfunc_end1562390,71402 +ashiftrt_si_21: # @ashiftrt_si_21ashiftrt_si_212397,71595 +.Lfunc_end157:Lfunc_end1572405,71861 +ashiftrt_si_22: # @ashiftrt_si_22ashiftrt_si_222412,72054 +.Lfunc_end158:Lfunc_end1582420,72320 +ashiftrt_si_23: # @ashiftrt_si_23ashiftrt_si_232427,72513 +.Lfunc_end159:Lfunc_end1592435,72779 +ashiftrt_si_24: # @ashiftrt_si_24ashiftrt_si_242442,72972 +.Lfunc_end160:Lfunc_end1602450,73238 +ashiftrt_si_25: # @ashiftrt_si_25ashiftrt_si_252457,73431 +.Lfunc_end161:Lfunc_end1612465,73697 +ashiftrt_si_26: # @ashiftrt_si_26ashiftrt_si_262472,73890 +.Lfunc_end162:Lfunc_end1622480,74156 +ashiftrt_si_27: # @ashiftrt_si_27ashiftrt_si_272487,74349 +.Lfunc_end163:Lfunc_end1632495,74615 +ashiftrt_si_28: # @ashiftrt_si_28ashiftrt_si_282502,74808 +.Lfunc_end164:Lfunc_end1642510,75074 +ashiftrt_si_29: # @ashiftrt_si_29ashiftrt_si_292517,75267 +.Lfunc_end165:Lfunc_end1652525,75533 +ashiftrt_si_30: # @ashiftrt_si_30ashiftrt_si_302532,75726 +.Lfunc_end166:Lfunc_end1662540,75992 +ashiftrt_si_31: # @ashiftrt_si_31ashiftrt_si_312547,76185 +.Lfunc_end167:Lfunc_end1672555,76451 +main: # @mainmain2562,76604 +.Lfunc_end168:Lfunc_end1682569,76796 + +externals/binaryen/test/torture-s/pr51323.c.s,352 +foo: # @foofoo7,204 +.LBB0_4: # %if.thenLBB0_423,759 +.Lfunc_end0:Lfunc_end028,901 +bar: # @barbar35,1024 +.Lfunc_end1:Lfunc_end143,1298 +main: # @mainmain50,1425 +.Lfunc_end2:Lfunc_end2106,3034 +v:v114,3185 + +externals/binaryen/test/torture-s/20030626-2.c.s,106 +main: # @mainmain7,211 +.Lfunc_end0:Lfunc_end025,780 +buf:buf33,939 + +externals/binaryen/test/torture-s/20080604-1.c.s,349 +foo: # @foofoo7,207 +.LBB0_2: # %if.thenLBB0_216,493 +.Lfunc_end0:Lfunc_end021,635 +baz: # @bazbaz28,758 +.Lfunc_end1:Lfunc_end155,1564 +main: # @mainmain62,1691 +.Lfunc_end2:Lfunc_end275,2078 +x:x83,2229 + +externals/binaryen/test/torture-s/990326-1.c.s,3614 +a1: # @a1a17,201 +.Lfunc_end0:Lfunc_end013,410 +a2: # @a2a220,527 +.Lfunc_end1:Lfunc_end126,736 +a3: # @a3a333,853 +.Lfunc_end2:Lfunc_end239,1062 +b1: # @b1b146,1179 +.Lfunc_end3:Lfunc_end352,1388 +b2: # @b2b259,1505 +.Lfunc_end4:Lfunc_end465,1714 +b3: # @b3b372,1831 +.Lfunc_end5:Lfunc_end578,2040 +c1: # @c1c185,2157 +.Lfunc_end6:Lfunc_end691,2366 +c2: # @c2c298,2483 +.Lfunc_end7:Lfunc_end7104,2692 +c3: # @c3c3111,2809 +.Lfunc_end8:Lfunc_end8117,3018 + .hidden d1hidden121,3092 + .globl d1globl122,3104 + .type d1,@functiontype123,3115 +d1: # @d1d1124,3135 +.Lfunc_end9:Lfunc_end9130,3344 + .size d1, .Lfunc_end9-d1size131,3357 + .hidden d2hidden134,3418 + .globl d2globl135,3430 + .type d2,@functiontype136,3441 +d2: # @d2d2137,3461 +.Lfunc_end10:Lfunc_end10143,3670 + .size d2, .Lfunc_end10-d2size144,3684 + .hidden d3hidden147,3746 + .globl d3globl148,3758 + .type d3,@functiontype149,3769 +d3: # @d3d3150,3789 +.Lfunc_end11:Lfunc_end11156,3998 + .size d3, .Lfunc_end11-d3size157,4012 +e1: # @e1e1163,4117 +.Lfunc_end12:Lfunc_end12169,4326 +e2: # @e2e2176,4445 +.Lfunc_end13:Lfunc_end13182,4654 +e3: # @e3e3189,4773 +.Lfunc_end14:Lfunc_end14195,4982 +e4: # @e4e4202,5101 +.Lfunc_end15:Lfunc_end15208,5310 +f1: # @f1f1215,5429 +.Lfunc_end16:Lfunc_end16221,5638 +f2: # @f2f2228,5757 +.Lfunc_end17:Lfunc_end17234,5966 +f3: # @f3f3241,6085 +.Lfunc_end18:Lfunc_end18247,6294 +f4: # @f4f4254,6413 +.Lfunc_end19:Lfunc_end19260,6622 +g1: # @g1g1267,6741 +.Lfunc_end20:Lfunc_end20273,6950 +g2: # @g2g2280,7069 +.Lfunc_end21:Lfunc_end21286,7278 +g3: # @g3g3293,7397 +.Lfunc_end22:Lfunc_end22299,7606 +g4: # @g4g4306,7725 +.Lfunc_end23:Lfunc_end23312,7934 +g5: # @g5g5319,8053 +.Lfunc_end24:Lfunc_end24325,8262 +g6: # @g6g6332,8381 +.Lfunc_end25:Lfunc_end25338,8590 +g7: # @g7g7345,8709 +.Lfunc_end26:Lfunc_end26351,8918 +h1: # @h1h1358,9037 +.Lfunc_end27:Lfunc_end27364,9246 +h2: # @h2h2371,9365 +.Lfunc_end28:Lfunc_end28377,9574 +h3: # @h3h3384,9693 +.Lfunc_end29:Lfunc_end29390,9902 +h4: # @h4h4397,10021 +.Lfunc_end30:Lfunc_end30403,10230 +h5: # @h5h5410,10349 +.Lfunc_end31:Lfunc_end31416,10558 +h6: # @h6h6423,10677 +.Lfunc_end32:Lfunc_end32429,10886 +h7: # @h7h7436,11005 +.Lfunc_end33:Lfunc_end33442,11214 +main: # @mainmain449,11341 +.Lfunc_end34:Lfunc_end34456,11532 + +externals/binaryen/test/torture-s/extzvsi.c.s,193 +foo: # @foofoo7,204 +.Lfunc_end0:Lfunc_end027,806 +main: # @mainmain34,933 +.Lfunc_end1:Lfunc_end148,1356 +x:x56,1507 + +externals/binaryen/test/torture-s/pr27260.c.s,607 +foo: # @foofoo7,204 +.Lfunc_end0:Lfunc_end017,538 +main: # @mainmain24,665 +.LBB1_1: # %for.bodyLBB1_132,897 +.LBB1_4: # %for.cond3LBB1_455,1721 +.LBB1_7: # %for.end15LBB1_776,2474 +.LBB1_8: # %for.cond16LBB1_883,2713 +.LBB1_11: # %if.end33LBB1_11103,3439 +.LBB1_12: # %if.thenLBB1_12107,3574 +.Lfunc_end1:Lfunc_end1112,3716 +buf:buf120,3875 + +externals/binaryen/test/torture-s/930513-2.c.s,405 +sub3: # @sub3sub37,209 +.Lfunc_end0:Lfunc_end015,450 +eq: # @eqeq22,571 +.LBB1_2: # %if.thenLBB1_237,1004 +.Lfunc_end1:Lfunc_end142,1146 +main: # @mainmain49,1271 +.LBB2_2: # %if.then.iLBB2_263,1685 +.Lfunc_end2:Lfunc_end268,1829 + +externals/binaryen/test/torture-s/20000412-6.c.s,397 +main: # @mainmain7,216 +.LBB0_2: # %if.thenLBB0_230,918 +.Lfunc_end0:Lfunc_end035,1060 +bug: # @bugbug42,1185 +.LBB1_2: # %for.bodyLBB1_250,1464 +.LBB1_3: # %for.endLBB1_362,1895 +.Lfunc_end1:Lfunc_end168,2101 +buf:buf76,2261 + +externals/binaryen/test/torture-s/pr33870-1.c.s,2168 +sort_pagelist: # @sort_pagelistsort_pagelist7,251 +.LBB0_2: # %while.bodyLBB0_233,1086 +.LBB0_3: # %for.bodyLBB0_348,1703 +.LBB0_6: # %while.body.iLBB0_681,2832 +.LBB0_8: # %if.else.iLBB0_8103,3669 +.LBB0_9: # %if.end.iLBB0_9114,4037 +.LBB0_11: # %merge_pagelist.exitLBB0_11129,4608 +.LBB0_12: # in Loop: Header=BB0_3 Depth=2LBB0_12135,4891 +.LBB0_13: # %merge_pagelist.exit.threadLBB0_13140,5089 +.LBB0_14: # in Loop: Header=BB0_3 Depth=2LBB0_14144,5297 +.LBB0_19: # %while.body.i84LBB0_19185,6803 +.LBB0_21: # %if.else.i88LBB0_21206,7580 +.LBB0_22: # %if.end.i95LBB0_22217,7955 +.LBB0_24: # %for.end.threadLBB0_24234,8617 +.LBB0_25: # in Loop: Header=BB0_2 Depth=1LBB0_25241,8913 +.LBB0_26: # %merge_pagelist.exit102LBB0_26245,9071 +.LBB0_27: # %while.cond.backedgeLBB0_27254,9425 +.LBB0_28: # %while.end.loopexitLBB0_28258,9649 +.LBB0_29: # %while.endLBB0_29262,9785 +.LBB0_30: # %for.body17LBB0_30269,10011 +.LBB0_33: # %while.body.i54LBB0_33297,11054 +.LBB0_35: # %if.else.i58LBB0_35318,11836 +.LBB0_36: # %if.end.i65LBB0_36329,12215 +.LBB0_38: # in Loop: Header=BB0_30 Depth=1LBB0_38346,12883 +.LBB0_39: # %merge_pagelist.exit72LBB0_39351,13053 +.Lfunc_end0:Lfunc_end0374,13868 +main: # @mainmain381,14015 +.LBB1_2: # %if.thenLBB1_2440,15718 +.Lfunc_end1:Lfunc_end1445,15861 +xx:xx453,16016 +vx:vx462,16155 + +externals/binaryen/test/torture-s/loop-1.c.s,90 +main: # @mainmain7,207 +.Lfunc_end0:Lfunc_end014,400 + +externals/binaryen/test/torture-s/pr48973-1.c.s,339 +foo: # @foofoo7,206 +.LBB0_2: # %if.thenLBB0_216,483 +.Lfunc_end0:Lfunc_end021,625 +main: # @mainmain28,752 +.LBB1_2: # %if.then.iLBB1_250,1377 +.Lfunc_end1:Lfunc_end155,1521 +v:v63,1675 +s:s72,1843 + +externals/binaryen/test/torture-s/20051012-1.c.s,193 +foo: # @foofoo7,207 +.Lfunc_end0:Lfunc_end016,507 +main: # @mainmain23,634 +.Lfunc_end1:Lfunc_end137,1070 +t:t45,1221 + +externals/binaryen/test/torture-s/va-arg-10.c.s,2157 +to_hex: # @to_hexto_hex7,218 +.LBB0_2: # %if.thenLBB0_220,607 +.Lfunc_end0:Lfunc_end025,749 +fap: # @fapfap32,878 +.LBB1_2: # %while.condLBB1_254,1524 +.LBB1_6:LBB1_687,2709 +.LBB1_7: # %while.cond6LBB1_789,2761 +.LBB1_11: # %while.end18LBB1_11122,3955 +.LBB1_12: # %if.then.i25LBB1_12129,4182 +.Lfunc_end1:Lfunc_end1134,4328 +f0: # @f0f0141,4447 +.Lfunc_end2:Lfunc_end2161,5056 +f1: # @f1f1168,5173 +.Lfunc_end3:Lfunc_end3188,5787 +f2: # @f2f2195,5904 +.Lfunc_end4:Lfunc_end4215,6523 +f3: # @f3f3222,6640 +.Lfunc_end5:Lfunc_end5242,7264 +f4: # @f4f4249,7381 +.Lfunc_end6:Lfunc_end6269,8010 +f5: # @f5f5276,8127 +.Lfunc_end7:Lfunc_end7296,8761 +f6: # @f6f6303,8878 +.Lfunc_end8:Lfunc_end8323,9517 +f7: # @f7f7330,9634 +.Lfunc_end9:Lfunc_end9350,10278 +f8: # @f8f8357,10395 +.Lfunc_end10:Lfunc_end10377,11047 +f9: # @f9f9384,11166 +.Lfunc_end11:Lfunc_end11404,11825 +f10: # @f10f10411,11948 +.Lfunc_end12:Lfunc_end12431,12615 +f11: # @f11f11438,12740 +.Lfunc_end13:Lfunc_end13458,13412 +f12: # @f12f12465,13537 +.Lfunc_end14:Lfunc_end14485,14214 +f13: # @f13f13492,14339 +.Lfunc_end15:Lfunc_end15512,15021 +f14: # @f14f14519,15146 +.Lfunc_end16:Lfunc_end16539,15833 +f15: # @f15f15546,15958 +.Lfunc_end17:Lfunc_end17566,16650 +main: # @mainmain573,16779 +.Lfunc_end18:Lfunc_end18962,29131 + +externals/binaryen/test/torture-s/pr43269.c.s,404 +main: # @mainmain7,208 +.LBB0_2: # %if.thenLBB0_220,600 +.Lfunc_end0:Lfunc_end025,742 +func_32: # @func_32func_3230,850 +.LBB1_2: # %if.elseLBB1_243,1251 +.LBB1_3:LBB1_348,1501 +.Lfunc_end1:Lfunc_end151,1530 +g_261:g_26159,1703 +g_21:g_2168,1884 +g_211:g_21177,2067 + +externals/binaryen/test/torture-s/20090623-1.c.s,193 +foo: # @foofoo7,207 +.Lfunc_end0:Lfunc_end017,507 +main: # @mainmain24,634 +.Lfunc_end1:Lfunc_end138,1069 +x:x46,1220 + +externals/binaryen/test/torture-s/20000801-2.c.s,571 +test: # @testtest7,211 +.LBB0_1: # %while.bodyLBB0_114,415 +.LBB0_2: # %while.endLBB0_220,681 +.Lfunc_end0:Lfunc_end026,887 +bar: # @barbar33,1012 +.Lfunc_end1:Lfunc_end139,1222 +baz: # @bazbaz46,1345 +.Lfunc_end2:Lfunc_end252,1555 +main: # @mainmain59,1682 +.LBB3_1: # %while.body.iLBB3_178,2221 +.Lfunc_end3:Lfunc_end390,2628 + +externals/binaryen/test/torture-s/pr35472.c.s,423 +foo: # @foofoo7,204 +.Lfunc_end0:Lfunc_end016,483 +test: # @testtest23,610 +.LBB1_2: # %if.thenLBB1_264,1910 +.Lfunc_end1:Lfunc_end169,2052 +main: # @mainmain76,2181 +.LBB2_2: # %if.then.iLBB2_2119,3530 +.Lfunc_end2:Lfunc_end2124,3674 +p:p132,3825 + +externals/binaryen/test/torture-s/pr57344-3.c.s,426 +foo: # @foofoo7,206 +.LBB0_2: # %if.thenLBB0_218,501 +.Lfunc_end0:Lfunc_end023,643 +main: # @mainmain30,770 +.LBB1_3: # %for.body.for.body_crit_edgeLBB1_362,1804 +.LBB1_4: # %for.endLBB1_497,2936 +.Lfunc_end1:Lfunc_end1103,3142 +s:s127,3789 +i:i136,3923 + +externals/binaryen/test/torture-s/20080719-1.c.s,277 +xxx: # @xxxxxx7,207 +.Lfunc_end0:Lfunc_end022,689 +main: # @mainmain29,816 +.Lfunc_end1:Lfunc_end135,1028 +cfb_tab8_be:cfb_tab8_be41,1174 +cfb_tab16_be:cfb_tab16_be63,2006 +cfb_tab32:cfb_tab3273,2312 + +externals/binaryen/test/torture-s/20070614-1.c.s,594 +foo: # @foofoo7,207 +.LBB0_3: # %if.thenLBB0_324,748 +.Lfunc_end0:Lfunc_end029,890 +bar: # @barbar36,1013 +.Lfunc_end1:Lfunc_end147,1349 +baz: # @bazbaz54,1472 +.LBB2_2: # %if.then.i.splitLBB2_272,2007 +.Lfunc_end2:Lfunc_end277,2157 +main: # @mainmain84,2284 +.LBB3_2: # %if.then.i.split.iLBB3_2103,2836 +.Lfunc_end3:Lfunc_end3108,2988 +v:v116,3142 + +externals/binaryen/test/torture-s/loop-14.c.s,190 +f: # @ff7,196 +.Lfunc_end0:Lfunc_end014,441 +main: # @mainmain21,564 +.Lfunc_end1:Lfunc_end131,845 +a3:a339,1000 + +externals/binaryen/test/torture-s/931004-1.c.s,245 +f: # @ff7,197 +.LBB0_5: # %if.then12LBB0_529,961 +.Lfunc_end0:Lfunc_end034,1105 +main: # @mainmain41,1228 +.Lfunc_end1:Lfunc_end148,1415 + +externals/binaryen/test/torture-s/921202-1.c.s,685 +main: # @mainmain7,209 +.Lfunc_end0:Lfunc_end013,379 +foo: # @foofoo20,504 +.Lfunc_end1:Lfunc_end127,730 +mpn_mul_1: # @mpn_mul_1mpn_mul_134,877 +.Lfunc_end2:Lfunc_end241,1109 +mpn_print: # @mpn_printmpn_print48,1268 +.Lfunc_end3:Lfunc_end355,1500 +mpn_random2: # @mpn_random2mpn_random262,1667 +.Lfunc_end4:Lfunc_end469,1901 +mpn_cmp: # @mpn_cmpmpn_cmp76,2056 +.Lfunc_end5:Lfunc_end583,2286 +exxit: # @exxitexxit90,2425 +.Lfunc_end6:Lfunc_end697,2613 + +externals/binaryen/test/torture-s/20060412-1.c.s,102 +main: # @mainmain7,211 +.Lfunc_end0:Lfunc_end020,624 +t:t28,775 + +externals/binaryen/test/torture-s/920202-1.c.s,175 +f: # @ff7,197 +.Lfunc_end0:Lfunc_end013,405 +main: # @mainmain20,528 +.Lfunc_end1:Lfunc_end127,715 + +externals/binaryen/test/torture-s/20000717-2.c.s,90 +main: # @mainmain7,211 +.Lfunc_end0:Lfunc_end014,398 + +externals/binaryen/test/torture-s/20000731-1.c.s,283 +foo: # @foofoo7,207 +.Lfunc_end0:Lfunc_end013,421 +do_sibcall: # @do_sibcalldo_sibcall20,572 +.Lfunc_end1:Lfunc_end124,746 +main: # @mainmain31,887 +.Lfunc_end2:Lfunc_end238,1075 + +externals/binaryen/test/torture-s/20071205-1.c.s,179 +foo: # @foofoo7,207 +.Lfunc_end0:Lfunc_end019,574 +main: # @mainmain26,701 +.Lfunc_end1:Lfunc_end132,913 + +externals/binaryen/test/torture-s/20011126-1.c.s,168 +main: # @mainmain7,211 +.LBB0_2: # %if.then4LBB0_219,573 +.Lfunc_end0:Lfunc_end024,716 +a:a32,870 + +externals/binaryen/test/torture-s/builtin-prefetch-3.c.s,1090 +simple_vol_global: # @simple_vol_globalsimple_vol_global7,271 +.Lfunc_end0:Lfunc_end015,584 +simple_vol_file: # @simple_vol_filesimple_vol_file22,783 +.Lfunc_end1:Lfunc_end130,1094 +expr_vol_global: # @expr_vol_globalexpr_vol_global37,1289 +.Lfunc_end2:Lfunc_end297,3236 +main: # @mainmain104,3387 +.Lfunc_end3:Lfunc_end3120,3841 +glob_int:glob_int128,4023 +glob_int_arr:glob_int_arr137,4242 +glob_vol_ptr_int:glob_vol_ptr_int146,4463 +glob_vol_int_arr:glob_vol_int_arr155,4697 +glob_ptr_vol_int:glob_ptr_vol_int164,4926 +glob_vol_ptr_vol_int:glob_vol_ptr_vol_int173,5183 +str:str182,5377 +vol_ptr_str:vol_ptr_str191,5558 +vol_str:vol_str200,5737 +ptr_vol_str:ptr_vol_str209,5926 +vol_ptr_vol_str:vol_ptr_vol_str218,6144 +glob_vol_int:glob_vol_int227,6355 +stat_vol_int_arr:stat_vol_int_arr234,6540 +stat_vol_ptr_int:stat_vol_ptr_int241,6711 +stat_vol_ptr_vol_int:stat_vol_ptr_vol_int248,6902 +stat_vol_int:stat_vol_int255,7081 +stat_int_arr:stat_int_arr262,7257 + +externals/binaryen/test/torture-s/20041214-1.c.s,611 +g: # @gg7,199 +.LBB0_2: # %do_form_stringLBB0_219,570 +.LBB0_3: # %all_doneLBB0_331,999 +.Lfunc_end0:Lfunc_end037,1204 +f: # @ff44,1315 +.LBB1_2: # %do_form_string.iLBB1_264,1943 +.LBB1_3: # %g.exitLBB1_376,2378 +.Lfunc_end1:Lfunc_end185,2667 +main: # @mainmain92,2790 +.LBB2_2: # %if.thenLBB2_2124,3753 +.Lfunc_end2:Lfunc_end2129,3895 + +externals/binaryen/test/torture-s/960117-1.c.s,335 +get_id: # @get_idget_id7,217 +.Lfunc_end0:Lfunc_end017,536 +get_tok: # @get_tokget_tok24,681 +.Lfunc_end1:Lfunc_end139,1148 +main: # @mainmain46,1283 +.Lfunc_end2:Lfunc_end254,1505 +curval:curval62,1676 +id_space:id_space69,1803 + +externals/binaryen/test/torture-s/20040309-1.c.s,247 +foo: # @foofoo7,207 +.LBB0_2: # %cond.endLBB0_226,745 +.Lfunc_end0:Lfunc_end031,942 +main: # @mainmain38,1069 +.Lfunc_end1:Lfunc_end144,1283 + +externals/binaryen/test/torture-s/20031211-1.c.s,102 +main: # @mainmain7,211 +.Lfunc_end0:Lfunc_end017,473 +x:x25,624 + +externals/binaryen/test/torture-s/pr52760.c.s,382 +foo: # @foofoo7,204 +.LBB0_2: # %for.bodyLBB0_216,503 +.LBB0_3: # %for.endLBB0_382,2557 +.Lfunc_end0:Lfunc_end087,2732 +main: # @mainmain94,2859 +.LBB1_5: # %if.thenLBB1_5138,4316 +.Lfunc_end1:Lfunc_end1143,4458 + +externals/binaryen/test/torture-s/simd-2.c.s,319 +verify: # @verifyverify7,215 +.LBB0_5: # %if.thenLBB0_524,867 +.Lfunc_end0:Lfunc_end029,1009 +main: # @mainmain36,1142 +.Lfunc_end1:Lfunc_end1836,26086 +i:i844,26240 +j:j860,26675 +k:k876,27105 +res:res885,27247 + +externals/binaryen/test/torture-s/20030916-1.c.s,382 +f: # @ff7,199 +.Lfunc_end0:Lfunc_end044,1281 +main: # @mainmain51,1404 +.LBB1_1: # %for.bodyLBB1_163,1784 +.LBB1_3: # %for.body3LBB1_3109,3124 +.LBB1_6: # %if.thenLBB1_6135,4020 +.Lfunc_end1:Lfunc_end1140,4162 + +externals/binaryen/test/torture-s/20020406-1.c.s,1414 +FFmul: # @FFmulFFmul7,215 +.Lfunc_end0:Lfunc_end014,448 +DUPFFdeg: # @DUPFFdegDUPFFdeg21,595 +.Lfunc_end1:Lfunc_end128,827 +DUPFFnew: # @DUPFFnewDUPFFnew35,980 +.LBB2_2: # %if.endLBB2_257,1633 +.Lfunc_end2:Lfunc_end265,1898 +DUPFFfree: # @DUPFFfreeDUPFFfree72,2055 +.Lfunc_end3:Lfunc_end377,2242 +DUPFFswap: # @DUPFFswapDUPFFswap84,2401 +.Lfunc_end4:Lfunc_end489,2593 +DUPFFcopy: # @DUPFFcopyDUPFFcopy96,2752 +.Lfunc_end5:Lfunc_end5103,2984 +DUPFFshift_add: # @DUPFFshift_addDUPFFshift_add110,3163 +.Lfunc_end6:Lfunc_end6115,3370 +DUPFFexgcd: # @DUPFFexgcdDUPFFexgcd122,3543 +.LBB7_1: # %tailrecurseLBB7_1136,3990 +.LBB7_7: # %while.cond40.preheaderLBB7_7205,6172 +.LBB7_8: # %while.cond40LBB7_8209,6394 +.LBB7_9: # %if.end57LBB7_9214,6616 +.LBB7_10: # %cleanupLBB7_10219,6763 +.LBB7_11: # %if.then10LBB7_11226,6991 +.Lfunc_end7:Lfunc_end7231,7135 +main: # @mainmain238,7276 +.Lfunc_end8:Lfunc_end8291,8933 + +externals/binaryen/test/torture-s/931102-2.c.s,314 +f: # @ff7,197 +.LBB0_2: # %while.bodyLBB0_219,541 +.LBB0_3: # %while.endLBB0_333,1017 +.Lfunc_end0:Lfunc_end039,1227 +main: # @mainmain46,1350 +.Lfunc_end1:Lfunc_end153,1538 + +externals/binaryen/test/torture-s/pr60062.c.s,102 +main: # @mainmain7,208 +.Lfunc_end0:Lfunc_end013,419 +a:a21,570 + +externals/binaryen/test/torture-s/20010904-1.c.s,102 +main: # @mainmain7,211 +.Lfunc_end0:Lfunc_end014,398 +y:y22,549 + +externals/binaryen/test/torture-s/20021113-1.c.s,179 +foo: # @foofoo7,207 +.Lfunc_end0:Lfunc_end016,480 +main: # @mainmain23,607 +.Lfunc_end1:Lfunc_end130,795 + +externals/binaryen/test/torture-s/981019-1.c.s,803 +ff: # @ffff7,201 +.LBB0_2: # %while.cond.preheaderLBB0_217,519 +.LBB0_3: # %while.condLBB0_321,675 +.LBB0_6: # %while.endLBB0_638,1289 +.LBB0_8: # %if.then15LBB0_845,1540 +.Lfunc_end0:Lfunc_end050,1681 +f1: # @f1f157,1798 +.Lfunc_end1:Lfunc_end162,1941 +f3: # @f3f369,2058 +.Lfunc_end2:Lfunc_end282,2444 +f2: # @f2f289,2561 +.Lfunc_end3:Lfunc_end395,2718 +main: # @mainmain102,2843 +.LBB4_1: # %while.cond.iLBB4_1108,3022 +.Lfunc_end4:Lfunc_end4123,3542 + +externals/binaryen/test/torture-s/20000715-1.c.s,685 +test1: # @test1test17,215 +.Lfunc_end0:Lfunc_end011,384 +test2: # @test2test218,519 +.Lfunc_end1:Lfunc_end122,688 +test3: # @test3test329,823 +.Lfunc_end2:Lfunc_end233,992 +test4: # @test4test440,1127 +.Lfunc_end3:Lfunc_end350,1440 +test5: # @test5test557,1575 +.Lfunc_end4:Lfunc_end467,1888 +test6: # @test6test674,2023 +.Lfunc_end5:Lfunc_end584,2336 +main: # @mainmain91,2467 +.Lfunc_end6:Lfunc_end6101,2729 +x:x109,2880 +y:y118,3041 + +externals/binaryen/test/torture-s/struct-ini-4.c.s,167 +main: # @mainmain7,213 +.LBB0_2: # %if.thenLBB0_220,604 +.Lfunc_end0:Lfunc_end025,746 +s:s33,900 + +externals/binaryen/test/torture-s/960402-1.c.s,175 +f: # @ff7,197 +.Lfunc_end0:Lfunc_end017,520 +main: # @mainmain24,643 +.Lfunc_end1:Lfunc_end131,831 + +externals/binaryen/test/torture-s/990222-1.c.s,312 +main: # @mainmain7,209 +.LBB0_2: # %while.bodyLBB0_229,893 +.LBB0_4: # %while.endLBB0_454,1698 +.LBB0_8: # %if.thenLBB0_879,2552 +.Lfunc_end0:Lfunc_end084,2694 +line:line91,2848 + +externals/binaryen/test/torture-s/20071120-1.c.s,877 +vec_assert_fail: # @vec_assert_failvec_assert_fail7,255 +.Lfunc_end0:Lfunc_end012,411 +perform_access_checks: # @perform_access_checksperform_access_checks19,630 +.Lfunc_end1:Lfunc_end125,806 +pop_to_parent_deferring_access_checks: # @pop_to_parent_deferring_access_checkspop_to_parent_deferring_access_checks32,1101 +.LBB2_2: # %if.elseLBB2_247,1631 +.LBB2_7: # %cond.false.i26LBB2_779,2733 +.LBB2_8: # %if.then15LBB2_883,2882 +.Lfunc_end2:Lfunc_end288,3046 +main: # @mainmain95,3241 +.Lfunc_end3:Lfunc_end3114,3844 +deferred_access_no_check:deferred_access_no_check120,4021 +gt_pch_rs_gt_cp_semantics_h:gt_pch_rs_gt_cp_semantics_h129,4340 +deferred_access_stack:deferred_access_stack136,4565 + +externals/binaryen/test/torture-s/stdarg-1.c.s,1707 +foo: # @foofoo7,205 +.LBB0_2: # %sw.defaultLBB0_219,565 +.Lfunc_end0:Lfunc_end024,710 +bar: # @barbar31,833 +.LBB1_4: # %if.then5LBB1_472,2092 +.LBB1_5: # %if.then7LBB1_576,2225 +.LBB1_8: # %if.end22LBB1_8126,3858 +.LBB1_9: # %if.then19LBB1_9131,4015 +.Lfunc_end1:Lfunc_end1136,4159 +f0: # @f0f0143,4278 +.Lfunc_end2:Lfunc_end2148,4463 +f1: # @f1f1155,4580 +.Lfunc_end3:Lfunc_end3160,4765 +f2: # @f2f2167,4882 +.Lfunc_end4:Lfunc_end4199,5829 +f3: # @f3f3206,5946 +.Lfunc_end5:Lfunc_end5229,6618 +f4: # @f4f4236,6735 +.LBB6_2: # %sw.default.iLBB6_2274,7842 +.Lfunc_end6:Lfunc_end6279,7989 +f5: # @f5f5286,8106 +.Lfunc_end7:Lfunc_end7307,8730 +f6: # @f6f6314,8847 +.Lfunc_end8:Lfunc_end8346,9800 +f7: # @f7f7353,9917 +.Lfunc_end9:Lfunc_end9376,10600 +f8: # @f8f8383,10717 +.Lfunc_end10:Lfunc_end10418,11739 +main: # @mainmain425,11866 +.LBB11_11: # %if.then22LBB11_11583,16871 +.Lfunc_end11:Lfunc_end11588,17015 +foo_arg:foo_arg596,17192 +gap:gap605,17373 +pap:pap614,17518 +bar_arg:bar_arg623,17679 +d:d632,17852 +x:x641,18018 + +externals/binaryen/test/torture-s/bf64-1.c.s,272 +sub: # @subsub7,203 +.Lfunc_end0:Lfunc_end016,511 +sub2: # @sub2sub223,638 +.Lfunc_end1:Lfunc_end132,943 +main: # @mainmain39,1072 +.Lfunc_end2:Lfunc_end246,1262 + +externals/binaryen/test/torture-s/builtin-prefetch-2.c.s,1064 +simple_global: # @simple_globalsimple_global7,255 +.Lfunc_end0:Lfunc_end011,432 +simple_file: # @simple_filesimple_file18,607 +.Lfunc_end1:Lfunc_end122,782 +simple_static_local: # @simple_static_localsimple_static_local29,985 +.Lfunc_end2:Lfunc_end233,1168 +simple_local: # @simple_localsimple_local40,1359 +.Lfunc_end3:Lfunc_end356,1879 +simple_arg: # @simple_argsimple_arg63,2048 +.Lfunc_end4:Lfunc_end473,2390 +expr_global: # @expr_globalexpr_global80,2559 +.Lfunc_end5:Lfunc_end584,2734 +expr_local: # @expr_localexpr_local91,2901 +.Lfunc_end6:Lfunc_end699,3193 +main: # @mainmain106,3334 +.Lfunc_end7:Lfunc_end7127,3965 +glob_int_arr:glob_int_arr135,4160 +glob_ptr_int:glob_ptr_int144,4365 +glob_int:glob_int153,4562 +str:str162,4745 +ptr_str:ptr_str171,4910 +stat_int_arr:stat_int_arr178,5050 +stat_int:stat_int185,5193 + +externals/binaryen/test/torture-s/pr59387.c.s,312 +main: # @mainmain7,208 +.LBB0_1: # %for.cond1.preheaderLBB0_117,480 +.LBB0_3: # %returnLBB0_339,1247 +.Lfunc_end0:Lfunc_end050,1573 +d:d58,1724 +e:e67,1860 +a:a76,1993 +b:b85,2154 +c:c93,2274 +f:f102,2434 + +externals/binaryen/test/torture-s/20030914-2.c.s,189 +f: # @ff7,199 +.Lfunc_end0:Lfunc_end014,433 +main: # @mainmain21,556 +.Lfunc_end1:Lfunc_end128,744 +gs:gs36,899 + +externals/binaryen/test/torture-s/pr58640-2.c.s,289 +fn1: # @fn1fn17,206 +.Lfunc_end0:Lfunc_end052,1400 +main: # @mainmain59,1527 +.LBB1_2: # %if.thenLBB1_281,2123 +.Lfunc_end1:Lfunc_end186,2265 +a:a94,2416 +b:b103,2550 +c:c112,2711 + +externals/binaryen/test/torture-s/20101011-1.c.s,197 +sigfpe: # @sigfpesigfpe7,219 +.Lfunc_end0:Lfunc_end014,408 +main: # @mainmain21,541 +.Lfunc_end1:Lfunc_end130,806 +k:k38,957 + +externals/binaryen/test/torture-s/20000717-3.c.s,259 +foo: # @foofoo7,207 +.Lfunc_end0:Lfunc_end021,598 +main: # @mainmain28,725 +.LBB1_2: # %if.thenLBB1_241,1114 +.Lfunc_end1:Lfunc_end146,1256 +c:c54,1410 + +externals/binaryen/test/torture-s/pr48814-2.c.s,286 +incr: # @incrincr7,210 +.Lfunc_end0:Lfunc_end021,629 +main: # @mainmain28,758 +.LBB1_3: # %if.thenLBB1_362,1793 +.Lfunc_end1:Lfunc_end167,1935 +arr:arr75,2097 +count:count87,2393 + +externals/binaryen/test/torture-s/20000224-1.c.s,385 +test: # @testtest7,216 +.LBB0_2: # %while.bodyLBB0_224,742 +.LBB0_4: # %while.endLBB0_446,1476 +.Lfunc_end0:Lfunc_end051,1674 +main: # @mainmain58,1803 +.Lfunc_end1:Lfunc_end166,2022 +loop_1:loop_174,2196 +loop_2:loop_283,2391 +flag:flag92,2574 + +externals/binaryen/test/torture-s/loop-15.c.s,1184 +foo: # @foofoo7,204 +.LBB0_2: # %while.bodyLBB0_215,480 +.LBB0_3: # %while.endLBB0_326,871 +.Lfunc_end0:Lfunc_end031,1048 +main: # @mainmain38,1175 +.LBB1_1: # %for.cond1.preheaderLBB1_157,1779 +.LBB1_2: # %for.cond4.preheaderLBB1_273,2462 +.LBB1_4: # %while.body.iLBB1_495,3464 +.LBB1_5: # %for.body11.preheaderLBB1_5108,4012 +.LBB1_6: # %for.body11LBB1_6114,4244 +.LBB1_9: # %for.cond17LBB1_9135,5121 +.LBB1_11: # %for.end26LBB1_11155,5956 +.LBB1_12: # %for.body30LBB1_12169,6414 +.LBB1_15: # %for.inc41LBB1_15194,7463 +.LBB1_17: # %if.thenLBB1_17216,8156 +.LBB1_18: # %if.then22LBB1_18220,8288 +.LBB1_19: # %if.then33LBB1_19224,8422 +.Lfunc_end1:Lfunc_end1229,8566 + +externals/binaryen/test/torture-s/pr58277-1.c.s,1331 +bar: # @barbar7,206 +.Lfunc_end0:Lfunc_end016,488 +baz: # @bazbaz23,611 +.Lfunc_end1:Lfunc_end129,793 +main: # @mainmain36,920 +.LBB2_1: # %for.bodyLBB2_157,1553 +.LBB2_3: # %for.cond.preheader.iLBB2_3101,2975 +.LBB2_4: # %for.cond3.preheader.iLBB2_4119,3561 +.LBB2_6: # %if.end110.iLBB2_6142,4477 +.LBB2_7: # %for.end.iLBB2_7164,5276 +.LBB2_8: # %foo.exit.threadLBB2_8223,6995 +.LBB2_9: # %for.inc7LBB2_9232,7310 +.LBB2_12: # %for.cond12.preheaderLBB2_12255,8110 +.LBB2_13: # %for.body15LBB2_13260,8371 +.LBB2_16: # %for.end29LBB2_16322,10422 +.LBB2_18: # %if.then46LBB2_18412,13178 +.Lfunc_end2:Lfunc_end2417,13323 +e:e425,13474 +i:i434,13610 +l:l443,13746 +u:u451,13895 +m:m460,14059 +a:a467,14191 +d:d476,14323 +n:n485,14484 +j:j492,14619 +b:b501,14752 +c:c510,14913 +f:f519,15074 +g:g528,15235 +h:h537,15396 +k:k546,15557 +o:o555,15718 +p:p564,15879 + +externals/binaryen/test/torture-s/pr51877.c.s,592 +bar: # @barbar7,204 +.Lfunc_end0:Lfunc_end026,776 +baz: # @bazbaz33,899 +.Lfunc_end1:Lfunc_end139,1081 +foo: # @foofoo46,1204 +.LBB2_2: # %if.elseLBB2_273,2039 +.LBB2_3: # %if.endLBB2_379,2261 +.Lfunc_end2:Lfunc_end288,2569 +main: # @mainmain95,2696 +.LBB3_13: # %if.then39LBB3_13211,6578 +.Lfunc_end3:Lfunc_end3216,6722 +a:a231,7021 +b:b240,7155 + +externals/binaryen/test/torture-s/20000801-3.c.s,167 +main: # @mainmain7,211 +.LBB0_2: # %if.elseLBB0_220,602 +.Lfunc_end0:Lfunc_end025,744 +s:s33,898 + +externals/binaryen/test/torture-s/pr57344-2.c.s,425 +foo: # @foofoo7,206 +.LBB0_2: # %if.thenLBB0_218,501 +.Lfunc_end0:Lfunc_end023,643 +main: # @mainmain30,770 +.LBB1_3: # %for.body.for.body_crit_edgeLBB1_357,1640 +.LBB1_4: # %for.endLBB1_488,2658 +.Lfunc_end1:Lfunc_end194,2864 +s:s102,3015 +i:i111,3149 + +externals/binaryen/test/torture-s/921007-1.c.s,90 +main: # @mainmain7,209 +.Lfunc_end0:Lfunc_end014,396 + +externals/binaryen/test/torture-s/pr53084.c.s,246 +bar: # @barbar7,204 +.LBB0_4: # %if.thenLBB0_425,832 +.Lfunc_end0:Lfunc_end030,974 +main: # @mainmain37,1101 +.Lfunc_end1:Lfunc_end145,1371 + +externals/binaryen/test/torture-s/20030109-1.c.s,167 +main: # @mainmain7,211 +.LBB0_2: # %if.thenLBB0_219,574 +.Lfunc_end0:Lfunc_end024,716 +x:x32,870 + +externals/binaryen/test/torture-s/20041011-1.c.s,2903 +t1: # @t1t17,203 +.LBB0_2: # %while.bodyLBB0_221,775 +.LBB0_4: # %while.endLBB0_4153,4512 +.Lfunc_end0:Lfunc_end0158,4712 +t2: # @t2t2165,4829 +.LBB1_2: # %while.bodyLBB1_2177,5346 +.LBB1_4: # %while.endLBB1_4311,9139 +.Lfunc_end1:Lfunc_end1316,9339 +t3: # @t3t3323,9456 +.LBB2_2: # %while.bodyLBB2_2337,10027 +.LBB2_4: # %while.endLBB2_4469,13763 +.Lfunc_end2:Lfunc_end2474,13963 +t4: # @t4t4481,14080 +.LBB3_2: # %while.bodyLBB3_2493,14597 +.LBB3_4: # %while.endLBB3_4627,18390 +.Lfunc_end3:Lfunc_end3632,18590 +t5: # @t5t5639,18707 +.LBB4_2: # %while.bodyLBB4_2651,19224 +.LBB4_4: # %while.endLBB4_4783,22954 +.Lfunc_end4:Lfunc_end4788,23154 +t6: # @t6t6795,23271 +.LBB5_2: # %while.bodyLBB5_2808,23813 +.LBB5_4: # %while.endLBB5_4939,27513 +.Lfunc_end5:Lfunc_end5944,27714 +t7: # @t7t7951,27831 +.LBB6_2: # %while.bodyLBB6_2966,28429 +.LBB6_4: # %while.endLBB6_41097,32135 +.Lfunc_end6:Lfunc_end61102,32336 +t8: # @t8t81109,32453 +.LBB7_2: # %while.bodyLBB7_21124,33049 +.LBB7_4: # %while.endLBB7_41255,36755 +.Lfunc_end7:Lfunc_end71260,36956 +t9: # @t9t91267,37073 +.LBB8_2: # %while.bodyLBB8_21282,37671 +.LBB8_4: # %while.endLBB8_41413,41377 +.Lfunc_end8:Lfunc_end81418,41578 +t10: # @t10t101425,41699 +.LBB9_2: # %while.bodyLBB9_21442,42353 +.LBB9_4: # %while.endLBB9_41572,46036 +.Lfunc_end9:Lfunc_end91577,46237 +t11: # @t11t111584,46360 +.LBB10_2: # %while.bodyLBB10_21601,47015 +.LBB10_4: # %while.endLBB10_41731,50698 +.Lfunc_end10:Lfunc_end101736,50899 +neg: # @negneg1743,51024 +.Lfunc_end11:Lfunc_end111751,51277 +main: # @mainmain1758,51406 +.LBB12_24: # %if.then94LBB12_241948,58289 +.Lfunc_end12:Lfunc_end121953,58434 +gvol:gvol1961,58599 +gull:gull1970,58753 + +externals/binaryen/test/torture-s/941025-1.c.s,175 +f: # @ff7,197 +.Lfunc_end0:Lfunc_end018,542 +main: # @mainmain25,665 +.Lfunc_end1:Lfunc_end132,853 + +externals/binaryen/test/torture-s/va-arg-11.c.s,247 +main: # @mainmain7,210 +.LBB0_2: # %if.thenLBB0_233,979 +.Lfunc_end0:Lfunc_end038,1121 +foo: # @foofoo43,1221 +.Lfunc_end1:Lfunc_end162,1774 + +externals/binaryen/test/torture-s/960312-1.c.s,242 +f: # @ff7,197 +.Lfunc_end0:Lfunc_end033,858 +main: # @mainmain40,981 +.LBB1_2: # %if.thenLBB1_265,1647 +.Lfunc_end1:Lfunc_end170,1789 + +externals/binaryen/test/torture-s/980709-1.c.s,157 +main: # @mainmain7,209 +.LBB0_3: # %if.elseLBB0_346,1530 +.Lfunc_end0:Lfunc_end051,1672 + +externals/binaryen/test/torture-s/printf-1.c.s,183 +main: # @mainmain7,209 +.LBB0_11: # %if.then50LBB0_11149,5003 +.Lfunc_end0:Lfunc_end0154,5147 +.Lstr:Lstr194,5864 + +externals/binaryen/test/torture-s/960419-2.c.s,90 +main: # @mainmain7,209 +.Lfunc_end0:Lfunc_end014,396 + +externals/binaryen/test/torture-s/20050502-2.c.s,336 +foo: # @foofoo7,207 +.Lfunc_end0:Lfunc_end014,435 +bar: # @barbar21,558 +.Lfunc_end1:Lfunc_end128,786 +main: # @mainmain35,913 +.LBB2_3: # %if.then6LBB2_389,2606 +.Lfunc_end2:Lfunc_end294,2749 + +externals/binaryen/test/torture-s/pr53645-2.c.s,3098 +uq44444444: # @uq44444444uq444444447,234 +.Lfunc_end0:Lfunc_end073,2134 +ur44444444: # @ur44444444ur4444444480,2299 +.Lfunc_end1:Lfunc_end1146,4191 +sq44444444: # @sq44444444sq44444444153,4356 +.Lfunc_end2:Lfunc_end2219,6256 +sr44444444: # @sr44444444sr44444444226,6421 +.Lfunc_end3:Lfunc_end3292,8321 +uq1428166432128: # @uq1428166432128uq1428166432128299,8506 +.Lfunc_end4:Lfunc_end4363,10352 +ur1428166432128: # @ur1428166432128ur1428166432128370,10547 +.Lfunc_end5:Lfunc_end5434,12379 +sq1428166432128: # @sq1428166432128sq1428166432128441,12574 +.Lfunc_end6:Lfunc_end6505,14425 +sr1428166432128: # @sr1428166432128sr1428166432128512,14620 +.Lfunc_end7:Lfunc_end7576,16459 +uq33333333: # @uq33333333uq33333333583,16634 +.Lfunc_end8:Lfunc_end8649,18534 +ur33333333: # @ur33333333ur33333333656,18699 +.Lfunc_end9:Lfunc_end9722,20599 +sq33333333: # @sq33333333sq33333333729,20764 +.Lfunc_end10:Lfunc_end10795,22664 +sr33333333: # @sr33333333sr33333333802,22831 +.Lfunc_end11:Lfunc_end11868,24731 +uq65656565: # @uq65656565uq65656565875,24898 +.Lfunc_end12:Lfunc_end12941,26798 +ur65656565: # @ur65656565ur65656565948,26965 +.Lfunc_end13:Lfunc_end131014,28865 +sq65656565: # @sq65656565sq656565651021,29032 +.Lfunc_end14:Lfunc_end141087,30932 +sr65656565: # @sr65656565sr656565651094,31099 +.Lfunc_end15:Lfunc_end151160,32999 +uq14141461461414: # @uq14141461461414uq141414614614141167,33190 +.Lfunc_end16:Lfunc_end161233,35102 +ur14141461461414: # @ur14141461461414ur141414614614141240,35305 +.Lfunc_end17:Lfunc_end171306,37217 +sq14141461461414: # @sq14141461461414sq141414614614141313,37420 +.Lfunc_end18:Lfunc_end181379,39332 +sr14141461461414: # @sr14141461461414sr141414614614141386,39535 +.Lfunc_end19:Lfunc_end191452,41447 +uq77777777: # @uq77777777uq777777771459,41626 +.Lfunc_end20:Lfunc_end201525,43526 +ur77777777: # @ur77777777ur777777771532,43693 +.Lfunc_end21:Lfunc_end211598,45593 +sq77777777: # @sq77777777sq777777771605,45760 +.Lfunc_end22:Lfunc_end221671,47660 +sr77777777: # @sr77777777sr777777771678,47827 +.Lfunc_end23:Lfunc_end231744,49727 +main: # @mainmain1751,49870 +.LBB24_1: # %for.bodyLBB24_11764,50331 +.LBB24_99: # %for.body919LBB24_993015,96464 +.LBB24_197: # %if.then1842LBB24_1974399,147334 +.Lfunc_end24:Lfunc_end244404,147480 +u:u4412,147636 +s:s4436,148399 + +externals/binaryen/test/torture-s/20021010-1.c.s,179 +sub: # @subsub7,207 +.Lfunc_end0:Lfunc_end013,417 +main: # @mainmain20,544 +.Lfunc_end1:Lfunc_end127,731 + +externals/binaryen/test/torture-s/20080502-1.c.s,246 +foo: # @foofoo7,207 +.Lfunc_end0:Lfunc_end023,726 +main: # @mainmain30,853 +.LBB1_2: # %if.thenLBB1_258,1764 +.Lfunc_end1:Lfunc_end163,1906 + +externals/binaryen/test/torture-s/20050316-3.c.s,278 +test1: # @test1test17,215 +.Lfunc_end0:Lfunc_end016,504 +test2: # @test2test223,639 +.Lfunc_end1:Lfunc_end134,995 +main: # @mainmain41,1126 +.Lfunc_end2:Lfunc_end247,1340 + +externals/binaryen/test/torture-s/pr29798.c.s,90 +main: # @mainmain7,208 +.Lfunc_end0:Lfunc_end013,423 + +externals/binaryen/test/torture-s/pr45695.c.s,328 +g: # @gg7,196 +.Lfunc_end0:Lfunc_end014,390 +f: # @ff21,501 +.Lfunc_end1:Lfunc_end132,852 +main: # @mainmain39,975 +.LBB2_3: # %if.then8LBB2_365,1754 +.Lfunc_end2:Lfunc_end270,1897 + +externals/binaryen/test/torture-s/20001026-1.c.s,90 +main: # @mainmain7,211 +.Lfunc_end0:Lfunc_end013,423 + +externals/binaryen/test/torture-s/loop-ivopts-2.c.s,593 +check: # @checkcheck7,218 +.LBB0_1: # %for.bodyLBB0_112,362 +.LBB0_4: # %if.thenLBB0_444,1420 +.Lfunc_end0:Lfunc_end049,1562 +main: # @mainmain56,1693 +.LBB1_1: # %for.bodyLBB1_168,2073 +.LBB1_3: # %for.body3LBB1_385,2644 +.LBB1_5: # %for.body.iLBB1_5155,4603 +.LBB1_8: # %if.then.iLBB1_8192,5833 +.Lfunc_end1:Lfunc_end1197,5977 + +externals/binaryen/test/torture-s/20041112-1.c.s,205 +bar: # @barbar7,207 +.Lfunc_end0:Lfunc_end034,1035 +main: # @mainmain41,1162 +.Lfunc_end1:Lfunc_end150,1450 +global:global58,1621 + +externals/binaryen/test/torture-s/930713-1.c.s,175 +f: # @ff7,197 +.Lfunc_end0:Lfunc_end014,420 +main: # @mainmain21,543 +.Lfunc_end1:Lfunc_end128,730 + +externals/binaryen/test/torture-s/991201-1.c.s,574 +reset_palette: # @reset_palettereset_palette7,245 +.LBB0_1: # %for.bodyLBB0_117,529 +.Lfunc_end0:Lfunc_end052,1662 +bar: # @barbar59,1805 +.LBB1_2: # %if.thenLBB1_268,2082 +.Lfunc_end1:Lfunc_end173,2224 +main: # @mainmain80,2351 +.Lfunc_end2:Lfunc_end289,2600 +a_con:a_con97,2767 +vc_cons:vc_cons106,2936 +default_red:default_red177,3685 +default_grn:default_grn186,3879 +default_blu:default_blu195,4073 + +externals/binaryen/test/torture-s/pr34130.c.s,180 +foo: # @foofoo7,204 +.Lfunc_end0:Lfunc_end026,759 +main: # @mainmain33,886 +.Lfunc_end1:Lfunc_end139,1098 + +externals/binaryen/test/torture-s/20011121-1.c.s,104 +main: # @mainmain7,211 +.Lfunc_end0:Lfunc_end014,398 +s1:s122,553 + +externals/binaryen/test/torture-s/20001101.c.s,346 +dummy: # @dummydummy7,213 +.Lfunc_end0:Lfunc_end018,536 +bogus: # @bogusbogus25,671 +.LBB1_2: # %if.then7LBB1_238,1069 +.Lfunc_end1:Lfunc_end143,1212 +main: # @mainmain50,1343 +.Lfunc_end2:Lfunc_end257,1530 + +externals/binaryen/test/torture-s/va-arg-8.c.s,253 +debug: # @debugdebug7,213 +.LBB0_3: # %if.then5LBB0_347,1482 +.Lfunc_end0:Lfunc_end052,1625 +main: # @mainmain59,1756 +.Lfunc_end1:Lfunc_end179,2341 + +externals/binaryen/test/torture-s/20071202-1.c.s,251 +foo: # @foofoo7,207 +.Lfunc_end0:Lfunc_end027,771 +main: # @mainmain34,898 +.LBB1_18: # %if.then63LBB1_18159,5275 +.Lfunc_end1:Lfunc_end1164,5419 + +externals/binaryen/test/torture-s/921104-1.c.s,90 +main: # @mainmain7,209 +.Lfunc_end0:Lfunc_end014,396 + +externals/binaryen/test/torture-s/20030216-1.c.s,106 +main: # @mainmain7,211 +.Lfunc_end0:Lfunc_end013,422 +one:one21,585 + +externals/binaryen/test/torture-s/divcmp-2.c.s,661 +test1: # @test1test17,213 +.Lfunc_end0:Lfunc_end017,525 +test2: # @test2test224,660 +.Lfunc_end1:Lfunc_end134,970 +test3: # @test3test341,1105 +.Lfunc_end2:Lfunc_end251,1416 +test4: # @test4test458,1551 +.Lfunc_end3:Lfunc_end368,1862 +test5: # @test5test575,1997 +.Lfunc_end4:Lfunc_end485,2307 +test6: # @test6test692,2442 +.Lfunc_end5:Lfunc_end5102,2754 +main: # @mainmain109,2885 +.Lfunc_end6:Lfunc_end6115,3099 + +externals/binaryen/test/torture-s/20031216-1.c.s,370 +DisplayNumber: # @DisplayNumberDisplayNumber7,247 +.LBB0_2: # %if.thenLBB0_216,535 +.Lfunc_end0:Lfunc_end021,677 +ReadNumber: # @ReadNumberReadNumber28,848 +.Lfunc_end1:Lfunc_end134,1072 +main: # @mainmain41,1213 +.Lfunc_end2:Lfunc_end247,1424 + +externals/binaryen/test/torture-s/pr44164.c.s,259 +foo: # @foofoo7,204 +.Lfunc_end0:Lfunc_end020,566 +main: # @mainmain27,693 +.LBB1_2: # %if.thenLBB1_242,1135 +.Lfunc_end1:Lfunc_end147,1277 +a:a55,1428 + +externals/binaryen/test/torture-s/931004-12.c.s,449 +f: # @ff7,198 +.LBB0_2: # %for.bodyLBB0_233,928 +.LBB0_7: # %for.endLBB0_775,2479 +.LBB0_9: # %if.then21LBB0_987,2891 +.LBB0_10: # %if.then14LBB0_1091,3025 +.Lfunc_end0:Lfunc_end096,3169 +main: # @mainmain103,3292 +.Lfunc_end1:Lfunc_end1174,5267 + +externals/binaryen/test/torture-s/pr57130.c.s,259 +foo: # @foofoo7,204 +.LBB0_2: # %if.thenLBB0_228,824 +.Lfunc_end0:Lfunc_end033,966 +main: # @mainmain40,1093 +.Lfunc_end1:Lfunc_end182,2399 +s:s90,2553 + +externals/binaryen/test/torture-s/pr47337.c.s,292 +main: # @mainmain7,208 +.LBB0_1: # %for.cond2.preheaderLBB0_116,484 +.LBB0_4: # %if.end25LBB0_496,2904 +.Lfunc_end0:Lfunc_end0101,3101 +w:w115,3375 +a:a128,3610 +d:d135,3719 +b:b142,3851 + +externals/binaryen/test/torture-s/pr57124.c.s,244 +foo: # @foofoo7,204 +.LBB0_2: # %if.endLBB0_219,565 +.Lfunc_end0:Lfunc_end025,734 +main: # @mainmain32,861 +.Lfunc_end1:Lfunc_end154,1481 + +externals/binaryen/test/torture-s/20010711-1.c.s,179 +foo: # @foofoo7,207 +.Lfunc_end0:Lfunc_end012,388 +main: # @mainmain19,515 +.Lfunc_end1:Lfunc_end126,702 + +externals/binaryen/test/torture-s/921019-1.c.s,172 +main: # @mainmain7,209 +.LBB0_2: # %if.thenLBB0_221,631 +.Lfunc_end0:Lfunc_end026,773 +foo:foo40,1055 + +externals/binaryen/test/torture-s/scope-1.c.s,254 +f: # @ff7,196 +.LBB0_2: # %if.thenLBB0_219,542 +.Lfunc_end0:Lfunc_end024,684 +main: # @mainmain31,807 +.Lfunc_end1:Lfunc_end139,1023 +v:v47,1177 + +externals/binaryen/test/torture-s/20030117-1.c.s,269 +main: # @mainmain7,211 +.Lfunc_end0:Lfunc_end014,400 +foo: # @foofoo21,525 +.Lfunc_end1:Lfunc_end131,847 +bar: # @barbar38,970 +.Lfunc_end2:Lfunc_end251,1379 + +externals/binaryen/test/torture-s/930123-1.c.s,175 +f: # @ff7,197 +.Lfunc_end0:Lfunc_end016,467 +main: # @mainmain23,590 +.Lfunc_end1:Lfunc_end130,778 + +externals/binaryen/test/torture-s/arith-rand.c.s,1385 +simple_rand: # @simple_randsimple_rand7,239 +.Lfunc_end0:Lfunc_end024,782 +random_bitstring: # @random_bitstringrandom_bitstring31,973 +.LBB1_1: # %for.condLBB1_139,1222 +.LBB1_4: # %if.endLBB1_471,2339 +.LBB1_5: # %cleanupLBB1_577,2604 +.Lfunc_end1:Lfunc_end185,2873 +main: # @mainmain92,3026 +.LBB2_1: # %for.bodyLBB2_199,3272 +.LBB2_2: # %for.cond.iLBB2_2109,3641 +.LBB2_5: # %if.end.iLBB2_5142,4842 +.LBB2_6: # %random_bitstring.exitLBB2_6148,5109 +.LBB2_7: # %for.cond.i339LBB2_7154,5337 +.LBB2_10: # %if.end.i350LBB2_10187,6552 +.LBB2_11: # %random_bitstring.exit352LBB2_11193,6825 +.LBB2_14: # %if.end25LBB2_14211,7586 +.LBB2_21: # %cleanup229LBB2_21330,11928 +.LBB2_23: # %if.then136LBB2_23346,12494 +.LBB2_24: # %if.then40LBB2_24352,12692 +.LBB2_25: # %if.then227LBB2_25358,12889 +.Lfunc_end2:Lfunc_end2365,13097 + +externals/binaryen/test/torture-s/strct-pack-4.c.s,289 +my_set_a: # @my_set_amy_set_a7,229 +.Lfunc_end0:Lfunc_end013,446 +my_set_b: # @my_set_bmy_set_b20,599 +.Lfunc_end1:Lfunc_end126,817 +main: # @mainmain33,954 +.Lfunc_end2:Lfunc_end240,1141 + +externals/binaryen/test/torture-s/pr58570.c.s,261 +main: # @mainmain7,208 +.LBB0_2: # %if.endLBB0_233,981 +.LBB0_4: # %if.then6LBB0_456,1700 +.Lfunc_end0:Lfunc_end061,1843 +e:e69,1997 +d:d76,2129 +i:i85,2263 + +externals/binaryen/test/torture-s/20020215-1.c.s,180 +foo: # @foofoo7,207 +.Lfunc_end0:Lfunc_end028,812 +main: # @mainmain35,939 +.Lfunc_end1:Lfunc_end142,1127 + +externals/binaryen/test/torture-s/960405-1.c.s,180 +main: # @mainmain7,209 +.LBB0_2: # %if.endLBB0_225,760 +.Lfunc_end0:Lfunc_end031,929 +x:x39,1083 +y:y49,1283 + +externals/binaryen/test/torture-s/pr58564.c.s,139 +main: # @mainmain7,208 +.Lfunc_end0:Lfunc_end016,490 +c:c24,641 +d:d33,777 +a:a42,910 +b:b51,1071 + +externals/binaryen/test/torture-s/pr57131.c.s,157 +main: # @mainmain7,208 +.LBB0_2: # %if.thenLBB0_253,1517 +.Lfunc_end0:Lfunc_end058,1659 + +externals/binaryen/test/torture-s/divcmp-3.c.s,1257 +test1: # @test1test17,213 +.Lfunc_end0:Lfunc_end014,439 +test1u: # @test1utest1u21,578 +.Lfunc_end1:Lfunc_end128,805 +test2: # @test2test235,942 +.Lfunc_end2:Lfunc_end242,1168 +test2u: # @test2utest2u49,1307 +.Lfunc_end3:Lfunc_end356,1534 +test3: # @test3test363,1671 +.Lfunc_end4:Lfunc_end470,1897 +test3u: # @test3utest3u77,2036 +.Lfunc_end5:Lfunc_end584,2263 +test4: # @test4test491,2400 +.Lfunc_end6:Lfunc_end698,2626 +test4u: # @test4utest4u105,2765 +.Lfunc_end7:Lfunc_end7112,2992 +test5: # @test5test5119,3129 +.Lfunc_end8:Lfunc_end8126,3355 +test5u: # @test5utest5u133,3494 +.Lfunc_end9:Lfunc_end9140,3721 +test6: # @test6test6147,3858 +.Lfunc_end10:Lfunc_end10154,4084 +test6u: # @test6utest6u161,4225 +.Lfunc_end11:Lfunc_end11168,4452 +main: # @mainmain175,4587 +.Lfunc_end12:Lfunc_end12181,4798 + +externals/binaryen/test/torture-s/931004-13.c.s,248 +f: # @ff7,198 +.LBB0_14: # %if.then67LBB0_1477,2730 +.Lfunc_end0:Lfunc_end082,2874 +main: # @mainmain89,2997 +.Lfunc_end1:Lfunc_end1148,4612 + +externals/binaryen/test/torture-s/20030828-1.c.s,193 +bar: # @barbar7,207 +.Lfunc_end0:Lfunc_end017,527 +main: # @mainmain24,654 +.Lfunc_end1:Lfunc_end145,1218 +p:p53,1369 + +externals/binaryen/test/torture-s/20040706-1.c.s,90 +main: # @mainmain7,211 +.Lfunc_end0:Lfunc_end014,398 + +externals/binaryen/test/torture-s/pr43385.c.s,421 +foo: # @foofoo7,204 +.LBB0_3: # %if.endLBB0_323,719 +.Lfunc_end0:Lfunc_end027,883 +bar: # @barbar34,1006 +.Lfunc_end1:Lfunc_end145,1347 +main: # @mainmain52,1474 +.LBB2_13: # %if.then50LBB2_13132,4246 +.Lfunc_end2:Lfunc_end2137,4390 +e:e145,4541 + +externals/binaryen/test/torture-s/pr38051.c.s,6980 +mymemcmp: # @mymemcmpmymemcmp7,229 +.LBB0_5: # %if.thenLBB0_567,1893 +.LBB0_9: # %sw.bb12.i18LBB0_990,2709 +.LBB0_10: # %sw.bb17.iLBB0_1096,2924 +.LBB0_11: # %sw.bb.i16LBB0_11109,3307 +.LBB0_12: # %sw.bb12.iLBB0_12121,3669 +.LBB0_13: # %sw.bb.iLBB0_13136,4131 +.LBB0_15:LBB0_15147,4451 +.LBB0_16:LBB0_16151,4569 +.LBB0_17:LBB0_17155,4687 +.LBB0_18:LBB0_18159,4805 +.LBB0_19:LBB0_19163,4924 +.LBB0_20:LBB0_20167,5043 +.LBB0_21:LBB0_21171,5162 +.LBB0_22:LBB0_22175,5281 +.LBB0_23: # =>This Inner Loop Header: Depth=1LBB0_23178,5354 +.LBB0_24: # %do1.iLBB0_24301,9429 +.LBB0_26: # %if.end37.iLBB0_26313,9947 +.LBB0_28: # in Loop: Header=BB0_23 Depth=1LBB0_28326,10473 +.LBB0_30: # %do3.iLBB0_30337,10910 +.LBB0_32: # in Loop: Header=BB0_23 Depth=1LBB0_32349,11428 +.LBB0_34: # %do2.iLBB0_34362,11882 +.LBB0_36: # in Loop: Header=BB0_23 Depth=1LBB0_36374,12400 +.LBB0_37: # %if.then35.iLBB0_37381,12667 +.LBB0_39: # %do.body.i116.iLBB0_39395,13195 +.LBB0_41: # %mymemcmp1.exit120.iLBB0_41411,13799 +.LBB0_42: # %if.then.iLBB0_42415,13952 +.LBB0_44: # %do.body.i.iLBB0_44429,14478 +.LBB0_46: # %mymemcmp1.exit.iLBB0_46445,15075 +.LBB0_47: # %if.then23.iLBB0_47449,15225 +.LBB0_49: # %do.body.i140.iLBB0_49463,15753 +.LBB0_51: # %mymemcmp1.exit144.iLBB0_51479,16353 +.LBB0_52: # %if.then29.iLBB0_52483,16506 +.LBB0_54: # %do.body.i128.iLBB0_54497,17034 +.LBB0_56: # %mymemcmp1.exit132.iLBB0_56513,17634 +.LBB0_57: # %do0.iLBB0_57517,17787 +.LBB0_59: # %if.then43.iLBB0_59526,18189 +.LBB0_61: # %do.body.i104.iLBB0_61540,18717 +.LBB0_63: # %mymemcmp1.exit108.iLBB0_63556,19321 +.LBB0_64: # %do1.i56LBB0_64560,19472 +.LBB0_66: # %if.end54.iLBB0_66576,20123 +.LBB0_68: # in Loop: Header=BB0_23 Depth=1LBB0_68589,20649 +.LBB0_70: # %do.body.i23LBB0_70598,21010 +.LBB0_72: # %do3.i42LBB0_72610,21530 +.LBB0_74: # in Loop: Header=BB0_23 Depth=1LBB0_74626,22180 +.LBB0_76: # %do2.i50LBB0_76636,22557 +.LBB0_78: # in Loop: Header=BB0_23 Depth=1LBB0_78652,23208 +.LBB0_79: # %if.then52.iLBB0_79660,23495 +.LBB0_81: # %do.body.i170.iLBB0_81674,24023 +.LBB0_83: # %mymemcmp1.exit174.iLBB0_83690,24627 +.LBB0_84: # %if.then.i24LBB0_84694,24778 +.LBB0_86: # %do.body.i.i30LBB0_86708,25305 +.LBB0_88: # %mymemcmp1.exit.i34LBB0_88724,25907 +.LBB0_89: # %if.then34.iLBB0_89728,26057 +.LBB0_91: # %do.body.i194.iLBB0_91742,26584 +.LBB0_93: # %mymemcmp1.exit198.iLBB0_93758,27187 +.LBB0_94: # %if.then43.i51LBB0_94762,27338 +.LBB0_96: # %do.body.i182.iLBB0_96776,27868 +.LBB0_98: # %mymemcmp1.exit186.iLBB0_98792,28472 +.LBB0_99: # %do0.i57LBB0_99796,28623 +.LBB0_101: # %if.then63.iLBB0_101809,29158 +.LBB0_103: # %do.body.i158.iLBB0_103823,29686 +.LBB0_105: # %mymemcmp1.exit162.iLBB0_105839,30290 +.LBB0_107: # %cleanupLBB0_107846,30635 +.LBB0_108: # in Loop: Header=BB0_23 Depth=1LBB0_108849,30743 +.LBB0_109: # in Loop: Header=BB0_23 Depth=1LBB0_109853,30928 +.LBB0_110: # in Loop: Header=BB0_23 Depth=1LBB0_110857,31112 +.LBB0_111: # in Loop: Header=BB0_23 Depth=1LBB0_111861,31296 +.LBB0_112: # in Loop: Header=BB0_23 Depth=1LBB0_112865,31480 +.LBB0_113: # in Loop: Header=BB0_23 Depth=1LBB0_113869,31664 +.LBB0_114: # in Loop: Header=BB0_23 Depth=1LBB0_114873,31849 +.LBB0_115: # in Loop: Header=BB0_23 Depth=1LBB0_115877,32034 +.LBB0_116: # in Loop: Header=BB0_23 Depth=1LBB0_116881,32219 +.LBB0_117: # in Loop: Header=BB0_23 Depth=1LBB0_117885,32404 +.LBB0_118: # in Loop: Header=BB0_23 Depth=1LBB0_118889,32589 +.LBB0_119: # in Loop: Header=BB0_23 Depth=1LBB0_119893,32774 +.LBB0_120: # in Loop: Header=BB0_23 Depth=1LBB0_120897,32959 +.LBB0_121: # in Loop: Header=BB0_23 Depth=1LBB0_121901,33144 +.LBB0_122: # in Loop: Header=BB0_23 Depth=1LBB0_122905,33329 +.LBB0_123: # in Loop: Header=BB0_23 Depth=1LBB0_123909,33513 +.LBB0_124: # in Loop: Header=BB0_23 Depth=1LBB0_124913,33697 +.LBB0_125: # in Loop: Header=BB0_23 Depth=1LBB0_125917,33881 +.LBB0_126: # in Loop: Header=BB0_23 Depth=1LBB0_126921,34065 +.LBB0_127: # in Loop: Header=BB0_23 Depth=1LBB0_127925,34249 +.LBB0_128: # in Loop: Header=BB0_23 Depth=1LBB0_128929,34433 +.LBB0_129: # in Loop: Header=BB0_23 Depth=1LBB0_129933,34617 +.LBB0_130: # in Loop: Header=BB0_23 Depth=1LBB0_130937,34801 +.LBB0_131: # in Loop: Header=BB0_23 Depth=1LBB0_131941,34985 +.LBB0_132:LBB0_132945,35169 +.Lfunc_end0:Lfunc_end0948,35200 +main: # @mainmain955,35337 +.LBB1_2: # %if.then26LBB1_21001,36838 +.Lfunc_end1:Lfunc_end11006,36983 +buf:buf1014,37142 + +externals/binaryen/test/torture-s/va-arg-9.c.s,5514 +to_hex: # @to_hexto_hex7,217 +.LBB0_2: # %if.thenLBB0_220,606 +.Lfunc_end0:Lfunc_end025,748 +fap: # @fapfap32,877 +.LBB1_2: # %while.condLBB1_243,1199 +.LBB1_6: # %while.endLBB1_673,2287 +.LBB1_7: # %if.then.iLBB1_776,2391 +.Lfunc_end1:Lfunc_end181,2535 +f0: # @f0f088,2654 +.LBB2_2: # %while.cond.iLBB2_2107,3272 +.LBB2_6: # %fap.exitLBB2_6137,4372 +.LBB2_7: # %if.then.i.iLBB2_7144,4596 +.Lfunc_end2:Lfunc_end2149,4742 +f1: # @f1f1156,4859 +.LBB3_2: # %while.cond.iLBB3_2175,5482 +.LBB3_6: # %fap.exitLBB3_6205,6582 +.LBB3_7: # %if.then.i.iLBB3_7212,6806 +.Lfunc_end3:Lfunc_end3217,6952 +f2: # @f2f2224,7069 +.LBB4_2: # %while.cond.iLBB4_2243,7698 +.LBB4_6: # %fap.exitLBB4_6273,8802 +.LBB4_7: # %if.then.i.iLBB4_7280,9027 +.Lfunc_end4:Lfunc_end4285,9174 +f3: # @f3f3292,9291 +.LBB5_2: # %while.cond.iLBB5_2311,9925 +.LBB5_6: # %fap.exitLBB5_6341,11029 +.LBB5_7: # %if.then.i.iLBB5_7348,11254 +.Lfunc_end5:Lfunc_end5353,11401 +f4: # @f4f4360,11518 +.LBB6_2: # %while.cond.iLBB6_2379,12157 +.LBB6_6: # %fap.exitLBB6_6409,13261 +.LBB6_7: # %if.then.i.iLBB6_7416,13486 +.Lfunc_end6:Lfunc_end6421,13633 +f5: # @f5f5428,13750 +.LBB7_2: # %while.cond.iLBB7_2447,14394 +.LBB7_6: # %fap.exitLBB7_6477,15498 +.LBB7_7: # %if.then.i.iLBB7_7484,15723 +.Lfunc_end7:Lfunc_end7489,15870 +f6: # @f6f6496,15987 +.LBB8_2: # %while.cond.iLBB8_2515,16639 +.LBB8_6: # %fap.exitLBB8_6545,17743 +.LBB8_7: # %if.then.i.iLBB8_7552,17969 +.Lfunc_end8:Lfunc_end8557,18116 +f7: # @f7f7564,18233 +.LBB9_2: # %while.cond.iLBB9_2583,18889 +.LBB9_6: # %fap.exitLBB9_6613,19995 +.LBB9_7: # %if.then.i.iLBB9_7620,20221 +.Lfunc_end9:Lfunc_end9625,20368 +f8: # @f8f8632,20485 +.LBB10_2: # %while.cond.iLBB10_2651,21146 +.LBB10_6: # %fap.exitLBB10_6681,22256 +.LBB10_7: # %if.then.i.iLBB10_7688,22482 +.Lfunc_end10:Lfunc_end10693,22629 +f9: # @f9f9700,22748 +.LBB11_2: # %while.cond.iLBB11_2719,23416 +.LBB11_6: # %fap.exitLBB11_6749,24529 +.LBB11_7: # %if.then.i.iLBB11_7756,24755 +.Lfunc_end11:Lfunc_end11761,24902 +f10: # @f10f10768,25025 +.LBB12_2: # %while.cond.iLBB12_2787,25700 +.LBB12_6: # %fap.exitLBB12_6817,26816 +.LBB12_7: # %if.then.i.iLBB12_7824,27042 +.Lfunc_end12:Lfunc_end12829,27189 +f11: # @f11f11836,27314 +.LBB13_2: # %while.cond.iLBB13_2855,27994 +.LBB13_6: # %fap.exitLBB13_6885,29110 +.LBB13_7: # %if.then.i.iLBB13_7892,29336 +.Lfunc_end13:Lfunc_end13897,29483 +f12: # @f12f12904,29608 +.LBB14_2: # %while.cond.iLBB14_2923,30293 +.LBB14_6: # %fap.exitLBB14_6953,31409 +.LBB14_7: # %if.then.i.iLBB14_7960,31635 +.Lfunc_end14:Lfunc_end14965,31782 +f13: # @f13f13972,31907 +.LBB15_2: # %while.cond.iLBB15_2991,32597 +.LBB15_6: # %fap.exitLBB15_61021,33713 +.LBB15_7: # %if.then.i.iLBB15_71028,33939 +.Lfunc_end15:Lfunc_end151033,34086 +f14: # @f14f141040,34211 +.LBB16_2: # %while.cond.iLBB16_21059,34906 +.LBB16_6: # %fap.exitLBB16_61089,36022 +.LBB16_7: # %if.then.i.iLBB16_71096,36248 +.Lfunc_end16:Lfunc_end161101,36395 +f15: # @f15f151108,36520 +.LBB17_2: # %while.cond.iLBB17_21127,37220 +.LBB17_6: # %fap.exitLBB17_61157,38336 +.LBB17_7: # %if.then.i.iLBB17_71164,38562 +.Lfunc_end17:Lfunc_end171169,38709 +main: # @mainmain1176,38838 +.Lfunc_end18:Lfunc_end181565,51190 + +externals/binaryen/test/torture-s/920411-1.c.s,175 +f: # @ff7,197 +.Lfunc_end0:Lfunc_end014,432 +main: # @mainmain21,555 +.Lfunc_end1:Lfunc_end128,743 + +externals/binaryen/test/torture-s/20050111-1.c.s,270 +foo: # @foofoo7,207 +.Lfunc_end0:Lfunc_end019,576 +bar: # @barbar26,699 +.Lfunc_end1:Lfunc_end135,986 +main: # @mainmain42,1113 +.Lfunc_end2:Lfunc_end248,1327 + +externals/binaryen/test/torture-s/20000223-1.c.s,249 +check: # @checkcheck7,215 +.LBB0_2: # %if.thenLBB0_218,556 +.Lfunc_end0:Lfunc_end023,698 +main: # @mainmain30,829 +.Lfunc_end1:Lfunc_end136,1040 + +externals/binaryen/test/torture-s/mayalias-1.c.s,90 +main: # @mainmain7,211 +.Lfunc_end0:Lfunc_end014,398 + +externals/binaryen/test/torture-s/920710-1.c.s,90 +main: # @mainmain7,209 +.Lfunc_end0:Lfunc_end014,396 + +externals/binaryen/test/torture-s/doloop-1.c.s,235 +main: # @mainmain7,209 +.LBB0_1: # %do.bodyLBB0_112,352 +.LBB0_4: # %if.thenLBB0_439,1200 +.Lfunc_end0:Lfunc_end044,1342 +i:i52,1493 + +externals/binaryen/test/torture-s/20010409-1.c.s,484 +foo: # @foofoo7,207 +.Lfunc_end0:Lfunc_end018,559 +bar: # @barbar25,682 +.LBB1_2: # %if.thenLBB1_235,999 +.Lfunc_end1:Lfunc_end140,1141 +test: # @testtest47,1268 +.Lfunc_end2:Lfunc_end262,1706 +main: # @mainmain69,1835 +.Lfunc_end3:Lfunc_end390,2414 +b:b98,2568 +c:c107,2729 +d:d116,2890 +a:a131,3145 + +externals/binaryen/test/torture-s/20020418-1.c.s,320 +gcc_crash: # @gcc_crashgcc_crash7,231 +.LBB0_2: # %topLBB0_220,590 +.LBB0_4: # %if.thenLBB0_430,930 +.Lfunc_end0:Lfunc_end035,1060 +main: # @mainmain42,1199 +.Lfunc_end1:Lfunc_end162,1747 + +externals/binaryen/test/torture-s/pr44575.c.s,638 +check: # @checkcheck7,212 +.LBB0_1: # %for.bodyLBB0_122,657 +.LBB0_3: # %sw.epilog.threadLBB0_349,1569 +.LBB0_4: # %if.end.sink.splitLBB0_454,1798 +.LBB0_5: # %if.endLBB0_562,2119 +.LBB0_7: # %for.endLBB0_775,2636 +.Lfunc_end0:Lfunc_end080,2811 +main: # @mainmain87,2942 +.LBB1_2: # %if.thenLBB1_2136,4376 +.Lfunc_end1:Lfunc_end1141,4518 +fails:fails149,4685 +a:a158,4854 + +externals/binaryen/test/torture-s/pr36691.c.s,202 +func_1: # @func_1func_17,216 +.Lfunc_end0:Lfunc_end014,460 +main: # @mainmain21,593 +.Lfunc_end1:Lfunc_end130,879 +g_5:g_537,1026 + +externals/binaryen/test/torture-s/strlen-1.c.s,560 +main: # @mainmain7,214 +.LBB0_1: # %for.cond1.preheaderLBB0_113,395 +.LBB0_2: # %for.cond4.preheaderLBB0_221,711 +.LBB0_4: # in Loop: Header=BB0_2 Depth=2LBB0_438,1405 +.LBB0_5: # %for.body9.preheaderLBB0_543,1609 +.LBB0_6: # %for.end13LBB0_649,1889 +.LBB0_10: # %if.thenLBB0_1085,3173 +.Lfunc_end0:Lfunc_end090,3315 +u:u96,3437 + +externals/binaryen/test/torture-s/990826-0.c.s,90 +main: # @mainmain7,209 +.Lfunc_end0:Lfunc_end013,420 + +externals/binaryen/test/torture-s/20050316-2.c.s,374 +test1: # @test1test17,215 +.Lfunc_end0:Lfunc_end020,643 +test2: # @test2test227,778 +.Lfunc_end1:Lfunc_end140,1206 +test3: # @test3test347,1341 +.Lfunc_end2:Lfunc_end258,1697 +main: # @mainmain65,1828 +.Lfunc_end3:Lfunc_end371,2042 + +externals/binaryen/test/torture-s/pr55875.c.s,412 +t: # @tt7,196 +.LBB0_3: # %if.thenLBB0_321,621 +.LBB0_4: # %if.then2LBB0_426,781 +.Lfunc_end0:Lfunc_end031,924 +main: # @mainmain38,1047 +.LBB1_1: # %for.condLBB1_143,1190 +.LBB1_2:LBB1_252,1534 +.Lfunc_end1:Lfunc_end155,1563 +a:a63,1714 + +externals/binaryen/test/torture-s/20131127-1.c.s,342 +fn1: # @fn1fn17,207 +.Lfunc_end0:Lfunc_end025,790 +fn2: # @fn2fn232,913 +.Lfunc_end1:Lfunc_end163,1919 +main: # @mainmain70,2046 +.Lfunc_end2:Lfunc_end2103,3098 +a:a111,3252 +b:b119,3404 +c:c130,3668 +d:d138,3790 +e:e146,3912 + +externals/binaryen/test/torture-s/pr52129.c.s,354 +foo: # @foofoo7,204 +.LBB0_6: # %if.thenLBB0_636,1232 +.Lfunc_end0:Lfunc_end041,1374 +bar: # @barbar48,1497 +.Lfunc_end1:Lfunc_end176,2388 +main: # @mainmain83,2515 +.Lfunc_end2:Lfunc_end2110,3370 +t:t117,3509 + +externals/binaryen/test/torture-s/20020129-1.c.s,550 +foo: # @foofoo7,207 +.LBB0_2: # %if.thenLBB0_222,654 +.LBB0_3: # %for.bodyLBB0_333,996 +.LBB0_4: # %if.end7LBB0_440,1284 +.LBB0_7: # %if.end22.threadLBB0_755,1762 +.LBB0_8: # %if.then26LBB0_869,2158 +.Lfunc_end0:Lfunc_end074,2302 +main: # @mainmain81,2429 +.Lfunc_end1:Lfunc_end1103,2998 +y:y111,3149 +x:x120,3283 + +externals/binaryen/test/torture-s/pr15262.c.s,271 +bar: # @barbar7,204 +.Lfunc_end0:Lfunc_end014,440 +foo: # @foofoo21,563 +.Lfunc_end1:Lfunc_end143,1206 +main: # @mainmain50,1333 +.Lfunc_end2:Lfunc_end256,1545 + +externals/binaryen/test/torture-s/pta-field-2.c.s,338 +bar: # @barbar7,208 +.Lfunc_end0:Lfunc_end017,518 +foo: # @foofoo24,641 +.Lfunc_end1:Lfunc_end156,1561 +main: # @mainmain63,1688 +.LBB2_2: # %if.thenLBB2_297,2653 +.Lfunc_end2:Lfunc_end2102,2795 + +externals/binaryen/test/torture-s/longlong.c.s,397 +alpha_ep_extbl_i_eq_0: # @alpha_ep_extbl_i_eq_0alpha_ep_extbl_i_eq_07,277 +.LBB0_2: # %if.endLBB0_247,1514 +.Lfunc_end0:Lfunc_end051,1678 +main: # @mainmain58,1841 +.LBB1_2: # %if.thenLBB1_294,2910 +.Lfunc_end1:Lfunc_end199,3052 +b:b107,3203 +r:r116,3342 +pars:pars125,3487 + +externals/binaryen/test/torture-s/20111212-1.c.s,258 +frob_entry: # @frob_entryfrob_entry7,235 +.LBB0_2: # %if.endLBB0_218,607 +.Lfunc_end0:Lfunc_end022,771 +main: # @mainmain29,912 +.Lfunc_end1:Lfunc_end154,1663 + +externals/binaryen/test/torture-s/int-compare.c.s,854 +gt: # @gtgt7,204 +.Lfunc_end0:Lfunc_end014,436 +ge: # @gege21,553 +.Lfunc_end1:Lfunc_end128,785 +lt: # @ltlt35,902 +.Lfunc_end2:Lfunc_end242,1134 +le: # @lele49,1251 +.Lfunc_end3:Lfunc_end356,1483 +true: # @truetrue63,1608 +.LBB4_2: # %if.thenLBB4_271,1856 +.Lfunc_end4:Lfunc_end476,1998 +false: # @falsefalse83,2131 +.LBB5_2: # %if.thenLBB5_290,2358 +.Lfunc_end5:Lfunc_end595,2500 +f: # @ff102,2619 +.Lfunc_end6:Lfunc_end6109,2847 +main: # @mainmain116,2970 +.Lfunc_end7:Lfunc_end7123,3157 + +externals/binaryen/test/torture-s/20050502-1.c.s,648 +bar: # @barbar7,207 +.Lfunc_end0:Lfunc_end020,585 +baz: # @bazbaz27,708 +.Lfunc_end1:Lfunc_end135,962 +foo: # @foofoo42,1085 +.LBB2_3: # %if.end14LBB2_367,1895 +.LBB2_5: # %while.cond.backedgeLBB2_581,2474 +.LBB2_7: # %while.endLBB2_7104,3349 +.Lfunc_end2:Lfunc_end2112,3606 +main: # @mainmain119,3733 +.LBB3_11: # %if.then38LBB3_11237,7815 +.Lfunc_end3:Lfunc_end3242,7959 + +externals/binaryen/test/torture-s/pr49279.c.s,337 +bar: # @barbar7,204 +.Lfunc_end0:Lfunc_end016,445 +foo: # @foofoo23,568 +.Lfunc_end1:Lfunc_end156,1512 +main: # @mainmain63,1639 +.LBB2_2: # %if.thenLBB2_290,2454 +.Lfunc_end2:Lfunc_end295,2596 + +externals/binaryen/test/torture-s/pr43783.c.s,122 +main: # @mainmain7,208 +.Lfunc_end0:Lfunc_end0109,3181 +bid_Kx192:bid_Kx192117,3364 + +externals/binaryen/test/torture-s/20021010-2.c.s,313 +main: # @mainmain7,211 +.LBB0_2: # %if.then25LBB0_237,1194 +.Lfunc_end0:Lfunc_end042,1338 +expectedwidth:expectedwidth50,1540 +global_vramPtr:global_vramPtr59,1781 +global_bounds:global_bounds68,1995 +global_saveRect:global_saveRect80,2357 + +externals/binaryen/test/torture-s/20040208-1.c.s,90 +main: # @mainmain7,211 +.Lfunc_end0:Lfunc_end014,398 + +externals/binaryen/test/torture-s/20071219-1.c.s,690 +foo: # @foofoo7,207 +.LBB0_1: # %for.bodyLBB0_112,359 +.LBB0_4: # %for.incLBB0_428,1020 +.LBB0_6: # %if.thenLBB0_642,1484 +.Lfunc_end0:Lfunc_end047,1626 +test1: # @test1test154,1757 +.Lfunc_end1:Lfunc_end1126,3868 +test2: # @test2test2133,4003 +.Lfunc_end2:Lfunc_end2222,6618 +test3: # @test3test3229,6753 +.Lfunc_end3:Lfunc_end3341,10103 +main: # @mainmain348,10234 +.Lfunc_end4:Lfunc_end4357,10520 +p:p365,10671 + +externals/binaryen/test/torture-s/20080813-1.c.s,335 +foo: # @foofoo7,207 +.Lfunc_end0:Lfunc_end012,388 +bar: # @barbar19,511 +.LBB1_2: # %if.thenLBB1_228,789 +.Lfunc_end1:Lfunc_end133,931 +main: # @mainmain40,1058 +.Lfunc_end2:Lfunc_end246,1269 + +externals/binaryen/test/torture-s/20031011-1.c.s,90 +main: # @mainmain7,211 +.Lfunc_end0:Lfunc_end013,422 + +externals/binaryen/test/torture-s/960317-1.c.s,242 +f: # @ff7,197 +.LBB0_2: # %cleanupLBB0_227,776 +.Lfunc_end0:Lfunc_end032,972 +main: # @mainmain39,1095 +.Lfunc_end1:Lfunc_end146,1283 + +externals/binaryen/test/torture-s/loop-ivopts-1.c.s,180 +main: # @mainmain7,219 +.Lfunc_end0:Lfunc_end019,613 +foo: # @foofoo26,738 +.Lfunc_end1:Lfunc_end148,1422 + +externals/binaryen/test/torture-s/931018-1.c.s,266 +main: # @mainmain7,209 +.Lfunc_end0:Lfunc_end014,396 +f: # @ff21,513 +.LBB1_2: # %if.thenLBB1_231,815 +.Lfunc_end1:Lfunc_end136,957 +v:v44,1106 +a:a53,1274 + +externals/binaryen/test/torture-s/20010206-1.c.s,179 +foo: # @foofoo7,207 +.Lfunc_end0:Lfunc_end013,418 +main: # @mainmain20,545 +.Lfunc_end1:Lfunc_end127,732 + +externals/binaryen/test/torture-s/991227-1.c.s,181 +doit: # @doitdoit7,209 +.Lfunc_end0:Lfunc_end018,560 +main: # @mainmain25,689 +.Lfunc_end1:Lfunc_end132,878 + +externals/binaryen/test/torture-s/mayalias-3.c.s,342 +g: # @gg7,199 +.Lfunc_end0:Lfunc_end016,469 +f: # @ff23,580 +.Lfunc_end1:Lfunc_end143,1159 +main: # @mainmain50,1282 +.LBB2_2: # %if.thenLBB2_281,2175 +.Lfunc_end2:Lfunc_end286,2317 +p:p94,2468 + +externals/binaryen/test/torture-s/20041213-2.c.s,525 +foo: # @foofoo7,207 +.LBB0_2: # %for.cond1.preheaderLBB0_218,540 +.LBB0_4: # %for.endLBB0_433,1121 +.LBB0_5: # %for.condLBB0_539,1381 +.LBB0_6: # %for.end7LBB0_647,1697 +.LBB0_7: # %if.thenLBB0_751,1810 +.Lfunc_end0:Lfunc_end056,1952 +main: # @mainmain63,2079 +.Lfunc_end1:Lfunc_end172,2318 + +externals/binaryen/test/torture-s/pr21964-1.c.s,245 +foo: # @foofoo7,206 +.LBB0_3: # %if.thenLBB0_319,613 +.Lfunc_end0:Lfunc_end025,783 +main: # @mainmain32,910 +.Lfunc_end1:Lfunc_end139,1097 + +externals/binaryen/test/torture-s/pr58943.c.s,259 +foo: # @foofoo7,204 +.Lfunc_end0:Lfunc_end019,569 +main: # @mainmain26,696 +.LBB1_2: # %if.thenLBB1_244,1205 +.Lfunc_end1:Lfunc_end149,1347 +x:x57,1501 + +externals/binaryen/test/torture-s/pr23467.c.s,102 +main: # @mainmain7,208 +.Lfunc_end0:Lfunc_end014,395 +v:v22,546 + +externals/binaryen/test/torture-s/931004-11.c.s,248 +f: # @ff7,198 +.LBB0_11: # %if.then50LBB0_1162,2172 +.Lfunc_end0:Lfunc_end067,2316 +main: # @mainmain74,2439 +.Lfunc_end1:Lfunc_end1140,4308 + +externals/binaryen/test/torture-s/pr56205.c.s,815 +f4: # @f4f47,200 +.LBB0_3: # %if.endLBB0_334,1059 +.LBB0_6: # %if.end.critedge.iLBB0_668,2120 +.LBB0_7: # %f3.exitLBB0_775,2351 +.Lfunc_end0:Lfunc_end083,2637 +main: # @mainmain90,2762 +.LBB1_3: # %if.thenLBB1_3133,4016 +.Lfunc_end1:Lfunc_end1138,4158 +f1: # @f1f1143,4256 +.LBB2_4: # %if.then12LBB2_4189,5690 +.Lfunc_end2:Lfunc_end2194,5834 +f2: # @f2f2199,5928 +.LBB3_5: # %if.thenLBB3_5230,6975 +.Lfunc_end3:Lfunc_end3235,7117 +c:c243,7264 +b:b252,7400 +a:a272,7768 + +externals/binaryen/test/torture-s/divcmp-1.c.s,2269 +test1: # @test1test17,213 +.Lfunc_end0:Lfunc_end017,525 +test1u: # @test1utest1u24,664 +.Lfunc_end1:Lfunc_end134,977 +test2: # @test2test241,1114 +.Lfunc_end2:Lfunc_end251,1424 +test2u: # @test2utest2u58,1563 +.Lfunc_end3:Lfunc_end366,1820 +test3: # @test3test373,1957 +.Lfunc_end4:Lfunc_end483,2268 +test3u: # @test3utest3u90,2407 +.Lfunc_end5:Lfunc_end5100,2719 +test4: # @test4test4107,2856 +.Lfunc_end6:Lfunc_end6117,3166 +test4u: # @test4utest4u124,3305 +.Lfunc_end7:Lfunc_end7132,3561 +test5: # @test5test5139,3698 +.Lfunc_end8:Lfunc_end8147,3954 +test5u: # @test5utest5u154,4093 +.Lfunc_end9:Lfunc_end9162,4350 +test6: # @test6test6169,4487 +.Lfunc_end10:Lfunc_end10177,4743 +test7: # @test7test7184,4880 +.Lfunc_end11:Lfunc_end11192,5136 +test7u: # @test7utest7u199,5277 +.Lfunc_end12:Lfunc_end12207,5534 +test8: # @test8test8214,5673 +.Lfunc_end13:Lfunc_end13222,5929 +test8u: # @test8utest8u229,6070 +.Lfunc_end14:Lfunc_end14237,6327 +test9: # @test9test9244,6466 +.Lfunc_end15:Lfunc_end15252,6722 +test9u: # @test9utest9u259,6863 +.Lfunc_end16:Lfunc_end16267,7120 +test10: # @test10test10274,7263 +.Lfunc_end17:Lfunc_end17282,7519 +test10u: # @test10utest10u289,7666 +.Lfunc_end18:Lfunc_end18297,7923 +test11: # @test11test11304,8068 +.Lfunc_end19:Lfunc_end19312,8325 +test11u: # @test11utest11u319,8472 +.Lfunc_end20:Lfunc_end20327,8730 +test12: # @test12test12334,8875 +.Lfunc_end21:Lfunc_end21342,9133 +main: # @mainmain349,9268 +.Lfunc_end22:Lfunc_end22355,9483 + +externals/binaryen/test/torture-s/20060102-1.c.s,259 +f: # @ff7,199 +.Lfunc_end0:Lfunc_end017,506 +main: # @mainmain24,629 +.LBB1_2: # %if.thenLBB1_247,1307 +.Lfunc_end1:Lfunc_end152,1449 +one:one60,1611 + +externals/binaryen/test/torture-s/20001221-1.c.s,90 +main: # @mainmain7,211 +.Lfunc_end0:Lfunc_end014,398 + +externals/binaryen/test/torture-s/930529-1.c.s,294 + .hidden ddhidden4,158 + .globl ddglobl5,170 + .type dd,@functiontype6,181 +dd: # @dddd7,201 +.Lfunc_end0:Lfunc_end014,434 + .size dd, .Lfunc_end0-ddsize15,447 +main: # @mainmain21,559 +.Lfunc_end1:Lfunc_end128,746 + +externals/binaryen/test/torture-s/20080519-1.c.s,590 +merge_overlapping_regs: # @merge_overlapping_regsmerge_overlapping_regs7,283 +.LBB0_3: # %if.thenLBB0_322,790 +.Lfunc_end0:Lfunc_end027,932 +regrename_optimize: # @regrename_optimizeregrename_optimize34,1153 +.LBB1_2: # %for.bodyLBB1_256,1858 +.LBB1_5: # %cleanupLBB1_5115,3737 +.Lfunc_end1:Lfunc_end1123,4023 +main: # @mainmain130,4180 +.Lfunc_end2:Lfunc_end2162,5137 +reg_class_contents:reg_class_contents170,5356 + +externals/binaryen/test/torture-s/921019-2.c.s,90 +main: # @mainmain7,209 +.Lfunc_end0:Lfunc_end014,396 + +externals/binaryen/test/torture-s/20051113-1.c.s,526 +Sum: # @SumSum7,212 +.LBB0_2: # %for.bodyLBB0_223,683 +.LBB0_4:LBB0_439,1217 +.Lfunc_end0:Lfunc_end044,1369 +Sum2: # @Sum2Sum251,1496 +.LBB1_2: # %for.bodyLBB1_267,1968 +.LBB1_4:LBB1_483,2502 +.Lfunc_end1:Lfunc_end188,2654 +main: # @mainmain95,2783 +.LBB2_3: # %if.then24LBB2_3134,4044 +.Lfunc_end2:Lfunc_end2139,4188 + +externals/binaryen/test/torture-s/930628-1.c.s,916 +f: # @ff7,197 +.LBB0_2: # %if.thenLBB0_216,470 +.Lfunc_end0:Lfunc_end021,612 +main: # @mainmain28,735 +.LBB1_1: # %for.cond4.preheaderLBB1_134,901 +.LBB1_3: # %if.end.1.1LBB1_345,1374 +.LBB1_5: # %for.cond4.preheader.1LBB1_560,1873 +.LBB1_7: # %if.end.1.1.1LBB1_770,2339 +.LBB1_9: # %for.cond4.preheader.2LBB1_985,2852 +.LBB1_11: # %if.end.1.1.2LBB1_1195,3318 +.LBB1_13: # %for.cond4.preheader.3LBB1_13110,3831 +.LBB1_15: # %if.end.1.1.3LBB1_15120,4298 +.LBB1_17: # %if.then.iLBB1_17136,4842 +.Lfunc_end1:Lfunc_end1141,4986 + +externals/binaryen/test/torture-s/20040704-1.c.s,90 +main: # @mainmain7,211 +.Lfunc_end0:Lfunc_end013,422 + +externals/binaryen/test/torture-s/pr27364.c.s,241 +f: # @ff7,196 +.LBB0_2: # %returnLBB0_226,734 +.Lfunc_end0:Lfunc_end031,929 +main: # @mainmain38,1052 +.Lfunc_end1:Lfunc_end145,1240 + +externals/binaryen/test/torture-s/pr34456.c.s,498 +debug: # @debugdebug7,217 +.Lfunc_end0:Lfunc_end013,429 +bad_compare: # @bad_comparebad_compare20,588 +.Lfunc_end1:Lfunc_end128,849 +main: # @mainmain35,992 +.Lfunc_end2:Lfunc_end248,1421 +compare: # @comparecompare53,1529 +.LBB3_3: # %if.endLBB3_376,2242 +.Lfunc_end3:Lfunc_end381,2448 +array:array89,2624 +errors:errors101,2917 + +externals/binaryen/test/torture-s/20010925-1.c.s,238 +main: # @mainmain7,216 +.Lfunc_end0:Lfunc_end022,620 +foo: # @foofoo29,745 +.LBB1_2:LBB1_240,1092 +.Lfunc_end1:Lfunc_end145,1244 +dst:dst53,1401 +src:src62,1547 + +externals/binaryen/test/torture-s/20010123-1.c.s,90 +main: # @mainmain7,211 +.Lfunc_end0:Lfunc_end014,398 + +externals/binaryen/test/torture-s/921207-1.c.s,175 +f: # @ff7,197 +.Lfunc_end0:Lfunc_end013,405 +main: # @mainmain20,528 +.Lfunc_end1:Lfunc_end127,715 + +externals/binaryen/test/torture-s/pr41750.c.s,622 +foo_create_got_section: # @foo_create_got_sectionfoo_create_got_section7,280 +.Lfunc_end0:Lfunc_end016,577 +elf64_ia64_check_relocs: # @elf64_ia64_check_relocself64_ia64_check_relocs23,818 +.LBB1_3: # %if.end.iLBB1_344,1473 +.LBB1_4: # %get_got.exitLBB1_450,1701 +.Lfunc_end1:Lfunc_end155,1904 +main: # @mainmain62,2071 +.LBB2_2: # %if.thenLBB2_278,2587 +.Lfunc_end2:Lfunc_end283,2729 +hash:hash91,2892 +link_info:link_info100,3064 +abfd:abfd109,3224 + +externals/binaryen/test/torture-s/20030828-2.c.s,90 +main: # @mainmain7,211 +.Lfunc_end0:Lfunc_end014,398 + +externals/binaryen/test/torture-s/931004-10.c.s,446 +f: # @ff7,198 +.LBB0_2: # %for.bodyLBB0_231,887 +.LBB0_5: # %for.endLBB0_560,1944 +.LBB0_7: # %if.then8LBB0_773,2366 +.LBB0_8: # %if.then15LBB0_877,2499 +.Lfunc_end0:Lfunc_end082,2643 +main: # @mainmain89,2766 +.Lfunc_end1:Lfunc_end1133,3964 + +externals/binaryen/test/torture-s/20010222-1.c.s,167 +main: # @mainmain7,211 +.LBB0_2: # %if.endLBB0_226,769 +.Lfunc_end0:Lfunc_end032,940 +a:a40,1094 + +externals/binaryen/test/torture-s/pr59014-2.c.s,246 +foo: # @foofoo7,206 +.Lfunc_end0:Lfunc_end018,557 +main: # @mainmain25,684 +.LBB1_2: # %if.thenLBB1_238,1114 +.Lfunc_end1:Lfunc_end143,1256 + +externals/binaryen/test/torture-s/980608-1.c.s,343 +f1: # @f1f17,201 +.Lfunc_end0:Lfunc_end012,451 +debug: # @debugdebug19,580 +.LBB1_7: # %if.then25LBB1_790,2840 +.Lfunc_end1:Lfunc_end195,2984 +main: # @mainmain102,3115 +.Lfunc_end2:Lfunc_end2126,3792 + +externals/binaryen/test/torture-s/20030913-1.c.s,290 +fn2: # @fn2fn27,207 +.Lfunc_end0:Lfunc_end014,437 +test: # @testtest21,564 +.Lfunc_end1:Lfunc_end128,807 +main: # @mainmain35,936 +.Lfunc_end2:Lfunc_end245,1199 +glob:glob53,1362 + +externals/binaryen/test/torture-s/961213-1.c.s,310 +g: # @gg7,197 +.LBB0_2: # %for.bodyLBB0_222,629 +.LBB0_4: # %for.endLBB0_438,1178 +.Lfunc_end0:Lfunc_end043,1376 +main: # @mainmain50,1499 +.Lfunc_end1:Lfunc_end157,1687 + +externals/binaryen/test/torture-s/mayalias-2.c.s,175 +f: # @ff7,199 +.Lfunc_end0:Lfunc_end013,407 +main: # @mainmain20,530 +.Lfunc_end1:Lfunc_end126,741 + +externals/binaryen/test/torture-s/20000205-1.c.s,90 +main: # @mainmain7,211 +.Lfunc_end0:Lfunc_end014,399 + +externals/binaryen/test/torture-s/20000528-1.c.s,180 +main: # @mainmain7,211 +.LBB0_2: # %if.thenLBB0_224,700 +.Lfunc_end0:Lfunc_end029,842 +l:l37,996 +s:s46,1164 + +externals/binaryen/test/torture-s/961112-1.c.s,175 +f: # @ff7,197 +.Lfunc_end0:Lfunc_end014,419 +main: # @mainmain21,542 +.Lfunc_end1:Lfunc_end128,730 + +externals/binaryen/test/torture-s/20031214-1.c.s,202 +b: # @bb7,199 +.Lfunc_end0:Lfunc_end012,378 +main: # @mainmain19,501 +.Lfunc_end1:Lfunc_end144,1263 +g:g52,1417 +k:k63,1660 + +externals/binaryen/test/torture-s/pending-4.c.s,450 +dummy: # @dummydummy7,214 +.Lfunc_end0:Lfunc_end012,402 +main: # @mainmain19,533 +.LBB1_1: # %for.condLBB1_127,741 +.LBB1_3: # %for.condLBB1_341,1277 +.LBB1_5: # %for.endLBB1_554,1792 +.LBB1_8: # %if.then6LBB1_869,2269 +.Lfunc_end1:Lfunc_end174,2412 + +externals/binaryen/test/torture-s/pr37573.c.s,571 +main: # @mainmain7,208 +.LBB0_2: # %if.thenLBB0_220,610 +.Lfunc_end0:Lfunc_end025,752 +bar: # @barbar30,852 +.LBB1_1: # %for.bodyLBB1_148,1405 +.Lfunc_end1:Lfunc_end1261,8124 +foo: # @foofoo266,8222 +.LBB2_2: # %for.bodyLBB2_2284,8738 +.LBB2_3: # %if.endLBB2_3320,9889 +.Lfunc_end2:Lfunc_end2354,10952 +p:p360,11075 +q:q367,11243 + +externals/binaryen/test/torture-s/pr22630.c.s,258 +bla: # @blabla7,204 +.LBB0_2: # %if.end2LBB0_219,580 +.Lfunc_end0:Lfunc_end023,745 +main: # @mainmain30,872 +.Lfunc_end1:Lfunc_end139,1155 +j:j47,1306 + +externals/binaryen/test/torture-s/divmod-1.c.s,1028 +div1: # @div1div17,209 +.Lfunc_end0:Lfunc_end015,463 +div2: # @div2div222,592 +.Lfunc_end1:Lfunc_end130,846 +div3: # @div3div337,975 +.Lfunc_end2:Lfunc_end244,1210 +div4: # @div4div451,1339 +.Lfunc_end3:Lfunc_end358,1574 +mod1: # @mod1mod165,1703 +.Lfunc_end4:Lfunc_end472,1928 +mod2: # @mod2mod279,2057 +.Lfunc_end5:Lfunc_end586,2282 +mod3: # @mod3mod393,2411 +.Lfunc_end6:Lfunc_end6100,2646 +mod4: # @mod4mod4107,2775 +.Lfunc_end7:Lfunc_end7114,3010 +mod5: # @mod5mod5121,3139 +.Lfunc_end8:Lfunc_end8128,3374 +mod6: # @mod6mod6135,3503 +.Lfunc_end9:Lfunc_end9142,3738 +main: # @mainmain149,3867 +.Lfunc_end10:Lfunc_end10156,4057 + +externals/binaryen/test/torture-s/20040331-1.c.s,90 +main: # @mainmain7,211 +.Lfunc_end0:Lfunc_end014,398 + +externals/binaryen/test/torture-s/doloop-2.c.s,235 +main: # @mainmain7,209 +.LBB0_1: # %do.bodyLBB0_112,352 +.LBB0_4: # %if.thenLBB0_439,1204 +.Lfunc_end0:Lfunc_end044,1346 +i:i52,1497 + +externals/binaryen/test/torture-s/950512-1.c.s,266 +f1: # @f1f17,201 +.Lfunc_end0:Lfunc_end016,502 +f2: # @f2f223,619 +.Lfunc_end1:Lfunc_end132,938 +main: # @mainmain39,1063 +.Lfunc_end2:Lfunc_end246,1253 + +externals/binaryen/test/torture-s/20030128-1.c.s,181 +main: # @mainmain7,211 +.LBB0_2: # %if.thenLBB0_229,834 +.Lfunc_end0:Lfunc_end034,976 +x:x41,1118 +y:y50,1282 + +externals/binaryen/test/torture-s/pr28651.c.s,245 +foo: # @foofoo7,204 +.Lfunc_end0:Lfunc_end015,466 +main: # @mainmain22,593 +.LBB1_2: # %if.thenLBB1_234,963 +.Lfunc_end1:Lfunc_end139,1105 + +externals/binaryen/test/torture-s/20030718-1.c.s,90 +main: # @mainmain7,211 +.Lfunc_end0:Lfunc_end013,422 + +externals/binaryen/test/torture-s/950322-1.c.s,176 +f: # @ff7,197 +.Lfunc_end0:Lfunc_end026,764 +main: # @mainmain33,887 +.Lfunc_end1:Lfunc_end140,1075 + +externals/binaryen/test/torture-s/pr30778.c.s,295 +init_reg_last: # @init_reg_lastinit_reg_last7,244 +.Lfunc_end0:Lfunc_end033,1029 +main: # @mainmain40,1176 +.LBB1_2: # %if.thenLBB1_270,2057 +.Lfunc_end1:Lfunc_end175,2199 +reg_stat:reg_stat81,2335 + +externals/binaryen/test/torture-s/20050316-1.c.s,562 +test1: # @test1test17,215 +.Lfunc_end0:Lfunc_end013,427 +test2: # @test2test220,562 +.Lfunc_end1:Lfunc_end127,795 +test3: # @test3test334,930 +.Lfunc_end2:Lfunc_end245,1259 +test4: # @test4test452,1394 +.Lfunc_end3:Lfunc_end364,1783 +test5: # @test5test571,1918 +.Lfunc_end4:Lfunc_end480,2207 +main: # @mainmain87,2338 +.Lfunc_end5:Lfunc_end593,2552 + +externals/binaryen/test/torture-s/20001024-1.c.s,339 +bar: # @barbar7,207 +.LBB0_5: # %if.thenLBB0_531,1045 +.Lfunc_end0:Lfunc_end036,1187 +foo: # @foofoo43,1310 +.Lfunc_end1:Lfunc_end147,1480 +main: # @mainmain54,1607 +.Lfunc_end2:Lfunc_end261,1794 + +externals/binaryen/test/torture-s/20090527-1.c.s,391 +new_unit: # @new_unitnew_unit7,227 +.LBB0_2: # %if.endLBB0_223,692 +.LBB0_4: # %if.end5LBB0_433,1021 +.LBB0_6: # %sw.defaultLBB0_639,1233 +.Lfunc_end0:Lfunc_end044,1378 +main: # @mainmain51,1515 +.Lfunc_end1:Lfunc_end157,1734 + +externals/binaryen/test/torture-s/990513-1.c.s,387 +foo: # @foofoo7,205 +.LBB0_1: # %while.bodyLBB0_112,360 +.Lfunc_end0:Lfunc_end037,1160 +main: # @mainmain44,1287 +.LBB1_1: # %while.body.iLBB1_159,1762 +.LBB1_4: # %if.thenLBB1_490,2787 +.Lfunc_end1:Lfunc_end195,2929 + +externals/binaryen/test/torture-s/pr36321.c.s,197 +foo: # @foofoo7,204 +.Lfunc_end0:Lfunc_end012,385 +main: # @mainmain19,512 +.Lfunc_end1:Lfunc_end128,794 +argp:argp34,925 + +externals/binaryen/test/torture-s/pr55137.c.s,360 +foo: # @foofoo7,204 +.Lfunc_end0:Lfunc_end015,466 +bar: # @barbar22,589 +.Lfunc_end1:Lfunc_end130,842 +baz: # @bazbaz37,965 +.Lfunc_end2:Lfunc_end245,1218 +main: # @mainmain52,1345 +.Lfunc_end3:Lfunc_end358,1557 + +externals/binaryen/test/torture-s/pta-field-1.c.s,337 +bar: # @barbar7,208 +.Lfunc_end0:Lfunc_end015,463 +foo: # @foofoo22,586 +.Lfunc_end1:Lfunc_end152,1448 +main: # @mainmain59,1575 +.LBB2_2: # %if.thenLBB2_291,2482 +.Lfunc_end2:Lfunc_end296,2624 + +externals/binaryen/test/torture-s/980223.c.s,671 +bar: # @barbar7,203 +.Lfunc_end0:Lfunc_end013,366 +foo: # @foofoo20,489 +.LBB1_2: # %if.thenLBB1_243,1216 +.LBB1_3: # %if.end7LBB1_354,1608 +.LBB1_4: # %if.then6LBB1_462,1860 +.Lfunc_end1:Lfunc_end171,2136 +main: # @mainmain78,2263 +.LBB2_2: # %foo.exitLBB2_2110,3244 +.LBB2_3: # %if.then6.iLBB2_3118,3500 +.Lfunc_end2:Lfunc_end2125,3710 +nil:nil133,3869 +cons1:cons1142,4053 +cons2:cons2154,4304 + +externals/binaryen/test/torture-s/20120919-1.c.s,515 +init: # @initinit7,211 +.LBB0_2: # %if.endLBB0_215,481 +.Lfunc_end0:Lfunc_end019,645 +main: # @mainmain26,774 +.LBB1_2: # %while.bodyLBB1_257,1729 +.LBB1_4: # %if.end11LBB1_478,2478 +.LBB1_7: # %if.then14LBB1_798,3190 +.Lfunc_end1:Lfunc_end1103,3334 +vd:vd111,3492 +vi:vi121,3711 +pd:pd131,3926 +pi:pi140,4069 + +externals/binaryen/test/torture-s/pr58365.c.s,424 +foo: # @foofoo7,204 +.Lfunc_end0:Lfunc_end014,445 +main: # @mainmain21,572 +.LBB1_2: # %if.end.iLBB1_253,1533 +.LBB1_3: # %bar.exitLBB1_365,1886 +.LBB1_5: # %if.thenLBB1_5102,2959 +.Lfunc_end1:Lfunc_end1107,3101 +i:i115,3255 +h:h122,3387 +f:f131,3521 + +externals/binaryen/test/torture-s/20010717-1.c.s,90 +main: # @mainmain7,211 +.Lfunc_end0:Lfunc_end013,422 + +externals/binaryen/test/torture-s/960116-1.c.s,305 +f: # @ff7,197 +.LBB0_2: # %if.endLBB0_221,598 +.LBB0_3: # %returnLBB0_324,709 +.Lfunc_end0:Lfunc_end029,904 +main: # @mainmain36,1027 +.Lfunc_end1:Lfunc_end143,1215 + +externals/binaryen/test/torture-s/930608-1.c.s,187 +f: # @ff7,197 +.Lfunc_end0:Lfunc_end015,435 +main: # @mainmain22,558 +.Lfunc_end1:Lfunc_end129,745 +a:a37,900 + +externals/binaryen/test/torture-s/20071018-1.c.s,337 +bar: # @barbar7,207 +.Lfunc_end0:Lfunc_end015,486 +foo: # @foofoo22,609 +.Lfunc_end1:Lfunc_end140,1157 +main: # @mainmain47,1284 +.LBB2_2: # %if.thenLBB2_258,1626 +.Lfunc_end2:Lfunc_end263,1768 + +externals/binaryen/test/torture-s/pr54985.c.s,382 +foo: # @foofoo7,209 +.LBB0_2: # %while.condLBB0_220,596 +.LBB0_5: # %cleanupLBB0_541,1320 +.Lfunc_end0:Lfunc_end046,1518 +main: # @mainmain53,1645 +.LBB1_2: # %if.thenLBB1_279,2427 +.Lfunc_end1:Lfunc_end184,2569 + +externals/binaryen/test/torture-s/20041114-1.c.s,191 +foo: # @foofoo7,207 +.Lfunc_end0:Lfunc_end012,388 +main: # @mainmain19,515 +.Lfunc_end1:Lfunc_end128,794 +v:v36,945 + +externals/binaryen/test/torture-s/990106-1.c.s,179 +foo: # @foofoo7,205 +.Lfunc_end0:Lfunc_end016,478 +main: # @mainmain23,605 +.Lfunc_end1:Lfunc_end130,792 + +externals/binaryen/test/torture-s/pr56837.c.s,392 +foo: # @foofoo7,204 +.LBB0_1: # %for.bodyLBB0_111,336 +.Lfunc_end0:Lfunc_end026,872 +main: # @mainmain33,999 +.LBB1_1: # %for.bodyLBB1_140,1188 +.LBB1_5: # %if.thenLBB1_568,2201 +.Lfunc_end1:Lfunc_end173,2343 +a:a81,2494 + +externals/binaryen/test/torture-s/pr39228.c.s,158 +main: # @mainmain7,208 +.LBB0_4: # %if.then7LBB0_430,1018 +.Lfunc_end0:Lfunc_end035,1161 + +externals/binaryen/test/torture-s/ffs-1.c.s,167 +main: # @mainmain7,206 +.LBB0_2: # %if.thenLBB0_218,540 +.Lfunc_end0:Lfunc_end023,682 +a:a31,833 + +externals/binaryen/test/torture-s/align-1.c.s,90 +main: # @mainmain7,208 +.Lfunc_end0:Lfunc_end013,419 + +externals/binaryen/test/torture-s/pr61725.c.s,90 +main: # @mainmain7,208 +.Lfunc_end0:Lfunc_end013,419 + +externals/binaryen/test/torture-s/20080424-1.c.s,261 +bar: # @barbar7,207 +.LBB0_3: # %if.thenLBB0_333,1011 +.Lfunc_end0:Lfunc_end038,1153 +main: # @mainmain45,1280 +.Lfunc_end1:Lfunc_end175,2211 +g:g90,2510 + +externals/binaryen/test/torture-s/930429-1.c.s,175 +f: # @ff7,197 +.Lfunc_end0:Lfunc_end015,448 +main: # @mainmain22,571 +.Lfunc_end1:Lfunc_end129,758 + +externals/binaryen/test/torture-s/pr51023.c.s,179 +foo: # @foofoo7,204 +.Lfunc_end0:Lfunc_end017,514 +main: # @mainmain24,641 +.Lfunc_end1:Lfunc_end130,852 + +externals/binaryen/test/torture-s/pr49644.c.s,90 +main: # @mainmain7,208 +.Lfunc_end0:Lfunc_end013,420 + +externals/binaryen/test/torture-s/920612-1.c.s,175 +f: # @ff7,197 +.Lfunc_end0:Lfunc_end017,504 +main: # @mainmain24,627 +.Lfunc_end1:Lfunc_end130,788 + +externals/binaryen/test/torture-s/960830-1.c.s,90 +main: # @mainmain7,209 +.Lfunc_end0:Lfunc_end014,396 + +externals/binaryen/test/torture-s/index-1.c.s,255 +f: # @ff7,196 +.Lfunc_end0:Lfunc_end018,536 +main: # @mainmain25,659 +.LBB1_2: # %if.thenLBB1_238,1052 +.Lfunc_end1:Lfunc_end143,1194 +a:a51,1348 + +externals/binaryen/test/torture-s/20030330-1.c.s,90 +main: # @mainmain7,211 +.Lfunc_end0:Lfunc_end013,422 + +externals/binaryen/test/torture-s/pr31072.c.s,230 +main: # @mainmain7,208 +.LBB0_2: # %if.thenLBB0_219,599 +.Lfunc_end0:Lfunc_end024,741 +ReadyFlag_NotProperlyInitialized:ReadyFlag_NotProperlyInitialized32,1028 + +externals/binaryen/test/torture-s/921218-2.c.s,175 +f: # @ff7,197 +.Lfunc_end0:Lfunc_end013,409 +main: # @mainmain20,532 +.Lfunc_end1:Lfunc_end127,719 + +externals/binaryen/test/torture-s/981001-1.c.s,470 +sub: # @subsub7,205 +.LBB0_3: # %cleanupLBB0_334,1015 +.LBB0_4: # %if.elseLBB0_437,1122 +.Lfunc_end0:Lfunc_end049,1540 +main: # @mainmain56,1667 +.LBB1_3: # %if.end.threadLBB1_375,2242 +.LBB1_4: # %if.then1LBB1_483,2484 +.Lfunc_end1:Lfunc_end188,2627 +flg:flg96,2786 + +externals/binaryen/test/torture-s/960311-2.c.s,484 +a1: # @a1a17,201 +.Lfunc_end0:Lfunc_end017,528 +b: # @bb24,641 +.LBB1_2: # %if.endLBB1_239,1101 +.LBB1_4: # %if.end7LBB1_453,1551 +.LBB1_6: # %if.end15LBB1_667,2010 +.Lfunc_end1:Lfunc_end171,2176 +main: # @mainmain78,2299 +.Lfunc_end2:Lfunc_end288,2564 +count:count96,2731 + +externals/binaryen/test/torture-s/931005-1.c.s,175 +f: # @ff7,197 +.Lfunc_end0:Lfunc_end014,421 +main: # @mainmain21,544 +.Lfunc_end1:Lfunc_end128,732 + +externals/binaryen/test/torture-s/pr30185.c.s,179 +foo: # @foofoo7,204 +.Lfunc_end0:Lfunc_end016,502 +main: # @mainmain23,629 +.Lfunc_end1:Lfunc_end129,843 + +externals/binaryen/test/torture-s/divcmp-4.c.s,1254 +test1: # @test1test17,213 +.Lfunc_end0:Lfunc_end017,524 +test2: # @test2test224,659 +.Lfunc_end1:Lfunc_end134,969 +test3: # @test3test341,1104 +.Lfunc_end2:Lfunc_end251,1414 +test4: # @test4test458,1549 +.Lfunc_end3:Lfunc_end368,1859 +test5: # @test5test575,1994 +.Lfunc_end4:Lfunc_end483,2251 +test6: # @test6test690,2386 +.Lfunc_end5:Lfunc_end598,2641 +test7: # @test7test7105,2776 +.Lfunc_end6:Lfunc_end6113,3033 +test8: # @test8test8120,3168 +.Lfunc_end7:Lfunc_end7128,3425 +test9: # @test9test9135,3560 +.Lfunc_end8:Lfunc_end8143,3817 +test10: # @test10test10150,3956 +.Lfunc_end9:Lfunc_end9158,4213 +test11: # @test11test11165,4354 +.Lfunc_end10:Lfunc_end10173,4612 +test12: # @test12test12180,4755 +.Lfunc_end11:Lfunc_end11188,5012 +main: # @mainmain195,5147 +.Lfunc_end12:Lfunc_end12201,5362 + +externals/binaryen/test/torture-s/931004-14.c.s,452 +f: # @ff7,198 +.LBB0_2: # %for.bodyLBB0_233,928 +.LBB0_8: # %for.endLBB0_884,2829 +.LBB0_10: # %if.then27LBB0_1096,3241 +.LBB0_11: # %if.then20LBB0_11100,3375 +.Lfunc_end0:Lfunc_end0105,3519 +main: # @mainmain112,3642 +.Lfunc_end1:Lfunc_end1176,5361 + +externals/binaryen/test/torture-s/pr34070-2.c.s,175 +f: # @ff7,198 +.Lfunc_end0:Lfunc_end016,484 +main: # @mainmain23,607 +.Lfunc_end1:Lfunc_end129,819 + +externals/binaryen/test/torture-s/20090814-1.c.s,362 +bar: # @barbar7,207 +.Lfunc_end0:Lfunc_end014,434 +foo: # @foofoo21,557 +.Lfunc_end1:Lfunc_end133,931 +main: # @mainmain40,1058 +.LBB2_2: # %if.thenLBB2_258,1593 +.Lfunc_end2:Lfunc_end263,1735 +i:i71,1886 +a:a80,2047 + +externals/binaryen/test/torture-s/struct-aliasing-1.c.s,246 +foo: # @foofoo7,214 +.Lfunc_end0:Lfunc_end019,556 +main: # @mainmain26,683 +.LBB1_2: # %if.thenLBB1_255,1548 +.Lfunc_end1:Lfunc_end160,1690 + +externals/binaryen/test/torture-s/20020810-1.c.s,407 +f: # @ff7,199 +.LBB0_3: # %if.thenLBB0_324,741 +.Lfunc_end0:Lfunc_end029,883 +g: # @gg36,994 +.Lfunc_end1:Lfunc_end144,1257 +main: # @mainmain51,1380 +.LBB2_3: # %if.thenLBB2_375,2113 +.Lfunc_end2:Lfunc_end280,2255 +R:R88,2409 + +externals/binaryen/test/torture-s/struct-ret-1.c.s,1846 +f: # @ff7,206 +.Lfunc_end0:Lfunc_end071,2068 +main: # @mainmain78,2191 +.LBB1_2: # %if.thenLBB1_2209,5923 +.Lfunc_end1:Lfunc_end1214,6065 +c1:c1221,6211 +c2:c2229,6369 +c3:c3237,6527 +c4:c4245,6685 +c5:c5253,6843 + .hidden d1 # @d1hidden257,6899 + .type d1,@objecttype258,6938 + .globl d1globl260,6990 +d1:d1262,7013 + .size d1, 8size264,7078 + .hidden d2 # @d2hidden266,7092 + .type d2,@objecttype267,7131 + .globl d2globl269,7183 +d2:d2271,7206 + .size d2, 8size273,7271 + .hidden d3 # @d3hidden275,7285 + .type d3,@objecttype276,7324 + .globl d3globl278,7376 +d3:d3280,7399 + .size d3, 8size282,7464 + .hidden d4 # @d4hidden284,7478 + .type d4,@objecttype285,7517 + .globl d4globl287,7569 +d4:d4289,7592 + .size d4, 8size291,7657 + .hidden d5 # @d5hidden293,7671 + .type d5,@objecttype294,7710 + .globl d5globl296,7762 +d5:d5298,7785 + .size d5, 8size300,7834 + .hidden d6 # @d6hidden302,7848 + .type d6,@objecttype303,7887 + .globl d6globl305,7939 +d6:d6307,7962 + .size d6, 8size309,8027 + .hidden d7 # @d7hidden311,8041 + .type d7,@objecttype312,8080 + .globl d7globl314,8132 +d7:d7316,8155 + .size d7, 8size318,8220 + .hidden d8 # @d8hidden320,8234 + .type d8,@objecttype321,8273 + .globl d8globl323,8325 +d8:d8325,8348 + .size d8, 8size327,8413 + .hidden d9 # @d9hidden329,8427 + .type d9,@objecttype330,8466 + .globl d9globl332,8518 +d9:d9334,8541 + .size d9, 8size336,8606 +B1:B1343,8734 +B2:B2356,9051 +X1:X1368,9356 +X2:X2377,9558 +X3:X3386,9847 +out:out403,10344 +fp:fp418,10673 + +externals/binaryen/test/torture-s/20000511-1.c.s,240 +f: # @ff7,199 +.LBB0_2: # %if.thenLBB0_215,453 +.Lfunc_end0:Lfunc_end020,595 +main: # @mainmain27,718 +.Lfunc_end1:Lfunc_end134,905 + +externals/binaryen/test/torture-s/pr60017.c.s,261 +func: # @funcfunc7,208 +.Lfunc_end0:Lfunc_end020,634 +main: # @mainmain27,763 +.LBB1_2: # %if.thenLBB1_239,1130 +.Lfunc_end1:Lfunc_end144,1272 +x:x52,1426 + +externals/binaryen/test/torture-s/pr57877.c.s,477 +main: # @mainmain7,208 +.LBB0_2: # %for.body.lr.ph.iLBB0_223,731 +.LBB0_3: # %for.body.iLBB0_333,1030 +.LBB0_5: # %foo.exitLBB0_564,2018 +.LBB0_7: # %if.thenLBB0_773,2312 +.Lfunc_end0:Lfunc_end078,2454 +b:b86,2605 +c:c95,2769 +f:f104,2905 +a:a113,3066 +e:e122,3227 +g:g131,3388 +h:h140,3549 +d:d149,3710 + +externals/binaryen/test/torture-s/strct-pack-3.c.s,176 +f: # @ff7,201 +.Lfunc_end0:Lfunc_end029,862 +main: # @mainmain36,985 +.Lfunc_end1:Lfunc_end143,1173 + +externals/binaryen/test/torture-s/pr57876.c.s,293 +main: # @mainmain7,213 +.LBB0_2: # %if.thenLBB0_2334,9603 +.Lfunc_end0:Lfunc_end0339,9745 +b:b347,9899 +c:c356,10060 +d:d365,10224 +f:f374,10357 +e:e381,10489 +j:j390,10650 +a:a399,10811 +h:h408,10972 +g:g417,11133 + +externals/binaryen/test/torture-s/strct-pack-2.c.s,90 +main: # @mainmain7,213 +.Lfunc_end0:Lfunc_end014,400 + +externals/binaryen/test/torture-s/va-arg-trap-1.c.s,297 +foo: # @foofoo7,210 +.Lfunc_end0:Lfunc_end014,396 +bar: # @barbar21,519 +.Lfunc_end1:Lfunc_end129,735 +main: # @mainmain36,862 +.Lfunc_end2:Lfunc_end252,1300 +ap:ap60,1455 +f:f69,1590 + +externals/binaryen/test/torture-s/20020503-1.c.s,90 +main: # @mainmain7,211 +.Lfunc_end0:Lfunc_end013,423 + +externals/binaryen/test/torture-s/vfprintf-chk-1.c.s,1303 +__vfprintf_chk: # @__vfprintf_chk__vfprintf_chk7,260 +.LBB0_2: # %if.thenLBB0_221,731 +.Lfunc_end0:Lfunc_end026,873 +inner: # @innerinner33,1026 +.LBB1_2: # %sw.bbLBB1_274,2391 +.LBB1_6: # %sw.bb9LBB1_6106,3564 +.LBB1_10: # %sw.bb21LBB1_10138,4751 +.LBB1_14: # %sw.bb33LBB1_14170,5941 +.LBB1_18: # %sw.bb45LBB1_18200,7069 +.LBB1_22: # %sw.bb57LBB1_22232,8256 +.LBB1_26: # %sw.bb69LBB1_26264,9443 +.LBB1_30: # %sw.bb81LBB1_30296,10630 +.LBB1_34: # %sw.bb93LBB1_34326,11759 +.LBB1_38: # %sw.bb105LBB1_38358,12948 +.LBB1_42: # %sw.bb117LBB1_42390,14139 +.LBB1_45: # %sw.epilogLBB1_45420,15251 +.LBB1_46: # %sw.defaultLBB1_46427,15476 +.Lfunc_end1:Lfunc_end1432,15621 +main: # @mainmain439,15752 +.Lfunc_end2:Lfunc_end2509,17807 +should_optimize:should_optimize517,18014 + +externals/binaryen/test/torture-s/pr38533.c.s,260 +foo: # @foofoo7,204 +.Lfunc_end0:Lfunc_end01224,22650 +main: # @mainmain1231,22777 +.LBB1_2: # %if.thenLBB1_21240,23065 +.Lfunc_end1:Lfunc_end11245,23207 + +externals/binaryen/test/torture-s/builtin-bitops-1.c.s,8098 +my_ffs: # @my_ffsmy_ffs7,230 +.LBB0_2: # %for.condLBB0_217,541 +.LBB0_4: # %cleanupLBB0_438,1285 +.LBB0_5:LBB0_542,1402 +.Lfunc_end0:Lfunc_end047,1554 +my_ctz: # @my_ctzmy_ctz54,1695 +.LBB1_1: # %for.bodyLBB1_160,1854 +.LBB1_3: # %for.endLBB1_376,2461 +.Lfunc_end1:Lfunc_end182,2667 +my_clz: # @my_clzmy_clz89,2808 +.LBB2_1: # %for.bodyLBB2_196,2991 +.LBB2_3: # %for.endLBB2_3114,3646 +.Lfunc_end2:Lfunc_end2120,3852 +my_clrsb: # @my_clrsbmy_clrsb127,4001 +.LBB3_1: # %for.bodyLBB3_1136,4240 +.LBB3_3: # %for.endLBB3_3155,4931 +.Lfunc_end3:Lfunc_end3162,5165 +my_popcount: # @my_popcountmy_popcount169,5330 +.LBB4_1: # %for.bodyLBB4_1176,5517 +.Lfunc_end4:Lfunc_end4196,6186 +my_parity: # @my_paritymy_parity203,6349 +.LBB5_1: # %for.bodyLBB5_1210,6534 +.Lfunc_end5:Lfunc_end5231,7234 +my_ffsl: # @my_ffslmy_ffsl238,7385 +.LBB6_2: # %for.condLBB6_2248,7698 +.LBB6_4: # %cleanupLBB6_4269,8445 +.LBB6_5:LBB6_5273,8563 +.Lfunc_end6:Lfunc_end6278,8716 +my_ctzl: # @my_ctzlmy_ctzl285,8863 +.LBB7_1: # %for.bodyLBB7_1291,9023 +.LBB7_3: # %for.endLBB7_3307,9633 +.Lfunc_end7:Lfunc_end7313,9840 +my_clzl: # @my_clzlmy_clzl320,9987 +.LBB8_1: # %for.bodyLBB8_1327,10171 +.LBB8_3: # %for.endLBB8_3345,10829 +.Lfunc_end8:Lfunc_end8351,11036 +my_clrsbl: # @my_clrsblmy_clrsbl358,11191 +.LBB9_1: # %for.bodyLBB9_1367,11431 +.LBB9_3: # %for.endLBB9_3386,12125 +.Lfunc_end9:Lfunc_end9393,12360 +my_popcountl: # @my_popcountlmy_popcountl400,12531 +.LBB10_1: # %for.bodyLBB10_1407,12719 +.Lfunc_end10:Lfunc_end10427,13390 +my_parityl: # @my_paritylmy_parityl434,13561 +.LBB11_1: # %for.bodyLBB11_1441,13747 +.Lfunc_end11:Lfunc_end11462,14447 +my_ffsll: # @my_ffsllmy_ffsll469,14606 +.LBB12_2: # %for.condLBB12_2480,14942 +.LBB12_4: # %cleanupLBB12_4500,15628 +.LBB12_5:LBB12_5504,15746 +.Lfunc_end12:Lfunc_end12509,15900 +my_ctzll: # @my_ctzllmy_ctzll516,16055 +.LBB13_1: # %for.bodyLBB13_1523,16239 +.LBB13_3: # %for.endLBB13_3543,16953 +.Lfunc_end13:Lfunc_end13549,17162 +my_clzll: # @my_clzllmy_clzll556,17317 +.LBB14_1: # %for.bodyLBB14_1564,17525 +.LBB14_3: # %for.endLBB14_3586,18289 +.Lfunc_end14:Lfunc_end14592,18498 +my_clrsbll: # @my_clrsbllmy_clrsbll599,18661 +.LBB15_1: # %for.bodyLBB15_1609,18925 +.LBB15_3: # %for.endLBB15_3630,19669 +.Lfunc_end15:Lfunc_end15637,19904 +my_popcountll: # @my_popcountllmy_popcountll644,20083 +.LBB16_1: # %for.bodyLBB16_1651,20272 +.Lfunc_end16:Lfunc_end16671,20943 +my_parityll: # @my_parityllmy_parityll678,21120 +.LBB17_1: # %for.bodyLBB17_1685,21307 +.Lfunc_end17:Lfunc_end17706,22007 +main: # @mainmain713,22152 +.LBB18_1: # %for.bodyLBB18_1718,22345 +.LBB18_3: # %for.cond.iLBB18_3749,23626 +.LBB18_5: # %my_ffs.exit.loopexitLBB18_5768,24383 +.LBB18_6: # %my_ffs.exitLBB18_6774,24627 +.LBB18_9: # %for.body.i816LBB18_9789,25270 +.LBB18_11: # %my_clz.exitLBB18_11808,26037 +.LBB18_13: # %for.body.i875LBB18_13817,26447 +.LBB18_15: # %my_ctz.exitLBB18_15834,27167 +.LBB18_16: # %if.end19LBB18_16840,27425 +.LBB18_17: # %for.body.i948LBB18_17850,27799 +.LBB18_19: # %my_clrsb.exitLBB18_19870,28605 +.LBB18_21: # %for.body.i1030LBB18_21882,29106 +.LBB18_24: # %for.body.i1109LBB18_24908,30153 +.LBB18_28: # %for.body41LBB18_28942,31467 +.LBB18_30: # %for.cond.i1185LBB18_30971,32740 +.LBB18_32: # %my_ffsl.exit.loopexitLBB18_32990,33512 +.LBB18_33: # %my_ffsl.exitLBB18_33996,33758 +.LBB18_36: # %for.body.i1266LBB18_361011,34410 +.LBB18_38: # %my_clzl.exitLBB18_381030,35185 +.LBB18_40: # %for.body.i1345LBB18_401039,35598 +.LBB18_42: # %my_ctzl.exitLBB18_421056,36321 +.LBB18_43: # %if.end67LBB18_431062,36581 +.LBB18_44: # %for.body.i1426LBB18_441072,36957 +.LBB18_46: # %my_clrsbl.exitLBB18_461092,37766 +.LBB18_48: # %for.body.i1511LBB18_481104,38270 +.LBB18_51: # %for.body.i1591LBB18_511130,39321 +.LBB18_55: # %for.body92LBB18_551164,40641 +.LBB18_57: # %for.cond.i1667LBB18_571196,42005 +.LBB18_59: # %my_ffsll.exit1673LBB18_591216,42789 +.LBB18_62: # %for.body.i1739LBB18_621233,43483 +.LBB18_64: # %my_clzll.exit1745LBB18_641256,44370 +.LBB18_66: # %for.body.i1781LBB18_661267,44831 +.LBB18_68: # %my_ctzll.exit1787LBB18_681288,45666 +.LBB18_69: # %if.end120LBB18_691294,45932 +.LBB18_70: # %for.body.i1845LBB18_701305,46327 +.LBB18_72: # %my_clrsbll.exit1852LBB18_721327,47186 +.LBB18_74: # %for.body.i1928LBB18_741340,47701 +.LBB18_77: # %for.body.i2005LBB18_771366,48758 +.LBB18_92: # %for.body.i1769LBB18_921461,52706 +.LBB18_94: # %my_clrsb.exit1775LBB18_941481,53473 +.LBB18_97: # %for.body.i1691LBB18_971496,54056 +.LBB18_100: # %if.end465LBB18_1001515,54778 +.LBB18_101: # %for.body.i1655LBB18_1011520,54969 +.LBB18_104:LBB18_1041542,55774 +.LBB18_105: # %for.body.i1598.preheaderLBB18_1051547,55936 +.LBB18_106: # %for.body.i1598LBB18_1061550,56066 +.LBB18_109: # %if.end490LBB18_1091569,56789 +.LBB18_120: # %for.body.i810LBB18_1201628,59397 +.LBB18_122: # %my_clrsbll.exitLBB18_1221650,60210 +.LBB18_124: # %if.then37LBB18_1241661,60585 +.LBB18_125: # %if.then140LBB18_1251665,60720 +.Lfunc_end18:Lfunc_end181670,60866 +ints:ints1678,61034 +longs:longs1699,61734 +longlongs:longlongs1720,62452 + +externals/binaryen/test/torture-s/cmpsi-2.c.s,1295 +feq: # @feqfeq7,204 +.Lfunc_end0:Lfunc_end017,525 +fne: # @fnefne24,648 +.Lfunc_end1:Lfunc_end134,969 +flt: # @fltflt41,1092 +.Lfunc_end2:Lfunc_end251,1413 +fge: # @fgefge58,1536 +.Lfunc_end3:Lfunc_end368,1857 +fgt: # @fgtfgt75,1980 +.Lfunc_end4:Lfunc_end485,2301 +fle: # @flefle92,2424 +.Lfunc_end5:Lfunc_end5102,2745 +fltu: # @fltufltu109,2872 +.Lfunc_end6:Lfunc_end6119,3194 +fgeu: # @fgeufgeu126,3323 +.Lfunc_end7:Lfunc_end7136,3645 +fgtu: # @fgtufgtu143,3774 +.Lfunc_end8:Lfunc_end8153,4096 +fleu: # @fleufleu160,4225 +.Lfunc_end9:Lfunc_end9170,4547 +main: # @mainmain177,4676 +.LBB10_1: # %for.bodyLBB10_1183,4881 +.LBB10_2: # %for.body3LBB10_2195,5297 +.LBB10_15: # %if.then49LBB10_15333,10415 +.Lfunc_end10:Lfunc_end10338,10559 +args:args346,10727 +correct_results:correct_results362,11262 + +externals/binaryen/test/torture-s/mode-dependent-address.c.s,631 +f883b: # @f883bf883b7,227 +.LBB0_1: # %for.bodyLBB0_112,396 +.Lfunc_end0:Lfunc_end054,1704 +main: # @mainmain61,1835 +.LBB1_1: # %for.bodyLBB1_169,2061 +.LBB1_3: # %for.body.iLBB1_3102,3051 +.LBB1_5: # %for.body10LBB1_5143,4335 +.LBB1_8: # %if.thenLBB1_8167,5180 +.Lfunc_end1:Lfunc_end1172,5322 +arg4:arg4282,9363 +arg1:arg1291,9515 +arg2:arg2300,9669 +arg3:arg3309,9823 +result:result318,9985 + +externals/binaryen/test/torture-s/divcmp-5.c.s,306 +always_one_1: # @always_one_1always_one_17,241 +.Lfunc_end0:Lfunc_end014,474 +always_one_2: # @always_one_2always_one_221,651 +.Lfunc_end1:Lfunc_end128,884 +main: # @mainmain35,1029 +.Lfunc_end2:Lfunc_end241,1240 + +externals/binaryen/test/torture-s/pr42512.c.s,240 +main: # @mainmain7,208 +.LBB0_1: # %for.bodyLBB0_114,414 +.LBB0_4: # %if.thenLBB0_440,1242 +.Lfunc_end0:Lfunc_end045,1384 +g_3:g_353,1543 + +externals/binaryen/test/torture-s/dbra-1.c.s,692 +f1: # @f1f17,199 +.Lfunc_end0:Lfunc_end017,513 +f2: # @f2f224,630 +.Lfunc_end1:Lfunc_end131,853 +f3: # @f3f338,970 +.Lfunc_end2:Lfunc_end251,1370 +f4: # @f4f458,1487 +.Lfunc_end3:Lfunc_end366,1739 +f5: # @f5f573,1856 +.LBB4_2: # %for.inc.9LBB4_285,2214 +.Lfunc_end4:Lfunc_end490,2411 +f6: # @f6f697,2528 +.Lfunc_end5:Lfunc_end5105,2781 +main: # @mainmain112,2906 +.Lfunc_end6:Lfunc_end6119,3096 + +externals/binaryen/test/torture-s/pr42248.c.s,359 +check: # @checkcheck7,212 +.LBB0_3: # %if.thenLBB0_322,703 +.Lfunc_end0:Lfunc_end027,845 +init: # @initinit34,976 +.Lfunc_end1:Lfunc_end143,1261 +main: # @mainmain50,1390 +.Lfunc_end2:Lfunc_end262,1767 +g1s:g1s70,1926 + +externals/binaryen/test/torture-s/951003-1.c.s,261 +f: # @ff7,197 +.Lfunc_end0:Lfunc_end014,420 +g: # @gg21,531 +.Lfunc_end1:Lfunc_end127,739 +main: # @mainmain34,862 +.Lfunc_end2:Lfunc_end241,1049 + +externals/binaryen/test/torture-s/pr38048-1.c.s,179 +foo: # @foofoo7,206 +.Lfunc_end0:Lfunc_end013,416 +main: # @mainmain20,543 +.Lfunc_end1:Lfunc_end126,755 + +externals/binaryen/test/torture-s/960909-1.c.s,490 +ffs: # @ffsffs7,210 +.LBB0_3: # %for.incLBB0_324,717 +.LBB0_4: # %cleanupLBB0_435,1107 +.LBB0_5:LBB0_539,1224 +.Lfunc_end0:Lfunc_end044,1376 +f: # @ff51,1491 +.LBB1_2: # %if.thenLBB1_260,1755 +.Lfunc_end1:Lfunc_end165,1897 +main: # @mainmain72,2020 +.Lfunc_end2:Lfunc_end279,2207 + +externals/binaryen/test/torture-s/20030209-1.c.s,102 +main: # @mainmain7,211 +.Lfunc_end0:Lfunc_end017,493 +x:x25,644 + +externals/binaryen/test/torture-s/960311-3.c.s,483 +a1: # @a1a17,201 +.Lfunc_end0:Lfunc_end017,528 +b: # @bb24,641 +.LBB1_2: # %if.endLBB1_238,1072 +.LBB1_4: # %if.end4LBB1_452,1527 +.LBB1_6: # %if.end9LBB1_666,1990 +.Lfunc_end1:Lfunc_end170,2155 +main: # @mainmain77,2278 +.Lfunc_end2:Lfunc_end287,2543 +count:count95,2710 + +externals/binaryen/test/torture-s/alloca-1.c.s,246 +foo: # @foofoo7,205 +.Lfunc_end0:Lfunc_end019,592 +main: # @mainmain26,719 +.LBB1_2: # %if.thenLBB1_248,1373 +.Lfunc_end1:Lfunc_end153,1515 + +externals/binaryen/test/torture-s/20050607-1.c.s,90 +main: # @mainmain7,211 +.Lfunc_end0:Lfunc_end013,422 + +externals/binaryen/test/torture-s/20040311-1.c.s,467 +test1: # @test1test17,215 +.Lfunc_end0:Lfunc_end015,472 +test2: # @test2test222,607 +.Lfunc_end1:Lfunc_end130,864 +test3: # @test3test337,999 +.Lfunc_end2:Lfunc_end245,1256 +test4: # @test4test452,1391 +.Lfunc_end3:Lfunc_end360,1648 +main: # @mainmain67,1779 +.Lfunc_end4:Lfunc_end473,1993 + +externals/binaryen/test/torture-s/990804-1.c.s,185 +gfbyte: # @gfbytegfbyte7,217 +.Lfunc_end0:Lfunc_end013,430 +main: # @mainmain20,563 +.Lfunc_end1:Lfunc_end127,750 + +externals/binaryen/test/torture-s/compndlit-1.c.s,169 +main: # @mainmain7,212 +.LBB0_2: # %if.thenLBB0_230,864 +.Lfunc_end0:Lfunc_end035,1006 +x:x43,1160 + +externals/binaryen/test/torture-s/921006-1.c.s,90 +main: # @mainmain7,209 +.Lfunc_end0:Lfunc_end014,396 + +externals/binaryen/test/torture-s/20080506-2.c.s,245 +foo: # @foofoo7,207 +.LBB0_2: # %if.thenLBB0_224,695 +.Lfunc_end0:Lfunc_end029,837 +main: # @mainmain36,964 +.Lfunc_end1:Lfunc_end165,1824 + +externals/binaryen/test/torture-s/pr58984.c.s,305 +main: # @mainmain7,208 +.LBB0_2: # %foo.exitLBB0_225,747 +.LBB0_5: # %if.then10LBB0_559,1754 +.Lfunc_end0:Lfunc_end064,1898 +a:a72,2049 +c:c81,2213 +n:n90,2346 +m:m99,2507 +e:e108,2668 +b:b117,2829 + +externals/binaryen/test/torture-s/pr49123.c.s,90 +main: # @mainmain7,208 +.Lfunc_end0:Lfunc_end019,580 + +externals/binaryen/test/torture-s/20120207-1.c.s,248 +test: # @testtest7,211 +.Lfunc_end0:Lfunc_end016,503 +main: # @mainmain23,632 +.LBB1_2: # %if.thenLBB1_235,1005 +.Lfunc_end1:Lfunc_end140,1147 + +externals/binaryen/test/torture-s/pr57321.c.s,194 +main: # @mainmain7,208 +.LBB0_2: # %foo.exitLBB0_219,578 +.Lfunc_end0:Lfunc_end024,773 +a:a32,927 +b:b41,1088 +c:c50,1221 + +externals/binaryen/test/torture-s/20020423-1.c.s,90 +main: # @mainmain7,211 +.Lfunc_end0:Lfunc_end014,398 + +externals/binaryen/test/torture-s/pr29006.c.s,180 +foo: # @foofoo7,204 +.Lfunc_end0:Lfunc_end014,441 +main: # @mainmain21,568 +.Lfunc_end1:Lfunc_end150,1459 + +externals/binaryen/test/torture-s/20001124-1.c.s,128 +main: # @mainmain7,211 +.Lfunc_end0:Lfunc_end030,784 +s:s38,935 +i:i47,1069 +f:f56,1203 + +externals/binaryen/test/torture-s/20000225-1.c.s,90 +main: # @mainmain7,211 +.Lfunc_end0:Lfunc_end014,398 + +externals/binaryen/test/torture-s/pr43220.c.s,165 +main: # @mainmain7,208 +.LBB0_1: # %labLBB0_116,493 +.Lfunc_end0:Lfunc_end075,2255 +p:p83,2406 + +externals/binaryen/test/torture-s/20001203-2.c.s,891 +create_array_type: # @create_array_typecreate_array_type7,268 +.LBB0_5: # %if.end17LBB0_560,1899 +.LBB0_6:LBB0_688,2744 +.LBB0_7: # %if.thenLBB0_793,2858 +.LBB0_8: # %if.then8LBB0_897,3003 +.Lfunc_end0:Lfunc_end0102,3166 +alloc_type: # @alloc_typealloc_type109,3345 +.Lfunc_end1:Lfunc_end1115,3510 +get_discrete_bounds: # @get_discrete_boundsget_discrete_bounds122,3711 +.Lfunc_end2:Lfunc_end2131,4005 +_obstack_newchunk: # @_obstack_newchunk_obstack_newchunk138,4216 +.Lfunc_end3:Lfunc_end3144,4393 +xmalloc: # @xmallocxmalloc151,4560 +.Lfunc_end4:Lfunc_end4158,4788 +main: # @mainmain165,4923 +.Lfunc_end5:Lfunc_end5172,5111 + +externals/binaryen/test/torture-s/20071220-1.c.s,523 +baz: # @bazbaz7,207 +.Lfunc_end0:Lfunc_end016,449 +f1: # @f1f123,568 +.Lfunc_end1:Lfunc_end130,809 +bar: # @barbar35,905 +.Ltmp0: # Block address takenLtmp041,1093 +.Lfunc_end2:Lfunc_end246,1305 +f2: # @f2f253,1424 +.Lfunc_end3:Lfunc_end360,1665 +main: # @mainmain67,1790 +.Lfunc_end4:Lfunc_end477,2121 + +externals/binaryen/test/torture-s/970214-1.c.s,90 +main: # @mainmain7,209 +.Lfunc_end0:Lfunc_end014,396 + +externals/binaryen/test/torture-s/20030404-1.c.s,90 +main: # @mainmain7,211 +.Lfunc_end0:Lfunc_end013,424 + +externals/binaryen/test/torture-s/pr35163.c.s,90 +main: # @mainmain7,208 +.Lfunc_end0:Lfunc_end013,419 + +externals/binaryen/test/torture-s/pr44942.c.s,742 +test1: # @test1test17,212 +.LBB0_2: # %if.thenLBB0_233,1018 +.Lfunc_end0:Lfunc_end038,1160 +test2: # @test2test245,1295 +.LBB1_2: # %if.thenLBB1_271,2149 +.Lfunc_end1:Lfunc_end176,2291 +test3: # @test3test383,2426 +.LBB2_2: # %if.thenLBB2_2114,3388 +.Lfunc_end2:Lfunc_end2119,3530 +test4: # @test4test4126,3665 +.LBB3_2: # %if.thenLBB3_2157,4676 +.Lfunc_end3:Lfunc_end3162,4818 +main: # @mainmain169,4949 +.Lfunc_end4:Lfunc_end4211,6398 + +externals/binaryen/test/torture-s/20020213-1.c.s,363 +foo: # @foofoo7,207 +.LBB0_2: # %if.thenLBB0_227,795 +.Lfunc_end0:Lfunc_end032,937 +bar: # @barbar39,1060 +.Lfunc_end1:Lfunc_end146,1287 +main: # @mainmain53,1414 +.Lfunc_end2:Lfunc_end265,1795 +a:a73,1946 +b:b82,2078 + +externals/binaryen/test/torture-s/pr58364.c.s,285 +foo: # @foofoo7,204 +.Lfunc_end0:Lfunc_end017,517 +main: # @mainmain24,644 +.LBB1_2: # %if.thenLBB1_240,1103 +.Lfunc_end1:Lfunc_end145,1245 +a:a53,1399 +c:c62,1560 +b:b71,1721 + +externals/binaryen/test/torture-s/20000227-1.c.s,90 +main: # @mainmain7,211 +.Lfunc_end0:Lfunc_end013,422 + +externals/binaryen/test/torture-s/pr43008.c.s,269 +my_alloc: # @my_allocmy_alloc7,224 +.Lfunc_end0:Lfunc_end019,609 +main: # @mainmain26,746 +.LBB1_2: # %if.thenLBB1_252,1502 +.Lfunc_end1:Lfunc_end157,1644 +i:i65,1795 + +externals/binaryen/test/torture-s/20020720-1.c.s,179 +foo: # @foofoo7,207 +.Lfunc_end0:Lfunc_end012,388 +main: # @mainmain19,515 +.Lfunc_end1:Lfunc_end125,726 + +externals/binaryen/test/torture-s/float-floor.c.s,169 +main: # @mainmain7,212 +.LBB0_3: # %if.thenLBB0_329,902 +.Lfunc_end0:Lfunc_end034,1044 +d:d42,1198 + +externals/binaryen/test/torture-s/981206-1.c.s,205 +foo: # @foofoo7,205 +.Lfunc_end0:Lfunc_end017,516 +main: # @mainmain24,643 +.Lfunc_end1:Lfunc_end137,975 +x:x43,1097 +y:y50,1228 + +externals/binaryen/test/torture-s/pr43236.c.s,159 +main: # @mainmain7,208 +.LBB0_3: # %if.thenLBB0_3119,3587 +.Lfunc_end0:Lfunc_end0124,3729 + +externals/binaryen/test/torture-s/991221-1.c.s,90 +main: # @mainmain7,209 +.Lfunc_end0:Lfunc_end014,396 + +externals/binaryen/test/torture-s/930818-1.c.s,175 +f: # @ff7,197 +.Lfunc_end0:Lfunc_end013,405 +main: # @mainmain20,528 +.Lfunc_end1:Lfunc_end127,715 + +externals/binaryen/test/torture-s/20020916-1.c.s,179 +foo: # @foofoo7,207 +.Lfunc_end0:Lfunc_end018,545 +main: # @mainmain25,672 +.Lfunc_end1:Lfunc_end131,884 + +externals/binaryen/test/torture-s/921124-1.c.s,329 +f: # @ff7,197 +.Lfunc_end0:Lfunc_end014,436 +g: # @gg21,547 +.LBB1_5: # %if.thenLBB1_543,1311 +.Lfunc_end1:Lfunc_end148,1453 +main: # @mainmain55,1576 +.Lfunc_end2:Lfunc_end262,1763 + +externals/binaryen/test/torture-s/pr19689.c.s,193 +foo: # @foofoo7,204 +.Lfunc_end0:Lfunc_end021,638 +main: # @mainmain28,765 +.Lfunc_end1:Lfunc_end142,1201 +f:f50,1352 + +externals/binaryen/test/torture-s/990106-2.c.s,188 +calc_mp: # @calc_mpcalc_mp7,221 +.Lfunc_end0:Lfunc_end023,697 +main: # @mainmain30,832 +.Lfunc_end1:Lfunc_end138,1039 + +externals/binaryen/test/torture-s/ffs-2.c.s,191 +main: # @mainmain7,206 +.LBB0_9: # %if.thenLBB0_9119,3961 +.Lfunc_end0:Lfunc_end0124,4103 +ffstesttab:ffstesttab132,4293 + +externals/binaryen/test/torture-s/align-2.c.s,484 +main: # @mainmain7,208 +.LBB0_29: # %if.then121LBB0_29196,7202 +.Lfunc_end0:Lfunc_end0201,7347 +s_c_s:s_c_s209,7517 +s_c_i:s_c_i220,7752 +s_s_i:s_s_i231,7987 +s_c_f:s_c_f242,8223 +s_s_f:s_s_f253,8463 +s_c_d:s_c_d264,8704 +s_s_d:s_s_d275,8946 +s_i_d:s_i_d286,9189 +s_f_d:s_f_d297,9432 +s_c_ld:s_c_ld308,9683 +s_s_ld:s_s_ld320,9959 +s_i_ld:s_i_ld332,10236 +s_f_ld:s_f_ld344,10513 +s_d_ld:s_d_ld356,10794 + +externals/binaryen/test/torture-s/920922-1.c.s,175 +f: # @ff7,197 +.Lfunc_end0:Lfunc_end021,618 +main: # @mainmain28,741 +.Lfunc_end1:Lfunc_end135,929 + +externals/binaryen/test/torture-s/wchar_t-1.c.s,183 +main: # @mainmain7,210 +.LBB0_4: # %if.then3LBB0_430,952 +.Lfunc_end0:Lfunc_end035,1095 +x:x43,1249 +y:y53,1452 + +externals/binaryen/test/torture-s/pr58831.c.s,556 +main: # @mainmain7,208 +.Lfunc_end0:Lfunc_end020,593 +fn2: # @fn2fn225,693 +.Lfunc_end1:Lfunc_end135,1005 +fn1: # @fn1fn140,1103 +.LBB2_2: # %for.bodyLBB2_250,1422 +.LBB2_3: # %for.endLBB2_363,1860 +.Lfunc_end2:Lfunc_end274,2183 +i:i82,2332 +b:b91,2465 +a:a100,2598 +c:c109,2759 +d:d118,2920 +f:f127,3081 +p:p136,3242 +q:q145,3403 +r:r154,3564 +o:o163,3697 +j:j172,3858 + +externals/binaryen/test/torture-s/930429-2.c.s,175 +f: # @ff7,197 +.Lfunc_end0:Lfunc_end017,503 +main: # @mainmain24,626 +.Lfunc_end1:Lfunc_end131,815 + +externals/binaryen/test/torture-s/pr36093.c.s,107 +main: # @mainmain7,208 +.Lfunc_end0:Lfunc_end029,943 +foo:foo37,1102 + +externals/binaryen/test/torture-s/20030316-1.c.s,90 +main: # @mainmain7,211 +.Lfunc_end0:Lfunc_end013,422 + +externals/binaryen/test/torture-s/921218-1.c.s,175 +f: # @ff7,197 +.Lfunc_end0:Lfunc_end013,407 +main: # @mainmain20,530 +.Lfunc_end1:Lfunc_end127,717 + +externals/binaryen/test/torture-s/990531-1.c.s,180 +bad: # @badbad7,205 +.Lfunc_end0:Lfunc_end026,755 +main: # @mainmain33,882 +.Lfunc_end1:Lfunc_end140,1070 + +externals/binaryen/test/torture-s/960311-1.c.s,484 +a1: # @a1a17,201 +.Lfunc_end0:Lfunc_end017,528 +b: # @bb24,641 +.LBB1_2: # %if.endLBB1_239,1099 +.LBB1_4: # %if.end7LBB1_453,1546 +.LBB1_6: # %if.end15LBB1_667,2003 +.Lfunc_end1:Lfunc_end171,2169 +main: # @mainmain78,2292 +.Lfunc_end2:Lfunc_end288,2557 +count:count96,2724 + +externals/binaryen/test/torture-s/pr58574.c.s,4819 +foo: # @foofoo7,204 +.LBB0_2: # %sw.bbLBB0_2149,5659 +.LBB0_3: # %sw.bb12LBB0_3175,6685 +.LBB0_4: # %sw.bb27LBB0_4201,7714 +.LBB0_5: # %sw.bb42LBB0_5227,8743 +.LBB0_6: # %sw.bb57LBB0_6253,9772 +.LBB0_7: # %sw.bb72LBB0_7279,10801 +.LBB0_8: # %sw.bb87LBB0_8305,11830 +.LBB0_9: # %sw.bb102LBB0_9331,12859 +.LBB0_10: # %sw.bb117LBB0_10357,13887 +.LBB0_11: # %sw.bb132LBB0_11383,14916 +.LBB0_12: # %sw.bb147LBB0_12409,15946 +.LBB0_13: # %sw.bb162LBB0_13435,16973 +.LBB0_14: # %sw.bb177LBB0_14461,18002 +.LBB0_15: # %sw.bb192LBB0_15487,19031 +.LBB0_16: # %sw.bb207LBB0_16513,20061 +.LBB0_17: # %sw.bb222LBB0_17539,21054 +.LBB0_18: # %sw.bb237LBB0_18565,22044 +.LBB0_19: # %sw.bb252LBB0_19591,23034 +.LBB0_20: # %sw.bb267LBB0_20617,24025 +.LBB0_21: # %sw.bb282LBB0_21643,25016 +.LBB0_22: # %sw.bb297LBB0_22669,26007 +.LBB0_23: # %sw.bb312LBB0_23695,26998 +.LBB0_24: # %sw.bb327LBB0_24721,27989 +.LBB0_25: # %sw.bb342LBB0_25747,28980 +.LBB0_26: # %sw.bb357LBB0_26773,29969 +.LBB0_27: # %sw.bb372LBB0_27799,30959 +.LBB0_28: # %sw.bb387LBB0_28825,31949 +.LBB0_29: # %sw.bb402LBB0_29851,32940 +.LBB0_30: # %sw.bb417LBB0_30877,33931 +.LBB0_31: # %sw.bb432LBB0_31903,34921 +.LBB0_32: # %sw.bb447LBB0_32929,35911 +.LBB0_33: # %sw.bb462LBB0_33955,36901 +.LBB0_34: # %sw.bb477LBB0_34981,37891 +.LBB0_35: # %sw.bb492LBB0_351007,38881 +.LBB0_36: # %sw.bb507LBB0_361033,39869 +.LBB0_37: # %sw.bb522LBB0_371059,40859 +.LBB0_38: # %sw.bb537LBB0_381085,41848 +.LBB0_39: # %sw.bb552LBB0_391111,42836 +.LBB0_40: # %sw.bb567LBB0_401137,43826 +.LBB0_41: # %sw.bb582LBB0_411163,44816 +.LBB0_42: # %sw.bb597LBB0_421189,45805 +.LBB0_43: # %sw.bb612LBB0_431215,46795 +.LBB0_44: # %sw.bb627LBB0_441241,47784 +.LBB0_45: # %sw.bb642LBB0_451267,48773 +.LBB0_46: # %sw.bb657LBB0_461293,49763 +.LBB0_47: # %sw.bb672LBB0_471319,50752 +.LBB0_48: # %sw.bb687LBB0_481345,51742 +.LBB0_49: # %sw.bb702LBB0_491371,52732 +.LBB0_50: # %sw.bb717LBB0_501397,53721 +.LBB0_51: # %sw.bb732LBB0_511423,54710 +.LBB0_52: # %sw.bb747LBB0_521449,55700 +.LBB0_53: # %sw.bb762LBB0_531475,56689 +.LBB0_54: # %sw.bb777LBB0_541501,57678 +.LBB0_55: # %sw.bb792LBB0_551527,58668 +.LBB0_56: # %sw.bb807LBB0_561553,59658 +.LBB0_57: # %sw.bb822LBB0_571579,60646 +.LBB0_58: # %sw.bb837LBB0_581605,61635 +.LBB0_59: # %sw.bb852LBB0_591631,62624 +.LBB0_60: # %sw.bb867LBB0_601657,63613 +.LBB0_61: # %sw.bb882LBB0_611683,64601 +.LBB0_62: # %sw.bb897LBB0_621709,65553 +.LBB0_63: # %sw.bb912LBB0_631735,66502 +.LBB0_64: # %sw.bb927LBB0_641761,67450 +.LBB0_65: # %sw.bb942LBB0_651787,68398 +.LBB0_66: # %cleanupLBB0_661812,69305 +.Lfunc_end0:Lfunc_end01817,69507 +main: # @mainmain1824,69634 +.LBB1_3: # %if.thenLBB1_31845,70338 +.Lfunc_end1:Lfunc_end11850,70481 + +externals/binaryen/test/torture-s/960521-1.c.s,505 +foo: # @foofoo7,205 +.LBB0_2: # %for.bodyLBB0_221,617 +.LBB0_3: # %for.cond1.preheaderLBB0_335,1095 +.Lfunc_end0:Lfunc_end046,1473 +main: # @mainmain53,1600 +.LBB1_1: # %for.body.iLBB1_178,2343 +.LBB1_4: # %if.thenLBB1_4102,3127 +.Lfunc_end1:Lfunc_end1107,3269 +n:n115,3420 +a:a124,3581 +b:b133,3714 + +externals/binaryen/test/torture-s/980617-1.c.s,245 +foo: # @foofoo7,205 +.LBB0_2: # %if.elseLBB0_219,569 +.Lfunc_end0:Lfunc_end024,711 +main: # @mainmain31,838 +.Lfunc_end1:Lfunc_end151,1386 + +externals/binaryen/test/torture-s/pr34070-1.c.s,175 +f: # @ff7,198 +.Lfunc_end0:Lfunc_end015,450 +main: # @mainmain22,573 +.Lfunc_end1:Lfunc_end128,785 + +externals/binaryen/test/torture-s/920428-1.c.s,241 +x: # @xx7,197 +.Lfunc_end0:Lfunc_end014,419 +main: # @mainmain21,542 +.LBB1_2: # %if.thenLBB1_232,873 +.Lfunc_end1:Lfunc_end137,1015 + +externals/binaryen/test/torture-s/20080522-1.c.s,355 +foo: # @foofoo7,207 +.Lfunc_end0:Lfunc_end020,576 +bar: # @barbar27,699 +.Lfunc_end1:Lfunc_end139,1043 +main: # @mainmain46,1170 +.LBB2_7: # %if.then17LBB2_7102,3031 +.Lfunc_end2:Lfunc_end2107,3175 +i:i113,3297 + +externals/binaryen/test/torture-s/pr57860.c.s,1747 +foo: # @foofoo7,209 +.LBB0_2:LBB0_227,729 +.LBB0_3: # =>This Inner Loop Header: Depth=1LBB0_330,799 +.LBB0_4: # %for.inc6LBB0_443,1249 +.LBB0_6: # %for.inc.preheaderLBB0_657,1784 +.LBB0_8: # %for.endLBB0_866,2173 +.LBB0_10: # %if.thenLBB0_1092,3067 +.LBB0_11: # in Loop: Header=BB0_3 Depth=1LBB0_1196,3199 +.LBB0_12: # in Loop: Header=BB0_3 Depth=1LBB0_12100,3378 +.LBB0_13:LBB0_13104,3557 +.Lfunc_end0:Lfunc_end0107,3587 +main: # @mainmain114,3714 +.LBB1_2:LBB1_2132,4196 +.LBB1_3: # =>This Inner Loop Header: Depth=1LBB1_3135,4267 +.LBB1_4: # %for.inc6.iLBB1_4153,4883 +.LBB1_6: # %for.inc.preheader.iLBB1_6167,5423 +.LBB1_8: # %for.end.iLBB1_8176,5816 +.LBB1_10: # %foo.exitLBB1_10203,6742 +.LBB1_12: # %if.endLBB1_12214,7205 +.LBB1_13: # %if.thenLBB1_13218,7339 +.LBB1_14: # in Loop: Header=BB1_3 Depth=1LBB1_14222,7472 +.LBB1_15: # in Loop: Header=BB1_3 Depth=1LBB1_15226,7653 +.LBB1_16: # in Loop: Header=BB1_3 Depth=1LBB1_16230,7834 +.LBB1_17:LBB1_17234,8015 +.Lfunc_end1:Lfunc_end1237,8045 +a:a245,8196 +b:b254,8360 +e:e263,8493 +f:f272,8657 +d:d281,8790 +h:h290,8954 +k:k299,9090 +c:c308,9251 +g:g317,9412 + +externals/binaryen/test/torture-s/20040313-1.c.s,90 +main: # @mainmain7,211 +.Lfunc_end0:Lfunc_end013,422 + +externals/binaryen/test/torture-s/struct-ret-2.c.s,261 +f: # @ff7,201 +.Lfunc_end0:Lfunc_end013,411 +g: # @gg20,522 +.Lfunc_end1:Lfunc_end126,733 +main: # @mainmain33,856 +.Lfunc_end2:Lfunc_end240,1043 + +externals/binaryen/test/torture-s/20011219-1.c.s,338 +bar: # @barbar7,207 +.Lfunc_end0:Lfunc_end012,398 +foo: # @foofoo19,521 +.LBB1_2: # %sw.epilogLBB1_233,977 +.Lfunc_end1:Lfunc_end138,1175 +main: # @mainmain45,1302 +.Lfunc_end2:Lfunc_end252,1490 + +externals/binaryen/test/torture-s/pr57861.c.s,364 +main: # @mainmain7,208 +.LBB0_2: # %for.inc.i.1LBB0_243,1246 +.LBB0_4: # %if.thenLBB0_468,1968 +.Lfunc_end0:Lfunc_end073,2110 +a:a81,2264 +b:b90,2425 +g:g99,2589 +f:f108,2722 +c:c117,2883 +d:d126,3044 +h:h135,3205 +i:i144,3366 +j:j153,3527 +e:e162,3688 + +externals/binaryen/test/torture-s/strct-pack-1.c.s,249 +check: # @checkcheck7,217 +.LBB0_3: # %returnLBB0_325,779 +.Lfunc_end0:Lfunc_end030,974 +main: # @mainmain37,1105 +.Lfunc_end1:Lfunc_end144,1293 + +externals/binaryen/test/torture-s/pr57875.c.s,587 +main: # @mainmain7,208 +.LBB0_2: # %for.bodyLBB0_223,707 +.LBB0_5: # %if.then2LBB0_539,1380 +.LBB0_6: # %if.endLBB0_646,1642 +.LBB0_7: # %for.incLBB0_754,1945 +.LBB0_9: # %for.endLBB0_968,2443 +.LBB0_11: # %if.then9LBB0_1187,3019 +.Lfunc_end0:Lfunc_end092,3162 +i:i100,3313 +d:d109,3474 +c:c118,3635 +f:f127,3796 +e:e135,3945 +a:a144,4077 +b:b153,4209 + +externals/binaryen/test/torture-s/nestfunc-4.c.s,359 +main: # @mainmain7,211 +.Lfunc_end0:Lfunc_end026,728 +foo: # @foofoo33,853 +.Lfunc_end1:Lfunc_end151,1393 +bar: # @barbar58,1516 +.LBB2_2: # %cond.endLBB2_272,1946 +.Lfunc_end2:Lfunc_end277,2145 +level:level85,2310 + +externals/binaryen/test/torture-s/pr19515.c.s,90 +main: # @mainmain7,208 +.Lfunc_end0:Lfunc_end013,419 + +externals/binaryen/test/torture-s/20010118-1.c.s,401 +foo: # @foofoo7,207 +.Lfunc_end0:Lfunc_end012,408 +bar: # @barbar19,531 +.LBB1_2: # %if.thenLBB1_233,994 +.LBB1_3: # %if.endLBB1_357,1737 +.Lfunc_end1:Lfunc_end161,1901 +main: # @mainmain68,2028 +.Lfunc_end2:Lfunc_end275,2216 + +externals/binaryen/test/torture-s/cmpsi-1.c.s,495 +f1: # @f1f17,200 +.LBB0_2: # %if.then2LBB0_219,560 +.Lfunc_end0:Lfunc_end024,703 +f2: # @f2f231,820 +.LBB1_2: # %if.then2LBB1_243,1180 +.Lfunc_end1:Lfunc_end148,1323 +dummy: # @dummydummy55,1452 +.Lfunc_end2:Lfunc_end262,1680 +main: # @mainmain69,1811 +.Lfunc_end3:Lfunc_end376,1998 + +externals/binaryen/test/torture-s/pr59643.c.s,547 +foo: # @foofoo7,204 +.LBB0_2: # %for.bodyLBB0_228,831 +.LBB0_3: # %for.endLBB0_355,1686 +.Lfunc_end0:Lfunc_end060,1861 +main: # @mainmain67,1988 +.LBB1_1: # %for.bodyLBB1_186,2567 +.LBB1_3: # %for.body12LBB1_3128,3850 +.LBB1_6: # %if.thenLBB1_6159,4905 +.Lfunc_end1:Lfunc_end1164,5047 +expected:expected172,5229 + +externals/binaryen/test/torture-s/pr38048-2.c.s,179 +foo: # @foofoo7,206 +.Lfunc_end0:Lfunc_end013,417 +main: # @mainmain20,544 +.Lfunc_end1:Lfunc_end126,756 + +externals/binaryen/test/torture-s/20080506-1.c.s,90 +main: # @mainmain7,211 +.Lfunc_end0:Lfunc_end013,422 + +externals/binaryen/test/torture-s/pr56799.c.s,435 +main: # @mainmain7,213 +.LBB0_4: # %if.endLBB0_441,1288 +.Lfunc_end0:Lfunc_end046,1429 +foo: # @foofoo53,1554 +.LBB1_2:LBB1_273,2117 +.LBB1_3: # %if.endLBB1_376,2187 +.LBB1_5: # %if.end10LBB1_587,2538 +.Lfunc_end1:Lfunc_end192,2737 +hi:hi100,2890 +lo:lo109,3057 + +externals/binaryen/test/torture-s/20030928-1.c.s,194 +get_addrs: # @get_addrsget_addrs7,231 +.Lfunc_end0:Lfunc_end060,1860 +main: # @mainmain67,1999 +.Lfunc_end1:Lfunc_end174,2192 + +externals/binaryen/test/torture-s/pr27671-1.c.s,90 +main: # @mainmain7,210 +.Lfunc_end0:Lfunc_end014,397 + +externals/binaryen/test/torture-s/pr56982.c.s,415 +baz: # @bazbaz7,204 +.Lfunc_end0:Lfunc_end013,386 +f: # @ff20,501 +.LBB1_2: # %if.endLBB1_232,833 +.LBB1_4: # %if.then2LBB1_445,1212 +.Lfunc_end1:Lfunc_end151,1383 +main: # @mainmain58,1506 +.Lfunc_end2:Lfunc_end282,2219 +env:env88,2345 + +externals/binaryen/test/torture-s/memcpy-bi.c.s,433 +check: # @checkcheck7,214 +.LBB0_2: # %if.thenLBB0_215,498 +.Lfunc_end0:Lfunc_end020,640 +main: # @mainmain27,771 +.LBB1_1: # %for.bodyLBB1_132,914 +.LBB1_79: # %if.then.i320LBB1_791015,36394 +.Lfunc_end1:Lfunc_end11020,36541 +src:src1028,36700 +dst:dst1037,36846 + +externals/binaryen/test/torture-s/20081117-1.c.s,255 +f: # @ff7,199 +.Lfunc_end0:Lfunc_end018,543 +main: # @mainmain25,666 +.LBB1_2: # %if.thenLBB1_253,1503 +.Lfunc_end1:Lfunc_end158,1645 +s:s66,1799 + +externals/binaryen/test/torture-s/960215-1.c.s,307 +main: # @mainmain7,209 +.LBB0_2: # %if.endLBB0_2271,8763 +.Lfunc_end0:Lfunc_end0277,8936 +C:C285,9090 +U:U295,9287 +Y2:Y2305,9488 +Y1:Y1315,9691 +X:X325,9887 +Y:Y335,10063 +Z:Z345,10239 +T:T355,10415 +R:R365,10591 +S:S375,10767 + +externals/binaryen/test/torture-s/inst-check.c.s,201 +f: # @ff7,204 +.LBB0_2:LBB0_230,892 +.Lfunc_end0:Lfunc_end035,1046 +main: # @mainmain42,1169 +.Lfunc_end1:Lfunc_end149,1356 + +externals/binaryen/test/torture-s/930921-1.c.s,308 +f: # @ff7,197 +.Lfunc_end0:Lfunc_end019,575 +main: # @mainmain26,698 +.LBB1_1: # %for.bodyLBB1_133,887 +.LBB1_4: # %if.thenLBB1_461,1821 +.Lfunc_end1:Lfunc_end166,1963 + +externals/binaryen/test/torture-s/20080117-1.c.s,384 +gstate_path_memory: # @gstate_path_memorygstate_path_memory7,267 +.Lfunc_end0:Lfunc_end020,713 +gs_state_update_overprint: # @gs_state_update_overprintgs_state_update_overprint27,954 +.Lfunc_end1:Lfunc_end133,1186 +main: # @mainmain40,1357 +.Lfunc_end2:Lfunc_end246,1568 +gstate_initial:gstate_initial52,1720 + +externals/binaryen/test/torture-s/951204-1.c.s,175 +f: # @ff7,197 +.Lfunc_end0:Lfunc_end016,470 +main: # @mainmain23,593 +.Lfunc_end1:Lfunc_end130,780 + +externals/binaryen/test/torture-s/align-3.c.s,181 +func: # @funcfunc8,220 +.Lfunc_end0:Lfunc_end012,388 +main: # @mainmain19,517 +.Lfunc_end1:Lfunc_end125,728 + +externals/binaryen/test/torture-s/20020328-1.c.s,356 +func: # @funcfunc7,211 +.Lfunc_end0:Lfunc_end014,438 +testit: # @testittestit21,575 +.LBB1_2: # %if.thenLBB1_230,855 +.Lfunc_end1:Lfunc_end135,997 +main: # @mainmain42,1130 +.Lfunc_end2:Lfunc_end249,1317 +b:b57,1468 + +externals/binaryen/test/torture-s/pr57281.c.s,409 +foo: # @foofoo7,204 +.Lfunc_end0:Lfunc_end023,668 +main: # @mainmain30,795 +.LBB1_2: # %for.bodyLBB1_247,1296 +.LBB1_3: # %for.endLBB1_372,2080 +.Lfunc_end1:Lfunc_end178,2286 +a:a86,2440 +d:d95,2601 +e:e104,2765 +c:c113,2898 +g:g122,3062 +b:b131,3195 +f:f140,3356 + +externals/binaryen/test/torture-s/950628-1.c.s,262 +g: # @gg7,197 +.Lfunc_end0:Lfunc_end018,521 +f: # @ff25,632 +.Lfunc_end1:Lfunc_end136,956 +main: # @mainmain43,1079 +.Lfunc_end2:Lfunc_end250,1267 + +externals/binaryen/test/torture-s/920730-1.c.s,443 +f1: # @f1f17,201 +.Lfunc_end0:Lfunc_end013,410 +f2: # @f2f220,527 +.Lfunc_end1:Lfunc_end126,736 +f3: # @f3f333,853 +.Lfunc_end2:Lfunc_end239,1062 +f4: # @f4f446,1179 +.Lfunc_end3:Lfunc_end352,1388 +main: # @mainmain59,1513 +.Lfunc_end4:Lfunc_end466,1700 + +externals/binaryen/test/torture-s/991019-1.c.s,179 +foo: # @foofoo7,205 +.Lfunc_end0:Lfunc_end015,462 +main: # @mainmain22,589 +.Lfunc_end1:Lfunc_end129,776 + +externals/binaryen/test/torture-s/20001203-1.c.s,90 +main: # @mainmain7,211 +.Lfunc_end0:Lfunc_end014,398 + +externals/binaryen/test/torture-s/20050131-1.c.s,179 +foo: # @foofoo7,207 +.Lfunc_end0:Lfunc_end015,460 +main: # @mainmain22,587 +.Lfunc_end1:Lfunc_end129,775 + +externals/binaryen/test/torture-s/pr31448.c.s,282 +g: # @gg7,196 +.Lfunc_end0:Lfunc_end012,326 +f: # @ff19,437 +.Lfunc_end1:Lfunc_end142,1146 +main: # @mainmain49,1269 +.Lfunc_end2:Lfunc_end263,1707 +next:next71,1870 + +externals/binaryen/test/torture-s/pr49281.c.s,338 +foo: # @foofoo7,204 +.Lfunc_end0:Lfunc_end017,511 +bar: # @barbar24,634 +.Lfunc_end1:Lfunc_end134,941 +main: # @mainmain41,1068 +.LBB2_7: # %if.then14LBB2_783,2562 +.Lfunc_end2:Lfunc_end288,2706 + +externals/binaryen/test/torture-s/20020619-1.c.s,90 +main: # @mainmain7,211 +.Lfunc_end0:Lfunc_end013,422 + +externals/binaryen/test/torture-s/pr48809.c.s,2546 +foo: # @foofoo7,204 +.LBB0_2: # %sw.bb34LBB0_290,3624 +.LBB0_3: # %sw.epilogLBB0_393,3738 +.LBB0_4: # %sw.bbLBB0_496,3848 +.LBB0_5: # %sw.bb1LBB0_5100,3981 +.LBB0_6: # %sw.bb2LBB0_6104,4115 +.LBB0_7: # %sw.bb4LBB0_7108,4249 +.LBB0_8: # %sw.bb5LBB0_8112,4383 +.LBB0_9: # %sw.bb6LBB0_9116,4518 +.LBB0_10: # %sw.bb7LBB0_10120,4653 +.LBB0_11: # %sw.bb8LBB0_11124,4787 +.LBB0_12: # %sw.bb9LBB0_12128,4922 +.LBB0_13: # %sw.bb10LBB0_13132,5057 +.LBB0_14: # %sw.bb11LBB0_14136,5193 +.LBB0_15: # %sw.bb12LBB0_15140,5329 +.LBB0_16: # %sw.bb13LBB0_16144,5465 +.LBB0_17: # %sw.bb14LBB0_17148,5602 +.LBB0_18: # %sw.bb15LBB0_18152,5738 +.LBB0_19: # %sw.bb16LBB0_19156,5874 +.LBB0_20: # %sw.bb17LBB0_20160,6010 +.LBB0_21: # %sw.bb18LBB0_21164,6145 +.LBB0_22: # %sw.bb19LBB0_22168,6280 +.LBB0_23: # %sw.bb20LBB0_23172,6415 +.LBB0_24: # %sw.bb21LBB0_24176,6550 +.LBB0_25: # %sw.bb22LBB0_25180,6687 +.LBB0_26: # %sw.bb23LBB0_26184,6823 +.LBB0_27: # %sw.bb24LBB0_27188,6958 +.LBB0_28: # %sw.bb25LBB0_28192,7093 +.LBB0_29: # %sw.bb26LBB0_29196,7229 +.LBB0_30: # %sw.bb27LBB0_30200,7364 +.LBB0_31: # %sw.bb28LBB0_31204,7500 +.LBB0_32: # %sw.bb29LBB0_32208,7636 +.LBB0_33: # %sw.bb30LBB0_33212,7770 +.LBB0_34: # %sw.bb31LBB0_34216,7903 +.LBB0_35: # %sw.bb32LBB0_35220,8036 +.LBB0_36: # %sw.bb33LBB0_36224,8169 +.Lfunc_end0:Lfunc_end0229,8364 +main: # @mainmain236,8491 +.Lfunc_end1:Lfunc_end1242,8705 + +externals/binaryen/test/torture-s/pr43784.c.s,393 +main: # @mainmain7,208 +.LBB0_1: # %for.bodyLBB0_119,585 +.LBB0_3: # %for.body4LBB0_338,1219 +.LBB0_6: # %if.thenLBB0_662,2067 +.Lfunc_end0:Lfunc_end067,2209 +rp: # @rprp72,2307 +.Lfunc_end1:Lfunc_end180,2585 +v:v86,2703 + +externals/binaryen/test/torture-s/970214-2.c.s,90 +main: # @mainmain7,209 +.Lfunc_end0:Lfunc_end014,396 + +externals/binaryen/test/torture-s/20071220-2.c.s,523 +baz: # @bazbaz7,207 +.Lfunc_end0:Lfunc_end016,449 +f1: # @f1f123,568 +.Lfunc_end1:Lfunc_end130,809 +bar: # @barbar35,905 +.Ltmp0: # Block address takenLtmp041,1093 +.Lfunc_end2:Lfunc_end246,1305 +f2: # @f2f253,1424 +.Lfunc_end3:Lfunc_end360,1665 +main: # @mainmain67,1790 +.Lfunc_end4:Lfunc_end477,2121 + +externals/binaryen/test/torture-s/940122-1.c.s,422 +g: # @gg7,197 +.LBB0_2: # %if.thenLBB0_225,693 +.Lfunc_end0:Lfunc_end030,835 +f: # @ff37,946 +.LBB1_2: # %if.then.iLBB1_255,1442 +.Lfunc_end1:Lfunc_end160,1586 +main: # @mainmain67,1709 +.Lfunc_end2:Lfunc_end276,1956 +a:a84,2107 +b:b93,2240 + +externals/binaryen/test/torture-s/20010224-1.c.s,570 +ba_compute_psd: # @ba_compute_psdba_compute_psd7,251 +.LBB0_2: # %for.bodyLBB0_241,1301 +.LBB0_4: # %for.endLBB0_458,1892 +.Lfunc_end0:Lfunc_end062,2057 +logadd: # @logaddlogadd69,2214 +.Lfunc_end1:Lfunc_end182,2625 +main: # @mainmain89,2758 +.LBB2_2: # %if.thenLBB2_2119,3682 +.Lfunc_end2:Lfunc_end2124,3824 +masktab:masktab132,4002 +psd:psd146,4377 +bndpsd:bndpsd160,4760 + +externals/binaryen/test/torture-s/20000819-1.c.s,393 +foo: # @foofoo7,207 +.LBB0_2: # %for.bodyLBB0_222,666 +.LBB0_4: # %for.endLBB0_436,1244 +.LBB0_5: # %if.thenLBB0_540,1356 +.Lfunc_end0:Lfunc_end046,1526 +main: # @mainmain53,1653 +.Lfunc_end1:Lfunc_end162,1895 +a:a70,2049 + +externals/binaryen/test/torture-s/pr19449.c.s,272 +foo: # @foofoo7,204 +.Lfunc_end0:Lfunc_end014,428 +main: # @mainmain21,555 +.LBB1_3: # %if.thenLBB1_337,1068 +.Lfunc_end1:Lfunc_end142,1210 +z:z50,1364 +y:y59,1525 + +externals/binaryen/test/torture-s/980602-1.c.s,90 +main: # @mainmain7,209 +.Lfunc_end0:Lfunc_end014,398 + +externals/binaryen/test/torture-s/pr47538.c.s,515 +foo: # @foofoo7,209 +.LBB0_3:LBB0_343,1302 +.LBB0_4: # %for.cond.preheaderLBB0_448,1414 +.LBB0_6: # %for.bodyLBB0_664,1895 +.LBB0_7:LBB0_790,2735 +.LBB0_8: # %for.endLBB0_895,2843 +.Lfunc_end0:Lfunc_end0118,3582 +main: # @mainmain125,3709 +.LBB1_17: # %if.then61LBB1_17366,11556 +.Lfunc_end1:Lfunc_end1371,11700 + +externals/binaryen/test/torture-s/20111227-2.c.s,797 +bar: # @barbar7,207 +.LBB0_2: # %if.endLBB0_223,701 +.LBB0_4: # %if.end9LBB0_435,1109 +.LBB0_6: # %if.end16LBB0_645,1470 +.LBB0_7: # %if.then15LBB0_748,1573 +.Lfunc_end0:Lfunc_end053,1717 +foo: # @foofoo60,1840 +.LBB1_4: # %if.then8LBB1_484,2545 +.LBB1_5: # %if.end11LBB1_588,2686 +.LBB1_6: # %if.then3LBB1_692,2816 +.Lfunc_end1:Lfunc_end199,3055 +main: # @mainmain106,3182 +.Lfunc_end2:Lfunc_end2119,3575 +v:v126,3717 +s:s135,3878 +i:i144,4039 +l:l153,4200 + +externals/binaryen/test/torture-s/20000605-2.c.s,378 +f1: # @f1f17,203 +.LBB0_2: # %for.bodyLBB0_220,597 +.LBB0_4: # %for.endLBB0_439,1309 +.LBB0_5: # %if.thenLBB0_543,1421 +.Lfunc_end0:Lfunc_end048,1563 +main: # @mainmain55,1688 +.Lfunc_end1:Lfunc_end177,2280 + +externals/binaryen/test/torture-s/980929-1.c.s,240 +f: # @ff7,197 +.LBB0_2: # %if.thenLBB0_216,474 +.Lfunc_end0:Lfunc_end021,616 +main: # @mainmain28,739 +.Lfunc_end1:Lfunc_end135,929 + +externals/binaryen/test/torture-s/960219-1.c.s,240 +f: # @ff7,197 +.LBB0_2: # %if.thenLBB0_215,439 +.Lfunc_end0:Lfunc_end020,581 +main: # @mainmain27,704 +.Lfunc_end1:Lfunc_end134,891 + +externals/binaryen/test/torture-s/20120111-1.c.s,246 +f0a: # @f0af0a7,207 +.Lfunc_end0:Lfunc_end017,516 +main: # @mainmain24,643 +.LBB1_2: # %if.thenLBB1_236,1034 +.Lfunc_end1:Lfunc_end141,1176 + +externals/binaryen/test/torture-s/pr36034-2.c.s,291 +test: # @testtest7,210 +.Lfunc_end0:Lfunc_end0131,3778 +main: # @mainmain138,3907 +.LBB1_31: # %if.thenLBB1_31325,10616 +.Lfunc_end1:Lfunc_end1330,10758 +x:x338,10912 +tmp:tmp396,13245 + +externals/binaryen/test/torture-s/20100416-1.c.s,274 +movegt: # @movegtmovegt7,219 +.Lfunc_end0:Lfunc_end020,653 +main: # @mainmain27,786 +.LBB1_6: # %if.thenLBB1_693,3044 +.Lfunc_end1:Lfunc_end198,3186 +tests:tests106,3356 + +externals/binaryen/test/torture-s/20050826-1.c.s,906 +bar: # @barbar7,207 +.LBB0_2: # %for.bodyLBB0_220,618 +.LBB0_5: # %if.then2LBB0_538,1276 +.LBB0_6: # %if.thenLBB0_642,1409 +.Lfunc_end0:Lfunc_end047,1551 +foo: # @foofoo54,1674 +.LBB1_2: # %for.cond.iLBB1_284,2602 +.LBB1_5: # %bar.exitLBB1_5107,3415 +.LBB1_6: # %if.then.iLBB1_6111,3550 +.Lfunc_end1:Lfunc_end1116,3694 +main: # @mainmain123,3821 +.LBB2_2: # %for.cond.i.iLBB2_2153,4752 +.LBB2_5: # %foo.exitLBB2_5176,5571 +.LBB2_6: # %if.then.i.iLBB2_6180,5706 +.Lfunc_end2:Lfunc_end2185,5852 +a:a198,6123 + +externals/binaryen/test/torture-s/20010604-1.c.s,244 +f: # @ff7,199 +.LBB0_5: # %if.thenLBB0_531,1018 +.Lfunc_end0:Lfunc_end036,1160 +main: # @mainmain43,1283 +.Lfunc_end1:Lfunc_end150,1471 + +externals/binaryen/test/torture-s/zero-struct-2.c.s,287 +one_raw_spinlock: # @one_raw_spinlockone_raw_spinlock7,262 +.Lfunc_end0:Lfunc_end017,597 +main: # @mainmain24,750 +.LBB1_2: # %if.thenLBB1_240,1206 +.Lfunc_end1:Lfunc_end145,1348 +ii:ii53,1503 + +externals/binaryen/test/torture-s/pr44555.c.s,179 +foo: # @foofoo7,204 +.Lfunc_end0:Lfunc_end015,457 +main: # @mainmain22,584 +.Lfunc_end1:Lfunc_end128,796 + +externals/binaryen/test/torture-s/20020615-1.c.s,398 +line_hints: # @line_hintsline_hints7,240 +.LBB0_3: # %if.elseLBB0_368,2163 +.LBB0_6: # %if.end40LBB0_691,2926 +.Lfunc_end0:Lfunc_end096,3123 +main: # @mainmain103,3264 +.LBB1_4: # %if.thenLBB1_4134,4392 +.Lfunc_end1:Lfunc_end1139,4534 + +externals/binaryen/test/torture-s/20061031-1.c.s,421 +ff: # @ffff7,203 +.Lfunc_end0:Lfunc_end014,398 +f: # @ff21,511 +.LBB1_2: # %for.incLBB1_236,922 +.LBB1_4: # %for.inc.1LBB1_447,1251 +.Lfunc_end1:Lfunc_end151,1418 +main: # @mainmain58,1541 +.Lfunc_end2:Lfunc_end266,1803 +nunmap:nunmap73,1966 + +externals/binaryen/test/torture-s/20010129-1.c.s,994 +baz1: # @baz1baz17,216 +.Lfunc_end0:Lfunc_end022,651 +baz2: # @baz2baz229,780 +.Lfunc_end1:Lfunc_end136,1005 +baz3: # @baz3baz343,1134 +.LBB2_2: # %if.thenLBB2_253,1426 +.Lfunc_end2:Lfunc_end258,1568 +foo: # @foofoo65,1693 +.LBB3_2: # %if.thenLBB3_2109,2968 +.LBB3_5: # in Loop: Header=BB3_2 Depth=1LBB3_5128,3736 +.LBB3_6: # %land.lhs.true20LBB3_6132,3917 +.LBB3_7: # %while.cond.backedgeLBB3_7145,4383 +.LBB3_8: # %while.endLBB3_8157,4839 +.LBB3_9: # %for.bodyLBB3_9162,4985 +.Lfunc_end3:Lfunc_end3167,5128 +main: # @mainmain174,5255 +.Lfunc_end4:Lfunc_end4198,5922 +bar:bar213,6233 + +externals/binaryen/test/torture-s/pr43560.c.s,331 +test: # @testtest7,208 +.LBB0_2: # %land.rhsLBB0_220,619 +.LBB0_4: # %while.endLBB0_444,1482 +.Lfunc_end0:Lfunc_end049,1659 +main: # @mainmain56,1788 +.Lfunc_end1:Lfunc_end167,2074 +s:s75,2229 + +externals/binaryen/test/torture-s/pr35390.c.s,179 +foo: # @foofoo7,204 +.Lfunc_end0:Lfunc_end014,430 +main: # @mainmain21,557 +.Lfunc_end1:Lfunc_end127,769 + +externals/binaryen/test/torture-s/20001013-1.c.s,324 +foo: # @foofoo7,207 +.LBB0_2: # %returnLBB0_223,684 +.Lfunc_end0:Lfunc_end028,877 +main: # @mainmain35,1004 +.LBB1_2: # %if.thenLBB1_251,1476 +.Lfunc_end1:Lfunc_end156,1618 +z:z64,1772 + +externals/binaryen/test/torture-s/call-trap-1.c.s,268 +foo: # @foofoo7,208 +.Lfunc_end0:Lfunc_end014,394 +bar: # @barbar21,517 +.Lfunc_end1:Lfunc_end125,684 +main: # @mainmain32,811 +.Lfunc_end2:Lfunc_end238,976 + +externals/binaryen/test/torture-s/pr39233.c.s,245 +foo: # @foofoo7,204 +.LBB0_3: # %if.thenLBB0_320,626 +.Lfunc_end0:Lfunc_end025,768 +main: # @mainmain32,895 +.Lfunc_end1:Lfunc_end152,1470 + +externals/binaryen/test/torture-s/20000815-1.c.s,1971 +invalidate_memory: # @invalidate_memoryinvalidate_memory7,268 +.LBB0_1: # %for.bodyLBB0_118,595 +.LBB0_2: # %for.body6LBB0_232,1092 +.LBB0_6: # %for.cond5.backedgeLBB0_654,2109 +.LBB0_7: # %for.inc15LBB0_758,2332 +.LBB0_9: # %if.thenLBB0_971,2772 +.Lfunc_end0:Lfunc_end076,2934 +cse_rtx_addr_varies_p: # @cse_rtx_addr_varies_pcse_rtx_addr_varies_p83,3157 +.Lfunc_end1:Lfunc_end190,3399 +remove_from_table: # @remove_from_tableremove_from_table97,3614 +.Lfunc_end2:Lfunc_end2103,3791 +main: # @mainmain110,3946 +.LBB3_2:LBB3_2143,4901 +.LBB3_3: # =>This Inner Loop Header: Depth=1LBB3_3146,4971 +.LBB3_4: # %for.inc15.i.for.body.i_crit_edgeLBB3_4168,5683 +.LBB3_6: # %for.body6.iLBB3_6182,6263 +.LBB3_8: # %land.lhs.true10.iLBB3_8192,6696 +.LBB3_10: # %for.cond5.backedge.iLBB3_10200,7086 +.LBB3_12: # %for.inc15.iLBB3_12208,7471 +.LBB3_14: # %invalidate_memory.exitLBB3_14220,7971 +.LBB3_15: # %if.then.iLBB3_15228,8240 +.LBB3_16: # in Loop: Header=BB3_3 Depth=1LBB3_16232,8395 +.LBB3_17: # in Loop: Header=BB3_3 Depth=1LBB3_17236,8575 +.LBB3_18: # in Loop: Header=BB3_3 Depth=1LBB3_18240,8755 +.LBB3_19: # in Loop: Header=BB3_3 Depth=1LBB3_19244,8935 +.LBB3_20: # in Loop: Header=BB3_3 Depth=1LBB3_20248,9114 +.LBB3_21:LBB3_21252,9293 +.Lfunc_end3:Lfunc_end3255,9323 +table:table261,9453 + +externals/binaryen/test/torture-s/990524-1.c.s,475 +loop: # @looploop7,209 +.LBB0_1: # %for.condLBB0_111,349 +.LBB0_3: # %sw.bb2LBB0_335,1168 +.LBB0_4: # %for.condLBB0_447,1587 +.LBB0_7: # %if.thenLBB0_766,2218 +.Lfunc_end0:Lfunc_end071,2360 +main: # @mainmain78,2489 +.Lfunc_end1:Lfunc_end188,2758 +a:a95,2900 +b:b103,3030 + +externals/binaryen/test/torture-s/920520-1.c.s,275 +foo: # @foofoo7,205 +.Lfunc_end0:Lfunc_end016,477 +bugger: # @buggerbugger23,612 +.Lfunc_end1:Lfunc_end129,829 +main: # @mainmain36,962 +.Lfunc_end2:Lfunc_end243,1150 + +externals/binaryen/test/torture-s/20021204-1.c.s,258 +foo: # @foofoo7,207 +.LBB0_2: # %if.thenLBB0_216,483 +.Lfunc_end0:Lfunc_end021,625 +main: # @mainmain28,752 +.Lfunc_end1:Lfunc_end144,1177 +z:z52,1328 + +externals/binaryen/test/torture-s/20060420-1.c.s,1301 +foo: # @foofoo7,212 +.LBB0_2: # %land.rhsLBB0_222,768 +.LBB0_5: # %for.body4LBB0_547,1740 +.LBB0_6: # %for.endLBB0_662,2301 +.LBB0_7:LBB0_774,2743 +.LBB0_8: # %for.cond12.preheaderLBB0_878,2824 +.LBB0_10: # %for.body15LBB0_1097,3453 +.LBB0_12: # %for.body33LBB0_12155,5260 +.LBB0_13: # %for.end56LBB0_13225,7414 +.LBB0_15: # %for.cond73.preheaderLBB0_15280,9053 +.LBB0_17: # %for.body75LBB0_17291,9429 +.LBB0_19: # %for.body81LBB0_19308,10108 +.LBB0_20: # %for.end87LBB0_20323,10682 +.LBB0_21: # %for.end91LBB0_21334,11089 +.Lfunc_end0:Lfunc_end0339,11266 +main: # @mainmain346,11393 +.LBB1_1: # %for.bodyLBB1_1371,12155 +.LBB1_3: # %for.body16LBB1_3410,13388 +.LBB1_6: # %if.thenLBB1_6444,14552 +.Lfunc_end1:Lfunc_end1449,14695 +buffer:buffer457,14866 + +externals/binaryen/test/torture-s/pr28289.c.s,424 +ix86_split_ashr: # @ix86_split_ashrix86_split_ashr7,257 +.Lfunc_end0:Lfunc_end017,627 +ok: # @okok24,770 +.Lfunc_end1:Lfunc_end131,944 +gen_x86_64_shrd: # @gen_x86_64_shrdgen_x86_64_shrd36,1064 +.Lfunc_end2:Lfunc_end243,1300 +main: # @mainmain50,1451 +.Lfunc_end3:Lfunc_end363,1894 +one:one71,2056 + +externals/binaryen/test/torture-s/20000703-1.c.s,271 +foo: # @foofoo7,207 +.Lfunc_end0:Lfunc_end022,688 +bar: # @barbar29,811 +.Lfunc_end1:Lfunc_end157,1705 +main: # @mainmain64,1832 +.Lfunc_end2:Lfunc_end271,2021 + +externals/binaryen/test/torture-s/20020529-1.c.s,1066 +foo: # @foofoo7,212 +.LBB0_1: # %f1.exitLBB0_121,627 +.LBB0_6: # %for.condLBB0_651,1838 +.LBB0_7: # %if.then10LBB0_758,2150 +.LBB0_8: # %if.thenLBB0_863,2291 +.LBB0_9: # %if.then.iLBB0_971,2535 +.Lfunc_end0:Lfunc_end080,2793 +f1: # @f1f187,2912 +.LBB1_2: # %if.thenLBB1_2107,3478 +.Lfunc_end1:Lfunc_end1112,3620 +f2: # @f2f2119,3737 +.Lfunc_end2:Lfunc_end2124,3880 +main: # @mainmain131,4005 +.LBB3_2: # %f1.exit.iLBB3_2158,4793 +.LBB3_5: # %foo.exitLBB3_5183,5673 +.LBB3_7: # %if.thenLBB3_7197,6111 +.LBB3_8:LBB3_8201,6244 +.LBB3_9: # %if.then.i.iLBB3_9205,6345 +.Lfunc_end3:Lfunc_end3212,6549 + +externals/binaryen/test/torture-s/bf-sign-2.c.s,239 +main: # @mainmain7,210 +.LBB0_6: # %if.then42LBB0_678,2455 +.LBB0_7: # %if.end50LBB0_782,2589 +.Lfunc_end0:Lfunc_end088,2762 +x:x96,2913 + +externals/binaryen/test/torture-s/shiftopt-1.c.s,277 +utest: # @utestutest7,215 +.Lfunc_end0:Lfunc_end012,398 +stest: # @steststest19,533 +.Lfunc_end1:Lfunc_end124,716 +main: # @mainmain31,847 +.Lfunc_end2:Lfunc_end237,1058 + +externals/binaryen/test/torture-s/compare-2.c.s,179 +foo: # @foofoo7,206 +.Lfunc_end0:Lfunc_end016,497 +main: # @mainmain23,624 +.Lfunc_end1:Lfunc_end129,836 + +externals/binaryen/test/torture-s/950704-1.c.s,400 +f: # @ff7,197 +.LBB0_3: # %if.elseLBB0_331,916 +.LBB0_5: # %if.end9LBB0_540,1257 +.LBB0_6: # %cleanupLBB0_646,1446 +.Lfunc_end0:Lfunc_end051,1644 +main: # @mainmain58,1767 +.Lfunc_end1:Lfunc_end168,2034 +errflag:errflag76,2209 + +externals/binaryen/test/torture-s/20000402-1.c.s,90 +main: # @mainmain7,211 +.Lfunc_end0:Lfunc_end014,398 + +externals/binaryen/test/torture-s/20010114-1.c.s,90 +main: # @mainmain7,211 +.Lfunc_end0:Lfunc_end014,398 + +externals/binaryen/test/torture-s/va-arg-1.c.s,246 +f: # @ff7,197 +.LBB0_4: # %if.then10LBB0_450,1566 +.Lfunc_end0:Lfunc_end055,1710 +main: # @mainmain62,1833 +.Lfunc_end1:Lfunc_end182,2418 + +externals/binaryen/test/torture-s/20011114-1.c.s,179 +foo: # @foofoo7,207 +.Lfunc_end0:Lfunc_end014,437 +main: # @mainmain21,564 +.Lfunc_end1:Lfunc_end128,752 + +externals/binaryen/test/torture-s/960608-1.c.s,179 +foo: # @foofoo7,205 +.Lfunc_end0:Lfunc_end016,491 +main: # @mainmain23,618 +.Lfunc_end1:Lfunc_end130,807 + +externals/binaryen/test/torture-s/961125-1.c.s,444 +main: # @mainmain7,209 +.LBB0_1: # %land.rhs.iLBB0_113,385 +.LBB0_4: # %land.rhs4.iLBB0_429,1113 +.LBB0_6: # %while.end.thread.iLBB0_645,1785 +.LBB0_7: # %begfield.exitLBB0_754,2128 +.LBB0_9: # %if.thenLBB0_971,2657 +.Lfunc_end0:Lfunc_end076,2799 + +externals/binaryen/test/torture-s/pr23135.c.s,385 +verify: # @verifyverify7,216 +.LBB0_3: # %if.thenLBB0_318,611 +.Lfunc_end0:Lfunc_end023,753 +main: # @mainmain30,886 +.LBB1_22: # %if.then.i101LBB1_22269,8940 +.Lfunc_end1:Lfunc_end1274,9087 +i:i282,9241 +j:j292,9445 +res:res302,9652 +k:k311,9788 + +externals/binaryen/test/torture-s/990404-1.c.s,241 +main: # @mainmain7,209 +.LBB0_1: # %for.condLBB0_113,479 +.LBB0_4: # %for.end15LBB0_4129,4257 +.Lfunc_end0:Lfunc_end0135,4431 +x:x143,4585 + +externals/binaryen/test/torture-s/pr40493.c.s,157 +main: # @mainmain7,208 +.Lfunc_end0:Lfunc_end026,732 +x00:x0034,891 +x01:x0143,1064 +y00:y0052,1237 +y01:y0161,1410 + +externals/binaryen/test/torture-s/20071213-1.c.s,1099 +h: # @hh7,199 +.LBB0_4: # %if.thenLBB0_432,968 +.LBB0_5: # %sw.bb4LBB0_536,1100 +.LBB0_7: # %returnLBB0_746,1474 +.LBB0_8: # %sw.defaultLBB0_849,1575 +.Lfunc_end0:Lfunc_end054,1720 +f1: # @f1f161,1835 +.LBB1_5: # %entryLBB1_599,3038 +.LBB1_8: # %if.thenLBB1_8113,3562 +.LBB1_9: # %sw.default.iLBB1_9117,3694 +.Lfunc_end1:Lfunc_end1122,3841 +f2: # @f2f2129,3958 +.LBB2_4: # %if.then.iLBB2_4162,5000 +.LBB2_5: # %sw.bb4.iLBB2_5166,5135 +.LBB2_7: # %h.exitLBB2_7176,5513 +.LBB2_12: # %if.thenLBB2_12199,6335 +.Lfunc_end2:Lfunc_end2204,6477 +main: # @mainmain211,6602 +.Lfunc_end3:Lfunc_end3243,7569 + +externals/binaryen/test/torture-s/pr17252.c.s,168 +main: # @mainmain7,208 +.LBB0_2: # %if.thenLBB0_225,713 +.Lfunc_end0:Lfunc_end030,855 +a:a38,1006 + +externals/binaryen/test/torture-s/pr17078-1.c.s,181 +test: # @testtest7,210 +.Lfunc_end0:Lfunc_end014,438 +main: # @mainmain21,567 +.Lfunc_end1:Lfunc_end127,779 + +externals/binaryen/test/torture-s/930702-1.c.s,243 +fp: # @fpfp7,201 +.LBB0_3: # %if.thenLBB0_321,654 +.Lfunc_end0:Lfunc_end026,796 +main: # @mainmain33,921 +.Lfunc_end1:Lfunc_end140,1108 + +externals/binaryen/test/torture-s/20020206-2.c.s,245 +foo: # @foofoo7,207 +.LBB0_2: # %if.thenLBB0_218,541 +.Lfunc_end0:Lfunc_end023,683 +main: # @mainmain30,810 +.Lfunc_end1:Lfunc_end138,1021 + +externals/binaryen/test/torture-s/pr59101.c.s,246 +foo: # @foofoo7,204 +.Lfunc_end0:Lfunc_end019,583 +main: # @mainmain26,710 +.LBB1_2: # %if.thenLBB1_238,1081 +.Lfunc_end1:Lfunc_end143,1223 + +externals/binaryen/test/torture-s/20030120-2.c.s,180 +foo: # @foofoo7,207 +.Lfunc_end0:Lfunc_end023,688 +main: # @mainmain30,815 +.Lfunc_end1:Lfunc_end136,1027 + +externals/binaryen/test/torture-s/compare-3.c.s,760 +test1: # @test1test17,214 +.Lfunc_end0:Lfunc_end012,402 +test2: # @test2test219,537 +.Lfunc_end1:Lfunc_end124,725 +test3: # @test3test331,860 +.Lfunc_end2:Lfunc_end236,1048 +test4: # @test4test443,1183 +.Lfunc_end3:Lfunc_end348,1371 +test5: # @test5test555,1506 +.Lfunc_end4:Lfunc_end460,1694 +test6: # @test6test667,1829 +.Lfunc_end5:Lfunc_end572,2017 +all_tests: # @all_testsall_tests79,2168 +.Lfunc_end6:Lfunc_end684,2360 +main: # @mainmain91,2499 +.Lfunc_end7:Lfunc_end797,2710 + +externals/binaryen/test/torture-s/pr49886.c.s,1226 +never_ever: # @never_evernever_ever7,232 +.Lfunc_end0:Lfunc_end013,402 +main: # @mainmain20,543 +.Lfunc_end1:Lfunc_end129,828 +bar_1: # @bar_1bar_136,961 +.Lfunc_end2:Lfunc_end246,1285 +mark_cell: # @mark_cellmark_cell51,1399 +.LBB3_13: # %if.end137LBB3_13151,4667 +.LBB3_14: # %if.then7LBB3_14154,4771 +.LBB3_15: # %if.then22LBB3_15158,4917 +.LBB3_16: # %if.then38LBB3_16162,5064 +.LBB3_17: # %if.then54LBB3_17166,5211 +.LBB3_18: # %if.then70LBB3_18170,5358 +.LBB3_19: # %if.then86LBB3_19174,5505 +.LBB3_20: # %if.then102LBB3_20178,5652 +.LBB3_21: # %if.then118LBB3_21182,5800 +.LBB3_22: # %if.then134LBB3_22186,5948 +.Lfunc_end3:Lfunc_end3191,6106 +bar_2: # @bar_2bar_2198,6249 +.Lfunc_end4:Lfunc_end4208,6573 +cond:cond216,6738 +gi:gi225,6909 + +externals/binaryen/test/torture-s/pr51581-1.c.s,3004 +f1: # @f1f17,202 +.LBB0_1: # %for.bodyLBB0_111,334 +.Lfunc_end0:Lfunc_end030,980 +f2: # @f2f237,1097 +.LBB1_1: # %for.bodyLBB1_141,1229 +.Lfunc_end1:Lfunc_end160,1875 +f3: # @f3f367,1992 +.LBB2_1: # %for.bodyLBB2_171,2124 +.Lfunc_end2:Lfunc_end290,2771 +f4: # @f4f497,2888 +.LBB3_1: # %for.bodyLBB3_1101,3020 +.Lfunc_end3:Lfunc_end3120,3667 +f5: # @f5f5127,3784 +.LBB4_1: # %for.bodyLBB4_1131,3916 +.Lfunc_end4:Lfunc_end4150,4563 +f6: # @f6f6157,4680 +.LBB5_1: # %for.bodyLBB5_1161,4812 +.Lfunc_end5:Lfunc_end5180,5459 +f7: # @f7f7187,5576 +.LBB6_1: # %for.bodyLBB6_1191,5713 +.Lfunc_end6:Lfunc_end6218,6617 +f8: # @f8f8225,6734 +.LBB7_1: # %for.bodyLBB7_1229,6866 +.Lfunc_end7:Lfunc_end7250,7586 +f9: # @f9f9257,7703 +.LBB8_1: # %for.bodyLBB8_1261,7840 +.Lfunc_end8:Lfunc_end8288,8743 +f10: # @f10f10295,8864 +.LBB9_1: # %for.bodyLBB9_1299,8997 +.Lfunc_end9:Lfunc_end9320,9716 +f11: # @f11f11327,9839 +.LBB10_1: # %for.bodyLBB10_1331,9977 +.Lfunc_end10:Lfunc_end10358,10883 +f12: # @f12f12365,11008 +.LBB11_1: # %for.bodyLBB11_1369,11146 +.Lfunc_end11:Lfunc_end11400,12174 +main: # @mainmain407,12303 +.LBB12_1: # %for.bodyLBB12_1413,12474 +.LBB12_3: # %for.body4LBB12_3447,13462 +.LBB12_7: # %for.body17LBB12_7494,14961 +.LBB12_11: # %for.body34LBB12_11535,16418 +.LBB12_15: # %for.body51LBB12_15576,17877 +.LBB12_19: # %for.body68LBB12_19617,19335 +.LBB12_23: # %for.body85LBB12_23658,20796 +.LBB12_27: # %if.thenLBB12_27697,22215 +.LBB12_28: # %if.then27LBB12_28701,22348 +.LBB12_29: # %if.then44LBB12_29705,22483 +.LBB12_30: # %if.then61LBB12_30709,22618 +.LBB12_31: # %if.then78LBB12_31713,22753 +.LBB12_32: # %if.then95LBB12_32717,22888 +.Lfunc_end12:Lfunc_end12722,23033 +a:a730,23186 +c:c739,23326 +b:b748,23466 +d:d757,23606 + +externals/binaryen/test/torture-s/pr29797-2.c.s,179 +bar: # @barbar7,206 +.Lfunc_end0:Lfunc_end013,420 +main: # @mainmain20,547 +.Lfunc_end1:Lfunc_end126,758 + +externals/binaryen/test/torture-s/pr53160.c.s,436 +foo: # @foofoo7,204 +.Lfunc_end0:Lfunc_end014,442 +main: # @mainmain21,569 +.LBB1_2: # %for.endLBB1_233,927 +.LBB1_4: # %if.then15LBB1_460,1700 +.Lfunc_end1:Lfunc_end165,1844 +c:c73,1998 +e:e82,2159 +g:g91,2320 +b:b100,2481 +d:d109,2642 +f:f117,2791 +i:i126,2951 +h:h135,3112 +a:a144,3273 + +externals/binaryen/test/torture-s/pr45070.c.s,752 +main: # @mainmain7,208 +.LBB0_1: # %for.bodyLBB0_123,674 +.LBB0_3: # %lor.lhs.falseLBB0_337,1228 +.LBB0_5: # %for.condLBB0_549,1746 +.LBB0_7: # %if.thenLBB0_766,2324 +.Lfunc_end0:Lfunc_end071,2466 +next: # @nextnext76,2568 +.LBB1_2: # %if.thenLBB1_292,3025 +.LBB1_4: # %if.endLBB1_4110,3689 +.LBB1_5: # %cleanupLBB1_5118,3918 +.Lfunc_end1:Lfunc_end1123,4116 +fetch: # @fetchfetch128,4220 +.Lfunc_end2:Lfunc_end2135,4451 + +externals/binaryen/test/torture-s/20121108-1.c.s,811 +strtoul1: # @strtoul1strtoul17,232 +.LBB0_5:LBB0_537,1162 +.LBB0_6: # %returnLBB0_640,1234 +.LBB0_7:LBB0_743,1340 +.LBB0_8:LBB0_847,1434 +.Lfunc_end0:Lfunc_end052,1590 +string_to_ip: # @string_to_ipstring_to_ip59,1759 +.LBB1_5:LBB1_5138,4293 +.LBB1_6: # %if.end9.2.threadLBB1_6142,4409 +.LBB1_7: # %cond.end.3LBB1_7146,4561 +.LBB1_8: # %cleanupLBB1_8150,4707 +.Lfunc_end1:Lfunc_end1159,5026 +main: # @mainmain166,5171 +.LBB2_2: # %if.thenLBB2_2204,6356 +.Lfunc_end2:Lfunc_end2209,6498 +temp:temp217,6664 +result:result226,6843 +.Lstr:Lstr237,7075 + +externals/binaryen/test/torture-s/pr33870.c.s,2574 +sort_pagelist: # @sort_pagelistsort_pagelist7,249 +.LBB0_2: # %while.bodyLBB0_233,1083 +.LBB0_3: # %for.bodyLBB0_347,1759 +.LBB0_6: # %while.body.lr.ph.iLBB0_680,2933 +.LBB0_7: # %while.body.iLBB0_789,3406 +.LBB0_9: # %if.then.iLBB0_9112,4363 +.LBB0_10: # in Loop: Header=BB0_3 Depth=2LBB0_10126,4835 +.LBB0_11: # in Loop: Header=BB0_3 Depth=2LBB0_11132,5052 +.LBB0_12: # %merge_pagelist.exitLBB0_12137,5250 +.LBB0_17: # %while.body.lr.ph.i79LBB0_17170,6588 +.LBB0_18: # %while.body.i85LBB0_18178,6988 +.LBB0_20: # %if.then.i88LBB0_20199,7866 +.LBB0_21: # %for.end.threadLBB0_21212,8322 +.LBB0_22: # %while.end.i96LBB0_22219,8618 +.LBB0_24: # in Loop: Header=BB0_2 Depth=1LBB0_24230,9071 +.LBB0_25: # in Loop: Header=BB0_2 Depth=1LBB0_25235,9276 +.LBB0_26: # %while.end.thread.i99LBB0_26239,9435 +.LBB0_27: # %merge_pagelist.exit103LBB0_27243,9636 +.LBB0_28: # %while.cond.backedgeLBB0_28249,9893 +.LBB0_29: # %while.end.loopexitLBB0_29253,10117 +.LBB0_30: # %while.endLBB0_30257,10253 +.LBB0_31: # %for.body15LBB0_31260,10367 +.LBB0_34: # %while.body.lr.ph.i47LBB0_34284,11328 +.LBB0_35: # %while.body.i53LBB0_35292,11729 +.LBB0_37: # %if.then.i56LBB0_37313,12611 +.LBB0_38: # %while.end.i64LBB0_38326,13068 +.LBB0_40: # in Loop: Header=BB0_31 Depth=1LBB0_40338,13535 +.LBB0_41: # in Loop: Header=BB0_31 Depth=1LBB0_41343,13742 +.LBB0_42: # %while.end.thread.i67LBB0_42347,13903 +.LBB0_43: # %merge_pagelist.exit71LBB0_43351,14106 +.Lfunc_end0:Lfunc_end0375,14935 +main: # @mainmain382,15082 +.LBB1_2: # %if.thenLBB1_2431,16495 +.Lfunc_end1:Lfunc_end1436,16638 + +externals/binaryen/test/torture-s/20050124-1.c.s,312 +foo: # @foofoo7,207 +.LBB0_3: # %if.end5LBB0_325,734 +.LBB0_4: # %if.elseLBB0_428,841 +.Lfunc_end0:Lfunc_end035,1100 +main: # @mainmain42,1227 +.Lfunc_end1:Lfunc_end148,1441 + +externals/binaryen/test/torture-s/cvt-1.c.s,263 +g2: # @g2g27,198 +.Lfunc_end0:Lfunc_end014,428 +f: # @ff21,541 +.Lfunc_end1:Lfunc_end128,773 +main: # @mainmain35,896 +.Lfunc_end2:Lfunc_end242,1085 + +externals/binaryen/test/torture-s/20050119-1.c.s,246 +foo: # @foofoo7,207 +.LBB0_3: # %if.then6LBB0_322,699 +.Lfunc_end0:Lfunc_end027,842 +main: # @mainmain34,969 +.Lfunc_end1:Lfunc_end160,1680 + +externals/binaryen/test/torture-s/pr22061-2.c.s,102 +main: # @mainmain7,210 +.Lfunc_end0:Lfunc_end014,397 +x:x22,548 + +externals/binaryen/test/torture-s/930622-1.c.s,374 +g: # @gg7,197 +.Lfunc_end0:Lfunc_end013,405 +h: # @hh20,516 +.Lfunc_end1:Lfunc_end128,754 +f: # @ff35,865 +.Lfunc_end2:Lfunc_end244,1144 +main: # @mainmain51,1267 +.Lfunc_end3:Lfunc_end361,1526 +a:a69,1680 +b:b78,1841 + +externals/binaryen/test/torture-s/20050218-1.c.s,444 +foo: # @foofoo7,212 +.LBB0_2: # %for.bodyLBB0_220,578 +.LBB0_5: # %for.incLBB0_540,1413 +.LBB0_6:LBB0_650,1791 +.LBB0_7:LBB0_755,1891 +.Lfunc_end0:Lfunc_end060,2043 +main: # @mainmain67,2170 +.LBB1_4: # %if.thenLBB1_4103,3446 +.Lfunc_end1:Lfunc_end1108,3588 +a:a137,4115 + +externals/binaryen/test/torture-s/931012-1.c.s,175 +f: # @ff7,197 +.Lfunc_end0:Lfunc_end018,548 +main: # @mainmain25,671 +.Lfunc_end1:Lfunc_end132,859 + +externals/binaryen/test/torture-s/pr63302.c.s,342 +foo: # @foofoo7,204 +.Lfunc_end0:Lfunc_end025,781 +bar: # @barbar32,904 +.Lfunc_end1:Lfunc_end145,1316 +main: # @mainmain52,1443 +.LBB2_19: # %if.then50LBB2_19155,5512 +.Lfunc_end2:Lfunc_end2160,5656 + +externals/binaryen/test/torture-s/fprintf-1.c.s,162 +main: # @mainmain7,215 +.LBB0_12: # %if.then50LBB0_12154,5313 +.Lfunc_end0:Lfunc_end0159,5457 + +externals/binaryen/test/torture-s/divconst-1.c.s,175 +f: # @ff7,199 +.Lfunc_end0:Lfunc_end018,561 +main: # @mainmain25,684 +.Lfunc_end1:Lfunc_end132,872 + +externals/binaryen/test/torture-s/20000605-3.c.s,90 +main: # @mainmain7,211 +.Lfunc_end0:Lfunc_end013,425 + +externals/binaryen/test/torture-s/pr58431.c.s,594 +main: # @mainmain7,208 +.LBB0_2: # %lor.endLBB0_241,1164 +.LBB0_5: # %for.cond10thread-pre-splitLBB0_563,1846 +.LBB0_7: # %for.end22LBB0_774,2247 +.LBB0_9: # %if.then26LBB0_986,2623 +.LBB0_10: # %for.end22.threadLBB0_1090,2757 +.Lfunc_end0:Lfunc_end098,2983 +i:i106,3134 +b:b115,3295 +k:k124,3456 +g:g133,3617 +j:j142,3778 +c:c151,3939 +a:a159,4088 +d:d168,4248 +h:h176,4397 +e:e185,4557 + +externals/binaryen/test/torture-s/20111227-3.c.s,797 +bar: # @barbar7,207 +.LBB0_2: # %if.endLBB0_223,705 +.LBB0_4: # %if.end9LBB0_435,1110 +.LBB0_6: # %if.end16LBB0_645,1470 +.LBB0_7: # %if.then15LBB0_748,1573 +.Lfunc_end0:Lfunc_end053,1717 +foo: # @foofoo60,1840 +.LBB1_4: # %if.then8LBB1_484,2545 +.LBB1_5: # %if.end11LBB1_588,2686 +.LBB1_6: # %if.then3LBB1_692,2816 +.Lfunc_end1:Lfunc_end199,3055 +main: # @mainmain106,3182 +.Lfunc_end2:Lfunc_end2119,3575 +v:v126,3717 +s:s135,3878 +i:i144,4039 +l:l153,4200 + +externals/binaryen/test/torture-s/pr43987.c.s,215 +add_input_file: # @add_input_fileadd_input_file7,248 +.Lfunc_end0:Lfunc_end015,516 +main: # @mainmain22,665 +.Lfunc_end1:Lfunc_end136,1101 +B:B44,1252 + +externals/binaryen/test/torture-s/pr58419.c.s,951 +foo: # @foofoo7,204 +.Lfunc_end0:Lfunc_end018,548 +bar: # @barbar25,671 +.Lfunc_end1:Lfunc_end138,1053 +main: # @mainmain45,1180 +.LBB2_2: # %lor.endLBB2_287,2352 +.LBB2_4: # %lor.end.1LBB2_4113,3085 +.LBB2_6: # %lor.end.2LBB2_6141,3864 +.LBB2_8: # %lor.end.3LBB2_8167,4607 +.LBB2_10: # %lor.end.4LBB2_10195,5386 +.LBB2_12: # %lor.end.5LBB2_12221,6143 +.LBB2_14: # %lor.end.6LBB2_14249,6940 +.LBB2_16: # %lor.end.7LBB2_16273,7668 +.Lfunc_end2:Lfunc_end2288,8133 +c:c296,8284 +p:p305,8445 +b:b313,8566 +h:h322,8726 +e:e330,8875 +a:a339,9035 +k:k348,9196 +i:i357,9357 +g:g366,9518 + +externals/binaryen/test/torture-s/920908-2.c.s,175 +f: # @ff7,197 +.Lfunc_end0:Lfunc_end018,533 +main: # @mainmain25,656 +.Lfunc_end1:Lfunc_end132,844 + +externals/binaryen/test/torture-s/20071030-1.c.s,483 +CalcPing: # @CalcPingCalcPing7,232 +.LBB0_2: # %if.endLBB0_220,625 +.LBB0_3: # %for.bodyLBB0_325,777 +.LBB0_6:LBB0_655,1762 +.Lfunc_end0:Lfunc_end060,1919 +main: # @mainmain67,2056 +.LBB1_1: # %for.body.iLBB1_192,2824 +.LBB1_5: # %if.thenLBB1_5133,4180 +.Lfunc_end1:Lfunc_end1138,4322 + +externals/binaryen/test/torture-s/960512-1.c.s,175 +f: # @ff7,197 +.Lfunc_end0:Lfunc_end018,522 +main: # @mainmain25,645 +.Lfunc_end1:Lfunc_end132,833 + +externals/binaryen/test/torture-s/980602-2.c.s,169 +main: # @mainmain7,209 +.LBB0_2: # %if.elseLBB0_231,916 +.Lfunc_end0:Lfunc_end036,1058 +t:t44,1209 + +externals/binaryen/test/torture-s/941015-1.c.s,275 +foo1: # @foo1foo17,209 +.Lfunc_end0:Lfunc_end018,567 +foo2: # @foo2foo225,696 +.Lfunc_end1:Lfunc_end136,1054 +main: # @mainmain43,1183 +.Lfunc_end2:Lfunc_end250,1371 + +externals/binaryen/test/torture-s/20111227-1.c.s,415 +bar: # @barbar7,207 +.LBB0_2: # %if.thenLBB0_216,484 +.Lfunc_end0:Lfunc_end021,626 +foo: # @foofoo28,749 +.LBB1_2: # %if.elseLBB1_238,1054 +.Lfunc_end1:Lfunc_end147,1357 +main: # @mainmain54,1484 +.Lfunc_end2:Lfunc_end263,1776 +v:v71,1930 + +externals/binaryen/test/torture-s/950503-1.c.s,90 +main: # @mainmain7,209 +.Lfunc_end0:Lfunc_end014,396 + +externals/binaryen/test/torture-s/20000605-1.c.s,224 +main: # @mainmain7,211 +.LBB0_1: # %for.body.iLBB0_112,367 +.LBB0_4: # %if.thenLBB0_427,910 +.Lfunc_end0:Lfunc_end032,1052 + +externals/binaryen/test/torture-s/20020805-1.c.s,262 +check: # @checkcheck7,215 +.LBB0_2: # %if.thenLBB0_216,494 +.Lfunc_end0:Lfunc_end021,636 +main: # @mainmain28,767 +.Lfunc_end1:Lfunc_end147,1274 +n:n55,1428 + +externals/binaryen/test/torture-s/950929-1.c.s,175 +f: # @ff7,197 +.Lfunc_end0:Lfunc_end015,435 +main: # @mainmain22,558 +.Lfunc_end1:Lfunc_end129,745 + +externals/binaryen/test/torture-s/20001229-1.c.s,279 +foo: # @foofoo7,207 +.Lfunc_end0:Lfunc_end012,393 +showinfo: # @showinfoshowinfo19,536 +.Lfunc_end1:Lfunc_end123,708 +main: # @mainmain30,845 +.Lfunc_end2:Lfunc_end237,1032 + +externals/binaryen/test/torture-s/divconst-3.c.s,175 +f: # @ff7,199 +.Lfunc_end0:Lfunc_end015,461 +main: # @mainmain22,584 +.Lfunc_end1:Lfunc_end129,772 + +externals/binaryen/test/torture-s/pr22348.c.s,240 +f: # @ff7,196 +.LBB0_2: # %if.thenLBB0_216,471 +.Lfunc_end0:Lfunc_end021,613 +main: # @mainmain28,736 +.Lfunc_end1:Lfunc_end134,947 + +externals/binaryen/test/torture-s/20100430-1.c.s,90 +main: # @mainmain7,211 +.Lfunc_end0:Lfunc_end013,422 + +externals/binaryen/test/torture-s/pr36034-1.c.s,291 +test: # @testtest7,210 +.Lfunc_end0:Lfunc_end0131,3778 +main: # @mainmain138,3907 +.LBB1_31: # %if.thenLBB1_31325,10616 +.Lfunc_end1:Lfunc_end1330,10758 +x:x338,10912 +tmp:tmp396,13245 + +externals/binaryen/test/torture-s/pr15296.c.s,755 +f: # @ff7,201 +.LBB0_1: # %l0LBB0_113,417 +.LBB0_2: # %if.end.splitLBB0_217,619 +.LBB0_6:LBB0_640,1283 +.LBB0_7: # %l3LBB0_743,1353 +.LBB0_10: # %if.then18LBB0_1063,1954 +.LBB0_11: # %if.then23LBB0_1167,2092 +.LBB0_12: # %if.then11LBB0_1271,2230 +.Lfunc_end0:Lfunc_end076,2378 +g: # @gg83,2489 +.Lfunc_end1:Lfunc_end189,2650 +main: # @mainmain96,2773 +.LBB2_9: # %if.thenLBB2_9180,5594 +.Lfunc_end2:Lfunc_end2185,5736 + +externals/binaryen/test/torture-s/zero-struct-1.c.s,284 +h: # @hh7,202 +.Lfunc_end0:Lfunc_end023,675 +main: # @mainmain30,798 +.LBB1_3: # %if.then2LBB1_359,1660 +.Lfunc_end1:Lfunc_end164,1803 +y:y71,1942 +f:f80,2077 +ff:ff89,2217 + +externals/binaryen/test/torture-s/20050826-2.c.s,935 +inet_check_attr: # @inet_check_attrinet_check_attr7,260 +.LBB0_1: # %for.bodyLBB0_113,438 +.LBB0_5: # %for.incLBB0_542,1553 +.LBB0_7:LBB0_757,2015 +.Lfunc_end0:Lfunc_end062,2169 +main: # @mainmain69,2320 +.LBB1_17: # %for.body43LBB1_17285,9348 +.LBB1_19: # %if.elseLBB1_19299,9902 +.LBB1_21: # %land.lhs.true64LBB1_21316,10561 +.LBB1_22: # %for.inc73LBB1_22323,10875 +.LBB1_24: # %if.then49LBB1_24340,11468 +.LBB1_25: # %if.then69LBB1_25344,11602 +.LBB1_26: # %if.then60LBB1_26348,11736 +.LBB1_27: # %if.then38LBB1_27352,11870 +.Lfunc_end1:Lfunc_end1357,12014 + +externals/binaryen/test/torture-s/20030408-1.c.s,467 +test1: # @test1test17,215 +.Lfunc_end0:Lfunc_end013,427 +test2: # @test2test220,562 +.Lfunc_end1:Lfunc_end126,774 +test3: # @test3test333,909 +.Lfunc_end2:Lfunc_end239,1121 +test4: # @test4test446,1256 +.Lfunc_end3:Lfunc_end352,1468 +main: # @mainmain59,1599 +.Lfunc_end4:Lfunc_end465,1810 + +externals/binaryen/test/torture-s/gofast.c.s,3317 +fp_add: # @fp_addfp_add7,220 +.Lfunc_end0:Lfunc_end014,456 +fp_sub: # @fp_subfp_sub21,597 +.Lfunc_end1:Lfunc_end128,833 +fp_mul: # @fp_mulfp_mul35,974 +.Lfunc_end2:Lfunc_end242,1210 +fp_div: # @fp_divfp_div49,1351 +.Lfunc_end3:Lfunc_end356,1587 +fp_neg: # @fp_negfp_neg63,1728 +.Lfunc_end4:Lfunc_end470,1955 +dp_add: # @dp_adddp_add77,2096 +.Lfunc_end5:Lfunc_end584,2332 +dp_sub: # @dp_subdp_sub91,2473 +.Lfunc_end6:Lfunc_end698,2709 +dp_mul: # @dp_muldp_mul105,2850 +.Lfunc_end7:Lfunc_end7112,3086 +dp_div: # @dp_divdp_div119,3227 +.Lfunc_end8:Lfunc_end8126,3463 +dp_neg: # @dp_negdp_neg133,3604 +.Lfunc_end9:Lfunc_end9140,3831 +fp_to_dp: # @fp_to_dpfp_to_dp147,3980 +.Lfunc_end10:Lfunc_end10154,4216 +dp_to_fp: # @dp_to_fpdp_to_fp161,4371 +.Lfunc_end11:Lfunc_end11168,4606 +eqsf2: # @eqsf2eqsf2175,4749 +.Lfunc_end12:Lfunc_end12182,4984 +nesf2: # @nesf2nesf2189,5121 +.Lfunc_end13:Lfunc_end13196,5356 +gtsf2: # @gtsf2gtsf2203,5493 +.Lfunc_end14:Lfunc_end14210,5728 +gesf2: # @gesf2gesf2217,5865 +.Lfunc_end15:Lfunc_end15224,6100 +ltsf2: # @ltsf2ltsf2231,6237 +.Lfunc_end16:Lfunc_end16238,6472 +lesf2: # @lesf2lesf2245,6609 +.Lfunc_end17:Lfunc_end17252,6844 +eqdf2: # @eqdf2eqdf2259,6981 +.Lfunc_end18:Lfunc_end18266,7216 +nedf2: # @nedf2nedf2273,7353 +.Lfunc_end19:Lfunc_end19280,7588 +gtdf2: # @gtdf2gtdf2287,7725 +.Lfunc_end20:Lfunc_end20294,7960 +gedf2: # @gedf2gedf2301,8097 +.Lfunc_end21:Lfunc_end21308,8332 +ltdf2: # @ltdf2ltdf2315,8469 +.Lfunc_end22:Lfunc_end22322,8704 +ledf2: # @ledf2ledf2329,8841 +.Lfunc_end23:Lfunc_end23336,9076 +floatsisf: # @floatsisffloatsisf343,9229 +.Lfunc_end24:Lfunc_end24350,9468 +floatsidf: # @floatsidffloatsidf357,9629 +.Lfunc_end25:Lfunc_end25364,9868 +fixsfsi: # @fixsfsifixsfsi371,10021 +.Lfunc_end26:Lfunc_end26378,10256 +fixdfsi: # @fixdfsifixdfsi385,10405 +.Lfunc_end27:Lfunc_end27392,10640 +fixunssfsi: # @fixunssfsifixunssfsi399,10801 +.Lfunc_end28:Lfunc_end28406,11039 +fixunsdfsi: # @fixunsdfsifixunsdfsi413,11206 +.Lfunc_end29:Lfunc_end29420,11444 +fail: # @failfail427,11587 +.Lfunc_end30:Lfunc_end30457,12499 +main: # @mainmain464,12630 +.LBB31_2: # %if.then201LBB31_2475,12979 +.Lfunc_end31:Lfunc_end31480,13124 +fail_count:fail_count488,13313 + +externals/binaryen/test/torture-s/20000419-1.c.s,418 +brother: # @brotherbrother7,223 +.LBB0_2: # %if.thenLBB0_214,462 +.Lfunc_end0:Lfunc_end019,604 +sister: # @sistersister26,747 +.LBB1_2: # %if.then.iLBB1_235,1045 +.Lfunc_end1:Lfunc_end140,1189 +main: # @mainmain47,1322 +.Lfunc_end2:Lfunc_end274,2104 + +externals/binaryen/test/torture-s/pr34099.c.s,179 +foo: # @foofoo7,204 +.Lfunc_end0:Lfunc_end014,433 +main: # @mainmain21,560 +.Lfunc_end1:Lfunc_end127,772 + +externals/binaryen/test/torture-s/struct-cpy-1.c.s,198 +ini: # @iniini7,209 +.Lfunc_end0:Lfunc_end032,925 +main: # @mainmain39,1052 +.Lfunc_end1:Lfunc_end166,1814 +pty:pty72,1940 + +externals/binaryen/test/torture-s/pr31136.c.s,102 +main: # @mainmain7,208 +.Lfunc_end0:Lfunc_end021,638 +s:s29,789 + +externals/binaryen/test/torture-s/loop-4b.c.s,175 +f: # @ff7,196 +.Lfunc_end0:Lfunc_end013,404 +main: # @mainmain20,527 +.Lfunc_end1:Lfunc_end127,714 + +externals/binaryen/test/torture-s/920506-1.c.s,169 +main: # @mainmain7,209 +.LBB0_2: # %sw.epilogLBB0_218,542 +.Lfunc_end0:Lfunc_end023,686 +l:l31,840 + +externals/binaryen/test/torture-s/pr21331.c.s,269 +bar: # @barbar7,204 +.Lfunc_end0:Lfunc_end013,415 +foo: # @foofoo20,538 +.Lfunc_end1:Lfunc_end126,748 +main: # @mainmain33,875 +.Lfunc_end2:Lfunc_end239,1086 + +externals/binaryen/test/torture-s/pr42721.c.s,167 +main: # @mainmain7,208 +.LBB0_2: # %if.thenLBB0_223,662 +.Lfunc_end0:Lfunc_end028,804 +b:b34,926 + +externals/binaryen/test/torture-s/eeprof-1.c.s,1056 +foo: # @foofoo7,205 +.LBB0_2: # %if.thenLBB0_217,545 +.Lfunc_end0:Lfunc_end022,687 +nfoo: # @nfoonfoo29,814 +.LBB1_9: # %if.then17LBB1_982,2738 +.Lfunc_end1:Lfunc_end187,2882 +main: # @mainmain94,3011 +.LBB2_9: # %if.then19LBB2_9151,5033 +.Lfunc_end2:Lfunc_end2156,5177 +__cyg_profile_func_enter: # @__cyg_profile_func_enter__cyg_profile_func_enter163,5386 +.Lfunc_end3:Lfunc_end3176,5826 +__cyg_profile_func_exit: # @__cyg_profile_func_exit__cyg_profile_func_exit183,6071 +.Lfunc_end4:Lfunc_end4196,6507 +foo2: # @foo2foo2201,6647 +.LBB5_8: # %if.then14LBB5_8246,8279 +.Lfunc_end5:Lfunc_end5251,8423 +last_fn_entered:last_fn_entered259,8630 +entry_calls:entry_calls268,8831 +exit_calls:exit_calls277,9048 +last_fn_exited:last_fn_exited286,9279 + +externals/binaryen/test/torture-s/cbrt.c.s,454 +cbrtl: # @cbrtlcbrtl7,209 +.LBB0_2: # %if.endLBB0_238,1170 +.LBB0_5: # %if.elseLBB0_568,2116 +.LBB0_6: # %if.end31LBB0_674,2326 +.LBB0_7: # %cleanupLBB0_7135,4288 +.Lfunc_end0:Lfunc_end0140,4486 +main: # @mainmain147,4617 +.Lfunc_end1:Lfunc_end1154,4804 + +externals/binaryen/test/torture-s/pr33669.c.s,248 +foo: # @foofoo7,204 +.LBB0_3: # %cleanupLBB0_338,1165 +.Lfunc_end0:Lfunc_end043,1363 +main: # @mainmain50,1490 +.Lfunc_end1:Lfunc_end156,1702 + +externals/binaryen/test/torture-s/pr36077.c.s,181 +test: # @testtest7,208 +.Lfunc_end0:Lfunc_end014,433 +main: # @mainmain21,562 +.Lfunc_end1:Lfunc_end127,773 + +externals/binaryen/test/torture-s/950809-1.c.s,242 +f: # @ff7,197 +.Lfunc_end0:Lfunc_end031,840 +main: # @mainmain38,963 +.LBB1_2: # %if.thenLBB1_258,1534 +.Lfunc_end1:Lfunc_end163,1676 + +externals/binaryen/test/torture-s/bf-sign-1.c.s,90 +main: # @mainmain7,210 +.Lfunc_end0:Lfunc_end014,397 + +externals/binaryen/test/torture-s/921117-1.c.s,333 +check: # @checkcheck7,213 +.LBB0_2: # %returnLBB0_221,628 +.Lfunc_end0:Lfunc_end026,823 +main: # @mainmain33,954 +.LBB1_2: # %if.thenLBB1_264,1915 +.Lfunc_end1:Lfunc_end169,2057 +cell:cell83,2350 + +externals/binaryen/test/torture-s/20071211-1.c.s,172 +main: # @mainmain7,211 +.LBB0_2: # %if.thenLBB0_243,1227 +.Lfunc_end0:Lfunc_end048,1369 +sv:sv56,1524 + +externals/binaryen/test/torture-s/va-arg-2.c.s,5156 +to_hex: # @to_hexto_hex7,217 +.LBB0_2: # %if.thenLBB0_220,606 +.Lfunc_end0:Lfunc_end025,748 +f0: # @f0f032,873 +.LBB1_2: # %while.condLBB1_250,1408 +.LBB1_6: # %while.endLBB1_683,2593 +.LBB1_7: # %if.then.iLBB1_790,2818 +.Lfunc_end1:Lfunc_end195,2962 +f1: # @f1f1102,3079 +.LBB2_2: # %while.condLBB2_2120,3619 +.LBB2_6: # %while.endLBB2_6153,4804 +.LBB2_7: # %if.then.iLBB2_7160,5029 +.Lfunc_end2:Lfunc_end2165,5173 +f2: # @f2f2172,5290 +.LBB3_2: # %while.condLBB3_2190,5835 +.LBB3_6: # %while.endLBB3_6223,7020 +.LBB3_7: # %if.then.iLBB3_7230,7245 +.Lfunc_end3:Lfunc_end3235,7389 +f3: # @f3f3242,7506 +.LBB4_2: # %while.condLBB4_2260,8057 +.LBB4_6: # %while.endLBB4_6293,9246 +.LBB4_7: # %if.then.iLBB4_7300,9472 +.Lfunc_end4:Lfunc_end4305,9617 +f4: # @f4f4312,9734 +.LBB5_2: # %while.condLBB5_2330,10290 +.LBB5_6: # %while.endLBB5_6363,11479 +.LBB5_7: # %if.then.iLBB5_7370,11705 +.Lfunc_end5:Lfunc_end5375,11850 +f5: # @f5f5382,11967 +.LBB6_2: # %while.condLBB6_2400,12528 +.LBB6_6: # %while.endLBB6_6433,13717 +.LBB6_7: # %if.then.iLBB6_7440,13943 +.Lfunc_end6:Lfunc_end6445,14088 +f6: # @f6f6452,14205 +.LBB7_2: # %while.condLBB7_2470,14771 +.LBB7_6: # %while.endLBB7_6503,15960 +.LBB7_7: # %if.then.iLBB7_7510,16186 +.Lfunc_end7:Lfunc_end7515,16331 +f7: # @f7f7522,16448 +.LBB8_2: # %while.condLBB8_2540,17020 +.LBB8_6: # %while.endLBB8_6573,18211 +.LBB8_7: # %if.then.iLBB8_7580,18438 +.Lfunc_end8:Lfunc_end8585,18583 +f8: # @f8f8592,18700 +.LBB9_2: # %while.condLBB9_2610,19277 +.LBB9_6: # %while.endLBB9_6643,20472 +.LBB9_7: # %if.then.iLBB9_7650,20699 +.Lfunc_end9:Lfunc_end9655,20844 +f9: # @f9f9662,20961 +.LBB10_2: # %while.condLBB10_2680,21544 +.LBB10_6: # %while.endLBB10_6713,22743 +.LBB10_7: # %if.then.iLBB10_7720,22970 +.Lfunc_end10:Lfunc_end10725,23115 +f10: # @f10f10732,23238 +.LBB11_2: # %while.condLBB11_2750,23828 +.LBB11_6: # %while.endLBB11_6783,25030 +.LBB11_7: # %if.then.iLBB11_7790,25257 +.Lfunc_end11:Lfunc_end11795,25402 +f11: # @f11f11802,25527 +.LBB12_2: # %while.condLBB12_2820,26122 +.LBB12_6: # %while.endLBB12_6853,27324 +.LBB12_7: # %if.then.iLBB12_7860,27551 +.Lfunc_end12:Lfunc_end12865,27696 +f12: # @f12f12872,27821 +.LBB13_2: # %while.condLBB13_2890,28421 +.LBB13_6: # %while.endLBB13_6923,29623 +.LBB13_7: # %if.then.iLBB13_7930,29850 +.Lfunc_end13:Lfunc_end13935,29995 +f13: # @f13f13942,30120 +.LBB14_2: # %while.condLBB14_2960,30725 +.LBB14_6: # %while.endLBB14_6993,31927 +.LBB14_7: # %if.then.iLBB14_71000,32154 +.Lfunc_end14:Lfunc_end141005,32299 +f14: # @f14f141012,32424 +.LBB15_2: # %while.condLBB15_21030,33034 +.LBB15_6: # %while.endLBB15_61063,34236 +.LBB15_7: # %if.then.iLBB15_71070,34463 +.Lfunc_end15:Lfunc_end151075,34608 +f15: # @f15f151082,34733 +.LBB16_2: # %while.condLBB16_21100,35348 +.LBB16_6: # %while.endLBB16_61133,36550 +.LBB16_7: # %if.then.iLBB16_71140,36777 +.Lfunc_end16:Lfunc_end161145,36922 +main: # @mainmain1152,37051 +.Lfunc_end17:Lfunc_end171541,49403 + +externals/binaryen/test/torture-s/compare-1.c.s,2402 +ieq: # @ieqieq7,206 +.LBB0_2: # %if.thenLBB0_224,688 +.LBB0_3: # %if.end6LBB0_328,850 +.LBB0_6: # %if.else14LBB0_638,1202 +.LBB0_7: # %if.end18LBB0_741,1344 +.LBB0_9: # %if.then22LBB0_951,1696 +.LBB0_10: # %if.end30LBB0_1055,1860 +.LBB0_13: # %if.else38LBB0_1365,2214 +.LBB0_14: # %if.end42LBB0_1468,2357 +.LBB0_15: # %if.then40LBB0_1571,2465 +.LBB0_16: # %if.then2LBB0_1675,2599 +.LBB0_17: # %if.then24LBB0_1779,2732 +.Lfunc_end0:Lfunc_end084,2876 +ine: # @ineine91,2999 +.LBB1_3: # %if.thenLBB1_3106,3449 +.LBB1_4: # %if.end6LBB1_4110,3613 +.LBB1_5: # %if.then2LBB1_5113,3721 +.Lfunc_end1:Lfunc_end1118,3865 +ilt: # @iltilt125,3988 +.LBB2_3: # %if.elseLBB2_3139,4416 +.LBB2_4: # %if.end6LBB2_4142,4558 +.LBB2_5: # %if.then4LBB2_5145,4666 +.Lfunc_end2:Lfunc_end2150,4810 +ile: # @ileile157,4933 +.LBB3_3: # %if.thenLBB3_3172,5383 +.LBB3_4: # %if.end6LBB3_4176,5547 +.LBB3_5: # %if.then2LBB3_5179,5655 +.Lfunc_end3:Lfunc_end3184,5799 +igt: # @igtigt191,5922 +.LBB4_3: # %if.elseLBB4_3205,6350 +.LBB4_4: # %if.end6LBB4_4208,6492 +.LBB4_5: # %if.then4LBB4_5211,6600 +.Lfunc_end4:Lfunc_end4216,6744 +ige: # @igeige223,6867 +.LBB5_3: # %if.thenLBB5_3238,7317 +.LBB5_4: # %if.end6LBB5_4242,7481 +.LBB5_5: # %if.then2LBB5_5245,7589 +.Lfunc_end5:Lfunc_end5250,7733 +main: # @mainmain257,7860 +.Lfunc_end6:Lfunc_end6263,8071 + +externals/binaryen/test/torture-s/pr43629.c.s,174 +main: # @mainmain7,208 +.LBB0_2: # %if.then3LBB0_217,518 +.Lfunc_end0:Lfunc_end022,661 +flag:flag30,824 + +externals/binaryen/test/torture-s/pr58209.c.s,668 +foo: # @foofoo7,209 +.LBB0_2: # %returnLBB0_221,623 +.Lfunc_end0:Lfunc_end026,818 +bar: # @barbar33,941 +.LBB1_2:LBB1_247,1355 +.Lfunc_end1:Lfunc_end152,1509 +main: # @mainmain59,1636 +.LBB2_1: # %for.bodyLBB2_165,1811 +.LBB2_4: # in Loop: Header=BB2_1 Depth=1LBB2_492,2839 +.LBB2_5: # %for.condLBB2_597,3055 +.LBB2_7: # %if.thenLBB2_7110,3512 +.Lfunc_end2:Lfunc_end2115,3654 +buf:buf123,3813 + +externals/binaryen/test/torture-s/shiftdi.c.s,176 +g: # @gg7,196 +.Lfunc_end0:Lfunc_end027,844 +main: # @mainmain34,967 +.Lfunc_end1:Lfunc_end140,1178 + +externals/binaryen/test/torture-s/20010403-1.c.s,514 +a: # @aa7,199 +.Lfunc_end0:Lfunc_end012,384 +b: # @bb19,495 +.Lfunc_end1:Lfunc_end128,777 +c: # @cc35,888 +.LBB2_2: # %if.thenLBB2_243,1142 +.Lfunc_end2:Lfunc_end248,1284 +d: # @dd55,1395 +.Lfunc_end3:Lfunc_end360,1574 +main: # @mainmain67,1697 +.Lfunc_end4:Lfunc_end474,1884 +e:e82,2035 + +externals/binaryen/test/torture-s/20100827-1.c.s,403 +foo: # @foofoo7,212 +.LBB0_2: # %if.endLBB0_219,554 +.LBB0_5:LBB0_537,1215 +.LBB0_6: # %if.then4LBB0_641,1305 +.Lfunc_end0:Lfunc_end046,1448 +main: # @mainmain53,1575 +.LBB1_2: # %if.thenLBB1_265,1951 +.Lfunc_end1:Lfunc_end170,2093 + +externals/binaryen/test/torture-s/pr20466-1.c.s,244 +f: # @ff7,198 +.Lfunc_end0:Lfunc_end024,669 +main: # @mainmain31,792 +.LBB1_7: # %if.thenLBB1_7107,3167 +.Lfunc_end1:Lfunc_end1112,3309 + +externals/binaryen/test/torture-s/950706-1.c.s,175 +f: # @ff7,197 +.Lfunc_end0:Lfunc_end018,533 +main: # @mainmain25,656 +.Lfunc_end1:Lfunc_end132,845 + +externals/binaryen/test/torture-s/20010116-1.c.s,402 +find: # @findfind7,211 +.LBB0_2: # %for.endLBB0_223,700 +.Lfunc_end0:Lfunc_end028,842 +ok: # @okok35,963 +.LBB1_2: # %if.thenLBB1_246,1296 +.Lfunc_end1:Lfunc_end151,1438 +main: # @mainmain58,1563 +.Lfunc_end2:Lfunc_end274,2011 + +externals/binaryen/test/torture-s/20010910-1.c.s,90 +main: # @mainmain7,211 +.Lfunc_end0:Lfunc_end013,428 + +externals/binaryen/test/torture-s/strcpy-1.c.s,953 +main: # @mainmain7,214 +.LBB0_1: # %for.cond1.preheaderLBB0_112,407 +.LBB0_2: # %for.cond4.preheaderLBB0_226,1047 +.LBB0_3: # %for.cond7.preheaderLBB0_339,1705 +.LBB0_4: # %for.body9LBB0_453,2413 +.LBB0_8: # %for.body24LBB0_898,4135 +.LBB0_11: # in Loop: Header=BB0_3 Depth=3LBB0_11121,5202 +.LBB0_12: # %for.body38.preheaderLBB0_12124,5338 +.LBB0_13: # %for.body38LBB0_13130,5582 +.LBB0_28: # %if.then59LBB0_28267,10907 +.LBB0_29: # %if.then68LBB0_29271,11041 +.LBB0_30: # %if.then19LBB0_30275,11175 +.Lfunc_end0:Lfunc_end0280,11319 +u1:u1286,11443 +u2:u2293,11554 + +externals/binaryen/test/torture-s/20020107-1.c.s,265 +foo: # @foofoo7,207 +.Lfunc_end0:Lfunc_end017,475 +main: # @mainmain24,602 +.LBB1_2: # %if.then.iLBB1_243,1098 +.Lfunc_end1:Lfunc_end148,1242 +buf:buf55,1389 + +externals/binaryen/test/torture-s/931009-1.c.s,175 +main: # @mainmain7,209 +.Lfunc_end0:Lfunc_end014,396 +f: # @ff21,513 +.Lfunc_end1:Lfunc_end128,738 + +externals/binaryen/test/torture-s/20011217-1.c.s,90 +main: # @mainmain7,211 +.Lfunc_end0:Lfunc_end014,398 + +externals/binaryen/test/torture-s/960416-1.c.s,280 +f_le: # @f_lef_le7,209 +.Lfunc_end0:Lfunc_end062,1961 +f_be: # @f_bef_be69,2090 +.Lfunc_end1:Lfunc_end1134,4163 +main: # @mainmain141,4292 +.Lfunc_end2:Lfunc_end2148,4482 + +externals/binaryen/test/torture-s/20020206-1.c.s,337 +bar: # @barbar7,207 +.Lfunc_end0:Lfunc_end016,502 +baz: # @bazbaz23,625 +.LBB1_4: # %if.thenLBB1_443,1298 +.Lfunc_end1:Lfunc_end148,1440 +main: # @mainmain55,1567 +.Lfunc_end2:Lfunc_end275,2112 + +externals/binaryen/test/torture-s/pushpop_macro.c.s,90 +main: # @mainmain7,214 +.Lfunc_end0:Lfunc_end013,425 + +externals/binaryen/test/torture-s/pr35231.c.s,245 +foo: # @foofoo7,204 +.LBB0_2: # %if.thenLBB0_218,533 +.Lfunc_end0:Lfunc_end023,675 +main: # @mainmain30,802 +.Lfunc_end1:Lfunc_end139,1103 + +externals/binaryen/test/torture-s/20030120-1.c.s,373 +test1: # @test1test17,215 +.Lfunc_end0:Lfunc_end015,476 +test2: # @test2test222,611 +.Lfunc_end1:Lfunc_end130,872 +test3: # @test3test337,1007 +.Lfunc_end2:Lfunc_end245,1262 +main: # @mainmain52,1393 +.Lfunc_end3:Lfunc_end359,1583 + +externals/binaryen/test/torture-s/20071029-1.c.s,505 +test: # @testtest7,211 +.LBB0_13: # %if.then33LBB0_1360,2208 +.LBB0_14: # %if.then36LBB0_1464,2342 +.Lfunc_end0:Lfunc_end070,2516 +foo: # @foofoo77,2641 +.LBB1_1: # %againLBB1_194,3135 +.LBB1_2:LBB1_2107,3593 +.Lfunc_end1:Lfunc_end1110,3622 +main: # @mainmain117,3749 +.Lfunc_end2:Lfunc_end2124,3938 + +externals/binaryen/test/torture-s/20050203-1.c.s,338 +main: # @mainmain7,211 +.LBB0_2: # %if.elseLBB0_231,907 +.Lfunc_end0:Lfunc_end036,1049 +foo: # @foofoo41,1149 +.Lfunc_end1:Lfunc_end148,1379 +bar: # @barbar53,1477 +.Lfunc_end2:Lfunc_end259,1659 + +externals/binaryen/test/torture-s/pr29156.c.s,203 +bla: # @blabla7,204 +.Lfunc_end0:Lfunc_end021,604 +main: # @mainmain28,731 +.Lfunc_end1:Lfunc_end137,1019 +global:global45,1190 + +externals/binaryen/test/torture-s/pr29797-1.c.s,179 +bar: # @barbar7,206 +.Lfunc_end0:Lfunc_end013,420 +main: # @mainmain20,547 +.Lfunc_end1:Lfunc_end126,758 + +externals/binaryen/test/torture-s/20030221-1.c.s,157 +main: # @mainmain7,211 +.LBB0_2: # %if.thenLBB0_240,1205 +.Lfunc_end0:Lfunc_end045,1347 + +externals/binaryen/test/torture-s/pr51581-2.c.s,3007 +f1: # @f1f17,202 +.LBB0_1: # %for.bodyLBB0_111,334 +.Lfunc_end0:Lfunc_end030,980 +f2: # @f2f237,1097 +.LBB1_1: # %for.bodyLBB1_141,1229 +.Lfunc_end1:Lfunc_end160,1875 +f3: # @f3f367,1992 +.LBB2_1: # %for.bodyLBB2_171,2124 +.Lfunc_end2:Lfunc_end290,2771 +f4: # @f4f497,2888 +.LBB3_1: # %for.bodyLBB3_1101,3020 +.Lfunc_end3:Lfunc_end3120,3667 +f5: # @f5f5127,3784 +.LBB4_1: # %for.bodyLBB4_1131,3916 +.Lfunc_end4:Lfunc_end4150,4563 +f6: # @f6f6157,4680 +.LBB5_1: # %for.bodyLBB5_1161,4812 +.Lfunc_end5:Lfunc_end5180,5459 +f7: # @f7f7187,5576 +.LBB6_1: # %for.bodyLBB6_1191,5713 +.Lfunc_end6:Lfunc_end6221,6706 +f8: # @f8f8228,6823 +.LBB7_1: # %for.bodyLBB7_1232,6960 +.Lfunc_end7:Lfunc_end7259,7863 +f9: # @f9f9266,7980 +.LBB8_1: # %for.bodyLBB8_1270,8117 +.Lfunc_end8:Lfunc_end8300,9110 +f10: # @f10f10307,9231 +.LBB9_1: # %for.bodyLBB9_1311,9369 +.Lfunc_end9:Lfunc_end9338,10272 +f11: # @f11f11345,10395 +.LBB10_1: # %for.bodyLBB10_1349,10533 +.Lfunc_end10:Lfunc_end10379,11529 +f12: # @f12f12386,11654 +.LBB11_1: # %for.bodyLBB11_1390,11797 +.Lfunc_end11:Lfunc_end11424,12915 +main: # @mainmain431,13044 +.LBB12_1: # %for.bodyLBB12_1437,13215 +.LBB12_3: # %for.body4LBB12_3471,14203 +.LBB12_7: # %for.body17LBB12_7518,15702 +.LBB12_11: # %for.body34LBB12_11559,17159 +.LBB12_15: # %for.body51LBB12_15600,18618 +.LBB12_19: # %for.body68LBB12_19641,20076 +.LBB12_23: # %for.body85LBB12_23682,21537 +.LBB12_27: # %if.thenLBB12_27721,22956 +.LBB12_28: # %if.then27LBB12_28725,23089 +.LBB12_29: # %if.then44LBB12_29729,23224 +.LBB12_30: # %if.then61LBB12_30733,23359 +.LBB12_31: # %if.then78LBB12_31737,23494 +.LBB12_32: # %if.then95LBB12_32741,23629 +.Lfunc_end12:Lfunc_end12746,23774 +a:a754,23927 +c:c763,24067 +b:b772,24207 +d:d781,24347 + +externals/binaryen/test/torture-s/20081218-1.c.s,697 +foo: # @foofoo7,207 +.Lfunc_end0:Lfunc_end017,549 +bar: # @barbar24,672 +.Lfunc_end1:Lfunc_end135,1044 +main: # @mainmain42,1171 +.LBB2_2: # %for.bodyLBB2_254,1538 +.LBB2_6: # %for.body13LBB2_686,2627 +.LBB2_9: # %if.then4LBB2_9107,3407 +.LBB2_10: # %if.then18LBB2_10111,3540 +.LBB2_11: # %if.thenLBB2_11115,3674 +.LBB2_12: # %if.then8LBB2_12119,3806 +.Lfunc_end2:Lfunc_end2124,3949 +a:a132,4100 + +externals/binaryen/test/torture-s/ashldi-1.c.s,368 +main: # @mainmain7,209 +.LBB0_1: # %for.bodyLBB0_113,393 +.LBB0_4: # %constant_shift.exitLBB0_436,1228 +.LBB0_7: # %if.then9LBB0_758,2004 +.LBB0_8: # %if.thenLBB0_862,2137 +.Lfunc_end0:Lfunc_end067,2279 + +externals/binaryen/test/torture-s/931228-1.c.s,175 +f: # @ff7,197 +.Lfunc_end0:Lfunc_end014,422 +main: # @mainmain21,545 +.Lfunc_end1:Lfunc_end128,732 + +externals/binaryen/test/torture-s/921013-1.c.s,314 +f: # @ff7,197 +.LBB0_2: # %while.bodyLBB0_215,477 +.LBB0_3: # %while.endLBB0_332,1017 +.Lfunc_end0:Lfunc_end038,1227 +main: # @mainmain45,1350 +.Lfunc_end1:Lfunc_end152,1542 + +externals/binaryen/test/torture-s/pr63659.c.s,415 +main: # @mainmain7,208 +.LBB0_2: # %while.endLBB0_220,596 +.LBB0_4: # %cond.endLBB0_437,1121 +.LBB0_6: # %if.then22LBB0_657,1707 +.Lfunc_end0:Lfunc_end062,1851 +b:b70,2002 +d:d79,2166 +a:a88,2299 +c:c97,2460 +i:i106,2621 +h:h115,2782 +g:g124,2943 +f:f132,3092 +e:e140,3240 + +externals/binaryen/test/torture-s/20050119-2.c.s,247 +foo: # @foofoo7,207 +.LBB0_3: # %if.then6LBB0_324,749 +.Lfunc_end0:Lfunc_end029,892 +main: # @mainmain36,1019 +.Lfunc_end1:Lfunc_end143,1207 + +externals/binaryen/test/torture-s/990811-1.c.s,378 +foo: # @foofoo7,205 +.LBB0_4: # %sw.bb2LBB0_426,795 +.LBB0_5: # %sw.bb1LBB0_530,933 +.LBB0_6: # %sw.epilogLBB0_634,1070 +.Lfunc_end0:Lfunc_end039,1214 +main: # @mainmain46,1341 +.Lfunc_end1:Lfunc_end153,1531 + +externals/binaryen/test/torture-s/pr19687.c.s,90 +main: # @mainmain7,208 +.Lfunc_end0:Lfunc_end013,424 + +externals/binaryen/test/torture-s/pr22061-1.c.s,282 +foo: # @foofoo7,206 +.Lfunc_end0:Lfunc_end011,373 +bar: # @barbar18,496 +.Lfunc_end1:Lfunc_end129,826 +main: # @mainmain36,953 +.Lfunc_end2:Lfunc_end246,1211 +N:N54,1365 + +externals/binaryen/test/torture-s/941031-1.c.s,175 +f: # @ff7,197 +.Lfunc_end0:Lfunc_end019,558 +main: # @mainmain26,681 +.Lfunc_end1:Lfunc_end133,869 + +externals/binaryen/test/torture-s/pr17133.c.s,610 +pure_alloc: # @pure_allocpure_alloc7,232 +.LBB0_2: # %if.endLBB0_230,883 +.LBB0_4: # %if.thenLBB0_441,1287 +.Lfunc_end0:Lfunc_end048,1540 +main: # @mainmain55,1681 +.LBB1_3: # %if.end.lr.ph.iLBB1_379,2392 +.LBB1_5: # %if.endLBB1_588,2737 +.LBB1_6: # %if.end.iLBB1_692,2868 +.LBB1_7:LBB1_797,3119 +.Lfunc_end1:Lfunc_end1100,3148 +foo:foo108,3307 +bar:bar117,3480 +baz:baz126,3628 + +externals/binaryen/test/torture-s/930622-2.c.s,293 +ll_to_ld: # @ll_to_ldll_to_ld7,225 +.Lfunc_end0:Lfunc_end033,1013 +ld_to_ll: # @ld_to_llld_to_ll40,1166 +.Lfunc_end1:Lfunc_end147,1424 +main: # @mainmain54,1561 +.Lfunc_end2:Lfunc_end261,1750 + +externals/binaryen/test/torture-s/pr49073.c.s,444 +main: # @mainmain7,208 +.LBB0_1: # %do.bodyLBB0_113,381 +.LBB0_3: # %if.endLBB0_329,947 +.LBB0_5: # %if.thenLBB0_544,1477 +.LBB0_6: # %do.endLBB0_653,1761 +.LBB0_8: # %if.then5LBB0_862,2051 +.Lfunc_end0:Lfunc_end067,2194 +a:a75,2348 +c:c90,2738 + +externals/binaryen/test/torture-s/pr40057.c.s,338 +foo: # @foofoo7,204 +.Lfunc_end0:Lfunc_end016,488 +bar: # @barbar23,611 +.Lfunc_end1:Lfunc_end132,895 +main: # @mainmain39,1022 +.LBB2_5: # %if.then11LBB2_563,1901 +.Lfunc_end2:Lfunc_end268,2045 + +externals/binaryen/test/torture-s/930719-1.c.s,377 +f: # @ff7,197 +.LBB0_3: # %cleanupLBB0_322,692 +.LBB0_4: # %while.condLBB0_426,824 +.LBB0_5: # %if.end2LBB0_531,1077 +.Lfunc_end0:Lfunc_end037,1217 +main: # @mainmain44,1340 +.Lfunc_end1:Lfunc_end151,1527 + +externals/binaryen/test/torture-s/20001011-1.c.s,179 +foo: # @foofoo7,207 +.Lfunc_end0:Lfunc_end015,482 +main: # @mainmain22,609 +.Lfunc_end1:Lfunc_end128,820 + +externals/binaryen/test/torture-s/pr20527-1.c.s,391 +f: # @ff7,198 +.LBB0_2: # %for.bodyLBB0_225,735 +.LBB0_3: # %for.endLBB0_347,1442 +.Lfunc_end0:Lfunc_end052,1617 +main: # @mainmain59,1740 +.LBB1_4: # %if.thenLBB1_495,2884 +.Lfunc_end1:Lfunc_end1100,3026 +b:b108,3180 + +externals/binaryen/test/torture-s/divconst-2.c.s,448 +f: # @ff7,199 +.Lfunc_end0:Lfunc_end015,460 +r: # @rr22,571 +.Lfunc_end1:Lfunc_end130,833 +std_eqn: # @std_eqnstd_eqn37,968 +.Lfunc_end2:Lfunc_end247,1299 +main: # @mainmain54,1434 +.LBB3_4: # %if.thenLBB3_4101,2963 +.Lfunc_end3:Lfunc_end3106,3105 +nums:nums114,3271 + +externals/binaryen/test/torture-s/960801-1.c.s,261 +f: # @ff7,197 +.Lfunc_end0:Lfunc_end013,409 +g: # @gg20,520 +.Lfunc_end1:Lfunc_end126,732 +main: # @mainmain33,855 +.Lfunc_end2:Lfunc_end240,1042 + +externals/binaryen/test/torture-s/900409-1.c.s,622 +f1: # @f1f17,201 +.Lfunc_end0:Lfunc_end015,461 +f2: # @f2f222,578 +.Lfunc_end1:Lfunc_end130,837 +f3: # @f3f337,954 +.Lfunc_end2:Lfunc_end245,1208 +f4: # @f4f452,1325 +.Lfunc_end3:Lfunc_end360,1580 +f5: # @f5f567,1697 +.Lfunc_end4:Lfunc_end475,1953 +f6: # @f6f682,2070 +.Lfunc_end5:Lfunc_end590,2327 +main: # @mainmain97,2452 +.Lfunc_end6:Lfunc_end6104,2640 + +externals/binaryen/test/torture-s/991216-4.c.s,90 +main: # @mainmain7,209 +.Lfunc_end0:Lfunc_end014,396 + +externals/binaryen/test/torture-s/20120808-1.c.s,469 +main: # @mainmain7,211 +.LBB0_1: # %for.bodyLBB0_135,1008 +.LBB0_5: # %sw.bb1LBB0_562,2052 +.LBB0_6: # %sw.bb3LBB0_667,2285 +.LBB0_7: # %sw.epilogLBB0_771,2472 +.LBB0_16: # %if.thenLBB0_16127,4479 +.Lfunc_end0:Lfunc_end0132,4621 +d:d140,4772 +i:i149,4906 +cp:cp158,5071 + +externals/binaryen/test/torture-s/920908-1.c.s,245 +f: # @ff7,197 +.LBB0_3: # %if.then6LBB0_344,1301 +.Lfunc_end0:Lfunc_end049,1444 +main: # @mainmain56,1567 +.Lfunc_end1:Lfunc_end174,2074 + +externals/binaryen/test/torture-s/pr44202-1.c.s,479 +add512: # @add512add5127,218 +.LBB0_2: # %if.endLBB0_220,602 +.Lfunc_end0:Lfunc_end025,797 +add513: # @add513add51332,938 +.LBB1_2: # %if.endLBB1_244,1297 +.Lfunc_end1:Lfunc_end149,1492 +main: # @mainmain56,1625 +.LBB2_5: # %if.thenLBB2_597,2974 +.Lfunc_end2:Lfunc_end2102,3116 + +externals/binaryen/test/torture-s/20000519-1.c.s,470 +bar: # @barbar7,207 +.LBB0_1: # %do.bodyLBB0_112,350 +.Lfunc_end0:Lfunc_end027,868 +foo: # @foofoo34,991 +.LBB1_1: # %do.body.iLBB1_144,1278 +.Lfunc_end1:Lfunc_end159,1800 +main: # @mainmain66,1927 +.LBB2_2: # %if.thenLBB2_292,2710 +.Lfunc_end2:Lfunc_end297,2852 + +externals/binaryen/test/torture-s/920721-2.c.s,175 +f: # @ff7,197 +.Lfunc_end0:Lfunc_end014,421 +main: # @mainmain21,544 +.Lfunc_end1:Lfunc_end128,731 + +externals/binaryen/test/torture-s/bf-layout-1.c.s,114 +main: # @mainmain7,212 +.Lfunc_end0:Lfunc_end014,399 +a:a22,550 +b:b31,682 + +externals/binaryen/test/torture-s/20050106-1.c.s,167 +main: # @mainmain7,211 +.LBB0_2: # %if.thenLBB0_219,576 +.Lfunc_end0:Lfunc_end024,718 +u:u32,869 + +externals/binaryen/test/torture-s/pr58387.c.s,167 +main: # @mainmain7,208 +.LBB0_2: # %if.thenLBB0_219,568 +.Lfunc_end0:Lfunc_end024,710 +a:a32,864 + +externals/binaryen/test/torture-s/930916-1.c.s,240 +f: # @ff7,197 +.LBB0_2: # %if.thenLBB0_217,490 +.Lfunc_end0:Lfunc_end022,632 +main: # @mainmain29,755 +.Lfunc_end1:Lfunc_end136,942 + +externals/binaryen/test/torture-s/930930-2.c.s,393 +test_endianness: # @test_endiannesstest_endianness7,253 +.Lfunc_end0:Lfunc_end013,475 +test_endianness_vol: # @test_endianness_voltest_endianness_vol20,686 +.Lfunc_end1:Lfunc_end136,1200 +main: # @mainmain43,1359 +.LBB2_2: # %if.thenLBB2_263,1959 +.Lfunc_end2:Lfunc_end268,2101 + +externals/binaryen/test/torture-s/pr23047.c.s,240 +f: # @ff7,196 +.LBB0_2: # %if.endLBB0_222,631 +.Lfunc_end0:Lfunc_end027,772 +main: # @mainmain34,895 +.Lfunc_end1:Lfunc_end144,1161 + +externals/binaryen/test/torture-s/931110-1.c.s,104 +main: # @mainmain7,209 +.Lfunc_end0:Lfunc_end074,2162 +x:x82,2313 + +externals/binaryen/test/torture-s/940115-1.c.s,175 +f: # @ff7,197 +.Lfunc_end0:Lfunc_end014,428 +main: # @mainmain21,551 +.Lfunc_end1:Lfunc_end128,738 + +externals/binaryen/test/torture-s/20010518-2.c.s,157 +main: # @mainmain7,211 +.LBB0_6: # %if.thenLBB0_677,2373 +.Lfunc_end0:Lfunc_end082,2515 + +externals/binaryen/test/torture-s/20030714-1.c.s,975 +RenderBox_setStyle: # @RenderBox_setStyleRenderBox_setStyle7,272 +.LBB0_3: # %if.endLBB0_335,1124 +.LBB0_5: # %if.elseLBB0_552,1677 +.LBB0_6: # %sw.epilog.sink.splitLBB0_661,1988 +.LBB0_7: # %sw.epilogLBB0_769,2275 +.Lfunc_end0:Lfunc_end073,2442 +RenderObject_setStyle: # @RenderObject_setStyleRenderObject_setStyle80,2667 +.Lfunc_end1:Lfunc_end185,2871 +removeFromSpecialObjects: # @removeFromSpecialObjectsremoveFromSpecialObjects92,3114 +.Lfunc_end2:Lfunc_end297,3316 +RenderBox_isTableCell: # @RenderBox_isTableCellRenderBox_isTableCell104,3553 +.Lfunc_end3:Lfunc_end3111,3795 +main: # @mainmain118,3958 +.Lfunc_end4:Lfunc_end4144,4752 +false:false151,4911 +true:true159,5083 +g_this:g_this168,5269 +g__style:g__style177,5441 + +externals/binaryen/test/torture-s/20020103-1.c.s,269 +foo: # @foofoo7,207 +.Lfunc_end0:Lfunc_end015,464 +bar: # @barbar22,587 +.Lfunc_end1:Lfunc_end130,845 +main: # @mainmain37,972 +.Lfunc_end2:Lfunc_end244,1161 + +externals/binaryen/test/torture-s/20011109-2.c.s,90 +main: # @mainmain7,211 +.Lfunc_end0:Lfunc_end014,398 + +externals/binaryen/test/torture-s/pr29695-2.c.s,932 +f1: # @f1f17,202 +.Lfunc_end0:Lfunc_end016,495 +f2: # @f2f223,612 +.Lfunc_end1:Lfunc_end134,960 +f3: # @f3f341,1077 +.Lfunc_end2:Lfunc_end252,1429 +f4: # @f4f459,1546 +.Lfunc_end3:Lfunc_end370,1899 +f5: # @f5f577,2016 +.Lfunc_end4:Lfunc_end489,2395 +f6: # @f6f696,2512 +.Lfunc_end5:Lfunc_end5108,2891 +f7: # @f7f7115,3008 +.Lfunc_end6:Lfunc_end6127,3394 +f8: # @f8f8134,3511 +.Lfunc_end7:Lfunc_end7146,3897 +main: # @mainmain153,4022 +.LBB8_5: # %if.then19LBB8_5184,5035 +.Lfunc_end8:Lfunc_end8189,5179 +a:a197,5333 +b:b205,5486 +c:c214,5650 +d:d223,5821 + +externals/binaryen/test/torture-s/pr41239.c.s,685 +test: # @testtest7,208 +.LBB0_3: # %if.endLBB0_343,1368 +.Lfunc_end0:Lfunc_end052,1689 +fn1: # @fn1fn159,1814 +.Lfunc_end1:Lfunc_end173,2174 +fn2: # @fn2fn280,2297 +.LBB2_2: # %if.thenLBB2_289,2542 +.Lfunc_end2:Lfunc_end295,2712 +fn3: # @fn3fn3102,2835 +.Lfunc_end3:Lfunc_end3111,3076 +fn4: # @fn4fn4118,3199 +.Lfunc_end4:Lfunc_end4127,3449 +main: # @mainmain134,3576 +.Lfunc_end5:Lfunc_end5157,4230 + +externals/binaryen/test/torture-s/20021118-2.c.s,738 +t1: # @t1t17,208 +.Lfunc_end0:Lfunc_end027,808 +t2: # @t2t234,925 +.Lfunc_end1:Lfunc_end156,1585 +f1: # @f1f163,1702 +.LBB2_2: # %if.thenLBB2_272,1983 +.Lfunc_end2:Lfunc_end277,2125 +f2: # @f2f284,2242 +.LBB3_3: # %if.thenLBB3_397,2680 +.Lfunc_end3:Lfunc_end3102,2822 +f3: # @f3f3109,2939 +.LBB4_2: # %if.thenLBB4_2118,3220 +.Lfunc_end4:Lfunc_end4123,3362 +main: # @mainmain130,3487 +.Lfunc_end5:Lfunc_end5137,3675 + +externals/binaryen/test/torture-s/20000314-1.c.s,90 +main: # @mainmain7,211 +.Lfunc_end0:Lfunc_end014,398 + +externals/binaryen/test/torture-s/960302-1.c.s,259 +foo: # @foofoo7,205 +.Lfunc_end0:Lfunc_end025,747 +main: # @mainmain32,874 +.LBB1_2: # %if.thenLBB1_247,1317 +.Lfunc_end1:Lfunc_end152,1459 +a:a60,1613 + +externals/binaryen/test/torture-s/pr56962.c.s,350 +bar: # @barbar7,204 +.LBB0_2: # %if.thenLBB0_216,484 +.Lfunc_end0:Lfunc_end021,626 +foo: # @foofoo28,749 +.Lfunc_end1:Lfunc_end176,2166 +main: # @mainmain83,2293 +.Lfunc_end2:Lfunc_end293,2615 +v:v101,2766 + +externals/binaryen/test/torture-s/va-arg-7.c.s,254 +debug: # @debugdebug7,213 +.LBB0_4: # %if.then10LBB0_452,1683 +.Lfunc_end0:Lfunc_end057,1827 +main: # @mainmain64,1958 +.Lfunc_end1:Lfunc_end184,2573 + +externals/binaryen/test/torture-s/pr52286.c.s,155 +main: # @mainmain7,208 +.LBB0_2: # %if.thenLBB0_221,563 +.Lfunc_end0:Lfunc_end026,705 + +externals/binaryen/test/torture-s/980604-1.c.s,207 +main: # @mainmain7,209 +.LBB0_2: # %if.thenLBB0_225,738 +.Lfunc_end0:Lfunc_end030,880 +a:a38,1034 +b:b47,1198 +c:c56,1369 +d:d65,1530 + +externals/binaryen/test/torture-s/pr34768-2.c.s,442 +foo: # @foofoo7,206 +.Lfunc_end0:Lfunc_end019,569 +bar: # @barbar26,692 +.Lfunc_end1:Lfunc_end132,902 +test: # @testtest39,1029 +.Lfunc_end2:Lfunc_end255,1534 +main: # @mainmain62,1663 +.LBB3_2: # %if.thenLBB3_275,2052 +.Lfunc_end3:Lfunc_end380,2194 +x:x88,2345 + +externals/binaryen/test/torture-s/20001108-1.c.s,307 +signed_poly: # @signed_polysigned_poly7,239 +.Lfunc_end0:Lfunc_end020,653 +unsigned_poly: # @unsigned_polyunsigned_poly27,832 +.Lfunc_end1:Lfunc_end138,1200 +main: # @mainmain45,1347 +.Lfunc_end2:Lfunc_end252,1536 + +externals/binaryen/test/torture-s/enum-3.c.s,115 +main: # @mainmain7,207 +.Lfunc_end0:Lfunc_end028,781 +q:q36,932 +p:p45,1065 + +externals/binaryen/test/torture-s/20030218-1.c.s,193 +foo: # @foofoo7,207 +.Lfunc_end0:Lfunc_end018,538 +main: # @mainmain25,665 +.Lfunc_end1:Lfunc_end146,1236 +q:q54,1387 + +externals/binaryen/test/torture-s/980505-1.c.s,90 +main: # @mainmain7,209 +.Lfunc_end0:Lfunc_end014,397 + +externals/binaryen/test/torture-s/pr22098-1.c.s,90 +main: # @mainmain7,210 +.Lfunc_end0:Lfunc_end014,398 + +externals/binaryen/test/torture-s/20001031-1.c.s,575 +t1: # @t1t17,203 +.LBB0_2: # %if.thenLBB0_216,481 +.Lfunc_end0:Lfunc_end021,623 +t2: # @t2t228,740 +.Lfunc_end1:Lfunc_end134,952 +t3: # @t3t341,1069 +.LBB2_2: # %if.thenLBB2_250,1353 +.Lfunc_end2:Lfunc_end255,1495 +t4: # @t4t462,1612 +.Lfunc_end3:Lfunc_end368,1824 +main: # @mainmain75,1949 +.Lfunc_end4:Lfunc_end482,2136 + +externals/binaryen/test/torture-s/20001017-2.c.s,259 +fn_4parms: # @fn_4parmsfn_4parms7,231 +.LBB0_4: # %if.thenLBB0_427,921 +.Lfunc_end0:Lfunc_end032,1063 +main: # @mainmain39,1202 +.Lfunc_end1:Lfunc_end145,1422 + +externals/binaryen/test/torture-s/960326-1.c.s,167 +main: # @mainmain7,209 +.LBB0_2: # %if.thenLBB0_220,599 +.Lfunc_end0:Lfunc_end025,741 +s:s33,895 + +externals/binaryen/test/torture-s/20031020-1.c.s,245 +foo: # @foofoo7,207 +.LBB0_2: # %if.thenLBB0_216,486 +.Lfunc_end0:Lfunc_end021,628 +main: # @mainmain28,755 +.Lfunc_end1:Lfunc_end138,1090 + +externals/binaryen/test/torture-s/enum-2.c.s,90 +main: # @mainmain7,207 +.Lfunc_end0:Lfunc_end014,394 + +externals/binaryen/test/torture-s/20080408-1.c.s,90 +main: # @mainmain7,211 +.Lfunc_end0:Lfunc_end013,422 + +externals/binaryen/test/torture-s/builtin-types-compatible-p.c.s,140 +main: # @mainmain7,227 +.Lfunc_end0:Lfunc_end014,414 +i:i22,565 +d:d31,726 +rootbeer:rootbeer40,920 + +externals/binaryen/test/torture-s/string-opt-5.c.s,230 +main: # @mainmain7,213 +.LBB0_26: # %if.then183LBB0_26274,9564 +.Lfunc_end0:Lfunc_end0279,9709 +x:x287,9863 +y:y296,10027 +bar:bar311,10326 +buf:buf364,11400 + +externals/binaryen/test/torture-s/pr28982b.c.s,603 +bar: # @barbar7,210 +.Lfunc_end0:Lfunc_end018,553 +foo: # @foofoo25,676 +.LBB1_2: # %while.bodyLBB1_2186,5506 +.LBB1_3:LBB1_3274,8026 +.LBB1_4: # %while.endLBB1_4297,8548 +.Lfunc_end1:Lfunc_end1351,10252 +main: # @mainmain358,10379 +.LBB2_1: # %for.body4LBB2_1481,13927 +.Lfunc_end2:Lfunc_end2601,17918 +incs:incs609,18081 +ptrs:ptrs618,18233 +results:results627,18397 +input:input636,18559 + +externals/binaryen/test/torture-s/920603-1.c.s,240 +f: # @ff7,197 +.LBB0_2: # %if.thenLBB0_217,494 +.Lfunc_end0:Lfunc_end022,636 +main: # @mainmain29,759 +.Lfunc_end1:Lfunc_end136,946 + +externals/binaryen/test/torture-s/20040409-1.c.s,1591 +test1: # @test1test17,215 +.Lfunc_end0:Lfunc_end015,480 +test1u: # @test1utest1u22,619 +.Lfunc_end1:Lfunc_end130,885 +test2: # @test2test237,1022 +.Lfunc_end2:Lfunc_end245,1287 +test2u: # @test2utest2u52,1426 +.Lfunc_end3:Lfunc_end360,1692 +test3: # @test3test367,1829 +.Lfunc_end4:Lfunc_end475,2094 +test3u: # @test3utest3u82,2233 +.Lfunc_end5:Lfunc_end590,2499 +test4: # @test4test497,2636 +.Lfunc_end6:Lfunc_end6105,2901 +test4u: # @test4utest4u112,3040 +.Lfunc_end7:Lfunc_end7120,3306 +test5: # @test5test5127,3443 +.Lfunc_end8:Lfunc_end8135,3708 +test5u: # @test5utest5u142,3847 +.Lfunc_end9:Lfunc_end9150,4113 +test6: # @test6test6157,4250 +.Lfunc_end10:Lfunc_end10165,4515 +test6u: # @test6utest6u172,4656 +.Lfunc_end11:Lfunc_end11180,4922 +test: # @testtest187,5057 +.LBB12_2: # %if.thenLBB12_2197,5380 +.Lfunc_end12:Lfunc_end12202,5522 +testu: # @testutestu209,5657 +.LBB13_2: # %if.thenLBB13_2219,5981 +.Lfunc_end13:Lfunc_end13224,6123 +main: # @mainmain231,6256 +.Lfunc_end14:Lfunc_end14237,6467 + +externals/binaryen/test/torture-s/va-arg-6.c.s,251 +f: # @ff7,197 +.LBB0_10: # %if.then40LBB0_10123,3961 +.Lfunc_end0:Lfunc_end0128,4105 +main: # @mainmain135,4228 +.Lfunc_end1:Lfunc_end1187,5705 + +externals/binaryen/test/torture-s/930208-1.c.s,176 +f: # @ff7,197 +.Lfunc_end0:Lfunc_end028,813 +main: # @mainmain35,936 +.Lfunc_end1:Lfunc_end142,1124 + +externals/binaryen/test/torture-s/pr23324.c.s,214 +main: # @mainmain7,208 +.LBB0_6: # %if.then37.i.iLBB0_644,1494 +.Lfunc_end0:Lfunc_end049,1642 +wv6:wv655,1771 +zv7:zv776,2446 +yv7:yv783,2602 + +externals/binaryen/test/torture-s/931208-1.c.s,175 +f: # @ff7,197 +.Lfunc_end0:Lfunc_end013,407 +main: # @mainmain20,530 +.Lfunc_end1:Lfunc_end127,717 + +externals/binaryen/test/torture-s/20021118-3.c.s,246 +foo: # @foofoo7,207 +.LBB0_3: # %if.thenLBB0_324,731 +.Lfunc_end0:Lfunc_end029,873 +main: # @mainmain36,1000 +.Lfunc_end1:Lfunc_end143,1187 + +externals/binaryen/test/torture-s/pr40668.c.s,250 +bar: # @barbar7,204 +.LBB0_3: # %sw.epilogLBB0_333,1061 +.Lfunc_end0:Lfunc_end037,1228 +main: # @mainmain44,1355 +.Lfunc_end1:Lfunc_end150,1567 + +externals/binaryen/test/torture-s/pr52979-2.c.s,703 +foo: # @foofoo7,206 +.Lfunc_end0:Lfunc_end011,373 +bar: # @barbar18,496 +.LBB1_2: # %if.endLBB1_261,1762 +.Lfunc_end1:Lfunc_end165,1926 +baz: # @bazbaz72,2049 +.LBB2_2: # %bar.exitLBB2_2115,3317 +.Lfunc_end2:Lfunc_end2127,3711 +main: # @mainmain134,3838 +.LBB3_2: # %baz.exitLBB3_2178,5123 +.LBB3_4: # %if.thenLBB3_4200,5800 +.Lfunc_end3:Lfunc_end3205,5942 +a:a213,6096 +e:e226,6404 +d:d235,6565 +c:c244,6726 +b:b250,6849 + +externals/binaryen/test/torture-s/20040823-1.c.s,265 +bla: # @blabla7,207 +.LBB0_2: # %if.endLBB0_217,531 +.Lfunc_end0:Lfunc_end023,700 +main: # @mainmain30,827 +.Lfunc_end1:Lfunc_end150,1363 +pwarn:pwarn58,1530 + +externals/binaryen/test/torture-s/20000917-1.c.s,272 +one: # @oneone7,207 +.Lfunc_end0:Lfunc_end016,499 +zero: # @zerozero23,626 +.Lfunc_end1:Lfunc_end132,910 +main: # @mainmain39,1039 +.Lfunc_end2:Lfunc_end246,1227 + +externals/binaryen/test/torture-s/20101025-1.c.s,383 +f2: # @f2f27,203 +.Lfunc_end0:Lfunc_end014,431 +f3: # @f3f321,548 +.Lfunc_end1:Lfunc_end134,939 +main: # @mainmain41,1064 +.LBB2_2: # %if.thenLBB2_255,1484 +.Lfunc_end2:Lfunc_end260,1626 +g_3:g_368,1785 +g_6:g_675,1928 +g_7:g_782,2042 + +externals/binaryen/test/torture-s/20001111-1.c.s,369 +foo: # @foofoo7,207 +.Lfunc_end0:Lfunc_end019,590 +bar: # @barbar26,713 +.Lfunc_end1:Lfunc_end130,880 +main: # @mainmain37,1007 +.LBB2_2: # %if.end4LBB2_248,1352 +.Lfunc_end2:Lfunc_end257,1604 +next_buffer:next_buffer63,1746 + +externals/binaryen/test/torture-s/20070724-1.c.s,90 +main: # @mainmain7,211 +.Lfunc_end0:Lfunc_end013,422 + +externals/binaryen/test/torture-s/981130-1.c.s,279 +check: # @checkcheck7,213 +.LBB0_2: # %if.elseLBB0_217,530 +.Lfunc_end0:Lfunc_end022,672 +main: # @mainmain29,803 +.Lfunc_end1:Lfunc_end143,1170 +s2:s251,1328 +s1:s161,1533 + +externals/binaryen/test/torture-s/20100708-1.c.s,176 +f: # @ff7,199 +.Lfunc_end0:Lfunc_end017,530 +main: # @mainmain24,653 +.Lfunc_end1:Lfunc_end145,1291 + +externals/binaryen/test/torture-s/961206-1.c.s,459 +sub1: # @sub1sub17,209 +.Lfunc_end0:Lfunc_end015,472 +sub2: # @sub2sub222,601 +.Lfunc_end1:Lfunc_end130,864 +sub3: # @sub3sub337,993 +.Lfunc_end2:Lfunc_end245,1256 +sub4: # @sub4sub452,1385 +.Lfunc_end3:Lfunc_end360,1648 +main: # @mainmain67,1777 +.Lfunc_end4:Lfunc_end474,1967 + +externals/binaryen/test/torture-s/930518-1.c.s,471 +f: # @ff7,197 +.LBB0_2: # %while.bodyLBB0_221,614 +.LBB0_3: # %while.endLBB0_336,1098 +.Lfunc_end0:Lfunc_end042,1308 +main: # @mainmain49,1431 +.LBB1_2: # %while.body.iLBB1_274,2212 +.LBB1_6: # %if.thenLBB1_6106,3244 +.Lfunc_end1:Lfunc_end1111,3386 +bar:bar119,3545 + +externals/binaryen/test/torture-s/20031201-1.c.s,508 +f1: # @f1f17,203 +.Lfunc_end0:Lfunc_end028,711 +f0: # @f0f035,828 +.LBB1_4: # %if.thenLBB1_462,1723 +.Lfunc_end1:Lfunc_end167,1865 +test: # @testtest74,1990 +.LBB2_3: # %if.thenLBB2_394,2627 +.Lfunc_end2:Lfunc_end299,2769 +main: # @mainmain106,2898 +.Lfunc_end3:Lfunc_end3122,3347 +i:i128,3469 + +externals/binaryen/test/torture-s/20040319-1.c.s,181 +blah: # @blahblah7,211 +.Lfunc_end0:Lfunc_end019,580 +main: # @mainmain26,709 +.Lfunc_end1:Lfunc_end133,898 + +externals/binaryen/test/torture-s/20021127-1.c.s,195 +main: # @mainmain7,211 +.Lfunc_end0:Lfunc_end013,422 +llabs: # @llabsllabs20,555 +.Lfunc_end1:Lfunc_end127,729 +a:a35,885 + +externals/binaryen/test/torture-s/20020127-1.c.s,179 +foo: # @foofoo7,207 +.Lfunc_end0:Lfunc_end019,570 +main: # @mainmain26,697 +.Lfunc_end1:Lfunc_end133,886 + +externals/binaryen/test/torture-s/921113-1.c.s,765 +w: # @ww7,197 +.Lfunc_end0:Lfunc_end015,440 +f1: # @f1f122,555 +.LBB1_3: # %if.thenLBB1_337,1022 +.Lfunc_end1:Lfunc_end142,1164 +f2: # @f2f249,1281 +.LBB2_3: # %if.thenLBB2_364,1748 +.Lfunc_end2:Lfunc_end269,1890 +gitter: # @gittergitter76,2023 +.LBB3_7: # %if.end18LBB3_7130,3834 +.LBB3_8: # %if.then.i32LBB3_8133,3942 +.Lfunc_end3:Lfunc_end3138,4088 +main: # @mainmain145,4221 +.Lfunc_end4:Lfunc_end4168,4895 +pos:pos176,5054 +limit:limit185,5209 + +externals/binaryen/test/torture-s/990117-1.c.s,179 +foo: # @foofoo7,205 +.Lfunc_end0:Lfunc_end020,642 +main: # @mainmain27,769 +.Lfunc_end1:Lfunc_end133,980 + +externals/binaryen/test/torture-s/const-addr-expr-1.c.s,270 +main: # @mainmain7,218 +.LBB0_3: # %if.then2LBB0_328,881 +.Lfunc_end0:Lfunc_end033,1024 +Upgrade_items:Upgrade_items52,1429 +Upgd_minor_ID:Upgd_minor_ID65,1745 +Upgd_minor_ID1:Upgd_minor_ID174,1971 + +externals/binaryen/test/torture-s/tstdi-1.c.s,637 +feq: # @feqfeq7,204 +.Lfunc_end0:Lfunc_end017,516 +fne: # @fnefne24,639 +.Lfunc_end1:Lfunc_end134,951 +flt: # @fltflt41,1074 +.Lfunc_end2:Lfunc_end252,1415 +fge: # @fgefge59,1538 +.Lfunc_end3:Lfunc_end370,1880 +fgt: # @fgtfgt77,2003 +.Lfunc_end4:Lfunc_end488,2344 +fle: # @flefle95,2467 +.Lfunc_end5:Lfunc_end5106,2808 +main: # @mainmain113,2935 +.Lfunc_end6:Lfunc_end6120,3126 + +externals/binaryen/test/torture-s/medce-1.c.s,353 +bar: # @barbar7,204 +.Lfunc_end0:Lfunc_end014,444 +foo: # @foofoo21,567 +.LBB1_2: # %sw.epilogLBB1_232,908 +.Lfunc_end1:Lfunc_end136,1075 +main: # @mainmain43,1202 +.Lfunc_end2:Lfunc_end252,1487 +ok:ok58,1611 + +externals/binaryen/test/torture-s/pr36339.c.s,417 +try_a: # @try_atry_a7,217 +.Lfunc_end0:Lfunc_end034,1009 +check_a: # @check_acheck_a41,1152 +.LBB1_3: # %cleanupLBB1_359,1659 +.Lfunc_end1:Lfunc_end164,1855 +main: # @mainmain71,1990 +.LBB2_2: # %if.thenLBB2_283,2365 +.Lfunc_end2:Lfunc_end288,2507 + +externals/binaryen/test/torture-s/991216-1.c.s,1400 +test1: # @test1test17,213 +.LBB0_4: # %if.thenLBB0_424,810 +.Lfunc_end0:Lfunc_end029,952 +test2: # @test2test236,1087 +.LBB1_5: # %if.thenLBB1_557,1835 +.Lfunc_end1:Lfunc_end162,1977 +test3: # @test3test369,2112 +.LBB2_6: # %if.thenLBB2_694,3011 +.Lfunc_end2:Lfunc_end299,3153 +test4: # @test4test4106,3288 +.LBB3_7: # %if.thenLBB3_7135,4341 +.Lfunc_end3:Lfunc_end3140,4483 +test5: # @test5test5147,4618 +.LBB4_8: # %if.thenLBB4_8180,5825 +.Lfunc_end4:Lfunc_end4185,5967 +test6: # @test6test6192,6102 +.LBB5_9: # %if.thenLBB5_9229,7463 +.Lfunc_end5:Lfunc_end5234,7605 +test7: # @test7test7241,7740 +.LBB6_10: # %if.thenLBB6_10282,9255 +.Lfunc_end6:Lfunc_end6287,9397 +test8: # @test8test8294,9532 +.LBB7_11: # %if.thenLBB7_11339,11201 +.Lfunc_end7:Lfunc_end7344,11343 +main: # @mainmain351,11474 +.Lfunc_end8:Lfunc_end8358,11661 + +externals/binaryen/test/torture-s/20020226-1.c.s,293 +main: # @mainmain7,211 +.LBB0_22: # %if.then187LBB0_22196,6911 +.Lfunc_end0:Lfunc_end0201,7056 +uc:uc208,7202 +us:us217,7372 +ui:ui226,7545 +ul:ul235,7718 +ull:ull244,7899 +shift1:shift1253,8101 +shift2:shift2262,8295 + +externals/binaryen/test/torture-s/920721-3.c.s,400 +ru: # @ruru7,201 +.LBB0_3: # %if.then7LBB0_327,813 +.Lfunc_end0:Lfunc_end032,956 +rs: # @rsrs39,1073 +.LBB1_2: # %if.thenLBB1_251,1426 +.Lfunc_end1:Lfunc_end156,1568 +main: # @mainmain63,1693 +.Lfunc_end2:Lfunc_end270,1880 + +externals/binaryen/test/torture-s/920721-1.c.s,175 +f: # @ff7,197 +.Lfunc_end0:Lfunc_end014,429 +main: # @mainmain21,552 +.Lfunc_end1:Lfunc_end128,741 + +externals/binaryen/test/torture-s/20000519-2.c.s,167 +main: # @mainmain7,211 +.LBB0_2: # %if.thenLBB0_220,600 +.Lfunc_end0:Lfunc_end025,742 +x:x33,896 + +externals/binaryen/test/torture-s/20090711-1.c.s,245 +div: # @divdiv7,207 +.Lfunc_end0:Lfunc_end015,465 +main: # @mainmain22,592 +.LBB1_2: # %if.thenLBB1_234,977 +.Lfunc_end1:Lfunc_end139,1119 + +externals/binaryen/test/torture-s/20030203-1.c.s,277 +do_layer3: # @do_layer3do_layer37,231 +.Lfunc_end0:Lfunc_end017,546 +f: # @ff24,673 +.Lfunc_end1:Lfunc_end129,852 +main: # @mainmain36,975 +.Lfunc_end2:Lfunc_end242,1187 + +externals/binaryen/test/torture-s/980205.c.s,256 +fdouble: # @fdoublefdouble7,219 +.LBB0_3: # %if.thenLBB0_342,1288 +.Lfunc_end0:Lfunc_end047,1430 +main: # @mainmain54,1565 +.Lfunc_end1:Lfunc_end173,2107 + +externals/binaryen/test/torture-s/930930-1.c.s,525 +f: # @ff7,197 +.LBB0_2: # %if.endLBB0_218,532 +.LBB0_5: # %if.end4LBB0_536,1265 +.LBB0_7: # %if.end8LBB0_748,1724 +.LBB0_8: # %if.then7LBB0_851,1831 +.Lfunc_end0:Lfunc_end056,1974 +main: # @mainmain63,2097 +.Lfunc_end1:Lfunc_end179,2565 +mem:mem87,2724 +wm_TR:wm_TR96,2880 +wm_HB:wm_HB105,3037 +wm_SPB:wm_SPB114,3198 + +externals/binaryen/test/torture-s/931110-2.c.s,90 +main: # @mainmain7,209 +.Lfunc_end0:Lfunc_end014,396 + +externals/binaryen/test/torture-s/pr48197.c.s,90 +main: # @mainmain7,208 +.Lfunc_end0:Lfunc_end013,419 + +externals/binaryen/test/torture-s/20000113-1.c.s,254 +foobar: # @foobarfoobar7,219 +.LBB0_3: # %if.thenLBB0_333,1025 +.Lfunc_end0:Lfunc_end038,1167 +main: # @mainmain45,1300 +.Lfunc_end1:Lfunc_end154,1555 + +externals/binaryen/test/torture-s/20000808-1.c.s,426 +bar: # @barbar7,207 +.Lfunc_end0:Lfunc_end011,374 +f: # @ff18,489 +.LBB1_13: # %if.thenLBB1_1375,2651 +.Lfunc_end1:Lfunc_end180,2793 +foo: # @foofoo87,2912 +.Lfunc_end2:Lfunc_end291,3080 +main: # @mainmain98,3207 +.Lfunc_end3:Lfunc_end3105,3394 + +externals/binaryen/test/torture-s/20010518-1.c.s,180 +add: # @addadd7,207 +.Lfunc_end0:Lfunc_end025,821 +main: # @mainmain32,948 +.Lfunc_end1:Lfunc_end139,1136 + +externals/binaryen/test/torture-s/pr49712.c.s,544 +foo: # @foofoo7,204 +.Lfunc_end0:Lfunc_end012,390 +bar: # @barbar19,513 +.LBB1_2: # %for.end9LBB1_235,989 +.Lfunc_end1:Lfunc_end140,1184 +main: # @mainmain47,1311 +.LBB2_2: # %while.bodyLBB2_264,1804 +.LBB2_4: # %for.inc.1LBB2_484,2517 +.Lfunc_end2:Lfunc_end293,2798 +d:d101,2949 +e:e110,3110 +b:b119,3271 +c:c128,3432 +a:a137,3593 + +externals/binaryen/test/torture-s/20000422-1.c.s,652 +main: # @mainmain7,211 +.LBB0_2: # %for.cond1.preheaderLBB0_227,835 +.LBB0_4: # %for.body3LBB0_438,1335 +.LBB0_6: # %for.cond1.backedgeLBB0_656,2039 +.LBB0_7: # %for.endLBB0_766,2430 +.LBB0_10: # %for.body17LBB0_1083,3042 +.LBB0_12: # %for.end25LBB0_12103,3803 +.LBB0_13: # %if.then21LBB0_13109,3977 +.Lfunc_end0:Lfunc_end0114,4121 +ops:ops122,4283 +correct:correct143,4933 +num:num164,5575 + +externals/binaryen/test/torture-s/20120817-1.c.s,259 +f: # @ff7,199 +.Lfunc_end0:Lfunc_end021,635 +main: # @mainmain28,758 +.LBB1_2: # %if.thenLBB1_240,1127 +.Lfunc_end1:Lfunc_end145,1269 +foo:foo53,1428 + +externals/binaryen/test/torture-s/pr29695-1.c.s,802 +f1: # @f1f17,202 +.Lfunc_end0:Lfunc_end013,413 +f2: # @f2f220,530 +.Lfunc_end1:Lfunc_end126,741 +f3: # @f3f333,858 +.Lfunc_end2:Lfunc_end239,1069 +f4: # @f4f446,1186 +.Lfunc_end3:Lfunc_end352,1398 +f5: # @f5f559,1515 +.Lfunc_end4:Lfunc_end465,1733 +f6: # @f6f672,1850 +.Lfunc_end5:Lfunc_end578,2068 +f7: # @f7f785,2185 +.Lfunc_end6:Lfunc_end691,2404 +f8: # @f8f898,2521 +.Lfunc_end7:Lfunc_end7104,2740 +main: # @mainmain111,2865 +.Lfunc_end8:Lfunc_end8117,3076 + +externals/binaryen/test/torture-s/20011109-1.c.s,957 +fail1: # @fail1fail17,215 +.Lfunc_end0:Lfunc_end012,361 +fail2: # @fail2fail219,496 +.Lfunc_end1:Lfunc_end124,642 +fail3: # @fail3fail331,777 +.Lfunc_end2:Lfunc_end236,923 +fail4: # @fail4fail443,1058 +.Lfunc_end3:Lfunc_end348,1204 +foo: # @foofoo55,1331 +.LBB4_2: # %sw.epilog9LBB4_277,2112 +.LBB4_3: # %sw.bb3LBB4_380,2217 +.LBB4_4: # %sw.bbLBB4_484,2348 +.LBB4_5: # %sw.defaultLBB4_588,2478 +.LBB4_6: # %sw.bb1LBB4_692,2613 +.LBB4_7: # %sw.bb7LBB4_796,2744 +.Lfunc_end4:Lfunc_end4101,2885 +main: # @mainmain108,3012 +.Lfunc_end5:Lfunc_end5115,3199 + +externals/binaryen/test/torture-s/20021118-1.c.s,179 +foo: # @foofoo7,207 +.Lfunc_end0:Lfunc_end015,499 +main: # @mainmain22,626 +.Lfunc_end1:Lfunc_end129,814 + +externals/binaryen/test/torture-s/20000314-2.c.s,193 +main: # @mainmain7,211 +.LBB0_2: # %if.endLBB0_217,518 +.Lfunc_end0:Lfunc_end023,687 +bigconst:bigconst31,870 +a:a40,1056 + +externals/binaryen/test/torture-s/990128-1.c.s,913 +main: # @mainmain7,209 +.LBB0_1: # %for.inc.i.preheader.iLBB0_150,1413 +.LBB0_2: # %for.inc.i.iLBB0_256,1695 +.LBB0_6: # %if.thenLBB0_686,2761 +.Lfunc_end0:Lfunc_end091,2903 +sub: # @subsub98,3028 +.LBB1_2: # %for.inc.i.preheaderLBB1_2108,3365 +.LBB1_3: # %for.inc.iLBB1_3113,3625 +.LBB1_6: # %for.endLBB1_6134,4429 +.Lfunc_end1:Lfunc_end1144,4748 +look: # @looklook151,4875 +.LBB2_1: # %for.incLBB2_1158,5084 +.LBB2_2: # %for.endLBB2_2164,5347 +.Lfunc_end2:Lfunc_end2178,5758 +count:count186,5925 +ss:ss195,6098 +p:p204,6232 +sss:sss213,6373 + +externals/binaryen/test/torture-s/20020118-1.c.s,298 +foo: # @foofoo7,207 +.LBB0_1: # %for.condLBB0_114,419 +.LBB0_2:LBB0_251,1502 +.Lfunc_end0:Lfunc_end054,1531 +main: # @mainmain61,1658 +.Lfunc_end1:Lfunc_end168,1845 +q:q76,1996 +n:n85,2129 + +externals/binaryen/test/torture-s/va-arg-4.c.s,247 +f: # @ff7,197 +.LBB0_7: # %if.then28LBB0_764,2069 +.Lfunc_end0:Lfunc_end069,2213 +main: # @mainmain76,2336 +.Lfunc_end1:Lfunc_end1116,3541 + +externals/binaryen/test/torture-s/pr61673.c.s,705 +bar: # @barbar7,204 +.LBB0_2: # %if.endLBB0_219,583 +.LBB0_3: # %if.thenLBB0_322,684 +.Lfunc_end0:Lfunc_end027,826 +foo: # @foofoo34,949 +.LBB1_2: # %if.endLBB1_246,1328 +.Lfunc_end1:Lfunc_end151,1519 +baz: # @bazbaz58,1642 +.LBB2_2: # %if.endLBB2_270,2021 +.Lfunc_end2:Lfunc_end274,2185 +main: # @mainmain81,2312 +.LBB3_5: # %if.then15LBB3_5125,3701 +.Lfunc_end3:Lfunc_end3130,3845 +e:e137,3984 + +externals/binaryen/test/torture-s/20021219-1.c.s,386 +foo: # @foofoo7,207 +.Lfunc_end0:Lfunc_end012,393 +main: # @mainmain19,520 +.LBB1_1: # %while.condLBB1_144,1288 +.LBB1_3: # %while.bodyLBB1_360,1899 +.LBB1_4: # %while.endLBB1_468,2214 +.Lfunc_end1:Lfunc_end174,2422 + +externals/binaryen/test/torture-s/20040409-3.c.s,1591 +test1: # @test1test17,215 +.Lfunc_end0:Lfunc_end015,479 +test1u: # @test1utest1u22,618 +.Lfunc_end1:Lfunc_end130,883 +test2: # @test2test237,1020 +.Lfunc_end2:Lfunc_end245,1284 +test2u: # @test2utest2u52,1423 +.Lfunc_end3:Lfunc_end360,1688 +test3: # @test3test367,1825 +.Lfunc_end4:Lfunc_end475,2089 +test3u: # @test3utest3u82,2228 +.Lfunc_end5:Lfunc_end590,2493 +test4: # @test4test497,2630 +.Lfunc_end6:Lfunc_end6105,2894 +test4u: # @test4utest4u112,3033 +.Lfunc_end7:Lfunc_end7120,3298 +test5: # @test5test5127,3435 +.Lfunc_end8:Lfunc_end8135,3699 +test5u: # @test5utest5u142,3838 +.Lfunc_end9:Lfunc_end9150,4103 +test6: # @test6test6157,4240 +.Lfunc_end10:Lfunc_end10165,4504 +test6u: # @test6utest6u172,4645 +.Lfunc_end11:Lfunc_end11180,4910 +test: # @testtest187,5045 +.LBB12_2: # %if.thenLBB12_2197,5367 +.Lfunc_end12:Lfunc_end12202,5509 +testu: # @testutestu209,5644 +.LBB13_2: # %if.thenLBB13_2219,5967 +.Lfunc_end13:Lfunc_end13224,6109 +main: # @mainmain231,6242 +.Lfunc_end14:Lfunc_end14237,6453 + +externals/binaryen/test/torture-s/20020219-1.c.s,179 +foo: # @foofoo7,207 +.Lfunc_end0:Lfunc_end013,436 +main: # @mainmain20,563 +.Lfunc_end1:Lfunc_end127,750 + +externals/binaryen/test/torture-s/pr46019.c.s,90 +main: # @mainmain7,208 +.Lfunc_end0:Lfunc_end013,424 + +externals/binaryen/test/torture-s/pr60960.c.s,430 +f1: # @f1f17,200 +.Lfunc_end0:Lfunc_end038,1118 +f2: # @f2f245,1235 +.Lfunc_end1:Lfunc_end176,2153 +f3: # @f3f383,2270 +.Lfunc_end2:Lfunc_end2118,3340 +main: # @mainmain125,3465 +.LBB3_4: # %if.then10LBB3_4183,5284 +.Lfunc_end3:Lfunc_end3188,5428 + +externals/binaryen/test/torture-s/pr45262.c.s,271 +foo: # @foofoo7,204 +.Lfunc_end0:Lfunc_end018,542 +bar: # @barbar25,665 +.Lfunc_end1:Lfunc_end136,1003 +main: # @mainmain43,1130 +.Lfunc_end2:Lfunc_end249,1344 + +externals/binaryen/test/torture-s/20000603-1.c.s,175 +f: # @ff7,199 +.Lfunc_end0:Lfunc_end018,551 +main: # @mainmain25,674 +.Lfunc_end1:Lfunc_end131,886 + +externals/binaryen/test/torture-s/pr34768-1.c.s,441 +foo: # @foofoo7,206 +.Lfunc_end0:Lfunc_end017,526 +bar: # @barbar24,649 +.Lfunc_end1:Lfunc_end128,816 +test: # @testtest35,943 +.Lfunc_end2:Lfunc_end251,1410 +main: # @mainmain58,1539 +.LBB3_2: # %if.thenLBB3_271,1928 +.Lfunc_end3:Lfunc_end376,2070 +x:x84,2221 + +externals/binaryen/test/torture-s/arith-1.c.s,187 +sat_add: # @sat_addsat_add7,220 +.Lfunc_end0:Lfunc_end019,593 +main: # @mainmain26,728 +.Lfunc_end1:Lfunc_end133,916 + +externals/binaryen/test/torture-s/20140212-1.c.s,812 +fn1: # @fn1fn17,212 +.LBB0_1: # %for.condLBB0_136,1040 +.LBB0_3: # %if.elseLBB0_351,1608 +.LBB0_4: # %if.then15LBB0_462,1993 +.Lfunc_end0:Lfunc_end073,2314 +main: # @mainmain80,2441 +.LBB1_1: # %for.cond.iLBB1_1108,3215 +.LBB1_3: # %if.else.iLBB1_3124,3805 +.LBB1_4: # %fn1.exitLBB1_4135,4192 +.LBB1_6: # %if.thenLBB1_6153,4697 +.Lfunc_end1:Lfunc_end1158,4839 +d:d166,4993 +f:f175,5157 +e:e184,5318 +c:c193,5479 +a:a202,5640 +b:b211,5801 +k:k220,5962 +j:j228,6111 +g:g236,6259 +i:i245,6419 +h:h254,6580 + +externals/binaryen/test/torture-s/pr22098-2.c.s,90 +main: # @mainmain7,210 +.Lfunc_end0:Lfunc_end014,397 + +externals/binaryen/test/torture-s/930527-1.c.s,175 +f: # @ff7,197 +.Lfunc_end0:Lfunc_end017,505 +main: # @mainmain24,628 +.Lfunc_end1:Lfunc_end131,816 + +externals/binaryen/test/torture-s/980505-2.c.s,175 +f: # @ff7,197 +.Lfunc_end0:Lfunc_end013,407 +main: # @mainmain20,530 +.Lfunc_end1:Lfunc_end127,718 + +externals/binaryen/test/torture-s/pr43835.c.s,553 +Parrot_gc_mark_PMC_alive_fun: # @Parrot_gc_mark_PMC_alive_funParrot_gc_mark_PMC_alive_fun7,304 +.Lfunc_end0:Lfunc_end013,492 +foo: # @foofoo20,665 +.Lfunc_end1:Lfunc_end126,888 +mark_cell: # @mark_cellmark_cell31,998 +.LBB2_3: # %if.endLBB2_353,1717 +.LBB2_4: # %if.thenLBB2_456,1818 +.Lfunc_end2:Lfunc_end261,1991 +main: # @mainmain68,2130 +.Lfunc_end3:Lfunc_end393,2886 + +externals/binaryen/test/torture-s/20001017-1.c.s,244 +bug: # @bugbug7,207 +.LBB0_2: # %if.thenLBB0_215,519 +.Lfunc_end0:Lfunc_end020,661 +main: # @mainmain27,788 +.Lfunc_end1:Lfunc_end133,999 + +externals/binaryen/test/torture-s/pr22098-3.c.s,255 +f: # @ff7,198 +.Lfunc_end0:Lfunc_end021,606 +main: # @mainmain28,729 +.LBB1_2: # %if.thenLBB1_245,1211 +.Lfunc_end1:Lfunc_end150,1353 +n:n58,1504 + +externals/binaryen/test/torture-s/pr44828.c.s,167 +main: # @mainmain7,208 +.LBB0_2: # %if.thenLBB0_223,690 +.Lfunc_end0:Lfunc_end028,832 +a:a36,986 + +externals/binaryen/test/torture-s/enum-1.c.s,90 +main: # @mainmain7,207 +.Lfunc_end0:Lfunc_end014,394 + +externals/binaryen/test/torture-s/20020510-1.c.s,1273 +testc: # @testctestc7,215 +.LBB0_3: # %if.elseLBB0_325,760 +.LBB0_4: # %if.end9LBB0_428,900 +.LBB0_5: # %if.then7LBB0_531,1002 +.Lfunc_end0:Lfunc_end036,1145 +tests: # @teststests43,1280 +.LBB1_3: # %if.elseLBB1_361,1825 +.LBB1_4: # %if.end9LBB1_464,1965 +.LBB1_5: # %if.then7LBB1_567,2067 +.Lfunc_end1:Lfunc_end172,2210 +testi: # @testitesti79,2345 +.LBB2_3: # %if.elseLBB2_393,2779 +.LBB2_4: # %if.end6LBB2_496,2919 +.LBB2_5: # %if.then4LBB2_599,3021 +.Lfunc_end2:Lfunc_end2104,3164 +testl: # @testltestl111,3299 +.LBB3_3: # %if.elseLBB3_3125,3735 +.LBB3_4: # %if.end6LBB3_4128,3876 +.LBB3_5: # %if.then4LBB3_5131,3979 +.Lfunc_end3:Lfunc_end3136,4122 +main: # @mainmain143,4253 +.Lfunc_end4:Lfunc_end4149,4464 + +externals/binaryen/test/torture-s/20020611-1.c.s,281 +x: # @xx7,199 +.Lfunc_end0:Lfunc_end021,609 +main: # @mainmain28,732 +.LBB1_2: # %if.thenLBB1_248,1283 +.Lfunc_end1:Lfunc_end153,1425 +n:n61,1579 +p:p70,1741 +k:k79,1902 + +externals/binaryen/test/torture-s/20030307-1.c.s,302 +vfswrap_lock: # @vfswrap_lockvfswrap_lock7,243 +.Lfunc_end0:Lfunc_end014,503 +fcntl_lock: # @fcntl_lockfcntl_lock21,672 +.Lfunc_end1:Lfunc_end128,925 +main: # @mainmain35,1066 +.Lfunc_end2:Lfunc_end241,1278 + +externals/binaryen/test/torture-s/pr24851.c.s,90 +main: # @mainmain7,208 +.Lfunc_end0:Lfunc_end013,419 + +externals/binaryen/test/torture-s/pr28982a.c.s,512 +foo: # @foofoo7,210 +.LBB0_2: # %while.bodyLBB0_2156,4606 +.LBB0_3:LBB0_3244,7126 +.LBB0_4: # %while.endLBB0_4267,7648 +.Lfunc_end0:Lfunc_end0311,9010 +main: # @mainmain318,9137 +.LBB1_1: # %for.body4LBB1_1441,12685 +.Lfunc_end1:Lfunc_end1561,16676 +incs:incs569,16839 +ptrs:ptrs578,16991 +results:results587,17155 +input:input596,17317 + +externals/binaryen/test/torture-s/920625-1.c.s,450 +main: # @mainmain7,209 +.Lfunc_end0:Lfunc_end0102,2895 +va1: # @va1va1107,2995 +.LBB1_9: # %if.thenLBB1_9196,5910 +.Lfunc_end1:Lfunc_end1201,6052 +va2: # @va2va2206,6150 +.LBB2_9: # %if.thenLBB2_9290,8921 +.Lfunc_end2:Lfunc_end2295,9063 +pts:pts303,9223 +ipts:ipts319,9710 + +externals/binaryen/test/torture-s/20040409-2.c.s,2810 +test1: # @test1test17,215 +.Lfunc_end0:Lfunc_end015,480 +test1u: # @test1utest1u22,619 +.Lfunc_end1:Lfunc_end130,885 +test2: # @test2test237,1022 +.Lfunc_end2:Lfunc_end245,1287 +test2u: # @test2utest2u52,1426 +.Lfunc_end3:Lfunc_end360,1692 +test3: # @test3test367,1829 +.Lfunc_end4:Lfunc_end475,2094 +test3u: # @test3utest3u82,2233 +.Lfunc_end5:Lfunc_end590,2499 +test4: # @test4test497,2636 +.Lfunc_end6:Lfunc_end6105,2901 +test4u: # @test4utest4u112,3040 +.Lfunc_end7:Lfunc_end7120,3306 +test5: # @test5test5127,3443 +.Lfunc_end8:Lfunc_end8135,3708 +test5u: # @test5utest5u142,3847 +.Lfunc_end9:Lfunc_end9150,4113 +test6: # @test6test6157,4250 +.Lfunc_end10:Lfunc_end10165,4515 +test6u: # @test6utest6u172,4656 +.Lfunc_end11:Lfunc_end11180,4922 +test7: # @test7test7187,5061 +.Lfunc_end12:Lfunc_end12195,5326 +test7u: # @test7utest7u202,5467 +.Lfunc_end13:Lfunc_end13210,5733 +test8: # @test8test8217,5872 +.Lfunc_end14:Lfunc_end14225,6137 +test8u: # @test8utest8u232,6278 +.Lfunc_end15:Lfunc_end15240,6544 +test9: # @test9test9247,6683 +.Lfunc_end16:Lfunc_end16255,6948 +test9u: # @test9utest9u262,7089 +.Lfunc_end17:Lfunc_end17270,7355 +test10: # @test10test10277,7498 +.Lfunc_end18:Lfunc_end18285,7764 +test10u: # @test10utest10u292,7911 +.Lfunc_end19:Lfunc_end19300,8178 +test11: # @test11test11307,8323 +.Lfunc_end20:Lfunc_end20315,8589 +test11u: # @test11utest11u322,8736 +.Lfunc_end21:Lfunc_end21330,9003 +test12: # @test12test12337,9148 +.Lfunc_end22:Lfunc_end22345,9414 +test12u: # @test12utest12u352,9561 +.Lfunc_end23:Lfunc_end23360,9828 +test: # @testtest367,9965 +.LBB24_2: # %if.thenLBB24_2377,10288 +.Lfunc_end24:Lfunc_end24382,10430 +testu: # @testutestu389,10565 +.LBB25_2: # %if.thenLBB25_2399,10889 +.Lfunc_end25:Lfunc_end25404,11031 +main: # @mainmain411,11164 +.Lfunc_end26:Lfunc_end26417,11375 + +externals/binaryen/test/torture-s/va-arg-5.c.s,447 +va_double: # @va_doubleva_double7,229 +.LBB0_5: # %if.then15LBB0_566,2130 +.Lfunc_end0:Lfunc_end071,2274 +va_long_double: # @va_long_doubleva_long_double78,2453 +.LBB1_5: # %if.then15LBB1_5151,4946 +.Lfunc_end1:Lfunc_end1156,5090 +main: # @mainmain163,5239 +.Lfunc_end2:Lfunc_end2226,7188 + +externals/binaryen/test/torture-s/regstack-1.c.s,315 +main: # @mainmain7,211 +.LBB0_9: # %if.thenLBB0_9316,10776 +.Lfunc_end0:Lfunc_end0321,10918 +C:C329,11072 +U:U339,11269 +Y2:Y2349,11470 +Y1:Y1359,11674 +X:X369,11871 +Y:Y379,12047 +Z:Z389,12223 +T:T399,12399 +R:R409,12575 +S:S419,12751 + +externals/binaryen/test/torture-s/20020320-1.c.s,90 +main: # @mainmain7,211 +.Lfunc_end0:Lfunc_end014,398 + +externals/binaryen/test/torture-s/pr43438.c.s,106 +main: # @mainmain7,208 +.Lfunc_end0:Lfunc_end016,493 +g_9:g_922,619 + +externals/binaryen/test/torture-s/pr40657.c.s,350 +bar: # @barbar7,204 +.Lfunc_end0:Lfunc_end023,637 +foo: # @foofoo30,760 +.Lfunc_end1:Lfunc_end153,1453 +main: # @mainmain60,1580 +.LBB2_2: # %if.thenLBB2_273,1978 +.Lfunc_end2:Lfunc_end278,2120 +v:v86,2274 + +externals/binaryen/test/torture-s/20000314-3.c.s,90 +main: # @mainmain7,211 +.Lfunc_end0:Lfunc_end014,398 + +externals/binaryen/test/torture-s/930929-1.c.s,460 +sub1: # @sub1sub17,209 +.Lfunc_end0:Lfunc_end017,518 +sub2: # @sub2sub224,647 +.Lfunc_end1:Lfunc_end134,955 +sub3: # @sub3sub341,1084 +.Lfunc_end2:Lfunc_end248,1310 +sub4: # @sub4sub455,1439 +.Lfunc_end3:Lfunc_end362,1664 +main: # @mainmain69,1793 +.Lfunc_end4:Lfunc_end476,1982 + +externals/binaryen/test/torture-s/20040805-1.c.s,349 +main: # @mainmain7,211 +.LBB0_2: # %if.thenLBB0_219,583 +.Lfunc_end0:Lfunc_end024,725 +foo: # @foofoo29,825 +.Lfunc_end1:Lfunc_end145,1313 +bar: # @barbar50,1411 +.Lfunc_end2:Lfunc_end263,1790 +a:a71,1942 + +externals/binaryen/test/torture-s/pr52979-1.c.s,703 +foo: # @foofoo7,206 +.Lfunc_end0:Lfunc_end011,373 +bar: # @barbar18,496 +.LBB1_2: # %if.endLBB1_261,1762 +.Lfunc_end1:Lfunc_end165,1926 +baz: # @bazbaz72,2049 +.LBB2_2: # %bar.exitLBB2_2115,3317 +.Lfunc_end2:Lfunc_end2127,3711 +main: # @mainmain134,3838 +.LBB3_2: # %baz.exitLBB3_2178,5123 +.LBB3_4: # %if.thenLBB3_4200,5800 +.Lfunc_end3:Lfunc_end3205,5942 +a:a213,6096 +e:e226,6404 +d:d235,6565 +c:c244,6726 +b:b250,6849 + +externals/binaryen/test/torture-s/pr47925.c.s,403 +bar: # @barbar7,204 +.Lfunc_end0:Lfunc_end014,405 +foo: # @foofoo21,528 +.LBB1_2: # %for.bodyLBB1_231,858 +.LBB1_3: # %for.endLBB1_339,1170 +.Lfunc_end1:Lfunc_end145,1376 +main: # @mainmain52,1503 +.Lfunc_end2:Lfunc_end277,2260 + +externals/binaryen/test/torture-s/20100805-1.c.s,313 +foo: # @foofoo7,207 +.LBB0_2: # %for.bodyLBB0_217,524 +.LBB0_3: # %for.endLBB0_326,862 +.Lfunc_end0:Lfunc_end032,1068 +main: # @mainmain39,1195 +.Lfunc_end1:Lfunc_end145,1407 + +externals/binaryen/test/torture-s/pr42691.c.s,517 +add: # @addadd7,204 +.LBB0_2: # %if.endLBB0_223,671 +.LBB0_4: # %if.end10LBB0_437,1234 +.LBB0_5: # %if.then3LBB0_542,1377 +.Lfunc_end0:Lfunc_end047,1520 +main: # @mainmain54,1647 +.LBB1_1: # %if.end.iLBB1_172,2201 +.LBB1_4: # %if.then3.iLBB1_496,3033 +.Lfunc_end1:Lfunc_end1101,3178 + +externals/binaryen/test/torture-s/20080122-1.c.s,91 +main: # @mainmain7,211 +.Lfunc_end0:Lfunc_end090,1011 + +externals/binaryen/test/torture-s/20030920-1.c.s,90 +main: # @mainmain7,211 +.Lfunc_end0:Lfunc_end013,424 + +externals/binaryen/test/torture-s/unroll-1.c.s,175 +f: # @ff7,197 +.Lfunc_end0:Lfunc_end015,448 +main: # @mainmain22,571 +.Lfunc_end1:Lfunc_end129,763 + +externals/binaryen/test/torture-s/20051104-1.c.s,102 +main: # @mainmain7,211 +.Lfunc_end0:Lfunc_end019,571 +s:s27,722 + +externals/binaryen/test/torture-s/20050104-1.c.s,244 +foo: # @foofoo7,207 +.LBB0_2: # %if.thenLBB0_216,491 +.Lfunc_end0:Lfunc_end021,633 +main: # @mainmain28,760 +.Lfunc_end1:Lfunc_end134,971 + +externals/binaryen/test/torture-s/pr47299.c.s,245 +foo: # @foofoo7,204 +.Lfunc_end0:Lfunc_end015,459 +main: # @mainmain22,586 +.LBB1_2: # %if.thenLBB1_234,962 +.Lfunc_end1:Lfunc_end139,1104 + +externals/binaryen/test/torture-s/pr24716.c.s,5339 +f: # @ff7,201 +.LBB0_2:LBB0_223,619 +.LBB0_3: # =>This Inner Loop Header: Depth=1LBB0_326,690 +.LBB0_4: # in Loop: Header=BB0_3 Depth=1LBB0_481,2365 +.LBB0_6: # %if.end.threadLBB0_691,2759 +.LBB0_7: # %if.endLBB0_7102,3197 +.LBB0_9: # %while.cond.preheaderLBB0_9112,3621 +.LBB0_11: # %while.body.lr.phLBB0_11120,4015 +.LBB0_13: # %while.bodyLBB0_13127,4353 +.LBB0_15: # %do.body10.preheaderLBB0_15137,4800 +.LBB0_17: # %do.body10LBB0_17147,5223 +.LBB0_19: # %do.body11LBB0_19154,5552 +.LBB0_21: # %if.then13LBB0_21162,5931 +.LBB0_23: # %do.cond16LBB0_23171,6305 +.LBB0_25: # %do.cond19LBB0_25181,6732 +.LBB0_27: # %do.body22LBB0_27190,7141 +.LBB0_28: # %if.then28LBB0_28203,7616 +.LBB0_30: # %while.cond24LBB0_30213,8023 +.LBB0_32: # %while.body26LBB0_32221,8409 +.LBB0_33: # %do.cond33LBB0_33228,8732 +.LBB0_34: # %for.endLBB0_34235,9052 +.LBB0_35: # in Loop: Header=BB0_3 Depth=1LBB0_35238,9160 +.LBB0_36: # in Loop: Header=BB0_3 Depth=1LBB0_36242,9342 +.LBB0_37: # in Loop: Header=BB0_3 Depth=1LBB0_37246,9523 +.LBB0_38: # in Loop: Header=BB0_3 Depth=1LBB0_38250,9705 +.LBB0_39: # in Loop: Header=BB0_3 Depth=1LBB0_39254,9887 +.LBB0_40: # in Loop: Header=BB0_3 Depth=1LBB0_40258,10069 +.LBB0_41: # in Loop: Header=BB0_3 Depth=1LBB0_41262,10250 +.LBB0_42: # in Loop: Header=BB0_3 Depth=1LBB0_42266,10430 +.LBB0_43: # in Loop: Header=BB0_3 Depth=1LBB0_43270,10610 +.LBB0_44: # in Loop: Header=BB0_3 Depth=1LBB0_44274,10790 +.LBB0_45: # in Loop: Header=BB0_3 Depth=1LBB0_45278,10969 +.LBB0_46: # in Loop: Header=BB0_3 Depth=1LBB0_46282,11148 +.LBB0_47: # in Loop: Header=BB0_3 Depth=1LBB0_47286,11327 +.LBB0_48: # in Loop: Header=BB0_3 Depth=1LBB0_48290,11507 +.LBB0_49: # in Loop: Header=BB0_3 Depth=1LBB0_49294,11686 +.LBB0_50: # in Loop: Header=BB0_3 Depth=1LBB0_50298,11866 +.LBB0_51:LBB0_51302,12046 +.Lfunc_end0:Lfunc_end0305,12076 +main: # @mainmain312,12199 +.LBB1_2:LBB1_2329,12644 +.LBB1_3: # =>This Inner Loop Header: Depth=1LBB1_3332,12715 +.LBB1_4: # in Loop: Header=BB1_3 Depth=1LBB1_4374,14028 +.LBB1_6: # %if.end.thread.iLBB1_6385,14441 +.LBB1_7: # %if.end.iLBB1_7396,14881 +.LBB1_9: # %while.cond.preheader.iLBB1_9406,15308 +.LBB1_11: # %while.body.lr.ph.iLBB1_11414,15705 +.LBB1_13: # %while.body.iLBB1_13421,16046 +.LBB1_15: # %do.body10.iLBB1_15431,16496 +.LBB1_17: # %do.body11.iLBB1_17443,16975 +.LBB1_19: # %if.then13.iLBB1_19451,17357 +.LBB1_21: # %do.cond16.iLBB1_21460,17734 +.LBB1_23: # %do.cond33.iLBB1_23469,18134 +.LBB1_24: # %f.exitLBB1_24482,18636 +.LBB1_26: # %if.endLBB1_26490,19013 +.LBB1_27: # %if.thenLBB1_27494,19145 +.LBB1_28: # in Loop: Header=BB1_3 Depth=1LBB1_28498,19278 +.LBB1_29: # in Loop: Header=BB1_3 Depth=1LBB1_29502,19460 +.LBB1_30: # in Loop: Header=BB1_3 Depth=1LBB1_30506,19641 +.LBB1_31: # in Loop: Header=BB1_3 Depth=1LBB1_31510,19822 +.LBB1_32: # in Loop: Header=BB1_3 Depth=1LBB1_32514,20004 +.LBB1_33: # in Loop: Header=BB1_3 Depth=1LBB1_33518,20186 +.LBB1_34: # in Loop: Header=BB1_3 Depth=1LBB1_34522,20367 +.LBB1_35: # in Loop: Header=BB1_3 Depth=1LBB1_35526,20548 +.LBB1_36: # in Loop: Header=BB1_3 Depth=1LBB1_36530,20729 +.LBB1_37: # in Loop: Header=BB1_3 Depth=1LBB1_37534,20910 +.LBB1_38: # in Loop: Header=BB1_3 Depth=1LBB1_38538,21091 +.LBB1_39:LBB1_39542,21273 +.Lfunc_end1:Lfunc_end1545,21303 +Link:Link553,21469 +W:W562,21614 + +externals/binaryen/test/torture-s/pr58385.c.s,205 +foo: # @foofoo7,204 +.Lfunc_end0:Lfunc_end016,485 +main: # @mainmain23,612 +.Lfunc_end1:Lfunc_end132,895 +b:b40,1049 +a:a49,1210 + +externals/binaryen/test/torture-s/pr22429.c.s,175 +f: # @ff7,196 +.Lfunc_end0:Lfunc_end019,566 +main: # @mainmain26,689 +.Lfunc_end1:Lfunc_end132,901 + +externals/binaryen/test/torture-s/920618-1.c.s,90 +main: # @mainmain7,209 +.Lfunc_end0:Lfunc_end014,396 + +externals/binaryen/test/torture-s/991216-2.c.s,461 +test: # @testtest7,209 +.LBB0_2: # %for.body.preheaderLBB0_228,800 +.LBB0_3: # %for.bodyLBB0_331,923 +.LBB0_5: # %for.endLBB0_549,1607 +.LBB0_8: # %if.then11LBB0_879,2554 +.Lfunc_end0:Lfunc_end084,2698 +main: # @mainmain91,2827 +.Lfunc_end1:Lfunc_end1256,7635 + +externals/binaryen/test/torture-s/pr35800.c.s,511 +stab_xcoff_builtin_type: # @stab_xcoff_builtin_typestab_xcoff_builtin_type7,284 +.LBB0_3: # %sw.epilogLBB0_332,1039 +.LBB0_4: # %cleanupLBB0_435,1159 +.Lfunc_end0:Lfunc_end040,1357 +main: # @mainmain47,1524 +.LBB1_1: # %stab_xcoff_builtin_type.exitLBB1_153,1708 +.LBB1_4: # %if.then16LBB1_476,2519 +.Lfunc_end1:Lfunc_end181,2663 + +externals/binaryen/test/torture-s/20000707-1.c.s,404 +foo: # @foofoo7,207 +.LBB0_2: # %if.thenLBB0_216,493 +.Lfunc_end0:Lfunc_end021,635 +bar: # @barbar28,758 +.LBB1_2: # %if.then.iLBB1_238,1074 +.Lfunc_end1:Lfunc_end143,1218 +main: # @mainmain50,1345 +.Lfunc_end2:Lfunc_end276,2097 + +externals/binaryen/test/torture-s/950915-1.c.s,267 +f: # @ff7,197 +.Lfunc_end0:Lfunc_end020,608 +main: # @mainmain27,731 +.LBB1_2: # %if.endLBB1_245,1268 +.Lfunc_end1:Lfunc_end151,1439 +a:a59,1593 +b:b68,1761 + +externals/binaryen/test/torture-s/20031204-1.c.s,1278 +in_aton: # @in_atonin_aton7,223 +.Lfunc_end0:Lfunc_end014,459 +root_nfs_parse_addr: # @root_nfs_parse_addrroot_nfs_parse_addr21,654 +.LBB1_1: # %while.cond1.preheaderLBB1_128,876 +.LBB1_2: # %while.cond1LBB1_236,1178 +.LBB1_6:LBB1_691,3122 +.LBB1_7: # %lor.lhs.false.while.end25_crit_edgeLBB1_796,3250 +.LBB1_8: # %while.end25LBB1_8101,3453 +.LBB1_12: # %if.end41LBB1_12123,4193 +.LBB1_13: # %if.end43LBB1_13127,4356 +.Lfunc_end1:Lfunc_end1132,4555 +main: # @mainmain139,4714 +.LBB2_1: # %while.cond1.preheader.iLBB2_1145,4913 +.LBB2_2: # %while.cond1.iLBB2_2153,5217 +.LBB2_6:LBB2_6208,7172 +.LBB2_7: # %lor.lhs.false.i.while.end25.i_crit_edgeLBB2_7213,7301 +.LBB2_8: # %while.end25.iLBB2_8218,7508 +.LBB2_12: # %if.endLBB2_12239,8240 +.LBB2_13: # %if.thenLBB2_13245,8451 +.Lfunc_end2:Lfunc_end2250,8594 + +externals/binaryen/test/torture-s/20060930-1.c.s,469 +bar: # @barbar7,207 +.LBB0_2: # %if.thenLBB0_217,507 +.Lfunc_end0:Lfunc_end022,649 +foo: # @foofoo29,772 +.LBB1_2: # %for.bodyLBB1_249,1395 +.LBB1_3: # %for.endLBB1_357,1730 +.Lfunc_end1:Lfunc_end162,1905 +main: # @mainmain69,2032 +.Lfunc_end2:Lfunc_end278,2324 + +externals/binaryen/test/torture-s/920726-1.c.s,754 +first: # @firstfirst7,213 +.LBB0_1: # %for.condLBB0_120,602 +.LBB0_3: # %for.condLBB0_345,1496 +.LBB0_5: # %for.endLBB0_559,2034 +.Lfunc_end0:Lfunc_end071,2408 +second: # @secondsecond78,2547 +.LBB1_1: # %for.condLBB1_191,2937 +.LBB1_3: # %for.condLBB1_3116,3831 +.LBB1_5: # %for.endLBB1_5130,4369 +.Lfunc_end1:Lfunc_end1142,4743 +main: # @mainmain149,4876 +.LBB2_3: # %if.thenLBB2_3190,6216 +.Lfunc_end2:Lfunc_end2195,6358 + +externals/binaryen/test/torture-s/vrp-3.c.s,241 +f: # @ff7,194 +.LBB0_2: # %returnLBB0_227,756 +.Lfunc_end0:Lfunc_end032,953 +main: # @mainmain39,1076 +.Lfunc_end1:Lfunc_end147,1283 + +externals/binaryen/test/torture-s/20060110-2.c.s,281 +f: # @ff7,199 +.Lfunc_end0:Lfunc_end018,541 +main: # @mainmain25,664 +.LBB1_2: # %if.thenLBB1_245,1251 +.Lfunc_end1:Lfunc_end150,1393 +a:a58,1547 +b:b67,1726 +c:c76,1905 + +externals/binaryen/test/torture-s/20021120-3.c.s,182 +foo: # @foofoo7,207 +.Lfunc_end0:Lfunc_end034,1036 +main: # @mainmain41,1163 +.Lfunc_end1:Lfunc_end162,1767 + +externals/binaryen/test/torture-s/980618-1.c.s,246 +main: # @mainmain7,209 +.Lfunc_end0:Lfunc_end014,396 +func: # @funcfunc21,525 +.LBB1_2: # %if.elseLBB1_229,783 +.Lfunc_end1:Lfunc_end134,925 + +externals/binaryen/test/torture-s/20070212-3.c.s,246 +bar: # @barbar7,207 +.LBB0_2: # %if.end5LBB0_224,699 +.Lfunc_end0:Lfunc_end029,897 +main: # @mainmain36,1024 +.Lfunc_end1:Lfunc_end142,1236 + +externals/binaryen/test/torture-s/pr41395-1.c.s,246 +foo: # @foofoo7,206 +.Lfunc_end0:Lfunc_end026,763 +main: # @mainmain33,890 +.LBB1_2: # %if.thenLBB1_247,1334 +.Lfunc_end1:Lfunc_end152,1476 + +externals/binaryen/test/torture-s/20020413-1.c.s,412 +test: # @testtest7,211 +.LBB0_14: # %while.cond.preheaderLBB0_14141,5132 +.LBB0_25: # %if.end19LBB0_25229,8532 +.LBB0_26: # %while.body.10LBB0_26237,8777 +.Lfunc_end0:Lfunc_end0242,8925 +main: # @mainmain249,9054 +.Lfunc_end1:Lfunc_end1284,10130 + +externals/binaryen/test/torture-s/20030105-1.c.s,245 +foo: # @foofoo7,207 +.Lfunc_end0:Lfunc_end013,418 +main: # @mainmain20,545 +.LBB1_2: # %if.thenLBB1_232,916 +.Lfunc_end1:Lfunc_end137,1058 + +externals/binaryen/test/torture-s/20030903-1.c.s,323 +main: # @mainmain7,211 +.LBB0_2: # %entryLBB0_223,677 +.LBB0_3: # %sw.bb3LBB0_327,829 +.Lfunc_end0:Lfunc_end032,966 +y: # @yy37,1062 +.Lfunc_end1:Lfunc_end142,1204 +test:test48,1326 + +externals/binaryen/test/torture-s/20001009-1.c.s,114 +main: # @mainmain7,211 +.Lfunc_end0:Lfunc_end013,422 +a:a21,573 +b:b30,734 + +externals/binaryen/test/torture-s/pr40022.c.s,714 +foo: # @foofoo7,209 +.Lfunc_end0:Lfunc_end025,687 +bar: # @barbar32,810 +.LBB1_1: # %while.cond.while.cond_crit_edgeLBB1_141,1106 +.LBB1_2: # %while.endLBB1_249,1451 +.LBB1_3: # %while.cond2.while.cond2_crit_edgeLBB1_358,1728 +.LBB1_4: # %while.end6LBB1_466,2081 +.Lfunc_end1:Lfunc_end173,2319 +main: # @mainmain80,2446 +.LBB2_5: # %if.thenLBB2_5114,3543 +.Lfunc_end2:Lfunc_end2119,3685 +g:g127,3836 +f:f136,3968 +d:d145,4100 +e:e154,4232 + +externals/binaryen/test/torture-s/970923-1.c.s,265 +ts: # @tsts7,201 +.Lfunc_end0:Lfunc_end014,424 +tu: # @tutu21,541 +.Lfunc_end1:Lfunc_end128,764 +main: # @mainmain35,889 +.Lfunc_end2:Lfunc_end242,1076 + +externals/binaryen/test/torture-s/memset-1.c.s,1202 +main: # @mainmain7,214 +.LBB0_1: # %for.cond1.preheaderLBB0_112,387 +.LBB0_2: # %for.cond4.preheaderLBB0_226,1147 +.LBB0_4: # %for.body11LBB0_451,2355 +.LBB0_7: # %for.body22.preheaderLBB0_774,3360 +.LBB0_8: # %for.body22LBB0_878,3559 +.LBB0_20: # %for.body55LBB0_20169,7349 +.LBB0_23: # in Loop: Header=BB0_2 Depth=2LBB0_23193,8407 +.LBB0_24: # %for.body68.preheaderLBB0_24196,8542 +.LBB0_25: # %for.body68LBB0_25200,8741 +.LBB0_37: # %for.body100LBB0_37292,12572 +.LBB0_40: # in Loop: Header=BB0_2 Depth=2LBB0_40316,13636 +.LBB0_41: # %for.body113.preheaderLBB0_41319,13772 +.LBB0_42: # %for.body113LBB0_42323,13973 +.LBB0_55: # %if.then130LBB0_55427,18180 +.Lfunc_end0:Lfunc_end0432,18325 +A:A439,18467 +u:u446,18599 + +externals/binaryen/test/torture-s/va-arg-20.c.s,404 +foo: # @foofoo7,206 +.LBB0_2: # %if.thenLBB0_221,620 +.Lfunc_end0:Lfunc_end026,762 +bar: # @barbar33,885 +.LBB1_2: # %if.then.iLBB1_260,1687 +.Lfunc_end1:Lfunc_end165,1831 +main: # @mainmain72,1958 +.Lfunc_end2:Lfunc_end292,2504 + +externals/binaryen/test/torture-s/pr48571-1.c.s,462 +bar: # @barbar7,206 +.LBB0_1: # %for.bodyLBB0_113,385 +.Lfunc_end0:Lfunc_end032,1026 +main: # @mainmain39,1153 +.LBB1_1: # %for.bodyLBB1_144,1310 +.LBB1_3: # %for.body3LBB1_361,1843 +.LBB1_6: # %if.thenLBB1_684,2631 +.Lfunc_end1:Lfunc_end189,2773 +c:c97,2924 + +externals/binaryen/test/torture-s/pr59229.c.s,487 +bar: # @barbar7,204 +.LBB0_3: # %if.then3LBB0_338,1158 +.Lfunc_end0:Lfunc_end043,1301 +foo: # @foofoo50,1424 +.LBB1_2: # %returnLBB1_276,2226 +.Lfunc_end1:Lfunc_end184,2511 +main: # @mainmain91,2638 +.LBB2_1: # %for.bodyLBB2_199,2852 +.Lfunc_end2:Lfunc_end2119,3524 +i:i127,3675 + +externals/binaryen/test/torture-s/pr46309.c.s,328 +bar: # @barbar7,204 +.LBB0_3: # %if.endLBB0_330,931 +.LBB0_4: # %cond.trueLBB0_433,1032 +.Lfunc_end0:Lfunc_end038,1176 +main: # @mainmain45,1303 +.Lfunc_end1:Lfunc_end193,2613 +q:q101,2764 + +externals/binaryen/test/torture-s/991112-1.c.s,382 +rl_show_char: # @rl_show_charrl_show_char7,241 +.Lfunc_end0:Lfunc_end014,474 +rl_character_len: # @rl_character_lenrl_character_len21,667 +.Lfunc_end1:Lfunc_end131,1012 +main: # @mainmain38,1165 +.LBB2_3: # %if.then3LBB2_353,1674 +.Lfunc_end2:Lfunc_end258,1817 + +externals/binaryen/test/torture-s/loop-2b.c.s,323 +f: # @ff7,196 +.LBB0_2: # %for.bodyLBB0_223,673 +.LBB0_4: # %for.endLBB0_440,1319 +.Lfunc_end0:Lfunc_end046,1527 +main: # @mainmain53,1650 +.Lfunc_end1:Lfunc_end163,1929 +a:a71,2080 + +externals/binaryen/test/torture-s/20041201-1.c.s,346 +checkScc2: # @checkScc2checkScc27,231 +.LBB0_3: # %lor.endLBB0_335,1074 +.Lfunc_end0:Lfunc_end040,1272 +main: # @mainmain47,1411 +.LBB1_3: # %checkScc2.exitLBB1_376,2293 +.Lfunc_end1:Lfunc_end181,2498 +s:s88,2640 + +externals/binaryen/test/torture-s/pr35456.c.s,256 +not_fabs: # @not_fabsnot_fabs7,224 +.Lfunc_end0:Lfunc_end017,546 +main: # @mainmain24,683 +.LBB1_2: # %if.thenLBB1_237,1100 +.Lfunc_end1:Lfunc_end142,1242 + +externals/binaryen/test/torture-s/20010605-2.c.s,561 +main: # @mainmain7,211 +.Lfunc_end0:Lfunc_end014,401 +foo: # @foofoo21,526 +.LBB1_3: # %if.thenLBB1_336,1020 +.Lfunc_end1:Lfunc_end141,1162 +bar: # @barbar48,1285 +.LBB2_3: # %if.thenLBB2_363,1781 +.Lfunc_end2:Lfunc_end268,1923 +baz: # @bazbaz75,2046 +.LBB3_3: # %if.thenLBB3_398,2843 +.Lfunc_end3:Lfunc_end3103,2985 + +externals/binaryen/test/torture-s/20140425-1.c.s,264 +main: # @mainmain7,211 +.LBB0_2: # %if.thenLBB0_237,1100 +.Lfunc_end0:Lfunc_end042,1242 + .type set,@functiontype46,1321 +.Lfunc_end1:Lfunc_end154,1570 + .size set, .Lfunc_end1-setsize55,1583 + +externals/binaryen/test/torture-s/pr59413.c.s,114 +main: # @mainmain7,208 +.Lfunc_end0:Lfunc_end016,490 +a:a24,641 +b:b33,802 + +externals/binaryen/test/torture-s/980526-3.c.s,187 +compare: # @comparecompare7,221 +.Lfunc_end0:Lfunc_end014,458 +main: # @mainmain21,593 +.Lfunc_end1:Lfunc_end128,782 + +externals/binaryen/test/torture-s/pr36765.c.s,246 +foo: # @foofoo7,204 +.Lfunc_end0:Lfunc_end025,729 +main: # @mainmain32,856 +.LBB1_2: # %if.thenLBB1_244,1227 +.Lfunc_end1:Lfunc_end149,1369 + +externals/binaryen/test/torture-s/990525-2.c.s,278 +func1: # @func1func17,213 +.Lfunc_end0:Lfunc_end014,444 +func2: # @func2func221,579 +.Lfunc_end1:Lfunc_end130,895 +main: # @mainmain37,1026 +.Lfunc_end2:Lfunc_end244,1213 + +externals/binaryen/test/torture-s/960513-1.c.s,181 +f: # @ff7,197 +.Lfunc_end0:Lfunc_end0151,4844 +main: # @mainmain158,4967 +.Lfunc_end1:Lfunc_end1165,5155 + +externals/binaryen/test/torture-s/pr56250.c.s,90 +main: # @mainmain7,208 +.Lfunc_end0:Lfunc_end013,419 + +externals/binaryen/test/torture-s/930621-1.c.s,175 +f: # @ff7,197 +.Lfunc_end0:Lfunc_end013,406 +main: # @mainmain20,529 +.Lfunc_end1:Lfunc_end127,716 + +externals/binaryen/test/torture-s/pr42231.c.s,618 +main: # @mainmain7,213 +.LBB0_2: # %CallFunction.exitLBB0_218,590 +.LBB0_4: # %if.thenLBB0_429,946 +.Lfunc_end0:Lfunc_end034,1088 +CallFunctionRec: # @CallFunctionRecCallFunctionRec39,1212 +.LBB1_3:LBB1_360,1840 +.LBB1_4: # %returnLBB1_463,1910 +.Lfunc_end1:Lfunc_end168,2105 +storemax: # @storemaxstoremax73,2237 +.LBB2_2: # %if.endLBB2_284,2589 +.Lfunc_end2:Lfunc_end288,2753 +max:max94,2887 + +externals/binaryen/test/torture-s/941014-1.c.s,175 +f: # @ff7,197 +.Lfunc_end0:Lfunc_end015,440 +main: # @mainmain22,563 +.Lfunc_end1:Lfunc_end129,750 + +externals/binaryen/test/torture-s/pr44683.c.s,395 +copysign_bug: # @copysign_bugcopysign_bug7,240 +.LBB0_2: # %if.endLBB0_223,708 +.LBB0_3: # %returnLBB0_332,1001 +.Lfunc_end0:Lfunc_end037,1198 +main: # @mainmain44,1343 +.LBB1_2: # %if.thenLBB1_256,1728 +.Lfunc_end1:Lfunc_end161,1870 + +externals/binaryen/test/torture-s/pr34099-2.c.s,467 +test1: # @test1test17,214 +.Lfunc_end0:Lfunc_end014,445 +test2: # @test2test221,580 +.Lfunc_end1:Lfunc_end128,811 +test3: # @test3test335,946 +.Lfunc_end2:Lfunc_end242,1177 +test4: # @test4test449,1312 +.Lfunc_end3:Lfunc_end358,1597 +main: # @mainmain65,1728 +.Lfunc_end4:Lfunc_end471,1942 + +externals/binaryen/test/torture-s/20001228-1.c.s,340 +foo1: # @foo1foo17,211 +.Lfunc_end0:Lfunc_end013,422 +foo2: # @foo2foo220,551 +.Lfunc_end1:Lfunc_end134,983 +main: # @mainmain41,1112 +.LBB2_2: # %if.thenLBB2_263,1755 +.Lfunc_end2:Lfunc_end268,1897 + +externals/binaryen/test/torture-s/bitfld-6.c.s,90 +main: # @mainmain7,209 +.Lfunc_end0:Lfunc_end013,420 + +externals/binaryen/test/torture-s/990527-1.c.s,345 +g: # @gg7,197 +.Lfunc_end0:Lfunc_end017,508 +f: # @ff24,619 +.Lfunc_end1:Lfunc_end136,985 +main: # @mainmain43,1108 +.LBB2_2: # %if.thenLBB2_260,1595 +.Lfunc_end2:Lfunc_end265,1737 +sum:sum73,1896 + +externals/binaryen/test/torture-s/930718-1.c.s,177 +f2: # @f2f27,201 +.Lfunc_end0:Lfunc_end012,344 +main: # @mainmain19,469 +.Lfunc_end1:Lfunc_end126,664 + +externals/binaryen/test/torture-s/20071108-1.c.s,428 +foo: # @foofoo7,207 +.Lfunc_end0:Lfunc_end013,421 +bar: # @barbar20,544 +.Lfunc_end1:Lfunc_end126,754 +test: # @testtest33,881 +.Lfunc_end2:Lfunc_end244,1217 +main: # @mainmain51,1346 +.LBB3_5: # %if.thenLBB3_593,2758 +.Lfunc_end3:Lfunc_end398,2900 + +externals/binaryen/test/torture-s/20041218-1.c.s,762 +dummy1: # @dummy1dummy17,219 +.Lfunc_end0:Lfunc_end014,451 +dummy2: # @dummy2dummy221,592 +.Lfunc_end1:Lfunc_end129,800 +baz: # @bazbaz36,929 +.Lfunc_end2:Lfunc_end246,1259 +check: # @checkcheck53,1390 +.LBB3_6: # %if.thenLBB3_681,2376 +.Lfunc_end3:Lfunc_end386,2518 +foo: # @foofoo93,2645 +.LBB4_3: # %for.endLBB4_3121,3453 +.LBB4_4: # %cleanup2LBB4_4125,3593 +.Lfunc_end4:Lfunc_end4130,3792 +main: # @mainmain137,3919 +.Lfunc_end5:Lfunc_end5159,4533 + +externals/binaryen/test/torture-s/20040218-1.c.s,422 +xb: # @xbxb7,203 +.Lfunc_end0:Lfunc_end016,489 +xw: # @xwxw23,606 +.Lfunc_end1:Lfunc_end132,893 +yb: # @ybyb39,1010 +.Lfunc_end2:Lfunc_end252,1411 +main: # @mainmain59,1536 +.LBB3_4: # %if.thenLBB3_499,2836 +.Lfunc_end3:Lfunc_end3104,2978 + +externals/binaryen/test/torture-s/920909-1.c.s,241 +f: # @ff7,197 +.LBB0_2: # %returnLBB0_225,737 +.Lfunc_end0:Lfunc_end030,930 +main: # @mainmain37,1053 +.Lfunc_end1:Lfunc_end144,1241 + +externals/binaryen/test/torture-s/complex-1.c.s,449 +g0: # @g0g07,202 +.Lfunc_end0:Lfunc_end014,429 +g1: # @g1g121,546 +.Lfunc_end1:Lfunc_end128,774 +g2: # @g2g235,891 +.Lfunc_end2:Lfunc_end242,1118 +xcexp: # @xcexpxcexp49,1247 +.Lfunc_end3:Lfunc_end358,1546 +main: # @mainmain65,1677 +.Lfunc_end4:Lfunc_end472,1866 + +externals/binaryen/test/torture-s/20050613-1.c.s,247 +foo: # @foofoo7,207 +.LBB0_5: # %if.thenLBB0_526,898 +.Lfunc_end0:Lfunc_end031,1040 +main: # @mainmain38,1167 +.Lfunc_end1:Lfunc_end144,1383 + +externals/binaryen/test/torture-s/20060929-1.c.s,362 +foo: # @foofoo7,207 +.Lfunc_end0:Lfunc_end020,590 +bar: # @barbar27,713 +.Lfunc_end1:Lfunc_end140,1096 +baz: # @bazbaz47,1219 +.Lfunc_end2:Lfunc_end260,1602 +main: # @mainmain67,1729 +.Lfunc_end3:Lfunc_end373,1943 + +externals/binaryen/test/torture-s/pr51933.c.s,663 +foo: # @foofoo7,204 +.Lfunc_end0:Lfunc_end013,386 +bar: # @barbar20,509 +.LBB1_2: # %for.cond.preheaderLBB1_231,852 +.LBB1_4: # %for.bodyLBB1_440,1169 +.LBB1_5: # %for.endLBB1_564,1948 +.Lfunc_end1:Lfunc_end173,2234 +main: # @mainmain80,2361 +.LBB2_1: # %for.bodyLBB2_192,2739 +.LBB2_4: # %if.thenLBB2_4159,4725 +.Lfunc_end2:Lfunc_end2164,4867 +v1:v1169,4979 +v2:v2176,5114 +v3:v3183,5225 + +externals/binaryen/test/torture-s/980526-2.c.s,460 +do_mknod: # @do_mknoddo_mknod7,225 +.LBB0_2: # %if.elseLBB0_218,583 +.Lfunc_end0:Lfunc_end023,725 +getname: # @getnamegetname30,874 +.Lfunc_end1:Lfunc_end180,2353 +sys_mknod: # @sys_mknodsys_mknod87,2508 +.Lfunc_end2:Lfunc_end2101,2912 +main: # @mainmain108,3051 +.Lfunc_end3:Lfunc_end3117,3311 + +externals/binaryen/test/torture-s/991016-1.c.s,609 +doit: # @doitdoit7,209 +.LBB0_4: # %do.body11LBB0_427,846 +.LBB0_6: # %do.body.preheaderLBB0_643,1370 +.LBB0_7: # %do.bodyLBB0_746,1495 +.LBB0_9: # %do.body2.preheaderLBB0_962,2020 +.LBB0_10: # %do.body2LBB0_1065,2146 +.LBB0_12: # %sw.defaultLBB0_1281,2673 +.Lfunc_end0:Lfunc_end086,2818 +main: # @mainmain93,2947 +.Lfunc_end1:Lfunc_end1100,3136 + +externals/binaryen/test/torture-s/pr52209.c.s,181 +main: # @mainmain7,213 +.LBB0_2: # %if.thenLBB0_227,781 +.Lfunc_end0:Lfunc_end032,923 +c:c40,1074 +b:b49,1206 + +externals/binaryen/test/torture-s/pr56866.c.s,438 +main: # @mainmain7,208 +.LBB0_1: # %for.bodyLBB0_169,2037 +.LBB0_3: # %for.body16LBB0_391,2783 +.LBB0_5: # %for.body28LBB0_5113,3537 +.LBB0_7: # %for.body43LBB0_7139,4423 +.LBB0_17: # %if.then90LBB0_17225,7310 +.Lfunc_end0:Lfunc_end0230,7454 + +externals/binaryen/test/torture-s/920501-6.c.s,1655 +str2llu: # @str2llustr2llu7,226 +.LBB0_2: # %if.endLBB0_223,704 +.LBB0_3: # %for.endLBB0_341,1295 +.Lfunc_end0:Lfunc_end047,1503 +sqrtllu: # @sqrtllusqrtllu54,1650 +.LBB1_1: # %for.condLBB1_161,1835 +.LBB1_3: # %do.bodyLBB1_387,2664 +.Lfunc_end1:Lfunc_end1103,3247 +plist: # @plistplist110,3386 +.LBB2_2: # %for.cond.i.preheaderLBB2_2121,3753 +.LBB2_3: # %for.cond.iLBB2_3129,4174 +.LBB2_5: # %do.body.iLBB2_5157,5155 +.LBB2_8: # %for.body3LBB2_8182,6128 +.LBB2_10: # %for.endLBB2_10197,6792 +.LBB2_11: # %for.inc6LBB2_11204,7040 +.LBB2_12: # %for.end8LBB2_12212,7371 +.Lfunc_end2:Lfunc_end2222,7689 +main: # @mainmain229,7820 +.LBB3_1: # %for.cond.i.preheader.iLBB3_1243,8293 +.LBB3_2: # %for.cond.i.iLBB3_2251,8717 +.LBB3_4: # %do.body.i.iLBB3_4279,9704 +.LBB3_7: # %for.body3.iLBB3_7304,10686 +.LBB3_9: # %for.end.iLBB3_9319,11353 +.LBB3_10: # %for.inc6.iLBB3_10326,11604 +.LBB3_16: # %if.thenLBB3_16363,12938 +.Lfunc_end3:Lfunc_end3368,13081 + +externals/binaryen/test/torture-s/loop-2c.c.s,546 +f: # @ff7,196 +.LBB0_2: # %for.bodyLBB0_225,713 +.LBB0_3: # %for.endLBB0_337,1125 +.Lfunc_end0:Lfunc_end043,1333 +g: # @gg50,1444 +.LBB1_2: # %for.body.iLBB1_267,1935 +.LBB1_3: # %f.exitLBB1_379,2347 +.Lfunc_end1:Lfunc_end185,2554 +main: # @mainmain92,2677 +.Lfunc_end2:Lfunc_end2105,3011 +a:a113,3162 + +externals/binaryen/test/torture-s/20000910-2.c.s,246 +main: # @mainmain7,211 +.LBB0_3: # %if.then2.iLBB0_328,883 +.LBB0_4: # %if.else.iLBB0_432,1018 +.Lfunc_end0:Lfunc_end038,1190 +list:list57,1559 + +externals/binaryen/test/torture-s/20001130-1.c.s,90 +main: # @mainmain7,211 +.Lfunc_end0:Lfunc_end013,422 + +externals/binaryen/test/torture-s/switch-1.c.s,1212 +foo: # @foofoo7,205 +.LBB0_2: # %returnLBB0_225,744 +.Lfunc_end0:Lfunc_end030,938 +main: # @mainmain37,1065 +.LBB1_1: # %for.bodyLBB1_143,1238 +.LBB1_3: # %foo.exitLBB1_367,1991 +.LBB1_5: # %if.thenLBB1_585,2716 +.LBB1_6: # %if.else21LBB1_692,3031 +.LBB1_8: # %if.then5LBB1_8107,3662 +.LBB1_9: # %if.then11LBB1_9114,3978 +.LBB1_10: # %if.then17LBB1_10121,4295 +.LBB1_11: # %for.inc.threadLBB1_11127,4566 +.LBB1_12: # %if.then19LBB1_12133,4832 +.LBB1_13: # %for.endLBB1_13138,4976 +.LBB1_14: # %if.then3LBB1_14142,5108 +.LBB1_15: # %if.then23LBB1_15146,5241 +.LBB1_16: # %if.then7LBB1_16150,5375 +.LBB1_17: # %if.then13LBB1_17154,5508 +.Lfunc_end1:Lfunc_end1159,5652 + +externals/binaryen/test/torture-s/va-arg-21.c.s,248 +main: # @mainmain7,210 +.Lfunc_end0:Lfunc_end025,709 +doit: # @doitdoit30,811 +.LBB1_2: # %if.thenLBB1_249,1391 +.Lfunc_end1:Lfunc_end154,1533 + +externals/binaryen/test/torture-s/pr56899.c.s,709 +f1: # @f1f17,200 +.LBB0_2: # %if.thenLBB0_218,547 +.Lfunc_end0:Lfunc_end023,689 +f2: # @f2f230,806 +.LBB1_2: # %if.thenLBB1_241,1152 +.Lfunc_end1:Lfunc_end146,1294 +f3: # @f3f353,1411 +.LBB2_2: # %if.thenLBB2_264,1758 +.Lfunc_end2:Lfunc_end269,1900 +f4: # @f4f476,2017 +.LBB3_2: # %if.thenLBB3_287,2363 +.Lfunc_end3:Lfunc_end392,2505 +main: # @mainmain99,2630 +.Lfunc_end4:Lfunc_end4113,3051 + +externals/binaryen/test/torture-s/func-ptr-1.c.s,90 +main: # @mainmain7,211 +.Lfunc_end0:Lfunc_end014,399 + +externals/binaryen/test/torture-s/920829-1.c.s,182 +main: # @mainmain7,209 +.LBB0_2: # %if.thenLBB0_223,680 +.Lfunc_end0:Lfunc_end028,822 +c:c36,976 +c3:c345,1151 + +externals/binaryen/test/torture-s/cmpsf-1.c.s,906 +feq: # @feqfeq7,204 +.Lfunc_end0:Lfunc_end017,525 +fne: # @fnefne24,648 +.Lfunc_end1:Lfunc_end134,969 +flt: # @fltflt41,1092 +.Lfunc_end2:Lfunc_end251,1413 +fge: # @fgefge58,1536 +.Lfunc_end3:Lfunc_end372,1973 +fgt: # @fgtfgt79,2096 +.Lfunc_end4:Lfunc_end489,2417 +fle: # @flefle96,2540 +.Lfunc_end5:Lfunc_end5110,2977 +main: # @mainmain117,3104 +.LBB6_1: # %for.bodyLBB6_1123,3314 +.LBB6_2: # %for.body3LBB6_2135,3729 +.LBB6_11: # %if.then29LBB6_11235,7364 +.Lfunc_end6:Lfunc_end6240,7508 +args:args248,7674 +correct_results:correct_results264,8256 + +externals/binaryen/test/torture-s/20021120-2.c.s,210 +foo: # @foofoo7,207 +.Lfunc_end0:Lfunc_end019,566 +main: # @mainmain26,693 +.Lfunc_end1:Lfunc_end139,1027 +g1:g147,1182 +g2:g256,1349 + +externals/binaryen/test/torture-s/20070212-2.c.s,175 +f: # @ff7,199 +.Lfunc_end0:Lfunc_end015,466 +main: # @mainmain22,589 +.Lfunc_end1:Lfunc_end128,801 + +externals/binaryen/test/torture-s/20041124-1.c.s,261 +foo: # @foofoo7,207 +.Lfunc_end0:Lfunc_end015,473 +main: # @mainmain22,600 +.LBB1_3: # %if.thenLBB1_356,1660 +.Lfunc_end1:Lfunc_end161,1802 +gs:gs69,1960 + +externals/binaryen/test/torture-s/vrp-2.c.s,241 +f: # @ff7,194 +.LBB0_2: # %returnLBB0_225,699 +.Lfunc_end0:Lfunc_end030,894 +main: # @mainmain37,1017 +.Lfunc_end1:Lfunc_end145,1224 + +externals/binaryen/test/torture-s/20011008-3.c.s,915 +log_compare: # @log_comparelog_compare7,244 +.Lfunc_end0:Lfunc_end014,481 +__db_txnlist_lsnadd: # @__db_txnlist_lsnadd__db_txnlist_lsnadd21,684 +.LBB1_2:LBB1_239,1174 +.LBB1_3: # =>This Inner Loop Header: Depth=1LBB1_342,1244 +.LBB1_4: # %for.bodyLBB1_455,1694 +.LBB1_6: # %cond.falseLBB1_666,2135 +.LBB1_8: # %cond.endLBB1_873,2463 +.LBB1_10: # %for.end35LBB1_1081,2840 +.LBB1_11: # in Loop: Header=BB1_3 Depth=1LBB1_1190,3130 +.LBB1_12: # in Loop: Header=BB1_3 Depth=1LBB1_1294,3309 +.LBB1_13:LBB1_1398,3488 +.Lfunc_end1:Lfunc_end1101,3518 +main: # @mainmain108,3677 +.Lfunc_end2:Lfunc_end2115,3866 + +externals/binaryen/test/torture-s/941110-1.c.s,175 +f: # @ff7,197 +.Lfunc_end0:Lfunc_end014,419 +main: # @mainmain21,542 +.Lfunc_end1:Lfunc_end128,729 + +externals/binaryen/test/torture-s/930725-1.c.s,274 +g: # @gg7,197 +.Lfunc_end0:Lfunc_end013,410 +f: # @ff20,521 +.Lfunc_end1:Lfunc_end130,854 +main: # @mainmain37,977 +.Lfunc_end2:Lfunc_end247,1235 +v:v61,1503 + +externals/binaryen/test/torture-s/restrict-1.c.s,337 +foo: # @foofoo7,207 +.Lfunc_end0:Lfunc_end018,550 +bar: # @barbar25,673 +.LBB1_2: # %if.thenLBB1_241,1140 +.Lfunc_end1:Lfunc_end146,1282 +main: # @mainmain53,1409 +.Lfunc_end2:Lfunc_end259,1623 + +externals/binaryen/test/torture-s/pr59014.c.s,567 +foo: # @foofoo7,204 +.LBB0_1: # %for.incLBB0_124,682 +.LBB0_2: # %if.elseLBB0_228,889 +.Lfunc_end0:Lfunc_end036,1143 +main: # @mainmain43,1270 +.LBB1_1: # %for.inc.iLBB1_160,1755 +.LBB1_2: # %foo.exitLBB1_264,1964 +.LBB1_4: # %if.thenLBB1_476,2313 +.Lfunc_end1:Lfunc_end181,2455 +a:a89,2609 +b:b98,2770 +d:d107,2931 +c:c116,3092 + +externals/binaryen/test/torture-s/20060110-1.c.s,268 +f: # @ff7,199 +.Lfunc_end0:Lfunc_end017,507 +main: # @mainmain24,630 +.LBB1_2: # %if.thenLBB1_237,1022 +.Lfunc_end1:Lfunc_end142,1164 +a:a50,1318 +b:b59,1497 + +externals/binaryen/test/torture-s/20030222-1.c.s,275 +ll_to_int: # @ll_to_intll_to_int7,231 +.Lfunc_end0:Lfunc_end015,461 +main: # @mainmain22,600 +.LBB1_2: # %if.thenLBB1_248,1331 +.Lfunc_end1:Lfunc_end153,1473 +val:val61,1635 + +externals/binaryen/test/torture-s/pr40579.c.s,246 +main: # @mainmain7,208 +.Lfunc_end0:Lfunc_end021,627 +foo: # @foofoo26,727 +.LBB1_2: # %if.thenLBB1_235,1003 +.Lfunc_end1:Lfunc_end140,1145 + +externals/binaryen/test/torture-s/20060930-2.c.s,272 +bar: # @barbar7,207 +.Lfunc_end0:Lfunc_end019,559 +main: # @mainmain26,686 +.LBB1_2: # %if.thenLBB1_242,1157 +.Lfunc_end1:Lfunc_end147,1299 +s:s55,1450 +t:t64,1582 + +externals/binaryen/test/torture-s/pr41395-2.c.s,246 +foo: # @foofoo7,206 +.Lfunc_end0:Lfunc_end026,763 +main: # @mainmain33,890 +.LBB1_2: # %if.thenLBB1_247,1335 +.Lfunc_end1:Lfunc_end152,1477 + +externals/binaryen/test/torture-s/pr40747.c.s,179 +foo: # @foofoo7,204 +.Lfunc_end0:Lfunc_end017,517 +main: # @mainmain24,644 +.Lfunc_end1:Lfunc_end130,858 + +externals/binaryen/test/torture-s/20001009-2.c.s,461 +foo: # @foofoo7,207 +.LBB0_2: # %for.bodyLBB0_218,548 +.LBB0_3: # %if.endLBB0_331,956 +.Lfunc_end0:Lfunc_end037,1160 +main: # @mainmain44,1287 +.LBB1_2: # %for.body.iLBB1_255,1631 +.LBB1_3: # %foo.exitLBB1_368,2041 +.Lfunc_end1:Lfunc_end174,2246 +b:b82,2400 + +externals/binaryen/test/torture-s/20041126-1.c.s,530 +check: # @checkcheck7,215 +.LBB0_6: # %for.cond1LBB0_628,1000 +.LBB0_9: # %for.end10LBB0_950,1776 +.LBB0_10: # %if.thenLBB0_1053,1880 +.Lfunc_end0:Lfunc_end058,2022 +main: # @mainmain65,2153 +.LBB1_1: # %for.cond1.iLBB1_189,2880 +.LBB1_4: # %check.exitLBB1_4111,3665 +.Lfunc_end1:Lfunc_end1120,3983 + +externals/binaryen/test/torture-s/pr41317.c.s,90 +main: # @mainmain7,208 +.Lfunc_end0:Lfunc_end013,420 + +externals/binaryen/test/torture-s/memset-2.c.s,1778 +reset: # @resetreset7,218 +.Lfunc_end0:Lfunc_end015,510 +check: # @checkcheck22,645 +.LBB1_2: # %for.bodyLBB1_235,1004 +.LBB1_5:LBB1_559,1915 +.LBB1_6: # %for.body6.preheaderLBB1_665,2084 +.LBB1_7: # %for.body6LBB1_768,2208 +.LBB1_10: # %for.body19.preheaderLBB1_1085,2900 +.LBB1_19: # %if.then23LBB1_19128,4525 +.Lfunc_end1:Lfunc_end1133,4669 +main: # @mainmain140,4800 +.LBB2_1: # %for.bodyLBB2_1145,4968 +.LBB2_3: # %for.body18LBB2_3179,6063 +.LBB2_5: # %for.body44LBB2_5215,7254 +.LBB2_7: # %for.body70LBB2_7260,8698 +.LBB2_9: # %for.body96LBB2_9296,9936 +.LBB2_11: # %for.body122LBB2_11341,11431 +.LBB2_13: # %for.body148LBB2_13388,13025 +.LBB2_15: # %for.body174LBB2_15443,14843 +.LBB2_17: # %for.body200LBB2_17483,16224 +.LBB2_19: # %for.body226LBB2_19537,18016 +.LBB2_21: # %for.body252LBB2_21593,19909 +.LBB2_23: # %for.body278LBB2_23657,22027 +.LBB2_25: # %for.body304LBB2_25705,23663 +.LBB2_27: # %for.body330LBB2_27762,25561 +.LBB2_29: # %for.body356LBB2_29821,27557 +.Lfunc_end2:Lfunc_end2891,29827 +A:A898,29969 +u:u905,30101 + +externals/binaryen/test/torture-s/va-arg-23.c.s,248 +foo: # @foofoo7,206 +.LBB0_3: # %if.thenLBB0_337,1143 +.Lfunc_end0:Lfunc_end042,1285 +main: # @mainmain49,1412 +.Lfunc_end1:Lfunc_end175,2217 + +externals/binaryen/test/torture-s/pr49039.c.s,398 +foo: # @foofoo7,204 +.LBB0_4: # %if.end10LBB0_435,1084 +.LBB0_6: # %cleanupLBB0_647,1500 +.Lfunc_end0:Lfunc_end051,1665 +main: # @mainmain58,1792 +.LBB1_2: # %if.thenLBB1_273,2236 +.Lfunc_end1:Lfunc_end178,2378 +cnt:cnt86,2537 + +externals/binaryen/test/torture-s/pr31169.c.s,326 +sign_bit_p: # @sign_bit_psign_bit_p7,232 +.LBB0_2: # %if.elseLBB0_233,991 +.LBB0_3: # %if.endLBB0_345,1329 +.Lfunc_end0:Lfunc_end054,1652 +main: # @mainmain61,1793 +.Lfunc_end1:Lfunc_end167,2014 + +externals/binaryen/test/torture-s/pr60454.c.s,263 +fake_swap32: # @fake_swap32fake_swap327,236 +.Lfunc_end0:Lfunc_end031,953 +main: # @mainmain38,1096 +.LBB1_2: # %if.thenLBB1_250,1492 +.Lfunc_end1:Lfunc_end155,1634 + +externals/binaryen/test/torture-s/20000403-1.c.s,377 +main: # @mainmain7,211 +.LBB0_2: # %if.thenLBB0_225,740 +.Lfunc_end0:Lfunc_end030,882 +seqgt: # @seqgtseqgt37,1015 +.Lfunc_end1:Lfunc_end147,1338 +seqgt2: # @seqgt2seqgt254,1477 +.Lfunc_end2:Lfunc_end264,1801 +aa:aa72,1963 +bb:bb81,2140 + +externals/binaryen/test/torture-s/20011115-1.c.s,90 +main: # @mainmain7,211 +.Lfunc_end0:Lfunc_end014,398 + +externals/binaryen/test/torture-s/pr47148.c.s,102 +main: # @mainmain7,208 +.Lfunc_end0:Lfunc_end016,491 +b:b22,616 + +externals/binaryen/test/torture-s/pr56051.c.s,90 +main: # @mainmain7,208 +.Lfunc_end0:Lfunc_end013,419 + +externals/binaryen/test/torture-s/20051021-1.c.s,363 +foo1: # @foo1foo17,211 +.Lfunc_end0:Lfunc_end019,583 +foo2: # @foo2foo226,712 +.Lfunc_end1:Lfunc_end138,1084 +main: # @mainmain45,1213 +.LBB2_2: # %if.then6LBB2_261,1676 +.Lfunc_end2:Lfunc_end266,1819 +count:count74,1986 + +externals/binaryen/test/torture-s/20000313-1.c.s,183 +buggy: # @buggybuggy7,215 +.Lfunc_end0:Lfunc_end020,583 +main: # @mainmain27,714 +.Lfunc_end1:Lfunc_end133,927 + +externals/binaryen/test/torture-s/960802-1.c.s,460 +f1: # @f1f17,201 +.Lfunc_end0:Lfunc_end013,412 +f2: # @f2f220,529 +.Lfunc_end1:Lfunc_end126,747 +f3: # @f3f333,864 +.Lfunc_end2:Lfunc_end240,1092 +f4: # @f4f447,1209 +.Lfunc_end3:Lfunc_end354,1457 +main: # @mainmain61,1582 +.Lfunc_end4:Lfunc_end471,1852 +val:val79,2014 + +externals/binaryen/test/torture-s/20020614-1.c.s,90 +main: # @mainmain7,211 +.Lfunc_end0:Lfunc_end014,398 + +externals/binaryen/test/torture-s/20011128-1.c.s,90 +main: # @mainmain7,211 +.Lfunc_end0:Lfunc_end014,398 + +externals/binaryen/test/torture-s/pr58726.c.s,219 +foo: # @foofoo7,204 +.Lfunc_end0:Lfunc_end022,656 +main: # @mainmain29,783 +.Lfunc_end1:Lfunc_end141,1145 +a:a49,1296 +b:b58,1457 +c:c67,1589 + +externals/binaryen/test/torture-s/961004-1.c.s,169 +main: # @mainmain7,209 +.LBB0_2: # %for.inc.1LBB0_218,549 +.Lfunc_end0:Lfunc_end024,721 +k:k32,872 + +externals/binaryen/test/torture-s/pr32500.c.s,282 +foo: # @foofoo7,204 +.Lfunc_end0:Lfunc_end014,431 +bar: # @barbar21,554 +.Lfunc_end1:Lfunc_end127,726 +main: # @mainmain34,853 +.Lfunc_end2:Lfunc_end249,1255 +x:x57,1406 + +externals/binaryen/test/torture-s/990525-1.c.s,245 +die: # @diedie7,205 +.LBB0_2: # %if.thenLBB0_217,509 +.Lfunc_end0:Lfunc_end022,651 +main: # @mainmain29,778 +.Lfunc_end1:Lfunc_end150,1376 + +externals/binaryen/test/torture-s/20031003-1.c.s,265 +f1: # @f1f17,203 +.Lfunc_end0:Lfunc_end014,428 +f2: # @f2f221,545 +.Lfunc_end1:Lfunc_end128,770 +main: # @mainmain35,895 +.Lfunc_end2:Lfunc_end241,1106 + +externals/binaryen/test/torture-s/complex-3.c.s,175 +f: # @ff7,198 +.Lfunc_end0:Lfunc_end014,429 +main: # @mainmain21,552 +.Lfunc_end1:Lfunc_end128,740 + +externals/binaryen/test/torture-s/pr53465.c.s,448 +foo: # @foofoo7,204 +.LBB0_2: # %for.bodyLBB0_220,629 +.LBB0_5: # %for.condLBB0_537,1341 +.LBB0_6: # %for.endLBB0_648,1730 +.LBB0_7: # %if.then3LBB0_752,1842 +.Lfunc_end0:Lfunc_end057,1985 +main: # @mainmain64,2112 +.Lfunc_end1:Lfunc_end170,2330 + +externals/binaryen/test/torture-s/20000622-1.c.s,496 +foo: # @foofoo7,207 +.LBB0_4: # %if.thenLBB0_426,831 +.Lfunc_end0:Lfunc_end031,973 +bar: # @barbar38,1096 +.Lfunc_end1:Lfunc_end145,1327 +baz: # @bazbaz52,1450 +.LBB2_3: # %if.then.iLBB2_365,1886 +.Lfunc_end2:Lfunc_end270,2030 +main: # @mainmain77,2157 +.Lfunc_end3:Lfunc_end384,2344 + +externals/binaryen/test/torture-s/bswap-1.c.s,336 +g: # @gg7,196 +.Lfunc_end0:Lfunc_end048,1474 +f: # @ff55,1585 +.Lfunc_end1:Lfunc_end196,2863 +main: # @mainmain103,2986 +.LBB2_9: # %if.then35LBB2_9157,5090 +.Lfunc_end2:Lfunc_end2162,5234 + +externals/binaryen/test/torture-s/20000706-5.c.s,422 +bar: # @barbar7,207 +.LBB0_5: # %if.thenLBB0_535,1136 +.Lfunc_end0:Lfunc_end040,1278 +foo: # @foofoo47,1401 +.LBB1_5: # %if.then.iLBB1_573,2287 +.Lfunc_end1:Lfunc_end178,2431 +main: # @mainmain85,2558 +.Lfunc_end2:Lfunc_end2114,3363 +c:c122,3514 + +externals/binaryen/test/torture-s/960218-1.c.s,349 +g: # @gg7,197 +.Lfunc_end0:Lfunc_end016,468 +f: # @ff23,579 +.LBB1_2: # %while.endLBB1_236,988 +.Lfunc_end1:Lfunc_end141,1186 +main: # @mainmain48,1309 +.Lfunc_end2:Lfunc_end258,1572 +glob:glob66,1735 + +externals/binaryen/test/torture-s/941014-2.c.s,462 +a1: # @a1a17,201 +.Lfunc_end0:Lfunc_end012,381 +f: # @ff19,494 +.LBB1_2: # %if.endLBB1_243,1261 +.Lfunc_end1:Lfunc_end154,1629 +main: # @mainmain61,1752 +.LBB2_2: # %f.exitLBB2_285,2530 +.LBB2_4: # %if.thenLBB2_498,2933 +.Lfunc_end2:Lfunc_end2103,3075 + +externals/binaryen/test/torture-s/pr44858.c.s,362 +foo: # @foofoo7,204 +.Lfunc_end0:Lfunc_end015,471 +bar: # @barbar22,594 +.Lfunc_end1:Lfunc_end134,957 +main: # @mainmain41,1084 +.LBB2_2: # %if.thenLBB2_254,1475 +.Lfunc_end2:Lfunc_end259,1617 +a:a67,1771 +b:b76,1935 + +externals/binaryen/test/torture-s/pr34415.c.s,545 +foo: # @foofoo7,204 +.LBB0_1: # %for.condLBB0_114,444 +.LBB0_4: # %do.bodyLBB0_446,1625 +.LBB0_5: # %for.endLBB0_558,2126 +.LBB0_7: # %if.end22LBB0_770,2506 +.LBB0_8: # %cleanup.threadLBB0_873,2614 +.LBB0_9:LBB0_982,2951 +.Lfunc_end0:Lfunc_end085,2980 +main: # @mainmain92,3107 +.Lfunc_end1:Lfunc_end1101,3423 + +externals/binaryen/test/torture-s/20021024-1.c.s,363 +foo: # @foofoo7,207 +.Lfunc_end0:Lfunc_end011,374 +bar: # @barbar18,497 +.LBB1_1: # %topLBB1_136,1005 +.Lfunc_end1:Lfunc_end159,1730 +main: # @mainmain66,1857 +.Lfunc_end2:Lfunc_end299,2748 +cp:cp107,2903 +m:m116,3038 + +externals/binaryen/test/torture-s/991014-1.c.s,415 +union_size: # @union_sizeunion_size7,233 +.Lfunc_end0:Lfunc_end013,459 +struct_size: # @struct_sizestruct_size20,628 +.Lfunc_end1:Lfunc_end126,855 +struct_a_offset: # @struct_a_offsetstruct_a_offset33,1042 +.Lfunc_end2:Lfunc_end239,1273 +main: # @mainmain46,1424 +.Lfunc_end3:Lfunc_end352,1635 + +externals/binaryen/test/torture-s/20040307-1.c.s,90 +main: # @mainmain7,211 +.Lfunc_end0:Lfunc_end013,424 + +externals/binaryen/test/torture-s/bitfld-5.c.s,328 +g: # @gg7,197 +.LBB0_2: # %if.thenLBB0_217,466 +.Lfunc_end0:Lfunc_end022,608 +f: # @ff29,719 +.Lfunc_end1:Lfunc_end142,1096 +main: # @mainmain49,1219 +.Lfunc_end2:Lfunc_end279,2125 + +externals/binaryen/test/torture-s/20000523-1.c.s,90 +main: # @mainmain7,211 +.Lfunc_end0:Lfunc_end014,398 + +externals/binaryen/test/torture-s/pr38212.c.s,246 +foo: # @foofoo7,204 +.Lfunc_end0:Lfunc_end025,714 +main: # @mainmain32,841 +.LBB1_2: # %if.thenLBB1_260,1674 +.Lfunc_end1:Lfunc_end165,1816 + +externals/binaryen/test/torture-s/20030821-1.c.s,245 +foo: # @foofoo7,207 +.LBB0_2: # %if.thenLBB0_220,601 +.Lfunc_end0:Lfunc_end025,743 +main: # @mainmain32,870 +.Lfunc_end1:Lfunc_end138,1081 + +externals/binaryen/test/torture-s/960321-1.c.s,263 +acc_a: # @acc_aacc_a7,213 +.Lfunc_end0:Lfunc_end016,510 +main: # @mainmain23,641 +.LBB1_2: # %if.thenLBB1_236,1034 +.Lfunc_end1:Lfunc_end141,1176 +a:a48,1318 + +externals/binaryen/test/torture-s/bitfld-4.c.s,167 +main: # @mainmain7,209 +.LBB0_2: # %if.thenLBB0_219,576 +.Lfunc_end0:Lfunc_end024,718 +x:x32,872 + +externals/binaryen/test/torture-s/20010520-1.c.s,90 +main: # @mainmain7,211 +.Lfunc_end0:Lfunc_end014,398 + +externals/binaryen/test/torture-s/20000706-4.c.s,417 +bar: # @barbar7,207 +.LBB0_3: # %if.thenLBB0_323,710 +.Lfunc_end0:Lfunc_end028,852 +foo: # @foofoo35,975 +.LBB1_3: # %if.then.iLBB1_365,1881 +.Lfunc_end1:Lfunc_end170,2025 +main: # @mainmain77,2152 +.Lfunc_end2:Lfunc_end287,2420 +c:c95,2571 + +externals/binaryen/test/torture-s/920604-1.c.s,179 +mod: # @modmod7,205 +.Lfunc_end0:Lfunc_end014,439 +main: # @mainmain21,566 +.Lfunc_end1:Lfunc_end128,753 + +externals/binaryen/test/torture-s/pr20601-1.c.s,1380 +foo: # @foofoo7,206 +.LBB0_1: # %while.bodyLBB0_19,302 +.LBB0_2:LBB0_213,512 +.Lfunc_end0:Lfunc_end016,541 +bar: # @barbar23,664 +.Lfunc_end1:Lfunc_end130,893 +main: # @mainmain37,1020 +.LBB2_1: # %land.rhs.iLBB2_156,1521 +.LBB2_4: # %if.end.iLBB2_481,2419 +.LBB2_7: # %sw.bb21.iLBB2_7102,3233 +.LBB2_8: # %sw.epilog.iLBB2_8107,3456 +.LBB2_9: # %sw.bb.iLBB2_9112,3695 +.LBB2_11: # %sw.epilog.iLBB2_11132,4422 +.LBB2_12: # %while.end.iLBB2_12148,4971 +.LBB2_14: # %sw.bb22.iLBB2_14159,5380 +.LBB2_15: # %setup2.exitLBB2_15176,5896 +.LBB2_17: # %for.cond.iLBB2_17198,6552 +.LBB2_18: # %setup1.exitLBB2_18212,7045 +.LBB2_20: # %if.thenLBB2_20223,7441 +.LBB2_21: # %if.endLBB2_21227,7573 +.Lfunc_end2:Lfunc_end2233,7744 +g:g262,8268 +c:c274,8458 +b:b283,8591 +t:t298,8884 +a:a307,9022 +d:d316,9156 +e:e325,9317 +f:f334,9450 + +externals/binaryen/test/torture-s/complex-2.c.s,272 +f: # @ff7,198 +.Lfunc_end0:Lfunc_end020,599 +main: # @mainmain27,722 +.LBB1_3: # %if.thenLBB1_346,1323 +.Lfunc_end1:Lfunc_end151,1465 +ag:ag59,1623 +bg:bg69,1842 + +externals/binaryen/test/torture-s/pr59388.c.s,114 +main: # @mainmain7,208 +.Lfunc_end0:Lfunc_end021,622 +b:b29,773 +a:a38,905 + +externals/binaryen/test/torture-s/991030-1.c.s,166 +main: # @mainmain7,209 +.LBB0_2: # %if.endLBB0_219,576 +.Lfunc_end0:Lfunc_end025,745 +x:x33,899 + +externals/binaryen/test/torture-s/pr44468.c.s,457 +test1: # @test1test17,212 +.Lfunc_end0:Lfunc_end020,587 +test2: # @test2test227,722 +.Lfunc_end1:Lfunc_end140,1097 +test3: # @test3test347,1232 +.Lfunc_end2:Lfunc_end260,1607 +main: # @mainmain67,1738 +.LBB3_4: # %if.then7LBB3_4100,2833 +.Lfunc_end3:Lfunc_end3105,2976 +s:s113,3127 + +externals/binaryen/test/torture-s/frame-address.c.s,649 +check_fa_work: # @check_fa_workcheck_fa_work7,250 +.LBB0_2: # %if.thenLBB0_231,962 +.Lfunc_end0:Lfunc_end040,1277 +check_fa_mid: # @check_fa_midcheck_fa_mid47,1456 +.Lfunc_end1:Lfunc_end163,1963 +check_fa: # @check_facheck_fa70,2124 +.Lfunc_end2:Lfunc_end293,2831 +how_much: # @how_muchhow_much100,2984 +.Lfunc_end3:Lfunc_end3106,3199 +main: # @mainmain113,3336 +.LBB4_2: # %if.thenLBB4_2124,3672 +.Lfunc_end4:Lfunc_end4129,3814 + +externals/binaryen/test/torture-s/ifcvt-onecmpl-abs-1.c.s,245 +foo: # @foofoo7,216 +.Lfunc_end0:Lfunc_end016,500 +main: # @mainmain23,627 +.LBB1_2: # %if.thenLBB1_233,945 +.Lfunc_end1:Lfunc_end138,1087 + +externals/binaryen/test/torture-s/20020411-1.c.s,179 +foo: # @foofoo7,207 +.Lfunc_end0:Lfunc_end014,463 +main: # @mainmain21,590 +.Lfunc_end1:Lfunc_end128,778 + +externals/binaryen/test/torture-s/20081103-1.c.s,326 +foo: # @foofoo7,207 +.LBB0_2: # %if.thenLBB0_218,549 +.Lfunc_end0:Lfunc_end023,691 +main: # @mainmain30,818 +.LBB1_2: # %if.then.iLBB1_257,1629 +.Lfunc_end1:Lfunc_end162,1773 +A:A70,1927 + +externals/binaryen/test/torture-s/20000910-1.c.s,426 +main: # @mainmain7,211 +.Lfunc_end0:Lfunc_end014,398 +foo: # @foofoo21,523 +.Lfunc_end1:Lfunc_end126,704 +bar: # @barbar33,827 +.Lfunc_end2:Lfunc_end238,1008 +baz: # @bazbaz45,1131 +.LBB3_2: # %if.thenLBB3_253,1387 +.Lfunc_end3:Lfunc_end358,1529 + +externals/binaryen/test/torture-s/20001130-2.c.s,90 +main: # @mainmain7,211 +.Lfunc_end0:Lfunc_end014,398 + +externals/binaryen/test/torture-s/20050224-1.c.s,667 +foo: # @foofoo7,207 +.LBB0_4: # %if.thenLBB0_424,790 +.Lfunc_end0:Lfunc_end029,932 +main: # @mainmain36,1059 +.LBB1_2: # %for.bodyLBB1_261,1791 +.LBB1_4: # %if.elseLBB1_473,2269 +.LBB1_7: # %if.else6LBB1_788,2938 +.LBB1_8: # %for.incLBB1_893,3158 +.LBB1_13: # %if.then.iLBB1_13117,4044 +.Lfunc_end1:Lfunc_end1122,4188 +a:a130,4342 +b:b139,4513 +c:c148,4684 +d:d157,4855 +e:e166,5026 +f:f175,5197 + +externals/binaryen/test/torture-s/pr38819.c.s,230 +foo: # @foofoo7,204 +.Lfunc_end0:Lfunc_end013,376 +main: # @mainmain20,503 +.Lfunc_end1:Lfunc_end130,761 +a:a38,915 +b:b47,1076 +x:x56,1240 +r:r65,1404 + +externals/binaryen/test/torture-s/va-arg-22.c.s,3040 +bar: # @barbar7,206 +.LBB0_3: # %if.end3LBB0_330,916 +.LBB0_5: # %if.then7LBB0_547,1451 +.Lfunc_end0:Lfunc_end052,1594 +foo: # @foofoo59,1717 +.LBB1_4: # %if.end3.iLBB1_4108,3120 +.LBB1_44: # %if.end3.i417LBB1_44579,18942 +.LBB1_56: # %if.end3.i431LBB1_56750,24736 +.LBB1_67: # %for.body128LBB1_67929,30791 +.LBB1_70: # %if.end3.i445LBB1_70954,31744 +.LBB1_73: # %for.body140LBB1_731001,33352 +.LBB1_76: # %if.end3.i459LBB1_761026,34305 +.LBB1_79: # %for.body152LBB1_791081,36161 +.LBB1_82: # %if.end3.i473LBB1_821106,37114 +.LBB1_85: # %for.body164LBB1_851161,38983 +.LBB1_88: # %if.end3.i487LBB1_881186,39936 +.LBB1_91: # %for.body176LBB1_911249,42052 +.LBB1_94: # %if.end3.i501LBB1_941274,43005 +.LBB1_97: # %for.body188LBB1_971329,44868 +.LBB1_100: # %if.end3.i515LBB1_1001354,45821 +.LBB1_103: # %for.body200LBB1_1031391,47136 +.LBB1_106: # %if.end3.i529LBB1_1061416,48091 +.LBB1_109: # %for.body212LBB1_1091503,50975 +.LBB1_112: # %if.end3.i543LBB1_1121528,51930 +.LBB1_115: # %for.body224LBB1_1151563,53174 +.LBB1_118: # %if.end3.i557LBB1_1181588,54138 +.LBB1_121: # %for.body236LBB1_1211623,55413 +.LBB1_124: # %if.end3.i571LBB1_1241647,56357 +.LBB1_127: # %if.then7.i320LBB1_1271679,57525 +.LBB1_128: # %if.then7.i432LBB1_1281683,57664 +.LBB1_129: # %if.then7.i418LBB1_1291687,57802 +.LBB1_130: # %if.then7.i404LBB1_1301691,57940 +.LBB1_131: # %if.then7.i390LBB1_1311695,58078 +.LBB1_132: # %if.then7.i376LBB1_1321699,58216 +.LBB1_133: # %if.then7.i362LBB1_1331703,58354 +.LBB1_134: # %if.then7.i348LBB1_1341707,58492 +.LBB1_135: # %if.then7.i334LBB1_1351711,58630 +.Lfunc_end1:Lfunc_end11716,58778 +main: # @mainmain1723,58905 +.LBB2_1: # %for.body180LBB2_12003,66372 +.LBB2_3: # %for.body202LBB2_32067,68288 +.LBB2_5: # %for.body213LBB2_52085,68931 +.Lfunc_end2:Lfunc_end22435,79773 + +externals/binaryen/test/torture-s/memset-3.c.s,1828 +reset: # @resetreset7,218 +.Lfunc_end0:Lfunc_end015,510 +check: # @checkcheck22,645 +.LBB1_2: # %for.bodyLBB1_235,1004 +.LBB1_5:LBB1_559,1915 +.LBB1_6: # %for.body6.preheaderLBB1_665,2084 +.LBB1_7: # %for.body6LBB1_768,2208 +.LBB1_10: # %for.body19.preheaderLBB1_1085,2900 +.LBB1_19: # %if.then23LBB1_19128,4525 +.Lfunc_end1:Lfunc_end1133,4669 +main: # @mainmain140,4800 +.LBB2_1: # %for.bodyLBB2_1145,4958 +.LBB2_3: # %for.body6.iLBB2_3167,5864 +.LBB2_6: # %for.body19.preheader.iLBB2_6185,6677 +.LBB2_16: # %for.body6.i241LBB2_16246,9335 +.LBB2_19: # %for.body19.preheader.i249LBB2_19266,10225 +.LBB2_29: # %for.body6.i278LBB2_29326,12908 +.LBB2_32: # %for.body19.preheader.i286LBB2_32346,13804 +.LBB2_42: # %for.body13LBB2_42406,16431 +.LBB2_44: # %for.body33LBB2_44439,17598 +.LBB2_46: # %for.body53LBB2_46472,18765 +.LBB2_48: # %for.body73LBB2_48505,19932 +.LBB2_50: # %for.body93LBB2_50538,21099 +.LBB2_52: # %for.body113LBB2_52571,22267 +.LBB2_54: # %for.body133LBB2_54604,23436 +.LBB2_56: # %if.then23.i287LBB2_56639,24644 +.Lfunc_end2:Lfunc_end2644,24793 +A:A651,24935 +u:u658,25067 + +externals/binaryen/test/torture-s/20000217-1.c.s,188 +showbug: # @showbugshowbug7,223 +.Lfunc_end0:Lfunc_end024,748 +main: # @mainmain31,883 +.Lfunc_end1:Lfunc_end138,1071 + +externals/binaryen/test/torture-s/20050125-1.c.s,434 +seterr: # @seterrseterr7,219 +.Lfunc_end0:Lfunc_end015,472 +bracket_empty: # @bracket_emptybracket_empty22,641 +.LBB1_2: # %lor.lhs.falseLBB1_241,1217 +.LBB1_3: # %if.endLBB1_345,1363 +.Lfunc_end1:Lfunc_end149,1527 +main: # @mainmain56,1674 +.Lfunc_end2:Lfunc_end263,1905 + +externals/binaryen/test/torture-s/20070212-1.c.s,176 +g: # @gg7,199 +.Lfunc_end0:Lfunc_end026,757 +main: # @mainmain33,880 +.Lfunc_end1:Lfunc_end139,1092 + +externals/binaryen/test/torture-s/20021120-1.c.s,564 +foo: # @foofoo7,207 +.LBB0_2: # %for.bodyLBB0_280,3039 +.LBB0_3: # %for.endLBB0_3503,15122 +.Lfunc_end0:Lfunc_end0572,17104 +main: # @mainmain579,17231 +.LBB1_1: # %for.bodyLBB1_1587,17449 +.LBB1_3: # %for.body6LBB1_3612,18199 +.LBB1_7: # %if.thenLBB1_7645,19376 +.Lfunc_end1:Lfunc_end1650,19518 +gd:gd658,19673 +gf:gf667,19815 + +externals/binaryen/test/torture-s/vprintf-1.c.s,1137 +inner: # @innerinner7,214 +.LBB0_2: # %sw.bbLBB0_249,1590 +.LBB0_4: # %sw.bb4LBB0_463,2090 +.LBB0_6: # %sw.bb10LBB0_677,2596 +.LBB0_8: # %sw.bb16LBB0_891,3103 +.LBB0_10: # %sw.bb22LBB0_10104,3579 +.LBB0_12: # %sw.bb28LBB0_12118,4085 +.LBB0_14: # %sw.bb34LBB0_14132,4591 +.LBB0_16: # %sw.bb40LBB0_16146,5097 +.LBB0_18: # %sw.bb52LBB0_18159,5572 +.LBB0_20: # %sw.bb58LBB0_20173,6074 +.LBB0_21: # %sw.defaultLBB0_21184,6478 +.LBB0_22: # %sw.bb46LBB0_22188,6613 +.LBB0_23: # %sw.epilogLBB0_23199,7028 +.LBB0_24: # %if.then50LBB0_24206,7253 +.Lfunc_end0:Lfunc_end0211,7397 +main: # @mainmain218,7528 +.Lfunc_end1:Lfunc_end1288,9583 + +externals/binaryen/test/torture-s/pr27285.c.s,386 +foo: # @foofoo7,204 +.LBB0_2: # %while.bodyLBB0_221,638 +.LBB0_3: # %while.endLBB0_346,1447 +.Lfunc_end0:Lfunc_end051,1624 +main: # @mainmain58,1751 +.LBB1_5: # %if.thenLBB1_5137,4221 +.Lfunc_end1:Lfunc_end1142,4363 + +externals/binaryen/test/torture-s/20000726-1.c.s,191 +main: # @mainmain7,211 +.Lfunc_end0:Lfunc_end014,399 +adjust_xy: # @adjust_xyadjust_xy21,548 +.Lfunc_end1:Lfunc_end128,788 + +externals/binaryen/test/torture-s/vrp-1.c.s,175 +f: # @ff7,194 +.Lfunc_end0:Lfunc_end015,446 +main: # @mainmain22,569 +.Lfunc_end1:Lfunc_end130,776 + +externals/binaryen/test/torture-s/cmpdi-1.c.s,1295 +feq: # @feqfeq7,204 +.Lfunc_end0:Lfunc_end017,525 +fne: # @fnefne24,648 +.Lfunc_end1:Lfunc_end134,969 +flt: # @fltflt41,1092 +.Lfunc_end2:Lfunc_end251,1413 +fge: # @fgefge58,1536 +.Lfunc_end3:Lfunc_end368,1857 +fgt: # @fgtfgt75,1980 +.Lfunc_end4:Lfunc_end485,2301 +fle: # @flefle92,2424 +.Lfunc_end5:Lfunc_end5102,2745 +fltu: # @fltufltu109,2872 +.Lfunc_end6:Lfunc_end6119,3194 +fgeu: # @fgeufgeu126,3323 +.Lfunc_end7:Lfunc_end7136,3645 +fgtu: # @fgtufgtu143,3774 +.Lfunc_end8:Lfunc_end8153,4096 +fleu: # @fleufleu160,4225 +.Lfunc_end9:Lfunc_end9170,4547 +main: # @mainmain177,4676 +.LBB10_1: # %for.bodyLBB10_1183,4881 +.LBB10_2: # %for.body3LBB10_2195,5297 +.LBB10_15: # %if.then49LBB10_15333,10415 +.Lfunc_end10:Lfunc_end10338,10559 +args:args346,10727 +correct_results:correct_results362,11310 + +externals/binaryen/test/torture-s/980707-1.c.s,974 +buildargv: # @buildargvbuildargv7,234 +.LBB0_1: # %while.cond1LBB0_113,401 +.LBB0_3: # %while.cond1LBB0_328,1030 +.LBB0_5: # %while.cond7LBB0_547,1739 +.LBB0_7: # %if.end21LBB0_765,2489 +.LBB0_8: # %while.end23LBB0_874,2810 +.Lfunc_end0:Lfunc_end086,3206 +main: # @mainmain93,3345 +.LBB1_1: # %while.cond1.iLBB1_1112,3922 +.LBB1_3: # %while.cond1.iLBB1_3127,4557 +.LBB1_5: # %while.cond7.iLBB1_5142,5135 +.LBB1_8: # %if.end21.iLBB1_8161,5978 +.LBB1_9: # %buildargv.exitLBB1_9170,6301 +.LBB1_13: # %if.then10LBB1_13199,7332 +.Lfunc_end1:Lfunc_end1204,7477 + +externals/binaryen/test/torture-s/990211-1.c.s,181 +func: # @funcfunc7,209 +.Lfunc_end0:Lfunc_end012,391 +main: # @mainmain19,520 +.Lfunc_end1:Lfunc_end125,731 + +externals/binaryen/test/torture-s/20040820-1.c.s,410 +check: # @checkcheck7,215 +.LBB0_2: # %if.thenLBB0_216,493 +.Lfunc_end0:Lfunc_end021,635 +test: # @testtest28,766 +.LBB1_2: # %if.then.iLBB1_244,1243 +.Lfunc_end1:Lfunc_end149,1387 +main: # @mainmain56,1516 +.Lfunc_end2:Lfunc_end266,1785 + +externals/binaryen/test/torture-s/vrp-5.c.s,249 +test: # @testtest7,206 +.LBB0_4: # %if.then5LBB0_425,813 +.Lfunc_end0:Lfunc_end030,956 +main: # @mainmain37,1085 +.Lfunc_end1:Lfunc_end145,1291 + +externals/binaryen/test/torture-s/pr22493-1.c.s,175 +f: # @ff7,198 +.Lfunc_end0:Lfunc_end013,354 +main: # @mainmain20,477 +.Lfunc_end1:Lfunc_end128,690 + +externals/binaryen/test/torture-s/20030613-1.c.s,90 +main: # @mainmain7,211 +.Lfunc_end0:Lfunc_end013,423 + +externals/binaryen/test/torture-s/vprintf-chk-1.c.s,1300 +__vprintf_chk: # @__vprintf_chk__vprintf_chk7,250 +.LBB0_2: # %if.thenLBB0_221,710 +.Lfunc_end0:Lfunc_end026,852 +inner: # @innerinner33,1003 +.LBB1_2: # %sw.bbLBB1_274,2368 +.LBB1_6: # %sw.bb9LBB1_6103,3430 +.LBB1_10: # %sw.bb21LBB1_10132,4506 +.LBB1_14: # %sw.bb33LBB1_14161,5585 +.LBB1_18: # %sw.bb45LBB1_18188,6602 +.LBB1_22: # %sw.bb57LBB1_22217,7678 +.LBB1_26: # %sw.bb69LBB1_26246,8754 +.LBB1_30: # %sw.bb81LBB1_30275,9830 +.LBB1_34: # %sw.bb93LBB1_34302,10848 +.LBB1_38: # %sw.bb105LBB1_38331,11926 +.LBB1_42: # %sw.bb117LBB1_42360,13006 +.LBB1_45: # %sw.epilogLBB1_45387,14007 +.LBB1_46: # %sw.defaultLBB1_46394,14232 +.Lfunc_end1:Lfunc_end1399,14377 +main: # @mainmain406,14508 +.Lfunc_end2:Lfunc_end2476,16563 +should_optimize:should_optimize484,16770 + +externals/binaryen/test/torture-s/950605-1.c.s,241 +f: # @ff7,197 +.LBB0_2: # %if.thenLBB0_219,548 +.Lfunc_end0:Lfunc_end024,690 +main: # @mainmain31,813 +.Lfunc_end1:Lfunc_end138,1000 + +externals/binaryen/test/torture-s/20000503-1.c.s,179 +sub: # @subsub7,207 +.Lfunc_end0:Lfunc_end022,660 +main: # @mainmain29,787 +.Lfunc_end1:Lfunc_end136,975 + +externals/binaryen/test/torture-s/930526-1.c.s,175 +f: # @ff7,197 +.Lfunc_end0:Lfunc_end015,435 +main: # @mainmain22,558 +.Lfunc_end1:Lfunc_end129,745 + +externals/binaryen/test/torture-s/990604-1.c.s,384 +f: # @ff7,197 +.LBB0_2: # %if.endLBB0_217,530 +.Lfunc_end0:Lfunc_end021,694 +main: # @mainmain28,817 +.LBB1_3: # %if.endLBB1_346,1368 +.LBB1_4: # %if.thenLBB1_450,1499 +.Lfunc_end1:Lfunc_end155,1641 +b:b63,1792 + +externals/binaryen/test/torture-s/pr16790-1.c.s,90 +main: # @mainmain7,210 +.Lfunc_end0:Lfunc_end013,421 + +externals/binaryen/test/torture-s/va-arg-26.c.s,241 +f: # @ff7,198 +.Lfunc_end0:Lfunc_end029,864 +main: # @mainmain36,987 +.LBB1_2: # %if.endLBB1_257,1660 +.Lfunc_end1:Lfunc_end163,1829 + +externals/binaryen/test/torture-s/20021119-1.c.s,179 +foo: # @foofoo7,207 +.Lfunc_end0:Lfunc_end019,571 +main: # @mainmain26,698 +.Lfunc_end1:Lfunc_end132,910 + +externals/binaryen/test/torture-s/20120427-2.c.s,1202 +sreal_compare: # @sreal_comparesreal_compare7,247 +.LBB0_4: # %returnLBB0_437,1197 +.Lfunc_end0:Lfunc_end042,1394 +main: # @mainmain49,1541 +.LBB1_1: # %if.endLBB1_166,2030 +.LBB1_6: # %if.end.1LBB1_6109,3498 +.LBB1_9: # %land.lhs.true8LBB1_9126,4284 +.LBB1_11: # %land.lhs.true.1LBB1_11137,4795 +.LBB1_14: # %if.end14.1LBB1_14154,5587 +.LBB1_18: # %if.end.2LBB1_18176,6573 +.LBB1_21: # %land.lhs.true.2LBB1_21194,7376 +.LBB1_24: # %if.end14.2LBB1_24211,8167 +.LBB1_28: # %if.thenLBB1_28235,9123 +.LBB1_29: # %if.then13LBB1_29239,9255 +.LBB1_30: # %if.then21LBB1_30243,9389 +.LBB1_31: # %for.inc.2LBB1_31247,9523 +.LBB1_32: # %for.end25LBB1_32256,9882 +.Lfunc_end1:Lfunc_end1262,10090 +a:a270,10244 + +externals/binaryen/test/torture-s/pr25125.c.s,307 +f: # @ff7,196 +.LBB0_2: # %cleanupLBB0_222,617 +.Lfunc_end0:Lfunc_end028,844 +main: # @mainmain35,967 +.LBB1_2: # %if.thenLBB1_248,1369 +.Lfunc_end1:Lfunc_end153,1511 + +externals/binaryen/test/torture-s/931017-1.c.s,518 +main: # @mainmain7,209 +.Lfunc_end0:Lfunc_end014,396 +h1: # @h1h121,517 +.Lfunc_end1:Lfunc_end127,726 +h2: # @h2h234,843 +.LBB2_2: # %if.thenLBB2_245,1162 +.Lfunc_end2:Lfunc_end250,1304 +g: # @gg57,1417 +.Lfunc_end3:Lfunc_end364,1639 +f: # @ff71,1750 +.Lfunc_end4:Lfunc_end478,1974 +v:v86,2119 + +externals/binaryen/test/torture-s/loop-2d.c.s,323 +f: # @ff7,196 +.LBB0_2: # %for.bodyLBB0_224,685 +.LBB0_3: # %for.endLBB0_336,1095 +.Lfunc_end0:Lfunc_end042,1303 +main: # @mainmain49,1426 +.Lfunc_end1:Lfunc_end162,1760 +a:a70,1911 + +externals/binaryen/test/torture-s/pr34982.c.s,90 +main: # @mainmain7,208 +.Lfunc_end0:Lfunc_end013,419 + +externals/binaryen/test/torture-s/920501-1.c.s,254 +x: # @xx7,197 +.LBB0_2: # %if.endLBB0_224,694 +.Lfunc_end0:Lfunc_end029,887 +main: # @mainmain36,1010 +.Lfunc_end1:Lfunc_end146,1269 +s:s54,1420 + +externals/binaryen/test/torture-s/991228-1.c.s,375 +signbit: # @signbitsignbit7,221 +.Lfunc_end0:Lfunc_end030,910 +main: # @mainmain37,1045 +.LBB1_2: # %if.endLBB1_264,1869 +.LBB1_4: # %if.end2LBB1_479,2342 +.Lfunc_end1:Lfunc_end185,2514 +u:u93,2668 +endianness_test:endianness_test102,2897 + +externals/binaryen/test/torture-s/pr61306-2.c.s,265 +fake_bswap32: # @fake_bswap32fake_bswap327,242 +.Lfunc_end0:Lfunc_end030,944 +main: # @mainmain37,1089 +.LBB1_2: # %if.thenLBB1_249,1486 +.Lfunc_end1:Lfunc_end154,1628 + +externals/binaryen/test/torture-s/20020508-1.c.s,293 +main: # @mainmain7,211 +.LBB0_22: # %if.then187LBB0_22196,6920 +.Lfunc_end0:Lfunc_end0201,7065 +uc:uc208,7211 +us:us217,7381 +ui:ui226,7554 +ul:ul235,7727 +ull:ull244,7908 +shift1:shift1253,8110 +shift2:shift2262,8304 + +externals/binaryen/test/torture-s/20000722-1.c.s,335 +main: # @mainmain7,211 +.Lfunc_end0:Lfunc_end014,398 +bar: # @barbar21,523 +.Lfunc_end1:Lfunc_end125,693 +foo: # @foofoo32,816 +.LBB2_2: # %if.thenLBB2_246,1220 +.Lfunc_end2:Lfunc_end251,1362 + +externals/binaryen/test/torture-s/20050410-1.c.s,259 +foo: # @foofoo7,207 +.Lfunc_end0:Lfunc_end022,675 +main: # @mainmain29,802 +.LBB1_2: # %if.thenLBB1_241,1173 +.Lfunc_end1:Lfunc_end146,1315 +s:s54,1469 + +externals/binaryen/test/torture-s/pr38969.c.s,337 +foo: # @foofoo7,204 +.Lfunc_end0:Lfunc_end014,459 +bar: # @barbar21,582 +.Lfunc_end1:Lfunc_end149,1449 +main: # @mainmain56,1576 +.LBB2_3: # %if.thenLBB2_393,2744 +.Lfunc_end2:Lfunc_end298,2886 + +externals/binaryen/test/torture-s/20020225-1.c.s,179 +foo: # @foofoo7,207 +.Lfunc_end0:Lfunc_end016,504 +main: # @mainmain23,631 +.Lfunc_end1:Lfunc_end130,819 + +externals/binaryen/test/torture-s/pr25737.c.s,230 +time_enqueue: # @time_enqueuetime_enqueue7,240 +.Lfunc_end0:Lfunc_end017,557 +main: # @mainmain24,702 +.Lfunc_end1:Lfunc_end133,995 +Timer_Queue:Timer_Queue39,1137 + +externals/binaryen/test/torture-s/930406-1.c.s,175 +f: # @ff7,197 +.Lfunc_end0:Lfunc_end014,381 +main: # @mainmain21,504 +.Lfunc_end1:Lfunc_end127,667 + +externals/binaryen/test/torture-s/20071216-1.c.s,354 +bar: # @barbar7,207 +.Lfunc_end0:Lfunc_end014,445 +foo: # @foofoo21,568 +.Lfunc_end1:Lfunc_end137,1070 +main: # @mainmain44,1197 +.LBB2_4: # %if.then7LBB2_4102,3009 +.Lfunc_end2:Lfunc_end2107,3152 +x:x113,3274 + +externals/binaryen/test/torture-s/921110-1.c.s,102 +main: # @mainmain7,209 +.Lfunc_end0:Lfunc_end014,396 +f:f22,550 + +externals/binaryen/test/torture-s/conversion.c.s,3497 +u2f: # @u2fu2f7,207 +.Lfunc_end0:Lfunc_end014,440 +u2d: # @u2du2d21,563 +.Lfunc_end1:Lfunc_end128,796 +u2ld: # @u2ldu2ld35,923 +.Lfunc_end2:Lfunc_end261,1709 +s2f: # @s2fs2f68,1834 +.Lfunc_end3:Lfunc_end375,2067 +s2d: # @s2ds2d82,2190 +.Lfunc_end4:Lfunc_end489,2423 +s2ld: # @s2lds2ld96,2550 +.Lfunc_end5:Lfunc_end5122,3334 +fnear: # @fnearfnear129,3467 +.LBB6_2: # %lor.endLBB6_2145,3939 +.Lfunc_end6:Lfunc_end6150,4135 +dnear: # @dneardnear157,4270 +.LBB7_2: # %lor.endLBB7_2173,4746 +.Lfunc_end7:Lfunc_end7178,4942 +ldnear: # @ldnearldnear185,5081 +.LBB8_2: # %lor.endLBB8_2226,6420 +.Lfunc_end8:Lfunc_end8235,6739 +test_integer_to_float: # @test_integer_to_floattest_integer_to_float242,6940 +.Lfunc_end9:Lfunc_end9249,7192 +ull2f: # @ull2full2f256,7359 +.Lfunc_end10:Lfunc_end10263,7594 +ull2d: # @ull2dull2d270,7731 +.Lfunc_end11:Lfunc_end11277,7966 +ull2ld: # @ull2ldull2ld284,8107 +.Lfunc_end12:Lfunc_end12310,8895 +sll2f: # @sll2fsll2f317,9034 +.Lfunc_end13:Lfunc_end13324,9269 +sll2d: # @sll2dsll2d331,9406 +.Lfunc_end14:Lfunc_end14338,9641 +sll2ld: # @sll2ldsll2ld345,9782 +.Lfunc_end15:Lfunc_end15371,10568 +test_longlong_integer_to_float: # @test_longlong_integer_to_floattest_longlong_integer_to_float378,10807 +.Lfunc_end16:Lfunc_end16385,11065 +f2u: # @f2uf2u392,11244 +.Lfunc_end17:Lfunc_end17399,11475 +d2u: # @d2ud2u406,11600 +.Lfunc_end18:Lfunc_end18413,11831 +ld2u: # @ld2uld2u420,11960 +.Lfunc_end19:Lfunc_end19427,12217 +f2s: # @f2sf2s434,12344 +.Lfunc_end20:Lfunc_end20441,12575 +d2s: # @d2sd2s448,12700 +.Lfunc_end21:Lfunc_end21455,12931 +ld2s: # @ld2sld2s462,13060 +.Lfunc_end22:Lfunc_end22469,13314 +test_float_to_integer: # @test_float_to_integertest_float_to_integer476,13513 +.Lfunc_end23:Lfunc_end23483,13761 +f2ull: # @f2ullf2ull490,13930 +.Lfunc_end24:Lfunc_end24497,14163 +d2ull: # @d2ulld2ull504,14300 +.Lfunc_end25:Lfunc_end25511,14533 +ld2ull: # @ld2ullld2ull518,14674 +.Lfunc_end26:Lfunc_end26525,14933 +f2sll: # @f2sllf2sll532,15072 +.Lfunc_end27:Lfunc_end27539,15305 +d2sll: # @d2slld2sll546,15442 +.Lfunc_end28:Lfunc_end28553,15675 +ld2sll: # @ld2sllld2sll560,15816 +.Lfunc_end29:Lfunc_end29567,16072 +test_float_to_longlong_integer: # @test_float_to_longlong_integertest_float_to_longlong_integer574,16311 +.Lfunc_end30:Lfunc_end30581,16568 +main: # @mainmain588,16751 +.Lfunc_end31:Lfunc_end31595,16938 + +externals/binaryen/test/torture-s/20030224-2.c.s,130 +main: # @mainmain7,211 +.Lfunc_end0:Lfunc_end013,422 +node:node21,585 +node_p:node_p30,746 + +externals/binaryen/test/torture-s/string-opt-18.c.s,890 +test1: # @test1test17,218 +.Lfunc_end0:Lfunc_end012,401 +test2: # @test2test219,536 +.LBB1_2: # %if.thenLBB1_230,879 +.Lfunc_end1:Lfunc_end135,1021 +test3: # @test3test342,1156 +.Lfunc_end2:Lfunc_end247,1339 +test4: # @test4test454,1474 +.Lfunc_end3:Lfunc_end359,1657 +test5: # @test5test566,1792 +.Lfunc_end4:Lfunc_end471,1975 +test6: # @test6test678,2110 +.Lfunc_end5:Lfunc_end583,2293 +test7: # @test7test790,2428 +.Lfunc_end6:Lfunc_end695,2611 +main: # @mainmain102,2742 +.LBB7_2: # %if.then.iLBB7_2126,3465 +.Lfunc_end7:Lfunc_end7131,3609 + +externals/binaryen/test/torture-s/961122-2.c.s,175 +f: # @ff7,197 +.Lfunc_end0:Lfunc_end014,419 +main: # @mainmain21,542 +.Lfunc_end1:Lfunc_end128,730 + +externals/binaryen/test/torture-s/complex-6.c.s,1213 +ctest_float: # @ctest_floatctest_float7,238 +.Lfunc_end0:Lfunc_end017,555 +test_float: # @test_floattest_float24,722 +.Lfunc_end1:Lfunc_end128,897 +ctest_double: # @ctest_doublectest_double35,1070 +.Lfunc_end2:Lfunc_end245,1388 +test_double: # @test_doubletest_double52,1561 +.Lfunc_end3:Lfunc_end356,1737 +ctest_long_double: # @ctest_long_doublectest_long_double63,1932 +.Lfunc_end4:Lfunc_end4103,3151 +test_long_double: # @test_long_doubletest_long_double110,3354 +.Lfunc_end5:Lfunc_end5114,3535 +ctest_int: # @ctest_intctest_int121,3708 +.Lfunc_end6:Lfunc_end6132,4052 +test_int: # @test_inttest_int139,4207 +.Lfunc_end7:Lfunc_end7143,4380 +ctest_long_int: # @ctest_long_intctest_long_int150,4557 +.Lfunc_end8:Lfunc_end8161,4906 +test_long_int: # @test_long_inttest_long_int168,5091 +.Lfunc_end9:Lfunc_end9172,5269 +main: # @mainmain179,5416 +.Lfunc_end10:Lfunc_end10188,5701 +err:err196,5862 + +externals/binaryen/test/torture-s/951115-1.c.s,279 +g: # @gg7,197 +.Lfunc_end0:Lfunc_end017,494 +f: # @ff24,605 +.Lfunc_end1:Lfunc_end134,902 +main: # @mainmain41,1025 +.Lfunc_end2:Lfunc_end251,1286 +var:var59,1445 + +externals/binaryen/test/torture-s/20050121-1.c.s,2646 +foo_float: # @foo_floatfoo_float7,231 +.Lfunc_end0:Lfunc_end020,642 +bar_float: # @bar_floatbar_float27,801 +.Lfunc_end1:Lfunc_end134,1043 +baz_float: # @baz_floatbaz_float41,1202 +.Lfunc_end2:Lfunc_end248,1444 +foo_double: # @foo_doublefoo_double55,1607 +.Lfunc_end3:Lfunc_end368,2019 +bar_double: # @bar_doublebar_double75,2184 +.Lfunc_end4:Lfunc_end482,2436 +baz_double: # @baz_doublebaz_double89,2601 +.Lfunc_end5:Lfunc_end596,2853 +foo_ldouble_t: # @foo_ldouble_tfoo_ldouble_t103,3030 +.Lfunc_end6:Lfunc_end6146,4318 +bar_ldouble_t: # @bar_ldouble_tbar_ldouble_t153,4501 +.Lfunc_end7:Lfunc_end7164,4856 +baz_ldouble_t: # @baz_ldouble_tbaz_ldouble_t171,5039 +.Lfunc_end8:Lfunc_end8182,5394 +foo_char: # @foo_charfoo_char189,5557 +.Lfunc_end9:Lfunc_end9200,5902 +bar_char: # @bar_charbar_char207,6055 +.Lfunc_end10:Lfunc_end10214,6288 +baz_char: # @baz_charbaz_char221,6443 +.Lfunc_end11:Lfunc_end11228,6676 +foo_short: # @foo_shortfoo_short235,6835 +.Lfunc_end12:Lfunc_end12246,7185 +bar_short: # @bar_shortbar_short253,7346 +.Lfunc_end13:Lfunc_end13260,7581 +baz_short: # @baz_shortbaz_short267,7742 +.Lfunc_end14:Lfunc_end14274,7977 +foo_int: # @foo_intfoo_int281,8130 +.Lfunc_end15:Lfunc_end15292,8471 +bar_int: # @bar_intbar_int299,8620 +.Lfunc_end16:Lfunc_end16306,8851 +baz_int: # @baz_intbaz_int313,9000 +.Lfunc_end17:Lfunc_end17320,9231 +foo_long: # @foo_longfoo_long327,9384 +.Lfunc_end18:Lfunc_end18338,9726 +bar_long: # @bar_longbar_long345,9881 +.Lfunc_end19:Lfunc_end19352,10113 +baz_long: # @baz_longbaz_long359,10268 +.Lfunc_end20:Lfunc_end20366,10500 +foo_llong: # @foo_llongfoo_llong373,10659 +.Lfunc_end21:Lfunc_end21386,11068 +bar_llong: # @bar_llongbar_llong393,11229 +.Lfunc_end22:Lfunc_end22400,11462 +baz_llong: # @baz_llongbaz_llong407,11623 +.Lfunc_end23:Lfunc_end23414,11856 +main: # @mainmain421,11997 +.Lfunc_end24:Lfunc_end24427,12211 + +externals/binaryen/test/torture-s/pr41919.c.s,108 +main: # @mainmain7,208 +.Lfunc_end0:Lfunc_end013,419 +g_23:g_2321,582 + +externals/binaryen/test/torture-s/pr37125.c.s,253 +func_44: # @func_44func_447,220 +.LBB0_2: # %if.thenLBB0_223,701 +.Lfunc_end0:Lfunc_end028,843 +main: # @mainmain35,978 +.Lfunc_end1:Lfunc_end141,1189 + +externals/binaryen/test/torture-s/20010329-1.c.s,90 +main: # @mainmain7,211 +.Lfunc_end0:Lfunc_end014,398 + +externals/binaryen/test/torture-s/pr39120.c.s,348 +foo: # @foofoo7,204 +.Lfunc_end0:Lfunc_end014,430 +bar: # @barbar21,553 +.Lfunc_end1:Lfunc_end129,819 +main: # @mainmain36,946 +.LBB2_2: # %if.thenLBB2_268,1887 +.Lfunc_end2:Lfunc_end273,2029 +x:x81,2180 + +externals/binaryen/test/torture-s/20000112-1.c.s,90 +main: # @mainmain7,211 +.Lfunc_end0:Lfunc_end014,398 + +externals/binaryen/test/torture-s/20000914-1.c.s,368 +blah: # @blahblah7,211 +.Lfunc_end0:Lfunc_end014,438 +convert_like_real: # @convert_like_realconvert_like_real21,619 +.LBB1_2: # %sw.epilogLBB1_232,960 +.Lfunc_end1:Lfunc_end137,1104 +main: # @mainmain44,1259 +.Lfunc_end2:Lfunc_end258,1656 + +externals/binaryen/test/torture-s/20001112-1.c.s,90 +main: # @mainmain7,211 +.Lfunc_end0:Lfunc_end014,398 + +externals/binaryen/test/torture-s/pr32244-1.c.s,262 +test1: # @test1test17,214 +.LBB0_2: # %if.thenLBB0_219,575 +.Lfunc_end0:Lfunc_end024,717 +main: # @mainmain31,848 +.Lfunc_end1:Lfunc_end145,1233 +x:x53,1384 + +externals/binaryen/test/torture-s/ashrdi-1.c.s,5217 +main: # @mainmain7,209 +.LBB0_1: # %for.bodyLBB0_113,383 +.LBB0_4: # %for.body4LBB0_437,1220 +.LBB0_7: # %for.body16LBB0_759,2039 +.LBB0_10: # %for.body28LBB0_1081,2885 +.LBB0_13: # %if.then33LBB0_13105,3766 +.LBB0_14: # %if.thenLBB0_14109,3900 +.LBB0_15: # %if.then21LBB0_15113,4032 +.Lfunc_end0:Lfunc_end0118,4176 +constant_shift: # @constant_shiftconstant_shift123,4298 +.LBB1_2: # %sw.bb1LBB1_2260,9479 +.LBB1_3: # %sw.epilogLBB1_3264,9623 +.LBB1_4: # %sw.bb3LBB1_4267,9733 +.LBB1_5: # %sw.bb5LBB1_5272,9899 +.LBB1_6: # %sw.bb7LBB1_6277,10065 +.LBB1_7: # %sw.bb9LBB1_7282,10231 +.LBB1_8: # %sw.bb11LBB1_8287,10397 +.LBB1_9: # %sw.bb13LBB1_9292,10564 +.LBB1_10: # %sw.bb15LBB1_10297,10731 +.LBB1_11: # %sw.bb17LBB1_11302,10898 +.LBB1_12: # %sw.bb19LBB1_12307,11065 +.LBB1_13: # %sw.bb21LBB1_13312,11233 +.LBB1_14: # %sw.bb23LBB1_14317,11401 +.LBB1_15: # %sw.bb25LBB1_15322,11569 +.LBB1_16: # %sw.bb27LBB1_16327,11737 +.LBB1_17: # %sw.bb29LBB1_17332,11905 +.LBB1_18: # %sw.bb31LBB1_18337,12073 +.LBB1_19: # %sw.bb33LBB1_19342,12241 +.LBB1_20: # %sw.bb35LBB1_20347,12409 +.LBB1_21: # %sw.bb37LBB1_21352,12577 +.LBB1_22: # %sw.bb39LBB1_22357,12745 +.LBB1_23: # %sw.bb41LBB1_23362,12913 +.LBB1_24: # %sw.bb43LBB1_24367,13081 +.LBB1_25: # %sw.bb45LBB1_25372,13249 +.LBB1_26: # %sw.bb47LBB1_26377,13417 +.LBB1_27: # %sw.bb49LBB1_27382,13585 +.LBB1_28: # %sw.bb51LBB1_28387,13753 +.LBB1_29: # %sw.bb53LBB1_29392,13921 +.LBB1_30: # %sw.bb55LBB1_30397,14089 +.LBB1_31: # %sw.bb57LBB1_31402,14257 +.LBB1_32: # %sw.bb59LBB1_32407,14425 +.LBB1_33: # %sw.bb61LBB1_33412,14593 +.LBB1_34: # %sw.bb63LBB1_34417,14761 +.LBB1_35: # %sw.bb65LBB1_35422,14929 +.LBB1_36: # %sw.bb67LBB1_36427,15097 +.LBB1_37: # %sw.bb69LBB1_37432,15265 +.LBB1_38: # %sw.bb71LBB1_38437,15433 +.LBB1_39: # %sw.bb73LBB1_39442,15601 +.LBB1_40: # %sw.bb75LBB1_40447,15771 +.LBB1_41: # %sw.bb77LBB1_41452,15941 +.LBB1_42: # %sw.bb79LBB1_42457,16111 +.LBB1_43: # %sw.bb81LBB1_43462,16281 +.LBB1_44: # %sw.bb83LBB1_44467,16451 +.LBB1_45: # %sw.bb85LBB1_45472,16621 +.LBB1_46: # %sw.bb87LBB1_46477,16791 +.LBB1_47: # %sw.bb89LBB1_47482,16961 +.LBB1_48: # %sw.bb91LBB1_48487,17131 +.LBB1_49: # %sw.bb93LBB1_49492,17301 +.LBB1_50: # %sw.bb95LBB1_50497,17471 +.LBB1_51: # %sw.bb97LBB1_51502,17641 +.LBB1_52: # %sw.bb99LBB1_52507,17811 +.LBB1_53: # %sw.bb101LBB1_53512,17981 +.LBB1_54: # %sw.bb103LBB1_54517,18152 +.LBB1_55: # %sw.bb105LBB1_55522,18323 +.LBB1_56: # %sw.bb107LBB1_56527,18494 +.LBB1_57: # %sw.bb109LBB1_57532,18665 +.LBB1_58: # %sw.bb111LBB1_58537,18836 +.LBB1_59: # %sw.bb113LBB1_59542,19005 +.LBB1_60: # %sw.bb115LBB1_60547,19174 +.LBB1_61: # %sw.bb117LBB1_61552,19343 +.LBB1_62: # %sw.bb119LBB1_62557,19512 +.LBB1_63: # %sw.bb121LBB1_63562,19681 +.LBB1_64: # %sw.bb123LBB1_64567,19850 +.LBB1_65: # %sw.bb125LBB1_65572,20018 +.LBB1_66: # %sw.defaultLBB1_66577,20186 +.Lfunc_end1:Lfunc_end1582,20331 +zext:zext588,20483 +sext:sext658,23492 + +externals/binaryen/test/torture-s/990130-1.c.s,197 +main: # @mainmain7,209 +.LBB0_2: # %if.thenLBB0_230,819 +.Lfunc_end0:Lfunc_end035,961 +count:count43,1128 +dummy:dummy52,1313 + +externals/binaryen/test/torture-s/bitfld-1.c.s,90 +main: # @mainmain7,209 +.Lfunc_end0:Lfunc_end014,439 + +externals/binaryen/test/torture-s/20040223-1.c.s,240 +a: # @aa7,199 +.LBB0_2: # %if.thenLBB0_216,481 +.Lfunc_end0:Lfunc_end021,623 +main: # @mainmain28,746 +.Lfunc_end1:Lfunc_end134,957 + +externals/binaryen/test/torture-s/complex-7.c.s,1625 +check_float: # @check_floatcheck_float7,238 +.LBB0_11: # %if.thenLBB0_1173,2418 +.Lfunc_end0:Lfunc_end078,2560 +check_double: # @check_doublecheck_double85,2735 +.LBB1_11: # %if.thenLBB1_11151,4916 +.Lfunc_end1:Lfunc_end1156,5058 +check_long_double: # @check_long_doublecheck_long_double163,5255 +.LBB2_11: # %if.thenLBB2_11279,9062 +.Lfunc_end2:Lfunc_end2284,9204 +main: # @mainmain291,9359 +.Lfunc_end3:Lfunc_end3620,19014 +f1:f1628,19172 +f2:f2638,19406 +f3:f3648,19639 +f4:f4658,19865 +f5:f5668,20098 + .hidden d1 # @d1hidden673,20218 + .type d1,@objecttype674,20257 + .globl d1globl676,20309 +d1:d1678,20332 + .size d1, 16size681,20456 + .hidden d2 # @d2hidden683,20471 + .type d2,@objecttype684,20510 + .globl d2globl686,20562 +d2:d2688,20585 + .size d2, 16size691,20709 + .hidden d3 # @d3hidden693,20724 + .type d3,@objecttype694,20763 + .globl d3globl696,20815 +d3:d3698,20838 + .size d3, 16size701,20947 + .hidden d4 # @d4hidden703,20962 + .type d4,@objecttype704,21001 + .globl d4globl706,21053 +d4:d4708,21076 + .size d4, 16size711,21200 + .hidden d5 # @d5hidden713,21215 + .type d5,@objecttype714,21254 + .globl d5globl716,21306 +d5:d5718,21329 + .size d5, 16size721,21439 +ld1:ld1728,21572 +ld2:ld2740,21923 +ld3:ld3752,22274 +ld4:ld4764,22591 +ld5:ld5776,22942 + +externals/binaryen/test/torture-s/pr42544.c.s,90 +main: # @mainmain7,208 +.Lfunc_end0:Lfunc_end013,419 + +externals/binaryen/test/torture-s/20030717-1.c.s,312 +bar: # @barbar7,207 +.LBB0_1: # %do.bodyLBB0_130,890 +.LBB0_3: # %if.endLBB0_342,1366 +.Lfunc_end0:Lfunc_end075,2453 +main: # @mainmain82,2580 +.Lfunc_end1:Lfunc_end188,2794 + +externals/binaryen/test/torture-s/20020201-1.c.s,241 +main: # @mainmain7,211 +.LBB0_11: # %if.then55LBB0_1198,3220 +.Lfunc_end0:Lfunc_end0103,3364 +cx:cx110,3510 +sx:sx119,3679 +ix:ix128,3849 +lx:lx137,4020 +Lx:Lx146,4191 + +externals/binaryen/test/torture-s/20000706-1.c.s,411 +bar: # @barbar7,207 +.LBB0_11: # %if.thenLBB0_1157,2068 +.Lfunc_end0:Lfunc_end062,2210 +foo: # @foofoo69,2333 +.LBB1_6: # %if.then.iLBB1_699,3393 +.Lfunc_end1:Lfunc_end1104,3537 +main: # @mainmain111,3664 +.Lfunc_end2:Lfunc_end2145,4628 + +externals/binaryen/test/torture-s/950426-2.c.s,90 +main: # @mainmain7,209 +.Lfunc_end0:Lfunc_end014,396 + +externals/binaryen/test/torture-s/pr53688.c.s,288 +init: # @initinit7,208 +.Lfunc_end0:Lfunc_end022,713 +main: # @mainmain29,842 +.LBB1_2: # %if.thenLBB1_264,1903 +.Lfunc_end1:Lfunc_end169,2045 +p:p76,2184 +headline:headline91,2475 + +externals/binaryen/test/torture-s/ptr-arith-1.c.s,175 +f: # @ff7,200 +.Lfunc_end0:Lfunc_end016,485 +main: # @mainmain23,608 +.Lfunc_end1:Lfunc_end130,795 + +externals/binaryen/test/torture-s/pr36038.c.s,529 +doit: # @doitdoit7,208 +.LBB0_2: # %while.bodyLBB0_236,1102 +.LBB0_3: # %while.endLBB0_350,1590 +.Lfunc_end0:Lfunc_end055,1767 +main: # @mainmain62,1896 +.LBB1_2: # %if.thenLBB1_2116,3432 +.Lfunc_end1:Lfunc_end1121,3574 +expect:expect129,3748 +stack_base:stack_base147,4298 +markstack_ptr:markstack_ptr156,4497 +list:list165,4666 +indices:indices174,4830 + +externals/binaryen/test/torture-s/921029-1.c.s,245 +build: # @buildbuild7,213 +.Lfunc_end0:Lfunc_end029,861 +main: # @mainmain36,992 +.Lfunc_end1:Lfunc_end152,1426 +hpart:hpart60,1593 +lpart:lpart69,1778 +back:back78,1959 + +externals/binaryen/test/torture-s/pr49161.c.s,680 +bar: # @barbar7,204 +.LBB0_2: # %if.thenLBB0_223,653 +.Lfunc_end0:Lfunc_end028,795 +foo: # @foofoo35,918 +.LBB1_3: # %entryLBB1_357,1580 +.LBB1_5: # %if.then4LBB1_569,1977 +.LBB1_6: # %if.end5LBB1_673,2127 +.LBB1_7: # %returnLBB1_777,2275 +.Lfunc_end1:Lfunc_end181,2439 +main: # @mainmain88,2566 +.LBB2_2: # %if.thenLBB2_2102,2978 +.Lfunc_end2:Lfunc_end2107,3120 +c:c115,3271 + +externals/binaryen/test/torture-s/20080222-1.c.s,266 +foo: # @foofoo7,207 +.Lfunc_end0:Lfunc_end014,437 +main: # @mainmain21,564 +.LBB1_2: # %if.thenLBB1_233,933 +.Lfunc_end1:Lfunc_end138,1075 +space:space45,1233 + +externals/binaryen/test/torture-s/pr61306-3.c.s,195 +main: # @mainmain7,210 +.LBB0_2: # %if.thenLBB0_231,892 +.Lfunc_end0:Lfunc_end036,1034 +a:a44,1188 +c:c52,1340 +b:b61,1500 + +externals/binaryen/test/torture-s/980506-1.c.s,90 +main: # @mainmain7,209 +.Lfunc_end0:Lfunc_end014,396 + +externals/binaryen/test/torture-s/920812-1.c.s,175 +f: # @ff7,197 +.Lfunc_end0:Lfunc_end015,448 +main: # @mainmain22,571 +.Lfunc_end1:Lfunc_end129,759 + +externals/binaryen/test/torture-s/pr46909-1.c.s,313 +foo: # @foofoo7,206 +.Lfunc_end0:Lfunc_end026,773 +main: # @mainmain33,900 +.LBB1_1: # %for.bodyLBB1_138,1050 +.LBB1_4: # %if.thenLBB1_466,1974 +.Lfunc_end1:Lfunc_end171,2116 + +externals/binaryen/test/torture-s/loop-2e.c.s,181 +f: # @ff7,196 +.Lfunc_end0:Lfunc_end0130,3566 +main: # @mainmain137,3689 +.Lfunc_end1:Lfunc_end1143,3900 + +externals/binaryen/test/torture-s/950607-2.c.s,178 +f: # @ff7,197 +.Lfunc_end0:Lfunc_end043,1310 +main: # @mainmain50,1433 +.Lfunc_end1:Lfunc_end157,1621 + +externals/binaryen/test/torture-s/950621-1.c.s,243 +f: # @ff7,197 +.LBB0_3: # %land.endLBB0_325,741 +.Lfunc_end0:Lfunc_end030,938 +main: # @mainmain37,1061 +.Lfunc_end1:Lfunc_end144,1249 + +externals/binaryen/test/torture-s/20020321-1.c.s,261 +g: # @gg7,199 +.Lfunc_end0:Lfunc_end014,443 +f: # @ff21,554 +.Lfunc_end1:Lfunc_end128,793 +main: # @mainmain35,916 +.Lfunc_end2:Lfunc_end241,1127 + +externals/binaryen/test/torture-s/20040709-2.c.s,17724 +myrnd: # @myrndmyrnd7,215 +.Lfunc_end0:Lfunc_end026,796 +retmeA: # @retmeAretmeA33,935 +.Lfunc_end1:Lfunc_end140,1189 +fn1A: # @fn1Afn1A47,1322 +.Lfunc_end2:Lfunc_end260,1721 +fn2A: # @fn2Afn2A67,1850 +.Lfunc_end3:Lfunc_end382,2305 +retitA: # @retitAretitA89,2442 +.Lfunc_end4:Lfunc_end498,2743 +fn3A: # @fn3Afn3A105,2876 +.Lfunc_end5:Lfunc_end5128,3548 +testA: # @testAtestA135,3681 +.Lfunc_end6:Lfunc_end6186,5256 +retmeB: # @retmeBretmeB193,5395 +.Lfunc_end7:Lfunc_end7206,5836 +fn1B: # @fn1Bfn1B213,5969 +.Lfunc_end8:Lfunc_end8226,6368 +fn2B: # @fn2Bfn2B233,6497 +.Lfunc_end9:Lfunc_end9248,6952 +retitB: # @retitBretitB255,7089 +.Lfunc_end10:Lfunc_end10264,7390 +fn3B: # @fn3Bfn3B271,7525 +.Lfunc_end11:Lfunc_end11294,8197 +testB: # @testBtestB301,8332 +.Lfunc_end12:Lfunc_end12388,10999 +retmeC: # @retmeCretmeC395,11140 +.Lfunc_end13:Lfunc_end13408,11581 +fn1C: # @fn1Cfn1C415,11716 +.Lfunc_end14:Lfunc_end14428,12117 +fn2C: # @fn2Cfn2C435,12248 +.Lfunc_end15:Lfunc_end15450,12705 +retitC: # @retitCretitC457,12844 +.Lfunc_end16:Lfunc_end16466,13147 +fn3C: # @fn3Cfn3C473,13282 +.Lfunc_end17:Lfunc_end17496,13958 +testC: # @testCtestC503,14093 +.Lfunc_end18:Lfunc_end18590,16774 +retmeD: # @retmeDretmeD597,16915 +.Lfunc_end19:Lfunc_end19604,17163 +fn1D: # @fn1Dfn1D611,17298 +.Lfunc_end20:Lfunc_end20625,17728 +fn2D: # @fn2Dfn2D632,17859 +.Lfunc_end21:Lfunc_end21648,18345 +retitD: # @retitDretitD655,18484 +.Lfunc_end22:Lfunc_end22665,18811 +fn3D: # @fn3Dfn3D672,18946 +.Lfunc_end23:Lfunc_end23697,19694 +testD: # @testDtestD704,19829 +.Lfunc_end24:Lfunc_end24814,23205 +retmeE: # @retmeEretmeE821,23346 +.Lfunc_end25:Lfunc_end25834,23781 +fn1E: # @fn1Efn1E841,23916 +.Lfunc_end26:Lfunc_end26855,24348 +fn2E: # @fn2Efn2E862,24479 +.Lfunc_end27:Lfunc_end27878,24967 +retitE: # @retitEretitE885,25106 +.Lfunc_end28:Lfunc_end28895,25435 +fn3E: # @fn3Efn3E902,25570 +.Lfunc_end29:Lfunc_end29927,26322 +testE: # @testEtestE934,26457 +.Lfunc_end30:Lfunc_end301116,32151 +retmeF: # @retmeFretmeF1123,32292 +.Lfunc_end31:Lfunc_end311136,32727 +fn1F: # @fn1Ffn1F1143,32862 +.Lfunc_end32:Lfunc_end321157,33292 +fn2F: # @fn2Ffn2F1164,33423 +.Lfunc_end33:Lfunc_end331180,33909 +retitF: # @retitFretitF1187,34048 +.Lfunc_end34:Lfunc_end341197,34375 +fn3F: # @fn3Ffn3F1204,34510 +.Lfunc_end35:Lfunc_end351229,35258 +testF: # @testFtestF1236,35393 +.Lfunc_end36:Lfunc_end361418,41083 +retmeG: # @retmeGretmeG1425,41224 +.Lfunc_end37:Lfunc_end371438,41643 +fn1G: # @fn1Gfn1G1445,41778 +.Lfunc_end38:Lfunc_end381458,42174 +fn2G: # @fn2Gfn2G1465,42305 +.Lfunc_end39:Lfunc_end391480,42757 +retitG: # @retitGretitG1487,42896 +.Lfunc_end40:Lfunc_end401496,43196 +fn3G: # @fn3Gfn3G1503,43331 +.Lfunc_end41:Lfunc_end411526,43998 +testG: # @testGtestG1533,44133 +.Lfunc_end42:Lfunc_end421643,47517 +retmeH: # @retmeHretmeH1650,47658 +.Lfunc_end43:Lfunc_end431663,48099 +fn1H: # @fn1Hfn1H1670,48234 +.Lfunc_end44:Lfunc_end441681,48578 +fn2H: # @fn2Hfn2H1688,48709 +.Lfunc_end45:Lfunc_end451701,49109 +retitH: # @retitHretitH1708,49248 +.Lfunc_end46:Lfunc_end461715,49495 +fn3H: # @fn3Hfn3H1722,49630 +.Lfunc_end47:Lfunc_end471736,50055 +testH: # @testHtestH1743,50190 +.Lfunc_end48:Lfunc_end481859,53748 +retmeI: # @retmeIretmeI1866,53889 +.Lfunc_end49:Lfunc_end491879,54308 +fn1I: # @fn1Ifn1I1886,54443 +.Lfunc_end50:Lfunc_end501899,54838 +fn2I: # @fn2Ifn2I1906,54969 +.Lfunc_end51:Lfunc_end511921,55420 +retitI: # @retitIretitI1928,55559 +.Lfunc_end52:Lfunc_end521937,55859 +fn3I: # @fn3Ifn3I1944,55994 +.Lfunc_end53:Lfunc_end531967,56662 +testI: # @testItestI1974,56797 +.Lfunc_end54:Lfunc_end542084,60183 +retmeJ: # @retmeJretmeJ2091,60324 +.Lfunc_end55:Lfunc_end552098,60582 +fn1J: # @fn1Jfn1J2105,60717 +.Lfunc_end56:Lfunc_end562118,61111 +fn2J: # @fn2Jfn2J2125,61242 +.Lfunc_end57:Lfunc_end572140,61696 +retitJ: # @retitJretitJ2147,61835 +.Lfunc_end58:Lfunc_end582156,62136 +fn3J: # @fn3Jfn3J2163,62271 +.Lfunc_end59:Lfunc_end592186,62943 +testJ: # @testJtestJ2193,63078 +.LBB60_2: # %if.thenLBB60_22299,66316 +.Lfunc_end60:Lfunc_end602304,66458 +retmeK: # @retmeKretmeK2311,66599 +.Lfunc_end61:Lfunc_end612318,66847 +fn1K: # @fn1Kfn1K2325,66982 +.Lfunc_end62:Lfunc_end622336,67320 +fn2K: # @fn2Kfn2K2343,67451 +.Lfunc_end63:Lfunc_end632356,67845 +retitK: # @retitKretitK2363,67984 +.Lfunc_end64:Lfunc_end642372,68281 +fn3K: # @fn3Kfn3K2379,68416 +.Lfunc_end65:Lfunc_end652399,68993 +testK: # @testKtestK2406,69128 +.Lfunc_end66:Lfunc_end662475,71247 +retmeL: # @retmeLretmeL2482,71388 +.Lfunc_end67:Lfunc_end672489,71646 +fn1L: # @fn1Lfn1L2496,71781 +.Lfunc_end68:Lfunc_end682507,72119 +fn2L: # @fn2Lfn2L2514,72250 +.Lfunc_end69:Lfunc_end692527,72644 +retitL: # @retitLretitL2534,72783 +.Lfunc_end70:Lfunc_end702543,73080 +fn3L: # @fn3Lfn3L2550,73215 +.Lfunc_end71:Lfunc_end712570,73792 +testL: # @testLtestL2577,73927 +.LBB72_2: # %if.thenLBB72_22715,78168 +.Lfunc_end72:Lfunc_end722720,78310 +retmeM: # @retmeMretmeM2727,78451 +.Lfunc_end73:Lfunc_end732734,78709 +fn1M: # @fn1Mfn1M2741,78844 +.Lfunc_end74:Lfunc_end742752,79184 +fn2M: # @fn2Mfn2M2759,79315 +.Lfunc_end75:Lfunc_end752772,79711 +retitM: # @retitMretitM2779,79850 +.Lfunc_end76:Lfunc_end762788,80149 +fn3M: # @fn3Mfn3M2795,80284 +.Lfunc_end77:Lfunc_end772815,80865 +testM: # @testMtestM2822,81000 +.LBB78_2: # %if.thenLBB78_22959,85224 +.Lfunc_end78:Lfunc_end782964,85366 +retmeN: # @retmeNretmeN2971,85507 +.Lfunc_end79:Lfunc_end792978,85755 +fn1N: # @fn1Nfn1N2985,85890 +.Lfunc_end80:Lfunc_end802998,86283 +fn2N: # @fn2Nfn2N3005,86414 +.Lfunc_end81:Lfunc_end813020,86863 +retitN: # @retitNretitN3027,87002 +.Lfunc_end82:Lfunc_end823038,87354 +fn3N: # @fn3Nfn3N3045,87489 +.Lfunc_end83:Lfunc_end833071,88251 +testN: # @testNtestN3078,88386 +.LBB84_5: # %if.then106LBB84_53284,94950 +.Lfunc_end84:Lfunc_end843289,95095 +retmeO: # @retmeOretmeO3296,95236 +.Lfunc_end85:Lfunc_end853309,95671 +fn1O: # @fn1Ofn1O3316,95806 +.Lfunc_end86:Lfunc_end863327,96148 +fn2O: # @fn2Ofn2O3334,96279 +.Lfunc_end87:Lfunc_end873347,96677 +retitO: # @retitOretitO3354,96816 +.Lfunc_end88:Lfunc_end883363,97117 +fn3O: # @fn3Ofn3O3370,97252 +.Lfunc_end89:Lfunc_end893392,97903 +testO: # @testOtestO3399,98038 +.LBB90_5: # %if.then93LBB90_53669,106689 +.Lfunc_end90:Lfunc_end903674,106833 +retmeP: # @retmePretmeP3681,106974 +.Lfunc_end91:Lfunc_end913694,107409 +fn1P: # @fn1Pfn1P3701,107544 +.Lfunc_end92:Lfunc_end923712,107884 +fn2P: # @fn2Pfn2P3719,108015 +.Lfunc_end93:Lfunc_end933732,108411 +retitP: # @retitPretitP3739,108550 +.Lfunc_end94:Lfunc_end943748,108849 +fn3P: # @fn3Pfn3P3755,108984 +.Lfunc_end95:Lfunc_end953777,109631 +testP: # @testPtestP3784,109766 +.LBB96_5: # %if.then89LBB96_54054,118409 +.Lfunc_end96:Lfunc_end964059,118553 +retmeQ: # @retmeQretmeQ4066,118694 +.Lfunc_end97:Lfunc_end974079,119135 +fn1Q: # @fn1Qfn1Q4086,119270 +.Lfunc_end98:Lfunc_end984097,119614 +fn2Q: # @fn2Qfn2Q4104,119745 +.Lfunc_end99:Lfunc_end994117,120145 +retitQ: # @retitQretitQ4124,120284 +.Lfunc_end100:Lfunc_end1004133,120587 +fn3Q: # @fn3Qfn3Q4140,120724 +.Lfunc_end101:Lfunc_end1014160,121311 +testQ: # @testQtestQ4167,121448 +.Lfunc_end102:Lfunc_end1024292,125291 +retmeR: # @retmeRretmeR4299,125434 +.Lfunc_end103:Lfunc_end1034312,125875 +fn1R: # @fn1Rfn1R4319,126012 +.Lfunc_end104:Lfunc_end1044330,126353 +fn2R: # @fn2Rfn2R4337,126486 +.Lfunc_end105:Lfunc_end1054350,126883 +retitR: # @retitRretitR4357,127024 +.Lfunc_end106:Lfunc_end1064366,127324 +fn3R: # @fn3Rfn3R4373,127461 +.Lfunc_end107:Lfunc_end1074393,128045 +testR: # @testRtestR4400,128182 +.LBB108_2: # %if.then133LBB108_24527,132057 +.Lfunc_end108:Lfunc_end1084532,132202 +retmeS: # @retmeSretmeS4539,132345 +.Lfunc_end109:Lfunc_end1094552,132786 +fn1S: # @fn1Sfn1S4559,132923 +.Lfunc_end110:Lfunc_end1104570,133264 +fn2S: # @fn2Sfn2S4577,133397 +.Lfunc_end111:Lfunc_end1114590,133794 +retitS: # @retitSretitS4597,133935 +.Lfunc_end112:Lfunc_end1124606,134235 +fn3S: # @fn3Sfn3S4613,134372 +.Lfunc_end113:Lfunc_end1134633,134956 +testS: # @testStestS4640,135093 +.LBB114_2: # %if.then133LBB114_24767,138968 +.Lfunc_end114:Lfunc_end1144772,139113 +retmeT: # @retmeTretmeT4779,139256 +.Lfunc_end115:Lfunc_end1154786,139514 +fn1T: # @fn1Tfn1T4793,139651 +.Lfunc_end116:Lfunc_end1164804,139988 +fn2T: # @fn2Tfn2T4811,140121 +.Lfunc_end117:Lfunc_end1174824,140518 +retitT: # @retitTretitT4831,140659 +.Lfunc_end118:Lfunc_end1184840,140959 +fn3T: # @fn3Tfn3T4847,141096 +.Lfunc_end119:Lfunc_end1194867,141680 +testT: # @testTtestT4874,141817 +.LBB120_3: # %if.then139LBB120_34982,145146 +.Lfunc_end120:Lfunc_end1204987,145291 +retmeU: # @retmeUretmeU4994,145434 +.Lfunc_end121:Lfunc_end1215007,145875 +fn1U: # @fn1Ufn1U5014,146012 +.Lfunc_end122:Lfunc_end1225027,146408 +fn2U: # @fn2Ufn2U5034,146541 +.Lfunc_end123:Lfunc_end1235049,146993 +retitU: # @retitUretitU5056,147134 +.Lfunc_end124:Lfunc_end1245067,147489 +fn3U: # @fn3Ufn3U5074,147626 +.Lfunc_end125:Lfunc_end1255099,148357 +testU: # @testUtestU5106,148494 +.LBB126_6: # %if.then135LBB126_65347,156212 +.Lfunc_end126:Lfunc_end1265352,156357 +retmeV: # @retmeVretmeV5359,156500 +.Lfunc_end127:Lfunc_end1275366,156758 +fn1V: # @fn1Vfn1V5373,156895 +.Lfunc_end128:Lfunc_end1285386,157287 +fn2V: # @fn2Vfn2V5393,157420 +.Lfunc_end129:Lfunc_end1295406,157818 +retitV: # @retitVretitV5413,157959 +.Lfunc_end130:Lfunc_end1305422,158260 +fn3V: # @fn3Vfn3V5429,158397 +.Lfunc_end131:Lfunc_end1315454,159129 +testV: # @testVtestV5461,159266 +.LBB132_5: # %if.then141LBB132_55640,164960 +.Lfunc_end132:Lfunc_end1325645,165106 +retmeW: # @retmeWretmeW5652,165249 +.Lfunc_end133:Lfunc_end1335671,165865 +fn1W: # @fn1Wfn1W5678,166002 +.Lfunc_end134:Lfunc_end1345689,166345 +fn2W: # @fn2Wfn2W5696,166478 +.Lfunc_end135:Lfunc_end1355709,166877 +retitW: # @retitWretitW5716,167018 +.Lfunc_end136:Lfunc_end1365725,167320 +fn3W: # @fn3Wfn3W5732,167457 +.Lfunc_end137:Lfunc_end1375752,168044 +testW: # @testWtestW5759,168181 +.Lfunc_end138:Lfunc_end1385875,171748 +retmeX: # @retmeXretmeX5882,171891 +.Lfunc_end139:Lfunc_end1395901,172507 +fn1X: # @fn1Xfn1X5908,172644 +.Lfunc_end140:Lfunc_end1405919,172984 +fn2X: # @fn2Xfn2X5926,173117 +.Lfunc_end141:Lfunc_end1415939,173513 +retitX: # @retitXretitX5946,173654 +.Lfunc_end142:Lfunc_end1425955,173953 +fn3X: # @fn3Xfn3X5962,174090 +.Lfunc_end143:Lfunc_end1435982,174671 +testX: # @testXtestX5989,174808 +.Lfunc_end144:Lfunc_end1446105,178380 +retmeY: # @retmeYretmeY6112,178523 +.Lfunc_end145:Lfunc_end1456131,179139 +fn1Y: # @fn1Yfn1Y6138,179276 +.Lfunc_end146:Lfunc_end1466149,179616 +fn2Y: # @fn2Yfn2Y6156,179749 +.Lfunc_end147:Lfunc_end1476169,180145 +retitY: # @retitYretitY6176,180286 +.Lfunc_end148:Lfunc_end1486185,180585 +fn3Y: # @fn3Yfn3Y6192,180722 +.Lfunc_end149:Lfunc_end1496212,181303 +testY: # @testYtestY6219,181440 +.Lfunc_end150:Lfunc_end1506335,185012 +retmeZ: # @retmeZretmeZ6342,185155 +.Lfunc_end151:Lfunc_end1516361,185771 +fn1Z: # @fn1Zfn1Z6368,185908 +.Lfunc_end152:Lfunc_end1526381,186305 +fn2Z: # @fn2Zfn2Z6388,186438 +.Lfunc_end153:Lfunc_end1536403,186893 +retitZ: # @retitZretitZ6410,187034 +.Lfunc_end154:Lfunc_end1546419,187335 +fn3Z: # @fn3Zfn3Z6426,187472 +.Lfunc_end155:Lfunc_end1556442,187950 +testZ: # @testZtestZ6449,188087 +.LBB156_5: # %if.then120LBB156_56597,192820 +.Lfunc_end156:Lfunc_end1566602,192966 +main: # @mainmain6609,193101 +.Lfunc_end157:Lfunc_end1576642,193938 +sA:sA6657,194263 +sB:sB6666,194401 +sC:sC6675,194539 +sD:sD6684,194677 +sE:sE6693,194815 +sF:sF6702,194955 +sG:sG6710,195083 +sH:sH6719,195221 +sI:sI6727,195349 +sJ:sJ6736,195487 +sK:sK6745,195625 +sL:sL6754,195763 +sM:sM6763,195901 +sN:sN6772,196039 +sO:sO6781,196177 +sP:sP6790,196317 +sQ:sQ6799,196457 +sR:sR6808,196597 +sS:sS6817,196737 +sT:sT6826,196877 +sU:sU6835,197015 +sV:sV6844,197155 +sW:sW6853,197293 +sX:sX6862,197433 +sY:sY6871,197573 +sZ:sZ6880,197713 + +externals/binaryen/test/torture-s/pr42154.c.s,245 +foo: # @foofoo7,204 +.LBB0_2: # %if.thenLBB0_218,537 +.Lfunc_end0:Lfunc_end023,679 +main: # @mainmain30,806 +.Lfunc_end1:Lfunc_end138,1070 + +externals/binaryen/test/torture-s/930603-1.c.s,454 +fx: # @fxfx7,201 +.Lfunc_end0:Lfunc_end022,683 +main: # @mainmain29,808 +.Lfunc_end1:Lfunc_end136,995 +inita: # @initainita43,1128 +.Lfunc_end2:Lfunc_end249,1346 +initc: # @initcinitc56,1481 +.Lfunc_end3:Lfunc_end362,1697 +f: # @ff69,1816 +.Lfunc_end4:Lfunc_end476,2040 + +externals/binaryen/test/torture-s/921208-1.c.s,265 +f: # @ff7,202 +.Lfunc_end0:Lfunc_end014,428 +Int: # @IntInt21,547 +.Lfunc_end1:Lfunc_end128,789 +main: # @mainmain35,916 +.Lfunc_end2:Lfunc_end242,1104 + +externals/binaryen/test/torture-s/960301-1.c.s,221 +bar: # @barbar7,205 +.Lfunc_end0:Lfunc_end031,901 +main: # @mainmain38,1028 +.Lfunc_end1:Lfunc_end159,1595 +foo:foo67,1754 +oldfoo:oldfoo76,1910 + +externals/binaryen/test/torture-s/20070623-1.c.s,1090 +nge: # @ngenge7,207 +.Lfunc_end0:Lfunc_end017,526 +ngt: # @ngtngt24,649 +.Lfunc_end1:Lfunc_end134,968 +nle: # @nlenle41,1091 +.Lfunc_end2:Lfunc_end251,1410 +nlt: # @nltnlt58,1533 +.Lfunc_end3:Lfunc_end368,1852 +neq: # @neqneq75,1975 +.Lfunc_end4:Lfunc_end485,2294 +nne: # @nnenne92,2417 +.Lfunc_end5:Lfunc_end5102,2736 +ngeu: # @ngeungeu109,2863 +.Lfunc_end6:Lfunc_end6119,3183 +ngtu: # @ngtungtu126,3312 +.Lfunc_end7:Lfunc_end7136,3632 +nleu: # @nleunleu143,3761 +.Lfunc_end8:Lfunc_end8153,4081 +nltu: # @nltunltu160,4210 +.Lfunc_end9:Lfunc_end9170,4530 +main: # @mainmain177,4659 +.LBB10_21: # %if.then75LBB10_21304,9525 +.Lfunc_end10:Lfunc_end10309,9669 + +externals/binaryen/test/torture-s/pr20621-1.c.s,194 +foo: # @foofoo7,206 +.Lfunc_end0:Lfunc_end017,521 +main: # @mainmain24,648 +.Lfunc_end1:Lfunc_end134,973 +gb:gb42,1128 + +externals/binaryen/test/torture-s/vrp-4.c.s,249 +test: # @testtest7,206 +.LBB0_4: # %if.then5LBB0_425,814 +.Lfunc_end0:Lfunc_end030,957 +main: # @mainmain37,1086 +.Lfunc_end1:Lfunc_end144,1273 + +externals/binaryen/test/torture-s/pr51466.c.s,430 +foo: # @foofoo7,204 +.Lfunc_end0:Lfunc_end023,679 +bar: # @barbar30,802 +.Lfunc_end1:Lfunc_end149,1359 +baz: # @bazbaz56,1482 +.Lfunc_end2:Lfunc_end277,2086 +main: # @mainmain84,2213 +.LBB3_4: # %if.thenLBB3_4110,3089 +.Lfunc_end3:Lfunc_end3115,3231 + +externals/binaryen/test/torture-s/vrp-6.c.s,483 +test01: # @test01test017,214 +.LBB0_4: # %if.then5LBB0_425,823 +.Lfunc_end0:Lfunc_end030,966 +test02: # @test02test0237,1107 +.LBB1_3: # %if.end6LBB1_354,1669 +.LBB1_4: # %if.then4LBB1_457,1771 +.Lfunc_end1:Lfunc_end162,1914 +main: # @mainmain69,2047 +.Lfunc_end2:Lfunc_end277,2253 + +externals/binaryen/test/torture-s/20071011-1.c.s,244 +foo: # @foofoo7,207 +.LBB0_2: # %if.endLBB0_219,536 +.Lfunc_end0:Lfunc_end024,677 +main: # @mainmain31,804 +.Lfunc_end1:Lfunc_end137,1018 + +externals/binaryen/test/torture-s/980605-1.c.s,462 +f2: # @f2f27,201 +.Lfunc_end0:Lfunc_end027,773 +getval: # @getvalgetval34,906 +.Lfunc_end1:Lfunc_end148,1319 +f: # @ff55,1440 +.LBB2_2: # %if.thenLBB2_291,2529 +.Lfunc_end2:Lfunc_end296,2671 +main: # @mainmain103,2794 +.Lfunc_end3:Lfunc_end3111,3002 +x:x119,3156 +buf:buf127,3313 + +externals/binaryen/test/torture-s/921016-1.c.s,90 +main: # @mainmain7,209 +.Lfunc_end0:Lfunc_end014,396 + +externals/binaryen/test/torture-s/920810-1.c.s,175 +f: # @ff7,197 +.Lfunc_end0:Lfunc_end023,679 +main: # @mainmain30,802 +.Lfunc_end1:Lfunc_end137,990 + +externals/binaryen/test/torture-s/pr41463.c.s,269 +foo: # @foofoo7,204 +.Lfunc_end0:Lfunc_end026,759 +main: # @mainmain33,886 +.LBB1_2: # %if.thenLBB1_247,1334 +.Lfunc_end1:Lfunc_end152,1476 +global:global60,1647 + +externals/binaryen/test/torture-s/pr58640.c.s,308 +main: # @mainmain7,208 +.LBB0_3: # %for.cond4.preheader.split.iLBB0_328,854 +.LBB0_4: # %foo.exitLBB0_436,1112 +.Lfunc_end0:Lfunc_end042,1285 +d:d50,1439 +a:a59,1600 +b:b68,1761 +c:c77,1922 +e:e86,2083 + +externals/binaryen/test/torture-s/va-arg-19.c.s,269 +vafunction: # @vafunctionvafunction7,234 +.LBB0_10: # %if.then40LBB0_10105,3375 +.Lfunc_end0:Lfunc_end0110,3519 +main: # @mainmain117,3660 +.Lfunc_end1:Lfunc_end1149,4562 + +externals/binaryen/test/torture-s/930603-3.c.s,313 +f: # @ff7,197 +.LBB0_3: # %sw.epilogLBB0_326,740 +.LBB0_4: # %sw.defaultLBB0_431,910 +.Lfunc_end0:Lfunc_end036,1055 +main: # @mainmain43,1178 +.Lfunc_end1:Lfunc_end150,1366 + +externals/binaryen/test/torture-s/pr42142.c.s,248 +sort: # @sortsort7,208 +.Lfunc_end0:Lfunc_end022,662 +main: # @mainmain29,791 +.LBB1_2: # %if.thenLBB1_241,1163 +.Lfunc_end1:Lfunc_end146,1305 + +externals/binaryen/test/torture-s/strcmp-1.c.s,1370 +test: # @testtest7,214 +.LBB0_2: # %if.elseLBB0_220,640 +.LBB0_4: # %if.else6LBB0_426,888 +.LBB0_6: # %if.end12LBB0_636,1240 +.LBB0_7: # %if.then10LBB0_739,1343 +.Lfunc_end0:Lfunc_end044,1487 +main: # @mainmain51,1616 +.LBB1_1: # %for.cond1.preheaderLBB1_157,1818 +.LBB1_2: # %for.cond4.preheaderLBB1_266,2190 +.LBB1_3: # %for.cond7.preheaderLBB1_372,2522 +.LBB1_5: # in Loop: Header=BB1_3 Depth=3LBB1_592,3359 +.LBB1_6: # %for.body12.preheaderLBB1_699,3613 +.LBB1_7: # %for.cond17.preheaderLBB1_7105,3895 +.LBB1_9: # in Loop: Header=BB1_3 Depth=3LBB1_9129,4790 +.LBB1_10: # %for.body33.preheaderLBB1_10136,5045 +.LBB1_11: # %for.cond38.preheaderLBB1_11142,5327 +.LBB1_24: # %if.then.i189LBB1_24272,10248 +.LBB1_25: # %if.then10.i197LBB1_25276,10385 +.Lfunc_end1:Lfunc_end1281,10534 +u1:u1287,10658 +u2:u2294,10767 + +externals/binaryen/test/torture-s/loop-8.c.s,387 +bar: # @barbar7,203 +.LBB0_3: # %if.thenLBB0_319,619 +.Lfunc_end0:Lfunc_end024,761 +main: # @mainmain31,888 +.LBB1_3: # %eLBB1_368,2057 +.LBB1_4: # %for.cond.2LBB1_478,2350 +.Lfunc_end1:Lfunc_end189,2660 +a:a97,2814 + +externals/binaryen/test/torture-s/931004-8.c.s,444 +f: # @ff7,197 +.LBB0_2: # %for.bodyLBB0_231,886 +.LBB0_4: # %for.endLBB0_451,1602 +.LBB0_6: # %if.thenLBB0_664,2019 +.LBB0_7: # %if.then9LBB0_768,2151 +.Lfunc_end0:Lfunc_end073,2294 +main: # @mainmain80,2417 +.Lfunc_end1:Lfunc_end1101,3006 + +externals/binaryen/test/torture-s/931031-1.c.s,175 +f: # @ff7,197 +.Lfunc_end0:Lfunc_end021,621 +main: # @mainmain28,744 +.Lfunc_end1:Lfunc_end135,932 + +externals/binaryen/test/torture-s/loop-2g.c.s,308 +f: # @ff7,196 +.LBB0_2: # %for.endLBB0_221,651 +.Lfunc_end0:Lfunc_end026,847 +main: # @mainmain33,970 +.LBB1_2: # %if.end15LBB1_260,1836 +.Lfunc_end1:Lfunc_end166,2009 + +externals/binaryen/test/torture-s/920501-2.c.s,2422 +gcd_ll: # @gcd_llgcd_ll7,222 +.LBB0_2: # %if.endLBB0_216,504 +.LBB0_4: # %returnLBB0_430,1078 +.LBB0_5:LBB0_535,1223 +.Lfunc_end0:Lfunc_end041,1406 +powmod_ll: # @powmod_llpowmod_ll48,1559 +.LBB1_2: # %for.bodyLBB1_260,1914 +.LBB1_5: # %for.body4LBB1_578,2559 +.LBB1_7: # %for.inc9LBB1_795,3176 +.LBB1_9:LBB1_9107,3608 +.LBB1_10:LBB1_10111,3698 +.Lfunc_end1:Lfunc_end1116,3853 +facts: # @factsfacts123,3996 +.LBB2_1: # %for.bodyLBB2_1139,4506 +.LBB2_3: # %for.body.iLBB2_3160,5505 +.LBB2_6: # %for.body4.iLBB2_6185,6460 +.LBB2_8: # %for.inc9.iLBB2_8203,7161 +.LBB2_9: # in Loop: Header=BB2_1 Depth=1LBB2_9213,7570 +.LBB2_10: # %for.body.i114.preheaderLBB2_10217,7719 +.LBB2_11: # %for.body.i114LBB2_11224,7987 +.LBB2_14: # %for.body4.i125LBB2_14249,8951 +.LBB2_16: # %for.inc9.i131LBB2_16267,9665 +.LBB2_17: # in Loop: Header=BB2_1 Depth=1LBB2_17277,10079 +.LBB2_18: # %for.body.i88.preheaderLBB2_18281,10228 +.LBB2_19: # %for.body.i88LBB2_19288,10495 +.LBB2_22: # %for.body4.i99LBB2_22311,11435 +.LBB2_24: # %for.inc9.i105LBB2_24329,12153 +.LBB2_26: # %powmod_ll.exit107LBB2_26341,12626 +.LBB2_29: # %if.end.iLBB2_29372,13762 +.LBB2_31: # in Loop: Header=BB2_1 Depth=1LBB2_31389,14490 +.LBB2_32: # %gcd_ll.exitLBB2_32393,14640 +.LBB2_35: # %for.incLBB2_35415,15516 +.LBB2_36: # %cleanupLBB2_36424,15886 +.Lfunc_end2:Lfunc_end2429,16062 +main: # @mainmain436,16193 +.LBB3_4: # %if.thenLBB3_4466,17170 +.Lfunc_end3:Lfunc_end3471,17313 +factab:factab479,17484 + +externals/binaryen/test/torture-s/widechar-1.c.s,90 +main: # @mainmain7,211 +.Lfunc_end0:Lfunc_end014,398 + +externals/binaryen/test/torture-s/loop-3c.c.s,256 +f: # @ff7,196 +.LBB0_1: # %do.bodyLBB0_117,458 +.Lfunc_end0:Lfunc_end041,1249 +main: # @mainmain48,1372 +.Lfunc_end1:Lfunc_end170,1945 +a:a78,2096 + +externals/binaryen/test/torture-s/20120427-1.c.s,1202 +sreal_compare: # @sreal_comparesreal_compare7,247 +.LBB0_4: # %returnLBB0_437,1197 +.Lfunc_end0:Lfunc_end042,1394 +main: # @mainmain49,1541 +.LBB1_1: # %if.endLBB1_166,2030 +.LBB1_6: # %if.end.1LBB1_6109,3498 +.LBB1_9: # %land.lhs.true8LBB1_9126,4284 +.LBB1_11: # %land.lhs.true.1LBB1_11137,4795 +.LBB1_14: # %if.end14.1LBB1_14154,5587 +.LBB1_18: # %if.end.2LBB1_18176,6573 +.LBB1_21: # %land.lhs.true.2LBB1_21194,7376 +.LBB1_24: # %if.end14.2LBB1_24211,8167 +.LBB1_28: # %if.thenLBB1_28235,9123 +.LBB1_29: # %if.then13LBB1_29239,9255 +.LBB1_30: # %if.then21LBB1_30243,9389 +.LBB1_31: # %for.inc.2LBB1_31247,9523 +.LBB1_32: # %for.end25LBB1_32256,9882 +.Lfunc_end1:Lfunc_end1262,10090 +a:a270,10244 + +externals/binaryen/test/torture-s/980506-3.c.s,124 +main: # @mainmain7,209 +.Lfunc_end0:Lfunc_end019,551 +lookup_table:lookup_table27,746 + +externals/binaryen/test/torture-s/pr61306-1.c.s,265 +fake_bswap32: # @fake_bswap32fake_bswap327,242 +.Lfunc_end0:Lfunc_end028,886 +main: # @mainmain35,1031 +.LBB1_2: # %if.thenLBB1_247,1424 +.Lfunc_end1:Lfunc_end152,1566 + +externals/binaryen/test/torture-s/pr59358.c.s,709 +foo: # @foofoo7,209 +.LBB0_3: # %while.condLBB0_322,678 +.LBB0_5:LBB0_534,1092 +.LBB0_6:LBB0_638,1184 +.Lfunc_end0:Lfunc_end043,1338 +main: # @mainmain50,1465 +.LBB1_1: # %for.bodyLBB1_166,1948 +.LBB1_4: # %if.else10LBB1_4100,3130 +.LBB1_5: # %if.end15LBB1_5108,3440 +.LBB1_6: # %if.end18LBB1_6113,3681 +.LBB1_9: # %if.end34LBB1_9138,4616 +.LBB1_12: # %if.then36LBB1_12164,5496 +.Lfunc_end1:Lfunc_end1169,5640 + +externals/binaryen/test/torture-s/20020508-2.c.s,283 +main: # @mainmain7,211 +.LBB0_22: # %if.then187LBB0_22222,7766 +.Lfunc_end0:Lfunc_end0227,7911 +c:c234,8053 +s:s243,8217 +i:i252,8384 +l:l261,8551 +ll:ll270,8726 +shift1:shift1279,8926 +shift2:shift2288,9120 + +externals/binaryen/test/torture-s/20020225-2.c.s,90 +main: # @mainmain7,211 +.Lfunc_end0:Lfunc_end014,398 + +externals/binaryen/test/torture-s/20090207-1.c.s,180 +foo: # @foofoo7,207 +.Lfunc_end0:Lfunc_end027,789 +main: # @mainmain34,916 +.Lfunc_end1:Lfunc_end140,1128 + +externals/binaryen/test/torture-s/20030715-1.c.s,490 +ap_check_cmd_context: # @ap_check_cmd_contextap_check_cmd_context7,280 +.Lfunc_end0:Lfunc_end014,526 +server_type: # @server_typeserver_type21,715 +.LBB1_3: # %if.end9LBB1_340,1278 +.LBB1_4: # %cleanupLBB1_445,1448 +.Lfunc_end1:Lfunc_end150,1644 +main: # @mainmain57,1787 +.Lfunc_end2:Lfunc_end266,2081 +ap_standalone:ap_standalone80,2404 + +externals/binaryen/test/torture-s/20010915-1.c.s,1133 +main: # @mainmain7,211 +.LBB0_3: # %if.thenLBB0_348,1450 +.Lfunc_end0:Lfunc_end053,1592 +x: # @xx60,1709 +.LBB1_10: # %while.bodyLBB1_10138,4269 +.LBB1_14: # %cleanupLBB1_14180,5843 +.LBB1_15: # %if.then.i51LBB1_15185,5987 +.LBB1_16: # %if.then.i46LBB1_16189,6123 +.LBB1_17: # %if.elseLBB1_17193,6259 +.LBB1_18: # %if.then15LBB1_18197,6391 +.Lfunc_end1:Lfunc_end1202,6543 +s: # @ss209,6654 +.LBB2_3: # %if.thenLBB2_3235,7440 +.Lfunc_end2:Lfunc_end2240,7582 +m: # @mm247,7693 +.Lfunc_end3:Lfunc_end3254,7863 +r: # @rr261,7974 +.LBB4_4: # %if.thenLBB4_4294,9001 +.Lfunc_end4:Lfunc_end4299,9143 +check:check307,9304 +o:o316,9473 +h:h362,10306 +u:u371,10439 + +externals/binaryen/test/torture-s/pr33142.c.s,326 +lisp_atan2: # @lisp_atan2lisp_atan27,232 +.LBB0_3: # %returnLBB0_328,873 +.Lfunc_end0:Lfunc_end033,1068 +main: # @mainmain40,1209 +.LBB1_2: # %if.thenLBB1_267,2017 +.Lfunc_end1:Lfunc_end172,2159 + +externals/binaryen/test/torture-s/20011113-1.c.s,584 +foo: # @foofoo7,207 +.LBB0_4: # %if.then.iLBB0_435,1082 +.Lfunc_end0:Lfunc_end040,1226 +bar: # @barbar47,1349 +.LBB1_4: # %if.thenLBB1_469,2070 +.Lfunc_end1:Lfunc_end174,2212 +baz: # @bazbaz81,2335 +.LBB2_4: # %if.then.iLBB2_4109,3210 +.Lfunc_end2:Lfunc_end2114,3354 +main: # @mainmain121,3481 +.Lfunc_end3:Lfunc_end3132,3788 +t:t140,3942 + +externals/binaryen/test/torture-s/980424-1.c.s,422 +f: # @ff7,197 +.LBB0_2: # %if.thenLBB0_216,471 +.Lfunc_end0:Lfunc_end021,613 +g: # @gg28,724 +.LBB1_2: # %if.then.iLBB1_245,1229 +.Lfunc_end1:Lfunc_end150,1373 +main: # @mainmain57,1496 +.Lfunc_end2:Lfunc_end271,1847 +a:a79,1998 +i:i88,2134 + +externals/binaryen/test/torture-s/20020904-1.c.s,179 +fun: # @funfun7,207 +.Lfunc_end0:Lfunc_end015,463 +main: # @mainmain22,590 +.Lfunc_end1:Lfunc_end128,802 + +externals/binaryen/test/torture-s/20000706-3.c.s,509 +baz: # @bazbaz7,207 +.Lfunc_end0:Lfunc_end015,462 +bar: # @barbar22,585 +.LBB1_3: # %if.thenLBB1_337,1060 +.Lfunc_end1:Lfunc_end142,1202 +foo: # @foofoo49,1325 +.LBB2_3: # %if.then.iLBB2_364,1800 +.Lfunc_end2:Lfunc_end269,1944 +main: # @mainmain76,2071 +.Lfunc_end3:Lfunc_end386,2329 +c:c94,2480 + +externals/binaryen/test/torture-s/961122-1.c.s,296 +addhi: # @addhiaddhi7,213 +.Lfunc_end0:Lfunc_end022,661 +subhi: # @subhisubhi29,796 +.Lfunc_end1:Lfunc_end144,1244 +main: # @mainmain51,1375 +.Lfunc_end2:Lfunc_end261,1651 +acc:acc69,1810 + +externals/binaryen/test/torture-s/20060910-1.c.s,764 +input_getc_complicated: # @input_getc_complicatedinput_getc_complicated7,283 +.Lfunc_end0:Lfunc_end014,526 +check_header: # @check_headercheck_header21,723 +.LBB1_2: # %for.incLBB1_238,1247 +.LBB1_4: # %for.inc.1LBB1_448,1589 +.LBB1_6: # %for.inc.2LBB1_658,1933 +.LBB1_8: # %for.inc.3LBB1_868,2277 +.LBB1_10: # %for.inc.4LBB1_1078,2621 +.LBB1_12: # %for.inc.5LBB1_1287,2935 +.Lfunc_end1:Lfunc_end192,3133 +main: # @mainmain99,3278 +.Lfunc_end2:Lfunc_end2111,3639 +b:b118,3778 +s:s127,3910 + +externals/binaryen/test/torture-s/20020819-1.c.s,179 +foo: # @foofoo7,207 +.Lfunc_end0:Lfunc_end013,417 +main: # @mainmain20,544 +.Lfunc_end1:Lfunc_end127,731 + +externals/binaryen/test/torture-s/20010723-1.c.s,181 +test: # @testtest7,211 +.Lfunc_end0:Lfunc_end013,422 +main: # @mainmain20,551 +.Lfunc_end1:Lfunc_end127,739 + +externals/binaryen/test/torture-s/complex-5.c.s,298 +p: # @pp7,198 +.Lfunc_end0:Lfunc_end020,599 +main: # @mainmain27,722 +.LBB1_3: # %if.thenLBB1_387,2541 +.Lfunc_end1:Lfunc_end192,2683 +x:x100,2837 +y:y110,3048 +w:w120,3258 +z:z130,3466 + +externals/binaryen/test/torture-s/990829-1.c.s,181 +test: # @testtest7,209 +.Lfunc_end0:Lfunc_end018,559 +main: # @mainmain25,688 +.Lfunc_end1:Lfunc_end132,875 + +externals/binaryen/test/torture-s/20040411-1.c.s,182 +sub1: # @sub1sub17,211 +.Lfunc_end0:Lfunc_end023,699 +main: # @mainmain30,828 +.Lfunc_end1:Lfunc_end136,1040 + +externals/binaryen/test/torture-s/20050107-1.c.s,245 +foo: # @foofoo7,207 +.LBB0_3: # %if.thenLBB0_322,699 +.Lfunc_end0:Lfunc_end027,841 +main: # @mainmain34,968 +.Lfunc_end1:Lfunc_end140,1182 + +externals/binaryen/test/torture-s/961223-1.c.s,179 +sub: # @subsub7,205 +.Lfunc_end0:Lfunc_end015,462 +main: # @mainmain22,589 +.Lfunc_end1:Lfunc_end129,777 + +externals/binaryen/test/torture-s/930111-1.c.s,320 +main: # @mainmain7,209 +.Lfunc_end0:Lfunc_end014,397 +wwrite: # @wwritewwrite21,534 +.LBB1_2: # %sw.defaultLBB1_239,1209 +.LBB1_3: # %returnLBB1_342,1326 +.Lfunc_end1:Lfunc_end147,1521 + +externals/binaryen/test/torture-s/20030125-1.c.s,729 +t: # @tt7,199 +.Lfunc_end0:Lfunc_end016,498 +sin: # @sinsin23,617 +.Lfunc_end1:Lfunc_end130,843 +q: # @qq37,958 +.Lfunc_end2:Lfunc_end245,1196 +floor: # @floorfloor52,1323 +.Lfunc_end3:Lfunc_end359,1497 +q1: # @q1q166,1620 +.Lfunc_end4:Lfunc_end474,1859 +main: # @mainmain81,1984 +.Lfunc_end5:Lfunc_end587,2144 +floorf: # @floorffloorf94,2281 +.Lfunc_end6:Lfunc_end6101,2510 +sinf: # @sinfsinf108,2643 +.Lfunc_end7:Lfunc_end7115,2816 + +externals/binaryen/test/torture-s/bitfld-3.c.s,194 +main: # @mainmain7,209 +.LBB0_2: # %if.endLBB0_231,952 +.Lfunc_end0:Lfunc_end036,1093 +a:a44,1247 +b:b71,1996 +c:c98,2742 + +externals/binaryen/test/torture-s/20010422-1.c.s,179 +foo: # @foofoo7,207 +.Lfunc_end0:Lfunc_end018,545 +main: # @mainmain25,672 +.Lfunc_end1:Lfunc_end132,860 + +externals/binaryen/test/torture-s/pr40386.c.s,283 +main: # @mainmain7,208 +.LBB0_22: # %if.then187LBB0_22222,7736 +.Lfunc_end0:Lfunc_end0227,7881 +c:c234,8023 +s:s243,8187 +i:i252,8354 +l:l261,8521 +ll:ll270,8696 +shift1:shift1279,8896 +shift2:shift2288,9090 + +externals/binaryen/test/torture-s/vfprintf-1.c.s,1139 +inner: # @innerinner7,220 +.LBB0_2: # %sw.bbLBB0_249,1596 +.LBB0_4: # %sw.bb4LBB0_466,2201 +.LBB0_6: # %sw.bb10LBB0_683,2812 +.LBB0_8: # %sw.bb16LBB0_8100,3424 +.LBB0_10: # %sw.bb22LBB0_10116,4006 +.LBB0_12: # %sw.bb28LBB0_12133,4617 +.LBB0_14: # %sw.bb34LBB0_14150,5232 +.LBB0_16: # %sw.bb40LBB0_16167,5849 +.LBB0_18: # %sw.bb52LBB0_18183,6436 +.LBB0_20: # %sw.bb58LBB0_20200,7051 +.LBB0_21: # %sw.defaultLBB0_21214,7564 +.LBB0_22: # %sw.bb46LBB0_22218,7699 +.LBB0_23: # %sw.epilogLBB0_23232,8225 +.LBB0_24: # %if.then50LBB0_24239,8450 +.Lfunc_end0:Lfunc_end0244,8594 +main: # @mainmain251,8725 +.Lfunc_end1:Lfunc_end1321,10780 + +externals/binaryen/test/torture-s/20020920-1.c.s,175 +f: # @ff7,199 +.Lfunc_end0:Lfunc_end016,489 +main: # @mainmain23,612 +.Lfunc_end1:Lfunc_end130,800 + +externals/binaryen/test/torture-s/921112-1.c.s,268 +f: # @ff7,197 +.Lfunc_end0:Lfunc_end016,475 +main: # @mainmain23,598 +.LBB1_3: # %if.thenLBB1_344,1255 +.Lfunc_end1:Lfunc_end149,1397 +x:x57,1548 +v:v66,1682 + +externals/binaryen/test/torture-s/pr61375.c.s,290 +uint128_central_bitsi_ior: # @uint128_central_bitsi_ioruint128_central_bitsi_ior7,292 +.Lfunc_end0:Lfunc_end021,749 +main: # @mainmain28,920 +.LBB1_2: # %if.thenLBB1_243,1387 +.Lfunc_end1:Lfunc_end148,1529 + +externals/binaryen/test/torture-s/bitfld-2.c.s,90 +main: # @mainmain7,209 +.Lfunc_end0:Lfunc_end014,396 + +externals/binaryen/test/torture-s/20050713-1.c.s,912 +foo2: # @foo2foo27,211 +.LBB0_7: # %if.then12LBB0_744,1488 +.Lfunc_end0:Lfunc_end049,1632 +foo3: # @foo3foo356,1761 +.LBB1_10: # %if.thenLBB1_10108,3574 +.Lfunc_end1:Lfunc_end1113,3716 +bar2: # @bar2bar2120,3845 +.LBB2_7: # %if.then12.iLBB2_7157,5096 +.Lfunc_end2:Lfunc_end2162,5242 +bar3: # @bar3bar3169,5371 +.LBB3_10: # %if.then.iLBB3_10221,7189 +.Lfunc_end3:Lfunc_end3226,7333 +baz3: # @baz3baz3233,7462 +.LBB4_10: # %if.then.iLBB4_10285,9280 +.Lfunc_end4:Lfunc_end4290,9424 +main: # @mainmain297,9553 +.Lfunc_end5:Lfunc_end5303,9768 + +externals/binaryen/test/torture-s/20040629-1.c.s,17716 +ret1: # @ret1ret17,211 +.Lfunc_end0:Lfunc_end016,505 +ret2: # @ret2ret223,634 +.Lfunc_end1:Lfunc_end134,985 +ret3: # @ret3ret341,1114 +.Lfunc_end2:Lfunc_end250,1409 +ret4: # @ret4ret457,1538 +.Lfunc_end3:Lfunc_end366,1832 +ret5: # @ret5ret573,1961 +.Lfunc_end4:Lfunc_end484,2309 +ret6: # @ret6ret691,2438 +.Lfunc_end5:Lfunc_end5100,2732 +ret7: # @ret7ret7107,2861 +.Lfunc_end6:Lfunc_end6114,3104 +ret8: # @ret8ret8121,3233 +.Lfunc_end7:Lfunc_end7128,3477 +ret9: # @ret9ret9135,3606 +.Lfunc_end8:Lfunc_end8142,3850 +fn1_1: # @fn1_1fn1_1149,3983 +.Lfunc_end9:Lfunc_end9166,4479 +fn2_1: # @fn2_1fn2_1173,4614 +.Lfunc_end10:Lfunc_end10192,5176 +fn3_1: # @fn3_1fn3_1199,5313 +.Lfunc_end11:Lfunc_end11211,5679 +fn4_1: # @fn4_1fn4_1218,5816 +.Lfunc_end12:Lfunc_end12235,6312 +fn5_1: # @fn5_1fn5_1242,6449 +.Lfunc_end13:Lfunc_end13261,7003 +fn6_1: # @fn6_1fn6_1268,7140 +.Lfunc_end14:Lfunc_end14280,7505 +fn7_1: # @fn7_1fn7_1287,7642 +.Lfunc_end15:Lfunc_end15297,7955 +fn8_1: # @fn8_1fn8_1304,8092 +.Lfunc_end16:Lfunc_end16318,8517 +fn9_1: # @fn9_1fn9_1325,8654 +.Lfunc_end17:Lfunc_end17337,9020 +fn1_2: # @fn1_2fn1_2344,9157 +.Lfunc_end18:Lfunc_end18362,9680 +fn2_2: # @fn2_2fn2_2369,9817 +.Lfunc_end19:Lfunc_end19387,10349 +fn3_2: # @fn3_2fn3_2394,10486 +.Lfunc_end20:Lfunc_end20405,10827 +fn4_2: # @fn4_2fn4_2412,10964 +.Lfunc_end21:Lfunc_end21430,11487 +fn5_2: # @fn5_2fn5_2437,11624 +.Lfunc_end22:Lfunc_end22448,11961 +fn6_2: # @fn6_2fn6_2455,12098 +.Lfunc_end23:Lfunc_end23466,12435 +fn7_2: # @fn7_2fn7_2473,12572 +.Lfunc_end24:Lfunc_end24484,12910 +fn8_2: # @fn8_2fn8_2491,13047 +.Lfunc_end25:Lfunc_end25504,13446 +fn9_2: # @fn9_2fn9_2511,13583 +.Lfunc_end26:Lfunc_end26522,13926 +fn1_3: # @fn1_3fn1_3529,14063 +.Lfunc_end27:Lfunc_end27547,14586 +fn2_3: # @fn2_3fn2_3554,14723 +.Lfunc_end28:Lfunc_end28572,15255 +fn3_3: # @fn3_3fn3_3579,15392 +.Lfunc_end29:Lfunc_end29590,15733 +fn4_3: # @fn4_3fn4_3597,15870 +.Lfunc_end30:Lfunc_end30615,16393 +fn5_3: # @fn5_3fn5_3622,16530 +.Lfunc_end31:Lfunc_end31633,16867 +fn6_3: # @fn6_3fn6_3640,17004 +.Lfunc_end32:Lfunc_end32651,17341 +fn7_3: # @fn7_3fn7_3658,17478 +.Lfunc_end33:Lfunc_end33669,17816 +fn8_3: # @fn8_3fn8_3676,17953 +.Lfunc_end34:Lfunc_end34689,18352 +fn9_3: # @fn9_3fn9_3696,18489 +.Lfunc_end35:Lfunc_end35707,18832 +fn1_4: # @fn1_4fn1_4714,18969 +.Lfunc_end36:Lfunc_end36731,19465 +fn2_4: # @fn2_4fn2_4738,19602 +.Lfunc_end37:Lfunc_end37757,20164 +fn3_4: # @fn3_4fn3_4764,20301 +.Lfunc_end38:Lfunc_end38783,20864 +fn4_4: # @fn4_4fn4_4790,21001 +.Lfunc_end39:Lfunc_end39807,21497 +fn5_4: # @fn5_4fn5_4814,21634 +.Lfunc_end40:Lfunc_end40833,22188 +fn6_4: # @fn6_4fn6_4840,22325 +.Lfunc_end41:Lfunc_end41859,22879 +fn7_4: # @fn7_4fn7_4866,23016 +.Lfunc_end42:Lfunc_end42876,23329 +fn8_4: # @fn8_4fn8_4883,23466 +.Lfunc_end43:Lfunc_end43897,23891 +fn9_4: # @fn9_4fn9_4904,24028 +.Lfunc_end44:Lfunc_end44918,24453 +fn1_5: # @fn1_5fn1_5925,24590 +.Lfunc_end45:Lfunc_end45943,25114 +fn2_5: # @fn2_5fn2_5950,25251 +.Lfunc_end46:Lfunc_end46968,25787 +fn3_5: # @fn3_5fn3_5975,25924 +.Lfunc_end47:Lfunc_end47986,26266 +fn4_5: # @fn4_5fn4_5993,26403 +.Lfunc_end48:Lfunc_end481011,26927 +fn5_5: # @fn5_5fn5_51018,27064 +.Lfunc_end49:Lfunc_end491029,27401 +fn6_5: # @fn6_5fn6_51036,27538 +.Lfunc_end50:Lfunc_end501047,27876 +fn7_5: # @fn7_5fn7_51054,28013 +.Lfunc_end51:Lfunc_end511065,28355 +fn8_5: # @fn8_5fn8_51072,28492 +.Lfunc_end52:Lfunc_end521085,28894 +fn9_5: # @fn9_5fn9_51092,29031 +.Lfunc_end53:Lfunc_end531103,29375 +fn1_6: # @fn1_6fn1_61110,29512 +.Lfunc_end54:Lfunc_end541128,30036 +fn2_6: # @fn2_6fn2_61135,30173 +.Lfunc_end55:Lfunc_end551153,30709 +fn3_6: # @fn3_6fn3_61160,30846 +.Lfunc_end56:Lfunc_end561171,31188 +fn4_6: # @fn4_6fn4_61178,31325 +.Lfunc_end57:Lfunc_end571196,31849 +fn5_6: # @fn5_6fn5_61203,31986 +.Lfunc_end58:Lfunc_end581214,32323 +fn6_6: # @fn6_6fn6_61221,32460 +.Lfunc_end59:Lfunc_end591232,32798 +fn7_6: # @fn7_6fn7_61239,32935 +.Lfunc_end60:Lfunc_end601250,33277 +fn8_6: # @fn8_6fn8_61257,33414 +.Lfunc_end61:Lfunc_end611270,33816 +fn9_6: # @fn9_6fn9_61277,33953 +.Lfunc_end62:Lfunc_end621288,34297 +fn1_7: # @fn1_7fn1_71295,34434 +.Lfunc_end63:Lfunc_end631307,34801 +fn2_7: # @fn2_7fn2_71314,34938 +.Lfunc_end64:Lfunc_end641328,35363 +fn3_7: # @fn3_7fn3_71335,35500 +.Lfunc_end65:Lfunc_end651349,35925 +fn4_7: # @fn4_7fn4_71356,36062 +.Lfunc_end66:Lfunc_end661368,36429 +fn5_7: # @fn5_7fn5_71375,36566 +.Lfunc_end67:Lfunc_end671389,36987 +fn6_7: # @fn6_7fn6_71396,37124 +.Lfunc_end68:Lfunc_end681410,37544 +fn7_7: # @fn7_7fn7_71417,37681 +.Lfunc_end69:Lfunc_end691429,38051 +fn8_7: # @fn8_7fn8_71436,38188 +.Lfunc_end70:Lfunc_end701450,38616 +fn9_7: # @fn9_7fn9_71457,38753 +.Lfunc_end71:Lfunc_end711471,39180 +fn1_8: # @fn1_8fn1_81478,39317 +.Lfunc_end72:Lfunc_end721490,39683 +fn2_8: # @fn2_8fn2_81497,39820 +.Lfunc_end73:Lfunc_end731511,40244 +fn3_8: # @fn3_8fn3_81518,40381 +.Lfunc_end74:Lfunc_end741537,40944 +fn4_8: # @fn4_8fn4_81544,41081 +.Lfunc_end75:Lfunc_end751556,41447 +fn5_8: # @fn5_8fn5_81563,41584 +.Lfunc_end76:Lfunc_end761577,42004 +fn6_8: # @fn6_8fn6_81584,42141 +.Lfunc_end77:Lfunc_end771603,42695 +fn7_8: # @fn7_8fn7_81610,42832 +.Lfunc_end78:Lfunc_end781622,43201 +fn8_8: # @fn8_8fn8_81629,43338 +.Lfunc_end79:Lfunc_end791643,43765 +fn9_8: # @fn9_8fn9_81650,43902 +.Lfunc_end80:Lfunc_end801664,44327 +fn1_9: # @fn1_9fn1_91671,44464 +.Lfunc_end81:Lfunc_end811683,44830 +fn2_9: # @fn2_9fn2_91690,44967 +.Lfunc_end82:Lfunc_end821704,45391 +fn3_9: # @fn3_9fn3_91711,45528 +.Lfunc_end83:Lfunc_end831730,46091 +fn4_9: # @fn4_9fn4_91737,46228 +.Lfunc_end84:Lfunc_end841749,46594 +fn5_9: # @fn5_9fn5_91756,46731 +.Lfunc_end85:Lfunc_end851770,47151 +fn6_9: # @fn6_9fn6_91777,47288 +.Lfunc_end86:Lfunc_end861796,47842 +fn7_9: # @fn7_9fn7_91803,47979 +.Lfunc_end87:Lfunc_end871815,48348 +fn8_9: # @fn8_9fn8_91822,48485 +.Lfunc_end88:Lfunc_end881836,48912 +fn9_9: # @fn9_9fn9_91843,49049 +.Lfunc_end89:Lfunc_end891857,49474 +fn1_a: # @fn1_afn1_a1864,49611 +.Lfunc_end90:Lfunc_end901881,50108 +fn2_a: # @fn2_afn2_a1888,50245 +.Lfunc_end91:Lfunc_end911909,50865 +fn3_a: # @fn3_afn3_a1916,51002 +.Lfunc_end92:Lfunc_end921935,51562 +fn4_a: # @fn4_afn4_a1942,51699 +.Lfunc_end93:Lfunc_end931959,52196 +fn5_a: # @fn5_afn5_a1966,52333 +.Lfunc_end94:Lfunc_end941987,52946 +fn6_a: # @fn6_afn6_a1994,53083 +.Lfunc_end95:Lfunc_end952013,53637 +fn7_a: # @fn7_afn7_a2020,53774 +.Lfunc_end96:Lfunc_end962030,54092 +fn8_a: # @fn8_afn8_a2037,54229 +.Lfunc_end97:Lfunc_end972047,54549 +fn9_a: # @fn9_afn9_a2054,54686 +.Lfunc_end98:Lfunc_end982064,55006 +fn1_b: # @fn1_bfn1_b2071,55143 +.Lfunc_end99:Lfunc_end992088,55640 +fn2_b: # @fn2_bfn2_b2095,55777 +.Lfunc_end100:Lfunc_end1002116,56397 +fn3_b: # @fn3_bfn3_b2123,56536 +.Lfunc_end101:Lfunc_end1012142,57096 +fn4_b: # @fn4_bfn4_b2149,57235 +.Lfunc_end102:Lfunc_end1022166,57732 +fn5_b: # @fn5_bfn5_b2173,57871 +.Lfunc_end103:Lfunc_end1032194,58484 +fn6_b: # @fn6_bfn6_b2201,58623 +.Lfunc_end104:Lfunc_end1042220,59177 +fn7_b: # @fn7_bfn7_b2227,59316 +.Lfunc_end105:Lfunc_end1052237,59634 +fn8_b: # @fn8_bfn8_b2244,59773 +.Lfunc_end106:Lfunc_end1062254,60093 +fn9_b: # @fn9_bfn9_b2261,60232 +.Lfunc_end107:Lfunc_end1072271,60552 +fn1_c: # @fn1_cfn1_c2278,60691 +.Lfunc_end108:Lfunc_end1082296,61214 +fn2_c: # @fn2_cfn2_c2303,61353 +.Lfunc_end109:Lfunc_end1092321,61886 +fn3_c: # @fn3_cfn3_c2328,62025 +.Lfunc_end110:Lfunc_end1102339,62366 +fn4_c: # @fn4_cfn4_c2346,62505 +.Lfunc_end111:Lfunc_end1112364,63028 +fn5_c: # @fn5_cfn5_c2371,63167 +.Lfunc_end112:Lfunc_end1122382,63504 +fn6_c: # @fn6_cfn6_c2389,63643 +.Lfunc_end113:Lfunc_end1132400,63981 +fn7_c: # @fn7_cfn7_c2407,64120 +.Lfunc_end114:Lfunc_end1142418,64458 +fn8_c: # @fn8_cfn8_c2425,64597 +.Lfunc_end115:Lfunc_end1152438,64997 +fn9_c: # @fn9_cfn9_c2445,65136 +.Lfunc_end116:Lfunc_end1162456,65479 +fn1_d: # @fn1_dfn1_d2463,65618 +.Lfunc_end117:Lfunc_end1172481,66142 +fn2_d: # @fn2_dfn2_d2488,66281 +.Lfunc_end118:Lfunc_end1182506,66817 +fn3_d: # @fn3_dfn3_d2513,66956 +.Lfunc_end119:Lfunc_end1192524,67298 +fn4_d: # @fn4_dfn4_d2531,67437 +.Lfunc_end120:Lfunc_end1202549,67961 +fn5_d: # @fn5_dfn5_d2556,68100 +.Lfunc_end121:Lfunc_end1212567,68437 +fn6_d: # @fn6_dfn6_d2574,68576 +.Lfunc_end122:Lfunc_end1222585,68915 +fn7_d: # @fn7_dfn7_d2592,69054 +.Lfunc_end123:Lfunc_end1232603,69396 +fn8_d: # @fn8_dfn8_d2610,69535 +.Lfunc_end124:Lfunc_end1242623,69937 +fn9_d: # @fn9_dfn9_d2630,70076 +.Lfunc_end125:Lfunc_end1252641,70421 +fn1_e: # @fn1_efn1_e2648,70560 +.Lfunc_end126:Lfunc_end1262659,70898 +fn2_e: # @fn2_efn2_e2666,71037 +.Lfunc_end127:Lfunc_end1272677,71379 +fn3_e: # @fn3_efn3_e2684,71518 +.Lfunc_end128:Lfunc_end1282695,71860 +fn4_e: # @fn4_efn4_e2702,71999 +.Lfunc_end129:Lfunc_end1292713,72337 +fn5_e: # @fn5_efn5_e2720,72476 +.Lfunc_end130:Lfunc_end1302725,72659 +fn6_e: # @fn6_efn6_e2732,72798 +.Lfunc_end131:Lfunc_end1312743,73137 +fn7_e: # @fn7_efn7_e2750,73276 +.Lfunc_end132:Lfunc_end1322761,73617 +fn8_e: # @fn8_efn8_e2768,73756 +.Lfunc_end133:Lfunc_end1332779,74100 +fn9_e: # @fn9_efn9_e2786,74239 +.Lfunc_end134:Lfunc_end1342797,74583 +fn1_f: # @fn1_ffn1_f2804,74722 +.Lfunc_end135:Lfunc_end1352815,75059 +fn2_f: # @fn2_ffn2_f2822,75198 +.Lfunc_end136:Lfunc_end1362833,75537 +fn3_f: # @fn3_ffn3_f2840,75676 +.Lfunc_end137:Lfunc_end1372851,76018 +fn4_f: # @fn4_ffn4_f2858,76157 +.Lfunc_end138:Lfunc_end1382869,76494 +fn5_f: # @fn5_ffn5_f2876,76633 +.Lfunc_end139:Lfunc_end1392887,76970 +fn6_f: # @fn6_ffn6_f2894,77109 +.Lfunc_end140:Lfunc_end1402905,77448 +fn7_f: # @fn7_ffn7_f2912,77587 +.Lfunc_end141:Lfunc_end1412923,77924 +fn8_f: # @fn8_ffn8_f2930,78063 +.Lfunc_end142:Lfunc_end1422941,78405 +fn9_f: # @fn9_ffn9_f2948,78544 +.Lfunc_end143:Lfunc_end1432959,78888 +fn1_g: # @fn1_gfn1_g2966,79027 +.Lfunc_end144:Lfunc_end1442977,79364 +fn2_g: # @fn2_gfn2_g2984,79503 +.Lfunc_end145:Lfunc_end1452995,79842 +fn3_g: # @fn3_gfn3_g3002,79981 +.Lfunc_end146:Lfunc_end1463013,80323 +fn4_g: # @fn4_gfn4_g3020,80462 +.Lfunc_end147:Lfunc_end1473031,80798 +fn5_g: # @fn5_gfn5_g3038,80937 +.Lfunc_end148:Lfunc_end1483049,81274 +fn6_g: # @fn6_gfn6_g3056,81413 +.Lfunc_end149:Lfunc_end1493067,81752 +fn7_g: # @fn7_gfn7_g3074,81891 +.Lfunc_end150:Lfunc_end1503085,82228 +fn8_g: # @fn8_gfn8_g3092,82367 +.Lfunc_end151:Lfunc_end1513103,82709 +fn9_g: # @fn9_gfn9_g3110,82848 +.Lfunc_end152:Lfunc_end1523121,83192 +fn1_h: # @fn1_hfn1_h3128,83331 +.Lfunc_end153:Lfunc_end1533146,83856 +fn2_h: # @fn2_hfn2_h3153,83995 +.Lfunc_end154:Lfunc_end1543175,84643 +fn3_h: # @fn3_hfn3_h3182,84782 +.Lfunc_end155:Lfunc_end1553200,85315 +fn4_h: # @fn4_hfn4_h3207,85454 +.Lfunc_end156:Lfunc_end1563225,85979 +fn5_h: # @fn5_hfn5_h3232,86118 +.Lfunc_end157:Lfunc_end1573243,86456 +fn6_h: # @fn6_hfn6_h3250,86595 +.Lfunc_end158:Lfunc_end1583268,87120 +fn7_h: # @fn7_hfn7_h3275,87259 +.Lfunc_end159:Lfunc_end1593286,87603 +fn8_h: # @fn8_hfn8_h3293,87742 +.Lfunc_end160:Lfunc_end1603304,88088 +fn9_h: # @fn9_hfn9_h3311,88227 +.Lfunc_end161:Lfunc_end1613322,88575 +fn1_i: # @fn1_ifn1_i3329,88714 +.Lfunc_end162:Lfunc_end1623347,89239 +fn2_i: # @fn2_ifn2_i3354,89378 +.Lfunc_end163:Lfunc_end1633376,90026 +fn3_i: # @fn3_ifn3_i3383,90165 +.Lfunc_end164:Lfunc_end1643403,90753 +fn4_i: # @fn4_ifn4_i3410,90892 +.Lfunc_end165:Lfunc_end1653428,91417 +fn5_i: # @fn5_ifn5_i3435,91556 +.Lfunc_end166:Lfunc_end1663457,92197 +fn6_i: # @fn6_ifn6_i3464,92336 +.Lfunc_end167:Lfunc_end1673484,92918 +fn7_i: # @fn7_ifn7_i3491,93057 +.Lfunc_end168:Lfunc_end1683502,93401 +fn8_i: # @fn8_ifn8_i3509,93540 +.Lfunc_end169:Lfunc_end1693520,93886 +fn9_i: # @fn9_ifn9_i3527,94025 +.Lfunc_end170:Lfunc_end1703538,94371 +main: # @mainmain3545,94506 +.Lfunc_end171:Lfunc_end1713560,94960 +b:b3568,95115 +c:c3577,95247 +d:d3586,95379 + +externals/binaryen/test/torture-s/980701-1.c.s,382 +ns_name_skip: # @ns_name_skipns_name_skip7,241 +.Lfunc_end0:Lfunc_end016,525 +dn_skipname: # @dn_skipnamedn_skipname23,698 +.Lfunc_end1:Lfunc_end131,964 +main: # @mainmain38,1107 +.LBB2_2: # %if.endLBB2_247,1386 +.Lfunc_end2:Lfunc_end253,1555 +a:a60,1694 + +externals/binaryen/test/torture-s/20020227-1.c.s,331 +main: # @mainmain7,211 +.Lfunc_end0:Lfunc_end014,398 +f1: # @f1f121,519 +.Lfunc_end1:Lfunc_end125,687 +f2: # @f2f232,804 +.LBB2_4: # %if.thenLBB2_454,1550 +.Lfunc_end2:Lfunc_end259,1692 + +externals/binaryen/test/torture-s/complex-4.c.s,90 +main: # @mainmain7,210 +.Lfunc_end0:Lfunc_end014,397 + +externals/binaryen/test/torture-s/950426-1.c.s,318 +main: # @mainmain7,209 +.Lfunc_end0:Lfunc_end026,699 +func1: # @func1func133,832 +.Lfunc_end1:Lfunc_end140,1061 +foo: # @foofoo47,1188 +.Lfunc_end2:Lfunc_end255,1428 +s1:s163,1581 +p1:p172,1721 +i:i81,1856 + +externals/binaryen/test/torture-s/20000706-2.c.s,411 +bar: # @barbar7,207 +.LBB0_11: # %if.thenLBB0_1157,2068 +.Lfunc_end0:Lfunc_end062,2210 +foo: # @foofoo69,2333 +.LBB1_6: # %if.then.iLBB1_699,3398 +.Lfunc_end1:Lfunc_end1104,3542 +main: # @mainmain111,3669 +.Lfunc_end2:Lfunc_end2145,4637 + +externals/binaryen/test/torture-s/pr33382.c.s,259 +foo: # @foofoo7,204 +.Lfunc_end0:Lfunc_end017,517 +main: # @mainmain24,644 +.LBB1_2: # %if.thenLBB1_237,1025 +.Lfunc_end1:Lfunc_end142,1167 +x:x50,1321 + +externals/binaryen/test/torture-s/strncmp-1.c.s,1371 +test: # @testtest7,215 +.LBB0_2: # %if.elseLBB0_220,651 +.LBB0_4: # %if.else6LBB0_426,899 +.LBB0_6: # %if.end12LBB0_636,1251 +.LBB0_7: # %if.then10LBB0_739,1354 +.Lfunc_end0:Lfunc_end044,1498 +main: # @mainmain51,1627 +.LBB1_1: # %for.cond1.preheaderLBB1_157,1829 +.LBB1_2: # %for.cond4.preheaderLBB1_266,2201 +.LBB1_3: # %for.cond7.preheaderLBB1_372,2533 +.LBB1_5: # in Loop: Header=BB1_3 Depth=3LBB1_592,3370 +.LBB1_6: # %for.body12.preheaderLBB1_699,3624 +.LBB1_7: # %for.cond17.preheaderLBB1_7105,3906 +.LBB1_9: # in Loop: Header=BB1_3 Depth=3LBB1_9125,4681 +.LBB1_10: # %for.body33.preheaderLBB1_10132,4936 +.LBB1_11: # %for.cond38.preheaderLBB1_11138,5218 +.LBB1_33: # %if.then10.i272LBB1_33309,12353 +.LBB1_34: # %if.then5.i277LBB1_34313,12492 +.Lfunc_end1:Lfunc_end1318,12640 +u1:u1324,12764 +u2:u2331,12873 + +externals/binaryen/test/torture-s/pr34176.c.s,569 +hash_find_entry: # @hash_find_entryhash_find_entry7,257 +.Lfunc_end0:Lfunc_end016,539 +foo: # @foofoo23,686 +.LBB1_2: # %if.thenLBB1_242,1220 +.Lfunc_end1:Lfunc_end147,1362 +main: # @mainmain54,1489 +.LBB2_1: # %if.endLBB2_168,1943 +.LBB2_2: # %while.bodyLBB2_278,2325 +.LBB2_3: # %cleanup.threadLBB2_388,2744 +.Lfunc_end2:Lfunc_end2106,3378 + +externals/binaryen/test/torture-s/pr33631.c.s,90 +main: # @mainmain7,208 +.Lfunc_end0:Lfunc_end013,419 + +externals/binaryen/test/torture-s/20041019-1.c.s,329 +test_store_ccp: # @test_store_ccptest_store_ccp7,251 +.Lfunc_end0:Lfunc_end039,1201 +test_store_copy_prop: # @test_store_copy_proptest_store_copy_prop46,1414 +.Lfunc_end1:Lfunc_end176,2320 +main: # @mainmain83,2481 +.Lfunc_end2:Lfunc_end289,2694 + +externals/binaryen/test/torture-s/20080529-1.c.s,181 +test: # @testtest7,211 +.Lfunc_end0:Lfunc_end015,469 +main: # @mainmain22,598 +.Lfunc_end1:Lfunc_end128,810 + +externals/binaryen/test/torture-s/20070424-1.c.s,443 +do_exit: # @do_exitdo_exit7,223 +.Lfunc_end0:Lfunc_end013,399 +do_abort: # @do_abortdo_abort20,550 +.Lfunc_end1:Lfunc_end125,699 +foo: # @foofoo32,832 +.LBB2_2: # %if.endLBB2_241,1119 +.Lfunc_end2:Lfunc_end246,1262 +main: # @mainmain53,1389 +.Lfunc_end3:Lfunc_end359,1550 + +externals/binaryen/test/torture-s/20020508-3.c.s,283 +main: # @mainmain7,211 +.LBB0_22: # %if.then187LBB0_22222,7739 +.Lfunc_end0:Lfunc_end0227,7884 +c:c234,8026 +s:s243,8190 +i:i252,8357 +l:l261,8524 +ll:ll270,8699 +shift1:shift1279,8899 +shift2:shift2288,9093 + +externals/binaryen/test/torture-s/20020716-1.c.s,282 +sub1: # @sub1sub17,211 +.Lfunc_end0:Lfunc_end014,438 +testcond: # @testcondtestcond21,583 +.Lfunc_end1:Lfunc_end130,878 +main: # @mainmain37,1015 +.Lfunc_end2:Lfunc_end244,1203 + +externals/binaryen/test/torture-s/980506-2.c.s,175 +f: # @ff7,197 +.Lfunc_end0:Lfunc_end013,405 +main: # @mainmain20,528 +.Lfunc_end1:Lfunc_end127,717 + +externals/binaryen/test/torture-s/pr39240.c.s,1389 +bar1: # @bar1bar17,208 +.Lfunc_end0:Lfunc_end016,502 +foo1: # @foo1foo121,604 +.Lfunc_end1:Lfunc_end128,831 +bar2: # @bar2bar235,960 +.Lfunc_end2:Lfunc_end246,1312 +foo2: # @foo2foo251,1414 +.Lfunc_end3:Lfunc_end361,1725 +bar3: # @bar3bar368,1854 +.Lfunc_end4:Lfunc_end479,2204 +foo3: # @foo3foo384,2306 +.Lfunc_end5:Lfunc_end594,2617 +bar4: # @bar4bar4101,2746 +.Lfunc_end6:Lfunc_end6110,3040 +foo4: # @foo4foo4115,3142 +.Lfunc_end7:Lfunc_end7122,3369 +bar5: # @bar5bar5129,3498 +.Lfunc_end8:Lfunc_end8142,3903 +foo5: # @foo5foo5147,4005 +.Lfunc_end9:Lfunc_end9155,4263 +bar6: # @bar6bar6162,4392 +.Lfunc_end10:Lfunc_end10175,4797 +foo6: # @foo6foo6180,4901 +.Lfunc_end11:Lfunc_end11188,5157 +main: # @mainmain195,5288 +.LBB12_7: # %if.then27LBB12_7243,6954 +.Lfunc_end12:Lfunc_end12248,7098 +l1:l1256,7258 +l2:l2265,7435 +l3:l3274,7608 +l4:l4283,7779 +l5:l5292,7956 +l6:l6301,8133 + +externals/binaryen/test/torture-s/loop-3b.c.s,342 +g: # @gg7,196 +.Lfunc_end0:Lfunc_end021,587 +f: # @ff28,698 +.Lfunc_end1:Lfunc_end153,1459 +main: # @mainmain60,1582 +.LBB2_2: # %if.thenLBB2_277,2064 +.Lfunc_end2:Lfunc_end282,2206 +n:n90,2357 + +externals/binaryen/test/torture-s/pr28403.c.s,360 +foo: # @foofoo7,204 +.Lfunc_end0:Lfunc_end023,719 +bar: # @barbar30,842 +.Lfunc_end1:Lfunc_end148,1398 +main: # @mainmain55,1525 +.LBB2_2: # %if.thenLBB2_268,1951 +.Lfunc_end2:Lfunc_end273,2093 +global:global81,2264 + +externals/binaryen/test/torture-s/950607-1.c.s,90 +main: # @mainmain7,209 +.Lfunc_end0:Lfunc_end014,396 + +externals/binaryen/test/torture-s/931004-9.c.s,246 +f: # @ff7,197 +.LBB0_8: # %if.then33LBB0_847,1613 +.Lfunc_end0:Lfunc_end052,1757 +main: # @mainmain59,1880 +.Lfunc_end1:Lfunc_end198,2970 + +externals/binaryen/test/torture-s/pr46909-2.c.s,442 +foo: # @foofoo7,206 +.LBB0_2: # %if.endLBB0_220,577 +.LBB0_3: # %returnLBB0_323,689 +.Lfunc_end0:Lfunc_end028,884 +main: # @mainmain35,1011 +.LBB1_1: # %for.bodyLBB1_140,1156 +.LBB1_4: # %if.thenLBB1_469,2135 +.Lfunc_end1:Lfunc_end174,2277 + +externals/binaryen/test/torture-s/loop-2f.c.s,308 +f: # @ff7,196 +.LBB0_2: # %for.endLBB0_221,651 +.Lfunc_end0:Lfunc_end026,847 +main: # @mainmain33,970 +.LBB1_2: # %if.end15LBB1_260,1836 +.Lfunc_end1:Lfunc_end166,2009 + +externals/binaryen/test/torture-s/930603-2.c.s,255 +f: # @ff7,197 +.Lfunc_end0:Lfunc_end020,572 +main: # @mainmain27,695 +.LBB1_2: # %if.thenLBB1_247,1260 +.Lfunc_end1:Lfunc_end152,1402 +w:w60,1553 + +externals/binaryen/test/torture-s/20020307-1.c.s,4802 +f3: # @f3f37,203 +.LBB0_2: # %if.thenLBB0_218,532 +.Lfunc_end0:Lfunc_end023,674 +f4: # @f4f430,791 +.LBB1_2: # %if.thenLBB1_241,1122 +.Lfunc_end1:Lfunc_end146,1264 +f5: # @f5f553,1381 +.LBB2_2: # %if.thenLBB2_264,1712 +.Lfunc_end2:Lfunc_end269,1854 +f6: # @f6f676,1971 +.LBB3_2: # %if.thenLBB3_287,2302 +.Lfunc_end3:Lfunc_end392,2444 +f7: # @f7f799,2561 +.LBB4_2: # %if.thenLBB4_2110,2893 +.Lfunc_end4:Lfunc_end4115,3035 +f8: # @f8f8122,3152 +.LBB5_2: # %if.thenLBB5_2133,3485 +.Lfunc_end5:Lfunc_end5138,3627 +f9: # @f9f9145,3744 +.LBB6_2: # %if.thenLBB6_2156,4077 +.Lfunc_end6:Lfunc_end6161,4219 +f10: # @f10f10168,4340 +.LBB7_2: # %if.thenLBB7_2179,4675 +.Lfunc_end7:Lfunc_end7184,4817 +f11: # @f11f11191,4940 +.LBB8_2: # %if.thenLBB8_2202,5276 +.Lfunc_end8:Lfunc_end8207,5418 +f12: # @f12f12214,5541 +.LBB9_2: # %if.thenLBB9_2225,5877 +.Lfunc_end9:Lfunc_end9230,6019 +f13: # @f13f13237,6142 +.LBB10_2: # %if.thenLBB10_2248,6479 +.Lfunc_end10:Lfunc_end10253,6622 +f14: # @f14f14260,6747 +.LBB11_2: # %if.thenLBB11_2271,7085 +.Lfunc_end11:Lfunc_end11276,7228 +f15: # @f15f15283,7353 +.LBB12_2: # %if.thenLBB12_2294,7692 +.Lfunc_end12:Lfunc_end12299,7835 +f16: # @f16f16306,7960 +.LBB13_2: # %if.thenLBB13_2317,8299 +.Lfunc_end13:Lfunc_end13322,8442 +f17: # @f17f17329,8567 +.LBB14_2: # %if.thenLBB14_2340,8907 +.Lfunc_end14:Lfunc_end14345,9050 +f18: # @f18f18352,9175 +.LBB15_2: # %if.thenLBB15_2363,9516 +.Lfunc_end15:Lfunc_end15368,9659 +f19: # @f19f19375,9784 +.LBB16_2: # %if.thenLBB16_2386,10125 +.Lfunc_end16:Lfunc_end16391,10268 +f20: # @f20f20398,10393 +.LBB17_2: # %if.thenLBB17_2409,10735 +.Lfunc_end17:Lfunc_end17414,10878 +f21: # @f21f21421,11003 +.LBB18_2: # %if.thenLBB18_2432,11346 +.Lfunc_end18:Lfunc_end18437,11489 +f22: # @f22f22444,11614 +.LBB19_2: # %if.thenLBB19_2455,11957 +.Lfunc_end19:Lfunc_end19460,12100 +f23: # @f23f23467,12225 +.LBB20_2: # %if.thenLBB20_2478,12568 +.Lfunc_end20:Lfunc_end20483,12711 +f24: # @f24f24490,12836 +.LBB21_2: # %if.thenLBB21_2501,13180 +.Lfunc_end21:Lfunc_end21506,13323 +f25: # @f25f25513,13448 +.LBB22_2: # %if.thenLBB22_2524,13793 +.Lfunc_end22:Lfunc_end22529,13936 +f26: # @f26f26536,14061 +.LBB23_2: # %if.thenLBB23_2547,14406 +.Lfunc_end23:Lfunc_end23552,14549 +f27: # @f27f27559,14674 +.LBB24_2: # %if.thenLBB24_2570,15020 +.Lfunc_end24:Lfunc_end24575,15163 +f28: # @f28f28582,15288 +.LBB25_2: # %if.thenLBB25_2593,15635 +.Lfunc_end25:Lfunc_end25598,15778 +f29: # @f29f29605,15903 +.LBB26_2: # %if.thenLBB26_2616,16250 +.Lfunc_end26:Lfunc_end26621,16393 +f30: # @f30f30628,16518 +.LBB27_2: # %if.thenLBB27_2639,16866 +.Lfunc_end27:Lfunc_end27644,17009 +f31: # @f31f31651,17134 +.LBB28_2: # %if.thenLBB28_2662,17483 +.Lfunc_end28:Lfunc_end28667,17626 +main: # @mainmain674,17755 +.Lfunc_end29:Lfunc_end29681,17942 + +externals/binaryen/test/torture-s/loop-9.c.s,183 +false: # @falsefalse7,211 +.Lfunc_end0:Lfunc_end013,423 +main: # @mainmain20,554 +.Lfunc_end1:Lfunc_end127,784 + +externals/binaryen/test/torture-s/va-arg-18.c.s,246 +f: # @ff7,198 +.LBB0_4: # %if.then10LBB0_451,1607 +.Lfunc_end0:Lfunc_end056,1751 +main: # @mainmain63,1874 +.Lfunc_end1:Lfunc_end183,2457 + +externals/binaryen/test/torture-s/20040709-1.c.s,18341 +myrnd: # @myrndmyrnd7,220 +.Lfunc_end0:Lfunc_end026,801 +retmeA: # @retmeAretmeA33,940 +.Lfunc_end1:Lfunc_end140,1178 +fn1A: # @fn1Afn1A47,1311 +.Lfunc_end2:Lfunc_end260,1705 +fn2A: # @fn2Afn2A67,1834 +.Lfunc_end3:Lfunc_end382,2287 +retitA: # @retitAretitA89,2424 +.Lfunc_end4:Lfunc_end498,2722 +fn3A: # @fn3Afn3A105,2855 +.Lfunc_end5:Lfunc_end5121,3327 +testA: # @testAtestA128,3460 +.LBB6_4: # %if.then130LBB6_4256,7490 +.Lfunc_end6:Lfunc_end6261,7635 +retmeB: # @retmeBretmeB268,7774 +.Lfunc_end7:Lfunc_end7275,8032 +fn1B: # @fn1Bfn1B282,8165 +.Lfunc_end8:Lfunc_end8295,8559 +fn2B: # @fn2Bfn2B302,8688 +.Lfunc_end9:Lfunc_end9317,9141 +retitB: # @retitBretitB324,9278 +.Lfunc_end10:Lfunc_end10333,9576 +fn3B: # @fn3Bfn3B340,9711 +.Lfunc_end11:Lfunc_end11356,10183 +testB: # @testBtestB363,10318 +.LBB12_5: # %if.then114LBB12_5543,16058 +.Lfunc_end12:Lfunc_end12548,16203 +retmeC: # @retmeCretmeC555,16344 +.Lfunc_end13:Lfunc_end13562,16602 +fn1C: # @fn1Cfn1C569,16737 +.Lfunc_end14:Lfunc_end14582,17133 +fn2C: # @fn2Cfn2C589,17264 +.Lfunc_end15:Lfunc_end15604,17719 +retitC: # @retitCretitC611,17858 +.Lfunc_end16:Lfunc_end16620,18158 +fn3C: # @fn3Cfn3C627,18293 +.Lfunc_end17:Lfunc_end17643,18769 +testC: # @testCtestC650,18904 +.LBB18_5: # %if.then120LBB18_5828,24583 +.Lfunc_end18:Lfunc_end18833,24728 +retmeD: # @retmeDretmeD840,24869 +.Lfunc_end19:Lfunc_end19847,25107 +fn1D: # @fn1Dfn1D854,25242 +.Lfunc_end20:Lfunc_end20868,25672 +fn2D: # @fn2Dfn2D875,25803 +.Lfunc_end21:Lfunc_end21891,26289 +retitD: # @retitDretitD898,26428 +.Lfunc_end22:Lfunc_end22908,26755 +fn3D: # @fn3Dfn3D915,26890 +.Lfunc_end23:Lfunc_end23940,27638 +testD: # @testDtestD947,27773 +.Lfunc_end24:Lfunc_end241057,31149 +retmeE: # @retmeEretmeE1064,31290 +.Lfunc_end25:Lfunc_end251077,31685 +fn1E: # @fn1Efn1E1084,31820 +.Lfunc_end26:Lfunc_end261098,32252 +fn2E: # @fn2Efn2E1105,32383 +.Lfunc_end27:Lfunc_end271121,32871 +retitE: # @retitEretitE1128,33010 +.Lfunc_end28:Lfunc_end281138,33339 +fn3E: # @fn3Efn3E1145,33474 +.Lfunc_end29:Lfunc_end291170,34226 +testE: # @testEtestE1177,34361 +.Lfunc_end30:Lfunc_end301359,40055 +retmeF: # @retmeFretmeF1366,40196 +.Lfunc_end31:Lfunc_end311379,40591 +fn1F: # @fn1Ffn1F1386,40726 +.Lfunc_end32:Lfunc_end321400,41156 +fn2F: # @fn2Ffn2F1407,41287 +.Lfunc_end33:Lfunc_end331423,41773 +retitF: # @retitFretitF1430,41912 +.Lfunc_end34:Lfunc_end341440,42239 +fn3F: # @fn3Ffn3F1447,42374 +.Lfunc_end35:Lfunc_end351472,43122 +testF: # @testFtestF1479,43257 +.Lfunc_end36:Lfunc_end361661,48947 +retmeG: # @retmeGretmeG1668,49088 +.Lfunc_end37:Lfunc_end371681,49483 +fn1G: # @fn1Gfn1G1688,49618 +.Lfunc_end38:Lfunc_end381701,50012 +fn2G: # @fn2Gfn2G1708,50143 +.Lfunc_end39:Lfunc_end391723,50594 +retitG: # @retitGretitG1730,50733 +.Lfunc_end40:Lfunc_end401739,51031 +fn3G: # @fn3Gfn3G1746,51166 +.Lfunc_end41:Lfunc_end411762,51638 +testG: # @testGtestG1769,51773 +.LBB42_4: # %if.then114LBB42_42000,59115 +.Lfunc_end42:Lfunc_end422005,59260 +retmeH: # @retmeHretmeH2012,59401 +.Lfunc_end43:Lfunc_end432025,59796 +fn1H: # @fn1Hfn1H2032,59931 +.Lfunc_end44:Lfunc_end442045,60325 +fn2H: # @fn2Hfn2H2052,60456 +.Lfunc_end45:Lfunc_end452067,60907 +retitH: # @retitHretitH2074,61046 +.Lfunc_end46:Lfunc_end462083,61344 +fn3H: # @fn3Hfn3H2090,61479 +.Lfunc_end47:Lfunc_end472106,61951 +testH: # @testHtestH2113,62086 +.LBB48_4: # %if.then114LBB48_42344,69426 +.Lfunc_end48:Lfunc_end482349,69571 +retmeI: # @retmeIretmeI2356,69712 +.Lfunc_end49:Lfunc_end492369,70107 +fn1I: # @fn1Ifn1I2376,70242 +.Lfunc_end50:Lfunc_end502389,70640 +fn2I: # @fn2Ifn2I2396,70771 +.Lfunc_end51:Lfunc_end512411,71225 +retitI: # @retitIretitI2418,71364 +.Lfunc_end52:Lfunc_end522427,71665 +fn3I: # @fn3Ifn3I2434,71800 +.Lfunc_end53:Lfunc_end532457,72472 +testI: # @testItestI2464,72607 +.Lfunc_end54:Lfunc_end542641,78127 +retmeJ: # @retmeJretmeJ2648,78268 +.Lfunc_end55:Lfunc_end552655,78526 +fn1J: # @fn1Jfn1J2662,78661 +.Lfunc_end56:Lfunc_end562675,79055 +fn2J: # @fn2Jfn2J2682,79186 +.Lfunc_end57:Lfunc_end572697,79640 +retitJ: # @retitJretitJ2704,79779 +.Lfunc_end58:Lfunc_end582713,80080 +fn3J: # @fn3Jfn3J2720,80215 +.Lfunc_end59:Lfunc_end592743,80887 +testJ: # @testJtestJ2750,81022 +.LBB60_2: # %if.thenLBB60_22856,84260 +.Lfunc_end60:Lfunc_end602861,84402 +retmeK: # @retmeKretmeK2868,84543 +.Lfunc_end61:Lfunc_end612875,84781 +fn1K: # @fn1Kfn1K2882,84916 +.Lfunc_end62:Lfunc_end622893,85254 +fn2K: # @fn2Kfn2K2900,85385 +.Lfunc_end63:Lfunc_end632913,85779 +retitK: # @retitKretitK2920,85918 +.Lfunc_end64:Lfunc_end642929,86215 +fn3K: # @fn3Kfn3K2936,86350 +.Lfunc_end65:Lfunc_end652956,86927 +testK: # @testKtestK2963,87062 +.Lfunc_end66:Lfunc_end663032,89181 +retmeL: # @retmeLretmeL3039,89322 +.Lfunc_end67:Lfunc_end673046,89580 +fn1L: # @fn1Lfn1L3053,89715 +.Lfunc_end68:Lfunc_end683064,90053 +fn2L: # @fn2Lfn2L3071,90184 +.Lfunc_end69:Lfunc_end693084,90578 +retitL: # @retitLretitL3091,90717 +.Lfunc_end70:Lfunc_end703100,91014 +fn3L: # @fn3Lfn3L3107,91149 +.Lfunc_end71:Lfunc_end713127,91726 +testL: # @testLtestL3134,91861 +.LBB72_2: # %if.thenLBB72_23272,96102 +.Lfunc_end72:Lfunc_end723277,96244 +retmeM: # @retmeMretmeM3284,96385 +.Lfunc_end73:Lfunc_end733291,96643 +fn1M: # @fn1Mfn1M3298,96778 +.Lfunc_end74:Lfunc_end743309,97118 +fn2M: # @fn2Mfn2M3316,97249 +.Lfunc_end75:Lfunc_end753329,97645 +retitM: # @retitMretitM3336,97784 +.Lfunc_end76:Lfunc_end763345,98083 +fn3M: # @fn3Mfn3M3352,98218 +.Lfunc_end77:Lfunc_end773372,98799 +testM: # @testMtestM3379,98934 +.LBB78_2: # %if.thenLBB78_23516,103157 +.Lfunc_end78:Lfunc_end783521,103299 +retmeN: # @retmeNretmeN3528,103440 +.Lfunc_end79:Lfunc_end793535,103678 +fn1N: # @fn1Nfn1N3542,103813 +.Lfunc_end80:Lfunc_end803555,104206 +fn2N: # @fn2Nfn2N3562,104337 +.Lfunc_end81:Lfunc_end813577,104786 +retitN: # @retitNretitN3584,104925 +.Lfunc_end82:Lfunc_end823595,105277 +fn3N: # @fn3Nfn3N3602,105412 +.Lfunc_end83:Lfunc_end833628,106174 +testN: # @testNtestN3635,106309 +.LBB84_5: # %if.then106LBB84_53841,112873 +.Lfunc_end84:Lfunc_end843846,113018 +retmeO: # @retmeOretmeO3853,113159 +.Lfunc_end85:Lfunc_end853866,113554 +fn1O: # @fn1Ofn1O3873,113689 +.Lfunc_end86:Lfunc_end863884,114031 +fn2O: # @fn2Ofn2O3891,114162 +.Lfunc_end87:Lfunc_end873904,114560 +retitO: # @retitOretitO3911,114699 +.Lfunc_end88:Lfunc_end883920,115000 +fn3O: # @fn3Ofn3O3927,115135 +.Lfunc_end89:Lfunc_end893949,115786 +testO: # @testOtestO3956,115921 +.LBB90_5: # %if.then93LBB90_54226,124572 +.Lfunc_end90:Lfunc_end904231,124716 +retmeP: # @retmePretmeP4238,124857 +.Lfunc_end91:Lfunc_end914251,125252 +fn1P: # @fn1Pfn1P4258,125387 +.Lfunc_end92:Lfunc_end924269,125727 +fn2P: # @fn2Pfn2P4276,125858 +.Lfunc_end93:Lfunc_end934289,126254 +retitP: # @retitPretitP4296,126393 +.Lfunc_end94:Lfunc_end944305,126692 +fn3P: # @fn3Pfn3P4312,126827 +.Lfunc_end95:Lfunc_end954334,127474 +testP: # @testPtestP4341,127609 +.LBB96_5: # %if.then89LBB96_54611,136256 +.Lfunc_end96:Lfunc_end964616,136401 +retmeQ: # @retmeQretmeQ4623,136542 +.Lfunc_end97:Lfunc_end974636,136937 +fn1Q: # @fn1Qfn1Q4643,137072 +.Lfunc_end98:Lfunc_end984654,137412 +fn2Q: # @fn2Qfn2Q4661,137543 +.Lfunc_end99:Lfunc_end994674,137939 +retitQ: # @retitQretitQ4681,138078 +.Lfunc_end100:Lfunc_end1004690,138377 +fn3Q: # @fn3Qfn3Q4697,138514 +.Lfunc_end101:Lfunc_end1014717,139095 +testQ: # @testQtestQ4724,139232 +.Lfunc_end102:Lfunc_end1024903,144815 +retmeR: # @retmeRretmeR4910,144958 +.Lfunc_end103:Lfunc_end1034923,145353 +fn1R: # @fn1Rfn1R4930,145490 +.Lfunc_end104:Lfunc_end1044941,145830 +fn2R: # @fn2Rfn2R4948,145963 +.Lfunc_end105:Lfunc_end1054961,146359 +retitR: # @retitRretitR4968,146500 +.Lfunc_end106:Lfunc_end1064977,146799 +fn3R: # @fn3Rfn3R4984,146936 +.Lfunc_end107:Lfunc_end1075004,147517 +testR: # @testRtestR5011,147654 +.Lfunc_end108:Lfunc_end1085190,153237 +retmeS: # @retmeSretmeS5197,153380 +.Lfunc_end109:Lfunc_end1095210,153775 +fn1S: # @fn1Sfn1S5217,153912 +.Lfunc_end110:Lfunc_end1105228,154253 +fn2S: # @fn2Sfn2S5235,154386 +.Lfunc_end111:Lfunc_end1115248,154783 +retitS: # @retitSretitS5255,154924 +.Lfunc_end112:Lfunc_end1125264,155224 +fn3S: # @fn3Sfn3S5271,155361 +.Lfunc_end113:Lfunc_end1135291,155945 +testS: # @testStestS5298,156082 +.LBB114_2: # %if.then133LBB114_25479,161704 +.Lfunc_end114:Lfunc_end1145484,161850 +retmeT: # @retmeTretmeT5491,161993 +.Lfunc_end115:Lfunc_end1155498,162251 +fn1T: # @fn1Tfn1T5505,162388 +.Lfunc_end116:Lfunc_end1165516,162725 +fn2T: # @fn2Tfn2T5523,162858 +.Lfunc_end117:Lfunc_end1175536,163255 +retitT: # @retitTretitT5543,163396 +.Lfunc_end118:Lfunc_end1185552,163696 +fn3T: # @fn3Tfn3T5559,163833 +.Lfunc_end119:Lfunc_end1195579,164417 +testT: # @testTtestT5586,164554 +.LBB120_3: # %if.then139LBB120_35694,167885 +.Lfunc_end120:Lfunc_end1205699,168031 +retmeU: # @retmeUretmeU5706,168174 +.Lfunc_end121:Lfunc_end1215719,168569 +fn1U: # @fn1Ufn1U5726,168706 +.Lfunc_end122:Lfunc_end1225739,169102 +fn2U: # @fn2Ufn2U5746,169235 +.Lfunc_end123:Lfunc_end1235761,169687 +retitU: # @retitUretitU5768,169828 +.Lfunc_end124:Lfunc_end1245779,170183 +fn3U: # @fn3Ufn3U5786,170320 +.Lfunc_end125:Lfunc_end1255811,171051 +testU: # @testUtestU5818,171188 +.LBB126_6: # %if.then135LBB126_66113,180657 +.Lfunc_end126:Lfunc_end1266118,180803 +retmeV: # @retmeVretmeV6125,180946 +.Lfunc_end127:Lfunc_end1276132,181204 +fn1V: # @fn1Vfn1V6139,181341 +.Lfunc_end128:Lfunc_end1286152,181733 +fn2V: # @fn2Vfn2V6159,181866 +.Lfunc_end129:Lfunc_end1296172,182264 +retitV: # @retitVretitV6179,182405 +.Lfunc_end130:Lfunc_end1306188,182706 +fn3V: # @fn3Vfn3V6195,182843 +.Lfunc_end131:Lfunc_end1316220,183575 +testV: # @testVtestV6227,183712 +.LBB132_5: # %if.then141LBB132_56406,189406 +.Lfunc_end132:Lfunc_end1326411,189552 +retmeW: # @retmeWretmeW6418,189695 +.Lfunc_end133:Lfunc_end1336443,190420 +fn1W: # @fn1Wfn1W6450,190557 +.Lfunc_end134:Lfunc_end1346461,190900 +fn2W: # @fn2Wfn2W6468,191033 +.Lfunc_end135:Lfunc_end1356481,191432 +retitW: # @retitWretitW6488,191573 +.Lfunc_end136:Lfunc_end1366497,191875 +fn3W: # @fn3Wfn3W6504,192012 +.Lfunc_end137:Lfunc_end1376524,192599 +testW: # @testWtestW6531,192736 +.LBB138_1: # %for.bodyLBB138_16535,192878 +.Lfunc_end138:Lfunc_end1386635,195999 +retmeX: # @retmeXretmeX6642,196142 +.Lfunc_end139:Lfunc_end1396667,196867 +fn1X: # @fn1Xfn1X6674,197004 +.Lfunc_end140:Lfunc_end1406685,197344 +fn2X: # @fn2Xfn2X6692,197477 +.Lfunc_end141:Lfunc_end1416705,197873 +retitX: # @retitXretitX6712,198014 +.Lfunc_end142:Lfunc_end1426721,198313 +fn3X: # @fn3Xfn3X6728,198450 +.Lfunc_end143:Lfunc_end1436748,199031 +testX: # @testXtestX6755,199168 +.LBB144_1: # %for.bodyLBB144_16759,199310 +.Lfunc_end144:Lfunc_end1446859,202423 +retmeY: # @retmeYretmeY6866,202566 +.Lfunc_end145:Lfunc_end1456891,203291 +fn1Y: # @fn1Yfn1Y6898,203428 +.Lfunc_end146:Lfunc_end1466909,203768 +fn2Y: # @fn2Yfn2Y6916,203901 +.Lfunc_end147:Lfunc_end1476929,204297 +retitY: # @retitYretitY6936,204438 +.Lfunc_end148:Lfunc_end1486945,204737 +fn3Y: # @fn3Yfn3Y6952,204874 +.Lfunc_end149:Lfunc_end1496972,205455 +testY: # @testYtestY6979,205592 +.LBB150_1: # %for.bodyLBB150_16983,205734 +.Lfunc_end150:Lfunc_end1507083,208847 +retmeZ: # @retmeZretmeZ7090,208990 +.Lfunc_end151:Lfunc_end1517115,209715 +fn1Z: # @fn1Zfn1Z7122,209852 +.Lfunc_end152:Lfunc_end1527135,210249 +fn2Z: # @fn2Zfn2Z7142,210382 +.Lfunc_end153:Lfunc_end1537157,210837 +retitZ: # @retitZretitZ7164,210978 +.Lfunc_end154:Lfunc_end1547173,211279 +fn3Z: # @fn3Zfn3Z7180,211416 +.Lfunc_end155:Lfunc_end1557196,211894 +testZ: # @testZtestZ7203,212031 +.LBB156_1: # %for.bodyLBB156_17207,212183 +.LBB156_7: # %if.then120LBB156_77339,216426 +.Lfunc_end156:Lfunc_end1567344,216572 +main: # @mainmain7351,216707 +.Lfunc_end157:Lfunc_end1577384,217544 +sA:sA7399,217869 +sB:sB7408,218007 +sC:sC7417,218145 +sD:sD7426,218283 +sE:sE7435,218421 +sF:sF7444,218561 +sG:sG7453,218701 +sH:sH7462,218841 +sI:sI7471,218981 +sJ:sJ7480,219121 +sK:sK7489,219259 +sL:sL7498,219397 +sM:sM7507,219535 +sN:sN7516,219673 +sO:sO7525,219811 +sP:sP7534,219951 +sQ:sQ7543,220091 +sR:sR7552,220231 +sS:sS7561,220371 +sT:sT7570,220511 +sU:sU7579,220649 +sV:sV7588,220789 +sW:sW7597,220927 +sX:sX7606,221067 +sY:sY7615,221207 +sZ:sZ7624,221347 + +externals/binaryen/test/torture-s/va-arg-24.c.s,7631 +main: # @mainmain7,215 +.LBB0_2: # %if.thenLBB0_2162,5010 +.Lfunc_end0:Lfunc_end0167,5152 +varargs0: # @varargs0varargs0172,5262 +.LBB1_2:LBB1_2229,6806 +.LBB1_3: # =>This Inner Loop Header: Depth=1LBB1_3232,6876 +.LBB1_4: # %for.inc.i.for.body.i_crit_edgeLBB1_4245,7326 +.LBB1_6: # %if.then.iLBB1_6260,7914 +.LBB1_8: # %for.inc.iLBB1_8279,8586 +.LBB1_10: # %verify.exitLBB1_10288,8993 +.LBB1_11: # in Loop: Header=BB1_3 Depth=1LBB1_11295,9220 +.LBB1_12: # in Loop: Header=BB1_3 Depth=1LBB1_12299,9399 +.LBB1_13:LBB1_13303,9578 +.Lfunc_end1:Lfunc_end1306,9608 +varargs1: # @varargs1varargs1311,9726 +.LBB2_2:LBB2_2366,11233 +.LBB2_3: # =>This Inner Loop Header: Depth=1LBB2_3369,11304 +.LBB2_4: # %for.inc.i.for.body.i_crit_edgeLBB2_4382,11760 +.LBB2_6: # %if.then.iLBB2_6397,12351 +.LBB2_8: # %for.inc.iLBB2_8416,13027 +.LBB2_10: # %verify.exitLBB2_10425,13437 +.LBB2_11: # in Loop: Header=BB2_3 Depth=1LBB2_11432,13665 +.LBB2_12: # in Loop: Header=BB2_3 Depth=1LBB2_12436,13846 +.LBB2_13:LBB2_13440,14027 +.Lfunc_end2:Lfunc_end2443,14057 +varargs2: # @varargs2varargs2448,14175 +.LBB3_2:LBB3_2503,15683 +.LBB3_3: # =>This Inner Loop Header: Depth=1LBB3_3506,15754 +.LBB3_4: # %for.inc.i.for.body.i_crit_edgeLBB3_4519,16210 +.LBB3_6: # %if.then.iLBB3_6534,16801 +.LBB3_8: # %for.inc.iLBB3_8553,17477 +.LBB3_10: # %verify.exitLBB3_10562,17887 +.LBB3_11: # in Loop: Header=BB3_3 Depth=1LBB3_11569,18115 +.LBB3_12: # in Loop: Header=BB3_3 Depth=1LBB3_12573,18296 +.LBB3_13:LBB3_13577,18477 +.Lfunc_end3:Lfunc_end3580,18507 +varargs3: # @varargs3varargs3585,18625 +.LBB4_2:LBB4_2640,20134 +.LBB4_3: # =>This Inner Loop Header: Depth=1LBB4_3643,20205 +.LBB4_4: # %for.inc.i.for.body.i_crit_edgeLBB4_4656,20661 +.LBB4_6: # %if.then.iLBB4_6671,21252 +.LBB4_8: # %for.inc.iLBB4_8690,21928 +.LBB4_10: # %verify.exitLBB4_10699,22338 +.LBB4_11: # in Loop: Header=BB4_3 Depth=1LBB4_11706,22566 +.LBB4_12: # in Loop: Header=BB4_3 Depth=1LBB4_12710,22747 +.LBB4_13:LBB4_13714,22928 +.Lfunc_end4:Lfunc_end4717,22958 +varargs4: # @varargs4varargs4722,23076 +.LBB5_2:LBB5_2775,24547 +.LBB5_3: # =>This Inner Loop Header: Depth=1LBB5_3778,24618 +.LBB5_4: # %for.inc.i.for.body.i_crit_edgeLBB5_4791,25074 +.LBB5_6: # %if.then.iLBB5_6806,25665 +.LBB5_8: # %for.inc.iLBB5_8825,26341 +.LBB5_10: # %verify.exitLBB5_10834,26751 +.LBB5_11: # in Loop: Header=BB5_3 Depth=1LBB5_11841,26979 +.LBB5_12: # in Loop: Header=BB5_3 Depth=1LBB5_12845,27160 +.LBB5_13:LBB5_13849,27341 +.Lfunc_end5:Lfunc_end5852,27371 +varargs5: # @varargs5varargs5857,27489 +.LBB6_2:LBB6_2908,28923 +.LBB6_3: # =>This Inner Loop Header: Depth=1LBB6_3911,28995 +.LBB6_4: # %for.inc.i.for.body.i_crit_edgeLBB6_4924,29452 +.LBB6_6: # %if.then.iLBB6_6939,30044 +.LBB6_8: # %for.inc.iLBB6_8958,30721 +.LBB6_10: # %verify.exitLBB6_10967,31132 +.LBB6_11: # in Loop: Header=BB6_3 Depth=1LBB6_11974,31360 +.LBB6_12: # in Loop: Header=BB6_3 Depth=1LBB6_12978,31542 +.LBB6_13:LBB6_13982,31724 +.Lfunc_end6:Lfunc_end6985,31754 +varargs6: # @varargs6varargs6990,31872 +.LBB7_2:LBB7_21041,33321 +.LBB7_3: # =>This Inner Loop Header: Depth=1LBB7_31044,33393 +.LBB7_4: # %for.inc.i.for.body.i_crit_edgeLBB7_41057,33850 +.LBB7_6: # %if.then.iLBB7_61072,34442 +.LBB7_8: # %for.inc.iLBB7_81091,35124 +.LBB7_10: # %verify.exitLBB7_101100,35535 +.LBB7_11: # in Loop: Header=BB7_3 Depth=1LBB7_111107,35764 +.LBB7_12: # in Loop: Header=BB7_3 Depth=1LBB7_121111,35946 +.LBB7_13:LBB7_131115,36128 +.Lfunc_end7:Lfunc_end71118,36158 +varargs7: # @varargs7varargs71123,36276 +.LBB8_2:LBB8_21172,37687 +.LBB8_3: # =>This Inner Loop Header: Depth=1LBB8_31175,37759 +.LBB8_4: # %for.inc.i.for.body.i_crit_edgeLBB8_41188,38216 +.LBB8_6: # %if.then.iLBB8_61203,38810 +.LBB8_8: # %for.inc.iLBB8_81222,39493 +.LBB8_10: # %verify.exitLBB8_101231,39904 +.LBB8_11: # in Loop: Header=BB8_3 Depth=1LBB8_111238,40133 +.LBB8_12: # in Loop: Header=BB8_3 Depth=1LBB8_121242,40315 +.LBB8_13:LBB8_131246,40497 +.Lfunc_end8:Lfunc_end81249,40527 +varargs8: # @varargs8varargs81254,40645 +.LBB9_2:LBB9_21303,42052 +.LBB9_3: # =>This Inner Loop Header: Depth=1LBB9_31306,42124 +.LBB9_4: # %for.inc.i.for.body.i_crit_edgeLBB9_41319,42581 +.LBB9_6: # %if.then.iLBB9_61334,43178 +.LBB9_8: # %for.inc.iLBB9_81353,43861 +.LBB9_10: # %verify.exitLBB9_101362,44272 +.LBB9_11: # in Loop: Header=BB9_3 Depth=1LBB9_111369,44501 +.LBB9_12: # in Loop: Header=BB9_3 Depth=1LBB9_121373,44683 +.LBB9_13:LBB9_131377,44865 +.Lfunc_end9:Lfunc_end91380,44895 +varargs9: # @varargs9varargs91385,45013 +.LBB10_2:LBB10_21429,46314 +.LBB10_3: # =>This Inner Loop Header: Depth=1LBB10_31432,46387 +.LBB10_4: # %for.inc.i.for.body.i_crit_edgeLBB10_41445,46844 +.LBB10_6: # %if.then.iLBB10_61460,47444 +.LBB10_8: # %for.inc.iLBB10_81479,48132 +.LBB10_10: # %verify.exitLBB10_101488,48546 +.LBB10_11: # in Loop: Header=BB10_3 Depth=1LBB10_111495,48775 +.LBB10_12: # in Loop: Header=BB10_3 Depth=1LBB10_121499,48958 +.LBB10_13:LBB10_131503,49141 +.Lfunc_end10:Lfunc_end101506,49172 +errors:errors1512,49314 + +externals/binaryen/test/torture-s/921208-2.c.s,261 +g: # @gg7,197 +.Lfunc_end0:Lfunc_end014,421 +f: # @ff21,532 +.Lfunc_end1:Lfunc_end128,756 +main: # @mainmain35,879 +.Lfunc_end2:Lfunc_end242,1066 + +externals/binaryen/test/torture-s/lshrdi-1.c.s,368 +main: # @mainmain7,209 +.LBB0_1: # %for.bodyLBB0_113,393 +.LBB0_4: # %constant_shift.exitLBB0_436,1232 +.LBB0_7: # %if.then9LBB0_758,2008 +.LBB0_8: # %if.thenLBB0_862,2141 +.Lfunc_end0:Lfunc_end067,2283 + +externals/binaryen/test/torture-s/960327-1.c.s,398 +g: # @gg7,197 +.Lfunc_end0:Lfunc_end013,406 +f: # @ff20,517 +.LBB1_1: # %while.condLBB1_146,1325 +.LBB1_4: # %if.thenLBB1_476,2295 +.Lfunc_end1:Lfunc_end181,2437 +main: # @mainmain88,2560 +.Lfunc_end2:Lfunc_end296,2776 + +externals/binaryen/test/torture-s/builtin-constant.c.s,245 +foo: # @foofoo7,213 +.LBB0_2: # %if.thenLBB0_217,521 +.Lfunc_end0:Lfunc_end022,663 +main: # @mainmain29,790 +.Lfunc_end1:Lfunc_end140,1091 + +externals/binaryen/test/torture-s/920929-1.c.s,175 +f: # @ff7,197 +.Lfunc_end0:Lfunc_end015,435 +main: # @mainmain22,558 +.Lfunc_end1:Lfunc_end129,745 + +externals/binaryen/test/torture-s/floatunsisf-1.c.s,197 +main: # @mainmain7,214 +.LBB0_2: # %if.endLBB0_228,822 +.Lfunc_end0:Lfunc_end034,993 +u:u42,1147 +f1:f151,1319 +f2:f260,1490 + +externals/binaryen/test/torture-s/vrp-7.c.s,259 +foo: # @foofoo7,202 +.Lfunc_end0:Lfunc_end023,680 +main: # @mainmain30,807 +.LBB1_2: # %if.thenLBB1_245,1248 +.Lfunc_end1:Lfunc_end150,1390 +t:t58,1541 + +externals/binaryen/test/torture-s/961026-1.c.s,181 +test: # @testtest7,209 +.Lfunc_end0:Lfunc_end015,465 +main: # @mainmain22,594 +.Lfunc_end1:Lfunc_end129,783 + +externals/binaryen/test/use-import-and-drop.asm.js,125 + function test1() {test15,130 + function test2() {test211,534 +Module["asm"] = (function(global, env, buffer) {Module1,0 + +externals/binaryen/test/hello_world.2asm.js,85 + function add(x, y) {add15,564 +function asmFunc(global, env, buffer) {asmFunc1,0 + +externals/binaryen/test/fasta.cpp,2435 +void puts_limited(char *x)puts_limited11,231 +struct Random {Random28,466 + enum { IM = 139968, IA = 3877, IC = 29573 };__anon423ef79d010329,482 + enum { IM = 139968, IA = 3877, IC = 29573 };IM29,482 + enum { IM = 139968, IA = 3877, IC = 29573 };IA29,482 + enum { IM = 139968, IA = 3877, IC = 29573 };IC29,482 + Random() : last(42) {}Random30,530 + float get( float max = 1.0f ) {get31,556 + unsigned int last;last36,675 +} rng;rng37,697 +struct IUB {IUB39,705 + int c;c40,718 + double p;p41,728 + unsigned int pi;pi42,741 +struct Cumulative {Cumulative45,765 + enum { slots = 512, };__anon423ef79d020346,785 + enum { slots = 512, };slots46,785 + Cumulative( IUB *start ) {Cumulative48,812 + const char operator[] ( float pct ) const {__anon423ef79d030265,1218 + IUB *table[slots + 1];table73,1408 +static const size_t lineLength = 60;lineLength76,1438 +struct LineBuffer {LineBuffer78,1476 + LineBuffer() : lastN(0) {}LineBuffer79,1496 + LineBuffer &genrand( Cumulative &table, size_t N ) {genrand80,1526 + void writeline() { puts_limited(buffer); }writeline89,1795 + char buffer[lineLength + 2];buffer91,1852 + size_t lastN;lastN92,1884 +struct RotatingString {RotatingString95,1905 + RotatingString( const char *in ) : pos(0) {RotatingString96,1929 + ~RotatingString() { delete[] buffer; }~RotatingString102,2133 + void write( size_t bytes ) {write103,2175 + char *buffer;buffer115,2465 + size_t size, pos;size116,2482 + size_t size, pos;pos116,2482 +void makeFasta( const char *id, const char *desc, size_t N, Output &output ) {makeFasta120,2532 +struct Repeater {Repeater128,2747 + Repeater( const char *alu ) : rot(alu) {}Repeater129,2765 + void writeline( size_t bytes ) { rot.write( bytes ); }writeline130,2810 + void run( const char *id, const char *desc, size_t N ) {run131,2868 + RotatingString rot;rot135,2983 +struct Randomized {Randomized138,3010 + Randomized( IUB *start ) : table(start) {}Randomized139,3030 + void writeline( size_t bytes ) { line.genrand(table, bytes).writeline(); }writeline140,3076 + void run( const char *id, const char *desc, size_t N ) {run141,3154 + Cumulative table;table145,3269 + LineBuffer line;line146,3290 +IUB iub[] = {iub149,3314 +IUB homosapiens[] = {homosapiens169,3669 +static const char alu[] =alu177,3855 +int main( int argc, const char *argv[] ) {main186,4212 + +externals/binaryen/test/__init__.py,0 + +externals/binaryen/test/min.2asm.js,0 + +externals/binaryen/test/hello_world.c,23 +int main() {main3,19 + +externals/binaryen/test/float_ops.cpp,1834 +double EMSCRIPTEN_KEEPALIVE dneg(double x) { return -x; }dneg8,86 +double EMSCRIPTEN_KEEPALIVE dfloor(double x) { return floor(x); }dfloor9,144 +double EMSCRIPTEN_KEEPALIVE dadd(double x, double y) { return x + y; }dadd12,221 +double EMSCRIPTEN_KEEPALIVE dsub(double x, double y) { return x - y; }dsub13,292 +double EMSCRIPTEN_KEEPALIVE dmul(double x, double y) { return x * y; }dmul14,363 +double EMSCRIPTEN_KEEPALIVE ddiv(double x, double y) { return x / y; }ddiv15,434 +double EMSCRIPTEN_KEEPALIVE dcopysign(double x, double y) { return std::copysign(x, y); }dcopysign16,505 +double EMSCRIPTEN_KEEPALIVE dmin(double x, double y) { return std::min(x, y); }dmin17,595 +double EMSCRIPTEN_KEEPALIVE dmax(double x, double y) { return std::max(x, y); }dmax18,675 +int EMSCRIPTEN_KEEPALIVE deq(double x, double y) { return x == y; }deq21,771 +int EMSCRIPTEN_KEEPALIVE dne(double x, double y) { return x != y; }dne22,839 +int EMSCRIPTEN_KEEPALIVE dlt(double x, double y) { return x < y; }dlt23,907 +int EMSCRIPTEN_KEEPALIVE dle(double x, double y) { return x <= y; }dle24,974 +int EMSCRIPTEN_KEEPALIVE dgt(double x, double y) { return x > y; }dgt25,1042 +int EMSCRIPTEN_KEEPALIVE dge(double x, double y) { return x >= y; }dge26,1109 +double EMSCRIPTEN_KEEPALIVE int_to_double(int x) {int_to_double28,1178 +double EMSCRIPTEN_KEEPALIVE uint_to_double(unsigned x) {uint_to_double33,1267 +int EMSCRIPTEN_KEEPALIVE double_to_int(double d) {double_to_int38,1362 +int EMSCRIPTEN_KEEPALIVE double_to_uint(double d) {double_to_uint44,1454 +float EMSCRIPTEN_KEEPALIVE int_to_float(int x) {int_to_float50,1552 +float EMSCRIPTEN_KEEPALIVE uint_to_float(unsigned x) {uint_to_float55,1638 +int EMSCRIPTEN_KEEPALIVE float_to_int(float d) {float_to_int60,1730 +int EMSCRIPTEN_KEEPALIVE float_to_uint(float d) {float_to_uint66,1820 + +externals/binaryen/test/unit.asm.js,3728 + function big_negative() {big_negative32,960 + function importedDoubles() {importedDoubles40,1133 + function doubleCompares(x, y) {doubleCompares47,1306 + function intOps() {intOps58,1580 + function hexLiterals() {hexLiterals62,1642 + function conversions() {conversions66,1731 + function seq() {seq73,1870 + function switcher(x) {switcher77,1943 + function blocker() {blocker132,2750 + function frem() {frem137,2807 + function big_uint_div_u() {big_uint_div_u140,2856 + function fr(x) {fr145,2952 + function negZero() {negZero155,3160 + function abs() {abs158,3203 + function minmax() {minmax164,3366 + function neg() {neg171,3638 + function cneg(x) {cneg176,3746 + function ___syscall_ret() {___syscall_ret180,3827 + function smallCompare() {smallCompare184,3911 + function cneg_nosemicolon() {cneg_nosemicolon190,4071 + function forLoop() {forLoop193,4155 + function ceiling_32_64(u, B) {ceiling_32_64199,4267 + function aborts() {aborts206,4477 + function continues() {continues213,4594 + function bitcasts(i, f) {bitcasts223,4765 +function asm(global, env, buffer) {asm1,0 + function recursiveBlockMerging(x) {recursiveBlockMerging232,5232 + function lb(a) {lb239,5558 + function forgetMe() {forgetMe245,5642 + function exportMe() {exportMe248,5683 + function zeroInit(x) {zeroInit252,5726 + function phi() {phi265,5994 + function smallIf() {smallIf277,6151 + function dropCall() {dropCall287,6292 + function useSetGlobal() {useSetGlobal296,6479 + function usesSetGlobal2() {usesSetGlobal2303,6588 + function breakThroughMany($s) {breakThroughMany307,6654 + function ifChainEmpty(label) {ifChainEmpty323,6864 + function heap8NoShift(x) {heap8NoShift334,7046 + function conditionalTypeFun() {conditionalTypeFun339,7124 + function loadSigned(x) {loadSigned345,7276 + function z(x) {z357,7675 + function w() {w360,7721 + function globalOpts() {globalOpts364,7759 + function dropCallImport() {dropCallImport381,8135 + function loophi(x, y) {loophi385,8214 + function loophi2() {loophi2407,8582 + function relooperJumpThreading(x) {relooperJumpThreading431,8951 + function relooperJumpThreading__ZN4game14preloadweaponsEv() {relooperJumpThreading__ZN4game14preloadweaponsEv529,10397 + function relooperJumpThreading_irreducible(x) {relooperJumpThreading_irreducible555,10918 + function __Z12multi_varargiz($0) {__Z12multi_varargiz586,11686 + function jumpThreadDrop() {jumpThreadDrop603,12021 + function dropIgnoredImportInIf($0,$1,$2) {dropIgnoredImportInIf618,12375 + function big_fround() {big_fround633,12580 + function dropIgnoredImportsInIf($0,$1,$2) {dropIgnoredImportsInIf637,12647 + function f32_ucast(x) {f32_ucast651,12849 + function f32_scast(x) {f32_scast655,12925 + function store_fround(x) {store_fround660,13000 + function relocatableAndModules() {relocatableAndModules665,13085 + function exported_f32_user(x, y, z) {exported_f32_user671,13286 + function sqrts(x) {sqrts678,13409 + function f2u(x) {f2u683,13519 + function f2s(x) {f2s687,13581 + function autoDrop(x) {autoDrop692,13640 + function indirectInSequence() {indirectInSequence706,13862 + function keepAlive() {keepAlive712,14014 + function v() {v720,14144 + function vi(x) {vi722,14165 + function ii(x) {ii725,14203 + var FUNCTION_TABLE_a = [ v, big_negative, v, v ];FUNCTION_TABLE_a730,14260 + var FUNCTION_TABLE_b = [ w, w, importedDoubles, w ];FUNCTION_TABLE_b731,14312 + var FUNCTION_TABLE_c = [ z, cneg, z, z, z, z, z, z ];FUNCTION_TABLE_c732,14367 + var FUNCTION_TABLE_vi = [ vi, vi, vi, vi, vi, vi, vi, vi ];FUNCTION_TABLE_vi733,14423 + var FUNCTION_TABLE_ii = [ ii ];FUNCTION_TABLE_ii734,14485 + +externals/binaryen/test/mem.post.js,66 + function doTest(x) {doTest4,45 +function test(name) {test2,1 + +externals/binaryen/test/float_ops.post.js,163 + function doTest(x) {doTest5,59 +function testUnary(name) {testUnary3,10 + function doTest(x, y) {doTest36,645 +function testBinary(name) {testBinary34,595 + +externals/binaryen/test/i64-setTempRet0.asm.js,162 + function illegalResult() { // illegal result, exportedillegalResult14,391 + function imports() {imports18,481 +function asm(global, env, buffer) {asm7,212 + +externals/binaryen/test/dot_s/export_malloc_free.s,332 +main:main6,87 +.Lfunc_end1:Lfunc_end110,139 +malloc:malloc15,221 +.Lfunc_end20:Lfunc_end2020,289 +free:free25,373 +.Lfunc_end21:Lfunc_end2128,403 +realloc:realloc33,489 +.Lfunc_end22:Lfunc_end2238,563 +memalign:memalign42,641 +.Lfunc_end2:Lfunc_end247,764 +not_a_malloc:not_a_malloc51,864 +.Lfunc_end2:Lfunc_end256,991 + +externals/binaryen/test/dot_s/permute.s,30 +_ZL7permute:_ZL7permute4,51 + +externals/binaryen/test/dot_s/start_main0.s,88 +main: # @mainmain5,57 +.Lfunc_end0:Lfunc_end08,123 + +externals/binaryen/test/dot_s/debug.s,1261 +fib:fib6,69 +.Lfunc_begin0:Lfunc_begin07,74 +.Ltmp0:Ltmp013,175 +.Ltmp1:Ltmp115,201 +.LBB0_1:LBB0_118,246 +.Ltmp2:Ltmp222,297 +.Ltmp3:Ltmp328,455 +.Ltmp4:Ltmp431,508 +.Ltmp5:Ltmp535,568 +.LBB0_3:LBB0_336,576 +.Ltmp6:Ltmp639,613 +.Ltmp7:Ltmp742,646 +.Lfunc_end0:Lfunc_end044,664 +.Linfo_string0:Linfo_string048,744 +.Linfo_string1:Linfo_string150,805 +.Linfo_string2:Linfo_string252,837 +.Linfo_string3:Linfo_string354,884 +.Linfo_string4:Linfo_string456,914 +.Linfo_string5:Linfo_string558,944 +.Linfo_string6:Linfo_string660,972 +.Linfo_string7:Linfo_string762,1000 +.Linfo_string8:Linfo_string864,1028 +.Linfo_string9:Linfo_string966,1056 +.Ldebug_loc0:Ldebug_loc069,1118 +.Ldebug_loc1:Ldebug_loc176,1243 +.Ldebug_loc2:Ldebug_loc289,1459 +.Ldebug_loc3:Ldebug_loc3102,1675 +.Lsection_abbrev:Lsection_abbrev110,1830 +.Lsection_info:Lsection_info217,2921 +.Lcu_begin0:Lcu_begin0218,2937 +.Ldebug_range:Ldebug_range281,3819 +.Ldebug_macinfo:Ldebug_macinfo283,3872 +.Lcu_macro_begin0:Lcu_macro_begin0284,3889 +.LpubNames_begin0:LpubNames_begin0288,3998 +.LpubNames_end0:LpubNames_end0295,4094 +.LpubTypes_begin0:LpubTypes_begin0298,4192 +.LpubTypes_end0:LpubTypes_end0305,4289 +.Lline_table_start0:Lline_table_start0309,4387 + +externals/binaryen/test/dot_s/alias.s,349 +__exit: # @__exit__exit7,80 +.Lfunc_end0:Lfunc_end015,317 +__needs_exit: # @__needs_exit__needs_exit21,438 +.Lfunc_end1:Lfunc_end128,641 +__exit_needed = __exit@FUNCTION__exit_needed34,776 +.L__unnamed_1:L__unnamed_138,850 +._A = .L__unname_1_A45,936 +_B = .L__unnamed_1_B47,966 +._C = _B+8_C50,1010 + +externals/binaryen/test/dot_s/asm_const.s,106 +main: # @mainmain5,75 +.Lfunc_end0:Lfunc_end013,265 +.str:str18,355 + +externals/binaryen/test/dot_s/visibilities.s,137 +foo:foo5,53 +.Lfunc_end0:Lfunc_end08,76 +bar:bar14,167 +.Lfunc_end1:Lfunc_end117,190 +qux:qux23,280 +.Lfunc_end2:Lfunc_end226,303 + +externals/binaryen/test/dot_s/dyncall.c,227 +uint32_t i() {i5,55 +uint32_t i_f(float f) {i_f8,84 +void vd(double d) {vd11,122 +float ffjjdi(float f, uint64_t j, uint64_t j2, double d, uint32_t i) {ffjjdi14,154 +void vd2(double d) {vd219,266 +int main() {main23,300 + +externals/binaryen/test/dot_s/function-data-sections.s,185 +foo:foo5,75 +.Lfunc_end0:Lfunc_end08,98 +bar:bar14,208 +.Lfunc_end1:Lfunc_end119,264 +qux:qux25,374 +.Lfunc_end2:Lfunc_end231,464 +aaa:aaa38,579 +bbb:bbb46,685 +ccc:ccc54,791 + +externals/binaryen/test/dot_s/dso_handle.s,90 +main: # @mainmain5,108 +.Lfunc_end0:Lfunc_end011,285 + +externals/binaryen/test/dot_s/symbolic-offset.s,53 +f:f4,60 +.Lfunc_end0:Lfunc_end010,187 +m:m16,292 + +externals/binaryen/test/dot_s/indirect-import.c,132 +struct big {big3,21 + float a;a4,34 + double b;b5,44 + int32_t c;c6,55 +intptr_t bar() {bar16,261 +intptr_t baz() {baz29,609 + +externals/binaryen/test/dot_s/indidx.s,531 +a: # @aa4,50 +.Lfunc_end0:Lfunc_end011,271 +b: # @bb15,328 +.Lfunc_end1:Lfunc_end122,549 +c: # @cc26,606 +.Lfunc_end2:Lfunc_end233,827 +d: # @dd37,884 +.Lfunc_end3:Lfunc_end344,1105 +main: # @mainmain50,1192 +.LBB4_2: # %trapLBB4_269,1753 +.Lfunc_end4:Lfunc_end474,1880 +.L__unnamed_1:L__unnamed_189,2193 + +externals/binaryen/test/dot_s/memops.s,371 +_Z6reporti: # @_Z6reporti_Z6reporti4,68 +.Lfunc_end0:Lfunc_end013,280 +main: # @mainmain18,371 +.LBB1_1: # %.preheader1LBB1_131,777 +.LBB1_2: # Parent Loop .LBB1_1 Depth=1LBB1_238,1102 +.Lfunc_end1:Lfunc_end191,2379 +.str:str96,2469 + +externals/binaryen/test/dot_s/return.s,230 +return_i32:return_i324,54 +.Lfunc_end0:Lfunc_end08,119 +return_void:return_void13,224 +.Lfunc_end0:Lfunc_end015,254 +fallthrough_return_nested_loop_i32:fallthrough_return_nested_loop_i3219,365 +.Lfunc_end0:Lfunc_end028,523 + +externals/binaryen/test/dot_s/data-offset-folding.s,46 +pad:pad5,80 +arr:arr10,169 +ptr:ptr17,286 + +externals/binaryen/test/dot_s/globals.s,440 +globals:globals4,57 +.Lfunc_end0:Lfunc_end012,284 +import_globals:import_globals17,400 +.Lfunc_end0:Lfunc_end025,643 +globals_offset:globals_offset30,773 +.Lfunc_end0:Lfunc_end038,1015 +import_globals_offset:import_globals_offset43,1159 +.Lfunc_end0:Lfunc_end051,1417 +local_global:local_global56,1551 +initialized_with_global:initialized_with_global62,1671 +initialized_with_global_offset:initialized_with_global_offset68,1830 + +externals/binaryen/test/dot_s/hostFinalize.s,18 +_main:_main3,37 + +externals/binaryen/test/dot_s/local_align.s,92 +foo:foo4,52 +.Lfunc_end0:Lfunc_end07,81 +main:main13,172 +.Lfunc_end1:Lfunc_end119,278 + +externals/binaryen/test/dot_s/start_main2.s,89 +main: # @mainmain5,57 +.Lfunc_end0:Lfunc_end011,169 + +externals/binaryen/test/dot_s/bcp-1.s,2215 +bad0: # @bad0bad07,189 +.Lfunc_end0:Lfunc_end013,348 +bad1: # @bad1bad120,477 +.Lfunc_end1:Lfunc_end126,636 +bad2: # @bad2bad233,765 +.Lfunc_end2:Lfunc_end240,938 +bad3: # @bad3bad347,1067 +.Lfunc_end3:Lfunc_end354,1240 +bad4: # @bad4bad461,1369 +.Lfunc_end4:Lfunc_end468,1542 +bad5: # @bad5bad575,1671 +.Lfunc_end5:Lfunc_end581,1830 +bad6: # @bad6bad688,1959 +.Lfunc_end6:Lfunc_end695,2132 +bad7: # @bad7bad7102,2261 +.Lfunc_end7:Lfunc_end7108,2420 +bad8: # @bad8bad8115,2549 +.Lfunc_end8:Lfunc_end8121,2708 +bad9: # @bad9bad9128,2837 +.Lfunc_end9:Lfunc_end9135,3010 +bad10: # @bad10bad10142,3143 +.Lfunc_end10:Lfunc_end10148,3303 +good0: # @good0good0155,3440 +.Lfunc_end11:Lfunc_end11161,3600 +good1: # @good1good1168,3737 +.Lfunc_end12:Lfunc_end12174,3897 +good2: # @good2good2181,4034 +.Lfunc_end13:Lfunc_end13187,4194 +opt0: # @opt0opt0194,4327 +.Lfunc_end14:Lfunc_end14200,4486 +opt1: # @opt1opt1207,4617 +.Lfunc_end15:Lfunc_end15213,4776 +opt2: # @opt2opt2220,4907 +.Lfunc_end16:Lfunc_end16226,5066 +main: # @mainmain233,5197 +.LBB17_18: # %if.then40LBB17_18327,8680 +.LBB17_19: # %if.then29LBB17_19331,8814 +.LBB17_20: # %if.then18LBB17_20335,8948 +.LBB17_21: # %if.then7LBB17_21339,9082 +.LBB17_22: # %if.thenLBB17_22343,9215 +.Lfunc_end17:Lfunc_end17348,9357 +bad_t0:bad_t0356,9531 +bad_t1:bad_t1370,9819 +bad_t2:bad_t2381,10040 +good_t0:good_t0391,10242 +opt_t0:opt_t0402,10468 +global:global419,10807 + +externals/binaryen/test/dot_s/alternate-lcomm.s,0 + +externals/binaryen/test/dot_s/text_before_type.s,94 +main:main6,85 +.Lfunc_end1:Lfunc_end111,160 +foo:foo15,231 +.Lfunc_end0:Lfunc_end017,246 + +externals/binaryen/test/dot_s/macClangMetaData.s,137 +main: # @mainmain6,82 +return $pop1return13,294 +.Lfunc_end0:Lfunc_end015,318 +.Lstr:Lstr20,440 + +externals/binaryen/test/dot_s/dyncall.s,541 +i: # @ii7,110 +.Lfunc_end0:Lfunc_end013,318 +i_f: # @i_fi_f20,437 +.Lfunc_end1:Lfunc_end127,661 +vd: # @vdvd34,780 +.Lfunc_end2:Lfunc_end239,960 +ffjjdi: # @ffjjdiffjjdi46,1093 +.Lfunc_end3:Lfunc_end353,1344 +vd2: # @vd2vd260,1473 +.Lfunc_end4:Lfunc_end465,1654 +main: # @mainmain72,1781 +.Lfunc_end5:Lfunc_end593,2262 + +externals/binaryen/test/dot_s/fix_em_ehsjlj_names.s,310 +_Z5func1v:_Z5func1v4,66 +.Lfunc_end0:Lfunc_end06,87 +_Z5func2iii:_Z5func2iii10,170 +.Lfunc_end1:Lfunc_end115,253 +_Z5func3fd:_Z5func3fd19,339 +.Lfunc_end2:Lfunc_end224,420 +_Z5func4P8mystructS_:_Z5func4P8mystructS_28,514 +.Lfunc_end3:Lfunc_end333,601 +main:main39,726 +.Lfunc_end4:Lfunc_end464,1639 + +externals/binaryen/test/dot_s/lcomm-in-text-segment.s,12 +c:c10,186 + +externals/binaryen/test/dot_s/exit.s,48 +main:main5,149 +.Lfunc_end0:Lfunc_end012,252 + +externals/binaryen/test/dot_s/initializers.s,179 +main: # @mainmain5,75 +.Lfunc_end0:Lfunc_end011,193 +f1:f115,268 +.Lfunc_end1:Lfunc_end118,290 +f2:f222,361 +.Lfunc_end2:Lfunc_end225,383 + +externals/binaryen/test/dot_s/indirect-import.s,179 +bar: # @barbar6,92 +.Lfunc_end0:Lfunc_end045,1338 +baz: # @bazbaz51,1426 +.Lfunc_end1:Lfunc_end157,1652 + +externals/binaryen/test/dot_s/basics.s,208 +main: # @mainmain5,75 +.LBB0_1: # %.preheaderLBB0_124,539 +.Lfunc_end0:Lfunc_end057,1428 +.str:str62,1518 +a2:a268,1615 +a3:a375,1758 + +externals/binaryen/test/dot_s/minimal.s,89 +main: # @mainmain5,75 +.Lfunc_end0:Lfunc_end011,193 + +externals/binaryen/test/dot_s/relocation.s,71 +main:main5,64 +.Lfunc_end0:Lfunc_end012,169 +b:b19,257 +a:a26,320 + +externals/binaryen/test/dot_s/unreachable_blocks.s,839 +unreachable_block_void:unreachable_block_void5,82 +.Lfunc_end0:Lfunc_end015,301 +unreachable_block_i32:unreachable_block_i3219,422 +.Lfunc_end0:Lfunc_end026,541 +unreachable_block_i64:unreachable_block_i6430,660 +.Lfunc_end0:Lfunc_end037,779 +unreachable_block_f32:unreachable_block_f3241,898 +.Lfunc_end0:Lfunc_end048,1019 +unreachable_block_f64:unreachable_block_f6452,1138 +.Lfunc_end0:Lfunc_end059,1259 +unreachable_loop_void:unreachable_loop_void63,1378 +.Lfunc_end0:Lfunc_end074,1539 +unreachable_loop_i32:unreachable_loop_i3278,1657 +.Lfunc_end0:Lfunc_end086,1788 +unreachable_loop_i64:unreachable_loop_i6490,1904 +.Lfunc_end0:Lfunc_end098,2035 +unreachable_loop_f32:unreachable_loop_f32102,2151 +.Lfunc_end0:Lfunc_end0110,2284 +unreachable_loop_f64:unreachable_loop_f64114,2400 +.Lfunc_end0:Lfunc_end0122,2534 + +externals/binaryen/test/fannkuch.cpp,251 +struct worker_args {worker_args15,274 + int i, n;i16,295 + int i, n;n16,295 + struct worker_args *next;next17,308 +fannkuch_worker(void *_arg)fannkuch_worker21,345 +fannkuch(int n)fannkuch82,1760 +main(int argc, char **argv)main148,3050 + +externals/binaryen/test/unreachable-import_wasm-only.asm.js,129 +function __ZN10WasmAssertC2Ev__async_cb($0) {__ZN10WasmAssertC2Ev__async_cb89,3312 +function asm(global, env, buffer) {asm1,0 + +externals/binaryen/test/emcc_O2_hello_world.asm.js,2025 +function _malloc(i1) {_malloc81,2511 +function _free(i1) {_free1271,34701 +function ___stdio_write(i1, i2, i3) {___stdio_write1678,44744 +function ___fwritex(i1, i2, i3) {___fwritex1772,47038 +function _fflush(i1) {_fflush1831,48336 +function _strlen(i1) {_strlen1869,49265 +function ___overflow(i1, i2) {___overflow1918,50121 +function ___fflush_unlocked(i1) {___fflush_unlocked1951,50939 +function _memcpy(i1, i2, i3) {_memcpy1972,51606 +function runPostSets() {}runPostSets2003,52240 +function _memset(i1, i2, i3) {_memset2004,52266 +function _puts(i1) {_puts2034,52818 +function ___stdio_seek(i1, i2, i3) {___stdio_seek2052,53372 +function ___towrite(i1) {___towrite2074,53883 +function _fwrite(i1, i2, i3, i4) {_fwrite2096,54360 +function ___stdout_write(i1, i2, i3) {___stdout_write2115,54834 +function copyTempDouble(i1) {copyTempDouble2130,55301 +function ___stdio_close(i1) {___stdio_close2142,55764 +function copyTempFloat(i1) {copyTempFloat2154,56016 +function ___syscall_ret(i1) {___syscall_ret2162,56266 +function dynCall_iiii(i1, i2, i3, i4) {dynCall_iiii2172,56451 +function stackAlloc(i1) {stackAlloc2179,56614 +function ___errno_location() {___errno_location2188,56766 +function setThrew(i1, i2) {setThrew2194,56916 +function _fputs(i1, i2) {_fputs2203,57034 +function dynCall_ii(i1, i2) {dynCall_ii2209,57151 +function _cleanup_418(i1) {_cleanup_4182215,57259 +function establishStackSpace(i1, i2) {establishStackSpace2221,57366 +function dynCall_vi(i1, i2) {dynCall_vi2228,57469 +function b1(i1, i2, i3) {b12234,57566 +function stackRestore(i1) {stackRestore2242,57659 +function setTempRet0(i1) {setTempRet02247,57720 +function b0(i1) {b02252,57780 +function ___unlockfile(i1) {___unlockfile2258,57837 +function ___lockfile(i1) {___lockfile2263,57892 +function getTempRet0() {getTempRet02268,57947 +function _main() {_main2272,57997 +function stackSave() {stackSave2277,58047 +function b2(i1) {b22281,58095 +Module["asm"] = (function(global,env,buffer) {Module1,0 + +externals/binaryen/test/noffi_f32.asm.js,138 + function exportf(a){exportf6,118 + function main(){main10,222 +function(global, env, buffer) {AnonymousFunctioncfd81f3301001,0 + +externals/binaryen/test/calls.cpp,192 +int inner(int x) {inner5,39 +int EMSCRIPTEN_KEEPALIVE simple(int x) {simple9,79 +int EMSCRIPTEN_KEEPALIVE fibo(int x) {fibo13,142 +int EMSCRIPTEN_KEEPALIVE run_script() {run_script18,250 + +externals/binaryen/test/control_flow.cpp,830 +int EMSCRIPTEN_KEEPALIVE check_if(int x) {check_if7,77 +int EMSCRIPTEN_KEEPALIVE check_loop(int x) {check_loop12,154 +int EMSCRIPTEN_KEEPALIVE check_loop_break(int x) {check_loop_break17,240 +int EMSCRIPTEN_KEEPALIVE check_loop_continue(int x) {check_loop_continue26,374 +int EMSCRIPTEN_KEEPALIVE check_do_loop(int x) {check_do_loop35,514 +int EMSCRIPTEN_KEEPALIVE check_do_once(int x) {check_do_once46,686 +int EMSCRIPTEN_KEEPALIVE check_while_forever(int x) {check_while_forever57,852 +int EMSCRIPTEN_KEEPALIVE check_switch(int x) {check_switch68,1020 +int EMSCRIPTEN_KEEPALIVE check_switch_nodefault(int x) {check_switch_nodefault80,1243 +int EMSCRIPTEN_KEEPALIVE check_switch_rdefault(int x) {check_switch_rdefault91,1452 +int EMSCRIPTEN_KEEPALIVE check_switch_fallthrough(int x) {check_switch_fallthrough103,1685 + +externals/binaryen/test/min.asm.js,248 + function floats(f) {floats23,612 + function neg(k, p) {neg28,695 + function bitcasts(i, f) {bitcasts35,830 +function (global, env, buffer) {AnonymousFunctiona57aa37b01001,0 + function ctzzzz() {ctzzzz42,1080 + function ub() {ub45,1136 + +externals/binaryen/test/int_ops.c,1836 +int EMSCRIPTEN_KEEPALIVE clz(int x) { return __builtin_clz(x); }clz4,34 +int EMSCRIPTEN_KEEPALIVE add(int x, int y) { return x + y; }add7,110 +int EMSCRIPTEN_KEEPALIVE sub(int x, int y) { return x - y; }sub8,171 +int EMSCRIPTEN_KEEPALIVE mul(int x, int y) { return x * y; }mul9,232 +int EMSCRIPTEN_KEEPALIVE sdiv(int x, int y) { return x / y; }sdiv10,293 +unsigned EMSCRIPTEN_KEEPALIVE udiv(unsigned x, unsigned y) { return x / y; }udiv11,355 +int EMSCRIPTEN_KEEPALIVE srem(int x, int y) { return x % y; }srem12,432 +unsigned EMSCRIPTEN_KEEPALIVE urem(unsigned x, unsigned y) { return x % y; }urem13,494 +int EMSCRIPTEN_KEEPALIVE and(int x, int y) { return x & y; }and14,571 +int EMSCRIPTEN_KEEPALIVE or(int x, int y) { return x | y; }or15,632 +int EMSCRIPTEN_KEEPALIVE xor(int x, int y) { return x ^ y; }xor16,692 +int EMSCRIPTEN_KEEPALIVE shl(int x, int y) { return x << y; }shl17,753 +int EMSCRIPTEN_KEEPALIVE sshr(int x, int y) { return x >> y; }sshr18,815 +unsigned EMSCRIPTEN_KEEPALIVE ushr(unsigned x, unsigned y) { return x >> y; }ushr19,878 +int EMSCRIPTEN_KEEPALIVE eq(int x, int y) { return x == y; }eq22,972 +int EMSCRIPTEN_KEEPALIVE ne(int x, int y) { return x != y; }ne23,1033 +int EMSCRIPTEN_KEEPALIVE lts(int x, int y) { return x < y; }lts24,1094 +int EMSCRIPTEN_KEEPALIVE ltu(unsigned x, unsigned y) { return x < y; }ltu25,1155 +int EMSCRIPTEN_KEEPALIVE les(int x, int y) { return x <= y; }les26,1226 +int EMSCRIPTEN_KEEPALIVE leu(unsigned x, unsigned y) { return x <= y; }leu27,1288 +int EMSCRIPTEN_KEEPALIVE gts(int x, int y) { return x > y; }gts28,1360 +int EMSCRIPTEN_KEEPALIVE gtu(unsigned x, unsigned y) { return x > y; }gtu29,1421 +int EMSCRIPTEN_KEEPALIVE ges(int x, int y) { return x >= y; }ges30,1492 +int EMSCRIPTEN_KEEPALIVE geu(unsigned x, unsigned y) { return x >= y; }geu31,1554 + +externals/binaryen/test/hello_world.asm.js,80 + function add(x, y) {add3,27 +function () {AnonymousFunctionfea39b7201001,0 + +externals/binaryen/test/noffi_i64.asm.js,129 + function add(a,b) {add5,76 + function main() {main12,206 +function(global, env, buffer) {AnonymousFunction11f0cf5b01001,0 + +externals/binaryen/test/wasm-only.asm.js,1154 + function loads() {loads30,882 + function stores() {stores56,1437 + function test() {test82,1993 + function test64() {test6494,2294 + function imports() {imports152,3755 + function arg(x) { // illegal param, but not exportedarg156,3905 + function illegalParam(a, x, c) {illegalParam161,4041 + function result() { // illegal result, but not exportedresult168,4199 + function illegalResult() { // illegal result, exportedillegalResult171,4289 + function call1(x) {call1174,4378 + function call2(x) {call2180,4509 + function returnCastConst() {returnCastConst185,4645 + function ifValue64($4, $6) {ifValue64188,4700 + function ifValue32($4, $6) {ifValue32201,4948 + function switch64($a444) {switch64214,5211 + function unreachable_leftovers($0,$1,$2) {unreachable_leftovers232,5520 + function switch64TOOMUCH($a444) {switch64TOOMUCH254,5852 + function _memchr($src,$c,$n) {_memchr290,6658 + function keepAlive() {keepAlive419,10809 + function __emscripten_dceable_type_decls() { // dce-able, but this defines the type of fabsf w__emscripten_dceable_type_decls436,11173 +function asm(global, env, buffer) {asm7,197 + +externals/binaryen/test/bigswitch.cpp,93 +const char *WWWGLEnumToString(GLenum e)WWWGLEnumToString6,85 +int main() {main7935,410392 + +externals/binaryen/test/importedSignCast.asm.js,74 + function func() {func6,91 +function asm(global, env, buffer) {asm1,0 + +externals/binaryen/test/emcc_hello_world.asm.js,2531 +function stackAlloc(size) {stackAlloc84,2693 +function stackSave() {stackSave94,2902 +function stackRestore(top) {stackRestore97,2948 +function establishStackSpace(stackBase, stackMax) {establishStackSpace101,3012 +function setThrew(threw, value) {setThrew108,3167 +function copyTempFloat(ptr) {copyTempFloat116,3320 +function copyTempDouble(ptr) {copyTempDouble123,3551 +function setTempRet0(value) {setTempRet0135,3972 +function getTempRet0() {getTempRet0139,4043 +function _main() {_main143,4092 +function _frexp($x,$e) {_frexp152,4354 +function _frexpl($x,$e) {_frexpl193,5473 +function _strerror($e) {_strerror201,5622 +function ___errno_location() {___errno_location264,7023 +function ___stdio_close($f) {___stdio_close279,7404 +function ___stdout_write($f,$buf,$len) {___stdout_write292,7843 +function ___stdio_seek($f,$off,$whence) {___stdio_seek324,8870 +function _fflush($f) {_fflush356,9927 +function _printf($fmt,$varargs) {_printf441,12315 +function ___lockfile($f) {___lockfile453,12660 +function ___unlockfile($f) {___unlockfile459,12752 +function ___stdio_write($f,$buf,$len) {___stdio_write465,12844 +function _vfprintf($f,$fmt,$ap) {_vfprintf596,17410 +function ___fwritex($s,$l,$f) {___fwritex686,20275 +function ___towrite($f) {___towrite775,22845 +function _wcrtomb($s,$wc,$st) {_wcrtomb815,23949 +function _wctomb($s,$wc) {_wctomb908,26708 +function _memchr($src,$c,$n) {_memchr922,26992 +function ___syscall_ret($r) {___syscall_ret1051,31042 +function ___fflush_unlocked($f) {___fflush_unlocked1066,31373 +function _cleanup($p) {_cleanup1114,32702 +function _printf_core($f,$fmt,$ap,$nl_arg,$nl_type) {_printf_core1126,32952 +function _pop_arg_336($arg,$type,$ap) {_pop_arg_3363143,113542 +function _fmt_u($0,$1,$s) {_fmt_u3424,122994 +function _pad($f,$c,$w,$l,$fl) {_pad3486,124878 +function _malloc($bytes) {_malloc3550,126565 +function _free($mem) {_free5851,218527 +function runPostSets() {runPostSets6650,242528 +function _i64Subtract(a, b, c, d) {_i64Subtract6652,242555 +function _i64Add(a, b, c, d) {_i64Add6660,242834 +function _memset(ptr, value, num) {_memset6672,243167 +function _bitshift64Lshr(low, high, bits) {_bitshift64Lshr6700,244064 +function _bitshift64Shl(low, high, bits) {_bitshift64Shl6711,244390 +function _memcpy(dest, src, num) {_memcpy6722,244724 +function _bitshift64Ashr(low, high, bits) {_bitshift64Ashr6750,245499 +function ___muldsi3($a, $b) {___muldsi36763,245921 +Module["asm"] = (function(global, env, buffer) {Module1,0 + +externals/binaryen/test/mem.cpp,1626 +int EMSCRIPTEN_KEEPALIVE loadi8(size_t addr) { return ((int8_t*)addr)[0]; }loadi86,59 +int EMSCRIPTEN_KEEPALIVE loadi16(size_t addr) { return ((int16_t*)addr)[0]; }loadi167,135 +int EMSCRIPTEN_KEEPALIVE loadi32(size_t addr) { return ((int32_t*)addr)[0]; }loadi328,213 +int EMSCRIPTEN_KEEPALIVE loadu8(size_t addr) { return ((uint8_t*)addr)[0]; }loadu810,292 +int EMSCRIPTEN_KEEPALIVE loadu16(size_t addr) { return ((uint16_t*)addr)[0]; }loadu1611,369 +int EMSCRIPTEN_KEEPALIVE loadu32(size_t addr) { return ((uint32_t*)addr)[0]; }loadu3212,448 +double EMSCRIPTEN_KEEPALIVE loadf32(size_t addr) { return ((float*)addr)[0]; }loadf3214,528 +double EMSCRIPTEN_KEEPALIVE loadf64(size_t addr) { return ((double*)addr)[0]; }loadf6415,607 +void EMSCRIPTEN_KEEPALIVE storei8(size_t addr, int8_t v) { ((int8_t*)addr)[0] = v; }storei817,688 +void EMSCRIPTEN_KEEPALIVE storei16(size_t addr, int16_t v) { ((int16_t*)addr)[0] = v; }storei1618,773 +void EMSCRIPTEN_KEEPALIVE storei32(size_t addr, int32_t v) { ((int32_t*)addr)[0] = v; }storei3219,861 +void EMSCRIPTEN_KEEPALIVE storeu8(size_t addr, uint8_t v) { ((uint8_t*)addr)[0] = v; }storeu821,950 +void EMSCRIPTEN_KEEPALIVE storeu16(size_t addr, uint16_t v) { ((uint16_t*)addr)[0] = v; }storeu1622,1037 +void EMSCRIPTEN_KEEPALIVE storeu32(size_t addr, uint32_t v) { ((uint32_t*)addr)[0] = v; }storeu3223,1127 +void EMSCRIPTEN_KEEPALIVE storef32(size_t addr, float v) { ((float*)addr)[0] = v; }storef3225,1218 +void EMSCRIPTEN_KEEPALIVE storef64(size_t addr, double v) { ((double*)addr)[0] = v; }storef6426,1302 +int* EMSCRIPTEN_KEEPALIVE get_stack() {get_stack28,1389 + +externals/binaryen/test/empty.asm.js,41 +function EmptyModule() {EmptyModule1,0 + +externals/binaryen/test/wasm_backend/unaligned_only.cpp,86 +void print(int v) {print4,45 +char buffer[8];buffer12,159 +int main() {main14,176 + +externals/binaryen/test/wasm_backend/hello_world_only.cpp,23 +int main() {main3,25 + +externals/binaryen/test/wasm_backend/i64.load32_u.cpp,116 +volatile uint64_t x = 0x0101010101010101;x4,40 +volatile uint32_t u = 0xfefefefe;u5,82 +int main(void)main7,117 + +externals/binaryen/test/wasm_backend/hello_num_only.cpp,23 +int main() {main3,25 + +externals/binaryen/test/wasm_backend/hello_world_real.cpp,23 +int main() {main3,20 + +externals/binaryen/test/wasm_backend/indirect_call_only.cpp,286 +void print(const char *prefix, int v) {print3,25 +void something() {something13,271 +void more() {more17,319 +void other(int x) {other21,357 +void yet(int x) {yet25,406 +typedef void (*v)();v29,451 +typedef void (*vi)(int);vi30,472 +int main(int argc, char **argv) {main32,498 + +externals/binaryen/test/wasm_backend/i64_load.cpp,379 +struct S1 { unsigned lo:32; unsigned mid:2; unsigned hi:30; };S14,40 +struct S1 { unsigned lo:32; unsigned mid:2; unsigned hi:30; };lo4,40 +struct S1 { unsigned lo:32; unsigned mid:2; unsigned hi:30; };mid4,40 +struct S1 { unsigned lo:32; unsigned mid:2; unsigned hi:30; };hi4,40 +static struct S1 g_68 = { -1, 0, 0xbbe }; // 0xbbe = 3006g_686,104 +int main() {main10,228 + +externals/binaryen/test/wasm_backend/globals_only.cpp,116 +char c = 10;c3,25 +short s = 20;s4,38 +int i = 55;i5,52 +void print(int v) {print7,65 +int main() {main15,179 + +externals/binaryen/test/binaryen.js/kitchen-sink.js,922 +var module;module4,38 +function assert(x) {assert8,63 +function makeInt32(x) {makeInt3212,113 +function makeFloat32(x) {makeFloat3216,170 +function makeInt64(l, h) {makeInt6420,229 +function makeFloat64(x) {makeFloat6424,292 +function makeSomething() {makeSomething28,351 +function makeDroppedInt32(x) {makeDroppedInt3232,407 +function test_types() {test_types38,494 + data: "hello, world".split('').map(function(x) { return x.charCodeAt(0) })AnonymousFunctiona5a73da20100209,8468 +function test_core() {test_core46,770 +function makeCallCheck(x) {makeCallCheck235,9112 +function test_relooper() {test_relooper239,9213 +function test_binaries() {test_binaries429,17671 +function test_interpret() {test_interpret457,18509 +function test_nonvalid() {test_nonvalid475,19147 +function test_tracing() {test_tracing490,19545 +function test_parsing() {test_parsing497,19666 +function main() {main521,20377 + +externals/binaryen/test/binaryen.js/hello-world.js,352 +var iii = module.addFunctionType('iii', Binaryen.i32, [Binaryen.i32, Binaryen.i32]);iii10,253 +var left = module.getLocal(0, Binaryen.i32);left14,461 +var right = module.getLocal(1, Binaryen.i32);right15,506 +var add = module.i32.add(left, right);add16,552 +var ret = module.return(add);ret17,591 +var binary = module.emitBinary();binary38,1214 + +externals/binaryen/test/int_ops.post.js,112 + function doTest(x, y) {doTest11,210 +function testBinary(name, noSecondZero, noSecondBig) {testBinary9,133 + +externals/binaryen/test/grow_memory.cpp,62 +volatile int writeOnly;writeOnly5,64 +int main() {main7,89 + +externals/binaryen/test/calls.post.js,66 + function doTest(x) {doTest4,45 +function test(name) {test2,1 + +externals/binaryen/docs/binaryen.js.Markdown,101 +binaryen.js APIbinaryen.js API1,0 +OverviewOverview4,33 +TypesTypes11,358 +ModulesModules20,539 + +externals/binaryen/README.md,548 +# BinaryenBinaryen3,294 +## Binaryen IRBinaryen IR28,3448 +## ToolsTools43,4552 +## BuildingBuilding58,6019 +## RunningRunning70,6679 +### wasm-optwasm-opt72,6691 +### asm2wasmasm2wasm101,7787 +### C/C++ Source ⇒ asm2wasm ⇒ WebAssemblyC/C++ Source ⇒ asm2wasm ⇒ WebAssembly139,8736 +### C/C++ Source ⇒ WebAssembly LLVM backend ⇒ s2wasm ⇒ WebAssemblyC/C++ Source ⇒ WebAssembly LLVM backend ⇒ s2wasm ⇒ WebAssembly143,9264 +## TestingTesting168,10360 +## Design PrinciplesDesign Principles191,11265 +## FAQFAQ196,11929 + +externals/binaryen/Contributing.md,62 +# Contributing to WebAssemblyContributing to WebAssembly1,0 + +externals/binaryen/scripts/fuzz_passes.py,531 +PASSES = [PASSES34,1144 +base = sys.argv[1]base51,1447 +wast = base[:-3] + '.wast'wast52,1466 +args = sys.argv[2:]args55,1543 +def run():run58,1565 +original_wast = Noneoriginal_wast68,1832 + original_wast = wast + '.original.wast'original_wast79,2010 + def apply_passes(passes):apply_passes85,2188 + def simplify(passes):simplify94,2479 + tested = set()tested116,3207 + def pick_passes():pick_passes118,3225 + counter = 0counter127,3450 + passes = pick_passes()passes130,3476 + seen = run()seen139,3696 + +externals/binaryen/scripts/strip_local_names.py,0 + +externals/binaryen/scripts/test/support.py,512 +def _open_archive(tarfile, tmp_dir):_open_archive25,735 +def _files_same(dir1, dir2, basenames):_files_same36,1009 +def _dirs_same(dir1, dir2, basenames):_dirs_same41,1137 +def _move_files(dirfrom, dirto, basenames):_move_files54,1542 +def _move_dirs(dirfrom, dirto, basenames):_move_dirs63,1786 +def untar(tarfile, outdir):untar72,2033 +def split_wast(wast):split_wast92,2818 + def to_end(j):to_end104,3142 +def run_command(cmd, expected_status=0, stderr=None, expected_err=None):run_command150,4278 + +externals/binaryen/scripts/test/__init__.py,0 + +externals/binaryen/scripts/test/shared.py,3096 +usage_str = ("usage: 'python check.py [options]'\n\n"usage_str10,101 +parser = argparse.ArgumentParser(description=usage_str)parser12,201 +options = parser.parse_args()options79,3497 +requested = options.positional_argsrequested80,3527 +num_failures = 0num_failures82,3564 +warnings = []warnings83,3581 +def warn(text):warn86,3597 +wasm_dis_filenames = ['wasm-dis', 'wasm-dis.exe']wasm_dis_filenames105,4102 + path_parts = os.path.abspath(__file__).split(os.path.sep)path_parts112,4424 +def which(program):which120,4702 + def is_exe(fpath):is_exe121,4722 +WATERFALL_BUILD_DIR = os.path.join(options.binaryen_test, 'wasm-install')WATERFALL_BUILD_DIR142,5338 +BIN_DIR = os.path.abspath(os.path.join(BIN_DIR143,5412 +NATIVECC = (os.environ.get('CC') or which('mingw32-gcc') orNATIVECC146,5502 +NATIVEXX = (os.environ.get('CXX') or which('mingw32-g++') orNATIVEXX148,5606 +NODEJS = which('nodejs') or which('node')NODEJS150,5713 +MOZJS = which('mozjs')MOZJS151,5755 +EMCC = which('emcc')EMCC152,5778 +WASM_OPT = [os.path.join(options.binaryen_bin, 'wasm-opt')]WASM_OPT154,5800 +WASM_AS = [os.path.join(options.binaryen_bin, 'wasm-as')]WASM_AS155,5860 +WASM_DIS = [os.path.join(options.binaryen_bin, 'wasm-dis')]WASM_DIS156,5918 +ASM2WASM = [os.path.join(options.binaryen_bin, 'asm2wasm')]ASM2WASM157,5978 +WASM_CTOR_EVAL = [os.path.join(options.binaryen_bin, 'wasm-ctor-eval')]WASM_CTOR_EVAL158,6038 +WASM_SHELL = [os.path.join(options.binaryen_bin, 'wasm-shell')]WASM_SHELL159,6110 +WASM_MERGE = [os.path.join(options.binaryen_bin, 'wasm-merge')]WASM_MERGE160,6174 +S2WASM = [os.path.join(options.binaryen_bin, 's2wasm')]S2WASM161,6238 +S2WASM_EXE = S2WASM[0]S2WASM_EXE163,6295 +WASM_SHELL_EXE = WASM_SHELL[0]WASM_SHELL_EXE164,6318 +def wrap_with_valgrind(cmd):wrap_with_valgrind167,6351 + WASM_OPT = wrap_with_valgrind(WASM_OPT)WASM_OPT177,6703 + WASM_AS = wrap_with_valgrind(WASM_AS)WASM_AS178,6745 + WASM_DIS = wrap_with_valgrind(WASM_DIS)WASM_DIS179,6785 + ASM2WASM = wrap_with_valgrind(ASM2WASM)ASM2WASM180,6827 + WASM_SHELL = wrap_with_valgrind(WASM_SHELL)WASM_SHELL181,6869 + S2WASM = wrap_with_valgrind(S2WASM)S2WASM182,6915 +def fetch_waterfall():fetch_waterfall187,6993 +has_vanilla_llvm = Falsehas_vanilla_llvm219,8213 +def setup_waterfall():setup_waterfall222,8240 +has_vanilla_emcc = Falsehas_vanilla_emcc269,9479 + has_vanilla_emcc = Truehas_vanilla_emcc274,9668 +def delete_from_orbit(filename):delete_from_orbit282,9790 + def remove_readonly_and_try_again(func, path, exc_info):remove_readonly_and_try_again299,10129 +def fail_with_error(msg):fail_with_error310,10439 +def fail(actual, expected):fail321,10649 +def fail_if_not_identical(actual, expected):fail_if_not_identical329,10935 +def fail_if_not_contained(actual, expected):fail_if_not_contained334,11034 + tests = sorted(os.listdir(os.path.join(options.binaryen_test)))tests340,11161 +def binary_format_check(wast, verify_final_result=True, wasm_as_args=['-g'],binary_format_check353,11454 +def minify_check(wast, verify_final_result=True):minify_check386,12472 + +externals/binaryen/scripts/test/s2wasm.py,77 +def test_s2wasm():test_s2wasm25,777 +def test_linker():test_linker68,2261 + +externals/binaryen/scripts/clean_c_api_trace.py,301 +trace = open(sys.argv[1]).read()trace9,102 +start = trace.find('// beginning a Binaryen API trace')start11,136 + trace = trace[start:]trace13,207 + start = trace.find('\n(')start16,243 + end = trace.find('\n)', start + 1)end19,303 + trace = trace[:start] + trace[end + 2:]trace21,361 + +externals/binaryen/scripts/__init__.py,0 + +externals/binaryen/scripts/process_optimize_instructions.py,242 +root = os.path.dirname(os.path.dirname(__file__))root5,30 +infile = os.path.join(root, 'src', 'passes', 'OptimizeInstructions.wast')infile7,81 +outfile = os.path.join(root, 'src', 'passes',outfile8,155 +out = open(outfile, 'w')out11,264 + +externals/binaryen/scripts/storage.py,225 +STORAGE_BASE = 'https://storage.googleapis.com/wasm-llvm/builds/git/'STORAGE_BASE23,700 +def download_revision(force_latest):download_revision26,772 +def download_tar(tar_pattern, directory, revision):download_tar39,1216 + +externals/binaryen/scripts/fuzz_passes_wast.py,490 +PASSES = [PASSES31,905 +wast = sys.argv[1]wast48,1208 +args = sys.argv[2:]args51,1252 +def run():run54,1274 +original_wast = Noneoriginal_wast64,1475 + original_wast = wast + '.original.wast'original_wast75,1653 + def apply_passes(passes):apply_passes78,1731 + def simplify(passes):simplify85,1968 + tested = set()tested107,2696 + def pick_passes():pick_passes109,2714 + counter = 0counter119,2972 + passes = pick_passes()passes122,2998 + seen = run()seen131,3218 + +externals/binaryen/scripts/fuzz_relooper.py,1089 +counter = 0counter31,897 + num = random.randint(2, 250)num35,943 + density = random.random() * random.random()density36,974 + max_decision = num * 20max_decision37,1020 + decisions = [random.randint(1, max_decision) for x in range(num * 3)]decisions38,1046 + branches = [0] * numbranches39,1118 + defaults = [0] * numdefaults40,1141 + b = set([])b42,1187 + bs = random.randint(1, max(1,bs43,1203 + b = list(b)b47,1379 + optimize = random.random() < 0.5optimize51,1476 + entry = '''entry63,1732 + slow = entry + '\n'slow75,1984 + fast = '''fast82,2076 + b = branches[i]b164,4759 + use_switch = [random.random() < 0.5 for i in range(num)]use_switch170,5010 + b = branches[i]b205,6018 + total = len(b) + 1total208,6090 + values = ','.join([str(x) for x in range(random.randint(len(b) + 1,values209,6117 + cmd = [os.environ.get('CC') or 'gcc', 'fuzz.c', '-Isrc',cmd306,9140 + fast_out = subprocess.Popen(['bin/wasm-shell', 'fuzz.wast'],fast_out313,9412 + slow_out = subprocess.Popen(['nodejs', 'fuzz.slow.js'],slow_out317,9612 + +externals/binaryen/scripts/spidermonkify.py,244 +binaryen_root = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))binaryen_root30,890 +js_target = sys.argv[1]js_target32,967 +wast_target = sys.argv[2]wast_target33,991 +wasm_target = wast_target[:-5] + '.wasm'wasm_target35,1018 + +externals/binaryen/src/asm2wasm.h,10927 +#define wasm_asm2wasm_hwasm_asm2wasm_h23,742 +namespace wasm {wasm40,1150 +Name I32_CTTZ("i32_cttz"),I32_CTTZ46,1203 + I32_CTPOP("i32_ctpop"),I32_CTPOP47,1230 + I32_BC2F("i32_bc2f"),I32_BC2F48,1259 + I32_BC2I("i32_bc2i"),I32_BC2I49,1286 + I64("i64"),I6450,1313 + I64_CONST("i64_const"),I64_CONST51,1330 + I64_ADD("i64_add"),I64_ADD52,1359 + I64_SUB("i64_sub"),I64_SUB53,1384 + I64_MUL("i64_mul"),I64_MUL54,1409 + I64_UDIV("i64_udiv"),I64_UDIV55,1434 + I64_SDIV("i64_sdiv"),I64_SDIV56,1461 + I64_UREM("i64_urem"),I64_UREM57,1488 + I64_SREM("i64_srem"),I64_SREM58,1515 + I64_AND("i64_and"),I64_AND59,1542 + I64_OR("i64_or"),I64_OR60,1567 + I64_XOR("i64_xor"),I64_XOR61,1590 + I64_SHL("i64_shl"),I64_SHL62,1615 + I64_ASHR("i64_ashr"),I64_ASHR63,1640 + I64_LSHR("i64_lshr"),I64_LSHR64,1667 + I64_EQ("i64_eq"),I64_EQ65,1694 + I64_NE("i64_ne"),I64_NE66,1717 + I64_ULE("i64_ule"),I64_ULE67,1740 + I64_SLE("i64_sle"),I64_SLE68,1765 + I64_UGE("i64_uge"),I64_UGE69,1790 + I64_SGE("i64_sge"),I64_SGE70,1815 + I64_ULT("i64_ult"),I64_ULT71,1840 + I64_SLT("i64_slt"),I64_SLT72,1865 + I64_UGT("i64_ugt"),I64_UGT73,1890 + I64_SGT("i64_sgt"),I64_SGT74,1915 + I64_TRUNC("i64_trunc"),I64_TRUNC75,1940 + I64_SEXT("i64_sext"),I64_SEXT76,1969 + I64_ZEXT("i64_zext"),I64_ZEXT77,1996 + I64_S2F("i64_s2f"),I64_S2F78,2023 + I64_S2D("i64_s2d"),I64_S2D79,2048 + I64_U2F("i64_u2f"),I64_U2F80,2073 + I64_U2D("i64_u2d"),I64_U2D81,2098 + I64_F2S("i64_f2s"),I64_F2S82,2123 + I64_D2S("i64_d2s"),I64_D2S83,2148 + I64_F2U("i64_f2u"),I64_F2U84,2173 + I64_D2U("i64_d2u"),I64_D2U85,2198 + I64_BC2D("i64_bc2d"),I64_BC2D86,2223 + I64_BC2I("i64_bc2i"),I64_BC2I87,2250 + I64_CTTZ("i64_cttz"),I64_CTTZ88,2277 + I64_CTLZ("i64_ctlz"),I64_CTLZ89,2304 + I64_CTPOP("i64_ctpop"),I64_CTPOP90,2331 + I64S_REM("i64s-rem"),I64S_REM91,2360 + I64U_REM("i64u-rem"),I64U_REM92,2387 + I64S_DIV("i64s-div"),I64S_DIV93,2414 + I64U_DIV("i64u-div"),I64U_DIV94,2441 + F32_COPYSIGN("f32_copysign"),F32_COPYSIGN95,2468 + F64_COPYSIGN("f64_copysign"),F64_COPYSIGN96,2503 + LOAD1("load1"),LOAD197,2538 + LOAD2("load2"),LOAD298,2559 + LOAD4("load4"),LOAD499,2580 + LOAD8("load8"),LOAD8100,2601 + LOADF("loadf"),LOADF101,2622 + LOADD("loadd"),LOADD102,2643 + STORE1("store1"),STORE1103,2664 + STORE2("store2"),STORE2104,2687 + STORE4("store4"),STORE4105,2710 + STORE8("store8"),STORE8106,2733 + STOREF("storef"),STOREF107,2756 + STORED("stored"),STORED108,2779 + FTCALL("ftCall_"),FTCALL109,2802 + MFTCALL("mftCall_"),MFTCALL110,2826 + MAX_("max"),MAX_111,2852 + MIN_("min"),MIN_112,2870 + EMSCRIPTEN_DEBUGINFO("emscripten_debuginfo");EMSCRIPTEN_DEBUGINFO113,2888 +static void abort_on(std::string why, Ref element) {abort_on117,2954 +static void abort_on(std::string why, IString element) {abort_on123,3101 +Index indexOr(Index x, Index y) {indexOr128,3222 +struct AstStackHelper {AstStackHelper133,3351 + static std::vector astStack;astStack134,3375 + AstStackHelper(Ref curr) {AstStackHelper135,3411 + ~AstStackHelper() {~AstStackHelper138,3474 + Ref getParent() {getParent141,3525 +std::vector AstStackHelper::astStack;astStack150,3666 +static bool startsWith(const char* string, const char *prefix) {startsWith152,3710 +struct Asm2WasmPreProcessor {Asm2WasmPreProcessor165,4003 + bool memoryGrowth = false;memoryGrowth166,4033 + bool debugInfo = false;debugInfo167,4062 + std::vector debugInfoFileNames;debugInfoFileNames169,4089 + std::unordered_map debugInfoFileIndices;debugInfoFileIndices170,4136 + char* allocatedCopy = nullptr;allocatedCopy172,4200 + ~Asm2WasmPreProcessor() {~Asm2WasmPreProcessor174,4234 + char* process(char* input) {process178,4311 +static CallImport* checkDebugInfo(Expression* curr) {checkDebugInfo305,9301 +struct AdjustDebugInfo : public WalkerPass>AdjustDebugInfo317,9725 + bool isFunctionParallel() override { return true; }isFunctionParallel318,9825 + Pass* create() override { return new AdjustDebugInfo(); }create320,9880 + AdjustDebugInfo() {AdjustDebugInfo322,9941 + void visitBlock(Block* curr) {visitBlock326,10000 +class Asm2WasmBuilder {Asm2WasmBuilder347,10584 + enum class TrapMode {TrapMode349,10616 + Allow,Allow350,10640 + Clamp,Clamp351,10651 + JSJS352,10662 + Module& wasm;wasm355,10675 + MixedArena &allocator;allocator357,10692 + Builder builder;builder359,10718 + std::unique_ptr optimizingBuilder;optimizingBuilder361,10738 + struct MappedGlobal {MappedGlobal365,10826 + WasmType type;type366,10850 + bool import; // if true, this is an import - we should read the value, not just set a zeroimport367,10869 + IString module, base;module368,10964 + IString module, base;base368,10964 + MappedGlobal() : type(none), import(false) {}MappedGlobal369,10990 + MappedGlobal(WasmType type) : type(type), import(false) {}MappedGlobal370,11040 + MappedGlobal(WasmType type, bool import, IString module, IString base) : type(type), import(MappedGlobal371,11103 + std::map functionTableStarts; // each asm function table gets a range in the onefunctionTableStarts375,11264 + Asm2WasmPreProcessor& preprocessor;preprocessor377,11397 + bool debug;debug378,11435 + TrapMode trapMode;trapMode380,11454 + PassOptions passOptions;passOptions381,11475 + bool legalizeJavaScriptFFI;legalizeJavaScriptFFI382,11502 + bool runOptimizationPasses;runOptimizationPasses383,11532 + bool wasmOnly;wasmOnly384,11562 + std::map mappedGlobals;mappedGlobals387,11588 + void allocateGlobal(IString name, WasmType type) {allocateGlobal390,11647 + struct View {View406,12232 + unsigned bytes;bytes407,12248 + bool integer, signed_;integer408,12268 + bool integer, signed_;signed_408,12268 + AsmType type;type409,12295 + View() : bytes(0) {}View410,12313 + View(unsigned bytes, bool integer, bool signed_, AsmType type) : bytes(bytes), integer(integView411,12338 + std::map views; // name (e.g. HEAP8) => view infoviews414,12477 + IString Math_imul;Math_imul417,12575 + IString Math_clz32;Math_clz32418,12596 + IString Math_fround;Math_fround419,12618 + IString Math_abs;Math_abs420,12641 + IString Math_floor;Math_floor421,12661 + IString Math_ceil;Math_ceil422,12683 + IString Math_sqrt;Math_sqrt423,12704 + IString Math_max;Math_max424,12725 + IString Math_min;Math_min425,12745 + IString llvm_cttz_i32;llvm_cttz_i32427,12766 + IString tempDoublePtr; // imported name of tempDoublePtrtempDoublePtr429,12792 + IString udivmoddi4;udivmoddi4432,12909 + IString getTempRet0;getTempRet0433,12931 + std::map> importedFunctionTypes;importedFunctionTypes438,13044 + void noteImportedFunctionCall(Ref ast, WasmType resultType, CallImport* call) {noteImportedFunctionCall440,13119 + FunctionType* getFunctionType(Ref parent, ExpressionList& operands) {getFunctionType479,15079 + Asm2WasmBuilder(Module& wasm, Asm2WasmPreProcessor& preprocessor, bool debug, TrapMode trapModeAsm2WasmBuilder492,15564 + AsmType detectAsmType(Ref ast, AsmData *data) {detectAsmType507,16122 + WasmType detectWasmType(Ref ast, AsmData *data) {detectWasmType525,16741 + bool isUnsignedCoercion(Ref ast) {isUnsignedCoercion529,16850 + bool isParentUnsignedCoercion(Ref parent) {isParentUnsignedCoercion533,16949 + BinaryOp parseAsmBinaryOp(IString op, Ref left, Ref right, Expression* leftWasm, Expression* rparseAsmBinaryOp541,17196 + int32_t bytesToShift(unsigned bytes) {bytesToShift599,19690 + std::map tempNums;tempNums611,19922 + Literal checkLiteral(Ref ast, bool rawIsInteger = true) {checkLiteral613,19959 + Literal getLiteral(Ref ast) {getLiteral644,21254 + void fixCallType(Expression* call, WasmType type) {fixCallType650,21379 + FunctionType* getBuiltinFunctionType(Name module, Name base, ExpressionList* operands = nullptgetBuiltinFunctionType656,21648 + Block* blockify(Expression* expression) {blockify670,22173 + Expression* makeTrappingI32Binary(BinaryOp op, Expression* left, Expression* right) {makeTrappingI32Binary679,22515 + Expression* makeTrappingI64Binary(BinaryOp op, Expression* left, Expression* right) {makeTrappingI64Binary735,24541 + Expression* makeTrappingFloatToInt(bool signed_, Expression* value) {makeTrappingFloatToInt791,26563 + Expression* truncateToInt32(Expression* value) {truncateToInt32882,30018 +void Asm2WasmBuilder::processAsm(Ref ast) {processAsm891,30319 + auto addImport = [&](IString name, Ref imported, WasmType type) {__anon50b39e060102898,30644 + optimizingBuilder = make_unique(&wasm, numFunctions, pas__anon50b39e0602021007,34536 + struct FinalizeCalls : public WalkerPass> {FinalizeCalls1258,45286 + bool isFunctionParallel() override { return true; }isFunctionParallel1259,45358 + Pass* create() override { return new FinalizeCalls(parent); }create1261,45415 + Asm2WasmBuilder* parent;parent1263,45482 + FinalizeCalls(Asm2WasmBuilder* parent) : parent(parent) {FinalizeCalls1265,45512 + void visitCall(Call* curr) {visitCall1269,45612 + void visitCallImport(CallImport* curr) {visitCallImport1280,45956 + void visitCallIndirect(CallIndirect* curr) {visitCallIndirect1326,48342 + void visitFunction(Function* curr) {visitFunction1345,49423 + struct ApplyDebugInfo : public WalkerPass process = [&](Ref ast) -> Expression* {__anon50b39e0606021631,59382 + auto get = [&]() {__anon50b39e0607021918,70838 + processUnshifted = [&](Ref ptr, unsigned bytes) {__anon50b39e0608022600,101502 + processStatements = [&](Ref ast, unsigned from) -> Expression* {__anon50b39e0609022616,102264 + +externals/binaryen/src/asmjs/CMakeLists.txt,90 +SET(asmjs_SOURCESasmjs_SOURCES1,0 +ADD_LIBRARY(asmjs STATIC ${asmjs_SOURCES})asmjs5,60 + +externals/binaryen/src/asmjs/shared-constants.cpp,2800 +namespace wasm {wasm19,662 +cashew::IString GLOBAL("global"),GLOBAL21,680 + NAN_("NaN"),NAN_22,714 + INFINITY_("Infinity"),INFINITY_23,743 + NAN__("nan"),NAN__24,782 + INFINITY__("infinity"),INFINITY__25,812 + TOPMOST("topmost"),TOPMOST26,852 + INT8ARRAY("Int8Array"),INT8ARRAY27,888 + INT16ARRAY("Int16Array"),INT16ARRAY28,928 + INT32ARRAY("Int32Array"),INT32ARRAY29,970 + UINT8ARRAY("Uint8Array"),UINT8ARRAY30,1012 + UINT16ARRAY("Uint16Array"),UINT16ARRAY31,1054 + UINT32ARRAY("Uint32Array"),UINT32ARRAY32,1098 + FLOAT32ARRAY("Float32Array"),FLOAT32ARRAY33,1142 + FLOAT64ARRAY("Float64Array"),FLOAT64ARRAY34,1188 + IMPOSSIBLE_CONTINUE("impossible-continue"),IMPOSSIBLE_CONTINUE35,1234 + MATH("Math"),MATH36,1294 + IMUL("imul"),IMUL37,1324 + CLZ32("clz32"),CLZ3238,1354 + FROUND("fround"),FROUND39,1386 + ASM2WASM("asm2wasm"),ASM2WASM40,1420 + F64_REM("f64-rem"),F64_REM41,1458 + F64_TO_INT("f64-to-int"),F64_TO_INT42,1494 + I32S_DIV("i32s-div"),I32S_DIV43,1536 + I32U_DIV("i32u-div"),I32U_DIV44,1574 + I32S_REM("i32s-rem"),I32S_REM45,1612 + I32U_REM("i32u-rem"),I32U_REM46,1650 + GLOBAL_MATH("global.Math"),GLOBAL_MATH47,1688 + ABS("abs"),ABS48,1732 + FLOOR("floor"),FLOOR49,1760 + CEIL("ceil"),CEIL50,1792 + SQRT("sqrt"),SQRT51,1822 + POW("pow"),POW52,1852 + I32_TEMP("asm2wasm_i32_temp"),I32_TEMP53,1880 + DEBUGGER("debugger"),DEBUGGER54,1927 + USE_ASM("use asm"),USE_ASM55,1965 + BUFFER("buffer"),BUFFER56,2001 + ENV("env"),ENV57,2035 + INSTRUMENT("instrument"),INSTRUMENT58,2063 + MATH_IMUL("Math_imul"),MATH_IMUL59,2105 + MATH_CLZ32("Math_clz32"),MATH_CLZ3260,2145 + MATH_CTZ32("Math_ctz32"),MATH_CTZ3261,2187 + MATH_POPCNT32("Math_popcnt32"),MATH_POPCNT3262,2229 + MATH_ABS("Math_abs"),MATH_ABS63,2277 + MATH_CEIL("Math_ceil"),MATH_CEIL64,2315 + MATH_FLOOR("Math_floor"),MATH_FLOOR65,2355 + MATH_TRUNC("Math_trunc"),MATH_TRUNC66,2397 + MATH_NEAREST("Math_NEAREST"),MATH_NEAREST67,2439 + MATH_SQRT("Math_sqrt"),MATH_SQRT68,2485 + MATH_MIN("Math_max"),MATH_MIN69,2525 + MATH_MAX("Math_min");MATH_MAX70,2563 + +externals/binaryen/src/asmjs/shared-constants.h,104 +#define wasm_asmjs_shared_constants_hwasm_asmjs_shared_constants_h18,663 +namespace wasm {wasm22,745 + +externals/binaryen/src/asmjs/asm_v_wasm.cpp,537 +namespace wasm {wasm21,669 +WasmType asmToWasmType(AsmType asmType) {asmToWasmType23,687 +AsmType wasmToAsmType(WasmType type) {wasmToAsmType35,993 +char getSig(WasmType type) {getSig47,1293 +std::string getSig(const FunctionType *type) {getSig58,1504 +std::string getSig(Function *func) {getSig67,1684 +WasmType sigToWasmType(char sig) {sigToWasmType76,1852 +FunctionType* sigToFunctionType(std::string sig) {sigToFunctionType87,2064 +FunctionType* ensureFunctionType(std::string sig, Module* wasm) {ensureFunctionType96,2300 + +externals/binaryen/src/shell-interface.h,2462 +#define wasm_shell_interface_hwasm_shell_interface_h22,728 +namespace wasm {wasm30,901 +struct ExitException {};ExitException32,919 +struct TrapException {};TrapException33,944 +struct ShellExternalInterface final : ModuleInstance::ExternalInterface {ShellExternalInterface35,970 + class Memory {Memory43,1427 + std::vector memory;memory45,1508 + static bool aligned(const char* address) {aligned47,1564 + Memory() {}Memory55,1859 + void resize(size_t newSize) {resize56,1875 + void set(size_t address, T value) {set71,2565 + T get(size_t address) {get79,2817 + } memory;memory88,3072 + std::vector table;table90,3085 + ShellExternalInterface() : memory() {}ShellExternalInterface92,3113 + void init(Module& wasm, ModuleInstance& instance) override {init94,3155 + void importGlobals(std::map& globals, Module& wasm) override {importGlobals115,4115 + Literal callImport(Import *import, LiteralList& arguments) override {callImport134,4998 + Literal callTable(Index index, LiteralList& arguments, WasmType result, ModuleInstance& instancallTable149,5523 + int8_t load8s(Address addr) override { return memory.get(addr); }load8s165,6223 + uint8_t load8u(Address addr) override { return memory.get(addr); }load8u166,6299 + int16_t load16s(Address addr) override { return memory.get(addr); }load16s167,6377 + uint16_t load16u(Address addr) override { return memory.get(addr); }load16u168,6456 + int32_t load32s(Address addr) override { return memory.get(addr); }load32s169,6537 + uint32_t load32u(Address addr) override { return memory.get(addr); }load32u170,6616 + int64_t load64s(Address addr) override { return memory.get(addr); }load64s171,6697 + uint64_t load64u(Address addr) override { return memory.get(addr); }load64u172,6776 + void store8(Address addr, int8_t value) override { memory.set(addr, value); }store8174,6858 + void store16(Address addr, int16_t value) override { memory.set(addr, value); }store16175,6946 + void store32(Address addr, int32_t value) override { memory.set(addr, value); }store32176,7037 + void store64(Address addr, int64_t value) override { memory.set(addr, value); }store64177,7128 + void growMemory(Address /*oldSize*/, Address newSize) override {growMemory179,7220 + void trap(const char* why) override {trap183,7320 + +externals/binaryen/src/wasm-emscripten.cpp,2647 +namespace wasm {wasm27,843 +namespace emscripten {emscripten29,861 +cashew::IString EMSCRIPTEN_ASM_CONST("emscripten_asm_const");EMSCRIPTEN_ASM_CONST31,885 +static constexpr const char* stackPointer = "__stack_pointer";stackPointer33,948 +void addExportedFunction(Module& wasm, Function* function) {addExportedFunction35,1012 +void generateMemoryGrowthFunction(Module& wasm) {generateMemoryGrowthFunction43,1255 +void addStackPointerRelocation(LinkerObject& linker, uint32_t* data) {addStackPointerRelocation59,1664 +Load* generateLoadStackPointer(Builder& builder, LinkerObject& linker) {generateLoadStackPointer68,1874 +Store* generateStoreStackPointer(Builder& builder,generateStoreStackPointer81,2219 +void generateStackSaveFunction(LinkerObject& linker) {generateStackSaveFunction96,2656 +void generateStackAllocFunction(LinkerObject& linker) {generateStackAllocFunction110,3021 +void generateStackRestoreFunction(LinkerObject& linker) {generateStackRestoreFunction143,4248 +void generateRuntimeFunctions(LinkerObject& linker) {generateRuntimeFunctions159,4717 +static bool hasI64ResultOrParam(FunctionType* ft) {hasI64ResultOrParam165,4889 +void removeImportsWithSubstring(Module& module, Name name) {removeImportsWithSubstring173,5065 +std::vector makeDynCallThunks(Module& wasm, std::vector const& tableSegmentDatamakeDynCallThunks185,5370 +struct AsmConstWalker : public PostWalker {AsmConstWalker214,6720 + Module& wasm;wasm215,6780 + std::unordered_map segmentsByAddress; // address => segment indexsegmentsByAddress216,6796 + std::map> sigsForCode;sigsForCode218,6883 + std::map ids;ids219,6943 + std::set allSigs;allSigs220,6981 + AsmConstWalker(Module& _wasm, std::unordered_map _segmentsByAddress) :AsmConstWalker222,7015 +void AsmConstWalker::visitCallImport(CallImport* curr) {visitCallImport236,7509 +std::string AsmConstWalker::codeForConstAddr(Const* addrConst) {codeForConstAddr254,8051 +std::string AsmConstWalker::escape(const char *input) {escape265,8554 +Literal AsmConstWalker::idLiteralForCode(std::string code) {idLiteralForCode287,9279 +std::string AsmConstWalker::asmConstSig(std::string baseSig) {asmConstSig298,9485 +Name AsmConstWalker::nameForImportWithSig(std::string sig) {nameForImportWithSig309,9782 +void AsmConstWalker::addImport(Name importName, std::string baseSig) {addImport314,9961 +void printSet(std::ostream& o, C& c) {printSet324,10283 +void generateEmscriptenMetadata(std::ostream& o,generateEmscriptenMetadata335,10477 + +externals/binaryen/src/wasm-builder.h,4030 +#define wasm_wasm_builder_hwasm_wasm_builder_h18,653 +namespace wasm {wasm23,731 +struct NameType {NameType27,776 + Name name;name28,794 + WasmType type;type29,807 + NameType() : name(nullptr), type(none) {}NameType30,824 + NameType(Name name, WasmType type) : name(name), type(type) {}NameType31,868 +class Builder {Builder36,966 + MixedArena& allocator;allocator37,982 + Builder(MixedArena& allocator) : allocator(allocator) {}Builder40,1016 + Builder(Module& wasm) : allocator(wasm.allocator) {}Builder41,1075 + Function* makeFunction(Name name,makeFunction45,1167 + Nop* makeNop() {makeNop69,1918 + Block* makeBlock(Expression* first = nullptr) {makeBlock72,1976 + Block* makeBlock(Name name, Expression* first = nullptr) {makeBlock80,2168 + If* makeIf(Expression* condition, Expression* ifTrue, Expression* ifFalse = nullptr) {makeIf85,2305 + Loop* makeLoop(Name name, Expression* body) {makeLoop91,2552 + Break* makeBreak(Name name, Expression* value = nullptr, Expression* condition = nullptr) {makeBreak97,2722 + Switch* makeSwitch(T& list, Name default_, Expression* condition, Expression* value = nullptr)makeSwitch104,2992 + Call* makeCall(Name target, const std::vector& args, WasmType type) {makeCall110,3260 + CallImport* makeCallImport(Name target, const std::vector& args, WasmType type) {makeCallImport117,3549 + Call* makeCall(Name target, const T& args, WasmType type) {makeCall125,3858 + CallImport* makeCallImport(Name target, const T& args, WasmType type) {makeCallImport133,4147 + CallIndirect* makeCallIndirect(FunctionType* type, Expression* target, const std::vector&& operands) {makeHost232,7631 + Unreachable* makeUnreachable() {makeUnreachable240,7885 + Drop* makeDrop(Expression *value) {makeDrop246,7993 + static Index addParam(Function* func, Name name, WasmType type) {addParam256,8274 + static Index addVar(Function* func, Name name, WasmType type) {addVar266,8662 + static Index addVar(Function* func, WasmType type) {addVar279,9179 + static void clearLocals(Function* func) {clearLocals283,9278 + Block* blockify(Expression* any, Expression* append = nullptr) {blockify291,9526 + Block* blockifyWithName(Expression* any, Name name, Expression* append = nullptr) {blockifyWithName304,9989 + Block* blockifyMerge(Expression* any, Expression* append) {blockifyMerge318,10507 + Block* makeSequence(Expression* left, Expression* right) {makeSequence340,11157 + Expression* stealSlice(Block* input, Index from, Index to) {stealSlice349,11489 + Expression* dropIfConcretelyTyped(Expression* curr) {dropIfConcretelyTyped374,12134 + void flip(If* iff) {flip379,12276 + Expression* replaceWithIdenticalType(T* curr) {replaceWithIdenticalType388,12567 + +externals/binaryen/src/wasm-linker.h,4926 +#define wasm_wasm_linker_hwasm_wasm_linker_h25,1066 +namespace wasm {wasm32,1199 +class LinkerObject {LinkerObject38,1358 + struct Relocation {Relocation40,1388 + enum Kind { kData, kFunction };Kind41,1410 + enum Kind { kData, kFunction };kData41,1410 + enum Kind { kData, kFunction };kFunction41,1410 + Kind kind; // Whether the symbol refers to data or a function.kind42,1446 + uint32_t* data;data45,1634 + Name symbol; // Like the symbol index in ELF r_info fieldsymbol46,1654 + int addend; // Like the ELF r_addend fieldaddend47,1716 + Relocation(Kind kind, uint32_t* data, Name symbol, int addend) :Relocation48,1763 + struct SymbolAlias {SymbolAlias51,1903 + Name symbol;symbol52,1926 + Relocation::Kind kind;kind53,1943 + Offset offset;offset54,1970 + SymbolAlias(Name symbol, Relocation::Kind kind, Offset offset) :SymbolAlias55,1989 + struct SymbolInfo {SymbolInfo59,2146 + std::unordered_set implementedFunctions;implementedFunctions60,2168 + std::unordered_set undefinedFunctions;undefinedFunctions61,2230 + std::unordered_set importedObjects;importedObjects62,2290 + std::unordered_map aliasedSymbols;aliasedSymbols64,2406 + void merge(SymbolInfo& other) {merge69,2661 + LinkerObject() {}LinkerObject82,3190 + void addStatic(Address allocSize, Address alignment, Name name) {addStatic85,3241 + void addGlobal(Name name) {addGlobal89,3374 + void addRelocation(Relocation* relocation) {addRelocation94,3487 + bool isFunctionImplemented(Name name) {isFunctionImplemented98,3581 + bool isObjectImplemented(Name name) {isObjectImplemented103,3752 + Name resolveAlias(Name name, Relocation::Kind kind) {resolveAlias108,3928 + SymbolAlias *getAlias(Name name, Relocation::Kind kind) {getAlias114,4178 + void addSegment(Name name, const char* data, Address size) {addSegment121,4492 + void addSegment(Name name, std::vector& data) {addSegment126,4719 + void addInitializerFunction(Name name) {addInitializerFunction131,4933 + void addUndefinedFunctionCall(Call* call) {addUndefinedFunctionCall136,5089 + void addExternType(Name name, FunctionType* ty) {addExternType141,5254 + FunctionType* getExternType(Name name) {getExternType144,5341 + void addIndirectIndex(Name name, Address index) {addIndirectIndex150,5502 + bool isEmpty() {isEmpty155,5642 + Module wasm;wasm161,5725 + struct StaticObject {StaticObject164,5751 + Address allocSize;allocSize165,5775 + Address alignment;alignment166,5798 + Name name;name167,5821 + StaticObject(Address allocSize, Address alignment, Name name) :StaticObject168,5836 + std::vector globls;globls172,5976 + std::vector staticObjects;staticObjects174,6005 + std::vector> relocations;relocations175,6048 + SymbolInfo symbolInfo;symbolInfo177,6105 + using CallList = std::vector;CallList179,6131 + std::map undefinedFunctionCalls;undefinedFunctionCalls180,6170 + std::unordered_map externTypesMap;externTypesMap183,6282 + std::map segments; // name => segment index (in wasm module)segments185,6352 + std::map indirectIndexes;indirectIndexes188,6488 + std::vector initializerFunctions;initializerFunctions190,6532 +class Linker {Linker200,6905 + Linker(Address globalBase, Address stackAllocation, Address userInitialMemory,Linker202,6929 + LinkerObject& getOutput() { return out; }getOutput242,8749 + Address allocateStatic(Address allocSize, Address alignment, Name name) {allocateStatic264,9630 + static Address roundUpToPageSize(Address size) {roundUpToPageSize293,10632 + void exportFunction(Name name, bool must_export) {exportFunction297,10751 + LinkerObject out;out312,11213 + bool ignoreUnknownSymbols;ignoreUnknownSymbols314,11234 + Name startFunction;startFunction315,11263 + Address globalBase;globalBase318,11366 + Address nextStatic; // location of next static allocationnextStatic319,11388 + Address userInitialMemory; // Initial memory size (in bytes) specified by the user.userInitialMemory320,11448 + Address userMaxMemory; // Max memory size (in bytes) specified by the user.userMaxMemory321,11534 + bool importMemory; // Whether the memory should be imported instead ofimportMemory323,11685 + Address stackAllocation;stackAllocation325,11793 + bool debug;debug326,11820 + std::unordered_map staticAddresses; // name => addressstaticAddresses328,11835 + std::unordered_map segmentsByAddress; // address => segment indexsegmentsByAddress329,11918 + std::unordered_map functionIndexes;functionIndexes330,12004 + std::map functionNames;functionNames331,12068 + +externals/binaryen/src/tools/s2wasm.cpp,1227 +int main(int argc, const char *argv[]) {main33,922 + [](Options *o, const std::string &argument) {__anon8693fdd3010245,1386 + [&ignoreUnknownSymbols](Options *, const std::string &) {__anon8693fdd3020251,1631 + [&startFunction](Options *, const std::string &argument) {__anon8693fdd3030256,1868 + [](Options *o, const std::string &argument) {__anon8693fdd3040261,2123 + [](Options *o, const std::string &argument) {__anon8693fdd3050266,2359 + [](Options *o, const std::string &argument) {__anon8693fdd3060271,2594 + [](Options *o, const std::string &argument) {__anon8693fdd3070276,2823 + [&allowMemoryGrowth](Options *, const std::string &) {__anon8693fdd3080281,3061 + [&generateEmscriptenGlue](Options *, const std::string &) {__anon8693fdd3090286,3283 + [&importMemory](Options *, const std::string &) {__anon8693fdd30a0291,3535 + [&archiveLibraries](Options *o, const std::string &argument) {__anon8693fdd30b0296,3731 + [](Options *o, const std::string &argument) {__anon8693fdd30c02101,3980 + [](Options *o, const std::string &argument) {__anon8693fdd30d02109,4374 + +externals/binaryen/src/tools/wasm-shell.cpp,1556 +Name ASSERT_RETURN("assert_return"),ASSERT_RETURN37,1143 + ASSERT_TRAP("assert_trap"),ASSERT_TRAP38,1180 + ASSERT_INVALID("assert_invalid"),ASSERT_INVALID39,1213 + ASSERT_MALFORMED("assert_malformed"),ASSERT_MALFORMED40,1252 + ASSERT_UNLINKABLE("assert_unlinkable"),ASSERT_UNLINKABLE41,1295 + INVOKE("invoke"),INVOKE42,1340 + GET("get");GET43,1363 +std::map> modules;modules47,1411 +std::map> builders;builders48,1460 +std::map> interfaces;interfaces49,1526 +std::map> instances;instances50,1594 +struct Operation {Operation56,1689 + ModuleInstance* instance;instance57,1708 + Name operation;operation58,1736 + Name name;name59,1754 + LiteralList arguments;arguments60,1767 + Operation(Element& element, ModuleInstance* instanceInit, SExpressionWasmBuilder& builder) : iOperation62,1793 + Literal operate() {operate77,2369 +static void verify_result(Literal a, Literal b) {verify_result89,2663 +static void run_asserts(Name moduleName, size_t* i, bool* checked, Module* wasm,run_asserts102,3017 +int main(int argc, const char* argv[]) {main233,7550 + [&entry](Options*, const std::string& argument) { entry = argument; })__anon3c96f2730102242,7823 + [&skipped](Options*, const std::string& argument) {__anon3c96f2730202246,8031 + [](Options* o, const std::string& argument) {__anon3c96f2730302259,8539 + +externals/binaryen/src/tools/wasm-dis.cpp,359 +int main(int argc, const char *argv[]) {main30,845 + [](Options *o, const std::string &argument) {__anon5cd9b5fb010235,1152 + [&sourceMapFilename](Options *o, const std::string &argument) { sourceMapFilename = a__anon5cd9b5fb020241,1455 + [](Options *o, const std::string &argument) {__anon5cd9b5fb030243,1620 + +externals/binaryen/src/tools/tool-utils.h,136 +namespace wasm {wasm23,693 +inline std::string removeSpecificSuffix(std::string str, std::string suffix) {removeSpecificSuffix26,774 + +externals/binaryen/src/tools/asm2wasm.cpp,1932 +int main(int argc, const char *argv[]) {main35,952 + [](Options *o, const std::string &argument) {__anon1286d241010248,1438 + [](Options *o, const std::string &argument) {__anon1286d241020253,1665 + [](Options *o, const std::string &argument) {__anon1286d241030257,2017 + [](Options *o, const std::string &argument) {__anon1286d241040261,2348 + [](Options *o, const std::string &argument) {__anon1286d241050265,2758 + [](Options *o, const std::string &argument) {__anon1286d241060269,2955 + [](Options *o, const std::string &argument) {__anon1286d241070273,3265 + [](Options *o, const std::string &) {__anon1286d241080277,3483 + [&trapMode](Options *o, const std::string &) {__anon1286d241090281,3742 + [&trapMode](Options *o, const std::string &) {__anon1286d2410a0285,4006 + [&trapMode](Options *o, const std::string &) {__anon1286d2410b0289,4288 + [&trapMode](Options *o, const std::string &) {__anon1286d2410c0293,4538 + [&wasmOnly](Options *o, const std::string &) {__anon1286d2410d0297,4796 + [&legalizeJavaScriptFFI](Options *o, const std::string &) {__anon1286d2410e02101,5062 + [&](Options *o, const std::string &arguments) { options.passOptions.debugInfo = true;__anon1286d2410f02106,5325 + [&sourceMapFilename](Options *o, const std::string &argument) { sourceMapFilename = a__anon1286d2411002109,5561 + [&sourceMapUrl](Options *o, const std::string &argument) { sourceMapUrl = argument; }__anon1286d2411102112,5785 + [&](Options *o, const std::string &argument) { symbolMap = argument; })__anon1286d2411202115,5991 + [&](Options *o, const std::string &argument) { emitBinary = false; })__anon1286d2411302118,6194 + [](Options *o, const std::string &argument) {__anon1286d2411402120,6332 + +externals/binaryen/src/tools/optimization-options.h,1523 +namespace wasm {wasm21,685 +struct OptimizationOptions : public Options {OptimizationOptions23,703 + static constexpr const char* DEFAULT_OPT_PASSES = "O";DEFAULT_OPT_PASSES24,749 + std::vector passes;passes26,807 + PassOptions passOptions;passOptions27,842 + OptimizationOptions(const std::string &command, const std::string &description) : Options(commOptimizationOptions29,870 + [this](Options*, const std::string&) {__anon80b242bb010232,1093 + [this](Options*, const std::string&) {__anon80b242bb020239,1422 + [this](Options*, const std::string&) {__anon80b242bb030245,1696 + [this](Options*, const std::string&) {__anon80b242bb040252,2026 + [this](Options*, const std::string&) {__anon80b242bb050259,2356 + [this](Options*, const std::string&) {__anon80b242bb060266,2713 + [this](Options*, const std::string&) {__anon80b242bb070273,3076 + [this](Options* o, const std::string& argument) {__anon80b242bb080280,3426 + [this](Options* o, const std::string& argument) {__anon80b242bb090285,3706 + [this](Options*, const std::string&) {__anon80b242bb0a0290,4051 + [this, p](Options*, const std::string&) {__anon80b242bb0b0298,4416 + bool runningDefaultOptimizationPasses() {runningDefaultOptimizationPasses105,4527 + bool runningPasses() {runningPasses114,4701 + PassRunner getPassRunner(Module& wasm) {getPassRunner118,4761 + +externals/binaryen/src/tools/wasm-as.cpp,781 +int main(int argc, const char *argv[]) {main32,870 + [](Options *o, const std::string &argument) {__anon49f4384f010242,1294 + [](Options *o, const std::string &argument) {__anon49f4384f020248,1551 + [&](Options *o, const std::string &arguments) { debugInfo = true; })__anon49f4384f030257,1995 + [&sourceMapFilename](Options *o, const std::string &argument) { sourceMapFilename = a__anon49f4384f040260,2186 + [&sourceMapUrl](Options *o, const std::string &argument) { sourceMapUrl = argument; }__anon49f4384f050263,2410 + [&](Options *o, const std::string &argument) { symbolMap = argument; })__anon49f4384f060266,2616 + [](Options *o, const std::string &argument) {__anon49f4384f070268,2756 + +externals/binaryen/src/tools/wasm-ctor-eval.cpp,4377 +struct FailToEvalException {FailToEvalException39,1200 + std::string why;why40,1229 + FailToEvalException(std::string why) : why(why) {}FailToEvalException41,1248 +class EvallingGlobalManager {EvallingGlobalManager45,1350 + std::map globals;globals47,1403 + std::set dangerousGlobals;dangerousGlobals50,1495 + bool sealed = false;sealed53,1575 + void addDangerous(Name name) {addDangerous56,1607 + void seal() {seal60,1680 + bool operator==(const EvallingGlobalManager& other) {operator ==66,1814 + bool operator!=(const EvallingGlobalManager& other) {operator !=69,1911 + Literal& operator[](Name name) {operator []73,2002 + struct Iterator {Iterator89,2622 + Name first;first90,2642 + Literal second;second91,2658 + bool found;found92,2678 + Iterator() : found(false) {}Iterator94,2695 + Iterator(Name name, Literal value) : first(name), second(value), found(true) {}Iterator95,2728 + bool operator==(const Iterator& other) {operator ==97,2813 + bool operator!=(const Iterator& other) {operator !=100,2949 + Iterator find(Name name) {find105,3038 + Iterator end() {end112,3187 +class EvallingModuleInstance : public ModuleInstanceBase stack;stack148,4482 + void setupEnvironment() {setupEnvironment153,4746 + void flattenMemory() {flattenMemory169,5401 +struct CtorEvalExternalInterface : EvallingModuleInstance::ExternalInterface {CtorEvalExternalInterface174,5473 + Module* wasm;wasm175,5552 + EvallingModuleInstance* instance;instance176,5568 + void init(Module& wasm_, EvallingModuleInstance& instance_) override {init178,5605 + void importGlobals(EvallingGlobalManager& globals, Module& wasm_) override {importGlobals183,5729 + Literal callImport(Import *import, LiteralList& arguments) override {callImport186,5813 + Literal callTable(Index index, LiteralList& arguments, WasmType result, EvallingModuleInstancecallTable194,6211 + int8_t load8s(Address addr) override { return doLoad(addr); }load8s223,7614 + uint8_t load8u(Address addr) override { return doLoad(addr); }load8u224,7686 + int16_t load16s(Address addr) override { return doLoad(addr); }load16s225,7760 + uint16_t load16u(Address addr) override { return doLoad(addr); }load16u226,7835 + int32_t load32s(Address addr) override { return doLoad(addr); }load32s227,7912 + uint32_t load32u(Address addr) override { return doLoad(addr); }load32u228,7987 + int64_t load64s(Address addr) override { return doLoad(addr); }load64s229,8064 + uint64_t load64u(Address addr) override { return doLoad(addr); }load64u230,8139 + void store8(Address addr, int8_t value) override { doStore(addr, value); }store8232,8217 + void store16(Address addr, int16_t value) override { doStore(addr, value); }store16233,8302 + void store32(Address addr, int32_t value) override { doStore(addr, value); }store32234,8390 + void store64(Address addr, int64_t value) override { doStore(addr, value); }store64235,8478 + void growMemory(Address /*oldSize*/, Address newSize) override {growMemory237,8567 + void trap(const char* why) override {trap241,8685 + T* getMemory(Address address) {getMemory249,8877 + void doStore(Address address, T value) {doStore281,9914 + T doLoad(Address address) {doLoad287,10100 +void evalCtors(Module& wasm, std::vector ctors) {evalCtors295,10277 +int main(int argc, const char* argv[]) {main347,12282 + [](Options* o, const std::string& argument) {__anon0923d1280202359,12650 + [&](Options *o, const std::string &argument) { emitBinary = false; })__anon0923d1280302365,12917 + [&](Options *o, const std::string &arguments) { debugInfo = true; })__anon0923d1280402368,13104 + [&](Options* o, const std::string& argument) {__anon0923d1280502371,13316 + [](Options* o, const std::string& argument) {__anon0923d1280602375,13482 + +externals/binaryen/src/tools/wasm-opt.cpp,888 +struct ExecutionResults {ExecutionResults41,1232 + std::map results;results42,1258 + void get(Module& wasm) {get44,1294 + bool operator==(ExecutionResults& other) {operator ==58,1676 + bool operator!=(ExecutionResults& other) {operator !=70,1967 + Literal run(Function* func, Module& wasm) {run74,2049 +int main(int argc, const char* argv[]) {main95,2582 + [](Options* o, const std::string& argument) {__anonbc00872e0102106,2933 + [&](Options *o, const std::string &argument) { emitBinary = false; })__anonbc00872e0202112,3200 + [&](Options *o, const std::string &arguments) { debugInfo = true; })__anonbc00872e0302115,3387 + [&](Options *o, const std::string &arguments) { fuzzExec = true; })__anonbc00872e0402118,3615 + [](Options* o, const std::string& argument) {__anonbc00872e0502120,3751 + +externals/binaryen/src/tools/wasm-merge.cpp,4818 +static void findImportsByBase(Module& wasm, Name base, std::function note) {findImportsByBase41,1181 +static void ensureSize(T& what, Index size) {ensureSize53,1488 +struct Mergeable {Mergeable63,1804 + Mergeable(Module& wasm) : wasm(wasm) {Mergeable64,1823 + Module& wasm;wasm72,1989 + Index totalMemorySize, totalTableSize;totalMemorySize76,2111 + Index totalMemorySize, totalTableSize;totalTableSize76,2111 + std::set memoryBaseGlobals, tableBaseGlobals;memoryBaseGlobals80,2275 + std::set memoryBaseGlobals, tableBaseGlobals;tableBaseGlobals80,2275 + std::map implementedFunctionImports;implementedFunctionImports84,2461 + std::map implementedGlobalImports;implementedGlobalImports85,2512 + void findSizes() {findSizes91,2734 + void findImports() {findImports121,3692 + findImportsByBase(wasm, MEMORY_BASE, [&](Name name) {__anon99736ceb0102122,3715 + findImportsByBase(wasm, TABLE_BASE, [&](Name name) {__anon99736ceb0202128,3914 + void standardizeSegments() {standardizeSegments136,4114 + Name getNonColliding(Name initial, std::function checkIfCollides) {getNonColliding155,4864 + void standardizeSegment(Module& wasm, T& what, Index size, U zero, Name globalName) {standardizeSegment174,5513 + void copySegment(T& output, T& input, V updater) {copySegment199,6375 +struct OutputMergeable : public PostWalker>, public MeOutputMergeable224,7383 + OutputMergeable(Module& wasm) : Mergeable(wasm) {}OutputMergeable225,7489 + void visitCallImport(CallImport* curr) {visitCallImport227,7543 + void visitGetGlobal(GetGlobal* curr) {visitGetGlobal235,7860 + void visitModule(Module* curr) {visitModule244,8142 +struct InputMergeable : public ExpressionStackWalker>, pInputMergeable258,8603 + InputMergeable(Module& wasm, OutputMergeable& outputMergeable) : Mergeable(wasm), outputMergeaInputMergeable259,8717 + OutputMergeable& outputMergeable;outputMergeable262,8877 + std::map ftNames; // function typesftNames265,8998 + std::map eNames; // exportseNames266,9048 + std::map fNames; // functionsfNames267,9090 + std::map gNames; // globalsgNames268,9134 + void visitCall(Call* curr) {visitCall270,9177 + void visitCallImport(CallImport* curr) {visitCallImport275,9291 + void visitCallIndirect(CallIndirect* curr) {visitCallIndirect286,9700 + void visitGetGlobal(GetGlobal* curr) {visitGetGlobal291,9837 + void visitSetGlobal(SetGlobal* curr) {visitSetGlobal308,10426 + void merge() {merge313,10544 + curr->name = ftNames[curr->name] = getNonColliding(curr->name, [&](Name name) -> bool {__anon99736ceb0302343,11649 + curr->name = fNames[curr->name] = getNonColliding(curr->name, [&](Name name) -> bool {__anon99736ceb0402349,11912 + curr->name = gNames[curr->name] = getNonColliding(curr->name, [&](Name name) -> bool {__anon99736ceb0502353,12187 + curr->name = fNames[curr->name] = getNonColliding(curr->name, [&](Name name) -> bool {__anon99736ceb0602359,12459 + curr->name = gNames[curr->name] = getNonColliding(curr->name, [&](Name name) -> bool {__anon99736ceb0702364,12667 + copySegment(outputMergeable.wasm.memory, wasm.memory, [](char x) -> char { return x; });__anon99736ceb0802408,14289 + copySegment(outputMergeable.wasm.table, wasm.table, [&](Name x) -> Name { return fNames[x]; __anon99736ceb0902409,14382 + void addBump(Index bump) {addBump473,16974 +void finalizeBases(Module& wasm, Index memory, Index table) {finalizeBases497,17649 + struct FinalizableMergeable : public Mergeable, public PostWalker temps; // type => num tempstemps178,6031 + std::vector> frees; // type => list of free namesfrees180,6118 + std::set willBeStatement;willBeStatement183,6235 + size_t tableSize;tableSize186,6341 +Ref Wasm2AsmBuilder::processWasm(Module* wasm) {processWasm198,6667 +void Wasm2AsmBuilder::addBasics(Ref ast) {addBasics228,7614 + auto addHeap = [&](IString name, IString view) {__anon1f1f2f260102230,7715 + auto addMath = [&](IString name, IString base) {__anon1f1f2f260202255,8408 +void Wasm2AsmBuilder::addImport(Ref ast, Import *import) {addImport275,8859 +void Wasm2AsmBuilder::addTables(Ref ast, Module *wasm) {addTables288,9214 +void Wasm2AsmBuilder::addExports(Ref ast, Module *wasm) {addExports321,10438 +Ref Wasm2AsmBuilder::processFunction(Function* func) {processFunction329,10787 +void Wasm2AsmBuilder::scanFunctionBody(Expression* curr) {scanFunctionBody396,13544 + struct ExpressionScanner : public PostWalker {ExpressionScanner397,13603 + Wasm2AsmBuilder* parent;parent398,13671 + ExpressionScanner(Wasm2AsmBuilder* parent) : parent(parent) {}ExpressionScanner400,13701 + void visitBlock(Block *curr) {visitBlock404,13786 + void visitIf(If *curr) {visitIf407,13861 + void visitLoop(Loop *curr) {visitLoop410,13930 + void visitBreak(Break *curr) {visitBreak413,14003 + void visitSwitch(Switch *curr) {visitSwitch416,14078 + void visitCall(Call *curr) {visitCall419,14155 + void visitCallImport(CallImport *curr) {visitCallImport427,14349 + void visitCallIndirect(CallIndirect *curr) {visitCallIndirect435,14555 + void visitSetLocal(SetLocal *curr) {visitSetLocal447,14872 + void visitLoad(Load *curr) {visitLoad452,15009 + void visitStore(Store *curr) {visitStore457,15136 + void visitUnary(Unary *curr) {visitUnary462,15301 + void visitBinary(Binary *curr) {visitBinary467,15432 + void visitSelect(Select *curr) {visitSelect472,15600 + void visitReturn(Return *curr) {visitReturn477,15812 + void visitHost(Host *curr) {visitHost480,15870 +Ref Wasm2AsmBuilder::processFunctionBody(Function* func, IString result) {processFunctionBody492,16110 + struct ExpressionProcessor : public Visitor {ExpressionProcessor493,16185 + Wasm2AsmBuilder* parent;parent494,16259 + IString result;result495,16288 + Function* func;func496,16308 + MixedArena allocator;allocator497,16328 + ExpressionProcessor(Wasm2AsmBuilder* parent, Function* func) : parent(parent), func(func) {}ExpressionProcessor498,16354 + struct ScopedTemp {ScopedTemp501,16488 + Wasm2AsmBuilder* parent;parent502,16512 + WasmType type;type503,16543 + IString temp;temp504,16564 + bool needFree;needFree505,16584 + ScopedTemp(WasmType type, Wasm2AsmBuilder* parent, IString possible = NO_RESULT) : parent(ScopedTemp509,16851 + ~ScopedTemp() {~ScopedTemp519,17216 + IString getName() {getName525,17321 + Ref getAstName() {getAstName528,17376 + Ref visit(Expression* curr, IString nextResult) {visit533,17462 + Ref visit(Expression* curr, ScopedTemp& temp) {visit541,17746 + Ref visitForExpression(Expression* curr, WasmType type, IString& tempName) { // this result visitForExpression545,17842 + Ref visitAndAssign(Expression* curr, IString result) {visitAndAssign555,18208 + Ref visitAndAssign(Expression* curr, ScopedTemp& temp) {visitAndAssign565,18660 + bool isStatement(Expression* curr) {isStatement569,18779 + bool isBlock(Ref ast) {isBlock575,18987 + Ref blockify(Ref ast) {blockify579,19061 + std::map breakResults;breakResults588,19376 + std::map continueLabels;continueLabels591,19512 + IString fromName(Name name) {fromName593,19554 + Ref visitBlock(Block *curr) {visitBlock599,19649 + Ref visitIf(If *curr) {visitIf615,20251 + Ref visitLoop(Loop *curr) {visitLoop631,20914 + Ref visitBreak(Break *curr) {visitBreak641,21380 + Expression *defaultBody = nullptr; // default must be last in asm.jsdefaultBody665,22294 + Ref visitSwitch(Switch *curr) {visitSwitch666,22367 + Ref makeStatementizedCall(ExpressionList& operands, Ref ret, Ref theCall, IString result, WamakeStatementizedCall688,23331 + Ref visitCall(Call *curr) {visitCall707,24181 + Ref visitCallImport(CallImport *curr) {visitCallImport719,24807 + Ref visitCallIndirect(CallIndirect *curr) {visitCallIndirect722,24872 + auto makeTableCall = [&](Ref target) {__anon1f1f2f260302725,25059 + Ref visitGetLocal(GetLocal *curr) {visitGetLocal746,26091 + Ref visitSetLocal(SetLocal *curr) {visitSetLocal749,26217 + Ref visitLoad(Load *curr) {visitLoad759,26928 + Ref visitStore(Store *curr) {visitStore821,29649 + Ref visitConst(Const *curr) {visitConst916,33668 + Ref visitUnary(Unary *curr) {visitUnary937,34471 + Ref visitBinary(Binary *curr) {visitBinary985,36822 + Ref visitSelect(Select *curr) {visitSelect1058,41431 + Ref visitReturn(Return *curr) {visitReturn1098,43351 + Ref visitHost(Host *curr) {visitHost1101,43408 + Ref visitNop(Nop *curr) {visitNop1104,43461 + Ref visitUnreachable(Unreachable *curr) {visitUnreachable1107,43540 + +externals/binaryen/src/ast_utils.h,9246 +#define wasm_ast_utils_hwasm_ast_utils_h18,650 +namespace wasm {wasm26,797 +struct BreakSeeker : public PostWalker {BreakSeeker31,983 + Name target;target32,1037 + Index found;found33,1052 + WasmType valueType;valueType34,1067 + BreakSeeker(Name target) : target(target), found(0) {}BreakSeeker36,1090 + void noteFound(Expression* value) {noteFound38,1148 + void visitBreak(Break *curr) {visitBreak45,1349 + void visitSwitch(Switch *curr) {visitSwitch53,1637 + static bool has(Expression* tree, Name target) {has64,2008 + static Index count(Expression* tree, Name target) {count71,2199 +struct EffectAnalyzer : public PostWalker {EffectAnalyzer82,2456 + EffectAnalyzer(PassOptions& passOptions, Expression *ast = nullptr) {EffectAnalyzer83,2516 + bool ignoreImplicitTraps;ignoreImplicitTraps89,2718 + bool debugInfo;debugInfo90,2746 + void analyze(Expression *ast) {analyze92,2765 + bool branches = false; // branches out of this expressionbranches99,2944 + bool calls = false;calls100,3004 + std::set localsRead;localsRead101,3026 + std::set localsWritten;localsWritten102,3056 + std::set globalsRead;globalsRead103,3089 + std::set globalsWritten;globalsWritten104,3119 + bool readsMemory = false;readsMemory105,3152 + bool writesMemory = false;writesMemory106,3180 + bool implicitTrap = false; // a load or div/rem, which may trap. we ignore trapimplicitTrap107,3209 + bool accessesLocal() { return localsRead.size() + localsWritten.size() > 0; }accessesLocal114,3673 + bool accessesGlobal() { return globalsRead.size() + globalsWritten.size() > 0; }accessesGlobal115,3753 + bool accessesMemory() { return calls || readsMemory || writesMemory; }accessesMemory116,3836 + bool hasSideEffects() { return calls || localsWritten.size() > 0 || writesMemory || branches |hasSideEffects117,3909 + bool hasAnything() { return branches || calls || accessesLocal() || readsMemory || writesMemorhasAnything118,4052 + bool invalidates(EffectAnalyzer& other) {invalidates121,4331 + void mergeIn(EffectAnalyzer& other) {mergeIn153,5409 + bool checkPre(Expression* curr) {checkPre166,6070 + bool checkPost(Expression* curr) {checkPost174,6205 + std::set breakNames;breakNames182,6347 + void visitBreak(Break *curr) {visitBreak184,6377 + void visitSwitch(Switch *curr) {visitSwitch187,6449 + void visitBlock(Block* curr) {visitBlock193,6602 + void visitLoop(Loop* curr) {visitLoop196,6724 + void visitCall(Call *curr) { calls = true; }visitCall200,6845 + void visitCallImport(CallImport *curr) {visitCallImport201,6892 + void visitCallIndirect(CallIndirect *curr) { calls = true; }visitCallIndirect209,7115 + void visitGetLocal(GetLocal *curr) {visitGetLocal210,7178 + void visitSetLocal(SetLocal *curr) {visitSetLocal213,7257 + void visitGetGlobal(GetGlobal *curr) {visitGetGlobal216,7339 + void visitSetGlobal(SetGlobal *curr) {visitSetGlobal219,7420 + void visitLoad(Load *curr) {visitLoad222,7504 + void visitStore(Store *curr) {visitStore226,7614 + void visitUnary(Unary *curr) {visitUnary230,7727 + void visitBinary(Binary *curr) {visitBinary247,8179 + void visitReturn(Return *curr) { branches = true; }visitReturn264,8545 + void visitHost(Host *curr) { calls = true; }visitHost265,8599 + void visitUnreachable(Unreachable *curr) { branches = true; }visitUnreachable266,8646 +struct Measurer : public PostWalker> {Measurer271,8745 + Index size = 0;size272,8829 + void visitExpression(Expression* curr) {visitExpression274,8848 + static Index measure(Expression* tree) {measure278,8908 +struct ExpressionAnalyzer {ExpressionAnalyzer285,9033 + static bool isSimple(Break* curr) {isSimple295,9505 + static bool obviouslyDoesNotFlowOut(Expression* curr) {obviouslyDoesNotFlowOut302,9796 + using ExprComparer = std::function;ExprComparer311,10157 + static bool equal(Expression* left, Expression* right) {equal314,10317 + auto comparer = [](Expression* left, Expression* right) {__anonafca08d30102315,10376 +struct ReFinalize : public WalkerPass> {ReFinalize332,10882 + bool isFunctionParallel() override { return true; }isFunctionParallel333,10946 + Pass* create() override { return new ReFinalize; }create335,11001 + ReFinalize() { name = "refinalize"; }ReFinalize337,11055 + std::map breakValues;breakValues342,11240 + void visitBlock(Block *curr) {visitBlock344,11281 + void visitIf(If *curr) { curr->finalize(); }visitIf371,12092 + void visitLoop(Loop *curr) { curr->finalize(); }visitLoop372,12139 + void visitBreak(Break *curr) {visitBreak373,12190 + void visitSwitch(Switch *curr) {visitSwitch379,12358 + void visitCall(Call *curr) { curr->finalize(); }visitCall389,12657 + void visitCallImport(CallImport *curr) { curr->finalize(); }visitCallImport390,12708 + void visitCallIndirect(CallIndirect *curr) { curr->finalize(); }visitCallIndirect391,12771 + void visitGetLocal(GetLocal *curr) { curr->finalize(); }visitGetLocal392,12838 + void visitSetLocal(SetLocal *curr) { curr->finalize(); }visitSetLocal393,12897 + void visitGetGlobal(GetGlobal *curr) { curr->finalize(); }visitGetGlobal394,12956 + void visitSetGlobal(SetGlobal *curr) { curr->finalize(); }visitSetGlobal395,13017 + void visitLoad(Load *curr) { curr->finalize(); }visitLoad396,13078 + void visitStore(Store *curr) { curr->finalize(); }visitStore397,13129 + void visitConst(Const *curr) { curr->finalize(); }visitConst398,13182 + void visitUnary(Unary *curr) { curr->finalize(); }visitUnary399,13235 + void visitBinary(Binary *curr) { curr->finalize(); }visitBinary400,13288 + void visitSelect(Select *curr) { curr->finalize(); }visitSelect401,13343 + void visitDrop(Drop *curr) { curr->finalize(); }visitDrop402,13398 + void visitReturn(Return *curr) { curr->finalize(); }visitReturn403,13449 + void visitHost(Host *curr) { curr->finalize(); }visitHost404,13504 + void visitNop(Nop *curr) { curr->finalize(); }visitNop405,13555 + void visitUnreachable(Unreachable *curr) { curr->finalize(); }visitUnreachable406,13604 + WasmType getValueType(Expression* value) {getValueType408,13670 +struct ReFinalizeNode : public Visitor {ReFinalizeNode415,13895 + void visitBlock(Block *curr) { curr->finalize(); }visitBlock416,13952 + void visitIf(If *curr) { curr->finalize(); }visitIf417,14005 + void visitLoop(Loop *curr) { curr->finalize(); }visitLoop418,14052 + void visitBreak(Break *curr) { curr->finalize(); }visitBreak419,14103 + void visitSwitch(Switch *curr) { curr->finalize(); }visitSwitch420,14156 + void visitCall(Call *curr) { curr->finalize(); }visitCall421,14211 + void visitCallImport(CallImport *curr) { curr->finalize(); }visitCallImport422,14262 + void visitCallIndirect(CallIndirect *curr) { curr->finalize(); }visitCallIndirect423,14325 + void visitGetLocal(GetLocal *curr) { curr->finalize(); }visitGetLocal424,14392 + void visitSetLocal(SetLocal *curr) { curr->finalize(); }visitSetLocal425,14451 + void visitGetGlobal(GetGlobal *curr) { curr->finalize(); }visitGetGlobal426,14510 + void visitSetGlobal(SetGlobal *curr) { curr->finalize(); }visitSetGlobal427,14571 + void visitLoad(Load *curr) { curr->finalize(); }visitLoad428,14632 + void visitStore(Store *curr) { curr->finalize(); }visitStore429,14683 + void visitConst(Const *curr) { curr->finalize(); }visitConst430,14736 + void visitUnary(Unary *curr) { curr->finalize(); }visitUnary431,14789 + void visitBinary(Binary *curr) { curr->finalize(); }visitBinary432,14842 + void visitSelect(Select *curr) { curr->finalize(); }visitSelect433,14897 + void visitDrop(Drop *curr) { curr->finalize(); }visitDrop434,14952 + void visitReturn(Return *curr) { curr->finalize(); }visitReturn435,15003 + void visitHost(Host *curr) { curr->finalize(); }visitHost436,15058 + void visitNop(Nop *curr) { curr->finalize(); }visitNop437,15109 + void visitUnreachable(Unreachable *curr) { curr->finalize(); }visitUnreachable438,15158 + static void updateStack(std::vector& expressionStack) {updateStack441,15303 +struct AutoDrop : public WalkerPass> {AutoDrop454,15846 + bool isFunctionParallel() override { return true; }isFunctionParallel455,15917 + Pass* create() override { return new AutoDrop; }create457,15972 + AutoDrop() { name = "autodrop"; }AutoDrop459,16024 + bool maybeDrop(Expression*& child) {maybeDrop461,16061 + void reFinalize() {reFinalize474,16491 + void visitBlock(Block* curr) {visitBlock478,16568 + void visitIf(If* curr) {visitIf492,16994 + void doWalkFunction(Function* curr) {doWalkFunction504,17261 +struct I64Utilities {I64Utilities514,17588 + static Expression* recreateI64(Builder& builder, Expression* low, Expression* high) {recreateI64515,17610 + static Expression* recreateI64(Builder& builder, Index low, Index high) {recreateI64535,18041 + static Expression* getI64High(Builder& builder, Index index) {getI64High539,18221 + static Expression* getI64Low(Builder& builder, Index index) {getI64Low552,18513 + +externals/binaryen/src/emscripten-optimizer/snprintf.h,277 +#define wasm_snprintf_hwasm_snprintf_h18,649 +#define snprintf snprintf26,797 +inline int c99_vsnprintf(char* str, size_t size, const char* format, va_list ap)c99_vsnprintf28,828 +inline int c99_snprintf(char* str, size_t size, const char* format, ...)c99_snprintf40,1074 + +externals/binaryen/src/emscripten-optimizer/CMakeLists.txt,165 +SET(emscripten-optimizer_SOURCESemscripten-optimizer_SOURCES1,0 +ADD_LIBRARY(emscripten-optimizer STATIC ${emscripten-optimizer_SOURCES})emscripten-optimizer6,88 + +externals/binaryen/src/emscripten-optimizer/simple_ast.h,8651 +#define wasm_simple_ast_hwasm_simple_ast_h18,651 +#define err(err41,1075 +#define errv(errv42,1119 +#define printErr printErr43,1182 +namespace cashew {cashew45,1204 +struct Ref {Ref53,1370 + Value* inst;inst54,1383 + Ref(Value *v=nullptr) : inst(v) {}Ref56,1399 + Value* get() { return inst; }get58,1437 + Value& operator*() { return *inst; }operator *60,1470 + Value* operator->() { return inst; }operator ->61,1509 + bool operator==(double d) { abort(); return false; } // prevent Ref == number, which is potentoperator ==70,1829 +class GlobalMixedArena : public MixedArena {GlobalMixedArena79,2225 + T* alloc() {alloc82,2298 +class ArrayStorage : public ArenaVectorBase {ArrayStorage91,2444 + void allocate(size_t size) {allocate93,2517 +struct Value {Value103,2721 + enum Type {Type104,2736 + String = 0,String105,2750 + Number = 1,Number106,2766 + Array = 2,Array107,2782 + Null = 3,Null108,2797 + Bool = 4,Bool109,2811 + Object = 5,Object110,2825 + Assign_ = 6, // ref = targetAssign_111,2841 + AssignName_ = 7AssignName_112,2874 + Type type;type115,2900 + typedef std::unordered_map ObjectStorage;ObjectStorage117,2914 + IString str;str120,3099 + union { // TODO: optimize__anonc6548b45010a122,3121 + IString str;str124,3166 + double num;num126,3190 + ArrayStorage *arr;arr127,3206 + bool boo;boo128,3229 + ObjectStorage *obj;obj129,3243 + Ref ref;ref130,3267 + Value() : type(Null), num(0) {}Value134,3325 + explicit Value(const char *s) : type(Null) {Value135,3359 + explicit Value(double n) : type(Null) {Value138,3428 + explicit Value(ArrayStorage &a) : type(Null) {Value141,3492 + ~Value() {~Value147,3667 + void free() {free151,3697 + Value& setString(const char *s) {setString158,3830 + Value& setString(const IString &s) {setString164,3935 + Value& setNumber(double n) {setNumber170,4043 + Value& setArray(ArrayStorage &a) {setArray176,4140 + Value& setArray(size_t size_hint=0) {setArray183,4282 + Value& setNull() {setNull190,4442 + Value& setBool(bool b) { // Bool in the name, as otherwise might overload over intsetBool195,4514 + Value& setObject() {setObject201,4663 + bool isString() { return type == String; }isString210,4865 + bool isNumber() { return type == Number; }isNumber211,4910 + bool isArray() { return type == Array; }isArray212,4955 + bool isNull() { return type == Null; }isNull213,4999 + bool isBool() { return type == Bool; }isBool214,5042 + bool isObject() { return type == Object; }isObject215,5085 + bool isAssign() { return type == Assign_; }isAssign216,5130 + bool isAssignName() { return type == AssignName_; }isAssignName217,5176 + bool isBool(bool b) { return type == Bool && b == boo; } // avoid overloading == as it might oisBool219,5231 + bool isArray(IString name) {isArray225,5566 + const char* getCString() {getCString229,5646 + IString& getIString() {getIString233,5729 + double& getNumber() {getNumber237,5805 + ArrayStorage& getArray() {getArray241,5879 + bool& getBool() {getBool245,5958 + int32_t getInteger() { // convenience function to get a known integergetInteger253,6080 + Value& operator=(const Value& other) {operator =260,6320 + bool operator==(const Value& other) {operator ==284,6770 + char* parse(char* curr) {parse305,7317 + #define is_json_space(is_json_space306,7345 + #define skip(skip307,7462 + size_t size() {size392,9523 + void setSize(size_t size) {setSize397,9599 + Ref& operator[](unsigned x) {operator []408,9851 + Value& push_back(Ref r) {push_back413,9939 + Ref pop_back() {pop_back418,10041 + Ref back() {back425,10158 + int indexOf(Ref other) {indexOf431,10273 + Ref map(std::function func) {map439,10442 + Ref filter(std::function func) {filter449,10689 + Ref& operator[](IString x) {operator []474,11181 + bool has(IString x) {has479,11269 +struct Assign : public Value {Assign485,11361 + Ref value_;value_486,11392 + Assign(Ref targetInit, Ref valueInit) {Assign488,11407 + Assign() : Assign(nullptr, nullptr) {}Assign494,11526 + Ref& target() {target496,11568 + Ref& value() {value499,11606 +struct AssignName : public Value {AssignName504,11650 + IString target_;target_505,11685 + AssignName(IString targetInit, Ref valueInit) {AssignName507,11705 + AssignName() : AssignName(IString(), nullptr) {}AssignName513,11836 + IString& target() {target515,11888 + Ref& value() {value518,11934 +struct JSPrinter {JSPrinter539,12662 + static char* numToString(double d, bool finalize=true) {numToString540,12681 + #define BUFFERSIZE BUFFERSIZE545,12870 +class ValueBuilder {ValueBuilder665,17125 + static Ref makeRawString(const IString& s) {makeRawString666,17146 + static Ref makeNull() {makeNull670,17246 + static Ref makeRawArray(int size_hint=0) {makeRawArray675,17330 + static Ref makeToplevel() {makeToplevel679,17435 + static Ref makeString(IString str) {makeString684,17590 + static Ref makeBlock() {makeBlock689,17756 + static Ref makeName(IString name) {makeName694,17905 + static void setBlockContent(Ref target, Ref block) {setBlockContent698,17980 + static void appendToBlock(Ref block, Ref element) {appendToBlock706,18228 + static Ref makeCall(Ref target) {makeCall711,18358 + static Ref makeCall(Ref target, Ref arg) {makeCall716,18561 + static Ref makeCall(IString target) {makeCall723,18826 + static Ref makeCall(IString target, Ref arg) {makeCall729,19068 + static Ref makeCall(IString target, Ref arg1, Ref arg2) {makeCall736,19348 + static Ref makeCall(IString target, Ref arg1, Ref arg2, Ref arg3, Ref arg4) {makeCall744,19669 + static Ref makeCall(IString target, Ref arg1, Ref arg2, Ref arg3, Ref arg4, Ref arg5, Ref arg6makeCall754,20068 + static Ref makeCall(IString target, Ref arg1, Ref arg2, Ref arg3, Ref arg4, Ref arg5, Ref arg6makeCall768,20623 + static void appendToCall(Ref call, Ref element) {appendToCall791,21506 + static Ref makeStatement(Ref contents) {makeStatement796,21631 + static Ref makeDouble(double num) {makeDouble800,21700 + static Ref makeInt(uint32_t num) {makeInt803,21792 + static Ref makeNum(double num) {makeNum806,21869 + static Ref makeUnary(IString op, Ref value) {makeUnary810,21937 + static Ref makeBinary(Ref left, IString op, Ref right) {makeBinary816,22163 + static Ref makePrefix(IString op, Ref right) {makePrefix835,22875 + static Ref makeFunction(IString name) {makeFunction841,23102 + static void appendArgumentToFunction(Ref func, IString arg) {appendArgumentToFunction848,23381 + static Ref makeVar(bool is_const=false) {makeVar853,23530 + static void appendToVar(Ref var, IString name, Ref value) {appendToVar858,23694 + static Ref makeReturn(Ref value) {makeReturn865,23932 + static Ref makeIndexing(Ref target, Ref index) {makeIndexing870,24106 + static Ref makeIf(Ref condition, Ref ifTrue, Ref ifFalse) {makeIf876,24315 + static Ref makeConditional(Ref condition, Ref ifTrue, Ref ifFalse) {makeConditional883,24611 + static Ref makeSeq(Ref left, Ref right) {makeSeq890,24900 + static Ref makeDo(Ref body, Ref condition) {makeDo896,25100 + static Ref makeWhile(Ref condition, Ref body) {makeWhile902,25306 + static Ref makeFor(Ref init, Ref condition, Ref inc, Ref body) {makeFor908,25518 + static Ref makeBreak(IString label) {makeBreak916,25834 + static Ref makeContinue(IString label) {makeContinue921,26025 + static Ref makeLabel(IString name, Ref body) {makeLabel926,26222 + static Ref makeSwitch(Ref input) {makeSwitch932,26443 + static void appendCaseToSwitch(Ref switch_, Ref arg) {appendCaseToSwitch938,26649 + static void appendDefaultToSwitch(Ref switch_) {appendDefaultToSwitch944,26882 + static void appendCodeToSwitch(Ref switch_, Ref code, bool explicitBlock) {appendCodeToSwitch950,27116 + static Ref makeDot(Ref obj, IString key) {makeDot962,27491 + static Ref makeDot(Ref obj, Ref key) {makeDot968,27704 + static Ref makeNew(Ref call) {makeNew973,27829 + static Ref makeArray() {makeArray978,27972 + static void appendToArray(Ref array, Ref element) {appendToArray983,28121 + static Ref makeObject() {makeObject988,28251 + static void appendToObject(Ref array, IString key, Ref value) {appendToObject993,28402 + static Ref makeSub(Ref obj, Ref index) {makeSub999,28644 + static Ref makePtrShift(Ref ptr, int shifts) {makePtrShift1005,28842 +class DotZeroValueBuilder : public ValueBuilder {DotZeroValueBuilder1011,29017 + static Ref makeDouble(double num) {makeDouble1013,29075 + +externals/binaryen/src/emscripten-optimizer/istring.h,2341 +#define wasm_istring_hwasm_istring_h20,750 +namespace cashew {cashew35,1007 +struct IString {IString37,1027 + const char *str;str38,1044 + static size_t hash_c(const char *str) { // see http://www.cse.yorku.ca/~oz/hash.htmlhash_c40,1064 + class CStringHash : public std::hash {CStringHash49,1294 + size_t operator()(const char *str) const {operator ()51,1359 + class CStringEqual : public std::equal_to {CStringEqual55,1452 + bool operator()(const char *x, const char *y) const {operator ()57,1522 + IString() : str(nullptr) {}IString62,1624 + IString(const char *s, bool reuse=true) { // if reuse=true, then input is assumed to remain alIString63,1654 + void set(const char *s, bool reuse=true) {set68,1811 + typedef std::unordered_set StringSet;StringSet69,1856 + void set(const IString &s) {set106,3144 + void clear() {clear110,3197 + bool operator==(const IString& other) const {operator ==114,3238 + bool operator!=(const IString& other) const {operator !=118,3395 + bool operator<(const IString& other) const {operator <122,3552 + char operator[](int x) const {__anond27cf3f40102126,3671 + const char *c_str() const { return str; }c_str134,3822 + bool equals(const char *other) const { return !strcmp(str, other); }equals135,3866 + bool is() const { return str != nullptr; }is137,3938 + bool isNull() const { return str == nullptr; }isNull138,3987 +namespace std {std145,4118 +template <> struct hash : public unary_function {hash147,4135 + size_t operator()(const cashew::IString& str) const {operator ()148,4227 +template <> struct equal_to : public binary_function {IStringSet166,4667 + std::vector data;data167,4723 + IStringSet() {}IStringSet169,4757 + IStringSet(const char *init) { // comma-delimited listIStringSet170,4775 + bool has(const IString& str) {has184,5100 +class IOrderedStringSet : public std::set {IOrderedStringSet189,5168 + bool has(const IString& str) {has191,5229 + +externals/binaryen/src/emscripten-optimizer/parser.h,4587 +#define wasm_parser_hwasm_parser_h23,932 +namespace cashew {cashew34,1107 +struct OperatorClass {OperatorClass129,3218 + enum Type {Type130,3241 + Binary = 0,Binary131,3255 + Prefix = 1,Prefix132,3271 + Postfix = 2,Postfix133,3287 + Tertiary = 3Tertiary134,3304 + IStringSet ops;ops137,3327 + bool rtl;rtl138,3345 + Type type;type139,3357 + OperatorClass(const char* o, bool r, Type t) : ops(o), rtl(r), type(t) {}OperatorClass141,3371 +class Parser {Parser155,3704 + static bool isSpace(char x) { return x == 32 || x == 9 || x == 10 || x == 13; } /* space, tab,isSpace157,3720 + static void skipSpace(char*& curr) {skipSpace158,3848 + static bool isDigit(char x) { return x >= '0' && x <= '9'; }isDigit180,4345 + static bool hasChar(const char* list, char x) { while (*list) if (*list++ == x) return true; rhasChar182,4409 + enum FragType {FragType185,4588 + KEYWORD = 0,KEYWORD186,4606 + OPERATOR = 1,OPERATOR187,4623 + IDENT = 2,IDENT188,4641 + STRING = 3, // without quotesSTRING189,4656 + INT = 4,INT190,4690 + DOUBLE = 5,DOUBLE191,4703 + SEPARATOR = 6SEPARATOR192,4719 + struct Frag {Frag195,4743 + union {__anon2540de41010a197,4886 + IString str;str199,4905 + double num;num200,4924 + int size;size204,4973 + FragType type;type205,4987 + bool isNumber() const {isNumber207,5007 + explicit Frag(char* src) {Frag211,5086 + struct ExpressionElement {ExpressionElement306,8534 + bool isNode;isNode307,8563 + union {__anon2540de41020a309,8707 + NodeRef node;node311,8726 + IString op;op312,8746 + ExpressionElement(NodeRef n) : isNode(true), node(n) {}ExpressionElement316,8795 + ExpressionElement(IString o) : isNode(false), op(o) {}ExpressionElement317,8855 + NodeRef getNode() {getNode319,8915 + IString getOp() {getOp323,8992 + typedef std::vector ExpressionParts;ExpressionParts331,9269 + std::vector expressionPartsStack;expressionPartsStack332,9327 + NodeRef parseElement(char*& src, const char* seps=";") {parseElement335,9500 + NodeRef parseFrag(Frag& frag) {parseFrag366,10503 + NodeRef parseAfterKeyword(Frag& frag, char*& src, const char* seps) {parseAfterKeyword377,10850 + NodeRef parseFunction(char*& src, const char* seps) {parseFunction396,11751 + NodeRef parseVar(char*& src, const char* seps, bool is_const) {parseVar429,12576 + NodeRef parseReturn(char*& src, const char* seps) {parseReturn457,13219 + NodeRef parseIf(char*& src, const char* seps) {parseIf466,13502 + NodeRef parseDo(char*& src, const char* seps) {parseDo481,13949 + NodeRef parseWhile(char*& src, const char* seps) {parseWhile491,14267 + NodeRef parseFor(char*& src, const char* seps) {parseFor497,14468 + NodeRef parseBreak(char*& src, const char* seps) {parseBreak517,15013 + NodeRef parseContinue(char*& src, const char* seps) {parseContinue524,15231 + NodeRef parseSwitch(char*& src, const char* seps) {parseSwitch531,15455 + NodeRef parseNew(char*& src, const char* seps) {parseNew593,17490 + NodeRef parseAfterIdent(Frag& frag, char*& src, const char* seps) {parseAfterIdent597,17600 + NodeRef parseCall(NodeRef target, char*& src) {parseCall616,18393 + NodeRef parseIndexing(NodeRef target, char*& src) {parseIndexing639,18988 + NodeRef parseDotting(NodeRef target, char*& src) {parseDotting652,19400 + NodeRef parseAfterParen(char*& src) {parseAfterParen661,19623 + NodeRef parseAfterBrace(char*& src) {parseAfterBrace673,19968 + NodeRef parseAfterCurly(char*& src) {parseAfterCurly694,20470 + void dumpParts(ExpressionParts& parts, int i) {dumpParts721,21152 + NodeRef makeBinary(NodeRef left, IString op, NodeRef right) {makeBinary735,21537 + NodeRef parseExpression(ExpressionElement initial, char*&src, const char* seps) {parseExpression743,21744 + NodeRef parseBlock(char*& src, const char* seps=";", IString keywordSep1=IString(), IString keparseBlock836,25849 + NodeRef parseBracketedBlock(char*& src) {parseBracketedBlock861,26634 + NodeRef parseElementOrStatement(char*& src, const char *seps) {parseElementOrStatement871,26960 + NodeRef parseMaybeBracketed(char*& src, const char *seps) {parseMaybeBracketed896,27627 + NodeRef parseParenned(char*& src) {parseParenned901,27802 + char *allSource;allSource914,28043 + int allSize;allSize915,28062 + static void dump(const char *where, char* curr) {dump917,28078 + Parser() : allSource(nullptr), allSize(0) {Parser942,28744 + NodeRef parseToplevel(char* src) {parseToplevel947,28891 + +externals/binaryen/src/emscripten-optimizer/optimizer-shared.cpp,987 +IString ASM_FLOAT_ZERO;ASM_FLOAT_ZERO24,727 +IString SIMD_INT8X16_CHECK("SIMD_Int8x16_check"),SIMD_INT8X16_CHECK26,752 + SIMD_INT16X8_CHECK("SIMD_Int16x8_check"),SIMD_INT16X8_CHECK27,802 + SIMD_INT32X4_CHECK("SIMD_Int32x4_check"),SIMD_INT32X4_CHECK28,852 + SIMD_FLOAT32X4_CHECK("SIMD_Float32x4_check"),SIMD_FLOAT32X4_CHECK29,902 + SIMD_FLOAT64X2_CHECK("SIMD_Float64x2_check");SIMD_FLOAT64X2_CHECK30,956 +int parseInt(const char *str) {parseInt32,1011 +HeapInfo parseHeap(const char *name) {parseHeap41,1147 +AsmType detectType(Ref node, AsmData *asmData, bool inVarDef, IString minifiedFround, bool allowdetectType55,1568 +static void abort_on(Ref node) {abort_on135,4598 +AsmSign detectSign(Ref node, IString minifiedFround) {detectSign141,4696 +Ref makeAsmCoercedZero(AsmType type) {makeAsmCoercedZero183,6156 +Ref makeAsmCoercion(Ref node, AsmType type) {makeAsmCoercion220,8008 +Ref makeSigning(Ref node, AsmSign sign) {makeSigning235,8870 + +externals/binaryen/src/emscripten-optimizer/optimizer.h,2097 +#define wasm_optimizer_hwasm_optimizer_h18,650 +enum AsmType {AsmType43,1256 + ASM_INT = 0,ASM_INT44,1271 + ASM_DOUBLE,ASM_DOUBLE45,1286 + ASM_FLOAT,ASM_FLOAT46,1300 + ASM_FLOAT32X4,ASM_FLOAT32X447,1313 + ASM_FLOAT64X2,ASM_FLOAT64X248,1330 + ASM_INT8X16,ASM_INT8X1649,1347 + ASM_INT16X8,ASM_INT16X850,1362 + ASM_INT32X4,ASM_INT32X451,1377 + ASM_INT64, // non-asm.jsASM_INT6452,1392 + ASM_NONE // number of typesASM_NONE53,1419 +struct AsmData {AsmData60,1627 + struct Local {Local61,1644 + Local() {}Local62,1661 + Local(AsmType type, bool param) : type(type), param(param) {}Local63,1676 + AsmType type;type64,1742 + bool param; // false if a varparam65,1760 + typedef std::unordered_map Locals;Locals67,1799 + Locals locals;locals69,1861 + std::vector params; // in orderparams70,1878 + std::vector vars; // in ordervars71,1929 + AsmType ret;ret72,1978 + cashew::Ref func;func74,1994 + AsmType getType(const cashew::IString& name) {getType76,2015 + void setType(const cashew::IString& name, AsmType type) {setType81,2177 + bool isLocal(const cashew::IString& name) {isLocal85,2272 + bool isParam(const cashew::IString& name) {isParam88,2357 + bool isVar(const cashew::IString& name) {isVar91,2455 + AsmData() {} // if you want to fill in the data yourselfAsmData95,2553 + void addParam(cashew::IString name, AsmType type) {addParam100,2748 + void addVar(cashew::IString name, AsmType type) {addVar104,2872 + void deleteVar(cashew::IString name) {deleteVar109,2994 +struct HeapInfo {HeapInfo130,3470 + bool valid, unsign, floaty;valid131,3488 + bool valid, unsign, floaty;unsign131,3488 + bool valid, unsign, floaty;floaty131,3488 + int bits;bits132,3518 + AsmType type;type133,3530 +enum AsmSign {AsmSign138,3589 + ASM_FLEXIBLE = 0, // small constants can be signed or unsigned, variables are also flexibleASM_FLEXIBLE139,3604 + ASM_SIGNED = 1,ASM_SIGNED140,3698 + ASM_UNSIGNED = 2,ASM_UNSIGNED141,3716 + ASM_NONSIGNED = 3,ASM_NONSIGNED142,3736 + +externals/binaryen/src/emscripten-optimizer/parser.cpp,4316 +namespace cashew {cashew19,646 +IString TOPLEVEL("toplevel"),TOPLEVEL23,685 + DEFUN("defun"),DEFUN24,715 + BLOCK("block"),BLOCK25,739 + VAR("var"),VAR26,763 + CONST("const"),CONST27,783 + CONDITIONAL("conditional"),CONDITIONAL28,807 + BINARY("binary"),BINARY29,843 + RETURN("return"),RETURN30,869 + IF("if"),IF31,895 + ELSE("else"),ELSE32,913 + WHILE("while"),WHILE33,935 + DO("do"),DO34,959 + FOR("for"),FOR35,977 + SEQ("seq"),SEQ36,997 + SUB("sub"),SUB37,1017 + CALL("call"),CALL38,1037 + LABEL("label"),LABEL39,1059 + BREAK("break"),BREAK40,1083 + CONTINUE("continue"),CONTINUE41,1107 + SWITCH("switch"),SWITCH42,1137 + STRING("string"),STRING43,1163 + INF("inf"),INF44,1189 + NaN("nan"),NaN45,1209 + TEMP_RET0("tempRet0"),TEMP_RET046,1229 + GET_TEMP_RET0("getTempRet0"),GET_TEMP_RET047,1260 + LLVM_CTTZ_I32("_llvm_cttz_i32"),LLVM_CTTZ_I3248,1298 + UDIVMODDI4("___udivmoddi4"),UDIVMODDI449,1339 + UNARY_PREFIX("unary-prefix"),UNARY_PREFIX50,1376 + UNARY_POSTFIX("unary-postfix"),UNARY_POSTFIX51,1414 + MATH_FROUND("Math_fround"),MATH_FROUND52,1454 + INT64("i64"),INT6453,1490 + INT64_CONST("i64_const"),INT64_CONST54,1512 + SIMD_FLOAT32X4("SIMD_Float32x4"),SIMD_FLOAT32X455,1546 + SIMD_FLOAT64X2("SIMD_Float64x2"),SIMD_FLOAT64X256,1588 + SIMD_INT8X16("SIMD_Int8x16"),SIMD_INT8X1657,1630 + SIMD_INT16X8("SIMD_Int16x8"),SIMD_INT16X858,1668 + SIMD_INT32X4("SIMD_Int32x4"),SIMD_INT32X459,1706 + PLUS("+"),PLUS60,1744 + MINUS("-"),MINUS61,1763 + OR("|"),OR62,1783 + AND("&"),AND63,1800 + XOR("^"),XOR64,1818 + L_NOT("!"),L_NOT65,1836 + B_NOT("~"),B_NOT66,1856 + LT("<"),LT67,1876 + GE(">="),GE68,1893 + LE("<="),LE69,1911 + GT(">"),GT70,1929 + EQ("=="),EQ71,1946 + NE("!="),NE72,1964 + DIV("/"),DIV73,1982 + MOD("%"),MOD74,2000 + MUL("*"),MUL75,2018 + RSHIFT(">>"),RSHIFT76,2036 + LSHIFT("<<"),LSHIFT77,2058 + TRSHIFT(">>>"),TRSHIFT78,2080 + TEMP_DOUBLE_PTR("tempDoublePtr"),TEMP_DOUBLE_PTR79,2104 + HEAP8("HEAP8"),HEAP880,2146 + HEAP16("HEAP16"),HEAP1681,2170 + HEAP32("HEAP32"),HEAP3282,2196 + HEAPF32("HEAPF32"),HEAPF3283,2222 + HEAPU8("HEAPU8"),HEAPU884,2250 + HEAPU16("HEAPU16"),HEAPU1685,2276 + HEAPU32("HEAPU32"),HEAPU3286,2304 + HEAPF64("HEAPF64"),HEAPF6487,2332 + F0("f0"),F088,2360 + EMPTY(""),EMPTY89,2378 + FUNCTION("function"),FUNCTION90,2397 + OPEN_PAREN("("),OPEN_PAREN91,2427 + OPEN_BRACE("["),OPEN_BRACE92,2452 + OPEN_CURLY("{"),OPEN_CURLY93,2477 + CLOSE_CURLY("}"),CLOSE_CURLY94,2502 + COMMA(","),COMMA95,2528 + QUESTION("?"),QUESTION96,2548 + COLON(":"),COLON97,2571 + CASE("case"),CASE98,2591 + DEFAULT("default"),DEFAULT99,2613 + DOT("dot"),DOT100,2641 + PERIOD("."),PERIOD101,2661 + NEW("new"),NEW102,2682 + ARRAY("array"),ARRAY103,2702 + OBJECT("object"),OBJECT104,2726 + THROW("throw"),THROW105,2752 + SET("=");SET106,2776 +IStringSet keywords("var const function if else do while for break continue return switch case dkeywords108,2795 +const char *OPERATOR_INITS = "+-*/%<>&^|~=!,?:.",OPERATOR_INITS110,2946 + *SEPARATORS = "([;{}";SEPARATORS111,2996 +int MAX_OPERATOR_SIZE = 3;MAX_OPERATOR_SIZE113,3031 +std::vector operatorClasses;operatorClasses115,3059 +static std::vector> precedences; // op, type => precprecedences117,3104 +struct Init {Init119,3191 + Init() {Init120,3205 +Init init;init146,4505 +int OperatorClass::getPrecedence(Type type, IString op) {getPrecedence148,4517 +bool OperatorClass::getRtl(int prec) {getRtl152,4610 +bool isIdentInit(char x) { return (x >= 'a' && x <= 'z') || (x >= 'A' && x <= 'Z') || x == '_' |isIdentInit156,4688 +bool isIdentPart(char x) { return isIdentInit(x) || (x >= '0' && x <= '9'); }isIdentPart157,4798 + +externals/binaryen/src/emscripten-optimizer/simple_ast.cpp,2342 +namespace cashew {cashew19,650 +Ref& Ref::operator[](unsigned x) {operator []23,686 +Ref& Ref::operator[](IString x) {operator []27,746 +bool Ref::operator==(const char *str) {operator ==31,805 +bool Ref::operator!=(const char *str) {operator !=35,908 +bool Ref::operator==(const IString &str) {operator ==39,1018 +bool Ref::operator!=(const IString &str) {operator !=43,1113 +bool Ref::operator==(Ref other) {operator ==47,1208 +bool Ref::operator!() {operator !51,1272 +GlobalMixedArena arena;arena57,1345 +Value& Value::setAssign(Ref target, Ref value) {setAssign61,1380 +Value& Value::setAssignName(IString target, Ref value) {setAssignName67,1512 +Assign* Value::asAssign() {asAssign73,1660 +AssignName* Value::asAssignName() {asAssignName78,1756 +void Value::stringify(std::ostream &os, bool pretty) {stringify83,1868 + #define indentify(indentify85,1948 +void dump(const char *str, Ref node, bool pretty) {dump179,3889 +struct TraverseInfo {TraverseInfo190,4115 + TraverseInfo() {}TraverseInfo191,4137 + TraverseInfo(Ref node, ArrayStorage* arr) : node(node), arr(arr), index(0) {}TraverseInfo192,4157 + Ref node;node193,4237 + ArrayStorage* arr;arr194,4249 + int index;index195,4270 +struct StackedStack { // a stack, on the stackStackedStack199,4316 + T stackStorage[init];stackStorage200,4363 + T* storage;storage201,4387 + int used, available; // used amount, available amountused202,4401 + int used, available; // used amount, available amountavailable202,4401 + bool alloced;alloced203,4457 + StackedStack() : used(0), available(init), alloced(false) {StackedStack205,4474 + ~StackedStack() {~StackedStack208,4568 + int size() { return used; }size212,4625 + void push_back(const T& t) {push_back214,4656 + T& back() {back234,5197 + void pop_back() {pop_back239,5272 +#define visitable(visitable245,5340 +#define TRAV_STACK TRAV_STACK247,5403 +void traversePre(Ref node, std::function visit) {traversePre250,5473 +void traversePrePost(Ref node, std::function visitPre, std::function vistraversePrePost285,6450 +void traversePrePostConditional(Ref node, std::function visitPre, std::function visit) {traverseFunctions358,8663 + +externals/binaryen/src/wasm-interpreter.h,7884 +#define wasm_wasm_interpreter_hwasm_wasm_interpreter_h24,867 +namespace wasm {wasm40,1130 +enum {__anonf8397af4010348,1219 + maxCallDepth = 250maxCallDepth49,1226 +class Flow {Flow53,1348 + Flow() {}Flow55,1369 + Flow(Literal value) : value(value) {}Flow56,1381 + Flow(Name breakTo) : breakTo(breakTo) {}Flow57,1421 + Literal value;value59,1465 + Name breakTo; // if non-null, a break is going onbreakTo60,1482 + bool breaking() { return breakTo.is(); }breaking62,1535 + void clearIf(Name target) {clearIf64,1579 + friend std::ostream& operator<<(std::ostream& o, Flow& flow) {operator <<70,1672 +typedef std::vector LiteralList;LiteralList77,1898 +class Indenter {Indenter81,1992 + static int indentLevel;indentLevel82,2009 + const char* entryName;entryName84,2036 +#define NOTE_ENTER(NOTE_ENTER93,2144 +#define NOTE_ENTER_(NOTE_ENTER_96,2277 +#define NOTE_NAME(NOTE_NAME99,2394 +#define NOTE_EVAL1(NOTE_EVAL1102,2501 +#define NOTE_EVAL2(NOTE_EVAL2105,2605 +#define NOTE_ENTER(NOTE_ENTER109,2769 +#define NOTE_ENTER_(NOTE_ENTER_110,2791 +#define NOTE_NAME(NOTE_NAME111,2814 +#define NOTE_EVAL1(NOTE_EVAL1112,2836 +#define NOTE_EVAL2(NOTE_EVAL2113,2859 +class ExpressionRunner : public Visitor {ExpressionRunner118,2972 + Flow visit(Expression *curr) {visit120,3037 + Flow visitBlock(Block *curr) {visitBlock124,3123 + Flow visitIf(If *curr) {visitIf157,4063 + Flow visitLoop(Loop *curr) {visitLoop170,4502 + Flow visitBreak(Break *curr) {visitBreak180,4798 + Flow visitSwitch(Switch *curr) {visitSwitch197,5286 + Flow visitConst(Const *curr) {visitConst219,5872 + Flow visitUnary(Unary *curr) {visitUnary224,6000 + Flow visitBinary(Binary *curr) {visitBinary312,10515 + Flow visitSelect(Select *curr) {visitSelect429,16157 + Flow visitDrop(Drop *curr) {visitDrop440,16577 + Flow visitReturn(Return *curr) {visitReturn446,16732 + Flow visitNop(Nop *curr) {visitNop457,16993 + Flow visitUnreachable(Unreachable *curr) {visitUnreachable461,17068 + Literal truncSFloat(Unary* curr, Literal value) {truncSFloat467,17193 + Literal truncUFloat(Unary* curr, Literal value) {truncUFloat487,17930 + virtual void trap(const char* why) {trap507,18669 +class ConstantExpressionRunner : public ExpressionRunnerConstantExpressionRunner514,18841 + GlobalManager& globals;globals515,18941 + ConstantExpressionRunner(GlobalManager& globals) : globals(globals) {}ConstantExpressionRunner517,18975 + Flow visitLoop(Loop* curr) { WASM_UNREACHABLE(); }visitLoop519,19049 + Flow visitCall(Call* curr) { WASM_UNREACHABLE(); }visitCall520,19102 + Flow visitCallImport(CallImport* curr) { WASM_UNREACHABLE(); }visitCallImport521,19155 + Flow visitCallIndirect(CallIndirect* curr) { WASM_UNREACHABLE(); }visitCallIndirect522,19220 + Flow visitGetLocal(GetLocal *curr) { WASM_UNREACHABLE(); }visitGetLocal523,19289 + Flow visitSetLocal(SetLocal *curr) { WASM_UNREACHABLE(); }visitSetLocal524,19350 + Flow visitGetGlobal(GetGlobal *curr) { return Flow(globals[curr->name]); }visitGetGlobal525,19411 + Flow visitSetGlobal(SetGlobal *curr) { WASM_UNREACHABLE(); }visitSetGlobal526,19488 + Flow visitLoad(Load *curr) { WASM_UNREACHABLE(); }visitLoad527,19551 + Flow visitStore(Store *curr) { WASM_UNREACHABLE(); }visitStore528,19604 + Flow visitHost(Host *curr) { WASM_UNREACHABLE(); }visitHost529,19659 +class ModuleInstanceBase {ModuleInstanceBase543,20116 + struct ExternalInterface {ExternalInterface550,20364 + virtual void init(Module& wasm, SubType& instance) {}init551,20393 + virtual Literal load(Load* load, Address addr) {load560,20967 + virtual void store(Store* store, Address addr, Literal value) {store586,22253 + virtual int8_t load8s(Address addr) { WASM_UNREACHABLE(); }load8s614,23273 + virtual uint8_t load8u(Address addr) { WASM_UNREACHABLE(); }load8u615,23337 + virtual int16_t load16s(Address addr) { WASM_UNREACHABLE(); }load16s616,23402 + virtual uint16_t load16u(Address addr) { WASM_UNREACHABLE(); }load16u617,23468 + virtual int32_t load32s(Address addr) { WASM_UNREACHABLE(); }load32s618,23535 + virtual uint32_t load32u(Address addr) { WASM_UNREACHABLE(); }load32u619,23601 + virtual int64_t load64s(Address addr) { WASM_UNREACHABLE(); }load64s620,23668 + virtual uint64_t load64u(Address addr) { WASM_UNREACHABLE(); }load64u621,23734 + virtual void store8(Address addr, int8_t value) { WASM_UNREACHABLE(); }store8623,23802 + virtual void store16(Address addr, int16_t value) { WASM_UNREACHABLE(); }store16624,23878 + virtual void store32(Address addr, int32_t value) { WASM_UNREACHABLE(); }store32625,23956 + virtual void store64(Address addr, int64_t value) { WASM_UNREACHABLE(); }store64626,24034 + SubType* self() {self629,24118 + Module& wasm;wasm633,24183 + GlobalManager globals;globals636,24223 + ModuleInstanceBase(Module& wasm, ExternalInterface* externalInterface) : wasm(wasm), externalIModuleInstanceBase638,24249 + Literal callExport(Name name, LiteralList& arguments) {callExport657,24994 + Literal callExport(Name name) {callExport663,25226 + Literal getExport(Name name) {getExport669,25360 + std::string printFunctionStack() {printFunctionStack678,25720 + size_t callDepth;callDepth689,26091 + std::vector functionStack;functionStack693,26206 + Literal callFunction(Name name, LiteralList& arguments) {callFunction697,26296 + Literal callFunctionInternal(Name name, LiteralList& arguments) {callFunctionInternal705,26661 + class FunctionScope {FunctionScope707,26730 + std::vector locals;locals709,26769 + Function* function;function710,26804 + FunctionScope(Function* function, LiteralList& arguments)FunctionScope712,26831 + class RuntimeExpressionRunner : public ExpressionRunner {RuntimeExpressionRunner741,28116 + ModuleInstanceBase& instance;instance742,28203 + FunctionScope& scope;scope743,28239 + RuntimeExpressionRunner(ModuleInstanceBase& instance, FunctionScope& scope) : instance(insRuntimeExpressionRunner745,28279 + Flow last_call;last_call747,28400 + Flow generateArguments(const ExpressionList& operands, LiteralList& arguments) {generateArguments748,28422 + Flow _visitCall(Call *curr) {_visitCall760,28848 + Flow visitCall(Call *curr) {visitCall773,29296 + Flow _visitCallImport(CallImport *curr) {_visitCallImport779,29425 + Flow visitCallImport(CallImport *curr) {visitCallImport787,29760 + Flow _visitCallIndirect(CallIndirect *curr) {_visitCallIndirect793,29907 + Flow visitCallIndirect(CallIndirect *curr) {visitCallIndirect804,30385 + Flow visitGetLocal(GetLocal *curr) {visitGetLocal810,30538 + Flow visitSetLocal(SetLocal *curr) {visitSetLocal817,30759 + Flow visitGetGlobal(GetGlobal *curr) {visitGetGlobal829,31188 + Flow visitSetGlobal(SetGlobal *curr) {visitSetGlobal837,31492 + Flow visitLoad(Load *curr) {visitLoad848,31825 + Flow visitStore(Store *curr) {visitStore859,32208 + Flow visitHost(Host *curr) {visitHost872,32664 + void trap(const char* why) override {trap900,33891 + Address memorySize; // in pagesmemorySize950,35619 + Address getFinalAddress(LS* curr, Literal ptr) {getFinalAddress953,35676 + auto trapIfGt = [this](uint64_t lhs, uint64_t rhs, const char* msg) {__anonf8397af40202954,35727 + ExternalInterface* externalInterface;externalInterface971,36414 +typedef std::map TrivialGlobalManager;TrivialGlobalManager975,36518 +class ModuleInstance : public ModuleInstanceBase {ModuleInstance976,36572 + ModuleInstance(Module& wasm, ExternalInterface* externalInterface) : ModuleInstanceBase(wasm, ModuleInstance978,36669 + +externals/binaryen/src/js/binaryen.js-pre.js,47 +var Binaryen = function(Module) {Binaryen1,0 + +externals/binaryen/src/js/binaryen.js-post.js,10618 + function preserveStack(func) {preserveStack3,34 + function strToStack(str) {strToStack12,200 + function i32sToStack(i32s) {i32sToStack17,323 + return preserveStack(function() {AnonymousFunctionaae2de320100169,8778 + return preserveStack(function() {AnonymousFunctionaae2de320200175,9086 + return preserveStack(function() {AnonymousFunctionaae2de320300182,9380 + return preserveStack(function() {AnonymousFunctionaae2de320400192,9871 + return preserveStack(function() {AnonymousFunctionaae2de320500197,10057 + names.forEach(function(name) {AnonymousFunctionaae2de320700204,10337 + return preserveStack(function() {AnonymousFunctionaae2de320600202,10270 + return preserveStack(function() {AnonymousFunctionaae2de320800212,10674 + return preserveStack(function() {AnonymousFunctionaae2de320900217,10901 + return preserveStack(function() {AnonymousFunctionaae2de320a00222,11138 + 'load': function(offset, align, ptr) {load259,12779 + 'load8_s': function(offset, align, ptr) {load8_s262,12925 + 'load8_u': function(offset, align, ptr) {load8_u265,13074 + 'load16_s': function(offset, align, ptr) {load16_s268,13224 + 'load16_u': function(offset, align, ptr) {load16_u271,13374 + 'store': function(offset, align, ptr, value) {store274,13525 + 'store8': function(offset, align, ptr, value) {store8277,13681 + 'store16': function(offset, align, ptr, value) {store16280,13838 + 'const': function(x) {const283,13996 + 'clz': function(value) {clz287,14145 + 'ctz': function(value) {ctz290,14261 + 'popcnt': function(value) {popcnt293,14377 + 'eqz': function(value) {eqz296,14499 + 'f32': function(value) {f32300,14634 + 'f64': function(value) {f64303,14768 + 'trunc_s': {trunc_s299,14615 + 'f32': function(value) {f32308,14930 + 'f64': function(value) {f64311,15064 + 'trunc_u': {trunc_u307,14911 + 'reinterpret': function(value) {reinterpret315,15207 + 'wrap': function(value) {wrap318,15341 + 'add': function(left, right) {add321,15459 + 'sub': function(left, right) {sub324,15588 + 'mul': function(left, right) {mul327,15717 + 'div_s': function(left, right) {div_s330,15846 + 'div_u': function(left, right) {div_u333,15978 + 'rem_s': function(left, right) {rem_s336,16110 + 'rem_u': function(left, right) {rem_u339,16242 + 'and': function(left, right) {and342,16374 + 'or': function(left, right) {or345,16503 + 'xor': function(left, right) {xor348,16630 + 'shl': function(left, right) {shl351,16759 + 'shr_u': function(left, right) {shr_u354,16888 + 'shr_s': function(left, right) {shr_s357,17020 + 'rotl': function(left, right) {rotl360,17152 + 'rotr': function(left, right) {rotr363,17283 + 'eq': function(left, right) {eq366,17414 + 'ne': function(left, right) {ne369,17541 + 'lt_s': function(left, right) {lt_s372,17668 + 'lt_u': function(left, right) {lt_u375,17798 + 'le_s': function(left, right) {le_s378,17928 + 'le_u': function(left, right) {le_u381,18058 + 'gt_s': function(left, right) {gt_s384,18188 + 'gt_u': function(left, right) {gt_u387,18318 + 'ge_s': function(left, right) {ge_s390,18448 + 'ge_u': function(left, right) {ge_u393,18578 + 'load': function(offset, align, ptr) {load399,18736 + 'load8_s': function(offset, align, ptr) {load8_s402,18882 + 'load8_u': function(offset, align, ptr) {load8_u405,19031 + 'load16_s': function(offset, align, ptr) {load16_s408,19181 + 'load16_u': function(offset, align, ptr) {load16_u411,19331 + 'load32_s': function(offset, align, ptr) {load32_s414,19482 + 'load32_u': function(offset, align, ptr) {load32_u417,19632 + 'store': function(offset, align, ptr, value) {store420,19783 + 'store8': function(offset, align, ptr, value) {store8423,19939 + 'store16': function(offset, align, ptr, value) {store16426,20096 + 'store32': function(offset, align, ptr, value) {store32429,20254 + 'const': function(x, y) {const432,20412 + 'clz': function(value) {clz436,20567 + 'ctz': function(value) {ctz439,20683 + 'popcnt': function(value) {popcnt442,20799 + 'eqz': function(value) {eqz445,20921 + 'f32': function(value) {f32449,21056 + 'f64': function(value) {f64452,21190 + 'trunc_s': {trunc_s448,21037 + 'f32': function(value) {f32457,21352 + 'f64': function(value) {f64460,21486 + 'trunc_u': {trunc_u456,21333 + 'reinterpret': function(value) {reinterpret464,21629 + 'extend_s': function(value) {extend_s467,21763 + 'extend_u': function(value) {extend_u470,21888 + 'add': function(left, right) {add473,22013 + 'sub': function(left, right) {sub476,22142 + 'mul': function(left, right) {mul479,22271 + 'div_s': function(left, right) {div_s482,22400 + 'div_u': function(left, right) {div_u485,22532 + 'rem_s': function(left, right) {rem_s488,22664 + 'rem_u': function(left, right) {rem_u491,22796 + 'and': function(left, right) {and494,22928 + 'or': function(left, right) {or497,23057 + 'xor': function(left, right) {xor500,23184 + 'shl': function(left, right) {shl503,23313 + 'shr_u': function(left, right) {shr_u506,23442 + 'shr_s': function(left, right) {shr_s509,23574 + 'rotl': function(left, right) {rotl512,23706 + 'rotr': function(left, right) {rotr515,23837 + 'eq': function(left, right) {eq518,23968 + 'ne': function(left, right) {ne521,24095 + 'lt_s': function(left, right) {lt_s524,24222 + 'lt_u': function(left, right) {lt_u527,24352 + 'le_s': function(left, right) {le_s530,24482 + 'le_u': function(left, right) {le_u533,24612 + 'gt_s': function(left, right) {gt_s536,24742 + 'gt_u': function(left, right) {gt_u539,24872 + 'ge_s': function(left, right) {ge_s542,25002 + 'ge_u': function(left, right) {ge_u545,25132 + 'load': function(offset, align, ptr) {load551,25290 + 'store': function(offset, align, ptr, value) {store554,25436 + 'const': function(x) {const557,25592 + 'const_bits': function(x) {const_bits561,25743 + 'neg': function(value) {neg565,25903 + 'abs': function(value) {abs568,26021 + 'ceil': function(value) {ceil571,26139 + 'floor': function(value) {floor574,26259 + 'trunc': function(value) {trunc577,26381 + 'nearest': function(value) {nearest580,26503 + 'sqrt': function(value) {sqrt583,26629 + 'reinterpret': function(value) {reinterpret586,26749 + 'i32': function(value) {i32590,26902 + 'i64': function(value) {i64593,27038 + 'convert_s': {convert_s589,26881 + 'i32': function(value) {i32598,27204 + 'i64': function(value) {i64601,27340 + 'convert_u': {convert_u597,27183 + 'demote': function(value) {demote605,27485 + 'add': function(left, right) {add608,27609 + 'sub': function(left, right) {sub611,27740 + 'mul': function(left, right) {mul614,27871 + 'div': function(left, right) {div617,28002 + 'copysign': function(left, right) {copysign620,28133 + 'min': function(left, right) {min623,28274 + 'max': function(left, right) {max626,28405 + 'eq': function(left, right) {eq629,28536 + 'ne': function(left, right) {ne632,28665 + 'lt': function(left, right) {lt635,28794 + 'le': function(left, right) {le638,28923 + 'gt': function(left, right) {gt641,29052 + 'ge': function(left, right) {ge644,29181 + 'load': function(offset, align, ptr) {load650,29338 + 'store': function(offset, align, ptr, value) {store653,29484 + 'const': function(x) {const656,29640 + 'const_bits': function(x, y) {const_bits660,29791 + 'neg': function(value) {neg664,29957 + 'abs': function(value) {abs667,30075 + 'ceil': function(value) {ceil670,30193 + 'floor': function(value) {floor673,30313 + 'trunc': function(value) {trunc676,30435 + 'nearest': function(value) {nearest679,30557 + 'sqrt': function(value) {sqrt682,30683 + 'reinterpret': function(value) {reinterpret685,30803 + 'i32': function(value) {i32689,30956 + 'i64': function(value) {i64692,31092 + 'convert_s': {convert_s688,30935 + 'i32': function(value) {i32697,31258 + 'i64': function(value) {i64700,31394 + 'convert_u': {convert_u696,31237 + 'promote': function(value) {promote704,31539 + 'add': function(left, right) {add707,31665 + 'sub': function(left, right) {sub710,31796 + 'mul': function(left, right) {mul713,31927 + 'div': function(left, right) {div716,32058 + 'copysign': function(left, right) {copysign719,32189 + 'min': function(left, right) {min722,32330 + 'max': function(left, right) {max725,32461 + 'eq': function(left, right) {eq728,32592 + 'ne': function(left, right) {ne731,32721 + 'lt': function(left, right) {lt734,32850 + 'le': function(left, right) {le737,32979 + 'gt': function(left, right) {gt740,33108 + 'ge': function(left, right) {ge743,33237 + return preserveStack(function() {AnonymousFunctionaae2de320b00767,34029 + return preserveStack(function() {AnonymousFunctionaae2de320c00772,34281 + return preserveStack(function() {AnonymousFunctionaae2de320d00777,34522 + return preserveStack(function() {AnonymousFunctionaae2de320e00782,34778 + return preserveStack(function() {AnonymousFunctionaae2de320f00787,34980 + return preserveStack(function() {AnonymousFunctionaae2de321000792,35194 + return preserveStack(function() {AnonymousFunctionaae2de321100797,35382 + segments.map(function(segment) {AnonymousFunctionaae2de321300807,35866 + segments.map(function(segment) {AnonymousFunctionaae2de321400812,36026 + segments.map(function(segment) {AnonymousFunctionaae2de321500817,36159 + return preserveStack(function() {AnonymousFunctionaae2de321200803,35698 + Module['print'] = function(x) { ret += x + '\n' };Module831,36522 + Module['Module'] = function(module) {Module161,8493 + return preserveStack(function() {AnonymousFunctionaae2de321600873,38091 + Module['print'] = function(x) { ret += x + '\n' };Module889,38639 + Module['emitText'] = function(expr) {Module883,38478 + var a = Binaryen();a919,39423 + +externals/binaryen/src/wasm-printing.h,509 +#define wasm_wasm_printing_hwasm_wasm_printing_h18,654 +namespace wasm {wasm25,741 +struct WasmPrinter {WasmPrinter27,759 + static std::ostream& printModule(Module* module, std::ostream& o) {printModule28,780 + static std::ostream& printModule(Module* module) {printModule36,993 +namespace std {std45,1222 +inline std::ostream& operator<<(std::ostream& o, wasm::Module* module) {operator <<47,1239 +inline std::ostream& operator<<(std::ostream& o, wasm::Expression* expression) {operator <<51,1367 + +externals/binaryen/src/wasm-binary.h,14835 +#define wasm_wasm_binary_hwasm_wasm_binary_h22,703 +namespace wasm {wasm37,998 +struct LEB {LEB40,1053 + T value;value43,1128 + LEB() {}LEB45,1140 + LEB(T value) : value(value) {}LEB46,1151 + bool hasMore(T temp, MiniT byte) {hasMore48,1185 + void write(std::vector* out) {write53,1458 + void writeAt(std::vector* out, size_t at, size_t minimum = 0) {writeAt67,1735 + void read(std::function get) {read83,2114 + typedef typename std::make_unsigned::type mask_type;mask_type91,2303 +typedef LEB U32LEB;U32LEB124,3440 +typedef LEB U64LEB;U64LEB125,3479 +typedef LEB S32LEB;S32LEB126,3518 +typedef LEB S64LEB;S64LEB127,3555 +class BufferWithRandomAccess : public std::vector {BufferWithRandomAccess134,3791 + bool debug;debug135,3852 + BufferWithRandomAccess(bool debug) : debug(debug) {}BufferWithRandomAccess138,3875 + BufferWithRandomAccess& operator<<(int8_t x) {operator <<140,3931 + BufferWithRandomAccess& operator<<(int16_t x) {operator <<145,4123 + BufferWithRandomAccess& operator<<(int32_t x) {operator <<151,4333 + BufferWithRandomAccess& operator<<(int64_t x) {operator <<159,4622 + BufferWithRandomAccess& operator<<(U32LEB x) {operator <<171,5047 + BufferWithRandomAccess& operator<<(U64LEB x) {operator <<185,5441 + BufferWithRandomAccess& operator<<(S32LEB x) {operator <<199,5835 + BufferWithRandomAccess& operator<<(S64LEB x) {operator <<213,6229 + BufferWithRandomAccess& operator<<(uint8_t x) {operator <<228,6624 + BufferWithRandomAccess& operator<<(uint16_t x) {operator <<231,6709 + BufferWithRandomAccess& operator<<(uint32_t x) {operator <<234,6796 + BufferWithRandomAccess& operator<<(uint64_t x) {operator <<237,6883 + BufferWithRandomAccess& operator<<(float x) {operator <<241,6971 + BufferWithRandomAccess& operator<<(double x) {operator <<245,7164 + void writeAt(size_t i, uint16_t x) {writeAt250,7359 + void writeAt(size_t i, uint32_t x) {writeAt255,7545 + void writeAt(size_t i, U32LEB x) {writeAt262,7818 + void writeTo(T& o) {writeTo268,8065 +namespace BinaryConsts {BinaryConsts273,8129 +enum Meta {Meta275,8155 + Magic = 0x6d736100,Magic276,8167 + Version = 0x01Version277,8189 +enum Section {Section280,8210 + User = 0,User281,8225 + Type = 1,Type282,8237 + Import = 2,Import283,8249 + Function = 3,Function284,8263 + Table = 4,Table285,8279 + Memory = 5,Memory286,8292 + Global = 6,Global287,8306 + Export = 7,Export288,8320 + Start = 8,Start289,8334 + Element = 9,Element290,8347 + Code = 10,Code291,8362 + Data = 11Data292,8375 +enum EncodedType {EncodedType295,8391 + i32 = -0x1, // 0x7fi32297,8426 + i64 = -0x2, // 0x7ei64298,8448 + f32 = -0x3, // 0x7df32299,8470 + f64 = -0x4, // 0x7cf64300,8492 + AnyFunc = -0x10, // 0x70AnyFunc302,8529 + Func = -0x20, // 0x60Func304,8576 + Empty = -0x40 // 0x40Empty306,8616 +namespace UserSections {UserSections309,8644 +enum Subsection {Subsection313,8728 + NameFunction = 1,NameFunction314,8746 + NameLocal = 2,NameLocal315,8766 +enum ASTNodes {ASTNodes319,8789 + Unreachable = 0x00,Unreachable320,8805 + Nop = 0x01,Nop321,8827 + Block = 0x02,Block322,8841 + Loop = 0x03,Loop323,8857 + If = 0x04,If324,8872 + Else = 0x05,Else325,8885 + End = 0x0b,End327,8901 + Br = 0x0c,Br328,8915 + BrIf = 0x0d,BrIf329,8928 + TableSwitch = 0x0e, // TODO: Rename to BrTableTableSwitch330,8943 + Return = 0x0f,Return331,8992 + CallFunction = 0x10,CallFunction333,9010 + CallIndirect = 0x11,CallIndirect334,9033 + Drop = 0x1a,Drop336,9057 + Select = 0x1b,Select337,9072 + GetLocal = 0x20,GetLocal339,9090 + SetLocal = 0x21,SetLocal340,9109 + TeeLocal = 0x22,TeeLocal341,9128 + GetGlobal = 0x23,GetGlobal342,9147 + SetGlobal = 0x24,SetGlobal343,9167 + I32LoadMem = 0x28,I32LoadMem346,9189 + I64LoadMem = 0x29,I64LoadMem347,9210 + F32LoadMem = 0x2a,F32LoadMem348,9231 + F64LoadMem = 0x2b,F64LoadMem349,9252 + I32LoadMem8S = 0x2c,I32LoadMem8S351,9274 + I32LoadMem8U = 0x2d,I32LoadMem8U352,9297 + I32LoadMem16S = 0x2e,I32LoadMem16S353,9320 + I32LoadMem16U = 0x2f,I32LoadMem16U354,9344 + I64LoadMem8S = 0x30,I64LoadMem8S355,9368 + I64LoadMem8U = 0x31,I64LoadMem8U356,9391 + I64LoadMem16S = 0x32,I64LoadMem16S357,9414 + I64LoadMem16U = 0x33,I64LoadMem16U358,9438 + I64LoadMem32S = 0x34,I64LoadMem32S359,9462 + I64LoadMem32U = 0x35,I64LoadMem32U360,9486 + I32StoreMem = 0x36,I32StoreMem362,9511 + I64StoreMem = 0x37,I64StoreMem363,9533 + F32StoreMem = 0x38,F32StoreMem364,9555 + F64StoreMem = 0x39,F64StoreMem365,9577 + I32StoreMem8 = 0x3a,I32StoreMem8367,9600 + I32StoreMem16 = 0x3b,I32StoreMem16368,9623 + I64StoreMem8 = 0x3c,I64StoreMem8369,9647 + I64StoreMem16 = 0x3d,I64StoreMem16370,9670 + I64StoreMem32 = 0x3e,I64StoreMem32371,9694 + CurrentMemory = 0x3f,CurrentMemory373,9719 + GrowMemory = 0x40,GrowMemory374,9743 + I32Const = 0x41,I32Const376,9765 + I64Const = 0x42,I64Const377,9784 + F32Const = 0x43,F32Const378,9803 + F64Const = 0x44,F64Const379,9822 + I32EqZ = 0x45,I32EqZ381,9842 + I32Eq = 0x46,I32Eq382,9859 + I32Ne = 0x47,I32Ne383,9875 + I32LtS = 0x48,I32LtS384,9891 + I32LtU = 0x49,I32LtU385,9908 + I32GtS = 0x4a,I32GtS386,9925 + I32GtU = 0x4b,I32GtU387,9942 + I32LeS = 0x4c,I32LeS388,9959 + I32LeU = 0x4d,I32LeU389,9976 + I32GeS = 0x4e,I32GeS390,9993 + I32GeU = 0x4f,I32GeU391,10010 + I64EqZ = 0x50,I64EqZ392,10027 + I64Eq = 0x51,I64Eq393,10044 + I64Ne = 0x52,I64Ne394,10060 + I64LtS = 0x53,I64LtS395,10076 + I64LtU = 0x54,I64LtU396,10093 + I64GtS = 0x55,I64GtS397,10110 + I64GtU = 0x56,I64GtU398,10127 + I64LeS = 0x57,I64LeS399,10144 + I64LeU = 0x58,I64LeU400,10161 + I64GeS = 0x59,I64GeS401,10178 + I64GeU = 0x5a,I64GeU402,10195 + F32Eq = 0x5b,F32Eq403,10212 + F32Ne = 0x5c,F32Ne404,10228 + F32Lt = 0x5d,F32Lt405,10244 + F32Gt = 0x5e,F32Gt406,10260 + F32Le = 0x5f,F32Le407,10276 + F32Ge = 0x60,F32Ge408,10292 + F64Eq = 0x61,F64Eq409,10308 + F64Ne = 0x62,F64Ne410,10324 + F64Lt = 0x63,F64Lt411,10340 + F64Gt = 0x64,F64Gt412,10356 + F64Le = 0x65,F64Le413,10372 + F64Ge = 0x66,F64Ge414,10388 + I32Clz = 0x67,I32Clz416,10405 + I32Ctz = 0x68,I32Ctz417,10422 + I32Popcnt = 0x69,I32Popcnt418,10439 + I32Add = 0x6a,I32Add419,10459 + I32Sub = 0x6b,I32Sub420,10476 + I32Mul = 0x6c,I32Mul421,10493 + I32DivS = 0x6d,I32DivS422,10510 + I32DivU = 0x6e,I32DivU423,10528 + I32RemS = 0x6f,I32RemS424,10546 + I32RemU = 0x70,I32RemU425,10564 + I32And = 0x71,I32And426,10582 + I32Or = 0x72,I32Or427,10599 + I32Xor = 0x73,I32Xor428,10615 + I32Shl = 0x74,I32Shl429,10632 + I32ShrS = 0x75,I32ShrS430,10649 + I32ShrU = 0x76,I32ShrU431,10667 + I32RotL = 0x77,I32RotL432,10685 + I32RotR = 0x78,I32RotR433,10703 + I64Clz = 0x79,I64Clz435,10722 + I64Ctz = 0x7a,I64Ctz436,10739 + I64Popcnt = 0x7b,I64Popcnt437,10756 + I64Add = 0x7c,I64Add438,10776 + I64Sub = 0x7d,I64Sub439,10793 + I64Mul = 0x7e,I64Mul440,10810 + I64DivS = 0x7f,I64DivS441,10827 + I64DivU = 0x80,I64DivU442,10845 + I64RemS = 0x81,I64RemS443,10863 + I64RemU = 0x82,I64RemU444,10881 + I64And = 0x83,I64And445,10899 + I64Or = 0x84,I64Or446,10916 + I64Xor = 0x85,I64Xor447,10932 + I64Shl = 0x86,I64Shl448,10949 + I64ShrS = 0x87,I64ShrS449,10966 + I64ShrU = 0x88,I64ShrU450,10984 + I64RotL = 0x89,I64RotL451,11002 + I64RotR = 0x8a,I64RotR452,11020 + F32Abs = 0x8b,F32Abs454,11039 + F32Neg = 0x8c,F32Neg455,11056 + F32Ceil = 0x8d,F32Ceil456,11073 + F32Floor = 0x8e,F32Floor457,11091 + F32Trunc = 0x8f,F32Trunc458,11110 + F32NearestInt = 0x90,F32NearestInt459,11129 + F32Sqrt = 0x91,F32Sqrt460,11153 + F32Add = 0x92,F32Add461,11171 + F32Sub = 0x93,F32Sub462,11188 + F32Mul = 0x94,F32Mul463,11205 + F32Div = 0x95,F32Div464,11222 + F32Min = 0x96,F32Min465,11239 + F32Max = 0x97,F32Max466,11256 + F32CopySign = 0x98,F32CopySign467,11273 + F64Abs = 0x99,F64Abs469,11296 + F64Neg = 0x9a,F64Neg470,11313 + F64Ceil = 0x9b,F64Ceil471,11330 + F64Floor = 0x9c,F64Floor472,11348 + F64Trunc = 0x9d,F64Trunc473,11367 + F64NearestInt = 0x9e,F64NearestInt474,11386 + F64Sqrt = 0x9f,F64Sqrt475,11410 + F64Add = 0xa0,F64Add476,11428 + F64Sub = 0xa1,F64Sub477,11445 + F64Mul = 0xa2,F64Mul478,11462 + F64Div = 0xa3,F64Div479,11479 + F64Min = 0xa4,F64Min480,11496 + F64Max = 0xa5,F64Max481,11513 + F64CopySign = 0xa6,F64CopySign482,11530 + I32ConvertI64 = 0xa7, // TODO: rename to I32WrapI64I32ConvertI64484,11553 + I32STruncF32 = 0xa8,I32STruncF32485,11607 + I32UTruncF32 = 0xa9,I32UTruncF32486,11630 + I32STruncF64 = 0xaa,I32STruncF64487,11653 + I32UTruncF64 = 0xab,I32UTruncF64488,11676 + I64STruncI32 = 0xac, // TODO: rename to I64SExtendI32I64STruncI32489,11699 + I64UTruncI32 = 0xad, // TODO: likewiseI64UTruncI32490,11755 + I64STruncF32 = 0xae,I64STruncF32491,11796 + I64UTruncF32 = 0xaf,I64UTruncF32492,11819 + I64STruncF64 = 0xb0,I64STruncF64493,11842 + I64UTruncF64 = 0xb1,I64UTruncF64494,11865 + F32SConvertI32 = 0xb2,F32SConvertI32495,11888 + F32UConvertI32 = 0xb3,F32UConvertI32496,11913 + F32SConvertI64 = 0xb4,F32SConvertI64497,11938 + F32UConvertI64 = 0xb5,F32UConvertI64498,11963 + F32ConvertF64 = 0xb6, // TODO: rename to F32DemoteI64F32ConvertF64499,11988 + F64SConvertI32 = 0xb7,F64SConvertI32500,12044 + F64UConvertI32 = 0xb8,F64UConvertI32501,12069 + F64SConvertI64 = 0xb9,F64SConvertI64502,12094 + F64UConvertI64 = 0xba,F64UConvertI64503,12119 + F64ConvertF32 = 0xbb, // TODO: rename to F64PromoteF32F64ConvertF32504,12144 + I32ReinterpretF32 = 0xbc,I32ReinterpretF32506,12202 + I64ReinterpretF64 = 0xbd,I64ReinterpretF64507,12230 + F32ReinterpretI32 = 0xbe,F32ReinterpretI32508,12258 + F64ReinterpretI64 = 0xbfF64ReinterpretI64509,12286 +enum MemoryAccess {MemoryAccess512,12317 + Offset = 0x10, // bit 4Offset513,12337 + Alignment = 0x80, // bit 7Alignment514,12367 + NaturalAlignment = 0NaturalAlignment515,12397 +inline S32LEB binaryWasmType(WasmType type) {binaryWasmType521,12454 +class WasmBinaryWriter : public Visitor {WasmBinaryWriter535,12942 + Module* wasm;wasm536,13008 + BufferWithRandomAccess& o;o537,13024 + Function* currFunction = nullptr;currFunction538,13053 + bool debug;debug539,13089 + bool debugInfo = true;debugInfo540,13103 + std::ostream* sourceMap = nullptr;sourceMap541,13128 + std::string sourceMapUrl;sourceMapUrl542,13165 + std::string symbolMap;symbolMap543,13193 + MixedArena allocator;allocator545,13219 + WasmBinaryWriter(Module* input, BufferWithRandomAccess& o, bool debug) : wasm(input), o(o), deWasmBinaryWriter549,13270 + void setNamesSection(bool set) { debugInfo = set; }setNamesSection553,13399 + void setSourceMap(std::ostream* set, std::string url) {setSourceMap554,13453 + void setSymbolMap(std::string set) { symbolMap = set; }setSymbolMap558,13560 + std::map mappedLocals; // local index => index in compact form of [all int32s][mappedLocals574,14105 + std::map numLocalsByType; // type => number of locals of that type in the conumLocalsByType575,14216 + std::map mappedFunctions; // name of the Function => index. first imports, then imappedFunctions585,14538 + std::map mappedGlobals; // name of the Global => index. first imported globalsmappedGlobals586,14643 + struct Buffer {Buffer604,15242 + const char* data;data605,15260 + size_t size;size606,15282 + size_t pointerLocation;pointerLocation607,15299 + Buffer(const char* data, size_t size, size_t pointerLocation) : data(data), size(size), poinBuffer608,15327 + std::vector buffersToWrite;buffersToWrite611,15461 + int depth = 0; // only for debuggingdepth618,15636 + std::vector breakStack;breakStack621,15711 + Function::DebugLocation lastDebugLocation;lastDebugLocation622,15743 + size_t lastBytecodeOffset;lastBytecodeOffset623,15788 + void visit(Expression* curr) {visit625,15818 +class WasmBinaryBuilder {WasmBinaryBuilder666,17264 + Module& wasm;wasm667,17290 + MixedArena& allocator;allocator668,17306 + std::vector& input;input669,17331 + bool debug;debug670,17359 + std::istream* sourceMap;sourceMap671,17373 + std::pair nextDebugLocation;nextDebugLocation672,17400 + size_t pos = 0;pos674,17467 + Index startIndex = -1;startIndex675,17485 + bool useDebugLocation;useDebugLocation676,17510 + std::set seenSections;seenSections678,17536 + WasmBinaryBuilder(Module& wasm, std::vector& input, bool debug) : wasm(wasm), allocator(WasmBinaryBuilder681,17593 + bool more() { return pos < input.size();}more685,17875 + std::vector functionImportIndexes; // index in function index space => name of function functionImportIndexes711,18556 + std::vector functionTypes; // types of defined functionsfunctionTypes718,18876 + size_t nextLabel;nextLabel721,18984 + Name getNextLabel() {getNextLabel723,19005 + std::vector functions; // we store functions here before wasm.addFunction after we functions728,19210 + std::map> functionCalls; // at index i we have all calls to the defifunctionCalls729,19323 + Function* currFunction = nullptr;currFunction730,19434 + Index endOfFunction = -1; // before we see a function (like global init expressions), there isendOfFunction731,19470 + std::map exportIndexes;exportIndexes735,19621 + std::vector exportOrder;exportOrder736,19663 + struct BreakTarget {BreakTarget742,19777 + Name name;name743,19800 + int arity;arity744,19815 + BreakTarget(Name name, int arity) : name(name), arity(arity) {}BreakTarget745,19830 + std::vector breakStack;breakStack747,19903 + bool breaksToReturn; // whether a break is done to the function scope, which is in effect a rebreaksToReturn748,19942 + std::vector expressionStack;expressionStack750,20044 + BinaryConsts::ASTNodes lastSeparator = BinaryConsts::End;lastSeparator752,20089 + std::map mappedGlobals; // index of the Global => name. first imported globals, tmappedGlobals758,20249 + std::map> functionTable;functionTable764,20457 + void setDebugLocations(std::istream* sourceMap_) {setDebugLocations771,20644 + Function::DebugLocation debugLocation;debugLocation774,20731 + std::unordered_map debugInfoFileIndices;debugInfoFileIndices775,20772 + int depth = 0; // only for debuggingdepth780,20915 + void fillCall(T* call, FunctionType* type) {fillCall793,21336 + +externals/binaryen/src/wasm/CMakeLists.txt,86 +SET(wasm_SOURCESwasm_SOURCES1,0 +ADD_LIBRARY(wasm STATIC ${wasm_SOURCES})wasm9,112 + +externals/binaryen/src/wasm/wasm.cpp,5938 +namespace wasm {wasm21,695 +Name WASM("wasm"),WASM25,734 + RETURN_FLOW("*return:)*");RETURN_FLOW26,753 +namespace BinaryConsts {BinaryConsts28,786 +namespace UserSections {UserSections29,811 +const char* Name = "name";Name30,836 +const char* SourceMapUrl = "sourceMappingURL";SourceMapUrl31,863 +Name GROW_WASM_MEMORY("__growWasmMemory"),GROW_WASM_MEMORY35,915 + MEMORY_BASE("memoryBase"),MEMORY_BASE36,958 + TABLE_BASE("tableBase"),TABLE_BASE37,990 + NEW_SIZE("newSize"),NEW_SIZE38,1020 + MODULE("module"),MODULE39,1046 + START("start"),START40,1069 + FUNC("func"),FUNC41,1090 + PARAM("param"),PARAM42,1109 + RESULT("result"),RESULT43,1130 + MEMORY("memory"),MEMORY44,1153 + DATA("data"),DATA45,1176 + SEGMENT("segment"),SEGMENT46,1195 + EXPORT("export"),EXPORT47,1220 + IMPORT("import"),IMPORT48,1243 + TABLE("table"),TABLE49,1266 + ELEM("elem"),ELEM50,1287 + LOCAL("local"),LOCAL51,1306 + TYPE("type"),TYPE52,1327 + CALL("call"),CALL53,1346 + CALL_IMPORT("call_import"),CALL_IMPORT54,1365 + CALL_INDIRECT("call_indirect"),CALL_INDIRECT55,1398 + BLOCK("block"),BLOCK56,1435 + BR_IF("br_if"),BR_IF57,1456 + THEN("then"),THEN58,1477 + ELSE("else"),ELSE59,1496 + _NAN("NaN"),_NAN60,1515 + _INFINITY("Infinity"),_INFINITY61,1533 + NEG_INFINITY("-infinity"),NEG_INFINITY62,1561 + NEG_NAN("-nan"),NEG_NAN63,1593 + CASE("case"),CASE64,1615 + BR("br"),BR65,1634 + ANYFUNC("anyfunc"),ANYFUNC66,1649 + FAKE_RETURN("fake_return_waka123"),FAKE_RETURN67,1674 + MUT("mut"),MUT68,1715 + SPECTEST("spectest"),SPECTEST69,1732 + PRINT("print"),PRINT70,1759 + EXIT("exit");EXIT71,1780 +const char* getExpressionName(Expression* curr) {getExpressionName75,1816 +struct TypeSeeker : public PostWalker {TypeSeeker107,3220 + Expression* target; // look for this onetarget108,3272 + Name targetName;targetName109,3315 + std::vector types;types110,3334 + TypeSeeker(Expression* target, Name targetName) : target(target), targetName(targetName) {TypeSeeker112,3366 + void visitBreak(Break* curr) {visitBreak117,3511 + void visitSwitch(Switch* curr) {visitSwitch123,3654 + void visitBlock(Block* curr) {visitBlock130,3920 + void visitLoop(Loop* curr) {visitLoop142,4272 +static WasmType mergeTypes(std::vector& types) {mergeTypes151,4527 +static void handleUnreachable(Block* block) {handleUnreachable173,5205 +void Block::finalize(WasmType type_) {finalize191,5718 +void Block::finalize() {finalize198,5850 +void If::finalize(WasmType type_) {finalize224,6509 +void If::finalize() {finalize231,6726 +void Loop::finalize(WasmType type_) {finalize249,7217 +void Loop::finalize() {finalize256,7353 +void Break::finalize() {finalize260,7401 +void Switch::finalize() {finalize274,7643 +void handleUnreachableOperands(T* curr) {handleUnreachableOperands279,7715 +void Call::finalize() {finalize288,7892 +void CallImport::finalize() {finalize292,7954 +void CallIndirect::finalize() {finalize296,8022 +bool FunctionType::structuralComparison(FunctionType& b) {structuralComparison303,8157 +bool FunctionType::operator==(FunctionType& b) {operator ==312,8427 +bool FunctionType::operator!=(FunctionType& b) {operator !=316,8548 +bool SetLocal::isTee() {isTee320,8624 +void SetLocal::setTee(bool is) {setTee324,8675 +void SetLocal::finalize() {finalize329,8761 +void SetGlobal::finalize() {finalize335,8856 +void Load::finalize() {finalize341,8952 +void Store::finalize() {finalize347,9041 +Const* Const::set(Literal value_) {set356,9239 +bool Unary::isRelational() {isRelational362,9332 +void Unary::finalize() {finalize366,9407 +bool Binary::isRelational() {isRelational422,11005 +void Binary::finalize() {finalize460,11714 +void Select::finalize() {finalize471,11948 +void Drop::finalize() {finalize480,12179 +void Host::finalize() {finalize488,12298 +size_t Function::getNumParams() {getNumParams507,12691 +size_t Function::getNumVars() {getNumVars511,12752 +size_t Function::getNumLocals() {getNumLocals515,12809 +bool Function::isParam(Index index) {isParam519,12884 +bool Function::isVar(Index index) {isVar523,12957 +bool Function::hasLocalName(Index index) const {hasLocalName527,13029 +Name Function::getLocalName(Index index) {getLocalName531,13143 +Name Function::getLocalNameOrDefault(Index index) {getLocalNameOrDefault536,13254 +Index Function::getLocalIndex(Name name) {getLocalIndex544,13419 +Index Function::getVarIndexBase() {getVarIndexBase549,13540 +WasmType Function::getLocalType(Index index) {getLocalType553,13603 +FunctionType* Module::getFunctionType(Name name) {getFunctionType563,13815 +Import* Module::getImport(Name name) {getImport568,13948 +Export* Module::getExport(Name name) {getExport573,14057 +Function* Module::getFunction(Name name) {getFunction578,14166 +Global* Module::getGlobal(Name name) {getGlobal583,14283 +FunctionType* Module::getFunctionTypeOrNull(Name name) {getFunctionTypeOrNull588,14392 +Import* Module::getImportOrNull(Name name) {getImportOrNull594,14542 +Export* Module::getExportOrNull(Name name) {getExportOrNull600,14668 +Function* Module::getFunctionOrNull(Name name) {getFunctionOrNull606,14794 +Global* Module::getGlobalOrNull(Name name) {getGlobalOrNull612,14928 +void Module::addFunctionType(FunctionType* curr) {addFunctionType618,15054 +void Module::addImport(Import* curr) {addImport625,15321 +void Module::addExport(Export* curr) {addExport632,15546 +void Module::addFunction(Function* curr) {addFunction639,15771 +void Module::addGlobal(Global* curr) {addGlobal646,16010 +void Module::addStart(const Name& s) {addStart653,16235 +void Module::removeImport(Name name) {removeImport657,16290 +void Module::removeExport(Name name) {removeExport667,16507 +void Module::updateMaps() {updateMaps679,16763 + +externals/binaryen/src/wasm/wasm-type.cpp,445 +namespace wasm {wasm22,699 +const char* printWasmType(WasmType type) {printWasmType24,717 +unsigned getWasmTypeSize(WasmType type) {getWasmTypeSize36,1064 +bool isWasmTypeFloat(WasmType type) {isWasmTypeFloat47,1334 +WasmType getWasmType(unsigned size, bool float_) {getWasmType55,1465 +WasmType getReachableWasmType(WasmType a, WasmType b) {getReachableWasmType62,1696 +bool isConcreteWasmType(WasmType type) {isConcreteWasmType66,1790 + +externals/binaryen/src/wasm/wasm-s-parser.cpp,6254 +#define abort_on(abort_on30,872 +#define element_assert(element_assert31,952 +namespace {__anon2aa9188f011035,1091 +int unhex(char c) {unhex36,1103 +namespace wasm {wasm44,1323 +static Address getCheckedAddress(const Element* s, const char* errorText) {getCheckedAddress46,1341 +Element::List& Element::list() {list54,1590 +Element* Element::operator[](unsigned i) {operator []59,1709 +IString Element::str() const {str65,1935 +const char* Element::c_str() const {c_str70,2052 +Element* Element::setString(IString str__, bool dollared__, bool quoted__) {setString75,2179 +Element* Element::setMetadata(size_t line_, size_t col_, SourceLocation* loc_) {setMetadata83,2357 +std::ostream& operator<<(std::ostream& o, Element& e) {operator <<90,2500 +void Element::dump() {dump101,2704 +SExpressionParser::SExpressionParser(char* input) : input(input), loc(nullptr) {SExpressionParser106,2793 +Element* SExpressionParser::parse() {parse115,3019 +void SExpressionParser::parseDebugLocation() {parseDebugLocation148,4025 +void SExpressionParser::skipWhitespace() {skipWhitespace171,4885 +Element* SExpressionParser::parseString() {parseString218,5937 +SExpressionWasmBuilder::SExpressionWasmBuilder(Module& wasm, Element& module, Name* moduleName) SExpressionWasmBuilder254,7236 +bool SExpressionWasmBuilder::isImport(Element& curr) {isImport294,8639 +void SExpressionWasmBuilder::preParseImports(Element& curr) {preParseImports302,8876 +void SExpressionWasmBuilder::parseModuleElement(Element& curr) {parseModuleElement314,9413 +Name SExpressionWasmBuilder::getFunctionName(Element& s) {getFunctionName331,10127 +Name SExpressionWasmBuilder::getFunctionTypeName(Element& s) {getFunctionTypeName342,10437 +Name SExpressionWasmBuilder::getGlobalName(Element& s) {getGlobalName353,10768 +void SExpressionWasmBuilder::preParseFunctionType(Element& s) {preParseFunctionType365,11069 +size_t SExpressionWasmBuilder::parseFunctionNames(Element& s, Name& name, Name& exportName) {parseFunctionNames427,13356 +void SExpressionWasmBuilder::parseFunction(Element& s, bool preParseImport) {parseFunction456,14015 + auto makeFunction = [&]() {__anon2aa9188f0202492,15232 + auto ensureAutoBlock = [&]() {__anon2aa9188f0302500,15497 +WasmType SExpressionWasmBuilder::stringToWasmType(const char* str, bool allowError, bool prefix)stringToWasmType617,19490 +Expression* SExpressionWasmBuilder::parseExpression(Element& s) {parseExpression630,20038 +Expression* SExpressionWasmBuilder::makeExpression(Element& s) {makeExpression647,20654 + enum { maxNameSize = 15 };__anon2aa9188f0403655,20979 + enum { maxNameSize = 15 };maxNameSize655,20979 +#define BINARY_INT_OR_FLOAT(BINARY_INT_OR_FLOAT658,21088 +#define BINARY_INT(BINARY_INT659,21258 +#define BINARY_FLOAT(BINARY_FLOAT660,21339 +Expression* SExpressionWasmBuilder::makeBinary(Element& s, BinaryOp op, WasmType type) {makeBinary870,30166 +Expression* SExpressionWasmBuilder::makeUnary(Element& s, UnaryOp op, WasmType type) {makeUnary880,30423 +Expression* SExpressionWasmBuilder::makeSelect(Element& s) {makeSelect942,32316 +Expression* SExpressionWasmBuilder::makeDrop(Element& s) {makeDrop951,32574 +Expression* SExpressionWasmBuilder::makeHost(Element& s, HostOp op) {makeHost958,32745 +Index SExpressionWasmBuilder::getLocalIndex(Element& s) {getLocalIndex979,33291 +Expression* SExpressionWasmBuilder::makeGetLocal(Element& s) {makeGetLocal992,33823 +Expression* SExpressionWasmBuilder::makeTeeLocal(Element& s) {makeTeeLocal999,34036 +Expression* SExpressionWasmBuilder::makeSetLocal(Element& s) {makeSetLocal1008,34273 +Expression* SExpressionWasmBuilder::makeGetGlobal(Element& s) {makeGetGlobal1017,34511 +Expression* SExpressionWasmBuilder::makeSetGlobal(Element& s) {makeSetGlobal1033,34997 +Expression* SExpressionWasmBuilder::makeBlock(Element& s) {makeBlock1043,35364 +Expression* SExpressionWasmBuilder::makeThenOrElse(Element& s) {makeThenOrElse1105,37234 +Expression* SExpressionWasmBuilder::makeConst(Element& s, WasmType type) {makeConst1118,37508 +Expression* SExpressionWasmBuilder::makeLoad(Element& s, WasmType type) {makeLoad1125,37703 +Expression* SExpressionWasmBuilder::makeStore(Element& s, WasmType type) {makeStore1167,39075 +Expression* SExpressionWasmBuilder::makeIf(Element& s) {makeIf1207,40324 +Expression* SExpressionWasmBuilder::makeMaybeBlock(Element& s, size_t i, WasmType type) {makeMaybeBlock1239,41135 +WasmType SExpressionWasmBuilder::parseOptionalResultType(Element& s, Index& i) {parseOptionalResultType1254,41679 +Expression* SExpressionWasmBuilder::makeLoop(Element& s) {makeLoop1272,42124 +Expression* SExpressionWasmBuilder::makeCall(Element& s) {makeCall1289,42579 +Expression* SExpressionWasmBuilder::makeCallImport(Element& s) {makeCallImport1308,43219 +Expression* SExpressionWasmBuilder::makeCallIndirect(Element& s) {makeCallIndirect1318,43549 +Name SExpressionWasmBuilder::getLabel(Element& s) {getLabel1334,44241 +Expression* SExpressionWasmBuilder::makeBreak(Element& s) {makeBreak1357,45076 +Expression* SExpressionWasmBuilder::makeBreakTable(Element& s) {makeBreakTable1376,45514 +Expression* SExpressionWasmBuilder::makeReturn(Element& s) {makeReturn1393,46026 +void SExpressionWasmBuilder::stringToBinary(const char* input, size_t size, std::vector& dstringToBinary1403,46368 +void SExpressionWasmBuilder::parseMemory(Element& s, bool preParseImport) {parseMemory1445,47463 +void SExpressionWasmBuilder::parseData(Element& s) {parseData1515,49862 +void SExpressionWasmBuilder::parseInnerData(Element& s, Index i, Expression* offset) {parseInnerData1526,50143 +void SExpressionWasmBuilder::parseExport(Element& s) {parseExport1540,50570 +void SExpressionWasmBuilder::parseImport(Element& s) {parseImport1579,52036 +void SExpressionWasmBuilder::parseGlobal(Element& s, bool preParseImport) {parseGlobal1699,56758 +void SExpressionWasmBuilder::parseTable(Element& s, bool preParseImport) {parseTable1768,59178 +void SExpressionWasmBuilder::parseElem(Element& s) {parseElem1838,61634 +void SExpressionWasmBuilder::parseInnerElem(Element& s, Index i, Expression* offset) {parseInnerElem1848,61843 +void SExpressionWasmBuilder::parseType(Element& s) {parseType1860,62266 + +externals/binaryen/src/wasm/wasm-binary.cpp,11367 +namespace wasm {wasm22,697 +void WasmBinaryWriter::prepare() {prepare24,715 +void WasmBinaryWriter::write() {write34,1092 +void WasmBinaryWriter::writeHeader() {writeHeader61,1612 +int32_t WasmBinaryWriter::writeU32LEBPlaceholder() {writeU32LEBPlaceholder67,1809 +void WasmBinaryWriter::writeResizableLimits(Address initial, Address maximum, bool hasMaximum) {writeResizableLimits74,1942 +int32_t WasmBinaryWriter::startSection(BinaryConsts::Section code) {startSection83,2177 +void WasmBinaryWriter::finishSection(int32_t start) {finishSection88,2343 +int32_t WasmBinaryWriter::startSubsection(BinaryConsts::UserSections::Subsection code) {startSubsection93,2543 +void WasmBinaryWriter::finishSubsection(int32_t start) {finishSubsection98,2729 +void WasmBinaryWriter::writeStart() {writeStart103,2932 +void WasmBinaryWriter::writeMemory() {writeMemory111,3195 +void WasmBinaryWriter::writeTypes() {writeTypes120,3578 +int32_t WasmBinaryWriter::getFunctionTypeIndex(Name type) {getFunctionTypeIndex142,4250 +void WasmBinaryWriter::writeImports() {writeImports150,4464 +void WasmBinaryWriter::mapLocals(Function* function) {mapLocals181,5668 +void WasmBinaryWriter::writeFunctionSignatures() {writeFunctionSignatures217,6779 +void WasmBinaryWriter::writeExpression(Expression* curr) {writeExpression229,7218 +void WasmBinaryWriter::writeFunctions() {writeFunctions235,7353 +void WasmBinaryWriter::writeGlobals() {writeGlobals273,8981 +void WasmBinaryWriter::writeExports() {writeExports288,9478 +void WasmBinaryWriter::writeDataSegments() {writeDataSegments309,10260 +uint32_t WasmBinaryWriter::getFunctionIndex(Name name) {getFunctionIndex327,10852 +uint32_t WasmBinaryWriter::getGlobalIndex(Name name) {getGlobalIndex346,11558 +void WasmBinaryWriter::writeFunctionTableDeclaration() {writeFunctionTableDeclaration365,12236 +void WasmBinaryWriter::writeTableElements() {writeTableElements375,12700 +void WasmBinaryWriter::writeNames() {writeNames393,13310 +void WasmBinaryWriter::writeSourceMapUrl() {writeSourceMapUrl432,14530 +void WasmBinaryWriter::writeSymbolMap() {writeSymbolMap440,14829 +void WasmBinaryWriter::writeSourceMapProlog() {writeSourceMapProlog453,15231 +void WasmBinaryWriter::writeSourceMapEpilog() {writeSourceMapEpilog465,15699 +static void writeBase64VLQ(std::ostream& out, int32_t n) {writeBase64VLQ469,15773 +void WasmBinaryWriter::writeDebugLocation(size_t offset, const Function::DebugLocation& loc) {writeDebugLocation485,16335 +void WasmBinaryWriter::writeInlineString(const char* name) {writeInlineString497,16878 +void WasmBinaryWriter::writeInlineBuffer(const char* data, size_t size) {writeInlineBuffer505,17063 +void WasmBinaryWriter::emitBuffer(const char* data, size_t size) {emitBuffer512,17229 +void WasmBinaryWriter::emitString(const char *str) {emitString518,17476 +void WasmBinaryWriter::finishUp() {finishUp523,17629 +void WasmBinaryWriter::recurse(Expression*& curr) {recurse535,18122 +static bool brokenTo(Block* block) {brokenTo541,18376 +void WasmBinaryWriter::visitBlock(Block *curr) {visitBlock545,18483 +void WasmBinaryWriter::recursePossibleBlockContents(Expression* curr) {recursePossibleBlockContents571,19599 +void WasmBinaryWriter::visitIf(If *curr) {visitIf582,19844 +void WasmBinaryWriter::visitLoop(Loop *curr) {visitLoop613,21343 +int32_t WasmBinaryWriter::getBreakIndex(Name name) { // -1 if not foundgetBreakIndex627,21851 +void WasmBinaryWriter::visitBreak(Break *curr) {visitBreak637,22124 +void WasmBinaryWriter::visitSwitch(Switch *curr) {visitSwitch647,22446 +void WasmBinaryWriter::visitCall(Call *curr) {visitCall660,22839 +void WasmBinaryWriter::visitCallImport(CallImport *curr) {visitCallImport668,23097 +void WasmBinaryWriter::visitCallIndirect(CallIndirect *curr) {visitCallIndirect676,23373 +void WasmBinaryWriter::visitGetLocal(GetLocal *curr) {visitGetLocal688,23732 +void WasmBinaryWriter::visitSetLocal(SetLocal *curr) {visitSetLocal693,23945 +void WasmBinaryWriter::visitGetGlobal(GetGlobal *curr) {visitGetGlobal699,24208 +void WasmBinaryWriter::visitSetGlobal(SetGlobal *curr) {visitSetGlobal704,24426 +void WasmBinaryWriter::emitMemoryAccess(size_t alignment, size_t bytes, uint32_t offset) {emitMemoryAccess710,24649 +void WasmBinaryWriter::visitLoad(Load *curr) {visitLoad715,24818 +void WasmBinaryWriter::visitStore(Store *curr) {visitStore746,26167 +void WasmBinaryWriter::visitConst(Const *curr) {visitConst777,27204 +void WasmBinaryWriter::visitUnary(Unary *curr) {visitUnary801,27885 +void WasmBinaryWriter::visitBinary(Binary *curr) {visitBinary856,31614 +void WasmBinaryWriter::visitSelect(Select *curr) {visitSelect945,37169 +void WasmBinaryWriter::visitReturn(Return *curr) {visitReturn953,37397 +void WasmBinaryWriter::visitHost(Host *curr) {visitHost961,37597 +void WasmBinaryWriter::visitNop(Nop *curr) {visitNop978,38007 +void WasmBinaryWriter::visitUnreachable(Unreachable *curr) {visitUnreachable983,38144 +void WasmBinaryWriter::visitDrop(Drop *curr) {visitDrop988,38313 +static Name RETURN_BREAK("binaryen|break-to-return");RETURN_BREAK996,38489 +void WasmBinaryBuilder::read() {read998,38544 +void WasmBinaryBuilder::readUserSection(size_t payloadLen) {readUserSection1056,41068 +uint8_t WasmBinaryBuilder::getInt8() {getInt81074,41670 +uint16_t WasmBinaryBuilder::getInt16() {getInt161080,41904 +uint32_t WasmBinaryBuilder::getInt32() {getInt321088,42187 +uint64_t WasmBinaryBuilder::getInt64() {getInt641096,42472 +Literal WasmBinaryBuilder::getFloat32Literal() {getFloat32Literal1104,42759 +Literal WasmBinaryBuilder::getFloat64Literal() {getFloat64Literal1112,43002 +uint32_t WasmBinaryBuilder::getU32LEB() {getU32LEB1120,43245 + ret.read([&]() {__anon9c6e342701021123,43347 +uint64_t WasmBinaryBuilder::getU64LEB() {getU64LEB1130,43498 + ret.read([&]() {__anon9c6e342702021133,43600 +int32_t WasmBinaryBuilder::getS32LEB() {getS32LEB1140,43751 + ret.read([&]() {__anon9c6e342703021143,43852 +int64_t WasmBinaryBuilder::getS64LEB() {getS64LEB1150,44011 + ret.read([&]() {__anon9c6e342704021153,44112 +WasmType WasmBinaryBuilder::getWasmType() {getWasmType1160,44271 +Name WasmBinaryBuilder::getString() {getString1173,44779 +Name WasmBinaryBuilder::getInlineString() {getInlineString1181,45040 +void WasmBinaryBuilder::verifyInt8(int8_t x) {verifyInt81192,45349 +void WasmBinaryBuilder::verifyInt16(int16_t x) {verifyInt161197,45487 +void WasmBinaryBuilder::verifyInt32(int32_t x) {verifyInt321202,45629 +void WasmBinaryBuilder::verifyInt64(int64_t x) {verifyInt641207,45771 +void WasmBinaryBuilder::ungetInt8() {ungetInt81212,45913 +void WasmBinaryBuilder::readHeader() {readHeader1218,46059 +void WasmBinaryBuilder::readStart() {readStart1224,46231 +void WasmBinaryBuilder::readMemory() {readMemory1229,46355 +void WasmBinaryBuilder::readSignatures() {readSignatures1243,46810 +Name WasmBinaryBuilder::getFunctionIndexName(Index i) {getFunctionIndexName1273,47838 +void WasmBinaryBuilder::getResizableLimits(Address& initial, Address& max, Address defaultIfNoMagetResizableLimits1287,48267 +void WasmBinaryBuilder::readImports() {readImports1295,48515 +void WasmBinaryBuilder::readFunctionSignatures() {readFunctionSignatures1348,50458 +void WasmBinaryBuilder::readFunctions() {readFunctions1362,50973 + auto addVar = [&]() {__anon9c6e342705021378,51584 +void WasmBinaryBuilder::readExports() {readExports1435,53531 +static int32_t readBase64VLQ(std::istream& in) {readBase64VLQ1455,54164 +void WasmBinaryBuilder::readSourceMapHeader() {readSourceMapHeader1479,54955 + auto maybeReadChar = [&](char expected) {__anon9c6e342706021482,55030 + auto mustReadChar = [&](char expected) {__anon9c6e342707021487,55171 + auto findField = [&](const char* name, size_t len) {__anon9c6e342708021492,55315 + auto readString = [&](std::string& str) {__anon9c6e342709021513,55819 +void WasmBinaryBuilder::readNextDebugLocation() {readNextDebugLocation1560,57264 +Expression* WasmBinaryBuilder::readExpression() {readExpression1585,58139 +void WasmBinaryBuilder::readGlobals() {readGlobals1596,58424 +void WasmBinaryBuilder::processExpressions() { // until an end or else marker, or the end of theprocessExpressions1613,59052 +Expression* WasmBinaryBuilder::popExpression() {popExpression1625,59339 +Expression* WasmBinaryBuilder::popNonVoidExpression() {popNonVoidExpression1634,59569 +Name WasmBinaryBuilder::getGlobalName(Index index) {getGlobalName1663,60542 +void WasmBinaryBuilder::processFunctions() {processFunctions1683,61205 +void WasmBinaryBuilder::readDataSegments() {readDataSegments1733,62701 +void WasmBinaryBuilder::readFunctionTableDeclaration() {readFunctionTableDeclaration1754,63342 +void WasmBinaryBuilder::readTableElements() {readTableElements1765,63934 +void WasmBinaryBuilder::readNames(size_t payloadLen) {readNames1782,64556 +BinaryConsts::ASTNodes WasmBinaryBuilder::readExpression(Expression*& curr) {readExpression1826,66093 +void WasmBinaryBuilder::visitBlock(Block *curr) {visitBlock1882,69533 +Expression* WasmBinaryBuilder::getMaybeBlock(WasmType type) {getMaybeBlock1927,71011 +Expression* WasmBinaryBuilder::getBlock(WasmType type) {getBlock1946,71528 +void WasmBinaryBuilder::visitIf(If *curr) {visitIf1955,71829 +void WasmBinaryBuilder::visitLoop(Loop *curr) {visitLoop1969,72264 +WasmBinaryBuilder::BreakTarget WasmBinaryBuilder::getBreakTarget(int32_t offset) {getBreakTarget1979,72570 +void WasmBinaryBuilder::visitBreak(Break *curr, uint8_t code) {visitBreak1995,73222 +void WasmBinaryBuilder::visitSwitch(Switch *curr) {visitSwitch2004,73603 +Expression* WasmBinaryBuilder::visitCall() {visitCall2020,74211 +void WasmBinaryBuilder::visitCallIndirect(CallIndirect *curr) {visitCallIndirect2050,75211 +void WasmBinaryBuilder::visitGetLocal(GetLocal *curr) {visitGetLocal2070,75942 +void WasmBinaryBuilder::visitSetLocal(SetLocal *curr, uint8_t code) {visitSetLocal2083,76366 +void WasmBinaryBuilder::visitGetGlobal(GetGlobal *curr) {visitGetGlobal2098,76866 +void WasmBinaryBuilder::visitSetGlobal(SetGlobal *curr) {visitSetGlobal2115,77377 +void WasmBinaryBuilder::readMemoryAccess(Address& alignment, size_t bytes, Address& offset) {readMemoryAccess2123,77624 +bool WasmBinaryBuilder::maybeVisitLoad(Expression*& out, uint8_t code) {maybeVisitLoad2128,77778 +bool WasmBinaryBuilder::maybeVisitStore(Expression*& out, uint8_t code) {maybeVisitStore2155,79913 +bool WasmBinaryBuilder::maybeVisitConst(Expression*& out, uint8_t code) {maybeVisitConst2178,81360 +bool WasmBinaryBuilder::maybeVisitUnary(Expression*& out, uint8_t code) {maybeVisitUnary2194,82070 +bool WasmBinaryBuilder::maybeVisitBinary(Expression*& out, uint8_t code) {maybeVisitBinary2258,88365 +#define INT_TYPED_CODE(INT_TYPED_CODE2260,88456 +#define FLOAT_TYPED_CODE(FLOAT_TYPED_CODE2264,88774 +#define TYPED_CODE(TYPED_CODE2268,89096 +void WasmBinaryBuilder::visitSelect(Select *curr) {visitSelect2320,90386 +void WasmBinaryBuilder::visitReturn(Return *curr) {visitReturn2328,90646 +bool WasmBinaryBuilder::maybeVisitHost(Expression*& out, uint8_t code) {maybeVisitHost2339,90946 +void WasmBinaryBuilder::visitNop(Nop *curr) {visitNop2365,91678 +void WasmBinaryBuilder::visitUnreachable(Unreachable *curr) {visitUnreachable2369,91782 +void WasmBinaryBuilder::visitDrop(Drop *curr) {visitDrop2373,91910 + +externals/binaryen/src/wasm/wasm-io.cpp,526 +namespace wasm {wasm32,1031 +void ModuleReader::readText(std::string filename, Module& wasm) {readText34,1049 +void ModuleReader::readBinary(std::string filename, Module& wasm) {readBinary42,1430 +void ModuleReader::read(std::string filename, Module& wasm) {read49,1744 +void ModuleWriter::writeText(Module& wasm, std::string filename) {writeText65,2242 +void ModuleWriter::writeBinary(Module& wasm, std::string filename) {writeBinary71,2512 +void ModuleWriter::write(Module& wasm, std::string filename) {write92,3337 + +externals/binaryen/src/wasm/literal.cpp,4249 +namespace wasm {wasm26,785 +Literal Literal::castToF32() {castToF3228,803 +Literal Literal::castToF64() {castToF6435,938 +Literal Literal::castToI32() {castToI3242,1073 +Literal Literal::castToI64() {castToI6449,1208 +int64_t Literal::getInteger() {getInteger56,1343 +double Literal::getFloat() {getFloat64,1494 +int64_t Literal::getBits() {getBits72,1652 +bool Literal::operator==(const Literal& other) const {operator ==80,1840 +bool Literal::operator!=(const Literal& other) const {operator !=92,2236 +uint32_t Literal::NaNPayload(float f) {NaNPayload96,2322 +uint64_t Literal::NaNPayload(double f) {NaNPayload103,2557 +float Literal::setQuietNaN(float f) {setQuietNaN110,2839 +double Literal::setQuietNaN(double f) {setQuietNaN116,3062 +void Literal::printFloat(std::ostream &o, float f) {printFloat122,3298 +void Literal::printDouble(std::ostream& o, double d) {printDouble134,3592 +std::ostream& operator<<(std::ostream& o, Literal literal) {operator <<162,4261 +Literal Literal::countLeadingZeroes() const {countLeadingZeroes177,4787 +Literal Literal::countTrailingZeroes() const {countTrailingZeroes183,5016 +Literal Literal::popCount() const {popCount189,5248 +Literal Literal::extendToSI64() const {extendToSI64195,5447 +Literal Literal::extendToUI64() const {extendToUI64200,5561 +Literal Literal::extendToF64() const {extendToF64205,5686 +Literal Literal::truncateToI32() const {truncateToI32210,5803 +Literal Literal::truncateToF32() const {truncateToF32215,5918 +Literal Literal::convertSToF32() const {convertSToF32220,6036 +Literal Literal::convertUToF32() const {convertUToF32226,6216 +Literal Literal::convertSToF64() const {convertSToF64232,6416 +Literal Literal::convertUToF64() const {convertUToF64238,6598 +Literal Literal::neg() const {neg244,6800 +Literal Literal::abs() const {abs254,7185 +Literal Literal::ceil() const {ceil264,7570 +Literal Literal::floor() const {floor272,7782 +Literal Literal::trunc() const {trunc280,7997 +Literal Literal::nearbyint() const {nearbyint288,8212 +Literal Literal::sqrt() const {sqrt296,8439 +Literal Literal::add(const Literal& other) const {add304,8651 +Literal Literal::sub(const Literal& other) const {sub314,9048 +Literal Literal::mul(const Literal& other) const {mul324,9445 +Literal Literal::div(const Literal& other) const {div334,9842 +Literal Literal::divS(const Literal& other) const {divS380,11687 +Literal Literal::divU(const Literal& other) const {divU388,11911 +Literal Literal::remS(const Literal& other) const {remS396,12175 +Literal Literal::remU(const Literal& other) const {remU404,12399 +Literal Literal::and_(const Literal& other) const {and_412,12663 +Literal Literal::or_(const Literal& other) const {or_420,12887 +Literal Literal::xor_(const Literal& other) const {xor_428,13110 +Literal Literal::shl(const Literal& other) const {shl436,13334 +Literal Literal::shrS(const Literal& other) const {shrS444,13601 +Literal Literal::shrU(const Literal& other) const {shrU452,13849 +Literal Literal::rotL(const Literal& other) const {rotL460,14117 +Literal Literal::rotR(const Literal& other) const {rotR468,14403 +Literal Literal::eq(const Literal& other) const {eq476,14691 +Literal Literal::ne(const Literal& other) const {ne486,15051 +Literal Literal::ltS(const Literal& other) const {ltS496,15411 +Literal Literal::ltU(const Literal& other) const {ltU504,15634 +Literal Literal::lt(const Literal& other) const {lt512,15897 +Literal Literal::leS(const Literal& other) const {leS520,16139 +Literal Literal::leU(const Literal& other) const {leU528,16364 +Literal Literal::le(const Literal& other) const {le536,16629 +Literal Literal::gtS(const Literal& other) const {gtS544,16873 +Literal Literal::gtU(const Literal& other) const {gtU552,17096 +Literal Literal::gt(const Literal& other) const {gt560,17359 +Literal Literal::geS(const Literal& other) const {geS568,17601 +Literal Literal::geU(const Literal& other) const {geU576,17826 +Literal Literal::ge(const Literal& other) const {ge584,18091 +Literal Literal::min(const Literal& other) const {min592,18335 +Literal Literal::max(const Literal& other) const {max616,19408 +Literal Literal::copysign(const Literal& other) const {copysign640,20481 + +externals/binaryen/src/passes/Precompute.cpp,1517 +namespace wasm {wasm28,827 +static const Name NONSTANDALONE_FLOW("Binaryen|nonstandalone");NONSTANDALONE_FLOW30,845 +class StandaloneExpressionRunner : public ExpressionRunner {StandaloneExpressionRunner33,1030 + struct NonstandaloneException {}; // TODO: use a flow with a special name, as this is likely vNonstandaloneException35,1127 + Flow visitLoop(Loop* curr) {visitLoop37,1233 + Flow visitCall(Call* curr) {visitCall43,1475 + Flow visitCallImport(CallImport* curr) {visitCallImport46,1547 + Flow visitCallIndirect(CallIndirect* curr) {visitCallIndirect49,1631 + Flow visitGetLocal(GetLocal *curr) {visitGetLocal52,1719 + Flow visitSetLocal(SetLocal *curr) {visitSetLocal55,1799 + Flow visitGetGlobal(GetGlobal *curr) {visitGetGlobal58,1879 + Flow visitSetGlobal(SetGlobal *curr) {visitSetGlobal61,1961 + Flow visitLoad(Load *curr) {visitLoad64,2043 + Flow visitStore(Store *curr) {visitStore67,2115 + Flow visitHost(Host *curr) {visitHost70,2189 + void trap(const char* why) override {trap74,2262 +struct Precompute : public WalkerPass> {RemoveUnusedNames27,806 + bool isFunctionParallel() override { return true; }isFunctionParallel28,884 + Pass* create() override { return new RemoveUnusedNames; }create30,939 + std::map> branchesSeen;branchesSeen34,1131 + void visitBreak(Break *curr) {visitBreak36,1186 + void visitSwitch(Switch *curr) {visitSwitch40,1267 + void handleBreakTarget(Name& name) {handleBreakTarget47,1437 + void visitBlock(Block *curr) {visitBlock57,1647 + void visitLoop(Loop *curr) {visitLoop82,2637 + void visitFunction(Function *curr) {visitFunction89,2776 +Pass *createRemoveUnusedNamesPass() {createRemoveUnusedNamesPass94,2863 + +externals/binaryen/src/passes/CMakeLists.txt,97 +SET(passes_SOURCESpasses_SOURCES1,0 +ADD_LIBRARY(passes STATIC ${passes_SOURCES})passes40,766 + +externals/binaryen/src/passes/PrintCallGraph.cpp,769 +namespace wasm {wasm28,828 +struct PrintCallGraph : public Pass {PrintCallGraph30,846 + void run(PassRunner* runner, Module* module) override {run31,884 + struct CallPrinter : public PostWalker {CallPrinter66,2281 + Module *module;module67,2339 + Function *currFunction;currFunction68,2361 + std::set visitedTargets; // Used to avoid printing duplicate edges.visitedTargets69,2391 + std::vector allIndirectTargets;allIndirectTargets70,2471 + CallPrinter(Module *module) : module(module) {CallPrinter71,2520 + void visitCall(Call *curr) {visitCall79,2776 + void visitCallImport(CallImport *curr) {visitCallImport85,3082 +Pass *createPrintCallGraphPass() {createPrintCallGraphPass106,3675 + +externals/binaryen/src/passes/RemoveUnusedModuleElements.cpp,2279 +namespace wasm {wasm31,906 +enum class ModuleElementKind {ModuleElementKind33,924 + Function,Function34,955 + GlobalGlobal35,967 +typedef std::pair ModuleElement;ModuleElement38,980 +struct ReachabilityAnalyzer : public PostWalker {ReachabilityAnalyzer42,1064 + Module* module;module43,1136 + std::vector queue;queue44,1154 + std::set reachable;reachable45,1190 + ReachabilityAnalyzer(Module* module, const std::vector& roots) : module(module)ReachabilityAnalyzer47,1228 + void visitCall(Call* curr) {visitCall79,2224 + void visitCallImport(CallImport* curr) {visitCallImport84,2424 + void visitGetGlobal(GetGlobal* curr) {visitGetGlobal90,2637 + void visitSetGlobal(SetGlobal* curr) {visitSetGlobal95,2839 +struct FunctionTypeAnalyzer : public PostWalker {FunctionTypeAnalyzer104,3075 + std::vector functionImports;functionImports105,3147 + std::vector functions;functions106,3187 + std::vector indirectCalls;indirectCalls107,3223 + void visitImport(Import* curr) {visitImport109,3268 + void visitFunction(Function* curr) {visitFunction115,3428 + void visitCallIndirect(CallIndirect* curr) {visitCallIndirect121,3538 +struct RemoveUnusedModuleElements : public Pass {RemoveUnusedModuleElements126,3628 + void run(PassRunner* runner, Module* module) override {run127,3678 + void optimizeGlobalsAndFunctions(Module* module) {optimizeGlobalsAndFunctions132,3817 + v.erase(std::remove_if(v.begin(), v.end(), [&](const std::unique_ptr& curr) {__anonfcc2cef90102157,4801 + v.erase(std::remove_if(v.begin(), v.end(), [&](const std::unique_ptr& curr) {__anonfcc2cef90202163,5062 + v.erase(std::remove_if(v.begin(), v.end(), [&](const std::unique_ptr& curr) {__anonfcc2cef90302169,5319 + void optimizeFunctionTypes(Module* module) {optimizeFunctionTypes181,5815 + auto canonicalize = [&](Name name) {__anonfcc2cef90402187,6109 + module->functionTypes.erase(std::remove_if(module->functionTypes.begin(), module->functionTy__anonfcc2cef90502210,6877 +Pass* createRemoveUnusedModuleElementsPass() {createRemoveUnusedModuleElementsPass216,7123 + +externals/binaryen/src/passes/pass.cpp,1438 +namespace wasm {wasm25,765 +PassRegistry::PassRegistry() {PassRegistry29,800 +static PassRegistry singleton;singleton33,854 +PassRegistry* PassRegistry::get() {get35,886 +void PassRegistry::registerPass(const char* name, const char *description, Creator create) {registerPass39,946 +Pass* PassRegistry::createPass(std::string name) {createPass44,1150 +std::vector PassRegistry::getRegisteredNames() {getRegisteredNames51,1340 +std::string PassRegistry::getPassDescription(std::string name) {getPassDescription59,1518 +void PassRegistry::registerPasses() {registerPasses66,1696 +void PassRunner::addDefaultOptimizationPasses() {addDefaultOptimizationPasses112,6317 +void PassRunner::addDefaultFunctionOptimizationPasses() {addDefaultFunctionOptimizationPasses120,6609 +void PassRunner::addDefaultGlobalOptimizationPasses() {addDefaultGlobalOptimizationPasses154,8087 +static void dumpWast(Name name, Module* wasm) {dumpWast160,8252 +void PassRunner::run() {run171,8595 + auto flush = [&]() {__anon3a055a4b0102233,11298 + doWorkers.push_back([&]() {__anon3a055a4b0202242,11706 +void PassRunner::runFunction(Function* func) {runFunction275,12672 +PassRunner::~PassRunner() {~PassRunner284,12906 +void PassRunner::doAdd(Pass* pass) {doAdd290,12987 +void PassRunner::runPassOnFunction(Pass* pass, Function* func) {runPassOnFunction295,13087 +int PassRunner::getPassDebug() {getPassDebug302,13361 + +externals/binaryen/src/passes/Vacuum.cpp,820 +namespace wasm {wasm28,813 +struct Vacuum : public WalkerPass> {Vacuum30,831 + bool isFunctionParallel() override { return true; }isFunctionParallel31,887 + Pass* create() override { return new Vacuum; }create33,942 + TypeUpdater typeUpdater;typeUpdater35,992 + Expression* replaceCurrent(Expression* expression) {replaceCurrent37,1020 + void doWalkFunction(Function* func) {doWalkFunction45,1283 + Expression* optimize(Expression* curr, bool resultUsed) {optimize51,1488 + void visitBlock(Block *curr) {visitBlock155,5470 + void visitIf(If* curr) {visitIf198,6915 + void visitLoop(Loop* curr) {visitLoop243,8383 + void visitDrop(Drop* curr) {visitDrop247,8484 + void visitFunction(Function* curr) {visitFunction315,11118 +Pass *createVacuumPass() {createVacuumPass328,11497 + +externals/binaryen/src/passes/LegalizeJSInterface.cpp,1160 +namespace wasm {wasm34,1230 +Name TEMP_RET_0("tempRet0");TEMP_RET_036,1248 +struct LegalizeJSInterface : public Pass {LegalizeJSInterface38,1278 + void run(PassRunner* runner, Module* module) override {run39,1321 + struct FixImports : public WalkerPass> {FixImports78,2857 + bool isFunctionParallel() override { return true; }isFunctionParallel79,2927 + Pass* create() override { return new FixImports(illegalToLegal); }create81,2988 + std::map* illegalToLegal;illegalToLegal83,3064 + FixImports(std::map* illegalToLegal) : illegalToLegal(illegalToLegal) {}FixImports85,3111 + void visitCallImport(CallImport* curr) {visitCallImport87,3205 + std::map illegalToLegal;illegalToLegal105,3833 + bool isIllegal(T* t) {isIllegal108,3896 + Name makeLegalStub(Function* func, Module* module) {makeLegalStub117,4188 + Import* makeLegalStub(Import* im, Module* module, Name& funcName) {makeLegalStub169,6054 + void ensureTempRet0(Module* module) {ensureTempRet0227,8171 +Pass *createLegalizeJSInterfacePass() {createLegalizeJSInterfacePass239,8512 + +externals/binaryen/src/passes/Inlining.cpp,2270 +namespace wasm {wasm30,893 +struct FunctionUseCounter : public WalkerPass> {FunctionUseCounter32,911 + bool isFunctionParallel() override { return true; }isFunctionParallel33,991 + FunctionUseCounter(std::map* output) : output(output) {}FunctionUseCounter35,1046 + FunctionUseCounter* create() override {create37,1119 + void visitCall(Call *curr) {visitCall41,1209 + std::map* output;output46,1285 +struct Action {Action49,1322 + Call* call;call50,1338 + Block* block; // the replacement for the call, into which we should inlineblock51,1352 + Function* contents;contents52,1429 + Action(Call* call, Block* block, Function* contents) : call(call), block(block), contents(contAction54,1452 +struct InliningState {InliningState57,1561 + std::set canInline;canInline58,1584 + std::map> actionsForFunction; // function name => actions that can bactionsForFunction59,1612 +struct Planner : public WalkerPass> {Planner62,1730 + bool isFunctionParallel() override { return true; }isFunctionParallel63,1788 + Planner(InliningState* state) : state(state) {}Planner65,1843 + Planner* create() override {create67,1894 + void visitCall(Call *curr) {visitCall71,1961 + void doWalkFunction(Function* func) {doWalkFunction80,2287 + InliningState* state;state89,2528 +static Expression* doInlining(Module* module, Function* into, Action& action) {doInlining96,2800 + struct Updater : public PostWalker {Updater102,3090 + std::map localMapping;localMapping103,3138 + Name returnName;returnName104,3179 + Builder* builder;builder105,3200 + void visitReturn(Return* curr) {visitReturn107,3223 + void visitGetLocal(GetLocal* curr) {visitGetLocal110,3333 + void visitSetLocal(SetLocal* curr) {visitSetLocal113,3427 +struct Inlining : public Pass {Inlining133,4200 + void run(PassRunner* runner, Module* module) override {run134,4232 + bool iteration(PassRunner* runner, Module* module) {iteration139,4405 + funcs.erase(std::remove_if(funcs.begin(), funcs.end(), [&inlined](const std::unique_ptr> {LogExecution38,1204 + void visitLoop(Loop* curr) {visitLoop39,1272 + void visitFunction(Function* curr) {visitFunction43,1350 + void visitModule(Module *curr) {visitModule47,1436 + Expression* makeLogCall(Expression* curr) {makeLogCall59,1754 +Pass *createLogExecutionPass() {createLogExecutionPass73,2042 + +externals/binaryen/src/passes/PickLoadSigns.cpp,969 +namespace wasm {wasm21,690 +struct PickLoadSigns : public WalkerPass> {PickLoadSigns28,950 + bool isFunctionParallel() override { return true; }isFunctionParallel29,1031 + Pass* create() override { return new PickLoadSigns; }create31,1086 + struct Usage {Usage33,1143 + Index signedUsages = 0;signedUsages34,1160 + Index signedBits;signedBits35,1188 + Index unsignedUsages = 0;unsignedUsages36,1210 + Index unsignedBits;unsignedBits37,1240 + Index totalUsages = 0;totalUsages38,1264 + std::vector usages; // local index => usageusages40,1296 + std::unordered_map loads; // loads that write to a local => the localloads42,1350 + void doWalkFunction(Function* func) {doWalkFunction44,1437 + void visitGetLocal(GetLocal* curr) {visitGetLocal67,2483 + void visitSetLocal(SetLocal* curr) {visitSetLocal96,3555 +Pass *createPickLoadSignsPass() {createPickLoadSignsPass107,3799 + +externals/binaryen/src/passes/RemoveMemory.cpp,217 +namespace wasm {wasm24,731 +struct RemoveMemory : public Pass {RemoveMemory26,749 + void run(PassRunner* runner, Module* module) override {run27,785 +Pass *createRemoveMemoryPass() {createRemoveMemoryPass32,888 + +externals/binaryen/src/passes/Print.cpp,4041 +namespace wasm {wasm26,766 +static int isFullForced() {isFullForced28,784 +struct PrintSExpression : public Visitor {PrintSExpression35,923 + std::ostream& o;o36,984 + unsigned indent = 0;indent37,1003 + bool minify;minify39,1027 + const char *maybeSpace;maybeSpace40,1042 + const char *maybeNewLine;maybeNewLine41,1068 + bool full = false; // whether to not elide nodes in output when possiblefull43,1097 + Module* currModule = nullptr;currModule46,1238 + Function* currFunction = nullptr;currFunction47,1270 + Function::DebugLocation lastPrintedLocation;lastPrintedLocation48,1306 + PrintSExpression(std::ostream& o) : o(o) {PrintSExpression50,1354 + void visit(Expression* curr) {visit55,1464 + void setMinify(bool minify_) {setMinify72,2106 + void setFull(bool full_) { full = full_; }setFull78,2241 + void incIndent() {incIndent80,2287 + void decIndent() {decIndent85,2365 + void printFullLine(Expression *expression) {printFullLine92,2472 + Name printableLocal(Index index) {printableLocal101,2687 + std::ostream& printName(Name name) {printName112,2911 + void visitBlock(Block *curr) {visitBlock122,3127 + void visitIf(If *curr) {visitIf165,4404 + void visitLoop(Loop *curr) {visitLoop187,5297 + void visitBreak(Break *curr) {visitBreak208,5947 + void visitSwitch(Switch *curr) {visitSwitch229,6495 + void printCallBody(CallBase* curr) {printCallBody242,6839 + void visitCall(Call *curr) {visitCall255,7106 + void visitCallImport(CallImport *curr) {visitCallImport259,7196 + void visitCallIndirect(CallIndirect *curr) {visitCallIndirect263,7298 + void visitGetLocal(GetLocal *curr) {visitGetLocal272,7564 + void visitSetLocal(SetLocal *curr) {visitSetLocal275,7680 + void visitGetGlobal(GetGlobal *curr) {visitGetGlobal286,7945 + void visitSetGlobal(SetGlobal *curr) {visitSetGlobal290,8060 + void visitLoad(Load *curr) {visitLoad297,8234 + void visitStore(Store *curr) {visitStore323,8902 + void visitConst(Const *curr) {visitConst349,9573 + void visitUnary(Unary *curr) {visitUnary352,9632 + void visitBinary(Binary *curr) {visitBinary409,12868 + void visitSelect(Select *curr) {visitSelect501,17286 + void visitDrop(Drop *curr) {visitDrop510,17509 + void visitReturn(Return *curr) {visitReturn517,17655 + void visitHost(Host *curr) {visitHost528,17897 + void visitNop(Nop *curr) {visitNop543,18387 + void visitUnreachable(Unreachable *curr) {visitUnreachable546,18460 + void visitFunctionType(FunctionType *curr, Name* internalName = nullptr) {visitFunctionType550,18584 + void visitImport(Import *curr) {visitImport567,19092 + void visitExport(Export *curr) {visitExport580,19764 + void visitGlobal(Global *curr) {visitGlobal593,20219 + void visitFunction(Function *curr) {visitFunction604,20508 + void printTableHeader(Table* curr) {printTableHeader640,21869 + void visitTable(Table *curr) {visitTable646,22056 + void printMemoryHeader(Memory* curr) {printMemoryHeader668,22640 + void visitMemory(Memory* curr) {visitMemory675,22870 + void visitModule(Module *curr) {visitModule710,23904 +void Printer::run(PassRunner* runner, Module* module) {run761,25306 +Pass *createPrinterPass() {createPrinterPass766,25423 +class MinifiedPrinter : public Printer {MinifiedPrinter772,25511 + MinifiedPrinter() : Printer() {}MinifiedPrinter774,25560 + MinifiedPrinter(std::ostream* o) : Printer(o) {}MinifiedPrinter775,25595 + void run(PassRunner* runner, Module* module) override {run777,25647 +Pass *createMinifiedPrinterPass() {createMinifiedPrinterPass784,25802 +class FullPrinter : public Printer {FullPrinter790,25934 + FullPrinter() : Printer() {}FullPrinter792,25979 + FullPrinter(std::ostream* o) : Printer(o) {}FullPrinter793,26010 + void run(PassRunner* runner, Module* module) override {run795,26058 +Pass *createFullPrinterPass() {createFullPrinterPass802,26211 +std::ostream& WasmPrinter::printExpression(Expression* expression, std::ostream& o, bool minify,printExpression808,26307 + +externals/binaryen/src/passes/MemoryPacking.cpp,264 +namespace wasm {wasm21,688 +const Index OVERHEAD = 8;OVERHEAD24,765 +struct MemoryPacking : public Pass {MemoryPacking26,792 + void run(PassRunner* runner, Module* module) override {run27,829 +Pass *createMemoryPackingPass() {createMemoryPackingPass75,2533 + +externals/binaryen/src/passes/RelooperJumpThreading.cpp,2273 +namespace wasm {wasm27,972 +static Name LABEL("label");LABEL30,991 +static Name getInnerName(int i) {getInnerName32,1020 +static Name getOuterName(int i) {getOuterName36,1116 +static If* isLabelCheckingIf(Expression* curr, Index labelIndex) {isLabelCheckingIf40,1212 +static Index getCheckedLabelValue(If* iff) {getCheckedLabelValue51,1620 +static SetLocal* isLabelSettingSetLocal(Expression* curr, Index labelIndex) {isLabelSettingSetLocal55,1747 +static Index getSetLabelValue(SetLocal* set) {getSetLabelValue63,1988 +struct LabelUseFinder : public PostWalker {LabelUseFinder67,2090 + Index labelIndex;labelIndex68,2150 + std::map& checks; // label value => number of checks on itchecks69,2170 + std::map& sets; // label value => number of sets to itsets70,2245 + LabelUseFinder(Index labelIndex, std::map& checks, std::map& sets)LabelUseFinder72,2319 + void visitIf(If* curr) {visitIf74,2473 + void visitSetLocal(SetLocal* curr) {visitSetLocal80,2602 +struct RelooperJumpThreading : public WalkerPass> {RelooperJumpThreading87,2745 + bool isFunctionParallel() override { return true; }isFunctionParallel88,2842 + Pass* create() override { return new RelooperJumpThreading; }create90,2897 + std::map labelChecks;labelChecks92,2962 + std::map labelSets;labelSets93,3000 + Index labelIndex;labelIndex95,3037 + Index newNameCounter = 0;newNameCounter96,3057 + void visitBlock(Block* curr) {visitBlock98,3086 + void doWalkFunction(Function* func) {doWalkFunction142,4975 + void visitFunction(Function* curr) {visitFunction152,5359 + bool hasIrreducibleControlFlow(If* iff, Expression* origin) {hasIrreducibleControlFlow159,5497 + void optimizeJumpsToLabelCheck(Expression*& origin, If* iff) {optimizeJumpsToLabelCheck200,7748 + struct JumpUpdater : public PostWalker {JumpUpdater211,8447 + Index labelIndex;labelIndex212,8505 + Index targetNum;targetNum213,8529 + Name targetName;targetName214,8552 + void visitSetLocal(SetLocal* curr) {visitSetLocal216,8576 +Pass *createRelooperJumpThreadingPass() {createRelooperJumpThreadingPass244,9440 + +externals/binaryen/src/passes/RemoveImports.cpp,308 +namespace wasm {wasm28,961 +struct RemoveImports : public WalkerPass> {RemoveImports30,979 + void visitCallImport(CallImport *curr) {visitCallImport31,1049 + void visitModule(Module *curr) {visitModule42,1443 +Pass *createRemoveImportsPass() {createRemoveImportsPass53,1668 + +externals/binaryen/src/passes/Metrics.cpp,585 +namespace wasm {wasm23,730 +struct Metrics : public WalkerPass>> {Metrics28,817 + static Metrics *lastMetricsPass;lastMetricsPass29,910 + map counts;counts31,946 + void visitExpression(Expression* curr) {visitExpression33,980 + void visitModule(Module* module) {visitModule38,1089 + sort(keys.begin(), keys.end(), [](const char* a, const char* b) -> bool {__anon03e0202b010279,2189 +Pass *createMetricsPass() {createMetricsPass108,2982 +Metrics *Metrics::lastMetricsPass;lastMetricsPass112,3037 + +externals/binaryen/src/passes/DuplicateFunctionElimination.cpp,1557 +namespace wasm {wasm28,913 +struct FunctionHasher : public WalkerPass> {FunctionHasher30,931 + bool isFunctionParallel() override { return true; }isFunctionParallel31,1003 + FunctionHasher(std::map* output) : output(output) {}FunctionHasher33,1058 + FunctionHasher* create() override {create35,1135 + void doWalkFunction(Function* func) {doWalkFunction39,1217 + std::map* output;output52,1629 + uint32_t digest = 0;digest53,1670 + void hash(uint32_t hash) {hash55,1694 + void hash64(uint64_t hash) {hash6458,1762 +struct FunctionReplacer : public WalkerPass> {FunctionReplacer63,1867 + bool isFunctionParallel() override { return true; }isFunctionParallel64,1943 + FunctionReplacer(std::map* replacements) : replacements(replacements) {}FunctionReplacer66,1998 + FunctionReplacer* create() override {create68,2086 + void visitCall(Call* curr) {visitCall72,2178 + std::map* replacements;replacements80,2353 +struct DuplicateFunctionElimination : public Pass {DuplicateFunctionElimination83,2395 + void run(PassRunner* runner, Module* module) override {run84,2447 + v.erase(std::remove_if(v.begin(), v.end(), [&](const std::unique_ptr& curr) {__anonaeadcf0e0102129,4176 + std::map hashes;hashes168,5392 + bool equal(Function* left, Function* right) {equal170,5433 +Pass *createDuplicateFunctionEliminationPass() {createDuplicateFunctionEliminationPass182,5922 + +externals/binaryen/src/passes/SSAify.cpp,2588 +namespace wasm {wasm39,1367 +SetLocal IMPOSSIBLE_SET;IMPOSSIBLE_SET42,1433 +struct SSAify : public WalkerPass> {SSAify47,1575 + bool isFunctionParallel() override { return true; }isFunctionParallel48,1631 + Pass* create() override { return new SSAify; }create50,1686 + typedef std::set Sets;Sets55,1923 + typedef std::vector Mapping;Mapping60,2137 + Index numLocals;numLocals62,2175 + Mapping currMapping;currMapping63,2194 + Index nextIndex;nextIndex64,2217 + std::vector mappingStack; // used in ifs, loopsmappingStack65,2236 + std::map> breakMappings; // break target => infos that reach itbreakMappings66,2295 + std::vector> loopGetStack; // stack of loops, all the gets in each, soloopGetStack67,2388 + std::vector functionPrepends; // things we add to the function prologuefunctionPrepends68,2522 + std::map getSetses; // the sets for each getgetSetses69,2609 + std::map getLocations;getLocations70,2673 + void doWalkFunction(Function* func) {doWalkFunction72,2724 + void visitBlock(Block* curr) {visitBlock100,3633 + void finishIf() {finishIf109,3942 + static void afterIfCondition(SSAify* self, Expression** currp) {afterIfCondition118,4215 + static void afterIfTrue(SSAify* self, Expression** currp) {afterIfTrue121,4339 + static void afterIfFalse(SSAify* self, Expression** currp) {afterIfFalse131,4695 + static void beforeLoop(SSAify* self, Expression** currp) {beforeLoop134,4784 + void visitLoop(Loop* curr) {visitLoop139,5039 + auto linkLoopTop = [&](Index i, Sets& getSets) {__anon5a2d2ba30102151,5764 + void visitBreak(Break* curr) {visitBreak196,7505 + void visitSwitch(Switch* curr) {visitSwitch204,7752 + void visitReturn(Return *curr) {visitReturn215,8043 + void visitUnreachable(Unreachable *curr) {visitUnreachable218,8115 + void visitGetLocal(GetLocal* curr) {visitGetLocal224,8216 + void visitSetLocal(SetLocal* curr) {visitSetLocal234,8560 + static void scan(SSAify* self, Expression** currp) {scan244,8881 + void setUnreachable(Mapping& mapping) {setUnreachable267,9590 + bool isUnreachable(Mapping& mapping) {isUnreachable272,9727 + Mapping& merge(std::vector& mappings) {merge280,10090 + void computeGetsAndPhis() {computeGetsAndPhis300,10628 + auto gatherIndexes = [](SetLocal* set) {__anon5a2d2ba30202326,11511 + Index addLocal(WasmType type) {addLocal385,13510 +Pass *createSSAifyPass() {createSSAifyPass390,13601 + +externals/binaryen/src/passes/PostEmscripten.cpp,642 +namespace wasm {wasm28,847 +struct PostEmscripten : public WalkerPass> {PostEmscripten30,865 + bool isFunctionParallel() override { return true; }isFunctionParallel31,937 + Pass* create() override { return new PostEmscripten; }create33,992 + #define SAFE_MAX SAFE_MAX50,2072 + void optimizeMemoryAccess(Expression*& ptr, Address& offset) {optimizeMemoryAccess52,2097 + void visitLoad(Load* curr) {visitLoad88,3306 + void visitStore(Store* curr) {visitStore91,3392 + void visitCallImport(CallImport* curr) {visitCallImport95,3481 +Pass *createPostEmscriptenPass() {createPostEmscriptenPass116,4402 + +externals/binaryen/src/passes/RemoveUnusedBrs.cpp,2075 +namespace wasm {wasm26,778 +static bool canTurnIfIntoBrIf(Expression* ifCondition, Expression* brValue, PassOptions& optionscanTurnIfIntoBrIf31,980 +struct RemoveUnusedBrs : public WalkerPass> {RemoveUnusedBrs38,1265 + bool isFunctionParallel() override { return true; }isFunctionParallel39,1339 + Pass* create() override { return new RemoveUnusedBrs; }create41,1394 + bool anotherCycle;anotherCycle43,1453 + bool valueCanFlow;valueCanFlow47,1641 + typedef std::vector Flows;Flows49,1663 + Flows flows;flows53,1861 + std::vector ifStack;ifStack56,1935 + std::vector loops;loops59,2014 + static void visitAny(RemoveUnusedBrs* self, Expression** currp) {visitAny61,2043 + static void clear(RemoveUnusedBrs* self, Expression** currp) {clear137,4553 + static void saveIfTrue(RemoveUnusedBrs* self, Expression** currp) {saveIfTrue141,4648 + void visitLoop(Loop* curr) {visitLoop145,4776 + void visitIf(If* curr) {visitIf149,4839 + static void scan(RemoveUnusedBrs* self, Expression** currp) {scan166,5547 + bool optimizeLoop(Loop* loop) {optimizeLoop187,6299 + void doWalkFunction(Function* func) {doWalkFunction279,10786 + struct JumpThreader : public ControlFlowWalker {JumpThreader315,12033 + std::map> breaksToBlock;breaksToBlock317,12172 + std::map newNames;newNames320,12261 + void visitBreak(Break* curr) {visitBreak322,12301 + void visitBlock(Block* curr) {visitBlock330,12548 + void finish(Function* func) {finish364,14131 + struct FinalOptimizer : public PostWalker {FinalOptimizer382,14685 + bool selectify;selectify383,14749 + PassOptions& passOptions;passOptions384,14771 + FinalOptimizer(PassOptions& passOptions) : passOptions(passOptions) {}FinalOptimizer386,14804 + void visitBlock(Block* curr) {visitBlock388,14882 + void visitIf(If* curr) {visitIf467,19020 +Pass *createRemoveUnusedBrsPass() {createRemoveUnusedBrsPass499,20406 + +externals/binaryen/src/passes/CodePushing.cpp,1708 +namespace wasm {wasm27,850 +struct LocalAnalyzer : public PostWalker {LocalAnalyzer37,1251 + std::vector sfa;sfa38,1309 + std::vector numSets;numSets39,1334 + std::vector numGets;numGets40,1364 + void analyze(Function* func) {analyze42,1395 + bool isSFA(Index i) {isSFA57,1889 + Index getNumGets(Index i) {getNumGets61,1937 + void visitGetLocal(GetLocal *curr) {visitGetLocal65,1995 + void visitSetLocal(SetLocal *curr) {visitSetLocal72,2142 +class Pusher {Pusher82,2392 + ExpressionList& list;list83,2407 + LocalAnalyzer& analyzer;analyzer84,2431 + std::vector& numGetsSoFar;numGetsSoFar85,2458 + PassOptions& passOptions;passOptions86,2494 + Pusher(Block* block, LocalAnalyzer& analyzer, std::vector& numGetsSoFar, PassOptions& pPusher89,2531 + SetLocal* isPushable(Expression* curr) {isPushable115,3575 + bool isPushPoint(Expression* curr) {isPushPoint131,4142 + Index optimizeSegment(Index firstPushable, Index pushPoint) {optimizeSegment143,4426 + std::unordered_map pushableEffects;pushableEffects216,7293 +struct CodePushing : public WalkerPass> {CodePushing219,7362 + bool isFunctionParallel() override { return true; }isFunctionParallel220,7428 + Pass* create() override { return new CodePushing; }create222,7483 + LocalAnalyzer analyzer;analyzer224,7538 + std::vector numGetsSoFar;numGetsSoFar227,7609 + void doWalkFunction(Function* func) {doWalkFunction229,7645 + void visitGetLocal(GetLocal *curr) {visitGetLocal239,7970 + void visitBlock(Block* curr) {visitBlock243,8047 +Pass *createCodePushingPass() {createCodePushingPass260,8985 + +externals/binaryen/src/passes/DeadCodeElimination.cpp,2450 +namespace wasm {wasm38,1296 +struct DeadCodeElimination : public WalkerPass> {DeadCodeElimination40,1314 + bool isFunctionParallel() override { return true; }isFunctionParallel41,1396 + Pass* create() override { return new DeadCodeElimination; }create43,1451 + TypeUpdater typeUpdater;typeUpdater46,1582 + Expression* replaceCurrent(Expression* expression) {replaceCurrent48,1610 + bool reachable;reachable57,1938 + void doWalkFunction(Function* func) {doWalkFunction59,1957 + std::set reachableBreaks;reachableBreaks65,2080 + void addBreak(Name name) {addBreak67,2115 + bool isDead(Expression* child) {isDead80,2665 + bool isUnreachable(Expression* child) {isUnreachable85,2800 + void visitBreak(Break* curr) {visitBreak91,2922 + void visitSwitch(Switch* curr) {visitSwitch120,3816 + void visitReturn(Return* curr) {visitReturn145,4462 + void visitUnreachable(Unreachable* curr) {visitUnreachable153,4611 + void visitBlock(Block* curr) {visitBlock157,4684 + void visitLoop(Loop* curr) {visitLoop183,5622 + std::vector ifStack; // stack of reachable state, for forking and joiningifStack195,5900 + static void doAfterIfCondition(DeadCodeElimination* self, Expression** currp) {doAfterIfCondition197,5983 + static void doAfterIfElseTrue(DeadCodeElimination* self, Expression** currp) {doAfterIfElseTrue201,6116 + void visitIf(If* curr) {visitIf209,6415 + static void scan(DeadCodeElimination* self, Expression** currp) {scan220,6835 + #define DELEGATE(DELEGATE223,7035 + Expression* drop(Expression* toDrop) {drop276,9421 + Expression* handleCall(T* curr) {handleCall282,9593 + void visitCall(Call* curr) {visitCall303,10207 + void visitCallImport(CallImport* curr) {visitCallImport307,10265 + void visitCallIndirect(CallIndirect* curr) {visitCallIndirect311,10335 + void visitSetLocal(SetLocal* curr) {visitSetLocal324,10739 + void visitLoad(Load* curr) {visitLoad330,10862 + void visitStore(Store* curr) {visitStore336,10973 + void visitUnary(Unary* curr) {visitUnary351,11372 + void visitBinary(Binary* curr) {visitBinary357,11489 + void visitSelect(Select* curr) {visitSelect372,11893 + void visitDrop(Drop* curr) {visitDrop398,12662 + void visitHost(Host* curr) {visitHost404,12777 + void visitFunction(Function* curr) {visitFunction408,12835 +Pass *createDeadCodeEliminationPass() {createDeadCodeEliminationPass413,12929 + +externals/binaryen/src/passes/ReorderFunctions.cpp,434 +namespace wasm {wasm29,867 +struct ReorderFunctions : public WalkerPass> {ReorderFunctions31,885 + std::map counts;counts32,961 + void visitModule(Module *module) {visitModule34,997 + const std::unique_ptr& b) -> bool {__anon3fde8f00010248,1422 + void visitCall(Call *curr) {visitCall57,1688 +Pass *createReorderFunctionsPass() {createReorderFunctionsPass62,1755 + +externals/binaryen/src/passes/ExtractFunction.cpp,230 +namespace wasm {wasm24,822 +struct ExtractFunction : public Pass {ExtractFunction27,841 + void run(PassRunner* runner, Module* module) override {run28,880 +Pass *createExtractFunctionPass() {createExtractFunctionPass47,1346 + +externals/binaryen/src/passes/OptimizeInstructions.cpp,3744 +namespace wasm {wasm32,891 +Name I32_EXPR = "i32.expr",I32_EXPR34,909 + I64_EXPR = "i64.expr",I64_EXPR35,938 + F32_EXPR = "f32.expr",F32_EXPR36,967 + F64_EXPR = "f64.expr",F64_EXPR37,996 + ANY_EXPR = "any.expr";ANY_EXPR38,1025 +struct Pattern {Pattern41,1068 + Expression* input;input42,1085 + Expression* output;output43,1106 + Pattern(Expression* input, Expression* output) : input(input), output(output) {}Pattern45,1129 +struct Match {Match95,2370 + Module& wasm;wasm96,2385 + Pattern& pattern;pattern97,2401 + Match(Module& wasm, Pattern& pattern) : wasm(wasm), pattern(pattern) {}Match99,2422 + std::vector wildcards; // id in i32.any(id) etc. => the expression it represents wildcards101,2497 + bool check(Expression* seen) {check106,2716 + auto compare = [this](Expression* subInput, Expression* subSeen) {__anon9c176f5a0102109,2878 + auto checkMatch = [&](WasmType type) {__anon9c176f5a0202114,3245 + Expression* apply() {apply149,4467 + auto copy = [this](Expression* curr) -> Expression* {__anon9c176f5a0302152,4704 +Index getMaxBits(Expression* curr, LocalInfoProvider* localInfoProvider) {getMaxBits173,5668 +Expression* getFallthrough(Expression* curr) {getFallthrough256,9283 +struct LocalInfo {LocalInfo271,9747 + static const Index kUnknown = Index(-1);kUnknown272,9766 + Index maxBits;maxBits274,9810 + Index signExtedBits;signExtedBits275,9827 +struct LocalScanner : PostWalker {LocalScanner278,9854 + std::vector& localInfo;localInfo279,9903 + LocalScanner(std::vector& localInfo) : localInfo(localInfo) {}LocalScanner281,9941 + void doWalkFunction(Function* func) {doWalkFunction283,10018 + void visitSetLocal(SetLocal* curr) {visitSetLocal306,10769 + Index getMaxBitsForLocal(GetLocal* get) {getMaxBitsForLocal331,11819 + Index getBitsForType(WasmType type) {getBitsForType335,11906 +struct OptimizeInstructions : public WalkerPass localInfo;localInfo697,28149 + Expression* optimizeBoolean(Expression* boolean) {optimizeBoolean700,28260 + Expression* optimizeAddedConstants(Binary* binary) {optimizeAddedConstants742,30001 + std::function seek = [&](Expression* curr, int mul) {__anon9c176f5a0402745,30117 + struct ZeroRemover : public PostWalker {ZeroRemover797,31972 + PassOptions& passOptions;passOptions800,32112 + ZeroRemover(PassOptions& passOptions) : passOptions(passOptions) {}ZeroRemover802,32145 + void visitBinary(Binary* curr) {visitBinary804,32220 + Expression* conditionalizeExpensiveOnBitwise(Binary* binary) {conditionalizeExpensiveOnBitwise859,34356 + void optimizeMemoryAccess(Expression*& ptr, Address& offset) {optimizeMemoryAccess899,36341 + Expression* makeZeroExt(Expression* curr, int32_t bits) {makeZeroExt909,36740 + Expression* removeAlmostSignExt(Binary* outer) {removeAlmostSignExt918,37198 + bool isSignExted(Expression* curr, Index bits) {isSignExted930,37684 +Pass *createOptimizeInstructionsPass() {createOptimizeInstructionsPass942,38024 + +externals/binaryen/src/passes/CoalesceLocals.cpp,5279 +namespace wasm {wasm40,1127 +struct LocalSet : std::vector {LocalSet47,1383 + LocalSet() {}LocalSet48,1422 + LocalSet merge(const LocalSet& other) const {merge50,1439 + void insert(Index x) {insert81,2081 + bool erase(Index x) {erase92,2373 + bool has(Index x) {has102,2593 + void verify() const {verify107,2707 + void dump(const char* str = nullptr) const {dump113,2832 +struct Action {Action121,3046 + enum What {What122,3062 + Get, SetGet123,3076 + Get, SetSet123,3076 + What what;what125,3094 + Index index; // the local index read or writtenindex126,3107 + Expression** origin; // the originorigin127,3157 + bool effective; // whether a store is actually effective, i.e., may be readeffective128,3194 + Action(What what, Index index, Expression** origin) : what(what), index(index), origin(origin)Action130,3273 + bool isGet() { return what == Get; }isGet132,3392 + bool isSet() { return what == Set; }isSet133,3431 +struct Liveness {Liveness137,3521 + LocalSet start, end; // live locals at the start and endstart138,3539 + LocalSet start, end; // live locals at the start and endend138,3539 + std::vector actions; // actions occurring in this blockactions139,3598 + void dump(Function* func) {dump141,3665 +struct CoalesceLocals : public WalkerPass, LivCoalesceLocals150,3928 + bool isFunctionParallel() override { return true; }isFunctionParallel151,4034 + Pass* create() override { return new CoalesceLocals; }create153,4089 + Index numLocals;numLocals155,4147 + static void doVisitGetLocal(CoalesceLocals* self, Expression** currp) {doVisitGetLocal159,4192 + static void doVisitSetLocal(CoalesceLocals* self, Expression** currp) {doVisitSetLocal169,4573 + GetLocal* getCopy(SetLocal* set) {getCopy191,5569 + std::vector interferences; // canonicalized - accesses should check (low, high)interferences227,6855 + std::unordered_set liveBlocks;liveBlocks228,6943 + void interfere(Index i, Index j) {interfere230,6990 + void interfereLowHigh(Index low, Index high) { // optimized version where you know that low < interfereLowHigh235,7124 + bool interferes(Index i, Index j) {interferes240,7307 + std::vector copies; // canonicalized - accesses should check (low, high) TODO: use a copies246,7441 + std::vector totalCopies; // total # of copies for each local, with all otherstotalCopies247,7623 + void addCopy(Index i, Index j) {addCopy249,7711 + uint8_t getCopies(Index i, Index j) {getCopies256,7908 +void CoalesceLocals::doWalkFunction(Function* func) {doWalkFunction261,8020 +void CoalesceLocals::increaseBackEdgePriorities() {increaseBackEdgePriorities298,9256 +void CoalesceLocals::flowLiveness() {flowLiveness318,10064 +bool CoalesceLocals::mergeStartsAndCheckChange(std::vector& blocks, LocalSet& old, mergeStartsAndCheckChange369,12467 +void CoalesceLocals::scanLivenessThroughActions(std::vector& actions, LocalSet& live) {scanLivenessThroughActions381,12853 +void CoalesceLocals::calculateInterferences() {calculateInterferences393,13180 +void CoalesceLocals::calculateInterferences(const LocalSet& locals) {calculateInterferences427,14309 +void CoalesceLocals::pickIndicesFromOrder(std::vector& order, std::vector& indicespickIndicesFromOrder438,14576 +void CoalesceLocals::pickIndicesFromOrder(std::vector& order, std::vector& indicespickIndicesFromOrder443,14757 +std::vector adjustOrderByPriorities(std::vector& baseline, std::vector& priadjustOrderByPriorities540,18799 + std::sort(ret.begin(), ret.end(), [&priorities, &reversed](Index x, Index y) {__anon846998d10102543,18999 +void CoalesceLocals::pickIndices(std::vector& indices) {pickIndices549,19211 +static void removeIfCopy(Expression** origin, SetLocal* set, If* iff, Expression*& copy, ExpressremoveIfCopy592,21158 +void CoalesceLocals::applyIndices(std::vector& indices, Expression* root) {applyIndices608,21632 +struct CoalesceLocalsWithLearning : public CoalesceLocals {CoalesceLocalsWithLearning676,24097 + virtual Pass* create() override { return new CoalesceLocalsWithLearning; }create677,24157 +void CoalesceLocalsWithLearning::pickIndices(std::vector& indices) {pickIndices682,24305 + struct Order : public std::vector {Order689,24517 + void setFitness(double f) { fitness = f; }setFitness690,24562 + double getFitness() { return fitness; }getFitness691,24609 + void dump(std::string text) {dump692,24653 + double fitness;fitness699,24896 + struct Generator {Generator702,24922 + Generator(CoalesceLocalsWithLearning* parent) : parent(parent), noise(42) {}Generator703,24943 + void calculateFitness(Order* order) {calculateFitness705,25025 + Order* makeRandom() {makeRandom723,25904 + Order* makeMixture(Order* left, Order* right) {makeMixture748,26865 + CoalesceLocalsWithLearning* parent;parent778,28086 + std::mt19937 noise;noise779,28126 + bool first = true;first780,28150 +Pass *createCoalesceLocalsPass() {createCoalesceLocalsPass812,29153 +Pass *createCoalesceLocalsWithLearningPass() {createCoalesceLocalsWithLearningPass816,29222 + +externals/binaryen/src/passes/MergeBlocks.cpp,2127 +namespace wasm {wasm69,1736 +struct ProblemFinder : public ControlFlowWalker {ProblemFinder73,1940 + Name origin;origin74,2005 + bool foundSwitch = false;foundSwitch75,2020 + Index brIfs = 0;brIfs77,2162 + Index droppedBrIfs = 0;droppedBrIfs78,2181 + void visitBreak(Break* curr) {visitBreak80,2208 + void visitDrop(Drop* curr) {visitDrop86,2318 + void visitSwitch(Switch* curr) {visitSwitch94,2493 + bool found() {found107,2744 +struct BreakValueDropper : public ControlFlowWalker {BreakValueDropper115,2972 + Name origin;origin116,3045 + void visitBreak(Break* curr) {visitBreak120,3094 + void visitDrop(Drop* curr) {visitDrop130,3383 +static void optimizeBlock(Block* curr, Module* module) {optimizeBlock139,3684 +void BreakValueDropper::visitBlock(Block* curr) {visitBlock203,5842 +struct MergeBlocks : public WalkerPass> {MergeBlocks207,5931 + bool isFunctionParallel() override { return true; }isFunctionParallel208,5997 + Pass* create() override { return new MergeBlocks; }create210,6052 + void visitBlock(Block *curr) {visitBlock212,6107 + Block* optimize(Expression* curr, Expression*& child, Block* outer = nullptr, Expression** depoptimize216,6183 + void visitUnary(Unary* curr) {visitUnary254,8038 + void visitSetLocal(SetLocal* curr) {visitSetLocal257,8108 + void visitLoad(Load* curr) {visitLoad260,8184 + void visitReturn(Return* curr) {visitReturn263,8250 + void visitBinary(Binary* curr) {visitBinary267,8323 + void visitStore(Store* curr) {visitStore270,8436 + void visitSelect(Select* curr) {visitSelect274,8546 + void visitDrop(Drop* curr) {visitDrop283,8928 + void visitBreak(Break* curr) {visitBreak287,8997 + void visitSwitch(Switch* curr) {visitSwitch290,9114 + void handleCall(T* curr, Block* outer = nullptr) {handleCall295,9257 + void visitCall(Call* curr) {visitCall302,9521 + void visitCallImport(CallImport* curr) {visitCallImport306,9579 + void visitCallIndirect(CallIndirect* curr) {visitCallIndirect310,9649 +Pass *createMergeBlocksPass() {createMergeBlocksPass317,9862 + +externals/binaryen/src/passes/ReorderLocals.cpp,1228 +namespace wasm {wasm28,800 +struct ReorderLocals : public WalkerPass> {ReorderLocals30,818 + bool isFunctionParallel() override { return true; }isFunctionParallel31,888 + Pass* create() override { return new ReorderLocals; }create33,943 + std::map counts; // local => times it is usedcounts35,1000 + std::map firstUses; // local => index in the list of which local is first seenfirstUses36,1062 + void visitFunction(Function *curr) {visitFunction38,1158 + sort(newToOld.begin(), newToOld.end(), [this, curr](Index a, Index b) -> bool {__anon10457225010245,1410 + struct ReIndexer : public PostWalker {ReIndexer87,2817 + Function* func;func88,2871 + std::vector& oldToNew;oldToNew89,2893 + ReIndexer(Function* func, std::vector& oldToNew) : func(func), oldToNew(oldToNew) {ReIndexer91,2930 + void visitGetLocal(GetLocal *curr) {visitGetLocal93,3029 + void visitSetLocal(SetLocal *curr) {visitSetLocal99,3178 + void visitGetLocal(GetLocal *curr) {visitGetLocal122,3867 + void visitSetLocal(SetLocal *curr) {visitSetLocal129,4038 +Pass *createReorderLocalsPass() {createReorderLocalsPass137,4212 + +externals/binaryen/src/passes/Untee.cpp,350 +namespace wasm {wasm29,888 +struct Untee : public WalkerPass> {Untee31,906 + bool isFunctionParallel() override { return true; }isFunctionParallel32,960 + Pass* create() override { return new Untee; }create34,1015 + void visitSetLocal(SetLocal *curr) {visitSetLocal36,1064 +Pass *createUnteePass() {createUnteePass56,1578 + +externals/binaryen/src/passes/NameList.cpp,202 +namespace wasm {wasm25,751 +struct NameList : public Pass {NameList27,769 + void run(PassRunner* runner, Module* module) override {run28,801 +Pass *createNameListPass() {createNameListPass35,1007 + +externals/binaryen/src/passes/passes.h,72 +#define wasm_passes_hwasm_passes_h18,647 +namespace wasm {wasm20,670 + +externals/binaryen/src/passes/SimplifyLocals.cpp,3274 +namespace wasm {wasm52,1996 +struct SetLocalRemover : public PostWalker {SetLocalRemover56,2033 + std::vector* numGetLocals;numGetLocals57,2095 + void visitSetLocal(SetLocal *curr) {visitSetLocal59,2132 +struct SimplifyLocals : public WalkerPass> {SimplifyLocals74,2463 + bool isFunctionParallel() override { return true; }isFunctionParallel75,2546 + Pass* create() override { return new SimplifyLocals(allowTee, allowStructure); }create77,2601 + bool allowTee, allowStructure;allowTee79,2685 + bool allowTee, allowStructure;allowStructure79,2685 + SimplifyLocals(bool allowTee, bool allowStructure) : allowTee(allowTee), allowStructure(allowSSimplifyLocals81,2719 + struct SinkableInfo {SinkableInfo84,2874 + Expression** item;item85,2898 + EffectAnalyzer effects;effects86,2921 + SinkableInfo(Expression** item, PassOptions& passOptions) : item(item), effects(passOptions,SinkableInfo88,2950 + typedef std::map Sinkables;Sinkables92,3116 + Sinkables sinkables;sinkables95,3236 + struct BlockBreak {BlockBreak100,3408 + Expression** brp;brp101,3430 + Sinkables sinkables;sinkables102,3452 + std::map> blockBreaks;blockBreaks108,3632 + std::set unoptimizableBlocks;unoptimizableBlocks112,3796 + std::vector ifStack;ifStack117,3985 + bool anotherCycle;anotherCycle120,4068 + bool firstCycle;firstCycle123,4163 + GetLocalCounter getCounter;getCounter126,4220 + static void doNoteNonLinear(SimplifyLocals* self, Expression** currp) {doNoteNonLinear128,4251 + static void doNoteIfElseCondition(SimplifyLocals* self, Expression** currp) {doNoteIfElseCondition153,5211 + static void doNoteIfElseTrue(SimplifyLocals* self, Expression** currp) {doNoteIfElseTrue160,5502 + static void doNoteIfElseFalse(SimplifyLocals* self, Expression** currp) {doNoteIfElseFalse166,5762 + void visitBlock(Block* curr) {visitBlock178,6220 + void visitGetLocal(GetLocal *curr) {visitGetLocal200,6770 + void visitDrop(Drop* curr) {visitDrop220,7383 + void checkInvalidations(EffectAnalyzer& effects) {checkInvalidations230,7657 + std::vector expressionStack;expressionStack243,8010 + static void visitPre(SimplifyLocals* self, Expression** currp) {visitPre245,8055 + static void visitPost(SimplifyLocals* self, Expression** currp) {visitPost256,8336 + bool canSink(SetLocal* set) {canSink290,9593 + std::vector blocksToEnlarge;blocksToEnlarge298,9904 + std::vector ifsToEnlarge;ifsToEnlarge299,9943 + void optimizeBlockReturn(Block* block) {optimizeBlockReturn301,9977 + void optimizeIfReturn(If* iff, Expression** currp, Sinkables& ifTrue) {optimizeIfReturn371,12940 + static void scan(SimplifyLocals* self, Expression** currp) {scan418,14896 + void doWalkFunction(Function* func) {doWalkFunction438,15693 +Pass *createSimplifyLocalsPass() {createSimplifyLocalsPass501,18027 +Pass *createSimplifyLocalsNoTeePass() {createSimplifyLocalsNoTeePass505,18106 +Pass *createSimplifyLocalsNoStructurePass() {createSimplifyLocalsNoStructurePass509,18191 +Pass *createSimplifyLocalsNoTeeNoStructurePass() {createSimplifyLocalsNoTeeNoStructurePass513,18282 + +externals/binaryen/src/passes/ReReloop.cpp,3304 +namespace wasm {wasm33,952 +struct ReReloop final : public Pass {ReReloop35,970 + bool isFunctionParallel() override { return true; }isFunctionParallel36,1008 + Pass* create() override { return new ReReloop; }create38,1063 + CFG::Relooper relooper;relooper40,1115 + std::unique_ptr builder;builder41,1141 + CFG::Block* currCFGBlock = nullptr;currCFGBlock45,1199 + CFG::Block* makeCFGBlock() {makeCFGBlock47,1238 + CFG::Block* setCurrCFGBlock(CFG::Block* curr) {setCurrCFGBlock53,1372 + CFG::Block* startCFGBlock() {startCFGBlock60,1510 + CFG::Block* getCurrCFGBlock() {getCurrCFGBlock64,1591 + Block* getCurrBlock() {getCurrBlock68,1655 + void finishBlock() {finishBlock72,1732 + std::map breakTargets;breakTargets78,1813 + void addBreakTarget(Name name, CFG::Block* target) {addBreakTarget80,1858 + CFG::Block* getBreakTarget(Name name) {getBreakTarget84,1951 + void addBranch(CFG::Block* from, CFG::Block* to, Expression* condition = nullptr) {addBranch90,2051 + void addSwitchBranch(CFG::Block* from, CFG::Block* to, const std::set& values) {addSwitchBranch94,2180 + struct Task {Task102,2449 + ReReloop& parent;parent103,2465 + Task(ReReloop& parent) : parent(parent) {}Task104,2487 + virtual void run() {run105,2534 + typedef std::shared_ptr TaskPtr;TaskPtr110,2597 + std::vector stack;stack111,2638 + struct TriageTask final : public Task {TriageTask113,2669 + Expression* curr;curr114,2711 + TriageTask(ReReloop& parent, Expression* curr) : Task(parent), curr(curr) {}TriageTask116,2734 + void run() override {run118,2816 + struct BlockTask final : public Task {BlockTask123,2881 + Block* curr;curr124,2922 + CFG::Block* later;later125,2939 + BlockTask(ReReloop& parent, Block* curr) : Task(parent), curr(curr) {}BlockTask127,2963 + static void handle(ReReloop& parent, Block* curr) {handle129,3039 + void run() override {run145,3647 + struct LoopTask final : public Task {LoopTask152,3804 + static void handle(ReReloop& parent, Loop* curr) {handle153,3844 + struct IfTask final : public Task {IfTask165,4258 + If* curr;curr166,4296 + CFG::Block* condition;condition167,4310 + CFG::Block* ifTrueEnd;ifTrueEnd168,4337 + int phase = 0;phase169,4364 + IfTask(ReReloop& parent, If* curr) : Task(parent), curr(curr) {}IfTask171,4384 + static void handle(ReReloop& parent, If* curr) {handle173,4454 + void run() override {run187,5044 + struct BreakTask : public Task {BreakTask209,5736 + static void handle(ReReloop& parent, Break* curr) {handle210,5771 + struct SwitchTask : public Task {SwitchTask223,6240 + static void handle(ReReloop& parent, Switch* curr) {handle224,6276 + struct ReturnTask : public Task {ReturnTask251,7428 + static void handle(ReReloop& parent, Return* curr) {handle252,7464 + struct UnreachableTask : public Task {UnreachableTask259,7642 + static void handle(ReReloop& parent, Unreachable* curr) {handle260,7683 + void triage(Expression* curr) {triage269,7908 + void stopControlFlow() {stopControlFlow290,8693 + void runFunction(PassRunner* runner, Module* module, Function* function) override {runFunction295,8779 +Pass *createReReloopPass() {createReReloopPass323,9756 + +externals/binaryen/src/passes/InstrumentLocals.cpp,818 +namespace wasm {wasm53,1262 +Name get_i32("get_i32");get_i3255,1280 +Name get_i64("get_i64");get_i6456,1305 +Name get_f32("get_f32");get_f3257,1330 +Name get_f64("get_f64");get_f6458,1355 +Name set_i32("set_i32");set_i3260,1381 +Name set_i64("set_i64");set_i6461,1406 +Name set_f32("set_f32");set_f3262,1431 +Name set_f64("set_f64");set_f6463,1456 +struct InstrumentLocals : public WalkerPass> {InstrumentLocals65,1482 + void visitGetLocal(GetLocal* curr) {visitGetLocal66,1558 + void visitSetLocal(SetLocal* curr) {visitSetLocal89,2125 + void visitModule(Module* curr) {visitModule111,2737 + Index id = 0;id123,3098 + void addImport(Module* wasm, Name name, std::string sig) {addImport125,3115 +Pass* createInstrumentLocalsPass() {createInstrumentLocalsPass136,3433 + +externals/binaryen/src/passes/LocalCSE.cpp,1405 +namespace wasm {wasm35,1024 +const Index UNUSED = -1;UNUSED37,1042 +struct LocalCSE : public WalkerPass> {LocalCSE39,1068 + bool isFunctionParallel() override { return true; }isFunctionParallel40,1139 + Pass* create() override { return new LocalCSE(); }create42,1194 + struct UsableInfo {UsableInfo45,1296 + Expression** item;item46,1318 + Index index; // if not UNUSED, then the local we are assigned to, use that to reuse usindex47,1341 + EffectAnalyzer effects;effects48,1432 + UsableInfo(Expression** item, PassOptions& passOptions) : item(item), index(UNUSED), effectsUsableInfo50,1461 + typedef HashedExpressionMap Usables;Usables54,1638 + Usables usables;usables57,1758 + static void doNoteNonLinear(LocalCSE* self, Expression** currp) {doNoteNonLinear59,1778 + void checkInvalidations(EffectAnalyzer& effects) {checkInvalidations63,1878 + std::vector expressionStack;expressionStack76,2238 + static void visitPre(LocalCSE* self, Expression** currp) {visitPre78,2283 + static void visitPost(LocalCSE* self, Expression** currp) {visitPost90,2580 + static void scan(LocalCSE* self, Expression** currp) {scan109,3034 + bool isRelevant(Expression* curr) {isRelevant117,3241 + void handle(Expression** currp, Expression* curr) {handle131,3734 +Pass *createLocalCSEPass() {createLocalCSEPass152,4516 + +externals/binaryen/src/passes/NameManager.cpp,835 +namespace wasm {wasm24,684 +Name NameManager::getUnique(std::string prefix) {getUnique26,702 +void NameManager::visitBlock(Block* curr) {visitBlock36,953 +void NameManager::visitLoop(Loop* curr) {visitLoop39,1027 +void NameManager::visitBreak(Break* curr) {visitBreak42,1099 +void NameManager::visitSwitch(Switch* curr) {visitSwitch45,1173 +void NameManager::visitCall(Call* curr) {visitCall51,1322 +void NameManager::visitCallImport(CallImport* curr) {visitCallImport54,1396 +void NameManager::visitFunctionType(FunctionType* curr) {visitFunctionType57,1482 +void NameManager::visitFunction(Function* curr) {visitFunction60,1570 +void NameManager::visitImport(Import* curr) {visitImport69,1808 +void NameManager::visitExport(Export* curr) {visitExport72,1884 +Pass *createNameManagerPass() {createNameManagerPass76,1961 + +externals/binaryen/src/passes/FlattenControlFlow.cpp,3353 +namespace wasm {wasm66,2011 +struct ControlFlowChecker : public Visitor {ControlFlowChecker70,2144 + static bool is(Expression* node) {is71,2209 + bool hasControlFlow = false;hasControlFlow77,2340 + void visitBreak(Break *curr) { hasControlFlow = true; }visitBreak79,2372 + void visitSwitch(Switch *curr) { hasControlFlow = true; }visitSwitch80,2430 + void visitBlock(Block *curr) { hasControlFlow = true; }visitBlock81,2490 + void visitLoop(Loop* curr) { hasControlFlow = true; }visitLoop82,2548 + void visitIf(If* curr) { hasControlFlow = true; }visitIf83,2604 + void visitReturn(Return *curr) { hasControlFlow = true; }visitReturn84,2656 + void visitUnreachable(Unreachable *curr) { hasControlFlow = true; }visitUnreachable85,2716 +struct FlattenControlFlow : public WalkerPass> {FlattenControlFlow88,2790 + bool isFunctionParallel() override { return true; }isFunctionParallel89,2870 + Pass* create() override { return new FlattenControlFlow; }create91,2925 + std::unique_ptr builder;builder93,2987 + std::map breakNameIndexes;breakNameIndexes100,3360 + std::map breakExprIndexes;breakExprIndexes101,3402 + void doWalkFunction(Function* func) {doWalkFunction103,3452 + Index getBreakTargetIndex(Name name, WasmType type, Expression* expr = nullptr, Index index = getBreakTargetIndex123,4130 + Expression* getFallthroughReplacement(Expression* child, Index myIndex) {getFallthroughReplacement158,5380 + WasmType getFallthroughType(Expression* child) {getFallthroughType184,6226 + struct Splitter {Splitter195,6563 + Splitter(FlattenControlFlow& parent, Expression* node) : parent(parent), node(node) {}Splitter196,6583 + ~Splitter() {~Splitter198,6675 + FlattenControlFlow& parent;parent202,6716 + Expression* node;node203,6748 + std::vector children; // TODO: reuse in parent, avoiding mallocing on each nodchildren205,6771 + void note(Expression*& child) {note207,6870 + Expression* replacement; // the final replacement for the current nodereplacement213,7033 + bool stop = false; // if a child is unreachable, we can stopstop214,7108 + void finish() {finish216,7174 + void visitBlock(Block* curr) {visitBlock297,10583 + void visitLoop(Loop* curr) {visitLoop303,10815 + void visitIf(If* curr) {visitIf309,11027 + void visitBreak(Break* curr) {visitBreak319,11426 + void visitSwitch(Switch* curr) {visitSwitch352,12753 + void visitCall(Call* curr) {visitCall399,14375 + void visitCallImport(CallImport* curr) {visitCallImport405,14526 + void visitCallIndirect(CallIndirect* curr) {visitCallIndirect411,14689 + void visitSetLocal(SetLocal* curr) {visitSetLocal418,14889 + void visitSetGlobal(SetGlobal* curr) {visitSetGlobal422,15000 + void visitLoad(Load* curr) {visitLoad426,15113 + void visitStore(Store* curr) {visitStore430,15214 + void visitUnary(Unary* curr) {visitUnary435,15349 + void visitBinary(Binary* curr) {visitBinary439,15454 + void visitSelect(Select* curr) {visitSelect444,15592 + void visitDrop(Drop* curr) {visitDrop450,15770 + void visitReturn(Return* curr) {visitReturn454,15873 + void visitHost(Host* curr) {visitHost458,15980 +Pass *createFlattenControlFlowPass() {createFlattenControlFlowPass466,16135 + +externals/binaryen/src/passes/InstrumentMemory.cpp,670 +namespace wasm {wasm65,1964 +Name load("load");load67,1982 +Name store("store");store68,2001 +struct InstrumentMemory : public WalkerPass> {InstrumentMemory70,2023 + void visitLoad(Load* curr) {visitLoad71,2099 + void visitStore(Store* curr) {visitStore74,2158 + void addImport(Module *curr, Name name, std::string sig) {addImport77,2220 + void visitModule(Module *curr) {visitModule87,2535 + std::atomic id;id93,2659 + Expression* makeLoadCall(Load* curr) {makeLoadCall94,2684 + Expression* makeStoreCall(Store* curr) {makeStoreCall106,3048 +Pass *createInstrumentMemoryPass() {createInstrumentMemoryPass119,3419 + +externals/binaryen/src/literal.h,1937 +#define wasm_literal_hwasm_literal_h18,648 +namespace wasm {wasm26,803 +class Literal {Literal28,821 + WasmType type;type30,845 + union {__anonb0020d48010a35,988 + int32_t i32;i3236,998 + int64_t i64;i6437,1015 + static T shiftMask(T val) {shiftMask42,1120 + Literal() : type(WasmType::none), i64(0) {}Literal47,1202 + explicit Literal(WasmType type) : type(type), i64(0) {}Literal48,1248 + explicit Literal(int32_t init) : type(WasmType::i32), i32(init) {}Literal49,1306 + explicit Literal(uint32_t init) : type(WasmType::i32), i32(init) {}Literal50,1376 + explicit Literal(int64_t init) : type(WasmType::i64), i64(init) {}Literal51,1446 + explicit Literal(uint64_t init) : type(WasmType::i64), i64(init) {}Literal52,1516 + explicit Literal(float init) : type(WasmType::f32), i32(bit_cast(init)) {}Literal53,1586 + explicit Literal(double init) : type(WasmType::f64), i64(bit_cast(init)) {}Literal54,1675 + int32_t geti32() const { ASSERT_THROW(type == WasmType::i32); return i32; }geti3261,1858 + int64_t geti64() const { ASSERT_THROW(type == WasmType::i64); return i64; }geti6462,1936 + float getf32() const { ASSERT_THROW(type == WasmType::f32); return bit_cast(i32); }getf3263,2014 + double getf64() const { ASSERT_THROW(type == WasmType::f64); return bit_cast(i64); }getf6464,2109 + int32_t* geti32Ptr() { ASSERT_THROW(type == WasmType::i32); return &i32; } // careful!geti32Ptr66,2206 + int32_t reinterpreti32() const { ASSERT_THROW(type == WasmType::f32); return i32; }reinterpreti3268,2296 + int64_t reinterpreti64() const { ASSERT_THROW(type == WasmType::f64); return i64; }reinterpreti6469,2382 + float reinterpretf32() const { ASSERT_THROW(type == WasmType::i32); return bit_cast(ireinterpretf3270,2468 + double reinterpretf64() const { ASSERT_THROW(type == WasmType::i64); return bit_cast(reinterpretf6471,2571 + +externals/binaryen/src/binaryen-c.cpp,19482 +BinaryenLiteral toBinaryenLiteral(Literal x) {toBinaryenLiteral41,1173 +Literal fromBinaryenLiteral(BinaryenLiteral x) {fromBinaryenLiteral54,1555 +static std::mutex BinaryenFunctionMutex;BinaryenFunctionMutex68,2021 +static std::mutex BinaryenFunctionTypeMutex;BinaryenFunctionTypeMutex69,2062 +static int tracing = 0;tracing73,2128 +void traceNameOrNULL(const char *name) {traceNameOrNULL75,2153 +std::map functionTypes;functionTypes80,2272 +std::map expressions;expressions81,2329 +std::map functions;functions82,2382 +std::map relooperBlocks;relooperBlocks83,2431 +size_t noteExpression(BinaryenExpressionRef expression) {noteExpression85,2483 +BinaryenType BinaryenNone(void) { return none; }BinaryenNone100,2765 +BinaryenType BinaryenInt32(void) { return i32; }BinaryenInt32101,2814 +BinaryenType BinaryenInt64(void) { return i64; }BinaryenInt64102,2863 +BinaryenType BinaryenFloat32(void) { return f32; }BinaryenFloat32103,2912 +BinaryenType BinaryenFloat64(void) { return f64; }BinaryenFloat64104,2963 +BinaryenType BinaryenUndefined(void) { return uint32_t(-1); }BinaryenUndefined105,3014 +BinaryenModuleRef BinaryenModuleCreate(void) {BinaryenModuleCreate109,3089 +void BinaryenModuleDispose(BinaryenModuleRef module) {BinaryenModuleDispose118,3352 +BinaryenFunctionTypeRef BinaryenAddFunctionType(BinaryenModuleRef module, const char* name, BinaBinaryenAddFunctionType136,3822 +BinaryenLiteral BinaryenLiteralInt32(int32_t x) { return toBinaryenLiteral(Literal(x)); }BinaryenLiteralInt32173,5187 +BinaryenLiteral BinaryenLiteralInt64(int64_t x) { return toBinaryenLiteral(Literal(x)); }BinaryenLiteralInt64174,5277 +BinaryenLiteral BinaryenLiteralFloat32(float x) { return toBinaryenLiteral(Literal(x)); }BinaryenLiteralFloat32175,5367 +BinaryenLiteral BinaryenLiteralFloat64(double x) { return toBinaryenLiteral(Literal(x)); }BinaryenLiteralFloat64176,5457 +BinaryenLiteral BinaryenLiteralFloat32Bits(int32_t x) { return toBinaryenLiteral(Literal(x).castBinaryenLiteralFloat32Bits177,5548 +BinaryenLiteral BinaryenLiteralFloat64Bits(int64_t x) { return toBinaryenLiteral(Literal(x).castBinaryenLiteralFloat64Bits178,5656 +BinaryenOp BinaryenClzInt32(void) { return ClzInt32; }BinaryenClzInt32182,5781 +BinaryenOp BinaryenCtzInt32(void) { return CtzInt32; }BinaryenCtzInt32183,5836 +BinaryenOp BinaryenPopcntInt32(void) { return PopcntInt32; }BinaryenPopcntInt32184,5891 +BinaryenOp BinaryenNegFloat32(void) { return NegFloat32; }BinaryenNegFloat32185,5952 +BinaryenOp BinaryenAbsFloat32(void) { return AbsFloat32; }BinaryenAbsFloat32186,6011 +BinaryenOp BinaryenCeilFloat32(void) { return CeilFloat32; }BinaryenCeilFloat32187,6070 +BinaryenOp BinaryenFloorFloat32(void) { return FloorFloat32; }BinaryenFloorFloat32188,6131 +BinaryenOp BinaryenTruncFloat32(void) { return TruncFloat32; }BinaryenTruncFloat32189,6194 +BinaryenOp BinaryenNearestFloat32(void) { return NearestFloat32; }BinaryenNearestFloat32190,6257 +BinaryenOp BinaryenSqrtFloat32(void) { return SqrtFloat32; }BinaryenSqrtFloat32191,6324 +BinaryenOp BinaryenEqZInt32(void) { return EqZInt32; }BinaryenEqZInt32192,6385 +BinaryenOp BinaryenClzInt64(void) { return ClzInt64; }BinaryenClzInt64193,6440 +BinaryenOp BinaryenCtzInt64(void) { return CtzInt64; }BinaryenCtzInt64194,6495 +BinaryenOp BinaryenPopcntInt64(void) { return PopcntInt64; }BinaryenPopcntInt64195,6550 +BinaryenOp BinaryenNegFloat64(void) { return NegFloat64; }BinaryenNegFloat64196,6611 +BinaryenOp BinaryenAbsFloat64(void) { return AbsFloat64; }BinaryenAbsFloat64197,6670 +BinaryenOp BinaryenCeilFloat64(void) { return CeilFloat64; }BinaryenCeilFloat64198,6729 +BinaryenOp BinaryenFloorFloat64(void) { return FloorFloat64; }BinaryenFloorFloat64199,6790 +BinaryenOp BinaryenTruncFloat64(void) { return TruncFloat64; }BinaryenTruncFloat64200,6853 +BinaryenOp BinaryenNearestFloat64(void) { return NearestFloat64; }BinaryenNearestFloat64201,6916 +BinaryenOp BinaryenSqrtFloat64(void) { return SqrtFloat64; }BinaryenSqrtFloat64202,6983 +BinaryenOp BinaryenEqZInt64(void) { return EqZInt64; }BinaryenEqZInt64203,7044 +BinaryenOp BinaryenExtendSInt32(void) { return ExtendSInt32; }BinaryenExtendSInt32204,7099 +BinaryenOp BinaryenExtendUInt32(void) { return ExtendUInt32; }BinaryenExtendUInt32205,7162 +BinaryenOp BinaryenWrapInt64(void) { return WrapInt64; }BinaryenWrapInt64206,7225 +BinaryenOp BinaryenTruncSFloat32ToInt32(void) { return TruncSFloat32ToInt32; }BinaryenTruncSFloat32ToInt32207,7282 +BinaryenOp BinaryenTruncSFloat32ToInt64(void) { return TruncSFloat32ToInt64; }BinaryenTruncSFloat32ToInt64208,7361 +BinaryenOp BinaryenTruncUFloat32ToInt32(void) { return TruncUFloat32ToInt32; }BinaryenTruncUFloat32ToInt32209,7440 +BinaryenOp BinaryenTruncUFloat32ToInt64(void) { return TruncUFloat32ToInt64; }BinaryenTruncUFloat32ToInt64210,7519 +BinaryenOp BinaryenTruncSFloat64ToInt32(void) { return TruncSFloat64ToInt32; }BinaryenTruncSFloat64ToInt32211,7598 +BinaryenOp BinaryenTruncSFloat64ToInt64(void) { return TruncSFloat64ToInt64; }BinaryenTruncSFloat64ToInt64212,7677 +BinaryenOp BinaryenTruncUFloat64ToInt32(void) { return TruncUFloat64ToInt32; }BinaryenTruncUFloat64ToInt32213,7756 +BinaryenOp BinaryenTruncUFloat64ToInt64(void) { return TruncUFloat64ToInt64; }BinaryenTruncUFloat64ToInt64214,7835 +BinaryenOp BinaryenReinterpretFloat32(void) { return ReinterpretFloat32; }BinaryenReinterpretFloat32215,7914 +BinaryenOp BinaryenReinterpretFloat64(void) { return ReinterpretFloat64; }BinaryenReinterpretFloat64216,7989 +BinaryenOp BinaryenConvertSInt32ToFloat32(void) { return ConvertSInt32ToFloat32; }BinaryenConvertSInt32ToFloat32217,8064 +BinaryenOp BinaryenConvertSInt32ToFloat64(void) { return ConvertSInt32ToFloat64; }BinaryenConvertSInt32ToFloat64218,8147 +BinaryenOp BinaryenConvertUInt32ToFloat32(void) { return ConvertUInt32ToFloat32; }BinaryenConvertUInt32ToFloat32219,8230 +BinaryenOp BinaryenConvertUInt32ToFloat64(void) { return ConvertUInt32ToFloat64; }BinaryenConvertUInt32ToFloat64220,8313 +BinaryenOp BinaryenConvertSInt64ToFloat32(void) { return ConvertSInt64ToFloat32; }BinaryenConvertSInt64ToFloat32221,8396 +BinaryenOp BinaryenConvertSInt64ToFloat64(void) { return ConvertSInt64ToFloat64; }BinaryenConvertSInt64ToFloat64222,8479 +BinaryenOp BinaryenConvertUInt64ToFloat32(void) { return ConvertUInt64ToFloat32; }BinaryenConvertUInt64ToFloat32223,8562 +BinaryenOp BinaryenConvertUInt64ToFloat64(void) { return ConvertUInt64ToFloat64; }BinaryenConvertUInt64ToFloat64224,8645 +BinaryenOp BinaryenPromoteFloat32(void) { return PromoteFloat32; }BinaryenPromoteFloat32225,8728 +BinaryenOp BinaryenDemoteFloat64(void) { return DemoteFloat64; }BinaryenDemoteFloat64226,8795 +BinaryenOp BinaryenReinterpretInt32(void) { return ReinterpretInt32; }BinaryenReinterpretInt32227,8860 +BinaryenOp BinaryenReinterpretInt64(void) { return ReinterpretInt64; }BinaryenReinterpretInt64228,8931 +BinaryenOp BinaryenAddInt32(void) { return AddInt32; }BinaryenAddInt32229,9002 +BinaryenOp BinaryenSubInt32(void) { return SubInt32; }BinaryenSubInt32230,9057 +BinaryenOp BinaryenMulInt32(void) { return MulInt32; }BinaryenMulInt32231,9112 +BinaryenOp BinaryenDivSInt32(void) { return DivSInt32; }BinaryenDivSInt32232,9167 +BinaryenOp BinaryenDivUInt32(void) { return DivUInt32; }BinaryenDivUInt32233,9224 +BinaryenOp BinaryenRemSInt32(void) { return RemSInt32; }BinaryenRemSInt32234,9281 +BinaryenOp BinaryenRemUInt32(void) { return RemUInt32; }BinaryenRemUInt32235,9338 +BinaryenOp BinaryenAndInt32(void) { return AndInt32; }BinaryenAndInt32236,9395 +BinaryenOp BinaryenOrInt32(void) { return OrInt32; }BinaryenOrInt32237,9450 +BinaryenOp BinaryenXorInt32(void) { return XorInt32; }BinaryenXorInt32238,9503 +BinaryenOp BinaryenShlInt32(void) { return ShlInt32; }BinaryenShlInt32239,9558 +BinaryenOp BinaryenShrUInt32(void) { return ShrUInt32; }BinaryenShrUInt32240,9613 +BinaryenOp BinaryenShrSInt32(void) { return ShrSInt32; }BinaryenShrSInt32241,9670 +BinaryenOp BinaryenRotLInt32(void) { return RotLInt32; }BinaryenRotLInt32242,9727 +BinaryenOp BinaryenRotRInt32(void) { return RotRInt32; }BinaryenRotRInt32243,9784 +BinaryenOp BinaryenEqInt32(void) { return EqInt32; }BinaryenEqInt32244,9841 +BinaryenOp BinaryenNeInt32(void) { return NeInt32; }BinaryenNeInt32245,9894 +BinaryenOp BinaryenLtSInt32(void) { return LtSInt32; }BinaryenLtSInt32246,9947 +BinaryenOp BinaryenLtUInt32(void) { return LtUInt32; }BinaryenLtUInt32247,10002 +BinaryenOp BinaryenLeSInt32(void) { return LeSInt32; }BinaryenLeSInt32248,10057 +BinaryenOp BinaryenLeUInt32(void) { return LeUInt32; }BinaryenLeUInt32249,10112 +BinaryenOp BinaryenGtSInt32(void) { return GtSInt32; }BinaryenGtSInt32250,10167 +BinaryenOp BinaryenGtUInt32(void) { return GtUInt32; }BinaryenGtUInt32251,10222 +BinaryenOp BinaryenGeSInt32(void) { return GeSInt32; }BinaryenGeSInt32252,10277 +BinaryenOp BinaryenGeUInt32(void) { return GeUInt32; }BinaryenGeUInt32253,10332 +BinaryenOp BinaryenAddInt64(void) { return AddInt64; }BinaryenAddInt64254,10387 +BinaryenOp BinaryenSubInt64(void) { return SubInt64; }BinaryenSubInt64255,10442 +BinaryenOp BinaryenMulInt64(void) { return MulInt64; }BinaryenMulInt64256,10497 +BinaryenOp BinaryenDivSInt64(void) { return DivSInt64; }BinaryenDivSInt64257,10552 +BinaryenOp BinaryenDivUInt64(void) { return DivUInt64; }BinaryenDivUInt64258,10609 +BinaryenOp BinaryenRemSInt64(void) { return RemSInt64; }BinaryenRemSInt64259,10666 +BinaryenOp BinaryenRemUInt64(void) { return RemUInt64; }BinaryenRemUInt64260,10723 +BinaryenOp BinaryenAndInt64(void) { return AndInt64; }BinaryenAndInt64261,10780 +BinaryenOp BinaryenOrInt64(void) { return OrInt64; }BinaryenOrInt64262,10835 +BinaryenOp BinaryenXorInt64(void) { return XorInt64; }BinaryenXorInt64263,10888 +BinaryenOp BinaryenShlInt64(void) { return ShlInt64; }BinaryenShlInt64264,10943 +BinaryenOp BinaryenShrUInt64(void) { return ShrUInt64; }BinaryenShrUInt64265,10998 +BinaryenOp BinaryenShrSInt64(void) { return ShrSInt64; }BinaryenShrSInt64266,11055 +BinaryenOp BinaryenRotLInt64(void) { return RotLInt64; }BinaryenRotLInt64267,11112 +BinaryenOp BinaryenRotRInt64(void) { return RotRInt64; }BinaryenRotRInt64268,11169 +BinaryenOp BinaryenEqInt64(void) { return EqInt64; }BinaryenEqInt64269,11226 +BinaryenOp BinaryenNeInt64(void) { return NeInt64; }BinaryenNeInt64270,11279 +BinaryenOp BinaryenLtSInt64(void) { return LtSInt64; }BinaryenLtSInt64271,11332 +BinaryenOp BinaryenLtUInt64(void) { return LtUInt64; }BinaryenLtUInt64272,11387 +BinaryenOp BinaryenLeSInt64(void) { return LeSInt64; }BinaryenLeSInt64273,11442 +BinaryenOp BinaryenLeUInt64(void) { return LeUInt64; }BinaryenLeUInt64274,11497 +BinaryenOp BinaryenGtSInt64(void) { return GtSInt64; }BinaryenGtSInt64275,11552 +BinaryenOp BinaryenGtUInt64(void) { return GtUInt64; }BinaryenGtUInt64276,11607 +BinaryenOp BinaryenGeSInt64(void) { return GeSInt64; }BinaryenGeSInt64277,11662 +BinaryenOp BinaryenGeUInt64(void) { return GeUInt64; }BinaryenGeUInt64278,11717 +BinaryenOp BinaryenAddFloat32(void) { return AddFloat32; }BinaryenAddFloat32279,11772 +BinaryenOp BinaryenSubFloat32(void) { return SubFloat32; }BinaryenSubFloat32280,11831 +BinaryenOp BinaryenMulFloat32(void) { return MulFloat32; }BinaryenMulFloat32281,11890 +BinaryenOp BinaryenDivFloat32(void) { return DivFloat32; }BinaryenDivFloat32282,11949 +BinaryenOp BinaryenCopySignFloat32(void) { return CopySignFloat32; }BinaryenCopySignFloat32283,12008 +BinaryenOp BinaryenMinFloat32(void) { return MinFloat32; }BinaryenMinFloat32284,12077 +BinaryenOp BinaryenMaxFloat32(void) { return MaxFloat32; }BinaryenMaxFloat32285,12136 +BinaryenOp BinaryenEqFloat32(void) { return EqFloat32; }BinaryenEqFloat32286,12195 +BinaryenOp BinaryenNeFloat32(void) { return NeFloat32; }BinaryenNeFloat32287,12252 +BinaryenOp BinaryenLtFloat32(void) { return LtFloat32; }BinaryenLtFloat32288,12309 +BinaryenOp BinaryenLeFloat32(void) { return LeFloat32; }BinaryenLeFloat32289,12366 +BinaryenOp BinaryenGtFloat32(void) { return GtFloat32; }BinaryenGtFloat32290,12423 +BinaryenOp BinaryenGeFloat32(void) { return GeFloat32; }BinaryenGeFloat32291,12480 +BinaryenOp BinaryenAddFloat64(void) { return AddFloat64; }BinaryenAddFloat64292,12537 +BinaryenOp BinaryenSubFloat64(void) { return SubFloat64; }BinaryenSubFloat64293,12596 +BinaryenOp BinaryenMulFloat64(void) { return MulFloat64; }BinaryenMulFloat64294,12655 +BinaryenOp BinaryenDivFloat64(void) { return DivFloat64; }BinaryenDivFloat64295,12714 +BinaryenOp BinaryenCopySignFloat64(void) { return CopySignFloat64; }BinaryenCopySignFloat64296,12773 +BinaryenOp BinaryenMinFloat64(void) { return MinFloat64; }BinaryenMinFloat64297,12842 +BinaryenOp BinaryenMaxFloat64(void) { return MaxFloat64; }BinaryenMaxFloat64298,12901 +BinaryenOp BinaryenEqFloat64(void) { return EqFloat64; }BinaryenEqFloat64299,12960 +BinaryenOp BinaryenNeFloat64(void) { return NeFloat64; }BinaryenNeFloat64300,13017 +BinaryenOp BinaryenLtFloat64(void) { return LtFloat64; }BinaryenLtFloat64301,13074 +BinaryenOp BinaryenLeFloat64(void) { return LeFloat64; }BinaryenLeFloat64302,13131 +BinaryenOp BinaryenGtFloat64(void) { return GtFloat64; }BinaryenGtFloat64303,13188 +BinaryenOp BinaryenGeFloat64(void) { return GeFloat64; }BinaryenGeFloat64304,13245 +BinaryenOp BinaryenPageSize(void) { return PageSize; }BinaryenPageSize305,13302 +BinaryenOp BinaryenCurrentMemory(void) { return CurrentMemory; }BinaryenCurrentMemory306,13357 +BinaryenOp BinaryenGrowMemory(void) { return GrowMemory; }BinaryenGrowMemory307,13422 +BinaryenOp BinaryenHasFeature(void) { return HasFeature; }BinaryenHasFeature308,13481 +BinaryenExpressionRef BinaryenBlock(BinaryenModuleRef module, const char* name, BinaryenExpressiBinaryenBlock310,13541 +BinaryenExpressionRef BinaryenIf(BinaryenModuleRef module, BinaryenExpressionRef condition, BinaBinaryenIf340,14794 +BinaryenExpressionRef BinaryenLoop(BinaryenModuleRef module, const char* name, BinaryenExpressioBinaryenLoop354,15457 +BinaryenExpressionRef BinaryenBreak(BinaryenModuleRef module, const char* name, BinaryenExpressiBinaryenBreak366,15937 +BinaryenExpressionRef BinaryenSwitch(BinaryenModuleRef module, const char **names, BinaryenIndexBinaryenSwitch376,16475 +BinaryenExpressionRef BinaryenCall(BinaryenModuleRef module, const char *target, BinaryenExpressBinaryenCall402,17649 +BinaryenExpressionRef BinaryenCallImport(BinaryenModuleRef module, const char *target, BinaryenEBinaryenCallImport427,18739 +BinaryenExpressionRef BinaryenCallIndirect(BinaryenModuleRef module, BinaryenExpressionRef targeBinaryenCallIndirect452,19847 +BinaryenExpressionRef BinaryenGetLocal(BinaryenModuleRef module, BinaryenIndex index, BinaryenTyBinaryenGetLocal478,21045 +BinaryenExpressionRef BinaryenSetLocal(BinaryenModuleRef module, BinaryenIndex index, BinaryenExBinaryenSetLocal491,21500 +BinaryenExpressionRef BinaryenTeeLocal(BinaryenModuleRef module, BinaryenIndex index, BinaryenExBinaryenTeeLocal505,22019 +BinaryenExpressionRef BinaryenGetGlobal(BinaryenModuleRef module, const char *name, BinaryenTypeBinaryenGetGlobal519,22537 +BinaryenExpressionRef BinaryenSetGlobal(BinaryenModuleRef module, const char *name, BinaryenExprBinaryenSetGlobal532,22993 +BinaryenExpressionRef BinaryenLoad(BinaryenModuleRef module, uint32_t bytes, int8_t signed_, uinBinaryenLoad545,23491 +BinaryenExpressionRef BinaryenStore(BinaryenModuleRef module, uint32_t bytes, uint32_t offset, uBinaryenStore562,24226 +BinaryenExpressionRef BinaryenConst(BinaryenModuleRef module, BinaryenLiteral value) {BinaryenConst579,25008 +BinaryenExpressionRef BinaryenUnary(BinaryenModuleRef module, BinaryenOp op, BinaryenExpressionRBinaryenUnary605,26197 +BinaryenExpressionRef BinaryenBinary(BinaryenModuleRef module, BinaryenOp op, BinaryenExpressionBinaryenBinary615,26627 +BinaryenExpressionRef BinaryenSelect(BinaryenModuleRef module, BinaryenExpressionRef condition, BinaryenSelect625,27150 +BinaryenExpressionRef BinaryenDrop(BinaryenModuleRef module, BinaryenExpressionRef value) {BinaryenDrop639,27823 +BinaryenExpressionRef BinaryenReturn(BinaryenModuleRef module, BinaryenExpressionRef value) {BinaryenReturn651,28248 +BinaryenExpressionRef BinaryenHost(BinaryenModuleRef module, BinaryenOp op, const char* name, BiBinaryenHost661,28639 +BinaryenExpressionRef BinaryenNop(BinaryenModuleRef module) {BinaryenNop675,29146 +BinaryenExpressionRef BinaryenUnreachable(BinaryenModuleRef module) {BinaryenUnreachable685,29442 +void BinaryenExpressionPrint(BinaryenExpressionRef expr) {BinaryenExpressionPrint696,29763 +BinaryenFunctionRef BinaryenAddFunction(BinaryenModuleRef module, const char* name, BinaryenFuncBinaryenAddFunction707,30035 +BinaryenImportRef BinaryenAddGlobal(BinaryenModuleRef module, const char* name, BinaryenType typBinaryenAddGlobal746,31541 +BinaryenImportRef BinaryenAddImport(BinaryenModuleRef module, const char* internalName, const chBinaryenAddImport763,32078 +void BinaryenRemoveImport(BinaryenModuleRef module, const char* internalName) {BinaryenRemoveImport779,32763 +BinaryenExportRef BinaryenAddExport(BinaryenModuleRef module, const char* internalName, const chBinaryenAddExport790,33034 +void BinaryenRemoveExport(BinaryenModuleRef module, const char* externalName) {BinaryenRemoveExport803,33441 +void BinaryenSetFunctionTable(BinaryenModuleRef module, BinaryenFunctionRef* funcs, BinaryenIndeBinaryenSetFunctionTable814,33735 +void BinaryenSetMemory(BinaryenModuleRef module, BinaryenIndex initial, BinaryenIndex maximum, cBinaryenSetMemory840,34737 +void BinaryenSetStart(BinaryenModuleRef module, BinaryenFunctionRef start) {BinaryenSetStart896,37153 +BinaryenModuleRef BinaryenModuleParse(const char* text) {BinaryenModuleParse909,37474 +void BinaryenModulePrint(BinaryenModuleRef module) {BinaryenModulePrint926,37899 +int BinaryenModuleValidate(BinaryenModuleRef module) {BinaryenModuleValidate934,38079 +void BinaryenModuleOptimize(BinaryenModuleRef module) {BinaryenModuleOptimize943,38303 +void BinaryenModuleAutoDrop(BinaryenModuleRef module) {BinaryenModuleAutoDrop954,38574 +size_t BinaryenModuleWrite(BinaryenModuleRef module, char* output, size_t outputSize) {BinaryenModuleWrite965,38830 +BinaryenModuleRef BinaryenModuleRead(char* input, size_t inputSize) {BinaryenModuleRead979,39246 +void BinaryenModuleInterpret(BinaryenModuleRef module) {BinaryenModuleInterpret998,39726 +RelooperRef RelooperCreate(void) {RelooperCreate1012,40032 +RelooperBlockRef RelooperAddBlock(RelooperRef relooper, BinaryenExpressionRef code) {RelooperAddBlock1020,40192 +void RelooperAddBranch(RelooperBlockRef from, RelooperBlockRef to, BinaryenExpressionRef conditiRelooperAddBranch1034,40634 +RelooperBlockRef RelooperAddBlockWithSwitch(RelooperRef relooper, BinaryenExpressionRef code, BiRelooperAddBlockWithSwitch1044,41167 +void RelooperAddBranchForSwitch(RelooperBlockRef from, RelooperBlockRef to, BinaryenIndex* indexRelooperAddBranchForSwitch1056,41683 +BinaryenExpressionRef RelooperRenderAndDispose(RelooperRef relooper, RelooperBlockRef entry, BinRelooperRenderAndDispose1079,42715 +void BinaryenSetAPITracing(int on) {BinaryenSetAPITracing1099,43389 +BinaryenFunctionTypeRef BinaryenGetFunctionTypeBySignature(BinaryenModuleRef module, BinaryenTypBinaryenGetFunctionTypeBySignature1124,44210 + +externals/binaryen/src/wasm-io.h,1042 +#define wasm_wasm_io_hwasm_wasm_io_h22,722 +namespace wasm {wasm27,786 +class ModuleIO {ModuleIO29,804 + bool debug = false;debug31,832 + void setDebug(bool debug_) { debug = debug_; }setDebug34,863 +class ModuleReader : public ModuleIO {ModuleReader37,916 +class ModuleWriter : public ModuleIO {ModuleWriter47,1219 + bool binary = true;binary48,1258 + bool debugInfo = false;debugInfo49,1280 + std::string symbolMap;symbolMap50,1306 + std::string sourceMapFilename;sourceMapFilename51,1331 + std::string sourceMapUrl;sourceMapUrl52,1364 + void setBinary(bool binary_) { binary = binary_; }setBinary55,1401 + void setDebugInfo(bool debugInfo_) { debugInfo = debugInfo_; }setDebugInfo56,1454 + void setSymbolMap(std::string symbolMap_) { symbolMap = symbolMap_; }setSymbolMap57,1519 + void setSourceMapFilename(std::string sourceMapFilename_) { sourceMapFilename = sourceMapFilensetSourceMapFilename58,1591 + void setSourceMapUrl(std::string sourceMapUrl_) { sourceMapUrl = sourceMapUrl_; }setSourceMapUrl59,1695 + +externals/binaryen/src/wasm.h,25760 +#define wasm_wasm_hwasm_wasm_h44,1561 +namespace wasm {wasm57,1770 +typedef uint32_t Index;Index60,1817 +struct Address {Address63,1894 + typedef uint32_t address_t;address_t64,1911 + address_t addr;addr65,1941 + Address() : addr(0) {}Address66,1959 + Address(uint64_t a) : addr(static_cast(a)) {Address67,1984 + Address& operator=(uint64_t a) {operator =70,2108 + Address& operator++() { ++addr; return *this; }operator ++76,2311 +typedef int32_t Offset;Offset80,2390 +enum UnaryOp {UnaryOp87,2440 + ClzInt32, ClzInt64, CtzInt32, CtzInt64, PopcntInt32, PopcntInt64, // intClzInt3288,2455 + ClzInt32, ClzInt64, CtzInt32, CtzInt64, PopcntInt32, PopcntInt64, // intClzInt6488,2455 + ClzInt32, ClzInt64, CtzInt32, CtzInt64, PopcntInt32, PopcntInt64, // intCtzInt3288,2455 + ClzInt32, ClzInt64, CtzInt32, CtzInt64, PopcntInt32, PopcntInt64, // intCtzInt6488,2455 + ClzInt32, ClzInt64, CtzInt32, CtzInt64, PopcntInt32, PopcntInt64, // intPopcntInt3288,2455 + ClzInt32, ClzInt64, CtzInt32, CtzInt64, PopcntInt32, PopcntInt64, // intPopcntInt6488,2455 + NegFloat32, NegFloat64, AbsFloat32, AbsFloat64, CeilFloat32, CeilFloat64, FloorFloat32, FloorFNegFloat3289,2530 + NegFloat32, NegFloat64, AbsFloat32, AbsFloat64, CeilFloat32, CeilFloat64, FloorFloat32, FloorFNegFloat6489,2530 + NegFloat32, NegFloat64, AbsFloat32, AbsFloat64, CeilFloat32, CeilFloat64, FloorFloat32, FloorFAbsFloat3289,2530 + NegFloat32, NegFloat64, AbsFloat32, AbsFloat64, CeilFloat32, CeilFloat64, FloorFloat32, FloorFAbsFloat6489,2530 + NegFloat32, NegFloat64, AbsFloat32, AbsFloat64, CeilFloat32, CeilFloat64, FloorFloat32, FloorFCeilFloat3289,2530 + NegFloat32, NegFloat64, AbsFloat32, AbsFloat64, CeilFloat32, CeilFloat64, FloorFloat32, FloorFCeilFloat6489,2530 + NegFloat32, NegFloat64, AbsFloat32, AbsFloat64, CeilFloat32, CeilFloat64, FloorFloat32, FloorFFloorFloat3289,2530 + NegFloat32, NegFloat64, AbsFloat32, AbsFloat64, CeilFloat32, CeilFloat64, FloorFloat32, FloorFFloorFloat6489,2530 + NegFloat32, NegFloat64, AbsFloat32, AbsFloat64, CeilFloat32, CeilFloat64, FloorFloat32, FloorFTruncFloat3289,2530 + NegFloat32, NegFloat64, AbsFloat32, AbsFloat64, CeilFloat32, CeilFloat64, FloorFloat32, FloorFTruncFloat6489,2530 + NegFloat32, NegFloat64, AbsFloat32, AbsFloat64, CeilFloat32, CeilFloat64, FloorFloat32, FloorFNearestFloat3289,2530 + NegFloat32, NegFloat64, AbsFloat32, AbsFloat64, CeilFloat32, CeilFloat64, FloorFloat32, FloorFNearestFloat6489,2530 + NegFloat32, NegFloat64, AbsFloat32, AbsFloat64, CeilFloat32, CeilFloat64, FloorFloat32, FloorFSqrtFloat3289,2530 + NegFloat32, NegFloat64, AbsFloat32, AbsFloat64, CeilFloat32, CeilFloat64, FloorFloat32, FloorFSqrtFloat6489,2530 + EqZInt32, EqZInt64,EqZInt3291,2745 + EqZInt32, EqZInt64,EqZInt6491,2745 + ExtendSInt32, ExtendUInt32, // extend i32 to i64ExtendSInt3293,2784 + ExtendSInt32, ExtendUInt32, // extend i32 to i64ExtendUInt3293,2784 + WrapInt64, // i64 to i32WrapInt6494,2835 + TruncSFloat32ToInt32, TruncSFloat32ToInt64, TruncUFloat32ToInt32, TruncUFloat32ToInt64, TruncSTruncSFloat32ToInt3295,2862 + TruncSFloat32ToInt32, TruncSFloat32ToInt64, TruncUFloat32ToInt32, TruncUFloat32ToInt64, TruncSTruncSFloat32ToInt6495,2862 + TruncSFloat32ToInt32, TruncSFloat32ToInt64, TruncUFloat32ToInt32, TruncUFloat32ToInt64, TruncSTruncUFloat32ToInt3295,2862 + TruncSFloat32ToInt32, TruncSFloat32ToInt64, TruncUFloat32ToInt32, TruncUFloat32ToInt64, TruncSTruncUFloat32ToInt6495,2862 + TruncSFloat32ToInt32, TruncSFloat32ToInt64, TruncUFloat32ToInt32, TruncUFloat32ToInt64, TruncSTruncSFloat64ToInt3295,2862 + TruncSFloat32ToInt32, TruncSFloat32ToInt64, TruncUFloat32ToInt32, TruncUFloat32ToInt64, TruncSTruncSFloat64ToInt6495,2862 + TruncSFloat32ToInt32, TruncSFloat32ToInt64, TruncUFloat32ToInt32, TruncUFloat32ToInt64, TruncSTruncUFloat64ToInt3295,2862 + TruncSFloat32ToInt32, TruncSFloat32ToInt64, TruncUFloat32ToInt32, TruncUFloat32ToInt64, TruncSTruncUFloat64ToInt6495,2862 + ReinterpretFloat32, ReinterpretFloat64, // reintepret bits to intReinterpretFloat3296,3056 + ReinterpretFloat32, ReinterpretFloat64, // reintepret bits to intReinterpretFloat6496,3056 + ConvertSInt32ToFloat32, ConvertSInt32ToFloat64, ConvertUInt32ToFloat32, ConvertUInt32ToFloat64ConvertSInt32ToFloat3297,3124 + ConvertSInt32ToFloat32, ConvertSInt32ToFloat64, ConvertUInt32ToFloat32, ConvertUInt32ToFloat64ConvertSInt32ToFloat6497,3124 + ConvertSInt32ToFloat32, ConvertSInt32ToFloat64, ConvertUInt32ToFloat32, ConvertUInt32ToFloat64ConvertUInt32ToFloat3297,3124 + ConvertSInt32ToFloat32, ConvertSInt32ToFloat64, ConvertUInt32ToFloat32, ConvertUInt32ToFloat64ConvertUInt32ToFloat6497,3124 + ConvertSInt32ToFloat32, ConvertSInt32ToFloat64, ConvertUInt32ToFloat32, ConvertUInt32ToFloat64ConvertSInt64ToFloat3297,3124 + ConvertSInt32ToFloat32, ConvertSInt32ToFloat64, ConvertUInt32ToFloat32, ConvertUInt32ToFloat64ConvertSInt64ToFloat6497,3124 + ConvertSInt32ToFloat32, ConvertSInt32ToFloat64, ConvertUInt32ToFloat32, ConvertUInt32ToFloat64ConvertUInt64ToFloat3297,3124 + ConvertSInt32ToFloat32, ConvertSInt32ToFloat64, ConvertUInt32ToFloat32, ConvertUInt32ToFloat64ConvertUInt64ToFloat6497,3124 + PromoteFloat32, // f32 to f64PromoteFloat3298,3334 + DemoteFloat64, // f64 to f32DemoteFloat6499,3366 + ReinterpretInt32, ReinterpretInt64, // reinterpret bits to floatReinterpretInt32100,3397 + ReinterpretInt32, ReinterpretInt64, // reinterpret bits to floatReinterpretInt64100,3397 +enum BinaryOp {BinaryOp103,3468 + AddInt32, SubInt32, MulInt32, // int or floatAddInt32104,3484 + AddInt32, SubInt32, MulInt32, // int or floatSubInt32104,3484 + AddInt32, SubInt32, MulInt32, // int or floatMulInt32104,3484 + DivSInt32, DivUInt32, RemSInt32, RemUInt32, AndInt32, OrInt32, XorInt32, ShlInt32, ShrUInt32, DivSInt32105,3532 + DivSInt32, DivUInt32, RemSInt32, RemUInt32, AndInt32, OrInt32, XorInt32, ShlInt32, ShrUInt32, DivUInt32105,3532 + DivSInt32, DivUInt32, RemSInt32, RemUInt32, AndInt32, OrInt32, XorInt32, ShlInt32, ShrUInt32, RemSInt32105,3532 + DivSInt32, DivUInt32, RemSInt32, RemUInt32, AndInt32, OrInt32, XorInt32, ShlInt32, ShrUInt32, RemUInt32105,3532 + DivSInt32, DivUInt32, RemSInt32, RemUInt32, AndInt32, OrInt32, XorInt32, ShlInt32, ShrUInt32, AndInt32105,3532 + DivSInt32, DivUInt32, RemSInt32, RemUInt32, AndInt32, OrInt32, XorInt32, ShlInt32, ShrUInt32, OrInt32105,3532 + DivSInt32, DivUInt32, RemSInt32, RemUInt32, AndInt32, OrInt32, XorInt32, ShlInt32, ShrUInt32, XorInt32105,3532 + DivSInt32, DivUInt32, RemSInt32, RemUInt32, AndInt32, OrInt32, XorInt32, ShlInt32, ShrUInt32, ShlInt32105,3532 + DivSInt32, DivUInt32, RemSInt32, RemUInt32, AndInt32, OrInt32, XorInt32, ShlInt32, ShrUInt32, ShrUInt32105,3532 + DivSInt32, DivUInt32, RemSInt32, RemUInt32, AndInt32, OrInt32, XorInt32, ShlInt32, ShrUInt32, ShrSInt32105,3532 + DivSInt32, DivUInt32, RemSInt32, RemUInt32, AndInt32, OrInt32, XorInt32, ShlInt32, ShrUInt32, RotLInt32105,3532 + DivSInt32, DivUInt32, RemSInt32, RemUInt32, AndInt32, OrInt32, XorInt32, ShlInt32, ShrUInt32, RotRInt32105,3532 + EqInt32, NeInt32, // int or floatEqInt32107,3688 + EqInt32, NeInt32, // int or floatNeInt32107,3688 + LtSInt32, LtUInt32, LeSInt32, LeUInt32, GtSInt32, GtUInt32, GeSInt32, GeUInt32, // intLtSInt32108,3724 + LtSInt32, LtUInt32, LeSInt32, LeUInt32, GtSInt32, GtUInt32, GeSInt32, GeUInt32, // intLtUInt32108,3724 + LtSInt32, LtUInt32, LeSInt32, LeUInt32, GtSInt32, GtUInt32, GeSInt32, GeUInt32, // intLeSInt32108,3724 + LtSInt32, LtUInt32, LeSInt32, LeUInt32, GtSInt32, GtUInt32, GeSInt32, GeUInt32, // intLeUInt32108,3724 + LtSInt32, LtUInt32, LeSInt32, LeUInt32, GtSInt32, GtUInt32, GeSInt32, GeUInt32, // intGtSInt32108,3724 + LtSInt32, LtUInt32, LeSInt32, LeUInt32, GtSInt32, GtUInt32, GeSInt32, GeUInt32, // intGtUInt32108,3724 + LtSInt32, LtUInt32, LeSInt32, LeUInt32, GtSInt32, GtUInt32, GeSInt32, GeUInt32, // intGeSInt32108,3724 + LtSInt32, LtUInt32, LeSInt32, LeUInt32, GtSInt32, GtUInt32, GeSInt32, GeUInt32, // intGeUInt32108,3724 + AddInt64, SubInt64, MulInt64, // int or floatAddInt64110,3814 + AddInt64, SubInt64, MulInt64, // int or floatSubInt64110,3814 + AddInt64, SubInt64, MulInt64, // int or floatMulInt64110,3814 + DivSInt64, DivUInt64, RemSInt64, RemUInt64, AndInt64, OrInt64, XorInt64, ShlInt64, ShrUInt64, DivSInt64111,3862 + DivSInt64, DivUInt64, RemSInt64, RemUInt64, AndInt64, OrInt64, XorInt64, ShlInt64, ShrUInt64, DivUInt64111,3862 + DivSInt64, DivUInt64, RemSInt64, RemUInt64, AndInt64, OrInt64, XorInt64, ShlInt64, ShrUInt64, RemSInt64111,3862 + DivSInt64, DivUInt64, RemSInt64, RemUInt64, AndInt64, OrInt64, XorInt64, ShlInt64, ShrUInt64, RemUInt64111,3862 + DivSInt64, DivUInt64, RemSInt64, RemUInt64, AndInt64, OrInt64, XorInt64, ShlInt64, ShrUInt64, AndInt64111,3862 + DivSInt64, DivUInt64, RemSInt64, RemUInt64, AndInt64, OrInt64, XorInt64, ShlInt64, ShrUInt64, OrInt64111,3862 + DivSInt64, DivUInt64, RemSInt64, RemUInt64, AndInt64, OrInt64, XorInt64, ShlInt64, ShrUInt64, XorInt64111,3862 + DivSInt64, DivUInt64, RemSInt64, RemUInt64, AndInt64, OrInt64, XorInt64, ShlInt64, ShrUInt64, ShlInt64111,3862 + DivSInt64, DivUInt64, RemSInt64, RemUInt64, AndInt64, OrInt64, XorInt64, ShlInt64, ShrUInt64, ShrUInt64111,3862 + DivSInt64, DivUInt64, RemSInt64, RemUInt64, AndInt64, OrInt64, XorInt64, ShlInt64, ShrUInt64, ShrSInt64111,3862 + DivSInt64, DivUInt64, RemSInt64, RemUInt64, AndInt64, OrInt64, XorInt64, ShlInt64, ShrUInt64, RotLInt64111,3862 + DivSInt64, DivUInt64, RemSInt64, RemUInt64, AndInt64, OrInt64, XorInt64, ShlInt64, ShrUInt64, RotRInt64111,3862 + EqInt64, NeInt64, // int or floatEqInt64113,4018 + EqInt64, NeInt64, // int or floatNeInt64113,4018 + LtSInt64, LtUInt64, LeSInt64, LeUInt64, GtSInt64, GtUInt64, GeSInt64, GeUInt64, // intLtSInt64114,4054 + LtSInt64, LtUInt64, LeSInt64, LeUInt64, GtSInt64, GtUInt64, GeSInt64, GeUInt64, // intLtUInt64114,4054 + LtSInt64, LtUInt64, LeSInt64, LeUInt64, GtSInt64, GtUInt64, GeSInt64, GeUInt64, // intLeSInt64114,4054 + LtSInt64, LtUInt64, LeSInt64, LeUInt64, GtSInt64, GtUInt64, GeSInt64, GeUInt64, // intLeUInt64114,4054 + LtSInt64, LtUInt64, LeSInt64, LeUInt64, GtSInt64, GtUInt64, GeSInt64, GeUInt64, // intGtSInt64114,4054 + LtSInt64, LtUInt64, LeSInt64, LeUInt64, GtSInt64, GtUInt64, GeSInt64, GeUInt64, // intGtUInt64114,4054 + LtSInt64, LtUInt64, LeSInt64, LeUInt64, GtSInt64, GtUInt64, GeSInt64, GeUInt64, // intGeSInt64114,4054 + LtSInt64, LtUInt64, LeSInt64, LeUInt64, GtSInt64, GtUInt64, GeSInt64, GeUInt64, // intGeUInt64114,4054 + AddFloat32, SubFloat32, MulFloat32, // int or floatAddFloat32116,4144 + AddFloat32, SubFloat32, MulFloat32, // int or floatSubFloat32116,4144 + AddFloat32, SubFloat32, MulFloat32, // int or floatMulFloat32116,4144 + DivFloat32, CopySignFloat32, MinFloat32, MaxFloat32, // floatDivFloat32117,4198 + DivFloat32, CopySignFloat32, MinFloat32, MaxFloat32, // floatCopySignFloat32117,4198 + DivFloat32, CopySignFloat32, MinFloat32, MaxFloat32, // floatMinFloat32117,4198 + DivFloat32, CopySignFloat32, MinFloat32, MaxFloat32, // floatMaxFloat32117,4198 + EqFloat32, NeFloat32, // int or floatEqFloat32119,4282 + EqFloat32, NeFloat32, // int or floatNeFloat32119,4282 + LtFloat32, LeFloat32, GtFloat32, GeFloat32, // floatLtFloat32120,4322 + LtFloat32, LeFloat32, GtFloat32, GeFloat32, // floatLeFloat32120,4322 + LtFloat32, LeFloat32, GtFloat32, GeFloat32, // floatGtFloat32120,4322 + LtFloat32, LeFloat32, GtFloat32, GeFloat32, // floatGeFloat32120,4322 + AddFloat64, SubFloat64, MulFloat64, // int or floatAddFloat64122,4378 + AddFloat64, SubFloat64, MulFloat64, // int or floatSubFloat64122,4378 + AddFloat64, SubFloat64, MulFloat64, // int or floatMulFloat64122,4378 + DivFloat64, CopySignFloat64, MinFloat64, MaxFloat64, // floatDivFloat64123,4432 + DivFloat64, CopySignFloat64, MinFloat64, MaxFloat64, // floatCopySignFloat64123,4432 + DivFloat64, CopySignFloat64, MinFloat64, MaxFloat64, // floatMinFloat64123,4432 + DivFloat64, CopySignFloat64, MinFloat64, MaxFloat64, // floatMaxFloat64123,4432 + EqFloat64, NeFloat64, // int or floatEqFloat64125,4516 + EqFloat64, NeFloat64, // int or floatNeFloat64125,4516 + LtFloat64, LeFloat64, GtFloat64, GeFloat64, // floatLtFloat64126,4556 + LtFloat64, LeFloat64, GtFloat64, GeFloat64, // floatLeFloat64126,4556 + LtFloat64, LeFloat64, GtFloat64, GeFloat64, // floatGtFloat64126,4556 + LtFloat64, LeFloat64, GtFloat64, GeFloat64, // floatGeFloat64126,4556 +enum HostOp {HostOp129,4615 + PageSize, CurrentMemory, GrowMemory, HasFeaturePageSize130,4629 + PageSize, CurrentMemory, GrowMemory, HasFeatureCurrentMemory130,4629 + PageSize, CurrentMemory, GrowMemory, HasFeatureGrowMemory130,4629 + PageSize, CurrentMemory, GrowMemory, HasFeatureHasFeature130,4629 +class Expression {Expression153,5544 + enum Id {Id155,5571 + InvalidId = 0,InvalidId156,5583 + BlockId,BlockId157,5602 + IfId,IfId158,5615 + LoopId,LoopId159,5625 + BreakId,BreakId160,5637 + SwitchId,SwitchId161,5650 + CallId,CallId162,5664 + CallImportId,CallImportId163,5676 + CallIndirectId,CallIndirectId164,5694 + GetLocalId,GetLocalId165,5714 + SetLocalId,SetLocalId166,5730 + GetGlobalId,GetGlobalId167,5746 + SetGlobalId,SetGlobalId168,5763 + LoadId,LoadId169,5780 + StoreId,StoreId170,5792 + ConstId,ConstId171,5805 + UnaryId,UnaryId172,5818 + BinaryId,BinaryId173,5831 + SelectId,SelectId174,5845 + DropId,DropId175,5859 + ReturnId,ReturnId176,5871 + HostId,HostId177,5885 + NopId,NopId178,5897 + UnreachableId,UnreachableId179,5908 + NumExpressionIdsNumExpressionIds180,5927 + Id _id;_id182,5953 + WasmType type; // the type of the expression: its *output*, not necessarily its input(s)type184,5964 + Expression(Id id) : _id(id), type(none) {}Expression186,6056 + void finalize() {}finalize188,6102 + bool is() {is191,6144 + T* dynCast() {dynCast196,6226 + T* cast() {cast201,6332 +typedef ArenaVector ExpressionList;ExpressionList209,6475 +class SpecificExpression : public Expression {SpecificExpression212,6554 + enum {__anon769801130103214,6609 + SpecificId = SID // compile-time access to the type for the classSpecificId215,6618 + SpecificExpression() : Expression(SID) {}SpecificExpression218,6694 +class Nop : public SpecificExpression {Nop221,6742 + Nop() {}Nop223,6809 + Nop(MixedArena& allocator) {}Nop224,6820 +class Block : public SpecificExpression {Block227,6856 + Block(MixedArena& allocator) : list(allocator) {}Block229,6927 + Name name;name231,6980 + ExpressionList list;list232,6993 +class If : public SpecificExpression {If243,7397 + If() : ifFalse(nullptr) {}If245,7462 + If(MixedArena& allocator) : If() {}If246,7491 + Expression* condition;condition248,7530 + Expression* ifTrue;ifTrue249,7555 + Expression* ifFalse;ifFalse250,7577 +class Loop : public SpecificExpression {Loop261,7941 + Loop() {}Loop263,8010 + Loop(MixedArena& allocator) {}Loop264,8022 + Name name;name266,8056 + Expression* body;body267,8069 +class Break : public SpecificExpression {Break278,8430 + Break() : value(nullptr), condition(nullptr) {}Break280,8501 + Break(MixedArena& allocator) : Break() {Break281,8551 + Name name;name285,8623 + Expression* value;value286,8636 + Expression* condition;condition287,8657 +class Switch : public SpecificExpression {Switch292,8706 + Switch(MixedArena& allocator) : targets(allocator), condition(nullptr), value(nullptr) {Switch294,8779 + ArenaVector targets;targets298,8899 + Name default_;default_299,8928 + Expression* condition;condition300,8945 + Expression* value;value301,8970 +class Call : public SpecificExpression {Call306,9015 + Call(MixedArena& allocator) : operands(allocator) {}Call308,9084 + ExpressionList operands;operands310,9140 + Name target;target311,9167 +class CallImport : public SpecificExpression {CallImport316,9206 + CallImport(MixedArena& allocator) : operands(allocator) {}CallImport318,9287 + ExpressionList operands;operands320,9349 + Name target;target321,9376 +class FunctionType {FunctionType326,9415 + Name name;name328,9444 + WasmType result;result329,9457 + std::vector params;params330,9476 + FunctionType() : result(none) {}FunctionType332,9509 +class CallIndirect : public SpecificExpression {CallIndirect340,9668 + CallIndirect(MixedArena& allocator) : operands(allocator) {}CallIndirect342,9753 + ExpressionList operands;operands344,9817 + Name fullType;fullType345,9844 + Expression* target;target346,9861 +class GetLocal : public SpecificExpression {GetLocal351,9907 + GetLocal() {}GetLocal353,9984 + GetLocal(MixedArena& allocator) {}GetLocal354,10000 + Index index;index356,10038 +class SetLocal : public SpecificExpression {SetLocal359,10057 + SetLocal() {}SetLocal361,10134 + SetLocal(MixedArena& allocator) {}SetLocal362,10150 + Index index;index366,10208 + Expression* value;value367,10223 +class GetGlobal : public SpecificExpression {GetGlobal373,10289 + GetGlobal() {}GetGlobal375,10368 + GetGlobal(MixedArena& allocator) {}GetGlobal376,10385 + Name name;name378,10424 +class SetGlobal : public SpecificExpression {SetGlobal381,10441 + SetGlobal() {}SetGlobal383,10520 + SetGlobal(MixedArena& allocator) {}SetGlobal384,10537 + Name name;name386,10576 + Expression* value;value387,10589 +class Load : public SpecificExpression {Load392,10634 + Load() {}Load394,10703 + Load(MixedArena& allocator) {}Load395,10715 + uint8_t bytes;bytes397,10749 + bool signed_ = false;signed_398,10766 + Address offset;offset399,10793 + Address align;align400,10811 + Expression* ptr;ptr401,10828 +class Store : public SpecificExpression {Store408,10930 + Store() : valueType(none) {}Store410,11001 + Store(MixedArena& allocator) : Store() {}Store411,11032 + uint8_t bytes;bytes413,11077 + Address offset;offset414,11094 + Address align;align415,11112 + Expression* ptr;ptr416,11129 + Expression* value;value417,11148 + WasmType valueType; // the store never returns a valuevalueType418,11169 +class Const : public SpecificExpression {Const423,11250 + Const() {}Const425,11321 + Const(MixedArena& allocator) {}Const426,11334 + Literal value;value428,11369 +class Unary : public SpecificExpression {Unary433,11421 + Unary() {}Unary435,11492 + Unary(MixedArena& allocator) {}Unary436,11505 + UnaryOp op;op438,11540 + Expression* value;value439,11554 +class Binary : public SpecificExpression {Binary446,11623 + Binary() {}Binary448,11696 + Binary(MixedArena& allocator) {}Binary449,11710 + BinaryOp op;op451,11746 + Expression* left;left452,11761 + Expression* right;right453,11781 +class Select : public SpecificExpression {Select463,11929 + Select() {}Select465,12002 + Select(MixedArena& allocator) {}Select466,12016 + Expression* ifTrue;ifTrue468,12052 + Expression* ifFalse;ifFalse469,12074 + Expression* condition;condition470,12097 +class Drop : public SpecificExpression {Drop475,12146 + Drop() {}Drop477,12215 + Drop(MixedArena& allocator) {}Drop478,12227 + Expression* value;value480,12261 +class Return : public SpecificExpression {Return485,12306 + Return() : value(nullptr) {Return487,12379 + Return(MixedArena& allocator) : Return() {}Return490,12437 + Expression* value;value492,12484 +class Host : public SpecificExpression {Host495,12509 + Host(MixedArena& allocator) : operands(allocator) {}Host497,12578 + HostOp op;op499,12634 + Name nameOperand;nameOperand500,12647 + ExpressionList operands;operands501,12667 +class Unreachable : public SpecificExpression {Unreachable506,12718 + Unreachable() {Unreachable508,12801 + Unreachable(MixedArena& allocator) : Unreachable() {}Unreachable511,12847 +class Function {Function516,12919 + Name name;name518,12944 + WasmType result;result519,12957 + std::vector params; // function locals areparams520,12976 + std::vector vars; // params plus varsvars521,13031 + Name type; // if null, it is implicit in params and resulttype522,13083 + Expression* body;body523,13144 + std::vector localNames;localNames526,13203 + std::map localIndices;localIndices527,13235 + struct DebugLocation {DebugLocation529,13274 + uint32_t fileIndex, lineNumber, columnNumber;fileIndex530,13299 + uint32_t fileIndex, lineNumber, columnNumber;lineNumber530,13299 + uint32_t fileIndex, lineNumber, columnNumber;columnNumber530,13299 + bool operator==(const DebugLocation& other) const { return fileIndex == other.fileIndex && loperator ==531,13349 + bool operator!=(const DebugLocation& other) const { return !(*this == other); }operator !=532,13516 + std::unordered_map debugLocations;debugLocations534,13605 + Function() : result(none) {}Function536,13671 +enum class ExternalKind {ExternalKind556,14065 + Function = 0,Function557,14091 + Table = 1,Table558,14107 + Memory = 2,Memory559,14120 + Global = 3Global560,14134 +class Import {Import563,14151 + Import() : globalType(none) {}Import565,14174 + Name name, module, base; // name = module.basename567,14208 + Name name, module, base; // name = module.basemodule567,14208 + Name name, module, base; // name = module.basebase567,14208 + ExternalKind kind;kind568,14257 + Name functionType; // for Function importsfunctionType569,14278 + WasmType globalType; // for Global importsglobalType570,14323 +class Export {Export573,14372 + Name name; // exported name - note that this is the key, as the internal name is non-unique (name575,14395 + Name value; // internal namevalue576,14551 + ExternalKind kind;kind577,14582 +class Table {Table580,14607 + static const Address::address_t kPageSize = 1;kPageSize582,14629 + static const Index kMaxSize = Index(-1);kMaxSize583,14678 + struct Segment {Segment585,14722 + Expression* offset;offset586,14741 + std::vector data;data587,14765 + Segment() {}Segment588,14793 + Segment(Expression* offset) : offset(offset) {Segment589,14810 + Segment(Expression* offset, std::vector& init) : offset(offset) {Segment591,14867 + bool exists;exists598,15160 + bool imported;imported599,15175 + Name name;name600,15192 + Address initial, max;initial601,15205 + Address initial, max;max601,15205 + std::vector segments;segments602,15229 + Table() : exists(false), imported(false), initial(0), max(kMaxSize) {Table604,15263 +class Memory {Memory609,15372 + static const Address::address_t kPageSize = 64 * 1024;kPageSize611,15395 + static const Address::address_t kMaxSize = ~Address::address_t(0) / kPageSize;kMaxSize612,15452 + static const Address::address_t kPageMask = ~(kPageSize - 1);kPageMask613,15533 + struct Segment {Segment615,15598 + Expression* offset;offset616,15617 + std::vector data; // TODO: optimizedata617,15641 + Segment() {}Segment618,15687 + Segment(Expression* offset, const char* init, Address size) : offset(offset) {Segment619,15704 + Segment(Expression* offset, std::vector& init) : offset(offset) {Segment623,15863 + Name name;name628,15974 + Address initial, max; // sizes are in pagesinitial629,15987 + Address initial, max; // sizes are in pagesmax629,15987 + std::vector segments;segments630,16033 + bool exists;exists633,16094 + bool imported;imported634,16109 + Memory() : initial(0), max(kMaxSize), exists(false), imported(false) {Memory636,16127 +class Global {Global641,16237 + Name name;name643,16260 + WasmType type;type644,16273 + Expression* init;init645,16290 + bool mutable_;mutable_646,16310 +class UserSection {UserSection651,16477 + std::string name;name653,16505 + std::vector data;data654,16525 +class Module {Module657,16555 + std::vector> functionTypes;functionTypes660,16713 + std::vector> imports;imports661,16773 + std::vector> exports;exports662,16821 + std::vector> functions;functions663,16869 + std::vector> globals;globals664,16921 + Table table;table666,16970 + Memory memory;memory667,16985 + Name start;start668,17002 + std::vector userSections;userSections670,17017 + std::vector debugInfoFileNames;debugInfoFileNames671,17058 + MixedArena allocator;allocator673,17106 + std::map functionTypesMap;functionTypesMap677,17238 + std::map importsMap;importsMap678,17288 + std::map exportsMap; // exports map is by the *exported* name, which is uniqueexportsMap679,17326 + std::map functionsMap;functionsMap680,17422 + std::map globalsMap;globalsMap681,17464 + Module() {};Module684,17511 +namespace std {std715,18270 +template<> struct hash {hash716,18286 + size_t operator()(const wasm::Address a) const {operator ()717,18326 + +externals/binaryen/src/wasm-type.h,300 +#define wasm_wasm_type_hwasm_wasm_type_h18,650 +namespace wasm {wasm20,676 +enum WasmType {WasmType22,694 + none,none23,710 + i32,i3224,718 + i64,i6425,725 + f32,f3226,732 + f64,f6427,739 + unreachable // none means no type, e.g. a block can have no return type. butunreachable28,746 + +externals/binaryen/src/cfg/CMakeLists.txt,80 +SET(cfg_SOURCEScfg_SOURCES1,0 +ADD_LIBRARY(cfg STATIC ${cfg_SOURCES})cfg4,33 + +externals/binaryen/src/cfg/Relooper.cpp,4060 +namespace CFG {CFG29,786 +template static bool contains(const T& container, const U& contained) {contains31,803 +#define DebugDump(DebugDump37,1007 +#define PrintDebug(PrintDebug39,1071 +#define DebugDump(DebugDump40,1098 +static wasm::Expression* HandleFollowupMultiples(wasm::Expression* Ret, Shape* Parent, RelooperBHandleFollowupMultiples45,1156 +Branch::Branch(wasm::Expression* ConditionInit, wasm::Expression* CodeInit) : Ancestor(nullptr),Branch101,3189 +Branch::Branch(std::vector&& ValuesInit, wasm::Expression* CodeInit) : Ancestor(nulBranch103,3331 +wasm::Expression* Branch::Render(RelooperBuilder& Builder, Block *Target, bool SetLabel) {Render110,3599 +Block::Block(wasm::Expression* CodeInit, wasm::Expression* SwitchConditionInit) : Parent(nullptrBlock126,4096 +Block::~Block() {~Block128,4291 +void Block::AddBranchTo(Block *Target, wasm::Expression* Condition, wasm::Expression* Code) {AddBranchTo137,4582 +void Block::AddSwitchBranchTo(Block *Target, std::vector&& Values, wasm::ExpressionAddSwitchBranchTo142,4834 +wasm::Expression* Block::Render(RelooperBuilder& Builder, bool InLoop) {Render147,5106 +wasm::Expression* SimpleShape::Render(RelooperBuilder& Builder, bool InLoop) {Render372,14073 +wasm::Expression* MultipleShape::Render(RelooperBuilder& Builder, bool InLoop) {Render384,14381 +wasm::Expression* LoopShape::Render(RelooperBuilder& Builder, bool InLoop) {Render418,15368 +Relooper::Relooper() : Root(nullptr), MinSize(false), BlockIdCounter(1), ShapeIdCounter(0) { // Relooper429,15730 +Relooper::~Relooper() {~Relooper432,15866 +void Relooper::AddBlock(Block *New, int Id) {AddBlock437,16023 +struct RelooperRecursor {RelooperRecursor442,16143 + Relooper *Parent;Parent443,16169 + RelooperRecursor(Relooper *ParentInit) : Parent(ParentInit) {}RelooperRecursor444,16189 +typedef std::list BlockList;BlockList447,16258 +void Relooper::Calculate(Block *Entry) {Calculate449,16296 + struct PreOptimizer : public RelooperRecursor {PreOptimizer451,16370 + PreOptimizer(Relooper *Parent) : RelooperRecursor(Parent) {}PreOptimizer452,16420 + BlockSet Live;Live453,16485 + void FindLive(Block *Root) {FindLive455,16505 + struct Analyzer : public RelooperRecursor {Analyzer483,17429 + Analyzer(Relooper *Parent) : RelooperRecursor(Parent) {}Analyzer484,17475 + void Notice(Shape *New) {Notice487,17607 + void GetBlocksOut(Block *Source, BlockSet& Entries, BlockSet *LimitTo = nullptr) {GetBlocksOut494,17837 + void Solipsize(Block *Target, Branch::FlowType Type, Shape *Ancestor, BlockSet &From) {Solipsize503,18226 + Shape *MakeSimple(BlockSet &Blocks, Block *Inner, BlockSet &NextEntries) {MakeSimple524,19105 + Shape *MakeLoop(BlockSet &Blocks, BlockSet& Entries, BlockSet &NextEntries) {MakeLoop542,19758 + void FindIndependentGroups(BlockSet &Entries, BlockBlockSetMap& IndependentGroups, BlockSet FindIndependentGroups659,24794 + typedef std::map BlockBlockMap;BlockBlockMap660,24911 + struct HelperClass {HelperClass662,24966 + BlockBlockSetMap& IndependentGroups;IndependentGroups663,24993 + BlockBlockMap Ownership; // For each block, which entry it belongs to. We have reached iOwnership664,25038 + HelperClass(BlockBlockSetMap& IndependentGroupsInit) : IndependentGroups(IndependentGrouHelperClass666,25149 + void InvalidateWithChildren(Block *New) { // TODO: rename NewInvalidateWithChildren667,25256 + Shape *MakeMultiple(BlockSet &Blocks, BlockSet& Entries, BlockBlockSetMap& IndependentGroupsMakeMultiple775,30272 + Shape *Process(BlockSet &Blocks, BlockSet& InitialEntries) {Process825,32817 + #define Make(Make833,33114 +wasm::Expression* Relooper::Render(RelooperBuilder& Builder) {Render973,39516 +void Debugging::Dump(BlockSet &Blocks, const char *prefix) {Dump984,39820 +void Debugging::Dump(Shape *S, const char *prefix) {Dump997,40310 +static void PrintDebug(const char *Format, ...) {PrintDebug1018,40935 + +externals/binaryen/src/cfg/Relooper.h,6277 +namespace CFG {CFG39,1386 +class RelooperBuilder : public wasm::Builder {RelooperBuilder41,1403 + wasm::Index labelHelper;labelHelper42,1450 + RelooperBuilder(wasm::Module& wasm, wasm::Index labelHelper) : wasm::Builder(wasm), labelHelpeRelooperBuilder45,1486 + wasm::GetLocal* makeGetLabel() {makeGetLabel47,1601 + wasm::SetLocal* makeSetLabel(wasm::Index value) {makeSetLabel50,1689 + wasm::Binary* makeCheckLabel(wasm::Index value) {makeCheckLabel53,1825 + wasm::Break* makeBlockBreak(int id) {makeBlockBreak58,2069 + wasm::Break* makeShapeContinue(int id) {makeShapeContinue63,2314 + wasm::Name getBlockBreakName(int id) {getBlockBreakName67,2425 + wasm::Name getShapeContinueName(int id) {getShapeContinueName70,2548 +struct Branch {Branch79,2762 + enum FlowType {FlowType80,2778 + Direct = 0, // We will directly reach the right location through other means, no need for Direct81,2796 + Break = 1,Break82,2910 + Continue = 2Continue83,2925 + Shape *Ancestor; // If not NULL, this shape is the relevant one for purposes of getting to theAncestor85,2947 + Branch::FlowType Type; // If Ancestor is not NULL, this says whether to break or continueType86,3085 + wasm::Expression* Condition;Condition90,3423 + std::unique_ptr> SwitchValues; // switches are rare, so have just a pSwitchValues91,3454 + wasm::Expression* Code; // If provided, code that is run right before the branch is taken. ThiCode93,3563 +struct InsertOrderedSetInsertOrderedSet107,4136 + std::map::iterator> Map;Map109,4162 + std::list List;List110,4215 + typedef typename std::list::iterator iterator;iterator112,4270 + iterator begin() { return List.begin(); }begin113,4322 + iterator end() { return List.end(); }end114,4366 + void erase(const T& val) {erase116,4407 + void erase(iterator position) {erase124,4554 + void insert(const T& val) {insert130,4693 + size_t size() const { return Map.size(); }size138,4870 + void clear() {clear140,4916 + size_t count(const T& val) const { return Map.count(val); }count145,4973 + InsertOrderedSet() {}InsertOrderedSet147,5036 + InsertOrderedSet(const InsertOrderedSet& other) {InsertOrderedSet148,5060 + InsertOrderedSet& operator=(const InsertOrderedSet& other) {operator =151,5135 +struct InsertOrderedMapInsertOrderedMap164,5527 + std::map>::iterator> Map;Map166,5553 + std::list> List;List167,5622 + T& operator[](const Key& k) {operator []169,5693 + typedef typename std::list>::iterator iterator;iterator180,5960 + iterator begin() { return List.begin(); }begin181,6027 + iterator end() { return List.end(); }end182,6071 + void erase(const Key& k) {erase184,6112 + void erase(iterator position) {erase192,6257 + size_t size() const { return Map.size(); }size196,6324 + size_t count(const Key& k) const { return Map.count(k); }count197,6369 + InsertOrderedMap() {}InsertOrderedMap199,6430 + InsertOrderedMap(InsertOrderedMap& other) {InsertOrderedMap200,6454 + InsertOrderedMap& operator=(const InsertOrderedMap& other) {operator =203,6550 +typedef InsertOrderedSet BlockSet;BlockSet209,6668 +typedef InsertOrderedMap BlockBranchMap;BlockBranchMap210,6711 +struct Block {Block214,6896 + BlockBranchMap BranchesOut;BranchesOut220,7272 + BlockSet BranchesIn;BranchesIn221,7302 + BlockBranchMap ProcessedBranchesOut;ProcessedBranchesOut222,7325 + BlockSet ProcessedBranchesIn;ProcessedBranchesIn223,7364 + Shape *Parent; // The shape we are directly insideParent224,7396 + int Id; // A unique identifier, defined when added to relooperId225,7449 + wasm::Expression* Code; // The code in this block. This can be arbitrary wasm code, including Code226,7514 + wasm::Expression* SwitchCondition; // If nullptr, then this block ends in ifs (or nothing). otSwitchCondition227,7674 + bool IsCheckedMultipleEntry; // If true, we are a multiple entry, so reaching us requires settIsCheckedMultipleEntry228,7831 +struct Shape {Shape268,9737 + int Id; // A unique identifier. Used to identify loops, labels are Lx where x is the Id. DefinId269,9752 + Shape *Next; // The shape that will appear in the code right after this oneNext270,9874 + Shape *Natural; // The shape that control flow gets to naturally (if there is Next, then this Natural271,9952 + enum ShapeType {ShapeType273,10058 + Simple,Simple274,10077 + Multiple,Multiple275,10089 + LoopLoop276,10103 + ShapeType Type;Type278,10117 + Shape(ShapeType TypeInit) : Id(-1), Next(NULL), Type(TypeInit) {}Shape280,10136 + virtual ~Shape() {}~Shape281,10204 + static SimpleShape *IsSimple(Shape *It) { return It && It->Type == Simple ? (SimpleShape*)It :IsSimple285,10307 + static MultipleShape *IsMultiple(Shape *It) { return It && It->Type == Multiple ? (MultipleShaIsMultiple286,10412 + static LoopShape *IsLoop(Shape *It) { return It && It->Type == Loop ? (LoopShape*)It : NULL; }IsLoop287,10525 +struct SimpleShape : public Shape {SimpleShape290,10626 + Block *Inner;Inner291,10662 + SimpleShape() : Shape(Simple), Inner(NULL) {}SimpleShape293,10679 +typedef std::map IdShapeMap;IdShapeMap297,10807 +struct MultipleShape : public Shape {MultipleShape299,10850 + IdShapeMap InnerMap; // entry block ID -> shapeInnerMap300,10888 + MultipleShape() : Shape(Multiple) {}MultipleShape302,10939 +struct LoopShape : public Shape {LoopShape307,11059 + Shape *Inner;Inner308,11093 + BlockSet Entries; // we must visit at least one of theseEntries310,11110 + LoopShape() : Shape(Loop), Inner(NULL) {}LoopShape312,11170 +struct Relooper {Relooper327,11715 + std::deque Blocks;Blocks328,11733 + std::deque Shapes;Shapes329,11762 + Shape *Root;Root330,11791 + bool MinSize;MinSize331,11806 + int BlockIdCounter;BlockIdCounter332,11822 + int ShapeIdCounter;ShapeIdCounter333,11844 + void SetMinSize(bool MinSize_) { MinSize = MinSize_; }SetMinSize347,12115 +typedef InsertOrderedMap BlockBlockSetMap;BlockBlockSetMap350,12176 +struct Debugging {Debugging353,12260 + +externals/binaryen/src/cfg/cfg-traversal.h,2931 +#define cfg_traversal_hcfg_traversal_h31,1172 +namespace wasm {wasm36,1244 +struct CFGWalker : public ControlFlowWalker {CFGWalker39,1330 + struct BasicBlock {BasicBlock43,1422 + Contents contents; // custom contentscontents44,1444 + std::vector out, in;out45,1486 + std::vector out, in;in45,1486 + BasicBlock* entry; // the entry blockentry48,1530 + BasicBlock* makeBasicBlock() { // override this with code to create a BasicBlock if necessarymakeBasicBlock50,1571 + std::vector> basicBlocks; // all the blocksbasicBlocks56,1724 + std::vector loopTops; // blocks that are the tops of loops, i.e., have backedges loopTops57,1798 + BasicBlock* currBasicBlock; // the current block in play during traversal. can be nullptr if ucurrBasicBlock60,1924 + std::map> branches; // a block or loop => its branchesbranches64,2325 + std::vector ifStack;ifStack65,2420 + std::vector loopStack;loopStack66,2456 + void startBasicBlock() {startBasicBlock68,2495 + void startUnreachableBlock() {startUnreachableBlock73,2638 + static void doStartUnreachableBlock(SubType* self, Expression** currp) {doStartUnreachableBlock77,2706 + void link(BasicBlock* from, BasicBlock* to) {link81,2821 + static void doEndBlock(SubType* self, Expression** currp) {doEndBlock87,3004 + static void doStartIfTrue(SubType* self, Expression** currp) {doStartIfTrue105,3642 + static void doStartIfFalse(SubType* self, Expression** currp) {doStartIfFalse112,3900 + static void doEndIf(SubType* self, Expression** currp) {doEndIf118,4180 + static void doStartLoop(SubType* self, Expression** currp) {doStartLoop133,4828 + static void doEndLoop(SubType* self, Expression** currp) {doEndLoop141,5182 + static void doEndBreak(SubType* self, Expression** currp) {doEndBreak158,5730 + static void doEndSwitch(SubType* self, Expression** currp) {doEndSwitch170,6176 + static void scan(SubType* self, Expression** currp) {scan185,6804 + void doWalkFunction(Function* func) {doWalkFunction239,8420 + std::unordered_set findLiveBlocks() {findLiveBlocks251,8730 + void unlinkDeadBlocks(std::unordered_set alive) {unlinkDeadBlocks267,9158 + block->in.erase(std::remove_if(block->in.begin(), block->in.end(), [&alive](BasicBlock* ot__anona8601b2b0102274,9381 + block->out.erase(std::remove_if(block->out.begin(), block->out.end(), [&alive](BasicBlock*__anona8601b2b0202277,9548 + std::map debugIds;debugIds285,9827 + void generateDebugIds() {generateDebugIds287,9870 + void dumpCFG(std::string message) {dumpCFG294,10031 + void checkDuplicates(std::vector& list) {checkDuplicates318,11022 + void removeLink(std::vector& list, BasicBlock* toRemove) {removeLink326,11230 + +externals/binaryen/src/assert_throw.h,89 +#define ASSERT_THROW(ASSERT_THROW3,22 +#define ASSERT_TERMINATE(ASSERT_TERMINATE5,123 + +externals/binaryen/src/pretty_printing.h,765 +#define wasm_pretty_printing_hwasm_pretty_printing_h22,690 +inline std::ostream &doIndent(std::ostream &o, unsigned indent) {doIndent28,771 +inline std::ostream &prepareMajorColor(std::ostream &o) {prepareMajorColor35,912 +inline std::ostream &prepareColor(std::ostream &o) {prepareColor41,1022 +inline std::ostream &prepareMinorColor(std::ostream &o) {prepareMinorColor47,1131 +inline std::ostream &restoreNormalColor(std::ostream &o) {restoreNormalColor52,1225 +inline std::ostream& printText(std::ostream &o, const char *str) {printText57,1320 +inline std::ostream& printOpening(std::ostream &o, const char *str, bool major=false) {printOpening65,1474 +inline std::ostream& printMinorOpening(std::ostream &o, const char *str) {printMinorOpening73,1676 + +externals/binaryen/src/shared-constants.h,29 +namespace wasm {wasm21,677 + +externals/binaryen/src/binaryen-c.h,935 +#define wasm_binaryen_c_hwasm_binaryen_c_h45,1697 +typedef uint32_t BinaryenIndex;BinaryenIndex62,1919 +typedef uint32_t BinaryenType;BinaryenType67,2041 +typedef void* BinaryenModuleRef;BinaryenModuleRef94,3075 +typedef void* BinaryenFunctionTypeRef;BinaryenFunctionTypeRef101,3229 +struct BinaryenLiteral {BinaryenLiteral109,3590 + int32_t type;type110,3615 + union {__anon27e09ec3010a111,3631 + int32_t i32;i32112,3641 + int64_t i64;i64113,3658 + float f32;f32114,3675 + double f64;f64115,3690 +typedef int32_t BinaryenOp;BinaryenOp136,4344 +typedef void* BinaryenExpressionRef;BinaryenExpressionRef266,9206 +typedef void* BinaryenFunctionRef;BinaryenFunctionRef325,14168 +typedef void* BinaryenImportRef;BinaryenImportRef339,14978 +typedef void* BinaryenExportRef;BinaryenExportRef346,15285 +typedef void* RelooperRef;RelooperRef407,17743 +typedef void* RelooperBlockRef;RelooperBlockRef408,17770 + +externals/binaryen/src/support/archive.h,1710 +#define wasm_support_archive_hwasm_support_archive_h25,1018 +class Archive {Archive34,1135 + using Buffer = std::vector;Buffer39,1439 + struct SubBuffer {SubBuffer42,1485 + const uint8_t* data;data43,1506 + uint32_t len;len44,1531 + class Child {Child46,1554 + const Archive* parent = nullptr;parent48,1596 + const uint8_t* data = nullptr;data50,1678 + uint32_t len = 0;len51,1713 + uint16_t startOfFile = 0;startOfFile53,1784 + const ArchiveMemberHeader* getHeader() const {getHeader54,1814 + Child(){};Child60,1986 + bool operator==(const Child& other) const { return data == other.data; }operator ==67,2255 + class child_iterator {child_iterator69,2337 + Child child;child71,2388 + bool error = false; // TODO: use std::error_code instead?error72,2405 + child_iterator() {}child_iterator74,2479 + explicit child_iterator(bool error) : error(error) {}child_iterator75,2503 + child_iterator(const Child& c) : child(c) {}child_iterator76,2561 + const Child* operator->() const { return &child; }operator ->77,2610 + const Child& operator*() const { return child; }operator *78,2665 + bool operator==(const child_iterator& other) const {operator ==79,2718 + bool operator!=(const child_iterator& other) const {operator !=82,2816 + child_iterator& operator++() {operator ++85,2911 + bool hasError() const { return error; }hasError90,3036 + void setFirstRegular(const Child& c) { firstRegularData = c.data; }setFirstRegular98,3255 + Buffer& data;data99,3325 + SubBuffer symbolTable;symbolTable100,3341 + SubBuffer stringTable;stringTable101,3366 + const uint8_t* firstRegularData;firstRegularData102,3391 + +externals/binaryen/src/support/safe_integer.cpp,1111 +bool wasm::isInteger(double x) { return fmod(x, 1) == 0; }isInteger25,738 +bool wasm::isUInteger32(double x) {isUInteger3227,798 +bool wasm::isSInteger32(double x) {isSInteger3232,934 +uint32_t wasm::toUInteger32(double x) {toUInteger3237,1093 +int32_t wasm::toSInteger32(double x) {toSInteger3243,1336 +bool wasm::isUInteger64(double x) {isUInteger6451,1650 +bool wasm::isSInteger64(double x) {isSInteger6456,1786 +uint64_t wasm::toUInteger64(double x) {toUInteger6461,1945 +int64_t wasm::toSInteger64(double x) {toSInteger6467,2196 +bool wasm::isInRangeI32TruncS(int32_t i) {isInRangeI32TruncS99,3764 +bool wasm::isInRangeI64TruncS(int32_t i) {isInRangeI64TruncS104,3898 +bool wasm::isInRangeI32TruncU(int32_t i) {isInRangeI32TruncU109,4032 +bool wasm::isInRangeI64TruncU(int32_t i) {isInRangeI64TruncU114,4165 +bool wasm::isInRangeI32TruncS(int64_t i) {isInRangeI32TruncS143,5844 +bool wasm::isInRangeI32TruncU(int64_t i) {isInRangeI32TruncU149,6018 +bool wasm::isInRangeI64TruncS(int64_t i) {isInRangeI64TruncS155,6192 +bool wasm::isInRangeI64TruncU(int64_t i) {isInRangeI64TruncU161,6365 + +externals/binaryen/src/support/name.h,611 +#define wasm_support_string_hwasm_support_string_h18,655 +namespace wasm {wasm24,749 +struct Name : public cashew::IString {Name36,1411 + Name() : cashew::IString() {}Name37,1450 + Name(const char* str) : cashew::IString(str, false) {}Name38,1482 + Name(cashew::IString str) : cashew::IString(str) {}Name39,1539 + Name(const std::string& str) : cashew::IString(str.c_str(), false) {}Name40,1593 + friend std::ostream& operator<<(std::ostream& o, Name name) {operator <<42,1666 + static Name fromInt(size_t i) {fromInt47,1850 + bool hasSubstring(cashew::IString substring) {hasSubstring51,1951 + +externals/binaryen/src/support/CMakeLists.txt,102 +SET(support_SOURCESsupport_SOURCES1,0 +ADD_LIBRARY(support STATIC ${support_SOURCES})support10,123 + +externals/binaryen/src/support/file.h,507 +#define wasm_support_file_hwasm_support_file_h22,677 +namespace wasm {wasm29,781 +namespace Flags {Flags31,799 + enum BinaryOption {BinaryOption32,817 + Binary,Binary33,839 + TextText34,851 + enum DebugOption {DebugOption36,865 + Debug,Debug37,886 + ReleaseRelease38,897 +class Output {Output48,1295 + std::ostream &operator<<(const T &v) {operator <<54,1508 + std::ostream& getStream() {getStream58,1575 + std::ofstream outfile;outfile66,1738 + std::ostream out;out67,1763 + +externals/binaryen/src/support/timing.h,429 +#define wasm_support_timing_hwasm_support_timing_h22,679 +namespace wasm {wasm26,729 +class Timer {Timer28,747 + std::string name;name29,761 + std::chrono::steady_clock::time_point startTime;startTime30,781 + double total = 0;total31,832 + Timer(std::string name) : name(name) {}Timer34,861 + void start() {start36,904 + void stop() {stop40,976 + double getTotal() {getTotal44,1095 + void dump() {dump48,1140 + +externals/binaryen/src/support/utilities.h,509 +#define wasm_support_utilities_hwasm_support_utilities_h18,658 +namespace wasm {wasm30,868 +inline Destination bit_cast(const Source& source) {bit_cast35,1069 +inline bool isPowerOf2(uint32_t v) {isPowerOf245,1514 +inline size_t alignAddr(size_t address, size_t alignment) {alignAddr49,1584 +std::unique_ptr make_unique(Args&&... args)make_unique59,1906 +class Fatal {Fatal65,2104 + Fatal() {Fatal67,2127 + Fatal &operator<<(T arg) {operator <<71,2194 + WASM_NORETURN ~Fatal() {~Fatal75,2267 + +externals/binaryen/src/support/command-line.cpp,794 +#define SCREEN_WIDTH SCREEN_WIDTH22,704 +void printWrap(std::ostream& os, int leftPad, const std::string& content) {printWrap25,736 +Options::Options(const std::string& command, const std::string& description)Options46,1311 + [this, command, description](Options* o, const std::string&) {__anonfa0498d6010249,1512 + [&](Options* o, const std::string& arguments) { debug = true; });__anonfa0498d6020272,2567 +Options::~Options() {}~Options75,2642 +Options& Options::add(const std::string& longName, const std::string& shortName,add77,2666 +Options& Options::add_positional(const std::string& name, Arguments arguments,add_positional84,2966 +void Options::parse(int argc, const char* argv[]) {parse92,3201 + auto dashes = [](const std::string& s) {__anonfa0498d6030295,3358 + +externals/binaryen/src/support/threads.h,887 +#define wasm_support_threads_hwasm_support_threads_h22,683 +namespace wasm {wasm32,857 +enum class ThreadWorkState {ThreadWorkState36,966 + More,More37,995 + FinishedFinished38,1003 +class Thread {Thread47,1109 + std::unique_ptr thread;thread48,1124 + std::mutex mutex;mutex49,1163 + std::condition_variable condition;condition50,1183 + bool done = false;done51,1220 + std::function doWork = nullptr;doWork52,1241 +class ThreadPool {ThreadPool72,1612 + std::vector> threads;threads73,1631 + bool running = false;running74,1679 + std::mutex mutex;mutex75,1703 + std::condition_variable condition;condition76,1723 + std::atomic ready;ready77,1760 +class OnlyOnce {OnlyOnce113,2644 + std::atomic created;created114,2661 + OnlyOnce() {OnlyOnce117,2698 + void verify() {verify121,2740 + +externals/binaryen/src/support/colors.h,1986 +#define wasm_support_color_hwasm_support_color_h18,654 +namespace Colors {Colors22,703 +inline void normal(std::ostream& stream) { outputColorCode(stream,"\033[0m"); }normal27,851 +inline void red(std::ostream& stream) { outputColorCode(stream,"\033[31m"); }red28,931 +inline void magenta(std::ostream& stream) { outputColorCode(stream,"\033[35m"); }magenta29,1009 +inline void orange(std::ostream& stream) { outputColorCode(stream,"\033[33m"); }orange30,1091 +inline void grey(std::ostream& stream) { outputColorCode(stream,"\033[37m"); }grey31,1172 +inline void green(std::ostream& stream) { outputColorCode(stream,"\033[32m"); }green32,1251 +inline void blue(std::ostream& stream) { outputColorCode(stream,"\033[34m"); }blue33,1331 +inline void bold(std::ostream& stream) { outputColorCode(stream,"\033[1m"); }bold34,1410 +inline void normal(std::ostream& stream) { outputColorCode(stream, 0x07); }normal37,1587 +inline void red(std::ostream& stream) { outputColorCode(stream, 0x0c); }red38,1663 +inline void magenta(std::ostream& stream) { outputColorCode(stream, 0x05); }magenta39,1736 +inline void orange(std::ostream& stream) { outputColorCode(stream, 0x06); }orange40,1813 +inline void grey(std::ostream& stream) { outputColorCode(stream, 0x08); }grey41,1889 +inline void green(std::ostream& stream) { outputColorCode(stream, 0x02); }green42,1963 +inline void blue(std::ostream& stream) { outputColorCode(stream, 0x09); }blue43,2038 +inline void bold(std::ostream& stream) { /* Do nothing */ }bold44,2112 +inline void normal(std::ostream& stream) {}normal46,2178 +inline void red(std::ostream& stream) {}red47,2222 +inline void magenta(std::ostream& stream) {}magenta48,2263 +inline void orange(std::ostream& stream) {}orange49,2308 +inline void grey(std::ostream& stream) {}grey50,2352 +inline void green(std::ostream& stream) {}green51,2394 +inline void blue(std::ostream& stream) {}blue52,2437 +inline void bold(std::ostream& stream) {}bold53,2479 + +externals/binaryen/src/support/safe_integer.h,84 +#define wasm_safe_integer_hwasm_safe_integer_h18,653 +namespace wasm {wasm22,702 + +externals/binaryen/src/support/file.cpp,310 +T wasm::read_file(const std::string &filename, Flags::BinaryOption binary, Flags::DebugOption deread_file25,751 + : outfile(), out([this, filename, binary, debug]() {__anon3760e562010253,2221 +wasm::Output::Output(const std::string &filename, Flags::BinaryOption binary, Flags::DebugOptionOutput52,2117 + +externals/binaryen/src/support/command-line.h,1093 +#define wasm_support_command_line_hwasm_support_command_line_h22,693 +namespace wasm {wasm33,843 +class Options {Options35,861 + typedef std::function Action;Action37,886 + enum class Arguments { Zero, One, N, Optional };Arguments38,956 + enum class Arguments { Zero, One, N, Optional };Zero38,956 + enum class Arguments { Zero, One, N, Optional };One38,956 + enum class Arguments { Zero, One, N, Optional };N38,956 + enum class Arguments { Zero, One, N, Optional };Optional38,956 + bool debug;debug40,1008 + std::map extra;extra41,1022 + struct Option {Option57,1616 + std::string longName;longName58,1634 + std::string shortName;shortName59,1660 + std::string description;description60,1687 + Arguments arguments;arguments61,1716 + Action action;action62,1741 + size_t seen;seen63,1760 + std::vector